[PORTAL-16 PORTAL-18] Widget ms; staging 85/4985/2
authorChristopher Lott (Christopher) (cl778h) <clott@vm-ep-dev2.client.research.att.com>
Mon, 12 Jun 2017 13:49:00 +0000 (09:49 -0400)
committerChristopher Lott (cl778h) <clott@research.att.com>
Mon, 12 Jun 2017 17:42:43 +0000 (13:42 -0400)
Remove staging repositories from poms.
Add widget microservice code base.
Add portal unit tests.
Repair defects.
Normalize line endings.

Change-Id: Ia5e48da2a3141b352439ecd548cddf918f4df585
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
537 files changed:
LICENSE.txt
deliveries/Apps_Users_OnBoarding_Script.sql
deliveries/Dockerfile.mariadb
deliveries/os_build_febe.sh
deliveries/widget_ms_start.sh [new file with mode: 0755]
deliveries/widget_ms_stop.sh [new file with mode: 0755]
ecomp-portal-BE-common-test/.classpath [deleted file]
ecomp-portal-BE-common-test/.gitignore
ecomp-portal-BE-common-test/.project [deleted file]
ecomp-portal-BE-common-test/.settings/org.eclipse.core.resources.prefs [deleted file]
ecomp-portal-BE-common-test/.settings/org.eclipse.jdt.core.prefs [deleted file]
ecomp-portal-BE-common-test/README.md
ecomp-portal-BE-common-test/pom.xml
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppCatalogControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppContactUsControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/CommonWidgetControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ConsulClientControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardSearchResultControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAppsRestfulControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/GetAccessControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ManifestControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceProxyControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/PortalAdminControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/TicketEventControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserNotificationControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRecommendationControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WebAnalyticsExtAppControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogMarkupControllerTest.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/core/MockEPUser.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/core/PopulateSampleTestData.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/core/RemoveSampleTestData.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/core/RestURLsTestSuite.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/framework/ApplicationCommonContextTestSuite.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/framework/MockitoTestSuite.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/FunctionalMenuServiceImplTest.java
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/ApplicationCommonContextTestSuite.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/MockitoTestSuite.java [new file with mode: 0644]
ecomp-portal-BE-common-test/src/main/resources/PopulateTestData.sql
ecomp-portal-BE-common-test/src/main/resources/RemoveTestData.sql
ecomp-portal-BE-common/README.md [new file with mode: 0644]
ecomp-portal-BE-common/pom.xml
ecomp-portal-BE-common/src/main/java/jarutil/ExtractJar.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanup.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanupConfig.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/SwaggerConfig.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/SwaggerMVCConfig.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/externalsystemapproval/model/ExternalSystemRoleApproval.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/externalsystemapproval/model/ExternalSystemUser.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/AppCatalogController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/AppContactUsController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/AppsController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequest.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/AuditLogController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/BasicAuthenticationController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ConsulClientController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/DashboardController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/HealthCheckController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/MicroserviceController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/PortalAdminController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/RoleManageController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemController.java [moved from ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/externalsystemapproval/controller/RolesApprovalSystemController.java with 52% similarity]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/SharedContextRestController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserController.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserNotificationController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRecommendationController.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupController.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/App.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/AppContactUs.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/AppIdAndNameTransportModel.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/AppsResponse.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/BEProperty.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserApp.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRoles.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserNotification.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EcompApp.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EcompAppRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EcompAppRoleId.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EcompAuditLog.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EpUserAppRoles.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccess.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppID.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResult.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/GetAccessResultId.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceData.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/RoleApp.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/SharedContext.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/UserRoles.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/Widget.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/WidgetCatalog.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameter.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/WidgetParameterResult.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/WidgetServiceHeaders.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCatalogItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppCategoryFunctionsItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/AppContactUsItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/CommonWidgetsEnum.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestResponse.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/PortalRestStatusEnum.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ecomp/model/SearchResultItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceException.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/interceptor/PortalResourceInterceptor.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/UserContextListener.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPAuditLog.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/aop/EPMetricsLog.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/format/ApplicationCodes.properties
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/format/EPAppMessagesEnum.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/format/EPErrorCodesEnum.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/logging/logic/EPLogUtil.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AppsCacheServiceImple.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/BasicAuthAccountService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/BasicAuthAccountServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/BasicAuthenticationCredentialService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/BasicAuthenticationCredentialServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPAppCommonServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPAppService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPAuditService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPAuditServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLdapService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLdapServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLeftMenuService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLeftMenuServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLoginService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPLoginServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/GetAccessService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/GetAccessServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ManifestService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ManifestServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceProxyServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/MicroserviceServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PersUserWidgetService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PersUserWidgetServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/SearchService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/SharedContextService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/SharedContextServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserNotificationService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserNotificationServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/WidgetParameterService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/WidgetParameterServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/WidgetService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/WidgetServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/AllAppsWithRolesForUser.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalization.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdmin.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUser.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesList.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidgetMeta.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPref.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreference.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVO.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVO.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EventWidget.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EventWidgetMeta.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRequestFieldsValidator.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FavoritesFunctionalMenuItemJson.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FieldsValidator.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItem.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemWithRoles.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/LocalRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingApp.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/OnboardingWidget.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdmin.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/PortalAdminUserRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ProfileDetail.java [new file with mode: 0644]
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUser.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RolesInAppForUser.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalization.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebMsgTypes.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/CustomLoggingFilter.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EPCommonSystemProperties.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompPortalUtils.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/EcompVersion.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/HashMapFromList.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/ParallelExecutor.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/utils/PortalConstants.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/AdminAuthExtension.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/EPProfileService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/EPProfileServiceImpl.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/RemoteWebServiceCallService.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/util/EPUserUtils.java
ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/util/SystemType.java
ecomp-portal-BE-common/src/main/webapp/WEB-INF/defs/definitions.xml
ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/error.jsp
ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/index.jsp
ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/login.jsp
ecomp-portal-BE-common/src/main/webapp/WEB-INF/jsp/login_external.jsp
ecomp-portal-BE-common/src/main/webapp/WEB-INF/web.xml
ecomp-portal-BE-common/src/main/webapp/index.jsp
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java
ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java
ecomp-portal-BE-os/README.md
ecomp-portal-BE-os/pom.xml
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/conf/ExternalAppConfig.java
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPLoginController.java
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/EPAppServiceImpl.java
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java [deleted file]
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesServiceImpl.java
ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java [moved from ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/util/SessionCookieUtil.java with 100% similarity]
ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
ecomp-portal-BE-os/src/main/webapp/WEB-INF/defs/definitions.xml
ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml [deleted file]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/font_icons.css [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.eot [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.svg [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.ttf [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.woff [new file with mode: 0644]
ecomp-portal-BE-os/src/main/webapp/index.jsp
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestClient.java
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextRestControllerTest.java
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/SharedContextTestProperties.java
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/shared-context-test.properties
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/listener/HealthMonitorTest.java
ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/utils/EcompPortalUtilsTest.java
ecomp-portal-FE-common/.gitignore [new file with mode: 0644]
ecomp-portal-FE-common/README.md
ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.directive.js
ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.less
ecomp-portal-FE-common/client/app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html
ecomp-portal-FE-common/client/app/directives/file-upload/file-upload.directive.js
ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.directive.js
ecomp-portal-FE-common/client/app/directives/left-menu/left-menu.tpl.html
ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.directive.js
ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select.tpl.html
ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.directive.js
ecomp-portal-FE-common/client/app/directives/multiple-select/multiple-select2.tpl.html
ecomp-portal-FE-common/client/app/directives/right-click/ng-right-click-directive.js
ecomp-portal-FE-common/client/app/router.js
ecomp-portal-FE-common/client/app/services/admins/admins.service.js
ecomp-portal-FE-common/client/app/services/audit-log/audit-log.service.js
ecomp-portal-FE-common/client/app/services/base64/base64.service.js
ecomp-portal-FE-common/client/app/services/be-property-reader/be-property-reader.service.js
ecomp-portal-FE-common/client/app/services/catalog/catalog.service.js
ecomp-portal-FE-common/client/app/services/confirm-box/confirm-box.service.js
ecomp-portal-FE-common/client/app/services/contact-us/contact-us.service.js
ecomp-portal-FE-common/client/app/services/dashboard/dashboard.service.js
ecomp-portal-FE-common/client/app/services/external-request-access-service/external-request-access-service.js
ecomp-portal-FE-common/client/app/services/global-constants/global-constants.js
ecomp-portal-FE-common/client/app/services/manifest/manifest.service.js
ecomp-portal-FE-common/client/app/services/menus/menus.service.js
ecomp-portal-FE-common/client/app/services/microservice/microservice.service.js
ecomp-portal-FE-common/client/app/services/notification/notification.service.js
ecomp-portal-FE-common/client/app/services/recommendation/recommendation.service.js [new file with mode: 0644]
ecomp-portal-FE-common/client/app/services/role/role.service.js
ecomp-portal-FE-common/client/app/services/users/users.service.js
ecomp-portal-FE-common/client/app/services/widgets-catalog/widgets-catalog.service.js
ecomp-portal-FE-common/client/app/services/widgets/widgets.service.js
ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.html
ecomp-portal-FE-common/client/app/views/account-onboarding/account-add-details/account-add-details.js
ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.less
ecomp-portal-FE-common/client/app/views/account-onboarding/account-onboarding.tpl.html
ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js
ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.spec.js
ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.html
ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.modal.less
ecomp-portal-FE-common/client/app/views/admins/admins.controller.spec.js
ecomp-portal-FE-common/client/app/views/admins/admins.less
ecomp-portal-FE-common/client/app/views/admins/admins.tpl.html
ecomp-portal-FE-common/client/app/views/catalog/add-catalog-dialogs/new-catalog.modal.less
ecomp-portal-FE-common/client/app/views/catalog/catalog.controller.js
ecomp-portal-FE-common/client/app/views/catalog/catalog.tpl.html
ecomp-portal-FE-common/client/app/views/catalog/information-box.tpl.html
ecomp-portal-FE-common/client/app/views/confirmation-box/admin-confirmation-box.tpl.html
ecomp-portal-FE-common/client/app/views/confirmation-box/confirmation-box.controller.js
ecomp-portal-FE-common/client/app/views/confirmation-box/confirmation-box.tpl.html
ecomp-portal-FE-common/client/app/views/confirmation-box/dragdrop-confirmation-box.tpl.html
ecomp-portal-FE-common/client/app/views/confirmation-box/information-box.tpl.html
ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget-manage.html
ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget-parameter-manage.html
ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget-parameters.controller.js
ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget-parameters.controller.less
ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js
ecomp-portal-FE-common/client/app/views/dashboard/dashboard.controller.js
ecomp-portal-FE-common/client/app/views/dashboard/dashboard.less
ecomp-portal-FE-common/client/app/views/dashboard/dashboard.tpl.html
ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js [new file with mode: 0644]
ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.delete.modal.html [new file with mode: 0644]
ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html [new file with mode: 0644]
ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/modal-details.modal.less
ecomp-portal-FE-common/client/app/views/header/header.controller.js
ecomp-portal-FE-common/client/app/views/header/header.controller.spec.js
ecomp-portal-FE-common/client/app/views/header/header.less
ecomp-portal-FE-common/client/app/views/header/header.tpl.html
ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.html
ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js
ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-onboarding.less
ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-onboarding.tpl.html
ecomp-portal-FE-common/client/app/views/notification-history/notificationhistory.controller.js
ecomp-portal-FE-common/client/app/views/notification-history/notificationhistory.tpl.html
ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.js
ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.controller.spec.js
ecomp-portal-FE-common/client/app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html
ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin-controller.js
ecomp-portal-FE-common/client/app/views/portal-admin/portal-admin.tpl.html
ecomp-portal-FE-common/client/app/views/role/popup_modal_rolefunction.html
ecomp-portal-FE-common/client/app/views/role/role-controller.js
ecomp-portal-FE-common/client/app/views/role/role-function-list-controller.js
ecomp-portal-FE-common/client/app/views/role/role-list-controller.js
ecomp-portal-FE-common/client/app/views/role/role.html
ecomp-portal-FE-common/client/app/views/role/role.less
ecomp-portal-FE-common/client/app/views/role/role_childrole_popup.html
ecomp-portal-FE-common/client/app/views/role/role_function_list.html
ecomp-portal-FE-common/client/app/views/role/role_functions_popup.html
ecomp-portal-FE-common/client/app/views/role/role_list.html
ecomp-portal-FE-common/client/app/views/role/rolefunctionpopupController.js
ecomp-portal-FE-common/client/app/views/role/rolepopupmodelController.js
ecomp-portal-FE-common/client/app/views/sidebar/sidebar.controller.js
ecomp-portal-FE-common/client/app/views/sidebar/sidebar.less
ecomp-portal-FE-common/client/app/views/sidebar/sidebar.tpl.html
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.js
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.controller.less
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us-manage/contact-us-manage.html
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.js
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.controller.spec.js
ecomp-portal-FE-common/client/app/views/support/contact-us/contact-us.tpl.html
ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.js
ecomp-portal-FE-common/client/app/views/support/get-access/get-access.controller.spec.js
ecomp-portal-FE-common/client/app/views/support/get-access/get-access.tpl.html
ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.Json.details.controller.js
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.controller.js
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.json.details.modal.page.less
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html
ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.tpl.html
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.ack.html
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.confirm.html
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.controller.js
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/bulk-user.modal.html
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.spec.js
ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.modal.html
ecomp-portal-FE-common/client/app/views/users/users.controller.js
ecomp-portal-FE-common/client/app/views/users/users.controller.spec.js
ecomp-portal-FE-common/client/app/views/users/users.less
ecomp-portal-FE-common/client/app/views/users/users.tpl.html
ecomp-portal-FE-common/client/app/views/widget-catalog/widget-catalog.controller.js
ecomp-portal-FE-common/client/app/views/widget-catalog/widget-catalog.controller.spec.js
ecomp-portal-FE-common/client/app/views/widget-catalog/widget-catalog.tpl.html
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.js
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.controller.spec.js
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.spec.js
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.less
ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.tpl.html
ecomp-portal-FE-common/client/app/views/widgets/widget-details-dialog/widget-details.controller.js
ecomp-portal-FE-common/client/app/views/widgets/widget-details-dialog/widget-details.controller.spec.js
ecomp-portal-FE-common/client/app/views/widgets/widget-details-dialog/widget-details.modal.html
ecomp-portal-FE-common/client/app/views/widgets/widgets.controller.js
ecomp-portal-FE-common/client/app/views/widgets/widgets.controller.spec.js
ecomp-portal-FE-common/client/app/views/widgets/widgets.tpl.html
ecomp-portal-FE-common/client/bower_components_external/b2b/css/b2b-angular/b2b-angular.css
ecomp-portal-FE-common/client/bower_components_external/b2b/js/b2b-angular/README.md
ecomp-portal-FE-common/client/bower_components_external/b2b/js/b2b-angular/b2b-library.min.js
ecomp-portal-FE-os/client/assets/images/onap-logo.png [new file with mode: 0644]
ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/.gitignore [new file with mode: 0644]
ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/README.md [deleted file]
ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/.gitignore [new file with mode: 0644]
ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/README.md [deleted file]
ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/b2b-library.min.js [deleted file]
ecomp-portal-FE-os/client/bower_components_external/ionicons-2.0.1/css/ecomp-ionicons.css [new file with mode: 0644]
ecomp-portal-FE-os/client/bower_components_external/ionicons-2.0.1/css/ionicons.css
ecomp-portal-FE-os/client/configurations/dev.json
ecomp-portal-FE-os/client/configurations/integ.json
ecomp-portal-FE-os/client/index.html
ecomp-portal-FE-os/client/src/directives/right-menu/right-menu.less
ecomp-portal-FE-os/client/src/directives/search-users/search-users.less
ecomp-portal-FE-os/client/src/styles/att-abs.less
ecomp-portal-FE-os/client/src/views/applications/applications.controller.spec.js
ecomp-portal-FE-os/client/src/views/applications/applications.tpl.html
ecomp-portal-FE-os/client/src/views/catalog/add-catalog-dialogs/new-catalog.controller.js
ecomp-portal-FE-os/client/src/views/catalog/add-catalog-dialogs/new-catalog.modal.html
ecomp-portal-FE-os/client/src/views/dashboard/dashboard-extension.tpl.html [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/dashboard/dashboard.tpl.html [deleted file]
ecomp-portal-FE-os/client/src/views/footer/footer.controller.js
ecomp-portal-FE-os/client/src/views/footer/footer.controller.spec.js
ecomp-portal-FE-os/client/src/views/footer/footer.less
ecomp-portal-FE-os/client/src/views/footer/footer.tpl.html
ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js
ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu-dialog/menu-details.delete.modal.html
ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html
ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.controller.js
ecomp-portal-FE-os/client/src/views/functionalMenu/functionalMenu.tpl.html
ecomp-portal-FE-os/client/src/views/functionalMenu/jqTreeContextMenu.js
ecomp-portal-FE-os/client/src/views/header/header-extension.tpl.html [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/header/header-logo.html [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.controller.js [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.html [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.less [new file with mode: 0644]
ecomp-portal-FE-os/client/src/views/search/search.controller.js
ecomp-portal-FE-os/client/src/views/search/search.controller.spec.js
ecomp-portal-FE-os/client/src/views/support/contact-us/contact-us.aux.html
ecomp-portal-FE-os/client/src/views/support/get-access/get-accessinfo.html
ecomp-portal-FE-os/client/src/views/userbar/userbar.tpl.html
ecomp-portal-FE-os/pom.xml
ecomp-portal-widget-ms/.gitignore [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/approx-portal-usage.zip [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count.zip [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count2.zip [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/widget_events.zip [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/widget_news.zip [new file with mode: 0644]
ecomp-portal-widget-ms/1702-widgets/widget_resources.zip [new file with mode: 0644]
ecomp-portal-widget-ms/README.md [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage2.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/ccd_widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/daily-app-usage-count.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/events-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/news-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/dashboard-widgets/resources-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/docs/Deployment Guide Portal Microservices and Consul.docx [new file with mode: 0644]
ecomp-portal-widget-ms/java [new file with mode: 0644]
ecomp-portal-widget-ms/pom.xml [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/certificates/be1/widget-keystore.p12 [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/certificates/be2/widget-keystore.p12 [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/docker/Dockerfile [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/MicroserviceApplication.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/constant/WidgetConstant.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/DatabaseFileUploadController.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/HealthController.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/WidgetsCatalogController.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/dao/WidgetDataSource.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/App.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceData.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceParameter.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/RoleApp.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/ValidationRespond.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetCatalog.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetFile.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageException.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageFileNotFoundException.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/filters/CorsConfiguration.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/hibernate/HibernateConfiguration.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/listener/WidgetEventListener.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/InitializationService.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/MicroserviceService.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/StorageService.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/WidgetCatalogService.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/InitializationServiceImpl.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/MicroserviceServiceImpl.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/StorageServiceImpl.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/WidgetCatalogServiceImpl.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/AuthorizationUtil.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/UnzipUtil.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/application-properties [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/application.properties.templated [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/events-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/framework-template.js [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/logback.xml [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/news-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/resources-widget.zip [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/templates/Upload.html [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/templates/widgetsPage.html [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/widget-keystore.p12 [new file with mode: 0644]
ecomp-portal-widget-ms/src/main/resources/widget_ms_start.sh [new file with mode: 0755]
ecomp-portal-widget-ms/src/main/resources/widget_ms_stop.sh [new file with mode: 0755]
ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetFileControllerTest.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetsCatalogControllerTest.java [new file with mode: 0644]
ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/service/WidgetCatalogServiceTest.java [new file with mode: 0644]
ecomp-portal-widget-ms/testadd.txt [new file with mode: 0644]
ecomp-portal-widget-ms/website.url [new file with mode: 0644]

index 880bbc9..9532e5b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * ============LICENSE_START===========================================================
  * ====================================================================================
- * Copyright Ã‚© 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright Â© 2017 AT&T Intellectual Property. All rights reserved.
  * ====================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,6 +14,6 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
- * ====================================================================================
- * ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property.
+ * ============LICENSE_END=============================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
\ No newline at end of file
index 3a86abf..64edfc3 100644 (file)
@@ -1,13 +1,18 @@
 USE portal;
--- Apps
-INSERT INTO `fn_app` (`app_id`, `app_name`, `app_image_url`, `app_description`, `app_notes`, `app_url`, `app_alternate_url`, `app_rest_endpoint`, `ml_app_name`, `ml_app_admin_id`, `mots_id`, `app_password`, `open`, `enabled`, `thumbnail`, `app_username`, `ueb_key`, `ueb_secret`, `ueb_topic_name`, `app_type`) VALUES
-       (2, 'xDemo App', 'images/cache/portal-222865671_37476.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/welcome.htm', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EEC9D099C5D6579FFBF67B9EBEC5B6626B364DFC91E12080142D87710595C0A5A37B455FBD75AB56A6D6BD55A6D6D6D6B6BAB15045111C50504917D95B0869090909DEC997DEE7AF6FFE77DCFBD333721C0850C3093BCE7C3903B73DF7BEE39BF73CEEF3CE7F7FE9EE7D1508B424021A01050088C4A04B451B9556AA314020A018580420045D0EA24500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0085A9D030A01858042609422A0087A941E18B5590A018580424011B43A0714020A0185C028454011F4283D306AB314020A0185802268750E280414020A81518A8022E8517A60D466290414020A0145D0EA1C500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0F5A6EC40C1A010500828041402A30F0145D0A3EF98A82D520828041402120145D0EA44500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0085A9D030A01858042609422A0087A941E18B5590A018580424011B43A0714020A0185C028454011F4283D306AB314020A0185802268750E280414020A81518A8022E8517A60D466290414020A0145D0EA1C500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A5088C28416B1A68E27F6A510828041402C718024110100423BBD3234AD0B1884E32668CEC16AAB5290414020A81318080E5F8642D6F44B75411F488C2A956A61050081CAB0828823E568FBCDA6F85804260D423A0087AD41F22B5810A81A31701A1B18A45CD331DFE182B823E7ACF7DB5670A81518DC08E1D83DC7BEF4EB98DAB5675306142F5A8DEDEB763E31441BF1DA8ABEF54081CE308B8AECBAF7EF5221FFAF0831289EBAF3B830B2E988CAEEBC7383207EFBE2268753A280414026F3902B66D73D34D6B79FF9F3E2CBFFB673F3D8BCB2E9B8E6128C756E9C15004FD969F9AEA0B15020A817C3ECF0D373ECB873FFCB804E327379D21093A128928704A105004AD4E07858042E02D472097CBF1A31B9EE1DA6B9F90DF7DD34DA7F3CECB6628823EE44828827ECB4F4DF5850A01858024E81F3DC3B51F5504FD6A6783226875AD280414026F39028AA0CB835C11747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB0353117479388DECA8C027E8DB4490EB26705290EB016B407E879FD9034E06341D2D568B166F18FEEEAA7630A2F26F5A450B5A55C7C86E975A9B42E02D4240117479402B822E0FA7231BE5D9787B1F23E8D900D97DF87D9B09522F110822F62D70B2E0E6E57704760A7C1BD0C04CA09989E1EF8ED5806EA0991510AD444B8C43AB6845AB9B8ADEB400BDE93888541DD9B6AA4F2B04DE020414419707B222E8F2702A6B54E064F1773D10FEEC790CDC4C48BA411046C86E163C9BC0CD41E095B5CE571DA4E961442D483C528516A900CD90DC8E66A25577A2371F8F31E522B4FA1947FE7D6A0D0A81114240117479402A822E0FA7571D153869FCDD0FE33CF8391919E33BE0BB829A4760ED47B00A41E0BA8956D18631F14C8C1957A2B79E1092B85A14026F23028AA0CB035F11747938958C0A0A32842789D87BF116DCD55F23103AF2DB4DC8AFB92F1A5A653BD1737F84563F538ED68CA8945284E67D444BE01FF93A8E6803D487C712028AA0CB3B5A8AA0CBC349926F90EF87D40EECDF7F00BF677DE1936F73945CF6F6970E141A48B8E813CE20B2E43352C7D6E28D523279DD8BEFE1F73C8F5E33456AE36A5108BC16028AA05F0BA1F07D45D065E024A2E3A0E779BCADB7E36DFC0941B6AB8C4F8D9D21C22DA2B79F823EE97CCC199783997C5D1BEFEF7F1AE7912F1039E9ABE8CD0BC3094EB528045E050145D0E59D1E8AA05F15A780207B006FFD0DB8CFFF1FC1E08E9199DC2BEFD8BCF5A38C3891657F8DDEB112BD711E98F1D7DE063787F3E89771D7FC37D10B6FC6987096923A5E1BB5637E8422E8F24E0145D087C3C9B371D77E9F6060AB24687FCF2304E9DDE5213AD6471931F4A6F9D2B6A7554FC098740E5AFDAC9793AE67E1EF79146FCB6FF05EBA97A06F23D1F36EC2987AF13137095914B90E7A6E38EC1FC7FAC93172DBAF08BA3C2C15411F062777C34F711FF834415E4CFC1DAB8B06D12AF471F331A65F8131ED32B4787D0846E0E16DBF0BF7B12FE377AF1B7AAA889EF13D8C59EF91CE91A37E11D6C921460E5F084E1E7E558A80927C0E3D1F144197778528822EC129187C09F7C97FC2DB7A1B41665F79081EEDA3444663BC1EF3946F624EBB2C9C44B453E46F5A4630B84D98BC8710889EFE5F18B3FFE4D8216841C99A349D176E5CE2F7024D07E26FC5F78FF693E4F5EF9F22E8F23053045DC0C9DBF63B9C873E2F650DE96356CBC108442A3067BE1BF384BF913730E79E8FBDCC561859F135CC851F073D72D4A327EE4B828A050F0B2A9626456935D408D0C2FB56E13D153FBFFC7450045DDE25726C13B4A88931B00DE7F1AFE26DFA257861BAB55A5E0D8122DDBCDC5E689EF02569D97B4356BD510CBACC042D2C322E16241C804B40CE87BC1BE0BA015EE0636A1A31D3A0361206D732BE9651B65A4A1150045DDEF970EC12B4A88FB1EB01DCC7BF8EBFF7D1F2D052A35E150173E127899CF4F760C4DE52A402E151470BC970580816A5A70AF2C3213715C9B705F61CDA521112879244715D22440ED71D126DA005E41CC8783EBD399FFD298BFDFD167927C0F1021CDF470B7C6246C0B82A9386AA38CDD5719A92260953470FD732AC5617C3EFB714ADD1F1658AA0CB3B0EC72C41FBDD6BB17F7DC9B1E3CE28EF7C38A251C6DC0F113DE59BE5D9F38EE89B0EF970416E10EC2CA25D3D64D39249BB428EA7E064190D0B223E38DD5D727620A859BC1B927DB804782252767C7AF32E2F7459F4E61CB2B64822D0B0020DBFA0377B22B9544CA0FA2E9A9BC7C4A73AA633BBA592992D55D4554431C4BAB5A1DB49E12B8E3DAD5A11747917C03147D041BE177FF3ADD27DE0AEF96E7928A951652160CC7C37D1D3FF334C1D7FCB96909D8BD41A68BE50802110AAB02E63683B08C87922E2CD3360B9641D485B3EAE0F9E1F485295E42C43E580A20745C7A33611A33259417FCEE140DAA1D7127F15045E903964E0ED83EFE37B3E7E10E0061EBEE71278E25F8FA4EED25A1B637C759C8698C6FC094DE1DCA2F84EF1427EEFB1258328822EEF0239A6085A249AB8CFFC3BEEDAFF05CF2A0F2135AA6C048CC917C83A1FAF3713B1EC2F78D9C030622ECD5C143C27485944B53DB6C78BBD3976A65C76A61D3674E5E8CA7BA41D8D8CE5E00BDD5844BB9E85E179E88120581F538811814F7D4594396DCDB4D7D71574643FBC19F822AAF62531FB5E611B84262D09DAC317A9EFAE8D2F483BF0B17D5FBE879527A9D9BC7FC54C3AC755A10782EAF5B0F6F71B07614C7E5211747987ED982268FBDE3FC37BE12610E53ED532E2081813CF217AFE4D6F3A418773768589BB21D942BCD0480501BB52369BBBD33CD365F14C9747BF15907675D29E81E30798BE4BA59F2111D844F048682E31CDC790D28329A58CEACA1A6674B631AE224E4484D6224A0E021128E307A1941112B420EA50BF766420ED11F81EAEEB84442DA3690FCFF37005613B2E932BE0B485139935BE16B320CF8848FA58226945D0E55D7EC70C418B7A11F61DEF0D6D746A795310D05B9711BBF47720EA528FC47270703CB4462929C8B8599072381198436767D6E5B60D0758D765B32FEDD2E3C5496B7149A49AEF92D0032A758F3AC365BC99A7427388E113D73C0C215CE8069617A1DFAC605C731B159118BA274AC70A32464A1BC2A9218857B2B4F89B27DE13441C482216E42C48DBF15C193D8BD79EE7E2FA01AEA7A189D7F92C13EB34CE5B3A9599CDF568F8324297D1F431B228822EEF401FF5041DA477491B9DBFF9370456FFDB5B4BC38862B42E43EB380D73F6D5A0BF81CA71C5E3EAA4F15EBA077FDF9304FB1EC7EFDFF2B6FBB7F5A6B9C42EBF0F22475ED16EC83921E977386F5A44AB9A9888D34DB27EC0833B06F9ED867EF63B06B66630E847707C0DDFB1A88AF8CCA88FD35913A53E1145CFF4E1A57AF173299C5C56BA2E021101FB1E8316F47911DAA6CEA2A65AB4190B35E6A0206548995946D0A15EED89509A90A0FDC09551B47C2DA2651129FB829885DC11FE1BFEF8F8AE8BE3DA684E8E981E70F6FC0ECE5B1436530865E863238E5604AD085A12B2FBE43FE33EF39DB74773D60D6939D31BE6622EFA24C6A4730B0E8791BE0803BC6D77E2BF7833EE8E3F803D0822F27B8BEB536B15E3895DFD2C5AB4BABCB3EF554785141D52B398F813C4A8E36B06BE1FB07130CBDD9B7B79648FC77EBF02CF088DC7819DA54273195F6932735C2553EBE218BE8D97CB92EEDA4F3E3D8863E5C9E52D5CD796137929CB67902A5A672DA4A1A989C0B6C3893FA95C08520E658CE26BB945051216842D74EC21822E21E4E218296F8888DA15DAB48B23E63F1C3171E971D2F446DE7FCA5C12868E9CE01CAACB3DD2E7C8081C92115C8522E8F2C03C7A2368CF92C927F6FDFF0F44E4FC562C661C2DD1282348D17E4A9F7016C6940BD11B8E7B8B92370A74B66F35CE837F45201BD10690EF0FEB8AC82E2F6FDEA225C711BBE6F91121681929173655389185D52D6B7B64ED803BB70FF0D8CE4176E60D5C2389661818BA89A1F94CACF0985897A4A53A4652F3D06C1BD7B2B133830C76EF259F4D63DB16996C56EAC4AEEF918D34D230653EE3C6B586BAB2EFA1090943C4CF7E48CC45722E9275F15F215F841383C311B378EDBAEE10897BAE3B1C5D7B1EB663E10A95C473195F1DE1B2A5535838B995A8A117DC1D85F4F1A398A3154197771D1E9D042D1E81B7FC264CDD1EDC5E1E1247384A448DA2A09031F783E8CD8B0A6B7B3BAFB0822C200867FB9DB8CF5F87DFBD8620B52B9CF07A9396F8B5FB6437F2235D849C204D7281262D725BFA73DCBFB597A7F6E5D81B6B0E73AC038D58E0D2561130B93E416B65942ACD1EF2310BF9C2C967C9A57AC9F60F30D0DF8D95CB60E7F3643359529E4EC6A862CAFC65348FEF905639690191138021297B624250FCBDF8BBD09905714BF942481D05D78688A40F913464042DA26741D04592F67D6C4744D10E81EBE0E472B4D5E87CF0BC1399DDD91A4E488682C7512D7728822EEF0A392A09DA3FF02CF69DD7C812986FF6A245ABD01AE76174ACC498FFD130821E858B683AE0EFBA4F4A21A2E98098F87A33969122683909878FA7C1133BFBB9FDC51E36E5A2E48C04B611C3F05CA2F84CAE3139AE394175C44017A41E88A70431D916E0B90EB9C13E327D7DE407FB1918ECC1CEE4B0F27906B2797AA964DCD4794C993E8398190953B8A52B4310B2F837F4498BDF872368A1390BDD3AD4995D394958785D42C245B22E12B4EB384304EED80EAE277E5C1CDBC2B0D35CBAFC382E5BB180642C8226273EC53EBC9D37F837E3EC185EA722E8F2F03D2A09DAFACDA5F8DBEE280F812319251EAB279D87B9F4F3E80DB3DFF214E737B4E9F620CE93DFC2DF7E17229B7244BA8B976C48FCFD1B651DE9D7B71C5CA85364FB0951C30D74B6F5E6F8C5865E9E1ED071A2893043D0F5A8323CDA6B624CA98FD310054338354A547749AE769E74CF7ED27DBDE4D2830C0EF460A72DAC7C96DDB98044DB2CE62C3A9E8A8A4A49CCC2972CA366797318D6990F92388250AE2812F6101117648DD2285A4E18BAA1E54E46D18508DB16B28BE7E2899E968E8D9549735C5B1D9FB8FC4C263454A369E2E629321D1541BFBEF3E8E81B7DD411B4A8B466DF76E588134FE9A1D79B9760CCBC0AADA205AD6E067AE3DC317566B8EB7E88BBFA1B6107F211963B62EF79E2F5E321095952A2A4249164B2664F3F4FEF49B1C38EB0336F92F185633920E6DBCC1F5F43B5E15117D3881B05122BA64F0F293B3EF9CC207D7B77911DE8259B4E3338D0473E9D23E3B8C4A79F48E794695455540D4D060AC786FCEF9049C1E1DF45C4EC1C44CEAF48D04E48C87282D00DA3E7A22E6DD9B69C2CF43D1BC7B1C85BC2F2E771ED25A772CEE25918BA70AA88041645D063EAC27A1336F6A822E820B513EBB7EF20E85AFB264035BCCAF8D56BD0AA278E8D88F93048E47F309920BDE74DC12876E9EDE89DA7BFBE754B3B9B706978B24646D685AFDFF322FBFC24D9682522B74F44B871CD62725D8C79E31232EB2F8CB443395A96D728D4D090E288EB4A79A36BD776B283BD58990C03FD29329914079C08275F752DF18889CCF716E9DEC5B24842572E44C862278A041C46D182A08563637842B07432B0F85A4C1C7A43045DF041BB6E18450B0DDAB2A4FE2C2418DBB1C9BB0E5A3ECDFBCE5ACA9F9C750211532790553B8EDE45491CE51DDBA387A07D07E7EE8FE26EFCE99BE656D02295444EFBB7B06BC8185DDC47BF8CF3C437DEB4AD8F5DF44BF449E7BDAEF58799819E4CD6C8A273DF867DDCB2C3213013385A4C929A48919ED118A7B3364195970BED76D2922688BA506DAEF0AD527E701D327DDD74EFDC4636DD4F2E9B61A027C5817496C15813175E750DBEE30C45CF82A48B245CF4380F5BE9428D59BC1F46D0E1EF87BA358674E6E2C4E050041D927351E6102E8EC0B1E5F7DBAE70A638C434978F5F761A172F9D8121DC1C52E278854C9DD785EEE81CAC08BABCE3727410B4886CD65D8FFBE8970872DDE5EDF9EB19A519E8F5332439EBE34F1A7B4D51858CE1E5711EFC2C42DE1879BBDD70E9CED885BF40177EEFD27A70C5A240AF8079B1DEB2706EDFFDC25EEED8D045AABE1D373024D655584C6F8CD35E1D23E2B918854A756175A3E145FCE6E9A07B019E6D91EAE9A27BD736B2A901B2B90CFDBD29B6A55C262E5AC9FCB9B343392308B30385AD4ED4D8184A4639C8EB3C4CC842372E7A9E8B12C610593BCE505AB7533A29E83838452747E0625B7902DB9263C5053868392493493E7BCD799C3FBD49EC32BA22E8D773851EB5638F0A829605901EFF1A81D537F2074A74BA3EF59B98733F3846276D02DCA7BE8DFBC43F859994872EA27F60690714DD402BCD70946C2192404AD29045DB2B59AE332448BD6A025AB245BED666BF07BDE37499622252988533A248D6438FEC850247A2BEB2AC4317183CB3B397DFACEF62AFD98863C6F00257AE43A466CF6E4AD092142E8D32EC81528AF064324AAAFB00DDBBB64B592397C9B2617F9696E356B060F102022B47E08B6CC1128F7321392524DC421D8D82BFB9384E44C132922EF89CC3ECC1A29D2ED49A053917DF77E524A1156ACE52F670C8590E9A97C77534F6EFCCB2DFAB22DFDA8EE70DF0FCD72E624A4DAC509D4F24AE1C5C1675E44FF0B7678D2A822E0FF7A380A0039C073E83FBEC7F94B7C7AF6754A40263F285984B3F875E3FF3F57C72F48C75F3B84FFF2BDE965F0F6F53AC6EE8B5B005EA95E387DF8BD74265C7F0FBD14AB48A5634235E1410A076329815720EAB58B728CC5216948CF40ECB1F517FA2F023A95546D282EB75C4DC5E54D788E8A1FDF8862776F374DAC48D26080283C07749EA1E136AA2B45747881D142D9746CEA54A6DB10F958F9DCF91EADA4FF7EEED64B329B2D93CBBEC2A169E722E15C9B8D4808BA45B9A2D38246B14ABD215A48CE29821CD596607869380421F179F731C7B6832B0286738628C63E18BF7A4CCE160E75D02CBA6F7A51EF6AEDF47CEAC21367F01D9C66AFEF2CC4EFEF2AC9924A2A0FB1ABA2C6E7DF42D8AA0CB3BA6639EA0835C9724684F68CF23B908729E7E854CD11EB3E42CF070F304B903F2DFE2A2D54D7B0DA45E9D14427A0CFF2F26E67C7C59252EEB06A41D9F7D595766FC651C9F8CE591737DDCC2849EA60798862EB3E66A22260D0903CBB1B977A7CD3EDB9451B24714337098506DD2561B23AEB98542FBC3B98507EF4089C12E0CCAB1F35952DDFBE9DDBD834C2E454A54D86F5DC09459C785E42CEF188592A142DA2868CCA5045DEA6F2E92B9888E4B53B8858D2E4C5A0909BA48E0C24A17A67887041D5AED7C3C274FC4F278E9B92DECDFB8172DA3E3E9519C8E0ECC8573A8AC36F8CA550BB962712771B123C2CC71144E172A822E8FACC6344107D90378EBAEC35DFBFDD03236528B192772D25731269F1FBA35D4328C80205AADD0F6296BD39B73E9B321E56A64DC80941DD093B125613B5E6892F0440D8D02A9CB24104DD46DD33074D1BF4F7424F118744D9C20228958C365526D84D64484B819BA3B6481FC728F83F86E2B47BAFB00BD7B7791CE66D9D59F63E2E255D4D7D687645CC80E0C35E7E1449450BE10863EF1B790788BA45B2A6DC8D4EE82C75992B41827A40DE1E010E9DCD2EB2CA40F1BCFB6B11D07CD7798D652CBC9D327B167D376BCACCFB34FEDE00F773D8F1B4DE2B58DC35FBA9089ED493E7CEA24DEB9A08371C9E106BC47536F4345D0E59DCC6397A0453AF7F6BB70EEF93382CCC85AC6F496E3895DF95079081E6DA3645FBE304216C9D6C51E7FA5D5E5065C8FD53B07D995121D4620E31B7242CF2F481C82600D024C4DC7D075F442417A41B122CF2F10937C22CAF57DF2521E10A590345C4D481B3ED59ACDA2B64A0C1F7491B42199B91825CB02D00583434995BBE1E70349AE5E3E4BBAA797BEFD7BE94B6779B1DB62E189A7529D88E3A1CB0A766252505AF264BAB6D88ED04A17DAECFC421AF7C13536A47D4E96112D789CA5AE2C3CCD3E8E889285B75910B72DD629A2680BCF72F13219668EAFE53DE7AF64765B3DA669629A70FD0FEEE6CB7FFD1320229BD006679F46B6BD9D96448EBF3B6F16EF3E7E62D815B168F72E3CB78CF5D34E1174794770CC12B494361EF922DEFA1F85CD3E4768D192CDB2E8BC746B1C934BB14DAAC0542F31196BB283F54B83393675A559DF07592D2A2701A503423C8D8B76513AD4C4848461C81FD1E5DA1C9A272C8823225B0F64946DB9E2C7A7CFF2C8D86194D95E5B495B8588B143CD5A9775374A3BC28A770A5AC641253A430D5C4817BE20E8BE3EFABBF6B3BB37C39E7C8C79F317509988CA9B81E88452ACAFE1FBC58247226F6798984B4B850EC91A8290658D8D83AD73E27D1125FB2285DBF5B12C4F5650F4FC1CBAE5B368C2781A2339CE5E71022DCD09224682542AC3BF7CF397FCE8BA87087413D3D7E8EB68A1F2E453B0123E57CDA9E2BB572F2FECAB48E229765E19FBBAB422E8F2C865CC12B4DFF52CD62D6785A535476A31A244CFBD514A1B8736151DA9AF18BDEB292ACBC566AB855ED9F2CF3A5D399B67F7A7D8D827122B4CD2A688443574DF23AA7924220615D11815A6415264F50D3546152E8D029916495570A3E45CAD10750B7FB14ED676A503A2B62A4E2408CBA58AD653A2C6864CF12E74DC96938845538988CE75D188B564C63270F16D8B7C7F2FFDDD5DBCB0378D956C64D6B4A952FB16DB5DACB921562DEA39CB4E2805B943481A6219AEE35C8CB043194390BB4C462990743199C595B246585AD4B184734344E52EDD2F6CE5FCC57338616127B95496D3CF9A876926D8B1753F5FFADC8D3CF2E84B843DBF0306741B6DFE71C416CF63D9D41AAEFF9345D4C6C4934C98C473B4E8D18AA0CB63823149D0819DC2FAD10282CCEEF2F6B28C51A22468F4829FA1D54E2963F4D1386428264597C5E803990CD263793CBB67807503016922328A132363814D753442752C414C4E64899E7E61A0EB16026FBDE08A93997E251284142C869414591B0E3F083DC4B82EBAEF080B88ACC521A5132326234C0C83401335A1CD90D865C966596EAEB0F6403658D1752F8CDAAD0C07F6EE63F5F61E264E9D496763B57487084D1C5F4CF6850F5FC311F470F2496979D183B205EDD04A5724E7A25B43DAEB44753A173C51903F9726D3956560FB368C9E1C99BE34FFF0CD0FD37D600FEF7A9748E4091D1A8F3CBC817FFCEA4FD9F8C25E342D82E7EB58BA8F3F7D0A0D272EE2FCA575FCD5B9F3185F119337BDA3A53E8722E8F238646C12B4D54FFEBF43DFED482DD133FE0B63D67B0FF6048FD4CAC7D47AC20ED50E3A2F0D5A3C2BEA616475F2BA298BC9EB1E183A3455992422427E084B82CAC7EF21A9342C052A5D120769A701811ECA2132AA16516BB16EB2F005CB4ED8521426E71BE8461C5DD8EECC381866988E2D3E26B2088BB2967487143569999018B6B8127BE0FBF41CE865DDCEBD4C9E3C85A6AA78E8B8D07402D1D43510242F9253C2087A285BB0B04DC58494616B5D18410F47D607CB1C395754A60BF7899C4D76C77E1A4C93DE3D7DF4F7F5F1F75FFD30BB766EE4F2779E8B666852833ED095E56B7FF7536EFBCD13327BD04378A05DAC649CE8B2C54C387E027F73E12CCE9AD1425411F498BA92466263C72641A7F720EA498CD862C6899EF793B0E3C9B1BA14345E99D517681CC839FC7E730F075C13DF48485434DF23AE05542522544544342DDC0EF29D30242E4E2DFAA1FE20125104414B322E261BCA529D61EB28D9F95A140EF25C701DA947677D0D2B8044552391681CCD8884845A1281CBE8B650BD2E944FC2C85DC6E28198001465472D8240978D65D2C2DA6646658358D9AE4A4A1CA2EBB6B81784DB22BAA2941274A9DC21FCCBC59E83A254E870C5BA509209A3690FD7B1713C1BCD72493DBF9B591DEDC47483679F59CBA92B8EE3A413A793C90EB2EACC2572F2547CFF9A67B6F1CDAFDFC2534FEC243084D061E2EB2EA2E7BC376306D5A72EE45DC78FE32F56CD05F8E9980000200049444154A035190DA59CB12F41A322E8F28866EC11B4C8127BFC1F711FFF4A797BF81AA3B4783DFAC4B3892CFD3C5ADDF41159E7985C492112CD3A3E7B07F36CCBF8ACED71F08CA8E45E91541237022A2286AC2057CC1B09FB9E849379B2EBF590F61CF276283F87EE084D4CAEC91467D1FE29D470450A74266FA1099B991E27EF413499A4B2AAA630F77B88BDAE90F957ECB83224CC14826841B8A1C02D32FEC4A45F78F310FD0085BC216F0E224897DEE502F10E15DD0F2D7787764329FDDD91FEE642012441CCD25A27925544F289456D328696CEB26BF5666A9249E90469AC4F72E925A7626879DA3B5A19DF568BEB6ADC73CFB3FCFC670FB2E6995D64D3BED4D50D7103110A8C48F4696B2376C6494C6C31F9F8E993B970763B8948A1EBCA18676945D0E5B1C49823E860701BF91F2D94B5258E78D13459CF3972F237D06AA71EF1EAC6E60A42660B894E63F5CE3E9EE9CACBC2F89A1E911367E2C1BB361125618849AA70E2AEAC4508C2821045042AAAB78908339F95C48CE7627BB03FEB9173A0B1AD938A9AFAC2649F30C2BDBCC3753159446E6D8971A758CB43BE2FC3E2F0CDC3950D3D2821454A1B0737782D7A9D8B29DC323A2E494E2926A014A366DB11892A3681936362758CE5D3A6A00FA6184CE564D1A38898344D98B4B737D1DED68C6906446326B93C7CEF7BB773E30D0F92C91452DE8550248F45B8EF7E5515C6F22598131A58DC11E5DFAE58425B9DA8892DACE4633B8C56045DD615246BB5648523680417AD57642B8CD0128BE82463C3F508DC67FF13E7814F8FC8DA450F3D73D917308FFB008849A86364199E6A2AB82B0AD1A7E5C3CF9FD94F774444B326119953E25111D1A88A849639C97D8714292AB1E90E491B61990DD1C5DAC6CDE724397B82E8EC9C7CB477759DAEAC478F15A1B9B595EA9A5AA9718B6E2261958F83097A989CC346AE434B21422F9276D875FBF0CD5E8B641C16E50F5B5589649430221E766A94164112BE67910558B4DC494943C8197E2133D0168E911CA66F71F1E2494C6B692016C0E0604E626598060DF595D4D6C6D1759D4824413C5E496068AC5EBD99AFFCED4F79716377F81C229374C2671291DAE3440CFC59D3491E3F8F9A44C0CF3FBC94E9CD95614B2F45D0C7C4D53AA6085AF4D3B36E3D8FA0EFC5233E385AAC0663C19F61CEFFD8A86D5375C43BF90A2B18266831ED1652C2BE812CCFEDE9678B5D8DA78B093F5F3A2112D2D32CD22884AE1B6AC16191A38397E1782E407444153286487116197D5E3E272500291F68263BBB53EC1DB4E998328DFABA3AE2B1F8505D8FA2C9EFD06A78A551B2F8E6E2EF52832E1072694D8DD22248A58E8C62042D09B91041BFAC2A5D21F124CC142C46D0218187198285FD131DBAD3194C2B4F1D0133C7D572C292195455E8C4A249A2B118A6283AA2F998119DAE9E1CB7FCE27EB66EEDA6BEBE86CD5BBAD8B6653FAE250A2709D8C4646B44EE8F30037A41805D5B4DCD49228A6EE53FAE9ECF19936B0BE246F118BC3C921E0BE4AD22E8F2AEEE3145D0EEFA1B71EEFBF383EA4A94B79B2F1FA5D5CF2076E9EFD02ADBDEE82AC6ECE742822E265F6BA42D8F3F6ED9C7D69C8615AB938FD9A2FD5345CC2026324F8417B9CCB929E1D7F5F2966C3725C9D9B664F42C4A9C0AC259BFCF626B5796798B16D0D9DE84212ACA8571B7DC2A59FD4EBA42866F0282188BCB417246B1F3F7219DB75FAD0892889C65328ACC16149383C3D1F310514B1B5DF8775943A35846D4F711DD508487DAF65C74C72261E789BB79E6774C62EFAEAD9C71F2121AABE338A64977574E584E68195F41736B1D4F3CB19D4F7FFA7BA4D28284435D7EF98953B9E4A21359BB660BB7DEFA0039CB0C495A3CBDF82E9609C90573A858BA808F9DD5C9B527761211369AF02E75F0E469E15146A6B31464ABD14AD68AA0CBA38F3145D0F61D57E36DFAC588B4B3D29BE6117BF7EAF2503A2A4785F634E16858B76B802777A7C957544A8FB1889E45C45C1B8FBD42058C62E28900264C139471B8AC71E162A70764B94F41CE72324E94E8F46D2C3DCA6F9EDDC3CA534FA6655C3D81E34B57B5F8FF2B2D879336A414209256640DE7E18EDB8746D087D6D810A42B2606C537CAB2A1E277D925254CDB2E56A62BED1F28AC7FC29D1188F7456ABA206B57E8E73ECD519DD3674C20EE7BF41CE867DAD4F154C4C57A3D1E7D7A3FFFF3BDDFC8CE2A9FFC8BCB58B56A11BFBFF349BEFDED5F93F54C343F82E66579EFBB8EE7739FB99275EB77F2B9CFFF2FDB76E540BCEF69F86E8A5CE0109D3A9571AB4E65C5C25AFEF2C27934579A4481D05B134A49D20EAE891F0DA320FBC80AB1D24613DEEE0AC9FBA3E26C56045DDE611833041D0CEEC0FAD58523226FC82481D665C4AEB8BF3C948ED25182D0BAD2791ED9D2CB012F8A174F8471ACE8986DE854C5A2AF52A26838C295AAA92067619B732CD96A4AE8CDD239E1D9B88E4B2A30D9D29367E2ACB98C1F57876B87198622320F55D7972FA5E45C94354AF56741CEF2F7C2A460D1B75C2A6FBCAC4A5DC15227C958A6758791F210418B424BC2FA57F8BBCC0A141AB46C572592516C3C51CFD9B1995C5341936FF0F8236BC8D80133A78CE3E20B961389EA7CFE0BB7B271F36E342360C1DC164E5CDC29E645B9F781E7D979004CDD2011B178F7554B79EFBB4F2195F2F9D6B77EC1A3AB77E3D92EB1288C1F5F41B2A282A7B67553BFE2541293C6D1520BB515D05C9564666B3D6D0D5574D625A88FE8529212924A65DC90FF1613C38B754CC4113BDCE4EBDB717A2B822E0FF53143D061D1F96F1CBEE87C79FB3A3C4AF89E57FE1BC69C6B5EEF27C7F4F862E4296B55482B9AC6B3BBFB796C9F875E511146589E4D4483642C8A71D8C48850B32EC664923885DE6C0BBD398B9BCBE0E6B272124D44CF8EA7B1A13BC70B072C8E5F348F299DE3110FF122CA139B5070C1BD0CD7C3C91AA5242DFB1116A48D22098BF75F4EC8C54A75C35EE7522943F89BE5EF25353686BBA18814F490A045FF40E1950E2C9FD481019A8D80E3A775F2C4939BC858018F3CBA86CB2F5949A66F0F7FF197D7F0B14F7C8F0D9BBAD0CD084BE78DE7C37F72226D2D06916805DFBFEE3E3A3ADA9935BD93CEF62AAA2A7574DD249509B8E79E27E9EDEBE18A2B2F62F2E426366DDECB97BE72231B064C2A16CD837852B6D615C9E862A2559471B5BD3C7AE0501D37185F6370F58A49CC6F6F607C659CEA9849B450C44AC847A58E72F9FCF3364D362A822E8F4AC60C418BAA75EE0B37806797B767AF324AABEA2476E583B22BF7B1B98436B5BC1BF0D4BE1CEBFA020253D49F0B307D979829B46761A913DAEFCBA3DBE149C6F0F1DAB32C1C41CC96F81996360449BFD4EFF2E4DE2C53A64D67C9AC293241239C637C659B5829391749B9F45F91065EAA3317A50D31A6D8F0B57432301C2B087A385296A45C283B2A12518A2543A537BB245B50C81F610DE8D0BD91EBCAF3E2531B684BC225672F65CDBAED38BEC9D66D07386E7A070D35011FFDD8152C3FEDB3387E42660C365519BCEFAAE59C7C621B11C3438FD5108B4464612943F3D145828A261C1E11A2F14AE992314D8D6CDEE697BF7E9A7FFBF7DB493911F4A67A3022B2E1811635312A931889387A55257E65054E24826DFA541B1653C655B268623D67CE6EE5F8CE3A92C23F5DB0F14979E835DA90BDD9D78522E8F2101E33046DDF7639DE96DF96B757AF31CA987D0DD133BF3722EB1AB32B09020EA42D1EDD99A1CB8FE1EB614C1C0D7CD9ED5AD46A2E54B57FD92E16095A5AC37C17279BC14EA7F0EC9C94396C613D135A74E0B3F6804B2A5EC7890B6753138D86135B929B43DDF9658EBD42C1A262647790A451485211045D1A4D17ED73C508BAF87B314B3024F0E1087AA87E46C1032DE50B37246F31AE94A045228D903564228AABF1FCC3EBE9DEDACDE23993B8E8ECE3D0FC1C1B37EDC5334C2A2301975EBC9C5CCEE6437FFE63FAD38EB4D9E164B8F0AC595CFDAEE554C504C746314C9388114117F545D089464D62A2B398A1631886ACD3B16B6F3FFFF8AD5F71F71FD66106313C212A17F465D1D6C0D17DCC680C3D99C4A8AAC4A84A12D4D762B677E0450D0C3360767B928B17B470D2C446A6B55493940D69DF7E0FB522E8F298E3D823683D22B567BD797179081D45A364E05A48BB1607FEE91D3DACEB75D12AAAF17571F107C4651B2AE1B31DF6481F0A812C312AB3F4449FBD3C766A1027932AF8853D1C3B2F33025FECB6C946AA5930FF38EAAA2A0BC5F88B6B3B4C645E24E0121BDDC1B24668AF9313838531A5DEE6A2065D8CA4C3BE826171FE506B0EAD7EA13BA390A4228A3249096398A045D76D51DF597640112E0E3B4B65D4A47B571FABEFDB4A6005B434C4387BE5143A9A1368668CDEC114B9748E8A8A2A5E7CF180D4944D532797B769AC8B73F2099D1C376B3C095323E3983CFDF47A6CCBA3B373A26C58904A0D62E811AAAA222C5F3E9FCAA4CE60DAE2B1D59BB9EBCEA7E93990A6B232414F6F8A679EDAC8A489AD2C5C3C8DFBEF7F8E7DFBFA993C651CA7AC9A8FA399DC72CF0BE8C90A2C714C1BAA699F3591899D2D34D646397F7A152B66B7D19810425368510CDB29840A7538A1F8E653B822E8F288E5982368BD712EB1773F3EF63A7397773C5F635468ED12015457C6E5EEE776D16F561215FA73A11E7ED21417AE68562A29F07039290482C0A53BC3C1CDA5B15329F9AFA843E1F83ABE9D664B46E3B16D3916CD9DC9F2E3A6C9758A08503BB8B4DDD0F61E6E42B0F8A620D9904386C9B9288314258DA2CC51FA7B585F232C235A4ACAA58E0D59856EA8C9AB983874B16D0BD713FA738067E54906164B674EA4677737B7FE622DA9816E2EBB7019EFBC7839BD5DBD3CB7712777DEF3047D030EFBBA2DE29128FFF0E9F3A9A9D0C8BB3E158908F535E2A9C424168BF19F3FB853661876B435B164D15CE2C988F464F7F4E4B9F9E63B983C793CD75E7B05D555BA749A7477E7C8641CAAAA4DBA7B72BCEFEA2F326BFA243EF8E1F3F8F94F1EE2A9273672C1852772C699F348A72CAE79FFBF138D26A9AA8A921CDFC89E4812AD7D025A730BE36A3C4E9BD9C0BB4F9ACCE28E46E9D609B3436505ABC275F1CAAE9A11390D41D5E22813C8B141D0A68B7DFBBBF0B6FDAECCDD7AE561E6E24F1159F1B5235ECFD85B41C16825224A74B67465B877DD3EB4867168221345689281465C3C92CB72FA32982A743339786FC5C49E2E745A3131984961675292C8022F8FED050C3A3A77BDD88F9BACE792954B6916A5320541CB28FDB51D1B61465DB8C83C944281A56281FDC3D9E90ED59C65642DB304C32EDC45821EAADD2CAD7FA2F0FE702FC1A20DCFB6457D0D11417B44BD3C0BDBEA583167221586CEB6032EE9812E96CE9D44476B1DBE11E5869F3FCA3F7FF7F70CA41D3CD3208ACEF7BFFA4EEA2B5D3CD15D46B82B44701A89E193E4735FFC1F2E7FC7E92C5934858A8A2855D555242A4C296D7CF39B37F3F4535BB9F2DD6773F1C50B8919A20094417757370D753544E3557CE04FFF9AC6DA06AE7AD7E974ED4BD1D337404B6B0D9515115C4BE3FFFDC5FFA09926E79CB78464BC821FFFE271F658106BEF20B26C31B6E130B71E3E79C66C2E3B7E52A1BAA008A0C5F4A3005DD68F7D531715419707EF9820E8447E07F65D1FC2DFF348797BF52AA3A2EFBC1BA36DC511AF67ACAD406AB9D2D226A2508DD59B0EF0D4AE0CC9D6567CD15B4A14330A3462824D8AA923C345EA0EDA5DC9B1560E5768CF9934563E856BBB18760ED77378B227C6635B539C7FE652164C6D2370C42D4168CFA113F7D0E5708E0D912C534CC428D598C5670FF53797CA1CD2DF5C48020927050FAEB75194368A3EE8A1641459BC49A470FB389683232622DD3CD31A139C377F0AAD0993B809664D35C9A8B8E178442231D24EC037BFF32B6EFCD573785E8440D4A2D63596CEA8E6FCB317336D5223B1427DEA4832C97D8FADA7B5B193B6E6188978841736ECE5D9E7B6327FFE4CCE387D0935B5716EBFE3596EF8D14FF8D2973EC07173DAA5D4B267F71E9CBCCB9E7DBDF4F5F5D13EBE9588E9239AF08A42FEA29B8BB0F10985B9FB80472E97A7ADAD8AC71E7B81EBAF7B845456C3094CFC855349CC9D493652C1C2D608FFF927F399D35415362B9085AE7499A8A4087A745CE16382A063FBEF97F53782DE0D47849A5E3F5BBA3788561ED17A46FB87C389B5D0A72C0D71B28646802BFB004257CEE18117F69237AA885726866A4008028DCA1653C58E27AF10F0FA0176AA17279DC6CD67F0F27949108E98300CA27CE7D16EDE73F14AE6743622BE54FA718B0D4F4AC03B5C128A0CE0048DCBFC1321C90CFF1489FCD02248A5B24691A0852C52EC7A52D49DA5CE5CA8FB2C9D1905DDB9B4F8BEEBBBB8791BDFCDD15615E19CB993993EAE964854F4103449C46398A22E891123123788C76264F23E37DEF2000F3DB199CEB6361E79683DCFBFD44760E75836A7853F7DD7623ADBEAC86434FEFDFBB7F3E71F3C035D8B70E73DEBB8F1D6A7B182288E35C0F4CE6AEEBDFD6FE94F7BFCD5A7FF83258BA671ED47CE95B54BBABB7A181C48234A57899E878303199E58BD81A79EDCC6C4894D9C71E602B66DDFCBAE97063969C53462B1F02964CBA6FDFCE29627E8ED4F3363662BEBD674F1D29E41EC4651EA602EB4B7B0A833C95F5E3497D327354AFFBB903ADE6C155A45D0E5B1C8D820E81DBFC479E40B048347D6B95BB4B28A9E7B0398C9F2D019D5A38AE9CF61265FA807842F7D21D816EA1E3B3EF4E75DD97D7BC0F2C9381EBDB68F25EB6A0839A3F8F9508B14057D0E2A1577E8A3AE206FCFC5EADB2FE50DCFB2B12D0B57A47613B0291D636BB682CBCF399EB858A31F66FD1D6E795582F6C4A3FDC1045D9A8052943986A3E7302BB0E8C41822E5621124A9290FD77216759D0357746D11138661328D90385CDFC3CD0E521F373963CE44668F1F8768B12584A1A86952D790A0321923669844449317DD9451772A67914E79C41311FEF0D07A3EFEF99F4A1FF909F3C7F3BECB17D3D1524126A7F19DFFBE8D0F7DF07412D12477DDBB9E1B6F7D8AAC6DE0BA29E64CA9E70FBFFE222FED1CE0BAEBEFE08C558B983EAD01C7F1C80929C989B06B6F9EBBFFF0088DF515444D839FDF7C3FA79FB9844B2E3D953FDCF5383FFCDFDB39E7DCC55C74C90A2A2B62128FBEDE2C8EE7D1D454CB7F7DE71E1E7A68037A3C8AD5D244F4C4A5588918735A63FCDFFB9731635C95EC4A1318A1E4351C498F6C58AD08BA3C721913041D7DF187B87FFC7B82EC81F2F6EA154689C2489193BF0E46EC88D6337A3E5CC8E62B5E3B525F0E3B64F7E63DFAAC9098BBB32E693BC00944BB284D7A730BE59B0F22681971BF56E28248DC736D72DD7B70B2697CCB91936A2222CDF83A776D4D71FA69AB98DA5E876F0B4DF3B5C939149A87E56E593B5AB6A23ABCDFB954831EB2D405616D8DB09091F85CD1AD51A85257ACE15C88A25D3B4CA41111B3746A48EFB3D0AA1D92DE202B66CF60FAB866366EDACD93EB7630904EC9AC9AB9D33B58B67812F36775D0545B81EF59E4450125272097CD61D93932B918E7BEF79F9938BE91954B27B262C9046AAB23B87A941B6FBE8F534F5EC2F8E64A76EF1DE0C7B73CC9F3CF1FA0AE46E73D57ADE0931F3B87DBEE788ADFDFF118975F7E0A2D8D49C19632FD7ECDDA3DFCDF0FEF62DDBACDBCF39D2BB8F28A93D9B9B397EAEA18F58D49F6EEEBE3A1079E67F2C47666CE9EC4E64DDBA9AC8CD1D9592FC1CD657D3EF5E91F31D02BFA48826546C877B661CE9E85555BC5972F9DCCFB4E984CBDB8F3489D235C868FE0C809D38AA0CB6391B141D0CFFE23CE93DF023757DE5EBDC2A8C819FF8D29DB5A1D2DA5458B151634D2B6477FDE21E3F8E4029D03695746CBB2B934A2C9AA8802C30AFAA2A4671825178B5B0E5F8C52147995EB505AD6AC3C9903BB64D6A02726D46C9B8CA3F15CB7CD93FBB2FCF507AE20A20B7B5B28B11CBA1C94882227270F2E21FA4A9981F221A130E137AC4317124E4469D342224A91B40FB6D37961995069AF2B383764D53A91BE1D7A9DC58D47773D8E1FDF447F6F0EC7D648A732385E9EF1CDB574F76519D790E0B9B55B696A1CC79927CFE2DC5366E13A1676DE2697CF33386873EF231BD8D735C8CCC94DB4B7D6938C0AAD188C68820D9B77F3C4532F71FCE269B20C695F7F9EFDFBFA98D0398E19B326B0F1C52DDC76FB6AC635D672C53B575095D0A5FD2E5911E3C9275FE4A187D7CA4495450BA632635A13BA1E953715F17420BEC471024CC3249DB1F9ED6F1E116D1C39FBDCC524A251D2A93C7FF7F7B7E0BA1102DBA3A73743CE30099A9AF0DAC7D3B16432E72C69E7ACA9F59C34B355F69A0C6D78B200F5880AD38AA0CBA3B2D14FD0864BE48F9FC37DEEC8134B84FEACB71C3FA2275A79308FFCA89052C30833E3066CECB6D89D71C97922D013979470B7CA82CE0521599AE786FB01BEC14D1276302F9B26B57F275E2E2B1BA48AA2F5FB3206B7BD3848754B339FB8E81459D02A54410F26E843ED74A17BE4E57A73E9B8C3799D87248E12A786187750379482DF59DE5464324AD8C1457CB658783F7003F29ED8870C86956566CB380677E7F8D91D4F307B4A3B1FB86225F1B8869DB7C8E71D49763FF8C1EDAC7E6E278D4D4D7CFAFDABE86C34A56DCCCAE71948EB7CE9DB3FE7E295C75355A5CBF65DF555111A6AA2B2FE46241AE1073FFB2303FD196A2A13AC5CB984BA9A38AE67D3DD6D71EFFD8FC908F8AA2B4F236E0A6923C340CA4133A2C4A26282D70E1D3162424188D3F2F00A374A207F04A3CA7ADBBECE9EDDA271408ACE090DB2029E382BD6AEDD851718A407036EFBF5A3BCB4B34F4A3879132267ACC26B6E605A93C797DFB180B3A70B794778DE45275E71AB5511F41BBC6CDEF0C7463F417BBD987FFC1CDE869FBCE19D2C7E50F89FF5A6F947BC9EB77D0562C61D106D11BA320EBBFAF3ECCB055832522E542FF30359DE532ACBB2EEC6F0B4E1CBB7BF34821E7EB760851EFA83ECF957D06807F7BE842F9C1C8E8DE5FAACEB0AF8C3F634A79FB294F38E9B24279A0AA6ADE1CF9724A214A3E1E277149D1743C45C42DA877A9D0FD69F8733040F47D0A57537647BAA42828A2C7A24BBA104D86E1E2FD7CFC49A4ACE3D7E111FFF9BFFA3BABA8153164CA0637C0BBFBEF75976F6F449FFC9E5672FE4BD979E483693E5A777ACA5B936C15567CF0527473A9B12FDCEF9E12F9FE48107D613AD88E004010BA6B773C959C7D1586D08C3057937CE9AE7B7B16EC30E4090BB88BCFB686A68E1B24B4F66DAC47A6286905C3406D236BFBEED61FEF8C4063EFD89CB18D7501936CC95A4A94B0B5E36EBC8CCCF6884B03142A1AFA460EFAEDE14CFAFDD4C67BB68B555174A165A848D2F7471C30FEF65DBF61E594D509C0156472B15272E215B19E1EC6915DCF8C193C2F415697B0CCFAB915A54045D1E92A39FA0AD7D988F7F166FD32FCBDBA3571935B6093AAC9F519C5FB77D9F8D3D595E1A74487B4658A54CD7A4C62C62D762E727D9B95A62F2C666E64B2F49499E9E879DED27B56787943A44169ED0B71FDA65B379C0E79A4BCE607A43A5D4B24B09FA952604C34D1B2E7C344CD007BB3786258D42C3D9429660A9AC213E5B1A41CB946ED13CA0904558DA915BE8E69E982414371C2B4D53D4E7ACB9D398D2D2C6D91FFD365FF8C47B3975F1447EFCABA7F8DF5B1E473345395593A8DFCBDF7CE2024E3E7E269FFED2F7A96968E6AF3EB08AE66A91F99792938DDBF7E4B9E5F6B53CBD790FFBFA2C1AE206579C398BF3CF9C4522A6614685B32646366FB0BF6B90FE8134C97884F1AD0D744EA844D610742D1C342C2BCA962D7BD8B5B78F850B3AA888990579CAA367D0E7DEFB9E938D676B6AE29CB6721EF3E77662BBE942D6A6C6FD0FBCC075D7DDC505179ECCD967CF97D98B77DEF1240F3EB89E7DFB2C904D02C4790379313F31A593CA139630AEA5921B3FB89069F549793E89E256C508FA35E729CAB8521541970192B8698EFA9657D65ECC3F7E166FF3ADE5EDD15148D03272150E559150A7C1F6812C9B7AB2A47D51DB423831741CDD43383644728520E54016030E67E18B9DAF87A0293B102A991E2AB499129D52ACC13E52BBB7E13A79A93FEFCBC05DDBF3548D6BE5FD179D4432081FA7C36D18962F8AAF4B0F914C4A2929B87FA853A35473169F2BBA338AC5F60FD59D8B042DC95A44CC857E82B2334AE1C70B7CACBC2027F1378B79CDD59C3EBD9DBAAA18BD76824BFFDF75BCFBF4395C71DE095CFFBB35FCF2FE0D61179920C0C9F6B3727633FFFAB50FF1FB479EE1C7373FC8673E743673DAAB480FA6B1DC3C96E5921DB0B9E9EE17B9FB8F3B69694EF2912B4F64E98C4634C3A53AD904A6B80159619AB51960EA3A51334AA2BA194D384ADC0C795BE7F7F73EC9AF7EF7282B4F5DCA79A7CE2126928A74979D7BD2FCC5E76E606FB72D356A31A7675B69CE397D0E9FF9D42A7C574C2C06F4F4A67966CD36D94477F1E2690441826F7DFDA7AC7EE245B448122396C0F0C2BA2B82846D4D67A03641ED8AA5CC98DDC45F5F308F55339B10A5B3C2E8BBEC93E755AF5745D0E5D19922E8F2707A5B47C94C3A4D931EE66D5D2936F7E5C8184939D96914E48B8C8804458DE382EE5B24C7305DFBF012C66BEFD4B0052FECF9272268177BA09781DD5B65D71441803B07E1AE1D361D53A7F2DEB317127545BA83D046C3AA69A12F3B5C4A5FCBDFFD973B36C4DF0FAD4A375C00A93019284A7F160A2B15B3030F9A142CE8D1B20FA2C44614DE0F35E83019C5C2772D702DCE9BD9CEB249CDD2EB6C6BB59CFBE7FFC1BF7CE9232C9D5DC7F76EFE23FFF5F3A7C08C482D56CFF4F1D90F9FCE490BA7F1D9AFFE90CAEA717CEA9A93E968D4490F0E62D9196C4F279D8971C3AF9FE681A776B2EAA4697CE01DF369A88960C422FCE496C7E9983891D933DA185F671217968A888EEB193CF8C85A2AE31AA7AD5C246A0BB2FAB95DFCFD577E4867CB383EFF990B68AAAD92730FDB77F573CDC7FE879C1B0B537F021D3B6BB3604E2DDFFDF6D532B925D06C742D86615648FDDCCE67652A7B4F7796679FDDC2BD0F6CE0F98D3D44021D5364558A3040B83D0870A6745073C672CE9A5DC35F9D771C53EB92AFD256E1B5CFA4434728822E0F3345D0E5E1F4B68E129AA3E5796CECCDB3ADCFC6D1A204BA29BDB9A2B09BD05145C3D7B001529831286D03AFB01CA6A5E06BEE5F512316F537EC811E06766DC5B1454B2B871DA980BB77794C9D3993F79C311FD31D8EB25E89A04B13504A23E822391F9A8C529A3D2826D44A53BB8B045DD4A08B5E6841C8C5085A24A8086B9D48F2081353B244038789D5559C3AA38DCE862411334AACB292D33FF67F242B2A3973C9049A1B6AF8ED7D6BB089CA4CBE93E67770D1394B18CC64B9F1670F31ADA396779E3E07138B6C368365D9ACDDD2CF8EFD197918F6F5E6A9ACAC64D9DC76AA2A626CDDD5C70D37DF4375A28271E3925C76F65C56F6ECE2F600002000494441542E9F4ECA8AF0A31FDF475B5B0D0BE74D66F2C466621193ADBB7BF8F92DF7D3D6D8C439E7CC26198FA3FB1E7BBAFAF99BAFFF86ED3BB3E4F3AED4A0135138E7F4195CFBBE95B8B29598C58E97FAB8E79E3554D72458B572A14873A1BB2F232596471F7D89EBAFBF8F88AEA3FB01AE485011A78F68ED555745E28255D4D447F8D35327F3BEA513A98F475EF33C29778022E8F29052045D1E4E6FF1A8E1A40041CE83AECF969E0C3BD326AE8C633C9C00B26E801BB6D90E7BF9BD89CB90D3C2B5C90F76D3B7630B8E9D95A4B72BE373DF2E9F0953A6F3BEB3162314F1701EEBF0BD04C3505A3442092BCD95BA380EADA9513A2128E50E69A5B30B76BBE16E28C5085B960A15FAB4A8F72C1BBEBA327A96A46D7B8584141BCDCDB2A8A38565D33A694C68C462069188705918DCF3743FDFBEE17744137196CCEDE0C25366316B6A27F73FB691B696763EF5B73F6057F720A72C9CC4973E703251D325675958B91CDBF6E6F88F1F3FCA9F5C7916EF3A773EF94C967FF8EFBBF8F99DCF485C4CCDE7FFBEF54192A6C73D8FAC2716D3B8E6AA553CF8E456BEF2ED5B98377322E3C735B0706EBBB4F1897D58B771A7B4ED2D5F34998AA429A360218D740F183CFCD80BAC5DBF95DA9A4A4E3EF138664F6BC6F35204BE284C65F0F8D39BB9FE477772C6AAE339EB8C053CB5662BDFF8E62DE4AD28AE2B52950ADD1F45FD0DE9D81025397C5C53C39B3189CAA58BA8A886EF5E398F93A736C94317CA1C4796B8A208BABC8B5511747938BD65A3E4692F66E80B9A5FCAF1D9DC9767F7A08555E842276A26E47C911518BA34E4E55248A51EB24295CA1A877077F91174F1422CCA1342CAB4A5C4D1B363236E3E2735E8BD599F07766BD4B775F0C10B9713D38C50CA286CC3A1124758C9544CF689ECBF509429B5D21DD6565778049772856841E5879F1F766984D24758CB397C1D367C2DD6D870E5CD44764E716DB2FD39A6348DA3311963E9F446664FAA236A6898310333D6C8ED0F6FE0C6DB1F63E38EBD2C9A3F8D96867AEEBEEF71264F9AC4FA2DBB686FACE18A55B3B8F8A44EAA6BAA71FC80AD9BB6B265771FB7FC7E03D7FEE9859C38A7153F6F71C36D4FF1AB073690496798DA56CB173E76169695E1F70F6F67C3D67DAC38711E0FADDEC4DD8F6DC4CD8425528F9B51C9B7BE740D6DCD757CFFC6DBB9E99607F8D7AF7D94C5F3DAF19D5C88997892F20DB2962BEB474784AE2D4AA54A8BA3B0DD451848B96CDBBA9B86FA18CD4DD5FCFA8E67F8F677EEC430AAA5475ADAE870E571105DDBA563C31713CD60D75753B57C095A5B1DFF72C51C2E3AAE45E69E86245D284FFA06AF0C45D0E50137FA09DAED09270937FEACBC3D7A955163C3C5115AE88A997E3B072C9EEFCA91173193268A43EAE43D8F9C78542F55055F4D673E34B82EC9DA7BBDA006AE8333D847D7B60D78D92C8E93A73717F0E83E03B7BA9E0FBF6315B551531244B1B46891A043D2966C7C5021A4A2AC513A41585A204946BF41584CFF95AC74227B50269D48CD5964040A19C339A8F8BE2D9351845FD963CDBA3E3C4B448B1AD79C3B87F79D3D839A6840C48C10ABACC0D3A2ACDF76805BEF5EC3C34F6D61206B61B92E139A2A993FB59365F32631797C82E6DA186DEDED18A6CE0BCFBFC0819E3E06337166CE6EA5BED294FD05F7F5E4D9DB93931A7543459CFA069F6CDEE4A6DFAEE3B67BD7108B2749673C328E256B74882784E5F31AF8F2272F65F6B476563FBB9DAF7CE326FEF29397B17CD94490859184BD50C81182A8455ABC2DDCD1E019F8BE8E70F9AC59B38B3D7B7A58B6741AD55526E203BBF6A7B9E5D6A7B9EF81E748A79C822FDE970D033C471488124D741D74238A1B89139B3D83CAC5B3F9C87993F8C8091D54897E68E209A95058E9F59E3FC5F18AA0CB436EF413B4E111F9E367472651E5AA47467DA1FE7042509744B4B32FCBE63E87415FA4DEEAD2F79C753C6CDF905ED7D219F5D735117898C24505D5E155CF1A39D5278A09A507D8BFF9799C94A8C591236D3BACEB8FB1211FE7A23357B07C5253C16257F05F9746D28526AFA51A7451C628FE6D485316581C525FA318359746CF42069004ED7B8852A143B63A9198229C1CB25D958393CF5315093869C102563FFE025535AD3CF6FC0E164F6BE02FDEB984C60A88181AB1448268348A6E98ECDE3FC0D69DFBC966F39214639180AACA040931A997CFCB47FD8E09AD3436D492CFFBE4F396246BADD8FD44A4DE8B92A6AE2B13595CCB2197CF48FBD4B63D19EE7E7823DB77F7326D721BAD0D491E7D720B0D0D157CF0BDA733AEA19AEACA28220774E3E6977869670F0FAF7E01C7F53967D5024E5E36155364120A4B9E63C93EDF791B0C23206F6B5C77FDED18BACF1597AF24168DF1E4531BD87760102BAFF3C0C34F93CFDB9C77F672060607686CACE1C0BE2E3C4F67D6EC697CF73B374B32F7AB6BA85CBA8459CB3AF8FC457358D159272D9DBE5E9C8E7E63D29A22E8A385A0233A9167BE86FBD43F832B2E8837BE442FB81963F205A3BA58BF8C32358DFD83799ED9D54F464F821112F440CE262BB2C5C4A36DA1C07AE9E5F17A2E95C3F93A5ED5EB515CB9B0AFE50638B0E939F2FD7DB2925DCECAB22717E3F1BE04D367CEE4FDABE613C8BA1FE11A4B270A05798A4941C9F525B5360E4D46092368F1E82DBAA184F5358A51F541D982059D5910B9F8BB23258D82AC213307056187EE0D3B635111C007DE790EE3E319D66E4BF1AF3F79800B4F9EC79F5DB8105377D1A326D5958942F53D61C71384EA228A2B897E8BE96C1ECB1637823C563E47E0384CEC6CA3797C2B6622269F0C743C06F3067B0F0C4AFFF2C0608E6432C6B8BA4AEA2B22D8763F962DDA6841FFA0452AEB9248681858FCFC77DB59FDEC06162D984ECECA71D292E95C728EA8EB0CF73CF002DFFCCEEDAC796133575F79325FF8D455AC7F612735B5513A3AEBD9BE2DC58D3FBE8F8ECE24175DB092FD7BF7C93AD46DADF5BCB8F100FFF29D5FB16173376D4DB55C76C54AEAEA74162F9C295D2D56D6A1B2CAA4BEA91E5D8BF3FDFFB999813E83DFDDF128FD4D6D542E9FC307CE99CEA74E9B4E5C78DC656661B16EF7EB39F3C2EB571174793C36FA23E8884EF4F9EFE0AEFE47027BA0BCBD7A8551A250BFB9F0E3A08FDC6CF4116DD0613E2CC82CE7073CFAE27EFAFC18463C5EC808343890B3B134A1136A8812CE2398795BF66E08C274ED0C3D9B9E23D7DB8393CB62E5B2F45BF074BA023BD9C417AFB940DAF1867A7F9756A513E45C983C3C1C411F5C6363B84555697D8D525B9DACAF51F03A4B0DBAD0BEAAD8EC5554AA13B52A703CF6EC4DC9CCB9692D0D5CF73797F3ECF39BF99F5F3EC8DC9953F9B32B57D13A2E89AF9BECEB4D317D7C1542CEC9A4B2B2C7A088C48543C3CAD932C1C5B2F2E49C3CB5B535B4B7B4128D478956082F739CADFB737CE55F7EC9DA8D3BD9DF93C672908E8CE6BA1873A73773ED7BCFA4BA52C74D0F4A4D5CD4CF10371622113EF4C55FB0A3CB420B5C34CF65C1F47AFEFEB357B064EE4499F1B77D678AEB7F7C2BADE36AA9AA6AE09BFFFE332E3E7F059FFCC43BF8ED6F1FE4AFBF701DE79D731C1FFFC8A574B4D7C93ADD426E7AF299ED7CEDEBBF664FF720313DCF673F730573664DE69E7BD7B07AF533B434D7306DCA783239970B2E398FA953EAF9C5CD0FF2D5AF5C47AAA299DA734E65E9DC66FEF9EA654C4C98050DAED8D5A1ECD36768A022E8F2301B13041DDB743DCE637F4790DD5FDE5EBDC22863DE47889EF20D30E247B49E37E3C34305E9029F6777F7B3EE409E644D9D4C991673F639C7A74F5CC8087216133AA12821FF79BD014CC18957BA1FAFD0E864A8E5959453A4842C269FF2F46C594FA66B3F7666102B93216BD96C722AD998ADE41B9F788F944286DB1A163305C3EE289444D0826CC5F2B2D6557E2855944A19C5A495E1FE8161D42CE48BE264A19C189456BA30ADDB96F2874D904FD3D6D0CA434F6C6560C0E56FDF7B22C7CFEAE4406F3FBF7A681D8E11E7FCB397B1FAF10DDCF5E85A2E3E753EEF38750E6D8D7172D99424E79CA5E15869A2318D8816913246BC2A492216150F38E4F538773EB49E1FDCFC304F6DD8433C9E90B53722C2DC261C24A257A3888A67B471D945CB387E4E0B869F93DB8F6FB2E5A5149FFCD6EF481391BEE4381E679F3285BFFAB3F319DF5089EDD9329DDB301274ED1FE0D6DB1FE4C1D59B9933B583ABDF751A9B366E67D3A67E2EBDF80462A683655B589E887303EC40E7BBFF75071D1DE389472D664E6E63FD0B5BF9F7FFFC151133C6C7AEBD185D37F9C63F5DCFC4C9CD7CECA39713040E37FDF40FECEC75094E5841DDF83ABE78D93C2E98DA50A8F1A208FACDE082D2758E09828EEFFD03F6839F21E8DB74447868F533885FF9304485D97FF42C438625F1388FC60D7FDC4675739B2439F1C09C760306F236AE26AAF0C9A4EE90280BC4FC7AF939A4F68397575AC7CBFE2EA3618FCCDE9DF4EFDB49A6673FB9C15E9C5C9A8CA7F1A2D3C0F2732F65E994163CA18BCA4941C1C98592A28568BAD4D75C9A2D18EAD122B12424E82152164938C5D655B2546858FF39EC27188E15846C89DFC5EC9967E1DB2EA201AC20D7A6CA4A3E7FE5198C4BEAF4A7323CFEDC1E3C372F1FFFFFF7CE75DCB57E3F3927862977D89451E607CF9DC9C72E582823D93B9FD8CE3FDEF07B164CEAE423979D4847438CA4E9138BEA44A2097A2D8DCB3F7BE3FF67EF3CC0ACAACEF5FFDBED9439D30BD319981960E8D23B82A0A8891A6BAC29A6F7DEFEC9BD3726F7A627D7146F62A229C6A8B125512CA8A8802220BD0E7D18A6F776EA3E7BEFFFB3D63E0706053D5272AF66B60F0F32B3CF2EEBECFDAE6F7DDFFBBD2F075A7A98775E2535792A9FFFE8E51CDE77446A6578FD1E8A470EE7DB3FFC235DC10C36EF3E484196C167AE9DC7B2B915C4AD08A613E0C6CFDD49BF290208958C3495658B2732764C392B57AEA7E148339FFDC8E55C7DC554E962138B0A77700B4DA6776C3979C762B654A18BC735EE7B6815BFB8F369028174465595D1D6D6C5F471D9DC74E3321E78E859FCFE346EBCEE02145DA33F14A6BCA4587E57ED5D1D1414E4A16A169B371FE43FFFF33EC2E7CD451B59C2D22A1F3FBB6EE671D12DA1FD721ADB50049DDAA0BD3D00BA7303B1173E87D3B13DB5BB3AC55E8AEEC7FB813D2881A2333ACE59FD70C2BD44469B8AC3919E101B9AE3E81EE1741227E63874456CC2A2334CD564FE5CD0F04E24C09DD52B7A938309AEAC45A4A79DDE96467A5B1A0876B7486D68A110D71E0FD0513E979B2F9A438EC099B840679195750B7E227A7E2D38BBC09BB0A63AD61DF8FA08FA58349D10D73F46A54BD85589283A2AA874C228362EBA1C6DA93DD1D91FA3B9B5939F7CF40A1657E7D0D0DEC3577EF30263CB73B8EA82496C3EDCC1BD2F1EE0506B5C52CC4C3B4C866671D9EC0AA68ECE273F3B83E7371DE2A1557BB04371668C29E6C3974F656A550E5E03E24A1AF73FB795DF3EB18B505F275FFAC0855C30B98CC9132AF0790DA9156D9B361DFD7D6CDD7D8467371CE5DE475F116E855CB168145FBA71219A3D80E9683CB67217BD4131F1D81C69EC64DD96161C5D98CF86890D04F9B74F5DCE37BE70312DAD1D3CFFC2368A4AF21835B2180783D5EBF6B273E7513E72CB6232B2D2F8D3FD6BF8D91D4F62DA5ECC6888F2920CBEFB95CBA5D0FFF77EF62899593EBEF7ADF7B27D571D7F7B6213975F3C9BEBAE9E8FEE31D8BAFD00C1C800C545053CFCF04BBC14CCA63337979AAC280F7C7C51C21C3E2943FAD69FBF21804E6DCCDE1600ED379B89ADB815BB61756A77F5067B79DEF3185AC545677C9CB3738044549930AE306D8515DBF613CFAE9020261A5204D7B92322AC47C54E2E0BF53863E3F4A297D3BF7637D6173248B1503F031D2D74371DA1BFA59EE8401F91984938E6B0D1338E65E7CF654E4D398665CA6298E87A14138EC4E8C1C541DB923A1012A093DC68E16C92307B3DB13BD04D79B862FB6EF1F07554BA9809428FC48A10150EDD2187C3CD411ADB83DCFEC94BB86A5A213B0F7771F96D8FF29E59D5BCEFA209ACDDDDCAFD6BEA68E80E93E9D1C84C73C822C2A76F5C4ADF401F79197E0E3675F3DB47D79199974F535D1D5FBD611E972F18236979BB8FF6F1A33FBF80E1CB60E69861541705F8C8F5737114836028CAC04018BF57473344FDC0E07FFEF2140D6D0EAFEC6A223D4DE56BB72CA0A2409379E8984863490A9DC6C69D2D7CEFCE55988A8EA3DB38E1305FFEF8C5DC7AFD0CC20321F6EF3B443466535D554A7BB7CDB7BEF317F61DEAE4131F5CCC65974C61FBB646FEE7EE2739D21EC289EB32EDF1DDAF5F4A46208D1FFEEC11468EC8E72B9FBE8C47FEF112F73CB09E6BAE98C67FDEF6613A3A43FCFBB7EFE4AAF7CC63E182892C7F6A330FD546E8C81B468ED6C7B35F5CE2A6A9A4C7A4D00F7FEBCFE11040A7F616BE2D005A745DC59EB8FEACB87A6BA3AFC373C93DA98DCE39DE2B11344B2924C1DCD8D5D8CDAABD8D948CA892790101D1BD11E88C5852E3D9CD030F7A194ED6717226B21B27BBDFD71DCFFD81742119E8A1AFB581CE43B5F4773449801674AFDA78319EE2D1CC993289492386E1157AC5223123DC4B060923C9885802F471AFC06403CAEB54E912D655526FC37485F68F19BECAE614578B2466464044D8669CEC4C3F0BC68EC4B61522518B25532A1916D038D4D8CDD7EE7C8E8B678D62F1C4E13CFAD23ED6D6F5E0317432358BAB178EA5B3BD930963CA098623E466FA39DAD84ECF401453F5B273F77EAE3E7F32E5055E06A20AF7BDB897879EDFCB8D974EE7BAA53514A4EBD2626AF781A3540E2F2533238DE6F62E0ED71D61E1F4C992E7DCDC61F18F557B7879D35E96CDAEE48A4535188A70A7B1D8B9BF995DFB5BD871A09DB5DBDA7144CD44D0DAE271468D18C6D47139BCFFEAB94C195B4267CF00CFADDEC5F2957B58BDFE30B198C69C89597CF5F357931BD079716D2DBF7F701DF547FBF0E90E1FBC7E0AB3678CE6851737A1281AB3A68D95935E5D7D1B1326543275EA6899427BECF1754C9F3E8ADC9C4CFE78EF4A9E3E1441193716D5E967CD5716CBD670292025D3D0A7961538D52B3404D0A981CBDB03A0BD1AB1E5D7621D7C3CB5BB7A83BD14231DEF47EB51FE0FF812BAF460297E40D85278E4E57DF4797C9414E449301639C58EB04D8F10DA10E02C0D5106472BA78BC6A73F8C32E52852BC227232C3447A3B68AEDD4957FD7E9987B6A3033446FCB4798A482F19CDC5F3CEA3AA301B4B74A909FA9B743E71BB0C93002D9A5092CC8C6379E6846EF3F122A12B1DEA02F4F1085A449D82B9216450456130160BCA966E33AE909399CE2D8BA730B7A698CC808F17B71DE268632FC387E5B163DF3EC6578DA0A727C4F20D07C1EFE7D259A3C9F32B1CA96FE6C08123CC9C310E9FC79014BD7DFBEA78F79259F83C3AD1A84D9AEED0DDD3C191CE28BFFCC7665ED9D3CD7F7C703197CC2A21CBAFB362DD5EFAFA07B862D96C29C224AEF977F72D67EAC4092C9B5D4D4BA7C5F31B0EF1E7E5EBA92CC9E43337CE23C70FDD6195EFDEFE08DBF737513EBC90BE7E4BF2A5354DF0A155E2518BD2BC087FB8FD134CAACC055DE3BF7EF138773FF03271DB8F1989F29B1FDCC485E78F47B1426CDBD5CC776E7F926DBB5AF0185E46975B7CE93357CA7CFE5F1F5A437757841BAF5BC89C59A37865C34176EE3EC89C59E3A81E59826A183CBD621D1B361F615FC44FE6AC29C408F3E297CFC727177F2E956828823EFDF7E9CD3EF92F07D06240BC573F8B5AB6E0CDC6E69CFFDEED78B625F61EED0CF3E09A3D148CAE22CB2B3AF15444EB417BD8A63F96606B9CF32B4AFD042222564503486480B603BB69DEB78B486FA7644B74866D7A1D3FDDE92398357B0E4BA78D910EDA22D5612554E88E6B6CB85D82C7DCB813EDDBAF7546B107E59945AE3B09DC029C054759A64DE282B9102266C531C30EDDBD712E9A51C317AF9985473778EFF71EA4F65013D3CB73F87F1F58847053F9FD935B79EA957D8C2ACBE72BB72C233F5D65F3CE7A543BC2D489C3A5EB89B0988A5A3699693E2C33447666366D4D6D7474F6D2D4A772C73F36B2F15037D7CF29E1B3372C24C36BF0D7E736515E5EC8ACC923A96B6CE3BCB115DCFBF73598C0A7AE99C7A18630B7DFFD142BD61F66DE79357CE9FD7329C854680D3B7CF5DFEF62F6CC69DC78ED5C0E1D69E3377F5EC9FA1D6285A2A29961164C2BE0E7DFFF38A5394234CB61E79E56F61C68A72FE4D0D1D1C6273F7011861A053BC6BA4DF57CE7F615EC3FD283A2EA5CB67034D75D3607AF07D66FACE50F7F5ACE55572DE0C61B2FE6D39FFE09FB0F1D62F1A2697CE93337A0F974FEED5B7FE4D5CD0DA48F1D43C545F3315593155F5C40BA8C2D5C95C5D3715A198AA0537BD7FE25015A9FF54D8CD9FF96DA089DE3BD441422F278EBF735B272672BD5E78DC327B514544236B484E284E3A75A42FEF323689975948C3BD7C854B1A2F4341EA679DF767A9B1B880CF4110E0E108EC669338AA898BA984BCE9F454017AEDA0A8EC84927981C96A4D125CC5E0745CCAFCD3B4BFD8C41CD2749F076F59DDD766E91F270E216B1480433D6C7F8B2524CD28944427CEE86F33954DFC257EF5E4986C7E0FAF913B9727E353DFD31566C6B94ADD8B3ABF3193D3C93E52F6E60EE941A8A057D4E350864FAF1780D34434CA436E118787418E8EBA2B72FCEC18630BF5EBE8D757B5BB8FD2BEF61D6A84C0CC561F596FDB4B5F5F0BEEB2E213B53A72F14E547BFFC0B4B16CDE192E9D5F45A3A1B0EB6F18BBB9EA52C3DC0E7DE378FDC348BCEA0CD4F7FF157AEBFF6122E5D3A51AE18B6ED6FE6C7BF7D9C504861F1EC712C9C554D557996E44A4BDE8FE391D2A46271250D73A33184359910107F76D54EBEFD932769EB73D0741FA34BD3F1C7A30C2F0D70CD758BA9AB6B276A06292BCD65CD9A7D8C1E3F82C58B66E3516D56AFDBC58BAB6A797EE556BCD515542E5B886DD82CFFDC5C32E56ACE5DD90D01F4B90389B70D409B6B842FE16F211E3AF3D1300278AF7A0AB568E6991FEB8C8EE04AF1F7C5151E787127FD5A265555A5A8F108263ADD5187D6011353E49F4F83EE7C4697F6261F96D1BF34034076D585DA9BE8ADDB4DC791FD7435374B3B2CC1A8684B1B41E6F8455C38F73CCA3234ECB85BE893A90CE16F28803541911BACEF7C2C829646AF2EA73999061111B4C837CB7F4B9A5D18D190220A8B66D0E45DF3E7306A7809F150174BA78C42157E7C1E4853559ABBFB68EB8C70F30F1E624F4B04CD085093E3F0C5F74C9682F5AB37EEE243974E27A6F87968CD6E1E786E27936B4AF8E6871633B9A2905FDFFF38E98100572E9E4B6BC3513A43264F6F6DE6AF2F1CA6AA3893FFF7FE0554157AC8503D1C0D3A3CBF612BCD2DADD4540FE7CA8BE65098E9939D7BAFD4B6F0F51F3F4A575794AF7DF8022E9A3712D58CC97674512C35BC3AF9B9D93285613B2A5ED5C0B4A2C44527A960C2881491F87FB12C114F919CF4145984154EE58A1D97A92891BFEE0AC153CF6EE2A18756B178F1242EBE702A15C539B4363773E4681B5959856CDEB297E933C771FBED7F22AFA084EA9A49FCF72F1F4133A4510F81CAE1542D5B84EDB1F8FB276792257E282DD54E4FC47F28824EEDED7CDB00B4B5F7414CC1853EC36615392C9A0763EA17D0E7DE96DA289DABBDC403AEB8207CCFCA9D78871533A22417C516A0ACD311B4690D99B251E5ADD7C9CFCD452714A71334BF84D4A9484B840718686BA4E3E01EEA776EC0944A7751FA940CBAB36BA89E349325D36BC8540598B8A2476EEED915DE7F9DD9AB28048A7D04E80EF212143F8B460550B9EDDFD2834FE8520BA797B84347D022BF60381D5D3D0CCFF1F1EDF72D66DBF61D8C1951C48C51C3D974B49DDF3DFC22EB9B606F7318AFA671D3EC726E983D9C83F5CDAC5CBF9DCF5C339FA0E3E7AEA737F3E48606C65464F2EFB72E64EE980A1AFAFB8974072909A4D1DDDB43674F2F073AA2DCFDE44E3C812C469764529619E3D64BA7A27935344F3AAA9646C0AFE26816BAEEE5177F788CA63E87F5B51D14A4F9F9CE272FA2B4C88B1535B14362A511C774A2E46467911908C8894CB42B498F492909EA4ED7429B251E170A83A21148E482C57322BE1321CC1FC5892B6E4F90A611770CEAEB3B292F2D4053A2C4A3415A3BC23CF7F201D66FAA63C3E69D5CB8E47C9E79661DA6ADE3F77931851D9623689D161963CAA8BA6801966EF1B74FCE9011B44C710CE5A0CFCD8B9638EADB06A09DBE7A624FDF82DDB2E1988CE5E98F8C825A3A0FEF35CF9DFE21CECA274504E2B0BFAD9F3FBEB09BD2CA6ACA0B32112D0716BA04EED6601C4BD2EB5E2341774C1B63D0859CF0B3C16C8FE43E2791B17BED71DEA40699AC511EFB58C252CBB16C62E11003AD0D1C7AE5597A3BDD2EC3483446B796472C7F0C93CF9BC2FC89A3F16A8256771CA093290D195927981DA245F9C4EEC0C4BF851B8AF41374591B02A0ED585416E10C8F8F57EB43744684CAB1C6F8F23C968CCB9574C0EB2F9ACAAC51651CEAB779FFB7FFC49EDE742C5BC5438C4B261672C3CC52BCBAC5FEA39D4CAFC845F3186C6BEC66DDAE26C6561470F9BC1A32020196AF59477E7A16D34795D3D3DB416747AFB4897AB9B69D07D63470B4AD8B65F34673DDBCD18C28CE241E8E2452242A597905EC3DDCCADD8FBFCCCA17F7505452CC47AF9EC527AE9E8162C788C42CFEF0C87A0CC3275BC2C754E6332C2B204156342505C3260D2D5D7409479D8843437B90EEBE20FDFD11A96F921EF09395994E699E261DC005FB64586E3AC2C65040A9AA8B62652CA1FAE7F0FCDA43FCECD7CFD2D51B930541316A49BB34F15D688AC8928867CF266F4225232F9C434C35F9C7C7A71348E6A08700FAAC20C1A90EF2B601687103F10DDFC7DCF07DB062673C286AC124BC37ACFB5F174E1200FDEA9136FEB07A1F93274CA434C7475C11D1A34ECB80497348E41913F29D83F8A62E01E4D439E89355D68FB146CE70F4125DDFC7F59E931D8D62E96DC668DBBB85D603B5F4341C20D8D5268571426A80504E2517BCFBBD4CA82844111A19423B43E44C85425EA21B5000BD00665344C6096ADDE0085AB6710B2FC4A4BFA0480BC462A8668459E346F1CCEE767AC21AC53939146579A8CAF370C1B4914C1C9E855F57E973FC7CFABF1FE1F13D2255A649AAD9CC8A4CAE9C94C3D8021FAD9D3D74456164413A238BB3F1FBBD780D15DD9FC18EBA3646E406D044039119A7ABBB9B48FF008663A17B7C3CBCA985A73637D3128C32BA20939A51651CAD3B4AC0508859363593C6B2F2A56D34B60D50539AC907AE98C6754B27929BEE9500DC3710E7435FFF2D55230AF9FC872E939D8642DF595CA7C8313FF0CC761E59B18D1DB50DF405E3320DE65155A9C02744F6ADB84644E8B4587DE464FA98589DC775EF9ACA82E91520A26C494237E5337FB825CC8F7EF5349B76F724D267B6D4821691B8C85DD98AE0E9086D68B8B6DBAC0000200049444154F7392B9B359EE18BA711B50678FCA3B3E513298D225EA3AA98EAA33594E2486DA4DE56006D376F20FAB74BC00CA676776FB097925D85F7DD0FA1E48D3BE3639DC901C463BEF640237F58B39F69E74DA12CC78B684BB16D8DE6605CFE912DDEB22960F0262A42A73EF371807ECDE7DE4A5D5102EFEB3F70B2E0FD9820883064ED6AA2BBA19EF643B5B41EDA43B0A39998E510D4B3F04DBE841953A75053988962C52485CD357E75B9CD326D3108A0933E8372BF24F7391A763D06A520BF89190E529D97C1758BE6D0118912B11546E4E79217F09091263CFF84E59FD07AF660695E9EDF7E845F3F53CBDE862EDAFB2CAA0B7C5C581360C9E812B23C2AF73CB785E125C31857293A4E856B8D82E928043C2A23F23339D2D2CD81CE8894171D9EA1519A019A1D27A807D872A49B977635B3F560BBBC0EC712024A82871DC7AB397815583CA78AAB2F98C8E2E923C8F40B8714D77641AC0A0E36761248F752989D8EF05314631DC760EBBE16BEFCA3BFB3A74E00AA978047A3A0C0436B530F936BCAF1EA0EEBB71C46248D8533555F5850A7A3CC9D52C6C76F399FB165B9684E08413B178E914290E927BF7B86755B9B133C66D7BC57344149912BD9879268A4B26D2A174DA36CEE646CAB9B473F3C47A637444A6508A0CFE4ED7FF3CFBEAD009A7898C8BDD3717A0FBEF99DBDC91E8A27137DDA17D1677EFD8C8F75260710F0F7D2BEA3FC6ED55E664E9BC6F05C3F36222FABD13C10A741444A8A50DF3B19509EFBCCF4C9087E273BABCC8BCAC8CB41318344FB7A659761FDCE5769DDB75DE6A84D5BA5BB700A199553993D711423F203A882B72C73D089A25F92EB3C485F4344D002A05DAEB385191502436EA150880F05548B2B674E666ECD08D23C0E8AE641D76C54D54155353445435555148F1745D3246DEE4047880DFB5B7962DD5E46E4A771DDF935F86361FADADB69ED8DCA2EC0CEBE10D1B8499AA4D7C1A4AA723C19693CB9763FF7AFDE8382CECCE1395C34A588E20C01C4AA2CEA7504159EDBD3CE11918EE81542FF0E695E83E23C0F13471673FD4593292D10A907054D17D7A6618B13D831E29A5F521185283F8E8EED68ACDB51CF2FEF7F81F53B3A89251C638A7333F9E42D0B58B76E3353C755929B13E0CF0FAF60446905078F76B3657FA7745911E3317B5219B75EB3800995E9B2482B24B762B6CE3F9EDBCFF7EF582E5DC1454A488E95D0B2967E648A2BC895B0191B7BF17C8AA78DC16B7771EF07E7BA1C68E9C69268837D8B2FC150049DDA80BDBD005A4413DB7F87F9C26752BBBB37DA4BC876E68C469FFB1DB4AACBCFFC7867708457EA5AB9FDC92D4C993C99B1E5B9600B912183B688C3A1DE1831C74D71BC267E4EB97098FCEC5BA5439D2AD87E2D408B55F1894D8D82F32C5AB223F4341DA271F716BAEBF6D1DFD986198B13F11760948EA7B2663C534795499DEFA43595E04BBBC2FB2ED739A9F12C53209610DE8F6346232E50C74D86A57BB9786215E755E4E3F778F16AC2EC5C14E73C58AA87A86899D73C78BC3EB27C6EBF8F4851689A2EB9CD5DFD11D27C06F959E9C4A3513AC32677FF63A3C4C7FD878E503A2C939EBE209565E518BE007F5DBF9FCE9E28ED7DA23A675193AF73F3F92319374CC710D1A7EE45511D59609346BE8E23CF251A5EFC690659997E0A72B264E1B02B6CF2B717B7B0EB40334BE74EE082699564FB5D5F402148D5DE17E3AF2B76F2C0333B38DA1EC60C45583CB59A6B2E9D8C19EC615CF570F61E6AA6BDBB4F6A880845BD9AD1C54482260D6D7D1869593CF8E44676EE6DA0345BE5EA8B26F39E25D518C2100295AE8108F54D21D7CFD23669E930B9EB9EA768EFB1510C0FAA68F2741C4CDB64FAB54BC91D534645468C1FBF678A0C2204A8CB89F934E28421804E0D30DE76004DAC8FC81FC7E1843B52BBC33701696DECCD180B7E80E2CB3DF3E3BDD5232410706B7317DF7F781DD5636B985153816345A4F75B8FA9B3BF3BCA80C08264D76182DE264EF5DAF76230A09EEA776FF6F354332027D412072937B9B42B7191C2845488FBF7D3DF7A94AEBABD341DDC4BFFE1EDA8964D9FAF0C5FF54C66CD9E4E41C070991882929028FEC512396801C43149B38BC94614272614EB6212B823668C9955C5DC346702E90298555532297AE236B58DDDEC6BEAA6A3A783886033E0E7BC9179CC9E54C1F8D21C1C3386A65A32BA56745D82BA652BFCE6C9EDFCF2B12D44C226A1984561A687F6EE7EF20259A4F93DEC12D29B9683660BD5B838178C49E7BA9925641BD0D21BA1B12344F5C86114A48928DEC1301CD23C017C5E3FBAD7405563A8DE00583E7EFFF87A7EFBD4767A223AB99E105FFDE022A90DA2AB22E7ACF26A6D3D9FFFF19352C449F8079A7D9DD23FF1875FBF16271EE7AE0737B06977036D7D21D90894E6D3A828CDE657FFF62172D2355EDEBC9FEFFEEA310EB79B92765791E3E1CF3FBD018FE2B22FA4988023FC5A84588A494CCBE2A7BF7E8615CFD7A2FAD3A4EEB86C22B2E3CCB9E922B2471631AB348D2F2E1AE9D6AC132DDEA781CF4382FD2962C5DB0FA001F3C52F10DFF6EB146FF18D7753F3C7632CFC316AF90567E5786FE9200952C5FEAE20B7DDF7121945C52C9B3D1EB19ED69D3803B68703BD269DE1B8949F74D31CC76546DFD2B9CEE9CE276769BB4C2C0B27D24FA4AB95D6FA031C78E93962A2E3D08181AC4A72269DCFA4AA0A728CA8044DDB52888BDC74425F437A0B8A42A088A00548C74C82824B2DF635C32C9B38822B678D93FC5FC39BC10BFBDAD9B6FF103B9B06B0550F5FB8763EB5879BF9FD632FB1647A15A1602F15A5657CE3C6C5F824B7212ED30C86A653D7D9CBF5DFF8131BFAF3DD82992AF2B842D75A41B15CAEB1A27951054D109B2C9FCA7BA79470C9B85C2CC7E2278F6E667B5D37238A037CEBCA69B23350D521EA78E8891B0C44A394E76530A2D027F59FEFF8DB36EE5EB193385ED2F520DFFDE4C55C37AF1255D41B1483675FADE77DDFFE078E6690E3B7B87EC978A6560F931A214FADDDC3777FBB12430F8010531257246889F10897CF2CE20B1FBD52A62A9E59BD8B67D71F60DB8166AC5090E7FFF0297C7A58E69B053B44B6DE3B269A62D03CA073F7FDEB79EE859D685E9F6B6D25D22D3ACCBAF142F287E773C58422AE99982781FDB58C9EB7F2880D45D0A98DD6DB12A0ED968D44FF3A3FB53B7CB3BD140D6DFC076467E1FF8A0CA9E3D012B6F8CEC3AFD01054B969D90C7CAA2DBBF484C1D7A13E9BC67ED159E882A0CB7375E3DC5389ECBFD92D9FFDDF2762A8D75D902B4729A237271624DCD7CDA1575FA153E876743711B675FAF3C65154319AF1E5B9D22F302E4D4F5D668654B4139C60F1FF42465476134609C5903A2023B20C2E9B3E8EAAE2610C381E1A431A773FB3815B2E9A21ADA57A3ABA593C71047D11879D8DADCC9E54CAD3AF1CE5570F3DCF17AF9FCFF431E514667BC80E783034C18080BB976FE44B7FDD03A23BCFCD35B86C05416770DCBCAC224D6F05B726CEF080CAF4AA42429110F5ADDDD2C75080FA4DB34B19579E83A378786CD3519ED9DE48576F3F534695F1A30FCD970982BFACDCCBFD2FEE46513C8C29F473DBA72E61628968A2B6B0149D47571FE1D33F7E12C3A392E977B8F38BEF964A79ABB61FE5BF1F7889C65EA18EA74A0307D934925CFE845BB962C9443E75CB52A90BFDCB7B5FE4D9B57BA460D4BDFF752DD5E57EC984110174D4B4E80AC568EF8E73CFC36BD9BCA71DF0C8274DA438E28E495A410653AF58486545161F983792F38609929DE05DBB63733ADB1040A7366A6F4B8076A2BD44EE2C962FC9D9DAA45FE13F3D17ED86D05114EE5ABD87DF3EBB9B1BDEBD88B18569AE9A9DEA70B4CF626F97852DB4A045482791396989727A2FC7D91AB3138F934487E3D1B46001C8FC66A2A941FC6D0F7433D0DE44DB9143741CD84647533D617F11C5131750555E449A139251B274E016AC0E91738E455D4F4091EEB063D803212AF3025CBB702A0579B96C6CECE7D57D8DCC1B3F8A8A4C1FC3F3540CD544D7BCA0EB688A28C6093A9A23B58E1D7C6C6D0B72DB9D4F307B42259FBD7C1A25D93E34D1E8A1298CBCF54E8EF4795144D14F4E8D3AB6E8469486B78A3403C8F55AE4A57B38DA19251277F0C50778F9E737317EC43039A1FCF1C1A7C9C9C8A4ADCBE468284E5B5F9CF5BBDB69EC1EE0BD8B27E25322747675525C94CBF4F1C3A92A2DA0625806861391DF73C8F6F0AB8737F18B07379395A6307FCA483EF1EE1AFA43369FFAC183B4C7BCF8155D3ABBCB967B4744FBEEFBA0C8E6C230D72D1DCDA50B26F2F8EA6DACDFDA40635B9C8F5D359E9B2F9B4C38D48BAA68D4350FF0AB7B56B17177379AD020571CD951292D212C074B8D3366CE04C6CF1ACD85938771F5E4323C89EFF474F3CFE2E843009DDA5BF8B6046862FD44EE9B81D35B97DA5DA6B097B1E40EF4B1B7C882D23F6D4B584889F33D53DBCCD7EE5DCD94A953B8625AB9FBD2290A4D0371767599B2502838BB6E249D781165DAE3FFC2969C284F4C75B8854301D222F8749D0944CA231E0B11E96EA3BD762B0D5B5EA63718225E3E93E155359467AB1822C72C0A81827E970468C1E410D1B465931EEDE58A3993995E3D9CFA5E93BBD6D63160C6F8D2BBA6333EDB83AAC4B00D1F2D41D8DB1AC2B21C72D374A657E592ED17AC62A86D37F9F9DF5F26689A7CF6B2192C9E301255B1D134856FFD65356B76B5CA0E4E51446CEE8DD36F09F70111559A8C2FF470D5DC115497E6F0F8EA5DB4F645195592C737DE3B8382AC34D9C5B7BD56687CF453DFD4C9E40923A9AA2C63CDCE467EF78FADACDFDDCCC4520F5FFFC845CC1A5342A6A1BB5443332A530AA27B7BC0D6F9E9FDAFF2BB27F690996673D1F44A3E73C56436EEAEE79BBF7A9A982F0F4D86CC82BFECE6FC45E94FA4617461D86B47397F723E5FBAF5121A3A82FCF1E1977875472B372CA9E05337CC23141E90CF577D5B88FFB96F1D1B7777A088204040BEFC3A8571818D2FCBC7AC4BE631615C3E57CD28676A71967419175CEAE3CCA2B71E280C01746AEFEDDB13A0AD28E6DAFF20BEF9F6D4EE3285BDD4E14BF12CB90325B32285BDCFD22E12C0C4C38E2C067EE6AE67E9B4FD7CEB86F9C2A44FE63E7B62B0BB3B4657C4CD4BBA4ED9C251E5E479DFB374656FF13083A3E7133FEABEBA6EC7A4B851D1FE2022512516A1B7E930F51B9E9352A5DD6923304AC75153964B8E1AC30E07654AC315438AC9885A44D0F198C3ACB2742E9F35994CAFCEC6A3BD3CB1AB93F29C00EF99594145BA435C0FB0BD23CAE35B8EB2E17037C2012B60C0F5F34673F5F44A8AD34D6268B40C44D975A495E2DC74E68F2997C0AD8A49B12F486B77580254534F88BFAED9C7939B3A08590A694E90DB6E59C0F5E757E1B1E334B5F7C9083A3F379D7C617FA5D832EAB41C3FE1688C50344AA6DF4B7ABA977E74BEF9EB95FCE1E97DCC199DC3AFBE7115A372546241A1BFE1E6828576B548A1F4391A3F7B600BBF7FAA1645A419EC5EFEF29D9B254FFA6B3F5F8EE9CD4195939F28584A5DA4E3E228B62639E68BA61570D9F96379F8B1F56C3B3C40C8D4B879E9703E76DD1CC2E101F9BD347646B9FBAFEB78695B23A801195523849644711087B2D165CCBA643ED3AA035C755E3185012F9A08D11DE1EE73EAEFFDCD1EA021807EB311727FFFF604682114D3B11D73D557B01BCFDC65458E84E6432B3F1F7DFEF750F3C6A7367A67B897CC5424F29CA2A9E19EF507B9EDA175DCFED9EBF1119536514243A1330207BA06E8347509CD2EA8FF5F02E8D40742AAE149FEACD0BDEAA3E7F00E5AF76CE1486337E1BCD1949416539D69E304071202492E408B3FC26F50B7A27CEDDDE7939F25E86C1E5E38D44B7D5F94778D2F6378A64654F1F2974D0DBC58D7475D579490A8AFCA79D0A130C3C3D4615E3EB264148B46E7E0185E9ED97A98C6EE20372E18C7B0805746FBBAE0AB25F8BDCDC118773CBD933B97EFA6330CDE583F5FB9FC3C3E71C514BC4E0455C0BAC03431F5D8AA6485C8158323920F02F1D5844E8650C8D0B873F9666EFBE32B1465194C1B53C2F0FC0025F9695417E530B3A6149F21F2DB1651C7E09E670EF0DDBFACC7A32A8C2EF6F1D5F7CEA2AC28979FFEE9399ED9D48C62A4498016AB2D194C8B71552C9C984D49B6C2973EB098EA11053CFAD4569E58B38F8E7E93EFDC3A8B0BA695108985E598C42216758D5D34754758B7AD83CDB58DF447DDA274667E3A3396CEA1645421EF9998CBBC113918AA822681F9CC566F43009DDA3BF3F60468716F560C6BEF03C45EFC3C986741E12E315EDA8865782E7B08297FF64FD8645CE922358783261FB86305172D5CC0D4522F51E1462DF29F8E4E437F84ED3D36A6941E15F969F1B9337B49FE09B7F7BA530872972CBA89175CB035BA9A69DFBF83BD9B36D1172823B3743863B31CD4900BD0A250285C524491301A0E316944011F9B7F1EB6E610D7023CBAB38DEEF000EF9F3D8A228FC38E1E2F5FFBDB469AE2DEC47798588ACB85878D1AECE6FD73CAF9C98DD3244DACB93FCEEA3D752C1C57C6D8C23C2C2D8E070F0396CD81B65E1E59BB9F075F3C446F30268969237254FEEDE625CC2C139E91A62BBBAA3A38BA9781709448D096CC88CC7C0F9982F121DCC565C940C1D1143A623A5FFDC5638CAA28E3506317ABB7D64BFD8B9A0283FFF8D8C54C2C4B9391B4781E9EDAD0C6277EB512C3F0936E585C3E65189FBB7EB1EC64FCCFBB5F606753D08D78E5F420645BC1107F625D7CE4DAF97CE8AAF93CB5660777FD6D3D2D9D31FAC2511EF88F2B28CBB23085238AE81CB44518E04E48ED418DBFAFAEE56F2B76A0FBD21933A38AE94B67E3D743BC6F5A09E38A3265FDC3ED527DEB698DC10FC31040A7F6F6BD7D015A3C96DDFB30577F15ABEEE9D4EE3695BD541D63CEB7D1A77F3995BDCF6C9F64114D3EF482F0A5F0F3E7F7F3E4C17E3E7ED144BC8897DBAD96472C83550D03F4C5F50407F5389BE3CC2EE2DC7C5ABEC26F44AA1691A688FC82DD52B3A3F6A517E85272F0978E605C868D1AEE77BDF912006D86C3A42B36EF5D348D490519E8C2895AF353DB0BF95E8551D9C291DB6175639C6F3DB593A0919158F24BF16A771345B4F0004B47F879E0B38B5D4686D7CF139BF731A62C9F29A5C3A400BEC8F3FFF685DDDCB97C2B755D71FC9ACE4D4B2671DEC85CB2BC3129A664C44258A2F8A829C46C833D473BD85FDF2AA14EFC1154C16105394C1C554E6E9AC7A51B8A31D1344251C8F07BD87CB49B6FFFE16536D7F6123006F8DA07E672C3B49128AA255923ABB7B7F3F1DB9FC624434E665FBF7936372D1A2BF3192B371DE16BB7FF9D889D8662884E53E12A13271EB1F9CA0D53F9F0B58BC8CBF0F2F3FBD7F0837BD6A0AB7EF4581F8FFCE47AD2957EF9ACB9591137FA562D15C7EBE381A777F1C747F7905590CFB21B17935F964D893FC2B5934B2913097CB90D01F4B9796B5E7FD4B735404BB3D19D77115BF38DB3A2CF911C1EC59B85EF63CDE75E482909D072D9EF46D107FB4C267DF3413EFFDE8B9855918F1D176DC72273EBE195A63EEA07043FD7EBE2CD6B10F0CC629A933F72A936AE9CECD3A7BA1E9183161E8B12396321826D0DD4AE5A415BD487BF78046302266AB84FFAFA49808E8650A261168DAB66E9A44ABC6234349BA0E6A3C14A6798DF4FA1164151636C6857F9FA937BE857B3130A80421759A4844491D24089F4F3AE9A4CEEF9D02C2C4DE795031D3CBFF520372F9DC884924C6C1191DAF0C9DF3FCF1F9FAB43F5A6737E75806F5D33839AC234D7762B16C7D04494ABD3692ABCBCF9203D7D034C9F3A0DD51790E90DBF1966C7BEFD7476754999D5CAA20C297A250B8D8A85D7B6E85302FC74F96EFEE71F9BC18C70EDEC32FEEB9645788C18B61263E7A13EBE79F77A763545E524FD891BE662F77630A2C0C3FCE9A379FAE5033CFB4A2D750D3DB2F53D274B61C6D891FCE7976FA0BEA59DBD871AD976B09BDF3DF2AA5C818C2B31F8E9672FC2AB4425033C6A6B0CC47421F62108D1F49A0A77DEBF922DFB06C82DCBE77D9F7D2FBAD5C3BCCA4CE6570D23CD487EA367BE721B8AA05383F8B737404B94B230577DF9AC35AEC8615375F471EFC758F84330A4B9CF39DA121CDB63045611BBA92CFBEFA7597FB8971B2F9AC19289A57884909088EC84087C5F9CCD4DBD0C38BE44EE53148A34B7927F963779C893A0EC1B46C6295C83CBE54E04B642FBBABF87FD2F3F4B634F8C404E29237C119C50A72CD2093124AF1D63E98431CCAD2AC650A2A86A3A8A1143D1FD2CAFED655B731F1F5F308A919982C29BC513B5ADFC62CD11BAE33E6CD18227625A278E27DAC7DC0A0F3FB8793195E996A4E1B53B5E8E76F533AE20409E5F45B7350EC72CAEFBE1636CAE07DD037346A4F3A1D963983ADC4FBA1694EEEA82DF7CA4B5875D473B28ABA8E6A117B7B2727B1D39E97E0C4F1AF54DED8C294EE3D6F72C24CF17A73CDB4B71769A8C5B35C5A47140E7377FDFCA63EBF69393E1E5E60BCFE3AAF963C8D2FBA51B8A62E95214E95057905F3DBA96155B9BB1AC00A61964E1A4726EB9741607F7ECE4F26553F1797C7875039FCFCB532BB7523DA18AA757EEE0378FBC420C956CC564D9CC6A6EBC6402697AD89DF01D8D577775F1DDDFAF268AA0D72968899E7D6F96C265D72C65D4A842E6566633AB220BBFD01E7DAD77CAE9D3A087687629BC276297B73F408BC59D705BD9F28BB3CA8B56BCD9E8D3BF843EF9936048F5DB73BA09CD037773787047335FFCE32AD233F3F8E0B249D4148BE5BA483A2385FCEB7A4DF6B485E8B184D3B72AA351B9B41E243F7A0EF0FAD8FD0FEAEC7ECB6372A2E7ADEB08120F0539B4FE799A3BFAF0650EA354741586BB880B3D0FD362644136174EAAA128DDC0706CB20C0B47881EE91E36368768337D2CAACC23D788E2D321AC66F08FBDDD3CB6BD9EFA3E9794A863727E652E9F583286C9C5E2FBB4A522DD4BFB1AA4FCE9F935C578B0112CE95575DDDCFC3311D10710A2C8AA196252B6C2B7AE9ACE84121DCD51A52A5E7BC8A6A12FC60B3B1A7878F52EAE5A3A93922C91065058B7E728AF6CDBCBF88A3CCE1F9DC794CA02A65697A2A971A9B35CD7EDF0ADBB9EA77DC0E413574E67D9B4110444641B15AB0BE15C28F44C5C9EF3DEC620BF7F62232B77F710313572FD0A8134132516E373EF5F2A0D6DD3FC5EE6CE3A8F7FFFDE9F30B27289C4140E37764BB1A425138BB866F1388AB314B7655EB1885906CB5F69E2F7CB6B31142D61E61BC7D162CC59369B050B27C962ED053585E407C4F3255B57DEF2F77DAA0F0C45D0A90DE53B02A0E33B7F4FFC95DBCE8EDBCAA07153B22A31E6DEE636B088A68773BDC93E0893EE98CA771FDBC8BDAB0FB06CE604AE59300AD556E58B2596E0160607BB0758DF2C981E82CD90C80ACA94897B91C9C0F75C01F5095A1C27199753A5375E0FD03656344CFDA697686CE9262D9045A13A801DEEC58E9B882EF7B4DC128A0B8B49D354B2149B1B2666CA8611A17571B027CA9A86089606534B73995F16C0ABEB4455832D2D415E3ADC230B6239693AD74C1FCEA83CD1AA0DA6EEE5F7ABF672DFF39BF8EA3573B9694E952B9FA9EAEC6AECE4DFEFDBC8CB7561FA2DB79839C21FE17B37CC65D230034D50E2148596A8CEFE8E28772CDF40477F9C4B678D61E7FE2384A336572F9AC6531B76B3B7AE91F74C2D614665010B278E24CD7079CB5DA6CE1D8F6F24666B7CF9FA79E47B5CFD6BD9491917290D211AE5DA5B39AA8F836D11BE73CF8B6CAFEFC134C554E29095A631AA3483E68E7EE98358599ECFD6DDF5D2E24AE83AA71BB0786201375D3C8EA24C1D251E952DE962C68AC40D1E79E930F7AE3C8221532F82561761FC946A165FBE80BC0C8D778FCA6074BED0E410359204B3E52CBD0343009DDA40BE2300DA1968C2AABD9FF8969FE384DA52BBF354F65214D482C918F3BF8F5ABEE88C2BD7A99C529AC83A50DB19E44F6BF6B2B539C284AA32A6541692A9DBB23025E0376239ECEB8AD21C84B6B045548ACF27D1F9383CBABD226717A64F06BEAF3D432AF9F04482072716A163F7461A1ADBF1682A39561F56A44F1609459EB6C75F424CCF92CC429F15E3474BCAA84C17195D13212BB5B3C3646D5D177E436771753E05191E46E606500D0F4121066483DF6790E773D00C95DA96309B8EB4D113B649F368BC6BCA084617F82523428826C5559DDD0D5DACAE6D6563FD00B190C9F85C87C5E38A18E613EC606121A5D218843DED26773CB15136B59C5796C3DA5D4770743F5FBB6E012B36EC62FDDEA35C33633853CBB35838A182748F8056240FFB6073377B1B7A8888D94541E689FB4C15331AA73C5767CED8620A33F4447D42E795DD0DD43674D3153668EE8971B0BE959E601F31D3E5410BE794CC4C3F63CA0BC84933C8F6D94CAAC8A6B2240BC7162C14C1F470B08496091ABBEAFBF9C3937B39DC1AC67234662CAC61EACCB10CCBF731BED0C792EA3CBC32684EEA20A6F2ADA6F2940F7512A6364AEF901487C4207380F8DA7F23BEFD2ED735E22C6E5AE5BB30E67F0F2567F4B90769D970E76A01B7854DBEBB7C078F6C6EE0F27913B9A0A648AAA3894D134A632874871D6A7B22ECEF8D1376C402DD7D890699AF9CC591383B873A06E62EC7102D16C269D8CBE1C30DC4234102F17EE2E120038E418FAF90605A29961648A4794CDE5D6071F3E41C0A3C31544DC1D0BC7446743635F7B07CDB61AA8665F3E98BA793A65B44E351F27C06217442A6437E513E7F7E7E27B58D1DDC306F1CB347E690EE111AA442AED32379CBE91E4D1AA58A16FC97F6B4D2D33640558E8D6345319C38A6307045A533AA53D71DE70FCF6F6757733F372F988A6599042351B2337D3CFDEA5EC2C120EF9A50C0B491F9CC195D86CF10B436712BAE13CAAA1D6DFCF0B19DB48685C1208445F389A331CC30B971C1486EBD681C9A1996E02A3C62510C229642E780C9C1967EDAFB061818084B100FF87CE465FB18939F85DF2B0AA371B90A911DE08A228D07C26614BFC783138F108ED9BCB8BD9FBFAEDC415A410157DE742139E90A63867958505940AE57979DED6E7AE30C12CE27796C8622E8D4DEA57744049DBC55A7EF08D1BFBD0BA7E7406A779FEA5E7A1A5AE5253292563286A7FAA9D3DB4FA639C432D835FCBCEFD5437CE58157C113E09B379DCF884C11BDB90C32B154B6559581B8C2FAC630077A84FB8AC877B8CB51D169265E4C378A3E45DAE3B5B98A37CB5DBCE95D25E0571EC7CD560FEE377B5DA4EDD878CC20FECE23D4D6EE271AECC71B0F4AFFBD1E239B604629713DC395B694DAC336B9D16E3E7A5E018BAB33F0383174CD902245225ABE6B631B475BDBB960D22899571D0845B87CD638F6B7B4F2FC8E064616A5130C4679EF828954E679F02B96549CD3FD016A5B43FC7DCD2E164FA96478718EF4F07BFED53AD22C8B09855E29D4A4C6632852AE53A725285AF11D7637F7F397976AC9C9CA627C45812C806DDEDF42381C65414D21D3CAFCCA875F6A0000200049444154D4146532B62C0F552810A1CB083A62DA3CB1B589FF79760F41D1FD27F929315735CF8C73614D163FF9E07CC9F397D90E6187620B7D0C370A8F0B072BD1D7628A5597A06288261221702464EAA2529343C4FB62D2198819BCB2A389FDF50D4C1F3B9AD1A5D982C7C18A4D4D6CACEF66CA82998C189EC398021FF347E54870D6456BBE6884392169F6A60F404A3B0C01744AC3F4CE28121EBF550767A099C8DD95A9DDFD5BD94BF3A0F80BD0465D25E549CFE9964031F19E09AD88DD1D41EE786E272FECEB65CEB8E15C3E6F1C99822B6B09BA9410CB51080B011A47A73B62B3BFBD8FDA6E8BB8E6435544AF9BCB99960D0909E0948BD6415A20C7EE47EC7AAC16741C4E8F81AC8BF927D94EFCE1A9922AF2F0426744008CA390AEC49990A7D077643FAB366C23DAD7836E866857B308665660EA4238CAA5A7C989C7B1B961B8CDD563D2C9D54CC92BD6849091F85B35888A3CAEAA60A4A511B5BCF4471D3C5E0D5553C9F4E86479E368B649567AA6E4302B9AC3917E87BB5EDCCF337B3AE9300DD20CB7655B48720A10152DDD3E254A45BACD6D978E47D38504A949D4D4D8D1D84F6B4F98E2D20AB6377473A4AD13D37298515DCEC8C2743A5B1A29CA30185F9EED1E5351082B69DCF55C2D2B76B611C64758E42824BFC3BD3F81BA996A844F2CA9E2BDF3CA5D0EB5E2A7BD3F427A204D4E2A829E18B54C99BD127C7291AF76A406B7C0F0B8D431C112A93085159B0EF3D8C626BAA37EE296894F084759114A0AB3587AF1F9A4E767621831DE35AE8011593E3C862205934EE66B79B69EFB21804E6D24DF511174F296C37764415C986D9E9BCDFFE9DE7356341CBC9014FA0CB26D4251A90B9A5CFAFDA7D8DB1163FEC4726E3C7F02E542F75D2C7E85672171745100D20CA923BDAEB18FFAEE103D118798EA939AC2C20249B6054B6C160B5797EA762CCE1D146527E3DF63B07B2C8F9DA05BC976E6C4F84ADEDDA920F9B5C0ADCADCB1BC3347654C86C38C620F3BB7EEE4E9B55B88F77649879596CCD144FD0538F2DE124D2662668846B9E7DD65142903EE1D081B2BAF079F306E151D78BAA01F0A4710074315943701B6A02B068E6A6328BA04660C1D5DD389695E7EFCEC3E7EBBA681A8A6BB4A4A22272CD6F6B2A53E21391A47D2F41EFCF044F2552104EB8AFD47F1B0E7681F754D1D8C18399CF4DC6C29AFDAD3D24A5D7B3799012F3347E6C922A5AB8C67D318D4F9C6BD6BD9DBEF47F3A4C973298EF826458DC1062BCEE4020FFFEF9A198CCAB5D17583C35D2A3F796015F9F9994CAB1AC6F8E24C86650A8EB7489988DCB9473E070290AD81303ED5D5CF8E2906CBB7B670DFAA8344A30AC2E550083269AAC9D20B6670C1D29968911E46E76BCCAF2A244D17CE07EE126D08A0CF0D7EBC95A3BE23013ABEED37986BBE7A56DCBF4F36985AF9628CA5BF41C9283FEBCD2C2766FA5C80164B5E1109FF78C50EFE7B85D054B09834A6882F5C3D9780EA6A31A8426847A2AAE0442B44342FDDD138477B821CEA8AD2167288383A9668C490FA0D83531183EE72702A24991E49C2EF2007E7E3B44037BF795CBC6910501FB3FF4E08F9C8E388285E38975AE4191A17946A940614D6ACDFC1332FBD2AC5FC4504DA523417E704654121D0A3A0C5C3FCED8A5274332A2DAD36B705D9D212625A4511938BBC147A44BC2D96F526AA21C0589334324DF5A0796C74250D29DA6608FB409D305EBEF5C45EEEDBD28EA28B494380931B891E97DE76530B7A2CC27D375452E2890B0F1239430989D2B8E1A52B14A7F650832C3C8AF1280C2894161753989381CF11EC89648C6C115132F8FB9666EE5F7B884E4B70B53D9229A1D9624524581C312695A6F3B9774F664C81876D47BAF8CBCA5DBC7A6440AAFC79549B456372B9EDFAA99236D71F5359B7A785BD4DFDB4076DB29508375E38950C8F28FEA9BC54DBC3EF9FDD4D5F5095FA2E79393E162D9ECC94A955F8D52863727D4C2DCF255DF88539A2BE212E36B9DA7A2B7092FABE4311746A63F58E0468612E2B5C57ACA32F20F2D2677D13BCE3A219E8D3BF22859594AC9167FD1489B0D1D581932FB72515CE1EDF58C7832FEFA739AC525494CF799545E405340A33D3F07B451E5380AF800F055B1380ACD21D3269E9138A78367D518B7E11652584E8E57906119B4F88AA05409F84AF775CA73D11469F346F9DA0FC258491E4491272CAEE2464519CA631BF340D3D1E65C5CB5B7876CD3ACC8101C29E2C7A8AA6268A820298937DE3AAA03AF0E9C9B9E4F80DEA7BC2BCD2D0CBBE9E18C3FC1E2616A5B16C7436E3730C8A7D22B72CF2B57EBA438E144DB2359B989A260B80938B3DA4193AAAE6E53F56ECE7771B9A712495528094183F916A107F89EB762DA14A7D0EBF7E572901CD211A17CD1E96648EC8A2AE2AF8E85E4C61AF251CC0FD0A9A484158368EAA21F487064261390C1E7F169B5B4DEE5973504E9E8E88DC45FED889E3885CB4580D1065CAF04CC60F2F62F5F6831C6A17FB098A1F98164C2A54F8DDAD33885926AF1EEEE1CE277772B0DDC4527D646A11DE3DAB9205E3F2C9F2C0C6035DFC6D733326E9548ECC64D6CC7154550C23DB30A9CED1A9CA4F27DD10ADF762B5F6BA769473F26C0F01746AC3FACE046871EF5614C18F16407DCE3691DFADB9C12D1EA6159C3D86C7A0303A19C8897CA8284E25E3B0B547BAF9DC9FD7B1B7A51F5F9A972BE78E65D6E852B2035E3CAA852D8A44B2582872D4C95672C1A5D6B045AAE384944432E9EDE61D9331B004E76301F16BA87BAF1BD4443130E1EC21AF3BA1017DBCC894B0EB1201AE9B00478D3BF25A1F79660D2B5F5E4FD849235A301AD3275AB593A98D44449B3CA7084745514C74094AB1204935702B66A14EBEB47024378ECD96D6547511953FBF7A941DAD3199EEE9366D0CC7E2F6EBA67181D087F6387CEFF97DFC6A6D2B66427848E6BCDD3CD0B19C304E0CC30AF3AD459514A42B1C68EA40B51DE65764135005DF435C86681CB2E404105704DF5A90EF2CDA6206AF369AACDFD784C7D018969FCBB3DBEAE9890B0EBB2601DD4D1CB94C0D4D5A6AB98029FE3BD68494982CC43EA3B21C7EFD91D972E2F8C3CAFD3CB4B10D5BF54A9689E81ED4E241AA720DC60ECF278443766139E3C6955298E3274B8B5396E3A7BA2040814CBDB88EEC82F5214B828E98E8CFDEE37CB2F76F08A05343A5772E408BF7B57E25B1A7DF7F760C664F319E4A7A09DAE86BD0C77FD0A5E1C997FCEC6EC7F2C489B484789D43A6C5AA836DFC7D733D2FEC6E2564AB8CA8C863D2F062C616E75051E095CD0AB2FC2F8B72E2D51B649825C133F912BA12A0C9A8DDFD3B193D275CA6A573B72B24F446EFAE5BB4728125A91572D29AA23CBD0B82966D72EFDF9EE5C557B713CDAA20965526B5AF4FD85E97E23E36750DAA6A0A7B9A7E3E35B3840F4CCAC2346D9E3C12E4AEF54DB4C404854E3ACBCA22E5C46C9B5BE7D7505D94C15D6B0FF0D8AEDE04C73C419191E74B8C91046B1182C7A9CED2C9F4281CEDE8265DD3B86E5C0E73CBBDA489DCBE6AB85DE58A22036FDD8EC963ACAA1BE0DE2DFD34F40BB08DA31BC2515C914D311298ED845C68623674D34F8A9B6E11558664DA494CB4D24B50919CEE5B6697E231749EDBD9C6B6237D325217CB2D2B1E45D72C0A32BD9C377638D3A68EA17098900A35199EA95095EBA338C38F5F7F2DBFF95851E1EC3EC02739DA1040A736C4EF688076822DC437FC80F8EE3F21D21EE76C33D2D14AE7635CF04B372FFD4FD844E55ED0ED9AFAA3BC72A89D5F3EB7978DF59D6478BC9415E673D99C6ACAF3B2C8F31B3267E936C02473ACAFAFD00F8A9BDDC0F5358A652E5E253C0693E09EC88D1C67D489A324402D21D2EF8275721B4CBB3B9EB7B66C9BDFDEF70F5EAE6DC4CCAF266E641D97C23BF6E1C1087D62A63ED147E99E2432C08D130BF8C49C323AFA42FC6A7D13AB1A22C445FA22999B7104788629CF36C8494BA3AE2B4297C0D2E48A4102B2E0AF25E7AC44342DA9273109D46267BFE2704985C10D13F3C822445B44677D53AF34899D9067303ADF900C9A27F60EF0A76DFD745BE2DF9614E777437E573A5644FA72D844ADE1585F51621CA59F43625A4C5C9334E1722C32B430AA6A108C2239CD8E6D636830B22C8BCA91C58CAE2CA6B424879C804A40B1284833985C964196474BF262FED708F343009D1A48BCA3015A1A69069BB00EFC9DF8965FE2F49D3D8BACD70DAF28CE154E43CD1D833EF5F328E75CF43F69122AA854710EB60DD0D617A1351467435D072B763648C3509FE1252DDDCBB0EC348A7202146405282BC8425745AE34017449C3D1632965F7D8B2A162502419883631A3F1E7F8E35D3C31EA77123864C4EC724D8E83B350AB4BFC549CE38446C6041089F1932C0C79009BE756ADA525A262F9B2254809B6810BED8949258995493A59E2E7C9CE4B37E214A4064B6A550CCFD088991607FB1DFAE309EC4D9C4B90142CC1F1156A88526E5314C404748AF4C2F1CECBE48426D4E9A45D97B85E995E71ADA544AE789861511550284C536818B0D8D32BEA9FC262CB6464965772940FF798D4851462028005BF5D887927274BD16E243D055D435A29C1EA0EEAB1BFE5E429CF271644E25BB1F0192AB99959E4650618599E4F69491E693E8F6C7F0F786DF2B2FC146779A54468815FC3A722E975018FB04E73574567E288921ABC9C7AAF21804E6D04DFD9009D1C837898F8E69F13DFFCDF08C3D973BAA9064A7A29FAE48FA14F3D87F9EF647E22F1A225B156D83BF5454C56EE6FE7E57D4DBC7AB0833D4D4182111BC3D0D07D3A395969927D20013A918E108713AD2D2E68BB9B649008A8B51D2EF0EFE08B590F5365EF256CE92CEDBA936E2B4D5E45F233C9683919272763E7C1491141B2139B889F05DB4D80A3E5C4B96C5A19934797A32B22FF291201EE5E492A4572A290E792AA6BC92B4C80996B9AE2325964938F9B6291FA2512DC0400BB91B1C8F10A3D1301B871D13822D3406E94ECA6710605CFC9F191054357E3C2E594BB1387885A85B9AA6EBBCC0E29572A24525553E0289663B8632C9833096D8D586212702738C16116809FE430278E993C76C22DE518688B2F58B1C8C90E503AAC8874BF419A17B94AD245D38F62519CA35390E1931D94E9BA60B124925B623C4E103C7AB384D5B97B5386003AB5B1FDD70068F9D2DA44EF9F8DDDBE3DB59139C3BD04481BE7FF04ADF232295F7AB6373766158821F29DE2E5B66405DEC56B0122AA9070A7251C67D59E4656ED6E626FF3004D5DFD0C44E238B228E482B0CC838A3A9BEA46A14923EE2408E66B7DFC34EF4EE67977CA1F0985B5C7C3F3F88F9E0F21F806F2B3C97487B48B7217EF026865DC294E25FF08817B910756E4D25FF8FF698235615B7CE0C209D494E5488A9CD09493544089D1C7F3A4121A251E27D20F12705C6790E426582BF26A1202F92E8F595C872D8B80627F01D0925F2D8B716E87A2EB66ED46ED525AFF58E2DC1D4B39A5481D6B710DEED8B9B9E204584BE016002D605A3407895A847B9D72A2905720181F6EB47CFC04AA7B4F897B914D408955CBF1C9CFDD475CA725CF6B4BA716C7114A243601CD20434CBC3E4DF2AD856FA084643131C9F11F5C5F48145C4FD08C3D6995E06C3FB2271C6F08A0531BDE7F1D8016E9436134BBE72F38C1E604952AB5413AEDBD743F5AD565E8533E235BC4153DE04A979E35A10C1798DC629B28048AB84E808D6B3C2A5F4CA1D0868268DBE989DA74F447E80D9928826A702CA79C04D004208ACF5911887693D6B38BC2DD3F23D0B951024372B38D4CBAC67E9C9E9A8FA37A335165C12B015C09F84970014EB8DD2458BBD8EB829EAA3804445E54152C08F77E04582663E82458CADF25532E890B3996914844FEC7FCC513FF76FF72514F46D072C044A12DB9424870B49379F564149E484027825E773293BF4BD8DF0E5A7D24AF4174F3090075F984EEA4E0AE5092D1BDDBAA2E521C6E047EEC72DC887FD00FA4A8913CDF71F094BF561DA9E1E15515C95B1634BF0C8F815F97EE88C70EE84273227F7D02FEBEBE187CDACFF7197C7008A0531BBC7F298096AF8E1924F6C40DD80D2F9EB34696930DBD225C98ABDF835E733D4A76154A7A596ADFD05BD86B70F34812CC8EBD9BC9B6EE24C56E70C13E991F112F756C00A7FF28D6E127A4F8D49B6D6AC95C8C853F411D2678CB2772AA8F058A83EB7BAF39E071B878839D5E7B11830027195F9F78EF83412D71DC934C8A278B1B8F657812BF749B24075DDBF165CA2016CCB1B03771A583417070C224F9EBD74A779EB84F72184FBCEDE43113CC9CC4BCE3AE33DCEB9314C91312FEC78BC1C99F9FCBEEC0377B5606FF7E08A0531BAD7F39809620DD7F14F385CF611D7E32B5513A8B7B295278E95234D1E4925DFD4F310348468D6E92F5D8EBFCBABB72C21DC477FD1167DF23D8ED5B53BB6B45C558F07DF4C99F76696C12CF12803128FA3BE5C14EB9BA3E19609FC9523CC5E3BDD16E8327A093D8CAA43EC5B8D3CAB1FD4F2264754286E558642C47F778F35062F5343861F2465F9ADB8872266398DA2391CA5E43009DCA28BD83E44653BBDDC45EA230D3B08AE8DF2F3FEBD2A4295D87607C94CC412D5B885A3453B23F8410D3B9DA8E4764C948EDC497546868DBCDEBB18FBE407CE7DD6F7965A18DBA127DEE7FA266559EF5F4CDC9A3C8D31DA9D742E85906AB5321742A1E6129CE1F8366D8B33B34A73BA4A7F9B921804E6DE0FE252368198744BAB0F63D2C41C9AA7B4A0AF4FCD337CD8B923902357F028A2FD73DBDC85B8FBD113577EC391364B2F63D84D3B91327DCE946BCE14EECF66D38FDF5098EEF5B1C094F065AE902B45157A38DBE4EB62E27530F291D2965704AE968A9EF94F2798FEF783C33742A707F83387A505A69F05E838F3438F374F21B1994BE4970CEFFAF44C5A90FFC90607FAA63F52F0BD02E3259523BDADCF853ACFD8F9C5567F054BF80D7EDA7EAAEBE477A99747351726BE41F35BBF2F40C6CC53DF61DC16EDF21EFD56ED980DDB60527DC7ED69B770473C5B3E47F50472C3BEDDB1FFAE0BFC6080C45D0A97DCFFFDA002D41DA96AC8ED88A0FB985C3FF2B9BD075105AC8423E53F7CBBFD5FC4912B41105C761534E79A52212B69BD7E2F4D563F71C74279E7848AE1284F38C6BB1716E3625B302DF07F79E9B830F1DF51D330243009DDA573904D089718ABFFA23E21B7F8213EB4B6DE4FE37F63AE696224AF66FA0F9215B82651FE03905E3530D81EFD6032819679FA5F2BF31E443E73C37233004D0A98DEB1040BF669CE23BEE26FEF23771A23DA98DE0D05EAF1F01D5409F702BC6C21F82E61B1AA1A11178DD080C01746A0FC510409F649CEC96F5C41E7D979B0E18DA4E6B04145F0EFA8CAFA24FFC1818C2B6EA9FBF59B643DC168D1DAA94003D934D3492C4E289261551CBD514A96732B49DDE080C01746AE33604D0271B27A125BDE107D81D3BB17BF6E3F4EC97EDC843DB5B1B0125AB1263C10FD0AA2E3FF6C14387EBC98AB69ED095F86647D5F38713C82B427B0340EC0BC739DA1922337494EC78171E3B422866138C5964FB7514C34B9BA78C3E238FD2FFDFDE79874759657FFC3BBD646632994C7A01124A48082194109080D2150404042C14CBEAAA587077ADBBBABA826B57102B82B00A48D31510842010405A2091165A422009E965D22799F27BEE1D3229A4CC40767F3BCEB9CFC31F64EEFBBEF77ECEE4FBDE9C7BCEB9DE4AE855D2361FCBC2B8AF96D5A0C4500DAFFA0278D7E5C164AA4769553D98E8B32066AD4202B15C8962893F2A255A786A5408D0CADB15EDBCB25A949596C2B7F68AFDD9F54229AA852A54893D11E4EB05AD87C491E871FEE2C92BAD41655909BC4C8590F0D2A6B65629D2A0D623005DFD34908AED074CF2CFCE67E6C2B3361712763C582BAD9E9D1A2E54A256A28140AE81BF56CED3C83B3B7C9A04BAA36FBDED7312E8F638996A60CEDA03D3E185B0E4273B46947A351290282119F81788E35EE43FAB335B7170E90BF0339CB295D874B05D89B80FEA4193D12F4405590BC13199ADC828A8C4F9F42C18D20EA07BE15E04D4654165A96876F71AA102E9CABEC854F482266A38A68CECDFE6D37F39958FA28C53C0A523E85A9386D09AF3FCF4F096AD4AA842A6220279F2AE30870CC49851B7C0DBD3A3CDFBAE4ABA0C8F946F106DD867EF532354C220D1A350160CF49D8C4923A2F98ABFA3565A69C4D65D87E075612B826B2F4261A9B65F522809C0C9C049881E320203BA6979E53BD6D8BB65C7D2D711547A1C326BEB61A546811CE5622D0CF24094EAA2A1098F41CFB01084F9A9788A7967351268C748924077C4C96AE6F53B4C47DEB41D9FF51F8C80E86828AEF4B940E10D51C47D1047CD83C03B920F3DCF6084E4E33110189D731D6DF2BA1FE74326E391E18108F751345BCD5DB86AC06F4989D067EF4158D549A8CCED6FF2D60AE4C8D4F483E8AE45181C76EDD4962660734B6B70F8EB7FA24BED3904D56640CC0AF577D0D8AA334F1A8A8C417FC290C1B1F0F7644767356F6C85FFF9F65398716201D4E6EB2B2AB2B322777A4EC1A8079E819F57DB22DF70D7E2A2221CFEFA6D0C2EDFD5E2741C7698B70807D4637038F47E4C1E188CF8300DBFACB0A20E82256321ACED78239C15912A11FBE0AA220CF921A33164D46884FAA83B42E1F0E724D08EA12281768093B5B694AFA0CDA757C29CFEC38D257338F09CDF4B17A1361CA2B89720EA320602A5AF7D5A978A6AA0F97C9CD302BDD1EB7EFCAABD1DB3E2FC30BAB797DDD551536F41C6A144089396426FBCCA8BE13BD2D89FF04B23BFC0D8984024F4D4DAFDD317F3CA71E8781AC61C7E1A925656CC1DDD3B4D198B63114F60FAAD7D10A86DEE42C929356243E231CC38FD17C82CAD1F1E512AF2C6D6B88F317B4418BC942D4E9469F27096CC62C8BA00C3F2475A157B765CD651D52DD8E03517A3FA06E2DEC17EFCEA1BE1CF84BA48E2879CB8673068F8ADD028DA1E57477C9A7E4E02ED182D1268C738D9925A6A8AF83FD389CF613EBD0230B7EEC773F496BFB77E028907C403FFCCB30979981D3F84B5B1B5148862B10F1235139121EBD92E0A83480B9354831903FD3026D226D0C51546ECDAB50FFD2E7E05EFF2F3CD56917BD4E391EC3194FB724D1041CC4E3C178830B16C3D226A4FA15628C7AB418BE1A5D5E0EE81BE18D855836DC7B3E199BC0CFE4547A133E6DAC7735AD10FEC7E9542352FEBDA508E55663522ACF63CA694ADB6F735438412890F4E77BB0FA3A7CD8246D1180A995D5A8B4D89C7703717689B7B81CD3B47DA0509153BF9FF59E1A3D7821743E71F88BF4DECDAA6CF9DFDD2AEFD2111779E64AE232B7E55DDC67DCA31D547B82BA641A0D77BCDC56DD101981DEFDFAA40B7E42FB318799D0FEFFA224C2B5D05B5A571A57D41D51FFB42E6213CA217EE8ABDF9B20424D08EFDF693403BC6A9792F530D2C3907507FE0A5FF5A7DE91B19E67FF31A61403C24C31642E837B0CD14F596029D2F0904735F9C91F7ED70A8CC8FFADCF850F4F453C26CB62231E512EAF6AFC42D255B9A89F3173ECFE2A22C02CCB7CB1ADB57948A84A8B758A1AC37A0A7F10C2697ADC622FFB721947BE0AE583D8234429CDDBB0D83339743632AB18FA54E20E52F90ED9E77D9CF6254B033A57855552B826AD331B5601982EB9A9F1C5F2CF5C78E5BBEC41F4704DA45B635813EA388C125594F4C285B6F7FE62B811FC1ACF6C5A3C383B8CFBDB57631BF0A9BBFDF8CB957DFE61F3386CCE73EA2FC67EE5B7654A09BF2679B89CCBDCF8ECE62FB03D1352978A8E843FBE3D94A7AA9DF8BB8AAE983CF67F7EAD05E1D752081EE8890ED731268C738B5DA8B1519321D5E04135F4DDB0E0875AF2600441288639FE22B6781EC7A9F6E531E6D09F4798F180C0BF744400BB740D36BBBFB2810EEABE41B55ECC081CFD6ECC4942B1F40672EB2773309C4F86BE0125489D43C9A22CC478101A16AF86924A8309A7128C380ABA5B5A8AFAD42B54506854C8229B17AD4D75643B3E72D44571EB66F5E32713EE431025BB577A346A4844A2A420F3F056EEFE3CD43EC58D8DD85DC4A9C3B9284D1856B115A77C93E0EF67278ABC797B86B803F6E8BF0E23F6F4BA0D3E47D31D1B0DEBEAADEE639153BB49331384C87C76E0B6A35A263E5AE73084E5E82D8AA5FED02ED61A9C0AD3721D07D823C302AC20B4595F53C9C30EBEC09DC9BF697662FBF75BA0770C0E356AC7A38FAA6A33A48A01D530A1268C738B5D9CB5A990373DAB7305FDEC153C6D941B53CB5FAF7DC58BD105D044F4117068F80B8EF23FC40828E5A7B02FDCCA860C4863AB609F5536A1EAAF72EC7C8E20D4D56BB32EC578FC216ED0C683C9898DBC4B4A79FA2D9B0982F78EB89627E502C2B783F2E4A07D1A58350EE5F0C7DDD55DE97B91AD8EA7699FE2928140A84EAE4981AAB474F7F8F66F1D4CCDD71E862092EEF5A8DA1F91BEC1B94B54205FE11F43EC24303F05042203FE5A42D81FE453D01B71B3622CC6873D3303FF412FF9720D387E0A9512108D2367713B150BDE5EB133137E79F3C72833DEBDFDA7BA033156278C5CE1B5E410F09D360F6107F782A6CA7FFD4E45F42D6E78F416F2AB0F3DBAF1A8DEFBDEEC59B3322E1EFD976986247DF037EFF9A1AAC5A95823F3E7694775FBD7A14A64FEB0589A4737CDC8E8CC115FA904077A2952CC5A7613EBB9657C863F530D80AFB77D54452B05A1BAC0E8864E45208A48E096A0383CE12E867971DC0F3597F6AB69197A28CC78F5E335129F7C313B705A37F68EBEE8186B1B07866A3C9761C57F5B67721485E6B375595508D0FFDFF863C712017F0FBE3FDDB4C74A93359F06372367CF6BD8DA88A43EC5447D40964F8D26701323CA23131468FA9B13EC829BBDE07CD5E02ABF44F20BE722FC618FE0D0F8B2DBAE5B06A3836783F88F89E7AFC2121D03E2E16FBFCD1D6B318F9DB2BE85297CE7F7E5C19CF5F4A432B7F41424562A7097459411E5296BF8A986A9B80B296AA8CC35ADD83981C1F8E097DBD6FEAAB4D02ED183E1268C73839D58B9D7BC80A2F99CEFC0B5656AC88152A72F126F0898128E4560883D9BF040824ED0B606BD36D4FA01F1A16803E81CDC3CB989B4229634761358FBFFDE0D335989BFB8EFD116CC5FB8DF7A348560E45989F075E696783ADE5B8AE9619B940EBD236DA3FCA90F5C227BE7F419D508E3BFA78DBA320DA32E1EED3F928DFB302830A37436EA9814920C166ED0CECD38C45422F3DEE89F3454955FD759B844CA057FA3C8900731EA6172D47B031833FC220F2C23BFE6FA0778F103C39B2B1A6C9A5A26AACDBB20F0F5DFA2B77C5B0D573A27A029234E331CEF0038675A24057E667E1DCB23FA39BF1827DDA49EAB1F8413B0B63FB0674C8A4A3AF3B097447846C9F93403BC6C9F95EA66A58F28EF2D29E96AB0760C9DE0FABB1D4F9FBFC3F5F2150FA4018780B449173210ABDEDA66A6BB414E832910E3F7B4EC119652C220294D0B5082D1388C4080BF641BFAE5ECD328D535614000018B149444154E27E78F7650C2FDF6627C3922B56EA1FC329457FCC1FC9E27E3D1DA6969653C105BADB95CDF66B0EA846F28D37AB58863BFB7A63DA80C650C1D66E7CEC5219D2776F40FC956FA0B294DBE29055A3B0D96B167A87EA704F9C1F3F65A66514071768DFA721170B3035FF0B44571E811066B0B8EAF55EF36089BA1D4F8DE96A7FE47707B3E0F9EB12C41912F9CF7224A1D8A09B831C59379B4097778E8B83B96E8A2F9F43EDD70F43696974D7ADD13D8C43AA044C1BE08F293719C94102EDD8579404DA314E37DECB6C84B5221B564306ACA61AA09E09F76198D3BE81B5AE79B6DB8D3FA4F3AE64BE65E657E6E54CE53AB0D03996B2CD6A3D4374737EC79602CD36F58AC5BE2817B15864C1751B4F15224F9CF31D8DA8F8040CEEEEC5A331583BB8682E7AD59EB44F3A57128CF5BAB9B828EB85A5F745D8FDA88E50399651C2053A2A7FBBBDFB6A2E44C3E1AD9261D6205F0C096F5FF02F1454E3D09EBDB8E5EC07D09A8AF849E1A714B158A97F027EDE6ADC3FD81F5AA5A855815EE5FB34A2BAE8A02E3A8D11E73FE469DBEC2F824BB21ED81FFE38C60E1F80C86B7F59FCB8760D62CE7DC1639FD9EA394935063B3577422E93624CE9460C2EDD71C32E0E1631323652875A9305E72FE5A14FD60674496FF4F15F968563ADEE21E44842F0F74961E8EEDBDCB7EF08EBA67D48A01D234602ED18A7CEEBC5E2A98D06580D9760C93F064BD62E5872F6DB4F37E9BC07397727A1771F08BB8E85387236A0F4B3F997859DBB61E36CA2044FDCD04E87A8CF38CC880B828FDA369E33AF4F84BFC9B6A1C7DA39791FB0641626D45FCEE905A5B49D52AC2DB01CB958CC05BA6FE1CFF64F3EF57D1E698A6874F5566076BC1F7AF9B75FEC29D760C44F49BF21E1B7D7A0AFCBE5029B268FC6329F67E0A154F2CDB7602F699B023D2E360825A5E5884A7E13BDAA52F969E02C1264B7D714486F9983E9037CF90A3CFBCBC7A1CA39C237130BC57EDCCF9D270902D34AB6613AA0D8B9303BF617CC2ECD44B048120F99107E0A337415E98828DE037FE365EEAE6968EB74F370C86338EA0552AC7CB0F74D178A228176ECF79304DA314EFF815E565B46A2B90E96A2933067ED8535FF082C45A7612DCFFC0F3CAFC52DD90100BEFD210A1D0551F72910A8436C2BE4FF6079506705BA214E57DA7D08EE8BF747E0B588868BAF8D6D165EC7123E98406749BBE18B3911372DD05FEBE723C5231E11FE4ACC19128010DDF5A9DB4D695E2EAEC59EA443B8E5D45BD0D5E7F31574B2C72D60A22653D8043A54276B53A06FEF1F0C9D4288EC7D9B303A7BD9B5CD4F014E7A0CC2B1FE2FE39E41BEA8349AA15AF3006425369FF0554908DEF37F0D66910C7E0A2B4614AE775AA0D98B84F9CB994B8635E6E967BE6D96D8C35E020D8D25F92CD7CFC709C54048C5222C9F1771D3DF4F1268C71092403BC6E9BFDACB929D0473DE11A0240D968254582AB23AE5F942EF4808BC7A40DCE76108030677CA3D9DB9494B812E11EBF1A3E74C1CF318C2DD1B2D4BF188AC661E151115AAC37D83FDECA15D4717DD8BF0DAB3F647174802C0B2E6CECB23F1F99CDE4E097472BA6D05DDA7A07105CDA222767A4E4254A00AF386FA77185296965B8594DD3F63C8C54FE0692AE1598B873D12B0D16B36E44A0FDC1FEFD7A1402774F7C4F25FCEE3FE944721BF56F8E8A4A23FD687FE19B3E2FC915F548ABE7B16C0BBC656092F4BDA15EFF8FF036291087E4A0B12F29D17E8B66CC75E306C0ECC05C53228F7AAC6E1B07A38CC120FF8AA25786B5AB833666FB52F09B4630849A01DE344BD3A81409B511CCA18EED36C88C16DF9A861DD3D798C7443C9CBED6F3D83B8AAA4C6151E8458A17F12BF29073ABD823E9D5DCE053A3C6B8BFD7E29CAC158E3FD07E8759EB82FDE0FD141ED47AC24A515A264CF2A0CCAFF9EC7263337C05AEF87705439147E1A195F41EB55E27657D07744EB702ABB02A1DFDC09519D2DDCEEA2AC37BED1FF1152AD2F220DBF6254EE2AEE7FB66D428EC446DD3C0CECA286B7CC0C6DCAD74EAFA0596A3AF3F3570B9B47CFE48B0371411E89C3AA04B0841DC63D4023C59CA1FEFCA5D51965B049A01DFB852281768C13F5EA04029D1507FDF5E20F31A96855B311FDDBEB1EEC538DC6C773FB3AB58266892B55DBDE85FE6C63981D8B8EF8C0FF555EE3994560C475B355836BADD59BADD872F40A3CF7BD87E8CA8360AB7EA350CE57B7F9E2009EE4C256D09E8AB63709998B8309342B075AFCDE4428ABF3F8A3988FF827ED349C500EC2F4929588AD3EC4EFCFE2AC3FF17D0E59CA081E8FAC1699519FF485D302CD7CFC3F6A67F2BA254D1BAB3362821816A188676E0678CA3073A02F58B6617B35B99DF98A90403B468B04DA314ED4AB1308749640BFFDAF5D9891B1101A73E3B164D9D2AED8EC390393A6DC81E890B605B5E534AAEBCC28D9BE14D263DF72DF2B6B4C0057E8E7E38A672C26F5F7E31989AD3596EE7D2EB71267F6ED40F485E57C839035B6C1F762D0A75CE00677D370F70C7B4E6B61762C8AA341A059ADEB759F2DC6C8ABABB86B87B919CEC9A2902E8F405CD53EF8D6DBEE9FAA1CC4135C82F52A5E08E972BE01757B9D17E8A6B538FC3552BE19DAB4DE365B392BA54244F87BA0A7BF1252AA07DD09BF05CEDD8204DA395ED4FB26087496406F3C9809E9C12F704B5963681C1BD679791476F57E112F4CEEDDE64AAFCA68464A463182F54A74F5B1B92E4EEFDE02D9FE8FA1ABB7657EB2CD33B6E1B8CEFB21C4F48FC1CCC18DD97C4DA75F60A8C5FE7D071172F22B84D5A4D937D65826E28BC19FF00DB53B63BC79F5B7B652BD5B0AF4A24DA770D7E917E057DF18A5D2F4994CB417F9BF89324530CF729C31D0173B4FE4DEB440B74CF5BE09333B7429ADA01DC244892A8E61A25E9D41A0B3043AB7AC16ABD76DC1AC9C0FA1B0366669B24DADCFFC5F44BFB8384C1A1074DD908FA697E0646631B417B6C210311953E242789D8CCD072F40BF67217AD69CB48B2CF323335FB479E8C3B863D8F5C58158AAF885F3E9C8FFE96344180E354B3B672E8355FAC7D14527E7197751811E0E0BF496947C54EEFD0A634B1A63909B4E8455EAFBD4F72F50AB5578747820BFF78EDFDC53A0338FE663D93BC770BE85A5C57231A6BE3416D33B0A363118B0F5BB935899D85856F5AD1563D0CDA3A3F0520B3233B3F0F1375578F0A9484436F983EDC4D73BF0C64FED1FF220556AF1E8BB4391A0EFF8B78A56D01D33A21E9D44A02D813EA78CC1A8DE5E3CD2A1B5D6C3578960AFC6CFEACD16FC78E02C5447BEC2A0F2DDCD2E2994F8E357DD9DC80A198750AD185DFCD4FC6CC122430DB4977F41CFC2DDD0D417E3C3AEEFA247908EFB70F34BAB91BBF73BC45D5D0B0F73E3692F2C4331D96F32F2226620CC4F8D10BD12ACF6467E791D2E6415C133F7286EBDB4D45E898E0DA45CA8C552BF1790270DC6A0AE1A5E729495F2747405CDAAC9BDBF26090BB25FE0FEE6966DA5F71338E63118C13A055E9FD48DDFDBDD04BAB622137F1F73085B4B8DC8BC508696E7F3088402F41BD70B1FAD1CD7AA08D657D7E3B34736E29B320D6E9DD20BD3FAAA80736731FBA533903C380EA75E0B6BF71BBFEBF5B57866A710C1B70FC2BAE7BA41CDEB4B55E3E7D7F7E0B92F2EE2C4D5B6AB5AF67E7C0C563DE08F6ED13A783B90F74502DD49E243B7E998404B8166E15C6C43CD2C10F3129E2C9BB0B596E47337EAFB4EC1A47EBE50CB6D31BBC67A334E5FCAC7956DCB30BCF8876697311F729D5006E632158984B058ACBC3CA8D86CE42B5D9685F7B7A025B04A143C957B528C378A0C5558BB331513CFBDC12BC33534B6923689E4FC3E7C83CC6A85D90A98CC16882CF5CD4E47F9513B0BC714F13048BD111BCAC439080AA92DFBD1518166BFDABB4EE5A3F097551857B4A6D9BCD88A9E654C560A35E8E1ABC0AB93BAF1CFDD45A073362562F8B399C0E0FED8BC24026D2D40CB3727A2D76397A18E0EC193AF24E01F931BF6102AB072E646BC711C48393C03D55621942A295432216032A1C4500293C40BBE9AD657D0A3466D42E433133162D3A778F9B81E9B0FDD839E0A9B7D4F9CB022506F84556C81E16432E21EBE82E7BF9C8A075A943A97A8E4F052767CE66483E149A03BD615EAD149049C4D546978ECBFB5B3B0DF6B02660F0D44420FADDDBFCCDC0CE947F7C2B8F34304D465F38DB58E1AF32FB3C35E5F095A0CAB588A89D1DEFC54159B881AF1C996542CB8381F42ABE5BAB3FEDABA377BD1B01AD41FFB3C8FABD250BEB1F6CEF4EED02A6DA53B9D1168D6979D5FF8EEAA1D987FF535FBC625FBF932FD029C50C64220102236448567C7DA4ABCFEFE05DA8AEC1FF662FC82B3F826F501845D48C6B0B864844FEE8EEFBF9F709D592CC63AFCF4EA5ADCB94E8A67FE391A1FCCD0C354978337E276E0ADB42ACCDF361FEF8CECE89BD2F8B9C564C191CF7E42D9E4788C0E16E2ADC1FFC206930F528EDF7BFD4D2C16AC7EE4337C103E09475F6C2C74E5F8D39AF72481BE5172749DD304CA6BCC28FB6832A435C54E5DBB597B37F669C66174A4370F7B6B7ABAF4E18BC5D8FEEB694415EC44644D2ABC4D05FCF8A7968DC5FC321165A16F7BD5E378CC345B8D4FE9E783F17D74F6EE39A57558F7CDB74830FC0CBDB980C735B7753E215BA99789BD705A1E8B7DEA512812FB412814A2979F122F4FE8D26C082C9C6F7DE2714C3DF322AF1BCD5E14279503F0ADCFE3B8E35A985D43040573A3ACDD710C61BF7DCAE7C41ACBF8FBC8EF65644AC3E12113E381A10118126E737E269ECC43D5DE151850B40D4A4B252FB67444351CDF6BEF6D76E415CB78947E3E11B25ADBA9312C4D7C83D71C9C9347E17F7A93D05C84AF9F388CF484A17879A60A079EFF166397D461FAFD43F1DDF23EAD88A419A95B93307041019E7D7B34DE9EEA8577EFDA8A85BFE461E43B7761E3230E387FF95D2DA82A29C3D6A5C9F83C558EA5EF0F4278F96F18187304C27E3D91727C7C8B675B50FADD76043F7A05DFA5FD111303AE7D6CB6C02410F08585B3E7A293403B2515D4F96609ECDEF26F54A6A7C068B2F0F3FD1C692715B1C890F7C29D7DF598D6DF87BB431A1A5B451F4C372035B304A82A45B7F4F5F0AACBBBEEDE9542159255C3F87D2C4229BAFA78204C2FE7279E34F56FB3FB7E989805182BE0517C0E3E85C7E063CCBE6E98EC7C42162F7D54958052B11E569104DD7C943CD36E5A7F5F7BDD90860B0D3526FC7CFC0A7A64AC4775561AEA8552B04CC1E3EA04DCD5DF0FE3A3BDED616C2C1EFA6C8E01670F24C23F63339F0BCBBADCAE998272890E51412A3C3D2A180A89ED4FE5333906649F3A0ED5A5DD4059362A042AFE0262E7298EE9E3C7E3B0596363C8FC6131AA2F9FE46E1F1666B75B339E8F7F780F2D2F0CA5B956B0DF11BBDC4C1FA7A2380C065CAC9221D0478E334947F0D7F18791332E120BFE36140F0EBEBE6893D564C2DE553BF0F02639DEFDC740C48A4BF1D81B69A88C08C7B697D80BCE011783C984D2A222ECDD968D9F4F8A30677E6F0C0913E3C86B6B11FF4619864D4A40D2C6986B08EA9092528CFC82526C7D7937569C1360C3868695BD18BD033CA0EEA9825A2E4647DB8F2D999240DFCCB78CAEBD2102EB930B70B1A006D5751DBB241A1EE02113F1F303D999846DB8AAB9006D3856809CB23AF004943A33F76BB3F70013248D5CCC8FD50AD6CA30A99F1E7A55DBBF2E6C157BEA6A150E6794E37C7E0DAFE7CC0AE637D4A66E78B7B07BB0534FFC3D259810AD6FE6D6680D0EDB045CB8F5326AEA6D1B80BE6A29A6F6F741DF60765A4BF3F55546610D561FC9479EA1CEFE6C768C1713D286BA244D9F919C59819D674A70B9C476282D2B1AC542F1D8BF86C69EBFEA601E77E7B0D86C9140C0398C89D421AE9BBA5959D71B32AE83173925D04DEE19ABFB0CE7BC7DF1F5F6A998D146C679EDD56CBCFEC42F502E988CA7038AF1C6B349C8888BC3070B2210AC6A5F9C57AC3803639D19A8ADC585D3B9C8D20461648F86DDBC1AEC5B7C04EB2F8BF0E8EA795832C9F672284DCFC2276FFD8AF7D6E4A3B44A8D898F7641A3734389BBEFEE8191236FEC8003126807BF50D4ADF30830F1CB35D4A1B6DE71816685FB59324553F7466B232AAF35A1A0BC9E0B50598D893F83EDEDB14367BD144CA09998B28D21C72ADE95569B905E5083C2CA3AB0ACC1B26A5B0815BB1FBB878F5A8A102F19BC55920EC7D630DEA399155C1C1B049AA5B9B7362FC689CD23AFDCF66CF67208F751B4591B84ADBCAF14D772816652CF04BA9B5ECEC7D6B4B128942CF602339AF93D994077F196F339FDB7DA0D09B4211F5E5DB761ECA2F1F8F2317FB49E8E54839DAF6EC1A2CD22AC39743B2EAC3C84057F3D813F7C31110F4C0E477B8113977F4945DFC9FB515E757DF44C532E72B516EFFE3A174F44D97E5A9C568C038B93307F7536AC4313B06F5B3F3456F1BE39A224D037C78FAEFE1F26C0048B7DC18542F095A1B3FEBFD6A656516BE22B72994808D97F51D0FE8731DFD0D09C17E85A1C782F11E376E890B271287AB45A1EA51A89FFDC83173ECE44FFE7A660C9340196FC3511AFAC2CC1EAEF2762CAE4F68A3C95E1C0A622641973F1E97DA938DBB52B9E59D4B399D0161F48C5735FE643A80CC7A6EC0918DBA40AED63776DC18AD47A7CB4711C1EEDDF7E795A678091403B438BFA120122D029049C13E85A1CF8F4573CF7561A5EFBE17E8CEED7CA010AC55998F77436C63D158A6E56118223FD21CFBC84BF3FB9054B932C58F6FD44CC991CDEC2075C8375EBCE23C5A0C5FCFB03A03119316DFA16F49C702B1E1CA142AF18359A9691DAF2CC7798F9691E4483E2717CFF6074BF462273572AE6BE9F8B898F0FC01FC7FB40DD8929F124D09DF275A39B100122E00C016704BAE4502A1E7AEA30361FD7A3A86812B4DAA62E9B726CFEFB212CFC3C03FF5C3309838707E25A68322A2F6661D19FB7E3CD1FABE1A9EB820FF68EC6EC28158475F5D8F5F6F798F79901C366F5C2CBAF0E45A44A8C948F3662E4F1EEC8FE32069EADE44CAD9EB71A0FAF2E8464E4309CDA3E00216CC2E585F8ECF9BD7875BF0ACB360DC7841E4A34388AAA2F5FC5C7EBD3A18B8FC1C3C31CAF0FD3942309B433DF2AEA4B048840A7107058A0AD65F8EED9BD78FEA34C5CEE1B8D82DD09D0AAD8FE81199BB79CC6CC59FB20888FC486C5F19814D3BC6C2A5087D4F5C9F8D39F92B13BC7DA2CB2472291A2CFA8287CB86A3886EB01EBB163E83FF32866AE7F002FC4B69ED1BAE681D578E8DB424015802F5367E0BE50C0907A16CF3E9B84157B6A9A1C710088C44208BBFAE1C94523F1DE7447C3FAAE474B02DD295F37BA09112002CE107058A07372B070E111ACDCD5582FA3E1393D8786E295F76F439C57FB4F4EFFE9285E7AF70C52726CFDD46A298E25DFD3ECA2D3AB77E3A98FAE60F1CE7B10A5697D2B3177F31E4C78F90A4CFDC2B0F0E918DC3940CD725A7174E551BCB6341DE70DB65BCA3CA458B8F51E4C6A888376064C8BBE24D037018F2E250244E0C60830815EBD3A150B9E3DC66FF0D557233165720F4824CE460ADFD8F35DE52A126857B1148D9308FC8E08D4D6D6E2C08173F8FE87743EAB39B363111B1B4C024D2BE8DFD1B79CA642045C9480D168446E6E2ECACA6C872E04070743ABD5422C6EAC5FE2A253EBD461D30ABA5371D2CD880011708480D96C465555159850B3A652A92097CB21682B4DD4919BFE0EFB9040FF0E8D4A532202AE40C062B180FD634D24129138B76234126857F826D318890011704B0224D06E69769A34112002AE408004DA15AC4463240244C02D099040BBA5D969D2448008B80201126857B0128D91081001B7244002ED9666A749130122E00A0448A05DC14A3446224004DC920009B45B9A9D264D0488802B10208176052BD118890011704B0224D06E69769A34112002AE40E07F5EA05D01228D9108100122E02A04042515750DA7D2BBCA98699C4480081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D089040BB85996992448008B82201126857B41A8D99081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D089040BB85996992448008B82201126857B41A8D99081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D0808DC6296344922400488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D08FC1F8024C458BED69FBE0000000049454E44AE426082, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-       (3, 'DMaaP Bus Ctrl', 'images/cache/portal944583064_80711.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EECBD09985D577525BCEEF8A69A354BA5C91A6DCB039EC0536C636C631308B6434248483A2140C3FF058281907446487F49FA4F87A4D3FDFD9D4E826D861092302401023433D880C1C8181B5BB6065BF358D39BEFFC7F6B9F73DF7B552E59922D4B25F994292455BDF7EEBDFB9EBBCE3E6BAFBD8E05F3652260226022602230272360CDC9B3322765226022602260220003D06610980898089808CCD10818809EA337C69C96898089808980016833064C044C044C04E668040C40CFD11B634ECB44C044C044C000B4190326022602260273340206A0E7E88D31A76522602260226000DA8C01130113011381391A0103D073F4C698D332113011301130006DC6808980898089C01C8D8001E8397A63CC6999089808980818803663C044C044C044608E46C000F41CBD31E6B44C044C044C040C409B3160226022602230472360007A8EDE18735A26022602260206A0CD1830113011301198A31130003D476F8C392D13011301130103D0660C980898089808CCD10818809EA337C69C96898089808980016833064C044C044C04E668040C40CFD11B634ECB44C044C044C000B4190326022602260273340206A0E7E88D31A76522602260226000DA8C01130113011381391A0103D073F4C698D332113011301130006DC6808980898089C01C8D8001E8397A63CC6999089808980858E3D53033613011301130113011987B1130003DF7EE8939231301130113018980016833104C044C044C04E668040C40CFD11B634ECB44C044C044C000B4190326022602260273340206A0E7E88D31A76522602260226000DA8C01130113011381391A0103D073F4C698D332113011301130006DC6808980898089C01C8D8001E8397A63CC6999089808980818803663C044C044C044608E46C000F41CBD31E6B44C044C044C040C409B31602260226022304723F08203F46C7679C69D698E8E06735A26022602732A022F304067C8019A7F2A60B6D0FDE99C8A853919130113011381E71981939B7E9E5280E695139C0D403FCF3160DE6E22602230472370460134F3E5677E9DDC4B98A3F7C99C968980898089C0F38CC00B9C413FCFB3336F371130113011781147E03400B4C99F5FC4E3CD5CBA89C0191281B9B11BE0A90768B96E03D267C82835A76922F0E28C40F6620268CB40F28B73949BAB361138F322309772C8E79541675906DBB6C13FF32FFEDDB28E35FB1CEBF767DE4D35676C226022F0E28980C23E0B699A8A74F89890F71C43F39C019A20CC9323400B6991A60A98F9DD03D8DDF3228813980D383FC77B65DE662260223047229027A7291352A21AF15070EFE4D2B7CF19A009CC6AF650279703B482DFD94E32FF9901E93932C6CC69980898083CC708CC640ABA007D7221FA3903742FA5E108CDA1C05A65CF33698E6E0F61061B982304FC73BC37E66D260226026773048E73919F53B94C543BB42E935536E3CDCA229C78D09E3340E733084FCE751C3921C7B68497C9B2A487C8D099B32C054C17E189DF22F30E13011381531D81E3C9217B315051BE19923483653B278DCA7DCE009D531B499208403373F63C1BBEEFC02615DD7B8A5D238E531D67733C130113011381138A400ECEC76293C9F0B204C76499A5B7284C104429D2EC2865B8133A0BF5E2E705D0E4A109D0CC9C799604E742C151E07CACAB7B0E276BDE62226022707A22D05B413A3D67700A8F7A9CB260B2BA560F4087618C56104368DC932486785E006D59E49E359D91A528F80E8A454F21BF01E85338A2CCA14C049E430472AE75B667558B81B324933431D5A065F39FCFE15067EC5B9E858FCE33E73C7C4118A31D241AA04FCE153F0F80EEDE5DC52CA7F03D1BC5A2AFE60E03D027E70E994F3111782122D0C9123358B311AEF210A7C8122AB42CC4AE7AA4DD0C7072CAB217BC7215ED0B71AEA7FB336705697DC11AE738810561827610E3644E612711A013F89E8352D157E134007DBA879539BE89C0B34740837467B56BA54A61C56F0BA2EBB5997A25C0F65D357CEB5B4FC1B3AAB8FEBA8D58B162FE741C32008D3639E8203969F4C6F3E4A06766D006A00D1E98089CB91160A52B013292AAB60268E682291005C0273FB305EFBEEB6E78CE5EFCEFBF79076E7DD54B857F7D517C1D67066D00FA45311ACC459A089C8E08B0E225902C009DB31EC4A6A0017CFC1F9EC45BFFF3DD70DD27F00F1F7F0F7EE6B557C116AEE345F06500FA457093CD259A08CCE90810A0BB3C05AB4A5112C3B71DD4AB363EF6D16D78E73B3F02CFDF820FDDFD9BB8F3CE2BE1BA5A4F3BA7AFEB249C9C01E8931044F31126022602271681692A0E0DCE92455389C0D2BF238A8D46CDC2DDF73C89BBDEFD2178DE93B8F79EF7E08EDB09D08A0A39EBBF0C409FF5B7D85CA089C0DC8A80566948355F78678D42CCA22DA5E54D325B8A84CD3A70CFBD5B71D7BB49713C897BEE7E37EEBCE365F00C4077C4105471180E7A6E0D7173362602676E04048FA938A072C3EBAAAEA4CB2C45AA6D1958371480FEF056BCEBDDF7C275B7E1DE7B7E1377DEF15203D05C3EF4C8EC0C409FB98F8339731381B915810E40338376956423F767B032C11D31D2D4007DF7BDDB70D7BB3F0AD7DB8A7BEF7907EEBCE30A03D006A0E7D6983667632270D644A0C3AB66E8B409F618E864560AC2B4953A68D40101E8BB3EA601FA370C40CB146632E8B3E6793017622230E722908334B3E719FB6964C24393E870D0A839B8FB1E02F4873540BFD3501C06A0E7DC7036276422707645E059009A4D2B29E8B363A3517771CF3D5BF1AEBBEE81EB6E371CB48C0293419F5D0F83B91A1381B91481993E1ABDD60C9AEA105A3A059A0D521C4FE25D77B148F814EEBD8719B4E1A00DC5713206F4CC81C8CF9CA96B9CE91B724C97AF9E133BAA13D8719CBCF12B398E209997BC6011E81DE733FD44739F8E146808406FC55DEFFA305C77871409EFB8D300B401E8933132F38196AF4A3440B3049263B5B879E91DBB84F7A70181640F3D6603F9609EE1153B9B739FF8CD74DCA2D41B7BEA2FDDAB3AD6C43033ABE98DC7D1DE7B3262663EE3C517817C5C53069D5F3DFF9202F50E407F04BE501C0AA04DA38A29123EFF07A5374BC84158EBF215885AA0C7ADD615A949D1A63E942223EE14334B1BD16CA0DF7BA63337363F5A47EC510198D2270DEBCFF29AEEAFB89998F93211781E1110699D1AD8D3C65206D49BC0DDF7308336003D3DBB3200FD3C469C7EEB6C00ADD35995E9EAECB607082931525F2A83561FF12CFBD870BF9B4ED94067E34703D65990F49973403E63A813158B84DE25A89CB75A03B0CECE6E2F395343993CFFF1F262FD0403D047BFF3B3663FA64878521E15B66012CA98633253EEF183E95048741DE8CD94050FF3CED769389F03772F62E6103E03F56705E83C3D79E61D9F9E30339BD1340B7AB6109BF1990AA0D5346232E893325C5EBC1F6200DA00F4E918FD046865FD2284C5F4ADB87AC5FAB24DBACA983B389883F43332D3DE1FE899545EAB53F2D932D9A321287F3E2D7BCFF96B82347FA101BAF7DC6739BC41E8D331BACEA2631A8036007D5A86F36C95EAFC447A0A7F5D0AA3BBA384805E0E8633FF9CF6DE9954B5B079BDE4883A62CEA7F40442B2F74E43BF2E4AF65414E5B03DEFE3D662E06E95C2CF9023D78779B198A79F9641F42238A8016803D0A76D981F8D9BEDCDA0E5E47AA41C9D9454BFA817A07BB3E1FCD7D35E96B766CD4E3E3CF3EDFAB8548D08E06AD09617EAACBE538F8865FF47290BA60EC0F7188EE3B40DADB3E6C006A00D409FB6C19C92FBD5FBAC698585CD7F0A0E927F4E15C889F3226D1601DBD2EA8EFCA4A7D3D45DD257A7B82A135629B7F0D739A0F7EECBAEEB8C9220CFCCECE5DF7C41A277B6D04A0E8B4636163247ED72A14A83096C4DDB58B48A7C71EDB37CDA86D1597D6003D006A04FDB004F12C07604E01201CF0C96453B72FE40FF2E2FCAF6EC766C67D4476876A2979EE8D54277EA7E1A7DE5DF1652991432D836996F9D2113956542C80B8AFAC3B5939824D016B363FD9DC480ED2900B608D04270E8A980AFE1B148A7E814FA682B85D3167873E033260206A00D409FB6C19A723B1F05652A0B4D75064A84B3655B79514348164DE08B90890F81D6174B01517FCBDFF979EA2782C33D19B1A21E7AF80E7E28DF231FAE05D8B2DB66AEB156993D3F8B1BB6F3AD6A2F8B0C8EECB24CB73166F80AA87B0B98EAEF8AEF96E31A803E6D43EC8C3FB0016803D0A76D1093C22010E774040763162393ACD4159015BD4496C1C92220AB73A31F006D206901D571A05D45D69E421AD491864D200D110401DAED362CC743A1D807CF2F20B31CA4B60DBF50865BA8005E1F5019012AF300AB04A000D845C02A00962B3B5708F4E7A9BAC66462B84C2942C5CCE8B0C90329C8DC63E46B00FAB40DB133FEC006A00D409F96412CAC020159F1CA206D8010B05AB2A7BC300E710A381EAC34861555911DDA8660F26934AA7B91B42790548FC00927E1C555B8710D56D4808308691C218E520179DB2DC3760B486D17B16D21737D646E1989D38FC81B028A0B51E85B8CF2F05294E62D833DB40828F6037085BA500D29CCAA3D642801B6FAB9602EA912D21E92FECF507A18803E2DC3EAAC3BA8016803D0A76550EBC21A59026E428CA80D641340BC1BD8FB30A243DB3171700F82564B40B0E0A448DB63B0E226AC24441A07401AC1CE22B8762C7F220BE5B52C3492A5CE32F5ADB6ABB7913233E72B2C0789E522818BD422781761792540BE8BB0DC22D2CC82653928F50DA330FF1C14575F0A6B681D8061C01D4442B0D7E4862D74C77480569488AE599A0CFAB40CB1B3E2A006A00D404B047AD50B470B49AF0EAD177404A97A7F7014DE550A815CFA335B8E81B4AD8E9486405A45F6F40FB07FF3BFC39A7C02C5E820BCAC0D57680FD5C1975A91D00B76EA0AF7613B547628B2599A4744FEA18F912A0ED8B655CBB5AA07AAA29D6A35D1AA8E8E1C4FFD4581BA3E4DF2197611756F2192FE7330B0EC62F4ADBD12F6A2F3152DE27852E414DE3AF5D516451A959F15A07BDB263BAA92D3DC127E3CF7FFD910AF776C280AFED85F33DF33F31DC7F319C73ACAD1C6ECB1DE37577E6F00DA00B43C4F3D98DAC5DA1E7320E913E9A28992C2A52A73E4DFDD148945E02520BA82BF165359FDC5CFB7F8C3AC2D3446D21E03A27158D1389ABB1FC5F8E6AFC26AEC411913F0E23A7C514DF0184AC6C663733709E17F7B1A41667F86BB3FED9CC14C638D4EBD70C6C4D239E3FC9D36E2CC43621511642504CE30D0BF1CA337BC06D9BC95C8EC7ED8CE206C6701807EA14084A04E2380123CBD3373F73C1292EABADCA8741E59AA447A9DA222FF762CF03AD9007234803E1E90D43D44F94B652DD1DB7DDF594A746BBA795DF6597381E339F6B1E2A0E766398593F179C73ADEC9FEBD016803D0128199B686F2C02692512ACD84CE30F583ACC05375CE4952CC8164A748B30C2E414AB473F9DBF88200C014D0DA87B8BE133BBFF6AF482777C34BA650B46AF0D30914D0829B05025A2981596926D40D22A7CB0940B77E9F4AFCE219C85C647948DD0A6AB18BC41B42CBAAA0810A06566EC2D20B6F80DBBF0A767939E0F621B3A8EEA03A45D32C147C508942CB5499011D0DDEBCB80056368EE6F8380A7DCBE01406A4787AEABE7ACD50665BFDE4DAEFEE34D299AAF58F72675899AB7B015A8FAD69D7D2A99F763D5066C34E35C63A53BCFECB31EEBC9C4F3791983DF13875917DDE4732006D00BA9BE6F6C4C2165241F3ACB62E84692097A439A713723959DE6D4730CB6039394F9088E2226B1D4430FE1360FB37D1D8FE6DD8E118B2AC0D87BC711AC263C69C92C2B084FF4DA98F2688698DB214E3F4A6F3A736BDE475A6FA9A4A22F293B927CEE0383E52F808AD12027F3E4ACB2E817DCE75185C7B155267212C3D51259603CBB2E0662C7E5243CD78325E9C84B8C7DC38D243DFC4130F3E881557FC22FA176E00B2C2F37EB68FFF0308949C4D7334CD5B206599D4930EF35F4EE72EF0D5AECE94D52A47BD5ADEDDEBE3DD638522BFCB3F56E8A91EC0EDC9B4F3A9409D53AE32E79812E796EEA9CEC4EF6983B92B959C0EF6C71F99D3FE4A03D006A02502BD990A9FA069CD17CA5A33A74E856ED04A5FE184C9118BC698853536DD25B01C66CC75209D02EABBD1DCFA3D4C3EF60DF88DDD280587E1644D647608C7EEB1EDE4136EB380A7926FF5C0B37390C748456E278FEB29CE2E65621000721126096CD791461A97D79B9282F111DA65D49D2154DD455870C92D18597E2930B802700690BA83C8AC226C293CF21A7875D47993AE9904C2A750FFFE87B07BEB4E8CDEFCDBE85F713960558E8FC73D6908A234E4BDC8A7A29D0F0CE54B9CCB0F7328E73C2C8D961AA0F39FF7D209BDD9758EC11DAFEFDEF3EF4D8EA725CA1D4497496DE66A4E8E792CFA829F77ACD79CB4589EC40F32006D007ADA73481A81A35D6465DD6425CF8C54B4940F9DD64AA8AE10AD9AB0A8A6B00264F1218C6DF9362216FC5A3B91EEFF09503F80421AC04F294D8B6039A15022E49485ABA5D2821F6F5BC2672BCE9B1A68B202161C7D9C4474D227F12138C6470935C1B2A69E38E0BA40C2A61AC04E980D3BC81C179165A3C53FDD2194E7AD4336BC014EDF6AF4ADBA0CF6BC35B0EC41C9402D66AB19635447BCFF87686DFF1A9C5DDFC4A1BA8385B77D0095555703565F4FE5F6D45DEBB484B427C6BDD8D69B8D76EAB29A91E990203D137E9E5977890735729E1530A7A7D0CF1E8019E779C666CBB35DA5016803D0D3005AEF5A022A253440B3CD593D2F04234DC84A2AA4A466D23EAD335D2BAB02D97EA4DBBE825DDFF957F8ADFD28A635B8590B8E15089D2180E75888D214B6EDC1E6B2995617B2DC6531901A66161CD5234D70667BB7C36C95D383CDD79CAA744875205A7A52484953C8FA9DEDE236B244FF8E3F77D8E7482EBE8438251D5241EA0DC35DB41EFDEBAF4761D54DC84A4B915A2E9CE829C43BBF8EB107FE0DCED8E3E84BC631E62D47E5A63FC0E0FA1B61D903B3EF1A732AB0BA17496745D119E0DA933DAB21931797A79FEC342FEF5E7278DACBF4C10565BB14459E434B5A30DBADD7207DCC533F15F13B99C730006D00BA3702043E79C03A0E6ECA87429E957C1D9BBBD1DBB949502ADA642BAB01B52771E447FF8664E737E0D576A39434859A1052449CF96358568C38CB90D81EB2D451D9B15EF28BF04300506D6FD599185295A9AA8EEDDCB8E8643E0947FB2C9E90CAF08592B032B84E8A3089E0BA1E126DF84468D6848C00BACD4E48A1631C847605F5E26A8CFCD4DBD1B7FA2A64CE20D0D88CC94FFE1E507D0A45AB05378A70D85F87CA2BFE00031B6E84650D9EDA0C3ACF4273243C4A36376D5995BF663680E6EF7A4178B615CF4CA09DF99A1EEE3A3F2D59B53CDBDCDC33779CB239FC851C8606A00D40E799F2B44C7A46583259E653B5A1A46F2C7425B9A366CA16EBDDC0D3DFC4BE07FE05D6C43694AD06ECB801C7621309690C458928DF8D0CA9954A262C3BAA10D0C8CF8A62449E6C9D49EBBFC943A7B7B992C2BF9E445EC80763E6676BBEA7D7275A65845D973C16FEAC8CCC34AF547269C49685B6E520F686D1761663D1DA97C1BFEC95C8767C13F56FDF2DADEBB69DC28D1C8C391B51B8FA7D18B9E856580EBB194F1D8F935909B83AB059D0E4FDCD9516D379095D33A41245194CB101A8F3D503F2B2189219AAA31FEC288504B7757D5084403A59EEBD5C594BE97B2D1277491C74443829F2F8DACB453E41CE83594477049D155487016803D0B302744FF6220542795182340A61BBF4ACA05A2384954C20AB6EC391CD9F446BC7D7B1C03E82A4761805CF13884AF453AA1263D5D4A1BC3698056B5D730ED03D4F7A9E31A9A49DB482CAD6659F3F520EA7109CF326184B8A949C48B407AA0083523F1098A55125531CB38550F1F4B687C0B6116516BCCC453B2D23282C821B1EC2A03D86C48AE4FD4EE22A80BEFCBD9877C9AB607903A710A0D584C92FC6378D09D4AA26907F4D93ABE5E8C97B4BCB554BBB0BF6D20C1DDB5835DFD29C50B4CFACAFEAE49A574EAC8DD30C419C2152A1006BB0451FF02C0BBE65490D829A1E5BCE510371AA29303D5108DD26DE5B8E80F7340AFB54B1612FC49834006D007A3A40ABD19C6A7E59B241A15C1545A1141419ECB8892C3D8C78CF37D1DAFCCF681FFC090A691D4E5045C9F3C0E7872C89EC3D486F0D293C4ABE2C5405C18E822DA56BEE7601AAA3AB5C290746D90750405AA563562AFA8917E27178C6671264A5455C1A6762C9F2D9C9A8247F9C6494BB1ED28200B4A28358280D65A591662E225239B051E015A740683BF06C764486D25199F7361E71D7C17BC93BB0F0F23B60B9F34E194033E6715E90950950CB3272BF6E0D78B91BABAC1BD258AD690888BD227A4D4CD1BF9B0D38BCBF9295734CD9409C01ED38463505C6C30C631301C626AB68870912BA17A629D22842D1B1B160A084C54315CCEFF33054F250F294B1161BA0946115A938AD8D1705109B84BA1B29E423E98C546FE423D100B401E8E9115060A948841E791D8B60DA4DDF628B767A08D1E11FE2F017FF174AD54750008D8A52F172A6B73D1DE104D709CECC7DA701B4A233486BA8AAA3025FC5542B70EE921D399DC1F352C5CA53BD558998A04ABD8A60CCD310A78FEE794B46E97535BAA2846131944D2A8E34B810C8AC28814D4F113746222A105FF854123F29228C796B605FF0562CBEF21760B98B4E99E1BF02689DBDCAED577CBA46437102E44F98B35202D9CB7E4C2BCAE981A422A3575D3DB6AFCD30432388B073DF118CB73354231B610A440927727AA3D848924C56694E1AC34DDB70E326868A36562F9D8F954BE661B0E2C361566D012EA933A92E13A8F9A7034BEC5F7B6893E391E09D92A9FE391EC400B401E867464067B4BD5A36495DF8D03681E62E4C3EF52DE0F003881FFB3A2AD938ACB8A5B857DBA5020D19B31979ACA5B543EFDCAD3868796167C711A5C8C8015A9D8B02E8BC2899738F926BCB80EDF1DD788EE3FE44DED6E532D5EA81D9B3809018307155A1EA61C2A1938316CE34113B52667919A90FD2383CA81323B002B8CC4A59204D5D59C20311C6DD554837FE3216FFD4AFC0F6969F528016193B270B1642396B6489A87312DB968CBF9559A847C04423C064B38D208CD10E4284698234A16C92D799AF8854799740CA9F0FF4F5A1BFD28F7A2BC364BD8D6ABB8924F590D945191D71D6FDE6AE3919C1360D91854DD8491B6E1AA060A79837D887A5831EE6155DAC5DB54C3A1609D2769AA86C5A3C6095FA28E7B5CF781EDA00B4016819D0B9FD4387FCCD531F6D564FB049ABC0D413987AF4B398FAC9575068EF43D969C2CA9AD225472546FE70B038269CA33499A8ADA0246396F2995A16E740A700BAD39BA8B2546647B274EE948614EDA197E2DAF0F34470F639BFB6AB06D00528C9E4D5B5E4C54BA53C513C6EA74BD04A64E2B133576822CA0B332745ECA4328959F014BF2AEE4C09C6DDD588D6BE1ECB5EFE26D8FEE829036875CFF2766E6E8B004496B86EE3709861E744887DB536F64F85D87B680A93B5967452369A2DA4490024216CAE08E82942CA8193561AC3B76D0C94CA58BB622516CDA75789A2CE12C792F7334E046432219CCA733E3A8E7906AC77B0059E5C59842C8984FA70DA531846885B6FBC124BE7F7C317BF704E109C0CBBBCF9340EFA39DFF939F04603D0672340AB7428DFA2C9F76C945875E9A416B3E4CCBD00DDDDBF496D30220F6F0356B21B47BE7D2FE2273E8B5278187ECAA57980D48EE1C2861D936F54C971C44671D9AD84459E443F447C6CB85CF61599215AE7196A2CBD66CE01580172FE2FD5C9964AEEA47642C9F7E9EE74973D2B73DB951928D3A5BC7D9C795CCE29F76A7873AA255FC8EB4944D335BC16163E5587A02201329BA55172A59ED26BD3FE34B5243EA480A894605C62ED33E2F06F59022BB530E1AE467BF59D18BDE9CDB00BCF17A0BB3E17B3DEF79E829E2A31B0E9DC1260E6B6083B6B199E3ADCC09387A7B0F5400D1341866662210862C47102DF76602531CA4E083763ABBE0D8F3FD3296B1886A8F83E36AC5E8DE14A1F5C5D4864744299EC596064076A8684BCB34C52ECFFE1E4A5C64510D082369398250933F50485A889426B0A0B060BB8FAF2F370CE9211194DA214E2BD3FA55DA6A700C00D409F4D009D679BB30074417173C7FD959073565E11B6D50092034269ECF9F2DFA134F5044A6953BC8B2C8F52B24896EA36B959ADBA5045279527BB6C48D10F1099576A83D51234910C0A0EB943E5E1616B92931C6326046D2696A25C6E13EFA3AC88A6330F89554606178968A35D291009DBAD8B8E4A12A85048C805FA7BF020722E293C8BD344282DE78EF0E74DB8EC80A42F88EB08172ABA6BC9F6734A859F19C31121AE8730027CB720120525AB535C3A8FD3ED76E4125CCB083B7C28BD46B43F751AC1E3694619AADE0AD4466FC5CADB7E037661B52A78CDA640385A7DB4F35A619575BBBECAF43B9D7B323494B6869C2DB96766CA4DFDBDA7057CF7F1713C79A889B15A1B8D30469AD2342B112AA1E83AA03EA7E23898D75F44190468FA8BB8C81C6E86E0238829D9B3B164E12294FC827480B2FD5F326864886442223833E32620D3A384F73895EF24890594E398C756935A9C2448E2146E1CC36B47B0E2492C1C7271E3951760D5E261B00CCB38AAF96146DC7ACC938E7BFCCF95171A803EBB00BA5B64EB66D005CF46F15800ADD78404383E10AE54E12358DCE1A4FA040EFFF0D3686CFF3AFA92FD285B7564ED260A968B88B69A8A5C150E56D1155DB749D5A6AD321C45517099AB335136AB10D11D1B51C425B10B97D926FD38D294FBAB20B63D447601895D826517D1B6FA515C721EE68F6E0046CF010AFD5ADE464AC556D4B6EA37D492380550CA984873C862BF17C26A4E00879E427C703BEA479E4250DB0F2B9A829DB4507448D91078D5E7C97F5C09C844C2B8B8B02C1F49C49F11FE94EE595D5F978051748D9EAAF466B779029EB2A59DC5309BAB8F145567192617DF80735E7317ECE2063D39F48CCFE359B78BA42D8623BB20705E52AB0E9963F4B9A45984C4F10494A752E0915DE3F8D6A34FE14800349C7E4C063642A70CC4212A9E8D65237D5836AF8CE1A28BB85187D56E226DD711D426618581806F68B9A84529A6DA3156AF3F17FD43F3D546E8A2BA21C02B8E5AC056AB3B7A417926400B48E7809D52E191228E62B9AD5990C28AAB72AF8A59153F75C946BCFCA5170BDDC1A9685A838C0ABD1E13479BD9E60A1ACF721E06A0CF4680EE367330933C1E80561A524AA10834AA31C44DEB40633B6A9B3F81E6639F45393E82349A82E593B2C8E046365CCB17F73966C32A7B541924E14D3D9E0AA0723F0BF51A252DA32DA92C67655DCCADAD288D56196C041B4D7B0075771E9AFE62F8F33662F1BA6B503CE722B5F38945837C1E830A097EEB4D60B52A443E2CAF14754823A34A00002000494441540C76045DB57529FFE4D3CE825404246D60F7E3683DFD100EEFF83ECAC95EB8D17EB8D9146C4765D4F9C4213ECF510436A977B6C6B2B9A1AD526A2B65C6F40E0CCDA8AB8C9EBCABDE252B11D0E72AC3C6A4B30463235763FD9DBF05A74080D6EDF69D21AA41771689A192EA89E3B6520A2BD18B845634197A2F45D5956FE14806EC6CA4F8F613753CFCF42134781BFCA2B4DFAB55428A918285754B4670CEC221787184A455C7E491436855A710050DB45B0D356946C0543B443306D69C7B0106E72D948C3A0C22386A69A4B2654EC8D4C6F70034A98B2E38278ACA2020CB9F9ADAD07F32A34E32F51D350305C8ED715CBE7E295E77C3A5A870A2A4ECAFB76C9163F3F14C6E7311A70D409F4D00DD49173407CD657AA600BA786C8A83851DF12BCE698170175ADB3E8FE6773E0ABFB10D1EDAB09D0C4116C0B11C78340A4AF5AED6C277D0E08820C5DC93DB4929EF0C5520E4B9A8A61372D6F29564F044CD4063530FA9D38FD0EE47569E8F963708ABB200834B37A0B2FC2260643DE02E533B9908F2901C2740EB4D67F543D9159E742996CE1DCE5DD7743E2590A63BD059C8445C079209C01E477AE0511C78F04B40382600EE8475B8CD03F0E21A3C87A01E8B4A416D6CCBFF245DEC00346D3855469D173FBBCA6D9EAA283FA4614F193139998D296B090EF45F8AF35FFFFB708AE709859343B2BA86670768A5D456F176D8CCC3AC35C99079B6AC46486554C304E35182CD3B436C7EFA30F63412A45E057EC67B91C2B5228CF417B06CE11046478AF0E3103EB3E4760B41A38EEAC4189AF52AC23840AD514323F4106605645E01A3E7ACC5BC45CB443647EA4AC4889AC650197417A0E59E3FE39BC0AC326702740ED2FC37C159BEB30861DA869D7A089B21BCA481D10117AFB97C032E5CBB021E8DACF2ACA043C36BAA6B36BA682E8272EF3919803600ADD15267974CB90291D3B59FFA1282FBFE37ECEA76B8686AEF62554194CC883CADF836E71A61F2BB0A48C8C14AC55EA456DD6786FF909FB17828E91D0B74ECB02B2028AF80B3F61518D9F40A60E1B9CA6A543220368114D59F9221E9274DD2C219BB8F74B2A71E43E2691967AEF1EED2BB9DB768EA0369A00A98B2CF21B3EB16DABB7F84E0C9FF80BDFF21F8B53D645211725A21FF2E9ECED2EBA63364D5F2AD56156A45D26956EFA17A72450A97E40AA017637FF1029CFFC60FC0295D304B067D0C349109422942B4D845365C08E1A09602DBAA6DDCBF7D1C8F1C6AA299FA88A8C3F61CD85180E515072B160C6264A0889297210DDB2830D4DC80B7D94250AFA3363181A98931C99C5B610B8D76805AE423B68BD8B8E922CC5FBC14F4BE166E5BA4774A8D436A430099F48BCEA067036882F36C00ADC05A017442450752B49A811868A59477B626704EC5C2CFDDF6726C58BD54267DAE02A857975DE33911CA84914F71731D957BCECF00F4D906D039B1A039E82C83EF39C7C8A03567AB3A4C806C12E9C1EFE3F057FF0EE5F187E1A753C8AC1009795B52C65A4541FD2A3341A5A72050254A4A27692C018BBFD7EE15F26395B14A6EA5413B421991BF10F6C24D70462F4765D3ADB02B2B905A7D52F093CF147C533C724F2239FB8D13B4ED95A1A8E3C997B2CCD3AA909CA3CD815A0149D7F321DFCD9B801701E924D0DA0AECDD8CFACE1F626AEBF750B227514CAAA2D3251DA18A83AA4583D23AD51A9E332DF9FD501398E2E155D62DAF4F5DD4ED8538E06FC4B96FFC6338A58B157573025F39F74F7A85B234B66B532DD2B06C6CDE5DC5D7B68C61673343D5ED83EBBB8883162A568CD1A10AD62F1E41BFC78922824B6960C2E27086248AD0AA4DA13E3181E6D4041AF51AEAF5061A61846A33402D2D6074CDB958BB7E232CD783E5F88822EECE4E0E878D248ABB57C53EAD8CD759B5CAA009BEDDE2A00269FDFABC6098243A838E90B291254911052D51E1844980A455433998C26DD75C865BAFBD14FD255FC68D32FC6241560D49F1EA3A8178CE89971A803E1B013A17A6292999E73B4A6677D4259ECABA74AF1890EDC2C47F7C00D1530FA01237E05A6DA47680CC2650A5F0AD02A2C446E47AA206201FED2080C36ABE5AB08376A5F9034130A2E42C11FA84CD19E4AD59FCF3D17016C15B7515E65F72079C91F3017708197CB123555CB820AB6A191657B9E969D0331EB89C83EEBC5715C9146EE77B70E99CB9E3C2A6E470041225B753D7A03C3734B79D514247C73E1AECEFC6E1CDFF84D2D35F8535FE14DC24E07A4056068970F8F4B026E8F233D849A84861DE0B7545AA755C7546F23FF2D60E1AF6021C70CEC1B96F783F9CC19702C2B2F65CEF3196E83C4E7E07782DCC1E9B29B0752AC2971F3D80C7C752A4853E0429150F6D94AC00A38365AC9C3F8CBE4251541AECE7938E50097E82286C636AEC201A136308EA554C4D55516F05A80529269A31FA17ADC0F997BC14954A9FD2348B5C8E8A8C043629A03896C613293E8B2CD312EF0D9541F7F2CD8AD2C8E574426B90EED03F4B34C52100CD5A61D814FD753B69234B0264B5299CBB74086FFBF95761F18221E934940C9AA7D303D07302744FE4240C409FAD00AD818D70E711A0D98ADCBD56B1CEEC6CEA9AF3A401AC7412E18EFF8B235FFE13F487FB4452A5409080422693E53FF28E0E6287452C668B7CA099E912E454E62CFF135055F447CA6FC716BE32B246E02DBA00FEC6EB101796C19DB70EA5E1756AD3554AF0C85713CC25FB16C19C9C3A416F6606DD29D0E7B9EA333C26150FDEC539DDC23C13F934F0CBB17596DD2D32EA394218951A90EC44F6C4A7D1FAFE8781E67E20A3319227C4322565A2E6934A200F42AA470134818F71A775A9D20BB3034E4D06DC68B769CDC7416B146B7FEEF7E12CB84E01742F85D30BD07A37734D7C0B00B2155F3AF16C20CC80C7F7D7F0E3BD63D8DDF6B0AF69A145AF9038440131CE5D310FFD568281B20FDFE504C68953A9CCA95156F4448276B38EC3FB77A139358E767D0A13D5266A4186F11630BA6E134657AF41B16F405903C8B5D168C9124A423A0285DE5059324F59D2006935CD74A63C2363268DA10B854269F480B4E2A129CBCB10B75AB0921461DC449AB491341B986735F09F6FBF11975F7E894837D93823345ADE88752A77793811107EB6D71A803E3B015A0192CA41A55145CBEC3AC0DC0348F25A51A05581C947B0EB0B7F8D81F1FB51880E4AE3093BDEF8D45B16F93FF2AA4AA5C15C4BD91FE5D92153521A067109CFA2A15249F8D2EE0C04968FC05B8823F152ACFB85DF86337011526F3E6015245B55196B3E19680E99B481A6283A4BD45ECFDFFCF60978E539F7CC32FE33BDEF95A97C1E040DDFD391BCBB1E569540E5078D23009EC4DE8FFD1E066B0FC1B2EAB26088536E28E0A0142B37B5406F3860D19655B26416E054F79C4C626902CFA1F704419A2B0E076D7B1E26EC6558F1EAF7C05E799BC445CD74EACA3A9351079C55D553E2ADFB6BF8BAB60D4C45093EF4E52DD81B17D02EF423755C64611B834E826503059CB77C21DCB0AD54376AFA53F7B2A75DDB4A63D4AB9338B467A70074D06AE2E0440D536D602C7471EB1DBF00BF5810DA41BD8D9FC3BFA8EC98F79ED749D0168066C76096211280D67AE71EA506B3E5344E10A7CC9C35E72C0D2ABA489824889248BCB8B33045166588C226D234441206F06BFBF1AB375F8E57DE76335CDF97E628A51E5269829A0CCFB02F03D0672F40AB6EC2E900AD1A3EF4409D66CA1B00D11E1CF9CA0781BDDF84DDDA858A9DC04B15F8D030472C428537D5AE7262AFA90C8F5834132C490BEAA85CEA13D0C50F9A805D42CD1A46A3B801A32F7B130A1BAF079C61002C002A7DB4CABA89B3DA6AA7F781CA112A3FF59EDB364DE970942C69263B30ED519D09CCD3F09AD7263D768A22899F061EF85B8C3FFC39149383706C0208F95A163D3D20A1743041E6725359075194C0725D55BC4BB802B1613905A17FD2842DCD196CC7459ADA6865FDA83A4BB0E2D677C15EFB3380555419B89E6A45712236AF54DBE8758D00B3DE2A8C506441A6906F6C6DE15B4F1C40AB3482982E84610BFD768473E60F63F95005054AD2282FA4424582AE2D54B5ADAB902F5184FAC4380EEDDE8976BD86B0D5C6DEC3E3186FC608BD0A7EFAE77F491CE8724C577B2CE67A6766D02CB4767966590DA519A2589931E57C732FE7CC5892CE20C04751D4A13CD8BDC89F87A902E8B81D216A3309005A418856146324ABE15DAFBB1ED75C7E210A2E4BCF6A25C0FA809853D105EF4C036903D0671F40E7579467D0B90E7A3A28E96C538A392D203A88F4F1CFA3FED04781EAE3706CEA7C2D58F44C703C36BA69B241596CAAC256BEC37286943A6059D61354F82044B028A7731CB49232EAD62264F33661F1D56F80B7F85AC01D51CB77DDF5451A40AC142481D6C637D3B2639D42CE02D06A22EA92186A4D3BFDBE3E2B40F7BEB42748EA3DCC042781740288C651BFEF13489FF82CBCF83090D1208AA0E8206386488EDC2EA95DBF858FB7C53C8A5ED0A43CC47D4DFEED0950B9E4D92DBAB931C60569C2A93B0BB0E1A6B7C239E716A138B85251CD268A1957B9A0267D64A71A4E9E5212130F8D5696E1EB5B6AF8CAE37B600D2E423DB150705354AC10ABE6F561E9701F8A968D30A4D6D9869B50E3A1E8240165A16D554349D26EA13E3E8EC37BF7A255ABA35E6FE150B58E23F5006B2EBC04EB2E7C896A001290566DDB3204845BA6B24565CF1D5D332762D213D4E1599970CC39EF9C73D2F4E150009D220A591454BC742EB38B62A5E208DA2DD9173208695F6A63A29D60A410E1BDBFFC4A5C7FFE529411CB8A456D08E0698BD2332C7B9621AD544779A351E70A32A0DE04EEBE672BEE7AD747E0BBDB71EF3DEFC01D775E01D7CD1FA433F07A4FE494675D10F5AE8A959C9556B64190D79F4EE400CF32378C57C9223E972F9D8DE686A1A2E2A01707B7975219980230BD8B33FF4CA7D078E823081FFA07A0B603252F84E3F0018AC4D48700449652A96C991977951AB9B7736A87B2C34A9A9554130A68A204046919557F23FAAFFE4F18DC740B602D901DABB943B670B31A5AA7D317DD94B6DBA5AB97CF72F24ADAD71BA0A32D5E3B973B23941D5E5D06FF51DE2DCF45002BD98FB11F7D16ADCD9F44A1F1344A560B192D57A56B92948E0FDB294BE193AA09CBF35457A3F83FDB886D1796E74BEC13FA43A30CB8BEB42F73024B6D0FC5BE6158A5F9683BF365D795CAE8C5BA094665D0FA7F9AE650574F8584A86444AD013CBCBB8A2F3E3E8629141038BE38CD153C0BC5B885754B87B1B0BFA4A805E9EC14676ED1E3080D91D346BAC3254B42A4ED266A478E60FFEE3D68B72354EB219EDA7F04CBCFBD009B2EBD024DAEC6C4C14FEF4B49AA23CFA0A53098B76A2B9095FA21576491AA49E4ADDC3920138C05A035703F13A069984413A5047148FB810851E063F7C11AC6620783C30578D1417CEA83EFC4C6E1B2325A620584CE7934A5D2AACCE7F2549DB6F718803EBB32E88E9DA74E23BB8D2ADA0653C059EB8D844A20408F63EABE3F87F5E38FC2CBEAAA934C6B56B98335B39BDE729DC233B53D8692D531834E54771C8AAA38680588AC0A027F05DC95B761E0E2D7C159B001995396E53DBBC92C3E3179EE9B9F526FD54F3FFC0A43094A79C192D48A56041EE3C9E9426FCE91CC32EF4DB355ED514DF0CD94D805FB70E4E12F21DE751FFC644A356194FB90CA6E220EDC621F0AA5419198F10C3DCF47A15082459F0EC6A958068A25CD22B84061082811A4A919D64B0712D9761F326B0089DD0796F23845C7B95FB2EEC453264FC47F5B3270A2BE48D2017CF6811D7868B20014FB55A1350950B062C99C17F6F9F277593049BFBADA39C5938944C544F973B016C04E931069AB8EDAF8111CD8BB1FF5066D42338CB7135C7ACDCB511A1892F34B82B66ED8514D31FCA88E7C8EF23A91D8256A32D23C3EDBE3C97C8BBF86786C900E51CD29711C76336666D09D269548017A18C38A13448D3A9C38C1FEA727F1F48E4368142A98BF61350A032E7EFD960BF0F6575D8C924B550A0FEAABF547778398D386B7277C6003D0671740AB544BEF46222B24D5EA5D2AEAB661DD3C20B898D0E42602EA4FA37AFF5F207DE253F0ADB6E253E57962A349BE696CC7825D1E6555D4533B65C8A258B249B5DB09F3E7C876D128AC4069DD4D18DC7407EC914D922932B354BA664D3A6B9FD31C23158CEA057DAF9C596F162BEF620761A76AA6EFDFD152E52EF44CE7489E71DB67C9C7E5471910D581F61120AE2929225D9BFA48D1F8AA65CE21B5A1D522A2B7D57BFA0928A8AB513A5C9A2951A5A2DB91F96F899D9A33D938D2880B988A528C35DB6827199AED14CD204518293F0A16DE1861CF7385E3F64B3E0A250F61023CB4E3300E444524992D8A0CDA492D1C2861C97009252786CD061CDE3B1AF0F3BC09C6726CF2B3CAFA9359BF147DE3A803D0FBF7ED43B51560B29DA27FC128D69E77115AA12A6E7255A574CE3C355578558E74A44978CE0AA409BE02DE492AFE250468FE4EB86566D73A6B16E586FE591C11AC75076144808E8030048236EC20C1CEC77660FF9683085A365A8502BC65CBD07FEE7AACECABE2BD6FBC1637BE74BDA23A124A4C2DB5F9CB99F66500FAEC0168055EEA7A483708E865094AAE8332551C1A08C4A35952A90859631BC2C7FF1DEDC73F0DA7FA186C02760278D4EF8A617BDEE7415736C57F6636F945BE5FD9D3A8ED87B89C6499DE45EC528DB0080357BD1E036B6E00FAD72143BF02F05C0FACBDA13B528999D94D2F8791F3CEFAE2D406B427F2355B1570B6F7CFF23A390FAD48910C534F2E5257EB7A65E43C7167D73CFD511DEA40B1C5F2FF8A2822770A8C37534CB4DAA80711EA498A7AECA01924A8D69AA2178E98558A8195FA40B567201B8654E7A250277E41DA84EA5122523AB6D5FB59826543152CA89450B46378F20A55B49329D0223FAE762AE767F3F372476B72B7884269EF669170EFFE83E2B5B177AA81F35E72052A43F3C5B950E879D09150359AF0B3A416AACD8D848B26A5A2BD35E458046F66C259AC3868CAE6E87E473A4DC09BCDA58AEA88A216D294B406F9E850FCA1FDA889F54BE6E3A273D761F7D66DB01BC0C39B77E2735F7B04F5D2009CA5CBB0E2822558B6C4C2AFBE62136EB9781DE6F7F5AB0ED7CEB0510D4BBD1B11E73943FE32196A9DD55C8F6CE84486DDC978AD01E8B30BA0C5FC5DB630620795E26D4B8E8DB24F4D6DEE3247EE90D4460DD1539F47E35B7F0DA7B61DAED594FD03F990D167433268D987508D555738C7440A82C27D6645B55B88B8DF05E24F915965D4DD95682FB80EA3B7BF13F09621B32A5A8CA7B4D14ADE966BFB4EC6287EA13FA3DB60D23D522F27AECA770AA4BBEA3D29ECE41BC8682F0ADA8C52CB514D323CF2F4240ED4528CB56334094E044C87BBAA2670A5CF4439F41148D53E7C6A75C1B98CB50126ACAC7DB0F184F01BB148C7AC3809D1E700EB4617A090C6287277172A3F3A3BC1E4E2C8AED39E9058228FA4D733999D00563B446D620A7B0F1EC658B385A78E8CE3922BAF45B1320027B6B8390C6266C262D0AFC05781B0A235C4FB7A165F0DA5DA20208788F919CCA8D350289738A2993F2991086154571B13536C1204889B556C5C328C5F7CD50D58B962094A051B4E087CE4EECFE30FFEE8E3A8FB03A8FB452CBCFA62388BCA38DF3D8C77FCCC95B8E9CA8B95ED94A5AD037807C427862B31ED91A2315826D8DC5D56F8784EA5EA75A7E5CB00F4D904D0F9FE7D1C6DAA838D1D6B64372483CECD8264B95D43D6D82ACD16AD9F7C1AA56452DA63D9EDC77149DB4F617D05A0D520A601101F729A1DE5A6F41CE4E4406D69D6A096771093C5F3B1EC557F087FC145805311FF67793E7A77D2EADD20E0B48CFC1339683EA1CC94784CEF4C9CF60C73CDDFB3A22138D07BB99E59D8351963C7441D4F8DB5D0B298DB3A0266D2C96767F0D21443A59228401CD783EDBAB073933689A12ABEF1ACA8106947295A51865610A015B444EF3CBA60040B07FB80A80DBF67E76BDE4B7A72F7A4936A514035867422C6F0C96DC7944784A88E4FE1E0D838F64D4CE150AB8D8B2EBD0285F200EC28831BF3F88980B49C8F06E49C83EEFA3B4F373ECABB05993DC7B1A53B065B48289F8BB4835D96A0D99C9242A01BA670A3109B562FC39017E3966B2FC1A285F3C4A6B53995E27FFCC52771EF3D5F40E411A00B8816CFC7E22B2EC062F7206EBA703E7EF7D7EE00B545BC6C493BA4A354196D75A832ED3D20E45A673EA67494FF507D00A7E5CB00F4D903D04A55A0F8617A3BC8AED27602DFCF502EB89D5D991287C3731FC2035FC381CFFE15FADA4FA19C717B215A812AC99A98AC8BB1514E95E84D5EC9996AC92CB9569A2289153BABF3EE1026BD1518BDF537E08FDE8C2CEB974D3CE97B2C8C80168E086D92BB1DCF52B33B2D0FC2F11C7466834CCFB9CB5F357ECB6E21BAD53A4B954639722C1C69015B0E4C62C7911AAA998D96E3CB7E7C7C1B770529BB0EFA0B1ECA9EA3409500429588C08A52DEB02B93DA6B2A2F24AA424D10E01D84D4092701A27613F306FA256BA49786437F6DBD3BB9F885E48D1B72CD6A4563DB4A8A96C8E7F38D21AC304173AA8E436313D8B1EF00B272192BD7AE83EB152575F778FF09CE9241E7ADDBBD7FCE9E410BCF1C31DB66B66C29E546DA44CC7397AC5AF1D5ED7A9D2A7978ED187B1E7F042FBFF202BCEC92F310348EE086EBAF41A958C0D62D07F047BFF7213C70FF562476054D9A4E153D94369C8335E78DE092F386F1276F7A3516FAB21ED42DEC1DDEAE07A0BB9DAB6AF732D61694CE5A6C5F4D067D3C4FC8A97DCDAC8B9AE9EA81B925B3930D4C1540BB897AB069DEE31752940B6C7D55084380B4DA8F60F7BFBC0B95C61614E31A9C980231D5A22CCB682968758B7FB214948612E55227593697ED2C38D1541F7DC8862F40FFCDEF8333781EE0960047AB18F24C45A79409682EC4E66255BC3963BE34404FE329F5C9772E837E1E2CBE12F71C1F6DCBC2444860AE61EBA129342D0F895744100528780EFA7D0F7DBE8F025B93A9AC106C4A618BE1BEE2A4724648CAB6DC468B9CB880B592DAF15894428ADE388B90913760C75E4880E104C17140A95F0199E3E94941CD2EB2ED9760345F47B0D5F04DDA8A001A44D87FE808B6ECD881A56BD660C1926570D8E21FC4B099ED5A2962ADD450D4461794C55EF428BECEA26F26F71CDAC249C76913611AA09D06427544CD0885D04663DF182677ED445C3B82B0B917FFF503BF8D438776E20DBFF073A29176EC0ABE73DF63F8EF7FFA8FD8B2652F2CA784AA6361C2C9E06F588275172DC7CF5EB8106FBBFD3A2CE8E32EEA927EF42E203A456E65FC6AC1CDD92B69D9572F7D8683C0A91AB426833EFB326866CE8EA829C829A6F07D0DD04C87F9EDC5485BDFC7BE0FBF09FDC12ED9928AF6A19218CB8054995ABE43887E947526A7DABC99D3796CC98585C02EA26A2DC4F0756F4665DD1B80E212D5F0407F0EF16DEE493D4999080B4B3E904BC73309A0BB56A5D31E5A591E2860556B053664D8A85BC0D35311B6EC9DC4FE5A1B6DAF84586FF755B433CC2BFBE877394D29891A657B290B8F2E77AA2167ACC121D7B4EB1D5B04A8C55590801E2365F306DBA0E31841A45CECC23082ED789219F3339D4219499E49EBC2AE80BCAE0970F295C4512668D62752B854EAA4C0814347B06DE74E8CAE5D834A7FBFF0DC0EF57F94C1C986005DD3A3DC7CBFD7885F796A68F0CE9B4E12A5D0C8424B541D511A20CA144053BFE78636FC6A8AEACE83985FF4307E6007C626B7E38FDEFF5BD8BB77077EF6CE3BA4D186D778F8401B7FFA817FC4E73FFB2D64998FD04D11F816AAC37D187EC93ADCB061006FBBFD6A5C7BEE72F8E269A01DEE7245BD241AA24D924853622ADA6EBD7ACC37403855983CED3806A0CF2E80E6C3AB96C3EC40E358EC72D0926D092151473A793F0EFEC3DB30924D88B97BEEABA6D67CF9EB7495ABA34850FCA5926231C38A85BE68B90338E2ADC3C21BDF8E8155B721B5D9C2AD80578A6439A797D3007AE0778AE4A765E43F8783EAD27ECE6C4CCFAA74042563A50733B0BB95E0FEAD53A8C754C3B848D9FA1D72835560A4EC639054865883B22248DEC94328F74217080588D564294E783A951630156F8B54AC3D09CC54531033B9BB0925796459FAFA06E07A05F9DC8CEDE47A0305353E142F259A67B9E5DACF8319BAB603154A8A389C246885119C62516E2BE56FA22CA61C0EA94C26BDBB9FCC34E27F0640472A6366B7652A00CDA6A850BEA3B80DA79DC269A4187F722FCE5DB20A453BC18F7F7C3FAEBAEE025C75F525A8D5C7F08A1B6F52E148811FFF6817FEFC4FFF050F6DDE2619341020B2DB38581EC0E09A95D878D152BCE6AAB578D3CD17637EBF7208D48B4978F970CF27D6DCD13607E89E1D6A9EC38879FE6F31007DF600749E7109BCE6FECBD0323BDF577EC75903480FA0FAE047116DFE102AE1B898FC509A9B48C55A2B2D34179DB7EBF1B30567452AA7CC7E644B59AB84767905A255AFC4D065AF47716803D954690C2048C8C6DE3DBD31DDA2CCF31FBBA7FE13A6B7A0773C8BE4A274D1CE72508F80DD9375EC0B2D6C39D842C64E42E9647350F25C913D166CBAF3B11D996A189D7B931FA679BFC8DF72D11B3F5739054AB6CB0C34646307E903FA2167D231586BB560FB25D152731E2E17CBA8F4F549B62B3ECC1A70F29849238BEA1CD1FE272AF7CFF964C9D23B26482C67D802D422AC4B2278CC3AA348B6C8123BD91E0FE767283774D62CC04D2FE730449205A2D41015479C22A3C6396AC30A1A5850E883556D61FBC34F60A850E626849837AF84D7DCF10AA4590B2B572EC1A245A3C2617FE5CB9BF1CF9FF8261E7D7837EA0DD5D9E9D01E172D8C9587E02F5D8C9597ADC3DA251EDE7CF3265C7DE16A547CBA74A87949B2658E539D3C8867B988C3F3E6283606E54FD6A91F71A6D5FB59627EA671D0525692CD518198050EFD50975C172502B46C1D380E547F80EDFFFCC7188E9F403969C04DC85126489409B0FC4FED79D2E5DEA4D2AFB373D7510529383EEAD902F8AB6EC0E0356F81357CA1DE2B50F37C8CAD4D80514B47393339846671CF14E39A7C20081D905702733A48659CD2426D39086C1B0F3F3D89270F37D0727D8474914BE8A16DA3BF584291BA65015F351976563CB9C5A9CED8D46B547B2527D6380AA4B1288D22B41B0DC9B8C338453B05261B019A7182F94B4651191C51923C9DE6F78E6115FAFC2E760EDF5D34C954A03864D597AD9A4F04B805E479AD6A876F8BF73FE516546AD7F58EA786DE9D5BBAFEC8331394C931476C6851AF0B09D07C6F1A4BB6CFDFD95108B75DC78A81322EDDB01E56A381FA54039EE3C0F132944A36962F5F84654B17C0E3CAA3D0875A23C187FEF64BF8D847BF8036C199F64872ED216C2B46CD2B201C1AC4824B3662D1C2025EBABC84BB7EE9155835D227D729B24869B8623D455BC3C88A25A7E4993237530000200049444154F43D1215D269A2E24C067D3665D06A171079A0682E4F4222030AAE2BBB7A0B2CA60791FDF8EFB1F7BEBF47C51943210905A0A99996DD40A462A40056ED23D83522526A2DC5D4D10F3AF007D1286EC2D025BF84FEF36E039CF95DB30F1614735FE4DC92340725D94B30E73B4E435672A28754167B9A4B9F0ED0EAE7CAEB985AE4C9D4C2577FB41B55B71F1157190E8BA1BC071ECA85A2F0C61431F3E7CA545FF30D799626332137A8D59D792CFC4521C2B0AD8A69712C6E706D1A0EB9054C3502545B21E62F5E8281E111508F27B452BECD586792D52E73F90EE5BAEF991BFE324354BBBF884D9280AA5A6D298F0D6538946B9D55E720270BBAD591569909D0D38CF773ABD028EA0168AA35F29DBA23017BA7D544296AE2A6CB3761EDD285F0B21853B586BCCE2F7998373288C1BEB238067A6E09855241C6DAF77FB01B1F78FF87B163EB0E1965E4F169F12A99BDEBA15DF0E06F18C5399B9663915FC7FFFB8ED7E2BC85C37AFF4C4E484C5C6C29784B0221064B5C2572F0E693E46934F130007DF600B44AB7F46C6F47C22F4A5799A7005A9EB4DA6338F2B9F7C0197F00AED382CD4AB8B41E8BC259795E085870594EC659779E71E92DAA020AB612B4DD3E348AA3E8BBE0F5289FF77AD8A565805D5400CDD360E6E52A7B259E91EA53D39BC58A7AE34451F234BE3E4F473557DB995B74A225006559D83FD9C6637B277020705073CAF02C0B05FA617B1E5CC78643B066D6461F12D591DF91B9F5520F32C1D2C2949F1BB4918601DAAD960027FD2F22CBC5C109EA9327B17AED460C0C8EA0582CCAD29C7B10E60B933CE79349562611658A24E6FE6A2B5FB523BB1C504DBC5D8056F23BA15FC40489C387D9B502662A3604A0A573B09B41F7AA38E8EDAC0C9062B10E55DB5EA532D9D0B45FDABFC30871AD8E42AB85013BC4C6D1415C7EF179E8EF2B8AC789E79764771D4AB399681C39D4C0673EF9653CBD7B37FA0687B1EDA903D8BEFD1032162CC30C49CC64A38858767DCF10DA29EA233ECEB96C1D962EF2F0FE5F7F2DAE5939049B9B4FD0C7DBF211CB76092C94EB6484CD579D2C7A86B3E2A91E8606A0CF32801638E4F052404AB99CEB3B2852071D57113EFE398C7FFB4F3098EE404A4B5056F4296CD67A22D98A490627CD46F919BA29050E1CA145954EB6E18DA03A7C21467FFA7761F55D0680C5196558CC0796598CF279E86D99A5324179789C515F1D8AA38716D03F63D868F33919028FEC3884DDD51051A11F2DDB452175D0EF7AF03D82A6DA528CADEE92718BC659EF48AE0BB3EA35AA68479E396E37908501E25653B4C194C8B5321BDBF71FC6D3FB0EE1252FBD124B162FA1A9A9F87350BDC10EC3EEEA44F1CA1D1B39CDBC2A9A4381B36A3852002DDECD427190C6D0E02CB446F75BA4746CCBEE48EBE8BD311DA0737B500174EDAB415A436480E2F31C22A1295214A0185B705B212A698A73572FC6FE5D8FE2FAEBAFC2C0403F2CF4617CBC219AF2458BE661C9D2F9F8C1F7B6E1777EEB8398986A28B329BB8D2BAE78097EE6B6DBF0E8C34FE2739FF91A9A918B90E3374B105A31EA15078BCF1FC5EA8B96E1976FBA1C6FBC6ABDD400B80B3D25A24AB9A10BA632867DB180E52A47FE79FA080E6337FA6C4071A671D0BD0FA65AE272091DC165618A2BC2780F0E7DE97FA2BCF7F3709A3BC44A423228D0BF41EDBD47599E6A2DE386A504E8509A51D84AE1A66C8049458B7B241D4175F13558FFBAF703CE6AB5C12997BE3633F1E99D8382F73A5B147E2F0791D344EB9DF0E43093C8ED49FF39E5B42DE0B1DDE37874CF14B2CA10023670D80EBCC4C248B9025B803712458602BF148EEB2B30D5E9AE2A02129C15B7DBAAB1981B89EF7126BB8C00CD2845EC95F09D871EC1E557FD14162E5D8C3826F34AACD1DA688BBB892B4811C15CBE52D19207D1EBE85953005A126595D52BE0569239D9895B7B80288F0D4B4B0109B2F4D2C8773E514D2A1DEB50D901A5EB52C7A2207F1F6AE3237E36C1DA8ADBB0A23646DC0A2EDB70212AB0519DD88B55AB87D0D75F116EF8FBDFD982BFFF3F1F439606F88D77BC09D75EFF527CE54B3FC4FFFCAB4F22CC58B40CE1D887F1BA3B5F8EF7BDE71DD8F293FDF8DDF77D107B0F4C21CE485DB4D08A5B98CA6C0CAE5F81B5D76EC2D5E7ADC0DB7FE64ACC1FCC131935DC45B1AF37449082381F03E93CEC6DFD3EE191F3FCDF6032E8B32983561C9A549DB9AB34B5CC7620CE67253F8235F15D1CF8FC075118FB11FC780CE5A28738619187D56C1218EC12A4B65901B4EC226287A2DD4D321F5ECADD08A5CD0C07B22548D6BF162B6F791B5267991C4F71D41CE5B2FB1E9C8EAB5B47D0AB82DDD1A93DFFF17BAA3E21673754E154CD30FC23B26DECAFC77870C7114C240E22BF282E73542570AFBFB2CF2E345568A34115C3435E575EA395144A67CBB459F1CD59D446AB3A21F7A5194692E5B5E20C416A61CFFEC358B3FE5C2C5DB118F5462AE6EC0A709950B24D59D311DAD65F58541D6F55A4E544A0C158868BDAE544680F39CFEE24221BBDF267DA46947FE6EE742CF0C5047202B0B60CA57DA8F2E3605193C6FBF9765789066805FE04681604FDB08D25434BD0E754F083FB1E40D09CC0B9E72FC1CD37BF129E5BC67FFDA3FF0F5BB7EC816DB770C185AB70E9E5EB91A4057CE52B9B3136D91693A6C1F2145E7FE7CBF173AFBB1DAD9683BFFCE0C7F0DDFB370B85E2F50558B0743EFCBED5F8EEB6BD587AEDE558B27804CB06CA28F57B1818AE60F5B2A558BEB00F4BFB520C7840C1027CDBC6BC725128AADC0EEB19B9C4A94A2E0C409F3D00AD17B4FA82F8D84B93313C9F00DD44F4E0DFA2F9D04761B7F7A0C81D50586892244EB7BE8A89BF6A6FA5E05F38632B446A2B8B4C522102BADC56A9782EFAAFF94D0C9C4F13FE41CD7D2B72451E745BEDBF67E5AD58EA57672438E72344605937F248469901A165E1D15D47F0C8FE36B2BE61DAFB8BA11437DB2D95184365E529A1A549BEB62555323A95408BA715B5CC6188A8DD4212B61036AB08C8DD5A2EAAA9879D8726B06BDF215C76D9653867E50A05BAB6E69045BEA3A41632CD6AB14C2E25EB7853698056748656690885C1B72A9960BE038A6A38C98D8F14C5A16472DAA18E4E74A4393A56A1CA8D2E4A08F85466D0FC48293958B053CA8D14569421E57655E30731E858D8B4FE023CF4FD8711B6623CF0BD6FE2F6D7DE88A9A909FCE63BEFC23BDFF9E7D8FAE441B85E804B5EB20A6FFCC59BB178F122F87E1FEEF9F03F61D5EA35D8B86610AB4787D0DF57466615315507BEF98D6F637C6C0C3FFBFA576374D5423CB9AD8EFFF267FF84C71B0DACDEB851F682CCDC1811DA4A66C76BA08D294294CB16968E94F0CA9FBA021B968F60F1401183250F059BF755797173159877D9AA86ABAE6A661A9A74E8BDE34C236652693240CC8E2A478DDE994671A8EC4E379D385A819166F07C0725BF8AFAD7FE18F6D67F461A1E91FDD95C72C1521C226E2A334C470A79FC0C820B75A5AA6D5830809EC1D2EDE6617CE82A2CBFE32F81BE35DA4CA6275ACFA0048E7380CEB997E9D4534BEBD4EEDC6A09A0A467161A4986C7F6D4B17D2C42E49741CB28169C2A2EE0B834AC52C150853AD501987FE5DB5831A36531306E3510B7EB88C3400A69641628A3DB399560CBEEC358B5762D2E3E7F03D885C813A00995BA6F79FFA29E03258B56FEDCF98A45CE387712CCB3658DDCC215F7FC4C191FE5FE1AB911128B85AA3828AE736977F76DD97B3066E18F593EF7FFA3BE39076882768688CD29627C64A175B086ED3FFE21E6557CDC76F32D78FCD12D48121BBB9EDE868D1B566068B082B7BDF5E770ED8DEF44940EC0B203CC1B4AF1ABAFBF1E575E71BEEC37687B152920169C108EC5EDBB94D7387C07E54A49CE9F5D94AD26F0997FFB01FEEA6F3E8389D44269703E2CB788C469A150CCE0152BF08A7D702A7DB0FB4A887DAE744214AD08EB978E60D3AAF9B876D3326C5AB50815CF8193A424049171C721A1006D691F971DE7734096C953E7479D31738CC1DDEBF3D25B4037007D3665D0325CE4614BC5715FB5EB12A00BCE3826BFF85FE06DFF17E92424D8DAA44174F59E52A3AE5B31470B1B90992910C095FF1935B08953441303289EFFF3E8BBFE7D80B3A0EB0A36E70076FA094D1BF72772AEF91BD96527C0CCDD63B8751570A016E1919D554C242E22C797860E5A085508228CA9AE942AB9620EA53D5527D11AC7885A0D84F52AD280A641B1C8CB1AE49CDD129EDC378EC42DE3E24B2E46A55492FDD469C8AF0A8EAAD0C72EC11C8C73F5456722D0E0DB59C468F095A9262F06CE00E5FCE7AA65BBEBAF212A0E7A38E73CB3502009B258991C45CCC6B91515FF4DAA83323B6E36C06C9A7ECE69113FFCC68F31B6E7495C7ADE6AFCF4CDD7224B5AD8BA6D1F6CC746A1E0E1A76FBB1A412BC6DBDFF9D7A836D9E0C30D7BC770DB8D9BF02B6F7835FA0A162CB72220ED58DC1D9DEB0647F4D15E516D6EECB9B469F5B1775F15FFEDBFFF23BEFCB50791794544A98728A52F490C2B6D21CD5C387E1976B10267A80C542CF1BB9EB770093C2B40C16D63ED8A215C73F979B870ED4AAC5954C210179132017025A2B2E78E765A5BCE3E27897F8EF106A08FEFE93CF332680234E98854009AD90E3963DF735070C730F185DF86B7E333B0E972AE377D557B016A8F0971C3A3B2C3829D70776E3EF8BADD5878CB1889378C09ACC0E86B7E0B18BD19B007CF0C809E6674946BBBF538E8484D9E8D58E453A32821E1581D1FD538C523BB26B063AC059407C5369444BC27895C77E9AB3AF67416AD7D3444734CD0D63AE776BD8AA05113D5068F520B63B4ED3276EC1B033C0F175E74310606063B1D70D4EDB21351DD3B4E09CCA6959E3907D7DE512E3C759E316B80CE5F9767CBBD59F3F40C5AA93A4485412A464BE4C4609F3A68F2D01133EA48B2644E3874A86BB3159DB2CC3046D26AA2E25B38BCB786EF7DEB7138D1112C1D7670CBF59763C1481F2C7F1013B526EACD00FD25073B9EAC8A0EDA2F141036A7306FD8C55557ADC7A6F5AB51F65CD45B317EF4E3C7D06C37B17AF56A61E36AB52A6C2BC3F0F020AEB8FC52942A05D45B2DDCFFDD27F07FBFFC200E1F1A43FFC07C1C1AAB61F3E61F60CD9A9578C9A697E0BE6FDD8FFDFB8F60C5BA65B8FAA697A191F6E33FBEB2196E2905DC08C5E17EAC5CB70A2B4717627420C1D5E7AEC2CB2E588791324DC514AF9F6FF849F330B54C5203AE6711330D74F442ECD8406432E8B32D83E676466C6250CD06E4D88A2C7E784730F185DF85FFD4BF035643C0C161612F6F649036431609C9C5014E07A0D50B9481528AA6BD10ED91EBB1E48EF7018555805DE9D18C1E7BBC9DB6577456FBB9D6B5E74C3ADCB8D670CF729202B25CCAEB6A61E4B838D00AF08D1FEF41C32EC2EB2378B26097A050F00528A97966A62B6DD37965544F8802ACA40BA21071BB8576A386B0D910E3A3D072504D6CECAB26F8F1933B71F1A68DB8EC928B44E74C028ADA637A48B802D08ACB8E95D0EEE8009DAB346664CC7C6F4E69CC343AEABAD1758B7DCF04E84C9424343C123F0DBAD131BB8E62B45302768842BB8D5212E0D20BD6E2C0AE297CF6D3F7A159DD893B5E7D2D6E7FCDAB70E8480D9B9FD8832F7EF57E54EB6D4C1E38843ECFC7EFBCF7ADA81413D8718072C945FF6009B65340C1EDC787EEFD5BB86E86D115CB70E9A597C2F7CB8291D5892AFEE99F3E85952BCEC15BDFFE4654FAB859B28BC9B12A5AF506CAE522C62742FCA75FFB7FB07EFD3ABCE9D7DE844FFEF3A7F1D0833FC26DAFBE192FBFF91A8C4D16F06B6FF95D387D09FC7E1F838B57A19A661858B400F3168CA0BFAF80AB372DC66BAE3D0F17AD1A81CF498878CC159668E659AF513EE98A0E9B5E1DCA5732F9307B56A73C03D0671740B330C74A3B2B4FE499C96F96BC18BEB50F135FFC43F84FFF0760B594CA42E475AACC2FCA0F36B911A02DC04D289B53A6FFD4C692DEE3501BCF9662E4D277A074C5EB017748B5766BEF82D306BEC77DE0A3901CD378E1EE8775146A9A43965D68E487B6D8886E1B6FE1DB8FEE823BB40076412CE19125114AC5A24C92F4D4500F5F8FD1914C67D2F32666F4D43847AD26DACD3A4216089304F5CCC36456C4777EB44538D35BAEBB1A03655F6829B14EB2556BB24B599EC8E6C8477372E81299B9B2A397C6C80B93BD19F36C7FCF9B4D728016D739F2E4B9844E8A7F7A9357D9C28A5B55916B8E1066B40B65D12D4198B590464D0C044D5CB062092EDDB40625670087F605A8D776E3C24DABB074C9285207B8F75FBF8BBFFA9B4FA1560F51B633F8691B7FF167EFC15039442123CFAC1C491C7F1849D687F7FFD17B71E7EB6EC305175E8C62A90F43C3231277C74AF1977FF17778F8478FE3177EF15578E5ADD7A2E81230538C1D1EC3C8F002140A05BCF92DEFC0C8FCF9B8F3677F1E070E1CC6E4F804962D5D8482EF20890771D75D7F0CAB18E0A657BD1296BF089FF8B72FE17010C25FB41CA3E76E42C59FC08A91046F7AF59578C5651B848376C45D8AFDA4D4602BCA90D24AB5078E1A64BD233007EAE9D9F48CCAA201E8B30BA089A8F462E09E6F6C16A1A2A0E4B5E135B660F2AB7F066FDFD7003B906C4C6DFCAAF462E2E121197424838876A5D2AB2DCF3C7751E102DFC184BB0EA3AFFE1FB0175E06F8DAEFF98C02E8A3D018DD7A9ACE7754E6ABE055819F453132FFF42CD4B20C0F6C9BC496FD47D0B760A972A393892E96CE4D2A1C64DFC7AE51B47C962E194A0391F0CD04E6561D41AB2916A16CFA9842098F1F6A60CBB6A771FD0DD7E1A20DAB652544F185D24E6B7DAE4C9DAA0354FCBB854951F2BD1CA095F14FB7E09703F6CCAC79F6C260CE352BB7BADC0489BA6C6946917D04B5EE59360BE09E8804E708161B5362EEBC5DC3F9F38671F585E762DE601145A78091CA42D9FBB254A087B58766ECE24FFFE65FF0897FFD3252AB84248C5070800BCF5B8957DF7A0DD68F5650E0A6B73637C91DC1B7BFFB30162D1AC4828583F08A4BF0C4137BF0F0C33FC14B2E5A875B6EBC0403FD1EBEF81F0FE2231FFF3FF8833F7C2F2E38772D82A0853D7BF7498173DF9EBD989C9CC4E2C54B61BB74FC2BC1B253B49A0D38DCA51D1E0E1E3884206A60E1E265B8EFFEADF8D8C73F87894688566110C3EBCFC3F0390BE0F4C558BBC8C76FBFE5766C9CE7C18FB8F78A923E52F7ED5362A93B71F37697DE49BF9341E7ABD80E84F716DC8D8AE3A8087D2672D0F411705D471E1E95414728B975D887BE8FDA7D7F0DFFC8F790A1ADA47522834B757776EE66A6DA8155E38A78D24982CC3D0E43A782E6E06558FCDAFF05BBBC56F91F77ECEA8E3B8D9D9B2F9C76B37370560F47A8377AE56A43ED0398E1502BC1834FEC43031E8AFDC37A13DD141E63CEC614664E123F3644E49BDC6988A6543C4D10D42610376B924107418080BEC8F4F3C84AF8D4D77F809FBDF3769CB362B102E798F7C112ADB3341BE61DDA5A7B4E3E5A80587BB1F466D03940CFC639CF546B4CB70A2510F75A892A937D72D0CA894EA93A12EE88426A2649D166E8025A86B6E044352CEAF771C385E763CDB225D2E054F45CF4154BF01DFA8D58F0FD0ABC9203D2F89FF8CC7DF8EEF71FC3F2E5E7E03BDFFD219E7C622BECB48DCBCE1BC12FBFE1A7313ABA04D57A84BFFDD0C7F1E637FF8A24145FFECA63F8D467BE8E306211F230D6AC28E00B9FFF30AA93167EE7F7FF00175DBC016FF9F55F9626AA8347C630395E836D15A49E323131811FFEE027F8E1E687B062C502DC74D32BF1F4B6BDD8B3E7295C7DCDE5628F90A60EB66F1BC3BF7EFA8B989C6860E9C6CBF0BD27F761EFD80138831EE6AD5F8645F32BB870C542BCE5F6EBF0B2FF9FBDF780AFA33CB3FFBF33739BAE7AB72C59B65CE4DE6D6C535CB031361803A68412B221A411926C7A42FAEE26D964D32B210909A186DE4B68066C0CD806F76ED9729364F5ABDBEFCC9DF97F9E77E64A328124B0BFFFEEC2C7978FB02D5DDD3277E6BCCF7B9EF39C3366881B19A6CE27CFDB46AD8A83E61107F543721783C786FCEDB571B2827E6F55D0020A4A3DA05A4DAE6C2ECFE8217BE405E22FDF405EEF66B50D7337522E673920D2CA51AC2E30B9C92AEEC8B8A9FB881B15F81BCEA664F1BF43A0CE6D4FBD5517E4FF1A0CE72E0AAF57A6F4C71EF72C1A5F15D0EAD5CCB92A47E863E17CE352D59A36D1B8453C9D555F914C468D5DDB7A40ED2CD46E24E739A2C9EE4550541A77F2335771E13EAEDBF59750D6646F3776328A954A90362D62199B8C1EE0704F9AD684C385E72E52C6F832D4E24D62AB06A480BB4C775A6AA7E4BE6A5D0CFE956DA90704839A858381F9AD541B83330573D6A1725F1547A5941CDE38B78403A8946E771845403AE74B9DB1B2646C878095468BF6521E343875EA44C6D4D5AAF25F34DD81A04E594998A27C1F41DD26A0FB317459041D62098768DCC40804787EED41BEF2A5EF11F4079831A9842B2E5B4AF59012922987DFFCE6563EFCE10F10080479EAB95DDCF7C073A4D3191CAB93098D853C70EF6F397634CBAD77DCC4C245F318D350AF1A98D178924C26485B6B92679F7B92D2D20282869F07EFBB8B258BE7B2EAFC4B79E289B5DC7CEB1F386BF94256AC3C8F505E182C9D4877AFCC11515831969FDEF8006BD7AEC55F9047B6A294EA6953D04306932BE0471F5F4E437599C26615FA2E3B0A599F255432A7DA54FF7E438EC59BF11FEA74395941BF672A6877D9168016E258B82F31801180EE20BDFF0952EB6F221CDBED0EA378ABFA09D22FEFF7DD241637C32D07D0192D48C43794922997923FEFD3D8BE1A575ED4DF60FBBF86C86F783D3963234926573B0B17A973DEBFAADED1D4707C7F232E91CA124999F4A44C2212A09AB0D48831FE20595D53CD3AD9BA2A6F110FA075352A2F4D2359047D6AC047F1CDB929CB9C094F2645B2B78B4CB497ACFCDDB289593A3127C0EBBB0F306FD1D934D697E1A425295D940142570D849ECA74A700B4BAF815B5220B426E61F53CA6BD6198B7E299074BE906288E81F41317A007F4CEAEB44E541C2EC52106486E85EDA8D0808CA835AC2C412B4D2893E4D429931839A49AA67DFBD9BA6D275D31E97DA49930B19ED9D3A730BE711835E54564D3E2CB6192C9D8C4122689743EB1A4CD55577E92DA9A2ACE983792B9B3C753585C884D903BEF7A9C05F3E7525D5DCDE1A371EEBDEF0976EEDE4D69899FCBDF77161FFBF02A9E796A3B4F3E751F975CBC8221E52E608A57F4B66D87F8C39FEE67E79ED7B970D5395C76D145B41D69A6A4D0A7F8E9B6B63E5E58FB22C346D6316EC214F6EDDB4F714188FA6143C96635E2C9023EFF959F12E9EAC5F1F9898843E190A194358EA62C2FCE272E9ECB05F32751EAD391D43277711E2472CE6DA2E483934ADB2B0A0649EC4F3C714F02F47BA78276DF89EE01B41B59251AD2B0D642DFB6FBB036DD4661BA59E944DD5B4EC339B875E1CAB5FA015AC6BDC55E540BD36D0CA77AD1C7088EBD84AC31C475DC7863D7E3FF324E0FD299E61CE5BC1E298EAE1193CA389521216069425FCA1DB5CE481529B6514610DB082046AE2AB45513258C2C860336AF2A01457D99FD61AE2E4D94E385DD8BD24E2589B6B76125226AE22E6E414F46E360579C7DCD47F8C4B51F23A0D9CA6D500CFF6525541ED1DEC2A2C6EFE57B9ECCCB6B25788A91016586FA88BCEA7770259DAB8A4F546A7852BA41E6FB2E40E738689910940ADAE5A605A0A531E8F2D10E662A839E35095836636A6B317BBA70524922D114692B4D554D09DD3D51CA2B3476ED6CA6A2B48CC5F327B064C15CF47446699F6349F1B7F6F3FC9AD7E9EDEC644CC310EA6AC2E405E5BCF6A3FB0BD9B5FF189B5EDFC0CC19D32929AB26D297A0B5AD8DE1C3AB183776347B776FE2E9A75EA5ACDCC72517AD203F10C66F040887F3D8B071376B5EDA842F643171EA181A478D96E03515922B41023E9F1F19B0B56C8D7446E3E1871FC1AF67587AF61282A1222211F8CE776FC0B2C4D2D4A0B53B42C208A2575652585340E3D41A96CC18CEFCB135CC18D74858CE91DCA29C43612F624B766D3932ED2440BF03E078B771D039D0950A3AA787D5B414F94E33DDAFDF81B3ED5E8AB22DAAC273290CB78134F834C9D9502AF05695B6ABB5CD6885741A23197AFE1709D62E21AB950F9C78EFE0D8FEAFFD8AD764539E4DAAAA7230354866358E754469E98992D6FCA4D5208AF0097E0F04E57E06964A3277E91F35C727833E831237542287D7BD5761AD6A1058656ABBDE1B4A6DE1904DC4E96D3B869D8CA92A359AD5694B38ACDB75888AF20AAEBAF83CE5AB91D3A8CBE7E45232C233BBA247B757E082B68A7A5557FB8013DDE066E160401E0CD8B934EE0110F6D41A9E2C4F280E45634868808075CE885F65200AEF2CCE7432A66E8198206552D40F6DA0BDA59BD58FDDC7F891C35975C507F1899E3915C54AA739FBACA9DC7CF37DECD8B687211541AEFDE0FB18515644221E276AD974C5037CF7C737B36CF1428AF20368568CF2E220A5857E0C9F1F7FB0903BEEBA8FCEAE3E0A8B4B983F7F11C54525D87692EEEE4E9E7FF6691A473770D1C5CB08040CE251D14827F005E4130D28A0178F1A491117B9A93B01EF5E33D96C4A9987398E4FA5BDB4B6B6128BF6306CF870340162DBC7CE6DBBB0ED4222318D871F5CCDC1D66E923E8364186A678FA3B22CC888F2009F7ADF124E1D5FAB125BA498E94F6DC95A68E2C4A70A8613A740FF56E67192E2780F511CEE352A90E0B6A6E4BF0405E63EBA36DE02BB1FA1D83EEE4AB3FA1506B9A053EFFA567A3A71AD135587546FD27CD230B5223A8C51D45E743DA1AAF9D85AE94042CA3B1A9BFA5F82684FC524F4844808D30E74C52C5A7B62F424320A98B3BE806A7689078932B437452521010402B81E8DA48EB31BAEAA16728F6376E5E45E95AC067DE43AF4F4CA62542496A022518BC7881C6F259B88AA749A287EF6752458BBEB08CBCE5CC41993C7E0F36998390B6DA9A6857356C646EE02E1D234AEF4CF75EE76FDBAD527FF8669C1C1003D584637902538A0D4C839D30D501CB946A10BD0EA6B10408B31942F954290B0A6B48853E69DCDD7BEFD73CAF3D2CC9B3585C29AB13CB3FA15BADA3AF139112E5A319755179E453CDAC7638FBEC2D0B2022E5D320F279BA03B1927619472DB432FF0E273EB28C82B5234DB84D1435879F6744A450B8D8EA985D9B879177BF6EE53116CE984495FA49BAAAA122EBC601923870F514A112938FAFA823CFCE8E3BCB271355FF8EC27282F2E508D56E5E6E713D7141F8984A86E6C8201D1A6BBB6B8CAD50FE8EAEA63DB8E5DD40DAB6368553921F15371CAD9BEA39D5BFFFC38CD873BC91859FA020E0CAD64E4B4C9CA64EC9CC961BEFD890B944DAF7C29CAA3BF79983B67DC51FDFE26E11B54762739E8BF8313EFC60A5A0184679AA38A2A3B41616627DD1BFE0CFB9EA030DBE12A0CFE06A0DD080EA90E05A0FD591F8E9EC552006D90A15855D075B750A75B000020004944415402D0D50B71907467CF95E7DD02D0A2A515C37BC15543239985A35D195ABA63A41CD117FBDC705751AD880C4EB9D6B9CE80AE75A75B050B4088C6593A746E2A8A0C28B8EA17A579559C74CE074DA05350D6D52CCBA52823D19600745B0B762A8634D77A2C1FAF35777030A671F9F92B682C0D2ABF63D719C5FD5276DCAA60769406DA909173CF785F0D09AA2661CEA9CE95D6BD19C5D12F97F340DC6D0A0E8C74E778E7C14DC21CFF9CABA07326FC69510B59690A627D94FB1C4E9D3985D2BA195C7ACDD7F9EA672E65DEAC466E7D6413B7DDF3143E3D48301BC56FB6F2A5CF7D843973C672FD377EC390F2123E7BD5395496848825E2F4983A4DED511E7D740DBBF71CA5B3334A5158E3A2E5D35876E6A94A9E97D583F8F30A48C423B41F3F4E229AC11F08505553C18886A1F8A4076099D8599D74BA88BD4D0769397E8059D3475310101E3D1F4D2BA1B527C9B36BD6B365EB2E8A0BFC2C593883E9931A4927234A0D65DA1ACFBFB885DB6EBF8DF3562C62D992A5D8199D071F5EC78B2FEDA4B35D926E7C64C51A36A8110D81BF6E1863664EA631BF85EF7CE6328696172B973C15AB25BB2875EA886CD0FD64D580518E06C9518639F039C941BFC7386875250B372A9202018B3885C96DF46CBC19A7E969F205A04FB8E5C2E6DDE879693C8922C16FF914E86475011E83B4534CB76F24B5177C8950CD99A0150EF858FE6F0174EE243E61FE64506EA0D790515B5805BA6EF28980DEB11E93239D11A5C1CDFA826A4C5BAA63194D968EBF4BAF7B23CEB225963D89B2729572D5258844979BAB886CCD52BCBD3405D58656A6343D4F6ED57A546A18572A67CAE45D2C42F7D143AEB5A899E55842E3D5BDC7C81B3A924B57CCA752137090D2CBF5E996B7E8D5EADEE7EB01B4E656F9396E5AC5550DAAA007AB36DE4CEB9C73A87384BA70C44BC36D0CBAEE759286221E1B6E1A8AF2DA90C5459CEC94B42E8399B5F0A512CCA828E4B40963282B0CD2962CE5EA2FFC9CF3168FE7FCF31671FB635B7962F516C5EB868961C48F316DE230FEEB7B5FE3AF6BD773CF5D0FF0F58F5DC0A8BA72A2B198CBC7A71DA2C93C1E7E6C1D2FAFDF4A4D4501575FB280699346299FECA2F26AD25616BF9EC2A76531B4009AE1C7080609E7FBD0B48C6A3E66D21ACF3CB385C71E7F8A050B6671E6C2E9E407D2384E05878FA6F9E2377F446B67125DF3E193F9804C3B0B4E9FC897BFF011C5B1A38538DE65B375EB16B0BB3965E61CEC6C881FFCD74D6CDC7800B40282FEB0AA8E934E86B8CF265150882FA031715625531A4BF9E0AA73983D6E0441595815FDE8711EDE94A1A2139513577F6B68D0DF4F521CEF298A438D978A524140C49061930405E92D74AFFF3DD9FDCF52E0443C7317F792578A8341E3A86A4BEEE8F8C45046AA48DD5292AEA45E4CAFD140ED855F26547906F8CA55C2B41BDBFD16C31FFF7FB118DE36B03FBFB51FA09577A4A2100C5DCC9EDCB053358526FA654D23E5381CE94A73A4BD57191159BA441E4913CEA794086A7BAF820E5C7EDA7D0E19FE70E52A03EF74F07B76C924CF16D0631B733245A96A5DA6514808791C2BAB61F676D0D7D2A45245E296CEFE989F4D4D47A86F18C105CBE613F6526772D89B03E99CC78300BEF84EE42A6AB5A078AE74AA09E90D960C00B45B25BB16A2EED049FF7D241350864F1C87A424B54B97CCD63C573A990C4CABA82B5131C43226697987D924A4E3643332CA9DE0EC710DCC6A6CC0F0D944B41A2EBFEEFB7CF75B1F65F2C4A1FCE1CECDDC7AEF33383E87A016C3891EE5F31FF920A7CE98C4F5DFFF394545797CFEAA73A8A908D319E92693D549993E7A5345DCFDE06AD66FDCC899A74EE783AB16515098879E17E2AEBB1FA3A1610C93C655535116242C61BC869821F97869DDB3883A6ED1C28558593FAF6D6EE5FBDFFB21F535613EFFB98F5055954FD22CA2F958828F5CF73DD299A02A688286493A7E9C49934AF8F9CFBF8C93CE609BE25C57823F14249DEA22954AA8C5BAABD562DBE6A3AC7E711B7B7637BB610CBA4E1A83B46613372C02A3CB193F671C4B1BEBF8F00567505F1E941943C549AB0D8FD73650C64B3980F63CAF06C0FA2440BF8700DAD3F3CAF08902319178A528486DA27BE31FB0F63F47BEDDABF854B7352140E472966EE4B7465655893A862DBFEB1AB88BA42CA117D0633450B7EA2B842A1680AF6CA082FE9F0668D9B97B3AD25C91EC1A01E5161D97475741209EE7B254CDD1ACCDA1CE34ADDD7DCAECC83482646C5D5576725FC9DE535B7DA16EBC14B07EBDF83B788FAE84D1F361106F0E6586EF20FD34ABF73891634D4A6217B77DEC8DFAD97AB085C6B1A358B9F454FC59D14F7B01089E1263708925E0AAD828AF999703E537AB98079A8239D3A381041475FFACA4749B6A872169302A815B1D0B71A54B2B109695409A6669C7212E9C7326862F1DC3679B8C282F627E633D434AF209847C50349A8BAEF91605451A73E7CEA0AC6C044F3DBB06534B2927BC99931B59B1641E99581777DCF35746D557B26AE11CFC8649D44CD017873DFB8FD376BC878CA5D3D51BA7303FCCECC9E329280871A4E50877DFFD80CA61ACAECEE7DC658B386DEE294A237DEB1D0F535B57C1B4A9A3691856455E30C881C3311EB8EF118655E7B364F13CF28B7C64EC3C8EB425F9CE7FDECC91A311AC7452D12221BFC5D2A593B8FA83E7A09B593427C0C1C37D3CBB7A3545A53E16CC5F882DA3F89D322350C04B2FEFE4B6DBEFC5670495ADAA889F85EEC80675E29561EAE7CF645481CEFB168EE782534751120E2959A6E0B1E7AEE0D21E39DF7435DA3BB89A3E09D0EF21807605F06256E357DECDD29848939FDC4CEF6B7FC46A7A96FC6CB70BDEEAE6F2A7AA32F4CA51F17950196D22B4F79678F14A48E87974FA46517FE1D708952F04A3C8739AF720F27F526E37F81CEE97CEB92F402925D47B1FD09F8A4A236E6539D411A7332E2E6B22999346A04E322395A39BE23C78FACE3564F7005E2D68FF8D5D82A71557002D7234CBC1EA6BA7F7E87E65331ACFEA34C57D6C3D789C118D8D9C7FF669E42BAFEE81F7947B6FB94F4E01B4F77E73AF3B5711E7C0FAC4C6608E677E938057A98EEDB43A5F2CA17C646B6F5B988EA58CF71D53C26BC5A81F526686949321944C114A25183FAA9669E3865311CA5218D2F0F975B2C15A9E5B7F90DFDD76177A28C89CC9E358BC600A631AEB58F3521343860CE19BDFFE291D5D6DCC9F3E9C7FBDE67D14EA3E92C918D17482E6E349FE78C723FCCB454BB970C559F4260C7E76C36D3CF8E8B3EE708B93E0473FFA2E81B0CE8B6B5E5640FDBE4B2E61FD6BBBF8C14FFEC084898D545584993B71288B4F9B816987D8B37B3F9DED6DCC9A358170817B686DCD4F774F80752F6F65DB8ECDCA877AFE69B31937A606B27DD8A65C0979ACDFD0CC2DB7DFCAC2B366B164F1B9BCB67E3F3FFDC52D2492BAA279344906A7C0EB4F487A3958864677180A46D6316AFC28EAF3227CFB03673075ACA841026A91367CD2CCF70A8B7E25D04980FEA737DEEFC626A1CA04F4005A2E58BF66124E6EA17BE39FC8363D4DA1DD8978BAA80B5E350B5D10C881B60BD05E3E9BF2EA70D51C02D0EDBE46EA577D9DBCB2F9E02B72A757073CECFFE9E3FAFFFC8EB966E520BDA97811AB800107650B7AB83BCEF1484A4DB3D9BA4F558AA2D4C8588EE25D5D08CEB5D9739CAF7BB1B87EBF6FFF96ABE995EF894773A8CA54B8DC68175D87F62A1F8EA40547537E36371FA7B47624975DB8884245310D786A0C501C5E55ED5987E67865B5DC7A137FB9BF0FF6DB707FE64652B97CB248E75CB056F155880B9D848A18AA8296DCC1AC935615B4701AB62C2A599BB499568648464A23D39DA2B6BA8C8A7C8D398D654C1859AD3C928D50094EB08027D76DE1DEC75FE460D37EA64D9E4255D5505E7CEE451A868D645FD37EE5A571E992A99C75EA644A8A8BD502B1FBC0019A5B7A79F4AF2FF2F10FAC64E69471F4A5FDDCFBC8733CF5FCABA4A3BD8CA9ADE0DA4F7C944426C5732F6D61DF81A3CC9B339F75AF6EE3C5759B948706768C1923C3FCE05B9FA1B2AA8E5B6FBB877BEF7984FFFCFEF54C9A56A71254C4CDD1CEE62BA04E585155DCF80C836C26A180D3B103D8593F7D9134070F3751581EA4A262044F3CF22ABFB8E14E6C2D9F3C7F005B16FCAC7C5E5975BD291ACBD18905FD644B0BA9993189116569BE7DC56C4E9BD6882153859E4582D2B17B834C2E7DF5068EE36493F0AD2FBC772740EB6ACB2AE3B3E23816D44CF2323BE97CEDCF387B1FA328DBAE74BD392F871C8FEB02B4A39CD272491FC28B29A37EB224F502DA7D6319B6EA6BE4959D06FE925C10B80B5EFF531574FF93BD490485F7A6541F4F5E90A19171E0585F8AFDC7E364F0A97C4551C3A66D9B9497C7E8CEDD7A9619B9AAB4DF78DD8B337A07EFCFADC0DD1415F7657B8E471E40B71DD84D369D2065DA74640CB61DE9C62C18C295979E4B95CFED0178DB82FEDD41AE9276290E91DDB9809BAB9ADFBA29E84EFF0D36DFCF8D744BD3CF724C6534A2653405D0AA594A0ACB4A6167249DDB51064096A23D52A4620607761F279534C9B3135CBD6C32172F3F955010457304C301D24601DB0FB6F2F033EB7975C31EE27D69F44C9AE195A58C1D3B9219D3C631764890EA623F43EA6B55CF64E79E265ADBBB49A52DC637D653901F226507E9E88ED2D6D14932DA47797E88E2E20AE2498B7B9E58CBE3CFBC4A3858A6A472F14C1A5BE9FC939C3EA992AF7EE6838C1933868DAFEDE2873FBC914F7EFA439C72EA68D72F2463A365A53360933112AAD7629AAE4247A818CB0AB16DEB4E8EB71E64E6EC69840AF294F2E3C8E1240F3CF23CAB5FDC40BC2FEED1588E4A7A4116345BC3CC68A4FD61E2A13005931A193BA6908F9DD3C8050BA652289FADAA05723B33E905E514436F48BC3F09D0EF258096C905C9BF130324A9006430D624CF3948D7A6DBB1B7DF4B9175CC1DBC908B5B55D1EEFBCF01B42811543A87787A788D2D0196B4E8A07D63A93DEF0B846A17E218A5EE98713FF8BCFD0AF31DFDC69B01747F19EF5A36BB0A424735B38E44121C6C8F92248CA5FBB11C8DA4659112D31FF1B850F239B7F9D7DFEE54032CDE77BC71DD77F25A07784677AC5C8E970CB618421FC47A39D6B41B539CECD2197AD2364DD2BCCCE4B37CC942668C1CAA8650946AA49F8376FF2E3CF689B446EEFB03432A39F0CD796C28537D4F4A974B43C9C9ED54EA8980BC652BDE55D40B12086B3919321E072D715722B1CBA41284823EE64D9BCBEBAF6CA6A074183B36BFCE9C5121AEBE7439A5D2C4336CC2613F7E5FBE5A240F77C53878B88B743C839D49139608B6821021493FE9EB20A45BD40EABA7ACB28264C6229932559357334471234BAD9FB4254E7E594509998918564ABCA635F6B5F62A995CDBB14E1A468CA1ACA29AF55B36132A0A73DD07CE62484935056103C3D0D9B7FF20CD873A7975E326B46C2F4B17CE63FEECD3D1758B94D64342C43B7A899A2854FE33699D3B6EBB1DBF9E60D5AA55048225ACDF7880632D29CC6C8635EBD69048F672F6D96711EB8B52595E467B6B1B8EA531715C233FBDE13E9A3A12A4CB8A193D652873675572EDAA3399595BA58E9134166528462DE32AB9E86405FDB6AEB3775F052DD3656ECDAB3C21C4B8C631091BAD746DB98BECE6DB28CA34BB6A82DCFCA097FE90334D52CA05250893555E09CF14179DA1881E7D14D54B3F4970F472B27A19AA8D98F31A785B47F6BF71E7C1003DA872EF77F5746D2F046B684964D87EF438195DC0390FC717A4570C73A429E6F793364D34C350A3F1025E224B55CA54C5BDEB8A977627CDC4B5EFED6F13C4DB43805E4DFB791A10C3B1F13B2666BC8F634DFB49F6752BABD144264B5BCA60737B96F18D63B864F9FCFE2941B7BA1FA8A67300AD36C7FD46FC83951B83AC41BD2414E53A37C8F428378CE2DA853A642DB777A1A2ABCC8C3B88E2D8A42D99144C61CBC460C6C44C2409683AD75C7201A5411F3B0E7670CB6D7770EEC2C95C7EFED9E40947ECF711CA0B103634C5E3264D8B442A8D9996E93D937822463223F48989158DA2654D468C184E79551581FC30D9AC3B651749D81CEF4AD2D212A1B7B78F82223FE5250594E487C8AAA9C4940A37E88E88656B127FA090AC96C7C34FBDC8AB5B76316BE2689C74925933C770EE390B08E70558BD7A0BBFF8D55FD8B36B1D975DBA9C2F7DFA73ECDDBD9FC2CA2C43EB46B16F7F947BEEB983DADA522E5871016D2DC7308C143555C3D8B7A7835FFEEA7676ED6B65C890022EBEF46CF24B83CC983E55B299C9A43314E4E7535926BED4016EF8FD93B4C735EE7F760DD9323F23A657F3C1A5A7F0D125B394939F8ACC92068FAA877274DA1B50E76405FDDEAAA095E85D49672D358AEDCB6694595274CFC3645EBB89C2C43E3580AC00DA1B353DD193437869A1085C1DB43B05274A8742E25A2DE5A77E00FF8CABB08C6A2476A95F26F1DFC0DCB7F5AB83005A55F039ED8607AEEA9C5761AB36EBF6B6D0858F80C451593A19CD473C6592CA98AEBE58B9C1B94E73B99101979217EE3D5753CB5B1C641BF9365EACEB692280EFCE1F8A9E5C005AB79238E914479BF69110595922462299A0C70AB0B34757314F9FBCE64A9783CEBA76B0B9B82AA96495E84645669D08D0AEB1FEC014616E8C3B07CEB9AA7A7005ADAA68F1D73025BE4A4CF64D358E2DCF9D16B99B74B3EC145933A552E0DB5BBB38DC748C2975F9FCF89B9F62D3CEBDDC7ECF838C1D3F990F5D711E0DE5F94A977DBC3BCEE8BA7C65DC9F882548A633C4249B309B211AE9C0AF4994551A3393A6B4B488EA9A72FCE1207A5E18C70870A035C34F7E7E077BF61D56EE73A6E9E0F365185A5DC4D8861AAEF9E08594E443261A57FED3924C93CE06491BA57CFEEB3FE570BB896EC7F1D1CB84F1057CFDFA8F3165C218FC4690FDFB62DC7DDFBD949695515A388C5FFCE2279CBB723AD75D7B2D4F3CB28D6F7FFBAB2C5E329B4F7DFC63D40EAD226926719C3CB66C3CC48F7F7223475B3BC90BA6F8DCE73E4EE384C9BCB07A0D1B5FDE4055553923470F23954A72C1CAF3A96F28E72FF76FE0DF7E70230989CD5A3889331B2BF9CE07CEA7BC584CFD7376D1E2C3EE35E7DF48A59D04E8F716402B3582022D4B511412C713327A49343F4DEAD51BC8EFDBEA02B4023AB775956B81293DA6CBDEBA89D16A0B269D23A102C2649C320AC7AFC07FE697B07C43DD440FA5157AA378F36DA0D8DBBD6BAEC0F0140E8AAAC9A92D943E57027335B635F7B0AF3B865D54A6A44F028EB1B4AD8642644BAF5EB37283736586398076E5CCEEB04E6E864F384A2F1AE56DBD5AF5A80AA05D499C50474271C8A28999A6E55033D1AE76E50B9D4E448966FD34457DF425D37CF173D76299F2129596CEA3AD64D433EB9A1529DED99D6E5421C1F2E555C8B931EF9C87864B65B8E3D9FDB6A1DEF4A0026BE5A5E1FA6A88ED67D67413B92D4B5395B565C655E0AB480F6A4AABD8B6711B99EE66AEFBD02AC64F9A406B5794475ED88EDFF073EEA2796CDABC8DE7D7BECC9253C773FE59731956554A5F3C4D9715C04C25D1D351F20C8D800C45D9168585F9F8F2FC98BE10514DE7D935FBF8CB7D4FB363EB66828120A140B9A23CB2768A78AC17C7CE30765C1D179D7F1673C78F25288B4726419A20FBDBD35CFF6F376269D5E8768C803FCAC24563F8C4B597525F5D8E95C82A8B517C3E3A7B12DCFFC0F36C78ED55268C2BE5B28B2FA1696737FBF6EFE0E24BCE513B47D3B2954F8BF86C63FAB8F1C65B18565F475EC0A161442D3B77EDE67737FE815020CC87AEF90079F93ADFFBDEF718366C18D75D772D5902DC7ACF736CEF49503A7B12638A2DBE7AC999CC9A3882406E53A668C5DCB9F28686F449807E6F01B46B7224A025D48444576509F91264DBD6115FF73342DDEBC5C9C07BD3FD75A3E70F2DDA4E77B2D0ADFE5C347401D0876387312BE6527AF1CF7142C3D16D89C792A686F068EF44E7F0B6F0CEBDF30900EDEE02721AFF9CDA42EC6E1E78612B05B523C904F2D5B45B329D266EBA2E652E6A7A69318A3A18308C722B680168B78276771AEF0CA0DDC003E1C4DDB228E73EE7B74DE552D7D57E9C9EB6A3C47B3A48F6762A3FE8CE6C1E5D098B25CB97336EEC28CC8CEBF721120B792C51802812CB9B2E14A0CE8DA0BFD1A16EB001923B1538A0DC109ED91D5C9166988C45BB433A32BA2D89DCE2D627064822934F24536066280BF9B9EEFD2B189A57426B6F8ACD3B772843FD8AEAE1DCF2F8165EDE7A809838C2193EE5A459CA11AE5831932B579E43C6F6F3C46BCDDC7CE31F9935BA81F75DB2989A21418A744729219C4021EDA69F7FF9D22F696B39CA9CA98DD45705F8E4C7AE60DF9E6692C90CA15098DAFA917CF747BFA32B9E66D79E7DD486E19A4B5670D6693349581611025CF7D9FF24952E269B89535692C7E98B6633766C232F3CBD86F623DBF9E435E7B372E512E2A92C896C0ADDF0E31720CC485ABA414A1A887E1D2B13E4AE7B9EE597BFBB93704119634637D0DEBA9FE9531BB8F4E22B79E0BEFB292A345975D14A74239F583CC2D0A165E83E1FC7DB3B185A55AD4C98D66F69E2DB3FBF1DBB710A2387F858DA58C4C72E5B4E5E3F40BBA7766E706540067BD20FFAEF22C4BB8D8356622E4FFD2E13802A27CDCA12F2A731225BE97DE10704DBD76290F200D9032B714793B342840F52452B3ACC8B53121ED65BC5C5C92B121847F595BF472F1AE702872E668DFF0B00DD2F1F75F5CAB96EA7D4C3C7226976B444C8F80B9501BE349AFA120992968323EE74B23BF01A83DEA5E111252E90E6DCE9E44FE190D59CE0DF4DF67CF3D328B760B82FCF759C930550F968E0108F44E83C769848FB3152BDEDC4E34962B69F1ECBC05F5AC3CAF357120A045D532A014C99F8935C429564E27A6E64A582F62608DF1CA05D10FE9BC6A0F2A9C82A5A4380D9925C41CB54CDE5BE78CC0D631025432A43527CAA23BD445A9AF9F6751FE1D45175ECED4AF183DFFD9931430B59BA6439EB9B4C1E78F6359A3B7A557C6D36D14B55A88D65F346317DF4280A4B87F2D496C33CFBF40BD8D12833265573C5856730B9A19670208F24A5DCFDF46BDCFCD82B983D87F9DCD52B993DA39EA99347BB3981B259B31D3A7A2C5EDF7E80B59B8F72CB5F1E259F24CBCF98CEC7AF5AA17CCED37A80C79E5A474F440293431C3ADCC62B5B7628DA2493B2D0D287F9CAA7CEE7739FBC8AEECE084FBDF012D535358C6C1881960DF0EABAADECDCBD892BAEBA84C2FC52FEF29797F9D98D7792C91A989938F5B541BEF8B9AB0887AAF9F10F7F4659718AAF7FED7AB66C3BCA5F9F7A94B397CF5580ED0BE86C7D6D3BA9648A8AA175FCEE914D6C89852836224C2849F09DCFBE9FB0DA050E4219AFD838A1DD71B2827EEF54D00AA0D5EE5D00571236848376084A68ACD944F733FF81FFE8D3F8901AD36B4A78DA6195482C35A39D33867727EAA4EA934942F999DFD6E8D1865379EEF730462C00A90174C9257C8334E81D14C66FE757FA4F6BB5A6E4E81AD7063469C30B9B0EE02FAF511573560F90B42D7A1349326AF1F20D18D3A8EAD6F5B1E81FD576EB677578BCFAD703E8B7F30ABD625F19E9BB5590323A5295B9ADC0598E583A9120DAD946F7B166E21DC74844234AC5205440BB5DC882458B983A69BC02521945D604A45DA4EA0768A1360464D59F9E8FF3008D3110F63A58D5E102B2EBAF2155B6F86BC856DE110E3B230A051B53D684545AC9CDC41BBBB5E518913601E80F73CE8C096C3E1AE523D7FF3B2B4E1FCF79CB97B3767B1F8F3FFF1A6DDD510A833A85019B9240371FB9E25CCC4894BCC222761F4F71E7BD8F515A5A414FF366AEBDE21CCE5E700A863FCCF64316BFBAF92E7C8545CC1B3384499506975CB94CEDF5A4C1188B27C8F3870804426A57F39B5B5673B82BC58EEDBB290A5AFCEB875650535EA0169B8448021D3F66A680D7B71CE267BFBF17530FC8765201F4673FBA820F5D7A36E9BE287BF7EF2365690C1F399C9E9E20DFFED66F693EBC996B3E7C01CB972C61D3E6766EB8F9018EB5F529280DFABAB8FE2B575114AEE5A73FFA258DA3CAB8EEDAEB78E8C197B9EB9E5B5879E13CBEFE8DCFD3D39BE43FBEFD6FAC5C7936734E9FCB1DABF7F3D8CE5E8A02716AFC1DFCE2FA6BC857BE292E3DE8328E6E21E09E7F1E709F04E8F71640ABEA4F970C414B8D74FB6C8DA05FA2855AE8FAEB37F1373FAA2A68D7AE32A75A106B4D57D9A1D9E27FACE17724C9C3C2D26D2CC56BEBF81C9D3E6A30265E49F9FC0F8151E301F4FF10BD91FBA84E4068D78F53D232329AC68E633D6CDC75989A8631CA6323AB19F4A6D3F42492388670D1AEE6598E536E3AB0BF2FA32E86C1DDF41C3FEF2928DE2646BB8A901C40BB1ECE4A61A3ACFCC1CE64B0E25122C78F70FCE06EA29DAD6AE4B8CBC9E760329FCAEA6AE6CC9AC9E89123F12B125B3C323C8016A016DA44F1D16F04E8816194011AE3443BD15C9495FC5CC9EAC494DF74A9974432AD067CC4DFB9A2B080A91347E37362649311CE98750AE5A152F6B444F8F16FFFC0A253C63363FA0C1E7A692FDBF71E24E4877C43E39C33E7D1D37E94C963EB49C59314951472A0B58BBE680CEC20CD3B3772CEA2390CA92E2792D6B97BF57E9E78E6392E3A6F3E2B17CCA4BE5027934D2A00AD1F3192FCA202DA3BBA39B4BF995367CD23A9FB38DC19E789E737F1DAC657593E6F02CBCE984D50CF12CD686CDBDFC2EE7DADEC3ED8CE4B9B0E621B214535F9ED18E3469431736C31EFBF782113C68DA3AB27C1D36B36F3E4737B58F7EA1ECCF4314E9956C3973FFD69F2F30A79F695FDDCFE97676939729C505E1F975FBE80D9D34E61EDF36B31748759D36788350A478E363379CA68A64D1FAFBC4B1E7FF219A6CF9846417131BFBA672DAB9B7B69A82FA2C06CE1F7DFFC3805EA20BBDCB314489EF0D51B56C94D819D1CF57ECBCBEEDD487128805695AF709632B2AD13F44B15DD4ED7935FC37FE0217C4ECA7366F36A446930E92EA521002DD4886CC31D4905D12D35DC2106E6866390D0CAE92898CCD8CBFF0D429394DBD789B741DBB69CC462F01DDEEC7B6F13F83C0C75AB0D1596EAAA4E62683CF4D276D27A98CAAA21D89A0F4B37E84AA48848669DD0031E8521CDD49C694D2EB72B4765B84D427951B9E6A7C7A7BCCDD7E94682B9F1532E55E23582727593806C3A41A6AF8BA37BB7D379F400D9780FDD561E87D3F9D892805D51C1E285F3195653832D2E7B8A8F769B86A26291F470C5430B972C15B0D248CB48B92BAB53E0AD425EBD6414F1A296AA5938683545282929194C69022A999D4D3A2546F6599C9449757E3E172D9DCECC89C3C8CF0FB1F1B5BD341F35195253C9BEBDDB691C358AF64882A736ECC21FD0593C6F029505851CDE7F80C307F6337BE61402C19032A2DAB36F174B172F24CF2FEA8E0441BF4E7B6F1FCDDD16BF7E7003BB766EE1F31F5ACE9279D328CDD359BBE66562B13ECE5ABA08573AA0E800002000494441545F20AC5259FE72EB7DCC9C3899B90BE6D1D213E7998DFB79E0C1C7185B5DC4C72EBF90B2904677D2E007BFBA956D7B7651337C141D7138DAD243400F61C8F14927185ED9CB6F7EFA59C68D1EABCE931FFCE27E6EBEEB79B71849B5F2B3EF7D9E65F367AAE3F1EACE5E7EF8937BD8B5A38960304E4343884F7DEC1A029AC65D773F42A4B793CB2E3D9BD9B3E7B2FED5ADECD9B39DD9B327523F6A0CBACFCF137FDDC073DB9BD96F6A4C9A584BD86CE3F7DFF8288503C1468A62544BB8D2BDCB797712A0FFE1E5F66E0468A97E95304CF913BB9CB45435617F275D8F7F9950D343184E4A350065E4598656048C5D80168A43C4795EE8AC12CFABE02CC533CB63A709D3EBAB60D8B95F82FA5540614EECE01D4F39EB3C899A3A809E119387DBDEFAF10F8FFD3FBC43FF63BBCF27A2C243BD69EE7B7E33C31B27A88B3F6B48328A41772C49426C321547EF6E28DDCFD63332EA7FB2BFD138793FC93511FFE1ABFA9B3BE4F2E87291B1EE73BA5A754577D8199C648CD6037B38BA6F27C9EEE398B69FAE984D440F6105F3396DCE6CE69E32CB4DD496AA59F4DB8AF2D0DC316D098CD5DC493FF115513ED58A53F6F204C5465452B8BD3C4191CB09285B02E08EED26A364A4312863E81699741C9C34C908647A632C9D378CABDE77364EA888EBBFF13376EEEA66CAD8323EFEA10B4839856A0CFB8535EB195957C927AE5E456551315B5FDF22BE6E4C993C96A28222C56D63A508E587157D52921FA6B3ED38C7BAD21C8DFAF9CD23AF7260CF362E9C5BCF47DE7F21050178FCE917193AAC8EE953C770ACB59B516387F3C8438FE3CB9ABCEF8ACBD97B28C2CF6F7998B5EBD6B3686A03D77DE0122A0B4274C61DAEFF8F9F3067D6582E7EDF0AF61EEEE5A65B9FE6F5CD7BC8A652F8CC04679C52C37F7DF7D354561663393EB6EDEE664F530BD1588458771B1FBEEA527C5A5251622F6C38CE0F7F7E1F4D078E1334A22C5F3C990BCF3D9B90E1E795F59BB9FD8E5BB8E0C233B9ECF22BF9F4BF7E8D834D7B983F7F2ED77EE63A7C01876F7EE316D6EE3840DEB871CC3F633205561BBFFCEA0728567D901C95E15E36AA5EEE17F59F6C12FEDD2BEEDD09D0CA6FD4F57256D3821A797E8D7C5F27DD4F7E8D60D303F8EC840268F14096F69E4F7C178483D6DC8A5BAE25D3F02C3295D6D90B45557ECA3ECC4021C5D3DF0FA77C16F4AAFE6D9A7B300701B4C7ABB9BABFDC14C87F732CDCFB50DC0119F7B1646149A2B1714F2B2FEF69A371E22464A0DBD4FCC46C8DEE5882B4C8EFD4E0C83B9104BE11B8FF79A0EEA739BC5F714D7A5C8096869F6E9B689924DD2D87683BB08FEE96C3247A234A23DC91358819794C9C3A83C54B96E0377C4A37ACDEB770C6968D6688565974BAAE9A43260265F044388AAC786A781E1C02C2E2AF211C764EB1A18CF995BB9E9822995E08AC501E09CC541FA36A2790272DBFF83EAEFE9795EC3BD2CDCF7E793BC1D010962F9DC5FCD3A7703C11E495F5DB30DB3B9832A68EC69195AC7EF209E6CE98496145A98A762A292C252CE7A09E22ABD9A4C487423208A3497A1206BB5A92DCF8F0CBECDEF61A3FFDCAD54C6B1C4A81DFE2999736D2118973F9A52B292AF2D31733B9E1D7BF62FEE9B33965DE4225097C65472737FDE9018617A6B8F6AA8B28090768EF4BF3B3DFDCC4072E5DCAE233E712B761DB9E2E7E73E3BD98C904F3E74EE7D4D98D8C1E518EE5887DA82C9A85AA303184D2936C45274B262BAF37C0D32FEEE3BB3FBC8D9EBE2CF9FE34238706F139167535B5ACBAF8729A9A9B30B30986D60EE7F9351B983C713CA79D36033DA4F1D2BA26D6BCB089475EDA807F54030B4E9B44195DFCEC6B9753A442997329EC5ECAB78A311B747E9DE4A0DFFA627BB702B47220D62D55A9398E501C1AE14037C9B53FC4DA76273E2BA2B206A57A1280164AC36D040A67ED72B496D8D9E546BDBD2168496A117031F520DD053318B6EC1B1835D3A47582A389AAD3AB4B073302B94A57191AE538DD7F1EE0DEF49E2A4FD01BE0D0746593D967693CBA66133DD93C468C6E44B3D30AA07BD259BA62094C2FB2CA73D87F072FE09DF1EC6A247B90D9D260F9A25034BA9D25A8D9641311621D6DB41F3944FBE183741E3BA4AC5023199D68A09CBAC6899C79C65CAA2BCAC824530444126DA5D5FB121F67D12E2B3F684F232DDF5334869545135A43650B4AD52C15B7A7DC302D457FC8EF5AA9A45AA0E322B54BA458BC603E13EBEB70A21DCC9B3512BF6EE33334749F467BB7C3A148922F7CE7F71C688991EFF331A930C555172F533F7F7DEDB35CB1F21C3A7DE53CBC760B4FFDF505268D1ACA973EBC92C63175DC74EBCD541797B364C1220E1E6D2762867872C361563FF70CA38704F8F4872E665879087FB890DE588A17D7AEA7B5F52813C7D6B36CE962CACB0A88A4B36CDEDDCBBFFFE076FA7ADAF9F247CFE1CCB91355959EB275D28E8F3CC76448651976D0A746B3240650826085C697516ECB14B37F3936421B895A4657B40FA44867FA300262472B81088544123A8F3FBD8E87EEBF93A50B6773E6A2D3A81F3E4C8D8EB7B476505454C4A64DBB993DF7747EF2D31B28ABA862FCC4E9FCFCE7BFC1D08324F3F2088EAAE7CCF95328A68BEF7FEE52CA0CB105F6288DC1A1172701FA9FBB3EDF8D00ED6E8F845396E699F0AC3EFC01080722687BEEA273ED8D049347309C841B082B9E1B1284EA255AFA84E210372E19C9533CB6DB3C14DDB0EB4CEA5207C71841E9DC8F5339F33CE55FE020DD75AF23AD9A7003C7581A204AC3D03FFCF1CF1DFFBF7B2F6F8C505E9BA5416BCCE6DEA7D711AEA853DB62194D9614EECE689AAEB854426E94D5E0DDE3DF7BFC133FFB375221FFFCEBCF1D87DCE3B9BA6A4FBFAD541E620DEB60C84875324A775B2BED87F67160C76B6493195269875E7F19764139E3264D61EEAC59141862A69F560D2AE17615E86771134094878654D22E080BCDA14B828B00B470CFE203225FA624A228830BEC94A97CA9C5A324A91944FBD254550C25D9D6C4F0723FD77DE4FDECDEBC9509C36B19337E383B0FF7F2EBFB5F62C3A104C75A2314692657CEAD519CEDBEC347D8B4E6393E72F985B453CA6D8FBEC8BA75AF337678355FFCE8794C9E349A8EEE2E52BD3D541517D1D5DD4747C4645F7B967B1E7D9A506198913585D496E85CB472053E43C71F2C50F98CF9799E03AB1F7EFBC71768EFCEB267F74ECA0A35BE72ED2AEA6B4A4967D26EA880E510B092549715A90945A5159753DAF093148E45F7ABDD879571DD056537A254A372CD18367E23432A99F6405B869FFC585A8023879A195E5B8526C9296993F64E9B175FDCC4EB1BB7F1DAA6EDCC5F74364F3DBD1AF4003E5FD87D4C4DA3CFB0291C375CA5B514395DFCE7E72EA354F7E60EBC895E654DF6372CDBC926E15B5E6DEF36807659D5018A438CC1257A29E087BC601CAD773D1DCFFE1AA3ED65F2EC1ECF50C95DC18583969B4F19C50B60BB34894093A20664FB2702B1AC68890D7A7CF5A4872D65E4F26B71FC7522C25351B56E6BF2C46D9A3B91E80601FC3FA33ABC825CE46512D3B5FB789C079F5BCFB0518D9457562AAAC5D402B4475374C6D26475BFA242DE78050C70C3EE69700227E87DC71DAD7E67B71301DA6B164A234AA9FBDC400425BB938494AC49261E23D6798CEDAFAE26DED1492696A4D7B449F80AB18BEA9931631673A74C40D7258FD0C227409CC990D5FC98A6C8F0DC0194018096C943A91605A05D6BD18CFA9DB40270CDCA62A765BC3BA55CFEAC503E7B9A24C95A236C479830A29C53268D21DD7E88CBCE3E9D5113C6D01471F8E8B77ECFC16890AC69506027396F52014B4F9B861E0A736CFF5E268E1C86162A645FF351766CDDC3A8865A162D9C4A614198D5CFAFA1A220C094310D2423095A3B22C48D42D6EE6EE5C1B53B683DD6C4D205335971C61C1AAACB48A513F8030686DFA0A0B28A9DCD2DDC7FDFCBBCB8FA1546D5FAB8EAE2455CB56A99FA8C62968FBBEF7F10DDAF33636C2DA386555156568563BB010EB1341C6EEDA6A3B79768CAA4A3234B5F5F82685F4AD1414545614A8BFD9416E894E585292F08535111C417907206023285683924B3267D699BB5AF1EE5D7BFBE9748B7BCC6A0EB16EAA5BFDB59CDD5DCDB199221879289F52C3C7D22F9563BDFFFEC15947853A69EAAD35516F5CBEBBCF3ED24C5F1DEA13806BF1355F3A9B3C520A8003A0DD611929BEEA2EFB53F5260B6E297D46AA9A244A7ABBB2D659FED479393596511BAF97612E523548968A40D6FC823A295931C722A23567D15C73F5A351105DC5CB819E81BBAF5BC0B6FEAE41BFCC3778A7A72A5E5AA50518369B0B1B98B879F7F9DF1932753565EAA9ED5C4A700BA239A51D1566F366C32D8A4DF0568258EFE9B9322D75C7C27303D586EE7EAADDDB46F7758DBE58364ABEB0E09D9908ED2B27F07ADFB7611693D4667573B7D698784BF023DAF9CB3969FC798C6E16856125DA80D69ECD98ED22F3B8A67769DEBC436D4E599B364BC0ABA7F30451A8AE2C121432FE98C38FD6066524C983A994DDB9A884475EA2B020C29D2195651C282999399505F017921BA1C83CFFDF07E9EDF791CCBC923ACA5995F0F0BA78DA27EE810BADA3B301319AA879451377408E1503E3EBF813FAC73A0E900D515352E676E9AC4DABB48C7E238C2A587CA7978C37E5ED9B495DEBE287595E54C18DDC091437B0906FD64B23076F23456AF7D999ED656C60E1BC2E52B4FE182A5A7505E5444C6D6E84CC217BFF255EA87D7F1A96B2EA3B2B080AC3453351F494DE3D1275EE7D127D6B37D77137D7171AD73ED45FD3ED402260D71196DF7E9594AC361C68F1CCA852B66336FCE04259DD32D0DDD32C8180687DAFBF8E12F1E66DB8E367427A0DE93245D5852C438723D48B1239FAF493C68523B671C73678D243FD5C67F7DE64A0A72E7BF9708AF1AFCFDDF3B09D0FFF05A7BD755D0B92EB0C0B29D4BC1736576E180786846A0F3558E3CF4158AD307084A03487C2184AF960A5A260905A065B25099F9BB00AD92BE354379E7FA64D3A7DB44ED7CACCA69549DF579A83C4DF1D0EE4DA88481944397F47893ADDB3F3CFA7FE70EB26FF446B505E864ECE6A5FD1D3CF4FCEB4C9D3E950A694E6990B6754571B4C72C35A8A02EA037A985DD6B62A04C56CA8B4137F5F377B098B894BB50483976DE5BAA14D5E272FEAED5A9DBCD57495B4A556311EF394EF791FDB41FDC4DEBC1BD44BA7B486703C48C62864C9AC7F46953185957852E032752418B4FB348E9BC082B44B592F1680D71A513158780B10CB348FE6046A2ACC4A4DF52F486168B32ACB284154BCF209EB449A6FDD456E551566850140A93E733081A1684F248E84156EF38C42D8F6D65CFB11EA2BD5D4C2D4B73C6C45AE64C18453054CC238FBF48DDD0121A470F537B3AF197CEC8591208535B554F536B372D9D7DE8F128430A82D414FBD5CFE38122B61EE8E0D5ED87D8D9745805C34AFE61C0AF93362DE50217D01D169D329A0B97CCE68C59E3290EFB94CDAC48E452E81C3E7294A28230D545C5325C48467348E8061BF61DE73BDFBB95434D51B5FB0886FC549555D271FC2813C6D5AA0A78E3EB3B104E50F7FBC92452AAA13E6FFA103EFC81F369185643C074F05B1A294DE74877929FFEF651366E3DAC1435AEC45E9AB492D22DE79BE784A86589FA328C5C388579331BC88B1DE5FB9FBA92704E5E9FB3EC7DB353FE6405FD1EAAA0BD982601841C400BB84A4C5C5872DF9D0C5807387CCFBF92DFBB95902511972E400B204BC56D645D80167A433868E50FAD4E3CE1B3655845E0D624E504B00A47E09F742505B3AE06BD143419FB1693254F2EE4910A2EB736484EF40EC0EE44C4F4CA706F34567C9F5FDCDBCEBDCF6D60F69C53282B2EC430644B6AD0DE97A42D6A91D1430AA04F80DE77D6F7737703DE0BFA7B6F2507D0EE40D01BEE290A1BCF4FC32556BC06AB2D1A741B27932419EFA4B3E50087B7BD466BD31ECC7882A44C6F960FA77AD818264F9B455D75397646647102C602D2E229214E6E12FEEA4AE984D21080CEC8308A8C8B4B911E8F819551B983562246A16DB2EC8C39CC1CDF407E300F9F8CC8FB2C35C5EF234F59CBFA7D59F56F2760882B3FFB8F46D8D8D4CEDA751B195DAAB172E12C7C7686B6CE345D7D720E9944221D2AA1243F3F9F8C9565C498A904F387F0E4BACD3CF6EC5AC24E92E92387B0646A03E545214170B2FE42BA6259366EDFCFA1960E62BDDDCA052F100E50515AC8F891F55CB46C0E7515850A4875511C19EE14AD6ABA59A24F92F06FD73637A169BCB4FD08BFB9F379B66FDB8F133331B42465A5797CF05F3EC8FA97D63075D228CACA4AB8F39EFBA819D1C8DE832D1CD87F54A5701784B2CC9C3C92CB2F5ACE9486A104327192AA9518E4916777F2D35FDD8A4F979DA386E1F36388BDAD251ED4AE8DAD2CC6315F86F1CBE63073C2108A12C7F8EE759713CA099E3C35526E80F00457819300FD5E02E81C308A9E59DE971B4E29148798A4BB55E27132DB6EA275CDCD546A11F46C5C81B16A05AAB05897AA90EFB9369B9256EC65FD49DAB78A8D4FBB61AB817292E5A75138EB6AF2879F0646B1AAB4DD7173975F956A5A00DAF5F7C81D6BEF1FEF14A80757D01EC5B1EE4037B73EBE9629D3A753573714BF26CD32E84E981CE9CD907464F118B0ED7451F69F481AF4169B9CDD67FFD93208DCDF0AE7070722BC796C564ED5E2FDE94D370AC888CC2B2B86F9E928D1A34DB4ECD942D7E17D7477F512370DD2814A0AAA47336EFC68268E1FA9405046B5E5D064D31934DB56923C45693836C98C98EF8B7EDA5176A264C401CEB511AD2ACA67E1B4094C19398CB0583167B314E4E5910AF9C9F8FD6006D4B911CA33C80B0BE82508D83A01DD4F141FDD927212D0292D2E24914ED399C872D7435B4998699A0E35515359462CD243C330E1A5AB78E2E59D1CED8AD2934811CA46692C0F70C5C2298C1852AA8689D430ACE123AD3CBDFC4A9F6D047C684183FCA041796188CAE230C1408096B88F275F58C3BE7DDB587CEA0C16CC184749385FA5649BF8E9E8B3B8FBC957B9EFA90D1CEE4C6125FA983F732CE79DB3904C3A4243C3040E371FA5A7E3B8CA65D47D3663C64D2212CFD0D5D64330E0E7A1275E61DF9EED0C29F373F1D2392C3B6DA272DF13DAAC3D1AE0F0B11E74DDC0CAEAB4B5F771EB6D0FD2D39B563604928F298542DC309973D1994CA8CF674C7E8A4FBE6F29C1BF0168D75746EAEF01AAE36493F02D11FA5D4771F4D776B9C10A57B62032BBBC90E79761F780B98383B77F93F2F876027694AC17C5E76EB1A5B1E8E615E6A41839AA4301B8C235D1D442863CFA7CF584C6ADA062CE353879A3D07429B1A47C7123A75C758837BAA27059FE973B33DDE77ADB37D51A175EDC2DCC656BBCB925C60D773FC9887193983CA991806693312DE2598D83DD492557736D51079EF0042AA3BF9A7DB357E3F2C46FF7D69FA892F3F51844759C706E79EA16B54B515ED4367E5D232D5392423325FAE86B3B4467F3768E1FD8474BD341B2FE52924629D5A3473363DE1C8AF30238665A49EAA4692836AA99B418EDBB66496931CBF7941D3816995814D249F44C8A698D0DAC387D06F986F0B1210ACB2B698FC6696A3BCEA13671DCEB52664A62B13561DC08664C1CC1A4115590723FC780213B2B07DBA791F169FCFEA12DFCE9916DC4120952991445C52544BA3A185A14460B97B3E77852D1647636413971E68DAD62E59C911484C33477A58844BA1839BC8621794182B2EBF105F0E7E793F507282A08216E80BE4010CB08F1FB0737F097479FC34C4528F3F7F2A56BCEE6DCB39611F4E7ABB4F40D3B9BF9E67FDDCBD1F6043EF9F893C799D850C8D7BEFE254C1B6EBF6B0D9BB61CA4AF3782EE6408871C6A6BF3F9EEBF7D91F2908FD7361CE27B37DC466B670F5A36495DB1C91F7FF1350CC352693326416CDDAF06C26C0AB028E65737DCCD5F9F5DAFCCFB2DDB51B2BF84CFE4CCCBCE664C95C6E9230A5875E66C022A62C73B135455639315E9A5E2AE4F4E12FEC3EBEDDD06D039731FB78E1ED8CE0B7F9717928C3BC1C604386D245FBD89C4EB372935877825AB0C4BB1B4F44E8C5C432D171AAB7E59A930DCB41619959609AC845688563195A2799FC43F6C31E8794206BA882C5560C06D1AAAE1558571AE7CCFFDCE3B04E813E8054701F4FE1E8B1FFFF9418AEB46336FEE54826A043A8B903807BA527426855377ED43DFD1ED1DB8D9B9A3E3DE02A50278DDF058A56871CB79AFAA973F72E3BD02D2728C25785476206AAF8E26DBEAEEA37437EF61F74B6B88F4A5C81022535CCEB071139934B691B0DF8FA6E47332C221FADE8C4A3191B25ABC375232C22DC72493C49F3531CC344E2CCAE9332673D6E93355EEA02F58CEFAAD5BD9D1B497E663AD6ACB7ED5A597D2D4DCCC9D0F3EC8BC39B349F77631A2AE828F5F7D294165C865A99415A9700F7445B9E22BBF637B5FA51AC397A829CBF12BBDBD9EEA5352353350A4CEC3A096A6CA97E6DCB9E35930A946E9F2FF78EFE3ECDBB38B1143CAF9D465E72B7E3A1B2CA0CF3688581A663C467D7931E5436B48EB7E7E7FFF46EE7DFC058C6C8A52A3836F7D6A258BCE3815B400712DC48BAFEFE0F35FBF5735EDCA43262B16CF64DA84A18C9A3085E75E7A9D1FFDFA3E8C4095B231D0AC34012D856DB6307FCE68BE7CEDC7D53179F8A55DACDDB0837DBB76E3375BB9F3F7DF26E417CD4B064B0D83192A0DDDD28A698FF8B8FD9EBFF2F4731BC90B0425BA9BA4AE93F25B2CBB783163CB1D964F19CAC25326286FF0012F758F5254678214392701FA1F5EA7EF4680CEC9745C55860B06019F4138E82538483828499CE3CFD2FDC067C933DB7074A1354C25DE3FC17F4255D332FA2D278F1A045795825CFCB2A5731C43C502247C15F8275C4EF1CCAB30C223400B7A55B88323DC602EEFAF1FA0DD6DDB9BEA3EFFE1A732700755906B8EA2325A531ABFBAEB290E441C56AE5C4CD8B6C4939D94A3D3DC9BA1A5CF549E0B27D83BBEE1B9DED81C3CE199DE2640E7EAED9CF9522EF1D07D985C6370B009931227BA5A721904143AC290741CD9B3B8C936562689D97D9CA6D75EA6FD5013C958941E3B88AFA48AE1C31A18397C38F94191BEA531B3E24467AABF8B524334CF12F125BCB43C4BAAB793906D32B4B8880573E730A46E28B61EA2B52BCDD34FDECFCA734EA728AF503527A74F9F423295A0F94833132636B271C31E6EB9F34E2EBDE232664C18457571908A50480DA924D0F8D5E33BF9C6EDAF1132B28AE736B57C742388664A3BD76D90CA3965D826412B454DA19F99A3ABC824BB38D67A80B021ACB7CEF279D319515B453258C1D31B76B266CB5E92DD1DCC1859C7B59FFC30966EF2E05F5FE7AF4FAF51DCF7F861857CF9DA8B686818AA766E71238F879FDDC637BF772F61BF4E6528C6B7BEF219EA6A6B78694B33BFB9F57E3A6229B28E9F6036A824874636834F8BE1985DAC5C3C8B0F5C710109C2FCE14F4FF1D2DA8DE8E9A3FCF6C79F65584DB1440FAB54F8B4E9A337A22BDEFD967B9F60F3AE26B27A10C336D410554CB7281992CF5967CD665A6D888B4E9F407D6D850AF571D37B646B95BB5EBD85FAA49BDD3F4682772340CBD0895BB9B92A0CF1E408F97C8403C223BAE0A0720763AF72FCE6F7536CB77A60995521962EB0A8B20DCD91955CC0DB0508F97E2E67CFED040A57ED90D60B38EE9F48CDE24F51D270266845AE91BEEDA851DF7E9999375CE21AECBB8AED77C01C789E056E0A94783C48B32DE2E8DCFDFC366E7D7A0BE75FB8925115210C5DB4D03A87FA2C0E7525955638374C73C2A7DFAFDA780B1AE31F15DD6FC97EE4267672D5B1BB58B9D22BD7E7E4445D55CEA743D82137B1DB4D6291F76AABE3E57332D8B11EE2EDC7387E682F070FB772A4A5033D98CFB87113A9AF1F4EC0D03053096C9530ED8E7167D49734892D458538F128F515C52C9B7F3A5555D5EC38D2CEB69D7B9935650AD5253E6A2B82F8FD0538A2CEF11B6A043AAC675533CCEF17C99A8FA696767E2506FC93C7F2910B965059948FF008AD3ACCB9E6CFF4F675ABCC47D329C091455B93D807652642C88A531474282E2AA1A3F5183E3342D08E70CBAFAF67ECC8612AFFF0C13B9FA4ACB898C33D295AE3695AA226BB77EE27D2DECBE2B3E6E2374C7ABB7BA9ADAA64FAC4718CAC29A7A13A5F71F7B6A1D36987B9E99E6DDC7CD7C314E7692C9C52C3FB2EBC9058DCE60BFFFE4B224E1ED9804E36EB10C8FA096886DA75189A341953F833C738EFEC799CB1F02C9E796E2B9B37351339BE937FB9642EABCE5B4232D6AD0CAD8EB624B8E94F7F65D3CEA3644305A41DE9A186B0D36E6F2711CA306DE6184E9B3E923327D7B26CF668957321CBB41A8C51AA516FB19686CFE0F3ED6493F0AD81FADD08D0EE36DAE590C5D14E2AE990CFA0C02F55ADDB7C1006C2486FA7EBEE8F11E8DB89E148FA8A979BA712543C0E5BC0D991F11459DD4D0FF8C564C915FDE79ECBD442F4EA75949F713505632F84E05055596B429DB82D0F57F4EBC5805BDEEE4DF1D96F97DAF53E144F0AADF85A01E8946EF0FCAE0EFEE3CF4F3065EA54CE396D124E3685AD1B1C8DD91CEC4C90710CF56F858F4AE636F8F9FFDE0B71536A06DFBCB0ED13C896379E49390076178501F0750F88D0496F04684F2DE381B85B7DCB2AE48915D53FA57968423A46A6B793D6DD3BD8B3752BDD890C2555B5D48F1A4D5559999A4CB4D20905D0D21C14BF0D01694D74D3C938A16C8673E69FC684310D1CEFE9E3DE175E5389D9D75EB884DAAA62159996F695D21E73686EEF54CA889AA0C6A431751485754C2DC8918E5E7E77EF63643209AE5B712AA74F19AF9A62BD3EF8C11D9B58B76D1B695F909E88437B4F8A84A750F165924CA90972EE6913A81A56CFB32FAC27DADBC9B8DA22FE3FF6DE3B4AAFF33AEFFD9DFAB5E91518F4DE0136809D1409768B2A9428CB56B3E4E52CDDEBB8A438891D47B937D7292E711C3B766CD96A962C52A6444AA24491144991040990041B00A2770CCA00D3CBD74FB96BEFF79C99010836E52FC9336B8104E6FBE69B53DEB3DFBD9FFDECE7F9FCC76EA5BDAD55F1F2FDBB8F303830C2A9BEB3AC5CBF8C9E254BD5B5E5AB0FBDC6BE3DAFB06C5E3BBFFDABF770F9CA7934663238418C253A225239383E7D4186FF7DFF6BFCC3F77E444B1EEED8B8888F7DE803ECDE7D96FFFABFBE41C96B52DCDCB66DACAA98065BC4B6D87C054AE5CBD47AB9F68AA56A6575E66C91FBBFB58543BB9EE543B7ACE2B39FBA874A7184D0CDD17BBACA57FE7E0BAFEF3F4DCDF1D50756C6EA7DE1484555AC0E8B5B365FCE954BBBB8FBAA55ACEC6924768DE8ACA42F4692765A7B2691E730B9D24C93F02D23F4CF5E80369969CA1830013A5065B7829F51AEA60469690A3AC1498A2FFC19A3BB1EA239EAC70EA5F495DDDB8405A1E7290CA12E2B46DF4EDA71C6F5DB4D106E095CD20F74A95A4D38F3AEA2F1BAFF0BBB6D03B1DDAC9082E12748363082531B00002000494441549E78675966AC5CFE29CE1BE66B5AD7FA6277E3821B311558051717BF148BAAE57270B8C67FF8BB1F50A987FCF34FDD43502F29063852B375A860B01252777DD5139187431A9DF2502AB09066F7933E8D46FED19CF7F9DE8DA64E9F3A74730653A08679C53C58E968B7F94ECADA98AE8E77FE07A570900C2D983CDBECABD24BF2A4C987C1DC4543421A7CE5E30739F0CA8B9C38D3479829D0DCB388853D3D34DB116175823814B823543E71B516AA30935F1D67DD82D9DC72D515F80D2DEC39768A675FDFC3DC8E263EB07115859676AA9946F6F75578E2E57DEC3C7A9C288868B71DDE7FFD3A7EE1BA55B4153C1DA73F59AC72F0F03196B7E6D8B466896E3A65CBA66F22E6ECF030E5D8A277A4C2F79FD9CB93AF9C24AA55688C2BFCBBCFDCCE476E58A61A30670726749271765B236D7E84EDC8FDB15463B95E0B2996CBE41BF2F8850CC3B6CD17FEFA251EFDC1F7B964E522FECBEF7E96F9AD1651197CD167118357EA548918A499BFFAE6AB7CEB912771E332CD411F7FF49F7F9F53A7ABFC3FFFE32B54FD3623102699AC70C46D8B9A65E3591E4EBD4EA17E9CEB372EE1FA9B36F3E0C34FB3FFF0286EE534F7DEBA824FFDD207A8944609629FBEC190AFFDE3333CFFDA616A4E413729D145716C8FAA5DA573652B776EBE94EB167472C765CB69CFB93292A87569CA919F5479BC605DCD04E8B74EA02FDE4E4A76BBE43AEA9C442DA45A4D89096FF379EFE1256B68ACF65E73CBC958A74155A6019300ED895852C637CA590A4B08A43C4138B095D1AD5F84DE9F908BCBFA7049096AC6A725DB342142ACAE84B6645B55039DC4125A9360AED7C360A715B79BEABC5B9875E527B03B2E25B60B096D2852DA97AAE24970D4006D444C27BFDE4E24635A80D62452036B4A9993211B6944390CC5F0ED177BF9D237EEE7DFFFCBDFC073C58D5C1C476C15D7393430C6B0249F4A3F74951D201AC8E2B42D1E7A12A325784FE9364B969B8AF65ED860BC30D85E1874D534CA98EFBE871B2F6F95CB2E7F541236310116A35F2FAAE9F7AACA46114A644876BC9FC1A3FB3872F000474E0F10B4CC61E99CD92C2CF804F531A34C270E29625F25A553699486608CCFDD7317B39A724C786DBCBAFF18834367B9F6B2752C6C1439D966BEF3C23E5E3D32C091C132E36A4A6BE3070E0B0B2197CC0AF9F82D9770DDBA0594DD1CDB5EDAC1C4403F77DC7C15AD4D0DA64F91DC33A9967A4BF0B51FEDE66B0FBFAA06B9F9DA10BFF1D1EBF9ECDD1BB5CA92B7CA008AD0E9F4FC059C95BD370CB1F54627D58EEB31107BFCED0FF6F0A5BFFD2A1D2D4DAC5DD5434F7B8E79EDDD2CE96A67E3EA85F899804A5466D49AC3038FBFC1FFFCCAC364DC9855B35C3EF7C97B98356B167FF1F78FF093970EE07A397D266C31A8705C4A91A8CAD8F8D5120B9B8B7CFEB31FA07BF132BEF7D81B3CF993D761EC10BFF3D99BB8E6CAB5D4AB45758B2FD51C0E9D1EE5F448CC8BBB8EB37BF7614A6531BBB0287417B8F2F6F5AC9CDBC0DDEB16B271E11C7C394DCFD63EA0D1B7313D41BD64172E96990CFAAD9F9E9FB50C3AB5CC919BEC86AE19E1B6EAF8BE4D2EE31B6D671967B5641E5046ACCE5239F820235BFF924CAD8F4C54575B2B51AD0B1C195031AB47981C3A866A49FE26EC4ED1DD9010215C693376ADAC69B78162D4893DFF66BAEFFC1D626F0E1192B9273E875AC7990864CC7EA6497FBE3DC2705ED26A72D17456DA302524E312F9A763E598FFF4DFBFCAF537DCC6BC4573A80B0E1E1B2DE893C58823FD139422997634830532BC239EE5260C18332A5501D44335E3EE69363C35C09EAE99748598833F1F5336B9F0DB31AD2F1C339FFEA9C62232A93F1472929C5F60266177C84627E53164AAC3D487FBE83B72889776ECA398EB66617B2B2B5AB2946BA39A4BCA1878AD52272ED7B1C6FAD9B4B48B0FDD72036E546724338B2DAFEC251E3FC71DEFBB8E06CF657F39CB17FEE1C70CD52C828C50C7E4381C1DF5CF95CFD1563BC947AF58C0EFFDCA07A9DA2E83136576ECDACDA56B97B0746E8F8931168C4470E85CC00FB6ECE7074F6D674C8C5FC3228BDB3CFEC527EEE09205CDBADB0A355346B16D2FAB23DE325C23F87B6B531385AC8F1D56553B44B8D165BB407F35E48FFFFB9759B0780507CF0DB275FB0E7C7C96B4FBFCDE3FFB202B167712C555C6EC1E1E7F693FFFE1CFBE8FE73974B9E208B3825FF9C43D9C1828F3C7FFFB7B1C393980086D485355138D081A182353E9E373F7DECEBDF7BE9FEF6E3DC07D0F6E65A86F944CF1307FFD07BF4653A3DC03B9322E4120CF8A47396C64A098E5B1A777F0F08F9FC7CA5BACBA6C19D7DDBC8E567B820F6F5ACE8A599DFA3CE8D2731278232D9B2EF60CCC04E89F9F002DF083881E192F4223C62FB655223493936915C12EB571E818BEB3E8088FBEC4D8CB5FA47C6C0B0DC13099D004D310334528016A3257D4C02A99A4341C258C099D4BA58735E80A64E05A5906DD25345EFB7FD3BAE1C3C474AAB3F1D4A08AA4F7D342D19B32868BDC8FA46A49A10353F827D389A9BBB5E85B5B50041E786A2FCFECECE5831FB9CD1CBBBA8FC368E4F3C6B121866A12EA1C6CD19F8CABB88900AF08EA981A22E54B27CDD604E6982C51260F716A0B4F83924981CCF7CDC0C95BDB65BD356B241D0C4AFB09E97D08353BB544994F86376C1BA73E415C1C66A4F728DB5E7A9D61AB9185AD4DAC6AC933511FA312D7949F1357EBB8E345DAAD2A1FB87E034BE7772BBC33E076736AA842971BD0D3D182EBD93C73B2C21F3DF22A457C42E1B50B8E25138AD8348463E4C77AB96B49137FF62F3E4D20C608BEC796175E61F1DC59AC5D344F7D042B56C4379E3CC0571EDECAD9C11A19C7E683B76C62C3E22E3AFDBAFEDFAD8D18BA261E35B7C091DE331C3A76428D095CCF53FBAFEEB6162E59319FD6425669A09A1C88BB8A8CA97B1E2F9D19E57F7CF91976EF3A4C873DCAEF7DE67DDC7AFDA5F856C870D4C233BB8EF23B7FF25D350BCED607F9F54F7F980FDD7E19D5D066DBAB27F8CF7FFA654A32209975557AD513A3E5CA097EED9737F3C97B3F4CAE39CB9FDFBF8DBFFEBB1F910F035AE3337CE94F7E0B2F63A90942183938966B0C12EC26427F36DFFAC1737CE3BB8FD1BDA08DBB3FBC99395D197A0A11775CB68CD67C065F866E129FCF34839EB6E4669A84EFB6E2FC59CBA04D8036D31B6E9866BDA1EA186433F2A019BA9C6489CAA1A8C920C43906773FC8F8B6BFA3BD7E984C5CD56C398E2493942942611208232456CEA744572F906C5C5EAB118BBA9750F1C23AAE586DC95044761E679C15ACF8F41F12FB2B8934A027043EC111DC0B1B74C91D793BB6441AF792809E5486EAEFA726AA9643DDB2149F3D300E1FFE9DBFE2B39FFC45D6CE6F5178458D742D9B9D470738557128E211382E8E60B962EFA48335924BCBB5496420F5980D269F54DFD360AFE9C1D994F4531C6BF39A64E06F17A0DF6A1DA69A3929D4211B92DC5783535AB8B64BB526C31A023D05D8B512E5BEE3BCB0F50586CA214B3ADA58D490A11855294AB35004B14A25F213135CB77629376C58822FE3D1BEA39ACDA335979E7C4ECD5E23ABCCF37D75FEECD1D719AA6508EC3C9665065F6C274FBE3A4661EC241F5DDBC91FFCDA3D947C97370E1DE2E5ED2FF3A13B6E64517727353FC36814F1FB5FDACE3F3EF90A0507AE5C3997DFFEF88D2CEE68C4AD8E29B7DBB12D2A91F0257C9E7D750F6706C7B9FCCA4DE4F30D542A81AEA71387F63276E628D76F5CCFBCEE36BD1FA6E96C13393E677359FEE63B2FF29D079EA4B136C047AE5AC0AF7FF61791E55EF61AD9716C94FFFAB78FB0BF7740250AFED9273E4CE5DC0916CCE9E1CA8D6B787ACB4E9E7FE1054E9C3AA1E252856C8E4D972FE577FED567E93D5B66EF913EDED87F8E87BEFD087E6D8465B32CFEC3BFFE846A9E587E8E52BD815ACD25AC0454438F1239FEF6FEEFB0EBC851DADA6D7EF3D73F4DA13ECAFA855D6C5C398F5C467A1F815603BA46A663CEE9A29EFE1CCC64D03F4F19B4B8589B3BEE89D4610204FA9E455627092598099EA8409F091EA1E8389C6664EBFF24DE791FD95886770533480AFF840B275A1D81F8A6C9C86FDD2CAEC0916110ADD5F0052B8CEA124AA83B8D949D5964567E90A6AB3E0BF9F926482705FF340EFED4C59F5C9417ADF3CEC7E6D220ADD5821179126C364CF0E301E0737FFA23F6EE3FC8BDEFBF85ABD62FC515A8C3B229E172BC08BB4FF653B58D4EB05C13E11B1B9D66D3B094C09F203CC948F8D453631A87E921258DC0A4AC9F6A049AE6A80A35BFC72FBD6DB6919E944A253513354E2CD3704ADB56C6817080193DC7ABDB5FE2EC4891B98D05BA9D887228F0469DB85A251F45DCB46135972F9D4F3E2E917165C382897C3B2FBE7188D3078E70F76D37D1D3956724D7C90FF69CE681275E67342A1089008B5C8F20225F3AC7B50B5BF8B79FFC004B9A1D2AF90CE3B51AC5B37D2C9CD54257739EC1D0E544A5CEE7FFE0515EEF1DA360D7D8B4A49D5FBE7629972D6CA3CDAD51AC476AE47A6A709CDDC7FA685BBC9EC79E7A8E97B76F57F17BF1313C75E60CF36677F1B97B6EA5C50D98D3D148474B83B28A222BC3C044C05F7F770B8F3FFF1A9D4D79EEBDF56A3E74ED1AF26E8863854A772B5B190E0DD97CF98167D9FADA1E1CD9ACCB252EDFB0948FDCBD99037B7673C7EDD792C9BA64B24221F479FCC7DB597FE90ABEFFF86B7CF31F1F56138B063B60F3A615DC73D755E4BCA2D2EB2A718117DF18E0AFBE783F9E02653695D8A29673711BB37CECC337B27E6917572EEA66FDA22E7C6567241B6D0A7E4DAF0E67208EF7F6A4FCEC65D012A0CD13EC8552621B184004FBCDA877A2D826C14C839234EF62AC7098A117FE9C70E7D7C885FDB83ACC226F17B68629710DAF5A1A6A316E60864CA4032F19B504119162745C719F88A88B929E9DA3585846F3A5F7925B7D27716E01911ACCAA6F851ED779F8EC7B0DD006BB309D3D6D4A197B2FF9F688058FEC19E4BFFCF5B7C8B774F18BB75FCBF2D9CD5862A0EA65295A1E47874A1CED2F325E8F885D4FA7290D9163EA29491918FAAB122384A9703CFD699A9A0FD400AFD76E6AAEF32D33E5F3B97A936FD34F9E2600289E919269A5B8B914FA6A46AB1BA985285D5B137DBCFAF22B9C1E2CD19DF3E8C9C6542B1306BBADD798DFD1C60D976FA0AB204E23559A5C5B47B427B20DBC71EC145135567DE676BF4ECDCF32916DE1C937FA78E2F5639C1C1ED381A07C7D826B9777F0993B2F6371CF1C85048E0D57D8B97B2F97CE6BE08A558B34084D7879B61DAAF0DB7FFC00A76A395C27265739CBA5AD657EF3DE5B58DB2DFCE3066A769EC162959363759EDC7592C79E78960FDE7E336DADCDCABED9BE733FAFBFF61A97CF6BE0CA55F358BD641E6B572C26EBC68CC53EA7C602FEE4AFBE4971BCCC67EFB989F76D5C430E19C611F92C51C1AB2ABE3D4603FBCE54F8FBEFBFC02B3B0F532C06B4B57A34E402DC609C5FFDF44738B4FF38995C0B1BAF5EC77FF96F5FC4CF75508F1C4EF51EA7D52973DDFA857C78F3E574B76794BD117A2D14E3161E7EFE180F3CFCAC8A884953BE1A5708B23157DFB4913BAF5DCD82269B1B572FA13D6F7A42625E21F75708A81732812EDA4D9EC9A07FBE3268330422BACE52A69BC93F9938950C5ADD51C2345B34AD2F6954397199F13D0F30F6D2976898D84B361A25B08426E413076E92594A061A68D62D8C0E0D65AAAF98343A1C331823537D2AB169D914A326A2D6D5345FF529328B6E2676BB34F3310DC6845A9766108980FD74EACCD40679311A5E320492DA68A56F96869805FD41C49F3FF822DF79E635AEBFEA52EEBAE94A7C61418856B2ED53751D8EF697D8D33B405594EE9C8C561512A5D34A53E122AD0CD2DF9FF8204A1626E1517E67126453E687B9FA69A69BA2F76F5E63E7C1EAD35E9ECCCDF5D71AD9564FAFB9FCDBB8C2483523908DE1E0393A91E79607D8B37307A7CF8DD3628774FB01954A59191CE22ED2DAD2CAECEE0E9A9C8856ABC62D1B5651082AD433197A87C7D873E494D21E57CCEB60D9D225D8BE4FC92A70F0CC083B0E4AF95FA7B31073EB55AB59DAE9538EB3847E86871E7B991F3FFE08BFF5F15BB8F3862B55F1B0ECFAEC3955E48FBEFE635E3E3A42B1125388C659961BE05F7EFA83ACEE6E52F9D79A95E15C090E0F56F9BBEF3DC3E878919BAFB99C03FBF6A9E8D20DB77F88ADCF6F65F4D0CB6CBE6205EB17F770D5252BC9BA01552FCF50CDE65BDF790A11C6FFD55FBE8BA682674C09EAE26E0EB96802272CAB2441D56D605F5F9DBFFEDA77D97BE49C56164154A5ADC163C19CB90CF48D287B64CEFC1EF6EE39C8C4B8407D210D7EC455EBE672EF2F5CC7EC069BB85ED25B1E50602428F0DDE78FF1D0E3DBB5698B1B520E4659BF690577DC751DF373356E5CBD8085AD8D78CA704D8C9C4536DA68934EF59D0D39FFCD0B652640FFFC04E82471D31372924112B9EDAE6F200E615D68AE27138209BFD62C8B0AD6F801C6F63F42F0DA37C9958E28BE2CA22D76E826496AAAA1A1F8C8B48C320942968C528B51AD3020D2C0ED11D044A9EB6A5AAEF92CF93957128B2CA98E8F4F7D2554FC0B2C0B2FE03F4CC3EA8C095782454E6A87A49425C3BAA85B317B07AADCFFECEBEC3E33CED2E54B58B7680ECD1957F17219649808638EF64F70AE64A98B76DD3265AAEE3F2215A923EEC634577B7D89A894685BA844B652FECCDF27AB133DADF48DE980CA7BABDCCCBD31EE2BBAD9A619B46A6D9BD752268B64F64E1490AD0D7174DF5ECE9CEAA721AAD0625518ABD629C62E135681BA9727F27C724189D6608CDFBC7B334B33A6B750C6E6C0C028BB0F1E229BF559BF7C29B35A9AE86E6FD4E65E35741516CB66A1493270C762DFE961761F3FC9F844404326E6962B96B0B0AB0B3B96C9439BD08B79EDF8302FEC39C6DEA3E3CA2059DD51E1EA754B6816757C616EE07272C2E2E0609D2F7FF729F1C165D5A239BCFEFA6BD8AECFC73FF339B66E7D89DE1DCF71E7D56BB864413B57AE5F46C18BA84953D8CE72A4B7C8E1DE012A71557B249550A628ABD48A159674F9EAAA32AB45A60BA162E77965CF09F69D1866B81431305EE1D8F1A38C8D4E10D524D18870DD98B6960616CD9D455BCEA6250BCB9776B1A0A715576605641D84D233752947395E3D1972DF8FB6D27B7688D0AEB3E9EA356CBA7239B33B1CD6763470F5F2F96495C72E7D12D3DC1698F03CEC59D7D8C586A7660655DEF6C9F9598338CCC9A4A5F594C19374E6552C6972F0624A9FD93CEC015654845A2FD5E7FF8689BD0F938B07B0027137F6948B2AE43A09C08AD326015E54ED4CE96FB8BEA9C8BF69AD196FC328F628DADD788B6EA475D367705AD682DD649801C231368204D316A864A6491331BD3BE7A309934E2466B349329129E245027D541563EE2D07FCF9F75FE0F1ED87D87CDD555CB97E290D9E452442F7CAFCF019AAC089FE0A27068A542C97D0158D11C1EA4315FB51FA5D5A9AE8608E18D69AD521015A925913A3A70E54DD651218E262D0E2DB2F3CAD6D0CF6AD1C5D732F534EB452D3B44A31025719E13614FB193FD7C7F16327606294C6B8CA6025608C2CA55C07B56C33A19B25139669A80E73CBBC66EEBD7419793756682AC8E419A804EC3B7D8E17B6BDC4829EB97CFC176EA6D1A9ABF07FB6A181B22DA4FF1A3DB3DAF8E1A3CF72FC442FB7DD7815EB56CCA7909114DFC171C59BD2125D7F6DD80A0EBC63CF5946FBCB2CEC8855EBC289CD24AA04E8FEBACFA1C180FB9F7C8513A7CE70E7CDD7A98940B15C5178EAF9E7B6922D9EE47DEB1771C9A22E2E59B5481DC2C58BD1CB3452B65BD8B2F3305FFADE939C9BA8AB59AC27D563B5445766847B6EDEC02FDE7E03765D6CCF5C6D4A064E8E722832A9558E9FE963746C82D2D884928B0A199FD6963CF3E77492B7C017736526D42A2CB6B232A54EBD1290CFC89C80CB996A81E7769DE0E127B6D0D456E0539F783F4D7E91E53D79362D5B448BEF29A427CF990C8809C0A71568BA28B4F92BBD1D13A0A5369B71F57E9709CDCF5A8036AE1CC9515BF574B25B39A042B333D042DA614B32BD44F3D9A466E330F61AA77FF0C7340FBF88178C63CBE8AADA204B804E14E1645045C71525406BBE6EC64E1477354D31C32556615F15A3A9DA5D788BEFA4E9CA5FC2C92F0227AFC69D3AC69C967769D9974A30A6813BBD5F6FBA21A953F8B4EA508F47FE53258AA53670B8FFC543FCD1379EC2CDE6F9B5CF7D88F6C66695ACCC8A568718887A59C6438B5DC78654F7A1EAB8843AFC627489C5E859BCE554E254B62A0DCA8EA14AC9004EC2819E8E61EB7EA10FDC4FF1953692922AC864D449E6AC015B082762142BE2FB35B2718D5C6594FAC4087BF7EDA53A3A4A368C18ACDB4C788D5473EDD4334D0AED384191D6689CB9C553DCBB61219BD62E570717C775293B3986DD069EDCF202A74F9FE3DA4B57E3872582E2289BAEBB9603E70678E5B51DCCEEEA242A4D70EBF557B2A4A70DDB0AA9B83E4ED6E3E89980A79E7996AB366D605677878AFCBFF8E22175E25934A719BB5AC40FEA46AD0F8BB3C598DE8998DD67AB3CFAE4B3B4371558B27821E54A95DDFB8F52298E73FDEAD9AC9BDBC28A396D2C9A3BDB0CAFD8592A81C750DCC013AF1DE2EB8F6E653CF23468BAF5807C58A3A176941BD775F16F7EF59754B94FE445E51ED642C1F00D42548DCC8A950D5B4C0E4463CC76C5115D14FF6C63C2EB8454ED3C23B51CBB761DA4F7D809562F9FC3FC05B3A9B88D6C797937FB0EF7B269D306962D6CD1516E312168CE66123551C99E6526416B52A33B963245270D954DD5954EEF4EAE9A1988E3AD1FA09FCD006D52C9D812EEAFC930354067BD0B76665921C6F9DBC87E5AC441152B2E11165F66E86BBF428B354CA06C8E40C572D24C2ED0409594F849C0571DE3484A37471B4AF2FB45DB567E83EB78D4A30C65A78B626E396D2BEEA46DE3DD6089C0BF6FB05F8510CCA4E179B4E3E9B7473185692C06D3BD4BE00503B5887A987C984CA689CD92644DC3D580BD0315FEFEF1D779E98D835C7EE9E5DC79E37A1A0871C3B26E402532942D8FB205E7C62C4E0F15393E384ADDCD26929012148CA6B44C271ACB2DC9040D8E9FE4D309EB621A9A78D145F44E41DBE0EBA6144E5DC01309D9490D14C310C951A5109659D2D1CCD953C7D8B6FD058A62925B7318B30B04F976EA6E9ED0C928F49409C6698FC7B86D410377AFEAA6392B10491DC771955F5CB67C05C204461246830C8C44E5127E36A33A13F97C56E978D938A42D674C52AB991C7B4B19EEFFF18B3CFFFA510DBCA26FA1AC059137AD0A793122E7862CF0CBFC9B8F6CC617EA5E546722CEB0B77780932375662D58CA91E327E8EB3BABFAD5EBD6AC62C1AC0E464F1E6056A3CB8AB99D789EA7D202434E07FFF0D88B3CBBF30413E419AF06C4225FE8C4B8B5906C50638EDDC7C76FDDC01DD75FA66606A1536078AC482E97A32913105746A8D54C55580B8D3FA15867C96625EE3422DD2A8DD9E1D0E3C9ED87786CEB61EAE24758AED0D868518B4699DDD3CDE69B6EA0ABB591A66CC4D5EBE7D299CFD3EA27309E168892D868DB32811EA707E8C450597B3217E959CC04E89FB7006DA2586C9BA93379C0458B4307552E0C7648B75B02A297465BF38EE018A7BFF24BE4CB077165A4431A8022C328A57D6CE908AB52BEA409A9C2FE221D29A59B9127D514C1AAEA48B7E082A2C4E63AAE4EC095AC0ECE05F359F76BFF15322BC06E98DC2404F15079CD8B98B64ECEC1BEC958D3089DEBEF95FC3D25518863B53C68327423E6020E1C2CC36FFCBF5FE6E84095F52B16F1B1BB6EA4332792EB35222F4F39F2A9850E6E4EB0CC98570F8F7062B4C2784DCA5C9369598EA70FAD6C2AC2FC90586D8A9694129710ED2633F9770AC66F7E7D6A22D198F50A5422015BC691CDDDB5353313ECB92118675E93CFDA05B3D8B5E3359E7CF659C62A3113359F6AA69DB8A153843D4D5F8088C66882FCF829BEF0CBB7B390614281717C0FC7F5955E297A7FAE86923A76A1013B9357B7491512727CE5268BA29EFCEEE67C8E9AED319C69E08F1FDBC5035B0E52B31AA9267D014714F2C57E4A0739EAC46199F9E5E3FCD5E76E21EB0408FD53608E2A1E077BCFE9A8FA9C25AB54E0DF756C864E1F63F0F4515AB3361B562DA529E711EAD45E9603A506FEE4BE27383C6251F79BD5E547EE501807F8514CA65E636D5B95DFFAE49DCCE96AC0C91638D65FE32BDFF816ED1D1DAC9F93E7F2255D3467E48C456CCB25F6F2C44E96308898181BA3C1A952AFD718753A78FAF5D33CF8D45E4A65B9362175C6B0BD0AB7DD7805776FBE06B73CC8DCB60C97AD984F932FBADC2A3693CC3C2526C7D3F289F4AEC762CE6C0CE512B82EAD809377CC04E89FA7006D68629A6B696669C673B39E3478D2B1EA69295D2A71A812A5690351B2D97384BBBECEA917BE4173FDB8283E1BB19E304EBC0E45CB2269A8D9C6F5C391C94509D2320E9EC2218243DBAE12F3951AE6D8D4C5FDD869259E7B0B4D37FC166ED33CB3926D51DB4B33E8B772D14C46645305B0245B36C1DB78210A63C1178532C5168C68875C0FC9E48BD87CE947AFF2BF1F799DD16A9DE58B7BF8FCC76FA7D989A9D5451A526435054208B14405CE6B60A00E47072B9C1A9E60AC54D132592C8C02C96C6D69DAA5A0512A529506E864047DCA8BF65D476A83E08B60956D9AAE92494B55209C660BD549F16D1B3BA832CBAE72F9A276DA0B595E7CF1659EDEF21C4315915FCDE234F7507304EF37B254715CA7291AA7B574962F7CE61E0A637D94F34DEC3BDD4FEFC9B3AC5A3887353DAD747A214DD4A83A11A21890B16C5CDBC3F67C5C378BA755451DD71361239F41A7C07FFCC12E1E7EE1389ED7425D849A62913A3574409D6A0D4543BC4EF7D02EFEF673EF23572850956948D90C1452F2192E87EC3A7C8A52A9A2EBADA3E0A88468775B23B17AFB09B466868646DC6E1E79F918FFB865AF9EAB24040239C9E8B51B85D895712EEDF1F8D58FDC4ACFEC76761E38C1B79F78950327FA182F1559E48E73CDC2167EF3331F250C03CE0539B6ED3EC681D383548B326E12F28BB75DAA92A8459AD8B677807F78EC75758971AC2A4DED19AEBE7603375EB68A462A2CEE6860D982761AB36087D2B5704D7B440AAFB4EA3BBF336EA0C024409B0D5EAAD064EDA7EF9D09D03F4F013AED3C48804E071DAC2440273CE8E9FA17E922D02C504258A2015D1B25E62C83CF7D15BBF7C7D8138771E312AE8E6C9B86992A7629F753325889D1325A2EC9AF28DE099BC30CB0C82A15BEB562D8AABBE011D42CC6338B097AAEA763FD4D381D4BC8342D044C309974C49ABEA0130C560661E417AACA85893A93AC8934B99E74EBD2C59D4C422A7DCE611887EFBE729AEF3FBD8DA16AC8ECEE59AC5C369FC6C606DA9A1A69F12D3271055784E69D3C25274BD5B31929470C0C8D3351AC50AA1A7538E17BEBF3A4E76A1A3DDAA24D0E4985E9D38C5E31568CF3EE00002000494441544F43E19B54124A655D936F690F41AE6D327529D5806934CA54A8D02165F333EED52A881506CC6BF05935AF5BDD399E7E6E1B8F3DBB8DA11A54BD46326D732847421F4CA6D6EC987C58225BECE743D76DA22BE3706CB4C8CEA327E9EF1FA6AD9061794F2B372D9FC5BA66686CC92AE127721A1829878CD5E5D664F4DECBC4E9B2B94D34B82EA58CCBFFF7F87E1E7CFE14512C729B725D04CC15B98A08B7162BBE2BBEDE6BFD21FED3FBD761E71B29D663727189BC634015D1EB26D3A0F8B37C35F9522588196EACD9ED68DD65AC22EBCBC66AEC6157EF080F3DB39313831342753178BFD8B249C516D56808475835BF93458B17F0D2CEBD1C1BA850C7C7757C5A8A2758DF0E5FF8E79FA25E0FD976749C6FFC700BC7FB27C8B8365E54E1FDD7AEE68A358BB1724DEC3C7486275FDC8D63C52C9ED7CEA64D6B59BA78168D5685851D4D2CE86A262FC72BAD51D5741676BA599A9A2C4CA7D49D57C91A5D1AF9D2C1B2C91ED24C06FD8E19CDCF1A069DAC07B333278D2B090B9904839E7C213DF314D3D500614C62B5D49234512240ED30E5DDF731F2E2D76888FBB4FB6E181CB1AABFC908B5490E0CD3C1C8CC4996274D11491F8CB79AA1F7C90620714C865F7C7D186B6418F5679159B199D91B3F8E9D5F0656C1947A9226491A95F6346DC928253C8B6EAF519936FE7D17DCC68BE2D4661C5CBA7D226A53B16D864378EDD4287FF4E54739D8374C365F60F3F557B071C53C3AF30E39026AB1AB7C5DA5BCC509075C610D5739B3220E67361DA3BB61360CC3DED06EBC69951A7537D12A111F3EE58D4B5355D82AC948B966C5E667EDBA1171371B51FABC4E6BEC26AA7B86AE25D99A70A40D0EFEE0A34FF2C8D65D94AC1C7E730756B699AA060AE90B18884339D3823987A2012EC764A01A09BACA9E8942DA47F6F3CFDFB79C6B2F5BAB6A73474A3E0FBFF0067BCF8C3251B5182FD5E808CFF1AF3F7517D7AC580805F86F4FECE75B5B8E2BE758400083D15BD861881BE877A8C5115DE5D3FCF6AD6BC9347772E4541FCDC120972DEEA6C191C01612B91933C821C7A3B8B0D0E30A0CD47D76F48EA9F29EE537D0DA39876DAFEE64BC66AB79AB6C86DA9ED6C4C474E12448CB28BC910240A5001CB258759BC6F02C4B9A03BEF0EB9F54A5BEAF3CBE93275FDA4F449ED8AA624725B24199D99D4DCC5B3C8720AAD1DDD9A5D0D8AC962C0D6E484F5B9E799D8DB43766B44D3E2910AB104F224FF74E149E8B64D5E7ADE8990CFAE7278336673295169B9EB068714893D0372FBFC58249B9B5B292350B14E2683C44B9F729867EF2A73454DE50794B1114F224168722C96F7E5FA22D97743E8C029CE1428B238BB047CC71489036C1CB0839099450715BA9342C24BBF466F2ABEEC46DBD04EC4673983A1092344E3403958D23E5475F4C272E3DB90BB756D33834BB96D11A9E88602C8A79E9C8902A9EBDB8FB28D508E6CF9BCBF285735932B7939ECE46354315FC544182C4D44082990A44E967992D4AB2363D4FAD46049A301E90C6CEC8541AA10093718C6F65D4C5C368114B5809A92B7345A000D3CC154DE3F46625717F6AF04C8291300E5477D838D74880FEFA433FE2C7AF1E262AB4E337B412D859025B02B409184697DB1CA72AE9697A3FB55E0CF3C665D6D8213EBF690ED76FBC4C45A51E3B3AC2B79EDBC9B99A8DE5E6F477B631CCE2E6888FDD7C1DB3E674F2E5E70FF193D77B55533946FA1D72EF257336D65672B7EAB1A3BA146B9A22F01B39D73FC8DCF82C775E329F0D8BBAF43D812BEE2B963ACA78A1406B316376232F1E1DE1C1978F7376BC62AA16DB343363F13894DE85E8A8A474E2747C5FCE35BD07DAA8934D56CC75659A7294AE5C8DF75F7B89E2EF4FEDEE63F7D173D8B60F7199281CA140487B5386F56B1673C5A5ABE8E96CC58FABCC6EC9B3A0334F47639E9C97E89A9F37157A9166DF3BA6836FF18699003D13A027AF802CF024C6E9631B96884AC7187FED6B54F63F84571B226B093E6B8C4875196AE637A578A74F6F22FAAF0FAA0C2EE883641A8792A9A7832E32E91845B68112B2DD443D57D179FDE7710B0B8855A7573AE1468CE94DA5DF85B72D4DA5A78916E9394C36EB4C4D21196CDA2C9710588AA06FACCAF6C3E7B8FFB1EDEC3A760E3F9BA7A7BB83DB6EB8849EB6661A73596D6819D90FC3B0086468417728393E034198BC59A2C5541335ED0AD89664ACE314A2320D4199A2D5C2B8DB9EF8CD887E891C9BA3558A5CDB644C50CF322D81D3409D9E960459391F09D46118F2A5FB1EE485FDA7701B3BB1FD82EA5EABCD973435B541959A101898283D621D7AB12385AEE2C8A36BE224BFB8AE9B5B37DFCCD989325FDDB687178E0F1048134D2A8028226B15F1C23116343793CF3772683462AC261582F4243CE2C031FC70AD3CEA1A3CEB764E35ADFDCAA8B277C4817C41748A1B96B4F2BE4B57E17859FA4B0E478E1E5771A605ED5916CCED5236CA4FF69EE53BAF9D6242B371D3DC9673976A463716A5443AA623AC8139363206B29169E8176A644818CA7BB32643A64CB35DD36C7D30F49990E30F420AB99839DD05D62C9AC3CA05DDCCEF6EA6B5E09371A0BD29C79239AD34666D9DD6F59CD4CC627A72308DC7FF4E19F43B05EE99003D13A02733EB0427D3C7571FAE1022A1DD1DA27EEC698AAF3D80377650FDDA5C897EA29226D8B590472331A595ACD194EED24A93D25A82B41121920C464A5679784C1B4C0347249C580942792A760774AF236A5F43C725B743EB52A5E2C59A85273E409AF525637DD345FE13C53DF33C4C5901985CC664B94A254C02B63CB822F42F5998CA948670FCEC107DA345062A31BB8F0CB3EDD51D5462072FD78CEBE7686F6BA1B3B395B6D606BABA5A71C51057F7A3445B3A755357B68B997794C024479B8BC6E9AC1DA3BBB89BF6A1EDEC772FE7F4FC7BA90A773716A94A73CCAE15100412E493694FF91CC5CFCD99A9F48864F2A95092EB69062D23EC4F3DFB0C63C5228E5FD0D175C95BEB8287EA670B9DC560BD72D0FA39938E2F729055858E8832F8C573CCCF0734B4B6321EC1D1B198F164A254AFA68C2A8B225B54C3B5A5FD1B5389655C46A089645235F24D634F297C81EA72D7E38C327AB4BD2C0135A8D2581BA2C30B98D5D248BEA185A162C899BE73BAFE648AAFB3BD49ADB2849F7EB26C539173903523ACA07A224790DE5E6D8A48159364CE1AA0536AA69CB7307B32D4A49742A09A1EDD8D59DA9AF2CC5E308F593DB3556DCEB76B3465E5B50C3D2D0566356769C9BB4ADD14E38BAC2B4DD3444E762A0B48AA91E91C9CB7AE58DF292E4FBE3E13A06702F4B427DF0C63A438AE49A38D9E72ED0CF5D7BECAF8AE6F13977BC958813A434829AED9B150F524486BBE6202B496F63A5167862C14E650B7106181C82362A9B1AB27C1B52A5DFE2C229F3F91ED61A2E5121A576CA673DD2DE0B44A88335D7CF90DB22924138C939B4BD22A4FA568CEC3A627B9D2698493A82A412B71EE48B05E850A1C8B3270AE1CB0EDC008AF1E3ACDEB074E73E4543F956A45F592C5BD5A047D148797E0A99975AA39A73E2A38EA1D6802ABD82DB5944F707DD3293677F5B3CEDDCF735CCBFF3AB28A73712B55274FA01C725546569E7524FCF0C99333C76DC027D3F8F43D8F58F0678159346B84EBAFB9820D2BE669C0D6C6A058389984DE084125E5BE0449D3E04DA49FF4DED4938C5374D96A1096A93B2288251C765122144959B9A706DEB142D38CABCA4094A01972FCBA89460475813684F1617A1BA1AA1C4AB62F2C0C87BAF42E821A9E1DE3C9845EBD9A003036A56AA44A76EA3E1E0B354F9A82D27F1039D9742394BDC65C77B58DA80549A35660EC848D24554852889873371095BC5AACD7705D8B96E6020B449F24EB50F0E59A9AE9568F3A3DED8DB4E73CDAF22E59C7C2B34D50D6F440EDAC8CE38B6C945350D1547036473613A0DFF546F4D3BCF167B149F8D362D0E9139C860123C41312BB3206EE405D64490F70F87B7F4061780B0DD12876553226DF3C0769AAA22EE066CC5BE9183A1E6EC2A666B35292EBC3AC73AFD4C340E951221E13C8649CEF52893D4A512361CB4AE65DFF4BD0731DB13F4FD5F0A4D9A5FE81170ACBA4A5E4C59A866F7A5ACC9DD5ECD73C712ADB6939428D92A69379B685432D23DF83C598ED7B4FB2ED8DFD1C3AD5CFD9E1716AD550F9B2521E1B1A8B49E38C5AA90458A3E7E151A1B17282D5CE613E36F72CABF3FD3447431CCB5DC18FC756F2E3BE067AEDD9D88E8727CC0CF94CCFD7EC579A767ACD92B16E6D8D5A31BE23EED301BE64CF6140C6CF1005011FB8FD26D62CE8D2CC553620A13826C9A599229D34034EE77D0CE4A3024CDAC495CC56208050EFBD402E3231E948A33110CA5C48206A85B20139191CC723B46A3AD421B43281A284AED890CF49424EA52ED4B7983819274FFAC4849A824BE5603259E9458848BFE871ABAAA06EC2E24958C355268C0C20C9FD3012B8A92BBC49060C7346362999304C7551746BD4359C346CA358AB3E1DD956790113FCA5C9EA47759A9C2A39DF239B6FA0B990A3B3D1D504448A4303E12BD86F168D40298A3D49533CBDFFA623935EEF9900FDD344DCF7F833FFA402749A6E240328EAA0218A4BF2544940D587BE9FBED7BFCDC48187C88F1EA2A93EAE9C535D94B650C00CE55E522AE3F82D11306D7619F6422A1493668232982299A6B233D40D39D4A19658865A68A1E4CFA5B0F8065AD6DE0C4DDD386E13F86D60E515EB34C3EBC99D4AB2440367244D308557A6206C99FC93075E9E2D794E0D2E9B02EF261098C0280FB80C59484090610A8B09602C84FE71284E481033F86FCA99918C5A6858E2DD68DB55DC6018AFD2476EEC00D5FD8F326B702B0DF5733A4C31E6CE6730B79ADAF2DBF156DE46352B565105FC64363C951891259BAEC3645E053182319B5D32299F906E9A7290133F04418EA67AA2931E8E467D6F6A0E286DAAE9069BEC79A9D1B8C4A0244E9B4C50664E9201CA40C59B8C80944C8B2A2345AE45B2A10435F56430D75D7C21928C5DC39AA8298AE7A5E518B9DA046F97630B4281C1E4DE987B94744027A103F19654D7EDA4F12ACA8C3AC5999C98E0F092DD1AD64D122CD57CD794104245D454C1C6F4140868C835A8CD57AB13ABB185343965D97AB236D2A5EBC81592F59F365D121BA15447665A237B7AD27C1EFAF11E63CF0CC4F12E2ED83FA900AD4E2B929F980C46C2AE665DB226356591055A026B04EAE738F5E817C91E7F8A6CD0A7C47D1DA6B05DEA711D9920D3874C1A34899F9E795A25A026C60149B34DB34E09D09AAA48A26282AE8E503B596A5146C5D1859247B693E6851B8997DF4CA675094EBE9B98BCBEAEBC6FFD7403A324CEB49A112766E6536B3EF9DBE4FD4D980D6926ACE1795A962EE766E01A237873A104BF5A8B292B3032BA16F57304C543948E6DA5EFC5EF938D47C946E3E4A371851264AA91A8401C3732E2B612CFD948C735BF8EDFB90E3B34A5F42423616AEF99EC77A64A7AD34FC864926FAA2BF42D93DFBFA0BA489B8E06FA480095291AF724762F9BAE500A4D3229938641D26FB0547F3CE90898F562482BC94E90A20C534D33C59E553AD5FCD1775EF0A05DA43EBA389DF222CFF054AD6602F4855A28E925480411CC8A8FD16C590E43E98EC9791A5E72B2134E7168DEE22A4F5B54FFA78DC1E9E7358341BF75A4FE2715A0D3E22C998C134ADB6409A9E988E08FF2880AFE1B108FEC62E2B9BFA47EF4697C19FFD06937295B6B584E92554D3207D2713A19AB15FC3999B6D3A7539E0C2D5C93469EA1840935CC96EC5A9C9D55DB43446EB254FD4EC6FCD9B42EDC48CBDA1B705A9711FB9D44564EBDFA4CDC4F44A364245D82A750BF042698D4CC4842C864966DD680C97892D453FF9D3CAD09862BA316BA89A9DB89E9A49ACD40AE4915E251281D63E2C0B3548E6F2738B393A6701051FD334A0C468EB526823E1288438BD0F519F0E690BBF65FD1B9F6C35871A3895CE9E0E785CBF34D69590AAFA46FBCE8AA4DAE6D9ADF4DE6E4D310B134853617C204CD8495926CDA6613943B234D613384945A43EAF59B8C88DA019CBAA8CA9D4F7E679AAECBBD4930DDC90A265D0FE79D731AEE1337FA0BC3E3F460981E80FE88D996A6D547E9B6910C1419FB37990A95AACE4D761913A0E5BCE51505D1DF1C902F7689CF0BCAE93FDEEA5EBC75CC79D32B33017A26404FAE5C59579381C13CB0CA39D55AB7960C3298715AC2D3D47A9FA0EFB1BF241F9D24135694272D429D9A6B4DEB9098093B33D0A28FB73EE826733142F7268B36A232267717F687F988C4BC36814E624B5A380E15A7955CCF3A987D29D959EBC8762E874CBBD2B7E250B279C35ED0869923831A4E5209240F6FFA10278A739318799A085DF8E0CB7109561A491B53CE31E58B4B40AF42F924D5FED7A99FDAC6C89E2D14C2513241093F168EB3345E43DCD46457862544C7594B7D8B31BF8BDA8A8FD27DC52F93292C13AFEE4486F582E030994D1B96828979E6CAA6308B424C69B03C6F699F77426F5AF486079F6C383A669E86B7A422D12A626AC39A1C209A16832603B464D5C97D3459F5B49F9BB60F4B562ED7C038EC5C7807D2CDC47CDF70CB4D9594A0BEE61CDE141813BCE7CDEFBC20194E02B4C22312A04D73DC68B9C8662A3C7F336CA5D7F46D62EDF97B667A40E73D4CEF21225FF0D699003D13A0A7AFF3A97568169A6174248A5B6A262B89A3809C25C2F231268E3E47786A1BF5135BC806E7C80435E5B7CA03256C07D1549652D1A8B219D9C5C036743C6101185BAEC40F5002B46813A88A9B642F622C6AA2BB301B4CD22A58674C35F2099C16AA4E2B5E730F99B6B9047E13816850645A695FBC015AE78260D6B6082488DD966FE86B9343053AF130B9114D7FD8D3FD450771D56C57E4282B108D43A59FF8D43E26068E1354C6F5FB4E6D88DAC061E2E249BCFA185911EF114D08F13EB7A5729081868A6E3D6688C552E1A14A6451F31A2966E6E0CCBD9AC6059B292CBB1ABC4EA529A65F536339E6BE4C86EE0BE2EE241E7F5EDEF71619DDB49F9D9A304EEEFBB4C7C2E86E4F01F9E95FD310745E804A24BA13D3343D4EB1839ADA5092B89AC87DEAD54FEF87FEEAE99170EA075583636A6C69EABABC094E78D30531EF4D2F58BA9725959BF1F014468AD944A618E2E9394BA1F056DA3069D575610C99C9A07FFA1DE93DFCE44537CD64A34F6E812498959A282AAAD4D97BF8F0B77FAB3534567BD3D27B779F9E1E44CA727D779384A90ADC248638094A4E8588C9A4CD881EC8F02ED40709477633BEEB9B84277E823F314046B8AE8E4FB55E51369B04617D0E2C99248C35A3D4B16351528B245889425CEA2C6578248E8C540BADCBA8F59AEEBC63F498E5A7C5AC56C6C6CDF49BE0CC1248457B2F4BDD6EC16E594ADCB490BCE87CB4CE26D3D6038DDDAAF5A0399892760D24A2C127319C4D08E04A79535847BAFD92314F0C513B7B8C68F83895B37B61603F71E9A46A94D891C8B4CA079A6B2E8D42849192C0458164F58AEE4BABD18C1D9B6C33229060ED7ACA512ED91D149B37D073C3AFE22DBA436640CD2699342ED33B3199415E6C855CB8069386DA4517E7853FAF90AB193A9ADC9D27C544A6B255BD64CA5034D200931AE4E6878C1142F238C8B14A8F6DF233271D61CC77DE34AAFF768BFC1DA1858BFCF0F45839BDD848DEAAAEF57A1CD33C02D3E53DFD825FECB8D2CF9BFEDAC5BEF7EE1EDC8BBF6B26837EEBABF74F29402B9759C2880083FA009ACCC27C3B5191132C572163993C138A5C0D4F9EBE6884686C27E77EF2B77827B7E2D707C8FAAEE1BB26D8AF794825904A062D942DC99E93A106C5288D6CA8C9C66494D9568D62853D62F1E650F29536FD15A215FA97D0C834A59709B6BA360463D1DAA80BBCD14C20C23E5E0396278D469FD86F26D3329B4CEB1CF22DDDD0D4656810CA2448E80DF2EFA0021383D4FA7B290D9FA1561AC6AE15718271E2EA38BEC8930665CDF085B1219395AACA9694CBA2F427722632D8203B8130524C88321C5DE39861A9BA9F9C6B1018BDEDC0C9528C9B18EDB88D651FFB0BB0F39338AA5E97B74B00DE32304C6EAB6FBDD0F578CC3D1618C164B5D3E08314F64A7DBF260F246DC125D9B5463A9383CA999AC0F7E6CF124D15554B4EBB84C9B94DFF95E9BE703E7C901E679ABB9F7F4A6F97D1984B37CDE0E1BCC03DEDFB9384D0F4F0E47EBDCBCCEBA7D940DE2978CF04E899006D521993A96AE746026112A0A794B88C76840C2908CB40034F9A6F0914110E32F2CAF719DDF96DF2F563F8E1B00E1A28EA2C19B54E78893C674CE808CBD72C7CC9C192D0ABA5AEE9AEEBA8876193A8ED941167B20323BD19BB66B4D98C384BD32ED6C66420729C5252BB19C29AF0622500CA3047127C646ACF6B568FBE4A940509DEC2341159CC04079572D651CD862A99A8841716F1E30A8E6E128196BB41281B8DABC24BB65CA038D009404345B4A9D6C1CB37A9ABB60C6BE830CB34B70CB16452A14DE119CBDF444829D1BA93ACBB375ECD92CFFC0D64E7832B94C28B68645F100CB408F8296B2EC34933C72E660CBA0226A180691317FA1EB9F7C986A3B17F1A2F505F9BCE9B989695A6C7A67B925C6F69324E7BF612C2443A31395D6965EA6353EA64BA7998CD47CF7D1ACB626AEE32FDFC641C3BC5B9CF9B409DFEFCA7D7C19DD4153795DE7436C7D467BE23307DD1FB91EC5893C7F00EC17F2640CF046813A093D574A1DCE1050FD19B739624AB1638201A85A88FF88D47E97BED3B78C5E3E4E3091D44D0115C1938880235B1D5C938A5121B4F36E5142B1462F4956583108EADFC5F6183487485A5E30EA1E0D4895A9E391E616A2470887E9616D693142983239B0D42E5E825B8A6365D099D3015354A1E79C3565071249977943FD3B34513A04C83D33050265F4FC7D8354794801610D902EDC8618A6636EAD22D23D5C459A2C46CD738C984F84ECC388D8C387329ACF9241D57FE0A96D7442C9AC991814DB41C4FB48665833189A1617E988DC6F40D626D908AE1EB54734D191A89E894305C648B3065914C844AFB53BF83A35585094C6609C8F54B2609718D95645A79C8CBA28A279B659A7A2BD15CB07733EEAECA7D6916ABBA2C327492C477BDE8295F5D3675D3809596B37EB4566D893183347ED5B74F7E48920AB9A7B2B612D2B2B04B54CC4A289E9AC327D899BC6772EA443F57644C65A250C7F1A561299F2CA6838E388E5BBA3E85CF3D997D27709B3911CFC8EE2695475A21998DCE53CD12BD7C09B17CCAC52D315FD693970A716A9D9ACB7301DE3D13A06702F43B55596FF7FA6475AC014882C38406E9E8EC768EFDF08B146ABDE4E371D5D7553538A5BE0923246D0EA6943C23589E96938229EB1FA3BCAFD387D269D75F23C12461E44EB218920AC094C4498036A13BB1BB371A2017D3C07BA7F337014D7731A36F9D6C62530F6EB2C9A4E5B1BE6E8E55BE420DD09ADBAB4E8484412B9400ED6B5334928C5D54E764AA32AE2B150FBFC08077396D977F8686D5771067DA35C018112045E1938A2709C8CA5A4932C01463D78B25415ABC1F6514DF3CFCB249DA8E4CDD25965A49262C415E8C0864B28EA86C02702A26A2A5800DA28FED38268796189C6C5C72CC93088754243226AE55438CABCD55F963B432F473E5CD320DE3366AB0D31E84543BB609B4B6B2AD93A9C264A8482610D361181D5594E3B473C412B475A3946AC8D4607A9E3A58E34C72B3353B5791AF44EE55D7A2D97C6CB1888B45F0BA0E6E3315CBD6A1A1B4B9691AA54905A1FF4FE475E56774A826BD27F25A5ECD1C84A522975F5DD975F948735DAE4D0AA9987562B64059E7A69A3C2FA79E09D03301FA9D02D4DBBE9EEA3CA458B57A399789A361FA773C4AD4FF0AB9C15DD84307F1243049D00DCB3ADA2CB952CAEB4B9D8CCD645F92596B704D9F121378150631A9B766C353656682236BD34A326DA35B6D449A8CA4E7A474E97B3CE1A922C264641736C58C7ADF8560AB313190AC5982735A2988E4A5BAA147AE916E15B8467490932CD2B88288F851CC84D54DBDF5725AAFF90D0A4B6E30AE37519D33878F60D7CBD8C29851CD93507B069A454BF0096C3C91349520665B549D020DEDB3696EEB566EF964045023D324C38DA15A1C6764B01F6BEC2C3E6358B29196C5EDBD46546821F05B08326D8CB9393A3BBB686D1488C8041FA94A9282C24C2EDA31FD83831487CFD1543F8D5B1FD5E38A2A751D1B77A48DD890A79E9B4BE83653C5A5A1A585B68E46ED2DA8C646A2FB212C10F96C11B5AA0C0D52EA3F81532FAA5E74E016085C63BDA552A95D732814723A0DA3AE3FB23F256B4AADC3922F75AC0902868606288D9E25138CE0085D9288AAD3C184D348DE2F30AB6716B667A46305A61338EBCCA17D589A7048EFA16AEE7DE2746F36E4266A4E8EAAEBE0657274B7B593CDC84632B502B5759226CF2A2026F7D168694FF60034A86B7D90EE39532B378689127CF92B07F997FFE2EFF1DDC37CF52BBFC93D1FD9849B8A86BCC775FE33F7F68BA243C962491EDA9F1B16C74F7B7394FEA462F58229A717C7704C6114EABD04BDDB187BED61ACB36F9089C720AC9A0C2B89144AC37BD3012420A806D7B4C84E9C41A63C2892009D02A6F221C938B904C734331171A5A479F5539DA7664753476882F179CFCAB44ED814786BD4FD4420C86C1066C3309BCF64E19CCAB62A3E61049C64C45C12E231AB8BB1EC2AF2977E9E39977F486DC3ECDA20CFFFCD1FE216C7F0C4D854AA09857C448C48CEDE250C2C7C27AB0A7575CBE64C660EFEFC4B58B4E11AE62F984BCE77CC88B47A4B4A221A307CF238E7F6BFC6E0E1D7B1C74ED12CD05458C591AC5D4C55F1283A7926FC7686DC0E66AFB88C6B6EFB85C4255E02BD0986F2C78B630EBCB295E1A3BB99E8DD4347D0473E2AA9307EA87D074703B8542665E907B8CD2ABFEACF5DC125777E8066F1244C60079DD04C1AC362E8BBF7C70F51DFF103FC7A15378A28391E55D9ECED2C634E17CDAB6EE4C69BAF53512B6340606A2DE3986D829D161558944787D9F9D83F50ECDD45BE3E4E46583676C498DD463F9D54BA37B0FCAA9B59B9B89BBCF8D14A03A63EC8737FF19F702D494284E72E558F28B618084BFED4EC0C153B4B29D384D53C9B96F96B98BB6C355D3DB3D46BD1309ACC1F53F1199D6E1592128BB0B4073013A0DFFE719D09D0EF1CCE4C692A4D3CC1EF64E5250D2D95F39472B20C611FE5034F31FEEA0358C3FBF1296BE661534B04E453A0C2ACDA94CB9B62BB290F5732667DC012F1A564759B87637AB32A09D2062E3183EB6608E69DCFE7CDEF98066B24165A9AAD4E6E1BC99336F98309BD51190F26B08B01ABE135C8B512FC5B200703BD44822BABF0BEB0495C6CCB579D8AAAED30915B46E38ABBC8AFFC08D9B61504768CD3B783935FFD026E6542F71F191B0F957E684069D512142B2ED1C4F72C4AB1CBB1FC4A8EDB7389DA9771DB6D37B2B0ABA01B80413622068F1FE2E0B33FC43EBB974DF0DC380000200049444154964A2F46AA49365D61A6887C86D1B796EB57B5F394FD168EF94B5879C7AFB062F9020DF62A1A95A017F1E0099EF8EAFF60767886E670C094ED225624E25B09461F2AE326261B96F41A4D58EDF4E616535F7F2B576CBC96CE9646830F28722044478B91C0E28DFBFE882527BE8FA7BC50979A48BE26CE3427334BD899DDC8473EFD695A5A0BFA3B8DFC6972B7E47FA9B85114533C7D8CBDDFF802EDB5D38ABC3B5105971255B78D7E67362F35DEC470FB6AEEDA389F0D4B7BF4F338F32AE7BEFA1FA986E388D3A60849999E89AC310F2BCA68735C36E48ADBC0B0D3C699CC22ECD9CBD878D366BABABB1529490B1913A0CDCEA6425D8A85274DDA99003D13A07F9A9035FD674CB014EC2FE974DBA2416CB03A91C21446AC0C72C4A5B3D407F652DCF32413C7B75108CF900B87148F4DA70965BC7C6AA2CD388B1802461A10251B5500608A039634A50C94717E232F1D904945204D809EDEF57C37672FE7659A93EAAB98FE9EC9D233C511CFC7A68DED523A25997055B4E126A8AD313FD5CCDA16317B2565635905C27A9E31BF9B62FB32E65EFE2172B3376165E782952594FED789ED8C7CFDDFE3D4C614221AF4DB18759BA95939633D26413071E0964CBC66799CCB2FE154D4C1B8DBCAFBAEB994EBD6CED55948C962B3A57ECE6C7B84BEED8FD31C0C910F47A9B8A211D24E2D16B53A39564184433261916C5CC10F4AEC6C7E1F473A6EE0EA4B1772E9EAF9BA31B8618DD2A9C31CDFF2109CD84E637D108F90B3DE1C8A76A3D9AED4045706936450A9C2ECCA710AE13855B791B35E0F87BD85342D58C3C6CD77D1D2D232D9629090D7371673ECA13F61E5896FE34ADFD9CA30E61474913405239CC92C6047C355E4662FE7B6BBDF4F2663B4C9255BD6DE712AAC245047B548E9E41E0EDFF707344772CEAD78518942388058C68EE416F0747E33C7BC85DCB9B68DDBAFBDC42C9D234F31FECD2F50AB97A9B939465C311468506956B9A95E04B9B044212A92894BDAAC1CF53A39E9CFC35B772B9B6EB8917C2E97341F93B5A8FB47D2543CAF569B8138DE095E7DF3EB3310C705D764BA8646E2BDA7E59AC924D52F36EDB18565A2924CDFEDC37AE37146F63C4B86716CCDA82B09934016AB8073BE323752B53933866B3AFD064A99F695083DE998F8B4206D94F34CE05464F73C72EFBB09CE9AC218EC5B25550D7463208B041B4CC681277F574288D16D24DDB3341B35C310AAD6A67086690CC5764D098B75BB914AD48295994FEB863B60D52D640A8BC16E494C480D06EB1E9700FD7B38B561F5563C9C5941AFB7506DA10466900D4FF8E7919B55D6076E8651AB95B25D003FC7E66B3670EDEAD97A1C13A3831C7FE4CB34F5BD4666FCA4B6E5EAB14B5F7601C7DD854C441902276306EFA31AB97082598CD0553BCDCB4DB7F04AEE2AE6168ADC76D552562D9EC781E71FA7F8C653348E1CA4A372D2588B39CDECC95D429F338B509BC046504AADD8A212CB6BFBE909FBF47797EC02436E17673273A974ADE1031FF9185E567EBF39F7D3C321271EFAEFAC38F1104E18125819FAFC1EDD407A6AC719F63AD893BF847E6F3E4ED7723EF6D11B54945F687266344A7A74B11A2D84C5B3ECB8EF2F6938FB2A4E5CE78CDD43362E32273E49297219C9CEE3E986DB38EA2CE017563573C7F59718D5BC233F66F49BBF0FF580A2D5C8C1DC6A4EBA3D4C38E20014918DAA14C20ACDE1080B6B07680FFB09EC0CA7724BD9DD7005B5A6392C5EB9961B36AED271F27440EAFCBEC6F4B53D8341BFE5933A0371BC8B20A6BBBF31784DE9A22AA8A445A93C16AE611D4C72AA64C0631C6A4304A7F733BCFD3EA2A1EDE4A3B3F862F26915A80532C421596BA00D41B57612C562499BE2980C2E513DC215FD60FD5C697449674A82A2046909A4866E270D43310830A3E6D3B1EA77716E936F31D4BF542BC40CD598E0AD0D490DD2A68169D88A6673922941E50C084E2CE6A94E4179E4A125A5B19936940C2BF41A198EE7E3CCDE44F7B5F7E2B52F03BFC36872086D2C618A49F9EB1D7F99C1AFFF2E6EE90C91EFF36AEE0676653630E0362934220C0CCDD0ED1C81588A89ACA764CB56A0C6ACBF7CF70D2C9BD54C1C84ECDCBA8D78FBD79955DCA70DB2A2D7C269A7874399951CF05728EE2CB5B868098A96BDB04C5AEA43CCB786389059C3416B11B3BC416EBFBC87B90D31A79F7D90EED35B68090668884B9CB3DA389D5BC28B85EB39E6CC27B47D726199A67814D7F570C2324B6AFB995F3EC09CEA09DCB8462DD3C2517B1EBDB915B42D5AC12D1F78BF5E6E3987BED188630F4A06FDA0E2EF91DBC0217FA95EE745E57DD4DC3C4772CBD963AFA1BFF5523EBA79296BE637282EAF0C95243B158C3738BE83ADDFFC9FCCAD9DC07232EC7557A87ECA8ADA3E02DB61D09BCD138DEFE7A8B794BB5617B8EBFAF5BA02AC634F3170FFEFE3944A94ED165E6EBA8E3DEE4A069D763CDF254F89B05A27571DE1DAF24F585EDFA71B48BFD7C389C2060ED1C3687E0EFFF69FDD8D9770CFCD986C9A7424BB7ABAF6669A846FFDA0CE04E87711C4A6AFAB49A94A094B52949A003D2D7227CD11E9FA04502F416917633BEF67F4C03364EB2338D5808C948B5195382AABE38AA30D4579484D06AB432F42BD12FC4F13F8A48927BE7E6A4C9B04692DF94D9056EEF0A49ACFBB38AF696F494F31854826C533D31D49F7A7442C5EA98666343D16635311A0D7F3106C5898153196E80EC73E6194A7EEE519A799960DF7D0BAFE2E282C2424AF6C0BB39F24034289DCA777E22506BEFE7B642AE7A8B91E5B7377F27AF60AC6F2CD2C5BBE84F9AD8D448164E6190219A1D7BB50C78B4B2CEA6A60E1AC1CE28F12178B3CFBD53FA767F0456645A714633E935DC8DEC215EC633E67728BB1E31A73BB5A58BEB087F6D606CA9588E37B76503D73883E770E67AD7666B9A3DC71490F6D630718DEF6004BAAFBC98465DDA2F6E7D7B337B3867DFE7246BC4EF2B90C0B3A1AB8E5F2C5C6453C0A281DD941DFB6EFB0B2B883D6704885FBCF145670B2712D67DC4E36DC700B97AD9EAFC6B092419FF9FE9FB2F2C403E4B0188FB2EC2C6C642272B822D8A523F703D91E5ECE5CCD0EEF32AE5EE2F04B775C31D99E10AD67A56703077FF8252ABB1EA5239A602CCEB33BB39A96709835955D3AAB35E875F193C60F70D85BCA9D6B0ADC71FD7A0DA1CEB1A7E9BFEFDFE3942628BA1D3CDF740BBB331B1876BB98D7D3C9D56B7B18192B290CD4FAC29F317F609B326DC6AC66CEF84BD8E7AFE07876095FF8FC5D64D3A6BAC25D069ED376F97983343319F44C06FDDEE2D505F042F2CFB40F731EB1DF2C392374930C1C24BACA9A93EAA0C318D1C411860F6F61ECE4CB64C68FE38F9F21531DC38DCA582230A4F88034D27C1DEDB6DCBA0AB36B375C0658AC8C52EE94059566D1DAB43142F229FCF0D307E8A4C1A8D9724AB53363172658CB38BA0015C2F3161AA049881479D6A112636A20624DC2ED954CAE6ACD216A59C784DF41F3C2F574ADBA11BB711E1139A55BE96F49B271F98B6C7942AAF37B5FA0FF6BFF0EBF3E46C9CEB1ADE94E76F91B54C2F49E3B2F67CDBC2E755DD7B6A8B2154C8057B849BF675AA6FD5B7EC8D073F7D1119E252F1438CBE1487E1D5B0AB7722AC8D3D0DECDF22E972BD7CC67DEDC363D9F5433E8DCB971B6EC39C9C17345DADC3AEF5B3B8B96238F537AE58734D50609A4D5E635F36CC32DECF0D7D19AB799D396E1C6CB5730BFA725696482E7C4DA803CF9C64B0C3DF145DAC78FD0169438E1CFE160762947332B695C7C091FBD69258DF90CA7462C4E7CE70F597DFC7ED53A1CB33B78AEE556C6C872F5F85374468394638F575B6F618BB78925ED161FBDED4ABA5A0AAA9C98E6A9A383A3ECFAF2EFB2A0B4970A0D0C676673C49F4F6BD0CF9AEA1B6A1E31E477F26CC35D1C751772FBEA266EBBF1326DF37A479F61F8BE7F47542933E275B1B5F136F679AB28D2C0FA25B3F9F0F58BC8173CA27A88D3FB2C27BFF69FC958456A6E0367BDF9ECCDAD63AFBB94DFFAC4EDCC6D14ED73F36514168CFFBA99424A5E98C9A06732E8FF93F89C50340D4FF362FDB7698C8794843F5999E84323E1A2020C433C00830719DBBF9D5AEF5EDCD249A89CC48DC60D873AF4347855308EDA52768B8BB3422893C249060757BC3811FE495D5CCE179878F7676D2611E5FC041B379086C10C93E03CDDDA2B9D5E53E682199E885DD966847ED542CD69C5699C83D37609DD577F1C722DE04AA34B0636324A4153064502A198A3344D5209D0DE891718FCFBDFC5AB8F336E6579A1E956F6662FD56CF9C3775DC6BA85DDFAB3411CABD492193F4F40171131123D6AE0E93FF91DD6955E271B95B4041F77DAD89B59C773B99BC8647D3EBAF912562F6C541B2E8558D47C21092658546D28CBFD0BA0B1D6CFC4A37F4169C7938A2F8F66667336338F9F64AEE750660577AECEF2A16B979311094FA19289FEB282FA21A1C054B512C79EFD1EE3DBBFCFFC89C38CE667712C339F573257D29759C02F6C68E5BA8DAB383DE672F23B7FC89A13DFC48E1C46DCD93CDAFA410669E0BAB1C758189C2017D7D8D178252F17AED280BA7CE97C3E78EB95538A7A419DC7BFFD8FB41FF921F383E39AD59E72E7D0471373A233ACABEED01539E077F15CC31D1C711770FBEA166EBFF17203571D799AB1FBFE2DF56A85616F16CF37DFCE016F15D528C3654BBBF9C0B54B686C1068AA4AF5E8739CFAFA1F53604C79D167BCB9ECCC5DCA4E6F05F75CB79A1BD72F3C2F104FF5B0A7D5EEFF7F7B5F025F5575ADFF9D73CF3D77CA9C90810021090984799019A4CE828A885A6BDFEB7B9D5E47B5752C4FFDB77DB5AD5A87DAC1AAAD1650A1D679061C502C606592790A53022401322737C99DFFBFB5F63E37272108416825ECFC4ACD70EEBD677F7B9F6FAFBD866F298256047DE254758C2B2DB7999DA4E326A095C72CF25F39EDAC3391F3514F28C7B1425EB801A8D98DB683ABE0DFFD01C2F53B6086EB61844977C38920059BC8D5411A19F4D0B3AC27E5F692BD28322488A0D9F2A6EA336B1739A92C0E7A8664468695632DA529454BAFF6CC0E91E34BA980641951F35511210DE8142C4B849935025AD62824E58E85B7D730C0CC92692A22658C83A32C7F2A937F6D72A384100709CB3F41E3337723D6528B56C38375C953B1591F84B02319179F7F0E8AFB66F03D91B60769E8999A06978BE4561DEC090A6B3A6F872B1EB809A3FD6BB9F0C5EF484699A7185B8C12F6670FCEF1E1862B86DB72C1DA952E44959FD83028684B1679ACAA14A1250F21B86F1D0702CBDD03B1D3330C9F3A4A50EDCAC1AC215E5C36A15868A2E822E990F29CB9138DEC68BB65FDA7A85DFE0206552F479BC38D4366B608D27906E1C242072E9C3404879B9DA878F5210C2E5B48C5E6A87164E3ADB4EB50E5C8C058FF8718182C4566A00A7B3D05D8E11B860A2D1BD9454370CDA5E708822653A0720F56BEF414721B372129588B9D89E350EEE88396700C85913D181958C325E6D5662E96254CC71E673E5BD0D3CF1DCDAE078DB238FE3607A14010756636962793053D106D1113E7146763E6A40148F4B981B01FC1FD2B50F5F46FE08B36A1C5E1C37E5701367A47639B7B30CE1B9C8E2BA70C8B4BA8F289D296CD117FD214412B82FE5C041D0FBC49DF99B4B8E2590AF1E2552A10B0DC0232B068CB88E1A28238C107596F9A5A6B856B4AD156BD1DC1CA2D68A92C45ACAD810B149C68851E6D80CBD1CA0515A2C250A6B0C5A57364F9AF5CFCA2D2AEFB5F82A0E9CBEAA948FE66FA9DF07553F091E5963493FDC7B19817D1981B219808E86E44137AC1DDBB04E983CE85993D18706673977222F1F6325F994FCD9848EB9CFB214A226382D66094AD42C3DC3B60845BD0E2F0A0D433107B1D7DD0E648404E4E1FA42578A0932E89164690F2F29C3E64E51521BF301FA641F74AD6B586950FFE10839BD7C38885D060A661937714B61BC538E82EC4972F1C89497909C2AD441B862C8996721F888643D0C9F2956E17FF9EF5082FBA1FFAA1EDDC7E6CAB67343EF54CC041672EDA9C09B86268322E1E37902D53EEF7C8BA28C2DFCA3A4D5480B2AB0C55EF2FC4F08AC5BC89549B1958927805767A8763424E08174F2C4620968803AF3C8C92032FC21109A2D1C8C0DBA95F45B92B1F03829B31A875338AFD5B51AF7970D8DB175BCDA1700F188BEB674C1204AD033BDF7B0ECDAB5E426AB4116198F867E234EC77F44562B801C5A14D18EEFF982B126BCC5CBC9B7825F6380B71D9602FA69F4B697644D0EFA365C19D680D8651EBCAC13F932EC07667119A35174615E762D6C401F0B94C38A92BFACE3750FDC2EF60C642A875656187672893F97E231733C7E6E3823185B2B3BA585DA282D03206E45A5504AD08BAFB94657B85D5CB90F574A52E253F7D22FD4E783EC925600F544B139AE269965F84B539ACCA2AE18F634F2A25FD879B106E398840FD2EC4427570045BA0556C47E3FE8D88062A61B20B848A5E447300CB2D204A5E0449F3FFE2EE87EE8DD84ED0A2EA51E47E5360877B146A06C2BA1BC1981761A4C29B940B5F4E112219FD11F164427367C293920747420E6B4788A601ED9B45FBC6219D409D02AFC2C921CE17CEB2D5689C77077422E818A58365A2D691C4644D8141129BA26D2A160DA2C5484393B3179A13FB61C4F8F118599401A7234C9D79F1F18337A2A86D279CB1206A9DE958933001BB9C05A87164E2966F5C82DE2E19789512B3B65B127A16D4EB31164340D37064EBC7D0963C046FDD6E440C0FD6FB266185670A1A351F12929270D5B83C8C2ACE16DA18D1288C78299DC88E21E2DE7FB8110716CFC7C05D2FF232AA35D3B024691636B98661505233A64F19089F3703FB5F7D0403F7BFCA297A4D7A1296A4FD27B61B4518DBDF85ECAA15C82B5B0297164293666253D26434F41A810B278D465EDF5C3EA56D7CF65EA4EC7D8733400E3BFB6099F74BA832B29117ADC4D0E07A9434FD83D76CAD998BC589B351EA1C8099833D98317558DC82F62FB81B2D547D696662936F224A8DFEA8D35D18D43F1BD34A72A1075B71A87413B2AA9621F1E06AAEA02CF30CC0DAC489A8D07BA339EAC60D5F3E0FF91974B211325BF48FCF97AC9A48DFC9660DA792A0A52899DD3AEF1890B43F177609D6639F9CEDC927F1ABBA7275D21FEDC92AD6C5F1C402B9C8651C495CDE39A3A58B328663D95CB60349201841DB992ED8DF3DCAB213B42D3A68AF7F8E3BA42582C79A349E894E8BC1B2C22D66E247987AFEF985887E380A046A11F61F44F4D056040F6E40CBE1522E8671469AE1D4029CDB2A8AC9492B9AB22A68BA3B89B29FE0A0ADCA46CAD4A0D2613EE03B2873D78980E6419B968036473A8CD402A4F51D056FC168387C3980D3C3162C15994073713BAE0E35E2B645DA6171C7D52DAD0A482A1311696266F93A543F3D07465B1D5BDA41DD4440331174989C52470698499585D1089AF474541939D8EC1E815E8346E2F2097948F7117E4DF8F4A15B9017D88B685443B599834F93A7A254EB832647126EFFF625C8A4D6E0923C44AC526CB57CD261DF3F55BEC5D0AAE9A8DAB402C6A20790D2548E90C383D58953B0D4338DADEF9C5E699835A50405D9E463172E27A10047298862EAE9BF871A43D8BB681EFA6D5900A7A1A14E4BC07BE9B3F1A973287ABB9A307D7231B2533370F0F547505CF61ACC68000D8E342C4ABB9E53022F1EDD1729152BE0D9F4327AE9CD08B7FAB13D7902CA3D03306CF8304C9C300A08D562D7C2FB915CBE1215EE7CECF50CC61A730C1AB42494180751E25F8B92867FB2555BE3CAC192C499D8E52CC415250998317584E8FCB2E703D43DF73304836D687524A2DC55C439DE0D70C1E77220C70DB8DB6A61345620335C85A4483DA7016EF18EC0074997A0494B803BD28ABBBE3F133EF98CB019214F4A1AEB8150ACE56409FA1C18DCF65D3C77E251125A30D4F498534E39622F356E58AB5CA6FBCBEBB90519CF954DE2C02257EB39962266965126129AA462617B018074DBC8060F2CB828275CD6B95B8D42E8ED2D69E3A823C26B9D9C84718506BBE26B076BC1B2EA3A32B5BD494F20180591F46751D0095241FBDEF6AFEEA8D2DD1BFCD75FDF0E2F6F0961D26CF6B3DE472C7818B1EA52A0621B5AAB7723D45889B6862A44432D2CDF2972A9651FBF2E543F8E37165E9B96ECA6C3443846812E13315732CCE43E48CE1B0E67FF91D092F2A0E969D0CC3461295B2BBFC37F8FF769C2B816161595CB85417D18593888166DF9A7A87A760EDC813A3E0EB7908E8523097EDDC3963C05F2A2D40040D3E1D793516366638B391829FD07E1EA8979C84A8A00913A7CFAE08F50103EC0A5E7871D39589330097B8C7E68369270DBB72E462F937CE9526785FDC4F2E192EE23FA15E5A6FB351D8737AF84F1D603486D2A435837B13A692A96FAA6211A73A05FEF2C5C39A5047D332831CE326B84BFC1EA8D4B963859D0FBDF5B80FCBDAF02E110FCCE54BCE5BB049B7DA3916134E1D2C9C5E89F9589832F3D80E2B25738D5B2D19589B792BF8C525731668CE98B22AD12B5CB1722B9A11449E1266CF38EC41E5701D20A4A3065F268A4D76F47F9A2A79070780B76FA86F2DFB7600022CE0494380FA2B8710D4AEAD7F07DD5B832F15ED2E52835C8C591841954A84280ECFD00D5CFFD0CD1363F220E13F58E742EC60939BCD0A35178A2ADF084FD70475B39504B4A7BE47EDA953C061FB827231C89205B6BC06DDF9D05CA3DE2FC7C918C249A1A939A1E8945C5FB3F9E689ADD2ECC9B4762496360907AA1244041D0A2CA56B481A6F446291E2E6B0598C83BA4C85A046D13236B3F98CA652D0D33D9F957F45E90BA2756DD834D4955744CA2AA4EAB56409CB62D2E678296E1AA882108DAB4085A66D2D2271E15BFEACAC8E9646853BBABB6206D4FA7EEEB5FDEF2EAD4DDFA697EA7782EB30537B941E89FD559BB1508D60147CA11AA2E83BFF6209A6A2BD0D2548728C95376F34B1822423C21A6BBE1F0A621BD7711D20B8601990522FB42A32A32EA77480F06599EF48051CEADA549DCDD0FB52C1FB933480B8BAD8AF275A85AF013B85A6B118A39B0837DC703508174C09BC26E1EF2119B86136D310757DB45740706E5E760E684626450C7AF4823563D7803F2837BE04614754606D6F8C67399759D91869BBE7505325D244F2A02AD421A56EE1A6C6D897C627A0E299BA37AEB2AC4DE7E1829F5BB79FBDB903401CB7DE7A2414B466E5E01AE9A988F3EA924092A3C5FFC68B26F23CACD17E8DBAACA2AEC593C0FFD0FBEC31B4CA3918E77D3AEC216CF08F47136E3D289F9C84A49C7A1371E41F1BE1779C7AC77656351F2B5D86D1661C698DE38B73011EB5F7C020995ABD03B76049B9DC3B1CB3318D5097998366924322B56A079F5CBC80A1CC0EE8411D8680C42996710829A0B25AE4328A85D8581F56B78CC756606DE49BA023B9D859831381997B20F1AD0F72E43EDC29F221668E6DE9C018787CBE9A9838EC981D930429A07CD7A021A5CBD38FF9B0A76A83AB24CCB42821E443F4F1BBEFBB5CB4964954D4BA2432A42E2C0294BB11250DDF541EFC2DCF937E1AAAB47C3246959210E2E1566AD188A2D0664A925C8A99546B40CD6B3EF51C648C4DA6D2770BB1B52FA662CB555AB0B7CD429E697D455DB6D7869615BB95C528ED7EE72E79D4AC4CAD940B1BB45A5F7B4DDDD28C76267DD78128075041718B605C3ECE2B014C9BBF9347679B922E863A1C8AA6DA4C12B349FE581593C3C32EF97BDB531AA586C01A2E416A132F27655BCEE4D90CC2563EA31A565EC03406E0B2F629A8B33192CC39C8D4D2221EB193B45DB3697BAD3F8F6AFC1910573E068A961A9CD3509E762BD3912B59EDE48CDCC448A4717ADB6A41A1C1DCB5D91668C1D948B923EBD58B088326556FEE67B286EDBC225DCA4D1B135710C4A1DFD506564E286FFB916E92ED242A1EC189B39C21E0AE1DEE12C3992B400D0B47B03428B1E81E7F0564EB3DBE61B85B5BE8938A0E5C09399872F4FEE8FA2DE3E44484E5A147CCAA7DEEA6D1843E9864F7178F9DF915FBD1241231147CCDEF8D07701072E07240470D9946224FB5251F1CA431872F04544A311D41A5958927E1DF6B806E0F211BD3065580EC27B3F45F96B7F4056D34EEC4F18869DAE126C750F418657C3D0BA65E8EDDFC99A23EB132662A37B140E3B3250589087017A259C9B5E4351C35AF67D927F7949F24CEC20821E9288E9534748825E8AC6857721D21660774EB53313757A0ADA742FE3AE474268D13C68D212516B66A246A3134E32029A81D4B4245C3E6D0C06F5F6B2042A0939116948656FE179EEBC5EBAE183FEEBFC1B71D5D563E0229D6DA9D42D96A6A42616BD12D0B3B56A59A672F90A8F8B4D045BF669B4424BED4B41B601B308D48A6F73A71C6ADC41042D26DB124468DF0FA45C2F1F4BE5A6CFE6B3F4AAC4770A2A46B3B92DF83358AD475AC2D265199756906BAA43319A70D19005DD4A047D9249025DF18522E86312B4AD29B71557B075426AF7BC49AB5A8660D8C541A4DEED49B2C258D224606AA2209FD8202C91758E6758FA48D66E2F89BA7B1B423B79F17736173EBB0ECB57E1D0B37360061BD01233B12EF93C6C3687A1C548C4AC19E330342F5376F110962E95C953CE316F5ED20CA2FF7C78DFF7303CB8018E68107E3D0107DC456C41EF71F6C5F7BF733D5298A02DB56EE13BE64D4E37441E333F1831902A5DA8B294F3A063FBD6B06F789FBB18DB3D23B1C3284238BD10578FCFC188C20CF6EDB29FD1F6E0910F32166DC3B68F16A37ED56B280A94729975997B10569BA3B0DFEC8BC129315C3C6900BCDE3454BCFA304ACAFFC6BECC1A3D1D6F675C8F3DCEFEB87A5406260DCB8523588D6D4FDC85BCC6EDECDEA134B9B59EF130C37E4CF62F4376F4089FB896A75C8155AEB17018514C1D9987BCD86134FD63210A1BD7F1FCD698BDB1287916769805B86C8807974D192E5C107B96C0BFF02E048361343833B1D97B0E4ACD621C3132451FCA681B57815241929F4E56861B6E3D8ADC240D974D2C417EEF7491BFCF588AD453BB1179D411BE3B043D8F2CE871300D11738977A4B18A9EA45B99ADD338638AD42926525AD3A2B58CF859CE93D503818501AD66C15C7B600BA9B0E6B928D6A240359BC1B666042CE0A5E972FE6D556B717FB2D426E757516AAC654A5BBB87A8B6945119B9E90892665BDC3A245856B474DFD0DB070331B4928B23AED373524F6487172982FE2C0CE564705A9E24436B7717012819D1B02E205FA0D40BE1205737E6271EEBB4CA7265AA494C7605E1F5606587F01BCB0E06D20778122E6F61D9580681ED27B24F48CDEEF0823970B6D521E8F0E293C4F3B0D1390421C38BABA68FC7F0BC2CD92FC44A14A1078FFCEF74A70ECEA4083B80958FFE027DAB572029D6C48B9D3490CB5C85D8E41E86E9332F47515EB66819151F376D7851847583DB41D121DAB02455FD55A859F2185A377FC8CA74247854E1CCC33ACF441C9019AD5300002000494441544A1A84CB466760CA88FEEDE757699259FA18F5E53B50F9C133302B36203D780407CD7CECF60C6317C411770E26F5F7E1C24903D11A7461FFCB0FA0A4EC796EB9556BF4C2A2D4EBB0CB9987D9E76463E2F0FE7038C258FFFBDB5058B30A2DBA178DCE5E2833FAC18806901FDCCD1A288DCE34ACF49D8FCDAEE128EC15C3E59307A3AD6C1B1A962FC080C6D588C2856AB31F1627CF44A9D91F570C1604CD5A2B7BDE857FE19D0805435CA8F271E285D8EC1A8A1A3D0D19A98928CA3185EB82C85737782349766A18D03B15F9998930B8E7A368BA2C8891BCB25645AAD445EF706C3F511FF41ECC9D4B16F4043849528F5AADF12CC926C032558478935AC919719F855433E34547CC2C5AA75995BF6C53DB2D6CCEDA22F296C145EB59621131B16E453F4B6956CBE0A1B88C8AB7E2CD633AC6CBADCD43122CA3C2811F19A894BF675FB6C48B3F410A9975786078A39095BC6441539030103F6B77E3E93FF6A58AA08F858D65D05AA71F3E1AC948AE95CB67113413B95C48F16BECF477227325F3BBED660E5B7D640189335EBC4F86B53079750B1FE0C910B4FDE427F285C57994AC32C7FEB538F4CC1D7005EBD10A139F245F848D54EA6D7870D5F473303C2FD36AE9CA2E11FA7C22523628B84B0910D480BDEFBD89FAD52FA377A81CC9A11ACE1A38E82AC07AEF38764B5C7DDDB5B2E3872833178F97C8F76E0B86B07DC72E64676723B7572AF45023CADE9F07FFDA45C8081FE67C703F92B02AE97CCEFB9D3CB22F2E9C3C52A8B751493E9112737F0CCD75D5D8F9E1CBF06D7F03E9C16AEE85B8DF3B04DBDD23B045CB458B2F1B33466661EA39C5A8AA8FA0FCC50730A4FC157E6DBD998545C95763AFAB10D3C7E460FCC802E8868E0D4FFE0AB9FBDFE5221DEE65489D4CB8ED54845D27FBDC45D86C0C41754201A60D4EC6F48925D8B6FA130E30165316073C3862E6E1DDE4194CFE579478398B83F5B6F77C80A6857722126843BD330B2B922FC51667099AE0C1E8E2DE9839310F493EEAEE220D4C56EF13A737CAEFA63D8D4F340CA9F0410B706D26E0496971ECC1DCBFDE88D9574F80C1BDBA48C65774A6B10C76663683FCDD744FBAC86F642A138D24C40C6BEC8A62A2155C6D5BC6B6EC0EBB535A3E46B4B6E447C45B8575F062481FB31C799C7B2DC54B2BABCE7A0D6F64BC6E05989657846575A45D7494FE9994F1A56D44740A7520108A2018A0C2B61379DE4FEC1A45D09F8593FD682517587BA275877397D435B0FBB2BA3B4B9D7231AD9522F768B139B4FB21444A5EFB3FDB279FD8CCCBAB44D71661C15ACD5A439A0346D95A542DB81D66C80F3FBC589B380D9B9D43D0EA4CC24CD2E2C8CB8867D15A046DB27B43183524D644FD08FD872BF1C182C730C0BF11D9C172F68492457AC03D1007F5DEC89B7419C64D1A6965A3F35DD156B77FCB36D4ED5A8F8DD56178FA0FC7A5138723CD15C2A6656FA061F5EBC86BD90A2F69828775EC4918C62E86DEA32662C279E7C9EE2B0211E6864808812DCBB0EF9DB9486F2987271A4034A26347D244ACF68C47B59182848C4C5C33310F05B9A928AB8BA2EAF5473064CF0BAC04D8E0CCC2A2D46BB0CB55C8591CE347E6738A5EC5476FA2FAA3E791836AF882B58280B817A08652CF50ACF58EC321470E90D00BD75F320C45D93E6C59F531EA563E8FC2865520BDC43A672E96265D823DCE3C4C1F9C808B278FE623BA63DF47685C783722A4C5E1C8C027291761AB73101AB5048C1E9089D9930AE0F350AF494BBB445882E2B4A0094D109E5A8BADAC34378BFCECAE34CBCA6E27A8F822EAA2E5D55FC9C5317B3C28BECB8173DA08659B2D3E3AD10230840F57A3A86408D8BCB10A8F3EF6111A02D4F1862C7B07825A0CA637821FDC3803E34664C3E0E6C2F2F5347D64C6524C3E063404A378E3F59578FFED771074F810D4753CFADB9B9099E212CB5716717135048BE5687C6BAD0E60D7FE0ABCF0C24BF8EE37BE8CDCB44C6801A108F6D25BFBF1F7D73E801E16C60F278A506F479D7A66B600861FDE8426DC75D7F7D0BF6F865857D4503A7E6AB5DC2DE2D41808C4441E74975A14DD7A2CE3172B823E166EF2C864051FC4BEDF95556C375FBBBEA27B532388BDDD41228FFF36061622A3EDEE89788BDAEEEE09FC30502054967EB3BE36D99F5449B81A8716DC0167A8152D7A22B69BC3B0D799CF043D78702172333C421A34148646476CC36441A2ACDC5CF8D253C542275DC070149F2C7D07DAFA97D137B0172EF811881A68317B71F795C34925484CF621353D15BDB2FBA0A1BE014DB50D8856ED42464B19D6E8037020E31C1467B8316D74211A0F97E1C0CAD7915BBF1E29816A2444FC68A0CE2466162A5386C2D5B704D959D9C8C9CA463414424D7D132ACBF620BB6229926A36B0B07F2BDC68766661933912EBDDA3D9D21B589089FFB870384C43C3BEDA180EBCF2008695BF045289AED7D3F156DA35D8690EC08CD1FD3079543EDC0665111EC6E2B97F4251CB4664B651EA9F9BF1230ADCE01D8B7F265F047F484356660ABE7DCD04243962D8B66A25AA97FF1D054D6BE1D05C5CB0F361D225D8C55A1C89B8642A69713860501EF4DF7FCA7AD0355A1A56279D876D6609EAB5448C2AEC856BA61422511234BB44A4651ACFA3605E8E77A2902E311924B08EF571BBB57B043D77DE4D9875D558B84C725548C7099BC2D24097A7403AC7B4D607F03FFFFD07EC296DC4AE323F9AA254804F454ED476CB40CC15C0E40BB3F187DFDF84217D3C3068B7E788A3A8FE0C3407F1B3BB1FC786B2FD987EC9798CFDAE4A076EFFF96F31E3C27CFCF1E13B58B48BA582B97E401809968BE3577F5A8197DF7C0DE74EEB839FCFF92E7C0E171C0160DEEF97E0A127D760DB7E52AFA18E4394764827204A1B0A028E565C75ED97F0A35BC6A0A4A43F123C54044729B754A4D59ED36D4FA00EB6491F340765BBFD307649138AA08F49D0B6731253B348D33AEEE6D8D910EE063B5BF4DEDE8AEBE88A26CBFD6CDF2AE25B44B7D784A54B42B9C8949E268EC1BCC8CB3FC6910577406F6D421026DA3C59A88FFA107138E17639A0479AE1A094C0A88E58248A88E1C37EA3376ABC7D9056320EE3C70E45BAC760E1FA582888EA2D2B50BEE41964B5ED83470B70697AB3918CDAA8073E230617A53C694EA114188EC0156B83116CC4EAD44BB1D21C87443D887347E561DA980244EAAAB1F495E7D0FBC82A0C0D6E833F14439BD38B7A23151167129C4E83CFC014440B8648E40AF0B41D40A2A3852DFB327711D679A7E090DE0B7E331543F39231F3FC1148320DAE4DAA6A88A1ECD50750B4EF79D652A646044B32FF0B3B5D0371C9A81C4C199107939207A8747CFD0604DEBE0F03DA7622A43B4597183D1D9B93A76029C620D11945612F135F9F3D0EDE68045B57AD40CD8AE751E4DF80584443B5230BEFA55C8152D7005C3AD887E95346889349D907A85B70B7D8641CBD98ECB73A07A259F3605C7116AE1A9F87440F159AD0A2940E8278968F5590258B7D6CEBD6F21858F673BB4FF5447DD0BB319F9AC6CE1ECFCDD23963815C159214A9693959BDCBFEB917DFBAF5E7189A3F187F7CF007209916B2B223E4AE8B6AA04253B26257AD6CC5AC1FDF89824169B8EB860BF0DFB32F16C95131E0A6392F63E58AA7B1F4FD67D116897087189FDB442006D43437C3E5882123991A0AB777899172EDB8E68A6FE1EA59DFC0DADDAD58BCF42DBCBBF83E64A6BBF9F92DDDB40F69C929EC9AD9B0A305DFB9690EEEBDF7664C1D9F2FB289C867AF031EAF0B098954F445731D1601453A038663D075433456B0A506920FBAADCDD67CBA1BCFFE31694815AA1C031ACB776777F0DA08B083F7A3F35B9CACBFA1331FCBCFEBEAED3AB80FBB32EC4F687170662C5BD0F6283F3995F58A35A85C407AC40D701A0622113ABA894D8ACABB4D3D82B6500486D3C7DD4B5A626EEC4B1D8D9D463E0E9A7D70DE97A6627C111D0BA991400C5A2880F235CB50F9E18B488DD5410BD6C2ED8CC2454F4C6B1313212D7AD2B56E23253C33098DF0624DD2C558E71A075FB419E78ECCC545E38BD8E3595317C2DAA77F85A206CAE8F0C3A5B5C149565084EC7FBA551DA170084EC30B4D73C1AF3BD14C9B823309BB1246E1236312B7004BD2FDB8F9BF6720C31D030D91B49CABEA22287BEDB71870F0656854C9E7CEC11B89D762AFBB18978FC9C28461F9F03875F6B1B7B6B562F3EF7E8C01AD5BB85B4B839ECCEE9B4F5DE76093771CBCAD9518579080EB2E1F0B570CD8B6FA63547FB410039BD72114D1D1E0ED8777932FC736477FCC189280CBA60C8383DC24651FA272DEFF428F86D1ECEE8D8F122EC03622E898817145D9B87A5221127D2E993346046545B185CB8AE2009DC21996B35AFA4CAD926FB950BA91C5F1F45F45576FDD9496AE159EA18F0E01ABDFDB8E1FDCFA4B2C7CFB71F89B745C7AD17770F1851978FA9987D90860D78BD42B0B8480BB9F3A88A7E73E8E5FFC642ABE7BDDC5083545F0D56F3D8AB797AFC65F9EF80EAEFFF26491F921F71DD1B838C49A38E15004A66E4A5F1615FF46F1DC734B317EE8681416A5E19AAFFD1907AB77E2E37F3C285C21923F69D326A9F89FFF7A099A429BF19BFB6E8583BC35B4B7B3433ACAADF4C4466F595D84A8506D14FF2774622C538EAA08E9DF31BBD69CD033D9F12265417717B47637B07445B4BB1AE26E906E5BB2E2262CEB26FE3E965BA5F3FB75211D7052272A196C69F75252DEA9DC25EA7763E35F7F0AB3B501CE4850746661B7A0E8BC428130EAA412811354F1DB0637F69A85D86BE6A3CC918B31238660D6A47C6E8A100983ADADD26DA558FDC10AF8FCFB911B29456AE4303CC11AB81C746CD4A08503DCA9BACE9DC60248075D79D8E518880A473FF47136E2E2D17D3069E400F62D92D1D45A538757E63D8E5CFD30D2DB0E20357404495A10313283A9DD143D8511222A37AA5CD9A874F7C35E671ECA1D7D71D89D8F94681D466569B8EECA29ACC8470F1BF146452DB0E7D5DFA1E0E0ABD0221A1A1CBDF08FF459D81BCBC6ECB13998306A0074A703C1A886482488AD2F3C01E7BEE5480D57A3C948C14EDF486CD20661AFB318FD5C8DB86A4A3106176531B65BD7AE42DDCA175058B7068198816A4F1F2CF39DCF42543386A6620607396340D93F70E0B95FC3156E456DCC874FD2A66387B3888B82461566E1CA890385DC282F1C2BB225C8998EFA96AB43E83A8AA0A9B82CEE04E9C404276E41CF230B9A2A09857109C4C8192DB234826D0EDCFFCB8528C8ED83EBBE3205F7FCA10CF73DF810BEFED5BE78E24F7338A06CF5004538C21BF2732B2A71FB8D8FE29EDBA7E1EB5FB908DFFDC18B7871F15BF8D11D3331E7E6AB58CE56BC468C93525923B4A13B4CDE54399D3004341E69C1D3CFBD838F56AFC66F7EFA43B85BB23066FA4DC82E4EC2C72BEE15FD19E936A595FFCE478DF8CA377E88154B7F8B9262526724FDF428DAB4283C3A694552F8CFE4C566F503A66EEC82B5A56B87674B182E816018810061DD29F3A4BB1C63BB5E117477C18B9BB3EDAC69B9243E3741DB99F9588919C732DD4F6653E04EE9C27F470F3647B3AD6D27D4844FDF5C8823070EA0AD95F449C2D0751D016AEDA5536F6A6A1A60A02D4C168586A8D38B5A2303B55A0AFC4632268C1C844BCFC983E910957DC499F459A5DB0FA072C70678FD7BD15A7B0091D64644756A446BC0156D434477A2C148C1A158321A5C595C629E96D30FC5191AC60DCA45769A57EA6A88BCDE37DE7A0FA6BF128EA60A688D35D04341C4A254D91803C8C263E52413471CA9A836D2516DF442C44C465A463AFA26C4307DDC20A4249AAC1AC84DAF751DF52DC0DE8F17C338B01AD5357ED4867D2C6BEAA71CF03139183BBC10BACBC9D660341245E3DE9DD8BA6209FCD507D1A4F970C0CCC3612D037E3D15A3FAB870ED0523E1F5187CDF15E57B51B17125C2E5DB501BD470584FE60A456A083B7D683AA64F1A299ACE365760CB6BF3505975184D8E642E8439ACA5B3C8D184C179B874FC400E12C6D3EDE5FC7366822D5D4DA8218A9C07C16FD68572B159EBB91B163413F4ECB1305CD2D32A7DB2D15818AD7E1D358780EC341DAB57EEC3753FFA33060CEB8BBB6E3A17174F1BCABA2AC240A572730AF2024FBCB5157F7FF61DDC7FDB2C242699B8F3BED791D3D7837B7FF15524BACDB884ABB5B91021D2B4F2DE2012495077288465EFAEC3AA4DDBF19FFF730186E5F5C182C7F6E2FBBFFC19BE74F970BCFCB7DBE0A4A51A0636AC2B4355951FBF79FC03ACDEB006CFCFBD816313F4C7DEF939C8EE9F0D9F69F0F221FDF70E82639C464B4B5E6C74E236042173A9B72A54E92EA39E86EB3B93B4DDDF701A3ECEE2CC0E567267BFC7C910B4B5C28939395DCFDEEF5188E77FF4C9A7D87B28885030C8D177F2B3C662A4B31C6672A0DF450D933B7F53A523E97A2499C005E34A909FE16312B70A1038B94ACA64F8FDAD58B67A1B0E348471A0B6192DC108DC24E0138D211C73C1E7F120332D0599A906268C29417A12BD373566A520937C70886E740DADA130F61DACC4A61D15D857E147736B048168186147944BD1A9EB08694A27A724212B3D09593E07A68CC8479A5758EE7C7A666952E114A0F2053AEDD635F9B1F0957FA0396C220013E9496E5C36B61F06F4EBC5562A9F28F8080C541CAAC392959B51D918E4D6C4A6AEA16F5A322E9F3A185909E4E327670F05F3A809AD8E2D7B2AB162F36194D53673897C82338A8B866461D2F001A28A929AEDFAFD78F5C38D286FD4D014612572E424C43069587F0CE99F0597B39332A3CCD464EA15BE28AB5DBD3C8E8BC579541C4500DA21CD2CBE8CE3591CBB70CBCD4FC3347663FE5F6FE42C0E879BCE51EDCA88EC0927E0A8C82F0C140CBC1FE1E4723CF3C2FF61D2900CB8B84E80CAFA35C44231684103F547DAF0BDFBFF8CE9575C80F3F30B70F7AF9E40E2C00CCCB96936B212BCE021D230AC5253D640D2D016069E7B6629C2410DC10050BAB309D0FC18382C83E32966C08305CF6EC1AAF2F771DFEF7E88EF5F3705CE2050B5AF010FFC6E39FEF2DC6A34C70EE12B5F1E83649366979A73B462D65517E0DC69E3E22507E299134756DEC0293B891E152EE1B5ED8A4CD031B406A80D9C754AF9FC64A02CE893C5D04E90274B8E27FBD9F6D7F12EFF39DEC83ABBC9D421AB4C95BD6DE41E8E0187EAA3089165CA8D6885B5C0DE37EE8012159624556F51C942348424534356326579D093257291F936C93294ADB1285BB8A605A86E89A2B2A61E8DAD6D8885C21C81771A0E24794CE4A425232BD584576AFA58B2AE8219ADBC5EEADE224AC1EB5BA23870D8CFBDFA88B45B4324871A83DB74C06502E9495E64A726A05782133ECE38104F3EC3C72956F2C1D248EC5FF4DFD9BEB7162D012A458FA257B217FD3312E03234715497B7C0BD7AC2C081FA20AA1B9A118984E14204FDB3D291996C726770D258B17281A9634D8BA6E1602D5071A4164E3D8A04238AC2CC24A49208BF4C0FA4937855730C076B5A106C6B854B8F2233D1859CB404789D0E21A5D185FB8BDF807F6F0B627033E3CF26688B8C2C4E12BC1D4373B38627E7EEC2ADB73C03B77317E63D75235BD0BA5B64FC58416A7643C8E05F4D335030E2FFE1865BA6E28E9B2F8657A7EA472A3C914740F651014F3DFE3116BCFD045E7C791EDE7F6D3B7EFAEBDFE3EE07AEC33533CFA556C6EDA9A51C9FA37C6E4A657460F53FF763F6E5BF4673B30B0167332206C92D046525AB17E15036A0FB60646DC7DF5EFA052E1D5B0433081CD8598BC75FD88D47E7BF8B81834DBCF1C26DF07944E607B94AE23157C9CB56A36A26E8CEA75A8B03E4DF384848047DDC4C82137F5E15419F385667DD95963BDACE01D6F7C7DA9F44BECBF1EB66ACF7B66C0D7A6EC354C34C1DC59D44F6ED4D608E17738DBF97ED09A2F7A30C8E48240AA7A1F37BC68924EEDBB7E596779ADDAEC66EBDBECBA0AD7424D8F139160E748DCC468E7F6A67DCACF7B15F67FFFCE361D29DC52A0885B25DC42750A054EE594CF22D7E0D4FCDDD851FFFF869988E5D983FEF265C3DFB1CE82E51312ADC63104136DA5542C0E3CFAFC4A3CF7F8037FE763B7AA73860905B8CAEA56BA496D85FFEFA211EF9DD4BB8E11B6371EDF55FC3BDF77D8C3F3FF3189EF9FBF770E5E593DBC95CBAD9A3BC03508051C3FB6F55A2E97025E6DCF53E6219D5B8E9275722C51D8119011C6127566DF0E00F4FBC0733670396AF781403331399A049EBECBAEF3F8EA5EB7660FE633762FAD402E195677D1D2BFE272A8259B2C122EAA300958B4D4E14EBC59CD57AD0DD5971EADA2F2E029DCD10FBCFD6F75D5D73CC07C53654EBC4C98510ED14261E365B74F754B2DB1717E913BE332668AE02156EAEB8D0111FE9A368F1EB786A5E296EBD653E9C8E3D2C377AF5D5E361182278460D7588E00C22E700F0F2C26DB8E74F8FE0E1F97760E2C842B8C8AD41E67B58541536B70037DFF90B5CFB1FFF8504570043FBE5E2509586DBE77C883797BF8127177E13D7CF1C071759E332784E27A417DF5C8CAADA5A7CED9A59D0DBDCF8E637EFC6E4A93370D125791832B82FA73E52931FB2CCEF7970377EF987375134F2003E78FF374873027A40C3C72BAAF1ABDF3D85EBBEF925CC9E311609E443A1A033ED1D524287B271D8EFD54D826EA32C8EB356B0FF84979BBAF08C42A093492EDC20EDAA7DC2F7D79170BB1A1F079DF8CCDFFE57F6E572CA5D178C7CD479F58C42ED94DE2C8BFB7025E9D1044D1FD4DA02FCF9C99DB8EDD679308D7DA020E195578E8349DD7064493F19B7461BB07D5D1437DFF622FEB9EDEFD8513E1F690909F14EE7C47B8FFDF145FC69EE7378F0F1FFC5C489A3E1A63841C8818A3D21FCF4A71F62DE1B6F2031BB0D2F2FF87F9836BA2F22A108FE327719EEFFC39F70E995E7E3B63BFE0B69C93EBCF4FC36BCFCDAD358F0CC3D48753BA538121DC3E88680DBEE5A8BDFCF5B8AE193EAB1F88D7B90AA47116836F0AB7BDEC3A277DFC313736FC4B051B9BC5C9C01A0AAA60ECFBCB408C386E5E1D2F3C6710A9F25E1655F53B6D515F74DD3EF685353047D4A97A57AB32F0C02761FCA89126CE79B3F1EE11EEFEF5F1830FE0D37222D684BB4426AE30B778416426BAB134F3E598ADB6E9D0BA7B113F39FBC05B3AF9904DD1543281A86C3E1844E6E8B26E0DEFBDFC7BD8FAD42AFBC303E5C7633D23C6E762BBCFAEE5A7CFBBBBF42C9C02C3CF2F0AD983076106B7050829EE5F0FF707129EEB8FB75ACDBDB88683400B7D18C58A4029E443FC64E29C6A38FFC0C03FA6660F39E18AEBAEE163CF2C00D987E7E21FB26D83943D6B374B1DCF58B7578F04F6FC2CCD984F7173F8C71FDFB62D7E630E6FC6431DE7E7F05A2AE20029A1F305BE172D6A377A68E39B77F0DDFFEFA6C0E1147C351E8DC90E038E95436178722E87FC3DA551F791A103811B2ECECEC3E91D7F079581E8BA55B83DA90517A6087AF137DAFD330F42FD45B5A185BC9EFFCB3C8A316E259F415417393034FCFDF891FFFF82998C62E3C33FF56B6A075972C86A1E29330D074288C071E7A1D2FBCB71111D4C0348EC049625F70A264CC14DCF97F3F40DFBE0069B65000906685B5C0E81BD96D6EF9F223F8E5438B70B0F21022E106A4A4B66119159938848F9B0A5CDE7C6F23EEFDFD3CBCF0EC2FD1BB97974BF5E98B34FD38E53B042C5BDE8C1FDDFD08728B02B8ED47D7E0BC5123D8FDF2DA6B7BF1C7C7DEC1C12387107147E1F685F1F853F7605889C6F7448162A1FECEAA1E8AA0BF500B56DDCCBF0681CF22C863FCAD831FB9ABBB3C86157ED4A59D89FF5F33E22FE6A7D8B1602B5A801F179CE7986D0C7EBF8685CF96E2CE3BE7C369ECC7A38FDD802BAE3C872B48A9EB7A5C2439AA73DAA15446108D072CCD72760388FE92AC1D1321B795F823FD5E0410455E3565F8D0ED50293D678970EE3455F6C9962AD4AF53A6B9F1BD5AA72E5B5621A7C44999609667A7EC0FDA7CA43824BF4427FD0ED21AA76B75BE5741CBA24558FCABCB98C5D1414265417F3197B9BAABCF8BC0B108BBBB646ABFBEABE063E7FB5496B43C7258015459266E719E4CC16C69013E5A5E8937DF580943AFC557FFF3028C1A9D0F27A50E32E6C47AF45FF17307E845AE9E203CD672A680A114DA67F17D2ADB96455224D6C5E99B36917E8D32EB45AD9E28B4D199DC39984954EEA0D27171FF16A7F2E75B27009953CE7E76A9A7CE06374B400BB150FA9EDA8A716E3B352DA6AA563B292B82FEBC4FB87ABD424021D02D049874AC2A4322C476521479EBD204D5496F248C83871A50DFD0C89D71FAE466223D2D998B90E84BC8A24BEB5B12A5CDA8E56BA40C97D01C8F0BF6536B29EA8C427D296D25EB5C3824DEC12A6CE28E38F27DE2A5E2FCA652EB5AEE0A567358EB333BD592C886C2A29E92E289F4E5A41FA4667F07DD676B108AA0BBB5B4D4C50A0185C0E745804947F6CFB408931951BA1CACD2392AAB8E46D0D8EA4720188423A22129C107978BB4A845B97D5C6CDFF2FF33CB0937050B0FC93657A20B91D52856882FB35383BA95C884782E55B784FC656D0AD3B0F53BA9A06AB1BE90CB8FB70A67E2B5FE716EB9BD9D962DDEC7B72AEFD72A529425AAB65385646645D09F77B5A9D72B041402DD4240BA1EF835B6AE25E25BA985C76E69917A174698D31D1D51D262112E002A9F1772FD92A42DD6E37A6FD9D6CAA2CB787B92388BC73F9ADDD6524489F8942A43E9F6B84F0B8BC5C8B62B16A95AAE2C59A26F31AD7474C8B275B16D08E21762FC72FF8937986D6F166B1390625788B4F25590B05B4B4A5DAC1050089C2A04EC56A1C54F52CB83F9D0F22DD3DF48F04AFA80454360E1CFA5E09AA062D249B12C524970A2B6306EA4C7CB38ADCF65239BD23222A0D277BAD6191365F72474257EA3B5AB2BB21BC5266BC07975E25F845337A85CDBF2894BBB9E7D3541D9FB50A4CCB12F9BC385B271ADDDDC66939BEFC0D6AC59A5D99DAA25A7DE4721A010E80E029D1DC547892DB59320D7FC50008D0369C2E4156DA6884885C6B3F8927E6DD638A1809E2455AB8EBA03C99216798885B6C85E3658154FB49122B785A4FD8E5A335D047FA3D23F22BA7CDB495C0A4FF338654E336F35CCC4EDDDEBEC98B1A54D16B4B8266E761F85ABBC11396E55A8D29D85A7AE550828048E8F4017041D77E712F1C89439E62049829C81C15FC227211AAD0A7FB395EE66D73517C26E22BD4E58E6F65D4058D144E4F1F7603F35B1BA4878B3979DF32D49D70CA7EA59422596E52FAD6C7AA5B8077A6FB2C385CE92BC81B85EB6A5DA4CA14ADA0EF8DE78AC3692B77E3E1309DAEEF3A1A41797D301B7DBD971C73BFE32515728041402FF4E042CEBD79EB570943B41FA82E3F9C1328FCDB2A83B11B4351C6159537A9DE4BECE046D25E5C52D70EB834519F96712B4B5894812B5B9D2E30148227FCEFAB0B9993B5CC78976425EE09804DD99B43BA58658EFC71D5502D4E5BC5361D4E798DBCFA76647471E4A188F521239603A75B85CE7815CC6000004E94944415422F5467D290414026738027677827D28C7FAFDA9186E9CA86DBEDFAE2C5AEBBACE9B4B7C679056BE752438D6755D59CC9F398E8E37284E17A2282614A69E8444D05DA67D9C143A274DD022995CEAFB46A370E85A4782EE0A68EB16ED7F3BA9DB562F520828041402A711013BC71E65DDCBE8A42DA84A69E0C19050B3FB421034A7B05851510E1E1CC782B6476F4F23AEEAAD15020A0185C0E745C0EE8EB6F2A53BFA6E452EA0D57FC022686A79757C35F413BFBB93B6A02D8226CB391AA1A86B0C4EF241BBA81D79A71B903F9FCE93D1890F595DA910500828048E8D40E7037E9CCE6C6E122E9C24EFBAD4FBA01FA941045BD0A7D04370D2044D2E0E2B48188B524B200DA6A933411FF5D5A90BB55A1C0A01858042E08B8C40572E6B994062EF21CB43B0C29A44D0E483FE4259D0D6ED517E24B51632AD5E6936F4ED22265FE44951F7A610500828043E0B017BBC526A2B0957475404098341EA0E7FEA4CE893B6A0594E85357785949F50FD13FFEDCA9571EA6E592D208580424021703A11E83242D8E103AD9E85C27A165CD8CE895F802C0EFBDD5A55971DCB788E05E0A9BBF9D33945EABD15020A81B317817683B2A369D935758B7EF3A7E3EB7358D0EDB763CF6F3F7E95CAE919C8E90047BDA742402170F621D031C5BA9DA03BD7F158FEE753E973EE8CF62925E8139B4A45D0278693BA4A21A010F8F721204AD33B7B0A3ADFCFE976DD9E1282FEF781A83E5921A0105008F45C041441F7DCB95523530828044E33025DF9034EA5557D1A085AB49339B623C3CA1A3CCDC8A9B7570828041402278DC089B9623BFAA56526C7497FE6D12F3CE5046D453315419FC259526FA5105008FC8B11E83E418B5E34C2403D555FA79CA04FD58DA9F75108280414025F7404CE4017C7171D52757F0A01858042E0CC404059D067C63CA9BB54082804CE420414419F8593AE86AC1050089C190828823E33E649DDA5424021701622A008FA2C9C743564858042E0CC404011F499314FEA2E15020A81B3100145D067E1A4AB212B0414026706028AA0CF8C795277A91050089C850828823E0B275D0D5921A01038331050047D66CC93BA4B858042E02C444011F45938E96AC80A0185C099818022E833639ED45D2A0414026721028AA0CFC249574356082804CE0C0414419F19F3A4EE5221A010380B1150047D164EBA1AB24240217066207062AAD467C658D45D2A0414020A811E858022E81E359D6A300A0185404F424011744F9A4D3516858042A04721A008BA474DA71A8C424021D093105004DD9366538D4521A010E851082882EE51D3A906A3105008F424041441F7A4D95463510828047A14028AA07BD474AAC1280414023D090145D03D6936D55814020A811E858022E81E359D6A300A0185404F424011744F9A4D3516858042A04721A008BA474DA71A8C424021D093105004DD9366538D4521A010E851082882EE51D3A906A3105008F424041441F7A4D95463510828047A14028AA07BD474AAC1280414023D090145D03D6936D55814020A811E858022E81E359D6A300A0185404F424011744F9A4D3516858042A04721A008BA474DA71A8C424021D093105004DD9366538D4521A010E851082882EE51D3A906A3105008F424041441F7A4D95463510828047A14028AA07BD474AAC1280414023D090145D03D6936D55814020A811E858022E81E359D6A300A0185404F424011744F9A4D3516858042A04721A008BA474DA71A8C424021D09310F8FF23866F9D43DF71C80000000049454E44AE426082 , 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-       (4, 'SDC', 'images/cache/portal956868231_53879.png', NULL, NULL, 'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal', NULL, 'http://sdc.api.simpledemo.openecomp.org:8080/api/', '', '', NULL, '78ot0W94rpB0o4FYzVoIOg==', 'N', 'Y', 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EEC9D079C5D55B5FFBFA7DD3A3D99F44602015208044209BD77E945050151442C806097A20802A222584014B120A2285800A54887480D2D011292903E997EFBE9FFCFDA6726441F0804E6CF7DCF7D78F326CE9C7BEE9EDFDEF777D659FBB77ECB88E338461F1A018D80464023507708189AA0EB6E4EF48034021A018D80424013B45E081A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013B45E031A018D8046A04E11D0045DA713A387A511D00868043441EB35A011D0086804EA14014DD0753A317A581A018D80464013F4FBBE06A20D4660FECFD1C40118F2639358FD43FD0F75A87FC56FE30F30E43DE4F5C9B1E13BCA35E45DE3FFF1D37F7B9FB7F136FA148D8046E0BD454013F47B8BE7465CCDDF806E07E8327E9D1C893D3084A44D4245B296A2544BCE89C0D890A03778D9FA81987252A4C83DC420C654542C2F932F07B090DF878AA4E5F7C939F23EC9EFDFE0B6B1117FA77E89464023F04E11D004FD4E117BCFCF1F2468A1C1C108D950ECA948348650FD3826C6C526C014CA0C5210D844A998C04C5E997075C2D249BC9CD0B93148F87231F91AA467F9A7BC6D1242FFDB110FB0BFA6E8F77CCAF50535026F13014DD06F13A8A13B2D1C60C7C164C34018AC083326364A8A74E3389F30B5F0A69C62493C5CC0359AF0B114C70E5E61300696785945C2B1A17E67C93507C3E7E4F260F903046D4134C8D421982E18F29507D243F7E7EB2B6B0434026F8A8026E8F77D710C46B46F947F96DF952192EF199570888C84A755542D3F897DCC2850C90BE2086221FC60E07B04769AC84CA26023B655428338495FA87B80E4A785F1075326837858C2E4150C52A0BEF4A111D008FCFF464013F4FF6FC4DFE2FDC230C43024624EB6F26223C6340C8C38C68806C8D7A8425C82B08ADFF13251B99B5AB98857EAC7F0AAC45E8D38F0B05316A1E360A673D80D6D58B9E1E4868DC7CC8D80541361EC8093C63052C4511A0C87C1783E1888D4D386A449DE28B95D67C0E9E16804FE0F22A009FAFD9ED4C1DCEF00074651A4C8D954398B98CAC0D65E9600A3DC47D4F52ADE9A2788D63D49A9EB4508FAB08C88280C88A31033949C768429D700EC305039E89034AE91A718A60953C3C80F1B4BC3A8091863B7263F7C3266F348A23847480396D344484ABDB363A8985B1F1A018DC0FB808026E8F701F47F79CB7F536108410B39477140148658710D7A16515EF5288557EFC2292DC22C76908B2C9C284564F783E9134531711CAB2C87642C549E3A825400E6A038C4B2F14911192601167E240994765CBB914C5B3B4D5366929FB80D66CBE6608E05B30DCCD4C005DE6FA0F4FB6B04FEFB10D0043DD4733E40C02AD32CC49904C6AF6F0C0EFE3ED9FF4BD2C16105D308A8F6AE227EE667C48BEFA75A5E453E55250A4A18664C6CDAC4710AD337B125312DAC2EA9118C2465ADDECC10A107A130752C11B64FDA36318D10A20849A7D87E889D76F04C937ED294EC916447CDA169D29E348CDF1EA3653258D904A58154B51AE7C097FAB7DA5C1CC8670F9E2451BD21A391FFDE42A8F7065A6E197EF2E324476FC6E6FF549A6C280B4F06B2C16C2658C88B547E7E700CEBDF6B30F76F10ABBBD9EB874EE80CF587425FFFED22A009FAED22B5B1E70521B169E18B6CD9904D3DB08441D5669E45ECBAC48E8167191886956CFA155E2658F02B4AAFDC82535C8B2991B168998DC172924400AD78391095859DB0BEE4A985C836D074F8664C688A82DAC78C256911624542991646646318BEFA992444E47A5E6060A6F294AB21F98661A4A79E416AD37D30478E22B22C3C2B456040DA343055114D0AD3CD61C8DF942E13C7390CDF04A74CC5AA60D344EA3FAA40A24459226F3E28073421345198F9788212D9C8C2F0ECE4DC813F5171F6C0BD49FD42C613F9C9CDCBB408B1B1E2443D1ECBC6A810B1826E40CE2273605B4486BCC3EB47723B893620764DD91BBBFCF5EBDE1D029AA0DF1D7E6FFDEAA8426CA694144E6239474583E180CED9C2934D40F9792882E72EFC1577D333FF3784AB9FA4990AA6DA1814821E8825D7970F862A627442135322D881E8D11C609A44586728B54764083127A42E3C6E44F25B47A93984C015A70F1C9226B12C4BA54B8230A46435A8A8BA75CA7EB46C731C66EB568451161C53DD342202525E4A91999FEA23A0898C2FDB8A1E35CBC6B24C55ECF2464712C32651AF7AAA182468A55289098849FB6172EFB12D5C536E3349546CA9248D60E760ABD74518B19F44F918723B528AF1C1187E50286E1960C7A0EA77E4BD15C927CF04C9B9EB9118F8F78661FA5B4FB73E4323F05E22A009FABD44F30DAE1531A0634ECA4B92A819A90A148A31A889882DF4C9D556E1CDBF89D2333F2113AFC0C6C40B9A126DB3906F2C119D0A3531141927F4266A381521FECB7B0F3EBE273F3554914B42F2721591EBC5A2E0886D22D31BB85E720151900C2A494CD32488AA985983AE6A0E37338D615B1E42CB564761E436C30F53205C2DAA3EBB4A9FD107713B2D151B5345EE860843920DCF37386474892E6540B1B2BE983D926782E4161324791FD7B27007107088C8C9266818E2AB9B5F924491BF3308020C47FE3EA87A016B4A21BDE5805AAD86191BB4346618D19CA22D6F2BEC3286E029A3183C124579825C32701D3F0FF187445FFE4D11D0043DC48BA38A8F88D7A4025018323652B8A2671E785F3BF4716AAFD0FDC89504AFFC8936AF1B2B8808E5113D9D21886D4C15F186D8B150FA40443D10F18586857C25A492149A484428D1ADD0B114A74854AD32088AE0E40661131B52CE6D928EAAC8D6E1E0219B941241CB77216BC74C13D64A908AF1EC345D4116373F9D71DB1F4FC366BB833345E9A45DBB9B5EB9EDC42318563531C24EE228C66C1AAECAD4DF8CA0E5E7FE40917938A058B125BE97E29A50523F3276033B32A53627C964482125E08A4ADC046FA040D232C136A1BF1AB1724D3F5D5D3D148D0C5E6C2BE28E7C9FB0562663864C1AD5C68CA963189D91187C4047BEFE363758EA93DC5435410FF187445F5E13F4FBB506CAAA0E2FC68E3C1591858643F22F79D4F6B0FA1FA7F79EABA8753F4226584B4E541C4136F1CEB05C0243E82AC9F73A22A393348563E38742D5268619128631860A55D34ACD11A90D3A79860F317D1FDBB6310D4BA52C06B622550AC3B6240FFDAF65DEF27321E6A4D45C883E49A1382A4362E21B2615DBA1D78496899368D9E51CAC86B94456037D56338E67D1E02EA1E7D95F12B56E41FBB4C3C018D864FCF749184C052337A48850A2D95852400656682B828E14410B491A547CE8F43D9E5DEBF37C671F4B7A3B71BA3AB16A1E516C60DA0E2DAD6D4C9A3899D832F13D8FC84E13C406BEEF13043E665003AF825FEEA3ADC1E1C85D67322CE39092E8DBAB924E0F96B6DBEA7631589DF97EAD1FFDBEFFDD08E8087A88E7BF22358012C586C9EE96EC9F49CAD809CB98D545C4777D8EEAD2C7309C066A918F617B2AF1614716569023B064D3CBC58E23953B15EEAC4AAA3593C38B6C2CAF44CA9434888369E7F1FD8144886C2A9A81EC81110501B1283654EC1CE208C94BEE59D20BB14160BC7929B72B7B6B31A4A2885418A9A219F9538C6C867EDFA533DBC6C4D99F2233F563E08C240ED7E23D750EAF2CF8339BEDF753329B1CA16E1C6F1A42AB1B4472334912E426516CABF7905F952DE870031E78751D0F2D5ECAF26295AA6F92326C9AD30D8C965CB4EF83E560D859369BBA05B6ED100601EA2271401884F841A06E50815FC3AB14C85A21C5EEB58CCF5B1C7DC05C5A7319B26A3F2048248A0369284DD043FC01D197FF8F0868821EE205228FE1A928C6904D40C3A46A49CA4136BF5EA072DFD5444B6F24E5D788A26178418CE954C1ACA868D5089B084D5F292DAC38C08A45C9E110DA794A519AC06A50A9904CA6192BD58A69B7916F1A496C3989EAC30CE82FF711861E51B988DFB38E7454C2F27AC8DA3572764820AA87FF804110A7898D00CBA860A9AA46E15283D0CB63D24235D745251E8D39F24086EFF6417A1FFF13E6B2AB89323E8D737E4E7AC68960BF7992201AD8AC3394AA25268A4CB5B958366079C1E78E97D7F1F49A0E3ABD2A664396967C9E49D906C60606A9EE7EAA664477A58C936F61C4E8499896A433845E2395D2303C97300AF18210370C89E208BF5626F22A44418DA8D0C3D471ED1CB3FF76349A92AC499E5234410FF107435FFE6D21A009FA6DC1B4F127092F5BA22E101DB291A16A88AB4699EA73D750B9FF0A22CB25322372618546212B5F741E0E9E15E1DB2E719C563968118D492ED98F1C7CBB9954DB7872E337C398BA1F8C98464C33C42DC080EC4E4E3622BCB08869C5D8923E08CAE0F7102F9D4FD7922759BDF4794646AFD064F4AFFF0313099A1C09A9CA76A6DC2C42234520D5889E472E97C688AA385640548E882D9F6A9BC1921E8BB14C6444AE9352A544E680DFE06C7E9492B2BD590EDA55B78788B44800256A361D7A31B8F7D55EFEF6E4F314CCB1F4167CB6DE6C13A64F4C93F563CAAB17535EFB0AD54227DD7186D4B0B14CDC743A8693A3E28610C6C4810F61007E481446548318378A28552A388E855B2B53AB1494CB48B5671DC71DB43B3B6D3E5CF63CD50D31917724E3FE3799F4C62F06FD4A8DC03B444013F43B04EC1D9F2E398EB48BAB76B87238D51A66E71DACFDFBD768AD2CA6266A07CBC20E51795E4947D896ADF2AEC20C69D756F9D56A36458FD380356A3A23A71F8A3D722E38139562212140295C193041DA206095775DEF72A7A254B959C8974BECD7F04BCFD2FDC25D94163DC6B0D26B34FA3DD84A6F9DC6B7724471486CD4880C0FCBC9409855496171D933AD2A66E8E0C421554BF2E152729EC78C7D1CCBC6DBF532F25B9FFAA66E7842CDC518B246881DF4AA829897AA297E316F2DCB4A065E18323263307DD26886A54D1AE22AB5EE7574AC5C467F4F37C54A9995AEC30EBBEF8B9DCE12C6065128517844E07B891A2584208CA8F91EBE2F698E80AA5755F968CFAF91AD54E82D75AB315CFDD913C949597CCAC5352CB2A2134FEE52FAD008BC2F0868821E6AD86B31B11D50B3A508C5C02E2FA3FBAF5F22DDFD0F32411FAE292233494C67955CCEB1255FEA4AA11F969927E540C173885A67D1BCCDD1D89BEE83911E0D664EE568456026052E1B7BC4A10B511F466D25E12BF7D0F7C29DF83D0BC9DA45D27688E5054AEA66D98D2AAF1B9A3515F12B15482CF1664026F4F18D3CA9B88C6B99B8A64D5E32E9BB7F8BC6AD3EF11FED4A950E3AF6F1629305FD01373CF8321DC670A2D864CAC856B61C97A641D2426E09A3D24FC7F2A574AC598B17982C5AB6921DF63F8A86E1A3A856ABEB25824AC32D635539E798308CF03C57917210FA54DD2ABE10B45BC3ECEFA7DF2FE396FBF8C169273179440341AA42D548D1103803D6AE1B8BAE7E9D46E0DD21A009FADDE1F796AF8EE3226E90C7364C6C7A293FFB537AFFF913F2B5D534671C2A7E11C310299DA572CC86E9A9220DCC0C419467B5A825A6CCA57DD6C7309AF7062347E018848E743FE9C4A1118BDC5B8EE34D4F9024B9A4046CB923B8102E23E87898CE7FFE1277D5938C355CE5F911BBB2D127E61E153C3B4E0A41E2760CA346362AE19327139555C9B86FD8E462F076B984FCEC33FE835DA9E8FF8A046686793D26D73FB20C3FDB465C2BB3D5F836A60CCF10F852961ED2608554FBBA58B6F8253A3ABAE8EC2B91CA37337BF783084D07D775955A45D41A42CC8A9C6563D04FC8DA97083A10920E70DD1ABEEFE2BA1ED4427AAA45ECB8C429BB6CCB11BBCD2430AB44A4C878A9C4296AE3EF7F1B3F2FFA951A0155C025E1863E860C81026B71E21164AA0646F50956DC713A4D95974949E01A9818B6E8A363EC50F2CCBE08CE88D336453F03A9D118D38FA275FB23309CF110B5135AB6D2FF4AD189657A3858EABF8D3E0211FD5954A48C5BAE19C764C36E2C6F19FEE247E87BEC368CE232325681B459C3080342C32690221649D39A01E92089A0F36119DF92021C9B4C18E1EF7C31B9399F4455B3BCE12125D81516F6C4FC685E273D8DE3092A7DECBA493313F2914A9D7891A3A477A9D865DD9A15BCB66431ABD675B3BCA39B7D0F3E8C6CF36855D62D690DCF4BD21AEA2B0893CD41D757A90D3FF054DA43A477AE572390EF6E0DD7B5E8AF54C0ED65FF6D26F1E963F7C531A4443D85E53A09394BD58C3E3402EF03029AA08718F47588B67904F96A48E703E7C1CAABC9FB15EC3043208FD0D219258E71A4A8431CEC6CA8D8397A83E18C9CBE37E99D2EC0488D549D4F446E97E494C5BC3FADD4145203F26E36B1C2B89434012083D4EF49F09E51AAB70844375D5D4E75D91D2C7CE0C78CB6BB690C639C5072D03522A7A8226609BEC37880A0C5772436C90511A51DBF4ECBCE9F8178406627B1804AEA26E5DA52C8B2DC35F9F9032FB136339E322673C6659894AA62472155439E0E0CCCC8C50A5DD6AE5CC6AB4B97B1AEAF48AAA99DAD77DA45798728EDB7E49DA518258AD647D12A820E937CB490B7EFB94AD9512A16943DAB44D18532940B559CD8E3A07DB6E1848366D31887E4440FEEDB0939BF8BFBDF102F2F7DF9FFE30868821EE209EEA0C8B0D8C1EA5F46FF5FCFC1E8BF8B9454048ACD5C9C2332C5AF593C3512D7359198F53923C94DDA93D65D4E84DCDC01CB4F614D958F48084E0CF6A58A43746FEF6213ABA61AC5425AD22B322E55E29852558912210B91DA6107E1DA27E879E4E758EB1EA521EEC18A42E2D8A6E648955FA022E85C5826104B53C32255F528CFFD068D73CF5111B52A7E5187E8A8436CD3A4EAC7FC74DE7216971D4CC7617CABC316C30C1AC2329ED140C16A221549297905337459B17C294B972DE7B5B53D6CBDD3EE348F184B184544D1EB298DD7095A0838C00F035CC93FBB1EBE5BC3AB5655AEBF522AE2B92EA55209AB6AF1DC530BD86CBBA95CFCF59398D694A159CC9F020F33258D0C742DE1107F4CF4E5DF04014DD043BC34BAC388B6682DD1E23FD27DDF0FC806CBB00C571916394146953227A64786F2692E1839DCE1B318BBF799307C17B01A3054A9B4549C0C729C2A3101439C3C32AA13CAC61E7285A410458C9406FA104ACA404AA4B12805D0660698DE2AE275F752F8EBD7C8066B958F4518B6E1D91E4E5C2518CC414B8AC34E61D75CBA677F95BE9967D2EDA5A8945D82813444536303B94C8A75DD7D3CB046CAB9338CCA54983E26472A92DC8F94AFA7094562A8B4772E86EFB262E91256AC5CCBAAAE02FB1E7A0C454FAC557DC26883D44618AE4F75483E3A21E824A511BA3545D441AD4AB95854117558EAE4F13B1EC5AD343276EE0EECB8D7565CFEF1BD688F6322AB8469669421933E3402EF07029AA08718752F10F25BC4DABF9D85B9EC09B212999915ECB8423A100F0B2166E97C22CE730EFDF63086EF7A32CEF493A8991395D19068A00D894213433A75C44A49213F5749808DFE2BA47023B966E24E9774A54D5C3BD4FF8F1CACB086D1FB086BEEB88C5CDF7CB2D26E4BDCEBE4C660888AC3C31B54713892233749F901CF8C3C99A7C77D9A6E63C440377149C9C835937CB16CEA15EC56ECB0CCACD1166D398B7228CE1819B2A14FB3DF4FD5492B8587197AAC5EF61ACB57AC21951FC6265B6E4BC937949953147BEB551B927F1ECC450B41BB818FEB5609A5D4BB56C5AF56085D0FB752A1A921CFC78FD89160653F1FFAF01574B78C60D20E53B9FAACA3D877462B8155C02483AD9BE66EF4FAD22F7C770868827E77F8BDE5ABDD2826E53D48CF0D1FA1A1DC8B6B270E72E9302215F9D46C715513E3E31A51630BBD4DFB31F6039FC3CF8CC6609C4A0D0CAAE806C97920539018FCBF6B331FB11D5296F889DC6FE0500EC9A29BAE1588BB9EE2B5BB2F2157594873EC4A2B44224965381E8D7191C88DA9645AF1A59CDC949B06447623CBDAF664C1265FA0373F15DB7112F37E4374C989C2A252A9502C5598D0DECCE89694DAC00BADBC327FCA4401B92091ED05525549CCAA956B78E9A557D974F3193839A99E94C29432612C3E1BC1FA1CB4283A06893A705DBCD0A51454A8887AA3E8920B628C9E6E8ED86B670E993B8BAE5A3F071E740E1DCB9A69D9762BB6D9A5811F7DF9305A6D298D076B30C53190E99022F9243124B735D14A6FFC0DF22D17903EE1BF1A014DD0433CFD4AB0B5F80704B79D473A86422A20B242D27E06CB2852336C52A18D6D54286647D3B4EFB5589BEC8167964979ED28767EDF9EB06328AD61C93DD763F90B68307AB084DC8C2642CBC1B3C50BBA82D9329E970A79DC3843CE2F92C6A3600DC31B3193EAD83DA8DA6D894F7352D74D245DC82D33C91D7B9248917F27136198B2513978DB313085F0E5B5A6C5BACE1E9E7CEA59B6DB6127622996C1A216D692F26D65869490F486042D567725B74839AEA8681AD780B5BD2C7FF8212E39F774F6DF691BEE58F414279F7C3EED85D9AC34B36C7AEC78BEF6D97D3878D30949EC6C2637B1D7B3E8898B75520024392A4DD043FC31FAAFBDBC26E8219EFA302EB2E68EB3697FE9B7A48D1405BBAAEC40337E86D8AC20042E5239276550C86D43FB51371264C712DA651CBF09D3B4DF5715414D52DD619954AA8CE1F5822992B90C912939DA8020CEB1B0A3C693AF1509429356CB6544631A2FDD4A97D14ACA3054235BE9B128472E9DC2F5AA84515248E285265557ACF50DD219B9B6A9D41D83E2CF284A4CF8E5E7A5729567E63FC7EC393B10063141244D053CC268809C072A0507095ABE7BAE45AD5A268C2A78E5327625A467F16B742F7A818BBEF469F6DB7D0BE2E63C3FBAEE41BE75DE2F08D2CD6466B6B1CFA15B72D5A78F2563BEDE306B60272069E8B27E3FE05D3FC20CF10AD497FFDF8C8026E8219EBDD87B9595B79EC9A8D5F711D5C06D9037F4497B3942DB25B084010D6A51134D333E4666C7F3F033F2985F2225D5851241BF8F2202B14B95E856542669897EC57CD936A98A0FB315F3FCF21E5E5C5924C80D57C31C9D8B69B47C8A52F3926BC5502E7A5280237914D127BBC9E65CE4E3D66A74556332F95672D92CB69552865242CE83D23931D3576E1D618C1F84546B1ED95C23B59A545BC6F89E90AF689D139216D2176256C5299E47B12AFBA93E71B11BBB5265C1A34FD1101B4C1AD3CCD147EEC32E7B4CA16B89C78597FE91BB1F7F062B34E9B52CB63E72677EFAF50F33A525B53E461E68B49E78440FF644D086D143FC09FAEFBEBC26E8219EFFA8FC289DB77E9EB6EE67708B31518BA93A753B5E5E55E489BD686046F4C41318BBEF95A4C61D4C352D1B8635B2EAE15F246AEFDF23B41B56B10D034B3C520351929804B6C8014D5E59D3C173AB622A66BBEAABD8D66C62577DF266A848DDB3C4093BE983225D606AB5AAEA6C1204892EB9BFD04FC3E84DC8340E53F969E5452D0D051441CBBE62B2112AA991409A184411E9548652A9ACFEB7747CF1DD324198E49C85A4E5BA42D083FFAEB8013923A2B0FC15B69B3089C6D0815A8DB11386B1ED4ED3C8B5D95CF4F1ABF9D3DF5EA1D00C1937C6B3463172CF599C78DC367CFE90E9A454383FA8E14E3C5F550E5AF60706FE1BE265A42FFF5F8A8026E8219EF868D5AF597DDB5719E5AEC48F5B70D32EA9A84CCA6FA06C5BD8D4706D9FDEDC6C261DFA4BACE62DA9490F5823549D3E84A0DFBF1C87E45A25041525604A75EF96EE263513D6563D1E79612985D4487C334B3E6F93B2A5E046CA5D7C0CC9338BD9536411F921AEEF532C970922E82DF4D35F28326DC60C2AA2B9B612937C395F5A300A1FAEFF92CACA810EE4A2FE50D61DAA1825F1790E4321DE55BD080000200049444154E39A3241FA778216A2762B2582FE0E76983A815DB7D8927CE89016EFE85444BE2D85D3DAC2DFAE798C6F5EFC0BFA1A62CC8A4F1CB4616F3191D9074EE5C6730EA04D3485D2AA4534E8030D0D03A5479799492B858D3E340243818026E8A14075836B46CF7F83BEFBAFA4D9EBA3660CC34B55C945652C2F4F299D22E57954532E85117BB2C9076E2448B7ABEE2292937DBDA7C7FB57CAE60EC8ED44CC278794CA14E2987B5F5C41D56C57A4D8D2E09092CDBCD057A90CE9112EFED58E1161F91695924F7FA9422D86FE728D8EDE025B6F3B87AA747B71C46F3AD98293FF249511C762C4A45ABA246E7AB1A83EC49323528D072229E556041D10E02B0BD44172FEF7083A5DAB61D77AF1BA5772FC2187B0C98809105A34B6E6F9F39DB7F1C39FDC42D06B31AE7D1316AE598DE742C64FE135E798FAA1FDB9E673BB336D586EA0196DD21F328EDD449F6DC836A56C23BE6FBBB843BC7AF5E5DF6F0434410FF10CC40F9C4AED859B49552B54ACE178A9320D6105DBCBD39FCED1E48944AD4834FD585AE65E8DE734131B2EA938A52A0C131DDDFB47D0E267AD2AB495877D8C6B782C2AF632EFA502E437C5F60D866563A59596EEE19EE1109942E711A657866A91427F91AA1FD15BF559B064057B1D7C206EE410DB268ED2610F74391FC83DC7D2BB3116A296AAC34011B444CB12398BCF731C84049E38D305F87144D57B3DA521043DF8251174BB6BB2D9A856AAA5B5EC3C67362B5E5DC315DFFA3E975DFE4D7EF7BBDF73D743CF1278FD3CF5E0EFB8E0BC9BB8FDC127C9BB25CCB441C3078FE198C3B763BB4D1A19D390A3BD2145168346D1ADCBE6A5EA0A2E8F3BEFDFFC0CF1F2D5977F9F11D0043DC41310FD6137AA2BE661CB0696DD8C6FD5C84435CC304BD1C99097CEDA76157BE77371B6389B309527107F641CA5145012DCA12C35DEC02A2B89643738067F27DDA8445961C5D4CC80BB9E5F40D91E456F254F6B730627AE25852D86494D34CB8E18FA07F8A55EE2BE6E2AC532A19DE585A5CBD9FD80BDE92D394AEB9CCE1818D245469A19AC4F6B88478704CB89902D88C45F235051B318EF47814F24042D8A0D71AE8B436A9277F6036A92D27003DC9A47E805940B450E9BBD3DF7DD761B15AF9B5D76DD96BBEF7880452F74B2D30EDB73F229FB73CE17CF63D6F65B72D1E7CFE2E9792F71DEB7AFE46B679FC1CC19DB70F2B57F2437A91DAFDAADBCB3278F1DC65EDBCE60C7A923D87C7833B6480E6D0F4BFA460696F2F70F4D497E0438327F52262AD98FF76F0B618857B7BEFC5023A0097A88118E7F369CAAF83D88A7853426150F0B439217524E6DE39921D9D0247DF08F31A61CAFFC306A460AD330A591F6EBDE424335CE0DBD0C935EB1EA585FB128FF436E14428C8EC3B26AC47D2FAC21CC657132160DB1386D48DF154735B89511AB32F05A894A7F2F6EB11B29D659DE5DA079DC44468CDF3469E725267142FA7279152DBF3E102167F9928D3F4971885E7A50A1B1A16B9D1074E4B9CAEBB926796ECFC7972792BE0A513564C133CFF38DCF1CCF9F6EFA0B857289033F30975B6FB983054FF533766433D75C7F2AB1EF93B61B696EC850ADF531624C3B76B6911FFCF82EBE77F5ED58ADA3A8A52D72EDAD984D368DAD29724695E9E3DB39F9C8BD9939B99946D5934195E7E0A53C3C33201BA7B12B29B135D11990A15ABBFF05D7D5043DC4935CFB512BA1E7629BB1EAE9A7A2C158BC2684A0A5896C444611F4B598538E53ADB15C23A5941BFFDF09FADFB148D2C04AC120BDFD827486FB5F5CCD0AD722C8E6B09D889C9485ABBD3B91039AEAC61249245BECA1DCDF8BE74397E897172EE2C80F9F841B1BCA8744352710125679E68177D9E0FBA0339D48E8FE8785E880ADA8A43284A445572D92BAA0E6614411B5DE121DCB5E63DEFD0F72E01E5B70EEA7BFC4D225FD4CD93CC3C9277D894257C0F8B12D5CFD834FA972F3AE354516BDFC0A63C78D64CE0E5B139936D7DF702BDFBFEA665A83566CF125C9655953ABD23A7238C5BCCDC87123C935E5D869F6243E7BC26E8C4CC50CB3930EE8A24591C839305C641BD854372E7D6804DE39029AA0DF3966EFE81585AB5A245656DDA22DF5D83EF0E8AEF29626AE255E1616A983AFC19CF24188C5D722A388CE198C2A8730C5A1A871BD822CE90F9884D0C97755EC2C79E228A06238FCE9D105782D63F01D090D4332B6C8E212273E6983E898E0578A14BBBBA895FA2984799E7C6131071E7918919D52EDBBAC7843828E09C59F44DE6B20921E8C9E93CE2852889244D0834E75838528CA6B43CC90DC9A4A4184529052E8A7D93229AC5EC5734F3EC175D79DCFD2970BFCF9B657B8FFA17F72F229473263FA445A1A0C5A9A436EFFDBDFC86787B3E76E07D0B16625B7FEE1377CFF47DFC049A579F6D9153493E2FC2F7C8D934EFD149F3DE7AB5C7AF5B59C7FC57759532A936A6A62ECA6DBD0D21EF295730F65C7F16DB47806D2D230CEC414EC1ED2E4C459E41DAD197DB2466010014DD043BC160A570FC712B20BC5C14ED201C9111A426992E290C7610BFBE06BB0A61C9FB47F32322A82960D3495E4186A825E5F78A1C4C76A335015331B067E9CE83764B4EB2A2177CD5F8C317C3C9EDC60421FC7B155946DC621761CA9AAC15AB18F425727AE5B664DA5818E52C8DEFBCFA5588E483989E9937436970E3242CE83C4FC3A414B9BAAA4E824A9381C685FA53AA3245AE7A44B8A4F59957657A056C1AE9508FBBB39E9880F302C6D33BAB51133DFCBEAD53E07EFFB151A1B263179B3164E3E651F86B75AF475F7F2CC8BCFB3EBAE0770EFDFFFC9E1871C4426E3F2D4530FF1E1138EE495975FA2C7ACB064D93226B68CA53DD54AA9ABC2AAD55D94FD98C52B56F29D9F3DC4F0995B307C6623271DB907A7EEBE15CD527B640694CC126933AFF2D1FAD0086C0C029AA03706B577F09AE0FAC994CB05CCC0252D41B37430117296AA3C89A08D80BCA4340EF801C6E4E314998BAE5808DA56E5D1923A18BA52C2F539E7C1D26531E9B74DD5DB45DE5D5A5B497C2CFF5ED553E4F9D5FD54446962DAA4CD5099F39B86A1BA86DBD2F3AF56A1DCD7435F7727A665F1F7C797B0FB8187337C780B962D291EC5FF6AD3D11CCC418B3A43EC3D37F8BE3EE71C4B014A42C8F225E725C52E89E74625F0A889C7B35B26EAEB66C72D3767E7ADA733AEB5816A7F3FF9F610C76EE513A75DC1A8F6ADB9E3CE5BD8620B87AF7CF9533CFFD44BA41B1BF9E7932F72E75F1E61FC98F1FCE52F5770C9A55770E10567D2BD76152F8B4DAA6973DF1FFE42F7E2251CBEEF41D8864DD3F0761E7FEA69FEF8BBF90423A7F25CE8921F9BE6CC0FEFC1E907CC62982853220BC39466BA43377FEF6029EA53FF1722A0097A88272DFEE31CFA562C53C51B29A9A88BBC817E2289839CA822F262283AF71252DB9EAE36097D33A7521CA225561280219471254D5B8D0183A224CD508DC1B7A018C5ACEAF129F417F0BD12C520A6E234E25A0D4A98908983646350F55B0CB0A5CF5FA5CCAA55AB946ED9F502E62F5ECB11C71EA3521BB69D5404268E49E2B9A11C945409F8E0C6A0BCFF863D054562E70D74E81EEC37385829A80A51028F6AA91FDBF318DBD8C8DCAD66B2F099C7297675B2E71EBBB0DB2ED329572B546B16E5628A334EFB1A1327D99CF0E18358FAF26A52D91C2B56F7F0DB9B6E67CE9C6DF9F6773EC96DB7DDCE2E3B6E4DE4D5F8F54D0FB272450F871F7200B5723F861571EB5F6EE598134E20D7DA4A5BD5E1873FFB33373FB914B3BD992DE64EE0DC53F666FF2D273242B091FBAB4E410FF1A7ECFFEEE535410FF1DCC6F71F40CFFC674899014EEC6346BE4A1724F95DE980EDA992EE759B7F9E31FB7D4DA5380245D0D2EA49F46D434DD072133030C2C454429C2F0A112CEB2BF15A6F0FB5B85911B86DD6A8192655D2F846063B0EC906D2E15B3A8E8865AA8F11B84AB1B262E56A0C3BCDF30B17B3CD0E7319397224966DAAAABF58FA184A45626C27052952711825043D48CE83EDAB948A230A14410FA634E4BB44D02AFF2CB6A241153C0F2A35361F3B9E7FDC71277BEE3297FEEE6E5E7AE515F6DB792E471CB51D815160D99290A71E5BC5EEBB6F45ADBC825A31E437BFF91D677CEAB3445696C99B3573F58FAE67FBEDB660D309E369691CC66B0BD788768ED809C8B7E6E92DF662DA0E37FDFE0FEA61E894A38FE08B675FC0C2650195FC1882116DCCDC6132577DE33866B66769B2920A497D68043606014DD01B83DA3B784DFCE429743DF4371ACC72D273500C2A25571B47CAA8DF97926EC364C5B88F30E5F02B54FFBED01215479438A629B3A477F1011F308D1E4C65AC57650CDC24549188BA59386A7B704D6F8D97D67651304C3CC7A212E6712C87C02F82E3E0463691E1908A4352614D751F17FDB3349335028FFEEE2ECAE52A1D7D551E7DF2394E3BED23A452367D85122D2D0D542A35957B0FD713B42FDD739583DD86F2BA6453302408939CF3A0D786AFB4CE49614A4D9425A502D5DE6E0ED9772FAEBCECBB9CF5E9CFF3D0FD8F512CF671C209C770CBCF7FCBD7BE7C3C86B994575F2971E5F7FEC2F84DC6B3EDAC49ECB0F5D674AE5EC71F6FFB2B63264EA4B7D8CD9C1D66B1CB6EDB532954F8D5F53772E2878F401CF59C6C23C56A05D72B6385214D99567AD7F443D624A886F8FD39CE38F76A9607CDB46FB50973E636F3EDAF1EC1845C9AACAA0B95BCCE7B2B881EB40891F9535D1E076492A249970D5CC348BAAFDB91DC24D4CE873A49D443CA1F45B54C9317CB1A88555B08A98D9453A579B03CDD88DA48CE16D9A5DC5C4571230D24D475A42069A0964AF59834C44346AE23FE2B725E2649676D38C077B194DFC1C7EEFFCCA99AA087782AA38E5FD3FB876FD15A5B4864C714CC16522164C22A8101A9D8C24DC3E2CC66CCFCF0AFC19CA68C8762A32A52006506FF6EF87950D89CE4BC078F444DA2B2CB9272301C4AB1C1D29E2A4BBB0B54CC349E6D2AFDB2944527FECCF201947B454232C9E74C7E1F62588ECA2D4B045D5CB79AEEAE4ED6167C5E5CD9C7891F3C5A59DA27A9147515E54297E49CE51922911E6E98D6D83082F6A46D95E711490E5A0A5324A551A9A8CDC352B54CBACF65E2F01C3BEEB025975F792D3BEF79223FFCF1EF69CC44CC99318CD1E336A1DD89F8C8BE5B53299578F0A52EBEF9E31B69C9DAFCE0C2CF31BCA19954DAA416F4629A0123478F52E5E8E96C036BD6AEA3211392B64772EB1F9FE5A73FFF2D3BED3699CF9E792CA15BE5E17F3C855BE9639B6DE772D6B997522A88F470187D61992D769BC60127EDC7A70E9A46ABDCCCA4DFA33DD03CF73D5A7312C18B8795638AD4519E4EA41FA4A86EE4A6EF43E0D26F6769940638194B7590376B3115DB206D4658F2A8D49803B3A6DAA7B94606978CDAD24CF91E666C52B60CD281811D9AF85903695BDC105631BC102FDD84257BCA86EC8A4A814E96A270B7DDA9DABA398C262B9AF728501E2C9695E4E4F5F1F611D004FDF6B1DAA833E3EEBFD0F5878B18567C8AC88928182DA4C5BA33128236484526153BA2BB7D3A630EF81E4EC32E4AAB26E5DEC48326421BF5D6FFF2A20DEB5112AA566A5DA425576859BCBCA29B1505173F9DA71C0B61259B849661FDC74774B113352C5B79339B7E8DAE95CBE8EFE96675BFCFEA121C73E4C16A4350D1F9808C6E43399DCA3F8B5A63E06B707370705350BEAB085A1AC0FA89539DA43CA41B4B10F8581DCBF8D89147B3AEA39F071E7D9A89336772D9F7AFA3219561EF1DE6926E4A31A9CD64DF591388A390627A34279F7901DBCF9EC5974FFF20EB962F66930993C9E5B2E4F216CFBCF018DB6C339347E73DCDBC47E7F3C9D33F486BE36876D8E144EC741385EA127EF1CBCB18D6DC44B53FA26BDD6A868D18C7E5DFF915CF3EB38A6AD1C268C8100F7398B2EB747E7CD10799D29C262FC657E67BABE6902D8A820569A34A26EC5237749FE154312875C6F42F5988E95718D5388678935184AD262D22018C3D0AF214E440D417910F2DACB80AE24298CE40569E7044C79D6C116484D8A54182A16267AC4872F1D2BDBD819A111019EB543A2EE8CC11ACAC52EE5F43DB84E1348C9F94E4DFD58DDD2008636C5B87D0EFE4D3AC09FA9DA0B531E7961E63CDEFCF6758CF0398A98062DCA83A55A7A31ABE696187E0DA117D8D9318BED3E7C94C3916EC4662533E0A495EF8DD2CE97F2914FC5796567F4D1178656D81D5BD253C2B4B3934A945F2182CDD4C447632687C9CFCF11B56FCA91F44E2F56C2711B45FA5F3B5457476ACA5BB0ABD6196C30ED95FA52FDE8CA06331F35776A2AF47D183E90CF5B3815CB31F0454C567C34D0A572AD59AF2953E785A1BB3274CA129D3CE074FFA1C97FDE43CFE70F7A374ACECE7D8433EC4F537FC80D33F7220E31A22D6ADEDE4BA5BEE61B7438FE59E3BEF62A71913B9FDD65F336AE4142EBFF43BDC7CF3EF39E4B0AD99386524AB96AEA3BFCB66CAA64DA4528D9CFE89AFF3D83F9F66ECF83C37DEFC03DC7285790F3F4357C75AF6DEFF103A3A03CE39EBDB84B51CFD55172F6F307597AD39FA986D38FDC839640397BC74087F0F8F582259B5C79BC693DCBE1FF3F83FEEA56BF1F364FA97329A1EAC7C1F5DC50CE5DC6638338F658FBD6790B65FA537DC8CBB6FBA95CCCA05D88198F405A46217DBB1E891272A274DCB88E14C9BB60D13B6DA92C84C618719B51C02A9963422D25E86FE5AC4F3F39EA6F8FC0334F57591732AD83997FE4244DADA1263EB6DD966FF9DB02C1BCB929E94EF2100FF0597D2043DD493EC2D62D9EFCE63F8BABF92725CCA718E7414A90F836B8ADF863C2342879FA369C671B4ED750E5813558BA7A479AB52196FF42885E6E51AEA4BF1A48445EB1314BCD8EFB2704D0F66A691A21B53F5C573437ABCC8065E442C8FCF1B3443FC57825665808AA0C5ABD9F26BF4AC7C9555AF2DA314A5E80B331C74D001181B44CE09A7BF2EAB53DE1A1B94720F46D212354B9E9940BC365C65575A1583A420A6542C12F8210D992CC76F3F9ECD86359273F23CF0E87CAEBDF9779CF089537869C1329E78783E9B4E68E48B9F3E816ACF3AEEFDC7032CEF0DF8F417CEE6F00F9C88E397B9E27B1771CFBD4F73C4078EE54B5FB9844AED65BEF08593D86EE6F65C72DEB57CF582D3952F75B968B368D112468D69A6B9D5564F162B96AFA3D8DB4FB11A71DE85DF27F41AC1CB91CBB75124C0CD5BEC7CC80CAEBCF82426A42DF2EFE64EFB062BC02B7790B22CBC541BDD86C9E2BB1E24F7F8B54C0856109B06153214320D44568506B3CAC3A55D69DF692F0ED87B1AE57233F32E3F9E1D534F53A285A23146A5DE6CBF4A94CD129A1E4EB08E55CE4CFAC7EFC95EC77D1447FCC009A8A4C5AA0058DDC17DB7DCC288C22236A9BE4CDAEE635593C5BA544C5BE833A650E581CC91D4C6EDC071C71F481498A4DFDB7BD4467F2EFEB7BC5013F450CF94DF85FBCC0D541EB91C3BEE51CD5453518013B9D4A48388FCDBB4107BFEB07D366D879D4F9CDE8EC8CC100415D229A9D8DB789D5642D0492357214A21FB2836D5E36B6F31E29F6B7B293B692A5E8C1BC8D691E430939CB36C144562AFF91F884572C8A2C63064C3A856A47BE5ABAC5BB59CEE52C46B3D2E279E7C8222F14AA54A63630ECF4B8CF5D713759844C4EB9BBE4A7F412FF9999C170F9A20051E65D7558649B2795AECEAE599C79F20DDB7861F5D760E5B4D1F492693E7F1675FE3C63F3E496FDF5A76DB692A7B6DBB3993C78C52B73891D3C5E94632F961F4F616F0AB2E66D6E0873FFE0D8F3EB2889AF872640B7CF90B1FE3E843F6E5739FBA880BBEFE6952D92C5E39C27152144B3D9856CCFC679FE385175EE188838FC28D2C3EF9D92F512AC4185507C7CAB1A6BF8F389F62FA213BF1D1930EE288EDC730ECBD26E8C8559BC9FD4686754B9752BAE92B6C5B7A82523C8AC78CDD78AC6F04A9C060845D60F3D1060FF64C259E309CB33FB13D950E83BE5F7F8871C6632C6E9CCD7D9D9B60D348BEDC4B4326C5844697A9F1227A228FC5B93DE96BD999233E74004EDAA54A96B8EA73E7955F6686F90C2D6E0706395E0B46F38CB719DD8C6462762D33332FF0626E1F9E586D71E1859F259349E1BCC7180CF5C7F7FDBEBE26E8219E019F107BF59DF4DD7A168D6617653722A3AAEE3CCAB62820E45131C2B13374DB6D0C3FF6228CD6C3098D1C50C65666F642D21B77BC4ED0D180FEDAC08B6DA5695EB0A48B0E334D119BB21712881D9BE49C55501FAA6A3FE99FF856872ADF362D2CAF42EFAAC5AC5DB694AE72C0AB9D654E3AE524C240042022AB4B941A83042D242C298E0D095ACE19AC1454B9673791D3557D5775E5F62AD21BD165B76D77C02B14B9E16737F2A32BCF62F26893864C063B358C42458A1C037ABA1662F47562C729666D3F173F3229D6623C57A47A36352FA4BFAF97AE9E3E6EBBE36E76DDF300EEB8E36F1C7FCCBE8C1DDEC294496D5CF1DDAB69696EE0A31F3911229752D1E5F91716D2D1D9C3E8F1E3C91A4D5CFFABDF2A23A9CD266FC194311369CD37B3BAB39B2B7EF8030A63C771D4B107F28D5377A17DE31F84DE700ADC183C5102F970E795E7B3973F8F8C5BE01E675F7ED5B10533E7ECC22E5B1A585D259E796105F3BB5A38F4804D396A778717EF5F4AEEE95B48971F635EE3CEFCB6631AB3666ECBB04A178E14012D9BCFF63CC7A60D4FB32A9ECABCC234B63FEE48B6D876734428FFE0CF7FC2E8E2C38CF75FA1279CC67DA56D9857C8D03661025B8C9B0AE51A85FEB574BB2BA8FA7D5C70E199CA43BB29FDDEE6E1DF6A6DFE6FFFBD26E8219E41D940CFBBF3A9FCF634D2D557A9D43C55E061C63E65274B1007646A11B94C96BE3022B3D36964B6398FC068C6762A18AA4865E39F0B239153A9085A35699226D778A458B0B6C0DA8247D56EA4AFEA2BBF66496D84A6A12480A6A83CC406F42DBA564B418DDA20340DD2A14BAD6B054B5F7A918E7E97A55D658E3CE6785A5A5AD6E799A54D9510AF1C4AE71C78EB497BD06F6330BDA108DA8B948D682DA851734BD85180DBD5C5AA050BB9F4BC2F70D58DF771E807F6606A7B062A7D4C9FBE19BDFD0141B91FBFB0964AA183719B6C46C3C8B1ACEA2CF0AB5FFE99BBEEBC17C7C9D3D036828F1E7D0433678CA310F6B0A6DBE3E28B7F49D7AA125B4D6BE7A69B2E60CDEA353CF9C4732C7BF5795E7AF1058E3CFC38FEF0873BB9E0A28B31530EF3EE7F86CBBF7B159FBFF0CB2C5BBA98E71E9BC761FBED4FEBF026AC5C23277CF3A7CCDE7947AEF9EA616CDAB4F137DA375AA6BEA497AA866A6270FB8F2F619BDAA388F1EB2FDDED58316257BE79C63EC843DA30F12B31AA2C5CEB33A1A989B6BCC3FDD7FF9A293D0FD3DEFF127FF766F1407657CEFFE2518C523D326D2A3D259EBAEE3C66B8F7417A184F9B3B707FB8299FFCEAA984CB16B1F2E66F31D95B41D94EF160EF8EDC5DDE8E5987CDE6C83D724CCC882777131DBEC37D773D854389A38ED84DA94BF2E29FAD8FB78D8026E8B70DD5C69D289B708DFE624A7FFA2CAC7C10A9FA9506ACD26BAF665B2293205B4DAC484B86CFEAD6B94C3DE63784CE584C45D0AADFF51BBCF9DB7B561C30F41C284189F0B1E98F2C1E5CF01A56D3487A2A21C5AA4F64584AA69594AD0839872A8A4EDA6DBD79E8A7FA0286E2D46792C6C328F7B070FE93ACEEEC634DAFCBE469B3D879D79D09FC88C077B1E4FC40521CB2AB2F46FC5ED21965E04B22EC0D2B05FD5A42D055BF8CEF96A8F47672EEA9C7B372C16BA4A398DEA6F15C7AF97534F906516105BFFFDDA52AE2BDFE873FE1B8438FA1A13124C86458DE1773F6972E22F67C769E330727DD44476F95E7EFBD9B934ED89FDD0EDA9A15EBFA38E7ECEB30BDD17CFA8CC3193BB18FE1ADA398B3ED0C7A3A57AAF6590DD976F20DADACECE8E2D2CBAFE643C79CC0CF7FF95B76DE6F67082B6C3E7E0CC3F30DFCF4FA9F70FE2517F2916FFD89747333179CB62773278931E97B7784D29751CCB530B9F97BE7B347F13EDABC753C9CDA9505AD7BF199334EA42B65D25E09B1AD92B2B935C8D3938687AFFC2C3BAF7B86D8C8F0337727966DB2075F3F632F8645FD94CC462A58CCFFCB4DCC9AFF1372B5152C6ADC99DFF907F191738F61C1CFBEC9B6C507185DADF2687A2B6E7B6D34D3F63A81A38E9F4263241D83E46F8CF19C022123707D53750C13AB83D4DB5BB6EF1D48FFCBAFA4097A8827309260D1AA5179F12ADC7BBFCEB0A842C51841D94ED360AC22ED8B57670EDF76A9A642CAF658DA77FF2EA98987534B87A4C4C2532A04FEE590EAC2015BCBF59AE437FE4314E14612074BAE187CD3E0E9251D744459DC6C236BBA45533CF8DAC11AC76463F1F5E3CD3F5586E12AE327F1B696C6B2B15B61D5C21759B5F879FC420F0BAB8D7CE48CCFD09C32A15C566DBC64C34F142CAE48B7020FDFADADCF392B82964AC101AF0DAF641008095965AA95027DAFAD65EB899B71ECE187F0EDEF5EC631271FCF0DBF7C84D5AB237A7A9FE313A7EEC3A66337E3EBE77F97899B8DE6F2B34F20D732828F9C7BB1CA935FF9D58FB3E396A3A9FA16CFAF2C72C7BD8F71C3357771DD3517D0D4BA827FDC3D8FBE8E51FCF5F687E8E8EE65DF5D6670DD759FE69EFB7FCBAE3B1FC4DF6F7F96CEEE356CB7DD4E7CF8F8AFE2C515CEFDE269FCE1E61BF8DCA73EC5A3F7CD63D3299BB2FF413B70F7FD0F538C46F1C7975FE2B493F7E7B4ED27BCA7AB4DBA4566FC02AE95E3E69B7EC3E66B1E6246F1290A768E27AC690493F764E79D0FA075744C688BBFF6301A82802E1B9EBEEAA3EC565C4B2908F852F518C6ED77109FDA6B1223E4DE6942C5A9B178DE0B180F5F417B71111DF11CBEEFCEE60BE77E08EF679FA1A9DC45D658C96F8AC7B230DE820B2F3A94E10D364E281D7294D90AD81EB1915515B37224A65BFA78270868827E27686DC4B9A2550D8D10D37D94EAEF3E49B6EB452A760B552B4353B40E2754A69D0496476805F4BB799C714731E2D00BA96546E39829550CF02F7237A5554AB419830BFFCD861624E67409E1C652681073FBBC1709DAC6E0655AE9E82BAEFF006DC49F8761788ACA43C3C68C6C5502DEB772298B9E7E9472E72A96780DCCDDE750369F3491946912879EAA0E9492725F0A5444DF3CB029385831B861046DD464F3B24A6FB55395CAB7DB3976DC720BB69EB12D9F3DF74CCEFCE2197CE3A25FD1909FC4A1874F65A7399B3365741B7FFEF353DCFAD7DF73D159A7E21A0D9CF2854BB9F8E2AF73C0D6C358F0E03DACEEEE61EB3DF6A310C0F9E7FE9AA99B8CE0C453B7C2AD5A2C5B9AE7E22B7E42D1B31991A972C5B74E65F369A358B9D4E39C33AFE5D565CF71DD0DDFE1F179F3F9F90DB771F24947D3B96621471FB63F77DDF17766CD9A819331E8EEEFE4F1A78BBC9C35F8C021DBF1D5FD676D0CC46FFA9A622C7E2865D59D27AC05FCF97B67B38DB99031D51EC2D861B59562913D93691F388191B3B6A318A41961B8ACF60C965CF73166F72E655534816F15F6E288D38FE6C0CD52495B2450000020004944415438D50CA203ED4D873C72CB1D8C5F742363DD85BC1CEEC3CFC35D38F903FBD27AF7B1B40625AA511357F7EFCBB09DF6E693C76F45DEA8608AB56A6C612A05928BAD9EC074DE7963275E13F4C622F7365F270189E88053FE6BACBDE51C9ABBEE2132CAAA03494E74BE468A50A46C7180159B78D8F464C632F6D84B305B0E2634C51B3A79B30DA38FA49C578EFFBCF3346886AF4A7531E8F37CEE98B790CCD8C9F491A2AB2071D8BBE8A9674A8C2EE5BDB2B92816A92161B18757E63FCEF29717D02916A30DC3F9D827CFA0E69BAA3555E057802A515021F04DB569B7BE947B40F7ACFA0ABA2E41B9821F5429B9FDE4CC88ABBE763A9DAF75D2D3E9B168F96A2A7199052FAEE5B0030E62F1E26748D9DD8C6C19C1ECADA6D35F2810BB21B7DFFF14F73CBD884B2FFD22D5154B68775C868F18CE9FFEF14F8EFCE011DCF8B387F8D5F5D7F1FBDBAEE0C9A79770EDF577538A435E79AD9396B0C2772F3F8B3DF69EC5F5D73EC0F5D7FD85595B4FE6F2EF7C9217172CE7A3275CC2965337E7ECB38EE77BDFFB1A975DFA4D962D5BC6C8D179C64D9ACCF7BF7F37FFE85EC9A107CFE6D2A3777D9BABE6ED9DD623867931E4251555EE63E51A97BFFDFA77EC917E82A9C17CC2AA4547F30816FA3319B9DFC96CBAE3741A039FA79F5B8B79DF5798DAB79027E2A3B8B9773C5FBBF818C635B96AD7314EA5E8B072DCF3E3EFB35BEF1D0C0B5FE576F743DC6BECC5215B3430ADE333B4B95D2CAEECCD8FDD2D39E5F39F64DBF698146542A3119714E958785E34F2B270DFE3DDD1B707CFFF89B334410FF134D6C40D21B671BC1AC66BB7B3F6AEAFD2182FC28A629C20AB22E9C8ACAAEE22693F8BE104F46543CA63F661DCBE3F2776864BB5B53A06930E49563871817B2BB73BD1F00ED27B80C10B4BD7F05A7F48D43A82E57D152A012AFFBC718784E6835E1E49F33DC3F7C81A111DCB17F3F4A30F51EAE9A6BBBFCAAEFB1FC18C39BB52096302AF841915307D71C9133545D2DE6AD0EB59550B0E347F75AB255CDF5515686EE73A2EFBE2695CF8C58B193366138EFAF007B9FC473F62EAA4496C366632DB6E3591C6C68011C35AF12A350CAFC6CA557DFCFD91677968FECB7CE5ABE76214D6322C1D92766C1E7F6E21071D7B30D75FFF0077FFF5CF5C71F9E758BAA89B2D664CC46CCC70C659E73379C4443E7FD68934B6BAA41C8B6A25522649BEEBF3DCFC97F8DC676E60E2844DD8739FE90C1F9562D3299B71CD35D7F389D34FC10FE0631FBF84E17B6DCB41FBCFE2BB1FDA6BE3607E9357F55423D5D731A3AA38238A298B57D7C003BFB89669EE4B6C9AEE245B79896A763A7F286ECAD1E79EC5C4D646EEB8F116A62CBF91B1C525DC6A9DCD93C5980B2FF930CD8D06B6EBAB660CBD91C953979DCD1CEF3EB527F18BEA59AC6ADE9A3999679963FD9811E52E9EF28FE3267712DFFCC627185E91BD458F3863E35B92EA30A47A5CB7FC7A9733AE09FA5D02F8562FAF50C189B3AA5ACBE87F85E57FFB222D7D77908F7C023F8B6BE789CC32E950E476594CA348351FB29CD16CFA815F638D9A4B6CA654659F10ACFC9FD0A9FD76095A92E052A21B9B4AA1F1B7879FC5193599DED861455F593579DD783B53296291CC49926E91540A5148CA8C092B65163CFF0C2F3E74972A2E09D3C339E2C4D34835B4889684D8EDC531AAB85570BD5891B3786EB89EB7DEAD4E5CEB6A5E8DAAEFB3D72EBB317D4213E31BF2B43799146A31E75CF84B56F676F3A1C3F6C6E8ED60FFDD77E65B977F93CDB79ACC991F3F99BFFEFE4F6C337B575E5CB29A6F5F750DE77EE10BCC9E3E857F3E703785420F471C7928855C9A8F7DEC12666F3181CF7DE238C2A2C5A8F60CE9E6027194230A1D8A45172753C2B2FB09FD18B76491B6F3D46A657EF8833BE92DD638FD531FE195258B88A23C6D6DEDCC7F7A35DFBFEA87586686C65DFF5F7BEF01675759ADFF7F773B7D5A2633C9249364D2494FE8810408254020107A1514A509285C2B5C51B0FDB162E17AD12B551451505069222DB450426F0984F46432993EA7EFF6FFAC77CF00FEAE7A31578573EE7BFC8C199253F6FBAC7D9EBDF67AD77A9E891C76C83CAEFC0713F4D67C99918952A495527695864BD9AAA5DF8597EE7D04565EC7BCD21A0A56995F1907326C971339F1D0E9DCF495F339C05C438391E3BBBD6790AB37F9FCA5A7E359267581DC0D853C7BF7DD8C7AFC1A86DBAFB035369D6FBF711CBB1D3E9F86753730CDBD87B6528E67AD45FC26B71B975D762AF552D228E794AB7B28ED8E26986E16439C77A495443F7608014DD03B04DB7B7F513E289030E2846503D32AD2F5C40FE1E96FD21876295122DF88631AAEFA92C57C13DB2A51C62597188E3162090D4BBE04D608354012DAF177B26855571EDCD1F95B197028356269B4B395C6D86D7F7A8AFA8933E923C6C6EE3E8ABE7823EEF8D68D123D7B3B471F6CCA33450D2DA0A7733BAF3F760FAFBFFC3C3937C6E499BB73E4B127D2D3DBAD7420F232F411C62895223951C99A0B8582EAE2901F21683F2CD1DB9DA5D4EFB1D3E8E1A4FD6EBE7AD9795CF28D9F71DF531BA9696AE582D30E266C7F95B6A6D1FCE28E3F306E562B272F3B98D54FAEA679C418B26597AF5FF12D0C27C1A5977F9ABADA46D24983D0F5B9EEF70F72FD0DBFE6A6AB2F67FAB811AC7AF24D9A1A7CA6CE1449D5563AF3A6BAC0AC5BDBCDA68D5B88DB0E93DBC633A2394DCEDD403C59A75A148B9EC78DBFB8931F5FFD7B468E984DFBD67E628E49326E327CFF091CBC7836571CB3F77B3F71DEC3339F6F2F31AD394ED6F748DA01714FBA62E2F4C64D1A0C8FE5577C92D9FDEB20BE959F7A87D357BB3F9F3F6F0F565EF571660DACC5770CBED77B32D3164E64C9D18B9415594D18D2BE761DAB6EF80E0B78938D5E0F4F9BFBF0E0C0122EB8703EEBEEF92E6D5D2B98501E6095D3C8ADBD87F2E9FFEF0C1CA78BB4E1E3969B942052BF1B128B6F236DD6E0907E0FABD14FF94B086882FE279F17223A6385AE92690C2C07B3E739FA6EFC18F5E5172864E204A5003B94DB4203C32860BA3E7133856F66E8370C1A0EFF3ED6E84520BBE1926DCB769F61A82CDA08DF0B418BBC67E4BA9DC3E0DA5FDF4FDBAE7B51882558B3B59B82FFCE66E38E40111A8E924355F295D29E271D1D22A064A0C6BF7BDE7A8E271FBA8F2D9BB7619B090E597224D367CD637B4F3FA16DE1CBF049B1A8C8F96D19D162311A4E291428F76F62FAA4193CFFD88B4C1AD9C0474EDC9F29D3C772D52FEEE2E777BF82E18CE04387CF6444711D53C7CC61F8A4A9C4471BBCFCDCF3EC3C7A26EB3776D1DDDF4DFFC000D7FEE257F4147C16EC7F10239B1BE9D8BC96071E5CCE19A79FC8474EDA8F526F179FFCD897B8F207FF4E53AB855F1CC935B73EC435D7DD4BB61B6276248BEAE713EC397F1A177FF1304C7F1BF17892FE9CC151C7FF1BA1398E7231ADCC6893A9906C7707D34F5CC0818BA673E9A1737704E2BFFA9AE52FF76076BE40C9AF61E61EB349A665332EC492B69C4D1B78E4FA8B99E06EA62E3D8C6F761F44BC6D169F38752E9BAFBE90C9D9B56C89D95CD3B194E33E7A303B4D1F4D6A0036AE7C90179FFD23BBB8EBA0D0C7869ABDB866531323A72FE0B367EECCAB7F7C88F0A91B98126E2517CF73E7F6391C74EE6718BD531386E1922866E85EDBCD6D8F3CC8BC23163273E468A577AE1F3B868026E81DC3ED3DBF4ABA380CD910B33D8AA44996B6C3BD97C3AA1BE98CE5A81103553F4D4114ECEC0112B2E79D1F4EE08251D7CD86BAE319B7E40B5899914A44493269C978A56D2ED27296B2C7DFFA0214557B9D4F9C7E0CBE7FDD1DCCDAEF10BC548C551BBB29FEAF6AD091E940547491E11B29770C0A2389BB77E093087A59FFEA73AC78E041063ABBC8A4EA386CD909A41BC7900B2D827216AF9853043D24C45F2816D4EFE57C8159A36D4E3BE6381CD75166B00D992279BF8F52A6895FDEFF263FFBF9439CB0FF78164D4EB3EAB94D6C0FEAC8D794D875E729AC797C0D4F3DFB227B2DD883B6B6B16CEDCE71E7F2A758BD711BC54296712DC338E7D8C338ECA0D9384E9EC2408EB0D84898F2F0623E5FFDFAFDDC7ACF724A658B45FBEE43C3B02CCF3EFD04935BF7E1D1875752DFD8CBCFFFF3226A1236EDDDF0F14F7E879EFE7A5C2F86E5942996B7E0040E7B9F7924072EDA89F3F6687BCFE7CD7B79E2750F6CA2F9B1EFD26667595D4CC08C0389373431B2FF657A9FFC15A3EB33F8561785DEA9FC3877388B3FBC0BA3682779FB8F18EFBEC9FADA18F7761D43F33813AFEF4D66974A38DE469CBA80E1DDABD9D638953F6D5CC8B32367F3D9F3F763565D407E4BC8CB3FFD1463BC97899BEDF4245A78313B1EB7716F6A5219D8FC388DC902EDE6249ECE4EE5924B8F241DDFF13BB4F78243353F4713F43F39BAAA575526BE905AB008DF17B08B2FD1F1DBCFD0D0F358E4AA62D4E0ABDA7289A457C60A2D3C234ED10E088218995DFF0D6BFED984660DF8F148BAD194AE8F209A34FC5B042D32738107A6435F68F08DEB6F67DEE225E4039BCD5BB6D0EB5BCA20E0DD850A516697B6394983653333D2F0F82B8F77E94C0F493045521E83FFE58484F901D6AF7C8A571E594EB6733B4DE32670E0B127D1175A38857EF2A51C652FC0EA2DD137D04B4F42748B7364D66CE6D28B8EC149268967C6E3F9363535A841979A8C8CC77BD4C4928A408B5E89FB966FA0409A0D3DDD6CE91D60F98A57097B363363EC704E5EB698FA5840DCF049A513340D6F220C02D209838194C34F7FF70C9F3C6E4F9A0A050A81CDAD4FADE3135FFA05BBB68D66C6B4312C3B697F72E52E1A6B62643B4D1EBEFF756EFED51FD9696AC0B7BF7C1EA5EE1E36AEEF6563A7C5EAAD796EBEFD16B0B3F4D3C869679EC6D1FBB471F8ECE1FFD0B3ED0B573FCD813DBF64726925AEDCA9A59A28943DD27681B0DCA39C6FEE491CCE539B32D48F1CC7173EB1989577FC07B56B1F618CDD4E10F4902FEF8C6D94B0ECCDC48D3EA5CBB2C59AC8E6DC789EDEDE4C7761181FFDF449CC9E9A202D13A6A590577EF32B7A5E7B9011897EEA8B5962E28CA394EA4AF4960AF426DB7883793CD73D96CBBE7134095D82DEE1B86B82DE61E8DEDB0B65233B1E8AA07A3442EB192242B48D6DF77D8D86553761F839CA665CB95C883891882809F18AF07AC94C12370DB699C3695DF615CC96C354E3BFA8CB891B4628A2EC6AD2F06F8CCF2A6D7E5F357BE40C8B2B6EB88399FB1D4C4EF4387A7BD89475295991F345A4132DC42A433092A34B79E65DDCFD1796FCB78494E4E9B2A32F62F56937CBAB8F3DCCF32B1EA72F5F60CACEBB3363B7DD31F359FACA0525A294CEFAB8BECB56AB0FAFB793C39BC773F8DEF37063218FBDF43A2BDF5CCBB0E666280EB070D6540E9ABF3389708030339C8BBE71134FAD952DD90C1BB76C2799A9510E3066AE9B0B3E7C3CF16217AF3F711F7BEF3C8DF1E3DB48A4EBC9FBD03AA296AF5D731B773CFC34171CB127979C720879B38EC5677E93ADB91807CD6EE4B0430FE05B57DFC45B6BB78AEE3DFBEEB633E77FFC14BEF8951FF1E48A97B8EEAACB9830A2482256A4CFAD657D579AF3FFED0A42D13989599CF6D1659C73F8747619937C6F27CD7B7CD6795FBB875D272729BCFA47761BD64DA6EB791A53D01136B2D69CC2ABB961BC981B8E93A9E3C2338E60FA883477FCD735C407DA49967AC8181E39B31F6C714649902BC6E9C8D5B2AED0C07AB791D1B3F7E094C3C73069AC436005384680513254C7C8C3B7FC8CEDEB9F674C720BB5564EB9AEE45C9B2DA53AD63196D7CB6319367B5F3E77D2346A7502FD1E23FADF9FA6097A87A17B6F2F2C49A7912268F117B4281A32B89D85EC1374DCF4EFD4945EC1A68827BBDFEA347FB7EF8945214C924C6409D3B3C81CF913BC9AA96A08C0F293944C4326C59563C95F7DA8B78B2C8D8AA6CDD5BF7D90DAC93B9368A8253B90E5F56D39CA9608330DC99146EF34F48EFFF328CCBB9D5AFEFB510849958B39124609BBD4CF9AD75EE6A9C71FA354F299376F1726B48D27E7BBE473399C01A93BF7D3431E6FA087CB4F389D2096E247D75CCDF91F3D85FA38B48C6C0227E0E2AFFD80A9B376E1B3A72C521E81B73EB989B3BF7223E5C428EC641ACBCB92A44CB6B79B96BA04138739CC1C534F2666B2C7827D39FDBCCF901EDECAAFAEFD3A3FBEEED7DC74DDCFB8FDC75F66FF5D67F27287C511675D4EAE2FC76DD77E812F7DED3BACEBAEC3355B280FF451EE7A934B3F730AC386195CFED5DF71FCB20339F6D0D1A493033CB6F24DFEF38627E8E86E249B8D939918E3C4E3E7F3995376656CFA1FAB4371EE976EE64B179FC8630FBCC0630F3DCD404F11279654834081E92A3D9071139B38EE9803A94BC7B17C7073257EF89D9BE9EDECC22DBA94EA8B94A48FB33C023B1C413C55C78419ADCCDD670C6D13628C340D25EC550CB3602508C5C04BAECA9EC743F7DDC77D4F75D23B90C42804CA5ACB2B974836D84CDD6512071C3E97F1B5627CA51F3B8A8026E81D45EE3DBE4E752A4B2962D064AA2884592E9032B7905F791BA567AE221D6C51150119F6289B8EFADD0E7C3539578AC588178A4AC2B238F56852077C95C06EC5347CE5EB27943E34C8F2970E49DAA0A58783D0A36CC578F0E54DBCD09EA36DFA548A258F17D7F7910B93CA1F31AA67876FEB70486943EADDD185232A820C11F7D0EFD1EBFEFA2314CB2CC3C096C985304F501860C3EBAFB0F2A1E524029339BBCDC7CCA4F08B7982813EC27291EEFE0EE6ED348DE3F73D88FFBCFD768E397129E312B5A48B05FABB3B1935651C6EC6E2A6FB1EA1A9DCC9C9471E419F0FCBCEBD922DF9243D2583BA4C12AFD0C391FBEDCA4B2B96B360E638BEF2E95359B1E2259E5BB581867133B8E5EEE594BA3B98BFC72E9C70E85C5A4D97782CC9FD6B03CEB8F0EB5C70EA31ECB7FB144E3AF30B307C278593E1664997B731B1C9E1CA2B3EC3399FBA8A96A6145FBCF068BC621FE75CF815B2DE287AF349E28914B3F79BC281FB4CE5DC23E7D0F08FE5673A722E0D0947D95E6D2F85B4E75CBA7A5C921834C7025A6A6C52A998D2B3B66216253FC0159F411F7A0A45E28E8327E7A6C8C51A36B665A9F6B8540CE2D226477EF0DC8D34CB6588AA1C26294BC79174678621BDB912FD259FDE6E0FC748D0506F924AD8D4A694CC8CD2DE88CE1EFDD811043441EF086A7FC76B444D4ECD518591A69CE8308B2251CC18C0E85B47FBEF3F4566E079CC720FA6635090C942C32216B8247D71CD0E31BD0CA6EF914BD69198FF059C396752B01D92AED4FD061BA3FFCA3129A713F9E4D0C3B5626CC895F8CA8F7FCBE1279CA83C015FDA384077C9A2E485984E4C7D6195D4A81AB0F1552D5A4C6177F461F9B63212756D11FF2F63FA52672FB2F1F91758F9E00334B64E61E2942978F91E4A035D2428D3DFBE8D733FF23172D91CB9ED5B98B9EB2EACEE29F1B33BEF6763470733C68DE2CA4F1D4FC237B9E791873860DF3D495B8EAA636F77037EF8CBA7B9F791959C78CA899CB1FF68AC810146A69398E52C99749A4E69DF4BD6F0F0336FF16F9FFB3ABFBCF91B8CAD6D64443040A96C70DF3A38E77357D06214B8E2B2CFF3F18B7F40A97694723BCF582EF6C05646267D2EFFF7CF70C1C597327DCA08BEFAD933E9DFDECD672EFD019B7BE378AAE3A6C4E9671FC3E2853BB1706A1335A68BA8FFA19C6A06FDA48C40C9BFCA5E853C5222A615F8AA53C753E52BB198120D6C4F8959E54CA14D54569A91EE2075E1B4558B9CDA331EBA729ACA8C5C49091822A06DC899E847FF53FE81D1FC67D2AFC3140D153BC4370A04A194326218651B433646E40D24F5362C7526FBA1741B0DF6BCCB9D617970A3DA3209ECE8FC8E9410C5AED6C330A400AD47BD77F4FBA3097A47917B8FAF0BDFD6878B6ABA6A96C30BD430871196F1DEBC99F5F77E8F5176077EA143E90ABB564289CEA43D710217CFC238040E091FBA62AD0C5BFA4DCCB10763F865E50DF7B70601A411CF1265BAB0846FC6E8F64D4EFFDC959C7AF639D8B114DBF201AFBCD58E53D3486FD1C550060111415BA18CA2DB7F9641BF7BD96F9741FEC21EE2BBB36D2111D7128353A112595791A0A783877E770703258BD9D36761147BC817DA09077AD86FF24CF699BF90BB573EC5019386D3366516675D7D072BFAE28435F524BAD7F2D19D5BF8F64797F085EB6E63FEDEBB71E4CE13A5AF8F6C6873F97FFD89EB6FBB9323971DC1E5A7ED8BD1DF45C271A8AD4D2B82ECECE923595BCBABABD772EEE7BF4BCEAA67FEDC299CB1782E13DB5A5995ABE3944F7E9D45BBCEE1D8C3F6E6F26FFF88CD03B5648B319AEBD2B89D6FF0D94F9CCCD8B67A3E7FF1773878D1CE9C7AD4CE18418EA2D9C4AFEE7E955B6E7F889A9A7ACE3AF3608E5B324FDDEA4B2D5E8D1899E6A0999908B544FB084A163694F6C4245933F2FEAB51B2B4D282E34486DC76648F562647027155977D0871563708C218E550CA6496DA91907AB19A0317053BD5E71E5D64879CC0239543303DF1CA32089D10DF120A8FA460A58C21E79E64D6CA744D8859FD8BAC41DC6AE5962F1E8976C9AF96DC6DB91886A7F4370CD7899E2A29B4A4D2FAB143086882DE21D8FE9E1749CE1291B33C2C75D64A7786B89AC89776033DCB7F42E1F99F31C26CC70D3D4A661A2B30487992D124C8C765D8C4265D36F16D979E86F98CD8FFAB98CD6D6037802935E4BFFC90AF9B081899483FB44DBF11E7FA7B56D253B699357736B91056AFEB64EB4089205D475E6D3ECA71465F36E9E8F89B72A3FF839EBF6C644A99447585843671CBC4280D90A2C4338FDECF9AB7B6B3EBC4A990EFA0A7B0911ABFC8BF1D761CE9783D37AF7C82630F9A85196BE0DCEFFE812DB1C9CA79A691ADCC4A6EE4DACBCE60C34040EFF62EF69F35516DE29D7FD97F504A36F389B38F655A7303996000694A7CF98DF54ABA473A5386A5E2CC9B360ECBCDB17920CEF35D393EFB85EF72FA01D3F8DC1947B32117E3E4CF7C8FADDBB37CE38B67E23809AEFCD1AFD8BAB95F89D9EFB7E74C2EF9C2523E7DE94F58F5C25B7CFEBC539931DE22F0F364CD26B6151BB9E8922B3874E9520E5AD8C2B28593A811C1AC7209C349293C22CAF4445E90D096ADE442446AD4D0EF18B80634C85D8D30B35C24079DCF4243BA810A91C26190023117360C35C12739AB5C0C230571D98C96734D08544858DCB5856807F78207E3163A39027190376284240870D424A1A887CB5362D2D819DAEAB551154C2EF9E2386F83278EE0018168489B1E9ECAD1E55C8F2B971D7903E9B0D33EB17F0F5FFCF9733541EF3876EFF1959243475B7FF285B4C4E8536E37CD2405E594E292EA7B92DEDB2FA6A6EB090CC3276FA6947E47C22F9113271243BA9FA5DC21E3B3218E78CD0DDF9BFAC3BE8E553F77F036F22F1F8E6C52DA52830CF34A0F386BC4D9520CB8F0CBD770DA47CFC0B04D725EC8B36BB6D24F92BC1189F66378481E67292190BF9E01454A797FFDE159059539E3273083B852A18C592E6630C09A375EE2A567563377C438C2EC46FAFCCDEC356D2227EEB4076698E467AF3CCDAE13473271EACE5C72E3FD3CD3279B54719CE216CE5ED8C625272EE0D7B7FF9E1933673267C6246E7DF02DBEFCD3BB39F4B023F8D87E23195F78835E3FC913ABB6B3A6A7ACCA1E3535359C71EC1286079D4C1B912455DFC26D2F77F1EF57FE9C0F1F30850B97CE531BB3373FB999AFFDF0D78C4CC137BE7C31ADE3E36C6FEFA0396331AC7624A79FFB353A73358CCCF4F08D8BCF205E2A73DF1F9FE2AE87573390184E7BA99D8F7FEA14962E1CCF4E0D4952A2DA2C59B0158DED4704ED826B53B0434A46995A378629E251494FB96567DCB8AADFBA8E64CD83D41788DE899C08D26A1995B7A24E1BA9F10FD6382463167DEFC109D1774C71544BCFE09D9C3C57F276C9900325156B88A34E1865C4C2AFAAF5D3C86248894262A72E1272C12D1288ED5528F74362EAE063198E2AB3A86C5C0EC77445111A0B59C33FB8F8FE1EBF79D5F0344DD0FF82284675C2A836278A1AF26512B2140A14C9C85A7AB1DEBA95CE3F5C41A3D54DB198C788C5D5449E6BCB1747BE28A2BB2CF98D85E58514CC3861CB5ED42CFE06566D1B864C8F85B5CA6C56CA09F2E5B7E53B2B99CEA038A9FC291ACC05CBE08B3FBA8354EB4EEC31B70D4C938D399F475EDD8C9B6A2070E284BE87657AEA4B2B9B48437DD2D28027C7FFB65EF4DB3DD2EF2E6ABC03AA6B97D5EDB2E3891C694C8D443B691BCFCFD1DDB185D71F7A9C098D4DF40D7461A661E9A2054C8D25A9F13D7ACBFDCA5C77E4849D58E35A5C79CBEFE8CF0E30BBB5892F7DE80446793ED7DCF15BCE3A6D29E9548A2FDEFA003FFAD3CBA4BD5A6EFCF431CCAE29F2FA86F5BC9A4D71EDEDCB39FE88A574AC7B83975F7A91C316CCE5F47DA78059CBC7BFF69F4CDA634F8E387026CDF492B01274166BB8E287B7F0D8EA2E8635D4326E784C79EAEDB1FF7E7CEFBBD72BCA690807F8F2858793B03CE2C9363E71F18FD95CAC258BC729A7EDC71EF3EA386EC14CD2865C5425F6AAA2ACAA03F29BDABC0D2C655B25B5DB444044E2B68767F8D8414CBD46D40E3D951FCBC5D6896AC35288928DBA77BF979A8A8A646555D62DFDF183175095302B612BC98C878AD562DE1B7565FC3767B3E800413276F9E4C1F348069142847CA31545742FD5694B9D6FEFBC8F64FA92FDCB5D8126E81DA5194DD03B8ADC3FE875B9C11A71DC5B47E9A99F917DE6670CA303CF2B508A67D468F19FB5DEF99EAAA78A13897C397B5B9730E2804F632666133A22BC14E5EAB2C3AE4A142A07932F6A747B1B88C469CCE68DDE02CBCEFF3A9FFDDC45D435D42801FD35ED03BCB1B5879C19C3B593B8382AFB7E878C658368A8A631748FFC4E5BE05F82C495FE595F7446A4C40161DC26EBE689DB0603EDED6C7AEC1132C904DB7205D58298B161DEE8619CB27057EA4A7DFCE2BE3F70F0D1C731BCB6254AE9CC027575352AC52B153D1E7BFA112E3CEA60AC7C8E177D9F73AEBA95DC8612DF39E764C60CEBE7E9D7DEE0F617FAC88C9BC73D37FC9423172F64C573AF72C159A7B0685499443CCDC32FBE8597ACA375FC6836BEF10AB3DB5A48A8E11F9B1FFEFE39963FF512FDEDED943D9B52AC8E58C266C608B8E8B40319D760D0DB5BC08DB5F2CDEBEE62E55BDD4C983C860F1DBB27472F18CBE88C18A5EA1AEC3FE8EBF27FEE6D3441BFCF210FFD3C8111C733039CECEBE4EEFF06E12BB7529B09E8712D1CC752B5C4B769310895CE83E85C88C1AAA885F565F662C4215FC76D9AA3BA3A1C21D5C0509B5192C5444327463479888BE707F41A31EE796E0DD7DFFB1C1F39EB38FCFE3299B8C9AA751B58DB53A6835A72B1464CDF1DAC9B0FAA6DFC37B38041F78CBF82A3BA7308A20D2755028D9B845E8954A988D5DBCF86671F63203740AF91C44DA6E5C699FA5217E71DBA1733EA2CFA4293A79E7D95E19906E6ED328FE67175ACDDB68D37DF7A8BB56BD773E6C74FA4B954A43148D29F88F3D8FA2CD44F7ECE0000200049444154F98E3263E3BD24CC553CBB21E089F67A5EDAE2D232AC9E1199180F3CF420A72C3B80C5936D1CDB25AC9FC065DFBB8D97576D27C8F6B1F7CC662E3AEB086C7A544D785D87CB6B9B3AD8D6D989E3E79937750CADCD0D140A457C5274F7E4A91B3E92555B7AF8C14FAEE3828BCE61EF69C3993326493AEE4823E4FB7C96E98FAF54043441BFDF91F3FA09AD34BD86A5062B129D0F3070D7D749F4BF8C5BCE49F561D01B303A50D3B4F0C2882C0DCBC12EE7F19219B65A33693BE42B18A3F71ED48F967A7792D0940D27B92D954A6208A56CB4B1E3A4D5A8F5C7BFFF3B82581DC71DB680A4ECC2DB266F760CF0C2E62C1DBE6C1A451DDC6ABB4A751BC834A46CB6A9662A5533FF737BAC3F0754363B25E9561B856648D970C95801357D034C88A5787AF99DACEBDA4EB759879F69A226EE606D5BC3998B66B2706C0D8E5987418CCDEDEB79E8B9C798B8EB2C56BFF52687CE5FC0C269B358EFC86698CDD7BEF83DD22D33E80D93CC9AD8C69E637CC6356CA5BD3BCEFAFC08AEFBDD2374F6F4637825962E398046BB8F836635622513DC78F74BFC66F9263C7B3485AE4EA60C2FF1FDCB4E27166C259673C97B31DC749A62394BCA28E2F66EC334124A9CFEA6FBD7B27CC573CC9B37819AFA0433674FA3ADB59145B35AA93307C5ACB451EAFBFD2DABD8CFD704FD7E874EDAAC4C5BDDDE0BD1394137E1C6FBD972D7B71815AEC52BF7ABCD1E65E2AAA6112513B5F014519BD84E19513CB28D3A7A9D49341C741EF6A483088C264CD9DC911E64D1831E1CDB961E5B4217D7F309136936955CCEBAF82AC64F9EC221471CC240292096761828F8BCF1D62636F67BF4953D4C2B8E614B2B97D450A52736FA918199779760DED1F418BCA0C8E693B2C492563BA9A59649FA65C60606BB8F68E6869BAFE3ADFE7E8A99568AF14670CB4CAA35B870E97C86E5B740BA9604068DDE00231B6BD95E2C61D6D4D05C5B839D1B6063A6898BBEFD7356777914E22D947C1BA7D8C9FC8601BE7ADA7E247C9F57D76CA5D78BD3950FB1620E69B3C8C2B96329F76CA0DD1DC985DFFC397EF34E749644FCBEC4D17BCFE0ACA37765DD2B6FF0DCE34FB3FBDC698C19952257EAA55FEAFF6583C64C3D66A1C4C997DF8A97A8A1C6EEE4DC338F62F2A416769B319626C724E5BB18D6FF466FFBFD3E39F5E7BFDF0868827E9F23A04C2764502B28AA8D1D19C7B6C32CC6BADBE9FDC35771BC7602E92D0D5D6246E4B6AD085A48D78811D8596CDFC229A5D50E538F91A466CEC9A4E69F831F1B85299B89A1130D3D8432A138E84F3828B42FFBF11D399F4F7FEB1ACA756338F8D88389C76CAC72C0F054C8FAFE40B5E06DDDDA4D4F7F5699C32A825624ADB6B030DE766D91FDC37709440F66FC6A807D7023AC6C9449042EBBB6B4302595E14B575DC556DF24A86FA5686430DC80E9ADC33968562B6F3D793F9B8C124BE6EFCCC1231BA82F9721D9805F3B8C7C6180965A876DE524C77EE96AB6378DA5148892922C7080C52D369F59381B0A1DA4E33E857C91AD5988D734D0940A4939657201F823E671C1D7FFC0BA7C968229651E9F51318B2316ECC3CDD7DE4A602598501FF0B54F1E43D9CF71E1B7AF615B39C567CF3A83D9C32C4EFFDA2FA81FDDCAD9272F64C2489B39D35AA889992AA699A106455D827E9FBF6595FBF19AA0DFE7D8C926615C0A075E0EC218453BAEFA5053C156FC977E45C793D762BB1D51F9A13CA0485A287688A04D0AAA7420FDD209CF26EEE5C95926F9D10B197EC0A5987593C0C8E01B32D9160D31A87D3E51A153CD192E452FA4DD33B9EC27BFE3B5ADFD2C5DB698496D2D84A51201F16823DE3070E58E7D906C865A6AFFCCFC7B6810E25D98CA7EBFEC5B4AA78064D152B50D5C9726C722ECEAE5C2EFFE9852C368480EA318C470EC04E59E2E6A6352DD2DCBEAA877BBF9FC718B99307624BF59BE92753D2E5D6FADE7E2938F628FF92D2CFECC8DACB26AF18334B6E713789DCC1AE6F0897D16D0D9BE86DDA70C23ECDD4ADEA82388D590A2C0B69E6E9EDA52A6CFD989DB1F788A3E11A04AFA50EC251504585E02CF8B633A718619FD7CE353A7B272E5D3FCFC8F4F32409AF1C393EC33B9810E3FC9BEFBCD67625D99DDA73711B70C3C31B436C5D035B2F58D0645F44323F0F723A009FAEFC7EC1FFA8AB2AAE486D8BEB4DF496D5732636973F508CBDB293C7F25BDCFFF96B89FC529F59130A4AB5AC672258B96B17021000F533C0E7DD15208C8CAA45E7A18F9702C4D8B2E20D6BA0746BA9520CC60A84C5AA5D17852172E9688C5E3644354CBDFADF73FC34F7E7D1F6366CC63FE7E0B993532855114A70E5F3965A82E0ED5DA2599B249A88621A2662BA5D7A112E877A6570A66D4631B97A9379131754C3CCBC32DE509F379CEFFDE2DB80DE308A4275C7AB0A52462C8C6A8110D675831EA8B1D7C6AD9029A86D772C94F7F494F6A2461BEC08C8638D3C68EE2AE575FA73FDE843510A3CE8742AA4029BB85F1758D746F58C34547EFC1AC06D8D6E3E1DAB58C1DD9C01F963FC3F54FB663D5A4D5E7F9761D1282985704BFA014DE4A561CCBED87623FD3DB26B169ED5ADC528954CA64EAA4111CB0680F268E6A60464B9AC90D0E2919891664C4A24CEE2E641250C9C1EA4DC27FE897E6FFD09B69827E9F831D8D824B563BD80AA7BAD654E33342DE8EFF32D995B7907BEEF7D416D761FA7970624A8E3450BA083E31D720A6349F8B146C08620D7805485825D67A696A26EDCFE8DD4EC51CB60718C3D5C6A16785140D9FB410AC2B9B837102D3A60F93B57D1E3FFDDD721E7AE635C68C6864C694494C9E3291444AC82CEAE61592577DDD7E340AAE2E3383757451E3B1D598B2AF26DCE4989076BB42998429C332E25E5E22DBB1991FFF76397EA2498D69DBA6F4474BBDDBC153E576B1E94A5063949992F4189E4EF2F89A4DF4256AF192719166C3C8F763D70DA3EC2748F65924DC806C3A209F0C09B239D515B2DB489BDD5A33DCF7C70730E31976DD6D771E7E7E2DABDD4612563F948BB85E1ADB4AA93ABF119628067935FA1C0B4AAA9D37ED24681D51CFAE9347B3F3F43686350D23D390624E8B43BD09C9D0C310861F720F91DDDDC129C01DF77C7C9F4F4EFDF1EF3B029AA0DFF710FCF503900452C60462EE1678E9267A1EFD31F54E0FB95C3F8129B7DF0E3157C850326297D0F0D5D49EA82188C595D48B0D338BE92468EF1FC58859279199730C467D1B7E22495EC472064B1ED22B2D03E192999765F0CF3068EFC9F2AB879FE7D11737B161F3369C545A5D14E47364E046DAF62C4F067C2D4A6602576AE222F2EFBBD8AE488C7A245C9FDE648CBE9849831FD01008413B148D32138625F9E8874E26EEC41508327028D660A23F11CA549CA4D0A2952D35EC3020085D4231A495963D99620BA5D41365EBB68C45CBE44628B39972F109294BF62EBA278288F48D7B79F596EAA2419C12316CAF88E9CB7B86F8A25DA1EE0CA44DD153C33AA2F857934ED0DC9024637B4A36B5A5B18ED14DB56A8C59ED1F0CCD74BC5D0192F789DCCE23D7759D417F80BF661FE843D304FD810E0F944B3E8E288A051DF8AFFF8E6D0FFE8816731394FA2985B66AD113329571703521269A0FA168F34AFB99E846D7E30AE1D5186CF73DB2F166C6CC3C92F4A4C33113D329261B285A320726536A91EE981A1DF6C46216A5AE5794DAB11F5012229381C5C1CD2F21542B1644ED734856ACE62409428F8C08A189D156FFF3584623E5D444759CBE15952EE4734CD320ADA695A302493412138DC60D8DBF28B303A2717929C944741C196DC98F7CE6A09E9A7A9EAC41DE4F9559E4C2E599F8BE41393055FBA11C9F9ACC547571280CED69CA1D8192DE8C2456FD207ADFB438C2F81EE2BD98AA91C1E5485FC2F20AC40C191672647E3B1AE953BAAF722711AD4875CEFC4D25930FF8C9A70FEF7D474013F4FB1E82BF7100421E5E806FCB5660489A5E8C55B730F0E055C406D6108B998A607CD3C63725FB8DC6879DD0231E9471C4BCB55C47681994CC3EFC544890B4E9E84D520E7662C2B42538BB2DC3AC15BF43E5861869E108E104B6AAC306410111FF15C19D282B1F942F55F9B610734CC9A80A35D9A2181CE4B0826E286F67DB8B2BD8F0CA354C1AB133C3F6FA77C2CC04BAED90786892F02C51E2C142FA58A2894735062D3B97CABC20226A2B28A83585A6B40CCA31C8D88750B964D8F2931C6C3D144A97632A0F66C0836A6EAEBC775C19EE1684BA95C101AA246404458278245E24C6BE8472BF227723F259715C71B909F291116E98A02406BB1E241CB9B8E431C47841843F4379BE307FD41F2E23FC43E3FDEA42F4413EC7F4B17DA011D004FD410ECF601A26596BC996B2B46C046EC1DCBA9CEEE537126E7B895A3A4561034F7A94CD48B3574A0F4EE0295D615386522401570236A2A017533A206E20FDD4263D5E0375A3A653BFD36E58ADB331336DE0B480D9A04A25422E41200E1D426E919980CA73076BD09E68750C119E2793786FE2AF7E84BE67EE2451EAA49CEAC21DC8D138E778EC7D2FA5109FAC24A22C374B188BABF63F718889EADA923A4B7921EA1A512A97EAAE40B253D9649432CC604FB8126092BAAF088FC8C69C64F2D2FF22346F284B30B962291991A1D283BC8F682DCB55668835AD482C88A0AC6ACFEAB3B009CD84EA9429ABF64643B5321A229A216F618934A741D9944B96341146770543C6096AC2F39D02872278FDD008EC08029AA07704B57FD56B064BA2CAF455B248CB410A0F1605ECAEA7C9AEB889D8FA7B70BC2E8AAE48594AA923CA2FA5AD4D39A1885EB01054108350B23D5309E763E6D53DBEE9C94462827E2F49393682A06122B1A669D48F9B8BD93806DB6EC6101523CB21B424F78C8A0C91D04F99A0D44158ECA6B4EE55B6AF7D01A77F1D56DF3AEACD3E1CA3487F902193ECA1AFE853B3FFB770667E32B230F07A3113494A463C1AC4192AADC806A392C75476E894E562A208171C25E216F5880C9520926148B958C649C7C8B945758CB2C928651AE1F081681092B429629A6542257CEFA87AB928FD498D3A65464342434A9C42D20557962C251B116935900E3CB12D1372177C074C033F167D86943C54295CFACC552B8B107E4939942853DFA18DC37FD579A33FA76A10D004FD010FA51AD2F64BEAF63B3493E444F7D780DA3087595C83FBF40DF4BDF22762412FB6D7AD6EC9A3163A07CF8C0D2A9545824BD2BAA7C87550B55DB2605F32615BBA26C41123AE3EA3E01A943D534D0E0E146298B15A12993A9C741A4B74407C9F72214B21D747C6DB8C13F42B764A482924F4702C297EF86A53CF0EC711943690A9F7D8589E43EB513760374E278C95D8FED61A4C291128E257A29714DCB2FAEFD671E3545B9FD4BFD5A6617F0F3DEBDFA4BFB313DF4AD03A6D1E89E175EAB8E3F27257EE163CBA366DA4BD7D1B3DFD79E2E97A9AC78D66644B73E464227716226E1F7874746CC32D9748043E8D4D2309E2B5AA94942BA35CA8950788EB31B0693D461010CF6448363663CA6460083D9D3D1472FDC4247B17BD12C7A1AEA9194B0C0FDE4E98A36ABDAC433F34023B828026E81D41ED5FF61AA167B1278A6EA35509403A1D24A3B64CA5B111F3B6C0D6E7D9FCE8CF31DA57D0686C477A14442FA36CC43143E92916828EF47F238296FF975A2F918591CAF44202A590178948CA3D7B10183876B431174926C91046A89A121CC9BE955E748813ED8DE1FB22A31A792B7A5210B76DC2B2473A99C2CD0F60587136DA539878C2B7E92D3673FF8D3F65B421033A01252B49D64A3360A7959EC67E4B8F61EC9489389ECB0B0FDF49D78B8F901A68C7714B84E9E16C2C25689EB517BB2C3992783C81D7BE9195BFFF25FEF6F5386651757B88ECAA5F76B1EB46B3D3FEC7317CA779AADADDFEFA2BBC78D70D3494DAC91B09DCDA56F63DEA2324468D15856699DD216D14B9E717D7D0B0F649EC5882556613C3763F84DD16EE45D8D9C193377E8F96FC66CAA275E2A4289B31BC781D8D6DD3997BC0129C54ADDA17103391BFE519F92F3B95F4075524029AA03FD0618B085A9C40E4365F5ABA645250E8526AC9FD56526DD4D588C346711585153731F0F25D64BCAD588840FF60378354654307D31F525693F281F44DBB58661CD78DDCEAD44C8565E08B2BB4F8E0D9268E6CDA495B9B6CE50DFE69887555549CC633D41CA4BA084836698A09A2D292B6F0FD003396A5E8264904192CB39B42CC677DDD1246EF71212FFDE1E70CEBDB489F339A6E6B0439AB8E6D41123F5587317C24479F7418AFDF791BC5177FC7C8A449A1A748B2BE8E4DBD2512C3C6D121FEE82DB339F9C88378E07B5F64A2D54F284A7DA14191128EED91CEF7290795D5FE68C61E7B296D931AD9B4E2517A1EF809C3DD6D6C1157927413ED99691CF9D1F328C662D418215EE766EEBAF2B3CC49B804E52C5B1A26F1277B1E071F7B3C63837E3A7FF925C6F5ADE24D7B04F95823AE99A4CE1CA0E859F48FD987034E3881926953636947910FF457EC037E709AA03FE00192C31B9ACB8BEE9CDF99D293BC58BA3B842B6352AA2876521E58C5D67BAF22BEFD0986C7BAC9CAC48A19236D2530CB723B1E1988AA0D35C357A24BEF6C69BD7B0630525F7FB70CFF3B9FFC0E68AA22AB860B25C38F3A3122FFBAC8EB2E6E0D5014D926258F1A27E69528382DBCD97820D6B65708CD466EB63E44BE7177EA9D849242ADF53A18B7D358C64C1C46FB4F2E614EB88255F1793C5A9CCF969A5AC64D18CFB06D9BD996EB649B3D8C93269834AFF809713BC69FEC9D79223E9B516DE319EBB8A4B63CC9DEED3F57032FB70FFF08A79FBA8CE2AB8FD27DEFF7C9A75BE90E6DA6E65E6585B91F079E760EA97175D4E1F2CA138F91FEDD15BCD0B080D1FE1B8CF43BB8AEE15C962C3D9811B1809E9F9E46ADED714D7A19E9917355DD7C9F37AF60467E1DB7D49EC8D4457B3067DE6ED458A2C5A71F1A811D434013F48EE1F6817955A0C63242D5B5A0FCEB4A9D60B4E3AE7B82ADCFDE436DCF93C4CB5D329281694AAD39505649A23F2DFDCB0969C753031A83331A8A60A3EE5DA1FEC86D63C85EE3FFA568D9948C46BD85A5A311F2684063A80CEB9A35E4EC3A0CBF1BDFF4A8A544C9AD656BEDC18CE85EC7DA5203BFAE398EC5C79EC8B451524C8E8B123596EFF3EC430F925C712DB6E1F3FBD49114C72DE2E443272A31A25ACFE3E9F602AF6EEC61FACAEF32B1FF351E482EE6A1D82E1C75E49EEC3E26A188B1DCD7CBC6FF3C9BFAB08FBB33CB98B2F71246995DB8775E4E776234AF596D2CCA2F676B6C26EBA69DC4B147CC5663F7F75FF525DA06B6F0447277A6955632DADFCC350D1FE7F0231633C2F1E9FFE929D4583E37644E61AF638EA0796492FEABAF6052C75D3CDCB894626A24277FE424629625CD8B1F98F3451F486521A009BAB2E2F5DF8F368C6AB8D2252D6D73AE2F8EE1628FD44F50EEC47BE9410AAF3D40D7B62748C7B792B245D2543C3E0D4C3F4360960895B55534FA21AD6CD2B7A0F2F2506AA8B9C83B2F52DA78D79F839C1ED428B53CC9CA230797C8EA28FA5D265D12F8A9E1948C3E7A1D9B7C364F6BDB3E782D47D3FFC7DF50B25AB83BB18896B135C4824DE41B2670C0FE87D060D93C70FD2D4CDC7C2D7DC9366E708EE0C0630E6671ABA38CA20DFAE83732F478063DDF3A8A616E8E9FD59D4DA16D573E7BE4785281B865DB643D8FE77EF06F4C2EBCC4D3E9FDD8D4BC903D674F2075FBF974382DDC1FDF8FC30AF7526F7A5C5FF3613E7BD662DC815ED6FCC799646B66F1A439830585FB68F536726DC3791CB1F4405A9C32D99F9C44C6F1B9327E21C77DF800DAC4DDE63F2EA0D95FC91DC38E635B3089F3CE5F46C6922E0F4DD095FE357BBF8E5F13F4FB85FC3FEA7343A9494B3521A984FC076951C97E4AE669973C0C115DDAFE04DB9EBF05B6AFA4C1EDA1A69CC7F2030A660B45710537CA988AACA50B448C6D85E0243996AC36F294FBF3524BB400531AFFD4349E585A398461D4CE27A3D8466853EBB5E3990E5DBE455FF35C46ED711899B67D59BF7D049B6FFA3273F22FF35A7C3AA659C6747C5E4FCEC618BE134B0F5DCC833FFE0E93BDE56C3666736FC3617CF8C38B98E29862844DDCE8501E8C5BCA0EEBBFB58CDA00EE6A3889C97367B26CE1580AA429173CBC789CA7AFBA8C9DB30FF3AC3D8BE589851C72D02246FCE674B61ACD3C38FC04E6792F32AFEB3E7E9D3C8645A77E849E477F4DDBEB37724FDD09AC8D4F6249EF2D8CF637727DFDB91CB1F42046D945B2FF7522B58EC7D5F6879937A591968E6719BEF129B6D7B4F08BC4329A9B46F1F9A32690144715431739FE51A7FBFFB5F7D1045DF1118F4A0A91ADD53B0F95B3853E9E212D7A268E7802660B94BAD7E0AFBE8BAEB5B763FAAB70C22231DB26663A940A051C3101308DA89F37907CD82190AC5AB274D59E27024DEFFC88CFB61AFE905173CB60A054209192294483925B269F77709AE750376101B1992762D44CC53392BCD1E9B1ED868F511B6EE0F1D442422F895B34D890D9854E1C3EF9E1053CFEDB6B59D07E3BF9603A77D51ECAD91F5BCC58E93691C93FAB1DAF94A23D4CB1E55B4790F15DEE6C388D390B16B078973ADC308563DA6C770D9EB9EA52E6E51FE749732E4FD6EECFBE7BEECAE8DF9F414FA285FB524B993E7114739EB984CD35B35835F163CC5A7B13A3FB9FE3C6968BF0EAC772F0E6AB199E7B836B336772F4514B19E564C9FED7C9343825BCA044A6BF87C049D1DFD8CA23B123B8DBDC8B530E9DC8D231A5C834414D69EA8746E0EF474013F4DF8FD907EA156F67B56FB3B310B68C4047A3CFAAE42059AD742B88BE841B623945C27023F96D2FE2AFFD2DE1FAE718E8969E8800215C51A416CF6602E966162381A8B54EEED47D6F682331BA6DB7C298AA6D4B0B483994917293BC68323B49EAC78EC3987534F191FB62C647E0D1AA3A3EE4B1B5A393ECF5CBC8C652DC913E996953F7666C4D8A7E33454D2264EEE45A1EBCE55BCCDA742F595AB92DBD8C93CF3C9A29A68765B91074937346D11342E715CB1851ECE4B7CD1FC7DE6509A7EE5947527AB37D19854FB0E23BE7D3EAADE5D1DA25AC8E4F67E9C259C46F3D9B7C660CF7B22F4B4E3D92E2D527D09A36B99B8359907F1C3F99E0BACCD12CDC674F46DEF969C6065BF851F20C8E3966192D4E9EEC4F4FA6D67179303E9F2DC134B2B2FE844BDE6D61E7DD7763D91E1986491FB88C7FEB3EE80FD477A6920E4613742545EB2F1DEBDBC43C48C86A4E7AE8213E538396F7868B6F7BB84A7D2DAE6ACE4660621573185E0F617613C5CE5728B7AFC4EB7B8D7CFF5A707B890D1ABE4AF61C480F74A440AFFAA495A6925154433166AC0927338944E33CD2A37725D63403E24D789934BE1323E6E6F0AD8C52A293E9BBF6AD9D94AE3D0E23D6C0CF9D935874CC91EC322E261A4DD4980186EBB2F1F9C7E8BEFF47D4387D3C64EDCD6E277C9A29633338A18BE99579655B8EF4E826567FFB3CF6F456F364389B0DD38FE1F0A3F726E379A40C93979E7A06FFDEAF924CC4F865EA78EADB66B25F9B45F1B79750488EE00E771FCEFEE471ACBEFA7CA6145EA797F1341B259E88CD6065F39E9C7AC4EEF4FEC7C76833B6F393DA7359BA6C29239C22FDD79C4A8DE3737DED39041317D09CF09838DC644A5392498D8EF26F2C63CB188EAA99EB8746604710D004BD23A87D905EF3361FAB5964352822A3D432DCA246BE7D35D3826F0483D6AFD1649E68CB4B2B5C5E1C400C690553E3254A23C3144D0A91342D0E501A584BE8E5F0CB65E584128AAD8A6561C607E54E93233113F558C93A8C5403A19DC137934AD253EAE1490F1C29527B5D84B19822733F88B3656B91AE6BCEA736E8E5CEE4FE34EDBA3B236B3D357597F2F2CCDB6D3F06F2F0F80F2E6786F727F2A9B1ACB576A665CFDDC91909B2ABD6F26677078DF39730A5B485DA877E4083DBCD4B35B371F7388EDA8606C26DED6C7BF931F6E20536FA0DDC103B9E23162F64CCC08BE41EF821FD619A7B634BB9E0DC251456FC02EFE95F3132D747776C22B7C7F6229C3E8763F79FCE86EF7C9496601BBF6EF938FB1DB284D176899E6B3F42261670A3BF94434F3F9979231C9CD0C1B05D6C99E60C6A949892618BA0ABAE417F90BE3295742C9AA02B295A7F33838E9C4EE431A496F1EE1EE677BF34724389FE46EAB943CF1B12E27FFB5DD43F88D3CB5FEA801E7AC741A9CD48EE48E96A0CF5552BE1A2C10B48203DD5439A156E918EB56B78F4B69F31C35F4BDC2F5034630CD835743B2D7418F5CCD97B31B3E6CD65DDCB4FF3CADDFFC5B4642FF19EB5A4E216EBFD7AB6A5A7B1C11EC71A6334179D75142B6FBE9A9AF66768087B09DC1CB6692A2D8C1C356C4F8EE319731AF9D6DD3973D90CF22B1FA6E7E93BC9F576F1C7F852CEBB6019E38BABB9EFFB97D0981849677C279EC8A539E8EC53199F2AF1EC773FC730C3E0F186B9CC39F244E6BABDACBFE9328C649E3F260E679F639631BE31CDF058A40F6D48DBA2C021A518A5C3213FFAA111F8FB11D004FDF763A65FF1F72030C8ED32F9FDB66E73B98497EDE5AE5FFE82FC40BFCADCA5CE5D3293748635F8B5A33012093EF6A1C3F1C29075ABD7F3F01DB7D2147395E594976AA4C76966BB9761544392334FD81723D7CFF2DFFF9ADE8E4D4AC83F70321465E8DDAC654B318EDD34966587CC67E791265D6B5EE7E6DBEEA1583B910D7D26975CB084D6449E477F730BEB37E4E8721B08EAEB38E5A3872B9794BBAEBD8E5CD9E679AF9165271FCAEE768915BFBC9A4E3FE465770CC79C70243BB566488BBB8D8CE5479AAC83043D38BCF3F760A69FAB1118444013B43E15FEB908A8CD4A318C8DD4406450C612FF44C3A06F5B07B7AD5CA736D862E26A2EAE298E38B3D88C6EAE63BF5D26911814EFDFDAE5F2E4F36BD8DAD183EBBA241C8B19D3C6B3DBA466EA5322431A2ABDE695AFBCC99B9BFBD8DA935765969853C3A449A3D879DA30C6254352851E6519F6D49A3CF7BC51A629E8E5C483A7918C99E48A2EF73CFC1AC592C58431B5EC337734861FB2B9BFC0EF9F594B4F21C3D18BC6322963D0BE653377AF580B569A0316CE644C5302CB2F624BD78612F0575279837DE33A83FEE79E64D5FBEE9AA0AB37B61F8C95FD3F045D7403A57627CE27B259D82D2E2706CA7A4BB633956EB5E87A4825DD1BC076032C2B413E8C1338A66AE513BA93E947D1FD10F53CA9B78B30D340C9209150F6869126B698E94A352794DE695BBD2E16E4307D4F65D859ACC8F144244B3D17331653F60192F4CBF1A4C33C6631A4944830605A24F21E19E98B31B2E46D9B946C7AAA1ABFA8E4B984BEF492BF23E02F0340D110BC26E80FC6C9587947A109BAF2625661471C15A145687F50274FFDB712C01B2C7F2835105F261065543C7236174128823CA1299428C3D243E2D842A051AD5BDED912B356A437DA8E9CB4D5DFC96B65C2521CBA65373449E8D4AACC3CB2C512A17FA90F836B0915A35C689444AA725517F54013476AEF9E8167CB3B55FA749C000007AF49444154E7B14A6508121492298A86419D2BAEDDE2A420C75D882E2FA2B91D88E58A0C0F6982AEB093F50377B89AA03F7021A9AE038A3838EA2019DABC7CDBCE44BC018736D58454853E2D5B49782ABF43D1F21B1C938EC9E8B610AED85C89C8BF19A76498C4431743FD9DB4B649A923CAC2232511E17C19418FF450A50E3ED4F4A206DB4331973510DF435B44A510130349896384922B078ECAEE45933A213AD7DE00A15143BB6DAB0E9551A2031D0A41CBE74BEE2DED87493518A47E55FE6142F63A83AEAEB3FA5FB71A4DD0FF3AACFF4F7E524488831E826FCF3A8A2053E4851D65C1832E2486D84819CAE944FE557907863E86F20B5482A7831D25B20937F80CC96095B6B5D84E49AD3BDA8C145383A10AB088EFC71561470EE4DE9FB90486C494C6935C29CA8496B8A3CB9125305C87C00EC847CDDF2455A51B06067DBCEBE4E22047A904B6E5A8E57971A5E217592A2ACF96B747E5FF4F9E007AD1FF2B043441FFAFE0D32FFE9F1010B294DC7950EE7FF0E9925E469B69CAE8D6083155061DE21B31650C20D9B318CA462D6B31559E10BA9347A47927DE85457C23A9E85F6ADACA7966889695F16B64121B6D4F8A216C48682A47440CC9C8835234E517A6D4DF09A91795F989484F85982571ADDD0A463305351128997427862F658C14D839558291CF97924CD45E281A24D10526B21B5315F3FF0926FDEF1A81BF888026687D62FC531178A7833AA2B1B715F106254CD51FCA84367AE6501FF5DB156BF5D742E4EF54A123DD3D495CFDC8DF50B441947CB564D9EF9EA48C4A0DD11B4B9A3C3805A99C5F877CB785C1230D6B3F72B3520FA155757150DB8631553E512EE3E2FCAD0E5ADE5B7ABB8784A4A26E956853307A44F7074352ADFF5498F59B5729029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D0085429029AA0AB34B07A591A018D40E523A009BAF263A857A011D008542902FF3F264F063D9ED894270000000049454E44AE426082 , 'asdc', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-       (5, 'Policy', 'images/cache/portal1470452815_67021.png', NULL, NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor', NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EEC9D077814451BC7FF77B94BEF8D143A842EBD188A056CA8F40E52444405C52E62C5F2D995265644451114456C6001A4F7DE413A2421BDE7FADDF7BC7399CBE648729BDC5DB82433CF1325D9D9D9D9FFCCFEF6DD77DE99514024A1805040282014F04805141E592B5129A18050402820148000B4E8044201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540185C562B17868DD44B584024201A1409D56C00668C1E93ADD0FC4CD0B058402D7580185E26A8786C26C36330B3A3D3D1D7BF7EE8556ABBDC6D51497170A0805840275470102735C5C1CBA75EBC66E5A0A6A0668B3D98C356BD6E0EDB7DF46DBB66DEB8E32E24E85024201A1C03556C06030E0C2850B8CC12A95EA6A40EB743AFCF8E38FD8BC7933FEF7BFFF5DE3EA8ACB0B0584024281BAA3406E6E2E060F1E8CAD5BB7222020004AA5D2066985C964B2141515E1871F7EC0CE9D3B05A0EB4EBF10772A14100A78800204E881030762C3860D080D0D2D65453340171414E0FBEFBFC79E3D7BF0FAEBAF7B4095451584024201A140DD5080003D68D020AC5DBB1611111150ABD5A52DE8FCFC7C01E8BAD117C45D0A0584021EA68014D09191911503FAB5D75EF3B0EA8BEA080584024281DAAB00F7419305ED10D0AFBEFA6AED5542DC995040282014F03005F2F2F2D820A14340EFDEBD1B02D01ED67AA23A4201A140AD5680003D64C81001E85ADDCAE2E6840242811AA900B938860E1D2A0FD0AFBCF24A8DBC495169A18050402850131520400F1B364C00BA26369EA8B350402850BB15900DE85DBB764158D0B5BB3388BB130A08053C4B0102F4F0E1C31D5BD004E8975F7ED9B36A2F6A2314100A08056AB10234483862C408C780A6A9DEB367CFAEC552885B130A080584029EA50059D023478E940768B916F4C90B19389394E559777A8D6A131CE083B64DA31116E4E7B006B4BAEBD1B369B89496EB306F5DC81011E28F4E2D63E1ADF2AAF0760D46338E9E4B45727A7E5D9045D63DC6460431ED1CA582223D8E9D4F43464E91A3ACE2B80B15080FF6C375CDEA21C0CFBBC252C982960DE8975E7A4956159FFFE41F9C49CA9695B7B6670AF6F7C1FD83BBA25BEB7887B7AAD519F1C2676B71392DCF61DEBA902122C40FAF4DBD05D4992B4AD9F91ABCB67803923304A0B94E31118198FBD89D0EBBC9B173E958F8D34E64E60A403B14CB8519C8607B6A5C2F348B0F7708E851A34639B6A077ECD801B9801EF3D20A84852831F016C756A30BEFD9E38A3A7DDE88AD7B7578704837DCD8A9B1C3FA156AF598F2C62F68D64885DE5D7D1CE6AFCD19761DD4E3F86903E63F7127A242032ABCD5F49C42CCF860B5D0AD58A53F376A909A61C6B2574738EC227B8E27E1FD65DBD0AB8B0F9A375639CC2F3238AFC081637A1C3C6EC08BF7DE88364DA21D027AF4E8D1AE07745CB4171EBF2FD8F9BBA9C125EC3EA4C30F7F14C907B4468F296FFE82AED77963D4DD1543A906CB22ABEABFFC53842D7B7498FFF89D880A7300E8EC42CC98B35AE856ACECC74BF371F6A25116A0771F4FC207CBB661E45DFEE8D6BE6E1B05B23AA60B32FDBD59837FB6685D0FE8175F7C5156F5C6BEFC2304A0010EE80706779567416BF4B8FFAD5F0568007040CF7BACBF2C403F3A778DD0CD0ED0DFBD32DCE1F34A16F407CBB70B403B54CA751938A05F9844167494430B7ACC98318E2DE8EDDBB7E385175E9055CB7B5E5929000D09A00775419F8E8D1C6A57A43560EADBBF551A34B42D596A4A167C7DBD111651FAABA5A2631555283FAF083326BD872F57963DEEF0DFF18B58BCF037BCF9E1F40AEF6BFE9BCBD1A75F2774EADED2E1FD4B337040CF7DF40E4486FA57782E0D703D36EFCF4AEB4685EA7406688AB4080D0B2A758DB42BD9888E094351A11626931941C1D63AF4EF3103F562C3F1D5AAB2239AE8F89A9DF32B75AFAECECC2DE86F5F1EEAB0E8BD279231E7FB1D02D00E95725D060EE8E727DE80D68D232B2C98967B1E3B76AC3C403FFFFCF3B26A39FED59F05A025809E4A80EED0D0A17604E807DEF9BDD2A02198DE79FDA3E8DDB7E355C0ACE898BB014D909BFFD6720C1BDBB7CA809E33E37659807E7CFE5F95D68DEE7FFFAE9358B36A1B9E7BE3DE52728CB8E559AC58FB1656FFBC155792333179FA401BA02B02B02701FA9B978638EC737B4FA660AE00B4439D5C998103FAB9897DD0BA9163408F1B37CE31A0B76DDB26DB821680B636277771DC3FB0336E906141D320E183EFFC5169D0108447DD3E0B770DE98DDB06F44042EB9297C16F3F6EC6D67F0FB25D18B8B5BB73F31164665843F982430218D8291DDAFB1F2E5F4C63FF26AB975BD0E74F27E3D8E173B63E7AE7905EB0B7A0A565D2714A3F2C598BB57FECC4F36F4E46A3A68E43BEA40F01B7A03F98719BAC41C227E6FF5D69DD2A0BE82DEB0F302D67BE369155F5F285341CDAF71FFB77EF9B3B62E7962338B4EF349E7C691CFB1B69F4DF894BA574B37FD0A5BAD1B1FA0DA3D1BE4B82533CE016B42C409F48C6DC1F760A0BDA29C52B77B20DD0137AA37563C72E8E7BEEB9471EA0E55AD0135E5B252C683B40CBB5A01F7CB76A8026984E9E3E8001815B7BD46DC8A29BFFD5533677C43FBFEFC4C7EFFF883B87F6868F8F1ADF7FFD0F1E7C6218EA378CC27BAF2E45971EAD10DF301A17CF5DC1D18367F1C25B9331E7F56588AA178AD6D735613DF14A5206FA0FEE692B73D3DA7DB8782E15DE3E6A767CE4845B6C8096FE5E996E6C03F423B7C9B2A09F58E07E40FFFDDB0EDC747B17787BAB199CC9F20E090B64B775DBDD3D30A6FFF336F7C6B143E730EF8D65886B1065D32D3B330F0F3C5EE276A0B620D714E9A6D3EAB1F2BB7F31EB7F93D0BD57DBCA4875555E0EE8252F0E76580E59D0F304A01DEAE4CA0C1CD0B308D00E2C688A831E3F7EBC3C403FF7DC73B2EA39F1F55F04A025809E32A0936C17C743EF553E1A81FB8BDFFD74067EFD61133A7469812ED7B7C23B2F2F61D6715474A80DA66F3CF725E21B4661D4C45BA15279E1A7EFFEC581DDA7980B22F9523A264DBB9BF9630946CBBEFC9B41FFF79FB6E08917C6A25E5C046BFF3E6DEEC7E29F5EB49559969FF9D8A1B3D8BCEE00EE1ED69B01BFB28903FAFD876F9505E8273FFCC7ED16B4F41ECA728D48DD1BE41AD9B5E5281E7A72984D377BF707B505BDE8487B473EFFCAE8C701FDF50B831C9E46809EBF6297B0A01D2AE5BA0C1CD0CF8EEF250BD013264C700C68DAF65BAE052D006D6D4CEEE2900BE842AD01D39C00340DE82D5EF82B62E222406E06EE4795BA23A450A03AF2630489C0203F761E250E0C02F4DB2F2D4154BD305B0F3D7DE2522940A7A76663E13B2B70E1DC15DBA0E2E675FB997F77C6ACD155EAD91CD0EF3D7C2BA21C0C12A6E714E1A96A06340D1E92054D2FAFFB1E1EC85E84F680FE74CE4A844786D8EE9FBE3CA4FE6B01E82A758D1A7F92DB002DD7829EF4BF5F85052D05F4DD1DD15BE620E1B4F72B1F2E26B5BE08D0DF7DF117D46A2F141668B1E9E867A5FCC55501F4CE2D474B7D9AD31342B0914671F0688791B73ECB20E432404FBF459605FDD4C2B5D56A41930606BD115AAD1E1FBDBB02C3C7F7C3C3E3DFB101982C6872138D9BD2DF06148502080C2A8948A1B6D8F0F75E787929E11FE8876F7E7D05FE01BE4E03885BD05F3D6F1DD8AC28ED230BFAC7DDC2827624940B8FDB007D4F4FB492E1E2983871A23C0B7AD6AC59B2AA79EF1BBF09404B007D1F01BA7D0387DA15E98C98EE24A0E922F4E09375F7C33F6F22363EB214A0C9D25DF9DD7ACCF9E2090685FB47BECE3EB3DB76688A796F2CC733AF4E60FF7E78C2BB6C00913ED1673FF519C64FBD1337DDD6C5760F0579453640E7E514A2B050C38ECD98F81EE67FFD14E6BFF9BDC310BC8A04E116F4BB04E8908A67A466E46AF07415014D7EF6990F2D6083AB238A7DE79306BF82662DEBE3A36F675E15C5C1EB4CE17959C503AD4B3F5F83E1F7F4C343E3DEB2017AC35F7BF1F64B5F63C28377D974532A14C8CB2DC48A6FD6B1A8116A8BF65D9AA3792B6BDF50AB55888C0E65FFB67F913AEC3C920C1CD05F3E37C0E169FB4E5DC1020F07340F79B4BF9994A40CD6BFAB2365A4E5203C32184AA5D2E9CB7140CF244037B4BA0DCB4B1466270BD05BB66C815C404F7EF377B7039A0669E8D3BA4D87A66CB08B125992F4F9CD53CBB68D9845420FD3C5B329A5A21B9C56594601DCC571DFDD1DD0EB3A398036E0E10F2A1F2E46D6EB82B7BEB745177CFBF91A165130FBBDA988880AB10D68DDFFA875D0887CC63CBA80A2067854023F8FF2BCFDD123B63209363F7DB7BED41DCF7C75227B0950993F2D5DCF2C414A0BBE7E1A6B57EFC2BAD5BB5D02E877A6F59305E8673E5A57250B9AEA4C9114DF2E5A53EAFEE83EF8318A78E1AE1F9E895C43F3DFFA9EFD7ACF94FEE8D1A71D9E796801EE9972872D0A83AC68D288273F7F5FCC787614D3EA9EFBFBE3C2D9142C5DF42708349422224370EFF4012CE285DAA247EFB655EAB31CD08B67DDEDB097EE2740FFB4C7E516344135A938228857A2B2B1F0FC3CEEAAB3BF191A0BD97CEC7387F7E88A0CF70E7D950DB6F3787867CAB4017A5C225ACA00F4A449931C5BD004E8679F7D5656BDEE7BEB0FB7039A20439608B712A962E4F37CFFB5A568531C6D40801E36AE2F7B00C822E10F9DAC9B7041260EE8C97711A0EB3B2CB14867C02373AA168DE0B0F06ACC705BD78731F5B121CCAAAC6AE216F4DB0FF59505E8991FAFAF32A0AB5AC7B2CEAB4C1C7459EE266E5D3B53270EE82F9EBDCB613104E80F57EE7539A0798865E36671B63AF4BCB13D8B82A96CAAAD807E66ECF5B2007DEFBDF7D62C40D36729019A4299468CEF671B88224093EF930F4CD15B8F06CECA02F4AAEF37B24F54F209F2B0B0CA761C47F94B00DD5E9E05AD35E091B9351FD0F4703AAB6909A06F466488839984B94598F9F1BF350ED0D457A571D2D49F125A356031E8CEA4CA009A5C1C0BDD0468BA07693F900E60D331FAD2223F3D256968287DD11C3D74D6F6770234B9CDE86BA447EF76CC0547892CE8D53BE661C5376BD9EFD263F405A2D71BD8DFA59A96F5DC1337C87DB17FF729C604AA0B31837FFDF4E9DB116F3CFF95CB2DE8A7C75EEFD0C541617693274F760CE8CD9B37CBB6A0A7BCBDDAAD163401E0ECA9CBE8757307BCF3F237F86DCB07AC21E402FA9BCF56B306211FAB8FAFB7D371A7E53D4C1CD0F7DE49809661416B0D9831AF6AE162CE3CD09E782E07F45B0F12A01DFBA09FFDC43300BD6DE32190A52837D1E4A0DC9C02963D20D00F9D7BB4927B6AB9F938A017CD74BCDCE8FEFF52AB0DD0524389A25FB41A1D9B364F69FBA6C378E695096C22D0D9FF92D0B899756213BDAC6EE93C1D770CBC9EB991C828EBD3AF23DAB46FCA004DF1E76495EFDD71823DFF335F9BC0DC6B143EFADA9C075859BFAED8CCC652522E67D89EFBA2221D2E9EBDC25C74F4E2D8B1E908068DBA8131A16B621B3C39752E1B68A7AFC0437B4F83267CD1CC5257BA389E1ED34396052D1BD03367CE94D579EE7F678DDB01CDDFCED2CF1F29A0C9274B6FCB75FB3FBACA829EF5F04216DF2B9D7127EBC62A9989037A52FFEB6403FAD1F9558B46A864D53C3E3B07F49B0FDC240BD0B33EDDE01116B42708CB01FDF933251124E5D58B00FDD1CFFBDCE2E2E0CF28BFB614D0347EE4E7EF638B6AE1CF31195FF6E70DBEF1297CB8E419D46F14CDBE9CC9974DE0264053E44BE3E671A081EAB96F2CC3CDB7776183D78F3D3F061DBA24B0B5547EF8FA1F982D16DC31A827222283995126AD0B019A5E8E8347DDC88ED158D6E3F77D80FFCD7B88C5B0A72667E2F12973F0E9F2E75C0AE8A74677770868B2A0A74C99E2D882DEB46913E4027AEABB7FBA0DD06471905834238B3E9FA8610BF28BD8E83901FAC9FBE7C2C7570D8D468F795F3EC91AC9DEC5A129D2E189297370FE4CB25B17B69102BA673BC70BF6D35A1C8F2DA8FA609727C0C15575E0807E63EA8DB200FDDC671B05A08BC5E780FEECE93B1C360701FAE355FBAB1DD054B1579F5984ED1B0FB13A92AB912C54724B7C3AE767AC5EB9051F7EF30C9AB5A86F8BE7A77CF680960E12F2630468E9809E743D95E9F7BCCDAC6ADABDA8459B866C5C8A002D758310A09F7B6461A9312B770C123E398A00ED78C1FEFBEFBF5F1EA09F79E619870D4E191E78EF2FB7015A0A615E99827C0D1BCDB5777194F5E6B6BF81F2062064DDA8834C25806E87C4B68E01ADD1193D0AD0B48A9B5E6760964E75A71240DF8008073BAA64E669F0DC679BAA0DD0641048E3995DA90DC55693B5C72393AA523607F4A74FDDEEF0F403A7D3AA0DD004C64F3E5889773E7EA41468A992653D877C0C497ACC1ED07FEE9ACFAC5FD26DDE9BCB59E40B8FCFA7095B46A309BFADD884ECAC7CFC779C9641B07E39DB5BD0F6809E396D013EF8FC31F8FAF93057CC03A3DF642F0C57BA389E1CD50D2D1A540C680AB3930DE8A79FB6861E394A0FBEFFB75B004DE172BF7CBF914D9290CE50A34F9D4F96CD6230910E12960768EA28B9D956BF1F9537FBFDA98E6EA94AC739A027DE41802E19CD2EAF3002F4E31F961F8D409F6B278F5EB8EA749AE8E0EC023B65D549CE92A2144E458996E67465E280FEDFFD7D6401FAF9CF373B05687A60AF2465DA6E81D6C7E08351F6F745911A3FFCF3161B50A290380A97A39996AE986462BF7A5E5534E580FEE4C9DB1C9E7E9000FDCB01B758D01466278D9D973E6B149AE9A5F242A32631AC8E14D14216B4343C8FE7AF08D0348393BEA429AC94C2179FFBDFBD6C708F7E28D69F0661972E5AC3BEB8932EA6A349421C0B67A4D0492ABF2C0B9A9EB3E9E3DF61FE6A0AA124A690CFFCA7F5EFB814D04F8C244057FCDC10A0A74E9DEAD882DEB87123E402FAA10FFE710BA073B2F3F1D1BB3FA25BCF36B8F5EE1EB6CE478D1B121A88BB87F7C6A963174B1DA34C74DEEF3F6E61B1A7947EFC761DCB47C97E9949873DBA121938A027DCDE5636A09F5858FE6017F9C2BEF8F05756035A458DD6B8A0CE467E33BE825A25AAE730AB1C4097E5337458B08C0C1CD0AF4FE92D0BD02F2CDAE214A0E933F7E09E53A8176B9D3840FD69FA33656F19458026838056AE1B30BC0F830B4513B9624CC39580FEF8895B1D2A4D80FEE4D7832E07F4AEAD47B1F68F5DA5AE6FFFAC499F43AEB7F43C9A424F3E609AD0C3DB8216986AD834062DDB3462BA4F7B7A386302A55BEEEA6E1BF07FFFD5A56C012A4AD7756ECEDA89D2A205BF202DC5BAA175C326318C0904E0E8D87056264F3C469D7EA7F564766D3BC662DCC9A27636F138E8C747749505E8071E78401EA09F7AEA2959759B3667AD5B002DEBE21E94C906E8DBDAE07A9916F4931FC91BECB28FA1CD4CCFC52F3F6CB4DD3DCD0EA45956146E44FFA6639DBAB564032CF610A0CE48D623F9FF78D817851AD9039A9F4717A1E3741E9FAC41D6E688F1B7300B837C783CF489F2F2BAD0BF098494DAB66FCA46E5CB4B1CD0AFDDD74B16A05FFC62ABD3802E2FC48D5C67FB779F6455A5A9DB836F78128B57BEC4264591AB833468DBBE09C2A3426CE162A4DDE6F5076CB7C7A77C93654779E918856F11D4794818ADDB617FAC2ADD995BD01F3D6E5D55B0A274F04C3A3E7503A01D5DB72E1FE7807E6C4417B4A8EFD8827EF0C10705A0DDD16138A0C7DFD64696054D83844F7D2C6FB04B0A68F291CD7EEA73A45FC9C6B07BFAB25B2178D034E321373D8D81236E004DDAA185E709C434B59816463A7EF83CB3BCC982F874EECFB8636022FBAC238BE4E63BBA62E0883E367F1E8519D1E02A9D4729F97206060CEB8D4FE6AC64BFD3570D7DCED267FE0B8F7D8C944B1957D585CAEDD8AD05CB4F1318DAB4B72E5F5A56B2017A722FD0EEDE15A5CC5C0D5E5CEC1E40D3A0F49CFF2D6383CD34A87478DF69F629FDC682E9EC339A2C673ADEBD671B6685D18C437A71D1025364155248187DF5B4EFDC1C4FBC388EADDB4DED41D65BFBCE09AC2C5AB294DC547C6D6EFB78E1CAF6CD4A01FA741A3EFDED90CB2DE8CAD6B92EE5B7017A78175916B42C406FD8B001722DE8E973D7090B5AB216C7F8DB5AE3FA368E7DD03493F0E98FE50D76D9AF84F6C0E837F0DE678F21AEBE756D824726BECBDC371307CDC6A2152F3020D0834FEB418C9C782B03299FF54680FEF7AFBD78ECB931080E0D002DD04FEB4A48D79126F74A504880CDCFCA0770CA0B8BFA68E9B357D565E4ADB3644FCDE5807E75724F5916F44B8BB7396D41FFB96A1B028A1733E25B7DD157C3B18367F1E093C398B57CE6D465B628120734696CEFE2208B9BD6D97E7AF67836D59E26634C19F13AF361523BCD59F4B86D09526A272A4B3AF8E42A402F7CCCF14C4EB2A03F1380AED6F70307F4A3C33BCBB2A01F7AE821C7163401FAC9279F9475230FCF5B2F002D01F43DB712A01DEF2842807EE61379835DF680BEBBE763A506A9C8DA5DF6E7FF3079E8ABB65042FB075F0A68FBA541ED17FAA786A7B5260E17EF2012131FC966699605E81BDA4E454060C9AA6CBC2E6CD6E6ADCF22F1C6F678E99D2915F6250EE857EE4D9405E897BFDCEE34A0695D12AA1B250ECCB27CC2A48D2340DB6FA3C50716EDF779A401A9F1035F8682C646D6BDCDAEED2A407FF8A8F56BAAA24480FEFCF7C3C2827624940B8FDB003DAC131264B838A64D9BE618D0FFFEFB2F9E78E20959D59CB1608300B404D0E36E69851EADADA3D515258DDE88999FCA1BECB2073459753470651F12275D1BA22240D392A28FCE1A0DB5B70A85051A0CEF37B394056DEFF3AEC8821ED66F26BEFDEDD572C3F3E42C45CA013D7BD2F5080FAA7809CEAC7C2D667FB5C3694097E583E6CB864E796410546A158BB9A7A8024780FE75C5263CFBFA24162E47101E7AF3332C4AA1BC8D78ED978CE56B7A3BEA33651DE72E8EF98FDCE4F0F4C36733F0F91F4704A01D2AE5BA0C1CD033867644F378EBEA85E5A58282024C9F3E5D1EA01F7FFC7159B57CF4C38D02D0A500DD12DD5BC903F4B39FC9F3A54A814900A04F685AAAF29199236D6D447EDE817D9E90654193CFF4DE690398AFF4E907E723BE41149B8DC5634A69F49BA6DFDAC2A29EFFCA664167A466B3C819BA1E01FE9E012F213C22F8AABAD0C4204AA78E5F446E4E21C64E2E3F4E9703FAE5893D6401FA95AF773A0D6836D5BA78F7715AFA9366A8D13E84EFCEFE0663EFBB831DFBE0B5EFD804277B40D38067C3C6F5D8A0DF8923E7F1FCA31F23B14F3B0C1A75235E7EF233B69428C5D1DA039A5665A45DC5695DE91FBF5987573E78C06516F4BC876F74F8BC12A017AD3E2A00ED5029D765E0807E64480759807EF8E1871D037AFDFAF5900BE8C7166E128096007A6C3F02743D872D4C71D0B316C9F3A5528812ADDBD034C13A018606ED687ABB343DF3CA782C78FB079B3B8116A7090B0F66DB6151A2995CE46AE0162DED9F476B1A50A20D66A9CC75AB77B1B5A0297D3E6F159B8545897CDD8F3C3B8AAD9D4031A294E87A6111C1A0BDF7688D14FBBAF0BFD1E0202FB33C5138A05F9AD05D16A05F5DB2CB2940F32552797DC22282D8DA1094A4C7482F02368567EDDB7982ADD5406D21D58DCEA1DFE9EF3C7197CEA2F9AB986E3C714DE9CB87F290AFFF8F9FB7DAB62D73D869CAC8C02DE8B9D36F7078FAE17399F84200DAA14EAECCC001FDF0600274C98E3B655D832CE8471E79441EA01F7BEC3159F57CFCA3CD02D012408FE9DB4236A09FFBC2395FAAAC06B2CB24C7E55095729D398703FAC5F1DD6401FAB56F763B056867EAEACA735D19073D679A35F6B7A244805EBCE698B0A01D09E5C2E31CD0D307B59705E81933663806F4BA75EB2017D04F7CBC45005A02E8D13727C806F4F38B9DF3A556A51F7932A05FB8A7AB2C40BFFEED1E01E8E2C6E716F4070FF576D81D08D05FFE795C00DAA152AECBC0013D6DD075681E57B1054D330989BB6BD7AE45646424D46A3514B4771A0085C964B25086EFBFFF1E04E8471F7D54562D9FFC64AB00B41DA0BBB574BCB335B9385EF8D2395FAAAC06B2CB44332D0BF2346CB5304F49DC827E7E5C175980FEDFD2BDB502D034E188260C39B3951307F4FB0F5A3700AE281D2140FF754200DA91502E3CCE01FDD0C076B2004DAE658780A60C7201FDD4A7DBE0A50482839CDFBFCB85BA547B513ABD05451A0B46DDD41C7201FDE257BBE0AD0602FCEBB676451A33747AE0B9B19D6501FA8DEFF609DD8A7B787E81194613F0DE033D1DF67902F4577F9F84BF9F023EDE56CB4C24F72AA0D15AA0D559F0D080B66826C382A6E83959802667B59CF4F9EAE3B8946E5D8CA8AE275FB51706F76A82368D1C2F26A4379AB168F5715CC92EAAEBB2B1FB0FF055B34E1CEC6FDD73B2BC54A03130C8A4E55837AE150908F6F7C653233A3894E2426A017EDA721639053A87794506D729E0EFA3C23DFD5AA07E5440C57DBBA080CD3F7108E87FFEF907E4AC1649282014100A0805AA47017231D30C6E5980966B41574FD5C55584024201A140ED5680C2EC64039A02A645120A080584024281EA5180004DCB3C3BB4A0FFFEFB6F0840574FA388AB0805840242015280004D3B59C90234CD09AF6DC962014C6633BB2D15859E882414100A08053C44010234ED05EB10D07FFDF5175BB4A3B6A5BC223DD6ECBE8CD8707FF46A13CDD6E51549282014A85E05B47A13FE3D988C2317722ABC70937A81B8B9631C22829CDFD9A47AEFB06A5723403FFBECB3E5039A32FCF8E38FA03549F57AEB1632B52529BD5468D5EF3E04D76B06A3AE0817F7AD46FA4C14CCF10000200049444154993DB058AC16B5484201A140F528E0A5F645E36E0311D5AC6B8517CC493E89F3BB7F85362FBD7A2AE60157E9D2A50B7EFBED374444445C3D93B0A8A80857AE5CC1E5CB97919B9B0BA3D1E8015576AE0A168B0539857AACDE978E941C03D4DEFE0CCADE0A3D125B84A06D832078ABBD9CBB48359D7DF6EC59346DDAB49AAE563B2F939797C7FA757878C53B2C7BFADD67656541A552213838D8D3AB7A55FDB40613FE3D928993A96604453580B76F60A93C26830E7919971017A0C7CDED221011E45DE3EEB1B215A629DD7E7E7EA857AF1E1A346880D0D050D6BEB6A9DE66B3D9A2D3E9909393036A7C82B5C964AAEC753C2A3FC139293D0FBFEFB880139772E01B148EC0F03818F51A146426C3D7CB885B3BC723B16D7CB5429A560B94BEFC9A356B06FA71946EB9E516F6F9E3EA643018B067CF1E242626BABA688F2BEF8F3FFE404A4A0ABA76EDCA340F0A0AF2B83ACAA9D0A2458B101B1B8BBBEEBA4B4E768FCA43CB1CFCBCE50CF69DCBAF10D04D239418D2BB19EA85F97B54FDDD55191F1F1F84848430EB392020004AA5B234A009C8E4DA2050D3434B80ABA989EA7EE67206BE5F7B08074E5D81CA2F148111F150AAD4CC82D615E4A030FB0AFCD5660CEFDB1677F66A536D03872D5AB4C0F8F1E36DD2D29BF3EEBBEF46AB56D6A541CB4B74DEA953A7D8E173E7CE21232303DDBA7573BA89C8AA1C3264085B83A536A7A4A424B6D60C7D467EF9E5972CA4A96DDBB615DE323D0B6BD6ACC1E0C1833D4A9AF7DE7B8F595AA3468DC292254B30618275B9D48A12F519D2A0776FC70B2B392ACB99E3851A3D16FDBA1B9B0FA75408E8B6F50370DFC06EA81F5DF12243CED4C553CE254B9980ECEDED0D5F5F5F663DD3EF3C29C882A65F086C66B3B9C6C3F97C722616ADDA8EDD472E42E11BC22C6782334F0CD285B9CC920EF00126DDDD03836E6A0F7535B83BA2A2A2909E5EE2577BEDB5D7D0A85123870F99F43C727710A0BB77EFEE741FA3AF26B2CEC98AAECD69E3C68D0C665F7CF105860F1F8E175F7C111D3A543C459AB4A1BCEEF87271466B699F910BE85F7EF9059B366DC2FBEFBFEFCCA59D3E37BF488705CB3760ED9E0B1502BA6393503C32FA46348AADD9EEA8CA08C6AD660236776FD0F90A4BB1B95C93AD662EC4C5942C2CFC6113761E3E0F957F38FCC3EAC14B75B51F8B20ADD714203FED2282FDBD30F2B6CE18DBBF1BD42AF7FAA4C3C2C2909D9D6D6BB7575E79058D1B37C6C48913D9DF6EBEF966DBB1499326D9FE2E3D6FCB962D3873E68CED98F43CB290E801A644AB6351E84E4C4C0C4E9F3E8DAFBFFEDA768C5F842044D7DCBF7F7F997D495A1F8A8F1F366C98AD9ECB962DC3983163D8EFD263F6F7C10BE6F9695B359E162E5CC840C92DBBF2AE575E999F7FFE399A376F5E4A37FBBAD0D8CAAC59B3D82879CB962DD917C3CB2FBF8C8E1D3BB27197B7DF7E1B77DC7107DE7AEB2D562D5E669F3E7D70E4C811964FDA1603060C6071AB94E83CD298D2FDF7DF8F3973E6808E539D08EE543EFDFCF9E79F6C0088121D979EC7B528AFEDEDDB972C2CDE67487FD295A79F7EFA091F7EF8A1ED77D29ADA9EEE99DA9AEA4575A47BB2D7D45EB7323B84937F2C28D261EED2F5F87BF7B90A01DDA969181E1BD7B74E019AA49582994B6D03B493DA5FF3D3D3B3F3F1C6177F61EFB18B5007109C63A0F42A5957D5BE82F442A2A88E9C943308095063CC1D5D31EAF62EF056ABDC762F3400400F0A4FB367CF660F1B01A07DFBF6F8F5D75F6DC7BEFAEA2BB46BD78E3DE8D2F356AD5A8503070E80CEA54470FBF6DB6FD9BF09DE645DD3DAB237DD7413A80C2A9FE7A773A589EA42F9E8B87DA2F36813619EE8C1A7BA5C7FFDF5AC23F5E8D103CB972F6787A5C7ECCF7BF5D557D93993274F66A3D3524380D793DC08655DEFB6DB6E03FD945726E946EE1FFB7AF2F3A86EE7CF9F67FAF23C742DD28E2045C7C8BD44C709E094A64C9982952B57B26353A74E65F748FAD3CF9D77DE8977DE79078181D6C12D02AF56AB657A5379348643962A7DAED2A42FFA3B819F804CAE2C4ABFFFFE7BA9F3E86F15B5BD7DFB1248E7CE9DCBEA4CBA503D29D1F5EC279A51DB926B8CFAC18E1D3BF0D24B2FB117367D4A57D4BEEE7A00F20BB5950274E3B8087755A5C6945B2B00AD3718F1D8BB2BB0FFC4E552C2FB06472224BAD1558DA1C9CF4241C625984D25D12AC101BE983CB82786F5EB08959B2C697AC8294A8627B2E438682B82774580963EA4654196E05B1E842B02B47D59041B821B954580B6076D45C7E81C3A5ED679FC5859D793739EA332EDF5B107B414DE540702AD14E652F8F363D41E94087C04480E7CCA5BD631CA2B6D43E979F6C7E877E98BDBBEFE151DB3D7906B432F66AA1B819DA78ADAD05DF41280AEBCB2351ED006A3096F2EFE0BFB4F5CB2DDBD4E6F445EA19659D21501DACF5B89A08092DDA4C382FC316DD40DE8DCAA4129477DE5652DFB0C7B084B73791AA0093C04489EC83A240BDF11A02BB2842B826959D7231FAB23EB9ACA243FBE347DF6D967CCF2A6E46A40930ED2411C7A71710BDA194073B0F3FBA0C140FA62910B688ABEFAE8A38F4AB9382E5CB8C05EA4E501DA5E37FA5AA0AF1D772501E8CA2B5BE3015DD62D6F3F74167397FE8BB4426585801E7B47674C1FE57857E4CACB7A6D004D616464A1F3A810FA44A741C0EDDBB733DFA37DAAC88296C2947CDE04215AB3D611A009066421F274DF7DF731BF2BA5B2CAA4E3F6D635BF1E3F26B74CFBFBA3D03A1A202360F3E44A0B5A7ABD8AAC6BCA57190B5A5AAE14D0D4BE34B6402E137B17873D84C9DD71FBEDB75708E8EA1E771280AE3C4904A03D04D0349045C1EA3C113CC9E749D11A15B938C8C7CB272D9015D5B97367F600F35491D54ED7A070330A3B9326F21793BF92E04089C2F17EFEF967067947802690F3F3789904688A3D961EE365929B87A029F7584565DA1F2BEBDEE5029A62536910977CB66455D2CFBBEFBE0B2F2FAF5216343FE60CA0EDDB9EEE83BE00DAB46903FBF6A5AF98071F7CF02A401F3E7C182B56ACB04DC4A1496714B54110961E23ABBC7EFDFAA5F4E6BAF16395C788BC3304A0E5E924CD25005D8D80FEF8E38FD974FAF292D447C81F7CCA2B3D8FAC4B0AD5937E8AF2F30882DC5A9503688AF5A5B2ED13019AA0CFCBEDD4A913CB42E5D3C34D7F976E2E4C616CFC5859804E4B4B63EBDDD22C3EFB32A93C3E59A7BC63E59549EBC6C4C7C797F2AD523D49031AE82398D25642D244D114A41D852ED24B822C4D02134F4B972E65BF13A00972B404827D5B906E3CF163D2F3E8D8B163C758F9BC9DA46D687F8CF24BDB5E0A68E931D289EA4D6D43F05EBC78311B7CE589A271A82D28D1DFE9386F277E4C0A61FB6B0A40571EA0EE3E4300BA1A01EDEEC6B42F9F5C1C83060DAAD65967F67E66AA1359AD04037BCB5AAE1EE595C907E7CA2AC7DEA2957B2D91CF7D0A080BBAF2DA0A40D762405714E151F9AE22EF0CFBC13E3AEBF5D75FC7E8D1A3D92CA9AAA4F2CA1C3972240B692B2B25272733F7847440AF2AD716E7B84E0101E8CA6B29005D8B015DF9EE20CE100AB84F0101E8CA6B2B002D005DF95E23CE100A3850805690A09983455A1DF8D23E851A1DBEF8653BB61CBA5CE14CC236F583D89C84FAD1D678734A34812C34C8AFCEADE52E002D002D60231470B9021A9D01BF6D3C84EFD6EC416A665EA9F2553EFE15025A5F5832998B4EF4F351E3F6C4D6B87F586F848704B8BCAE9E5CA000B400B427F74F51B71AAC8046ABC7AF1B0F63C96F3B909557C4965EF0F60B8297B70F5B0258A52E992446B769361940B37C690906A34EC39607A62DEA06DE781DEE1BD2ABCEC1993411801680AEC1081055F77405B43A03D66C3D8A4F566C46A1DE8280B05806E7B2160662F762B140AF2D4061560A60D4606CFFAE187D47578404FA79FAADBAA57E02D002D0A53AD60B2FBCC05671E3891645A28914220905AAAA804E6FC0BFBB4FB1D9BD053A335B02D82730EC6A485B2C30E88A509099C4E03CE68E2EB8E7AE1E08F4AF1B7B1396A5AF00B40074A97E413305690BF8B8B838F6F77DFBF6213333F3AAD986557D58AFC579B4DE35CDC0A3597972122D35BA79F3665BD64F3EF984E93170E04039A78B3C6528406BE66CD8730AEF2F59C72C6982B477406809A46975498316F9E9976C701E795B973AE9D690CA27002D007D15A0F932A574A0AC85766A1A81681123BA27E91A2115DD83FD14715A5294EF7A51D3EEDD93EA4BAB4E12A4DFFB7A1D8A0C1604473580DA2F9841DA6CD423E7CA39580C1A8CBAAD33C6DDD59D456D94EB0AF1A41B73635D04A005A02B05689AFE2CDD3A89A607D3BA1D34FD98AF64C757C12BEF184D7FA6058CC8A2A5A9D43CD17AD634F59BA648DB1FA3C92A044A822C5F5C9FCE23F8F2EBD2BAD4F46F5E26ADBD4CB0A57D086991FDC8C848765D5AE7E2E2C58BB8E1861B6CD7A6C587E8CB81EA4CEB3C376CD8904DD3A615DEA44B7CD209E402E2EB3BD3EFB496344DADA64933A4034D33A775A5F9312A9BD66016092048FFB1F90816AFDA8EEC023D82A21BB2C1C29C2B67A18601FD7BB5C1D4E17DEAACCFD9BE8FD46A405FC9352120AC6401227EF3FAA23C14E5A6635CFF2ED5BA9A5D4D784009AEB4180FCDC2A374E2C409B6D12D2D144FC97E76225FCF81AF97215D6E54EE31AE0B2F5B7A9E54B3B22C613E0D9C8ED16C45BE79009DC72DE1B2CE23C012C079E2D3C6695A7A454BBF4ACBE5E71280F992A3345B927EA7CD5D29D1BFE947BA746B4DE807EEACA334042F334F0B28550CCE753594AE22AD6B35A0690BAC8AD23D77751780B6138840429626ED1AC2D73E96EEC44210E59B0CD0A9B4D810ADB8C701CD77F8A063F680B63FB66BD72EDBBACD949FCAA53C54261D236B9A438EFE4FA0A5414C6E9DD2DFEEBDF75EB6625B5910AE08D074AED4E541F748207516D0F67017802EFB09E42178DFADD98DACDCC23A1D4A57E7007D29351B3B0E9D436E81A64240B74F8847F776D6253545B22A20DD2A8BF6D3A30132FAD4E74B98F22DBAA47AD131CAE3C8BAB60734B912A4ABF211DCF8EA6B748CB669E289E04D10E63BBB48AFCF8FD9FB992B0234B949C865C293B46C672C680168F94F9246A7C71F9B8FE2F2956C4C1C783DC282FDE59F5C4772D64A0BBA8EB49D5B6E530A68BA80FD20A1A32DB66815396E713BB2A0A97CE9B2A5E5DD90D48D51DE605F652D682948D7AF5F8F69D3A631DFB6B0A0DDD2ADCA2D94763FA2088FBA1C4A57E72CE8EAED62B5EB6AF680A61D5A3EFDF453B6EEF2B871E3D83AC763C78E2D75D3B4E03F1D237873570165A0C1383A466B18DB839DD6B4A605F0C99DC11385B2AD5EBD1AB4B6321DE389A04CE0A7813EFA37F7EFF2E3B4EF624580969E479B0ED00EDAB488FDF8F1E3591134E8497E76FA122040F36334B848D7B21F24DCB66D1B033A4FE472A1DD5FFCFCFCAEF25F0B1747ED7A3EAAFB6E84055DDD8A7BF8F50866FEFEFEA596E9E40BD4D322F694A43B93D3EF04263AC621CC8FD3DFE818258ACCE03BBF7009341A0DA48BDF53281BE5A1BFD1319EA4FBF5E9F57AD0CE31D244C709B0748CEACE13BD5C424242D8AFFCBC808000B6BBB8F43E28FA82AE4D0BFC4B8FD1801FF9E2EDC3ECC8E72DDDFC97AEC9973D955E93AE4175A563555D6AD5C3BB8BA89E9B15B001BABAF72773F37D89E2AF81024D9A34C1B973E7AEC195C5258502355F81B262BE15665A171080B1A00085972EC16234D4FC3B1577704D141833660C962D5B764DAE2D2E2A14A8B90A28A00E09464043EBEEF4525033409BCD6664EEDD834BDF2D857F5454CDBD4F5173A18050402850C314B098CDD0E9F468F7F26CE60ABB0AD0E49FBBB26533F4070F2261E4A81A767BA2BA4201A18050A0E62A60282AC2DEB91FA0EDDBEFDAC67F38A4152693C9420319C99B364271E23812460840D7DCA61635170A08056A9A0204E8DD73DE478BD7DF6083DA522B9A019A46EE2F6FF817EAFF4E2161F8C89A767FA2BE4201A18050A0C62A60D01461D7DC0FD06CF66B080F0F679144A52CE8FCFC7C0668EFFFFE43C2F01135F64645C585024201A1404D53802CE85DF3E6A0C9CBAFB065162A00F429240C1D5ED3EE4FD457282014100AD458050C1A0D76CD9F2B03D0A708D0C36AEC8D8A8A0B05840242819AA60003F4827972007D12094304A06B5A038BFA0A05840235570106E80FE7CB00F4C91302D035B79D45CD850242811AA8001B245CF8A14C400F1E52036F515459282014100AD44C059805FDD14219803E71020902D035B39545AD850242811AA90003F4C7B2007D1C0983E459D05F6C3E89E5BBCED648416A4BA5BB3589C2CCFEED11E2E75DE55BCA2CD062E1FAE3D8FCDF952A97214E745E01959712A3BB37C5C49E09552EEC485236E6AF3D8A7319F9552E439CE8BC0271A101987A634BF46A7EF5767B6595CE00FDC947322CE8E3C791307090AC1A26BEF507140AC0C75B212BBFC8E45A050C060B4C6660E5437D111B625DD2B32AE9545A1E262EDE0C2F2F40AD126D59150D5D718E566741427430964CEE53E5E296EF3987796B8FC15B0D2895A22DAB2CA41327D2AAA03A3D705FEF044CE9DD42564906AD16BB3EFD580EA08F2161804C40BFBD1A71D15E78FCBE60599510995CABC0F7BF1762CF613D563E78B3F380FE720B7A77F5C1A05BC59643AE6D25F9A53DFD663612A283B0E45E2701BDEE381E1C1B88668DAC6B5E8B54BD0A24A51A3177713EEEEB458096F73564D06AB0EBB34F6500FAD85124DC3D50D61D25BEFBA700B42CA5DC93C906E8A9373A09E87C4CFC7AAB00B47B9A4976A936404FEC25FB1CFB8CCBF79EC7BCF52704A0ABACA0F327DA00DDB339A6F46A2EAB4066412FFA4C06A08F12A007C82A34F1BDBF04A06529E59E4C3640DF7F83F3805EB24D00DA3DCD24BB5406E8A8202C99D853F6395703FA02E6FD2B005D65015D706209A09B614A4FB980D660D7178BE400FA0812EE9209E8F7FF168076418356B5081BA0A7F4711ED0DF6C1780AE6A43B8E83C1BA0272456B9C4E57B2F60DE8693C282AEB282CE9F6803742201BA99AC02998B63F11772017DB7AC4213DFFF47005A9652EEC95402E8DE2E00F40E0168F73493EC52AD800EC412A7017D4A005AB6EAAECF5802E8A6F2014D511C5F2E9601E823879170974C407FB05600DAF5ED2BBB441BA0EFEBE53CA0BFDD29002D5B79F764B4017AFCF555BEC0F27D17316F830074950574C189A5009DD85456892CCCEEAB2F6500FAF02124DC7997AC4213E7AE178096A5947B32D9003D3911B1C14E84D9A5E763E2D2DD02D0EE6926D9A5DA003DAEBBEC73EC332EDF7F09F336FE272CE82A2BE8FC8936405FDF0453AE6F22AB4006E8255FCB04F41DFD65159A387F8300B42CA5DC93C906E849D72336D8B7CA173995518089DFED1180AEB282AE3991013A32104BC676AD7281CB0F5CC6BC4DA705A0ABACA0F327DA00DDA331A6F4682CAB4016C5F1CD1219803E7410097201BD60A300B42CF9DD93C906E8893D9C07F4B2BD02D0EE6926D9A55A011D8025639C04F4E63302D0B255777D461BA0BB37AA1CA0BFFD4626A06FBF4356AD133FDC24002D4B29F764B2017A4277E701BD7C5F8D0674618106BBB71EC34DB777718FD8D550AA0DD0A3AB7E0FCB0F26615E0D0674DA956C9C3F938CEEBDDA5683E2EEB9442940776F24EB22CC825EFAAD0C401F3C8004B9805EB8B9D280FEEAA3DF90975B68AB74C76E2D70C32D9D65DD84A765D269F5F8FDA72D1836AE2F766E3E82A09000B4696FF539498FB9ABDE2580EE86D820275D1CDFEF7739A0CF9CBA8C3F7EDA72D5ED07870460D23479A19C72B54B49CAC01BCF7D89055F3F5DEE29C70E9D437E6E217AF46967CB43FDD1D575915B67FB7C36408FAAFAF3C000BDE5ACCB2DE84D6BF7E1C0EE53B62ADBB7213D0737F4EB84E0D080AB6EBFA2633CF3FC379763C6ACD1D8BFEB24D6ACDA86E7DEB857B68CF66D48D7EBD1BB2DA2EA85C92EC395196D80EED610532A03E8EF96CA01F47E24DC7ABBACFA267EBCB5D2801E71CBB3A5C43F7AF02CEA378CAE91968FD168C2B9FF9290D0BA21162FFC15317111B87388751698F4982C31AB90C906E87BBA2236C8A70A25584F39955188892B0EB81CD039D9F938F75F32BBC6E7F35761E8D89B111119026F1F35DA769037BA2DF7A6E4007AF5CF5B7125391393A797CC94A5FEE7EABAC8AD7399808E08C092911DAB5A04961F4AC6BCADE75C0E6802684C7C24125A3560752BC82FC289231770FFA383D9EF67FF4B427CC368F8F85C3DBD7CD6C30B3163D628C4C647967B5F04E64EDD5B5609D0C494156BDFB2954D75A167D13FA0EA464B951B00800DD05D1B604AB786B28A6216F4F26532007D80007D9BAC42133FD95625404BC5A44FD3AF3EFA1DDD7AB5B17DD690E03C4D9A7637EE1ADA9BFDCAFF4E0FD4ECF7A7B2BFBDF3F212F6694B292A260C1F7D3B131BFEDA8BC2420DE8E1A363743DFA749A7ECFDBB8E9B62E98FE8C7553DCA71F98C7CA9934F815F6BBFDB1F36752D8DFCBBBDE57AB5EC6BB2F7FC3CE7BFBA5AFE1E5E5053F7F1FD0DF29D1315ECF85EFACC086BFF7B2BF0704FAE2AB55B3593DD352B3917E259B1DA3F30202E54763D8003DAEB39316742126FE78D0E580967622E9434A6DF1D1BB2B589B53DB3FFDCA78D6F6E5B5EFC8F1B7E0E907E7DBDA97972B6DFBF95F3F55CA82961EA3F6A7BE30F3A10530994C080CF2C7BB9FCC40E3E6719876CFDBACCF50FA61C95AAC58B2D6566D7E1EB513F52D3AC6CF93F580543213B3A023FCB164849380DE76DE2D80EED3AF138328253240D6ADD98D944BE9EC0B84F49EF4D00044C784D99E357EFBD959F9080EF167CF07D774F7D6A3ECF01F2BB7324DA97DE918B7A0E3EA47B26394F8F34B7D46FADC53BF98FDD467A0E794AC65FEFC525DE818B52F7FEE795D785F9B347836167E3B933DFBD2E7BE924D5666F65280EE6A7DA1394A0CD0DF2F9701E8FDFBE403FAD3ED4E039A2A4E6F676A78EA007DDADCCFDE7E1CE2FCD8FC37BF67D6CFE6639FB346DCBC6EBFB5F1BE5987C53FBDC8AC583A975C26FD07F7C49BCF7F8537164CBBAA4CB2A20AF2351839E116DC3BF4559C3E71C956E68C49EFE1DEE903F0DFF14BD8B2FE0056EF98C72C8591B7CE6265C6C447300B82EA49293FAF08CF3DB2907D56DB5BD0F6C7BE5CF85BA97A366FD50023C6F763F59CF5BF49CCF2EEDF6306D6EC9CEFA82D6DC76D801EDBC97940FF74A8DA004DD62E694AF74F9FB594A456106F5F3A4660A7B6A076975AC9D23E43E757748C975D96052D3D26ED33D41694DE58301DBC5F90E54D7D66FE574F2128D8F58B4AD9003DBC83EC3E609F71F9A114CCDBEE7E40D375E919A4B6E2EDC4AD647B8BD6DE8266E74C7A0F8F3C3B8A3D8794E8D9E5CFB6F4187F467FF8E7CD522F602A73F2F401ECB92FEB7AFC1867027F46F97348D7A044CF5B59FDA2CA0D20B5A0BBD4C794CA00FA87EF6502BA9F55344729F1F39D6E013435064F6461F5EEDB010468A9E56D0F76E9434A30E51096363EFDDB1ED0D2878D3714019A37309DC3DFEA04D590B040B4EFDC1CF562C35158A0950D68A9FB83E04D1D840025FDE4AE32A0C774446CA0132E8ECC224C5C79B85A015D96BF98204B89ACDD6307CFDA1E7CDE16520893DF31B641146B0BFA74B677716467E641ABD5B3F2664C7C8FF51D4780B6777F507B10A0A53ED16A01F4D0EB1C3D7AE51E5F7EE40AE66DBFE0760BBA22403F30FA0D66E90604F8319F74598026B8F397B33DA0ED7DD004D9AA02BA3C78D3F3C78D21B701BA733CA674A92FAB2D0D3A1D76ADF84106A0F7ED45825C402FDAE51640F7EE5BFA136FFCD4FE78F989CFAE39A069E0E29BCF5683069B6EBDBB3BBAF56CEB19801EDDC17940FF7CE49A027AD7D6A3F879D906D69973730AD0AA6DA30A014DF9785BDC39A427E8E5C9A14F8393BFADD88CD4942C561E7D25D5184087FB63C9D092414C594FB7241303F48E8BD714D0F4727CE7E56FD0B8592CEE1ED61B1FBEB3A2940F5AFA85C4AB2EB5A06B15A03BC7CB6A4206E81F57C80474DF7EB20A4DFC62B7D3803E75FC2236ADDD8F9B6FEF82662DEAB34F9D675F9F68F33BF38AD09B70C4845BD82711F995922FA5B1F38A0AB578F08961080D0FC2A205BFE0E09E53CC1D21D782EE7B47578C9F7A272BF3E3F77F4483C6F5988BA341A3684C7974300C7A233E9BFB333445BA52839B645DFDF0CF5BB2017DE97C2A1E9D359AD593C0B2FECF3DAEB3A047B6776E90902CE85547AF29A02B72719465414B3BA8BD8565EFFE90EBE2209FEA132F8C65835DAB966FC0A7735656BF054D801E52F510B3E54752316FA7FB014D63472BBFFB178D9AC6B028ACB20602C9A7CFBF40A583848E004DCFE153B3C7A345EB86F8FBB71D786DE617A52CE803BB4F62CEEBCBF0C25B931DBA38EE4C7C14CFCC9EC08210E8CBEC9D9796B0F3AAC582EE1487297201ADD561D7CA1F65007AEF1E24DC2C13D05FEEA912A0FBF42BB190FD03FD70C32D9D586350A246FD62C12FB86B68C99AB8770DEB8D1347CEE3AD17BE6650A32880EB8B43A5A8A19AB5AC8FD0B040FCF9EB76D6184545DA4A019ADEF8345897969285479F1B839CAC7CBCF7CAB7E875730706E8837B4FE18917C7C162B660E79623AC9EE4E2B87368EF52803EB2FF0CB31A1E787C28F47AA3ED18758C796F2C43FD46F5583D7FF9611366BE3A810DB4B8C4C531E23AE72CE8AC224CFCE5D83505F41F2BB7E0CCC9CB4C5B6A8BE87A61155AD0D2B02F8A2EA03EC52D687A80776E39CA421DAD9FE2076C16F42FDF6F6483BE6326DFCE069638BCCF9F4EC682777E804AE585F8065158B57C23B3FA1A358DAD5E1747B81F960C7202D04753316FD725B758D0BC5D48531AF0A3F11E7A462849014D2F484AFCD926BF2F85E5D1E0380FA5ABC8C54180EEDEBB1D8A0A34F8FBF79D98F0C05D8C07F485959591CBCAFAF7AFBD3640DFDEED1176BCF5754D70EBDD3D585DF84B9D8CB6D52BB7B081407A0E9B348F6306DD98FECFBBDFC5D1310E533AC5C932769905FDF34F32017D535F5985267EB5B7D280A64F59FEE0D045E21A4431CB599AF80020FF5BEBF64D1019156A1B180C090D44FB2ED69D0A8E1D3A8BCCF45CF66F1F5F6F160D909A9CC9E0479690F501DD6F1BD8931EE3FE447AA02945C786A3651B6B60F9BE9D27405602257EBD0B675370F19C75DFBEC41BAC7E427277505D2A3A46F94E1EBBC05E00AC73ABBCD0F3C6F6AC9EE427250850DAB6F110FBBBDC641B241CDECE7940FF7ADCAD80A6766A9A100F5F3F1F68353A9C3A76D1D686FC7EA5EDCEFB059DD7B0490C8BBC909E476E8CE44BE9EC541AB4B52FB3BC7E415F6C9468509ACAA4FEC8274548DB90974BA182E42A91F60BF27BABD42AB9CD243B1F1B2424400F6C23FB1CFB8CCB8F11A02FBB1CD052BDA5CF1ABFBEB47D793B4ADB903FA3D456A429FD2E7DEEF933CAF5A617A5B47DE93A74ECF0BED3AC1F911B8CF70B7E3DFEFCDAF799DDDBAC515E94384BA4CF9AFD735865F18B4F319C0DBB0000200049444154B44571748CC5948E7201ADC5AE553FCB00F49EDD48B8E96659754CFC7A7FA5012DABE06ACAE4CE019FEAB8051BA087B5456C60D5378D3D95A5C1C4DF4EB815D0D5A1474DBF0603741801BA55956F65F9B134CCDB9DE4724057B94275F0441BA03BC4604A47ABF1E528310BFA97557200BD0B0937CA04F4920302D08E9477E3711BA087B6711ED0BF9F148076635BC929DA06E801D658E3AAA4E5C7D2316F8F007455B473D539A500DD214656B1069D16BB7EFD5506A077EF44429F1B65159AB8F4708D06B4AC9BF4E04C36400F6E85D880AA6F107A2A5B8B89ABFF1380BEC66D6D05B42F96DC296FA3D1B2AABBFC4406E6ED4D1116F4356C4B1BA0AF8BC694F6F564D5C4A0D761D7EFBFCB00F42E02F40DB20A4DFCEE8800B42CA5DC93C906E8412D101BE0848B8300BDE6B400B47B9A4976A90CD0A1046879FBD8950DE84CCCDB27002D5B7437642C05E8EBACE3608E127371ACFE4306A077EE40426F79DBBE272E3F2600ED4879371EB7017A4082F316F45F6705A0DDD856728AB602DA074BEE90B78F5D99803E998979FB5385052D477037E5B101BA5D14A6B48B92751506E83FD7C800F48EED48E8655DFBC2514AFCE18400B42391DC78DC06E8BB9B21D6DF0917478E0E13FF3E2700EDC6B69253B40DD0B7C9DB85A34C409FCAC2BC036902D0720477531E1BA0DB46624ADBF21788925EDEA0D763D75F7FCA0474CF9218E48AEE2171C54901683735B29C626D80BEB3A97316748E1613FFB920002D477437E661800EF1C192DBE4EDC25136A0B331EFA000B41B9BC961D13640B789900F68B2A0FFF95B06A0B76F43825C40FF784A00DA6173B92F830DD0FD9B3809681D26AE1580765F4BC92BD906E85BE52DF25E26A0FF2340A70B0B5A9EE46EC9550AD06D22645D83B938D6FE2303D0DBB62221B1A7AC4213579E168096A5947B32D9007D7B23E701BDFE92B0A0DDD34CB24BB502DA1B4BFAC95B43B84C409FCEC1BC431902D0B255777D461BA05B87634AEB70591760805EBF4E26A07BC8DBF63D71D559016859F2BB27930DD0B73544AC7FD567B69DCAD563E2BF9705A0DDD34CB24BB501FA66792BA09509E833B998773853005AB6EAAECF680374AB304C69256F5717E683FE77BD0C406FDD8284EE3D64D53AF1D7F388085362447FD7AF8D2BAB02753CD3BF3BB43879D68895B7D4771ED01B93715D4B357A75A9FAB2A575BC399CBEFD4FBE2B4042B03796DC246F7A7099803E9B877947B230F0163F663C8954FD0A64649BF1E39A22DCD73214535A86CAAA0003F4C60D3200BD65B36C40F7FFEB1272F46659151099DCA3808F5281E57DE310E357750BFA4C9E1E0F6CBD8242A3C53D9514A5CA56A05D980F3EEF2D6FF6595985AEBA908F3947B2201E4BD992BB25A39702B8BF6528262684C82A9F017AD3461980DEBC0909DDBACB2A746D721132742659794526F728E0E7A5C0AD7101F05729AA7C817C83199B5335C83388976D954574C189D482B17E2ADC10237FDB33FBCB5E2C34625F86165AB378D9BAA049AA5C845A01D0CBB66588BC09640CD05B36CB01F4462474E956E58A891385024201A18050A0720A30406FDB2A03D09B08D05D2B57BAC82D14100A08058402555680017AFB361980DEB801099DBB54F942E244A140752960B158401FF2791919C84A4F8351AF8752A140786C2C82C2C2A152A90085025577FE54D79D88EBD4750518A077EE281FD0050505B8BC750B52BF5C0CB3D100D6F345120A5C73058A3BA2055058CCB098CD5058E81705A05440A150C26CB1300813AE554A6BE402FD9B76C0A1FC2090B3FC4AEB79F4634B02DFD7BC894505A05028E0DBA4099A3CF50C222222A056ABD9DF28294C2693A5A8A808A9A9A9B87CF93272737361341A856C42816BA7004158AF8745A301B45A78E5E6409D9509EFCC4CA87373A0309B411634C1997A2AC19828AD54ABA1B258A0A4F38B13C1D91814047D44240C1191308584C2E2E707859F2FE05BF501B96B278EB8726D528040ECE7E7877AF5EAA17EFDFA080D0D655F7F36409BCD668B4EA76360CECECE06C1DA6412D119B5A913D4847BB1984D306667C3989303537616909509A4A743919101456161097009C83E3E30F8FA41EBED0DEFCC0C98743A1428BDA08B8F4390AF1F7C755AA8345AA8B41A28B5DA52B74F70B6444402111140743D788585C12B2404AA901028BD451C784DE82BB5AD8E3E3E3E08090941585818020202A0542A4B03DA6C3643AFD783404DD6335927220905DCA500EF5FC68202685392A14949863E351586D45418333260CCCC80456FDDF49525A512E6E060988343D88F29240486C040688C4644FCBB0E3ABD1E3941C1D0F4EA8DC0C828F8984D50E7E7C3AB201FCAEC1C78E5E7C12B2F0F8AFC3C40FA75A8544215150D556424D4D1D1F08989856F5C1C7C6362A00EB6C6B0724BC65D5A8872850204646F6F6F10A8A5EE0DD6FFC882A67FB04F46F2D915FF5BC826147087024529C9283C7F1E0567CF409392027D7A3AF4599930E65A37FFB525B274C3C3618E8884392A1A0808802228088AA06078F9FA322BC370603F14EBFE8141A984AE556BF8F7BD0521A1A10CAA068381191D0672931414C0929F0FE4E742999909655626149999405151C9F5140AA80283A08E88807778387CEBD54360B3E60868D4187EB1B1F0F29617D3EA0ECD4499B55B01EAAFF4437DDADE2850588ACD196135D7EE4E70ADEECE505888FCD3FF21F7E851E41C390C436E0E4C4545301615C1623094AE5678382C71F130C5C533382B7DFDA0F4F385CA3F805918F4E3EBEBCBFE6F361991B6E833E84F9D623E65EF21C350AF5367F6A9C8014D5F845AAD967D19D20F8D961B8A8A60D66860D669A1C8CA84322505CAA42480DC2AC5060A7B48BCBCE0E51F0095BF1FBCC32310D8AC1942AF6B8F90D6ADA10E0CBA56728AEBD66205CAFA5AB301BA16DFB7B8B56A5280BFE43569A9C8DAB717D9FBF7A1E0CC19180B0B61319960B11F7CF6F1016262616EDC18A6F8FA4040A075A08F60ECE3C33EF9E887A04CFFE790A68E9C7BFA342E7DB21006F253C7C42062DA2388898B431059D90A05FB1AA4B114B2A4B9354DB02E056C72E9E9F5301A0CCCCFADBC7C09CACB17A138778E457F481301DBFAA34250CB1608EBD819611D3B22A041C3127F61A908916A125D5CA6562B20005DAB9BD73D37C7414CD0351B8D6C902EEFD449E41C3C809CC3875074F162E90B2B14B0D0E71BFD040642D1A4294CF51BC01C5D0F0A5F5F366A4DBE377B20739F1C81D98B2C5A0264B1FBE2C2CA1F91FEC7EFCC1A56F5ED87F80183101919097F7F7FF6A9C8E2A48B7F08D6F443E32B1CD6E4FE90029B8FC110D429AF3239095E17CE4371F9122C3939CCBAA6E8117B70FB444723B463478477EC8CD0B6EDD80B4649A3F05E5EB6903EE1C7764F3FAC0BA50A40D7855676F21E39902946DEA4D1C2585800437E01728F1F43CE9143C83F791246F2F14A93B7372CE4B7F5F165111396F87858E2EBC3121AC6804C3F7C60845BC8DC4A2658D3710232C1563AAA4D7529C8CEC2E90FE723FFC001C0CB0B010F3C8406ED3BB010252A530A44DBCBC40ED8046229B0B91B845BD8DCF236190C0CD0CAD4142BACC962D7E9A0A0414C72D1482C6DA58F0F825AB44448BB760869D90A3E915150F9FB434523F36AEBB66402D64E76C63A76BA00741D6B70B9B7CBAD4F02AF36231DFACC4C14255D46C1850B283C77169AA424E6B6B02502504020CC0101B0909B8106F6222381A8682809522A95CD4DC12DE5B280CCAD643E7022851AD589A09ABA67172E7DB304FA9414A07113D47BE021C4C4C4203030D0666597779FE5019BCAE5C026384BFDD7645DB30147830126AD06484B8322231DA081C6BC5C280A0AA0A01794C48543163459D734C818D8B429FCE3EBC327228241DB9BFCE464610B60CBED8E75369F00749D6DFAD237CEC165D2EBA04B4B83E6CA15145DBA88A2E414689293A0B9920203455A4806D228B2822C624B6808FBBF223C1CA0FF878543EDEDCDDC16DC4AE6BE64FA5D6A2173204BADE4F2C04575D469B5B8F0E30AA4FEF13B2C14EF3C78281ADCDC97CDC0A2807F3E122EA759A503E33C8A89FF5F0A6CEEFEE056361B70341860D4E960C9CB85252B0B168ADBCECD8532271B0AD2C9EE8B42151808DF9858F8C7C7C32F3E1EFE71F12C3AC42F2E1E5EE48B17B096D364752E8F00749D6BF2921B6680B25860282C40C1B97328387B1645172F409B9E067D5616741919304BE391C9EA8B8880393C0216FA090B83323818CAE01078050430284B812CB59009CA04633E4B4A0E90A54DC32DFABC94149CFBF20BE4EDDDC3FCD9C1D36720BE6953E6DEB08F21AD6CD396056CEEBF960E3812A0B90F9BC39BFE4FD129E6DC1C6B485F4EB635A42F3303C8CA2A6D5DD38B2B2C0C3EE164514722A0491304346CC4AC6D5FFAEA10B0AE6CD3D5DAFC02D0B5B669AFBE31E9E73D4D0EC9397A1479278E337785213F1FC6FC3C16FE56CA4AA678E47AF560AE17C306F594814150F8FBC3CBDF1F6A0A6F2B0E7DE36E0B1E69C1FDCCDC8F2C8DF3E435AB8C3F96EA4E904CDBBF0FE7177D06435A1AD0A60D6226DC6B736FD843DF99A6B587B574C091EAC181CDDD1F521F36738768B5301516C24CE184458550A6A6C22B3D0DB89202486646521DD9CB2D3010AAA060665507B76A8DE0962D11D0A00194EAD23E7567EE499C5BF3141080AE796D56A91ADB66ED151522F7C40964EFDF8FEC03FB98854C11182CF4CD7EE66854141BD033366A0C0BF99069504FAD869A42DD24A16F3C26D9DE6D611F785F1520DBDF249BEDAAD1E0D29A3F90BC74295B12C967F418D4EFD587B937E8055119F7466544B49F23207DD1F170BEF2FCD734E8C880ADD382061CD917495626BC2E5D82F2D24520230390FAF269D20245AB50644B501042DA5D87B04E9D11D6A103BC838285755D9986AB057905A06B41239602088594198D309B4CD0A6A723FBE00164EFDB8BFCFF4EB14FF0526E031EFAE6E303456C1CCC8D1AC3D4B021E01FC0DC11F63E64F2F1961769C1A12C1DDC73A5B464B1E6255DC6D9AFBF42C1BEBD40541442C64D408376ED58ECB3B3EE8DAAD6D51ED6F6C0E62E101E1D6203360D389A4C50141640917419CACB97818B17009DAE24A44F522902764093A608EFD205611D3BC13F2E8E59D74AB50A8AE255FC846BA4AAADE8B9E709407B6EDB5458331B94E9D35FA301CDD8A309218517CE23F7D851F64353A94BB92BBC54B0F878036A6F202418888D87393E9EC18E66ED1194A533F6ECDD16DC8F2C0D7DB3ADBAE5C6491A2C7AC36040FA91C338BB601E4C14F6D6AD3BEA0D1884D8C68D59EC33D5DD13922D24B138F6BAAC093357CD70A401478A27D7EBA1484F63E17C484981222F97019B85F4D94DF2A10891E096AD10DCA60D0BE9A3D996E476A2B03E451953863D411B5187CA2B20A67A575EB36B7E06455AE8737260C8C9812E3313F967CF300BB9E8C2056BA445894F814D83869F3F2C01FE405838101BCBDC168A9050781547599435B027755BD803B932BE63578845D0D31616E2D29AD5B8B26C29E0E303BFC14311DBB317A2A2A3AF8A7D76C5355D558674C20CF7A34BDD217CB091FBB0B94F9BAC6B364126ED0A14A9A9B0646640595404057D05D10A7D92681AA5B737029B37476093A6086A9E00DFA8683608A9A6A52BA9FD45AA110A9439D59B2F9674A5508BAD4959D018C552A31ED59AC5338EFDB50508CFCD42784116FC32D3A04DA655E052A0A54127C9C3AAF55221D3DB0FE9F4E31B087368280B81A3F037F8F9C14BA5663F349D9AA22E54DED615B4C8C76C3D669D1CE2A5F482822D8A4F0B87172F1E5E5DEBDB5B006F830E26A5174C5E2A982D66B65646E35FBE05CE9E4672783492FADC0ABFE6AD1010140C259B61E851AD765565AC6E7E9ADDC856232B5ECFDA0CB389A6A45B63B0E92B81A69E1BF4D675438C06EB34749A2064214B3A3B0BCAEC6CB63E76A8B610D1BA2244E98BE06B92ACDF4EF1D7E1E12C7C8F061C8D91F590191C8EECE070E4FB07C1AC28FED2F070BD3CBB355D5B3B6A8A06417EE8533F823D6F5250B3D5ECE86DBD33390BBF5FC842C7D870D75E5D94566905582C2EC5DAA6A6407FFE2C74E7CFC13B3B0321857908D2E4C35FA729B5959339300886C828E8C322A0090D439E8F1FF2BCFD51E0EBCFAC6495DA9B0DF0B1D8646F1F2B8CD5DEF02A9E92AC2C863114927568D9035CFD4F31DDBB3EE932749BD681D656F4EF3F90458EE84E1D47836F3E829A1649EAD403598937C32F3A063EF449AFB0AE0256B39275CB2EF61FDB2C4702B6894D003291CB83AD23A287516F5D3384AC6B82362DC5EAA7D3205857C47EFCF36843832CA833D3A1CCCFB3EE3A539C742A6FE4F907B11F6D781454F10DE0DDB829BC1B3606CD7C64ADECE96FB79AD5B095AEADDE64C6FEA434BCD5BB150B43950E76B31D55A8E1379E4FC5A1423346B76B52E90B88139C53C03649A4B000DA93C7A0FBEF14F417CEB2B591CD05F930D9AD636C51AB610C8B80AE5E0CF451F5D82E2134B00716FE56128F6C8DB8F02D8E4F2640ABA1F252318B53E9A58492C0267963973CA7D50F66AB82144A6746C1F62DC85EFA250B4F0B9BF6187CAEEB84CCEFBF81FEAF3F60F20F80B9FF4084F4EC83B0F00878FBFAD602C0145BD67CA9DFE2DD6208D6F4C35C224603B3AAF5E4DED2E9A1B7ADD0A7835943A17C45405121BC7273E19D7E05DEE9A950A7A5D29649259D931E7EF2550705B1979E4FB304F8346F019FE62DA18E8A622F646B1FB856EDEFDC735453CF2E3218F1FEE68378B76773361BB6D482FD04E8C2C2426C387705C70D2A01E86A6865DBC83FADB6967C19DA13475174601F0C17CEB14F598B5E675D8A536209997D7CA06BD018BAD838E8A26360F60F601690978F2F543EBEF0A14922B4146771289CD587EC0D959AD6B4A091FE92352D6C037BFC5E3DC482620B1A190CC8DDBE05053F7CCBC2D17C060C855FFF01C879F16920330386FA0DA11C320A11AD5A233028987D0DD42A0BB0B8CDB90D2C8DBFA63D16AD6B8810ACADD6359B3443A17CF47FB6A4AA0E26AD967D81C1A0876FF225F8255F86F79564280B0A4AF76E5AD889D62E2137575C3C7CAEEB08BF36EDE09BD04A58D6D5C0017E0902F47B1BF7E38D6E8DD8AE2AA5B6BC2240D3A6B1EBCF26E3A4C9072385055DD234C533ED6C0ECECA828C03963E614D14736C6271B0BA9347A1D9BF17DA83FB61CECAB05D8F3D94C52BBF59542A18C323A18B6F004DC3C6D0474431CB97ADFC563C63CF9BC05CBC14A7756A3501D93A638FBD858BA15CFCB4556397ABDAA5084034953BE7E07E687F5AC696FEB45CD7115EBD6E84F993796C453C43C72EF01E3402016929306EDD04FF9E3720B0F78D564857B67DAA56CD6B731607377787144789306017478130EB9AD6BF2E5E039B7E67BE6C8A773719A1CECC60B0F649BA0475F1D88575853E73699BD9CF0FBEED3AC0AF4B37F8B668C3B605A3303F5A6AB5CACF02FB40A299AB66902BADA6F4C9EA686C0D59D01BF7E3F5CEF5CBDE34363F3F1FFF12A0CDBE18D156B838986390A640275D8621F9125471F150C735280E5F72F4F967B57DC84F489F9E3493CC989106DDF163CC8FAA3F79AC54C81441875C1666B537CC3EBE30C4C4401B5B1FBA9838906FD91A8F6C1DD0F3F6F6818F6FB1DBC2A704C8CC6F45502E8654C94083A3BA5647F7937F0D8BC50AE8ACD3A7A0FB693954278FC1141E01D07A15470EC144BEE8DE37C18FEE75F3BF6C1D0C655434EABDFF91D59F5E237DD1F2F5299DB3B89F4997542D7687988CB49B0C59D9D68D0AB8754DFF27EBDB4481009A42F8A624C1273909EA8C3478513CB6410F2585FA49D75BA1094AF51BC2A74D3BF8B4B90EEA7A3150F8F9B3D98F647997BC142BEA6BD6BA1AD252A13F730AEA060DA18E8967D017EE148000FDC1C67D78AD737DB664EE55BB7A73409F30F962445DB7A0A9C39B4DD09E3C8EDCC51FC3989C04DFEE890899FC109B8A6B75D1493A23B76CC8A2217F714E16CC140277E922F4E7CF407FEE344CA9A940F1483B1B13527BC3E4EF0F939F3F4CC121304446431F6DF527B305EB556A2B907D3894ADAE0BA9852CB5924B8DFCD6602B922C68B2F8B25253A0FD6939BC766F8785E29B556A28755A1849AB464DE17BE6141445855637CF4DFD103E78147C8BD781AED55674792C97B8454843BEE093D57F6D80D140EB6097F65B5BDD21D615FAC898506567C23BED0AD4A92950D11E8E5A0DBC0A0BA1D0EB4A59D74A5A08AB49337893DFBA7E43A8C223A0A490CDB0705BFCB57D1B509DC87D95BDF8136837FC0375424B040D1D0DDFD66DD9649B3AD96692B62440CF910BE8E17519D034384333F00EEF47FEF225305EBCC0769056F5E98BE0C123E01B1A566A8495DC15C6B42B30A5A7C2987A0546B2B82F5F80293909661AD82B4E168582597FC6A06018E9FFA1E130444432178685F6D82B5EE18D222C4A7CC8C551172CFC4DC57E4AAD8D4C837B1EE643AEAA2D582294850123373B0B85BFAD8472D33A2825DB6259945EEC6B83606D080E81B66357F8F6BD0DE131B108A0DD588A17F477BA1E35BD003B7748C9824F46161D422E11F261EBF556DFB56D3BB06277084582786565B2A810554E1603B63A2F976DC22B8D1051F8FA41151307557C7DA81B3686574C2CBC22A3D946BC5E926DC1D8347D9D0E39BFAC8071F5AF5090BBA5452B040E1A09DFB6D7313F785D4E04E8B972007DDCE48BE175D6C5618573D1AE6D285CB502A6CB1761F6F282F6BACEF0EE773B429B25C0DF3F0096DC6C182F5D80E1FC59182F5F84293303A6AC0C9873B26DAE0B66257B7B431F1E69FD098B609116E6A0600664859F1F0B7763B3F6D8564E3ED6752E282E9962948B07F628D2823EDB4B5C173622D7D2FE6C5DEFB9202F0FB91BD741F9D76FF0A2D9749244DA6AEBC5A2B04317285BB743786C3C42C3C3E1439FDD5EE4DBAC596E1DF7376419112236FF7549FCB57D848841AF6510A7F5AF09D84A722715E4C12733033ED95950676740491BF24A1259D7F4E3151109755C7DA81A35818AC2F922A3A1D5E99075EE2CF46BD7C0F7C06E284D2678356A82C0E163E1DFA96B1D734F956E7502F4BC4D325C1C04E8617511D0DC723EB817052BBE8589A6DA9ACDC86DD711BA6E8908F5F5454056069417CEC194960A4B411ECCF9F9B0684AAF6D419FE0BAA87AD090BB22321A165F3F16FEA6A0D0265B7445692B9906F5D80F597F3CD28206F88A5D15B5CE4AAE8848346DDD6C4651413EB2F7EF8162D5F750A5A596FA12D1D48B456EF7DEEC333B242A0AA1E111F0A3CD5DC9075D3CC5D9FDD0ABA157B08F10217708A8AB9BADB1D7B65D6668B20CB9447874089F3CA38399DC1E9A22280B0BA0CEC9826FDA15F8A45D812A37A794750D6F1F288BC3F994E11150346A8A82D070E499CD50EFDD89C09347A1341AA18CAB8FA029D3E1DBA2B5DB16BBF2F4D62240CF9703E863265F0CAD6B80263853F4C0D1832858F635CC17CF5B07088382A08D89876F7616545A0D144603406B224806502C5E2AE8A3A2A1896B80C2D878188343016F6F2829F4CDB738FEB838D282BB2EAC16329FB157126D61756DD742B745659E8EE2B6D06A34C83CFB1F14CBBE82FAC2395602B9890AE2EA233BF146F8356C8CD0C828048784C22FA018CEB53D8AA3323ACACD2B05368DBD14C761B3BD268BF770249788BED87F6D28768710B8597488566B0B0B5515E4C32FE512FCAF24C33B2589C1D796A86D680B342F154CDEDE30F8F94395970B75A135EC4F41BBA64F7F12BE2DDBD4494813A03F940BE821750CD066B309FAD3A790FFF90258922E3BECDAA6804006E482468DA189AD0FB38F759121DBBA16148BCCA22D7C6D6E0B1ADCB3F9908BFDA4D5B1C890C39BF1C00CD65D5334C8A6493A5F7F0AD5B1C3CC6991DBA00932FBDE8EA0E87A088F8C42504828DBED9B74AF5571D01ED226D23544C8F5C736D3B5C560170F38DAE2AFAD96365BF0C968648B3BF9A52621E0E279F85F3A072FDA12CCC17D31483FFC147CEAA0254D805E2807D0478DBE182C13D045855A68B43A0FE94E55AB067542BFF42468BFFA1896CB763B5153589005285478411B1C0A4D7C431451F85B58048B2AA019792A6F8AB690FA90A5037BC5F1C8CC8F4C33B468D69E6BA7D5AAD52A0405FAFDBFBDF3008FA2DAE2F83F7D534880449A020A22F60E4840408AA4808A58F0292A3E8C140141A58874E9080822D828FA0011450445514A22A0204BB161C702811084501292EC6E92F79DBBDC65B26C92BBB39BD9C97BE77E5F3ED89DB97377FE77E63767CE3DE75E9F5EEDC952CACBA3398BEDFA44F4732DEA13B2CE4E934F7FDD2A847F63C591FA8D70AA5922626A26208E6EE4D8589121E94CC0A9E8D6F7F30F0460890847748CF92621A2688DDCBC7C918DE9CFA28535BD5DCA19FACE0D389E7587882CC773F388D01C2334D748C4F1A388CA3A8CC8CCBF6039FE0FA2838A11EEA1DB82292AE4FE47E1A8DF182567EF177F9E8751C70A090E465434196ACE85822B2A04E8F95B147CD0DF7B01E8F90B5663F7DE5F2B6ADBBCDB4B4A105662478FFC9FD0B8F8142CCE99114A95ACA2106CB35BB0BF3802A783C2702A380245C10485B0B3E9D261622E5EE79F73404F264C0867C5390772A5E8D0A07E2D0C7AF21EC4C645EB3EFEB17F4EE2B537D762FF1F87751FC3AF15455C6F311CB6025C6ACB46883D1FDF144522343C122111D10809A389F94344B243A0D292AFBBB6319EEC77B75F4FDB1F07FBF6DBDFB1EC9D0D3876FC5C04913F8E5BFA189423E09C42C439F993336780FA4C84F8151789BFE2624A8EB10BAB3BB8D88ED8E242C4C2817A4185681B968F8B424A4FCA46C7B321083F86D4C0A7E117232784E658A1368C7F00FBAA595C6C34BA776B83962DAF563A14017A812AA0EFBC522D5125ADEF74444706E186ABAA66880C5D5821B602D4CF3B826A79271173261FE1793658F21D08B39DCBAC729400C7118AC325E13858AD06F29BD4454854C4D9013D9A45CD99C156FA35BBF22FAA5FFEB023FB583126BF9086F8F838A50BC1D34E070E6663C2C425A8573B048DEA53E240E08B00344D689F9F87429B4DACE8425993A194DA7E16CE81FA955FED29142EAC97660E0CD44F28B3DD0D9BAC7877E5665CD3340C71D58C9A40EA9C61730ED6CE5C0211DE576043C48F99B830EF24EAA21009410E846A6E0F7B6810F2A3C2608B0E437E4C148E45554776543C0A23AAE6245879F925D8F3830D5D5313D1B54B2BA56B8400FDEA56450BFA0E45403FD1773AEAD50AC1E07F3B97E1A94AC519C85F8282FC429C3A91879339A75178E20C824F1620F474212CB93644E6D91193E780E58C1D4167AFC1E2F82814F5B809A1B5AA39012DE07CEECC8DF485AEF8280FD6EF6C98E42BA00F64E385494BD0FAE608DCD9292AE0DDE87C9DA68845070A0B9C596F1476181E118AD050E703D1489DDD051935F3048282C331DB8480DEB8D18A77DFDB8C86E9E67E00001894494441543EFF8A41E3866AAFD7FEECF052EB38163B23721C874F2274F92E716F099B3B0828B484222F260C6762C2504070AE168E92B84884D78C415C8D18C4C5452322325C844D06B2AFF5689379C481D90B4FA38B97807E4D05D0DF392CE8AA08E8BEFF0380B6DB1CC8CF2F407E5E210AF269E219FAA3D84F3B82CFD81156E84044810331A76C88CE73A0A44E2C42DA5C0A4B02A56007F6E291807EC147401F3C908D892602B4B889CF3E4045F85709101C1C24FE020D67FA6D12D0334D08E84D1BAD581940406B812616277014A3202717451B7F4648E649E4C685233736028591A1B05B425014158E104B1822C2C3106E0983253202515116444653D62C256605F661EC0BA0535313D145D1822EB03BF0BA0AA0BFF502D0FDAA38A0497CB2A2C50ACD8E22D8ED34E94C110A690E8342BBB0DE68E0ACC85E04388A10161484A8B868C4D58A4374B5489735A7A713FD5147027A828F803E70201B934D0868A911DDE8668A7891807ED1A4807ECF4480A6FB8906A04F669D405E4E2EECF4B619162CDE88222268D2AF3084478489C1B4F070E71B122D18E15C34422E1251F9EE427FDC8FF218D2822640A72A029A5C1C6F2A01DA6E4117450BBA7FBFAAEBE2D07608419ACCB44F567F89C399FFE0A1B414016CBAB808D0B6429AC7C019D369B1842326360A9648CAF80BEC1A7812D0E327F8E683260B7AF264F3B838CABA59A86F263DB70873973CEBCFFBC9EB634940CF78D17C3EE84D9BAC78DF4480A6689282021B724F9E41C1D9882FB110B18073A8B09245886AA8762A5C67975435D7863BA05308D0A9EA3EE885DB147CD0DFD82D485504F4804A06F4BB6F6DC0E2F96B111DED0C679AB3E419D4BD30017BBEFE19C3FBBF5C2A72416EA3FDD67DB00D2F4F7BF7BC7A15DD89542F2BF3181EEDD75500BB5864173AE7DFA50B8D404E6E0DBAB008CEDA550F2A3A76656C97801E37210D357D1824CC3C908D293A004DC0ECD9750C6AD4AC264E6FE088FBD1B2EDB5429B76D73C810B6AD7709D76EF4177A1437233B14D3C045347A16682736053BBAD3C9DCC06E869260474BAC9002DDD1CE44A74D00AE6414102C602CAAEF0D3B3095A5578922FED752B2DE8E4D444A428029A5C1C8B54019D72855A14C7C0FE956B4113A0A9DCF77047F1EFAD573E8E2DFB5E1780DEB2710F068EE8E1D265C023D3D16748775C755D2301E8DCD3F9E7D52BEFE63F7DEA8CB0A063AA4522A59BF3A9F7CDAE5FE0B0533C69096AC4C7A2C125755C3E50BA9608DADFEDFEADD4619B5ED550C43F1A5124A0C712A06BEA8FE2C83C988DA93A013D67F20A4C7EB9BF385DEA83E726F5120FD17B3B0EC7CA0D535C32BCFED26A5C7E7543DCDAE1060168AD253CE2C97902EE54AFBC427D4E7D2FFB7DFFAF993899E3CC44A3D764EA7BF7F2EDAE5F4BC504D7B930BEC2762AEA3B69414F9D613E0B3A7DB315AB4C6241938E72C057C651D377EEF3CA54554BB9ACEBC405E8944424AB02DAE1C0621540EFB55BA00AE8412602348925A1A007D074E313A00930543E5BBB1D5347BF853BEF6B233E47464508EB9020202FA8158B3FC391C3C7C5F61FBED92F1217464C7CB494E558D1CDEECB7609E831E37DB4A00F66635A25035ADB3F7A01AD85FEDE9D3F63D60BCBD1B8E945A85E23465864D437ED3ADFE49294FAF0E77D7F8BD8DCEC2339F8F3F7C31830F43EB4B8552D36B5ACBE91809E6246406FB2E283F70317C5519666DAE88EFF3520BB9FB30474923780B63BB0E44B0517C71EBB05C98A16F4600301BDF895B578F3E535655AD065017AD9C2F5983FE33D51AFBCE20EE85E778F47FBA49BD1332D455413EE8F43C7F058FF3B5C87496E31109FEC98233E2F9CB70675EAC5BBAC6F5FC0AB5A57027A941F003DC347407FB16137664F5C8E79FF19E6D1822E0BD0546FDEF4F7307BE1900A2D5B2DA0E74C7E0794C94A6F4DD56B563BCF2AA7F6A80FE72C7E06D562A384E5AD7D00AB6AEC693F023482C331D98480CED864C56A1302DA17BDAB5A5D09E8CE29894852B5A0ED0EBCAD0AE82445400F3100D01FBFBF15F5EA5F809D5FEEC398E9BDC52BB22717873BA0572CFE5CD4A37D474EEE25EA51D9B5FD2711FBDCEAB6EB4AF5BB27405F50ABBA184DA6927DF8385AB5BFCE94807EDE0F807E5127A0FB3E3005575C7B09C8DD90D22D11F73FD249844AB9BB38DC01FDF8BD1371CD8D978A7AF4207CA44FAAA847EE0E59BA746F5DAA9FDC01FDFDDEFD88BFC0E9DA292CA089E71DA506102B1BD0934C08E82F18D001E7B916D09DBD00F47F5400BDDB6E41D2E56A3EE8A79FAC7C1FF43F4772D0A94B0B217A932B1A887F5500FDE76F87CEABF7D3F77F62E4A0F90222D2AF2D7BD313A09F1AF900A2A29CCBD253A1412D0904FADCF6EA3434BAEC22B1EDD60ED7E39E073B20B6BAFE946B6FAF2C69418F1CE7BB8B63E614EFA338C8553179E4620C18769FF8E91736A8E5F2BF5704E8514F2DC0B0F10F8B7A752F4A404C356782CCAF3F3AE743F9FCA31D48A85DA3543FB903BA76BD78DCD8BCA94BB6C8280B2E6A58CBF599004D83BC34A776C34BEAA0EFD3DD41757C2DD2829E38DD7C3EE82F365BF1215BD0BE76B14FF525A06F4F4944E714B5280E1A245CFA95828B8300DD5911D0CF18006852CA134CDD0709E50022EDEFEE83D6AA5DD6364F80FEEDA703E7B946C8C27BAC7F57F1B0D0BA38DC7BB4BC6D3EF5BEA6B204F4737E00F42C9D80D60E126ACFCB1DD0DA814095680CF701623AB63BA057BEBD110BDF1FE57A70BBF7BDD68276D7BCBC6D15F58F04F40B2605F41A0674455D58A9DBB580BEDD0B402F5301F42EBB05B73755B3A0870EA85C0BFAE3555B8590A977B72E25280DC88D7DFAB552DF692306D2D7EF425E5EFE79F5CA83371DF3930FB6E18921DD85CF92CAA3778D455EAE333D5500E2E18EF8F3F743B8AF67475C7C693DF17A3EACEF5CD7F6071F4F466AB756220C8FEA2E5E3DB6522F0409E811E3D250C387288E4399D998AD03D0D95939220C72E838A725EC0E68EDE767C7F544F3565789AFA8DE2BD35762EC8B69E7D573388AF055C6B7F8FDE783CE70474D79A2C7244C9ADBDFF516336DCC5BD8B96D9F6B0F314878FB4DAEBEFF27FB0486F49E85FC33CE19175BB4BECAD5BFCF3EF192685FCF8C7412D0E3A799CF82DE9A6E4520009D73EC94087D3DFECF29D44C882DD54F957A1398F0E012D09D9213D14911D0850E07962B01DA664127450B7A582503DADFDA5328DDD2373E11376CAFFE5D51BD86337E57164F0381E5FD06772B9942C7EEEDD9A19445E7EF73D01E4F027AF8D834D4F0210EFAD0C16CBC34D57B1747659CDB86755F63E91B9F62E0F0FB85CBA4569D73B1D42A96B7F637B95BC9DEF66F59E727013DCE8C80DE6CC5DA55C646711CFC2B1BEF2C5A8F5EFDEF100FCF63474F8AFB8CC22169DBD123392E296F68DE14741FCAF048DA264353698A857DDFEC2F25BBDC46061485B9D25BADBC2EC865291FBE141E2B5DA0DAF04BD91ED5A37249937AE7DDF7FEBE8E25A03B7A0368BB03EF6C57707158BD00F4F02A06E8BFF61F16373F95EE0FB547D32B1BFA04E8A9A39688812E59FEFE230BDD7AB4F38B9F53E5A291801EE623A00F9B08D0F49093A5636A7397D54DDF790BE837E67E88DA756B9E5DA710C2BA6BD8A88E6BC05845634FFB48408F3529A03F3218D0145143209403F152331A079A33658548F4AA5D375E44D14C98D5474C86F4F66BEB70C5359708781384BB3FD81EAB5764B800BDEFBB3F109F108BE726F612F75397C4C178B84FAA00345D1714563969E4225C7BE3A5221B91004D6F4F140EFBD9DA1D3879C2191F4FE3481FBDBF55D42BEBBED77B1D94554F0BE88E8A1634F9A0DF55057447450B7A44150374451D411714CD1BE029E1C1535D4A035FFD4E866B53F3C42B85EBC3A822013DD40F809E63120BBA3CEDF272F3854B431BEB5C91D6ABDF4987CDE64CD3BFB871DD52C0AFA86E59DB25A0C79810D0DB365B611640D338C2DE9DBFA0FFB3F708AB973EAF7C6B83C835A090594A4EBAEC8A06221C72D1AAD1E78D3168A19FD27210868E7DD8D5F734A651BF612D91854AF378C831244A446A72797DD7C3C2DB87BADE6B425B4F02BA437222BC01F44A1540EFB459D051D107FDDCC0CAF541FB43ACFFE56348403F4B80F6C1074D16F4DC69E670715485FE92801E3DD57C3EE86DE9567C6C120BBAAC815E02B476905F05D09E069DE9812DC710C862BEA8412D3CD83B091F2C4F170964A3A7F51613FE7FBA663B766CF91E1D529AA1634AF34ABFC4B480EE90AC1EC5F1DE0E05170701BA8322A04732A02BBDB3CB6B4002FA9931BEF9A009D02F33A095FB52027A944901BDAE8A02FAB6EBFAE0E2C6CE37D04EA9CD71C77D6D5CE1979E004DAE8E0617D776F51BAD2A44EE904307FF41DEE93398396119E62F1B2E129A32FFCEC6964D7B71FDCD97E1C616972BF7B59E1D25A0DB2727C21B40BFAF02E8AFBD00F4F30C683DFDE7B73A12D04FFB01D0F318D0CAFD2201FDBC0901FD65BA1546039A9284268E58245C1904C823878EE1C509CB7073CB2BF0EAAC559830BB0F12DB5E2BC25229DEBD2C0BBA7B876158FCC118D10F1116E714A4B27802F4AEED3F62D5E6692E88BB77A0FB203E65FB6ADD1FCA1DEEE58E5A40B7F7C2825EA502E81D8516DCA668418F1914581707AD8442E174B2D0C08176D4DF4B5D3DEEEE29E142EE6844ACB38A053D78741AAAFB10C59175301BF3A7FBD7C541A174B22F643FD1EC76349B1D85D2D1E010CD52E89ED823B7D179934544AFB0142E4759829E2653D26EA32880FC3305E78DD297D7877AAE1109E81153CCE7E2D89E6EC5271F181BC52135ECF7D0541CCDCAC105756AE095FF0C135FD3140D1FAFDAE69299C261292263E7B61F5C619414F238FDD541E27B6DF82CF997DB77BE5984ADD2B1E531E5C1A81ECDAF220B0D1252DBE4E7166DAF1E23C264FB3F34557CA63059F79C0A3DFD5F511D09E8764989B84D11D0857607567FADE0E22040B75304F4D800039A468FAD5FFD284685A9D0D35926915424A2EAF6AA00E8A7FC00E8057E06F49D6D9EC6AC3787A051930B21FB893E5318160DDCDCD769840849D4CE48487D42BE49E9BB6CD1FA6A74B9A73506FF7B961885F7349F0AF92FE5B6B2E6DBA82C400F3729A03F0D10A055EFA9B2F6F36425FBFB7EF6F537AAD4D702BA9D1780FE5005D0DB0B2D68AB08E8F12600B476A4F744CE69BCB5E063116E73ED4D4DC4BC1BF44AB375F35EB18C0E8DFE535CE6B7BBCFAD44DE29B585784253ECE68EADDFBBF46F7DDBF5C2BAD35E349486FCEBD9701DAA3773C252D196AFB3A3A974BAA77DA48B63A01F00FD9A9F01FDFC53F3C572474F3CD54D845A757BA09D6B647DF9A2F57865FA7B689678A5887796912F14A7FCC7AF87D07FE8BDE27429DDBB41A33A98F2FC12D18FF49AAC8DE0A0FEA5C996562DDBEC9A44CBD3844833C6BE2DDAF6573F91055D121C8E612604F48E742BD6575140533F5DA9993296AE857B1E6A6F58D8AADEFBD0BD9E0474DBA444B4F502D06B5500FD9517809E60324093505A2B8A42712896B2E60571C2BAA6F932283599C2E32894EEC3151948BE2B110FF64EC6DC292B047C699F8DEB76E286669761C0881E6262797A2D2338D320832C54C75668C77303E6056C850F09E8017E00F4EB7E063459C9CFA4BD040A7BA242206ED8A8AEF83FB986E875935E69C94A769FEFDBFD82F734CA4FFBC8B4FBC7BA4F2817D0FE0EB592801E6A52407F5645014D092C2BDF76BA27A8D0020FF29AF1173C8D388E04741B2F01FD910AA0BF2CB4A08DA2053DB10A00FAFA669789C99124BC656A32C565EEDEF11386F59B8BB7D68C1329DB23A73C269257F67DEBF485BDF9FE683C76F77801684F596874419901D0FD7D04F49183D978C3CF80A61903972CF858A4C3CBAC407973C8B792B21664280BD0EBD76EC7DFFBB3F0F8A0BB44F201B59174674B24B7181410403F6342407F9D6EC5E75514D046C0D3883624A06F4D4A441B2F2CE875AA80BE5511D093AA00A0B53E2C4F3E4AB2E616AE1A7DDE5A77324D58029A06BADE5BBA115B36EEC5B817D344DAA95900DDCF0F807ED3CF80A6C13B5A458532F7126A55C7ED5D6F11F706E99A4B96D28629C2D7BC7CE17A8C9AFA6F11FAA49DF04A7B23490B5A6B096BB3D7B42BED787271549605FDB44901BD81016D0487CB6C430BE85BBD00F4272A80DE566841EBCBD4264B9AF25460A3383CA598BABB38FC0568EA0D8A1220B7C6D03E7330FDD581B46CA1292CE8BEA3D310E743A2CA91CC6C2CF233A0098AE44EA231026DA815C19456D4888EB1880C3FD273D2DC7EC247AC02E80792468A745E5A717DDCCCB452F5CA1A24AC2C400F9E6CBE288E9D19566C64409B02D0AD9312D13A492D5185A238D6EF5488E2D85A68412B45404F3301A02FBFFA62B11415150ADD5A307315A6CD1F203E6BA706A5CFB43EDD90C7678BC9E1EFEAD10E4FF69C26328E96AC1E839E778C1193C30F19F520260C7D037BADBF8818CB5EDD9C2E0E5AF4925627A6623640F7199D86581F009D9D998DC57E0434BD59C8370FD28B1EA4B29F526E71BA236491DB28E98016E17DF88E316255162A8BE77F849B6EB95C58E2940A2CDD54031F9D8101C3EFF7B856E59A955F883E9485E668A09570FCB91AB8F4410F3221A0AD19566C62409B02D0AD9212D14A11D036BB039FA9007A4BA105898A809E116040D3725634D22F4BC20571229E52161AF8BBF3FEB6C21D21CBD64D7BC53C00B2CC7B7BA898649E66C6A2350865916E0C19A3A9AD27B77DB7E737AC5BB50DC3263C12900B420E12A6F901D06FF911D0E492D0F6857B3F49D8926872DBF40503852B845C23CFF6712E23F640AFDB856B64CC9057316EE613E23BD94F721B7D275D20EE7D48DBA87F694C81067EFDD54F12D0034C08E85D19566C664007E47E948D4A174762522212BD00F4065540DFD244CDC5317370605D1C01ED85B3D108724DC240FC1609E8DEA37CB3A08F6666E3ED19FE4D5409841E65B5591971D02541E1E86F4240EFCEB0227D75601255CCD4E781FC2D12D02D3B27A2A52AA01D0E6C5201F4170516DCA26841CF6240BB168D0DC4052101FDD828DF7CD0E4E258CA8056EE4261410785A39F49019DC18056EECBCAD85102FA162F004D3EE874AB820F3AA3C082168A807E69F074445A827055937339F39571C2663DE6E71FEF0025AC04AAFC71D0816339C5E8E5070B7AD98C25A8151F8C06F54203753A95D66EFA67BB444291BFCA9E1F6C08098F405F13027A4F86155FACDE8CA68D42512D3AD85FA7CCC7F1428133F925D8F79B1D2D3A27E216550BDAEE40860AA0D30B2C68AEE8E2583A6D218E671DF3E2A7F3AEFE562022D2827F3DFB0862AAC7EA3E744EF631AC5EB012B9274EEB3EC6FF5BC5EA0935D0F3B9DEA63BED9FAC3F20E3838DB0E53B97F9E2121805424243D132B9356EB8AD99D20FB0391CD8A20AE8668A80B615DA50525CACF40378A7CA522008E1967011BAA6B7501FDA6D769450DC2017250582828285EE662B458E2238ECB44001F76560FB2608A161212050AB148AE2D8BA4BC1C5B1B9C0829B1401ADD230EFC30AB002AC002B50BE02345BE3972A80DE4480BE542D8A834567055801568015F05D0172716CAF08D0E9FB0F634D4E092EA95BCBF716F908AC002BC00AB0024A0A388A8A91F9D79F187FE345888F8F47585898CB6D1954545454929B9B8B1F0E1CC6C63FB270A6A000C5EC5B561296776205580156C0570508C80D6AC6A16BD3FAA859B3E6F980CECFCFC7D1A3479195958553A74E89A5D279D0C857D9B93E2BC00AB002E52B4003FC91919148484840DDBA75111B1B8BD0D0D073167471717189DD6E475E5E9E8073015BD07C4DB102AC002B6098026441C7C4C408385B2C1601671999154480266BD9E170883F726FB0F56C58DF7043AC002BF07FAC80043159CDF4476BAB6AC366F507D0FE1F8BCAA7CE0AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0A30A07588C655580156801530420106B4112A731BAC002BC00AE8508001AD4334AEC20AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0A30A07588C655580156801530420106B4112A731BAC002BC00AE8508001AD4334AEC20AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0AFC1776FEC638DDA41D8D0000000049454E44AE426082 , 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-       (6, 'Virtual Infrastructure Deployment', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/vidhome.htm', NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/api', '?', '?', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EED9D079855C5F987BFA54957AA882E282088051535D244EC0876A3222A2AC1462C11A3F2370A0AA8281883062504BB066C815829828A801A4540015B0451A42ABDB848F93FBF91B3DE7B97652B7BCFCCBEF33CFBECEEBDE7CC7CF37E737E3367CECC77328C040108400002B12490114BAB300A02108000040C81A61140000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C6641000210C8D8B871E33630400002108040FC08646CDBB6ADD408F4EAD5ABAD4C9932F1F3021641000210D801815225D04B962CB12A55AAD010200001087841A05409F40F3FFC60D5AB57F7C23118090108400081A60D40000210882901043AA68EC12C084000024902FDD4B41FECE5E94B774AA5FF59FBDBA199D5BC24C71487976EC36808945A024902FDE0846FEDB559CB770AA3EF194DAC7DD31A5E0243A0BD741B4643A0D412608AA3D4BA9E8A43000271279024D0CFBCBFC89EFF68719E531C8737F073250423E8B83747EC83000412092409F490B716D82B3397ED94D05D6736B176FB33C5413382000420B0AB0930C5B1AB09933F0420008142124812E827A7FE602F7EBC64A759DD7966133B6ADFDD0B595C7A4F638A23BDFC291D021028188124817E78E2773666C6CE97D9F53BAB89B56DC21447C1307334042000818213608AA3E0CC3803021080408910C816E8A5ABB7D9C4CFCD14DA2EA420D1671E9E615576FB9525531C25D2A628040210282602D9023DFA13B38F977F61AD1BD6B41E2FCDB46F7B9F6815CBF91F9AF38BC56607EC854017537B211B0840A004092409F46D6FBF6DB37B75B0F7E6AF70E2DCAAC16F73CD0FCD5A6D0BD6FE6255CB97B116B52AD8B94DAA5AB709CBECE993EADAFC35BF58BDCAE5EC9C3796D898CEF56CF20F1BEDB87D2AD947CBB2AC56C5B2A688D3B52A95B1B92B3659FBFA954AB07A66087489E2A6300840A018092409F4F1076EB6BAFDC759A5F2656DD59D1D938A397FEC12CBAC5A2E49A02F1CBBD44676DC3349A05BD4AE60F7B5A965D316FF6C99D5CAD9F8051B6CE2C28DF6E3CF5BAC41B57236E2F8BAC5687EDE5921D07933E2080840209E049204FAEC96664F4DFFDE2E3D223387B50BD76DB6BA95CBDAC08F57DA21B52A58AF293FD9ECAE0DAC4AF90C27D07B552967E7BFB9C4469C50D75ABFB0D06675CDB455595B6DC2771BECED1F7EB6EE0756B36BDF596EB32F6A50A22410E812C54D611080403112C821D0C598772CB242A063E1068C8000040A41205BA0376C321BF34978AF273CEFA80C2B5FF65732ACE228440BE1140840206D0458079D36F4140C01084060E70410685A48A924F0B7BFFDCD264F9E6C071E78A0DD7CF3CDB6FBEEC51FBE60CB962D76DE79E7D9BFFFFDEF9D32D6CB8C7BF6EC99744C6EE75C73CD3576EFBDF7DA1E7BECB1C33C478F1E6D679F7DB6FBEEA1871EB2F6EDDBDB61871D56641F47BC0E3AE820EBDDBB77915FBE7CE9A597DA3FFFF94FAB50A142A16D7BE38D371C87366DDA14288F49932659870E1DAC4C99F82F2346A00BE45A0E0E81409F3E7DAC65CB9676D65967D9BA75EB6CFAF4E976ECB1C7167BD50A22D02FBFFCB2FDF18F7FCCD38665CB96599D3A752C2363C7DBC9CE39E79CEC0E61EDDAB556B162452B5FBE7C9EF9EEEC80FBEFBFDF0E3FFC703BE9A4934C79CE9831C3097F51D2A2458BAC7EFDFA45C9C20A2BD037DD74930D1C38B0C85C8A647C3E4F46A0F3098AC3C22170C71D77B851D7A9A79E9A542909EAC5175FEC8443CF2B9E7BEE392B5BB6AC1BDDEA77B972E56CF3E6CDF6F0C30FDBFAF5EBEDAEBBEE7202DFAA552BEBD6AD9BFDE52F7F7102B66DDB36AB51A386F5EDDBD78DA03552DBBA75AB13CB7FFDEB5F39406A04BD2381D6B923478E74E75F79E5953662C40827E283070F769FA9CC7DF6D9C724DACF3CF38C4978E6CF9F6FFBEDB79FDD77DF7DF6EAABAF5AD3A64D4DA3DECB2EBBCCD925FBAA54A9E28E57521DDF7BEF3D67DB01071C601D3B76B47DF7DD37C946E5D5BA75EB1CA22C5E5DBA74B1CCCC4CFBEEBBEFEC85175E70769D7BEEB956A95225AB5BB7AEF5E8D1C3A64D9BE67E2BA903515D2FB9E4127BEAA9A71CD7E1C387DBCC9933DD685A9DC9A04183ECDB6FBFB5FEFDFB5BF5EAD5DDDDCD9D77DE99835BA2402B5FD5F5ABAFBE72C7457720BD7AF572EC656BDBB66DEDC71F7FB42953A6381FAB8356C7F3873FFCC1715CBD7AB5FDE94F7FB2430E39C4EEB9E71EEBDCB9B3F3B1923AA9264D9AB8BF2FBAE8225737B50171555B12C70F3EF8C0B50F7D76F4D147DBFFFEF73FBBFBEEBB5D5B58BC78B1F3654113025D50621C1F0481010306D8279F7CE244FA8A2BAE7075BAFAEAAB9DF84A2474B10E1B36CC6EBDF5D6A4FA5E78E185EE62DCB871A31364DDFA2B49602444895315A9236809EA934F3E99E3D65A02AD119DC44249827AE491473AE1FDEB5FFF6AFA5E2226018B047ADCB8714E647EF7BBDF25D9973882D6744724D0BFFFFDEFEDC5175F74236FD557222FE1934D4F3FFDB4CBE3EF7FFFBB9D76DA6939045ADF492C35724EE475DD75D7D99021435C7D366DDA6462DAAF5F3F27D012612589A3044DE2A4CE4CE22BD1534728811647899FCE4B4C3A479CA34EA45DBB76D6B061C3A46352055A9D9F3A9A7FFCE31F6E0AA359B366AE43489D2EDAD9085A763DFBECB34EA035FD251157DD24DC8F3CF288ABA33A4EE51D2509F5D0A143ED965B6EC916707580127E7D5EB972E5425F330874A1D171620804341FA90B5BA3535DCCA973BB8F3FFEB89BA3D6A8F3DA6BAF35895224D0121A898B92845DA3494D3F442955A06FB8E1062750A9F3AEB98DA0958FA663F6DA6B2FD3DCB35224D01AA15E70C1056E54DCBD7B7737F255CA4DA0BB76ED9A3D7A57672091AE55AB961B753FF0C003EEDC51A346B9BB81D41174A29F5F7FFD75577F3153F9E2122509B538260AB4BE133795A10E43234B8DF023811E3F7EBCEB104F3CF1C4A4E6A40E45A367A568547AFCF1C7EF54A0D529A8037AE79D77DCB99AC67AEDB5D74C3EDC73CF3D9DC0EAFB4481163FD5435C0F3DF450676B24D09A27DF7BEFBD5D99E2A539F3D4BAE93BDD81A8038DA6927497F2C4134FB8CEE2FCF3CF7777130F3EF8A01B7517342509F48A152B0A7A7EEC8FAF59B366B68D2CB38BBDBB4AC4405D94D11CAEFED645A751D68E2E3E19A4D153345296D0E902D6C82F51A0256E8D1B37B6A38E3AAAD8047AE5CA95EE81E082050B5C99128044818E0A927D9AB691E01654A0AFBAEA2A37E25492A81C77DC7139043A91978E8B38258EBE131D97CA517717CB972F777724D1C83A12E82FBFFCD23EFCF043BBFCF2CB937CAF291189FDCE52EA087A47021D9DAFBB113DDC9458270AB446BAA79C724AB678268EA07724D0EA841F7BECB1A48E4953195F7FFD758E29B344DB773492CF4F6367049D1F4A1C1314014D4348A0759BFAE9A79F5A8B162DECFAEBAF3789C5983163DCADAAA62B340570F0C107BB51902EE4F7DF7FDF4D03E86FDDBA270AB4FED7ADAF4445F3AABAF5BFEDB6DB925671147404AD919D845923F11B6FBCD11E7DF4D16C81D6A84DA3448D4835BAD3E850237309811E786A24F8CA2BAF644F71E43682D67CA9EE10347DA0FAA803481D41EB7B7548E2356BD62C97A718CD9933C79521E19B3A75AABBFB10AF548196C06B6AA8418306D9771C91408B95F86A84A9C194F8AA3CB1D31CB0E67755374D3FE9D8C49497406BCA481DAB58687A46D342EAC8F46C60B7DD76B34E9D3AB9ECD4396B8E5BD31AB367CF767712FA7B4702BD66CD1AD3BCB63A1BCD93FFF4D34FCE07AA836C974F7497A472C4453C357216FFA8732AC8C58440178416C7064340A2118D0C135744E4F6B90458B7F089A3C9E8B34428FA4C295AC29578CC8E8E8FCE8DCE8BFE8F1E2CA6E69398C78E6C8D3E8B6C557EAA5FEA798975D677FAFFF9E79FCF758AA320BC72E3A232A272538F49E526BB732B3362A4EF73AB5FF4799447A24FF4775467D993CA2CFA2C9551E2B2BCC4F3537D987A5C6AD905B9887208B4EA9CCB0A9E82E41BCB6399E288A55B302A8D04BEFFFE7BB70A4349A358CD67EF8A35E169ACA2D74527BFD57BCA3CFB79F3561BF4EE37B6E8F693AC42D9F82FE42E087D04BA20B438B63410D0148FE6A0B50C4C73CA5AB5408A0F812481DEEFBEB76CDEAD27DADC656B6DF9BA4DD6A151AD6C4B35EFA6B58BBA1DF8F9E79FDD7C979EAEEAC185FED71A51CD95699E48437CFDAF792B3DDD3EF3CC33DDFCD5860D1BDC13CDE8964BE72B1F2D458916E9EB182D4BC9CACA72652B1FDD4E285F7DA627A32A4FF9143421D00525C6F11080403A092409F4B275599679EF5B6EE4BCB65FF222FEFFFEF7BF6ECDA5567AE81648B743BA356AD4A8917B70102D44D7F21BED12FAF39FFFEC045A02ABA7B4126309ADD66E6A82FEDD77DF75EB0CA3759C9AFF6ADEBCB95B485EAF5E3DB714470F1E162E5CE8167A6B725E1D8496BAA84CED642AE80E29043A9D4D8DB22100818212C831073D78F2377663BB4656B64CF256D28F3EFAC8B4665473547ADAAADD387AEABDFFFEFBDBAA55ABDCAD919E324BBCAB55AB66679C7186136889A8D6251E73CC316ED1BD9ED06A6792D639EA69B046D37A1A3B77EE5CF7A45A4F40F53B9A84D712966FBEF9C68DC0C78E1DEB9E866A81BBF2296842A00B4A8CE321008174126015473AE95336042000819D1040A0691E10800004624A00818EA963300B021080409240EB619E7611E9815ED5AA55DDAA0B45A8D2CE2B45ABD2C339C50DD04A0AFDE8819EE20468894EB49632CE4813E7A065BB7E14C12BAE49DB47B5C32BBF3173B5253835A04C71D74DCF066457F4FC20357FADB4D143E01DA52FBEF8C27D9C177305A7513E7A9641824069269043A015C54B1787045A1788566868CBA9B6BE2ACA96B636EA619DF6FD2B5A93A27D69F585B66E6AC5469C53A2402B8297D67D6A758A02A2E83BD5574B04B536F484134EB037DF7CD33DEC548018EDC157D272430544D777A79F7EBAE3A3285D8A68250E7A98AACF274C98E0E232A8E3D203506D1356795A8AA82DA75A7AA80032DA22AA73B42A45DCF5E0554161B49450F10B74BEECD183586DADD5F2426DCFD59662F1D7AA16D9A6F2E4336D6955D017C517506C051DA380318A52A687B68A68A6E3B5ED542124D5E1469D5594AF1E048B83DA42547785AE94CDEAC4552F7D2F16DAD6AB108FB25D11D8548602E8285E81F251EC03D910EDCA52E7AFB6A4B815F3E6CD73211915874151DEB41D58E2AE87C962A8F08DF2C3C71F7FEC98C8663DA056601D715084340D22947F648B56FE6820A1BCB5C5560F97359810BFDC82DCC7B9CD625BE926B04381D6084617A72E420984566A684FBB02AB68B99B0446610725D4DAAFAE2577DABB1EF7942AD08A9DA00B5D9F6B59A04687AAAF56986894A7D082123D8D18A3D0870A5EA33B0A45175327A52581BA8B9050EB78E5276E123EDD7D28908D045AE22D6E1268C54A50BE1220899AA25F291E80BED77A6F2D558CB69B6A1DB946C5B251DFC907EA10140B41211915E376E9D2A556BB766D17E74002267193684ABC155652F629C9A75A65235BF5B7444CC2AAF8B75AF2A8E03CB7DF7EBBF3E9C9279FECCE579C07896A62E72B51543D141FE188238E308582D49D978454E2AD7C159F409D85CA57A84A89A692F252A728A6EA84541FD9AFF8063A473131D41189AB96574AB83540500728C1958D8A4FA1A872126889BA56F928EA9B96668AAD6C136FD55BAB8DD4F12AB2596A2C87B8B757EC8340A99D837EFBEDB75DE42E2509A20276FFF2CB2FEE7F858CD4F240ADD5960068599F8443499D9136D548B0156C45AF4D9238456BC1B5D450EBB5D5C9693427B1D4765A8D5C25D61A792B088C924675FA91B84AACD5112A088EEE46D459A82C95AB7325E8DAC0A3602E2A5F1D66B4645122A7202D0AE7A8BC14B94B235B8DD015B92B8A0D106D02529017E529115647A20E401D93469A2A53C165F4B7C4508163947F9487EEA0C44382AA0D462A471D8C6C175309B6045165EB188D86B56C32124789A7363B296F754AB249DFAB23126BD92F5E1AEDAACE9A5A93C8EA0E409D8B3A27F9450CC54A62AF3A8ABBEE7634D2572C604DA768E9A78ED19D8882EE48F44910F08940A915E8743849C2A48D373ECCD7EF4A3E1A592BD29846DAD1C87A579647DE10F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B812481D6DB8D434B9A138D125BBD43F32EF58140D804184187ED5F6A070108784C0081F6D879980E0108844D2087406FD9BA2D4724BB501030C5118A27A907044A07812481EE39E633BBEC884CEB39FA539B78651BDBBDE26F3B03B53C4C6B59A34D0F05C1A3B5BE5A179CDB6BC7B55141AF454F4DDAD4A06DE4DA2451987253F343A00BE2358E850004D24D2049A05B0E996C1F5E7B8C8D9EB3D89AD6AE6A87D5AF9E6D9F3621684BB43674BCF5D65B6E1DAB767069E75C93264DDCAE3AED0C536C676D858E5E63AF0CB4A9429B34B449415B87B5414431A2B57B4DDB8CB541449B0824A0DAC1A7EDCEDAFAACA4E3B56B51C768A79A369068D384DE1E2C9BF45D7E13029D5F521C070108C481409240676DDE6AD5FBBE69D52A94B31FFB9E92649FC4308AB52031D63666C544D0AE31EDECD2E60BC53DE8D7AF9F7B8DBD624F68C79BB6DF2A69E7DAFCF9F3DD2E37ED4CD3CE33E5A11D631264C5F950BC05ED3E53D20EB448A0B56B4C82AF2DC5DA55A6D1B4768C699BF2C08103F3FD6615043A0E4D0E1B200081FC12C831073DEEABE5764AD33A39CED7565C05B2D1765C05C351901B05F151DC0AFDFEECB3CFDCD65AC54E50AC0A1DAF2DC31AED8E1933C68DB425E8C3860D7379286684A63624D08AE9A1EDD2DA82AC91B93A03C583508A5EB5A511B7B6F00E1F3EDC89BB5E95A500398A0791DF8440E79714C74100027120E0C52A0E6D9196786B34AED80C0D1A3428143B04BA50D8380902104813012F04BAB8D820D0C545927C20008192208040970465CA80000420500802087421A0710A0420008192209024D05A8D115A5200F72831C5119A77A90F04C226C0083A6CFF523B0840C0630208B4C7CEC3740840206C023904FAF365EBDC16EFFAD52B065773A638827369A12BA477362686A22D74469C586402DA613C69D2246BD5AA5591F30A2D8324813EFFB9E976EFA9CD6DC0C4AFECDE8ECDAD5EB5DD5C7DB50E596F6B563C0DBD2F4E2F19CD2D45AF338A2328043A8E5E29799BF47670BDC19C142F027AB72529994092401FF3E8549B70456B7BE4FDF9767AF37AB67FED2AD9476B37A0E26668B38876F4DD7DF7DDEEA5A3EAF524E07ABF5CE3C68DDD4E42357E8D50264E9CE8DE7EADB73A77EBD6CDBD9C349D09814E27FDF894ADB795472105E263159620D039DB4092402BD468D53E6F58A39A556C4EAF0E49474B7815284923E9050B16B8DF3D7AF4703137B4055CAB2514752E12E8112346B8A0491A711F76D8616E6BB8822AA53321D0E9A41F9FB211E8F4FA42033D4D6B282546B144A0F310687DFDE5F275D6AC4ED51C476A7A4391E4A2ADD653A74E75C18BF47AFBAD5BB7BAC8744AD3A64D73236AFD2F2197384BC4EBD4A9136B815610A7281CAA22E7A90E152A54C8C1418D28B7F94B71C8C8C870771AAA2F299E0410E8F4FA4561841F78E00177579D18461881CE8740EF0AD729EA9C46D9E94E3B1B417FF2C9272E509342A67EF4D1473674E8501B356A9475E9D2C545E8D38FEE10F4604902AC8EEACA2BAF74C7D4AE5DDBFAF4E9636BD6ACB19B6FBED956AF5EED824029ACEA8409135C1C6DDD3D2C5AB4C83A75EAE442A516477CEB74F3F4B57C043AFD9E9348EB7A4A4C08749A043AFDCDE1570B7626D01A358F1B37CECDAF2BEEB446FE125AFDADBB028535BDE79E7B5C4C6C8DB6155255E2AC39F6D1A347DBE0C1839D40EB2EE3F2CB2FB7962D5BDADCB973DD485A3FB366CD722155DBB66DEBEE3C24DAA4F41040A0D3C33DAF52116804DAAA57FFED25048938D6AD5B6755AB5635FDD6685F3DBC42A4469FAF5FBFDE854ED58FA63F3495A1E334E2D6D446E5CA95DDE74AFA4CC72969AE4DC7EA1889B7460D3A0E81CEEB72DD75DF23D0BB8E6D517246A011E85C05BA280D8B73FD228040C7D35F08741E02FDF9E79FC7D37345B0AA79F3E6D967B38AA30820033A15818EA733116846D08CA0E3796D96A8557A5D5AD7AE5D4BB44C0ACB9B00028D4023D0795F27A5E288993367DAA1871E5A2AEA1AF74AEA398D5651E93576A464023962716CDDB6CDCA646404C989298E20DD4AA520102C812481DEB465AB55EBF3A6952B9361EBFB774AAAF4800103AC7EFDFAD6BD7BF7A4CFB5A350EB86F5C66FAD6448779AB772832D5F97654767D6B08E8F7F6063BBFF168005814EB777281F021028088124815E9BB5D9F61F34C9BAB5CCB4FB3BFDF6704D19EA4DDB999999F6D34F3F3941AE56AD9A7BBBB7DEE67DDE79E7B92D9B5AEF3B64C8103BEDB4D35C5C8E74A5E3864FB30FBF5F651B523A19043A5D1EA15C0840A030049204FADC673EB6D7BE58EAF259D0FBC4EC687691406B67DC871F7E68471F7DB4CD9933C7962C59628D1A35729B37B4A9A366CD9A367EFC78B79EF898638E298C3DBBF41C047A97E225730840A098092409F4D2B559D6E6D129B677F54AF6CE556DAC4CC254B476DA69A345F43BDA8CA10D17FAD1E60B4DF62B66876258A46EE32C66BB0B951D025D286C9C040108A489006F544913788A85000420901701043A2F427C0F010840204D0410E83481A75808400002791140A0F322C4F710800004D2442049A0B5842EB454AB56ADEC2AF1903034EF521F08844D801174D8FEA576108080C70410688F9D87E9108040D80410E8B0FD4BED2000018F092409F4DC656BADDDA3536DFDA62D967577E7A46AE98D20F3E6CDCB7EF16BF4A691E820C5924E8CBD9C2E265FFDB8DE662E5A6D671D54CF0E1BF2AECDED751C73D0E972468CCBCDEDC5BF313679A7A6E9FA9C346992DBE54B0A87409240EFF697D76DD59D1DEDFFC67E6EB316AFB1B7AF6C935DD3912347BAD7405D70C1056E3BB7760F2E5CB8D06DF1AE57AF9E6B18DA45F8EDB7DFDAF1C71FEF5E1795AE74F5E84F6DE4CC1F6CF55DA72699C043C27479245EE5BEFCF2CB76D96597C5CBA862B266D5AA55BC4EAD9858C6219B24819EB374AD1DF9F07BA690A3A923E80F3EF8C045B3D3BBF6147B63ECD8B1AE2128AEEED9679FEDEA2281D68B5157AC58E1E272C42D21D071F3487AEC09F98D2A08747ADAD4AE2A9539E85D45967C634B200481D69258DDD12A068EEE60A38440C7B6D915CA30047A3BB665CB9659DDBA757340D4DC5EF486EEC42F57AE5CE90247EDE89CC48B456F11E72DDE856A9BBBECA44481966F468D1A65CD9A35B3962D5BBA32A74D9B666DDAFC36BD976A885ECD3479F2646BDDBAF50EEF14259CB9050BD3F4E082050BAC478F1EEE6DEF854D0A4C3678F060EBD2A58B356CD810812E2CC8989F87406F77905EB973F8E187DB4D37DD6477DC71875D77DD75F6ECB3CF9A2EE68B2FBED8CD59F6EEDDDB1E7CF0417BFAE9A79DE8CE9A35CB5E7AE92517BD4FF3F11D3B76B42953A658BB76EDEC9C73CEB15EBD7A59DFBE7DDD05F9C4134FD825975C62F7DD779F2B51F9DE7AEBAD2EEFB66DDBC6BC9984655EEA085A7E79ECB1C7AC7FFFFEB6DF7EFBB90EB943870E56A3460D173AF79B6FBE7142AC51AB845CBE97303EFFFCF3EE554DEFBCF38EA983EFD3A78F55AC58D1962E5DEA62A32F5FBEDCBD624D0FD4D5564E3EF9640772F6ECD9A629C3134E38C11DDBA2450B77AC3A7DC55DBFF1C61BF3055C22AD69C6C4C4083A5FE8BC390881DEEE2A8D86C78D1BE72ECADAB56BBBF9F69E3D7BDAD0A143DDC525D11D346890B56FDFDE5AB5FAF52D2DFA5C6F94C9CACA7217982E565D987AD79D1E940E1C38D0162D5AE4E6E875BE8ED7C5AFEFDF7BEF3DF7D203AD7C89C39B68BC69B1C56068EA085A235EBD68425305F2D58B2FBEE844531DB646B9EBD7AF77A176F500BC69D3A6B661C306F7105C3E9460EB6F75C037DC70838D1831C2BA75EB961D9637BA03D36F897724D0071F7CB0EBA40F39E410F7807DC68C19EED98EF292A8173621D0852517CFF310E8ED7E89960DEA628C045331AFA38B4A17A5DE2023418E56A8E8C2D6C3D2CE9D3BDB6BAFBD66A79F7E7A763C6C65AB63A3F3D5014471B3A3DB5F95A9D1B77E482547202E73D01A317FF9E597D91D7E711040A08B83627CF240A0E3E30B2C2921027111E85D515D047A57504D5F9E0874FAD853729A0820D069024FB10526804017181927F84EE0D5575FB5AE5DBBFA5E8D1DDACF083A2CB72609F49AACCDF6F58FEB6DF3D66D7674E61E61D5D4CCD8A8129C4B0B5D216DB0D283C050921E424E9F3E9DADDEA138747B3D92047ACCDC2576EC7EB5ACDE80F1493B09B5AC68F1E2C5A6DE590F35F424FBEBAFBF764FB9B506533B07F5E4398E2F8A4DF417021D58EBA53A10089C40BE045A0C860F1FEE56253468D0C01A376EEC461FC3860DB3ABAFBE3A5BA0759C845B4BCEB4A44CAB21B49E54C22D01D78A06C54190A05F7FFDF5258E16812E71E4140801081481409240BFFAF952B7CCDFC7480000071A4944415408FFBCE7A6E788C53171E24427CE5A642F81D6FACD175E78C1054F8A46D0D10E2A6DF0D0C27EDD76299D71C6192E129ED608FFE73FFF71427FD5555715C1ECC29D8A40178E1B67410002E92190E321E1A62DBF8A6A85B2658A649176D669E386C4392E09818E8B27B0030210C80F015671E48712C740000210480301043A0DD02912021080407E0820D0F9A1C43110800004D24000814E03748A84000420901F0208747E28710C04200081341040A0D3009D2221000108E48700029D1F4A1C03010840200D0410E83440A74808400002F92180406FA7B4CFBD136DE32F5BF2C3AC588E295726C396DE7E52B1E44526108040980410E8ED7EADD56F7C897BF8F5CB8EB2560D6A9478B914080108F8410081CEA740972F9B61B7B46F6CF74F9E67BF6CDF0E5F5417BFD2ED486BBB6FCDA266C3F9108040A00410E87C0A7493DA556C5DD6665BB236CB9DD1B375436BD3A0862D58B5D1AAED56CE9AD4AA62F5AAEE66173D3FC3BA1F9969FBD6A8EC824EED2C21D0815E55540B02C5440081CEA74047BC1BD6A8640B566EB4DE1D1ADB8C456BAC53B3BA56AB72799BB36CAD8D9AB9D8F6D9A3A2CD5AB4C6F4F283BC12029D1721BE8740E9268040E753A035C571418BFA3672D622EBD2A2BE7DBA648DD5AE52C1366CDA6295CA97B5951B7FB1792B3658950A656DF9BA4DD6B1591D7BFD8B658CA04BF7F545ED2150240208743E05BA489473399911F4AEA04A9E10088700029D4681FEA0675BDBBF7695705A13358100048A950002BD1DE7D8AF96DBA52FCC742FCC2D8934E0E466764DAB86255114654000029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C0530208B4A78EC36C0840207C020874F83EA686108080A70410684F1D87D9108040F80410E8F07D4C0D2100014F0920D09E3A0EB3210081F00920D0E1FB981A4200029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C0530208B4A78EC36C0840207C020874F83EA686108080A70410684F1D87D9108040F80410E8F07D4C0D2100014F0920D09E3A0EB3210081F00920D0E1FB981A4200029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C05302199EDA8DD9108000048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089EC0FF036DA3CE30CB0602C40000000049454E44AE426082 , 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1);
+-- insert apps id 2 to 7
 
--- ASDC users
+SET FOREIGN_KEY_CHECKS=1; 
+  
+
+INSERT INTO `fn_app` (`app_id`, `app_name`, `app_image_url`, `app_description`, `app_notes`, `app_url`, `app_alternate_url`, `app_rest_endpoint`, `ml_app_name`, `ml_app_admin_id`, `mots_id`, `app_password`, `open`, `enabled`, `thumbnail`, `app_username`, `ueb_key`, `ueb_secret`, `ueb_topic_name`, `app_type`) VALUES 
+(2, 'xDemo App', 'images/cache/portal-222865671_37476.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/welcome.htm', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
+(3, 'DMaaP Bus Ctrl', 'images/cache/portal944583064_80711.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
+(4, 'SDC', 'images/cache/portal956868231_53879.png', NULL, NULL, 'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal', NULL, 'http://sdc.api.simpledemo.openecomp.org:8080/api/', '', '', NULL, '78ot0W94rpB0o4FYzVoIOg==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1), 
+(5, 'Policy', 'images/cache/portal1470452815_67021.png', NULL, NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor', NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/api', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
+(6, 'Virtual Infrastructure Deployment', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/welcome.htm', NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
+(7, 'A&AI UI', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://aai.ui.simpledemo.openecomp.org:9517/services/aai/webapp/index.html#/viewInspect', NULL, 'http://aai.ui.simpledemo.openecomp.org:9517/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1);
+
+-- insert ASDC users user id2-8
 
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (2,NULL,NULL,'Jimmy',NULL,'Hendrix',NULL,NULL,NULL,'admin@openecomp.org',NULL,NULL,NULL,'jh0003',NULL,'jh0003','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (3,NULL,NULL,'Carlos',NULL,'Santana',NULL,NULL,NULL,'designer@openecomp.org',NULL,NULL,NULL,'cs0008',NULL,'cs0008','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
@@ -17,10 +22,17 @@ Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAM
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (7,NULL,NULL,'Teddy',NULL,'Isashar',NULL,NULL,NULL,'pm1@openecomp.org',NULL,NULL,NULL,'pm0001',NULL,'pm0001','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (8,NULL,NULL,'Eden',NULL,'Rozin',NULL,NULL,NULL,'ps1@openecomp.org',NULL,NULL,NULL,'ps0001',NULL,'ps0001','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 
+-- insert demo user to account admin role for all apps id2-7
+
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,2);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,3);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,4);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,5);
+Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,6);
+Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,7);
+
+-- insert users id2-8 roles to SDC app
+
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (2,999,null,4);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (3,16,null,4);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (4,16,null,4);
@@ -30,18 +42,27 @@ Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (7,16,null,4);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (8,16,null,4);
 
 
--- VID users
+-- insert VID users id9-11 
 
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (9,NULL,NULL,'vid1',NULL,'user',NULL,NULL,NULL,'vid1@openecomp.org',NULL,NULL,NULL,'vid1',NULL,'vid1','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (10,NULL,NULL,'vid2',NULL,'user',NULL,NULL,NULL,'vid2@openecomp.org',NULL,NULL,NULL,'vid2',NULL,'vid2','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (11,NULL,NULL,'vid3',NULL,'user',NULL,NULL,NULL,'vid3@openecomp.org',NULL,NULL,NULL,'vid3',NULL,'vid3','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
 
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,null,6);
+-- insert users id9-11 roles to VID app
+
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (9,16,null,6);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (10,16,null,6);
 Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (11,16,null,6);
 
--- fn_roles for the on boarded apps
+-- insert AAI UI users id12 
+
+Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (12,NULL,NULL,'steve',NULL,'user',NULL,NULL,NULL,'steve@openecomp.org',NULL,NULL,NULL,'steve',NULL,'steve','95LidzVz7nSpsTsRUrDNVA==','2017-05-19 15:11:16','Y',NULL,'2017-05-19 21:00:00',1,'2017-05-19 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL);
+
+-- insert users id9-11 roles to AAI UI app
+
+Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (12,16,null,7);
+
+-- insert fn_roles for the on boarded apps 
 insert into fn_role values(1000,'System Administrator','Y',1,2,999); -- SDK
 insert into fn_role values(1001,'Standard User','Y',1,2,16); -- SDK
 insert into fn_role values(1002,'System Administrator','Y',1,3,999); -- DMaap
@@ -53,21 +74,30 @@ insert into fn_role values(1007,'Standard User','Y',1,5,16); -- Policy
 insert into fn_role values(1008,'System Administrator','Y',1,6,999); -- VID
 insert into fn_role values(1009,'Standard User','Y',1,6,16); -- VID
 
+insert into fn_role values(1011,'System Administrator','Y',1,7,999); -- AAI UI
+insert into fn_role values(1012,'Standard User','Y',1,7,16); -- AAI UI
 
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1000,NULL,2);
-Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1001,NULL,2);
 
+INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1000,NULL,2);
+INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1001,NULL,2);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1002,NULL,3);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1004,NULL,4);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1006,NULL,5);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (1,1008,NULL,6);
+
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (3,1004,NULL,4);
+
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (4,1004,NULL,4);
+
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (9,999,NULL,1);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (9,1008,NULL,6);
+
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (10,1008,NULL,6);
 INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (10,1009,NULL,6);
 
+INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (12,1011,NULL,7);
+INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (12,1012,NULL,7);
+
 -- new 1610.2
 -- Ignore errors if the application is not onboarded in this environment
 
@@ -75,7 +105,7 @@ INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url
        (select min(app_id) from fn_app where app_name like "%SDC%" and enabled = "Y"),
        "SDC Team","sdc@lists.openecomp.org","",NULL,
        "Service Design and Creation (SDC).");
- INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
+INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
        (select min(app_id) from fn_app where app_name like "%Policy%"),
        "Policy Team","policy@lists.openecomp.org","",NULL, 
        "Policy.");
@@ -91,6 +121,14 @@ INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url
        (select min(app_id) from fn_app where app_name like "%Demo%"),
        "Portal Team","portal@lists.openecomp.org","",NULL,
        "Demo Application");
+INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
+       (select min(app_id) from fn_app where app_name like "%VID%"),
+       "Portal Team","portal@lists.openecomp.org","",NULL,
+       "VID Application");
+INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
+       (select min(app_id) from fn_app where app_name like "%AI UI%"),
+       "Portal Team","portal@lists.openecomp.org","",NULL,
+       "AAI UI Application");
 -- end new 1610.2
 
 --
@@ -281,7 +319,7 @@ select a.menu_id, b.app_id, b.role_id from
 select a.menu_id from fn_menu_functional a where url like  '%vid%' 
 ) a,
 (
-select * from fn_role where app_id = (select app_id from fn_app where app_name = 'Virtual Infrastructure Deployment')
+select * from fn_role where app_id = (select app_id from fn_app where app_name like 'Virtual%')
 ) b 
 );
 
@@ -307,14 +345,4 @@ select * from fn_role where app_id = (select app_id from fn_app where app_name =
 ) b 
 );
 -- end new
-
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (6,'NEWS','http://about.att.com/innovationblog/next_att_labs','What\s Next at AT&T Labs? AI Set to Revolutionize the Network',NULL,NULL,10);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (7,'NEWS','http://about.att.com/innovationblog/ecomp_code','Code, Community and Commitment â€“ the 3 Cs of Open Source',NULL,NULL,20);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (8,'NEWS','http://about.att.com/story/orange_testing_att_open_source_ecomp_platform.html','Orange Testing AT&Ts Open Source ECOMP Platform for Building Software-Defined Network Capabilities',NULL,NULL,30);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (9,'NEWS', 'http://about.att.com/innovationblog/linux_foundation','Opening up ECOMP: Our Network Operating System for SDN',NULL,NULL,40);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (10,'EVENTS',NULL,'OpenECOMP Launches into Open Source',NULL,'2017-02-14',1);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (11,'IMPORTANTRESOURCES','http://about.att.com/content/dam/snrdocs/ecomp.pdf','ECOMP White Paper',NULL,NULL,1);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (12,'IMPORTANTRESOURCES','https://openecomp.atlassian.net/wiki/display/DW/Developer+Wiki+for+OpenECOMP','OpenECOMP Wiki',NULL,NULL,2);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (13,'IMPORTANTRESOURCES','https://openecomp.atlassian.net/wiki/display/DW/Portal+and+Dashboard','OpenECOMP Wiki, Portal',NULL,NULL,3);
-INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (14,'IMPORTANTRESOURCES','https://openecomp.atlassian.net/wiki/display/DW/Portal+and+Dashboard','OpenECOMP User Guide',NULL,NULL,4);
-
+commit;
index f6fb5c4..871637f 100644 (file)
@@ -24,5 +24,5 @@ ADD ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1707_OS.sql docker-entrypoint-initdb.d/Ec
 ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDMLMySql_1707_Common.sql docker-entrypoint-initdb.d/EcompSdkDMLMySql_1707_Common.sql
 ADD ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1707_OS.sql docker-entrypoint-initdb.d/EcompSdkDMLMySql_1707_OS.sql
 
-#ADD ${DBC_COMMON_SCRIPT_DIR}/dbca-ddl-mysql-1707-common.sql docker-entrypoint-initdb.d/dbca-ddl-mysql-1707-common.sql
-#ADD ${DBC_SCRIPT_DIR}/dbca-dml-mysql-1707-os.sql docker-entrypoint-initdb.d/dbca-dml-mysql-1707-os.sql
+# This file was built by os_build_febe.sh
+ADD ${DBC_SCRIPT_DIR}/dbca-complete-mysql-1707-os.sql docker-entrypoint-initdb.d/dbca-complete-mysql-1707-os.sql
index 7f6fc4c..a87831a 100644 (file)
@@ -76,6 +76,10 @@ cd dbca-os/target
 
 mv  dmaap-bc-app-os-1.1.0-SNAPSHOT ep-dbc-app
 
+# Build complete database script in the "OS" script area
+cd ../db-scripts
+cat dbca-create-mysql-1707-os.sql ../../dbca-common/db-scripts/dbca-ddl-mysql-1707-common.sql dbca-dml-mysql-1707-os.sql > dbca-complete-mysql-1707-os.sql
+
 
 # install into docker
 cd $CURRENTDIR
diff --git a/deliveries/widget_ms_start.sh b/deliveries/widget_ms_start.sh
new file mode 100755 (executable)
index 0000000..8405fe9
--- /dev/null
@@ -0,0 +1,4 @@
+APP_PROPERTY_LOCATION=/tmp/application.properties
+echo "Starting ecomp-portal-widget-ms image in a new container !!!"
+docker run -d --name "ecomp-portal-widget-ms" -p 8083:8082 -v $APP_PROPERTY_LOCATION:/application.properties ecompportal-widget-ms
+
diff --git a/deliveries/widget_ms_stop.sh b/deliveries/widget_ms_stop.sh
new file mode 100755 (executable)
index 0000000..8c9abf5
--- /dev/null
@@ -0,0 +1,5 @@
+echo "Stopping ecomp-portal-widget-ms container !!!"
+docker stop ecomp-portal-widget-ms
+echo "Removing docker image portal-widget-ms !!!"
+docker rm ecomp-portal-widget-ms
+
diff --git a/ecomp-portal-BE-common-test/.classpath b/ecomp-portal-BE-common-test/.classpath
deleted file mode 100644 (file)
index 3553992..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
-       <classpathentry kind="src" output="target/classes" path="src/main/java">\r
-               <attributes>\r
-                       <attribute name="optional" value="true"/>\r
-                       <attribute name="maven.pomderived" value="true"/>\r
-               </attributes>\r
-       </classpathentry>\r
-       <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">\r
-               <attributes>\r
-                       <attribute name="maven.pomderived" value="true"/>\r
-               </attributes>\r
-       </classpathentry>\r
-       <classpathentry kind="src" output="target/test-classes" path="src/test/java">\r
-               <attributes>\r
-                       <attribute name="optional" value="true"/>\r
-                       <attribute name="maven.pomderived" value="true"/>\r
-               </attributes>\r
-       </classpathentry>\r
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">\r
-               <attributes>\r
-                       <attribute name="maven.pomderived" value="true"/>\r
-               </attributes>\r
-       </classpathentry>\r
-       <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">\r
-               <attributes>\r
-                       <attribute name="maven.pomderived" value="true"/>\r
-               </attributes>\r
-       </classpathentry>\r
-       <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
index 95194ce..6b3b3ef 100644 (file)
@@ -1,3 +1,7 @@
+/.classpath
+/.project
+/.settings/
+/bin/
 /java/
 /debug/
 /debug/logs/
diff --git a/ecomp-portal-BE-common-test/.project b/ecomp-portal-BE-common-test/.project
deleted file mode 100644 (file)
index 5805bbf..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<projectDescription>\r
-       <name>ecomp-portal-BE-common-test</name>\r
-       <comment></comment>\r
-       <projects>\r
-       </projects>\r
-       <buildSpec>\r
-               <buildCommand>\r
-                       <name>org.eclipse.jdt.core.javabuilder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-               <buildCommand>\r
-                       <name>org.eclipse.m2e.core.maven2Builder</name>\r
-                       <arguments>\r
-                       </arguments>\r
-               </buildCommand>\r
-       </buildSpec>\r
-       <natures>\r
-               <nature>org.eclipse.jdt.core.javanature</nature>\r
-               <nature>org.eclipse.m2e.core.maven2Nature</nature>\r
-       </natures>\r
-</projectDescription>\r
diff --git a/ecomp-portal-BE-common-test/.settings/org.eclipse.core.resources.prefs b/ecomp-portal-BE-common-test/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index cf6931b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-eclipse.preferences.version=1\r
-encoding//src/main/java=UTF-8\r
-encoding//src/main/resources=UTF-8\r
-encoding/<project>=UTF-8\r
diff --git a/ecomp-portal-BE-common-test/.settings/org.eclipse.jdt.core.prefs b/ecomp-portal-BE-common-test/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index d59e09c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1\r
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8\r
-org.eclipse.jdt.core.compiler.compliance=1.8\r
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning\r
-org.eclipse.jdt.core.compiler.source=1.8\r
index 30308e7..fb0ed2e 100644 (file)
@@ -1,28 +1,10 @@
-# ECOMP Portal Web Application Back End for AT&T Internal Use
-
 ## Overview
 
 This is a Maven project with the ECOMP Portal web application back-end test files 
-for internal use, containing test cases for  controllers, interceptors and other Java classes
-for the AT&T version. This project uses the Maven war plugin to copy in ("overlay")
-the contents of the ECOMP Portal web application back-end common distribution at
-package time. 
-
-Use Apache Maven to build.
-
-For more information please visit:
-
-       https://wiki.web.att.com/display/EcompPortal/ECOMP+Portal+Home
+containing test cases for  controllers, interceptors and other Java
+classes.  Use Apache Maven to build.
 
 ## Release Notes
 
-This file tracks all changes to AT&T-specific versions, including back-end *and*
-All of the release notes in the ecomp-portal-BE-common-test area apply.
-
-
--US874768 Created a new project to have common junit test cases which can be run from ecomp-portal-BE-att
-  -Created PopulateTestData.sql and RemoveTestData.sql to populate and rollback the test data
-  -Created Coomon configuration files ApplicationCommonContextTestSuite and MockitoTestSuite
-    which can be extended from respective test classes.
-  -Added Test cases for AppCatalogController  
-
+Version 1.1.0, July 2017
+- Initial release
index 8d38f3b..a2090cf 100644 (file)
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-\r
-       <groupId>org.openecomp.portal</groupId>\r
-       <artifactId>ecomp-portal-BE-common-test</artifactId>\r
-       <version>1.1.0-SNAPSHOT</version>\r
-       <packaging>jar</packaging>\r
-\r
-       <name>ecomp-portal-BE-common-test</name>\r
-       <url>http://maven.apache.org</url>\r
-\r
-       <properties>\r
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
-               <!-- <skipTests>true</skipTests> -->\r
-               <sonar.exclusions>**.js</sonar.exclusions>\r
-       </properties>\r
-\r
-       <build>\r
-               <sourceDirectory>src/main/java</sourceDirectory>\r
-               <!-- The war file name carries no version number -->\r
-               <finalName>${project.artifactId}</finalName>\r
-               <plugins>\r
-                       <plugin>\r
-                               <artifactId>maven-compiler-plugin</artifactId>\r
-                               <version>3.1</version>\r
-                               <configuration>\r
-                                       <source>1.8</source>\r
-                                       <target>1.8</target>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <plugin>\r
-                               <artifactId>maven-war-plugin</artifactId>\r
-                               <version>2.6</version>\r
-                               <configuration>\r
-                                       <skipTests>true</skipTests>\r
-                                       <failOnMissingWebXml>false</failOnMissingWebXml>\r
-                                       <archive>\r
-                                               <manifest>\r
-                                                       <addDefaultImplementationEntries>true</addDefaultImplementationEntries>\r
-                                               </manifest>\r
-                                               <manifestEntries>\r
-                                                       <Build-Number>${project.version}.${build.number}</Build-Number>\r
-                                                       <Build-Time>${maven.build.timestamp}</Build-Time>\r
-                                               </manifestEntries>\r
-                                       </archive>\r
-                                       <overlays>\r
-                                               <!-- specify the order in which these should be applied -->\r
-                                               <overlay>\r
-                                                       <groupId>org.openecomp.portal</groupId>\r
-                                                       <artifactId>ecompportal-be-common</artifactId>\r
-                                               </overlay>\r
-                                       </overlays>\r
-                               </configuration>\r
-                       </plugin>\r
-                       <!--\r
-                       <plugin>\r
-                           <groupId>org.codehaus.mojo</groupId>\r
-                           <artifactId>license-maven-plugin</artifactId>\r
-                           <version>1.10</version>\r
-                           <configuration>\r
-                             <encoding>UTF-8</encoding>\r
-                               <licenseName>my_license</licenseName>\r
-                               <licenseResolver>${project.baseUri}/license</licenseResolver>\r
-                               <inceptionYear>2017</inceptionYear>\r
-                               <organizationName>AT&amp;T Intellectual Property</organizationName>\r
-                               <projectName>ECOMP Portal</projectName> \r
-                               <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> \r
-                               <processStartTag>================================================================================</processStartTag>\r
-                               <sectionDelimiter>================================================================================</sectionDelimiter>\r
-                               <processEndTag>================================================================================</processEndTag> \r
-                               <roots>\r
-                                       <root>src/main</root>\r
-                                       <root>src/test</root>\r
-                               </roots>\r
-                               <excludes>\r
-                                       <exclude>*.png</exclude>\r
-                                       <exclude>*.drl</exclude>\r
-                                       <exclude>*.gif</exclude>\r
-                                       <exclude>*.jpeg</exclude>\r
-                                       <exclude>*.jpg</exclude>\r
-                                       <exclude>*.bmp</exclude>\r
-                                       <exclude>*.ico</exclude>\r
-                                       <exclude>*.svg</exclude>\r
-                               </excludes>\r
-                           </configuration>\r
-                           <executions>\r
-                               <execution>\r
-                                   <id>first</id>\r
-                                   <goals>\r
-                                       <goal>update-file-header</goal>\r
-                                   </goals>\r
-                                   <phase>process-sources</phase>\r
-                               </execution>\r
-                           </executions>\r
-                       </plugin>\r
-                       -->\r
-               </plugins>\r
-\r
-               <resources>\r
-                       <resource>\r
-                               <directory>src/test/java</directory>\r
-                               <includes>\r
-                                       <include>**/*Test*.*</include>\r
-                               </includes>\r
-                       </resource>\r
-                       <resource>\r
-                               <directory>src/main/resources</directory>\r
-                               <includes>\r
-                                       <include>**/**</include>\r
-                               </includes>\r
-                       </resource>\r
-               </resources>\r
-       </build>\r
-\r
-       <dependencies>\r
-               <dependency>\r
-                       <groupId>junit</groupId>\r
-                       <artifactId>junit</artifactId>\r
-                       <version>4.11</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.powermock</groupId>\r
-                       <artifactId>powermock-api-mockito</artifactId>\r
-                       <version>1.6.1</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.powermock</groupId>\r
-                       <artifactId>powermock-core</artifactId>\r
-                       <version>1.6.1</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.powermock</groupId>\r
-                       <artifactId>powermock-module-junit4</artifactId>\r
-                       <version>1.6.1</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.mockito</groupId>\r
-                       <artifactId>mockito-core</artifactId>\r
-                       <version>1.8.5</version>\r
-               </dependency>\r
-               <dependency>\r
-                       <groupId>org.openecomp.portal</groupId>\r
-                       <artifactId>ecompportal-be-common</artifactId>\r
-                       <version>${project.version}</version>\r
-                       <type>jar</type>\r
-                       <classifier>classes</classifier>\r
-               </dependency>\r
-       </dependencies>\r
-\r
-</project>\r
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <groupId>org.openecomp.portal</groupId>
+       <artifactId>ecomp-portal-BE-common-test</artifactId>
+       <version>1.1.0-SNAPSHOT</version>
+       <packaging>jar</packaging>
+       <name>ecompportal-be-common-test</name>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <!-- <skipTests>true</skipTests> -->
+               <sonar.exclusions>**.js</sonar.exclusions>
+       </properties>
+
+       <build>
+               <sourceDirectory>src/main/java</sourceDirectory>
+               <!-- The war file name carries no version number -->
+               <finalName>${project.artifactId}</finalName>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-compiler-plugin</artifactId>
+                               <version>3.1</version>
+                               <configuration>
+                                       <source>1.8</source>
+                                       <target>1.8</target>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <artifactId>maven-war-plugin</artifactId>
+                               <version>2.6</version>
+                               <configuration>
+                                       <skipTests>true</skipTests>
+                                       <failOnMissingWebXml>false</failOnMissingWebXml>
+                                       <archive>
+                                               <manifest>
+                                                       <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                                               </manifest>
+                                               <manifestEntries>
+                                                       <Build-Number>${project.version}.${build.number}</Build-Number>
+                                                       <Build-Time>${maven.build.timestamp}</Build-Time>
+                                               </manifestEntries>
+                                       </archive>
+                                       <overlays>
+                                               <!-- specify the order in which these should be applied -->
+                                               <overlay>
+                                                       <groupId>org.openecomp.portal</groupId>
+                                                       <artifactId>ecompportal-be-common</artifactId>
+                                               </overlay>
+                                       </overlays>
+                               </configuration>
+                       </plugin>
+                       <!--
+                       <plugin>
+                           <groupId>org.codehaus.mojo</groupId>
+                           <artifactId>license-maven-plugin</artifactId>
+                           <version>1.10</version>
+                           <configuration>
+                             <encoding>UTF-8</encoding>
+                               <licenseName>my_license</licenseName>
+                               <licenseResolver>${project.baseUri}/license</licenseResolver>
+                               <inceptionYear>2017</inceptionYear>
+                               <organizationName>AT&amp;T Intellectual Property</organizationName>
+                               <projectName>ECOMP Portal</projectName> 
+                               <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> 
+                               <processStartTag>================================================================================</processStartTag>
+                               <sectionDelimiter>================================================================================</sectionDelimiter>
+                               <processEndTag>================================================================================</processEndTag> 
+                               <roots>
+                                       <root>src/main</root>
+                                       <root>src/test</root>
+                               </roots>
+                               <excludes>
+                                       <exclude>*.png</exclude>
+                                       <exclude>*.drl</exclude>
+                                       <exclude>*.gif</exclude>
+                                       <exclude>*.jpeg</exclude>
+                                       <exclude>*.jpg</exclude>
+                                       <exclude>*.bmp</exclude>
+                                       <exclude>*.ico</exclude>
+                                       <exclude>*.svg</exclude>
+                               </excludes>
+                           </configuration>
+                           <executions>
+                               <execution>
+                                   <id>first</id>
+                                   <goals>
+                                       <goal>update-file-header</goal>
+                                   </goals>
+                                   <phase>process-sources</phase>
+                               </execution>
+                           </executions>
+                       </plugin>
+                       -->
+               </plugins>
+
+               <resources>
+                       <resource>
+                               <directory>src/test/java</directory>
+                               <includes>
+                                       <include>**/*Test*.*</include>
+                               </includes>
+                       </resource>
+                       <resource>
+                               <directory>src/main/resources</directory>
+                               <includes>
+                                       <include>**/**</include>
+                               </includes>
+                       </resource>
+               </resources>
+       </build>
+
+       <dependencies>
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.11</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.powermock</groupId>
+                       <artifactId>powermock-api-mockito</artifactId>
+                       <version>1.6.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.powermock</groupId>
+                       <artifactId>powermock-core</artifactId>
+                       <version>1.6.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.powermock</groupId>
+                       <artifactId>powermock-module-junit4</artifactId>
+                       <version>1.6.1</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.mockito</groupId>
+                       <artifactId>mockito-core</artifactId>
+                       <version>1.8.5</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.openecomp.portal</groupId>
+                       <artifactId>ecompportal-be-common</artifactId>
+                       <version>${project.version}</version>
+                       <type>jar</type>
+                       <classifier>classes</classifier>
+               </dependency>
+       </dependencies>
+
+</project>
index 4e2b842..23cb7a4 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.controller;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertNull;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-import javax.servlet.http.HttpSession;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.InjectMocks;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.MockitoAnnotations;\r
-import org.openecomp.portalapp.portal.controller.AppCatalogController;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;\r
-import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;\r
-import org.openecomp.portalapp.portal.service.EPAppService;\r
-import org.openecomp.portalapp.portal.service.PersUserAppService;\r
-import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;\r
-import org.openecomp.portalapp.portal.test.core.MockEPUser;\r
-import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;\r
-import org.openecomp.portalapp.portal.transport.AppCatalogPersonalization;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-\r
-public class AppCatalogControllerTest extends MockitoTestSuite {\r
-\r
-       @Mock\r
-       AdminRolesService adminRolesService = new AdminRolesServiceImpl();\r
-\r
-       @Mock\r
-       EPAppService appService = new EPAppCommonServiceImpl();\r
-\r
-       @InjectMocks\r
-       AppCatalogController appCatalogController = new AppCatalogController();\r
-\r
-       PersUserAppService persUserAppService = Mockito.spy(new PersUserAppServiceImpl());\r
-\r
-       @Before\r
-       public void setup() {\r
-               MockitoAnnotations.initMocks(this);\r
-       }\r
-\r
-       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();\r
-\r
-       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();\r
-       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();\r
-\r
-       @Mock\r
-       EPUserUtils ePUserUtils = new EPUserUtils();\r
-\r
-       @Mock\r
-       EPUser epuser;\r
-\r
-       NullPointerException nullPointerException = new NullPointerException();\r
-\r
-       MockEPUser mockUser = new MockEPUser();\r
-\r
-       public AppCatalogItem mockAppCatalogItem() {\r
-               AppCatalogItem appCatalogItem = new AppCatalogItem();\r
-               appCatalogItem.setId((long) 1);\r
-               appCatalogItem.setName("Ecomp Portal");\r
-               appCatalogItem.setImageUrl("Test_URL");\r
-               appCatalogItem.setDescription("Testing");\r
-               appCatalogItem.setNotes("Test");\r
-               appCatalogItem.setUrl("test");\r
-               appCatalogItem.setAlternateUrl("test");\r
-               appCatalogItem.setRestricted(false);\r
-               appCatalogItem.setOpen(false);\r
-               appCatalogItem.setAccess(true);\r
-               appCatalogItem.setSelect(true);\r
-               appCatalogItem.setPending(false);\r
-\r
-               return appCatalogItem;\r
-       }\r
-\r
-       @Test\r
-       public void getAppCatalogTestIfUserNotAdmin() throws IOException {\r
-               EPUser user = mockUser.mockEPUser();\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               List<AppCatalogItem> actualAppCatalogList = null;\r
-\r
-               List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();\r
-\r
-               AppCatalogItem appCatalogItem = mockAppCatalogItem();\r
-               expectedAppCatalog.add(appCatalogItem);\r
-               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);\r
-               Mockito.when(appService.getUserAppCatalog(user)).thenReturn(expectedAppCatalog);\r
-               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);\r
-\r
-               assertTrue(actualAppCatalogList.contains(appCatalogItem));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppCatalogTestIfUserIsAdmin() throws IOException {\r
-               EPUser user = mockUser.mockEPUser();\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               List<AppCatalogItem> actualAppCatalogList = null;\r
-\r
-               List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();\r
-\r
-               AppCatalogItem appCatalogItem = mockAppCatalogItem();\r
-\r
-               expectedAppCatalog.add(appCatalogItem);\r
-               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);\r
-               Mockito.when(appService.getAdminAppCatalog(user)).thenReturn(expectedAppCatalog);\r
-               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);\r
-\r
-               assertTrue(actualAppCatalogList.contains(appCatalogItem));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppCatalogTestIfUserisNull() throws IOException {\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);\r
-               List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();\r
-               ;\r
-               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);\r
-               assertNull(actualAppCatalogList);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppCatalogTestIfUserThrowsExceptionTest() throws IOException {\r
-               EPUser user = new EPUser();\r
-               user.setFirstName("test");\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();\r
-               ;\r
-\r
-               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);\r
-\r
-               Mockito.when(appCatalogController.getAppCatalog(mockedRequest, mockedResponse)).thenThrow(nullPointerException);\r
-\r
-               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);\r
-               assertNull(actualAppCatalogList);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void putAppCatalogSelectionTestWhenAppIsNull() throws IOException {\r
-\r
-               AppCatalogPersonalization persRequest = new AppCatalogPersonalization();\r
-               persRequest.setAppId((long) 1);\r
-               persRequest.setPending(false);\r
-               persRequest.setSelect(false);\r
-\r
-               EPUser user = mockUser.mockEPUser();\r
-\r
-               FieldsValidator expectedFieldValidator = new FieldsValidator();\r
-\r
-               FieldsValidator actualFieldValidator = new FieldsValidator();\r
-               List<FieldName> fields = new ArrayList<>();\r
-               ;\r
-\r
-               expectedFieldValidator.setHttpStatusCode((long) 200);\r
-               expectedFieldValidator.setFields(fields);\r
-               expectedFieldValidator.setErrorCode(null);\r
-\r
-               EPApp app = null;\r
-\r
-               Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);\r
-\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);\r
-               assertEquals(expectedFieldValidator, actualFieldValidator);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void putAppCatalogSelectionTest() throws IOException {\r
-\r
-               AppCatalogPersonalization persRequest = new AppCatalogPersonalization();\r
-               persRequest.setAppId((long) 1);\r
-               persRequest.setPending(false);\r
-               persRequest.setSelect(false);\r
-\r
-               EPUser user = mockUser.mockEPUser();\r
-\r
-               FieldsValidator expectedFieldValidator = new FieldsValidator();\r
-\r
-               FieldsValidator actualFieldValidator = new FieldsValidator();\r
-               List<FieldName> fields = new ArrayList<>();\r
-               ;\r
-\r
-               expectedFieldValidator.setHttpStatusCode((long) 200);\r
-               expectedFieldValidator.setFields(fields);\r
-               expectedFieldValidator.setErrorCode(null);\r
-\r
-               EPApp app = new EPApp();\r
-\r
-               app.setName("Test");\r
-               app.setImageUrl("test");\r
-               app.setDescription("test");\r
-               app.setNotes("test");\r
-               app.setUrl("test");\r
-               app.setId((long) 1);\r
-               app.setAppRestEndpoint("test");\r
-               app.setAlternateUrl("test");\r
-               app.setName("test");\r
-               app.setMlAppName("test");\r
-               app.setMlAppAdminId("test");\r
-               app.setUsername("test");\r
-               app.setAppPassword("test");\r
-               app.setOpen(false);\r
-               app.setEnabled(false);\r
-               app.setUebKey("test");\r
-               app.setUebSecret("test");\r
-               app.setUebTopicName("test");\r
-               app.setAppType(1);\r
-\r
-               Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);\r
-\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               Mockito.doNothing().when(persUserAppService).setPersUserAppValue(user, app, persRequest.getSelect(),\r
-                               persRequest.getPending());\r
-\r
-               actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);\r
-\r
-               assertEquals(expectedFieldValidator, actualFieldValidator);\r
-\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.AppCatalogController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PersUserAppService;
+import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.AppCatalogPersonalization;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+public class AppCatalogControllerTest extends MockitoTestSuite {
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+       @Mock
+       EPAppService appService = new EPAppCommonServiceImpl();
+
+       @InjectMocks
+       AppCatalogController appCatalogController = new AppCatalogController();
+
+       PersUserAppService persUserAppService = Mockito.spy(new PersUserAppServiceImpl());
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       @Mock
+       EPUser epuser;
+
+       NullPointerException nullPointerException = new NullPointerException();
+
+       MockEPUser mockUser = new MockEPUser();
+
+       public AppCatalogItem mockAppCatalogItem() {
+               AppCatalogItem appCatalogItem = new AppCatalogItem();
+               appCatalogItem.setId((long) 1);
+               appCatalogItem.setName("Ecomp Portal");
+               appCatalogItem.setImageUrl("Test_URL");
+               appCatalogItem.setDescription("Testing");
+               appCatalogItem.setNotes("Test");
+               appCatalogItem.setUrl("test");
+               appCatalogItem.setAlternateUrl("test");
+               appCatalogItem.setRestricted(false);
+               appCatalogItem.setOpen(false);
+               appCatalogItem.setAccess(true);
+               appCatalogItem.setSelect(true);
+               appCatalogItem.setPending(false);
+
+               return appCatalogItem;
+       }
+
+       @Test
+       public void getAppCatalogTestIfUserNotAdmin() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppCatalogItem> actualAppCatalogList = null;
+
+               List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();
+
+               AppCatalogItem appCatalogItem = mockAppCatalogItem();
+               expectedAppCatalog.add(appCatalogItem);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(appService.getUserAppCatalog(user)).thenReturn(expectedAppCatalog);
+               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+
+               assertTrue(actualAppCatalogList.contains(appCatalogItem));
+
+       }
+
+       @Test
+       public void getAppCatalogTestIfUserIsAdmin() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppCatalogItem> actualAppCatalogList = null;
+
+               List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();
+
+               AppCatalogItem appCatalogItem = mockAppCatalogItem();
+
+               expectedAppCatalog.add(appCatalogItem);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAdminAppCatalog(user)).thenReturn(expectedAppCatalog);
+               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+
+               assertTrue(actualAppCatalogList.contains(appCatalogItem));
+
+       }
+
+       @Test
+       public void getAppCatalogTestIfUserisNull() throws IOException {
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+               List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();
+               ;
+               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+               assertNull(actualAppCatalogList);
+
+       }
+
+       @Test
+       public void getAppCatalogTestIfUserThrowsExceptionTest() throws IOException {
+               EPUser user = new EPUser();
+               user.setFirstName("test");
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();
+               ;
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+               Mockito.when(appCatalogController.getAppCatalog(mockedRequest, mockedResponse)).thenThrow(nullPointerException);
+
+               actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+               assertNull(actualAppCatalogList);
+
+       }
+
+       @Test
+       public void putAppCatalogSelectionTestWhenAppIsNull() throws IOException {
+
+               AppCatalogPersonalization persRequest = new AppCatalogPersonalization();
+               persRequest.setAppId((long) 1);
+               persRequest.setPending(false);
+               persRequest.setSelect(false);
+
+               EPUser user = mockUser.mockEPUser();
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               List<FieldName> fields = new ArrayList<>();
+               ;
+
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(fields);
+               expectedFieldValidator.setErrorCode(null);
+
+               EPApp app = null;
+
+               Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);
+
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);
+               assertEquals(expectedFieldValidator, actualFieldValidator);
+
+       }
+
+       @Test
+       public void putAppCatalogSelectionTest() throws IOException {
+
+               AppCatalogPersonalization persRequest = new AppCatalogPersonalization();
+               persRequest.setAppId((long) 1);
+               persRequest.setPending(false);
+               persRequest.setSelect(false);
+
+               EPUser user = mockUser.mockEPUser();
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               List<FieldName> fields = new ArrayList<>();
+               ;
+
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(fields);
+               expectedFieldValidator.setErrorCode(null);
+
+               EPApp app = new EPApp();
+
+               app.setName("Test");
+               app.setImageUrl("test");
+               app.setDescription("test");
+               app.setNotes("test");
+               app.setUrl("test");
+               app.setId((long) 1);
+               app.setAppRestEndpoint("test");
+               app.setAlternateUrl("test");
+               app.setName("test");
+               app.setMlAppName("test");
+               app.setMlAppAdminId("test");
+               app.setUsername("test");
+               app.setAppPassword("test");
+               app.setOpen(false);
+               app.setEnabled(false);
+               app.setUebKey("test");
+               app.setUebSecret("test");
+               app.setUebTopicName("test");
+               app.setAppType(1);
+
+               Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);
+
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.doNothing().when(persUserAppService).setPersUserAppValue(user, app, persRequest.getSelect(),
+                               persRequest.getPending());
+
+               actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);
+
+               assertEquals(expectedFieldValidator, actualFieldValidator);
+
+       }
+
+}
index 9b2add8..12334d8 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.controller;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.InjectMocks;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.MockitoAnnotations;\r
-import org.openecomp.portalapp.portal.controller.AppContactUsController;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.service.AppContactUsService;\r
-import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;\r
-import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-\r
-public class AppContactUsControllerTest {\r
-\r
-       @Mock\r
-       AppContactUsService contactUsService = new AppContactUsServiceImpl();\r
-\r
-       @InjectMocks\r
-       AppContactUsController appContactUsController = new AppContactUsController();\r
-\r
-       @Before\r
-       public void setup() {\r
-               MockitoAnnotations.initMocks(this);\r
-       }\r
-\r
-       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();\r
-\r
-       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();\r
-       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();\r
-       NullPointerException nullPointerException = new NullPointerException();\r
-\r
-       @Mock\r
-       EPUserUtils ePUserUtils = new EPUserUtils();\r
-\r
-       public List<AppContactUsItem> mockResponse() {\r
-               List<AppContactUsItem> appContactUsItemList = new ArrayList<AppContactUsItem>();\r
-               AppContactUsItem appContactUsItem = new AppContactUsItem();\r
-               appContactUsItem.setAppId((long) 1);\r
-               appContactUsItem.setAppName("Ecmop Portal");\r
-               appContactUsItem.setDescription("Test");\r
-               appContactUsItem.setContactName("Test");\r
-               appContactUsItem.setContactEmail("Test@att.com");\r
-               appContactUsItem.setUrl("Test_URL");\r
-               appContactUsItem.setActiveYN("Y");\r
-               appContactUsItemList.add(appContactUsItem);\r
-\r
-               return appContactUsItemList;\r
-\r
-       }\r
-\r
-       public PortalRestResponse<List<AppContactUsItem>> successPortalRestResponse() {\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               List<AppContactUsItem> appContactUsItemList = mockResponse();\r
-               expectedportalRestResponse.setMessage("success");\r
-               expectedportalRestResponse.setResponse(appContactUsItemList);\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);\r
-               return expectedportalRestResponse;\r
-\r
-       }\r
-\r
-       public PortalRestResponse<List<AppContactUsItem>> exceptionPortalRestResponse() {\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               expectedportalRestResponse.setMessage(null);\r
-               expectedportalRestResponse.setResponse(null);\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);\r
-               return expectedportalRestResponse;\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppContactUsList() throws Exception {\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();\r
-               List<AppContactUsItem> appContactUsItemList = mockResponse();\r
-               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               Mockito.when(contactUsService.getAppContactUs()).thenReturn(appContactUsItemList);\r
-               actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);\r
-               assertEquals(actualPortalRestResponse, expectedportalRestResponse);\r
-       }\r
-\r
-       @Test\r
-       public void getAppContactUsListCatchesExeptionTest() throws Exception {\r
-\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();\r
-               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               Mockito.when(contactUsService.getAppContactUs()).thenThrow(nullPointerException);\r
-               actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);\r
-               assertEquals(actualPortalRestResponse, expectedportalRestResponse);\r
-       }\r
-\r
-       @Test\r
-       public void getAppsAndContactsTest() throws Exception {\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();\r
-               List<AppContactUsItem> appContactUsItemList = mockResponse();\r
-               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               Mockito.when(contactUsService.getAppsAndContacts()).thenReturn(appContactUsItemList);\r
-               actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);\r
-               assertEquals(actualPortalRestResponse, expectedportalRestResponse);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppsAndContactsCatchesExceptionTest() throws Exception {\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();\r
-               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();\r
-               Mockito.when(contactUsService.getAppsAndContacts()).thenThrow(nullPointerException);\r
-               actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);\r
-               assertEquals(actualPortalRestResponse, expectedportalRestResponse);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppCategoryFunctionsTest() throws Exception {\r
-               PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;\r
-\r
-               List<AppCategoryFunctionsItem> contents = new ArrayList<AppCategoryFunctionsItem>();\r
-\r
-               AppCategoryFunctionsItem appCategoryFunctionsItem = new AppCategoryFunctionsItem();\r
-               AppCategoryFunctionsItem appCategoryFunctionsItem1 = new AppCategoryFunctionsItem();\r
-\r
-               appCategoryFunctionsItem.setRowId("1");\r
-               appCategoryFunctionsItem.setAppId("1");\r
-               appCategoryFunctionsItem.setApplication("Ecomp-portal");\r
-               appCategoryFunctionsItem.setCategory("test");\r
-               appCategoryFunctionsItem.setFunctions("test");\r
-\r
-               appCategoryFunctionsItem1.setRowId("2");\r
-               appCategoryFunctionsItem1.setAppId("2");\r
-               appCategoryFunctionsItem1.setApplication("Ecomp-portal-test");\r
-               appCategoryFunctionsItem1.setCategory("test");\r
-               appCategoryFunctionsItem1.setFunctions("test");\r
-               contents.add(appCategoryFunctionsItem);\r
-               contents.add(appCategoryFunctionsItem1);\r
-\r
-               PortalRestResponse<List<AppCategoryFunctionsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppCategoryFunctionsItem>>();\r
-               expectedportalRestResponse.setMessage("success");\r
-               expectedportalRestResponse.setResponse(contents);\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);\r
-\r
-               Mockito.when(contactUsService.getAppCategoryFunctions()).thenReturn(contents);\r
-               actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);\r
-               assertEquals(actualportalRestResponse, expectedportalRestResponse);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppCategoryFunctionsCatchesExceptionTest() throws Exception {\r
-               PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;\r
-               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();\r
-               Mockito.when(contactUsService.getAppCategoryFunctions()).thenThrow(nullPointerException);\r
-               actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);\r
-               assertEquals(actualportalRestResponse, expectedportalRestResponse);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void saveTest() throws Exception {\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-\r
-               AppContactUsItem contactUs = new AppContactUsItem();\r
-               contactUs.setAppId((long) 1);\r
-               contactUs.setAppName("Ecmop Portal");\r
-               contactUs.setDescription("Test");\r
-               contactUs.setContactName("Test");\r
-               contactUs.setContactEmail("Test@att.com");\r
-               contactUs.setUrl("Test_URL");\r
-               contactUs.setActiveYN("Y");\r
-\r
-               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");\r
-               actualSaveAppContactUS = appContactUsController.save(contactUs);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");\r
-       }\r
-\r
-       @Test\r
-       public void saveExceptionTest() throws Exception {\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-\r
-               AppContactUsItem contactUs = new AppContactUsItem();\r
-               contactUs.setAppId((long) 1);\r
-               contactUs.setAppName("Ecmop Portal");\r
-               contactUs.setDescription("Test");\r
-               contactUs.setContactName("Test");\r
-               contactUs.setContactEmail("Test@att.com");\r
-               contactUs.setUrl("Test_URL");\r
-               contactUs.setActiveYN("Y");\r
-\r
-               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());\r
-               actualSaveAppContactUS = appContactUsController.save(contactUs);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "failure");\r
-       }\r
-\r
-       @Test\r
-       public void saveWhenAppContactUsItemNullTest() throws Exception {\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-               AppContactUsItem contactUs = null;\r
-               actualSaveAppContactUS = appContactUsController.save(contactUs);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "failure");\r
-\r
-       }\r
-\r
-       @Test\r
-       public void saveAllTest() throws Exception {\r
-\r
-               List<AppContactUsItem> contactUs = mockResponse();\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");\r
-               actualSaveAppContactUS = appContactUsController.save(contactUs);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");\r
-       }\r
-\r
-       @Test\r
-       public void saveAllExceptionTest() throws Exception {\r
-\r
-               List<AppContactUsItem> contactUs = mockResponse();\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());\r
-               actualSaveAppContactUS = appContactUsController.save(contactUs);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "failure");\r
-       }\r
-\r
-       @Test\r
-       public void deleteTest() throws Exception {\r
-\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-               Long id = (long) 1;\r
-               String saveAppContactUs = "SUCCESS";\r
-               Mockito.when(contactUsService.deleteContactUs(id)).thenReturn(saveAppContactUs);\r
-               actualSaveAppContactUS = appContactUsController.delete(id);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");\r
-       }\r
-\r
-       @Test\r
-       public void deleteExceptionTest() throws Exception {\r
-\r
-               PortalRestResponse<String> actualSaveAppContactUS = null;\r
-               Long id = (long) 1;\r
-               Mockito.when(contactUsService.deleteContactUs(id)).thenThrow(new Exception());\r
-               actualSaveAppContactUS = appContactUsController.delete(id);\r
-               assertEquals(actualSaveAppContactUS.getMessage(), "failure");\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.AppContactUsController;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AppContactUsService;
+import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppContactUsControllerTest extends MockitoTestSuite{
+
+       @Mock
+       AppContactUsService contactUsService = new AppContactUsServiceImpl();
+
+       @InjectMocks
+       AppContactUsController appContactUsController = new AppContactUsController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       public List<AppContactUsItem> mockResponse() {
+               List<AppContactUsItem> appContactUsItemList = new ArrayList<AppContactUsItem>();
+               AppContactUsItem appContactUsItem = new AppContactUsItem();
+               appContactUsItem.setAppId((long) 1);
+               appContactUsItem.setAppName("ECOMP Portal");
+               appContactUsItem.setDescription("Test");
+               appContactUsItem.setContactName("Test");
+               appContactUsItem.setContactEmail("person@onap.org");
+               appContactUsItem.setUrl("Test_URL");
+               appContactUsItem.setActiveYN("Y");
+               appContactUsItemList.add(appContactUsItem);
+
+               return appContactUsItemList;
+
+       }
+
+       public PortalRestResponse<List<AppContactUsItem>> successPortalRestResponse() {
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               List<AppContactUsItem> appContactUsItemList = mockResponse();
+               expectedportalRestResponse.setMessage("success");
+               expectedportalRestResponse.setResponse(appContactUsItemList);
+               expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               return expectedportalRestResponse;
+
+       }
+
+       public PortalRestResponse<List<AppContactUsItem>> exceptionPortalRestResponse() {
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               return expectedportalRestResponse;
+
+       }
+
+       @Test
+       public void getAppContactUsList() throws Exception {
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();
+               List<AppContactUsItem> appContactUsItemList = mockResponse();
+               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               Mockito.when(contactUsService.getAppContactUs()).thenReturn(appContactUsItemList);
+               actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void getAppContactUsListCatchesExeptionTest() throws Exception {
+
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               Mockito.when(contactUsService.getAppContactUs()).thenThrow(nullPointerException);
+               actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void getAppsAndContactsTest() throws Exception {
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();
+               List<AppContactUsItem> appContactUsItemList = mockResponse();
+               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               Mockito.when(contactUsService.getAppsAndContacts()).thenReturn(appContactUsItemList);
+               actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void getAppsAndContactsCatchesExceptionTest() throws Exception {
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+               PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+               Mockito.when(contactUsService.getAppsAndContacts()).thenThrow(nullPointerException);
+               actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void getAppCategoryFunctionsTest() throws Exception {
+               PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;
+
+               List<AppCategoryFunctionsItem> contents = new ArrayList<AppCategoryFunctionsItem>();
+
+               AppCategoryFunctionsItem appCategoryFunctionsItem = new AppCategoryFunctionsItem();
+               AppCategoryFunctionsItem appCategoryFunctionsItem1 = new AppCategoryFunctionsItem();
+
+               appCategoryFunctionsItem.setRowId("1");
+               appCategoryFunctionsItem.setAppId("1");
+               appCategoryFunctionsItem.setApplication("Ecomp-portal");
+               appCategoryFunctionsItem.setCategory("test");
+               appCategoryFunctionsItem.setFunctions("test");
+
+               appCategoryFunctionsItem1.setRowId("2");
+               appCategoryFunctionsItem1.setAppId("2");
+               appCategoryFunctionsItem1.setApplication("Ecomp-portal-test");
+               appCategoryFunctionsItem1.setCategory("test");
+               appCategoryFunctionsItem1.setFunctions("test");
+               contents.add(appCategoryFunctionsItem);
+               contents.add(appCategoryFunctionsItem1);
+
+               PortalRestResponse<List<AppCategoryFunctionsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppCategoryFunctionsItem>>();
+               expectedportalRestResponse.setMessage("success");
+               expectedportalRestResponse.setResponse(contents);
+               expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+
+               Mockito.when(contactUsService.getAppCategoryFunctions()).thenReturn(contents);
+               actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void getAppCategoryFunctionsCatchesExceptionTest() throws Exception {
+               PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;
+               PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+               Mockito.when(contactUsService.getAppCategoryFunctions()).thenThrow(nullPointerException);
+               actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void saveTest() throws Exception {
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+
+               AppContactUsItem contactUs = new AppContactUsItem();
+               contactUs.setAppId((long) 1);
+               contactUs.setAppName("Ecomp Portal");
+               contactUs.setDescription("Test");
+               contactUs.setContactName("Test");
+               contactUs.setContactEmail("person@onap.org");
+               contactUs.setUrl("Test_URL");
+               contactUs.setActiveYN("Y");
+
+               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");
+               actualSaveAppContactUS = appContactUsController.save(contactUs);
+               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+       }
+
+       @Test
+       public void saveExceptionTest() throws Exception {
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+
+               AppContactUsItem contactUs = new AppContactUsItem();
+               contactUs.setAppId((long) 1);
+               contactUs.setAppName("Ecomp Portal");
+               contactUs.setDescription("Test");
+               contactUs.setContactName("Test");
+               contactUs.setContactEmail("person@onap.org");
+               contactUs.setUrl("Test_URL");
+               contactUs.setActiveYN("Y");
+
+               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());
+               actualSaveAppContactUS = appContactUsController.save(contactUs);
+               assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+       }
+
+       @Test
+       public void saveWhenAppContactUsItemNullTest() throws Exception {
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+               AppContactUsItem contactUs = null;
+               actualSaveAppContactUS = appContactUsController.save(contactUs);
+               assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+
+       }
+
+       @Test
+       public void saveAllTest() throws Exception {
+
+               List<AppContactUsItem> contactUs = mockResponse();
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");
+               actualSaveAppContactUS = appContactUsController.save(contactUs);
+               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+       }
+
+       @Test
+       public void saveAllExceptionTest() throws Exception {
+
+               List<AppContactUsItem> contactUs = mockResponse();
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+               Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());
+               actualSaveAppContactUS = appContactUsController.save(contactUs);
+               assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+       }
+
+       @Test
+       public void deleteTest() throws Exception {
+
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+               Long id = (long) 1;
+               String saveAppContactUs = "SUCCESS";
+               Mockito.when(contactUsService.deleteContactUs(id)).thenReturn(saveAppContactUs);
+               actualSaveAppContactUS = appContactUsController.delete(id);
+               assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+       }
+
+       @Test
+       public void deleteExceptionTest() throws Exception {
+
+               PortalRestResponse<String> actualSaveAppContactUS = null;
+               Long id = (long) 1;
+               Mockito.when(contactUsService.deleteContactUs(id)).thenThrow(new Exception());
+               actualSaveAppContactUS = appContactUsController.delete(id);
+               assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java
new file mode 100644 (file)
index 0000000..ae761a1
--- /dev/null
@@ -0,0 +1,503 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.AppsControllerExternalRequest;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.service.UserServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppsControllerExternalRequestTest extends MockitoTestSuite {
+
+       @Mock
+       AdminRolesService adminRolesService;
+
+       @Mock
+       EPAppService appService;
+
+       @Mock
+       PortalAdminService portalAdminService;
+
+       @Mock
+       UserService userService = new UserServiceImpl();
+
+       @InjectMocks
+       AppsControllerExternalRequest appsControllerExternalRequest = new AppsControllerExternalRequest();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       MockEPUser mockUser = new MockEPUser();
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       @Test
+       public void postPortalAdminIfUSerNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Missing required field: email, loginId, or loginPwd");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postPortalAdminTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("java.lang.NullPointerException");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               user.setLoginPwd("pwd");
+               user.setLoginId("Test");
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenThrow(nullPointerException);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postPortalAdminCreateUserIfNotFoundTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               user.setLoginPwd("pwd");
+               user.setLoginId("Test");
+               List<EPUser> expectedList = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+               Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postPortalAdminCreateUserIfFoundTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               user.setLoginPwd("pwd");
+               user.setLoginId("Test");
+               List<EPUser> expectedList = new ArrayList<EPUser>();
+               expectedList.add(user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+               Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postPortalAdminCreateUserIfNotSuperAdminTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               user.setLoginPwd("pwd");
+               user.setLoginId("Test");
+               List<EPUser> expectedList = new ArrayList<EPUser>();
+               expectedList.add(user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+               Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(portalAdminService.createPortalAdmin(user.getOrgUserId())).thenReturn(expectedFieldValidator);
+
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postPortalAdminCreateUserIfFieldValidatorErrorTest() throws Exception {
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 500);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               EPUser user = mockUser.mockEPUser();
+               user.setEmail("guestT@Research.att.com");
+               user.setLoginPwd("pwd");
+               user.setLoginId("Test");
+               List<EPUser> expectedList = new ArrayList<EPUser>();
+               expectedList.add(user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+               Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(portalAdminService.createPortalAdmin(user.getOrgUserId())).thenReturn(expectedFieldValidator);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postPortalAdmin(mockedRequest, mockedResponse, user);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void getOnboardAppExternalTest() {
+               EPApp epApp = new EPApp();
+               Long appId = (long) 1;
+               Mockito.when(appService.getApp(appId)).thenReturn(epApp);
+               OnboardingApp expectedApp = new OnboardingApp();
+               Mockito.doNothing().when(appService).createOnboardingFromApp(epApp, expectedApp);
+               OnboardingApp actualApp = appsControllerExternalRequest.getOnboardAppExternal(mockedRequest, mockedResponse,
+                               appId);
+               assertEquals(expectedApp.getClass(), actualApp.getClass());
+       }
+
+       @Test
+       public void postOnboardAppExternalExceptionTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Unexpected field: id");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void postOnboardAppExternalTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(
+                               "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void postOnboardAppExternalNotNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Failed to find user: Test_Owener");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(null);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void postOnboardAppExternalIfUSerListNotNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("User lacks Portal admin role: null");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void postOnboardAppExternalIfSuperAdminTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               Mockito.when(appService.addOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void postOnboardAppExternalFieldValidatorTestTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 500);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               Mockito.when(appService.addOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+       }
+
+       @Test
+       public void putOnboardAppExternalifAppNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Unexpected value for field: id");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Long appId = null;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = null;
+
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void putOnboardAppExternalIfOnboardingAppDetailsNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(
+                               "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Long appId = (long) 1;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void putOnboardAppExternalIfOnboardingIfUserListNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Failed to find user: Test_Owener");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Long appId = (long) 1;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void putOnboardAppExternalIfOnboardingIfUserListNotNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("User lacks Portal admin role: null");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Long appId = (long) 1;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void putOnboardAppExternalIfOnboardingIfSuperAdminTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               Long appId = (long) 1;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               Mockito.when(appService.modifyOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void putOnboardAppExternalIfOnboardingIfStatusNotSuccessTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Long appId = (long) 1;
+               OnboardingApp expectedOnboardingApp = new OnboardingApp();
+               expectedOnboardingApp.id = (long) 1;
+               expectedOnboardingApp.name = "Test";
+               expectedOnboardingApp.url = "Test";
+               expectedOnboardingApp.restUrl = "Test";
+               expectedOnboardingApp.myLoginsAppOwner = "Test_Owener";
+               expectedOnboardingApp.restrictedApp = false;
+               expectedOnboardingApp.isOpen = false;
+               expectedOnboardingApp.isEnabled = false;
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 500);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+
+               List<EPUser> userList = new ArrayList<EPUser>();
+               EPUser user = mockUser.mockEPUser();
+               userList.add(user);
+               Mockito.when(appService.modifyOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+               Mockito.when(userService.getUserByUserId(expectedOnboardingApp.myLoginsAppOwner)).thenReturn(userList);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+                               .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+               assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerTest.java
new file mode 100644 (file)
index 0000000..4b6849a
--- /dev/null
@@ -0,0 +1,914 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.AppsController;
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.openecomp.portalapp.portal.domain.AppsResponse;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.domain.UserRole;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.EPLeftMenuService;
+import org.openecomp.portalapp.portal.service.EPLeftMenuServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.LocalRole;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.MediaType;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class,AppUtils.class, EPUserUtils.class, MediaType.class})
+public class AppsControllerTest extends MockitoTestSuite{
+
+       @InjectMocks
+       AppsController appsController = new AppsController();
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+       @Mock
+       EPAppService appService = new EPAppCommonServiceImpl();
+
+       @Mock
+       EPLeftMenuService leftMenuService = new EPLeftMenuServiceImpl();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       @Mock
+       AppUtils appUtils = new AppUtils();
+
+       MockEPUser mockUser = new MockEPUser();
+
+       @Test
+       public void getUserAppsTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+               EcompApp ecompApp = new EcompApp();
+               ecompApp.setId((long) 1);
+               ecompApp.setName("Test_app");
+               ecompApp.setUrl("Test_URL");
+               ecompApp.setUebKey("Test_key");
+               ecompApp.setAlternateUrl("Test_alt_URL");
+               expectedEcompApps.add(ecompApp);
+               List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+               Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenReturn(expectedEcompApps);
+               actualEcompApps = appsController.getUserApps(mockedRequest, mockedResponse);
+               assertEquals(expectedEcompApps, actualEcompApps);
+       }
+
+       @Test
+       public void getUserAppsNoUserTest() {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenReturn(null);
+               assertNull(appsController.getUserApps(mockedRequest, mockedResponse));
+
+       }
+
+       @Test
+       public void getUserAppsExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenThrow(nullPointerException);
+               assertNull(appsController.getUserApps(mockedRequest, mockedResponse));
+
+       }
+
+       @Test
+       public void getPersUserAppsIfUserIsAdminTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+               EcompApp ecompApp = new EcompApp();
+               ecompApp.setId((long) 1);
+               ecompApp.setName("Test_app");
+               ecompApp.setUrl("Test_URL");
+               ecompApp.setUebKey("Test_key");
+               ecompApp.setAlternateUrl("Test_alt_URL");
+               expectedEcompApps.add(ecompApp);
+               List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+
+               List<EPApp> expectedApps = new ArrayList<EPApp>();
+
+               EPApp app = new EPApp();
+
+               app.setName("Test");
+               app.setImageUrl("test");
+               app.setDescription("test");
+               app.setNotes("test");
+               app.setUrl("test");
+               app.setId((long) 1);
+               app.setAppRestEndpoint("test");
+               app.setAlternateUrl("test");
+               app.setName("test");
+               app.setMlAppName("test");
+               app.setMlAppAdminId("test");
+               app.setUsername("test");
+               app.setAppPassword("test");
+               app.setOpen(false);
+               app.setEnabled(false);
+               app.setUebKey("test");
+               app.setUebSecret("test");
+               app.setUebTopicName("test");
+               app.setAppType(1);
+
+               expectedApps.add(app);
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getPersAdminApps(user)).thenReturn(expectedApps);
+
+               Mockito.when(appService.transformAppsToEcompApps(expectedApps)).thenReturn(expectedEcompApps);
+               actualEcompApps = appsController.getPersUserApps(mockedRequest, mockedResponse);
+               assertEquals(expectedEcompApps, actualEcompApps);
+       }
+
+       @Test
+       public void getPersUserAppsIfUserNotAdminTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+               EcompApp ecompApp = new EcompApp();
+               ecompApp.setId((long) 1);
+               ecompApp.setName("Test_app");
+               ecompApp.setUrl("Test_URL");
+               ecompApp.setUebKey("Test_key");
+               ecompApp.setAlternateUrl("Test_alt_URL");
+               expectedEcompApps.add(ecompApp);
+               List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+
+               List<EPApp> expectedApps = new ArrayList<EPApp>();
+
+               EPApp app = new EPApp();
+
+               app.setName("Test");
+               app.setImageUrl("test");
+               app.setDescription("test");
+               app.setNotes("test");
+               app.setUrl("test");
+               app.setId((long) 1);
+               app.setAppRestEndpoint("test");
+               app.setAlternateUrl("test");
+               app.setName("test");
+               app.setMlAppName("test");
+               app.setMlAppAdminId("test");
+               app.setUsername("test");
+               app.setAppPassword("test");
+               app.setOpen(false);
+               app.setEnabled(false);
+               app.setUebKey("test");
+               app.setUebSecret("test");
+               app.setUebTopicName("test");
+               app.setAppType(1);
+
+               expectedApps.add(app);
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(appService.getPersUserApps(user)).thenReturn(expectedApps);
+               Mockito.when(appService.transformAppsToEcompApps(expectedApps)).thenReturn(expectedEcompApps);
+               actualEcompApps = appsController.getPersUserApps(mockedRequest, mockedResponse);
+               assertEquals(expectedEcompApps, actualEcompApps);
+       }
+
+       @Test
+       public void getPersUserAppsIfUserNullTest() throws IOException {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               assertNull(appsController.getPersUserApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getPersUserAppsExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getPersAdminApps(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getPersUserApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAdminAppsIfNotAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+               assertNull(appsController.getAdminApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAdminAppsTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppIdAndNameTransportModel> expectedAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+               AppIdAndNameTransportModel appIdAndNameTransportModel = new AppIdAndNameTransportModel();
+               appIdAndNameTransportModel.setId((long) 1);
+               appIdAndNameTransportModel.setName("Test_app");
+               expectedAdminApps.add(appIdAndNameTransportModel);
+               List<AppIdAndNameTransportModel> actualAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAdminApps(user)).thenReturn(expectedAdminApps);
+               actualAdminApps = appsController.getAdminApps(mockedRequest, mockedResponse);
+               assertEquals(actualAdminApps, expectedAdminApps);
+
+       }
+
+       @Test
+       public void getAdminAppsExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAdminApps(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getAdminApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsForSuperAdminAndAccountAdminifOnlyAccountAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+               assertNull(appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsForSuperAdminAndAccountAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppIdAndNameTransportModel> expectedAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+               AppIdAndNameTransportModel appIdAndNameTransportModel = new AppIdAndNameTransportModel();
+               appIdAndNameTransportModel.setId((long) 1);
+               appIdAndNameTransportModel.setName("Test_app");
+               expectedAdminApps.add(appIdAndNameTransportModel);
+               List<AppIdAndNameTransportModel> actualAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAppsForSuperAdminAndAccountAdmin(user)).thenReturn(expectedAdminApps);
+               actualAdminApps = appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse);
+               assertEquals(actualAdminApps, expectedAdminApps);
+
+       }
+
+       @Test
+       public void getAppsForSuperAdminExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+               Mockito.when(appService.getAppsForSuperAdminAndAccountAdmin(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void putUserAppsSortingManualTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenReturn(expectedFieldValidator);
+               actualFieldValidator = appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference,
+                               mockedResponse);
+               assertEquals(actualFieldValidator, expectedFieldValidator);
+       }
+
+       @Test
+       public void putUserAppsSortingManualExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+               Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenThrow(nullPointerException);
+               assertNull(appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference, mockedResponse));
+       }
+
+       @Test
+       public void putUserWidgetsSortManualTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               Mockito.when(appService.saveWidgetsSortManual(ePWidgetsSortPreference, user))
+                               .thenReturn(expectedFieldValidator);
+               actualFieldValidator = appsController.putUserWidgetsSortManual(mockedRequest, ePWidgetsSortPreference,
+                               mockedResponse);
+               assertEquals(actualFieldValidator, expectedFieldValidator);
+       }
+
+       @Test
+       public void putUserWidgetsSortManualExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+               Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenThrow(nullPointerException);
+               assertNull(appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference, mockedResponse));
+       }
+
+       @Test
+       public void putUserWidgetsSortPrefTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               Mockito.when(appService.deleteUserWidgetSortPref(ePWidgetsSortPreference, user))
+                               .thenReturn(expectedFieldValidator);
+               actualFieldValidator = appsController.putUserWidgetsSortPref(mockedRequest, ePWidgetsSortPreference,
+                               mockedResponse);
+               assertEquals(actualFieldValidator, expectedFieldValidator);
+       }
+
+       @Test
+       public void putUserWidgetsSortPrefExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+               Mockito.when(appService.deleteUserWidgetSortPref(ePWidgetsSortPreference, user))
+                               .thenThrow(nullPointerException);
+               assertNull(appsController.putUserWidgetsSortPref(mockedRequest, ePWidgetsSortPreference, mockedResponse));
+       }
+
+       @Test
+       public void deleteUserAppSortManualTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               Mockito.when(appService.deleteUserAppSortManual(epDeleteAppsManualSortPref, user))
+                               .thenReturn(expectedFieldValidator);
+               actualFieldValidator = appsController.deleteUserAppSortManual(mockedRequest, epDeleteAppsManualSortPref,
+                               mockedResponse);
+               assertEquals(actualFieldValidator, expectedFieldValidator);
+       }
+
+       @Test
+       public void deleteUserAppSortManualExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+               Mockito.when(appService.deleteUserAppSortManual(epDeleteAppsManualSortPref, user))
+                               .thenThrow(nullPointerException);
+               assertNull(appsController.deleteUserAppSortManual(mockedRequest, epDeleteAppsManualSortPref, mockedResponse));
+       }
+
+       @Test
+       public void putUserAppsSortingPreferenceTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               EPAppsSortPreference userAppsValue = new EPAppsSortPreference();
+
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               Mockito.when(appService.saveAppsSortPreference(userAppsValue, user)).thenReturn(expectedFieldValidator);
+               actualFieldValidator = appsController.putUserAppsSortingPreference(mockedRequest, userAppsValue,
+                               mockedResponse);
+               assertEquals(actualFieldValidator, expectedFieldValidator);
+       }
+
+       @Test
+       public void putUserAppsSortingPreferenceExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               EPAppsSortPreference userAppsValue = new EPAppsSortPreference();
+               Mockito.when(appService.saveAppsSortPreference(userAppsValue, user)).thenThrow(nullPointerException);
+               assertNull(appsController.putUserAppsSortingPreference(mockedRequest, userAppsValue, mockedResponse));
+       }
+
+       @Test
+       public void getUserAppsSortTypePreferenceTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String expectedUserSortPreference = "TEST_DECE";
+               String actualUserSortPreference = new String();
+               Mockito.when(appService.getUserAppsSortTypePreference(user)).thenReturn(expectedUserSortPreference);
+               actualUserSortPreference = appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse);
+               assertEquals(actualUserSortPreference, expectedUserSortPreference);
+       }
+
+       @Test
+       public void getUserAppsSortTypePreferenceExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.getUserAppsSortTypePreference(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getUserAppsSortTypePreferenceIfUserNullTest() throws IOException {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.getUserAppsSortTypePreference(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsAdministratorsTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AdminUserApplications> expecteAdminUserApplications = new ArrayList<AdminUserApplications>();
+               List<AdminUserApplications> actualAdminUserApplications = new ArrayList<AdminUserApplications>();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAppsAdmins()).thenReturn(expecteAdminUserApplications);
+               actualAdminUserApplications = appsController.getAppsAdministrators(mockedRequest, mockedResponse);
+               assertEquals(expecteAdminUserApplications, actualAdminUserApplications);
+       }
+
+       @Test
+       public void getAppsAdministratorsIfUserNotSuperAdminTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsAdministratorsExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAppsAdmins()).thenThrow(nullPointerException);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppsResponse> expectedApps = new ArrayList<AppsResponse>();
+               AppsResponse apps = new AppsResponse((long) 1, "test", true, true);
+               expectedApps.add(apps);
+
+               List<AppsResponse> atualApps = new ArrayList<AppsResponse>();
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAllApps(false)).thenReturn(expectedApps);
+               atualApps = appsController.getApps(mockedRequest, mockedResponse);
+               assertEquals(expectedApps, atualApps);
+       }
+
+       @Test
+       public void getAppsExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               assertNull(appsController.getApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsIfUserNotSuperAdminTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAllApps(false)).thenThrow(nullPointerException);
+               assertNull(appsController.getApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAllAppsTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<AppsResponse> expectedApps = new ArrayList<AppsResponse>();
+               AppsResponse apps = new AppsResponse((long) 1, "test", true, true);
+               expectedApps.add(apps);
+               List<AppsResponse> atualApps = new ArrayList<AppsResponse>();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAllApps(true)).thenReturn(expectedApps);
+               atualApps = appsController.getAllApps(mockedRequest, mockedResponse);
+               assertEquals(expectedApps, atualApps);
+       }
+
+       @Test
+       public void getAllAppsExceptionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               assertNull(appsController.getAllApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAllAppsIfUserNotSuperAdminTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getAllApps(true)).thenThrow(nullPointerException);
+               assertNull(appsController.getAllApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppsFullListTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+               EcompApp ecompApp = new EcompApp();
+               ecompApp.setId((long) 1);
+               ecompApp.setName("Test_app");
+               ecompApp.setUrl("Test_URL");
+               ecompApp.setUebKey("Test_key");
+               ecompApp.setAlternateUrl("Test_alt_URL");
+               expectedEcompApps.add(ecompApp);
+               List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+               Mockito.when(appService.getEcompAppAppsFullList()).thenReturn(expectedEcompApps);
+               actualEcompApps = appsController.getAppsFullList(mockedRequest, mockedResponse);
+               assertEquals(expectedEcompApps, actualEcompApps);
+       }
+
+//     @Test
+//     public void getAppsFullListNoUserTest() {
+//             EPUser user = null;
+//             Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+//             Mockito.when(appService.getEcompAppAppsFullList()).thenReturn(null);
+//             assertNull(appsController.getAppsFullList(mockedRequest, mockedResponse));
+//
+//     }
+
+       @Test
+       public void getUserProfileTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               UserRole userRole = new UserRole();
+               userRole.setUser_Id((long) 1);
+               userRole.setOrgUserId("guest");
+               userRole.setFirstName("Test_User_FirstName");
+               userRole.setLastName("Test_User_LastName");
+               userRole.setRoleId((long) 1);
+               userRole.setRoleName("test");
+
+               UserRoles unexpectedserAndRoles = new UserRoles(userRole);
+               unexpectedserAndRoles.setFirstName("Test_User_FirstName");
+               unexpectedserAndRoles.setLastName("Test_User_LastName");
+               unexpectedserAndRoles.setGuestSession(false);
+               unexpectedserAndRoles.setOrgUserId("guest");
+               List<String> roles = new ArrayList<String>();
+               roles.add("Test");
+               unexpectedserAndRoles.setRoles(roles);
+               Mockito.when(appService.getUserProfileNormalized(user)).thenReturn(unexpectedserAndRoles);
+               UserRoles actualUserAndRoles = appsController.getUserProfile(mockedRequest, mockedResponse);
+               assertEquals(unexpectedserAndRoles, actualUserAndRoles);
+       }
+
+       @Test
+       public void getUserProfileIfUserNullTest() throws IOException {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.getUserProfileNormalized(user)).thenReturn(null);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getUserProfileExcpetionTest() throws IOException {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(appService.getUserProfileNormalized(user)).thenThrow(nullPointerException);
+               assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getAppRolesTest() {
+               List<LocalRole> expectedRoleList = new ArrayList<LocalRole>();
+               LocalRole localRole = new LocalRole();
+               localRole.setRoleId(1);
+               localRole.setRolename("test");
+               expectedRoleList.add(localRole);
+               long appId = 1;
+               Mockito.when(appService.getAppRoles(appId)).thenReturn(expectedRoleList);
+               List<LocalRole> actualRoleList = appsController.getAppRoles(mockedRequest, appId);
+               assertEquals(actualRoleList, expectedRoleList);
+       }
+
+       @Test
+       public void getAppRolesExceptionTest() {
+               long appId = 1;
+               Mockito.when(appService.getAppRoles(appId)).thenThrow(nullPointerException);
+               assertNull(appsController.getAppRoles(mockedRequest, appId));
+       }
+
+       @Test
+       public void getOnboardingAppsTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<OnboardingApp> expectedOnboardingApps = new ArrayList<OnboardingApp>();
+               OnboardingApp onboardingApp = new OnboardingApp();
+               onboardingApp.setUebKey("test");
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getOnboardingApps()).thenReturn(expectedOnboardingApps);
+               List<OnboardingApp> actualOnboardingApps = appsController.getOnboardingApps(mockedRequest, mockedResponse);
+               assertEquals(expectedOnboardingApps, actualOnboardingApps);
+       }
+
+       @Test
+       public void getOnboardingAppsifSuperAdiminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               assertNull(appsController.getOnboardingApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void getOnboardingAppsExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(!adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.getOnboardingApps()).thenThrow(nullPointerException);
+               assertNull(appsController.getOnboardingApps(mockedRequest, mockedResponse));
+       }
+
+       @Test
+       public void putOnboardingAppTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+               FieldsValidator actualFieldValidator = appsController.putOnboardingApp(mockedRequest, OnboardingApp,
+                               mockedResponse);
+               assertEquals(expectedFieldValidator, actualFieldValidator);
+       }
+
+       @Test
+       public void putOnboardingAppIfSuperAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               FieldsValidator expectedFieldValidator = null;
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+               assertNull(appsController.putOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+       }
+
+       @Test
+       public void putOnboardingAppExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenThrow(nullPointerException);
+               assertNull(appsController.putOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+       }
+       
+       @Test
+       public void postOnboardingAppTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+               FieldsValidator actualFieldValidator = appsController.postOnboardingApp(mockedRequest, OnboardingApp,
+                               mockedResponse);
+               assertEquals(expectedFieldValidator, actualFieldValidator);
+       }
+
+       @Test
+       public void postOnboardingAppIfSuperAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               FieldsValidator expectedFieldValidator = null;
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+               assertNull(appsController.postOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+       }
+
+       @Test
+       public void postOnboardingAppExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               OnboardingApp OnboardingApp = new OnboardingApp();
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenThrow(nullPointerException);
+               assertNull(appsController.postOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+       }
+       
+       @Test
+       public void deleteOnboardingAppTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               long appId = 1;
+               Mockito.when(appService.deleteOnboardingApp(user,appId )).thenReturn(expectedFieldValidator);
+               FieldsValidator actualFieldValidator = appsController.deleteOnboardingApp(mockedRequest,appId,
+                               mockedResponse);
+               assertEquals(expectedFieldValidator, actualFieldValidator);
+       }
+
+       @Test
+       public void deleteOnboardingAppIfSuperAdminTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               FieldsValidator expectedFieldValidator = null;
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               long appId = 1;
+        Mockito.when(appService.deleteOnboardingApp(user,appId)).thenReturn(expectedFieldValidator);
+               assertNull(appsController.deleteOnboardingApp(mockedRequest,appId,mockedResponse));
+       }
+
+       @Test
+       public void deleteOnboardingAppExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               long appId = 1;
+      Mockito.when(appService.deleteOnboardingApp(user,appId)).thenThrow(nullPointerException);
+               assertNull(appsController.deleteOnboardingApp(mockedRequest,appId,mockedResponse));
+       }
+       
+       @Test
+       public void getLeftMenuItemsTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               String menuList = "Test";
+               PowerMockito.mockStatic(EPUserUtils.class);
+               PowerMockito.mockStatic(SystemProperties.class);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Set menuSet = new HashSet<>();
+               menuSet.add(1);
+               Mockito.when(AppUtils.getSession(mockedRequest)
+                               .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME))).thenReturn(menuSet);
+               Mockito.when(AppUtils.getSession(mockedRequest)
+                               .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME))).thenReturn(menuSet);
+               Mockito.when(leftMenuService.getLeftMenuItems(user, menuSet, menuSet)).thenReturn(menuList);
+               String response = appsController.getLeftMenuItems(mockedRequest, mockedResponse);
+               assertTrue(response.equals("Test"));
+       }
+       
+       @Test
+       public void getLeftMenuItemsExceptionTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               String menuList = "Test";
+               PowerMockito.mockStatic(EPUserUtils.class);
+               PowerMockito.mockStatic(SystemProperties.class);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Set menuSet = new HashSet<>();
+               menuSet.add(1);
+               Mockito.when(AppUtils.getSession(mockedRequest)
+                               .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME))).thenReturn(menuSet);
+               Mockito.when(AppUtils.getSession(mockedRequest)
+                               .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME))).thenReturn(menuSet);
+               Mockito.when(leftMenuService.getLeftMenuItems(user, menuSet, menuSet)).thenThrow(nullPointerException);
+               assertNull(appsController.getLeftMenuItems(mockedRequest, mockedResponse));
+       }
+       
+       @Test
+       public void getAppThumbnailExceptionTest()
+       {
+               EPApp app = null;
+               assertNull(appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse));
+       }
+       
+       @Test
+       public void getAppThumbnailTest()
+       {
+               EPApp app = new EPApp();
+               app.setName("Test");
+               app.setImageUrl("test");
+               app.setDescription("test");
+               app.setNotes("test");
+               app.setUrl("test");
+               app.setId((long) 1);
+               app.setAppType(1);
+               app.setImageUrl("www.ecomp.com");
+               app.setThumbnail(new byte[] {1, 6, 3});
+               Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+               HttpEntity<byte[]> response = appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse);
+               assertEquals(response.getHeaders().getContentLength(), 3);
+       }
+       
+       @Test
+       public void getAppThumbnailForMediaTypePngTest()
+       {
+               
+               EPApp app = new EPApp();
+               app.setName("Test");
+               app.setImageUrl("test");
+               app.setDescription("test");
+               app.setNotes("test");
+               app.setUrl("test");
+               app.setId((long) 1);
+               app.setAppType(1);
+               app.setImageUrl("www.ecomp.png");
+               app.setThumbnail(new byte[] {1, 6, 3});
+               Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+               PowerMockito.mockStatic(MediaType.class);
+               HttpEntity<byte[]> response = appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse);
+               assertEquals(response.getHeaders().getContentLength(), 3);
+       }
+       
+       @Test
+       public void getUserAppsOrderBySortPrefIfUSerNullTest(){
+               List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+               
+               EcompApp app = new EcompApp();
+               listOfApps.add(app);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+               assertNull(appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse));
+       }
+       
+       @Test
+       public void getUserAppsOrderBySortPrefTest(){
+               List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+               
+               EcompApp app = new EcompApp();
+               listOfApps.add(app);
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(mockedRequest.getParameter("mparams")).thenReturn("");
+               Mockito.when(appService.transformAppsToEcompApps(appService.getAppsOrderByName(user))).thenReturn(listOfApps);
+               List<EcompApp> listOfActualApps =       appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse);
+               assertEquals(listOfActualApps.size(), 1);
+       }
+       
+       @Test
+       public void getUserAppsOrderBySortPrefIfusrSortPrefIsMTest(){
+               List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+               
+               EcompApp app = new EcompApp();
+               listOfApps.add(app);
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(mockedRequest.getParameter("mparams")).thenReturn("M");
+               Mockito.when(appService.transformAppsToEcompApps(appService.getAppsOrderByName(user))).thenReturn(listOfApps);
+               List<EcompApp> listOfActualApps =       appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse);
+               assertEquals(listOfActualApps.size(), 1);
+       }
+       
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java
new file mode 100644 (file)
index 0000000..b621d9a
--- /dev/null
@@ -0,0 +1,73 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.BEPropertyReaderController;
+import org.openecomp.portalapp.portal.domain.BEProperty;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class BEPropertyReaderControllerTest extends MockitoTestSuite {
+
+       @InjectMocks
+       BEPropertyReaderController bEPropertyReaderController = new BEPropertyReaderController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Test
+       public void readPropertyTest() {
+               String key = "DOMAIN_CLASS_LOCATION";
+               BEProperty beProperty = new BEProperty("DOMAIN_CLASS_LOCATION", "domain_class_location");
+               PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(beProperty);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               PortalRestResponse<BEProperty> actualPortalRestResponse = null;
+               PowerMockito.mockStatic(SystemProperties.class);
+               Mockito.when(SystemProperties.getProperty("DOMAIN_CLASS_LOCATION")).thenReturn("domain_class_location");
+               actualPortalRestResponse = bEPropertyReaderController.readProperty(mockedRequest, key);
+               assertTrue(actualPortalRestResponse.equals(ecpectedPortalRestResponse));
+
+       }
+       
+       @Test
+       public void readPropertyExceptionTest() {
+               String key =null;
+               //BEProperty beProperty = new BEProperty("DOMAIN_CLASS_LOCATION", "domain_class_location");
+               PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+               ecpectedPortalRestResponse.setMessage("java.lang.NullPointerException");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               PortalRestResponse<BEProperty> actualPortalRestResponse = null;
+               PowerMockito.mockStatic(SystemProperties.class);
+               Mockito.when(new BEProperty(key, SystemProperties.getProperty(key))).thenThrow(nullPointerException);
+               actualPortalRestResponse = bEPropertyReaderController.readProperty(mockedRequest, key);
+               System.out.println(actualPortalRestResponse);
+               assertTrue(actualPortalRestResponse.equals(ecpectedPortalRestResponse));
+
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java
new file mode 100644 (file)
index 0000000..7050527
--- /dev/null
@@ -0,0 +1,264 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.BasicAuthAccountController;
+import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
+import org.openecomp.portalapp.portal.domain.EPEndpoint;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.BasicAuthAccountService;
+import org.openecomp.portalapp.portal.service.BasicAuthAccountServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class BasicAuthAccountControllerTest extends MockitoTestSuite {
+
+       @Mock
+       BasicAuthAccountService basicAuthAccountService = new BasicAuthAccountServiceImpl();
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+       @InjectMocks
+       BasicAuthAccountController basicAuthAccountController = new BasicAuthAccountController();
+       
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       MockEPUser mockUser = new MockEPUser();
+
+       public BasicAuthCredentials basicAuthCredentials() {
+               BasicAuthCredentials basicAuthCredentials = new BasicAuthCredentials();
+
+               basicAuthCredentials.setId((long) 1);
+               basicAuthCredentials.setApplicationName("test");
+               basicAuthCredentials.setUsername("Test");
+               basicAuthCredentials.setPassword("Password");
+               basicAuthCredentials.setIsActive("YES");
+
+               List<EPEndpoint> endpoints = new ArrayList<EPEndpoint>();
+
+               EPEndpoint ePEndpoint = new EPEndpoint();
+               ePEndpoint.setId((long) 1);
+               ePEndpoint.setName("Test");
+               endpoints.add(ePEndpoint);
+               basicAuthCredentials.setEndpoints(endpoints);
+
+               return basicAuthCredentials;
+
+       }
+
+       @Test
+       public void createBasicAuthAccountTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("SUCCESS");
+               expectedResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.OK);
+               long accountd = 1;
+
+               Mockito.when(basicAuthAccountService.saveBasicAuthAccount(basicAuthCredentials)).thenReturn(accountd);
+
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+                               mockedResponse, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void createBasicAuthAccountAdminTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("Authorization Required");
+               expectedResponse.setResponse("Admin Only Operation! ");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+                               mockedResponse, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void createBasicAuthAccountIfInputNullTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = null;
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("FAILURE");
+               expectedResponse.setResponse("newBasicAuthAccount cannot be null or empty");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+                               mockedResponse, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void getBasicAuthAccountTest() throws Exception {
+               PortalRestResponse<List<BasicAuthCredentials>> expectedPortalResponse = new PortalRestResponse<List<BasicAuthCredentials>>();
+               List<BasicAuthCredentials> basicAuthCredentialsList = new ArrayList<BasicAuthCredentials>();
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+               basicAuthCredentialsList.add(basicAuthCredentials);
+
+               expectedPortalResponse.setMessage("Success");
+               expectedPortalResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedPortalResponse.setStatus(portalRestStatusEnum.OK);
+
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(basicAuthAccountService.getAccountData()).thenReturn(null);
+               PortalRestResponse<List<BasicAuthCredentials>> actualResponse = basicAuthAccountController
+                               .getBasicAuthAccount(mockedRequest, mockedResponse);
+               assertEquals(expectedPortalResponse, actualResponse);
+       }
+
+       @Test
+       public void getBasicAuthAccountIfSuperAdminTest() throws Exception {
+               PortalRestResponse<List<BasicAuthCredentials>> expectedPortalResponse = new PortalRestResponse<List<BasicAuthCredentials>>();
+               List<BasicAuthCredentials> basicAuthCredentialsList = new ArrayList<BasicAuthCredentials>();
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+               basicAuthCredentialsList.add(basicAuthCredentials);
+
+               expectedPortalResponse.setMessage("UnAuthorized! Admin Only Operation");
+               expectedPortalResponse.setResponse(new ArrayList<>());
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedPortalResponse.setStatus(portalRestStatusEnum.ERROR);
+
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               Mockito.when(basicAuthAccountService.getAccountData()).thenReturn(null);
+               PortalRestResponse<List<BasicAuthCredentials>> actualResponse = basicAuthAccountController
+                               .getBasicAuthAccount(mockedRequest, mockedResponse);
+               assertEquals(expectedPortalResponse, actualResponse);
+       }
+
+       @Test
+       public void updateAccountTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("SUCCESS");
+               expectedResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.OK);
+               long accountd = 1;
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+                               mockedResponse, accountd, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void updateAccountIfSuperAdminTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("Authorization Required");
+               expectedResponse.setResponse("Admin Only Operation! ");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+               long accountd = 1;
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+                               mockedResponse, accountd, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void updateAccountIfInputNullTest() throws Exception {
+               BasicAuthCredentials basicAuthCredentials = null;
+
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("FAILURE");
+               expectedResponse.setResponse("BasicAuthCredentials cannot be null or empty");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+               long accountd = 1;
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+                               mockedResponse, accountd, basicAuthCredentials);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void deleteAccountTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("SUCCESS");
+               expectedResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.OK);
+               long accountd = 1;
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
+                               mockedResponse, accountd);
+               assertEquals(actualResponse, expectedResponse);
+       }
+
+       @Test
+       public void deleteAccountIfNotSuperAdminTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("Authorization Required");
+               expectedResponse.setResponse("Admin Only Operation! ");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+               long accountd = 1;
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
+                               mockedResponse, accountd);
+               System.out.println(actualResponse);
+               assertEquals(actualResponse, expectedResponse);
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/CommonWidgetControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/CommonWidgetControllerTest.java
new file mode 100644 (file)
index 0000000..eae8ec0
--- /dev/null
@@ -0,0 +1,84 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.CommonWidgetController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+
+public class CommonWidgetControllerTest {
+
+       @Mock
+       DashboardSearchService dashboardSearchService = new DashboardSearchServiceImpl();
+
+       @InjectMocks
+       CommonWidgetController commonWidgetController = new CommonWidgetController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @SuppressWarnings("unchecked")
+       @Test
+       public void getWidgetDataTest() {
+               String resourceType = "Test";
+               PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+               @SuppressWarnings("rawtypes")
+               PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+               ecpectedPortalRestResponse.setMessage("Unexpected resource type Test");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+               assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+       }
+
+       @SuppressWarnings("unchecked")
+       @Test
+       public void getWidgetDataTestNew() {
+               String resourceType = "EVENTS";
+               PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+               @SuppressWarnings("rawtypes")
+               PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+               assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+       }
+
+       @SuppressWarnings("unchecked")
+       @Test
+       public void getWidgetDataExceptionTest() {
+               String resourceType = "null";
+               PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+               @SuppressWarnings("rawtypes")
+               PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+               ecpectedPortalRestResponse.setMessage("Unexpected resource type null");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+               assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ConsulClientControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ConsulClientControllerTest.java
new file mode 100644 (file)
index 0000000..eda1740
--- /dev/null
@@ -0,0 +1,142 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.ConsulClientController;
+import org.openecomp.portalapp.portal.domain.BEProperty;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+
+import com.orbitz.consul.ConsulException;
+import com.orbitz.consul.model.health.ServiceHealth;
+
+import io.searchbox.client.config.exception.NoServerConfiguredException;
+
+public class ConsulClientControllerTest {
+
+       @Mock
+       ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+       @InjectMocks
+       ConsulClientController consulClientController = new ConsulClientController();
+
+       NoServerConfiguredException noServerConfiguredException = new NoServerConfiguredException(null);
+
+       String service = "Test";
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+       ConsulException consulException = new ConsulException(nullPointerException);
+
+       @Test
+       public void getServiceLocationTest() {
+               PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+               ecpectedPortalRestResponse.setMessage("Success!");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+               actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+       }
+
+       @Test
+       public void getServiceLocationExceptionTest() {
+               PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+               ecpectedPortalRestResponse.setMessage("Warning!");
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.WARN);
+               PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+               Mockito.when(consulHealthService.getServiceLocation(service, null)).thenThrow(noServerConfiguredException);
+               actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.getMessage().equals(ecpectedPortalRestResponse.getMessage()));
+               assertTrue(actualPortalRestRespone.getStatus().equals(ecpectedPortalRestResponse.getStatus()));
+
+       }
+
+       @Test
+       public void getServiceLocationExceptionConsulExceptionTest() {
+               PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+               ecpectedPortalRestResponse.setMessage("Error!");
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+               Mockito.when(consulHealthService.getServiceLocation(service, null)).thenThrow(consulException);
+               actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.getMessage().equals(ecpectedPortalRestResponse.getMessage()));
+               assertTrue(actualPortalRestRespone.getStatus().equals(ecpectedPortalRestResponse.getStatus()));
+       }
+
+       public PortalRestResponse<List<ServiceHealth>> successResponse() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = new PortalRestResponse<List<ServiceHealth>>();
+               List<ServiceHealth> healths = new ArrayList<ServiceHealth>();
+               ecpectedPortalRestResponse.setMessage("Success!");
+               ecpectedPortalRestResponse.setResponse(healths);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               return ecpectedPortalRestResponse;
+       }
+
+       public PortalRestResponse<List<ServiceHealth>> errorResponse() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = new PortalRestResponse<List<ServiceHealth>>();
+               List<ServiceHealth> healths = new ArrayList<ServiceHealth>();
+               ecpectedPortalRestResponse.setMessage("Error!");
+               ecpectedPortalRestResponse.setResponse(healths);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               return ecpectedPortalRestResponse;
+       }
+
+       @Test
+       public void getAllHealthyNodesTest() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = successResponse();
+               PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+               actualPortalRestRespone = consulClientController.getAllHealthyNodes(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+
+       }
+
+       @Test
+       public void getAllHealthyNodesExceptionTest() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = errorResponse();
+               PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+               Mockito.when(consulHealthService.getAllHealthyNodes(service)).thenThrow(consulException);
+               actualPortalRestRespone = consulClientController.getAllHealthyNodes(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+       }
+
+       @Test
+       public void getAllNodesTest() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = successResponse();
+               PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+               actualPortalRestRespone = consulClientController.getAllNodes(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+       }
+
+       @Test
+       public void getAllNodesExceptionTest() {
+               PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = errorResponse();
+               PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+               Mockito.when(consulHealthService.getAllNodes(service)).thenThrow(consulException);
+               actualPortalRestRespone = consulClientController.getAllNodes(mockedRequest, mockedResponse, service);
+               assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardSearchResultControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardSearchResultControllerTest.java
new file mode 100644 (file)
index 0000000..6da9541
--- /dev/null
@@ -0,0 +1,366 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.DashboardSearchResultController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class DashboardSearchResultControllerTest {
+
+       @Mock
+       DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+       @InjectMocks
+       DashboardSearchResultController dashboardSearchResultController = new DashboardSearchResultController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       MockEPUser mockUser = new MockEPUser();
+
+       @Test
+       public void getWidgetDataTest() {
+               String resourceType = "test";
+               PortalRestResponse<CommonWidgetMeta> ecpectedPortalRestResponse = new PortalRestResponse<CommonWidgetMeta>();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               Mockito.when(searchService.getWidgetData(resourceType)).thenReturn(null);
+               PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = dashboardSearchResultController
+                               .getWidgetData(mockedRequest, resourceType);
+               assertEquals(acutualPoratlRestResponse, ecpectedPortalRestResponse);
+
+       }
+
+       @Test
+       public void saveWidgetDataBulkTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+
+               CommonWidgetMeta commonWidgetMeta = new CommonWidgetMeta();
+               commonWidgetMeta.setCategory("test");
+
+               List<CommonWidget> commonWidgetList = new ArrayList<CommonWidget>();
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId((long) 1);
+               commonWidget.setCategory("test");
+               commonWidget.setHref("test_href");
+               commonWidget.setTitle("test_title");
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate(null);
+               commonWidget.setSortOrder(1);
+
+               commonWidgetList.add(commonWidget);
+
+               commonWidgetMeta.setItems(commonWidgetList);
+
+               Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .saveWidgetDataBulk(commonWidgetMeta);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+       }
+
+       @Test
+       public void saveWidgetDataBulkIfCategoryNullTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("java.text.ParseException: Unparseable date: \"1\"");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+
+               CommonWidgetMeta commonWidgetMeta = new CommonWidgetMeta();
+               commonWidgetMeta.setCategory("test");
+
+               List<CommonWidget> commonWidgetList = new ArrayList<CommonWidget>();
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId(null);
+               commonWidget.setCategory(null);
+               commonWidget.setHref(null);
+               commonWidget.setTitle(null);
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate("1");
+               commonWidget.setSortOrder(1);
+               commonWidgetList.add(commonWidget);
+               commonWidgetMeta.setItems(commonWidgetList);
+
+               Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .saveWidgetDataBulk(commonWidgetMeta);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+       }
+
+       @Test
+       public void saveWidgetDataTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId((long) 1);
+               commonWidget.setCategory("test");
+               commonWidget.setHref("test_href");
+               commonWidget.setTitle("test_title");
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate(null);
+               commonWidget.setSortOrder(1);
+
+               Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .saveWidgetData(commonWidget);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+       }
+
+       @Test
+       public void saveWidgetDataExceptionTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("ERROR");
+               ecpectedPortalRestResponse.setResponse("Cateogry cannot be null or empty");
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId((long) 1);
+               commonWidget.setCategory("");
+               commonWidget.setHref("test_href");
+               commonWidget.setTitle("test_title");
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate(null);
+               commonWidget.setSortOrder(1);
+
+               Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .saveWidgetData(commonWidget);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+       }
+
+       @Test
+       public void saveWidgetDataDateErrorTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("java.text.ParseException: Unparseable date: \"1\"");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId((long) 1);
+               commonWidget.setCategory("test");
+               commonWidget.setHref("test_href");
+               commonWidget.setTitle("test_title");
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate("1");
+               commonWidget.setSortOrder(1);
+
+               Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .saveWidgetData(commonWidget);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+       }
+
+       public void deleteWidgetDataTest() {
+               PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+               ecpectedPortalRestResponse.setMessage("success");
+               ecpectedPortalRestResponse.setResponse(null);
+               ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               CommonWidget commonWidget = new CommonWidget();
+               commonWidget.setId((long) 1);
+               commonWidget.setCategory("test");
+               commonWidget.setHref("test_href");
+               commonWidget.setTitle("test_title");
+               commonWidget.setContent("test_content");
+               commonWidget.setEventDate(null);
+               commonWidget.setSortOrder(1);
+               Mockito.when(searchService.deleteWidgetData(commonWidget)).thenReturn(null);
+
+               PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+                               .deleteWidgetData(commonWidget);
+               System.out.println(actualPortalRestResponse);
+               assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+       }
+
+       @Test
+       public void searchPortalIfUserIsNull() {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String searchString = "test";
+
+               PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+               expectedResult.setMessage("searchPortal: User object is null? - check logs");
+               expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+               expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+               PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+                               .searchPortal(mockedRequest, searchString);
+               assertEquals(expectedResult, actualResult);
+       }
+
+       @Test
+       public void searchPortalIfSearchStringNullTest() {
+               EPUser user = mockUser.mockEPUser();
+               ;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String searchString = null;
+
+               PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+               expectedResult.setMessage("searchPortal: String string is null");
+               expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+               expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+
+               PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+                               .searchPortal(mockedRequest, searchString);
+               assertEquals(expectedResult, actualResult);
+       }
+
+       @Test
+       public void searchPortalIfSearchTest() {
+               EPUser user = mockUser.mockEPUser();
+               ;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String searchString = "test";
+               List<SearchResultItem> searchResultItemList = new ArrayList<SearchResultItem>();
+               SearchResultItem searchResultItem = new SearchResultItem();
+
+               searchResultItem.setId((long) 1);
+               searchResultItem.setCategory("test");
+               searchResultItem.setName("test_name");
+               searchResultItem.setTarget("test_target");
+               searchResultItem.setUuid("test_UUId");
+               searchResultItemList.add(searchResultItem);
+               Map<String, List<SearchResultItem>> expectedResultMap = new HashMap<String, List<SearchResultItem>>();
+               expectedResultMap.put(searchString, searchResultItemList);
+
+               PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+               expectedResult.setMessage("success");
+               expectedResult.setResponse(expectedResultMap);
+               expectedResult.setStatus(PortalRestStatusEnum.OK);
+
+               Mockito.when(searchService.searchResults(user.getLoginId(), searchString)).thenReturn(expectedResultMap);
+               PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+                               .searchPortal(mockedRequest, searchString);
+               assertEquals(expectedResult, actualResult);
+
+       }
+
+       @Test
+       public void searchPortalIfSearchExcptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               ;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String searchString = "test";
+
+               PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+               expectedResult.setMessage("null - check logs.");
+               expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+               expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+
+               Mockito.when(searchService.searchResults(user.getLoginId(), searchString)).thenThrow(nullPointerException);
+               PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+                               .searchPortal(mockedRequest, searchString);
+               assertEquals(expectedResult, actualResult);
+       }
+
+       @Test
+       public void getActiveUsersTest() {
+               List<String> expectedActiveUsers = new ArrayList<String>();
+               EPUser user = mockUser.mockEPUser();
+               ;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String userId = user.getOrgUserId();
+               Mockito.when(searchService.getRelatedUsers(userId)).thenReturn(expectedActiveUsers);
+               List<String> actualOnlineUsers = dashboardSearchResultController.getActiveUsers(mockedRequest);
+               assertEquals(expectedActiveUsers, actualOnlineUsers);
+
+       }
+
+       @Test
+       public void getActiveUsersExceptionTest() {
+               List<String> expectedActiveUsers = new ArrayList<String>();
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               String userId = user.getOrgUserId();
+               Mockito.when(searchService.getRelatedUsers(userId)).thenThrow(nullPointerException);
+               List<String> actualOnlineUsers = dashboardSearchResultController.getActiveUsers(mockedRequest);
+               assertEquals(expectedActiveUsers, actualOnlineUsers);
+
+       }
+
+       @Test
+       public void activeUsersTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+               expectedResult.setMessage("success");
+               expectedResult.setResponse(new ArrayList<>());
+               expectedResult.setStatus(PortalRestStatusEnum.OK);
+               PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+
+               assertEquals(actualResult, expectedResult);
+
+       }
+
+       @Test
+       public void activeUsersIfUserNullTest() {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+               expectedResult.setMessage("User object is null? - check logs");
+               expectedResult.setResponse(new ArrayList<>());
+               expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+               PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+               assertEquals(actualResult, expectedResult);
+
+       }
+
+       @Test
+       public void activeUsersExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+               expectedResult.setMessage("null - check logs.");
+               expectedResult.setResponse(new ArrayList<>());
+               expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+               Mockito.when(searchService.getRelatedUsers(user.getLoginId())).thenThrow(nullPointerException);
+               PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+               assertEquals(actualResult, expectedResult);
+
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAppsRestfulControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAppsRestfulControllerTest.java
new file mode 100644 (file)
index 0000000..43860d4
--- /dev/null
@@ -0,0 +1,174 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.ExternalAppsRestfulController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPLoginService;
+import org.openecomp.portalapp.portal.service.EPLoginServiceImpl;
+import org.openecomp.portalapp.portal.service.EPRoleService;
+import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.slf4j.MDC;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ MDC.class, EPCommonSystemProperties.class })
+public class ExternalAppsRestfulControllerTest {
+
+       @InjectMocks
+       ExternalAppsRestfulController externalAppsRestfulController = new ExternalAppsRestfulController();
+       @Mock
+       FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+       @Mock
+       EPLoginService epLoginService = new EPLoginServiceImpl();
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+       @Mock
+       UserNotificationService userNotificationService = new UserNotificationServiceImpl();
+
+       @Mock
+       EPRoleService epRoleService = new EPRoleServiceImpl();
+
+       @Mock
+       EcompPortalUtils EcompPortalUtils = new EcompPortalUtils();
+       
+       @Mock
+       DataAccessService DataAccessService = new DataAccessServiceImpl();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       MockEPUser mockUser = new MockEPUser();
+
+        @Test(expected = Exception.class)
+        public void getFunctionalMenuItemsForUserIfUSerNullTest() throws
+        Exception
+        {
+        PowerMockito.mockStatic(EPCommonSystemProperties.class);
+        PowerMockito.mockStatic(MDC.class);
+        EPUser epUser = null;
+        String loginId = "guestT";
+        Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+        Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+        externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+        mockedResponse);
+        }
+       
+       @Test
+       public void getFunctionalMenuItemsForUserIfSuperAdminTest() throws Exception {
+               PowerMockito.mockStatic(EPCommonSystemProperties.class);
+               PowerMockito.mockStatic(MDC.class);
+               EPUser epUser = mockUser.mockEPUser();
+               epUser.setId((long) 1);
+               epUser.setLoginId("guestT");
+               String loginId = "guestT";
+               Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+               Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+               List<FunctionalMenuItem> expectedList = new ArrayList<FunctionalMenuItem>();
+               FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+               expectedList.add(functionalMenuItem);
+               Mockito.when(mockedRequest.getHeader("LoginId")).thenReturn("guestT");
+               Mockito.when(adminRolesService.isSuperAdmin(epUser)).thenReturn(true);
+               Mockito.when(functionalMenuService.getFunctionalMenuItems()).thenReturn(expectedList);
+               List<FunctionalMenuItem> actualList = externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+                               mockedResponse);
+               assertNull(actualList.get(0).menuId);
+       }
+
+       @Test
+       public void getFunctionalMenuItemsForUserTest() throws Exception {
+               PowerMockito.mockStatic(EPCommonSystemProperties.class);
+               PowerMockito.mockStatic(MDC.class);
+               EPUser epUser = mockUser.mockEPUser();
+               epUser.setId((long) 1);
+               epUser.setLoginId("guestT");
+               String loginId = "guestT";
+               Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+               Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+               List<FunctionalMenuItem> expectedList = new ArrayList<FunctionalMenuItem>();
+               FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+               expectedList.add(functionalMenuItem);
+               Mockito.when(mockedRequest.getHeader("LoginId")).thenReturn("guestT");
+               Mockito.when(adminRolesService.isSuperAdmin(epUser)).thenReturn(false);
+               Mockito.when(functionalMenuService.getFunctionalMenuItemsForUser(epUser.getOrgUserId()))
+                               .thenReturn(expectedList);
+               List<FunctionalMenuItem> actualList = externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+                               mockedResponse);
+               assertNull(actualList.get(0).menuId);
+       }
+
+       @Test(expected = Exception.class)
+       public void getFavoritesForUserIfUserNullTest() throws Exception {
+               List<FavoritesFunctionalMenuItemJson> favorites = new ArrayList<FavoritesFunctionalMenuItemJson>();
+               FavoritesFunctionalMenuItemJson favoritesFunctionalMenuItemJson = new FavoritesFunctionalMenuItemJson();
+               favorites.add(favoritesFunctionalMenuItemJson);
+               PowerMockito.mockStatic(EPCommonSystemProperties.class);
+               PowerMockito.mockStatic(MDC.class);
+               Mockito.when(mockedRequest.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID)).thenReturn("Login_URL");
+               Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+               EPUser epUser = null;
+               externalAppsRestfulController.getFavoritesForUser(mockedRequest, mockedResponse);
+       }
+
+       @Test
+       public void getFavoritesForUserTest() throws Exception {
+               PowerMockito.mockStatic(EPCommonSystemProperties.class);
+               PowerMockito.mockStatic(MDC.class);
+               EPUser epUser = mockUser.mockEPUser();
+               epUser.setId((long) 1);
+               epUser.setLoginId("guestT");
+               String loginId = "guestT";
+               Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+               List<FavoritesFunctionalMenuItemJson> favorites = new ArrayList<FavoritesFunctionalMenuItemJson>();
+               FavoritesFunctionalMenuItemJson favoritesFunctionalMenuItemJson = new FavoritesFunctionalMenuItemJson();
+               favorites.add(favoritesFunctionalMenuItemJson);
+               Mockito.when(mockedRequest.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID)).thenReturn("Login_URL");
+               Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+               Mockito.when(epLoginService.findUserWithoutPwd("Login_URL")).thenReturn(epUser);
+               Mockito.when(functionalMenuService.getFavoriteItems(epUser.getId())).thenReturn(favorites);
+               List<FavoritesFunctionalMenuItemJson> actaulFavorites = externalAppsRestfulController
+                               .getFavoritesForUser(mockedRequest, mockedResponse);
+               assertEquals(actaulFavorites.size(), 1);
+       }
+}
index b9f11ee..6e1b5d1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.controller;\r
-\r
-import static org.junit.Assert.*;\r
-\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-import javax.servlet.http.HttpSession;\r
-import javax.validation.constraints.AssertTrue;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.mockito.InjectMocks;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.MockitoAnnotations;\r
-import org.mockito.runners.MockitoJUnitRunner;\r
-import org.openecomp.portalapp.portal.controller.FunctionalMenuController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;\r
-import org.openecomp.portalapp.portal.test.core.MockEPUser;\r
-import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-\r
-@RunWith(MockitoJUnitRunner.class)\r
-public class FunctionalMenuControllerTest extends MockitoTestSuite {\r
-\r
-       String userid = "sk434m";\r
-\r
-       @Mock\r
-       FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();\r
-\r
-       @InjectMocks\r
-       FunctionalMenuController functionalMenuController = new FunctionalMenuController();\r
-\r
-       @Mock\r
-       private DataAccessService dataAccessService;\r
-\r
-       @Mock\r
-       AdminRolesService adminRolesService = new AdminRolesServiceImpl();\r
-\r
-       @Before\r
-       public void setup() {\r
-               MockitoAnnotations.initMocks(this);\r
-       }\r
-\r
-       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();\r
-\r
-       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();\r
-       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();\r
-\r
-       @InjectMocks\r
-       EPUserUtils ePUserUtils = new EPUserUtils();\r
-\r
-       @Mock\r
-       EPUser epuser;\r
-\r
-       MockEPUser mockUser = new MockEPUser();\r
-\r
-       List<BusinessCardApplicationRolesList> appRoles = new ArrayList<BusinessCardApplicationRolesList>();\r
-       List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();\r
-\r
-       List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();\r
-\r
-       public List<BusinessCardApplicationRole> mockBusinessCardApplicationRole() {\r
-               List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();\r
-\r
-               BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();\r
-               businessCardApplicationRole.setRoleName("ADMIN");\r
-               businessCardApplicationRole.setAppName("ASDC");\r
-\r
-               BusinessCardApplicationRole businessCardApplicationRole1 = new BusinessCardApplicationRole();\r
-               businessCardApplicationRole1.setAppName("ASDC");\r
-               businessCardApplicationRole1.setRoleName("Tester");\r
-\r
-               userAppRoleList.add(businessCardApplicationRole);\r
-               userAppRoleList.add(businessCardApplicationRole1);\r
-               return userAppRoleList;\r
-       }\r
-\r
-       public List<BusinessCardApplicationRolesList> mockBusinessCardApplicationRolesList() {\r
-               List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();\r
-\r
-               BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();\r
-               businessCardApplicationRolesList.setAppName("ASDC");\r
-\r
-               List<String> roleNames = new ArrayList<String>();\r
-               roleNames.add("ADMIN");\r
-               roleNames.add("Tester");\r
-               businessCardApplicationRolesList.setRoleNames(roleNames);\r
-\r
-               appRolesActual.add(businessCardApplicationRolesList);\r
-               return appRolesActual;\r
-       }\r
-\r
-       @Test\r
-       public void getAppListTestIfAppAlredyExistsBusinessCardApplicationRolesList() throws IOException {\r
-\r
-               userAppRoleList = mockBusinessCardApplicationRole();\r
-               appRolesActual = mockBusinessCardApplicationRolesList();\r
-\r
-               Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);\r
-\r
-               appRoles = functionalMenuController.getAppList(mockedRequest, userid);\r
-\r
-               assertEquals(appRolesActual.size(), appRoles.size());\r
-               assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());\r
-               assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppListTestIfAppDoesnotExistsInBusinessCardApplicationRolesList() throws IOException {\r
-\r
-               userAppRoleList = mockBusinessCardApplicationRole();\r
-               BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();\r
-               businessCardApplicationRole.setAppName("CCD");\r
-               businessCardApplicationRole.setRoleName("ADMIN");\r
-               userAppRoleList.add(businessCardApplicationRole);\r
-               appRolesActual = mockBusinessCardApplicationRolesList();\r
-               BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();\r
-               businessCardApplicationRolesList.setAppName("CCD");\r
-               List<String> roleNames1 = new ArrayList<String>();\r
-               roleNames1.add("ADMIN");\r
-               businessCardApplicationRolesList.setRoleNames(roleNames1);\r
-               appRolesActual.add(businessCardApplicationRolesList);\r
-               Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);\r
-               appRoles = functionalMenuController.getAppList(mockedRequest, userid);\r
-               assertEquals(appRolesActual.size(), appRoles.size());\r
-               assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());\r
-               assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());\r
-               assertEquals(appRolesActual.get(1).getAppName(), appRoles.get(1).getAppName());\r
-               assertEquals(appRolesActual.get(1).getRoleNames(), appRoles.get(1).getRoleNames());\r
-\r
-       }\r
-\r
-       @Test\r
-       public void regenerateAncestorTableTest() {\r
-               EPUser user = mockUser.mockEPUser();\r
-\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               FieldsValidator acutualFieldValidator = null;\r
-               FieldsValidator expectedFieldValidator = new FieldsValidator();\r
-               List<FieldName> fields = new ArrayList<>();\r
-               expectedFieldValidator.setHttpStatusCode((long) 200);\r
-               expectedFieldValidator.setFields(fields);\r
-               expectedFieldValidator.setErrorCode(null);\r
-               Mockito.when(!adminRolesService.isSuperAdmin(user)).thenReturn(true);\r
-               Mockito.when(functionalMenuService.regenerateAncestorTable()).thenReturn(expectedFieldValidator);\r
-               acutualFieldValidator = functionalMenuController.regenerateAncestorTable(mockedRequest, mockedResponse);\r
-               assertTrue(acutualFieldValidator.equals(expectedFieldValidator));\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.portalapp.portal.controller.FunctionalMenuController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+@RunWith(MockitoJUnitRunner.class)
+public class FunctionalMenuControllerTest extends MockitoTestSuite {
+
+       String userid = "ab1234";
+
+       @Mock
+       FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+       @InjectMocks
+       FunctionalMenuController functionalMenuController = new FunctionalMenuController();
+
+       @Mock
+       private DataAccessService dataAccessService;
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+       @InjectMocks
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       @Mock
+       EPUser epuser;
+
+       MockEPUser mockUser = new MockEPUser();
+
+       List<BusinessCardApplicationRolesList> appRoles = new ArrayList<BusinessCardApplicationRolesList>();
+       List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();
+
+       List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();
+
+       public List<BusinessCardApplicationRole> mockBusinessCardApplicationRole() {
+               List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();
+
+               BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+               businessCardApplicationRole.setRoleName("ADMIN");
+               businessCardApplicationRole.setAppName("ASDC");
+
+               BusinessCardApplicationRole businessCardApplicationRole1 = new BusinessCardApplicationRole();
+               businessCardApplicationRole1.setAppName("ASDC");
+               businessCardApplicationRole1.setRoleName("Tester");
+
+               userAppRoleList.add(businessCardApplicationRole);
+               userAppRoleList.add(businessCardApplicationRole1);
+               return userAppRoleList;
+       }
+
+       public List<BusinessCardApplicationRolesList> mockBusinessCardApplicationRolesList() {
+               List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();
+
+               BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+               businessCardApplicationRolesList.setAppName("ASDC");
+
+               List<String> roleNames = new ArrayList<String>();
+               roleNames.add("ADMIN");
+               roleNames.add("Tester");
+               businessCardApplicationRolesList.setRoleNames(roleNames);
+
+               appRolesActual.add(businessCardApplicationRolesList);
+               return appRolesActual;
+       }
+
+       @Test
+       public void getAppListTestIfAppAlredyExistsBusinessCardApplicationRolesList() throws IOException {
+
+               userAppRoleList = mockBusinessCardApplicationRole();
+               appRolesActual = mockBusinessCardApplicationRolesList();
+
+               Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);
+
+               appRoles = functionalMenuController.getAppList(mockedRequest, userid);
+
+               assertEquals(appRolesActual.size(), appRoles.size());
+               assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());
+               assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());
+
+       }
+
+       @Test
+       public void getAppListTestIfAppDoesnotExistsInBusinessCardApplicationRolesList() throws IOException {
+
+               userAppRoleList = mockBusinessCardApplicationRole();
+               BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+               businessCardApplicationRole.setAppName("CCD");
+               businessCardApplicationRole.setRoleName("ADMIN");
+               userAppRoleList.add(businessCardApplicationRole);
+               appRolesActual = mockBusinessCardApplicationRolesList();
+               BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+               businessCardApplicationRolesList.setAppName("CCD");
+               List<String> roleNames1 = new ArrayList<String>();
+               roleNames1.add("ADMIN");
+               businessCardApplicationRolesList.setRoleNames(roleNames1);
+               appRolesActual.add(businessCardApplicationRolesList);
+               Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);
+               appRoles = functionalMenuController.getAppList(mockedRequest, userid);
+               assertEquals(appRolesActual.size(), appRoles.size());
+               assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());
+               assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());
+               assertEquals(appRolesActual.get(1).getAppName(), appRoles.get(1).getAppName());
+               assertEquals(appRolesActual.get(1).getRoleNames(), appRoles.get(1).getRoleNames());
+
+       }
+
+       @Test
+       public void regenerateAncestorTableTest() {
+               EPUser user = mockUser.mockEPUser();
+
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               FieldsValidator acutualFieldValidator = null;
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               List<FieldName> fields = new ArrayList<>();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(fields);
+               expectedFieldValidator.setErrorCode(null);
+               Mockito.when(!adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(functionalMenuService.regenerateAncestorTable()).thenReturn(expectedFieldValidator);
+               acutualFieldValidator = functionalMenuController.regenerateAncestorTable(mockedRequest, mockedResponse);
+               assertTrue(acutualFieldValidator.equals(expectedFieldValidator));
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/GetAccessControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/GetAccessControllerTest.java
new file mode 100644 (file)
index 0000000..b9ab249
--- /dev/null
@@ -0,0 +1,71 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.GetAccessController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+import org.openecomp.portalapp.portal.service.GetAccessService;
+import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class GetAccessControllerTest {
+
+       @Mock
+       GetAccessService getAccessService = new GetAccessServiceImpl();
+
+       @InjectMocks
+       GetAccessController getAccessController = new GetAccessController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+       MockEPUser mockUser = new MockEPUser();
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+       
+       
+       @Test
+       public void getAppList() throws IOException
+       {
+               List<GetAccessResult> expectedAppsList = new ArrayList<GetAccessResult>();
+               EPUser user = mockUser.mockEPUser();
+               GetAccessResult getAccessResult = new GetAccessResult();
+               getAccessResult.setRowId("1");
+               getAccessResult.setRoleId((long) 1);
+               getAccessResult.setEcompFunction("test");
+               getAccessResult.setAppName("Test_App");
+               getAccessResult.setAppMotsId(1);
+               getAccessResult.setRoleName("Test_role");
+               getAccessResult.setRoleActive("N");
+               getAccessResult.setReqType("test");
+               
+               expectedAppsList.add(getAccessResult);
+               
+               List<GetAccessResult> actualAppsList = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(getAccessService.getAppAccessList(user)).thenReturn(expectedAppsList);
+               actualAppsList = getAccessController.getAppList(mockedRequest);
+               assertTrue(actualAppsList.contains(getAccessResult));
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ManifestControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ManifestControllerTest.java
new file mode 100644 (file)
index 0000000..ceaceaa
--- /dev/null
@@ -0,0 +1,56 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.Attributes;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.ManifestController;
+import org.openecomp.portalapp.portal.service.ManifestService;
+import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+
+public class ManifestControllerTest extends MockitoTestSuite{
+
+       
+       @Mock
+       ManifestService manifestService = new ManifestServiceImpl();
+       
+       @InjectMocks
+       ManifestController  manifestController = new  ManifestController();
+       
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+       NullPointerException nullPointerException = new NullPointerException();
+       
+       @Test
+       public void getManifestTest() throws IOException
+       {
+               Map<String, Object> expectedResponse = new HashMap<String, Object>();
+               Attributes attributes  = new Attributes();
+               expectedResponse.put("test", attributes);
+               Mockito.when(manifestService.getWebappManifest()).thenReturn(attributes);
+               Map<String, Object> actualResponse = manifestController.getManifest(mockedRequest);
+               assertTrue((actualResponse.keySet().toArray().length) == 1);
+               
+       }
+       
+       @Test
+       public void getManifestExceptionTest() throws IOException
+       {
+               Mockito.when(manifestService.getWebappManifest()).thenThrow(nullPointerException);
+               Map<String, Object> actualResponse = manifestController.getManifest(mockedRequest);
+               assertTrue((actualResponse.keySet().toArray().length) == 1);
+               assertTrue(actualResponse.get("error").equals("failed to get manifest: java.lang.NullPointerException"));
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java
new file mode 100644 (file)
index 0000000..4c14d8a
--- /dev/null
@@ -0,0 +1,233 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.MicroserviceController;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalapp.portal.service.MicroserviceServiceImpl;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(WidgetServiceHeaders.class)
+public class MicroserviceControllerTest extends MockitoTestSuite{
+
+       @InjectMocks
+       MicroserviceController microserviceController = new MicroserviceController();
+
+       @Mock
+       ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+       @Mock
+       MicroserviceService microserviceService = new MicroserviceServiceImpl();
+
+       @Mock
+       RestTemplate template = new RestTemplate();
+
+       @Mock
+       MicroserviceData microserviceData = new MicroserviceData();
+
+       @SuppressWarnings("rawtypes")
+       @Mock
+       ResponseEntity<List<WidgetCatalog>> ans = new ResponseEntity<List<WidgetCatalog>>(HttpStatus.OK);
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       @Mock
+       EcompPortalUtils EcompPortalUtils = new EcompPortalUtils();
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Test
+       public void createMicroserviceIfServiceDataNullTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FAILURE");
+               expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               MicroserviceData microserviceData = null;
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+                               mockedResponse, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void createMicroserviceTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("SUCCESS");
+               expectedportalRestResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+                               mockedResponse, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void createMicroserviceExceptionTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FAILURE");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Mockito.when(microserviceService.saveMicroservice(microserviceData)).thenReturn((long) 1);
+               Mockito.when(microserviceData.getParameterList()).thenThrow(nullPointerException);
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+                               mockedResponse, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void getMicroserviceTest() throws Exception {
+               Mockito.when(microserviceService.getMicroserviceData()).thenReturn(null);
+               List<MicroserviceData> list = microserviceController.getMicroservice(mockedRequest, mockedResponse);
+               assertEquals(list, null);
+       }
+
+       @Test
+       public void updateMicroserviceIfServiceISNullTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FAILURE");
+               expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               MicroserviceData microserviceData = null;
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+                               mockedResponse, 1, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void updateMicroserviceTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("SUCCESS");
+               expectedportalRestResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+                               mockedResponse, 1, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void updateMicroserviceExceptionTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FAILURE");
+               expectedportalRestResponse.setResponse(null);
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               Mockito.when(microserviceController.updateMicroservice(mockedRequest, mockedResponse, 1, microserviceData))
+                               .thenThrow(nullPointerException);
+               PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+                               mockedResponse, 1, microserviceData);
+               assertEquals(actualportalRestResponse, expectedportalRestResponse);
+       }
+
+       @Test
+       public void deleteMicroserviceExceptionTest() throws Exception {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("FAILURE");
+               expectedportalRestResponse.setResponse(
+                               "I/O error on GET request for \"https://null/widget/microservices/widgetCatalog/service/1\":null; nested exception is java.net.UnknownHostException: null");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               PowerMockito.mockStatic(WidgetServiceHeaders.class);
+               PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+                               mockedResponse, 1);
+               assertEquals(actuaPportalRestResponse.getStatus(), expectedportalRestResponse.getStatus());
+       }
+
+       @SuppressWarnings("unchecked")
+       @Test
+       public void deleteMicroserviceTest() throws Exception {
+               String HTTPS = "https://";
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("SOME WIDGETS ASSOICATE WITH THIS SERVICE");
+               expectedportalRestResponse.setResponse("'null' ,'null' ");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.WARN);
+               List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
+               WidgetCatalog widgetCatalog = new WidgetCatalog();
+               widgetCatalog.setId(1);
+               WidgetCatalog widgetCatalog1 = new WidgetCatalog();
+               widgetCatalog.setId(2);
+               List.add(widgetCatalog);
+               List.add(widgetCatalog1);
+               PowerMockito.mockStatic(WidgetServiceHeaders.class);
+               String whatService = "widgets-service";
+               Mockito.when(consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))).thenReturn("Test");
+               Mockito.when(ans.getBody()).thenReturn(List);
+               ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
+               };
+               Mockito.when(template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/service/" + 1,
+                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef)).thenReturn(ans);
+
+               PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+                               mockedResponse, 1);
+               assertEquals(actuaPportalRestResponse, expectedportalRestResponse);
+       }
+
+       @SuppressWarnings("unchecked")
+       @Test
+       public void deleteMicroserviceWhenNoWidgetsAssociatedTest() throws Exception {
+               String HTTPS = "https://";
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("SUCCESS");
+               expectedportalRestResponse.setResponse("");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
+               PowerMockito.mockStatic(WidgetServiceHeaders.class);
+               String whatService = "widgets-service";
+               Mockito.when(consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))).thenReturn("Test");
+               Mockito.when(ans.getBody()).thenReturn(List);
+               ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
+               };
+               Mockito.when(template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/service/" + 1,
+                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef)).thenReturn(ans);
+               PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+                               mockedResponse, 1);
+               assertEquals(actuaPportalRestResponse, expectedportalRestResponse);
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceProxyControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceProxyControllerTest.java
new file mode 100644 (file)
index 0000000..0d5aee1
--- /dev/null
@@ -0,0 +1,106 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.openecomp.portalapp.portal.controller.MicroserviceProxyController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.MicroserviceProxyService;
+import org.openecomp.portalapp.portal.service.MicroserviceProxyServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.client.HttpClientErrorException;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+
+public class MicroserviceProxyControllerTest extends MockitoTestSuite {
+
+       @Mock
+       MicroserviceProxyService microserviceProxyService = new MicroserviceProxyServiceImpl();
+
+       @InjectMocks
+       MicroserviceProxyController microserviceProxyController = new MicroserviceProxyController();
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+       @Mock
+       ObjectMapper objectMapper = new ObjectMapper();
+       MockEPUser mockUser = new MockEPUser();
+
+       @Test
+       public void getMicroserviceProxyTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest)).thenReturn("Success");
+               String acutualString = microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+               assertTrue(acutualString.equals("Success"));
+       }
+
+       @Test(expected = NullPointerException.class)
+       public void getMicroserviceProxyNullPoniterExceptionTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest))
+                               .thenThrow(nullPointerException);
+               microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+       }
+
+       @Test
+       public void getMicroserviceProxyExceptionTest() throws Exception {
+               HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.OK, "Success");
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest))
+                               .thenThrow(httpClientErrorException);
+               String acutualString = microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+               assertTrue(acutualString.equals("{\"error\":\"\"}"));
+       }
+
+       @Test
+       public void getMicroserviceProxyByWidgetIdTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+                               .thenReturn("Success");
+               String acutualString = microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest,
+                               getMockedResponse(), 1);
+               assertTrue(acutualString.equals("Success"));
+       }
+
+       @Test(expected = NullPointerException.class)
+       public void getMicroserviceProxyByWidgetIdNullPointerExceptionTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+                               .thenThrow(nullPointerException);
+               microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest, getMockedResponse(), 1);
+       }
+
+       @Test
+       public void getMicroserviceProxyByWidgetIdExceptionTest() throws Exception {
+               HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.OK, "Success");
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+                               .thenThrow(httpClientErrorException);
+               String acutualString = microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest,
+                               getMockedResponse(), 1);
+               assertTrue(acutualString.equals("{\"error\":\"\"}"));
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/PortalAdminControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/PortalAdminControllerTest.java
new file mode 100644 (file)
index 0000000..2054272
--- /dev/null
@@ -0,0 +1,231 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.PortalAdminController;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.PortalAdminServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.PortalAdmin;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+
+public class PortalAdminControllerTest extends MockitoTestSuite{
+
+       @InjectMocks
+       PortalAdminController portalAdminController = new PortalAdminController();
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+       
+       @Mock
+       PortalAdminService portalAdminService = new PortalAdminServiceImpl();
+
+       @Mock
+       AuditService auditService = new AuditServiceImpl();
+
+        
+       @Mock
+       EcompPortalUtils ecompPortalUtils = new EcompPortalUtils();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       MockEPUser mockUser = new MockEPUser();
+       
+       
+       @Test
+       public void getPortalAdminsTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<PortalAdmin> expectedPortalAdminsList = new ArrayList<PortalAdmin>();
+               PortalAdmin portalAdmin= new PortalAdmin();
+               
+               portalAdmin.setUserId((long) 1);
+               portalAdmin.setLoginId("guestT");
+               portalAdmin.setFirstName("Test_FirstName");
+               portalAdmin.setLastName("Test_LastName");
+               
+               expectedPortalAdminsList.add(portalAdmin);
+               
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               
+         Mockito.when(portalAdminService.getPortalAdmins()).thenReturn(expectedPortalAdminsList);
+         List<PortalAdmin> actualPortalAdminsList =  portalAdminController.getPortalAdmins(mockedRequest, mockedResponse);
+         assertEquals(actualPortalAdminsList,expectedPortalAdminsList);
+
+       }
+//     @Test
+//     public void getPortalAdminsIfUserIsNullTest()
+//     {
+//             EPUser user = null;
+//             Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+//
+//         assertNull(portalAdminController.getPortalAdmins(mockedRequest, mockedResponse));
+//
+//     }
+       
+       @Test
+       public void getPortalAdminsIfUserIsSuperAdminTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+                assertNull(portalAdminController.getPortalAdmins(mockedRequest, mockedResponse));
+
+       }
+       
+       
+       
+       @Test
+       public void createPortalAdminTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+       
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               String sbcid = "Test";
+               
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(portalAdminService.createPortalAdmin(sbcid)).thenReturn(expectedFieldValidator);
+               actualFieldValidator = portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse);
+        assertEquals(actualFieldValidator,expectedFieldValidator);
+
+       }
+               
+//     @Test
+//     public void createPortalAdminIfUserIsNullTest()
+//     {
+//             //EPUser user = null;
+//             Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+//             String sbcid = "null";
+//             assertNull(portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse));
+//
+//     }
+       
+       @Test
+       public void createPortalAdminIfUserIsSuperAdminTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               String sbcid = "Test";
+               assertNull(portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse));
+
+       }
+
+       @Test
+       public void deletePortalAdminTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+       
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(null);
+               expectedFieldValidator.setErrorCode(null);
+               FieldsValidator actualFieldValidator = new FieldsValidator();
+               String userInfo = "1-test";
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+               Mockito.when(portalAdminService.deletePortalAdmin((long) 1)).thenReturn(expectedFieldValidator);
+               actualFieldValidator = portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse);
+       assertEquals(actualFieldValidator,expectedFieldValidator);
+
+       }
+       
+       @Test
+       public void deletePortalAdminIfUserIsSuperAdminTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               String userInfo = "1-test";
+               assertNull(portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse));
+
+       }
+
+       @Test
+       public void deletePortalAdminWithNoUserInfoTest()
+       {
+               EPUser user = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+               String userInfo = "";
+               assertNull(portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse));
+       }
+       
+       @Test
+       public void getRolesByAppIfUserNullTest()
+       {
+               EPUser user = null;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Long appId = (long) 1;
+               assertNull(portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse));
+       }
+       
+       @Test
+       public void getRolesByAppTest()
+       {
+               EPUser user = mockUser.mockEPUser();;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPRole> expectedRoleList = new ArrayList<EPRole>();        
+               EPRole ePRole = new EPRole();
+               expectedRoleList.add(ePRole);
+               Long appId = (long) 1;
+               Mockito.when(adminRolesService.getRolesByApp(user, appId)).thenReturn(expectedRoleList);
+               List<EPRole> actualRoleList =   portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse);
+               assertEquals(actualRoleList,expectedRoleList);
+       }
+       
+       @Test
+       public void getRolesByAppExceptionTest()
+       {
+               EPUser user = mockUser.mockEPUser();;
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EPRole> expectedRoleList = new ArrayList<EPRole>();        
+               EPRole ePRole = new EPRole();
+               expectedRoleList.add(ePRole);
+               Long appId = (long) 1;
+               Mockito.when(adminRolesService.getRolesByApp(user, appId)).thenThrow(nullPointerException);
+               assertNull(portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse));
+       }
+       
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java
new file mode 100644 (file)
index 0000000..6286245
--- /dev/null
@@ -0,0 +1,336 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.openecomp.portalapp.portal.controller.RolesApprovalSystemController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+
+public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
+
+       @Mock
+       UserRolesService userRolesService;
+
+       @InjectMocks
+       RolesApprovalSystemController rolesApprovalSystemController = new RolesApprovalSystemController();
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       @Test
+       public void postUserProfileIfRolesNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Request has no roles");
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = null;
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void postUserProfileTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Saved Successfully");
+               expectedportalRestResponse.setResponse("Success");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+                               "Saved Successfully");
+
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST"))
+                               .thenReturn(externalRequestFieldsValidator);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void postUserProfileFailureTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Received Bad String");
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+                               "Received Bad String");
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST"))
+                               .thenReturn(externalRequestFieldsValidator);
+
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void postUserProfileExceptionTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST")).thenThrow(nullPointerException);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void putUserProfileIfLoginIdNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Request has no login ID");
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId(null);
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void putUserProfileTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Updated Successfully");
+               expectedportalRestResponse.setResponse("Success");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+                               "Updated Successfully");
+
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT"))
+                               .thenReturn(externalRequestFieldsValidator);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void putUserProfileFailureTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Received Bad String");
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+                               "Received Bad String");
+
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT"))
+                               .thenReturn(externalRequestFieldsValidator);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void putUserProfileExceptionTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse("save user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT")).thenThrow(nullPointerException);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void deleteUserProfileIfApplicationNameNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Request has no application name");
+               expectedportalRestResponse.setResponse("delete user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName(null);
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void deleteUserProfileIfMyloginrequestIdNullTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Request has no request ID");
+               expectedportalRestResponse.setResponse("delete user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId(null);
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void deleteUserProfileTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("Deleted Successfully");
+               expectedportalRestResponse.setResponse("Success");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+                               "Success");
+
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE"))
+                               .thenReturn(externalRequestFieldsValidator);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void deleteUserProfileFailureTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage("failed");
+               expectedportalRestResponse.setResponse("delete user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+                               "failed");
+
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE"))
+                               .thenReturn(externalRequestFieldsValidator);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+
+       @Test
+       public void deleteUserProfileExceptionTest() {
+               PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse("delete user profile failed");
+               PortalRestStatusEnum portalRestStatusEnum = null;
+               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+               ExternalSystemUser extSysUser = new ExternalSystemUser();
+               extSysUser.setApplicationName("Test_App");
+               extSysUser.setLoginId("1");
+               extSysUser.setMyloginrequestId("Test");
+               List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+               ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+               externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+               extSysUser.setRoles(externalSystemRoleApprovalList);
+               Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE")).thenThrow(nullPointerException);
+               PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+                               .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+               assertEquals(expectedportalRestResponse, actualportalRestResponse);
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/TicketEventControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/TicketEventControllerTest.java
new file mode 100644 (file)
index 0000000..1eda356
--- /dev/null
@@ -0,0 +1,99 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.TicketEventController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(UserUtils.class)
+public class TicketEventControllerTest {
+
+       @Mock
+       UserNotificationService userNotificationService;
+
+       @InjectMocks
+       TicketEventController ticketEventController = new TicketEventController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockEPUser mockUser = new MockEPUser();
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Test
+       public void saveTest() throws Exception {
+               String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.OK) == 0);
+       }
+
+       @Test
+       public void saveTestForException() throws Exception {
+               String ticketEventJson = "\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+       }
+
+       @Test
+       public void saveTestForApplicationValid() throws Exception {
+               String ticketEventJson = "{\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+               assertEquals(actualPortalRestResponse.getMessage(), "application is mandatory");
+
+       }
+
+       @Test
+       public void saveTestForBodyValid() throws Exception {
+               String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",\"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+               assertEquals(actualPortalRestResponse.getMessage(), "body is mandatory");
+       }
+
+       @Test
+       public void saveTestForEventSourceValid() throws Exception {
+               String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+               assertEquals(actualPortalRestResponse.getMessage(), "Message Source is mandatory");
+       }
+
+       @Test
+       public void saveTestForUserListValid() throws Exception {
+               String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {}}";
+               PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+                               mockedResponse, ticketEventJson);
+               assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+               assertEquals(actualPortalRestResponse.getMessage(), "At least one user Id is mandatory");
+       }
+}
\ No newline at end of file
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java
new file mode 100644 (file)
index 0000000..9e4d635
--- /dev/null
@@ -0,0 +1,141 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.UserController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.service.UserServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.ProfileDetail;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(CipherUtil.class)
+public class UserControllerTest extends MockitoTestSuite {
+
+       @InjectMocks
+       UserController userController = new UserController();
+
+       @Mock
+       UserService userService = new UserServiceImpl();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       MockEPUser mockUser = new MockEPUser();
+
+       @Test
+       public void getLoggedinUserExceptionTest() {
+               EPUser epUser = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+               PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
+               expectedResponse.setMessage(null);
+               expectedResponse.setResponse(null);
+               PortalRestStatusEnum enu = null;
+               expectedResponse.setStatus(enu.ERROR);
+               PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
+               assertEquals(response, expectedResponse);
+       }
+
+       @Test
+       public void getLoggedinUserTest() throws Exception {
+               EPUser epUser = mockUser.mockEPUser();
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+               PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
+               expectedResponse.setMessage("success");
+               ProfileDetail profileDetail = new ProfileDetail();
+               expectedResponse.setResponse(profileDetail);
+               PortalRestStatusEnum enu = null;
+               expectedResponse.setStatus(enu.OK);
+               PowerMockito.mockStatic(CipherUtil.class);
+               Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
+               PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
+               assertEquals(response.getMessage(), expectedResponse.getMessage());
+               assertEquals(response.getStatus(), expectedResponse.getStatus());
+       }
+
+       @Test
+       public void modifyLoggedinUserIfProfileNullTest() {
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("java.lang.NullPointerException");
+               expectedResponse.setResponse(null);
+               PortalRestStatusEnum enu = null;
+               expectedResponse.setStatus(enu.ERROR);
+               ProfileDetail profileDetail = null;
+               PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+               assertEquals(actualResponse, expectedResponse);
+               assertEquals(actualResponse.getStatus(), expectedResponse.getStatus());
+       }
+
+       @Test
+       public void modifyLoggedinUserExceptionTest() {
+               EPUser epUser = mockUser.mockEPUser();
+
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage(
+                               "java.lang.ClassCastException: com.sun.crypto.provider.AESCipher$General cannot be cast to javax.crypto.CipherSpi");
+               expectedResponse.setResponse(null);
+               PortalRestStatusEnum enu = null;
+               expectedResponse.setStatus(enu.ERROR);
+               ProfileDetail profileDetail = new ProfileDetail();
+               profileDetail.setFirstName("Test_FirstName");
+               profileDetail.setLastName("Test_LastName");
+               profileDetail.setEmail("Test_Email");
+               profileDetail.setLoginId("Test_LoginId");
+               profileDetail.setLoginPassword("Test_LoginPassword");
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+               PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+               assertEquals(actualResponse, expectedResponse);
+
+       }
+
+       @Test
+       public void modifyLoggedinUserTest() throws Exception {
+               EPUser epUser = mockUser.mockEPUser();
+               PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+               expectedResponse.setMessage("success");
+               expectedResponse.setResponse(null);
+               PortalRestStatusEnum enu = null;
+               expectedResponse.setStatus(enu.OK);
+               ProfileDetail profileDetail = new ProfileDetail();
+               profileDetail.setFirstName("Test_FirstName");
+               profileDetail.setLastName("Test_LastName");
+               profileDetail.setEmail("Test_Email");
+               profileDetail.setLoginId("Test_LoginId");
+               profileDetail.setLoginPassword("Test_LoginPassword");
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+               PowerMockito.mockStatic(CipherUtil.class);
+               Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
+               PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+               System.out.println(actualResponse);
+       }
+}
index 628f52a..2bc6977 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.controller;\r
-\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Calendar;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-import javax.servlet.http.HttpSession;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.mockito.InjectMocks;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.MockitoAnnotations;\r
-import org.openecomp.portalapp.portal.controller.UserNotificationController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;\r
-import org.openecomp.portalapp.portal.service.UserNotificationService;\r
-import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;\r
-import org.openecomp.portalapp.portal.test.core.MockEPUser;\r
-import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalsdk.core.web.support.UserUtils;\r
-import org.powermock.api.mockito.PowerMockito;\r
-import org.powermock.core.classloader.annotations.PrepareForTest;\r
-import org.powermock.modules.junit4.PowerMockRunner;\r
-\r
-@RunWith(PowerMockRunner.class)\r
-@PrepareForTest(UserUtils.class)\r
-public class UserNotificationControllerTest {\r
-\r
-       @Mock\r
-       FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();\r
-\r
-       @Mock\r
-       UserNotificationService userNotificationService = new UserNotificationServiceImpl();\r
-\r
-       @InjectMocks\r
-       UserNotificationController userNotificationController = new UserNotificationController();\r
-\r
-       @Before\r
-       public void setup() {\r
-               MockitoAnnotations.initMocks(this);\r
-       }\r
-\r
-       MockEPUser mockUser = new MockEPUser();\r
-       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();\r
-\r
-       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();\r
-       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();\r
-       NullPointerException nullPointerException = new NullPointerException();\r
-\r
-       @Test\r
-       public void getMenuIdRoleIdTest() {\r
-               List<FunctionalMenuRole> expectedMenuRoleList = new ArrayList<FunctionalMenuRole>();\r
-               FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();\r
-               functionalMenuRole.setId(new Integer(99999999));\r
-               functionalMenuRole.setMenuId((long) 137);\r
-               functionalMenuRole.setAppId(new Integer(456));\r
-               functionalMenuRole.setRoleId(new Integer(6214));\r
-               expectedMenuRoleList.add(functionalMenuRole);\r
-               List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;\r
-               Mockito.when(functionalMenuService.getFunctionalMenuRole()).thenReturn(expectedMenuRoleList);\r
-               actualFunctionalMenuRoleList = userNotificationController.getMenuIdRoleId(mockedRequest, mockedResponse);\r
-               assertTrue(actualFunctionalMenuRoleList.equals(expectedMenuRoleList));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getNotificationsTest() {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               List<EpNotificationItem> expectedEpNotificationList = new ArrayList<EpNotificationItem>();\r
-               EpNotificationItem epNotificationItem = new EpNotificationItem();\r
-               epNotificationItem.setNotificationId((long) 200);\r
-               expectedEpNotificationList.add(epNotificationItem);\r
-               PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();\r
-               expectedportalRestResponse.setMessage("success");\r
-               expectedportalRestResponse.setResponse(expectedEpNotificationList);\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);\r
-               PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;\r
-               Mockito.when(userNotificationService.getNotifications(user.getId())).thenReturn(expectedEpNotificationList);\r
-               actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);\r
-               assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getNotificationsCatchesExceptionTest() {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               List<EpNotificationItem> expectedEpNotificationList = null;\r
-               PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();\r
-               expectedportalRestResponse.setMessage(null);\r
-               expectedportalRestResponse.setResponse(expectedEpNotificationList);\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);\r
-               PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;\r
-               Mockito.when(userNotificationService.getNotifications(user.getId())).thenThrow(new NullPointerException());\r
-               actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);\r
-               assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAdminNotificationsTest() {\r
-               List<EpNotificationItemVO> actualEpNotificationsList = new ArrayList<EpNotificationItemVO>();\r
-               List<EpNotificationItemVO> expectedEpNotificationsList = new ArrayList<EpNotificationItemVO>();\r
-               EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();\r
-               epNotificationItemVO.setId((long) 1);\r
-               expectedEpNotificationsList.add(epNotificationItemVO);\r
-               Mockito.when(userNotificationService.getAdminNotificationVOS()).thenReturn(expectedEpNotificationsList);\r
-               actualEpNotificationsList = userNotificationController.getAdminNotifications(mockedRequest, mockedResponse);\r
-               assertTrue(actualEpNotificationsList.equals(expectedEpNotificationsList));\r
-       }\r
-\r
-       @Test\r
-       public void saveTestWhenNotificationIsNull() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-\r
-               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();\r
-               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();\r
-               expectedPortalRestResponse.setMessage("FAILURE");\r
-               expectedPortalRestResponse.setResponse("Notification Header cannot be null or empty");\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedPortalRestResponse.setStatus(portalRestStatusEnum.ERROR);\r
-\r
-               EpNotificationItem notificationItem = null;\r
-               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);\r
-               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));\r
-       }\r
-\r
-       @Test\r
-       public void saveTestWhenEndTimeIsGreater() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();\r
-               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();\r
-               expectedPortalRestResponse.setMessage("FAILURE");\r
-               expectedPortalRestResponse.setResponse("End Time should be greater than  start time");\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedPortalRestResponse.setStatus(portalRestStatusEnum.ERROR);\r
-               EpNotificationItem notificationItem = new EpNotificationItem();\r
-               notificationItem.setNotificationId((long) 1);\r
-               notificationItem.setMsgHeader("Test");\r
-               Date currentDate = new Date();\r
-               Calendar c = Calendar.getInstance();\r
-               c.setTime(currentDate);\r
-               c.add(Calendar.DATE, 1);\r
-               Date currentDatePlusOne = c.getTime();\r
-               notificationItem.setStartTime(currentDatePlusOne);\r
-               notificationItem.setEndTime(currentDate);\r
-\r
-               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);\r
-               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));\r
-\r
-       }\r
-\r
-       @Test\r
-       public void saveTestWhenNoRoleIDExists() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();\r
-               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();\r
-               expectedPortalRestResponse.setMessage("FAILURE");\r
-               expectedPortalRestResponse.setResponse("No Roles Ids Exist for the selected Roles");\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedPortalRestResponse.setStatus(portalRestStatusEnum.ERROR);\r
-               EpNotificationItem notificationItem = new EpNotificationItem();\r
-               notificationItem.setNotificationId((long) 1);\r
-               notificationItem.setMsgHeader("Test");\r
-               notificationItem.setIsForAllRoles("N");\r
-               Date currentDate = new Date();\r
-               Calendar c = Calendar.getInstance();\r
-               c.setTime(currentDate);\r
-               c.add(Calendar.DATE, 1);\r
-               Date currentDatePlusOne = c.getTime();\r
-               notificationItem.setStartTime(currentDate);\r
-               notificationItem.setEndTime(currentDatePlusOne);\r
-               List<Long> roleList = new ArrayList<Long>();\r
-               notificationItem.setRoleIds(roleList);\r
-               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);\r
-               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));\r
-       }\r
-\r
-       @Test\r
-       public void saveTest() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute("user", user);\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();\r
-               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();\r
-               expectedPortalRestResponse.setMessage("SUCCESS");\r
-               expectedPortalRestResponse.setResponse("");\r
-               PortalRestStatusEnum portalRestStatusEnum = null;\r
-               expectedPortalRestResponse.setStatus(portalRestStatusEnum.OK);\r
-               EpNotificationItem notificationItem = new EpNotificationItem();\r
-               notificationItem.setNotificationId((long) 1);\r
-               notificationItem.setMsgHeader("Test");\r
-               notificationItem.setIsForAllRoles("Y");\r
-               Date currentDate = new Date();\r
-               Calendar c = Calendar.getInstance();\r
-               c.setTime(currentDate);\r
-               c.add(Calendar.DATE, 1);\r
-               Date currentDatePlusOne = c.getTime();\r
-               notificationItem.setStartTime(currentDate);\r
-               notificationItem.setEndTime(currentDatePlusOne);\r
-               List<Long> roleList = new ArrayList<Long>();\r
-               Long role1 = (long) 1;\r
-               roleList.add(role1);\r
-               notificationItem.setRoleIds(roleList);\r
-               HttpServletRequest request = mockitoTestSuite.getMockedRequest();\r
-               PowerMockito.mockStatic(UserUtils.class);\r
-               Mockito.when(UserUtils.getUserIdAsLong(request)).thenReturn((long) 1);\r
-               Mockito.when(userNotificationService.saveNotification(notificationItem)).thenReturn("Test");\r
-               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);\r
-               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.UserNotificationController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(UserUtils.class)
+public class UserNotificationControllerTest {
+
+       @Mock
+       FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+       @Mock
+       UserNotificationService userNotificationService = new UserNotificationServiceImpl();
+
+       @InjectMocks
+       UserNotificationController userNotificationController = new UserNotificationController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockEPUser mockUser = new MockEPUser();
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+       @Test
+       public void getMenuIdRoleIdTest() {
+               List<FunctionalMenuRole> expectedMenuRoleList = new ArrayList<FunctionalMenuRole>();
+               FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();
+               functionalMenuRole.setId(new Integer(99999999));
+               functionalMenuRole.setMenuId((long) 137);
+               functionalMenuRole.setAppId(new Integer(456));
+               functionalMenuRole.setRoleId(new Integer(6214));
+               expectedMenuRoleList.add(functionalMenuRole);
+               List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;
+               Mockito.when(functionalMenuService.getFunctionalMenuRole()).thenReturn(expectedMenuRoleList);
+               actualFunctionalMenuRoleList = userNotificationController.getMenuIdRoleId(mockedRequest, mockedResponse);
+               assertTrue(actualFunctionalMenuRoleList.equals(expectedMenuRoleList));
+
+       }
+
+       @Test
+       public void getNotificationsTest() {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EpNotificationItem> expectedEpNotificationList = new ArrayList<EpNotificationItem>();
+               EpNotificationItem epNotificationItem = new EpNotificationItem();
+               epNotificationItem.setNotificationId((long) 200);
+               expectedEpNotificationList.add(epNotificationItem);
+               PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();
+               expectedportalRestResponse.setMessage("success");
+               expectedportalRestResponse.setResponse(expectedEpNotificationList);
+               expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;
+               Mockito.when(userNotificationService.getNotifications(user.getId())).thenReturn(expectedEpNotificationList);
+               actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);
+               assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));
+
+       }
+
+       @Test
+       public void getNotificationsCatchesExceptionTest() {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EpNotificationItem> expectedEpNotificationList = null;
+               PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();
+               expectedportalRestResponse.setMessage(null);
+               expectedportalRestResponse.setResponse(expectedEpNotificationList);
+               expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;
+               Mockito.when(userNotificationService.getNotifications(user.getId())).thenThrow(new NullPointerException());
+               actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);
+               assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));
+       }
+
+       @Test
+       public void getAdminNotificationsTest() {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               List<EpNotificationItemVO> actualEpNotificationsList = new ArrayList<EpNotificationItemVO>();
+               List<EpNotificationItemVO> expectedEpNotificationsList = new ArrayList<EpNotificationItemVO>();
+               EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();
+               epNotificationItemVO.setId((long) 1);
+               expectedEpNotificationsList.add(epNotificationItemVO);
+               Mockito.when(userNotificationService.getAdminNotificationVOS(Matchers.anyLong())).thenReturn(expectedEpNotificationsList);
+               actualEpNotificationsList = userNotificationController.getAdminNotifications(mockedRequest, mockedResponse);
+               assertTrue(actualEpNotificationsList.equals(expectedEpNotificationsList));
+       }
+
+       @Test
+       public void saveTestWhenNotificationIsNull() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+               expectedPortalRestResponse.setMessage("FAILURE");
+               expectedPortalRestResponse.setResponse("Notification Header cannot be null or empty");
+               expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+
+               EpNotificationItem notificationItem = null;
+               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+       }
+
+       @Test
+       public void saveTestWhenEndTimeIsGreater() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+               expectedPortalRestResponse.setMessage("FAILURE");
+               expectedPortalRestResponse.setResponse("End Time should be greater than  start time");
+               expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               EpNotificationItem notificationItem = new EpNotificationItem();
+               notificationItem.setNotificationId((long) 1);
+               notificationItem.setMsgHeader("Test");
+               Date currentDate = new Date();
+               Calendar c = Calendar.getInstance();
+               c.setTime(currentDate);
+               c.add(Calendar.DATE, 1);
+               Date currentDatePlusOne = c.getTime();
+               notificationItem.setStartTime(currentDatePlusOne);
+               notificationItem.setEndTime(currentDate);
+
+               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+
+       }
+
+       @Test
+       public void saveTestWhenNoRoleIDExists() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+               expectedPortalRestResponse.setMessage("FAILURE");
+               expectedPortalRestResponse.setResponse("No Roles Ids Exist for the selected Roles");
+               expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+               EpNotificationItem notificationItem = new EpNotificationItem();
+               notificationItem.setNotificationId((long) 1);
+               notificationItem.setMsgHeader("Test");
+               notificationItem.setIsForAllRoles("N");
+               Date currentDate = new Date();
+               Calendar c = Calendar.getInstance();
+               c.setTime(currentDate);
+               c.add(Calendar.DATE, 1);
+               Date currentDatePlusOne = c.getTime();
+               notificationItem.setStartTime(currentDate);
+               notificationItem.setEndTime(currentDatePlusOne);
+               List<Long> roleList = new ArrayList<Long>();
+               notificationItem.setRoleIds(roleList);
+               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+       }
+
+       @Test
+       public void saveTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute("user", user);
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+               PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+               expectedPortalRestResponse.setMessage("SUCCESS");
+               expectedPortalRestResponse.setResponse("");
+               expectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+               EpNotificationItem notificationItem = new EpNotificationItem();
+               notificationItem.setNotificationId((long) 1);
+               notificationItem.setMsgHeader("Test");
+               notificationItem.setIsForAllRoles("Y");
+               Date currentDate = new Date();
+               Calendar c = Calendar.getInstance();
+               c.setTime(currentDate);
+               c.add(Calendar.DATE, 1);
+               Date currentDatePlusOne = c.getTime();
+               notificationItem.setStartTime(currentDate);
+               notificationItem.setEndTime(currentDatePlusOne);
+               List<Long> roleList = new ArrayList<Long>();
+               Long role1 = (long) 1;
+               roleList.add(role1);
+               notificationItem.setRoleIds(roleList);
+               HttpServletRequest request = mockitoTestSuite.getMockedRequest();
+               PowerMockito.mockStatic(UserUtils.class);
+               Mockito.when(UserUtils.getUserIdAsLong(request)).thenReturn((long) 1);
+               Mockito.when(userNotificationService.saveNotification(notificationItem)).thenReturn("Test");
+               actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+               assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRecommendationControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRecommendationControllerTest.java
new file mode 100644 (file)
index 0000000..8c0a5cd
--- /dev/null
@@ -0,0 +1,69 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.UserRecommendationController;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(UserUtils.class)
+public class UserRecommendationControllerTest {
+
+       /*
+        * @Mock FunctionalMenuService functionalMenuService = new
+        * FunctionalMenuServiceImpl();
+        * 
+        * @Mock UserNotificationService userNotificationService = new
+        * UserNotificationServiceImpl();
+        */
+
+       @InjectMocks
+       UserRecommendationController userRecommendationController = new UserRecommendationController();
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockEPUser mockUser = new MockEPUser();
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+
+
+       @Test
+       public void getRecommendationsTest() throws Exception {
+               String recommendations = "{\"id\": \"USERID\",  \"timestamp\": \"TIMESTAMP\",  \"count\": \"count of recommendations returned\",\"recommendations\": [\"recommended action 1\",\"recommended action 2\"] }";
+               // String actualPortalRestResponse = null;
+               String actualPortalRestResponse = recommendations;
+               actualPortalRestResponse = userRecommendationController.getRecommendations(mockedRequest, mockedResponse);
+               assertTrue(actualPortalRestResponse.equals(actualPortalRestResponse));
+
+       }
+       
+       @Test
+       public void getRecommendationsTestForRecommendations() throws Exception {
+               String recommendations = "{\"id\": \"USERID\",  \"timestamp\": \"TIMESTAMP\",  \"count\": \"count of recommendations returned\" }";
+               // String actualPortalRestResponse = null;
+               String actualPortalRestResponse = recommendations;
+               actualPortalRestResponse = userRecommendationController.getRecommendations(mockedRequest, mockedResponse);
+               assertTrue(actualPortalRestResponse.equals(actualPortalRestResponse));
+
+       }
+
+       
+}
index 093ca58..1459caa 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.controller;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-import javax.servlet.http.HttpSession;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.mockito.InjectMocks;\r
-import org.mockito.Mock;\r
-import org.mockito.Mockito;\r
-import org.mockito.MockitoAnnotations;\r
-import org.openecomp.portalapp.portal.controller.UserRolesController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.service.UserRolesService;\r
-import org.openecomp.portalapp.portal.test.core.MockEPUser;\r
-import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;\r
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;\r
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-\r
-public class UserRolesControllerTest extends MockitoTestSuite {\r
-\r
-       String userid = "sk434m";\r
-\r
-       @Mock\r
-       UserRolesService userRolesService;\r
-\r
-       @Mock\r
-       FieldsValidator fieldsValidator;\r
-\r
-       @InjectMocks\r
-       UserRolesController userRolesController = new UserRolesController();\r
-\r
-       @Mock\r
-       private DataAccessService dataAccessService;\r
-\r
-       @Before\r
-       public void setup() {\r
-               MockitoAnnotations.initMocks(this);\r
-       }\r
-\r
-       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();\r
-\r
-       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();\r
-       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();\r
-\r
-       @Mock\r
-       EPUserUtils ePUserUtils = new EPUserUtils();\r
-\r
-       @Mock\r
-       EPUser epuser;\r
-\r
-       MockEPUser mockUser = new MockEPUser();\r
-\r
-       @Test\r
-       public void putAppWithUserRoleRequestTest() {\r
-\r
-               FieldsValidator actualFieldsValidator = null;\r
-\r
-               AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser();\r
-               List<RoleInAppForUser> listofRoles = new ArrayList<RoleInAppForUser>();\r
-\r
-               appWithRolesForUser.setOrgUserId("guest");\r
-               appWithRolesForUser.setAppId((long) 550);\r
-               appWithRolesForUser.setAppName("D2 Services Analytics Dashboard");\r
-               appWithRolesForUser.setAppRoles(listofRoles);\r
-\r
-               RoleInAppForUser roleInAppForUser = new RoleInAppForUser();\r
-               roleInAppForUser.setIsApplied(false);\r
-               roleInAppForUser.setRoleId((long) 1);\r
-               roleInAppForUser.setRoleName("System Administrator");\r
-\r
-               RoleInAppForUser roleInAppForUser1 = new RoleInAppForUser();\r
-               roleInAppForUser1.setIsApplied(true);\r
-               roleInAppForUser1.setRoleId((long) 16);\r
-               roleInAppForUser1.setRoleName("Standard User");\r
-\r
-               listofRoles.add(roleInAppForUser);\r
-               listofRoles.add(roleInAppForUser1);\r
-               EPUser user = mockUser.mockEPUser();\r
-               FieldsValidator expectedFieldValidator = new FieldsValidator();\r
-               List<FieldName> fields = new ArrayList<>();\r
-\r
-               expectedFieldValidator.setHttpStatusCode((long) 200);\r
-               expectedFieldValidator.setFields(fields);\r
-               expectedFieldValidator.setErrorCode(null);\r
-               HttpSession session = mockedRequest.getSession();\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-\r
-               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);\r
-               Mockito.when(userRolesService.putUserAppRolesRequest(appWithRolesForUser, user))\r
-                               .thenReturn(expectedFieldValidator);\r
-\r
-               actualFieldsValidator = userRolesController.putAppWithUserRoleRequest(mockedRequest, appWithRolesForUser,\r
-                               mockedResponse);\r
-               assertEquals(expectedFieldValidator.getHttpStatusCode(), actualFieldsValidator.getHttpStatusCode());\r
-               assertEquals(expectedFieldValidator.getErrorCode(), actualFieldsValidator.getErrorCode());\r
-               assertEquals(expectedFieldValidator.getFields(), actualFieldsValidator.getFields());\r
-\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.UserRolesController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+public class UserRolesControllerTest extends MockitoTestSuite {
+
+       String userid = "ab1234";
+
+       @Mock
+       UserRolesService userRolesService;
+
+       @Mock
+       FieldsValidator fieldsValidator;
+
+       @InjectMocks
+       UserRolesController userRolesController = new UserRolesController();
+
+       @Mock
+       private DataAccessService dataAccessService;
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+       @Mock
+       EPUserUtils ePUserUtils = new EPUserUtils();
+
+       @Mock
+       EPUser epuser;
+
+       MockEPUser mockUser = new MockEPUser();
+
+       @Test
+       public void putAppWithUserRoleRequestTest() {
+
+               FieldsValidator actualFieldsValidator = null;
+
+               AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser();
+               List<RoleInAppForUser> listofRoles = new ArrayList<RoleInAppForUser>();
+
+               appWithRolesForUser.setOrgUserId("guest");
+               appWithRolesForUser.setAppId((long) 550);
+               appWithRolesForUser.setAppName("D2 Services Analytics Dashboard");
+               appWithRolesForUser.setAppRoles(listofRoles);
+
+               RoleInAppForUser roleInAppForUser = new RoleInAppForUser();
+               roleInAppForUser.setIsApplied(false);
+               roleInAppForUser.setRoleId((long) 1);
+               roleInAppForUser.setRoleName("System Administrator");
+
+               RoleInAppForUser roleInAppForUser1 = new RoleInAppForUser();
+               roleInAppForUser1.setIsApplied(true);
+               roleInAppForUser1.setRoleId((long) 16);
+               roleInAppForUser1.setRoleName("Standard User");
+
+               listofRoles.add(roleInAppForUser);
+               listofRoles.add(roleInAppForUser1);
+               EPUser user = mockUser.mockEPUser();
+               FieldsValidator expectedFieldValidator = new FieldsValidator();
+               List<FieldName> fields = new ArrayList<>();
+
+               expectedFieldValidator.setHttpStatusCode((long) 200);
+               expectedFieldValidator.setFields(fields);
+               expectedFieldValidator.setErrorCode(null);
+               HttpSession session = mockedRequest.getSession();
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+               Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+               Mockito.when(userRolesService.putUserAppRolesRequest(appWithRolesForUser, user))
+                               .thenReturn(expectedFieldValidator);
+
+               actualFieldsValidator = userRolesController.putAppWithUserRoleRequest(mockedRequest, appWithRolesForUser,
+                               mockedResponse);
+               assertEquals(expectedFieldValidator.getHttpStatusCode(), actualFieldsValidator.getHttpStatusCode());
+               assertEquals(expectedFieldValidator.getErrorCode(), actualFieldsValidator.getErrorCode());
+               assertEquals(expectedFieldValidator.getFields(), actualFieldsValidator.getFields());
+
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WebAnalyticsExtAppControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WebAnalyticsExtAppControllerTest.java
new file mode 100644 (file)
index 0000000..84ee4b1
--- /dev/null
@@ -0,0 +1,131 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.WebAnalyticsExtAppController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.AppsCacheService;
+import org.openecomp.portalapp.portal.service.AppsCacheServiceImple;
+import org.openecomp.portalapp.portal.transport.Analytics;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class,IOUtils.class,Object.class})
+public class WebAnalyticsExtAppControllerTest {
+
+       
+       
+       @InjectMocks
+       WebAnalyticsExtAppController webAnalyticsExtAppController = new WebAnalyticsExtAppController();
+
+       @Mock
+       AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+       
+       @Mock
+       AppsCacheService appCacheService = new AppsCacheServiceImple();
+
+       @Mock
+       AuditService auditService = new AuditServiceImpl();
+
+//     @Mock 
+//     InputStream analyticsFileStream;
+
+
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+       NullPointerException nullPointerException = new NullPointerException();
+       
+       @Test(expected= NullPointerException.class)
+       public void getAnalyticsScriptTest() throws Exception
+       {
+               String expectedResponse = "http://www.ecomp.com";
+
+               InputStream analyticsFileStream = null;
+               PowerMockito.mockStatic(SystemProperties.class);
+               PowerMockito.mockStatic(IOUtils.class);
+               Mockito.when(IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name())).thenReturn("PORTAL_ENV_URL");
+               Mockito.when(SystemProperties.getProperty("frontend_url")).thenReturn("http://www.ecomp.com/test");
+               //String actualResponse = webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);
+               webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);
+               //assertTrue(actualResponse.equals(expectedResponse));  
+       }
+
+       @Test(expected= NullPointerException.class)
+       public void getAnalyticsScriptExceptionTest() throws Exception
+       {
+               String expectedResponse = "";
+               InputStream analyticsFileStream = null;
+               PowerMockito.mockStatic(SystemProperties.class);
+               PowerMockito.mockStatic(IOUtils.class);
+               Mockito.when(IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name())).thenThrow(nullPointerException);
+               Mockito.when(SystemProperties.getProperty("frontend_url")).thenReturn("http://www.ecomp.com/test");
+       webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);
+       
+       }
+
+       @Test
+       public void storeAnalyticsScriptIfAnalyticsNullTest() throws Exception
+       {
+               PortalAPIResponse       expectedPortalAPIResponse = new PortalAPIResponse(true, "error");
+               Analytics analytics= null;
+               Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(null);
+               PortalAPIResponse       actualPortalAPIResponse =       webAnalyticsExtAppController.storeAnalyticsScript(mockedRequest, analytics);
+               assertTrue(expectedPortalAPIResponse.getMessage().equals(actualPortalAPIResponse.getMessage()));
+               assertTrue(expectedPortalAPIResponse.getStatus().equals(actualPortalAPIResponse.getStatus()));  
+       }
+       
+       @Test
+       public void storeAnalyticsScriptTest() throws Exception
+       {
+               PortalAPIResponse       expectedPortalAPIResponse = new PortalAPIResponse(true, "success");
+               Analytics analytics=  new Analytics();
+               Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn("Test_Key");
+               EPApp app = new EPApp();
+               Mockito.when(appCacheService.getAppForAnalytics("Test_Key")).thenReturn(app);
+               PortalAPIResponse       actualPortalAPIResponse =       webAnalyticsExtAppController.storeAnalyticsScript(mockedRequest, analytics);
+               assertTrue(expectedPortalAPIResponse.getMessage().equals(actualPortalAPIResponse.getMessage()));
+               assertTrue(expectedPortalAPIResponse.getStatus().equals(actualPortalAPIResponse.getStatus()));  
+       }
+       @Test
+       public void storeAnalyticsScriptIfAppNullTest() throws Exception
+       {
+               PortalAPIResponse       expectedPortalAPIResponse = new PortalAPIResponse(true, "success");
+               Analytics analytics=  new Analytics();
+               Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn("Test_Key");
+               Mockito.when(appCacheService.getAppForAnalytics("Test_Key")).thenReturn(null);
+               PortalAPIResponse       actualPortalAPIResponse =       webAnalyticsExtAppController.storeAnalyticsScript(mockedRequest, analytics);
+               assertTrue(expectedPortalAPIResponse.getMessage().equals(actualPortalAPIResponse.getMessage()));
+               assertTrue(expectedPortalAPIResponse.getStatus().equals(actualPortalAPIResponse.getStatus()));  
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogMarkupControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogMarkupControllerTest.java
new file mode 100644 (file)
index 0000000..1ba4c78
--- /dev/null
@@ -0,0 +1,71 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.WidgetsCatalogMarkupController;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(WidgetServiceHeaders.class)
+public class WidgetsCatalogMarkupControllerTest extends MockitoTestSuite {
+       
+       @InjectMocks
+       WidgetsCatalogMarkupController widgetsCatalogMarkupController = new WidgetsCatalogMarkupController();
+       
+       @Mock
+       ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+       
+       @Mock
+       RestTemplate template = new RestTemplate();
+       
+       @Before
+       public void setup() {
+               MockitoAnnotations.initMocks(this);
+       }
+    @Mock
+    CipherUtil cipherUtil= new CipherUtil();
+    
+    @Mock
+    EcompPortalUtils EcompPortalUtils =new EcompPortalUtils();
+       
+       @Mock
+       WidgetServiceHeaders WidgetServiceHeaders ;
+       
+       MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+       HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+       HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+       @SuppressWarnings("static-access")
+       @Test
+       public void getWidgetMarkupTest() throws RestClientException, Exception
+       {
+               String whatService = "widgets-service";
+               PowerMockito.mockStatic(WidgetServiceHeaders.class);
+               Mockito.when(template.getForObject("https://" + consulHealthService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class,
+                               WidgetServiceHeaders.getInstance())).thenReturn("Success");
+               String response = widgetsCatalogMarkupController.getWidgetMarkup(mockedRequest, mockedResponse, 1);
+               assertTrue(response.equals("Success")); 
+       }
+       
+}
index aa3c00d..344350e 100644 (file)
@@ -1,86 +1,84 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.core;\r
-\r
-import java.util.Date;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public class MockEPUser {\r
-\r
-       public EPUser mockEPUser() {\r
-\r
-               EPUser ePUser = new EPUser();\r
-               ePUser.setOrgId(null);\r
-               ePUser.setManagerId(null);\r
-               ePUser.setFirstName("test");\r
-               ePUser.setLastName("test");\r
-               ePUser.setMiddleInitial(null);\r
-               ePUser.setPhone(null);\r
-               ePUser.setFax(null);\r
-               ePUser.setCellular(null);\r
-               ePUser.setEmail(null);\r
-               ePUser.setAddressId(null);\r
-               ePUser.setAlertMethodCd(null);\r
-               ePUser.setHrid(null);\r
-               ePUser.setOrgUserId("guest");\r
-               ePUser.setOrgCode(null);\r
-               ePUser.setAddress1(null);\r
-               ePUser.setAddress2(null);\r
-               ePUser.setCity(null);\r
-               ePUser.setState(null);\r
-               ePUser.setZipCode(null);\r
-               ePUser.setCountry(null);\r
-               ePUser.setOrgManagerUserId(null);\r
-               ePUser.setLocationClli(null);\r
-               ePUser.setBusinessCountryCode(null);\r
-               ePUser.setBusinessCountryName(null);\r
-               ePUser.setBusinessUnit(null);\r
-               ePUser.setBusinessUnitName(null);\r
-               ePUser.setDepartment(null);\r
-               ePUser.setDepartmentName(null);\r
-               ePUser.setCompanyCode(null);\r
-               ePUser.setCompany(null);\r
-               ePUser.setZipCodeSuffix(null);\r
-               ePUser.setJobTitle(null);\r
-               ePUser.setCommandChain(null);\r
-               ePUser.setSiloStatus(null);\r
-               ePUser.setCostCenter(null);\r
-               ePUser.setFinancialLocCode(null);\r
-\r
-               ePUser.setLoginId(null);\r
-               ePUser.setLoginPwd(null);\r
-               Date date = new Date();\r
-               ePUser.setLastLoginDate(date);\r
-               ePUser.setActive(true);\r
-               ePUser.setInternal(false);\r
-               ePUser.setSelectedProfileId(null);\r
-               ePUser.setTimeZoneId(null);\r
-               ePUser.setOnline(true);\r
-               ePUser.setChatId(null);\r
-               ePUser.setUserApps(null);\r
-               ePUser.setPseudoRoles(null);\r
-\r
-               ePUser.setId((long) 99999999);\r
-\r
-               return ePUser;\r
-\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.core;
+
+import java.util.Date;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public class MockEPUser {
+
+       public EPUser mockEPUser() {
+
+               EPUser ePUser = new EPUser();
+               ePUser.setOrgId(null);
+               ePUser.setManagerId(null);
+               ePUser.setFirstName("test");
+               ePUser.setLastName("test");
+               ePUser.setMiddleInitial(null);
+               ePUser.setPhone(null);
+               ePUser.setFax(null);
+               ePUser.setCellular(null);
+               ePUser.setEmail(null);
+               ePUser.setAddressId(null);
+               ePUser.setAlertMethodCd(null);
+               ePUser.setHrid(null);
+               ePUser.setOrgUserId("guestT");
+               ePUser.setOrgCode(null);
+               ePUser.setAddress1(null);
+               ePUser.setAddress2(null);
+               ePUser.setCity(null);
+               ePUser.setState(null);
+               ePUser.setZipCode(null);
+               ePUser.setCountry(null);
+               ePUser.setOrgManagerUserId(null);
+               ePUser.setLocationClli(null);
+               ePUser.setBusinessCountryCode(null);
+               ePUser.setBusinessCountryName(null);
+               ePUser.setBusinessUnit(null);
+               ePUser.setBusinessUnitName(null);
+               ePUser.setDepartment(null);
+               ePUser.setDepartmentName(null);
+               ePUser.setCompanyCode(null);
+               ePUser.setCompany(null);
+               ePUser.setZipCodeSuffix(null);
+               ePUser.setJobTitle(null);
+               ePUser.setCommandChain(null);
+               ePUser.setSiloStatus(null);
+               ePUser.setCostCenter(null);
+               ePUser.setFinancialLocCode(null);
+
+               ePUser.setLoginId(null);
+               ePUser.setLoginPwd(null);
+               Date date = new Date();
+               ePUser.setLastLoginDate(date);
+               ePUser.setActive(true);
+               ePUser.setInternal(false);
+               ePUser.setSelectedProfileId(null);
+               ePUser.setTimeZoneId(null);
+               ePUser.setOnline(true);
+               ePUser.setChatId(null);
+               ePUser.setUserApps(null);
+               ePUser.setPseudoRoles(null);
+
+               ePUser.setId((long) -1);
+               return ePUser;
+       }
+}
index b04d200..8f99f44 100644 (file)
@@ -1,66 +1,66 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.core;\r
-\r
-import java.sql.Connection;\r
-import java.sql.SQLException;\r
-\r
-import javax.sql.DataSource;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.portalapp.portal.test.framework.ApplicationCommonContextTestSuite;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.core.io.ClassPathResource;\r
-import org.springframework.jdbc.datasource.DataSourceUtils;\r
-import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;\r
-\r
-public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {\r
-\r
-       @Autowired\r
-       DataSource dataSource;\r
-\r
-       @Before\r
-       public void populateTestData() throws SQLException {\r
-\r
-               String sql = "PopulateTestData.sql";\r
-               createConnection(sql);\r
-       }\r
-\r
-       public void createConnection(String sql) {\r
-               Connection connection = null;\r
-               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();\r
-               populator.addScript(new ClassPathResource(sql));\r
-               try {\r
-                       connection = DataSourceUtils.getConnection(dataSource);\r
-                       populator.populate(connection);\r
-               } finally {\r
-                       if (connection != null) {\r
-                               DataSourceUtils.releaseConnection(connection, dataSource);\r
-                       }\r
-               }\r
-       }\r
-\r
-       @Test\r
-       public void populateTest() {\r
-               assert (true);\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.core;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.jdbc.datasource.DataSourceUtils;
+import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+
+public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {
+
+       @Autowired
+       DataSource dataSource;
+
+       @Before
+       public void populateTestData() throws SQLException {
+
+               String sql = "PopulateTestData.sql";
+               createConnection(sql);
+       }
+
+       public void createConnection(String sql) {
+               Connection connection = null;
+               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+               populator.addScript(new ClassPathResource(sql));
+               try {
+                       connection = DataSourceUtils.getConnection(dataSource);
+                       populator.populate(connection);
+               } finally {
+                       if (connection != null) {
+                               DataSourceUtils.releaseConnection(connection, dataSource);
+                       }
+               }
+       }
+
+       @Test
+       public void populateTest() {
+               assert (true);
+       }
+
+}
index db9663f..c9954a6 100644 (file)
@@ -1,66 +1,65 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.core;\r
-\r
-import java.sql.Connection;\r
-import java.sql.SQLException;\r
-\r
-import javax.sql.DataSource;\r
-\r
-import org.junit.After;\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.openecomp.portalapp.portal.test.framework.ApplicationCommonContextTestSuite;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.core.io.ClassPathResource;\r
-import org.springframework.jdbc.datasource.DataSourceUtils;\r
-import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;\r
-\r
-public class RemoveSampleTestData extends ApplicationCommonContextTestSuite {\r
-       @Autowired\r
-       DataSource dataSource;\r
-\r
-       public static int count = 0;\r
-\r
-       @After\r
-       public void removeTestData() throws SQLException {\r
-               String sql = "RemoveTestData.sql";\r
-               createConnection(sql);\r
-       }\r
-\r
-       public void createConnection(String sql) {\r
-               Connection connection = null;\r
-               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();\r
-               populator.addScript(new ClassPathResource(sql));\r
-               try {\r
-                       connection = DataSourceUtils.getConnection(dataSource);\r
-                       populator.populate(connection);\r
-               } finally {\r
-                       if (connection != null) {\r
-                               DataSourceUtils.releaseConnection(connection, dataSource);\r
-                       }\r
-               }\r
-       }\r
-\r
-       @Test\r
-       public void removeTest() {\r
-               assert (true);\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.core;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import javax.sql.DataSource;
+
+import org.junit.After;
+import org.junit.Test;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.jdbc.datasource.DataSourceUtils;
+import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+
+public class RemoveSampleTestData extends ApplicationCommonContextTestSuite {
+       @Autowired
+       DataSource dataSource;
+
+       public static int count = 0;
+
+       @After
+       public void removeTestData() throws SQLException {
+               String sql = "RemoveTestData.sql";
+               createConnection(sql);
+       }
+
+       public void createConnection(String sql) {
+               Connection connection = null;
+               ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+               populator.addScript(new ClassPathResource(sql));
+               try {
+                       connection = DataSourceUtils.getConnection(dataSource);
+                       populator.populate(connection);
+               } finally {
+                       if (connection != null) {
+                               DataSourceUtils.releaseConnection(connection, dataSource);
+                       }
+               }
+       }
+
+       @Test
+       public void removeTest() {
+               assert (true);
+       }
+}
index f90b27e..10108cd 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.core;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import java.io.IOException;\r
-import java.nio.charset.Charset;\r
-import java.util.ArrayList;\r
-\r
-import org.junit.Assert;\r
-import org.junit.Test;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.test.core.MockEPUser;\r
-import org.openecomp.portalapp.portal.test.framework.ApplicationCommonContextTestSuite;\r
-import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;\r
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.http.MediaType;\r
-import org.springframework.test.web.servlet.ResultActions;\r
-import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;\r
-import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-/**\r
- * \r
- * @author sk434m Use RestURLsTestSuite to test Rest API URL's\r
- */\r
-public class RestURLsTestSuite extends ApplicationCommonContextTestSuite {\r
-\r
-       public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(MediaType.APPLICATION_JSON.getType(),\r
-                       MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8"));\r
-\r
-       String url = null;\r
-\r
-       MockEPUser mockUser = new MockEPUser();\r
-\r
-       public byte[] convertObjectToJsonBytes(Object object) throws IOException {\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);\r
-               return mapper.writeValueAsBytes(object);\r
-       }\r
-\r
-       public void requestBuilder(String url) throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(url);\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertData(ra);\r
-       }\r
-\r
-       public void assertData(ResultActions ra) {\r
-               Assert.assertEquals("application/json", ra.andReturn().getResponse().getContentType());\r
-               Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getMenuItemsTest() throws Exception {\r
-\r
-               url = "/portalApi/functionalMenu";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getMenuItemsForNotificationsTest() throws Exception {\r
-               url = "/portalApi/functionalMenuForNotificationTree";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getUserAppsTestnew() throws Exception {\r
-\r
-               url = "/portalApi/userApps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getPersUserAppsTest() throws Exception {\r
-\r
-               url = "/portalApi/persUserApps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAppCatalogTest() throws Exception {\r
-\r
-               url = "/portalApi/appCatalog";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAppListNewTest() throws Exception {\r
-               ResultActions ra = getMockMvc()\r
-                               .perform(MockMvcRequestBuilders.get("/portalApi/userApplicationRoles").param("userId", "guest"));\r
-               assertData(ra);\r
-       }\r
-\r
-       @Test\r
-       public void getAvailableAppListTest() throws Exception {\r
-               url = "/portalApi/availableApps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAllAppsTest() throws Exception {\r
-               url = "/portalApi/allAvailableApps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getUserProfileTest() throws Exception {\r
-               url = "/portalApi/userProfile";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getRolesByAppTest() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/adminAppsRoles/550");\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertData(ra);\r
-       }\r
-\r
-       @Test\r
-       public void getAppsWithAdminRoleStateForUserTest() throws Exception {\r
-               url = "/portalApi/adminAppsRoles?user=guest";\r
-               requestBuilder(url);\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getUsersFromAppEndpointTest() throws Exception {\r
-               url = "/portalApi/app/550/users";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getOnboardingAppsTest() throws Exception {\r
-               url = "/portalApi/onboardingApps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getMenuItemsForAuthUserTest() throws Exception {\r
-               url = "/portalApi/functionalMenuForAuthUser";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getMenuItemsForEditingTest() throws Exception {\r
-               url = "/portalApi/functionalMenuForEditing";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAppRolesTest() throws Exception {\r
-               url = "/portalApi/appRoles/455";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void regenerateAncestorTableTest() throws Exception {\r
-\r
-               EPUser user = mockUser.mockEPUser();\r
-\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders\r
-                               .get("/portalApi/regenerateFunctionalMenuAncestors");\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertEquals("application/json;charset=UTF-8", ra.andReturn().getResponse().getContentType());\r
-               Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());\r
-\r
-       }\r
-\r
-       @Test\r
-       public void getAppListTest() throws Exception {\r
-               url = "/portalApi/getAppList";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getFavoritesForUserTest() throws Exception {\r
-               url = "/portalApi/getFavoriteItems";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getManifestTest() throws Exception {\r
-               url = "/portalApi/manifest";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getActiveUsersTest() throws Exception {\r
-               url = "/portalApi/dashboard/activeUsers";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void searchPortalTest() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/search")\r
-                               .param("searchString", "guest");\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertData(ra);\r
-       }\r
-\r
-       @Test\r
-       public void getWidgetDataTest() throws Exception {\r
-               EPUser user = mockUser.mockEPUser();\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/widgetData")\r
-                               .param("resourceType", "guest");\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertData(ra);\r
-       }\r
-\r
-       @Test\r
-       public void getAppsAndContactsTest() throws Exception {\r
-               url = "/portalApi/contactus/allapps";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getPortalDetailsTest() throws Exception {\r
-               url = "/portalApi/contactus/feedback";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAppCategoryFunctionsTest() throws Exception {\r
-               url = "/portalApi/contactus/functions";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getOnlineUserUpdateRateTest() throws Exception {\r
-               url = "/portalApi/dashboard/onlineUserUpdateRate";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getMenuIdRoleIdTest() throws Exception {\r
-               url = "/portalApi/getFunctionalMenuRole";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getNotificationsTest() throws Exception {\r
-               url = "/portalApi/getNotifications";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getAdminNotificationsTest() throws Exception {\r
-               url = "/portalApi/getAdminNotifications";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getNotificationAppRolesTest() throws Exception {\r
-               url = "/portalApi/getNotificationAppRoles";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void getNotificationUpdateRateTest() throws Exception {\r
-               url = "/portalApi/notificationUpdateRate";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void notificationReadTest() throws Exception {\r
-               url = "/portalApi/notificationRead?notificationId=262";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void testGetRolesTest() throws Exception {\r
-               url = "/portalApi/notificationRole/248/roles";\r
-               requestBuilder(url);\r
-       }\r
-\r
-       @Test\r
-       public void putAppsWithAdminRoleStateForUserTest() throws Exception {\r
-\r
-               AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();\r
-               appsListWithAdminRole.setOrgUserId("guest");\r
-               ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();\r
-               AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();\r
-               appNameIdIsAdmin.setId((long) 455);\r
-               appNameIdIsAdmin.setAppName("CCD");\r
-               appNameIdIsAdmin.setIsAdmin(true);\r
-               appNameIdIsAdmin.setRestrictedApp(false);\r
-               appsRoles.add(appNameIdIsAdmin);\r
-               appsListWithAdminRole.setAppsRoles(appsRoles);\r
-               EPUser user = mockUser.mockEPUser();\r
-               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put("/portalApi/adminAppsRoles")\r
-                               .contentType(APPLICATION_JSON_UTF8).content(convertObjectToJsonBytes(appsListWithAdminRole));\r
-\r
-               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-               ResultActions ra = getMockMvc().perform(requestBuilder);\r
-               assertData(ra);\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.core;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.http.MediaType;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * 
+ * Use RestURLsTestSuite to test Rest API URL's
+ */
+public class RestURLsTestSuite extends ApplicationCommonContextTestSuite {
+
+       public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(MediaType.APPLICATION_JSON.getType(),
+                       MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8"));
+
+       String url = null;
+
+       MockEPUser mockUser = new MockEPUser();
+
+       public byte[] convertObjectToJsonBytes(Object object) throws IOException {
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+               return mapper.writeValueAsBytes(object);
+       }
+
+       public void requestBuilder(String url) throws Exception {
+               EPUser user = mockUser.mockEPUser();
+
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(url);
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertData(ra);
+       }
+
+       public void assertData(ResultActions ra) {
+               Assert.assertEquals("application/json", ra.andReturn().getResponse().getContentType());
+               Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+
+       }
+
+       @Test
+       public void getMenuItemsTest() throws Exception {
+               url = "/portalApi/functionalMenu";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getMenuItemsForNotificationsTest() throws Exception {
+               url = "/portalApi/functionalMenuForNotificationTree";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getUserAppsTestnew() throws Exception {
+               url = "/portalApi/userApps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getPersUserAppsTest() throws Exception {
+               url = "/portalApi/persUserApps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAppCatalogTest() throws Exception {
+               url = "/portalApi/appCatalog";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAppListNewTest() throws Exception {
+               ResultActions ra = getMockMvc()
+                               .perform(MockMvcRequestBuilders.get("/portalApi/userApplicationRoles").param("userId", "guest"));
+               assertData(ra);
+       }
+
+       @Test
+       public void getAvailableAppListTest() throws Exception {
+               url = "/portalApi/availableApps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAllAppsTest() throws Exception {
+               url = "/portalApi/allAvailableApps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getUserProfileTest() throws Exception {
+               url = "/portalApi/userProfile";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getRolesByAppTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/adminAppsRoles/550");
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertData(ra);
+       }
+
+       @Test
+       public void getAppsWithAdminRoleStateForUserTest() throws Exception {
+               url = "/portalApi/adminAppsRoles?user=guest";
+               requestBuilder(url);
+
+       }
+
+       @Test
+       public void getUsersFromAppEndpointTest() throws Exception {
+               url = "/portalApi/app/550/users";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getOnboardingAppsTest() throws Exception {
+               url = "/portalApi/onboardingApps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getMenuItemsForAuthUserTest() throws Exception {
+               url = "/portalApi/functionalMenuForAuthUser";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getMenuItemsForEditingTest() throws Exception {
+               url = "/portalApi/functionalMenuForEditing";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAppRolesTest() throws Exception {
+               url = "/portalApi/appRoles/455";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void regenerateAncestorTableTest() throws Exception {
+
+               EPUser user = mockUser.mockEPUser();
+
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders
+                               .get("/portalApi/regenerateFunctionalMenuAncestors");
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertEquals("application/json;charset=UTF-8", ra.andReturn().getResponse().getContentType());
+               Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+
+       }
+
+       @Test
+       public void getAppListTest() throws Exception {
+               url = "/portalApi/getAppList";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getFavoritesForUserTest() throws Exception {
+               url = "/portalApi/getFavoriteItems";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getManifestTest() throws Exception {
+               url = "/portalApi/manifest";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getActiveUsersTest() throws Exception {
+               url = "/portalApi/dashboard/activeUsers";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void searchPortalTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/search")
+                               .param("searchString", "guest");
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertData(ra);
+       }
+
+       @Test
+       public void getWidgetDataTest() throws Exception {
+               EPUser user = mockUser.mockEPUser();
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/widgetData")
+                               .param("resourceType", "guest");
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertData(ra);
+       }
+
+       @Test
+       public void getAppsAndContactsTest() throws Exception {
+               url = "/portalApi/contactus/allapps";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getPortalDetailsTest() throws Exception {
+               url = "/portalApi/contactus/feedback";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAppCategoryFunctionsTest() throws Exception {
+               url = "/portalApi/contactus/functions";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getOnlineUserUpdateRateTest() throws Exception {
+               url = "/portalApi/dashboard/onlineUserUpdateRate";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getMenuIdRoleIdTest() throws Exception {
+               url = "/portalApi/getFunctionalMenuRole";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getNotificationsTest() throws Exception {
+               url = "/portalApi/getNotifications";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getAdminNotificationsTest() throws Exception {
+               url = "/portalApi/getAdminNotifications";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getNotificationAppRolesTest() throws Exception {
+               url = "/portalApi/getNotificationAppRoles";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void getNotificationUpdateRateTest() throws Exception {
+               url = "/portalApi/notificationUpdateRate";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void notificationReadTest() throws Exception {
+               url = "/portalApi/notificationRead?notificationId=262";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void testGetRolesTest() throws Exception {
+               url = "/portalApi/notificationRole/248/roles";
+               requestBuilder(url);
+       }
+
+       @Test
+       public void putAppsWithAdminRoleStateForUserTest() throws Exception {
+
+               AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();
+               appsListWithAdminRole.setOrgUserId("guest");
+               ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+               AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+               appNameIdIsAdmin.setId((long) 455);
+               appNameIdIsAdmin.setAppName("CCD");
+               appNameIdIsAdmin.setIsAdmin(true);
+               appNameIdIsAdmin.setRestrictedApp(false);
+               appsRoles.add(appNameIdIsAdmin);
+               appsListWithAdminRole.setAppsRoles(appsRoles);
+               EPUser user = mockUser.mockEPUser();
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put("/portalApi/adminAppsRoles")
+                               .contentType(APPLICATION_JSON_UTF8).content(convertObjectToJsonBytes(appsListWithAdminRole));
+
+               requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertData(ra);
+       }
+
+       @Test
+       public void ticketEventControllerForExternalSystem() throws Exception {
+               String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\",  \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",      \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+               MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/auxapi/ticketevent")
+                               .contentType(APPLICATION_JSON_UTF8).content(ticketEventJson);
+               ResultActions ra = getMockMvc().perform(requestBuilder);
+               assertTrue(ra.andReturn().getResponse().getContentType().contains("application/json"));
+       }
+}
index 8030dca..d7930c1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.framework;\r
-\r
-import java.io.IOException;\r
-\r
-import org.junit.Before;\r
-import org.junit.Test;\r
-import org.junit.runner.RunWith;\r
-import org.openecomp.portalsdk.core.conf.AppConfig;\r
-//import org.openecomp.portalapp.conf.ExternalAppConfig;\r
-//import org.openecomp.portalapp.conf.HibernateMappingLocations;\r
-import org.openecomp.portalsdk.core.conf.HibernateConfiguration;\r
-import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;\r
-import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;\r
-import org.openecomp.portalsdk.core.util.CacheManager;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.ComponentScan;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.FilterType;\r
-import org.springframework.context.annotation.Profile;\r
-import org.springframework.core.io.ClassPathResource;\r
-import org.springframework.core.io.Resource;\r
-import org.springframework.test.context.ActiveProfiles;\r
-import org.springframework.test.context.ContextConfiguration;\r
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;\r
-import org.springframework.test.context.transaction.TransactionConfiguration;\r
-import org.springframework.test.context.web.AnnotationConfigWebContextLoader;\r
-import org.springframework.test.context.web.WebAppConfiguration;\r
-import org.springframework.test.web.servlet.MockMvc;\r
-import org.springframework.test.web.servlet.setup.MockMvcBuilders;\r
-import org.springframework.transaction.annotation.Transactional;\r
-import org.springframework.web.context.WebApplicationContext;\r
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;\r
-\r
-/**\r
- * \r
- * In order to write a unit test, 1. inherit this class 2. place the "war"\r
- * folder on your test class's classpath 3. run the test with the following VM\r
- * argument; This is important because when starting the application from\r
- * Container, the System Properties file (SystemProperties.java) can have the\r
- * direct path but, when running from the Mock Junit container, the path should\r
- * be prefixed with "classpath" to enable the mock container to search for the\r
- * file in the classpath -Dcontainer.classpath="classpath:"\r
- */\r
-\r
-@SuppressWarnings("deprecation")\r
-@RunWith(SpringJUnit4ClassRunner.class)\r
-@WebAppConfiguration\r
-@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = { MockAppConfig.class })\r
-@ActiveProfiles(value = "test")\r
-public class ApplicationCommonContextTestSuite {\r
-\r
-       @Autowired\r
-       public WebApplicationContext wac;\r
-\r
-       private MockMvc mockMvc;\r
-\r
-       @Before\r
-       public void setup() {\r
-               if (mockMvc == null) {\r
-                       this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();\r
-\r
-               }\r
-       }\r
-\r
-       public Object getBean(String name) {\r
-               return this.wac.getBean(name);\r
-       }\r
-\r
-       public MockMvc getMockMvc() {\r
-               return mockMvc;\r
-       }\r
-\r
-       public void setMockMvc(MockMvc mockMvc) {\r
-               this.mockMvc = mockMvc;\r
-       }\r
-\r
-       public WebApplicationContext getWebApplicationContext() {\r
-               return wac;\r
-       }\r
-\r
-}\r
-\r
-@Configuration\r
-@ComponentScan(basePackages = "org.openecomp", excludeFilters = {\r
-               // the following source configurations should not be scanned; instead of\r
-               // using Exclusion filter, we can use the @Profile annotation to exclude\r
-               // them\r
-               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.LogoutController*"),\r
-               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.SDKLoginController*"),\r
-               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalapp.conf.ExternalAppConfig*"),\r
-               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.*.*InitUebHandler*") })\r
-@Profile("test")\r
-class MockAppConfig extends AppConfig {\r
-\r
-       @Bean\r
-       HibernateMappingLocatable locatable() {\r
-               return new MockHibernateMappingLocations();\r
-       }\r
-\r
-       @Bean\r
-       HibernateConfiguration hibConfiguration() {\r
-               return new HibernateConfiguration();\r
-       }\r
-\r
-       @Bean\r
-       public SystemProperties systemProperties() {\r
-               return new MockSystemProperties();\r
-       }\r
-\r
-       @Bean\r
-       public AbstractCacheManager cacheManager() {\r
-               return new CacheManager() {\r
-\r
-                       public void configure() throws IOException {\r
-\r
-                       }\r
-               };\r
-       }\r
-\r
-       public String[] tileDefinitions() {\r
-               return new String[] { "classpath:/WEB-INF/fusion/defs/definitions.xml",\r
-                               "classpath:/WEB-INF/defs/definitions.xml" };\r
-       }\r
-\r
-       public void addInterceptors(InterceptorRegistry registry) {\r
-               // registry.addInterceptor(new\r
-               // SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());\r
-               // registry.addInterceptor(resourceInterceptor());\r
-       }\r
-\r
-       public static class MockSystemProperties extends SystemProperties {\r
-\r
-               public MockSystemProperties() {\r
-               }\r
-\r
-       }\r
-\r
-}\r
-\r
-@Profile("test")\r
-class MockHibernateMappingLocations implements HibernateMappingLocatable {\r
-\r
-       public Resource[] getMappingLocations() {\r
-               return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),\r
-                               new ClassPathResource("WEB-INF/fusion/orm/EP.hbm.xml"),\r
-                               new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") };\r
-\r
-       }\r
-\r
-       public String[] getPackagesToScan() {\r
-               return new String[] { "org.openecomp", "src" };\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.framework;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openecomp.portalsdk.core.conf.AppConfig;
+//import org.openecomp.portalapp.conf.ExternalAppConfig;
+//import org.openecomp.portalapp.conf.HibernateMappingLocations;
+import org.openecomp.portalsdk.core.conf.HibernateConfiguration;
+import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;
+import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
+import org.openecomp.portalsdk.core.util.CacheManager;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.transaction.TransactionConfiguration;
+import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+
+/**
+ * 
+ * In order to write a unit test, 1. inherit this class 2. place the "war"
+ * folder on your test class's classpath 3. run the test with the following VM
+ * argument; This is important because when starting the application from
+ * Container, the System Properties file (SystemProperties.java) can have the
+ * direct path but, when running from the Mock Junit container, the path should
+ * be prefixed with "classpath" to enable the mock container to search for the
+ * file in the classpath -Dcontainer.classpath="classpath:"
+ */
+
+@SuppressWarnings("deprecation")
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = { MockAppConfig.class })
+@ActiveProfiles(value = "test")
+public class ApplicationCommonContextTestSuite {
+
+       @Autowired
+       public WebApplicationContext wac;
+
+       private MockMvc mockMvc;
+
+       @Before
+       public void setup() {
+               if (mockMvc == null) {
+                       this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+
+               }
+       }
+
+       public Object getBean(String name) {
+               return this.wac.getBean(name);
+       }
+
+       public MockMvc getMockMvc() {
+               return mockMvc;
+       }
+
+       public void setMockMvc(MockMvc mockMvc) {
+               this.mockMvc = mockMvc;
+       }
+
+       public WebApplicationContext getWebApplicationContext() {
+               return wac;
+       }
+
+}
+
+@Configuration
+@ComponentScan(basePackages = "org.openecomp", excludeFilters = {
+               // the following source configurations should not be scanned; instead of
+               // using Exclusion filter, we can use the @Profile annotation to exclude
+               // them
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.LogoutController*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.SDKLoginController*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalapp.conf.ExternalAppConfig*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.*.*InitUebHandler*") })
+@Profile("test")
+class MockAppConfig extends AppConfig {
+
+       @Bean
+       HibernateMappingLocatable locatable() {
+               return new MockHibernateMappingLocations();
+       }
+
+       @Bean
+       HibernateConfiguration hibConfiguration() {
+               return new HibernateConfiguration();
+       }
+
+       @Bean
+       public SystemProperties systemProperties() {
+               return new MockSystemProperties();
+       }
+
+       @Bean
+       public AbstractCacheManager cacheManager() {
+               return new CacheManager() {
+
+                       public void configure() throws IOException {
+
+                       }
+               };
+       }
+
+       public String[] tileDefinitions() {
+               return new String[] { "classpath:/WEB-INF/fusion/defs/definitions.xml",
+                               "classpath:/WEB-INF/defs/definitions.xml" };
+       }
+
+       public void addInterceptors(InterceptorRegistry registry) {
+               // registry.addInterceptor(new
+               // SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+               // registry.addInterceptor(resourceInterceptor());
+       }
+
+       public static class MockSystemProperties extends SystemProperties {
+
+               public MockSystemProperties() {
+               }
+
+       }
+
+}
+
+@Profile("test")
+class MockHibernateMappingLocations implements HibernateMappingLocatable {
+
+       public Resource[] getMappingLocations() {
+               return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),
+                               new ClassPathResource("WEB-INF/fusion/orm/EP.hbm.xml"),
+                               new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") };
+
+       }
+
+       public String[] getPackagesToScan() {
+               return new String[] { "org.openecomp", "src" };
+       }
+
+}
index 614e2ac..44019aa 100644 (file)
@@ -1,70 +1,70 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.framework;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletRequestWrapper;\r
-import javax.servlet.http.HttpServletResponse;\r
-import javax.servlet.http.HttpSession;\r
-\r
-import org.junit.runner.RunWith;\r
-import org.mockito.Mockito;\r
-import org.mockito.runners.MockitoJUnitRunner;\r
-\r
-@RunWith(MockitoJUnitRunner.class)\r
-public class MockitoTestSuite {\r
-\r
-\r
-       public MockHttpServletRequestWrapper mockedRequest = new MockHttpServletRequestWrapper(\r
-                       Mockito.mock(HttpServletRequest.class));\r
-       public HttpServletResponse mockedResponse = Mockito.mock(HttpServletResponse.class);\r
-\r
-       public MockHttpServletRequestWrapper getMockedRequest() {\r
-               return mockedRequest;\r
-       }\r
-\r
-       public HttpServletResponse getMockedResponse() {\r
-               return mockedResponse;\r
-       }\r
-\r
-       public class MockHttpServletRequestWrapper extends HttpServletRequestWrapper {\r
-\r
-               HttpSession session = Mockito.mock(HttpSession.class);\r
-\r
-               public MockHttpServletRequestWrapper(HttpServletRequest request) {\r
-                       super(request);\r
-\r
-               }\r
-\r
-               @Override\r
-               public HttpSession getSession() {\r
-\r
-                       return session;\r
-               }\r
-\r
-               @Override\r
-               public HttpSession getSession(boolean create) {\r
-\r
-                       return session;\r
-               }\r
-\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.framework;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MockitoTestSuite {
+
+
+       public MockHttpServletRequestWrapper mockedRequest = new MockHttpServletRequestWrapper(
+                       Mockito.mock(HttpServletRequest.class));
+       public HttpServletResponse mockedResponse = Mockito.mock(HttpServletResponse.class);
+
+       public MockHttpServletRequestWrapper getMockedRequest() {
+               return mockedRequest;
+       }
+
+       public HttpServletResponse getMockedResponse() {
+               return mockedResponse;
+       }
+
+       public class MockHttpServletRequestWrapper extends HttpServletRequestWrapper {
+
+               HttpSession session = Mockito.mock(HttpSession.class);
+
+               public MockHttpServletRequestWrapper(HttpServletRequest request) {
+                       super(request);
+
+               }
+
+               @Override
+               public HttpSession getSession() {
+
+                       return session;
+               }
+
+               @Override
+               public HttpSession getSession(boolean create) {
+
+                       return session;
+               }
+
+       }
+
+}
index 7aa2029..2ca02ba 100644 (file)
@@ -1,88 +1,73 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.test.service;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertTrue;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.junit.Test;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.test.framework.ApplicationCommonContextTestSuite;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-\r
-\r
-\r
-\r
-public class FunctionalMenuServiceImplTest extends ApplicationCommonContextTestSuite{\r
-\r
-       \r
-        @Autowired\r
-        FunctionalMenuService functionalMenuService;\r
-               \r
-       \r
-       \r
-         @Test\r
-         public void getAppListTestService() throws Exception {\r
-                               \r
-               String userId ="guest";\r
-               List<BusinessCardApplicationRole> userAppRolesActualResult = null;\r
-               \r
-               List<BusinessCardApplicationRole> userAppRolesExpectedResult = new ArrayList<BusinessCardApplicationRole>();\r
-               BusinessCardApplicationRole businessCardApplicationRole= new BusinessCardApplicationRole();\r
-               businessCardApplicationRole.setAppName("ECOMP Portal");\r
-               businessCardApplicationRole.setRoleName("System Administrator");        \r
-               userAppRolesExpectedResult.add(businessCardApplicationRole);\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               params.put("userId", userId);\r
-               userAppRolesActualResult =functionalMenuService.getUserAppRolesList(userId);\r
-               assertTrue(userAppRolesActualResult.contains(businessCardApplicationRole));\r
-       \r
-  \r
-        }\r
-       \r
-\r
-         @Test\r
-         public void getFunctionalMenuRoleTest() throws Exception {\r
-               \r
-               FunctionalMenuRole expectedFunctionalMenuRole = new FunctionalMenuRole();\r
-               \r
-               expectedFunctionalMenuRole.setId(new Integer(99999999)) ;\r
-               expectedFunctionalMenuRole.setMenuId((long) 137);\r
-               expectedFunctionalMenuRole.setAppId(new Integer(456));\r
-               expectedFunctionalMenuRole.setRoleId(new Integer(6214));\r
-               List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;\r
-               actualFunctionalMenuRoleList =  functionalMenuService.getFunctionalMenuRole();\r
-               assertEquals(expectedFunctionalMenuRole.getAppId(),actualFunctionalMenuRoleList.get(actualFunctionalMenuRoleList.size()-1).getAppId());\r
-               assertEquals(expectedFunctionalMenuRole.getMenuId(),actualFunctionalMenuRoleList.get(actualFunctionalMenuRoleList.size()-1).getMenuId());\r
-               assertEquals(expectedFunctionalMenuRole.getId(),actualFunctionalMenuRoleList.get(actualFunctionalMenuRoleList.size()-1).getId());\r
-               assertEquals(expectedFunctionalMenuRole.getRoleId(),actualFunctionalMenuRoleList.get(actualFunctionalMenuRoleList.size()-1).getRoleId());\r
-               \r
-       }\r
-       \r
-}\r
-\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class FunctionalMenuServiceImplTest extends ApplicationCommonContextTestSuite {
+
+       @Autowired
+       FunctionalMenuService functionalMenuService;
+
+       @Test
+       public void getAppListTestService() throws Exception {
+
+               String userId = "guestT";
+               List<BusinessCardApplicationRole> userAppRolesActualResult = null;
+
+               List<BusinessCardApplicationRole> userAppRolesExpectedResult = new ArrayList<BusinessCardApplicationRole>();
+               BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+               businessCardApplicationRole.setAppName("ECOMP Portal");
+               businessCardApplicationRole.setRoleName("System Administrator");
+               userAppRolesExpectedResult.add(businessCardApplicationRole);
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("userId", userId);
+               userAppRolesActualResult = functionalMenuService.getUserAppRolesList(userId);
+               assertTrue(userAppRolesActualResult.contains(businessCardApplicationRole));
+
+       }
+
+       @Test
+       public void getFunctionalMenuRoleTest() throws Exception {
+
+               FunctionalMenuRole expectedFunctionalMenuRole = new FunctionalMenuRole();
+               expectedFunctionalMenuRole.setId(new Integer(-1));
+
+               expectedFunctionalMenuRole.setMenuId((long) 137);
+               expectedFunctionalMenuRole.setAppId(new Integer(456));
+               expectedFunctionalMenuRole.setRoleId(new Integer(6214));
+               List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;
+               actualFunctionalMenuRoleList = functionalMenuService.getFunctionalMenuRole();
+               assertTrue(actualFunctionalMenuRoleList.contains(expectedFunctionalMenuRole));
+
+       }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/ApplicationCommonContextTestSuite.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/ApplicationCommonContextTestSuite.java
new file mode 100644 (file)
index 0000000..cba7c57
--- /dev/null
@@ -0,0 +1,175 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.test.framework;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openecomp.portalsdk.core.conf.AppConfig;
+//import org.openecomp.portalapp.conf.ExternalAppConfig;
+//import org.openecomp.portalapp.conf.HibernateMappingLocations;
+import org.openecomp.portalsdk.core.conf.HibernateConfiguration;
+import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;
+import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
+import org.openecomp.portalsdk.core.util.CacheManager;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.transaction.TransactionConfiguration;
+import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+
+/**
+ * 
+ * In order to write a unit test, 1. inherit this class 2. place the "war"
+ * folder on your test class's classpath 3. run the test with the following VM
+ * argument; This is important because when starting the application from
+ * Container, the System Properties file (SystemProperties.java) can have the
+ * direct path but, when running from the Mock Junit container, the path should
+ * be prefixed with "classpath" to enable the mock container to search for the
+ * file in the classpath -Dcontainer.classpath="classpath:"
+ */
+
+@SuppressWarnings("deprecation")
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = { MockAppConfig.class })
+@ActiveProfiles(value = "test")
+public class ApplicationCommonContextTestSuite {
+
+       @Autowired
+       public WebApplicationContext wac;
+
+       private MockMvc mockMvc;
+
+       @Before
+       public void setup() {
+               if (mockMvc == null) {
+                       this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+
+               }
+       }
+
+       public Object getBean(String name) {
+               return this.wac.getBean(name);
+       }
+
+       public MockMvc getMockMvc() {
+               return mockMvc;
+       }
+
+       public void setMockMvc(MockMvc mockMvc) {
+               this.mockMvc = mockMvc;
+       }
+
+       public WebApplicationContext getWebApplicationContext() {
+               return wac;
+       }
+
+}
+
+@Configuration
+@ComponentScan(basePackages = "org.openecomp", excludeFilters = {
+               // the following source configurations should not be scanned; instead of
+               // using Exclusion filter, we can use the @Profile annotation to exclude
+               // them
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.LogoutController*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.SDKLoginController*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalapp.conf.ExternalAppConfig*"),
+               @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.*.*InitUebHandler*") })
+@Profile("test")
+class MockAppConfig extends AppConfig {
+
+       @Bean
+       HibernateMappingLocatable locatable() {
+               return new MockHibernateMappingLocations();
+       }
+
+       @Bean
+       HibernateConfiguration hibConfiguration() {
+               return new HibernateConfiguration();
+       }
+
+       @Bean
+       public SystemProperties systemProperties() {
+               return new MockSystemProperties();
+       }
+
+       @Bean
+       public AbstractCacheManager cacheManager() {
+               return new CacheManager() {
+
+                       public void configure() throws IOException {
+
+                       }
+               };
+       }
+
+       public String[] tileDefinitions() {
+               return new String[] { "classpath:/WEB-INF/fusion/defs/definitions.xml",
+                               "classpath:/WEB-INF/defs/definitions.xml" };
+       }
+
+       public void addInterceptors(InterceptorRegistry registry) {
+               // registry.addInterceptor(new
+               // SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+               // registry.addInterceptor(resourceInterceptor());
+       }
+
+       public static class MockSystemProperties extends SystemProperties {
+
+               public MockSystemProperties() {
+               }
+
+       }
+
+}
+
+@Profile("test")
+class MockHibernateMappingLocations implements HibernateMappingLocatable {
+
+       public Resource[] getMappingLocations() {
+               return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),
+                               new ClassPathResource("WEB-INF/fusion/orm/EP.hbm.xml"),
+                               new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") };
+
+       }
+
+       public String[] getPackagesToScan() {
+               return new String[] { "org.openecomp", "src" };
+       }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/MockitoTestSuite.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/framework/MockitoTestSuite.java
new file mode 100644 (file)
index 0000000..8c5d3d2
--- /dev/null
@@ -0,0 +1,70 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.test.framework;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MockitoTestSuite {
+
+
+       public MockHttpServletRequestWrapper mockedRequest = new MockHttpServletRequestWrapper(
+                       Mockito.mock(HttpServletRequest.class));
+       public HttpServletResponse mockedResponse = Mockito.mock(HttpServletResponse.class);
+
+       public MockHttpServletRequestWrapper getMockedRequest() {
+               return mockedRequest;
+       }
+
+       public HttpServletResponse getMockedResponse() {
+               return mockedResponse;
+       }
+
+       public class MockHttpServletRequestWrapper extends HttpServletRequestWrapper {
+
+               HttpSession session = Mockito.mock(HttpSession.class);
+
+               public MockHttpServletRequestWrapper(HttpServletRequest request) {
+                       super(request);
+
+               }
+
+               @Override
+               public HttpSession getSession() {
+
+                       return session;
+               }
+
+               @Override
+               public HttpSession getSession(boolean create) {
+
+                       return session;
+               }
+
+       }
+
+}
index 6972ec9..116ba75 100644 (file)
@@ -1,28 +1,32 @@
----\r
--- ================================================================================\r
--- ECOMP Portal\r
--- ================================================================================\r
--- Copyright (C) 2017 AT&T Intellectual Property\r
--- ================================================================================\r
--- Licensed under the Apache License, Version 2.0 (the "License");\r
--- you may not use this file except in compliance with the License.\r
--- You may obtain a copy of the License at\r
--- \r
---      http://www.apache.org/licenses/LICENSE-2.0\r
--- \r
--- Unless required by applicable law or agreed to in writing, software\r
--- distributed under the License is distributed on an "AS IS" BASIS,\r
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
--- See the License for the specific language governing permissions and\r
--- limitations under the License.\r
--- ================================================================================\r
----\r
-insert into fn_user values(99999999,null,null,'test',null,'test',null,null,null,null,null,null,null,'guest',null,null,null,null,true,null,null,null,null,false,null,null,null,\r
-null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);\r
-insert into fn_user_role values(99999999,1, null,1);\r
-insert into fn_user_role values(99999999,16, null,1);\r
-insert into fn_user_role values(99999999,999, null,1);\r
-insert into fn_user_role values(99999999,1010, null,1);\r
-insert into fn_menu_functional values(99999999,3,'Network Analytics',5,'http://vm-d2novasdn3.client.research.att.com:8080/d2novasdn-1/welcome.htm','Y',null);\r
-insert into fn_menu_functional_roles values(99999999, 137,456, 6214);\r
-insert into fn_menu_favorites values(3, 141);\r
+---
+-- ================================================================================
+-- ECOMP Portal
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+-- 
+--      http://www.apache.org/licenses/LICENSE-2.0
+-- 
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ================================================================================
+---
+insert into fn_user values(-1,null,null,'test',null,'test',null,null,null,null,null,null,null,'guestT',null,null,null,null,true,null,null,null,null,false,null,null,null,
+null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
+insert into fn_user_role values(-1,1, null,1);
+insert into fn_user_role values(-1,16, null,1);
+insert into fn_user_role values(-1,999, null,1);
+insert into fn_user_role values(-1,1010, null,1);
+insert into fn_menu_functional values(-1,3,'Network Analytics',5,'http://vm-d2novasdn3.client.research.att.com:8080/d2novasdn-1/welcome.htm','Y',null);
+insert into fn_menu_functional_roles values(-1, 137,456, 6214);
+insert into fn_menu_favorites values(-1, 141);
+insert into ep_web_analytics_source values(-1,1,'test_url','test');
+INSERT INTO ep_notification (notification_ID, is_for_online_users, is_for_all_roles, active_YN, msg_header, msg_description,msg_source,start_time,end_time,priority,creator_ID,created_date)
+VALUES ('-1', 'Y', 'N', 'Y', 'CISCO_1921C1_ISR_G2', '{}','aotstm','2017-03-26 12:18:55.0','2017-04-25 12:18:55.0','2',NULL,'2017-04-25 21:18:11.0');
+INSERT INTO ep_role_notification (ID,notification_ID,role_ID,recv_user_id ) VALUES (0,-1,NULL,10)
index 158508f..5a3000a 100644 (file)
@@ -1,27 +1,31 @@
----\r
--- ================================================================================\r
--- ECOMP Portal\r
--- ================================================================================\r
--- Copyright (C) 2017 AT&T Intellectual Property\r
--- ================================================================================\r
--- Licensed under the Apache License, Version 2.0 (the "License");\r
--- you may not use this file except in compliance with the License.\r
--- You may obtain a copy of the License at\r
--- \r
---      http://www.apache.org/licenses/LICENSE-2.0\r
--- \r
--- Unless required by applicable law or agreed to in writing, software\r
--- distributed under the License is distributed on an "AS IS" BASIS,\r
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
--- See the License for the specific language governing permissions and\r
--- limitations under the License.\r
--- ================================================================================\r
----\r
-delete from fn_user_role where user_id ='99999999';\r
-delete from ep_user_notification where user_id='99999999';\r
-delete from fn_audit_log where user_id='99999999';\r
-delete from fn_user where user_id='99999999';\r
-delete from fn_menu_functional_roles where id='99999999';\r
-delete from fn_menu_functional_ancestors where menu_id=99999999;\r
-delete from fn_menu_functional where menu_id='99999999';\r
-delete from fn_menu_favorites where user_id=3 and menu_id=141;\r
+---
+-- ================================================================================
+-- ECOMP Portal
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+-- 
+--      http://www.apache.org/licenses/LICENSE-2.0
+-- 
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ================================================================================
+---
+delete from fn_user_role where user_id =-1;
+delete from ep_user_notification where user_id=-1;
+delete from fn_audit_log where user_id=-1;
+delete from fn_menu_favorites where user_id=-1 and menu_id=141;
+delete from fn_user where user_id=-1;
+delete from fn_menu_functional_roles where id=-1;
+delete from fn_menu_functional_ancestors where menu_id=-1;
+delete from fn_menu_functional where menu_id=-1;
+delete from fn_menu_favorites where user_id=-1 and menu_id=141;
+delete from ep_web_analytics_source where resource_id=-1;
+delete from ep_role_notification where notification_ID='-1';
+delete from ep_notification where notification_ID='-1';
diff --git a/ecomp-portal-BE-common/README.md b/ecomp-portal-BE-common/README.md
new file mode 100644 (file)
index 0000000..70d4ef2
--- /dev/null
@@ -0,0 +1,10 @@
+# ECOMP Portal Web Application Back End Common Files
+
+## Overview
+
+This is a Maven overlay project with the ECOMP Portal back-end common files. 
+This is not a stand-alone web application.  This project has common Java classes
+that are used in the internal and ONAP versions of the ECOMP Portal web application. 
+Those specific versions are built using separate Maven projects that copy in
+("overlay") the contents of this project at package time and that use the jar
+built by this project.
\ No newline at end of file
index 9fb41d3..bff7ed2 100644 (file)
@@ -19,7 +19,6 @@
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
                <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
-               <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
        </properties>
 
        <repositories>
                        <name>OpenECOMP - Snapshot Repository</name>
                        <url>${nexusproxy}/${snapshotNexusPath}</url>
                </repository>
-               <repository>
-                       <!-- Staging repository has ECOMP staging artifacts -->
-                       <id>ecomp-staging</id>
-                       <name>OpenECOMP - Staging Repository</name>
-                       <url>${nexusproxy}/${stagingNexusPath}</url>
-               </repository>
        </repositories>
 
        <profiles>
index 76d4b18..e8f828f 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package jarutil;\r
-\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.OutputStream;\r
-import java.io.Reader;\r
-import java.io.Writer;\r
-import java.net.URL;\r
-import java.util.ArrayList;\r
-import java.util.jar.JarEntry;\r
-import java.util.jar.JarInputStream;\r
-\r
-public class ExtractJar {\r
-\r
-       /**\r
-        * @param args\r
-        */\r
-       \r
-       public static int bufferSize = 8192;\r
-       public static String JARFILE = "raptor_upgrade.jar";\r
-        \r
-       public static void main(String[] args) throws Exception {\r
-               if(args.length > 0 && args[0]!=null && args[0].length()>0)\r
-                       extractFilesFromJar(args[0]);\r
-               else {\r
-                       System.out.println("Current Directory is taken as webapp path");\r
-                       String currentDir = new File(".").getAbsolutePath();\r
-                       extractFilesFromJar(currentDir);\r
-               }\r
-       }\r
-       \r
-    public static void readJar(File jarFile) throws Exception{\r
-        JarInputStream in = new JarInputStream(new FileInputStream(jarFile));\r
-        ArrayList entries = new ArrayList( );\r
-        JarEntry je;\r
-        while((je=in.getNextJarEntry( ))!=null){\r
-                if( je.isDirectory() == false ) {\r
-                        if(je.getName().startsWith("att/raptor/config/")) {\r
-                                //while((je=in.getNextJarEntry( ))!=null) {\r
-                                        System.out.println(je.getName() + " " + je.getTime());\r
-                                //}\r
-                                \r
-                        }\r
-                }\r
-        }\r
-        in.close( );\r
-    }\r
-    \r
-    public static void extractFilesFromJar(String directory) throws IOException{\r
-        //JarFile jar = new JarFile(jarFile);\r
-        Class clazz = ExtractJar.class;\r
-               String classContainer = clazz.getProtectionDomain().getCodeSource().getLocation().toString();\r
-               //System.out.println("classContainer ---------> " + classContainer);\r
-           URL jarUrl = clazz.getProtectionDomain().getCodeSource().getLocation();\r
-               \r
-        JarInputStream entryStream = new JarInputStream(jarUrl.openStream()); \r
-        JarEntry entry;\r
-        while(true) {\r
-            entry = entryStream.getNextJarEntry();\r
-            if(entry == null)\r
-                break;\r
-          if(entry.getName().indexOf("jarutil") < 0) {\r
-               System.out.println(entry.getName());\r
-                  File file=new File(directory,entry.getName());\r
-               if(entry.isDirectory()) {\r
-                  if (!file.exists())\r
-                          file.mkdirs();\r
-               } else {\r
-                   // make directory (some jars don't list dirs)\r
-                   File dir = new File(file.getParent());\r
-                   if (!dir.exists())\r
-                       dir.mkdirs();\r
-                    if(file.exists()) file.delete();  \r
-                   // Make file\r
-                   FileOutputStream fout = new FileOutputStream(file);\r
-                   copy(entryStream,fout);\r
-                   fout.close();\r
-\r
-                   // touch the file.\r
-                   if (entry.getTime()>=0)\r
-                       file.setLastModified(entry.getTime());\r
-               }\r
-               \r
-          }\r
-         entryStream.closeEntry(); \r
-        }\r
-        entryStream.close();\r
-        System.out.println("************************************************");\r
-        System.out.println("*                                              *");\r
-        System.out.println("*                                              *");\r
-        System.out.println("*          RAPTOR SETUP COMPLETE.              *");\r
-        System.out.println("*                                              *");\r
-        System.out.println("*         Thank you for upgrading.             *");\r
-        System.out.println("*                                              *");\r
-        System.out.println("************************************************");\r
-    }\r
-    \r
-       \r
-    public static void copy(InputStream in,  OutputStream out, long byteCount)\r
-                                                                                                               throws IOException {     \r
-       byte buffer[] = new byte[bufferSize];\r
-       int len=bufferSize;\r
-       if (byteCount>=0) {\r
-               while (byteCount>0) {\r
-                       if (byteCount<bufferSize)\r
-                               len=in.read(buffer,0,(int)byteCount);\r
-                       else\r
-                               len=in.read(buffer,0,bufferSize);                   \r
-                       if (len==-1)\r
-                               break;\r
-\r
-                       byteCount -= len;\r
-                       out.write(buffer,0,len);\r
-               }\r
-       } else {\r
-               while (true) {\r
-                       len=in.read(buffer,0,bufferSize);\r
-                       if (len<0 )\r
-                               break;\r
-                       out.write(buffer,0,len);\r
-               }\r
-       }\r
-    }  \r
-\r
-/* ------------------------------------------------------------------- */\r
-/** Copy Reader to Writer for byteCount bytes or until EOF or exception.\r
-*/\r
-    public static void copy(Reader in, Writer out, long byteCount)\r
-                                                                               throws IOException {  \r
-       char buffer[] = new char[bufferSize];\r
-       int len=bufferSize;\r
-       if (byteCount>=0) {\r
-               while (byteCount>0) {\r
-                       if (byteCount<bufferSize)\r
-                               len=in.read(buffer,0,(int)byteCount);\r
-                       else\r
-                               len=in.read(buffer,0,bufferSize);                   \r
-\r
-                       if (len==-1)\r
-                               break;\r
-                       byteCount -= len;\r
-                       out.write(buffer,0,len);\r
-               }\r
-       } else {\r
-               while (true) {\r
-                       len=in.read(buffer,0,bufferSize);\r
-                       if (len==-1)\r
-                               break;\r
-                       out.write(buffer,0,len);\r
-               }\r
-       }\r
-    }\r
-\r
-    /* ------------------------------------------------------------------- */\r
-    /** Copy Stream in to Stream out until EOF or exception.\r
-     */\r
-    public static void copy(InputStream in, OutputStream out)\r
-         throws IOException\r
-    {\r
-        copy(in,out,-1);\r
-    }\r
-    \r
-    // Deletes all files and subdirectories under dir.\r
-    // Returns true if all deletions were successful.\r
-    // If a deletion fails, the method stops attempting to delete and returns false.\r
-    public static boolean deleteDir(File dir) {\r
-        if (dir.isDirectory()) {\r
-            String[] children = dir.list();\r
-            for (int i=0; i<children.length; i++) {\r
-                boolean success = deleteDir(new File(dir, children[i]));\r
-                if (!success) {\r
-                    return false;\r
-                }\r
-            }\r
-        }\r
-    \r
-        // The directory is now empty so delete it\r
-        return dir.delete();\r
-    }\r
-    \r
-    \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package jarutil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.jar.JarEntry;
+import java.util.jar.JarInputStream;
+
+public class ExtractJar {
+
+       /**
+        * @param args
+        */
+       
+       public static int bufferSize = 8192;
+       public static String JARFILE = "raptor_upgrade.jar";
+        
+       public static void main(String[] args) throws Exception {
+               if(args.length > 0 && args[0]!=null && args[0].length()>0)
+                       extractFilesFromJar(args[0]);
+               else {
+                       System.out.println("Current Directory is taken as webapp path");
+                       String currentDir = new File(".").getAbsolutePath();
+                       extractFilesFromJar(currentDir);
+               }
+       }
+       
+    public static void readJar(File jarFile) throws Exception{
+        JarInputStream in = new JarInputStream(new FileInputStream(jarFile));
+        ArrayList entries = new ArrayList( );
+        JarEntry je;
+        while((je=in.getNextJarEntry( ))!=null){
+                if( je.isDirectory() == false ) {
+                        if(je.getName().startsWith("att/raptor/config/")) {
+                                //while((je=in.getNextJarEntry( ))!=null) {
+                                        System.out.println(je.getName() + " " + je.getTime());
+                                //}
+                                
+                        }
+                }
+        }
+        in.close( );
+    }
+    
+    public static void extractFilesFromJar(String directory) throws IOException{
+        //JarFile jar = new JarFile(jarFile);
+        Class clazz = ExtractJar.class;
+               String classContainer = clazz.getProtectionDomain().getCodeSource().getLocation().toString();
+               //System.out.println("classContainer ---------> " + classContainer);
+           URL jarUrl = clazz.getProtectionDomain().getCodeSource().getLocation();
+               
+        JarInputStream entryStream = new JarInputStream(jarUrl.openStream()); 
+        JarEntry entry;
+        while(true) {
+            entry = entryStream.getNextJarEntry();
+            if(entry == null)
+                break;
+          if(entry.getName().indexOf("jarutil") < 0) {
+               System.out.println(entry.getName());
+                  File file=new File(directory,entry.getName());
+               if(entry.isDirectory()) {
+                  if (!file.exists())
+                          file.mkdirs();
+               } else {
+                   // make directory (some jars don't list dirs)
+                   File dir = new File(file.getParent());
+                   if (!dir.exists())
+                       dir.mkdirs();
+                    if(file.exists()) file.delete();  
+                   // Make file
+                   FileOutputStream fout = new FileOutputStream(file);
+                   copy(entryStream,fout);
+                   fout.close();
+
+                   // touch the file.
+                   if (entry.getTime()>=0)
+                       file.setLastModified(entry.getTime());
+               }
+               
+          }
+         entryStream.closeEntry(); 
+        }
+        entryStream.close();
+        System.out.println("************************************************");
+        System.out.println("*                                              *");
+        System.out.println("*                                              *");
+        System.out.println("*          RAPTOR SETUP COMPLETE.              *");
+        System.out.println("*                                              *");
+        System.out.println("*         Thank you for upgrading.             *");
+        System.out.println("*                                              *");
+        System.out.println("************************************************");
+    }
+    
+       
+    public static void copy(InputStream in,  OutputStream out, long byteCount)
+                                                                                                               throws IOException {     
+       byte buffer[] = new byte[bufferSize];
+       int len=bufferSize;
+       if (byteCount>=0) {
+               while (byteCount>0) {
+                       if (byteCount<bufferSize)
+                               len=in.read(buffer,0,(int)byteCount);
+                       else
+                               len=in.read(buffer,0,bufferSize);                   
+                       if (len==-1)
+                               break;
+
+                       byteCount -= len;
+                       out.write(buffer,0,len);
+               }
+       } else {
+               while (true) {
+                       len=in.read(buffer,0,bufferSize);
+                       if (len<0 )
+                               break;
+                       out.write(buffer,0,len);
+               }
+       }
+    }  
+
+/* ------------------------------------------------------------------- */
+/** Copy Reader to Writer for byteCount bytes or until EOF or exception.
+*/
+    public static void copy(Reader in, Writer out, long byteCount)
+                                                                               throws IOException {  
+       char buffer[] = new char[bufferSize];
+       int len=bufferSize;
+       if (byteCount>=0) {
+               while (byteCount>0) {
+                       if (byteCount<bufferSize)
+                               len=in.read(buffer,0,(int)byteCount);
+                       else
+                               len=in.read(buffer,0,bufferSize);                   
+
+                       if (len==-1)
+                               break;
+                       byteCount -= len;
+                       out.write(buffer,0,len);
+               }
+       } else {
+               while (true) {
+                       len=in.read(buffer,0,bufferSize);
+                       if (len==-1)
+                               break;
+                       out.write(buffer,0,len);
+               }
+       }
+    }
+
+    /* ------------------------------------------------------------------- */
+    /** Copy Stream in to Stream out until EOF or exception.
+     */
+    public static void copy(InputStream in, OutputStream out)
+         throws IOException
+    {
+        copy(in,out,-1);
+    }
+    
+    // Deletes all files and subdirectories under dir.
+    // Returns true if all deletions were successful.
+    // If a deletion fails, the method stops attempting to delete and returns false.
+    public static boolean deleteDir(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i=0; i<children.length; i++) {
+                boolean success = deleteDir(new File(dir, children[i]));
+                if (!success) {
+                    return false;
+                }
+            }
+        }
+    
+        // The directory is now empty so delete it
+        return dir.delete();
+    }
+    
+    
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanup.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanup.java
new file mode 100644 (file)
index 0000000..d525d9b
--- /dev/null
@@ -0,0 +1,40 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.config;
+
+import java.util.TimerTask;
+
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+public class NotificationCleanup extends TimerTask {
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(NotificationCleanup.class);
+
+       @Override
+       public void run() {
+               logger.debug(EELFLoggerDelegate.debugLogger, "run: cleaning the ep-notification table");
+               UserNotificationService notificationService = NotificationCleanupConfig.getApplicationContext()
+                               .getBean(UserNotificationService.class);
+               notificationService.deleteNotificationsFromEpUserNotificationTable();
+               notificationService.deleteNotificationsFromEpRoleNotificationTable();
+               notificationService.deleteNotificationsFromEpNotificationTable();
+       }
+
+}
\ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanupConfig.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/config/NotificationCleanupConfig.java
new file mode 100644 (file)
index 0000000..90e5ecf
--- /dev/null
@@ -0,0 +1,62 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.config;
+
+import java.util.Timer;
+import java.util.TimerTask;
+
+import javax.annotation.PostConstruct;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class NotificationCleanupConfig implements ApplicationContextAware {
+       
+       // Once every 10 minutes should be adequate
+       public final static int CLEANUP_PERIOD_MINUTES = 10;
+       
+       private static ApplicationContext applicationContext;
+
+       public void setApplicationContext(ApplicationContext context) throws BeansException {
+               applicationContext = context;
+       }
+
+       public static ApplicationContext getApplicationContext() {
+               return applicationContext;
+
+       }
+
+       @PostConstruct
+       public void StartSchedular() {
+               TimerTask task = new NotificationCleanup();
+               Timer timer = new Timer();
+               timer.schedule(task, 1000, CLEANUP_PERIOD_MINUTES * 60 * 1000);
+       }
+
+       @Bean
+       public NotificationCleanupConfig getConfig() {
+               return new NotificationCleanupConfig();
+       }
+
+}
\ No newline at end of file
index 7082fe7..7d2c050 100644 (file)
@@ -1,58 +1,58 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.config;\r
-\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.Configuration;\r
-\r
-import springfox.documentation.builders.ApiInfoBuilder;\r
-import springfox.documentation.builders.PathSelectors;\r
-import springfox.documentation.builders.RequestHandlerSelectors;\r
-import springfox.documentation.service.ApiInfo;\r
-import springfox.documentation.spi.DocumentationType;\r
-import springfox.documentation.spring.web.plugins.Docket;\r
-import springfox.documentation.swagger2.annotations.EnableSwagger2;\r
-\r
-@Configuration\r
-@EnableSwagger2\r
-public class SwaggerConfig {\r
-\r
-    @Bean\r
-    public Docket api(){\r
-        return new Docket(DocumentationType.SWAGGER_2)\r
-            .select()\r
-            .apis(RequestHandlerSelectors.any())\r
-            .paths(PathSelectors.regex("/auxapi/.*"))\r
-            .build()\r
-            .apiInfo(apiInfo());\r
-    }\r
-\r
-    private ApiInfo apiInfo() {\r
-        return new ApiInfoBuilder()\r
-            .title("ECOMP Portal API Documentation")\r
-            .description("ECOMP Portal API Documentation")\r
-            .version("1.2.6")\r
-            .termsOfServiceUrl("http://terms-of-services.url")\r
-            .license("LICENSE")\r
-            .licenseUrl("http://url-to-license.com")\r
-            .build();\r
-    }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+
+    @Bean
+    public Docket api(){
+        return new Docket(DocumentationType.SWAGGER_2)
+            .select()
+            .apis(RequestHandlerSelectors.any())
+            .paths(PathSelectors.regex("/auxapi/.*"))
+            .build()
+            .apiInfo(apiInfo());
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+            .title("ECOMP Portal API Documentation")
+            .description("ECOMP Portal API Documentation")
+            .version("1.2.6")
+            .termsOfServiceUrl("http://terms-of-services.url")
+            .license("LICENSE")
+            .licenseUrl("http://url-to-license.com")
+            .build();
+    }
+
+}
index 7e2d454..ff59d42 100644 (file)
@@ -1,37 +1,37 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.config;\r
-\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.web.servlet.config.annotation.EnableWebMvc;\r
-import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;\r
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;\r
-\r
-@Configuration\r
-@EnableWebMvc\r
-public class SwaggerMVCConfig extends WebMvcConfigurerAdapter {\r
-\r
-    @Override \r
-    public void addResourceHandlers(ResourceHandlerRegistry registry) {\r
-        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");\r
-        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");\r
-    }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+@Configuration
+@EnableWebMvc
+public class SwaggerMVCConfig extends WebMvcConfigurerAdapter {
+
+    @Override 
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+    }
+
+}
index f958d2b..72d6737 100644 (file)
@@ -1,41 +1,38 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.externalsystemapproval.model;\r
-\r
-import java.io.Serializable;\r
-\r
-\r
-public class ExternalSystemRoleApproval implements Serializable{\r
-       \r
-\r
-       private static final long serialVersionUID = 6048830318039958615L;\r
-       \r
-       private String roleName ;\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.externalsystemapproval.model;
+
+import java.io.Serializable;
+
+public class ExternalSystemRoleApproval implements Serializable {
+
+       private static final long serialVersionUID = 6048830318039958615L;
+
+       private String roleName;
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+
+}
index f3ccd14..38787b5 100644 (file)
@@ -1,74 +1,74 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.externalsystemapproval.model;\r
-\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-public class ExternalSystemUser {\r
-\r
-       private String loginId;\r
-       \r
-       private String applicationName;\r
-       \r
-       private String myloginrequestId;\r
-       \r
-       private List<ExternalSystemRoleApproval> roles;\r
-\r
-       public ExternalSystemUser() {\r
-               roles = new ArrayList<ExternalSystemRoleApproval>();\r
-       }\r
-\r
-       public String getApplicationName() {\r
-               return applicationName;\r
-       }\r
-\r
-       public void setApplicationName(String applicationName) {\r
-               this.applicationName = applicationName;\r
-       }\r
-\r
-       public String getLoginId() {\r
-               return loginId;\r
-       }\r
-\r
-       public void setLoginId(String loginId) {\r
-               this.loginId = loginId;\r
-       }\r
-\r
-       public List<ExternalSystemRoleApproval> getRoles() {\r
-               return roles;\r
-       }\r
-\r
-       public void setRoles(List<ExternalSystemRoleApproval> roles) {\r
-               this.roles = roles;\r
-       }\r
-\r
-       public String getMyloginrequestId() {\r
-               return myloginrequestId;\r
-       }\r
-\r
-       public void setMyloginrequestId(String myloginrequestId) {\r
-               this.myloginrequestId = myloginrequestId;\r
-       }\r
-       \r
-       \r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.externalsystemapproval.model;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ExternalSystemUser {
+
+       private String loginId;
+       
+       private String applicationName;
+       
+       private String myloginrequestId;
+       
+       private List<ExternalSystemRoleApproval> roles;
+
+       public ExternalSystemUser() {
+               roles = new ArrayList<ExternalSystemRoleApproval>();
+       }
+
+       public String getApplicationName() {
+               return applicationName;
+       }
+
+       public void setApplicationName(String applicationName) {
+               this.applicationName = applicationName;
+       }
+
+       public String getLoginId() {
+               return loginId;
+       }
+
+       public void setLoginId(String loginId) {
+               this.loginId = loginId;
+       }
+
+       public List<ExternalSystemRoleApproval> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(List<ExternalSystemRoleApproval> roles) {
+               this.roles = roles;
+       }
+
+       public String getMyloginrequestId() {
+               return myloginrequestId;
+       }
+
+       public void setMyloginrequestId(String myloginrequestId) {
+               this.myloginrequestId = myloginrequestId;
+       }
+       
+       
+
+}
index e932995..8979b3f 100644 (file)
@@ -1,88 +1,88 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.lm;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.servlet.ServletContext;\r
-\r
-import org.openecomp.portalsdk.core.lm.FusionLicenseManager;\r
-import org.springframework.stereotype.Component;\r
-\r
-/*\r
- *  Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface.\r
- */\r
-\r
-@Component\r
-public class FusionLicenseManagerImpl implements FusionLicenseManager {\r
-\r
-       @Override\r
-       public void initKeyStoreParam() {\r
-               \r
-       }\r
-       \r
-       @Override\r
-       public void initCipherParam() {\r
-               \r
-       }\r
-\r
-       @Override       \r
-       public void initLicenseParam() {\r
-               \r
-       }\r
-\r
-       @Override\r
-       public void doInitWork() {\r
-               \r
-       }\r
-\r
-       @Override\r
-       public int installLicense() {\r
-               return 0;\r
-       }\r
-\r
-       @Override\r
-       public synchronized int verifyLicense(ServletContext context) {\r
-               return 0;\r
-       }\r
-\r
-       @Override\r
-       public void generateLicense(Map<String, String> clientInfoMap, List<String> ipAddressList) throws Exception {\r
-               \r
-       }\r
-       \r
-       @Override\r
-       public String nvl(String s) {\r
-               return null;\r
-       }\r
-\r
-       @Override\r
-       public Date getExpiredDate() {\r
-               return null;\r
-       }\r
-\r
-       @Override       \r
-       public void setExpiredDate(Date expiredDate) {\r
-               \r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.lm;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+import org.openecomp.portalsdk.core.lm.FusionLicenseManager;
+import org.springframework.stereotype.Component;
+
+/*
+ *  Please note that this class is not being used; its a dummy stub to have a qualifying bean for the interface.
+ */
+
+@Component
+public class FusionLicenseManagerImpl implements FusionLicenseManager {
+
+       @Override
+       public void initKeyStoreParam() {
+               
+       }
+       
+       @Override
+       public void initCipherParam() {
+               
+       }
+
+       @Override       
+       public void initLicenseParam() {
+               
+       }
+
+       @Override
+       public void doInitWork() {
+               
+       }
+
+       @Override
+       public int installLicense() {
+               return 0;
+       }
+
+       @Override
+       public synchronized int verifyLicense(ServletContext context) {
+               return 0;
+       }
+
+       @Override
+       public void generateLicense(Map<String, String> clientInfoMap, List<String> ipAddressList) throws Exception {
+               
+       }
+       
+       @Override
+       public String nvl(String s) {
+               return null;
+       }
+
+       @Override
+       public Date getExpiredDate() {
+               return null;
+       }
+
+       @Override       
+       public void setExpiredDate(Date expiredDate) {
+               
+       }
+
+}
index a799f49..5260a47 100644 (file)
@@ -25,18 +25,10 @@ import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.EnableAspectJAutoProxy;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-
 import org.openecomp.portalapp.controller.EPRestrictedBaseController;
 import org.openecomp.portalapp.portal.domain.EPApp;
 import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
 import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
 import org.openecomp.portalapp.portal.service.AdminRolesService;
 import org.openecomp.portalapp.portal.service.EPAppService;
@@ -44,28 +36,40 @@ import org.openecomp.portalapp.portal.service.PersUserAppService;
 import org.openecomp.portalapp.portal.transport.AppCatalogPersonalization;
 import org.openecomp.portalapp.portal.transport.FieldsValidator;
 import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
 import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
 
 @RestController
 @org.springframework.context.annotation.Configuration
 @EnableAspectJAutoProxy
 @EPAuditLog
 public class AppCatalogController extends EPRestrictedBaseController {
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppCatalogController.class);
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppCatalogController.class);
 
        @Autowired
-       AdminRolesService adminRolesService;
+       private AdminRolesService adminRolesService;
        @Autowired
-       EPAppService appService;
+       private EPAppService appService;
        @Autowired
-       PersUserAppService persUserAppService;
+       private PersUserAppService persUserAppService;
 
        /**
         * RESTful service method to fetch all enabled applications, with details
         * about which are accessible to the current user, selected by the current
         * user.
         * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @throws IOException If sendError fails
         * @return List of items suitable for display
         */
        @RequestMapping(value = { "/portalApi/appCatalog" }, method = RequestMethod.GET, produces = "application/json")
@@ -81,10 +85,10 @@ public class AppCatalogController extends EPRestrictedBaseController {
                                        appCatalog = appService.getAdminAppCatalog(user);
                                else
                                        appCatalog = appService.getUserAppCatalog(user);
-                               EcompPortalUtils.logAndSerializeObject(logger,"/portalApi/getAppCatalog", "GET result =", appCatalog);
+                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/getAppCatalog", "GET result =", appCatalog);
                        }
                } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "Failed in getAppCatalog", e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppCatalog failed", e);
                        response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
                }
                return appCatalog;
@@ -95,11 +99,13 @@ public class AppCatalogController extends EPRestrictedBaseController {
         * catalog.
         * 
         * @param request
-        * @param selectRequest
+        *            HttpServletRequest
+        * @param persRequest
         *            JSON with data including application ID
         * @param response
+        *            HttpServletResponse
         * @return FieldsValidator
-        * @throws IOException
+        * @throws IOException If sendError fails
         */
        @RequestMapping(value = { "/portalApi/appCatalog" }, method = RequestMethod.PUT, produces = "application/json")
        public FieldsValidator putAppCatalogSelection(HttpServletRequest request,
@@ -114,7 +120,7 @@ public class AppCatalogController extends EPRestrictedBaseController {
                                persUserAppService.setPersUserAppValue(user, app, persRequest.getSelect(), persRequest.getPending());
                        }
                } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "Failed in putAppCatalogSelection", e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "putAppCatalogSelection failed", e);
                        response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
                }
                result.httpStatusCode = new Long(HttpServletResponse.SC_OK);
index 9b476e0..7e78104 100644 (file)
@@ -63,8 +63,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
         * Answers a JSON object with three items from the system.properties file:
         * user self-help ticket URL, email for feedback, and Portal info link.
         * 
-        * @param request
-        * @return
+        * @param request HttpServletRequest
+        * @return PortalRestResponse
         */
        @RequestMapping(value = "/feedback", method = RequestMethod.GET, produces = "application/json")
        public PortalRestResponse<String> getPortalDetails(HttpServletRequest request) {
@@ -91,8 +91,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
         * Answers the contents of the contact-us table, extended with the
         * application name.
         * 
-        * @param request
-        * @return
+        * @param request HttpServletRequest
+        * @return PortalRestResponse<List<AppContactUsItem>>
         */
        @RequestMapping(value = "/list", method = RequestMethod.GET, produces = "application/json")
        public PortalRestResponse<List<AppContactUsItem>> getAppContactUsList(HttpServletRequest request) {
@@ -113,8 +113,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
         * Answers a list of objects, one per application, extended with available
         * data on how to contact that app's organization (possibly none).
         * 
-        * @param request
-        * @return
+        * @param request HttpServletRequest
+        * @return PortalRestResponse<List<AppContactUsItem>>
         */
        @RequestMapping(value = "/allapps", method = RequestMethod.GET, produces = "application/json")
        public PortalRestResponse<List<AppContactUsItem>> getAppsAndContacts(HttpServletRequest request) {
@@ -145,8 +145,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
         * Answers a list of objects with category-application-function details. Not
         * all applications participate in the functional menu.
         * 
-        * @param request
-        * @return
+        * @param request HttpServletRequest
+        * @return PortalRestResponse<List<AppCategoryFunctionsItem>>
         */
        @RequestMapping(value = "/functions", method = RequestMethod.GET, produces = "application/json")
        public PortalRestResponse<List<AppCategoryFunctionsItem>> getAppCategoryFunctions(HttpServletRequest request) {
@@ -171,8 +171,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
        /**
         * Accepts a new application's contact us details.
         * 
-        * @param contactUs
-        * @return
+        * @param contactUs AppContactUsItem
+        * @return PortalRestResponse<String>
         */
        @RequestMapping(value = "/save", method = RequestMethod.POST, produces = "application/json")
        public PortalRestResponse<String> save(@RequestBody AppContactUsItem contactUs) {
@@ -206,8 +206,8 @@ public class AppContactUsController extends EPRestrictedBaseController {
         * Deletes the specified application's contact-us details entry from the
         * table.
         * 
-        * @param id
-        * @return
+        * @param id app ID
+        * @return PortalRestResponse<String>
         */
        @RequestMapping(value = "/delete/{appid}", method = RequestMethod.POST, produces = "application/json")
        public PortalRestResponse<String> delete(@PathVariable("appid") Long id) {
index 7a05d67..2c1da82 100644 (file)
@@ -80,7 +80,11 @@ public class AppsController extends EPRestrictedBaseController {
         * RESTful service method to fetch all Applications available to current
         * user
         * 
-        * @return
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List<EcompApp>
         */
        @RequestMapping(value = { "/portalApi/userApps" }, method = RequestMethod.GET, produces = "application/json")
        public List<EcompApp> getUserApps(HttpServletRequest request, HttpServletResponse response) {
@@ -105,7 +109,13 @@ public class AppsController extends EPRestrictedBaseController {
         * RESTful service method to fetch all applications accessible to the
         * current user, with personalizations.
         * 
-        * @return
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List<EcompApp>
+        * @throws IOException
+        *             if sendError fails
         */
        @RequestMapping(value = { "/portalApi/persUserApps" }, method = RequestMethod.GET, produces = "application/json")
        public List<EcompApp> getPersUserApps(HttpServletRequest request, HttpServletResponse response) throws IOException {
@@ -134,7 +144,11 @@ public class AppsController extends EPRestrictedBaseController {
         * RESTful service method to fetch applications for which the current user
         * is an Administrator
         * 
-        * @return
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List<AppIdAndNameTransportModel>
         */
        @RequestMapping(value = { "/portalApi/adminApps" }, method = RequestMethod.GET, produces = "application/json")
        public List<AppIdAndNameTransportModel> getAdminApps(HttpServletRequest request, HttpServletResponse response) {
@@ -159,7 +173,11 @@ public class AppsController extends EPRestrictedBaseController {
         * RESTful service method to fetch Applications for user who is super admin
         * and/or app admin.
         * 
-        * @return
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List<AppIdAndNameTransportModel>
         */
        @RequestMapping(value = {
                        "/portalApi/appsForSuperAdminAndAccountAdmin" }, method = RequestMethod.GET, produces = "application/json")
@@ -186,6 +204,10 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * RESTful service method to fetch left menu items from the user's session.
         * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
         * @return JSON with left menu
         */
        @SuppressWarnings({ "rawtypes", "unchecked" })
@@ -254,18 +276,21 @@ public class AppsController extends EPRestrictedBaseController {
                return ecompApps;
        }
 
-       /*
-        * This method sends the user apps manual sort preference Data to service
-        * 
-        * @request: HTTP servlet request
+       /**
+        * Sets the user apps manual sort preference
         * 
-        * @response: HTTP servlet response
+        * @param request
+        *            HTTP servlet request
+        * @param response
+        *            HTTP servlet response
+        * @param epAppsManualPref
+        *            sort pref
+        * @return FieldsValidator
         */
        @RequestMapping(value = {
                        "/portalApi/saveUserAppsSortingManual" }, method = RequestMethod.PUT, produces = "application/json")
        public FieldsValidator putUserAppsSortingManual(HttpServletRequest request,
-                       @RequestBody List<EPAppsManualPreference> epAppsManualPref, HttpServletResponse response)
-                       throws IOException {
+                       @RequestBody List<EPAppsManualPreference> epAppsManualPref, HttpServletResponse response) {
                FieldsValidator fieldsValidator = null;
                try {
                        EPUser user = EPUserUtils.getUserSession(request);
@@ -316,13 +341,16 @@ public class AppsController extends EPRestrictedBaseController {
                return fieldsValidator;
        }
 
-       /*
-        * This method is being called to delete the user app manual sort preference
-        * record
-        * 
-        * @request: HTTP servlet request
+       /**
+        * Deletes the user app manual sort preference record
         * 
-        * @response: HTTP servlet response
+        * @param request
+        *            HTTP servlet request
+        * @param response
+        *            HTTP servlet response
+        * @param delManualAppData
+        *            data to delete
+        * @return FieldsValidator
         */
        @RequestMapping(value = {
                        "/portalApi/UpdateUserAppsSortManual" }, method = RequestMethod.PUT, produces = "application/json")
@@ -389,7 +417,11 @@ public class AppsController extends EPRestrictedBaseController {
         * Administrator user. Attention: Users which have Super Administrator roles
         * only are not included!
         * 
-        * @return
+        * @param request
+        *            HTTP servlet request
+        * @param response
+        *            HTTP servlet response
+        * @return List<AdminUserApplications>
         */
        @RequestMapping(value = { "/portalApi/accountAdmins" }, method = RequestMethod.GET, produces = "application/json")
        public List<AdminUserApplications> getAppsAdministrators(HttpServletRequest request, HttpServletResponse response) {
@@ -432,10 +464,11 @@ public class AppsController extends EPRestrictedBaseController {
         * regardless of enabled status.
         * 
         * @param request
+        *            HTTP servlet request
         * @param response
+        *            HTTP servlet response
         * @return List of applications
         */
-       // This API returns
        @RequestMapping(value = {
                        "/portalApi/allAvailableApps" }, method = RequestMethod.GET, produces = "application/json")
        public List<AppsResponse> getAllApps(HttpServletRequest request, HttpServletResponse response) {
@@ -458,8 +491,10 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @return List of applications
         */
        @RequestMapping(value = { "/portalApi/appsFullList" }, method = RequestMethod.GET, produces = "application/json")
        public List<EcompApp> getAppsFullList(HttpServletRequest request, HttpServletResponse response) {
@@ -477,8 +512,10 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @return UserRoles
         */
        @RequestMapping(value = { "/portalApi/userProfile" }, method = RequestMethod.GET, produces = "application/json")
        public UserRoles getUserProfile(HttpServletRequest request, HttpServletResponse response) {
@@ -502,8 +539,10 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
+        *            HTTP servlet request
         * @param appId
-        * @return
+        *            application ID
+        * @return List<LocalRole>
         */
        @RequestMapping(value = { "/portalApi/appRoles/{appId}" }, method = {
                        RequestMethod.GET }, produces = "application/json")
@@ -522,8 +561,10 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @return List<OnboardingApp>
         */
        @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.GET, produces = "application/json")
        public List<OnboardingApp> getOnboardingApps(HttpServletRequest request, HttpServletResponse response) {
@@ -547,9 +588,12 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
-        * @param modifiedOnboardingApp
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @param modifiedOnboardingApp
+        *            app to update
+        * @return FieldsValidator
         */
        @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.PUT, produces = "application/json")
        public FieldsValidator putOnboardingApp(HttpServletRequest request,
@@ -576,9 +620,12 @@ public class AppsController extends EPRestrictedBaseController {
        /**
         * 
         * @param request
-        * @param newOnboardingApp
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @param newOnboardingApp
+        *            app to add
+        * @return FieldsValidator
         */
        @RequestMapping(value = { "/portalApi/onboardingApps" }, method = RequestMethod.POST, produces = "application/json")
        public FieldsValidator postOnboardingApp(HttpServletRequest request, @RequestBody OnboardingApp newOnboardingApp,
@@ -606,9 +653,12 @@ public class AppsController extends EPRestrictedBaseController {
         * REST endpoint to process a request to delete an on-boarded application.
         * 
         * @param request
-        * @param appId
+        *            HTTP servlet request
         * @param response
-        * @return
+        *            HTTP servlet response
+        * @param appId
+        *            ID of app to delete
+        * @return FieldsValidator
         */
        @RequestMapping(value = { "/portalApi/onboardingApps/{appId}" }, method = {
                        RequestMethod.DELETE }, produces = "application/json")
@@ -637,7 +687,9 @@ public class AppsController extends EPRestrictedBaseController {
         * Gets the application thumbnail image; sets status 404 if none exists.
         * 
         * @param request
-        *            HttpServletRequest
+        *            HTTP servlet request
+        * @param response
+        *            HTTP servlet response
         * @param appId
         *            Application ID
         * @return Bytes with the app thumbnail image; null if not available.
index fa49d5b..774eb3e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.EPAppService;\r
-import org.openecomp.portalapp.portal.service.PortalAdminService;\r
-import org.openecomp.portalapp.portal.service.UserService;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.OnboardingApp;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.portal.utils.PortalConstants;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.ResponseBody;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-/**\r
- * Processes requests from external systems (i.e., not the front-end web UI).\r
- * First use case is ECOMP Controller, which has to create an admin and onboard\r
- * itself upon launch of a fresh Portal.\r
- * \r
- * Listens on the "auxapi" path prefix. Provides alternate implementations of\r
- * methods in several existing controllers because an EPUser object is not\r
- * available in the session for these requests.\r
- * \r
- * Checks credentials sent via HTTP Basic Authentication. The Portal's basic\r
- * HTTP authentication system requires that the user names and endpoints are\r
- * registered together.\r
- */\r
-@RestController\r
-@RequestMapping(PortalConstants.REST_AUX_API)\r
-@Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class AppsControllerExternalRequest implements BasicAuthenticationController {\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsControllerExternalRequest.class);\r
-\r
-       private static final String ONBOARD_APP = "/onboardApp";\r
-\r
-       // Where is this used?\r
-       public boolean isAuxRESTfulCall() {\r
-               return true;\r
-       }\r
-\r
-       /**\r
-        * For testing whether a user is a superadmin.\r
-        */\r
-       @Autowired\r
-       private AdminRolesService adminRolesService;\r
-\r
-       /**\r
-        * For onboarding or updating an app\r
-        */\r
-       @Autowired\r
-       private EPAppService appService;\r
-\r
-       /**\r
-        * For promoting a user to Portal admin\r
-        */\r
-       @Autowired\r
-       private PortalAdminService portalAdminService;\r
-\r
-       /**\r
-        * For creating a new user\r
-        */\r
-       @Autowired\r
-       private UserService userService;\r
-\r
-       /**\r
-        * Creates a new user as a Portal administrator.\r
-        * \r
-        * <PRE>\r
-        { \r
-               "loginId" : "abc123",\r
-               "loginPwd": "",\r
-               "email":"ecomp@controller" \r
-        }\r
-        * </PRE>\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @param epUser\r
-        *            User details; the email and orgUserId fields are mandatory\r
-        * @param response\r
-        *            HttpServletResponse\r
-        * @return PortalRestResponse with success or failure\r
-        */\r
-       @ApiOperation(value = "Creates a new user as a Portal administrator.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = "/portalAdmin", method = RequestMethod.POST, produces = "application/json")\r
-       @ResponseBody\r
-       public PortalRestResponse<String> postPortalAdmin(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody EPUser epUser) {\r
-               EcompPortalUtils.logAndSerializeObject(logger, "postPortalAdmin", "request", epUser);\r
-               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();\r
-\r
-               // Check mandatory fields.\r
-               if (epUser.getEmail() == null || epUser.getEmail().trim().length() == 0 //\r
-                               || epUser.getLoginId() == null || epUser.getLoginId().trim().length() == 0 //\r
-                               || epUser.getLoginPwd() == null) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage("Missing required field: email, loginId, or loginPwd");\r
-                       return portalResponse;\r
-               }\r
-\r
-               try {\r
-                       // Check for existing user; create if not found.\r
-                       List<EPUser> userList = userService.getUserByUserId(epUser.getOrgUserId());\r
-                       if (userList == null || userList.size() == 0) {\r
-                               // Create user with first, last names etc.; do check for\r
-                               // duplicates.\r
-                               String userCreateResult = userService.saveNewUser(epUser, "Yes");\r
-                               if (!"success".equals(userCreateResult)) {\r
-                                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                                       portalResponse.setMessage(userCreateResult);\r
-                                       return portalResponse;\r
-                               }\r
-                       }\r
-\r
-                       // Check for Portal admin status; promote if not.\r
-                       if (adminRolesService.isSuperAdmin(epUser)) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.OK);\r
-                       } else {\r
-                               FieldsValidator fv = portalAdminService.createPortalAdmin(epUser.getOrgUserId());\r
-                               if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                                       portalResponse.setStatus(PortalRestStatusEnum.OK);\r
-                               } else {\r
-                                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                                       portalResponse.setMessage(fv.toString());\r
-                               }\r
-                       }\r
-               } catch (Exception ex) {\r
-                       // Uncaught exceptions yield 404 and an empty error page\r
-                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage(ex.toString());\r
-               }\r
-\r
-               EcompPortalUtils.logAndSerializeObject(logger, "postPortalAdmin", "response", portalResponse);\r
-               return portalResponse;\r
-       }\r
-\r
-       /**\r
-        * Gets the specified application that is on-boarded in Portal.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @param appId\r
-        *            Application ID to get\r
-        * @param response\r
-        *            httpServletResponse\r
-        * @return OnboardingApp objects\r
-        */\r
-       @ApiOperation(value = "Gets the specified application that is on-boarded in Portal.", response = OnboardingApp.class)\r
-       @RequestMapping(value = { ONBOARD_APP + "/{appId}" }, method = RequestMethod.GET, produces = "application/json")\r
-       @ResponseBody\r
-       public OnboardingApp getOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("appId") Long appId) {\r
-               EPApp epApp = appService.getApp(appId);\r
-               OnboardingApp obApp = new OnboardingApp();\r
-               appService.createOnboardingFromApp(epApp, obApp);\r
-               EcompPortalUtils.logAndSerializeObject(logger, "getOnboardAppExternal", "response", obApp);\r
-               return obApp;\r
-       }\r
-\r
-       /**\r
-        * Adds a new application to Portal. The My Logins App Owner in the request\r
-        * must be the organization user ID of a person who is a Portal\r
-        * administrator.\r
-        * \r
-        * <pre>\r
-        * { \r
-               "myLoginsAppOwner" : "abc123",\r
-               "name": "dashboard",\r
-               "url": "http://k8s/something",\r
-               "restUrl" : "http://aic.att.com",\r
-               "restrictedApp" : true,\r
-               "isOpen" : true,\r
-               "isEnabled": false\r
-               }\r
-        * </pre>\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @param response\r
-        *            httpServletResponse\r
-        * @param newOnboardApp\r
-        *            Message with details about the app to add\r
-        * @return PortalRestResponse\r
-        */\r
-       @ApiOperation(value = "Adds a new application to Portal.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { ONBOARD_APP }, method = RequestMethod.POST, produces = "application/json")\r
-       @ResponseBody\r
-       public PortalRestResponse<String> postOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody OnboardingApp newOnboardApp) {\r
-               EcompPortalUtils.logAndSerializeObject(logger, "postOnboardAppExternal", "request", newOnboardApp);\r
-               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();\r
-\r
-               // Validate fields\r
-               if (newOnboardApp.id != null) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage("Unexpected field: id");\r
-                       return portalResponse;\r
-               }\r
-               if (newOnboardApp.name == null || newOnboardApp.name.trim().length() == 0 //\r
-                               || newOnboardApp.url == null || newOnboardApp.url.trim().length() == 0 //\r
-                               || newOnboardApp.restUrl == null || newOnboardApp.restUrl.trim().length() == 0\r
-                               || newOnboardApp.myLoginsAppOwner == null || newOnboardApp.myLoginsAppOwner.trim().length() == 0\r
-                               || newOnboardApp.restrictedApp == null //\r
-                               || newOnboardApp.isOpen == null //\r
-                               || newOnboardApp.isEnabled == null) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage(\r
-                                       "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");\r
-                       return portalResponse;\r
-               }\r
-\r
-               try {\r
-                       List<EPUser> userList = userService.getUserByUserId(newOnboardApp.myLoginsAppOwner);\r
-                       if (userList == null || userList.size() != 1) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage("Failed to find user: " + newOnboardApp.myLoginsAppOwner);\r
-                               return portalResponse;\r
-                       }\r
-\r
-                       EPUser epUser = userList.get(0);\r
-                       // Check for Portal admin status\r
-                       if (! adminRolesService.isSuperAdmin(epUser)) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage("User lacks Portal admin role: " + epUser.getLoginId());\r
-                               return portalResponse;                          \r
-                       }\r
-                               \r
-                       newOnboardApp.normalize();\r
-                       FieldsValidator fv = appService.addOnboardingApp(newOnboardApp, epUser);\r
-                       if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.OK);\r
-                       } else {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage(fv.toString());\r
-                       }\r
-               } catch (Exception ex) {\r
-                       // Uncaught exceptions yield 404 and an empty error page\r
-                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage(ex.toString());\r
-               }\r
-               EcompPortalUtils.logAndSerializeObject(logger, "postOnboardAppExternal", "response", portalResponse);\r
-               return portalResponse;\r
-       }\r
-\r
-       /**\r
-        * Updates information about an on-boarded application in Portal. The My\r
-        * Logins App Owner in the request must be the organization user ID of a\r
-        * person who is a Portal administrator.\r
-        * <pre>\r
-          { \r
-               "id" : 123,\r
-               "myLoginsAppOwner" : "abc123",\r
-               "name": "dashboard",\r
-               "url": "http://k8s/something",\r
-               "restUrl" : "http://aic.att.com",\r
-               "restrictedApp" : true,\r
-               "isOpen" : true,\r
-               "isEnabled": false\r
-               }\r
-               </pre>\r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @param response\r
-        *            httpServletResponse\r
-        * @param appId\r
-        *            application id\r
-        * @param oldOnboardApp\r
-        *            Message with details about the app to add\r
-        * @return PortalRestResponse\r
-        */\r
-       @ApiOperation(value = "Updates information about an on-boarded application in Portal.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { ONBOARD_APP + "/{appId}" }, method = RequestMethod.PUT, produces = "application/json")\r
-       @ResponseBody\r
-       public PortalRestResponse<String> putOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("appId") Long appId, @RequestBody OnboardingApp oldOnboardApp) {\r
-               EcompPortalUtils.logAndSerializeObject(logger, "putOnboardAppExternal", "request", oldOnboardApp);\r
-               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();\r
-               // Validate fields.\r
-               if (oldOnboardApp.id == null || !appId.equals(oldOnboardApp.id)) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage("Unexpected value for field: id");\r
-                       return portalResponse;\r
-               }\r
-               if (oldOnboardApp.name == null || oldOnboardApp.name.trim().length() == 0 //\r
-                               || oldOnboardApp.url == null || oldOnboardApp.url.trim().length() == 0 //\r
-                               || oldOnboardApp.restUrl == null || oldOnboardApp.restUrl.trim().length() == 0\r
-                               || oldOnboardApp.myLoginsAppOwner == null || oldOnboardApp.myLoginsAppOwner.trim().length() == 0\r
-                               || oldOnboardApp.restrictedApp == null //\r
-                               || oldOnboardApp.isOpen == null //\r
-                               || oldOnboardApp.isEnabled == null) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage(\r
-                                       "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");\r
-                       return portalResponse;\r
-               }\r
-\r
-               try {\r
-                       List<EPUser> userList = userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner);\r
-                       if (userList == null || userList.size() != 1) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage("Failed to find user: " + oldOnboardApp.myLoginsAppOwner);\r
-                               return portalResponse;\r
-                       }\r
-\r
-                       EPUser epUser = userList.get(0);\r
-                       // Check for Portal admin status\r
-                       if (! adminRolesService.isSuperAdmin(epUser)) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage("User lacks Portal admin role: " + epUser.getLoginId());\r
-                               return portalResponse;                          \r
-                       }\r
-\r
-                       oldOnboardApp.normalize();\r
-                       FieldsValidator fv = appService.modifyOnboardingApp(oldOnboardApp, epUser);\r
-                       if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.OK);\r
-                       } else {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage(fv.toString());\r
-                       }\r
-               } catch (Exception ex) {\r
-                       // Uncaught exceptions yield 404 and an empty error page\r
-                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       portalResponse.setMessage(ex.toString());\r
-               }\r
-               EcompPortalUtils.logAndSerializeObject(logger, "putOnboardAppExternal", "response", portalResponse);\r
-               return portalResponse;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * Processes requests from external systems (i.e., not the front-end web UI).
+ * First use case is ECOMP Controller, which has to create an admin and onboard
+ * itself upon launch of a fresh Portal.
+ * 
+ * Listens on the "auxapi" path prefix. Provides alternate implementations of
+ * methods in several existing controllers because an EPUser object is not
+ * available in the session for these requests.
+ * 
+ * Checks credentials sent via HTTP Basic Authentication. The Portal's basic
+ * HTTP authentication system requires that the user names and endpoints are
+ * registered together.
+ */
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class AppsControllerExternalRequest implements BasicAuthenticationController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsControllerExternalRequest.class);
+
+       private static final String ONBOARD_APP = "/onboardApp";
+
+       // Where is this used?
+       public boolean isAuxRESTfulCall() {
+               return true;
+       }
+
+       /**
+        * For testing whether a user is a superadmin.
+        */
+       @Autowired
+       private AdminRolesService adminRolesService;
+
+       /**
+        * For onboarding or updating an app
+        */
+       @Autowired
+       private EPAppService appService;
+
+       /**
+        * For promoting a user to Portal admin
+        */
+       @Autowired
+       private PortalAdminService portalAdminService;
+
+       /**
+        * For creating a new user
+        */
+       @Autowired
+       private UserService userService;
+
+       /**
+        * Creates a new user as a Portal administrator.
+        * 
+        * <PRE>
+        { 
+               "loginId" : "abc123",
+               "loginPwd": "",
+               "email":"ecomp@controller" 
+        }
+        * </PRE>
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param epUser
+        *            User details; the email and orgUserId fields are mandatory
+        * @param response
+        *            HttpServletResponse
+        * @return PortalRestResponse with success or failure
+        */
+       @ApiOperation(value = "Creates a new user as a Portal administrator.", response = PortalRestResponse.class)
+       @RequestMapping(value = "/portalAdmin", method = RequestMethod.POST, produces = "application/json")
+       @ResponseBody
+       public PortalRestResponse<String> postPortalAdmin(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody EPUser epUser) {
+               EcompPortalUtils.logAndSerializeObject(logger, "postPortalAdmin", "request", epUser);
+               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
+
+               // Check mandatory fields.
+               if (epUser.getEmail() == null || epUser.getEmail().trim().length() == 0 //
+                               || epUser.getLoginId() == null || epUser.getLoginId().trim().length() == 0 //
+                               || epUser.getLoginPwd() == null) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage("Missing required field: email, loginId, or loginPwd");
+                       return portalResponse;
+               }
+
+               try {
+                       // Check for existing user; create if not found.
+                       List<EPUser> userList = userService.getUserByUserId(epUser.getOrgUserId());
+                       if (userList == null || userList.size() == 0) {
+                               // Create user with first, last names etc.; do check for
+                               // duplicates.
+                               String userCreateResult = userService.saveNewUser(epUser, "Yes");
+                               if (!"success".equals(userCreateResult)) {
+                                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                                       portalResponse.setMessage(userCreateResult);
+                                       return portalResponse;
+                               }
+                       }
+
+                       // Check for Portal admin status; promote if not.
+                       if (adminRolesService.isSuperAdmin(epUser)) {
+                               portalResponse.setStatus(PortalRestStatusEnum.OK);
+                       } else {
+                               FieldsValidator fv = portalAdminService.createPortalAdmin(epUser.getOrgUserId());
+                               if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                                       portalResponse.setStatus(PortalRestStatusEnum.OK);
+                               } else {
+                                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                                       portalResponse.setMessage(fv.toString());
+                               }
+                       }
+               } catch (Exception ex) {
+                       // Uncaught exceptions yield 404 and an empty error page
+                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage(ex.toString());
+               }
+
+               EcompPortalUtils.logAndSerializeObject(logger, "postPortalAdmin", "response", portalResponse);
+               return portalResponse;
+       }
+
+       /**
+        * Gets the specified application that is on-boarded in Portal.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param appId
+        *            Application ID to get
+        * @param response
+        *            httpServletResponse
+        * @return OnboardingApp objects
+        */
+       @ApiOperation(value = "Gets the specified application that is on-boarded in Portal.", response = OnboardingApp.class)
+       @RequestMapping(value = { ONBOARD_APP + "/{appId}" }, method = RequestMethod.GET, produces = "application/json")
+       @ResponseBody
+       public OnboardingApp getOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("appId") Long appId) {
+               EPApp epApp = appService.getApp(appId);
+               OnboardingApp obApp = new OnboardingApp();
+               appService.createOnboardingFromApp(epApp, obApp);
+               EcompPortalUtils.logAndSerializeObject(logger, "getOnboardAppExternal", "response", obApp);
+               return obApp;
+       }
+
+       /**
+        * Adds a new application to Portal. The My Logins App Owner in the request
+        * must be the organization user ID of a person who is a Portal
+        * administrator.
+        * 
+        * <pre>
+        * { 
+               "myLoginsAppOwner" : "abc123",
+               "name": "dashboard",
+               "url": "http://k8s/something",
+               "restUrl" : "http://aic.att.com",
+               "restrictedApp" : true,
+               "isOpen" : true,
+               "isEnabled": false
+               }
+        * </pre>
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            httpServletResponse
+        * @param newOnboardApp
+        *            Message with details about the app to add
+        * @return PortalRestResponse
+        */
+       @ApiOperation(value = "Adds a new application to Portal.", response = PortalRestResponse.class)
+       @RequestMapping(value = { ONBOARD_APP }, method = RequestMethod.POST, produces = "application/json")
+       @ResponseBody
+       public PortalRestResponse<String> postOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody OnboardingApp newOnboardApp) {
+               EcompPortalUtils.logAndSerializeObject(logger, "postOnboardAppExternal", "request", newOnboardApp);
+               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
+
+               // Validate fields
+               if (newOnboardApp.id != null) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage("Unexpected field: id");
+                       return portalResponse;
+               }
+               if (newOnboardApp.name == null || newOnboardApp.name.trim().length() == 0 //
+                               || newOnboardApp.url == null || newOnboardApp.url.trim().length() == 0 //
+                               || newOnboardApp.restUrl == null || newOnboardApp.restUrl.trim().length() == 0
+                               || newOnboardApp.myLoginsAppOwner == null || newOnboardApp.myLoginsAppOwner.trim().length() == 0
+                               || newOnboardApp.restrictedApp == null //
+                               || newOnboardApp.isOpen == null //
+                               || newOnboardApp.isEnabled == null) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage(
+                                       "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+                       return portalResponse;
+               }
+
+               try {
+                       List<EPUser> userList = userService.getUserByUserId(newOnboardApp.myLoginsAppOwner);
+                       if (userList == null || userList.size() != 1) {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage("Failed to find user: " + newOnboardApp.myLoginsAppOwner);
+                               return portalResponse;
+                       }
+
+                       EPUser epUser = userList.get(0);
+                       // Check for Portal admin status
+                       if (! adminRolesService.isSuperAdmin(epUser)) {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage("User lacks Portal admin role: " + epUser.getLoginId());
+                               return portalResponse;                          
+                       }
+                               
+                       newOnboardApp.normalize();
+                       FieldsValidator fv = appService.addOnboardingApp(newOnboardApp, epUser);
+                       if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                               portalResponse.setStatus(PortalRestStatusEnum.OK);
+                       } else {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage(fv.toString());
+                       }
+               } catch (Exception ex) {
+                       // Uncaught exceptions yield 404 and an empty error page
+                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage(ex.toString());
+               }
+               EcompPortalUtils.logAndSerializeObject(logger, "postOnboardAppExternal", "response", portalResponse);
+               return portalResponse;
+       }
+
+       /**
+        * Updates information about an on-boarded application in Portal. The My
+        * Logins App Owner in the request must be the organization user ID of a
+        * person who is a Portal administrator.
+        * <pre>
+          { 
+               "id" : 123,
+               "myLoginsAppOwner" : "abc123",
+               "name": "dashboard",
+               "url": "http://k8s/something",
+               "restUrl" : "http://aic.att.com",
+               "restrictedApp" : true,
+               "isOpen" : true,
+               "isEnabled": false
+               }
+               </pre>
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            httpServletResponse
+        * @param appId
+        *            application id
+        * @param oldOnboardApp
+        *            Message with details about the app to add
+        * @return PortalRestResponse
+        */
+       @ApiOperation(value = "Updates information about an on-boarded application in Portal.", response = PortalRestResponse.class)
+       @RequestMapping(value = { ONBOARD_APP + "/{appId}" }, method = RequestMethod.PUT, produces = "application/json")
+       @ResponseBody
+       public PortalRestResponse<String> putOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("appId") Long appId, @RequestBody OnboardingApp oldOnboardApp) {
+               EcompPortalUtils.logAndSerializeObject(logger, "putOnboardAppExternal", "request", oldOnboardApp);
+               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
+               // Validate fields.
+               if (oldOnboardApp.id == null || !appId.equals(oldOnboardApp.id)) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage("Unexpected value for field: id");
+                       return portalResponse;
+               }
+               if (oldOnboardApp.name == null || oldOnboardApp.name.trim().length() == 0 //
+                               || oldOnboardApp.url == null || oldOnboardApp.url.trim().length() == 0 //
+                               || oldOnboardApp.restUrl == null || oldOnboardApp.restUrl.trim().length() == 0
+                               || oldOnboardApp.myLoginsAppOwner == null || oldOnboardApp.myLoginsAppOwner.trim().length() == 0
+                               || oldOnboardApp.restrictedApp == null //
+                               || oldOnboardApp.isOpen == null //
+                               || oldOnboardApp.isEnabled == null) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage(
+                                       "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+                       return portalResponse;
+               }
+
+               try {
+                       List<EPUser> userList = userService.getUserByUserId(oldOnboardApp.myLoginsAppOwner);
+                       if (userList == null || userList.size() != 1) {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage("Failed to find user: " + oldOnboardApp.myLoginsAppOwner);
+                               return portalResponse;
+                       }
+
+                       EPUser epUser = userList.get(0);
+                       // Check for Portal admin status
+                       if (! adminRolesService.isSuperAdmin(epUser)) {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage("User lacks Portal admin role: " + epUser.getLoginId());
+                               return portalResponse;                          
+                       }
+
+                       oldOnboardApp.normalize();
+                       FieldsValidator fv = appService.modifyOnboardingApp(oldOnboardApp, epUser);
+                       if (fv.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                               portalResponse.setStatus(PortalRestStatusEnum.OK);
+                       } else {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage(fv.toString());
+                       }
+               } catch (Exception ex) {
+                       // Uncaught exceptions yield 404 and an empty error page
+                       response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       portalResponse.setMessage(ex.toString());
+               }
+               EcompPortalUtils.logAndSerializeObject(logger, "putOnboardAppExternal", "response", portalResponse);
+               return portalResponse;
+       }
+
+}
index 705c900..8d6b8e6 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.domain.AuditLog;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.AuditService;\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-\r
-@RestController\r
-@RequestMapping("/portalApi/auditLog")\r
-public class AuditLogController extends EPRestrictedBaseController {\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardController.class);\r
-\r
-       @Autowired\r
-       private AuditService auditService;\r
-\r
-       /**\r
-        * Store audit log of the specified access type.\r
-        * \r
-        * @param request\r
-        * @param affectedAppId\r
-        * @param type\r
-        * @param comment\r
-        */\r
-       @RequestMapping(value = "/store", method = RequestMethod.GET, produces = "application/json")\r
-       public void auditLog(HttpServletRequest request, @RequestParam String affectedAppId, @RequestParam String type,\r
-                       @RequestParam String comment) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "auditLog: appId {}, type {], comment {}", \r
-                               affectedAppId, type, comment);\r
-               String cd_type = null;\r
-               try {                                   \r
-                       EPUser user = EPUserUtils.getUserSession(request);\r
-                       /* Check type of Activity CD */\r
-                       if (type.equals("app")) {\r
-                               cd_type = AuditLog.CD_ACTIVITY_APP_ACCESS;\r
-                       } else if (type.equals("tab")) {\r
-                               cd_type = AuditLog.CD_ACTIVITY_TAB_ACCESS;\r
-                       } else if (type.equals("functional")) {\r
-                               cd_type = AuditLog.CD_ACTIVITY_FUNCTIONAL_ACCESS;\r
-                       } else if (type.equals("leftMenu")) {\r
-                               cd_type = AuditLog.CD_ACTIVITY_LEFT_MENU_ACCESS;\r
-                       } else {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "Storing auditLog failed! Activity CD type is not correct.");\r
-                       }\r
-                       /* Store the audit log only if it contains valid Activity CD */\r
-                       if (cd_type != null) {\r
-                               AuditLog auditLog = new AuditLog();\r
-                               auditLog.setActivityCode(cd_type);\r
-                               /*\r
-                                * Check affectedAppId and comment and see if these two values are\r
-                                * valid\r
-                                */\r
-                               if (comment != null && !comment.equals("") && !comment.equals("undefined"))\r
-                                       auditLog.setComments(comment);\r
-                               if (affectedAppId != null && !affectedAppId.equals("") && !affectedAppId.equals("undefined"))\r
-                                       auditLog.setAffectedRecordId(affectedAppId);\r
-                               long userId = EPUserUtils.getUserId(request);\r
-                               auditLog.setUserId(userId);\r
-                               auditService.logActivity(auditLog, null);\r
-\r
-                               // Log file\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          \r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("AuditLogController.auditLog", \r
-                                               cd_type, user.getOrgUserId(), affectedAppId, comment)); \r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "auditLog failed", e);\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+@RestController
+@RequestMapping("/portalApi/auditLog")
+public class AuditLogController extends EPRestrictedBaseController {
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardController.class);
+
+       @Autowired
+       private AuditService auditService;
+
+       /**
+        * Store audit log of the specified access type.
+        * 
+        * @param request
+        * @param affectedAppId
+        * @param type
+        * @param comment
+        */
+       @RequestMapping(value = "/store", method = RequestMethod.GET, produces = "application/json")
+       public void auditLog(HttpServletRequest request, @RequestParam String affectedAppId, @RequestParam String type,
+                       @RequestParam String comment) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "auditLog: appId {}, type {], comment {}", 
+                               affectedAppId, type, comment);
+               String cd_type = null;
+               try {                                   
+                       EPUser user = EPUserUtils.getUserSession(request);
+                       /* Check type of Activity CD */
+                       if (type.equals("app")) {
+                               cd_type = AuditLog.CD_ACTIVITY_APP_ACCESS;
+                       } else if (type.equals("tab")) {
+                               cd_type = AuditLog.CD_ACTIVITY_TAB_ACCESS;
+                       } else if (type.equals("functional")) {
+                               cd_type = AuditLog.CD_ACTIVITY_FUNCTIONAL_ACCESS;
+                       } else if (type.equals("leftMenu")) {
+                               cd_type = AuditLog.CD_ACTIVITY_LEFT_MENU_ACCESS;
+                       } else {
+                               logger.error(EELFLoggerDelegate.errorLogger, "Storing auditLog failed! Activity CD type is not correct.");
+                       }
+                       /* Store the audit log only if it contains valid Activity CD */
+                       if (cd_type != null) {
+                               AuditLog auditLog = new AuditLog();
+                               auditLog.setActivityCode(cd_type);
+                               /*
+                                * Check affectedAppId and comment and see if these two values are
+                                * valid
+                                */
+                               if (comment != null && !comment.equals("") && !comment.equals("undefined"))
+                                       auditLog.setComments(comment);
+                               if (affectedAppId != null && !affectedAppId.equals("") && !affectedAppId.equals("undefined"))
+                                       auditLog.setAffectedRecordId(affectedAppId);
+                               long userId = EPUserUtils.getUserId(request);
+                               auditLog.setUserId(userId);
+                               auditService.logActivity(auditLog, null);
+
+                               // Log file
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("AuditLogController.auditLog", 
+                                               cd_type, user.getOrgUserId(), affectedAppId, comment)); 
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "auditLog failed", e);
+               }
+       }
+
+}
index a7b3f1a..5be6614 100644 (file)
@@ -1,46 +1,46 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.controller.FusionBaseController;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.BEProperty;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-\r
-@RestController\r
-@RequestMapping("/portalApi/properties")\r
-public class BEPropertyReaderController extends FusionBaseController{\r
-       @RequestMapping(value = "/readProperty", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<BEProperty> readProperty(HttpServletRequest request, @RequestParam String key) {\r
-               try {\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", new BEProperty(key, SystemProperties.getProperty(key)));\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }               \r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.openecomp.portalsdk.core.controller.FusionBaseController;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.domain.BEProperty;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+
+@RestController
+@RequestMapping("/portalApi/properties")
+public class BEPropertyReaderController extends FusionBaseController{
+       @RequestMapping(value = "/readProperty", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<BEProperty> readProperty(HttpServletRequest request, @RequestParam String key) {
+               try {
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", new BEProperty(key, SystemProperties.getProperty(key)));
+               } catch (Exception e) {
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }               
+       }
+}
index f23054b..c16fa78 100644 (file)
@@ -24,13 +24,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
-@SuppressWarnings("unchecked")
 @RestController
 @org.springframework.context.annotation.Configuration
 @EnableAspectJAutoProxy
 @EPAuditLog
-public class BasicAuthAccountController extends EPRestrictedBaseController{
-       
+public class BasicAuthAccountController extends EPRestrictedBaseController {
+
        @Autowired
        private BasicAuthAccountService basicAuthAccountService;
 
@@ -38,69 +37,99 @@ public class BasicAuthAccountController extends EPRestrictedBaseController{
        private AdminRolesService adminRolesService;
 
        /**
-        * Saves Basic Authentication account for external systems 
-        * @param BasicAuthCredentials
+        * Saves Basic Authentication account for external systems
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param newBasicAuthAccount
+        *            BasicAuthCredentials
         * @return Id of the newly created account
-       */
-       
+        * @throws Exception
+        *             on failure
+        */
        @RequestMapping(value = { "/portalApi/basicAuthAccount" }, method = RequestMethod.POST)
        public PortalRestResponse<String> createBasicAuthAccount(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody BasicAuthCredentials newBasicAuthAccount) throws Exception {
-               
+
                EPUser user = EPUserUtils.getUserSession(request);
-               if (!adminRolesService.isSuperAdmin(user)){
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required", "Admin Only Operation! ");
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required",
+                                       "Admin Only Operation! ");
                }
-               
-               if(newBasicAuthAccount == null){
+
+               if (newBasicAuthAccount == null) {
                        return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
                                        "newBasicAuthAccount cannot be null or empty");
                }
                long accountId = basicAuthAccountService.saveBasicAuthAccount(newBasicAuthAccount);
-               
+
                List<Long> endpointIdList = new ArrayList<>();
                try {
-                       for(EPEndpoint ep: newBasicAuthAccount.getEndpoints()){
+                       for (EPEndpoint ep : newBasicAuthAccount.getEndpoints()) {
                                endpointIdList.add(basicAuthAccountService.saveEndpoints(ep));
                        }
-                       for(Long endpointId: endpointIdList){
+                       for (Long endpointId : endpointIdList) {
                                basicAuthAccountService.saveEndpointAccount(accountId, endpointId);
                        }
                } catch (Exception e) {
                        return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
                }
-               
+
                return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
        }
-       
+
        /**
-        * Returns list of all  BasicAuthCredentials in the system
+        * Returns list of all BasicAuthCredentials in the system
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
         * @return List<BasicAuthCredentials>
+        * @throws Exception
+        *             on failure
         */
-       
+
        @RequestMapping(value = { "/portalApi/basicAuthAccount" }, method = RequestMethod.GET)
-       public PortalRestResponse<List<BasicAuthCredentials>> getBasicAuthAccount(HttpServletRequest request, HttpServletResponse response)
-                       throws Exception {
-               
+       public PortalRestResponse<List<BasicAuthCredentials>> getBasicAuthAccount(HttpServletRequest request,
+                       HttpServletResponse response) throws Exception {
+
                EPUser user = EPUserUtils.getUserSession(request);
-               if (!adminRolesService.isSuperAdmin(user)){
-                       return new PortalRestResponse<List<BasicAuthCredentials>>(PortalRestStatusEnum.ERROR, "UnAuthorized! Admin Only Operation", new ArrayList<>());
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       return new PortalRestResponse<List<BasicAuthCredentials>>(PortalRestStatusEnum.ERROR,
+                                       "UnAuthorized! Admin Only Operation", new ArrayList<>());
                }
 
-               return new PortalRestResponse<List<BasicAuthCredentials>>(PortalRestStatusEnum.OK, "Success", basicAuthAccountService.getAccountData());
+               return new PortalRestResponse<List<BasicAuthCredentials>>(PortalRestStatusEnum.OK, "Success",
+                               basicAuthAccountService.getAccountData());
        }
-       
+
        /**
         * Updates an existing BasicAuthCredentials account
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param accountId
+        *            account ID
+        * @param newBasicAuthAccount
+        *            BasicAuthCredentials
+        * @return PortalRestResponse<String>
+        * @throws Exception
+        *             on failure
         */
-       
        @RequestMapping(value = { "/portalApi/basicAuthAccount/{accountId}" }, method = RequestMethod.PUT)
        public PortalRestResponse<String> updateAccount(HttpServletRequest request, HttpServletResponse response,
-                       @PathVariable("accountId") long accountId, @RequestBody BasicAuthCredentials newBasicAuthAccount) throws Exception {
-               
+                       @PathVariable("accountId") long accountId, @RequestBody BasicAuthCredentials newBasicAuthAccount)
+                       throws Exception {
+
                EPUser user = EPUserUtils.getUserSession(request);
-               if (!adminRolesService.isSuperAdmin(user)){
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required", "Admin Only Operation! ");
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required",
+                                       "Admin Only Operation! ");
                }
 
                if (newBasicAuthAccount == null) {
@@ -114,21 +143,30 @@ public class BasicAuthAccountController extends EPRestrictedBaseController{
                }
                return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
        }
-       
+
        /**
         * deletes an existing BasicAuthCredentials account
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param accountId
+        *            account ID
+        * @return PortalRestResponse<String>
+        * @throws Exception
+        *             on failure
         */
-
        @RequestMapping(value = { "/portalApi/basicAuthAccount/{accountId}" }, method = RequestMethod.DELETE)
        public PortalRestResponse<String> deleteAccount(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("accountId") long accountId) throws Exception {
-               
+
                EPUser user = EPUserUtils.getUserSession(request);
-               if (!adminRolesService.isSuperAdmin(user)){
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required", "Admin Only Operation! ");
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Authorization Required",
+                                       "Admin Only Operation! ");
                }
 
-               
                try {
                        basicAuthAccountService.deleteEndpointAccout(accountId);
                } catch (Exception e) {
@@ -136,6 +174,5 @@ public class BasicAuthAccountController extends EPRestrictedBaseController{
                }
                return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
        }
-       
-       
+
 }
index d9bdf3d..874edad 100644 (file)
@@ -1,28 +1,28 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-/**\r
- * Marker interface to indicate that requests to this controller present HTTP\r
- * Basic Authentication credentials.\r
- */\r
-public interface BasicAuthenticationController {\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+/**
+ * Marker interface to indicate that requests to this controller present HTTP
+ * Basic Authentication credentials.
+ */
+public interface BasicAuthenticationController {
+
+}
index 8db9484..808220c 100644 (file)
@@ -1,90 +1,95 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.service.ConsulHealthService;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import com.orbitz.consul.ConsulException;\r
-import com.orbitz.consul.model.health.ServiceHealth;\r
-\r
-import io.searchbox.client.config.exception.NoServerConfiguredException;\r
-\r
-@RestController\r
-@RequestMapping("/portalApi/consul")\r
-public class ConsulClientController extends EPRestrictedBaseController {\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ConsulClientController.class);\r
-\r
-       @Autowired\r
-       private ConsulHealthService consulHealthService;\r
-       //Get location of a healthy node running our service\r
-       @RequestMapping(value = { "/service/{service}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<String> getServiceLocation(HttpServletRequest request, HttpServletResponse response, @PathVariable("service") String service) {\r
-\r
-               try{\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Success!", consulHealthService.getServiceLocation(service));\r
-               }\r
-               catch(NoServerConfiguredException e){\r
-                       logger.error(logger.errorLogger, "No healthy service exception!");\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.WARN, "Warning!", "No healthy service exception!");\r
-               }\r
-               catch(ConsulException e){\r
-                       logger.error(logger.errorLogger, "Couldn't connect ot consul - Is consul running?");\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Error!", "Couldn't connect ot consul - Is consul running?");\r
-               }\r
-       }\r
-\r
-       @RequestMapping(value = { "/service/healthy/{service}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<List<ServiceHealth>> getAllHealthyNodes(HttpServletRequest request, HttpServletResponse response, @PathVariable("service") String service) {\r
-               try{\r
-                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.OK, "Success!", consulHealthService.getAllHealthyNodes(service));\r
-               }\r
-               catch(ConsulException e){\r
-                       logger.error(logger.errorLogger, "Couldn't connect to consul - shouldn't break anything.");\r
-                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.ERROR,"Error!", new ArrayList<>());\r
-               }\r
-       }\r
-       \r
-       @RequestMapping(value = { "/service/all/{service}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<List<ServiceHealth>> getAllNodes(HttpServletRequest request, HttpServletResponse response, @PathVariable("service") String service) {\r
-               try{\r
-                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.OK, "Success!", consulHealthService.getAllNodes(service));\r
-               }\r
-               catch(ConsulException e){\r
-                       logger.error(logger.errorLogger, "Couldn't connect to consul - shouldn't break anything.");\r
-                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.ERROR,"Error!", new ArrayList<>());\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.orbitz.consul.ConsulException;
+import com.orbitz.consul.model.health.ServiceHealth;
+
+import io.searchbox.client.config.exception.NoServerConfiguredException;
+
+@RestController
+@RequestMapping("/portalApi/consul")
+public class ConsulClientController extends EPRestrictedBaseController {
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ConsulClientController.class);
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       // Get location of a healthy node running our service
+       @RequestMapping(value = { "/service/{service}" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<String> getServiceLocation(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("service") String service) {
+
+               try {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Success!",
+                                       consulHealthService.getServiceLocation(service, null));
+               } catch (NoServerConfiguredException e) {
+                       logger.error(logger.errorLogger, "No healthy service exception!");
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.WARN, "Warning!",
+                                       "No healthy service exception!");
+               } catch (ConsulException e) {
+                       logger.error(logger.errorLogger, "Couldn't connect ot consul - Is consul running?");
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "Error!",
+                                       "Couldn't connect ot consul - Is consul running?");
+               }
+       }
+
+       @RequestMapping(value = { "/service/healthy/{service}" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<List<ServiceHealth>> getAllHealthyNodes(HttpServletRequest request,
+                       HttpServletResponse response, @PathVariable("service") String service) {
+               try {
+                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.OK, "Success!",
+                                       consulHealthService.getAllHealthyNodes(service));
+               } catch (ConsulException e) {
+                       logger.error(logger.errorLogger, "Couldn't connect to consul - shouldn't break anything.");
+                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.ERROR, "Error!", new ArrayList<>());
+               }
+       }
+
+       @RequestMapping(value = { "/service/all/{service}" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<List<ServiceHealth>> getAllNodes(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("service") String service) {
+               try {
+                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.OK, "Success!",
+                                       consulHealthService.getAllNodes(service));
+               } catch (ConsulException e) {
+                       logger.error(logger.errorLogger, "Couldn't connect to consul - shouldn't break anything.");
+                       return new PortalRestResponse<List<ServiceHealth>>(PortalRestStatusEnum.ERROR, "Error!", new ArrayList<>());
+               }
+       }
+
+}
index 290a5ff..81a61d5 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.text.ParseException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompAuditLog;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.service.DashboardSearchService;\r
-import org.openecomp.portalapp.portal.transport.CommonWidget;\r
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.domain.AuditLog;\r
-import org.openecomp.portalsdk.core.domain.support.CollaborateList;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.AuditService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-/**\r
- * Controller supplies data to Angular services on the dashboard page.\r
- */\r
-@Configuration\r
-@RestController\r
-@RequestMapping("/portalApi/dashboard")\r
-public class DashboardController extends EPRestrictedBaseController {\r
-\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardController.class);\r
-\r
-       @Autowired\r
-       private DashboardSearchService searchService;\r
-       @Autowired\r
-       private AuditService auditService;\r
-       \r
-       public enum WidgetCategory {\r
-               EVENTS, NEWS, IMPORTANTRESOURCES;\r
-       }\r
-\r
-       /**\r
-        * Validates the resource type parameter.\r
-        * \r
-        * @param resourceType\r
-        * @return True if known in the enum WidgetCategory, else false.\r
-        */\r
-       private boolean isValidResourceType(String resourceType) {\r
-               if (resourceType == null)\r
-                       return false;\r
-               for (WidgetCategory wc : WidgetCategory.values())\r
-                       if (wc.name().equals(resourceType))\r
-                               return true;\r
-               return false;\r
-       }\r
-\r
-       /**\r
-        * Gets all widgets of the specified resource type. \r
-        * In iteration 41 (when widget will utilized service onboarding), this method can be removed, instead we will use CommonWidgetController.java (basic auth based)\r
-        * \r
-        * @param request\r
-        * @param resourceType\r
-        *            Request parameter.\r
-        * @return Rest response wrapped around a CommonWidgetMeta object.\r
-        */\r
-       @RequestMapping(value = "/widgetData", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<CommonWidgetMeta> getWidgetData(HttpServletRequest request,\r
-                       @RequestParam String resourceType) {\r
-               if (!isValidResourceType(resourceType))\r
-                       return new PortalRestResponse<CommonWidgetMeta>(PortalRestStatusEnum.ERROR,\r
-                                       "Unexpected resource type " + resourceType, null);\r
-               return new PortalRestResponse<CommonWidgetMeta>(PortalRestStatusEnum.OK, "success",\r
-                               searchService.getWidgetData(resourceType));\r
-       }\r
-       \r
-       \r
-       /**\r
-        * Saves a batch of events, news or resources.\r
-        * \r
-        * @param commonWidgetMeta\r
-        *            read from POST body.\r
-        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"\r
-        */\r
-       @RequestMapping(value = "/widgetDataBulk", method = RequestMethod.POST, produces = "application/json")\r
-       public PortalRestResponse<String> saveWidgetDataBulk(@RequestBody CommonWidgetMeta commonWidgetMeta) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "saveWidgetDataBulk: argument is {}", commonWidgetMeta);\r
-               if (commonWidgetMeta.getCategory() == null || commonWidgetMeta.getCategory().trim().equals(""))\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "ERROR",\r
-                                       "Category cannot be null or empty");\r
-               if (!isValidResourceType(commonWidgetMeta.getCategory()))\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,\r
-                                       "Unexpected resource type " + commonWidgetMeta.getCategory(), null);\r
-               // validate dates\r
-               for (CommonWidget cw : commonWidgetMeta.getItems()) {\r
-                       String err = validateCommonWidget(cw);\r
-                       if (err != null)\r
-                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, err, null);\r
-               }\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",\r
-                               searchService.saveWidgetDataBulk(commonWidgetMeta));\r
-       }\r
-\r
-       /**\r
-        * Saves one: event, news or resource\r
-        * \r
-        * @param commonWidget\r
-        *            read from POST body\r
-        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"\r
-        */\r
-       @RequestMapping(value = "/widgetData", method = RequestMethod.POST, produces = "application/json")\r
-       public PortalRestResponse<String> saveWidgetData(@RequestBody CommonWidget commonWidget) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "saveWidgetData: argument is {}", commonWidget);\r
-               if (commonWidget.getCategory() == null || commonWidget.getCategory().trim().equals(""))\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "ERROR",\r
-                                       "Category cannot be null or empty");\r
-               String err = validateCommonWidget(commonWidget);\r
-               if (err != null)\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, err, null);\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",\r
-                               searchService.saveWidgetData(commonWidget));\r
-       }\r
-\r
-       /**\r
-        * Used by the validate function\r
-        */\r
-       private final SimpleDateFormat yearMonthDayFormat = new SimpleDateFormat("yyyy-MM-dd");\r
-\r
-       /**\r
-        * Validates the content of a common widget.\r
-        * \r
-        * @param cw\r
-        * @return null on success; an error message if validation fails.\r
-        * @throws Exception\r
-        */\r
-       private String validateCommonWidget(CommonWidget cw) {\r
-               if (!isValidResourceType(cw.getCategory()))\r
-                       return "Invalid category: " + cw.getCategory();\r
-               if (cw.getTitle() == null || cw.getTitle().trim().length() == 0)\r
-                       return "Title is missing";\r
-               if (cw.getHref() == null || cw.getHref().trim().length() == 0)\r
-                       return "HREF is missing";\r
-               if (!cw.getHref().toLowerCase().startsWith("http"))\r
-                       return "HREF does not start with http";\r
-               if (cw.getSortOrder() == null)\r
-                       return "Sort order is null";\r
-               if (WidgetCategory.EVENTS.name().equals(cw.getCategory())) {\r
-                       if (cw.getEventDate() == null || cw.getEventDate().trim().length() == 0)\r
-                               return "Date is missing";\r
-                       try {\r
-                               yearMonthDayFormat.setLenient(false);\r
-                               Date date = yearMonthDayFormat.parse(cw.getEventDate());\r
-                               if (date == null)\r
-                                       return "Failed to parse date " + cw.getEventDate();\r
-                       } catch (ParseException ex) {\r
-                               return ex.toString();\r
-                       }\r
-               }\r
-               return null;\r
-       }\r
-\r
-       /**\r
-        * Deletes one: event, news or resource\r
-        * \r
-        * @param commonWidget\r
-        *            read from POST body\r
-        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"\r
-        */\r
-       @RequestMapping(value = "/deleteData", method = RequestMethod.POST, produces = "application/json")\r
-       public PortalRestResponse<String> deleteWidgetData(@RequestBody CommonWidget commonWidget) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "deleteWidgetData: argument is {}", commonWidget);\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",\r
-                               searchService.deleteWidgetData(commonWidget));\r
-       }\r
-\r
-       /**\r
-        * Searches all portal for the input string.\r
-        * \r
-        * @param request\r
-        * @param searchString\r
-        * @return Rest response wrapped around a Map of String to List of Search\r
-        *         Result Item.\r
-        */\r
-       @EPAuditLog\r
-       @RequestMapping(value = "/search", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, List<SearchResultItem>>> searchPortal(HttpServletRequest request,\r
-                       @RequestParam String searchString) {\r
-\r
-               if (searchString != null)\r
-                       searchString = searchString.trim();\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               try {\r
-                       if (user == null) {\r
-                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR,\r
-                                               "searchPortal: User object is null? - check logs",\r
-                                               new HashMap<String, List<SearchResultItem>>());\r
-                       } else if (searchString == null || searchString.length() == 0) {\r
-                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, "searchPortal: String string is null",\r
-                                               new HashMap<String, List<SearchResultItem>>());\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "searchPortal: user {}, search string '{}'",\r
-                                               user.getLoginId(), searchString);\r
-                               Map<String, List<SearchResultItem>> results = searchService.searchResults(user.getLoginId(),\r
-                                               searchString);\r
-                               /*Audit log the search*/\r
-                               AuditLog auditLog = new AuditLog();\r
-                               auditLog.setUserId(user.getId());\r
-                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_SEARCH);\r
-                               auditLog.setComments(searchString);\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          \r
-                               auditService.logActivity(auditLog, null);\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               EcompPortalUtils.calculateDateTimeDifferenceForLog(MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));\r
-                               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("DashboardController.PortalRestResponse", \r
-                                               EcompAuditLog.CD_ACTIVITY_SEARCH, user.getOrgUserId(), null, searchString));    \r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);\r
-                               MDC.remove(SystemProperties.MDC_TIMER);\r
-                               return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "searchPortal failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.getMessage() + " - check logs.",\r
-                                       new HashMap<String, List<SearchResultItem>>());\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Gets all active users.\r
-        * \r
-        * TODO: should only the superuser be allowed to use this API?\r
-        * \r
-        * @param request\r
-        * @return Rest response wrapped around a list of String\r
-        */\r
-       @RequestMapping(value = "/activeUsers", method = RequestMethod.GET, produces = "application/json")\r
-       public List<String> getActiveUsers(HttpServletRequest request) {\r
-               List<String> activeUsers = null;\r
-               List<String> onlineUsers = new ArrayList<>();\r
-               try {\r
-                       EPUser user = EPUserUtils.getUserSession(request);\r
-                       String userId = user.getOrgUserId();\r
-\r
-                       activeUsers = searchService.getRelatedUsers(userId);\r
-                       HashSet<String> usersSet = CollaborateList.getInstance().getAllUserName();\r
-                       for (String users : activeUsers) {\r
-                               if (usersSet.contains(users)) {\r
-                                       onlineUsers.add(users);\r
-                               }\r
-                       }\r
-\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getActiveUsers failed", e);\r
-               }\r
-               return onlineUsers;\r
-       }\r
-       \r
-       /**\r
-        * Gets the refresh interval and duration of a cycle of continuous refreshing for the online users side panel, both in milliseconds.\r
-        * \r
-        * @param request\r
-        * @return Rest response wrapped around a number that is the number of milliseconds.\r
-        */\r
-       @RequestMapping(value = "/onlineUserUpdateRate", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, String>> getOnlineUserUpdateRate(HttpServletRequest request) {\r
-               try {\r
-                       String updateRate = SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE);     \r
-                       String updateDuration = SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION);                             \r
-                       Integer rateInMiliSec = Integer.valueOf(updateRate)*1000;\r
-                       Integer durationInMiliSec = Integer.valueOf(updateDuration)*1000;\r
-                       Map<String, String> results = new HashMap<String,String>();\r
-                       results.put("onlineUserUpdateRate", String.valueOf(rateInMiliSec));\r
-                       results.put("onlineUserUpdateDuration", String.valueOf(durationInMiliSec));                     \r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getOnlineUserUpdateRate failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }               \r
-       }\r
-\r
-       /**\r
-        * Gets the window width threshold for collapsing right menu from system.properties.\r
-        * \r
-        * @param request\r
-        * @return Rest response wrapped around a number that is the window width threshold to collapse right menu.\r
-        */\r
-       @RequestMapping(value = "/windowWidthThresholdRightMenu", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, String>> getWindowWidthThresholdForRightMenu(HttpServletRequest request) {\r
-               try {\r
-                       String windowWidthString = SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU);    \r
-                       Integer windowWidth = Integer.valueOf(windowWidthString);\r
-                       Map<String, String> results = new HashMap<String,String>();\r
-                       results.put("windowWidth", String.valueOf(windowWidth));\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getWindowWidthThresholdForRightMenu failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }               \r
-       }\r
-\r
-\r
-       /**\r
-        * Gets the window width threshold for collapsing left menu from system.properties.\r
-        * \r
-        * @param request\r
-        * @return Rest response wrapped around a number that is the window width threshold to collapse the left menu.\r
-        */\r
-       @RequestMapping(value = "/windowWidthThresholdLeftMenu", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, String>> getWindowWidthThresholdForLeftMenu(HttpServletRequest request) {\r
-               try {\r
-                       String windowWidthString = SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU);     \r
-                       Integer windowWidth = Integer.valueOf(windowWidthString);\r
-                       Map<String, String> results = new HashMap<String,String>();\r
-                       results.put("windowWidth", String.valueOf(windowWidth));\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getWindowWidthThresholdForLeftMenu failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }               \r
-       }\r
-       \r
-       /**\r
-        * Gets only those users that are 'related' to the currently logged-in user.\r
-        * \r
-        * @param request\r
-        * @return Rest response wrapped around a List of String\r
-        */\r
-       @RequestMapping(value = "/relatedUsers", method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<List<String>> activeUsers(HttpServletRequest request) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               try {\r
-                       if (user == null) {\r
-                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, "User object is null? - check logs",\r
-                                               new ArrayList<>());\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "activeUsers: searching for user {}", user.getLoginId());\r
-                               return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success",\r
-                                               searchService.getRelatedUsers(user.getLoginId()));\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "activeUsers failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.getMessage() + " - check logs.",\r
-                                       new ArrayList<>());\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAuditLog;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.domain.support.CollaborateList;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Controller supplies data to Angular services on the dashboard page.
+ */
+@Configuration
+@RestController
+@RequestMapping("/portalApi/dashboard")
+public class DashboardController extends EPRestrictedBaseController {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(DashboardController.class);
+
+       @Autowired
+       private DashboardSearchService searchService;
+       @Autowired
+       private AuditService auditService;
+       
+       public enum WidgetCategory {
+               EVENTS, NEWS, IMPORTANTRESOURCES;
+       }
+
+       /**
+        * Validates the resource type parameter.
+        * 
+        * @param resourceType
+        * @return True if known in the enum WidgetCategory, else false.
+        */
+       private boolean isValidResourceType(String resourceType) {
+               if (resourceType == null)
+                       return false;
+               for (WidgetCategory wc : WidgetCategory.values())
+                       if (wc.name().equals(resourceType))
+                               return true;
+               return false;
+       }
+
+       /**
+        * Gets all widgets of the specified resource type. 
+        * In iteration 41 (when widget will utilized service onboarding), this method can be removed, instead we will use CommonWidgetController.java (basic auth based)
+        * 
+        * @param request
+        * @param resourceType
+        *            Request parameter.
+        * @return Rest response wrapped around a CommonWidgetMeta object.
+        */
+       @RequestMapping(value = "/widgetData", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<CommonWidgetMeta> getWidgetData(HttpServletRequest request,
+                       @RequestParam String resourceType) {
+               if (!isValidResourceType(resourceType))
+                       return new PortalRestResponse<CommonWidgetMeta>(PortalRestStatusEnum.ERROR,
+                                       "Unexpected resource type " + resourceType, null);
+               return new PortalRestResponse<CommonWidgetMeta>(PortalRestStatusEnum.OK, "success",
+                               searchService.getWidgetData(resourceType));
+       }
+       
+       
+       /**
+        * Saves a batch of events, news or resources.
+        * 
+        * @param commonWidgetMeta
+        *            read from POST body.
+        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"
+        */
+       @RequestMapping(value = "/widgetDataBulk", method = RequestMethod.POST, produces = "application/json")
+       public PortalRestResponse<String> saveWidgetDataBulk(@RequestBody CommonWidgetMeta commonWidgetMeta) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "saveWidgetDataBulk: argument is {}", commonWidgetMeta);
+               if (commonWidgetMeta.getCategory() == null || commonWidgetMeta.getCategory().trim().equals(""))
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "ERROR",
+                                       "Category cannot be null or empty");
+               if (!isValidResourceType(commonWidgetMeta.getCategory()))
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                       "Unexpected resource type " + commonWidgetMeta.getCategory(), null);
+               // validate dates
+               for (CommonWidget cw : commonWidgetMeta.getItems()) {
+                       String err = validateCommonWidget(cw);
+                       if (err != null)
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, err, null);
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",
+                               searchService.saveWidgetDataBulk(commonWidgetMeta));
+       }
+
+       /**
+        * Saves one: event, news or resource
+        * 
+        * @param commonWidget
+        *            read from POST body
+        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"
+        */
+       @RequestMapping(value = "/widgetData", method = RequestMethod.POST, produces = "application/json")
+       public PortalRestResponse<String> saveWidgetData(@RequestBody CommonWidget commonWidget) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "saveWidgetData: argument is {}", commonWidget);
+               if (commonWidget.getCategory() == null || commonWidget.getCategory().trim().equals(""))
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "ERROR",
+                                       "Category cannot be null or empty");
+               String err = validateCommonWidget(commonWidget);
+               if (err != null)
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, err, null);
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",
+                               searchService.saveWidgetData(commonWidget));
+       }
+
+       /**
+        * Used by the validate function
+        */
+       private final SimpleDateFormat yearMonthDayFormat = new SimpleDateFormat("yyyy-MM-dd");
+
+       /**
+        * Validates the content of a common widget.
+        * 
+        * @param cw
+        * @return null on success; an error message if validation fails.
+        * @throws Exception
+        */
+       private String validateCommonWidget(CommonWidget cw) {
+               if (!isValidResourceType(cw.getCategory()))
+                       return "Invalid category: " + cw.getCategory();
+               if (cw.getTitle() == null || cw.getTitle().trim().length() == 0)
+                       return "Title is missing";
+               if (cw.getHref() == null || cw.getHref().trim().length() == 0)
+                       return "HREF is missing";
+               if (!cw.getHref().toLowerCase().startsWith("http"))
+                       return "HREF does not start with http";
+               if (cw.getSortOrder() == null)
+                       return "Sort order is null";
+               if (WidgetCategory.EVENTS.name().equals(cw.getCategory())) {
+                       if (cw.getEventDate() == null || cw.getEventDate().trim().length() == 0)
+                               return "Date is missing";
+                       try {
+                               yearMonthDayFormat.setLenient(false);
+                               Date date = yearMonthDayFormat.parse(cw.getEventDate());
+                               if (date == null)
+                                       return "Failed to parse date " + cw.getEventDate();
+                       } catch (ParseException ex) {
+                               return ex.toString();
+                       }
+               }
+               return null;
+       }
+
+       /**
+        * Deletes one: event, news or resource
+        * 
+        * @param commonWidget
+        *            read from POST body
+        * @return Rest response wrapped around a String; e.g., "success" or "ERROR"
+        */
+       @RequestMapping(value = "/deleteData", method = RequestMethod.POST, produces = "application/json")
+       public PortalRestResponse<String> deleteWidgetData(@RequestBody CommonWidget commonWidget) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "deleteWidgetData: argument is {}", commonWidget);
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success",
+                               searchService.deleteWidgetData(commonWidget));
+       }
+
+       /**
+        * Searches all portal for the input string.
+        * 
+        * @param request
+        * @param searchString
+        * @return Rest response wrapped around a Map of String to List of Search
+        *         Result Item.
+        */
+       @EPAuditLog
+       @RequestMapping(value = "/search", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, List<SearchResultItem>>> searchPortal(HttpServletRequest request,
+                       @RequestParam String searchString) {
+
+               if (searchString != null)
+                       searchString = searchString.trim();
+               EPUser user = EPUserUtils.getUserSession(request);
+               try {
+                       if (user == null) {
+                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR,
+                                               "searchPortal: User object is null? - check logs",
+                                               new HashMap<String, List<SearchResultItem>>());
+                       } else if (searchString == null || searchString.length() == 0) {
+                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, "searchPortal: String string is null",
+                                               new HashMap<String, List<SearchResultItem>>());
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "searchPortal: user {}, search string '{}'",
+                                               user.getLoginId(), searchString);
+                               Map<String, List<SearchResultItem>> results = searchService.searchResults(user.getLoginId(),
+                                               searchString);
+                               /*Audit log the search*/
+                               AuditLog auditLog = new AuditLog();
+                               auditLog.setUserId(user.getId());
+                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_SEARCH);
+                               auditLog.setComments(searchString);
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          
+                               auditService.logActivity(auditLog, null);
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               EcompPortalUtils.calculateDateTimeDifferenceForLog(MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("DashboardController.PortalRestResponse", 
+                                               EcompAuditLog.CD_ACTIVITY_SEARCH, user.getOrgUserId(), null, searchString));    
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                               MDC.remove(SystemProperties.MDC_TIMER);
+                               return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "searchPortal failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.getMessage() + " - check logs.",
+                                       new HashMap<String, List<SearchResultItem>>());
+               }
+       }
+
+       /**
+        * Gets all active users.
+        * 
+        * TODO: should only the superuser be allowed to use this API?
+        * 
+        * @param request
+        * @return Rest response wrapped around a list of String
+        */
+       @RequestMapping(value = "/activeUsers", method = RequestMethod.GET, produces = "application/json")
+       public List<String> getActiveUsers(HttpServletRequest request) {
+               List<String> activeUsers = null;
+               List<String> onlineUsers = new ArrayList<>();
+               try {
+                       EPUser user = EPUserUtils.getUserSession(request);
+                       String userId = user.getOrgUserId();
+
+                       activeUsers = searchService.getRelatedUsers(userId);
+                       HashSet<String> usersSet = CollaborateList.getInstance().getAllUserName();
+                       for (String users : activeUsers) {
+                               if (usersSet.contains(users)) {
+                                       onlineUsers.add(users);
+                               }
+                       }
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getActiveUsers failed", e);
+               }
+               return onlineUsers;
+       }
+       
+       /**
+        * Gets the refresh interval and duration of a cycle of continuous refreshing for the online users side panel, both in milliseconds.
+        * 
+        * @param request
+        * @return Rest response wrapped around a number that is the number of milliseconds.
+        */
+       @RequestMapping(value = "/onlineUserUpdateRate", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, String>> getOnlineUserUpdateRate(HttpServletRequest request) {
+               try {
+                       String updateRate = SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE);     
+                       String updateDuration = SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION);                             
+                       Integer rateInMiliSec = Integer.valueOf(updateRate)*1000;
+                       Integer durationInMiliSec = Integer.valueOf(updateDuration)*1000;
+                       Map<String, String> results = new HashMap<String,String>();
+                       results.put("onlineUserUpdateRate", String.valueOf(rateInMiliSec));
+                       results.put("onlineUserUpdateDuration", String.valueOf(durationInMiliSec));                     
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getOnlineUserUpdateRate failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }               
+       }
+
+       /**
+        * Gets the window width threshold for collapsing right menu from system.properties.
+        * 
+        * @param request
+        * @return Rest response wrapped around a number that is the window width threshold to collapse right menu.
+        */
+       @RequestMapping(value = "/windowWidthThresholdRightMenu", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, String>> getWindowWidthThresholdForRightMenu(HttpServletRequest request) {
+               try {
+                       String windowWidthString = SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU);    
+                       Integer windowWidth = Integer.valueOf(windowWidthString);
+                       Map<String, String> results = new HashMap<String,String>();
+                       results.put("windowWidth", String.valueOf(windowWidth));
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getWindowWidthThresholdForRightMenu failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }               
+       }
+
+
+       /**
+        * Gets the window width threshold for collapsing left menu from system.properties.
+        * 
+        * @param request
+        * @return Rest response wrapped around a number that is the window width threshold to collapse the left menu.
+        */
+       @RequestMapping(value = "/windowWidthThresholdLeftMenu", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, String>> getWindowWidthThresholdForLeftMenu(HttpServletRequest request) {
+               try {
+                       String windowWidthString = SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU);     
+                       Integer windowWidth = Integer.valueOf(windowWidthString);
+                       Map<String, String> results = new HashMap<String,String>();
+                       results.put("windowWidth", String.valueOf(windowWidth));
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getWindowWidthThresholdForLeftMenu failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }               
+       }
+       
+       /**
+        * Gets only those users that are 'related' to the currently logged-in user.
+        * 
+        * @param request
+        * @return Rest response wrapped around a List of String
+        */
+       @RequestMapping(value = "/relatedUsers", method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<List<String>> activeUsers(HttpServletRequest request) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               try {
+                       if (user == null) {
+                               return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, "User object is null? - check logs",
+                                               new ArrayList<>());
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "activeUsers: searching for user {}", user.getLoginId());
+                               return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success",
+                                               searchService.getRelatedUsers(user.getLoginId()));
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "activeUsers failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.getMessage() + " - check logs.",
+                                       new ArrayList<>());
+               }
+       }
+
+}
index 41da335..ac1b925 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-import java.util.Calendar;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.EPLoginService;\r
-import org.openecomp.portalapp.portal.service.EPRoleService;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.service.UserNotificationService;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.portal.utils.PortalConstants;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.http.HttpStatus;\r
-import org.springframework.web.bind.annotation.ExceptionHandler;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.ResponseBody;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-@RestController\r
-@RequestMapping(PortalConstants.REST_AUX_API)\r
-@Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseController {\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppsRestfulController.class);\r
-\r
-       @Autowired\r
-       private FunctionalMenuService functionalMenuService;\r
-\r
-       @Autowired\r
-       private EPLoginService epLoginService;\r
-\r
-       @Autowired\r
-       private AdminRolesService adminRolesService;\r
-\r
-       @Autowired\r
-       private UserNotificationService userNotificationService;\r
-\r
-       @Autowired\r
-       private EPRoleService epRoleService;\r
-\r
-       @ApiOperation(value = "Creates a Portal user notification for roles identified in the content from an external application.", response = PortalAPIResponse.class)\r
-       @RequestMapping(value = { "/publishNotification" }, method = RequestMethod.POST, produces = "application/json")\r
-       @ResponseBody\r
-       public PortalAPIResponse publishNotification(HttpServletRequest request,\r
-                       @RequestBody EpNotificationItem notificationItem) throws Exception {\r
-               String appKey = request.getHeader("uebkey");\r
-               EPApp app = findEpApp(appKey);\r
-               List<Long> postRoleIds = new ArrayList<Long>();\r
-               for (Long roleId : notificationItem.getRoleIds()) {\r
-                       EPRole role = epRoleService.getRole(app.getId(), roleId);\r
-                       if (role != null)\r
-                               postRoleIds.add(role.getId());\r
-               }\r
-\r
-               // --- recreate the user notification object with the POrtal Role Ids\r
-               EpNotificationItem postItem = new EpNotificationItem();\r
-               postItem.setRoleIds(postRoleIds);\r
-               postItem.setIsForAllRoles("N");\r
-               postItem.setIsForOnlineUsers("N");\r
-               postItem.setActiveYn("Y");\r
-               postItem.setPriority(notificationItem.getPriority());\r
-               postItem.setMsgHeader(notificationItem.getMsgHeader());\r
-               postItem.setMsgDescription(notificationItem.getMsgDescription());\r
-               postItem.setStartTime(notificationItem.getStartTime());\r
-               postItem.setEndTime(notificationItem.getEndTime());\r
-               postItem.setCreatedDate(Calendar.getInstance().getTime());\r
-               // default creator to 1 for now\r
-               postItem.setCreatorId(PortalConstants.DEFAULT_NOTIFICATION_CREATOR);\r
-               // ----\r
-\r
-               try {\r
-                       userNotificationService.saveNotification(postItem);\r
-               } catch (Exception e) {\r
-                       return new PortalAPIResponse(false, e.getMessage());\r
-               }\r
-\r
-               PortalAPIResponse response = new PortalAPIResponse(true, "success");\r
-               return response;\r
-       }\r
-\r
-       private EPApp findEpApp(String uebKey) {\r
-               List<?> list = null;\r
-               StringBuffer criteria = new StringBuffer();\r
-               criteria.append(" where ueb_key = '" + uebKey + "'");\r
-               list = getDataAccessService().getList(EPApp.class, criteria.toString(), null, null);\r
-               return (list == null || list.size() == 0) ? null : (EPApp) list.get(0);\r
-       }\r
-\r
-       @ApiOperation(value = "Gets favorite items within the functional menu for the current user.", response = FavoritesFunctionalMenuItemJson.class, responseContainer="List")\r
-       @RequestMapping(value = { "/getFavorites" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FavoritesFunctionalMenuItemJson> getFavoritesForUser(HttpServletRequest request,\r
-                       HttpServletResponse response) throws Exception {\r
-               String loginId = "";\r
-               String userAgent = "";\r
-               List<FavoritesFunctionalMenuItemJson> favorites = null;\r
-\r
-               loginId = request.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID);\r
-               userAgent = MDC.get(EPCommonSystemProperties.PARTNER_NAME);\r
-\r
-               EPUser epUser = epLoginService.findUserWithoutPwd(loginId);\r
-               logger.info(EELFLoggerDelegate.errorLogger,\r
-                               "getFavorites request was received from " + userAgent + " for the user " + loginId + ".");\r
-               if (epUser == null || epUser.getId() == null) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "No User record found for the LoginId '" + loginId + "' in the database.");\r
-                       throw new Exception("Received null for Login-Id.");\r
-               } else {\r
-                       favorites = functionalMenuService.getFavoriteItems(epUser.getId());\r
-                       FieldsValidator fieldsValidator = new FieldsValidator();\r
-                       response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/getFavorites", "result = ", favorites);\r
-               }\r
-\r
-               return favorites;\r
-       }\r
-\r
-       @ApiOperation(value = "Gets functional menu items appropriate for the current user.", response = FunctionalMenuItem.class, responseContainer="List")\r
-       @RequestMapping(value = {\r
-                       "/functionalMenuItemsForUser" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getFunctionalMenuItemsForUser(HttpServletRequest request,\r
-                       HttpServletResponse response) throws Exception {\r
-               String loginId = "";\r
-               String userAgent = "";\r
-               List<FunctionalMenuItem> fnMenuItems = null;\r
-\r
-               loginId = request.getHeader("LoginId");\r
-               userAgent = MDC.get(EPCommonSystemProperties.PARTNER_NAME);\r
-\r
-               EPUser epUser = epLoginService.findUserWithoutPwd(loginId);\r
-               logger.info(EELFLoggerDelegate.errorLogger, "getFunctionalMenuItemsForUser request was received from "\r
-                               + userAgent + " for the user " + loginId + ".");\r
-               if (epUser == null || epUser.getId() == null) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "No User record found for the LoginId '" + loginId + "' in the database.");\r
-                       throw new Exception("Received null for Login-Id.");\r
-               } else if (adminRolesService.isSuperAdmin(epUser)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "FunctionalMenuHandler: SuperUser, about to call getFunctionalMenuItems()");\r
-                       fnMenuItems = functionalMenuService.getFunctionalMenuItems();\r
-               } else {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "getMenuItemsForAuthUser: about to call getFunctionalMenuItemsForUser()");\r
-                       fnMenuItems = functionalMenuService.getFunctionalMenuItemsForUser(epUser.getOrgUserId());\r
-               }\r
-\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/functionalMenuItemsForUser", "result = ", fnMenuItems);\r
-\r
-               return fnMenuItems;\r
-       }\r
-\r
-       @ExceptionHandler(Exception.class)\r
-       protected void handleBadRequests(Exception e, HttpServletResponse response) throws IOException {\r
-               logger.warn(EELFLoggerDelegate.errorLogger, "Handling bad request", e);\r
-               response.sendError(HttpStatus.BAD_REQUEST.value(), e.getMessage());\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPLoginService;
+import org.openecomp.portalapp.portal.service.EPRoleService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class ExternalAppsRestfulController extends EPRestrictedRESTfulBaseController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppsRestfulController.class);
+
+       @Autowired
+       private FunctionalMenuService functionalMenuService;
+
+       @Autowired
+       private EPLoginService epLoginService;
+
+       @Autowired
+       private AdminRolesService adminRolesService;
+
+       @Autowired
+       private UserNotificationService userNotificationService;
+
+       @Autowired
+       private EPRoleService epRoleService;
+
+       @ApiOperation(value = "Creates a Portal user notification for roles identified in the content from an external application.", response = PortalAPIResponse.class)
+       @RequestMapping(value = { "/publishNotification" }, method = RequestMethod.POST, produces = "application/json")
+       @ResponseBody
+       public PortalAPIResponse publishNotification(HttpServletRequest request,
+                       @RequestBody EpNotificationItem notificationItem) throws Exception {
+               String appKey = request.getHeader("uebkey");
+               EPApp app = findEpApp(appKey);
+               List<Long> postRoleIds = new ArrayList<Long>();
+               for (Long roleId : notificationItem.getRoleIds()) {
+                       EPRole role = epRoleService.getRole(app.getId(), roleId);
+                       if (role != null)
+                               postRoleIds.add(role.getId());
+               }
+
+               // --- recreate the user notification object with the POrtal Role Ids
+               EpNotificationItem postItem = new EpNotificationItem();
+               postItem.setRoleIds(postRoleIds);
+               postItem.setIsForAllRoles("N");
+               postItem.setIsForOnlineUsers("N");
+               postItem.setActiveYn("Y");
+               postItem.setPriority(notificationItem.getPriority());
+               postItem.setMsgHeader(notificationItem.getMsgHeader());
+               postItem.setMsgDescription(notificationItem.getMsgDescription());
+               postItem.setStartTime(notificationItem.getStartTime());
+               postItem.setEndTime(notificationItem.getEndTime());
+               postItem.setCreatedDate(Calendar.getInstance().getTime());
+               // default creator to 1 for now
+               postItem.setCreatorId(PortalConstants.DEFAULT_NOTIFICATION_CREATOR);
+               // ----
+
+               try {
+                       userNotificationService.saveNotification(postItem);
+               } catch (Exception e) {
+                       return new PortalAPIResponse(false, e.getMessage());
+               }
+
+               PortalAPIResponse response = new PortalAPIResponse(true, "success");
+               return response;
+       }
+
+       private EPApp findEpApp(String uebKey) {
+               List<?> list = null;
+               StringBuffer criteria = new StringBuffer();
+               criteria.append(" where ueb_key = '" + uebKey + "'");
+               list = getDataAccessService().getList(EPApp.class, criteria.toString(), null, null);
+               return (list == null || list.size() == 0) ? null : (EPApp) list.get(0);
+       }
+
+       @ApiOperation(value = "Gets favorite items within the functional menu for the current user.", response = FavoritesFunctionalMenuItemJson.class, responseContainer="List")
+       @RequestMapping(value = { "/getFavorites" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FavoritesFunctionalMenuItemJson> getFavoritesForUser(HttpServletRequest request,
+                       HttpServletResponse response) throws Exception {
+               String loginId = "";
+               String userAgent = "";
+               List<FavoritesFunctionalMenuItemJson> favorites = null;
+
+               loginId = request.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID);
+               userAgent = MDC.get(EPCommonSystemProperties.PARTNER_NAME);
+
+               EPUser epUser = epLoginService.findUserWithoutPwd(loginId);
+               logger.info(EELFLoggerDelegate.errorLogger,
+                               "getFavorites request was received from " + userAgent + " for the user " + loginId + ".");
+               if (epUser == null || epUser.getId() == null) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "No User record found for the LoginId '" + loginId + "' in the database.");
+                       throw new Exception("Received null for Login-Id.");
+               } else {
+                       favorites = functionalMenuService.getFavoriteItems(epUser.getId());
+                       FieldsValidator fieldsValidator = new FieldsValidator();
+                       response.setStatus(fieldsValidator.httpStatusCode.intValue());
+
+                       EcompPortalUtils.logAndSerializeObject(logger, "/getFavorites", "result = ", favorites);
+               }
+
+               return favorites;
+       }
+
+       @ApiOperation(value = "Gets functional menu items appropriate for the current user.", response = FunctionalMenuItem.class, responseContainer="List")
+       @RequestMapping(value = {
+                       "/functionalMenuItemsForUser" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getFunctionalMenuItemsForUser(HttpServletRequest request,
+                       HttpServletResponse response) throws Exception {
+               String loginId = "";
+               String userAgent = "";
+               List<FunctionalMenuItem> fnMenuItems = null;
+
+               loginId = request.getHeader("LoginId");
+               userAgent = MDC.get(EPCommonSystemProperties.PARTNER_NAME);
+
+               EPUser epUser = epLoginService.findUserWithoutPwd(loginId);
+               logger.info(EELFLoggerDelegate.errorLogger, "getFunctionalMenuItemsForUser request was received from "
+                               + userAgent + " for the user " + loginId + ".");
+               if (epUser == null || epUser.getId() == null) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "No User record found for the LoginId '" + loginId + "' in the database.");
+                       throw new Exception("Received null for Login-Id.");
+               } else if (adminRolesService.isSuperAdmin(epUser)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "FunctionalMenuHandler: SuperUser, about to call getFunctionalMenuItems()");
+                       fnMenuItems = functionalMenuService.getFunctionalMenuItems();
+               } else {
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "getMenuItemsForAuthUser: about to call getFunctionalMenuItemsForUser()");
+                       fnMenuItems = functionalMenuService.getFunctionalMenuItemsForUser(epUser.getOrgUserId());
+               }
+
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               response.setStatus(fieldsValidator.httpStatusCode.intValue());
+
+               EcompPortalUtils.logAndSerializeObject(logger, "/functionalMenuItemsForUser", "result = ", fnMenuItems);
+
+               return fnMenuItems;
+       }
+
+       @ExceptionHandler(Exception.class)
+       protected void handleBadRequests(Exception e, HttpServletResponse response) throws IOException {
+               logger.warn(EELFLoggerDelegate.errorLogger, "Handling bad request", e);
+               response.sendError(HttpStatus.BAD_REQUEST.value(), e.getMessage());
+       }
+}
index de71766..490a182 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Comparator;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.cxf.transport.http.HTTPException;\r
-import org.json.JSONObject;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.UserProfileService;\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.SharedContext;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.EPAuditService;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.service.SearchService;\r
-import org.openecomp.portalapp.portal.service.SharedContextService;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-\r
-/**\r
- * Supports menus at the top of the Portal app landing page.\r
- */\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class FunctionalMenuController extends EPRestrictedBaseController {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuController.class);\r
-\r
-       @Autowired\r
-       AdminRolesService adminRolesService;\r
-       @Autowired\r
-       FunctionalMenuService functionalMenuService;\r
-       @Autowired\r
-       SharedContextService sharedContextService;\r
-       @Autowired\r
-       UserProfileService service;\r
-       @Autowired\r
-       SearchService searchService;\r
-       @Autowired\r
-       EPAuditService epAuditService;\r
-\r
-       /**\r
-        * RESTful service method to fetch all the FunctionalMenuItems.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = { "/portalApi/functionalMenu" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItems(HttpServletRequest request, HttpServletResponse response) {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       menuItems = functionalMenuService.getFunctionalMenuItems();\r
-                       functionalMenuService.assignHelpURLs(menuItems);\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenu", "result =", menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenu. Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return menuItems;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to fetch all the FunctionalMenuItems, both active\r
-        * and inactive, for the EditFunctionalMenu feature. Can only be accessed by\r
-        * the portal admin.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuForEditing" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItemsForEditing(HttpServletRequest request, HttpServletResponse response) {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       if (!adminRolesService.isSuperAdmin(user)) {\r
-                               EcompPortalUtils.setBadPermissions(user, response, "getFunctionalMenuItemDetails");\r
-                       } else {\r
-                               menuItems = functionalMenuService.getFunctionalMenuItems(true);\r
-                       }\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForEditing", "result =", menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenuForEditing. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return menuItems;\r
-       }\r
-       \r
-       /**\r
-        * RESTful service method to fetch all the FunctionalMenuItems,  active\r
-        *, for the Functional menu in notification Tree feature.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuForNotificationTree" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItemsForNotifications(HttpServletRequest request, HttpServletResponse response) {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       menuItems = functionalMenuService.getFunctionalMenuItemsForNotificationTree(true);\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForNotificationTree", "result =", menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenuForNotifications. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return menuItems;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to fetch all FunctionalMenuItems associated with\r
-        * an application.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuForApp/{appId}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItemsForApp(HttpServletRequest request, @PathVariable("appId") Integer appId)\r
-                       throws HTTPException {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       menuItems = functionalMenuService.getFunctionalMenuItemsForApp(appId);\r
-                       functionalMenuService.assignHelpURLs(menuItems);\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForApp/" + appId, "result =", menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenuForApp. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return menuItems;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to fetch all FunctionalMenuItems associated with\r
-        * the applications and roles that a user has access to.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuForUser/{orgUserId}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItemsForUser(HttpServletRequest request,\r
-                       @PathVariable("orgUserId") String orgUserId) throws HTTPException {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       menuItems = functionalMenuService.getFunctionalMenuItemsForUser(orgUserId);\r
-                       functionalMenuService.assignHelpURLs(menuItems);\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForUser/" + orgUserId, "result =", menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenuForUser. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-\r
-               return menuItems;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to fetch all FunctionalMenuItems associated with\r
-        * the applications and roles that the authenticated user has access to.\r
-        * \r
-        * @return List of FunctionalMenuItem objects\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuForAuthUser" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuItem> getMenuItemsForAuthUser(HttpServletRequest request, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<FunctionalMenuItem> menuItems = null;\r
-               try {\r
-                       if (user == null) {\r
-                               EcompPortalUtils.setBadPermissions(user, response, "getMenuItemsForAuthUser");\r
-                       } else if (adminRolesService.isSuperAdmin(user)) {\r
-                               menuItems = functionalMenuService.getFunctionalMenuItems();\r
-                       } else {\r
-                               // calculate the menu items\r
-                               String orgUserId = user.getOrgUserId();\r
-                               menuItems = functionalMenuService.getFunctionalMenuItemsForUser(orgUserId);\r
-                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForUser/" + orgUserId, "result =",\r
-                                               menuItems);\r
-                       }\r
-                       functionalMenuService.assignHelpURLs(menuItems);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling getMenuItemsForAuthUser. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return menuItems;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to fetch the details for a functional menu item.\r
-        * Requirement: you must be the Ecomp portal super admin user.\r
-        * \r
-        * @return FunctionalMenuItem object\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuItemDetails/{menuId}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public FunctionalMenuItem getFunctionalMenuItemDetails(HttpServletRequest request,\r
-                       @PathVariable("menuId") Integer menuId, HttpServletResponse response) throws HTTPException {\r
-               // TODO: return FunctionalMenuItemJson\r
-               // TODO: modify FunctionalMenuItem to not include the transient fields\r
-               FunctionalMenuItem menuItem = null;\r
-               try {\r
-                       EPUser user = EPUserUtils.getUserSession(request);\r
-                       if (!adminRolesService.isSuperAdmin(user)) {\r
-                               EcompPortalUtils.setBadPermissions(user, response, "getFunctionalMenuItemDetails");\r
-                       } else {\r
-                               menuItem = functionalMenuService.getFunctionalMenuItemDetails(menuId);\r
-                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItemDetails/" + menuId, "result =",\r
-                                               menuItem);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while calling functionalMenuItemDetails. Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-\r
-               return menuItem;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to create a new menu item.\r
-        * \r
-        * Requirement: you must be the Ecomp portal super admin user.\r
-        */\r
-       @RequestMapping(value = { "/portalApi/functionalMenuItem" }, method = RequestMethod.POST)\r
-       public FieldsValidator createFunctionalMenuItem(HttpServletRequest request,\r
-                       @RequestBody FunctionalMenuItemWithRoles menuItemJson, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "FunctionalMenuController.createFunctionalMenuItem bad permissions");\r
-                       EcompPortalUtils.setBadPermissions(user, response, "createFunctionalMenuItem");\r
-               } else {\r
-                       fieldsValidator = functionalMenuService.createFunctionalMenuItem(menuItemJson);\r
-                       response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "POST result =",\r
-                                       response.getStatus());\r
-               }\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to update an existing menu item\r
-        * \r
-        * Requirement: you must be the Ecomp portal super admin user.\r
-        * \r
-        * @return FieldsValidator\r
-        */\r
-       @RequestMapping(value = { "/portalApi/functionalMenuItem" }, method = RequestMethod.PUT)\r
-       public FieldsValidator editFunctionalMenuItem(HttpServletRequest request,\r
-                       @RequestBody FunctionalMenuItemWithRoles menuItemJson, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       EcompPortalUtils.setBadPermissions(user, response, "editFunctionalMenuItem");\r
-               } else {\r
-                       fieldsValidator = functionalMenuService.editFunctionalMenuItem(menuItemJson);\r
-                       response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "PUT result =",\r
-                                       response.getStatus());\r
-               }\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to delete a menu item\r
-        * \r
-        * @return FieldsValidator\r
-        */\r
-       @RequestMapping(value = { "/portalApi/functionalMenuItem/{menuId}" }, method = RequestMethod.DELETE)\r
-       public FieldsValidator deleteFunctionalMenuItem(HttpServletRequest request, @PathVariable("menuId") Long menuId,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       EcompPortalUtils.setBadPermissions(user, response, "deleteFunctionalMenuItem");\r
-               } else {\r
-                       fieldsValidator = functionalMenuService.deleteFunctionalMenuItem(menuId);\r
-                       response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "DELETE result =",\r
-                                       response.getStatus());\r
-               }\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESTful service to regenerate table\r
-        * \r
-        * @param request\r
-        * @param response\r
-        * \r
-        * @return FieldsValidator\r
-        */\r
-       @RequestMapping(value = { "/portalApi/regenerateFunctionalMenuAncestors" }, method = RequestMethod.GET)\r
-       public FieldsValidator regenerateAncestorTable(HttpServletRequest request, HttpServletResponse response) {\r
-               // TODO: should only the superuser be allowed to use this API?\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       EcompPortalUtils.setBadPermissions(user, response, "deleteFunctionalMenuItem");\r
-               } else {\r
-                       fieldsValidator = functionalMenuService.regenerateAncestorTable();\r
-                       response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/regenerateAncestorTable", "GET result =",\r
-                                       response.getStatus());\r
-               }\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESful service to set a favorite item.\r
-        * \r
-        * @return FieldsValidator\r
-        */\r
-       @RequestMapping(value = { "/portalApi/setFavoriteItem" }, method = RequestMethod.POST)\r
-       public FieldsValidator addFavoriteItem(HttpServletRequest request,\r
-                       @RequestBody FavoritesFunctionalMenuItem menuItemJson, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               menuItemJson.userId = user.getId();\r
-               fieldsValidator = functionalMenuService.setFavoriteItem(menuItemJson);\r
-               response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/setFavoriteItem", "Post result =", response.getStatus());\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESTful service to get favorites for the current user as identified in\r
-        * the session\r
-        * \r
-        * @return List of FavoritesFunctionalMenuItemJson\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/getFavoriteItems" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FavoritesFunctionalMenuItemJson> getFavoritesForUser(HttpServletRequest request,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<FavoritesFunctionalMenuItemJson> favorites = functionalMenuService.getFavoriteItems(user.getId());\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/getFavoriteItems", "GET result =", response.getStatus());\r
-               return favorites;\r
-       }\r
-\r
-       /**\r
-        * RESTful service to delete a favorite menu item for the current user as\r
-        * identified in the session.\r
-        * \r
-        * @return FieldsValidator\r
-        */\r
-       @RequestMapping(value = { "/portalApi/removeFavoriteItem/{menuId}" }, method = RequestMethod.DELETE)\r
-       public FieldsValidator deleteFavoriteItem(HttpServletRequest request, @PathVariable("menuId") Long menuId,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               Long userId = user.getId();\r
-               fieldsValidator = functionalMenuService.removeFavoriteItem(userId, menuId);\r
-               response.setStatus(fieldsValidator.httpStatusCode.intValue());\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/deleteFavoriteItem", "DELETE result =", response.getStatus());\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /**\r
-        * RESTful service to get user information: user's first and last names, ATT\r
-        * UID, email and last-login. (Actually has nothing to do with the real\r
-        * functional menu.) First attempts to get the information from the Tomcat\r
-        * session (i.e., the CSP cookie); if that fails, calls the shared context\r
-        * service to read the information from the database. Gives back what it\r
-        * found, any of which may be null, as a JSON collection.\r
-        * \r
-        * @return JSON collection of key-value pairs shown below.\r
-        */\r
-       @RequestMapping(value = {\r
-                       "/portalApi/functionalMenuStaticInfo" }, method = RequestMethod.GET, produces = "application/json")\r
-       public String getFunctionalMenuStaticInfo(HttpServletRequest request, HttpServletResponse response) {\r
-\r
-               // Get user details from session\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuStaticInfo: getting user info");\r
-               String fnMenuStaticResponse = null;\r
-               try {                   \r
-                       String orgUserIdStr = null, firstNameStr = null, lastNameStr = null, emailStr = null, lastLogin = null;\r
-                       EPUser user = EPUserUtils.getUserSession(request);\r
-                       firstNameStr = user.getFirstName();\r
-                       lastNameStr = user.getLastName();\r
-                       orgUserIdStr = user.getOrgUserId();\r
-                       emailStr = user.getEmail();\r
-                       if (emailStr == null || emailStr.equals("")) {\r
-                               EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);\r
-                               emailStr = userResult.getEmail();\r
-                       }\r
-                       SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ssZ");\r
-                       Date lastLoginDate = user.getLastLoginDate();\r
-                       if (lastLoginDate == null) {\r
-                               // should never happen\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "getFunctionalMenuStaticInfo: no last login in session");\r
-                               lastLogin = "no last login available";\r
-                       }\r
-                       else {\r
-                               lastLogin = sdf.format(lastLoginDate);\r
-                       }\r
-                       \r
-                       // If any item is missing from session, try the Shared Context\r
-                       // service.\r
-                       SharedContext orgUserIdSC = null, firstNameSC = null, lastNameSC = null, emailSC = null;\r
-                       String sessionId = request.getSession().getId();\r
-                       if (firstNameStr == null)\r
-                               firstNameSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_FIRST_NAME);\r
-                       if (lastNameStr == null)\r
-                               lastNameSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_LAST_NAME);\r
-                       if (emailStr == null)\r
-                               emailSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_EMAIL);\r
-                       if (orgUserIdStr == null)\r
-                               orgUserIdSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_ORG_USERID);\r
-\r
-                       // Build the response\r
-                       Map<String, String> map = new HashMap<String, String>();\r
-                       map.put("firstName",\r
-                                       firstNameStr != null ? firstNameStr : (firstNameSC != null ? firstNameSC.getCvalue() : null));\r
-                       map.put("lastName",\r
-                                       lastNameStr != null ? lastNameStr : (lastNameSC != null ? lastNameSC.getCvalue() : null));\r
-                       map.put("email", emailStr != null ? emailStr : (emailSC != null ? emailSC.getCvalue() : null));\r
-                       map.put("userId", orgUserIdStr != null ? orgUserIdStr : (orgUserIdSC != null ? orgUserIdSC.getCvalue() : null));\r
-                       map.put("last_login", lastLogin);\r
-                       JSONObject j = new JSONObject(map);\r
-                       fnMenuStaticResponse = j.toString();\r
-                       // Be chatty in the log\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuStaticInfo", "GET result =",\r
-                                       fnMenuStaticResponse);\r
-               } catch (Exception e) {\r
-                       // Should never happen.\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getFunctionalMenuStaticInfo failed", e);\r
-                       // Return a real error?\r
-                       // fnMenuStaticResponse = "{ \"status\": \"error\", \"message\": \""\r
-                       // + e.toString() + "\" }";\r
-                       // But the angular controller expects null on error.\r
-               }\r
-               return fnMenuStaticResponse;\r
-       }\r
-       \r
-       private Comparator<BusinessCardApplicationRole> getUserAppRolesComparator = new Comparator<BusinessCardApplicationRole>() {\r
-               public int compare(BusinessCardApplicationRole o1, BusinessCardApplicationRole o2) {\r
-                       return o1.getAppName().compareTo(o2.getAppName());\r
-               }\r
-       };\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/userApplicationRoles" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<BusinessCardApplicationRolesList> getAppList(HttpServletRequest request,@RequestParam("userId") String userId) throws IOException {\r
-\r
-               \r
-               List<BusinessCardApplicationRolesList> AppRoles = null;\r
-               try {\r
-                       List<BusinessCardApplicationRole> userAppRoleList = functionalMenuService.getUserAppRolesList(userId);\r
-                       \r
-                       Collections.sort(userAppRoleList, getUserAppRolesComparator);\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/userApplicationRoles", "result =", userAppRoleList);\r
-                       \r
-                        AppRoles = new ArrayList<BusinessCardApplicationRolesList>();     \r
-                       for(BusinessCardApplicationRole userAppRole: userAppRoleList)\r
-                       {    \r
-                                 boolean found = false;\r
-                             List<String> roles = null;\r
-                            \r
-                               for(BusinessCardApplicationRolesList app :AppRoles)\r
-                               {       \r
-                                       if(app.getAppName().equals(userAppRole.getAppName()))\r
-                                       {\r
-                                               roles= app.getRoleNames();\r
-                                               roles.add(userAppRole.getRoleName());\r
-                                               app.setRoleNames(roles);\r
-                                               found = true;   \r
-                                               break;  \r
-                                       }\r
-                               }\r
-                               \r
-                               if(!found)\r
-                               {\r
-                               roles = new ArrayList<String>();        \r
-                               roles.add(userAppRole.getRoleName());\r
-                               AppRoles.add(new BusinessCardApplicationRolesList(userAppRole.getAppName(), roles));\r
-                               }       \r
-                               \r
-                               Collections.sort(roles);\r
-                       }\r
-               } catch (Exception e) {\r
-                       // TODO Auto-generated catch block\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAppList failed", e);\r
-               }\r
-\r
-       return  AppRoles;\r
-\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.SharedContext;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.SearchService;
+import org.openecomp.portalapp.portal.service.SharedContextService;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Supports menus at the top of the Portal app landing page.
+ */
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class FunctionalMenuController extends EPRestrictedBaseController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuController.class);
+
+       @Autowired
+       private AdminRolesService adminRolesService;
+       @Autowired
+       private FunctionalMenuService functionalMenuService;
+       @Autowired
+       private SharedContextService sharedContextService;
+       @Autowired
+       private SearchService searchService;
+
+       /**
+        * RESTful service method to fetch all the FunctionalMenuItems.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = { "/portalApi/functionalMenu" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItems(HttpServletRequest request, HttpServletResponse response) {
+               // TODO: should only the superuser be allowed to use this API?
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       menuItems = functionalMenuService.getFunctionalMenuItems();
+                       functionalMenuService.assignHelpURLs(menuItems);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenu", "result =", menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenu. Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to get ECOMP Portal Title.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return PortalRestResponse of ECOMP portal title
+        */
+       @RequestMapping(value = { "/portalApi/ecompTitle" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<String> getECOMPTitle(HttpServletRequest request, HttpServletResponse response) {
+               PortalRestResponse<String> portalRestResponse = null;
+               try {
+                       String ecompTitle = SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME);
+                       portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success", ecompTitle);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/ecompTitle", "result =", ecompTitle);
+               } catch (Exception e) {
+                       portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, e.getMessage(), null);
+                       logger.error(EELFLoggerDelegate.errorLogger, "getEcompTitle failed", e);
+               }
+               return portalRestResponse;
+       }
+
+       /**
+        * RESTful service method to fetch all the FunctionalMenuItems, both active
+        * and inactive, for the EditFunctionalMenu feature. Can only be accessed by
+        * the portal admin.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuForEditing" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItemsForEditing(HttpServletRequest request, HttpServletResponse response) {
+               // TODO: should only the superuser be allowed to use this API?
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       if (!adminRolesService.isSuperAdmin(user)) {
+                               EcompPortalUtils.setBadPermissions(user, response, "getFunctionalMenuItemDetails");
+                       } else {
+                               menuItems = functionalMenuService.getFunctionalMenuItems(true);
+                       }
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForEditing", "result =",
+                                       menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenuForEditing. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to fetch all the FunctionalMenuItems, active , for
+        * the Functional menu in notification Tree feature.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuForNotificationTree" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItemsForNotifications(HttpServletRequest request,
+                       HttpServletResponse response) {
+               // TODO: should only the superuser be allowed to use this API?
+               // EPUser user = EPUserUtils.getUserSession(request);
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       menuItems = functionalMenuService.getFunctionalMenuItemsForNotificationTree(true);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForNotificationTree", "result =",
+                                       menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenuForNotifications. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to fetch all FunctionalMenuItems associated with
+        * an application.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param appId
+        *            application ID
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuForApp/{appId}" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItemsForApp(HttpServletRequest request,
+                       @PathVariable("appId") Integer appId) {
+               // TODO: should only the superuser be allowed to use this API?
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       menuItems = functionalMenuService.getFunctionalMenuItemsForApp(appId);
+                       functionalMenuService.assignHelpURLs(menuItems);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForApp/" + appId, "result =",
+                                       menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenuForApp. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to fetch all FunctionalMenuItems associated with
+        * the applications and roles that a user has access to.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param orgUserId
+        *            user ID
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuForUser/{orgUserId}" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItemsForUser(HttpServletRequest request,
+                       @PathVariable("orgUserId") String orgUserId) {
+               // TODO: should only the superuser be allowed to use this API?
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       menuItems = functionalMenuService.getFunctionalMenuItemsForUser(orgUserId);
+                       functionalMenuService.assignHelpURLs(menuItems);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForUser/" + orgUserId, "result =",
+                                       menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenuForUser. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to fetch all FunctionalMenuItems associated with
+        * the applications and roles that the authenticated user has access to.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List of FunctionalMenuItem objects
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuForAuthUser" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuItem> getMenuItemsForAuthUser(HttpServletRequest request, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<FunctionalMenuItem> menuItems = null;
+               try {
+                       if (user == null) {
+                               EcompPortalUtils.setBadPermissions(user, response, "getMenuItemsForAuthUser");
+                       } else if (adminRolesService.isSuperAdmin(user)) {
+                               menuItems = functionalMenuService.getFunctionalMenuItems();
+                       } else {
+                               // calculate the menu items
+                               String orgUserId = user.getOrgUserId();
+                               menuItems = functionalMenuService.getFunctionalMenuItemsForUser(orgUserId);
+                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuForUser/" + orgUserId,
+                                               "result =", menuItems);
+                       }
+                       functionalMenuService.assignHelpURLs(menuItems);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling getMenuItemsForAuthUser. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+               return menuItems;
+       }
+
+       /**
+        * RESTful service method to fetch the details for a functional menu item.
+        * Requirement: you must be the Ecomp portal super admin user.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuId
+        *            menu ID
+        * @return FunctionalMenuItem object
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuItemDetails/{menuId}" }, method = RequestMethod.GET, produces = "application/json")
+       public FunctionalMenuItem getFunctionalMenuItemDetails(HttpServletRequest request,
+                       @PathVariable("menuId") Integer menuId, HttpServletResponse response) {
+               // TODO: return FunctionalMenuItemJson
+               // TODO: modify FunctionalMenuItem to not include the transient fields
+               FunctionalMenuItem menuItem = null;
+               try {
+                       EPUser user = EPUserUtils.getUserSession(request);
+                       if (!adminRolesService.isSuperAdmin(user)) {
+                               EcompPortalUtils.setBadPermissions(user, response, "getFunctionalMenuItemDetails");
+                       } else {
+                               menuItem = functionalMenuService.getFunctionalMenuItemDetails(menuId);
+                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItemDetails/" + menuId,
+                                               "result =", menuItem);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while calling functionalMenuItemDetails. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+
+               return menuItem;
+       }
+
+       /**
+        * RESTful service method to create a new menu item.
+        * 
+        * Requirement: you must be the Ecomp portal super admin user.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuItemJson
+        *            FunctionalMenuItemWithRoles
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/functionalMenuItem" }, method = RequestMethod.POST)
+       public FieldsValidator createFunctionalMenuItem(HttpServletRequest request,
+                       @RequestBody FunctionalMenuItemWithRoles menuItemJson, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "FunctionalMenuController.createFunctionalMenuItem bad permissions");
+                       EcompPortalUtils.setBadPermissions(user, response, "createFunctionalMenuItem");
+               } else {
+                       fieldsValidator = functionalMenuService.createFunctionalMenuItem(menuItemJson);
+                       response.setStatus(fieldsValidator.httpStatusCode.intValue());
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "POST result =",
+                                       response.getStatus());
+               }
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESTful service method to update an existing menu item
+        * 
+        * Requirement: you must be the Ecomp portal super admin user.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuItemJson
+        *            FunctionalMenuItemWithRoles
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/functionalMenuItem" }, method = RequestMethod.PUT)
+       public FieldsValidator editFunctionalMenuItem(HttpServletRequest request,
+                       @RequestBody FunctionalMenuItemWithRoles menuItemJson, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       EcompPortalUtils.setBadPermissions(user, response, "editFunctionalMenuItem");
+               } else {
+                       fieldsValidator = functionalMenuService.editFunctionalMenuItem(menuItemJson);
+                       response.setStatus(fieldsValidator.httpStatusCode.intValue());
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "PUT result =",
+                                       response.getStatus());
+               }
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESTful service method to delete a menu item
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuId
+        *            menu identifier
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/functionalMenuItem/{menuId}" }, method = RequestMethod.DELETE)
+       public FieldsValidator deleteFunctionalMenuItem(HttpServletRequest request, @PathVariable("menuId") Long menuId,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       EcompPortalUtils.setBadPermissions(user, response, "deleteFunctionalMenuItem");
+               } else {
+                       fieldsValidator = functionalMenuService.deleteFunctionalMenuItem(menuId);
+                       response.setStatus(fieldsValidator.httpStatusCode.intValue());
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuItem", "DELETE result =",
+                                       response.getStatus());
+               }
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESTful service to regenerate table
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/regenerateFunctionalMenuAncestors" }, method = RequestMethod.GET)
+       public FieldsValidator regenerateAncestorTable(HttpServletRequest request, HttpServletResponse response) {
+               // TODO: should only the superuser be allowed to use this API?
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       EcompPortalUtils.setBadPermissions(user, response, "deleteFunctionalMenuItem");
+               } else {
+                       fieldsValidator = functionalMenuService.regenerateAncestorTable();
+                       response.setStatus(fieldsValidator.httpStatusCode.intValue());
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/regenerateAncestorTable", "GET result =",
+                                       response.getStatus());
+               }
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESful service to set a favorite item.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuItemJson
+        *            FunctionalMenuItemWithRoles
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/setFavoriteItem" }, method = RequestMethod.POST)
+       public FieldsValidator addFavoriteItem(HttpServletRequest request,
+                       @RequestBody FavoritesFunctionalMenuItem menuItemJson, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               menuItemJson.userId = user.getId();
+               fieldsValidator = functionalMenuService.setFavoriteItem(menuItemJson);
+               response.setStatus(fieldsValidator.httpStatusCode.intValue());
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/setFavoriteItem", "Post result =",
+                               response.getStatus());
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESTful service to get favorites for the current user as identified in
+        * the session
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return List of FavoritesFunctionalMenuItemJson
+        */
+       @RequestMapping(value = {
+                       "/portalApi/getFavoriteItems" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FavoritesFunctionalMenuItemJson> getFavoritesForUser(HttpServletRequest request,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<FavoritesFunctionalMenuItemJson> favorites = functionalMenuService.getFavoriteItems(user.getId());
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               response.setStatus(fieldsValidator.httpStatusCode.intValue());
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/getFavoriteItems", "GET result =",
+                               response.getStatus());
+               return favorites;
+       }
+
+       /**
+        * RESTful service to delete a favorite menu item for the current user as
+        * identified in the session.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param menuId
+        *            menu identifier
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/removeFavoriteItem/{menuId}" }, method = RequestMethod.DELETE)
+       public FieldsValidator deleteFavoriteItem(HttpServletRequest request, @PathVariable("menuId") Long menuId,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               Long userId = user.getId();
+               fieldsValidator = functionalMenuService.removeFavoriteItem(userId, menuId);
+               response.setStatus(fieldsValidator.httpStatusCode.intValue());
+               EcompPortalUtils.logAndSerializeObject(logger, "/deleteFavoriteItem", "DELETE result =", response.getStatus());
+
+               return fieldsValidator;
+       }
+
+       /**
+        * RESTful service to get user information: user's first and last names, org
+        * user ID, email and last-login. (Actually has nothing to do with the real
+        * functional menu.) First attempts to get the information from the Tomcat
+        * session (i.e., the CSP cookie); if that fails, calls the shared context
+        * service to read the information from the database. Gives back what it
+        * found, any of which may be null, as a JSON collection.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @return JSON collection of key-value pairs shown below.
+        */
+       @RequestMapping(value = {
+                       "/portalApi/functionalMenuStaticInfo" }, method = RequestMethod.GET, produces = "application/json")
+       public String getFunctionalMenuStaticInfo(HttpServletRequest request, HttpServletResponse response) {
+
+               // Get user details from session
+               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuStaticInfo: getting user info");
+               String fnMenuStaticResponse = null;
+               try {
+                       String orgUserIdStr = null, firstNameStr = null, lastNameStr = null, emailStr = null, lastLogin = null;
+                       EPUser user = EPUserUtils.getUserSession(request);
+                       firstNameStr = user.getFirstName();
+                       lastNameStr = user.getLastName();
+                       orgUserIdStr = user.getOrgUserId();
+                       emailStr = user.getEmail();
+                       if (emailStr == null || emailStr.equals("")) {
+                               EPUser userResult = searchService.searchUserByUserId(orgUserIdStr);
+                               emailStr = userResult.getEmail();
+                       }
+                       SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh:mm:ssZ");
+                       Date lastLoginDate = user.getLastLoginDate();
+                       if (lastLoginDate == null) {
+                               // should never happen
+                               logger.error(EELFLoggerDelegate.errorLogger, "getFunctionalMenuStaticInfo: no last login in session");
+                               lastLogin = "no last login available";
+                       } else {
+                               lastLogin = sdf.format(lastLoginDate);
+                       }
+
+                       // If any item is missing from session, try the Shared Context
+                       // service.
+                       SharedContext orgUserIdSC = null, firstNameSC = null, lastNameSC = null, emailSC = null;
+                       String sessionId = request.getSession().getId();
+                       if (firstNameStr == null)
+                               firstNameSC = sharedContextService.getSharedContext(sessionId,
+                                               EPCommonSystemProperties.USER_FIRST_NAME);
+                       if (lastNameStr == null)
+                               lastNameSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_LAST_NAME);
+                       if (emailStr == null)
+                               emailSC = sharedContextService.getSharedContext(sessionId, EPCommonSystemProperties.USER_EMAIL);
+                       if (orgUserIdStr == null)
+                               orgUserIdSC = sharedContextService.getSharedContext(sessionId,
+                                               EPCommonSystemProperties.USER_ORG_USERID);
+
+                       // Build the response
+                       Map<String, String> map = new HashMap<String, String>();
+                       map.put("firstName",
+                                       firstNameStr != null ? firstNameStr : (firstNameSC != null ? firstNameSC.getCvalue() : null));
+                       map.put("lastName",
+                                       lastNameStr != null ? lastNameStr : (lastNameSC != null ? lastNameSC.getCvalue() : null));
+                       map.put("email", emailStr != null ? emailStr : (emailSC != null ? emailSC.getCvalue() : null));
+                       map.put("userId",
+                                       orgUserIdStr != null ? orgUserIdStr : (orgUserIdSC != null ? orgUserIdSC.getCvalue() : null));
+                       map.put("last_login", lastLogin);
+                       JSONObject j = new JSONObject(map);
+                       fnMenuStaticResponse = j.toString();
+                       // Be chatty in the log
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/functionalMenuStaticInfo", "GET result =",
+                                       fnMenuStaticResponse);
+               } catch (Exception e) {
+                       // Should never happen.
+                       logger.error(EELFLoggerDelegate.errorLogger, "getFunctionalMenuStaticInfo failed", e);
+                       // Return a real error?
+                       // fnMenuStaticResponse = "{ \"status\": \"error\", \"message\": \""
+                       // + e.toString() + "\" }";
+                       // But the angular controller expects null on error.
+               }
+               return fnMenuStaticResponse;
+       }
+
+       private Comparator<BusinessCardApplicationRole> getUserAppRolesComparator = new Comparator<BusinessCardApplicationRole>() {
+               public int compare(BusinessCardApplicationRole o1, BusinessCardApplicationRole o2) {
+                       return o1.getAppName().compareTo(o2.getAppName());
+               }
+       };
+
+       /**
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param userId
+        *            user ID
+        * @return List<BusinessCardApplicationRolesList>
+        * @throws IOException
+        *             on error
+        */
+       @RequestMapping(value = {
+                       "/portalApi/userApplicationRoles" }, method = RequestMethod.GET, produces = "application/json")
+       public List<BusinessCardApplicationRolesList> getAppList(HttpServletRequest request,
+                       @RequestParam("userId") String userId) throws IOException {
+
+               List<BusinessCardApplicationRolesList> AppRoles = null;
+               try {
+                       List<BusinessCardApplicationRole> userAppRoleList = functionalMenuService.getUserAppRolesList(userId);
+
+                       Collections.sort(userAppRoleList, getUserAppRolesComparator);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/userApplicationRoles", "result =",
+                                       userAppRoleList);
+
+                       AppRoles = new ArrayList<BusinessCardApplicationRolesList>();
+                       for (BusinessCardApplicationRole userAppRole : userAppRoleList) {
+                               boolean found = false;
+                               List<String> roles = null;
+
+                               for (BusinessCardApplicationRolesList app : AppRoles) {
+                                       if (app.getAppName().equals(userAppRole.getAppName())) {
+                                               roles = app.getRoleNames();
+                                               roles.add(userAppRole.getRoleName());
+                                               app.setRoleNames(roles);
+                                               found = true;
+                                               break;
+                                       }
+                               }
+
+                               if (!found) {
+                                       roles = new ArrayList<String>();
+                                       roles.add(userAppRole.getRoleName());
+                                       AppRoles.add(new BusinessCardApplicationRolesList(userAppRole.getAppName(), roles));
+                               }
+
+                               Collections.sort(roles);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppList failed", e);
+               }
+
+               return AppRoles;
+
+       }
+}
index 84731af..ee5e5ee 100644 (file)
@@ -41,16 +41,17 @@ import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
 import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import com.google.gson.Gson;
 
-/*
- * This controller checks the health status and returns JSON response.
- * It does not require authentication or session.
+/**
+ * This controller processes requests for the health-check feature implemented
+ * in the HealthMonitor, which runs in its own thread. These requests do not
+ * require any authentication nor an active user session.
  */
 @RestController
 @org.springframework.context.annotation.Configuration
 @EnableAspectJAutoProxy
 @EPAuditLog
 public class HealthCheckController extends EPUnRestrictedBaseController {
-       
+
        private class HealthStatus {
                public int statusCode;
                @SuppressWarnings("unused")
@@ -96,8 +97,8 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
        private final String statusDown = "DOWN";
        private final String statusOk = "OK";
 
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HealthCheckController.class);
-       
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HealthCheckController.class);
+
        @RequestMapping(value = { "/portalApi/healthCheck" }, method = RequestMethod.GET, produces = "application/json")
        public HealthStatus healthCheck(HttpServletRequest request, HttpServletResponse response) {
                HealthStatus healthStatus = new HealthStatus(500, "");
@@ -106,7 +107,8 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
                if (HealthMonitor.isSuspended) {
                        healthStatus.body = "Suspended";
                        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
+                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE,
+                                       Integer.toString(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
                        return healthStatus;
                }
 
@@ -142,28 +144,27 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
                                dbInfo.description = "Check the logs for more details";
                                EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError);
                        }
-                                       
+
                        if (!HealthMonitor.isClusterStatusOk()) {
                                dbInfo.dbClusterStatus = "Problem, check the logs for more details";
                                EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError);
-                       }
-                       else {
+                       } else {
                                dbInfo.dbClusterStatus = statusOk;
                        }
-                       
+
                        if (!HealthMonitor.isDatabasePermissionsOk()) {
                                dbInfo.dbPermissions = "Problem, check the logs for more details";
                                EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError);
-                       }
-                       else {
+                       } else {
                                dbInfo.dbPermissions = statusOk;
                        }
                        statusCollection.add(dbInfo);
 
                        HealthStatusInfo uebInfo = new HealthStatusInfo("UEB");
                        if (!HealthMonitor.isUebUp()) {
-                               //As per test case review meeting, UEB is considered as critical as DB. Hence commenting
-                               //overallStatus = false;
+                               // As per test case review meeting, UEB is considered as
+                               // critical as DB. Hence commenting
+                               // overallStatus = false;
                                uebInfo.healthCheckStatus = statusDown;
                                uebInfo.description = "Check the logs for more details";
                                EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError);
@@ -186,12 +187,13 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
                        }
                        MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(healthStatus.statusCode));
                } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the healthcheck. Details: "
-                                       + EcompPortalUtils.getStackTrace(e));
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing the healthcheck. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
                }
-               
+
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/healthCheck", "GET result =", response.getStatus());
-               
+
                return healthStatus;
        }
 
@@ -202,10 +204,10 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
 
                HealthMonitor.isSuspended = true;
                healthStatus.statusCode = 200;
-               
+
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/healthCheckSuspend", "GET result =",
-                                                                                                                                               response.getStatus());
-               
+                               response.getStatus());
+
                return healthStatus;
        }
 
@@ -217,19 +219,15 @@ public class HealthCheckController extends EPUnRestrictedBaseController {
                HealthMonitor.isSuspended = false;
                healthStatus.statusCode = 200;
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/healthCheckResume", "GET result =",
-                                                                                                                                                       response.getStatus());
+                               response.getStatus());
                return healthStatus;
        }
-       
-       
 
-       @RequestMapping(value = {
-                       "/portalApi/ping" }, method = RequestMethod.GET, produces = "application/json")
+       @RequestMapping(value = { "/portalApi/ping" }, method = RequestMethod.GET, produces = "application/json")
        public HealthStatus ping(HttpServletRequest request, HttpServletResponse response) {
-               HealthStatus healthStatus = new HealthStatus(200, "OK");        
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/ping", "GET result =",
-                               response.getStatus());
-               
+               HealthStatus healthStatus = new HealthStatus(200, "OK");
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/ping", "GET result =", response.getStatus());
+
                return healthStatus;
        }
 }
index 82d70ec..bc21dd9 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceData;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;\r
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.ConsulHealthService;\r
-import org.openecomp.portalapp.portal.service.MicroserviceService;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.core.ParameterizedTypeReference;\r
-import org.springframework.http.HttpEntity;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import org.springframework.web.client.RestClientException;\r
-import org.springframework.web.client.RestTemplate;\r
-\r
-@SuppressWarnings("unchecked")\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class MicroserviceController extends EPRestrictedBaseController {\r
-       \r
-       private static final String HTTPS = "https://";\r
-       \r
-       String whatService = "widgets-service";\r
-       RestTemplate template = new RestTemplate();\r
-\r
-       @Autowired\r
-       private ConsulHealthService consulHealthService;\r
-\r
-       @Autowired\r
-       private MicroserviceService microserviceService;\r
-       \r
-       @RequestMapping(value = { "/portalApi/microservices" }, method = RequestMethod.POST)\r
-       public PortalRestResponse<String> createMicroservice(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody MicroserviceData newServiceData) throws Exception {\r
-               if (newServiceData == null) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",\r
-                                       "MicroserviceData cannot be null or empty");\r
-               }\r
-               long serviceId = microserviceService.saveMicroservice(newServiceData);\r
-\r
-               try {\r
-                       microserviceService.saveServiceParameters(serviceId, newServiceData.getParameterList());\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());\r
-               }\r
-\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices" }, method = RequestMethod.GET)\r
-       public List<MicroserviceData> getMicroservice(HttpServletRequest request, HttpServletResponse response)\r
-                       throws Exception {\r
-               List<MicroserviceData> list = microserviceService.getMicroserviceData();\r
-               return list;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/{serviceId}" }, method = RequestMethod.PUT)\r
-       public PortalRestResponse<String> updateMicroservice(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("serviceId") long serviceId, @RequestBody MicroserviceData newServiceData) throws Exception {\r
-\r
-               if (newServiceData == null) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",\r
-                                       "MicroserviceData cannot be null or empty");\r
-               }\r
-               try {\r
-                       microserviceService.updateMicroservice(serviceId, newServiceData);\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());\r
-               }\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");\r
-       }\r
-       \r
-       @RequestMapping(value = { "/portalApi/microservices/{serviceId}" }, method = RequestMethod.DELETE)\r
-       public PortalRestResponse<String> deleteMicroservice(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("serviceId") long serviceId) throws Exception {\r
-               try {\r
-                       ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {\r
-                       };\r
-                       // If this service is assoicated with widgets, cannnot be deleted\r
-                       ResponseEntity<List<WidgetCatalog>> ans = (ResponseEntity<List<WidgetCatalog>>) template.exchange(\r
-                                       HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                                       + "/widget/microservices/widgetCatalog/service/" + serviceId,\r
-                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef);\r
-                       List<WidgetCatalog> widgets = ans.getBody();\r
-                       if(widgets.size() == 0)\r
-                               microserviceService.deleteMicroservice(serviceId);\r
-                       else{\r
-                               StringBuilder sb = new StringBuilder();\r
-                               for(int i = 0; i < widgets.size(); i++){\r
-                                       sb.append("'" + widgets.get(i).getName() + "' ");\r
-                                       if(i < (widgets.size()-1)){\r
-                                               sb.append(",");\r
-                                       }\r
-                               }\r
-                               return new PortalRestResponse<String>(PortalRestStatusEnum.WARN, "SOME WIDGETS ASSOICATE WITH THIS SERVICE", sb.toString());\r
-                       }\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());\r
-               }\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+@SuppressWarnings("unchecked")
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class MicroserviceController extends EPRestrictedBaseController {
+       
+       private static final String HTTPS = "https://";
+       
+       String whatService = "widgets-service";
+       RestTemplate template = new RestTemplate();
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       @Autowired
+       private MicroserviceService microserviceService;
+       
+       @RequestMapping(value = { "/portalApi/microservices" }, method = RequestMethod.POST)
+       public PortalRestResponse<String> createMicroservice(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody MicroserviceData newServiceData) throws Exception {
+               if (newServiceData == null) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
+                                       "MicroserviceData cannot be null or empty");
+               }
+               long serviceId = microserviceService.saveMicroservice(newServiceData);
+
+               try {
+                       microserviceService.saveServiceParameters(serviceId, newServiceData.getParameterList());
+               } catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
+               }
+
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices" }, method = RequestMethod.GET)
+       public List<MicroserviceData> getMicroservice(HttpServletRequest request, HttpServletResponse response)
+                       throws Exception {
+               List<MicroserviceData> list = microserviceService.getMicroserviceData();
+               return list;
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/{serviceId}" }, method = RequestMethod.PUT)
+       public PortalRestResponse<String> updateMicroservice(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("serviceId") long serviceId, @RequestBody MicroserviceData newServiceData) throws Exception {
+
+               if (newServiceData == null) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
+                                       "MicroserviceData cannot be null or empty");
+               }
+               try {
+                       microserviceService.updateMicroservice(serviceId, newServiceData);
+               } catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
+       }
+       
+       @RequestMapping(value = { "/portalApi/microservices/{serviceId}" }, method = RequestMethod.DELETE)
+       public PortalRestResponse<String> deleteMicroservice(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("serviceId") long serviceId) throws Exception {
+               try {
+                       ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
+                       };
+                       // If this service is assoicated with widgets, cannnot be deleted
+                       ResponseEntity<List<WidgetCatalog>> ans = (ResponseEntity<List<WidgetCatalog>>) template.exchange(
+                                       HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+                                                       + "/widget/microservices/widgetCatalog/service/" + serviceId,
+                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef);
+                       List<WidgetCatalog> widgets = ans.getBody();
+                       if(widgets.size() == 0)
+                               microserviceService.deleteMicroservice(serviceId);
+                       else{
+                               StringBuilder sb = new StringBuilder();
+                               for(int i = 0; i < widgets.size(); i++){
+                                       sb.append("'" + widgets.get(i).getName() + "' ");
+                                       if(i < (widgets.size()-1)){
+                                               sb.append(",");
+                                       }
+                               }
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.WARN, "SOME WIDGETS ASSOICATE WITH THIS SERVICE", sb.toString());
+                       }
+               } catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
+       }
+
+}
index 6724d4c..6313822 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.WidgetParameterResult;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.MicroserviceProxyService;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import org.springframework.web.client.HttpClientErrorException;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-@SuppressWarnings("unchecked")\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class MicroserviceProxyController extends EPUnRestrictedBaseController {\r
-\r
-       @Autowired\r
-       private MicroserviceProxyService microserviceProxyService;\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceProxyController.class);\r
-\r
-       @RequestMapping(value = { "/portalApi/microservice/proxy/{serviceId}" }, method = {\r
-                       RequestMethod.GET }, produces = "application/json")\r
-       public String getMicroserviceProxy(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("serviceId") long serviceId) throws Exception {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               String answer = "";\r
-               try{\r
-                       answer = microserviceProxyService.proxyToDestination(serviceId, user, request);\r
-               }catch(HttpClientErrorException e){\r
-                       //Check whether the error message is valid JSON format\r
-                       boolean valid = true;\r
-                       ObjectMapper objectMapper = new ObjectMapper();\r
-                   try{ \r
-                       objectMapper.readTree(e.getResponseBodyAsString());\r
-                   } catch(JsonProcessingException exception){\r
-                       valid = false;\r
-                   }\r
-                   if(valid)\r
-                       return e.getResponseBodyAsString();\r
-                   else\r
-                       return "{\"error\":\""+ e.getResponseBodyAsString() +"\"}";\r
-               }\r
-               return answer;          \r
-       }\r
-       \r
-       @RequestMapping(value = { "/portalApi/microservice/proxy/parameter/{widgetId}" }, method = {\r
-                       RequestMethod.GET }, produces = "application/json")\r
-       public String getMicroserviceProxyByWidgetId(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws Exception {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               String answer = "";\r
-               try{\r
-                       answer = microserviceProxyService.proxyToDestinationByWidgetId(widgetId, user, request);\r
-               }catch(HttpClientErrorException e){\r
-                       //Check whether the error message is valid JSON format\r
-                       boolean valid = true;\r
-                       ObjectMapper objectMapper = new ObjectMapper();\r
-                   try{ \r
-                       objectMapper.readTree(e.getResponseBodyAsString());\r
-                   } catch(JsonProcessingException exception){\r
-                       valid = false;\r
-                   }\r
-                   if(valid)\r
-                       return e.getResponseBodyAsString();\r
-                   else\r
-                       return "{\"error\":\""+ e.getResponseBodyAsString() +"\"}";\r
-               }\r
-               return answer;          \r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.MicroserviceProxyService;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.HttpClientErrorException;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@SuppressWarnings("unchecked")
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class MicroserviceProxyController extends EPUnRestrictedBaseController {
+
+       @Autowired
+       private MicroserviceProxyService microserviceProxyService;
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceProxyController.class);
+
+       @RequestMapping(value = { "/portalApi/microservice/proxy/{serviceId}" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public String getMicroserviceProxy(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("serviceId") long serviceId) throws Exception {
+               EPUser user = EPUserUtils.getUserSession(request);
+               String answer = "";
+               try {
+                       answer = microserviceProxyService.proxyToDestination(serviceId, user, request);
+               } catch (HttpClientErrorException e) {
+                       answer = e.getResponseBodyAsString();
+               }
+               return isValidJSON(answer) ? answer : "{\"error\":\"" + answer.replace(System.getProperty("line.separator"), "") + "\"}";
+       }
+
+       @RequestMapping(value = { "/portalApi/microservice/proxy/parameter/{widgetId}" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public String getMicroserviceProxyByWidgetId(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws Exception {
+               EPUser user = EPUserUtils.getUserSession(request);
+               String answer = "";
+               try {
+                       answer = microserviceProxyService.proxyToDestinationByWidgetId(widgetId, user, request);
+               } catch (HttpClientErrorException e) {
+                       answer = e.getResponseBodyAsString();
+               }
+               return isValidJSON(answer) ? answer : "{\"error\":\"" + answer.replace(System.getProperty("line.separator"), "") + "\"}";
+       }
+
+       /**
+        * Check whether the response is a valid JSON
+        * @param response
+        * @return true if the response is valid JSON, otherwise, false
+        */
+       private boolean isValidJSON(String response) {
+               try {
+                       final ObjectMapper mapper = new ObjectMapper();
+                       mapper.readTree(response);
+                       return true;
+               } catch (IOException e) {
+                       return false;
+               }
+       }
+}
index 2499ec6..b98a7cb 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.domain.AuditLog;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.AuditService;\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.service.AdminRolesService;\r
-import org.openecomp.portalapp.portal.service.PortalAdminService;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.PortalAdmin;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class PortalAdminController extends EPRestrictedBaseController {\r
-       @Autowired\r
-       PortalAdminService portalAdminService;\r
-       @Autowired\r
-       AdminRolesService adminRolesService;\r
-       @Autowired\r
-       AuditService auditService;\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalAdminController.class);\r
-\r
-       @RequestMapping(value = { "/portalApi/portalAdmins" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<PortalAdmin> getPortalAdmins(HttpServletRequest request, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<PortalAdmin> portalAdmins = null;\r
-               if (user == null) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.getPortalAdmins, null user");\r
-                       EcompPortalUtils.setBadPermissions(user, response, "getPortalAdmins");\r
-               } else if (!adminRolesService.isSuperAdmin(user)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.getPortalAdmins, bad permissions");\r
-                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");\r
-               } else {\r
-                       // return the list of portal admins\r
-                       portalAdmins = portalAdminService.getPortalAdmins();\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "portalAdmins: called getPortalAdmins()");\r
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/getPortalAdmins", "result =", portalAdmins);\r
-               }\r
-\r
-               return portalAdmins;\r
-       }\r
-\r
-       /**\r
-        * RESTful service method to create a new portal admin. Requirement: you\r
-        * must be the Ecomp portal super admin user.\r
-        */\r
-\r
-       @RequestMapping(value = { "/portalApi/portalAdmin" }, method = RequestMethod.POST)\r
-       public FieldsValidator createPortalAdmin(HttpServletRequest request, @RequestBody String sbcid,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               FieldsValidator fieldsValidator = null;\r
-               if (user == null) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.createPortalAdmin, null user");\r
-                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");\r
-               } else if (!adminRolesService.isSuperAdmin(user)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.createPortalAdmin bad permissions");\r
-                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");\r
-               } else {\r
-                       fieldsValidator = portalAdminService.createPortalAdmin(sbcid);\r
-                       int statusCode = fieldsValidator.httpStatusCode.intValue();\r
-                       response.setStatus(statusCode);\r
-                       if (statusCode == 200) {\r
-                               AuditLog auditLog = new AuditLog();\r
-                               auditLog.setUserId(user.getId());\r
-                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_ADD_PORTAL_ADMIN);\r
-                               auditLog.setAffectedRecordId(sbcid);\r
-                               auditService.logActivity(auditLog, null);\r
-\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               logger.info(EELFLoggerDelegate.auditLogger,\r
-                                               EPLogUtil.formatAuditLogMessage("PortalAdminController.createPortalAdmin",\r
-                                                               EcompAuditLog.CD_ACTIVITY_ADD_PORTAL_ADMIN, user.getOrgUserId(), sbcid,\r
-                                                               "A new Portal Admin has been added"));\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);\r
-                       }\r
-               }\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalAdmin", "POST result =", response.getStatus());\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/portalAdmin/{userInfo}" }, method = RequestMethod.DELETE)\r
-       public FieldsValidator deletePortalAdmin(HttpServletRequest request, @PathVariable("userInfo") String userInfo,\r
-                        HttpServletResponse response) {\r
-               int userIdIdx = userInfo.indexOf("-");\r
-               Long userId = null;\r
-               String sbcid = null;\r
-               FieldsValidator fieldsValidator = null;\r
-               try{\r
-                       if(userIdIdx==-1){\r
-                               logger.error(EELFLoggerDelegate.errorLogger,"deletePortalAdmin missing userId");\r
-                               return fieldsValidator;\r
-                       }else{\r
-                               String userIdStr = userInfo.substring(0, userIdIdx);\r
-                               userId = Long.valueOf(userIdStr);\r
-                               sbcid = userInfo.substring(userIdIdx+1, userInfo.length());\r
-                       }\r
-               }catch(Exception e){\r
-                       logger.error(EELFLoggerDelegate.errorLogger,"deletePortalAdmin error while parsing the userInfo",e);\r
-               }\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       EcompPortalUtils.setBadPermissions(user, response, "deletePortalAdmin");\r
-               } else {\r
-                       fieldsValidator = portalAdminService.deletePortalAdmin(userId);\r
-                       int statusCode = fieldsValidator.httpStatusCode.intValue();\r
-                       response.setStatus(statusCode);\r
-                       if (statusCode == 200) {\r
-                               AuditLog auditLog = new AuditLog();\r
-                               auditLog.setUserId(user.getId());\r
-                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_DELETE_PORTAL_ADMIN);\r
-                               auditLog.setAffectedRecordId(sbcid);\r
-                               auditService.logActivity(auditLog, null);\r
-\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-                               logger.info(EELFLoggerDelegate.auditLogger,\r
-                                               EPLogUtil.formatAuditLogMessage("PortalAdminController.deletePortalAdmin",\r
-                                                               EcompAuditLog.CD_ACTIVITY_DELETE_PORTAL_ADMIN, user.getOrgUserId(), sbcid,\r
-                                                               "A Portal Admin has been deleted"));\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);\r
-                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);\r
-                       }\r
-               }\r
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalAdmin", "DELETE result =", response.getStatus());\r
-\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/adminAppsRoles/{appId}" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<EPRole> getRolesByApp(HttpServletRequest request, @PathVariable("appId") Long appId,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<EPRole> rolesByApp = null;\r
-\r
-               try {\r
-                       if (user == null) {\r
-                               EcompPortalUtils.setBadPermissions(user, response, "getUserApps");\r
-                       } else {\r
-                               rolesByApp = adminRolesService.getRolesByApp(user, appId);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while performing getRolesByApp operation, Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-\r
-               return rolesByApp;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.PortalAdmin;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class PortalAdminController extends EPRestrictedBaseController {
+       @Autowired
+       PortalAdminService portalAdminService;
+       @Autowired
+       AdminRolesService adminRolesService;
+       @Autowired
+       AuditService auditService;
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalAdminController.class);
+
+       @RequestMapping(value = { "/portalApi/portalAdmins" }, method = RequestMethod.GET, produces = "application/json")
+       public List<PortalAdmin> getPortalAdmins(HttpServletRequest request, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<PortalAdmin> portalAdmins = null;
+               if (user == null) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.getPortalAdmins, null user");
+                       EcompPortalUtils.setBadPermissions(user, response, "getPortalAdmins");
+               } else if (!adminRolesService.isSuperAdmin(user)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.getPortalAdmins, bad permissions");
+                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");
+               } else {
+                       // return the list of portal admins
+                       portalAdmins = portalAdminService.getPortalAdmins();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "portalAdmins: called getPortalAdmins()");
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/getPortalAdmins", "result =", portalAdmins);
+               }
+
+               return portalAdmins;
+       }
+
+       /**
+        * RESTful service method to create a new portal admin. Requirement: you
+        * must be the Ecomp portal super admin user.
+        */
+
+       @RequestMapping(value = { "/portalApi/portalAdmin" }, method = RequestMethod.POST)
+       public FieldsValidator createPortalAdmin(HttpServletRequest request, @RequestBody String userId,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               FieldsValidator fieldsValidator = null;
+               if (user == null) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.createPortalAdmin, null user");
+                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");
+               } else if (!adminRolesService.isSuperAdmin(user)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "PortalAdminController.createPortalAdmin bad permissions");
+                       EcompPortalUtils.setBadPermissions(user, response, "createPortalAdmin");
+               } else {
+                       fieldsValidator = portalAdminService.createPortalAdmin(userId);
+                       int statusCode = fieldsValidator.httpStatusCode.intValue();
+                       response.setStatus(statusCode);
+                       if (statusCode == 200) {
+                               AuditLog auditLog = new AuditLog();
+                               auditLog.setUserId(user.getId());
+                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_ADD_PORTAL_ADMIN);
+                               auditLog.setAffectedRecordId(userId);
+                               auditService.logActivity(auditLog, null);
+
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               EcompPortalUtils.calculateDateTimeDifferenceForLog(
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                               logger.info(EELFLoggerDelegate.auditLogger,
+                                               EPLogUtil.formatAuditLogMessage("PortalAdminController.createPortalAdmin",
+                                                               EcompAuditLog.CD_ACTIVITY_ADD_PORTAL_ADMIN, user.getOrgUserId(), userId,
+                                                               "A new Portal Admin has been added"));
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                               MDC.remove(SystemProperties.MDC_TIMER);
+                       }
+               }
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalAdmin", "POST result =", response.getStatus());
+
+               return fieldsValidator;
+       }
+
+       @RequestMapping(value = { "/portalApi/portalAdmin/{userInfo}" }, method = RequestMethod.DELETE)
+       public FieldsValidator deletePortalAdmin(HttpServletRequest request, @PathVariable("userInfo") String userInfo,
+                       HttpServletResponse response) {
+               int userIdIdx = userInfo.indexOf("-");
+               Long userId = null;
+               String sbcid = null;
+               FieldsValidator fieldsValidator = null;
+               try {
+                       if (userIdIdx == -1) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "deletePortalAdmin missing userId");
+                               return fieldsValidator;
+                       } else {
+                               String userIdStr = userInfo.substring(0, userIdIdx);
+                               userId = Long.valueOf(userIdStr);
+                               sbcid = userInfo.substring(userIdIdx + 1, userInfo.length());
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "deletePortalAdmin error while parsing the userInfo", e);
+               }
+               EPUser user = EPUserUtils.getUserSession(request);
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       EcompPortalUtils.setBadPermissions(user, response, "deletePortalAdmin");
+               } else {
+                       fieldsValidator = portalAdminService.deletePortalAdmin(userId);
+                       int statusCode = fieldsValidator.httpStatusCode.intValue();
+                       response.setStatus(statusCode);
+                       if (statusCode == 200) {
+                               AuditLog auditLog = new AuditLog();
+                               auditLog.setUserId(user.getId());
+                               auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_DELETE_PORTAL_ADMIN);
+                               auditLog.setAffectedRecordId(sbcid);
+                               auditService.logActivity(auditLog, null);
+
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               EcompPortalUtils.calculateDateTimeDifferenceForLog(
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                               logger.info(EELFLoggerDelegate.auditLogger,
+                                               EPLogUtil.formatAuditLogMessage("PortalAdminController.deletePortalAdmin",
+                                                               EcompAuditLog.CD_ACTIVITY_DELETE_PORTAL_ADMIN, user.getOrgUserId(), sbcid,
+                                                               "A Portal Admin has been deleted"));
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+                               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                               MDC.remove(SystemProperties.MDC_TIMER);
+                       }
+               }
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalAdmin", "DELETE result =", response.getStatus());
+
+               return fieldsValidator;
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/adminAppsRoles/{appId}" }, method = RequestMethod.GET, produces = "application/json")
+       public List<EPRole> getRolesByApp(HttpServletRequest request, @PathVariable("appId") Long appId,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<EPRole> rolesByApp = null;
+
+               try {
+                       if (user == null) {
+                               EcompPortalUtils.setBadPermissions(user, response, "getUserApps");
+                       } else {
+                               rolesByApp = adminRolesService.getRolesByApp(user, appId);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing getRolesByApp operation, Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+
+               return rolesByApp;
+       }
+
+}
index d567269..2d0fe27 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.controller.core.RoleController;\r
-import org.openecomp.portalapp.controller.core.RoleFunctionListController;\r
-import org.openecomp.portalapp.controller.core.RoleListController;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import org.springframework.web.servlet.ModelAndView;\r
-\r
-/**\r
- * Proxies REST calls to role-management functions that arrive on paths\r
- * /portalApi/* over to controller methods provided by the SDK-Core library.\r
- * Those controller methods are mounted on paths not exposed by the Portal FE.\r
- */\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class RoleManageController extends EPRestrictedBaseController {\r
-\r
-       @Autowired\r
-       private RoleController roleController;\r
-\r
-       @Autowired\r
-       private RoleListController roleListController;\r
-\r
-       @Autowired\r
-       private RoleFunctionListController roleFunctionListController;\r
-\r
-       /**\r
-        * Calls an SDK-Core library method that gets the available roles and writes\r
-        * them to the request object. Portal specifies a Hibernate mappings from\r
-        * the Role class to the fn_role_v view, which ensures that only Portal\r
-        * (app_id is null) roles are fetched.\r
-        * \r
-        * Any method declared void (no return value) or returning null causes the\r
-        * audit log aspect method to declare failure. TODO: should return a JSON\r
-        * string.\r
-        * \r
-        * @param request\r
-        * @param response\r
-        */\r
-       @RequestMapping(value = { "/portalApi/get_roles" }, method = RequestMethod.GET)\r
-       public void getRoles(HttpServletRequest request, HttpServletResponse response) {\r
-               getRoleListController().getRoles(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role_list/toggleRole" }, method = RequestMethod.POST)\r
-       public PortalRestResponse<String> toggleRole(HttpServletRequest request, HttpServletResponse response) {\r
-               PortalRestResponse<String> portalRestResponse = null;\r
-               try{\r
-                       getRoleListController().toggleRole(request, response);\r
-                       portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success", null);\r
-               }catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "failure", e.getMessage());\r
-               }\r
-               return portalRestResponse;              \r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role_list/removeRole" }, method = RequestMethod.POST)\r
-       public ModelAndView removeRole(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-               return getRoleListController().removeRole(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role/saveRole" }, method = RequestMethod.POST)\r
-       public ModelAndView saveRole(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-               return getRoleController().saveRole(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role/removeRoleFunction" }, method = RequestMethod.POST)\r
-       public ModelAndView removeRoleRoleFunction(HttpServletRequest request, HttpServletResponse response)\r
-                       throws Exception {\r
-               return getRoleController().removeRoleFunction(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role/addRoleFunction" }, method = RequestMethod.POST)\r
-       public ModelAndView addRoleRoRoleFunction(HttpServletRequest request, HttpServletResponse response)\r
-                       throws Exception {\r
-               return getRoleController().addRoleFunction(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role/removeChildRole" }, method = RequestMethod.POST)\r
-       public ModelAndView removeChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-               return getRoleController().removeChildRole(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role/addChildRole" }, method = RequestMethod.POST)\r
-       public ModelAndView addChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-               return getRoleController().addChildRole(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/get_role" }, method = RequestMethod.GET)\r
-       public void getRole(HttpServletRequest request, HttpServletResponse response) {\r
-               getRoleController().getRole(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/get_role_functions" }, method = RequestMethod.GET)\r
-       public void getRoleFunctionList(HttpServletRequest request, HttpServletResponse response) {\r
-               getRoleFunctionListController().getRoleFunctionList(request, response);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role_function_list/saveRoleFunction" }, method = RequestMethod.POST)\r
-       public void saveRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws Exception {\r
-               getRoleFunctionListController().saveRoleFunction(request, response, roleFunc);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/role_function_list/removeRoleFunction" }, method = RequestMethod.POST)\r
-       public void removeRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws Exception {\r
-               getRoleFunctionListController().removeRoleFunction(request, response, roleFunc);\r
-       }\r
-\r
-       public RoleListController getRoleListController() {\r
-               return roleListController;\r
-       }\r
-\r
-       public void setRoleListController(RoleListController roleListController) {\r
-               this.roleListController = roleListController;\r
-       }\r
-\r
-       public RoleController getRoleController() {\r
-               return roleController;\r
-       }\r
-\r
-       public void setRoleController(RoleController roleController) {\r
-               this.roleController = roleController;\r
-       }\r
-\r
-       public RoleFunctionListController getRoleFunctionListController() {\r
-               return roleFunctionListController;\r
-       }\r
-\r
-       public void setRoleFunctionListController(RoleFunctionListController roleFunctionListController) {\r
-               this.roleFunctionListController = roleFunctionListController;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.controller.core.RoleController;
+import org.openecomp.portalapp.controller.core.RoleFunctionListController;
+import org.openecomp.portalapp.controller.core.RoleListController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Proxies REST calls to role-management functions that arrive on paths
+ * /portalApi/* over to controller methods provided by the SDK-Core library.
+ * Those controller methods are mounted on paths not exposed by the Portal FE.
+ */
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class RoleManageController extends EPRestrictedBaseController {
+
+       @Autowired
+       private RoleController roleController;
+
+       @Autowired
+       private RoleListController roleListController;
+
+       @Autowired
+       private RoleFunctionListController roleFunctionListController;
+
+       /**
+        * Calls an SDK-Core library method that gets the available roles and writes
+        * them to the request object. Portal specifies a Hibernate mappings from
+        * the Role class to the fn_role_v view, which ensures that only Portal
+        * (app_id is null) roles are fetched.
+        * 
+        * Any method declared void (no return value) or returning null causes the
+        * audit log aspect method to declare failure. TODO: should return a JSON
+        * string.
+        * 
+        * @param request
+        * @param response
+        */
+       @RequestMapping(value = { "/portalApi/get_roles" }, method = RequestMethod.GET)
+       public void getRoles(HttpServletRequest request, HttpServletResponse response) {
+               getRoleListController().getRoles(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role_list/toggleRole" }, method = RequestMethod.POST)
+       public PortalRestResponse<String> toggleRole(HttpServletRequest request, HttpServletResponse response) {
+               PortalRestResponse<String> portalRestResponse = null;
+               try{
+                       getRoleListController().toggleRole(request, response);
+                       portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success", null);
+               }catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "failure", e.getMessage());
+               }
+               return portalRestResponse;              
+       }
+
+       @RequestMapping(value = { "/portalApi/role_list/removeRole" }, method = RequestMethod.POST)
+       public ModelAndView removeRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+               return getRoleListController().removeRole(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role/saveRole" }, method = RequestMethod.POST)
+       public ModelAndView saveRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+               return getRoleController().saveRole(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role/removeRoleFunction" }, method = RequestMethod.POST)
+       public ModelAndView removeRoleRoleFunction(HttpServletRequest request, HttpServletResponse response)
+                       throws Exception {
+               return getRoleController().removeRoleFunction(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role/addRoleFunction" }, method = RequestMethod.POST)
+       public ModelAndView addRoleRoRoleFunction(HttpServletRequest request, HttpServletResponse response)
+                       throws Exception {
+               return getRoleController().addRoleFunction(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role/removeChildRole" }, method = RequestMethod.POST)
+       public ModelAndView removeChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+               return getRoleController().removeChildRole(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role/addChildRole" }, method = RequestMethod.POST)
+       public ModelAndView addChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+               return getRoleController().addChildRole(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/get_role" }, method = RequestMethod.GET)
+       public void getRole(HttpServletRequest request, HttpServletResponse response) {
+               getRoleController().getRole(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/get_role_functions" }, method = RequestMethod.GET)
+       public void getRoleFunctionList(HttpServletRequest request, HttpServletResponse response) {
+               getRoleFunctionListController().getRoleFunctionList(request, response);
+       }
+
+       @RequestMapping(value = { "/portalApi/role_function_list/saveRoleFunction" }, method = RequestMethod.POST)
+       public void saveRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws Exception {
+               getRoleFunctionListController().saveRoleFunction(request, response, roleFunc);
+       }
+
+       @RequestMapping(value = { "/portalApi/role_function_list/removeRoleFunction" }, method = RequestMethod.POST)
+       public void removeRoleFunction(HttpServletRequest request, HttpServletResponse response, @RequestBody String roleFunc) throws Exception {
+               getRoleFunctionListController().removeRoleFunction(request, response, roleFunc);
+       }
+
+       public RoleListController getRoleListController() {
+               return roleListController;
+       }
+
+       public void setRoleListController(RoleListController roleListController) {
+               this.roleListController = roleListController;
+       }
+
+       public RoleController getRoleController() {
+               return roleController;
+       }
+
+       public void setRoleController(RoleController roleController) {
+               this.roleController = roleController;
+       }
+
+       public RoleFunctionListController getRoleFunctionListController() {
+               return roleFunctionListController;
+       }
+
+       public void setRoleFunctionListController(RoleFunctionListController roleFunctionListController) {
+               this.roleFunctionListController = roleFunctionListController;
+       }
+
+}
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.externalsystemapproval.controller;\r
-\r
-import java.util.ArrayList;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;\r
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;\r
-import org.openecomp.portalapp.portal.controller.BasicAuthenticationController;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.UserRolesService;\r
-import org.openecomp.portalapp.portal.utils.PortalConstants;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-@RestController\r
-@RequestMapping(PortalConstants.REST_AUX_API)\r
-@Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class RolesApprovalSystemController implements BasicAuthenticationController {\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RolesApprovalSystemController.class);\r
-\r
-       @Autowired\r
-       private UserRolesService userRolesService;\r
-\r
-       /**\r
-        * Creates an application user with the specified roles.\r
-        * \r
-        * @param request\r
-        * @param extSysUser\r
-        * @return PortalRestResponse with appropriate status value and message\r
-        */\r
-       @ApiOperation(value = "Creates an application user with the specified roles.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.POST, produces = "application/json")\r
-       public PortalRestResponse<String> postUserProfile(HttpServletRequest request,\r
-                       @RequestBody ExternalSystemUser extSysUser) {\r
-               try {\r
-                       validateExtSystemUser(extSysUser, true);\r
-                       String response = userRolesService.setAppWithUserRoleStateForUser(extSysUser);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Saved Successfully", response);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "postUserProfile failed", e);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Updates an application user to have only the specified roles.\r
-        * \r
-        * @param request\r
-        * @param extSysUser\r
-        * @return PortalRestResponse with appropriate status value and message\r
-        */\r
-       @ApiOperation(value = "Updates an application user to have only the specified roles.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.PUT, produces = "application/json")\r
-       public PortalRestResponse<String> putUserProfile(HttpServletRequest request,\r
-                       @RequestBody ExternalSystemUser extSysUser) {\r
-               try {\r
-                       validateExtSystemUser(extSysUser, true);\r
-                       String response = userRolesService.setAppWithUserRoleStateForUser(extSysUser);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Updated Successfully", response);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "putUserProfile failed", e);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Deletes an application user by removing all assigned roles.\r
-        * \r
-        * @param request\r
-        * @param extSysUser\r
-        *            This object must have zero roles.\r
-        * @return PortalRestResponse with appropriate status value and message\r
-        */\r
-       @ApiOperation(value = "Processes a request to delete one or more application roles for one      specified user who has roles.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.DELETE, produces = "application/json")\r
-       public PortalRestResponse<String> deleteUserProfile(HttpServletRequest request,\r
-                       @RequestBody ExternalSystemUser extSysUser) {\r
-               try {\r
-                       validateExtSystemUser(extSysUser, false);\r
-                       // Ignore any roles that might be mistakenly present in the request\r
-                       extSysUser.setRoles(new ArrayList<ExternalSystemRoleApproval>());\r
-                       String result = userRolesService.setAppWithUserRoleStateForUser(extSysUser);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Deleted Successfully", result);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserProfile failed", e);\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Checks for presence of required fields.\r
-        * \r
-        * @param extSysUser\r
-        * @param rolesRequired\r
-        *            If true, checks whether roles are present\r
-        * @throws Exception\r
-        *             If any field is missing.\r
-        */\r
-       private void validateExtSystemUser(ExternalSystemUser extSysUser, boolean rolesRequired) throws Exception {\r
-               if (extSysUser.getLoginId() == null)\r
-                       throw new Exception("Request has no login ID");\r
-               if (extSysUser.getApplicationName() == null)\r
-                       throw new Exception("Request has no application name");\r
-               if (extSysUser.getMyloginrequestId() == null)\r
-                       throw new Exception("Request has no request ID");\r
-               if (rolesRequired && (extSysUser.getRoles() == null || extSysUser.getRoles().size() == 0))\r
-                       throw new Exception("Request has no roles");\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.ArrayList;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping("/auxapi")
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class RolesApprovalSystemController implements BasicAuthenticationController {
+       
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RolesApprovalSystemController.class);
+
+       @Autowired
+       private UserRolesService userRolesService;
+
+       /**
+        * Creates an application user with the specified roles.
+        * 
+        * @param request
+        * @param extSysUser
+        * @return PortalRestResponse with appropriate status value and message
+        */
+       @ApiOperation(value = "Creates an application user with the specified roles.", response = PortalRestResponse.class)
+       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.POST, produces = "application/json")
+       public PortalRestResponse<String> postUserProfile(HttpServletRequest request,
+                       @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
+               ExternalRequestFieldsValidator reqResult = null;
+               try {
+                       logger.info(EELFLoggerDelegate.debugLogger, "postUserProfile: request received for app {}, user {}",
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId());
+                       
+                       validateExtSystemUser(extSysUser, true);
+                reqResult = userRolesService.setExternalRequestUserAppRole(extSysUser, "POST");
+                if (!reqResult.isResult())
+                               throw new Exception(reqResult.getDetailMessage());
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "postUserProfile: failed for app {}, user {}",
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId(), e);
+                       if(reqResult == null || (!reqResult.isResult()  && !e.getMessage().contains("404"))){
+                               response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed"); 
+                   } else if(e.getMessage().contains("404")){
+                               response.setStatus(HttpServletResponse.SC_NOT_FOUND);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed");
+                       } else{
+                               response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed");
+                       }
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, reqResult.getDetailMessage(), "Success");
+       }
+
+       /**
+        * Updates an application user to have only the specified roles.
+        * 
+        * @param request
+        * @param extSysUser
+        * @return PortalRestResponse with appropriate status value and message
+        */
+       @ApiOperation(value = "Updates an application user to have only the specified roles.", response = PortalRestResponse.class)
+       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.PUT, produces = "application/json")
+       public PortalRestResponse<String> putUserProfile(HttpServletRequest request,
+                       @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
+               ExternalRequestFieldsValidator reqResult = null;
+               try {
+                       logger.info(EELFLoggerDelegate.debugLogger, "putUserProfile: request received for app {}, user {}", 
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId());
+                       validateExtSystemUser(extSysUser, true);
+                       reqResult = userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT");
+                        if (!reqResult.isResult())
+                                       throw new Exception(reqResult.getDetailMessage());
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "putUserProfile: failed for app {}, user {}",
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId(), e);
+                       if(reqResult == null || (!reqResult.isResult()  && !e.getMessage().contains("404"))){
+                               response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed"); 
+                   } else if(e.getMessage().contains("404")){
+                               response.setStatus(HttpServletResponse.SC_NOT_FOUND);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed");
+                       } else{
+                               response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "save user profile failed");
+                       }
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, reqResult.getDetailMessage() , "Success");
+       }
+
+       /**
+        * Deletes an application user by removing all assigned roles.
+        * 
+        * @param request
+        * @param extSysUser
+        *            This object must have zero roles.
+        * @return PortalRestResponse with appropriate status value and message
+        */
+       @ApiOperation(value = "Processes a request to delete one or more application roles for one      specified user who has roles.", response = PortalRestResponse.class)
+       @RequestMapping(value = { "/userProfile" }, method = RequestMethod.DELETE, produces = "application/json")
+       public PortalRestResponse<String> deleteUserProfile(HttpServletRequest request,
+                       @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
+               ExternalRequestFieldsValidator reqResult  = null;
+               try {
+                       logger.info(EELFLoggerDelegate.debugLogger, "deleteUserProfile: request received for app {}, user {}", 
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId());
+                       validateExtSystemUser(extSysUser, false);
+                       // Ignore any roles that might be mistakenly present in the request
+                       extSysUser.setRoles(new ArrayList<ExternalSystemRoleApproval>());
+                       reqResult = userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE");
+                        if (!reqResult.isResult())
+                                       throw new Exception(reqResult.getDetailMessage());
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserProfile: failed for app {}, user {}",
+                                       extSysUser.getApplicationName(), extSysUser.getLoginId(), e);
+                       if(reqResult == null || (!reqResult.isResult()  && !e.getMessage().contains("404"))){
+                               response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "delete user profile failed"); 
+                   }else if(e.getMessage().contains("404")){
+                               response.setStatus(HttpServletResponse.SC_NOT_FOUND);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "delete user profile failed");
+                       } else{
+                               response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR,
+                                               e.getMessage(), "delete user profile failed");
+                       }
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "Deleted Successfully", "Success");
+       }
+
+       /**
+        * Checks for presence of required fields.
+        * 
+        * @param extSysUser
+        * @param rolesRequired
+        *            If true, checks whether roles are present
+        * @throws Exception
+        *             If any field is missing.
+        */
+       private void validateExtSystemUser(ExternalSystemUser extSysUser, boolean rolesRequired) throws Exception {
+               if (extSysUser.getLoginId() == null || extSysUser.getLoginId() == "")
+                       throw new Exception("Request has no login ID");
+               if (extSysUser.getApplicationName() == null || extSysUser.getApplicationName() == "")
+                       throw new Exception("Request has no application name");
+               if (extSysUser.getMyloginrequestId() == null)
+                       throw new Exception("Request has no request ID");
+               if (rolesRequired && (extSysUser.getRoles() == null || extSysUser.getRoles().size() == 0))
+                       throw new Exception("Request has no roles");
+       }
+
+}
\ No newline at end of file
index a59a457..984bbf7 100644 (file)
@@ -69,12 +69,12 @@ import io.swagger.annotations.ApiOperation;
 public class SharedContextRestController extends EPRestrictedRESTfulBaseController {
 
        /**
-        * Model for a one-element JSON object returned by many methods. 
+        * Model for a one-element JSON object returned by many methods.
         */
        class SharedContextJsonResponse {
                String response;
        }
-       
+
        /**
         * Access to the database
         */
@@ -94,12 +94,16 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
        /**
         * Gets a value for the specified context and key (RESTful service method).
         * 
-        * @param ctxtId
+        * @param request
+        *            HTTP servlet request
+        * @param context_id
         *            ID that identifies the context, usually the ECOMP Portal
         *            session key.
         * @param ckey
         *            Key for the key-value pair to fetch
         * @return JSON with shared context object; response=null if not found.
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Gets a value for the specified context and key.", response = SharedContext.class)
        @RequestMapping(value = { "/get" }, method = RequestMethod.GET, produces = "application/json")
@@ -123,12 +127,15 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
        /**
         * Gets user information for the specified context (RESTful service method).
         * 
-        * @param ctxtId
+        * @param request
+        *            HTTP servlet request
+        * @param context_id
         *            ID that identifies the context, usually the ECOMP Portal
         *            session key.
-        * 
         * @return List of shared-context objects as JSON; should have user's first
         *         name, last name and email address; null if none found
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Gets user information for the specified context.", response = SharedContext.class, responseContainer = "List")
        @RequestMapping(value = { "/get_user" }, method = RequestMethod.GET, produces = "application/json")
@@ -162,6 +169,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         * Tests for presence of the specified key in the specified context (RESTful
         * service method).
         * 
+        * @param request
+        *            HTTP servlet request
         * @param context_id
         *            ID that identifies the context, usually the ECOMP Portal
         *            session key.
@@ -169,6 +178,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         *            Key for the key-value pair to test
         * @return JSON with result indicating whether the context and key were
         *         found.
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Tests for presence of the specified key in the specified context.", response = SharedContextJsonResponse.class)
        @RequestMapping(value = { "/check" }, method = RequestMethod.GET, produces = "application/json")
@@ -192,6 +203,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         * Removes the specified key in the specified context (RESTful service
         * method).
         * 
+        * @param request
+        *            HTTP servlet request
         * @param context_id
         *            ID that identifies the context, usually the ECOMP Portal
         *            session key.
@@ -199,6 +212,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         *            Key for the key-value pair to remove
         * @return JSON with result indicating whether the context and key were
         *         found.
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Removes the specified key in the specified context.", response = SharedContextJsonResponse.class)
        @RequestMapping(value = { "/remove" }, method = RequestMethod.GET, produces = "application/json")
@@ -224,11 +239,15 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         * Clears all key-value pairs in the specified context (RESTful service
         * method).
         * 
+        * @param request
+        *            HTTP servlet request
         * @param context_id
         *            ID that identifies the context, usually the ECOMP Portal
         *            session key.
         * @return JSON with result indicating the number of key-value pairs
         *         removed.
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Clears all key-value pairs in the specified context.", response = SharedContextJsonResponse.class)
        @RequestMapping(value = { "/clear" }, method = RequestMethod.GET, produces = "application/json")
@@ -248,6 +267,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         * method). Creates the context if no context with the specified ID-key pair
         * exists, overwrites the value if it exists already.
         * 
+        * @param request
+        *            HTTP servlet request
         * @param userJson
         *            JSON block with these tag-value pairs:
         *            <UL>
@@ -257,6 +278,8 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
         *            </UL>
         * @return JSON with result indicating whether the value was added (key not
         *         previously known) or replaced (key previously known).
+        * @throws Exception
+        *             on bad arguments
         */
        @ApiOperation(value = "Sets a context value for the specified context and key. Creates the context if no context with the specified ID-key pair exists, overwrites the value if it exists already.", response = SharedContextJsonResponse.class)
        @RequestMapping(value = { "/set" }, method = RequestMethod.POST, produces = "application/json")
@@ -314,7 +337,7 @@ public class SharedContextRestController extends EPRestrictedRESTfulBaseControll
        /**
         * Creates a JSON object with the content of the shared context; null is ok.
         * 
-        * @param responseBody
+        * @param context
         * @return tag "response" with collection of context object's fields
         * @throws JsonProcessingException
         */
index 0dd344d..e0a9e58 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.Arrays;\r
-import java.util.Calendar;\r
-import java.util.Date;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.UserNotificationService;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;\r
-import org.openecomp.portalapp.portal.utils.PortalConstants;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import com.fasterxml.jackson.databind.JsonNode;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-/**\r
- * Receives messages from the Collaboration Bus (C-BUS) notification and event\r
- * brokering tool. Creates notifications for ECOMP Portal users.\r
- */\r
-@RestController\r
-@RequestMapping(PortalConstants.REST_AUX_API)\r
-@Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class TicketEventController implements BasicAuthenticationController {\r
-\r
-       @Autowired\r
-       private UserNotificationService userNotificationService;\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(TicketEventController.class);\r
-\r
-       public boolean isAuxRESTfulCall() {\r
-               return true;\r
-       }\r
-\r
-       private final ObjectMapper mapper = new ObjectMapper();\r
-\r
-       @ApiOperation(value = "Accepts messages from external ticketing systems and creates notifications for Portal users.", response = PortalRestResponse.class)\r
-       @RequestMapping(value = { "/ticketevent" }, method = RequestMethod.POST)\r
-       public PortalRestResponse<String> handleRequest(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody String ticketEventJson) throws Exception {\r
-\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "Ticket Event notification" + ticketEventJson);\r
-               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();\r
-               try {\r
-                       JsonNode ticketEventNotif = mapper.readTree(ticketEventJson);\r
-\r
-                       // Reject request if required fields are missing.\r
-                       String error = validateTicketEventMessage(ticketEventNotif);\r
-                       if (error != null) {\r
-                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                               portalResponse.setMessage(error);\r
-                               response.setStatus(400);\r
-                               return portalResponse;\r
-                       }\r
-\r
-                       EpNotificationItem epItem = new EpNotificationItem();\r
-                       epItem.setCreatedDate(new Date());\r
-                       epItem.setIsForOnlineUsers("Y");\r
-                       epItem.setIsForAllRoles("N");\r
-                       epItem.setActiveYn("Y");\r
-                       //JsonNode application = ticketEventNotif.get("application");\r
-                       JsonNode event = ticketEventNotif.get("event");\r
-                       JsonNode header = event.get("header");\r
-                       JsonNode body = event.get("body");\r
-                       epItem.setMsgDescription(body.toString());\r
-                       Long eventDate = body.get("eventDate").asLong();\r
-\r
-                       String assetID = body.get("assetID").asText();\r
-                       epItem.setMsgHeader(assetID);\r
-                       String eventSource = header.get("eventSource").asText();\r
-                       epItem.setMsgSource(eventSource);\r
-                       epItem.setStartTime(new Date(eventDate));\r
-                       Calendar calendar = Calendar.getInstance();\r
-                       calendar.setTime(epItem.getStartTime());\r
-                       int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);\r
-                       calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth + 30);\r
-                       epItem.setEndTime(calendar.getTime());\r
-                       String severityString=  (body.get("severity").toString()).substring(1, 2);\r
-                       Long  severity=Long.parseLong(severityString);\r
-                       epItem.setPriority(severity);\r
-                       epItem.setCreatorId(null);\r
-                       Set<EpRoleNotificationItem> roles = new HashSet<>();\r
-                       JsonNode SubscriberInfo = ticketEventNotif.get("SubscriberInfo");\r
-                       JsonNode userList = SubscriberInfo.get("UserList");\r
-                       String UserIds[] = userList.toString().replace("[", "").replace("]", "").trim().replace("\"", "")\r
-                                       .split(",");\r
-                       List<EPUser> users = userNotificationService.getUsersByOrgIds(Arrays.asList(UserIds));\r
-                       for (String userId : UserIds) {\r
-                               EpRoleNotificationItem roleNotifItem = new EpRoleNotificationItem();\r
-                               for (EPUser user : users) {\r
-                                       if (user.getOrgUserId().equals(userId)) {\r
-                                               roleNotifItem.setRecvUserId(user.getId().intValue());\r
-                                               roles.add(roleNotifItem);\r
-                                               break;\r
-                                       }\r
-                               }\r
-\r
-                       }\r
-                       epItem.setRoles(roles);\r
-                       userNotificationService.saveNotification(epItem);\r
-\r
-                       portalResponse.setStatus(PortalRestStatusEnum.OK);\r
-                       portalResponse.setMessage("processEventNotification: notification created");\r
-                       portalResponse.setResponse("NotificationId is :" + epItem.notificationId);\r
-               } catch (Exception ex) {\r
-                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);\r
-                       response.setStatus(400);\r
-                       portalResponse.setMessage(ex.toString());\r
-               }\r
-               return portalResponse;\r
-       }\r
-\r
-       /**\r
-        * Validates that mandatory fields are present.\r
-        * \r
-        * @param ticketEventNotif\r
-        * @return Error message if a problem is found; null if all is well.\r
-        */\r
-       private String validateTicketEventMessage(JsonNode ticketEventNotif) {\r
-               JsonNode application = ticketEventNotif.get("application");\r
-               JsonNode event = ticketEventNotif.get("event");\r
-               JsonNode header = event.get("header");\r
-               JsonNode body = event.get("body");\r
-               JsonNode SubscriberInfo = ticketEventNotif.get("SubscriberInfo");\r
-               if (application == null)\r
-                       return "application is mandatory";\r
-               if (body == null)\r
-                       return "body is mandatory";\r
-               if (body.get("assetID") == null)\r
-                       return "Asset Id is mandatory";\r
-               if (body.get("eventDate") == null)\r
-                       return "Event Date is mandatory";\r
-               if (header.get("eventSource") == null)\r
-                       return "Message Source is mandatory";\r
-               if (SubscriberInfo.get("UserList") == null)\r
-                       return "At least one user Id is mandatory";\r
-               return null;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * Receives messages from the Collaboration Bus (C-BUS) notification and event
+ * brokering tool. Creates notifications for ECOMP Portal users.
+ */
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class TicketEventController implements BasicAuthenticationController {
+
+       @Autowired
+       private UserNotificationService userNotificationService;
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(TicketEventController.class);
+
+       public boolean isAuxRESTfulCall() {
+               return true;
+       }
+
+       private final ObjectMapper mapper = new ObjectMapper();
+
+       @ApiOperation(value = "Accepts messages from external ticketing systems and creates notifications for Portal users.", response = PortalRestResponse.class)
+       @RequestMapping(value = { "/ticketevent" }, method = RequestMethod.POST)
+       public PortalRestResponse<String> handleRequest(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody String ticketEventJson) throws Exception {
+
+               logger.debug(EELFLoggerDelegate.debugLogger, "Ticket Event notification" + ticketEventJson);
+               PortalRestResponse<String> portalResponse = new PortalRestResponse<>();
+               try {
+                       JsonNode ticketEventNotif = mapper.readTree(ticketEventJson);
+
+                       // Reject request if required fields are missing.
+                       String error = validateTicketEventMessage(ticketEventNotif);
+                       if (error != null) {
+                               portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                               portalResponse.setMessage(error);
+                               response.setStatus(400);
+                               return portalResponse;
+                       }
+
+                       EpNotificationItem epItem = new EpNotificationItem();
+                       epItem.setCreatedDate(new Date());
+                       epItem.setIsForOnlineUsers("Y");
+                       epItem.setIsForAllRoles("N");
+                       epItem.setActiveYn("Y");
+
+                       JsonNode event = ticketEventNotif.get("event");
+                       JsonNode header = event.get("header");
+                       JsonNode body = event.get("body");
+                       epItem.setMsgDescription(body.toString());
+                       Long eventDate = System.currentTimeMillis();
+                       if (body.get("eventDate") != null) {
+                               eventDate = body.get("eventDate").asLong();
+                       }
+                       String eventSource = header.get("eventSource").asText();
+                       epItem.setMsgSource(eventSource);
+                       epItem.setStartTime(new Date(eventDate));
+                       Calendar calendar = Calendar.getInstance();
+                       calendar.setTime(epItem.getStartTime());
+                       int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
+                       calendar.set(Calendar.DAY_OF_MONTH, dayOfMonth + 30);
+                       epItem.setEndTime(calendar.getTime());
+                       String severityString = "1";
+                       if (body.get("severity") != null) {
+                               severityString = (body.get("severity").toString()).substring(1, 2);
+                       }
+                       Long severity = Long.parseLong(severityString);
+                       epItem.setPriority(severity);
+                       epItem.setCreatorId(null);
+                       Set<EpRoleNotificationItem> roles = new HashSet<>();
+                       JsonNode SubscriberInfo = ticketEventNotif.get("SubscriberInfo");
+                       JsonNode userList = SubscriberInfo.get("UserList");
+                       String UserIds[] = userList.toString().replace("[", "").replace("]", "").trim().replace("\"", "")
+                                       .split(",");
+                       String assetID = eventSource + ' '
+                                       + userList.toString().replace("[", "").replace("]", "").trim().replace("\"", "") + ' '
+                                       + new Date(eventDate);
+                       if (body.get("assetID") != null) {
+                               assetID = body.get("assetID").asText();
+                       }
+                       epItem.setMsgHeader(assetID);
+                       List<EPUser> users = userNotificationService.getUsersByOrgIds(Arrays.asList(UserIds));
+                       for (String userId : UserIds) {
+                               EpRoleNotificationItem roleNotifItem = new EpRoleNotificationItem();
+                               for (EPUser user : users) {
+                                       if (user.getOrgUserId().equals(userId)) {
+                                               roleNotifItem.setRecvUserId(user.getId().intValue());
+                                               roles.add(roleNotifItem);
+                                               break;
+                                       }
+                               }
+
+                       }
+                       epItem.setRoles(roles);
+                       userNotificationService.saveNotification(epItem);
+
+                       portalResponse.setStatus(PortalRestStatusEnum.OK);
+                       portalResponse.setMessage("processEventNotification: notification created");
+                       portalResponse.setResponse("NotificationId is :" + epItem.notificationId);
+               } catch (Exception ex) {
+                       portalResponse.setStatus(PortalRestStatusEnum.ERROR);
+                       response.setStatus(400);
+                       portalResponse.setMessage(ex.toString());
+               }
+               return portalResponse;
+       }
+
+       /**
+        * Validates that mandatory fields are present.
+        * 
+        * @param ticketEventNotif
+        * @return Error message if a problem is found; null if all is well.
+        */
+       private String validateTicketEventMessage(JsonNode ticketEventNotif) {
+               JsonNode application = ticketEventNotif.get("application");
+               JsonNode event = ticketEventNotif.get("event");
+               JsonNode header = event.get("header");
+               JsonNode body = event.get("body");
+               JsonNode SubscriberInfo = ticketEventNotif.get("SubscriberInfo");
+               if (application == null)
+                       return "application is mandatory";
+               if (body == null)
+                       return "body is mandatory";
+               if (header.get("eventSource") == null)
+                       return "Message Source is mandatory";
+               if (SubscriberInfo.get("UserList") == null)
+                       return "At least one user Id is mandatory";
+               return null;
+       }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserController.java
new file mode 100644 (file)
index 0000000..4cf7ca6
--- /dev/null
@@ -0,0 +1,104 @@
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.transport.ProfileDetail;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class UserController extends EPRestrictedBaseController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserController.class);
+
+       @Autowired
+       private UserService userService;
+
+       /**
+        * RESTful service method to get ECOMP Logged in User details.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * 
+        * @return PortalRestResponse of EPUser
+        */
+       @RequestMapping(value = { "/portalApi/loggedinUser" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<ProfileDetail> getLoggedinUser(HttpServletRequest request) {
+               PortalRestResponse<ProfileDetail> portalRestResponse = null;
+               try {
+                       EPUser user = EPUserUtils.getUserSession(request);
+                       ProfileDetail profileDetail = new ProfileDetail(user.getFirstName(), user.getLastName(),
+                                       user.getMiddleInitial(), user.getEmail(), user.getLoginId(),  CipherUtil.decrypt(user.getLoginPwd()));
+                       portalRestResponse = new PortalRestResponse<ProfileDetail>(PortalRestStatusEnum.OK, "success",
+                                       profileDetail);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/loggedinUser", "result =", profileDetail);
+               } catch (Exception e) {
+                       portalRestResponse = new PortalRestResponse<ProfileDetail>(PortalRestStatusEnum.ERROR, e.getMessage(),
+                                       null);
+                       logger.error(EELFLoggerDelegate.errorLogger, "getLoggedinUser failed", e);
+               }
+               return portalRestResponse;
+       }
+
+       /**
+        * RESTful service method to update ECOMP Logged in User in DB.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param profileDetail
+        *            Body with user information
+        * @return PortalRestResponse of String
+        */
+       @RequestMapping(value = {
+                       "/portalApi/modifyLoggedinUser" }, method = RequestMethod.PUT, produces = "application/json")
+       public PortalRestResponse<String> modifyLoggedinUser(HttpServletRequest request,
+                       @RequestBody ProfileDetail profileDetail) {
+               PortalRestResponse<String> portalRestResponse = null;
+               try {
+                       String errorMsg = "";
+                       if (profileDetail.getFirstName().equals("") || profileDetail.getLastName().equals("")
+                                       || profileDetail.getEmail().equals("") || profileDetail.getLoginId().equals("")
+                                       || profileDetail.getLoginPassword().equals("")) {
+                               errorMsg = "Required field(s) is missing";
+                               portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, errorMsg, null);
+                               logger.error(EELFLoggerDelegate.errorLogger, "modifyLoggedinUser failed", errorMsg);
+                       } else {
+                               EPUser user = EPUserUtils.getUserSession(request);
+                               user.setFirstName(profileDetail.getFirstName());
+                               user.setLastName(profileDetail.getLastName());
+                               user.setEmail(profileDetail.getEmail());
+                               user.setMiddleInitial(profileDetail.getMiddleName());
+                               user.setLoginId(profileDetail.getLoginId());
+                               user.setLoginPwd(CipherUtil.encrypt(profileDetail.getLoginPassword()));
+                               userService.saveUser(user);
+                               // Update user info in the session
+                               request.getSession().setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME),
+                                               user);
+                               portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.OK, "success", null);
+                               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/modifyLoggedinUser", "result =", user);
+                       }
+               } catch (Exception e) {
+                       portalRestResponse = new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, e.toString(), null);
+                       logger.error(EELFLoggerDelegate.errorLogger, "modifyLoggedinUser failed", e);
+               }
+               return portalRestResponse;
+       }
+}
index 777fb91..24b698e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RequestParam;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalsdk.core.web.support.UserUtils;\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompAppRole;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.FunctionalMenuService;\r
-import org.openecomp.portalapp.portal.service.UserNotificationService;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;\r
-import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class UserNotificationController extends EPRestrictedBaseController {\r
-\r
-       @Autowired\r
-       FunctionalMenuService functionalMenuService;\r
-\r
-       @Autowired\r
-       UserNotificationService userNotificationService;\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserNotificationController.class);\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/getFunctionalMenuRole" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<FunctionalMenuRole> getMenuIdRoleId(HttpServletRequest request, HttpServletResponse response) {\r
-               // EPUser user = EPUserUtils.getUserSession(request);\r
-               List<FunctionalMenuRole> menuRoleList = null;\r
-               menuRoleList = functionalMenuService.getFunctionalMenuRole();\r
-               return menuRoleList;\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/getNotifications" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<List<EpNotificationItem>> getNotifications(HttpServletRequest request,\r
-                       HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               PortalRestResponse<List<EpNotificationItem>> portalRestResponse = null;\r
-               try {\r
-                       List<EpNotificationItem> notificationList = userNotificationService.getNotifications(user.getId());\r
-                       portalRestResponse = new PortalRestResponse<List<EpNotificationItem>>(PortalRestStatusEnum.OK, "success",\r
-                                       notificationList);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAllAppsAndContacts failed", e);\r
-                       portalRestResponse = new PortalRestResponse<List<EpNotificationItem>>(PortalRestStatusEnum.ERROR,\r
-                                       e.getMessage(), null);\r
-               }\r
-               return portalRestResponse;\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/getAdminNotifications" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<EpNotificationItemVO> getAdminNotifications(HttpServletRequest request, HttpServletResponse response) {\r
-               List<EpNotificationItemVO> adminNotificationList = null;\r
-               adminNotificationList = userNotificationService.getAdminNotificationVOS();\r
-               return adminNotificationList;\r
-       }\r
-\r
-       @RequestMapping(value = "/portalApi/saveNotification", method = RequestMethod.POST, produces = "application/json")\r
-       public PortalRestResponse<String> save(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody EpNotificationItem notificationItem) {\r
-\r
-               if (notificationItem == null || notificationItem.getMsgHeader() == null)\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",\r
-                                       "Notification Header cannot be null or empty");\r
-               if (notificationItem.getEndTime().compareTo(notificationItem.getStartTime()) < 0) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",\r
-                                       "End Time should be greater than  start time");\r
-               }\r
-\r
-               if ((notificationItem.getIsForAllRoles() == "N") && notificationItem.getRoleIds().isEmpty()) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",\r
-                                       "No Roles Ids Exist for the selected Roles");\r
-               }\r
-\r
-               Long creatorId = UserUtils.getUserIdAsLong(request);\r
-               notificationItem.setCreatorId(creatorId);\r
-\r
-               // Front-end date picker does not accept a time value, so all\r
-               // values are the start of the chosen day in the local time zone.\r
-               // Move the end time value to the very end of the chosen day.\r
-               // Avoid Calendar.getDefault() which uses the server's locale.\r
-               Long endTime = notificationItem.getEndTime().getTime();\r
-               endTime += (23 * 3600 + 59 * 60 + 59) * 1000;\r
-               notificationItem.getEndTime().setTime(endTime);\r
-\r
-               try {\r
-                       userNotificationService.saveNotification(notificationItem);\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());\r
-               }\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/notificationUpdateRate" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, String>> getNotificationUpdateRate(HttpServletRequest request) {\r
-               try {\r
-                       String updateRate = SystemProperties.getProperty(EPCommonSystemProperties.NOTIFICATION_UPDATE_RATE);\r
-                       String updateDuration = SystemProperties.getProperty(EPCommonSystemProperties.NOTIFICATION_UPDATE_DURATION);\r
-                       Integer rateInMiliSec = Integer.valueOf(updateRate) * 1000;\r
-                       Integer durationInMiliSec = Integer.valueOf(updateDuration) * 1000;\r
-                       Map<String, String> results = new HashMap<String, String>();\r
-                       results.put("updateRate", String.valueOf(rateInMiliSec));\r
-                       results.put("updateDuration", String.valueOf(durationInMiliSec));\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getNotificationUpdateRate failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/notificationRead" }, method = RequestMethod.GET, produces = "application/json")\r
-       public PortalRestResponse<Map<String, String>> notificationRead(\r
-                       @RequestParam("notificationId") String notificationID, HttpServletRequest request) {\r
-               try {\r
-                       userNotificationService.setNotificationRead(Long.parseLong(notificationID), UserUtils.getUserId(request));\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", null);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "notificationRead failed", e);\r
-                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);\r
-               }\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/getNotificationHistory" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<EpNotificationItemVO> getNotificationHistory(HttpServletRequest request, HttpServletResponse response) {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               List<EpNotificationItemVO> notificationList = null;\r
-               notificationList = userNotificationService.getNotificationHistoryVO(user.getId());\r
-               return notificationList;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/notificationRole/{notificationId}/roles" }, method = {\r
-                       RequestMethod.GET }, produces = "application/json")\r
-       public List<Integer> testGetRoles(HttpServletRequest request, @PathVariable("notificationId") Long notificationId) {\r
-               List<EpRoleNotificationItem> NotifRoles = userNotificationService.getNotificationRoles(notificationId);\r
-               ArrayList<Integer> rolesList = new ArrayList<Integer>();\r
-               for (EpRoleNotificationItem notifRole : NotifRoles) {\r
-                       rolesList.add(notifRole.roleId);\r
-               }\r
-               return rolesList;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/getNotificationAppRoles" }, method = {\r
-                       RequestMethod.GET }, produces = "application/json")\r
-       public List<EcompAppRole> getNotificationAppRoles(HttpServletRequest request, HttpServletResponse response) {\r
-               List<EcompAppRole> epAppRoleList = null;\r
-               try {\r
-                       epAppRoleList = userNotificationService.getAppRoleList();\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while performing UserNofiticationController.getNotificationAppRoles. Details: ",\r
-                                       e);\r
-               }\r
-               return epAppRoleList;\r
-       }\r
-       \r
-       @RequestMapping(value = {\r
-                       "/portalApi/getMessageRecipients" }, method = RequestMethod.GET, produces = "application/json")\r
-       public List<String> getMessageRecipients(@RequestParam("notificationId") Long notificationID) {\r
-               // EPUser user = EPUserUtils.getUserSession(request);\r
-               List<String> messageUserRecipients = null;\r
-               messageUserRecipients = userNotificationService.getMessageRecipients(notificationID);\r
-               return messageUserRecipients;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAppRole;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class UserNotificationController extends EPRestrictedBaseController {
+
+       @Autowired
+       FunctionalMenuService functionalMenuService;
+
+       @Autowired
+       UserNotificationService userNotificationService;
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserNotificationController.class);
+
+       @RequestMapping(value = {
+                       "/portalApi/getFunctionalMenuRole" }, method = RequestMethod.GET, produces = "application/json")
+       public List<FunctionalMenuRole> getMenuIdRoleId(HttpServletRequest request, HttpServletResponse response) {
+               // EPUser user = EPUserUtils.getUserSession(request);
+               List<FunctionalMenuRole> menuRoleList = null;
+               menuRoleList = functionalMenuService.getFunctionalMenuRole();
+               return menuRoleList;
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/getNotifications" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<List<EpNotificationItem>> getNotifications(HttpServletRequest request,
+                       HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               PortalRestResponse<List<EpNotificationItem>> portalRestResponse = null;
+               try {
+                       List<EpNotificationItem> notificationList = userNotificationService.getNotifications(user.getId());
+                       portalRestResponse = new PortalRestResponse<List<EpNotificationItem>>(PortalRestStatusEnum.OK, "success",
+                                       notificationList);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAllAppsAndContacts failed", e);
+                       portalRestResponse = new PortalRestResponse<List<EpNotificationItem>>(PortalRestStatusEnum.ERROR,
+                                       e.getMessage(), null);
+               }
+               return portalRestResponse;
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/getAdminNotifications" }, method = RequestMethod.GET, produces = "application/json")
+       public List<EpNotificationItemVO> getAdminNotifications(HttpServletRequest request, HttpServletResponse response) {
+               List<EpNotificationItemVO> adminNotificationList = null;
+               EPUser user = EPUserUtils.getUserSession(request);
+               adminNotificationList = userNotificationService.getAdminNotificationVOS(user.getId());
+               return adminNotificationList;
+       }
+
+       @RequestMapping(value = "/portalApi/saveNotification", method = RequestMethod.POST, produces = "application/json")
+       public PortalRestResponse<String> save(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody EpNotificationItem notificationItem) {
+
+               if (notificationItem == null || notificationItem.getMsgHeader() == null)
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
+                                       "Notification Header cannot be null or empty");
+               if (notificationItem.getEndTime().compareTo(notificationItem.getStartTime()) < 0) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
+                                       "End Time should be greater than  start time");
+               }
+
+               if ((notificationItem.getIsForAllRoles() == "N") && notificationItem.getRoleIds().isEmpty()) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE",
+                                       "No Roles Ids Exist for the selected Roles");
+               }
+
+               Long creatorId = UserUtils.getUserIdAsLong(request);
+               notificationItem.setCreatorId(creatorId);
+
+               // Front-end date picker does not accept a time value, so all
+               // values are the start of the chosen day in the local time zone.
+               // Move the end time value to the very end of the chosen day.
+               // Avoid Calendar.getDefault() which uses the server's locale.
+               Long endTime = notificationItem.getEndTime().getTime();
+               endTime += (23 * 3600 + 59 * 60 + 59) * 1000;
+               notificationItem.getEndTime().setTime(endTime);
+
+               try {
+                       userNotificationService.saveNotification(notificationItem);
+               } catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/notificationUpdateRate" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, String>> getNotificationUpdateRate(HttpServletRequest request) {
+               try {
+                       String updateRate = SystemProperties.getProperty(EPCommonSystemProperties.NOTIFICATION_UPDATE_RATE);
+                       String updateDuration = SystemProperties.getProperty(EPCommonSystemProperties.NOTIFICATION_UPDATE_DURATION);
+                       Integer rateInMiliSec = Integer.valueOf(updateRate) * 1000;
+                       Integer durationInMiliSec = Integer.valueOf(updateDuration) * 1000;
+                       Map<String, String> results = new HashMap<String, String>();
+                       results.put("updateRate", String.valueOf(rateInMiliSec));
+                       results.put("updateDuration", String.valueOf(durationInMiliSec));
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", results);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getNotificationUpdateRate failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/notificationRead" }, method = RequestMethod.GET, produces = "application/json")
+       public PortalRestResponse<Map<String, String>> notificationRead(
+                       @RequestParam("notificationId") String notificationID, HttpServletRequest request) {
+               try {
+                       userNotificationService.setNotificationRead(Long.parseLong(notificationID), UserUtils.getUserId(request));
+                       return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", null);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "notificationRead failed", e);
+                       return new PortalRestResponse<>(PortalRestStatusEnum.ERROR, e.toString(), null);
+               }
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/getNotificationHistory" }, method = RequestMethod.GET, produces = "application/json")
+       public List<EpNotificationItemVO> getNotificationHistory(HttpServletRequest request, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               List<EpNotificationItemVO> notificationList = null;
+               notificationList = userNotificationService.getNotificationHistoryVO(user.getId());
+               return notificationList;
+       }
+
+       @RequestMapping(value = { "/portalApi/notificationRole/{notificationId}/roles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<Integer> testGetRoles(HttpServletRequest request, @PathVariable("notificationId") Long notificationId) {
+               List<EpRoleNotificationItem> NotifRoles = userNotificationService.getNotificationRoles(notificationId);
+               ArrayList<Integer> rolesList = new ArrayList<Integer>();
+               for (EpRoleNotificationItem notifRole : NotifRoles) {
+                       rolesList.add(notifRole.roleId);
+               }
+               return rolesList;
+       }
+
+       @RequestMapping(value = { "/portalApi/getNotificationAppRoles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<EcompAppRole> getNotificationAppRoles(HttpServletRequest request, HttpServletResponse response) {
+               List<EcompAppRole> epAppRoleList = null;
+               try {
+                       epAppRoleList = userNotificationService.getAppRoleList();
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing UserNofiticationController.getNotificationAppRoles. Details: ",
+                                       e);
+               }
+               return epAppRoleList;
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/getMessageRecipients" }, method = RequestMethod.GET, produces = "application/json")
+       public List<String> getMessageRecipients(@RequestParam("notificationId") Long notificationID) {
+               // EPUser user = EPUserUtils.getUserSession(request);
+               List<String> messageUserRecipients = null;
+               messageUserRecipients = userNotificationService.getMessageRecipients(notificationID);
+               return messageUserRecipients;
+       }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRecommendationController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRecommendationController.java
new file mode 100644 (file)
index 0000000..3ec06ed
--- /dev/null
@@ -0,0 +1,87 @@
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class UserRecommendationController extends EPRestrictedBaseController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRecommendationController.class);
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       private static final String MACHINE_LEARNING_SERVICE_CTX = "/ml_api";
+       private static final String GET_RECOMMENDATION =  MACHINE_LEARNING_SERVICE_CTX + "/" + "getRecommendation";
+       private static final String GET_RECOMM_COUNT = MACHINE_LEARNING_SERVICE_CTX + "/" + "getRecommCount";
+       private static final String CONSUL_ML_SERVICE_ID = "mlearning-service"; 
+       private static final String SERVICE_PROTOCOL = "http";
+
+       @RequestMapping(value = {
+                       "/portalApi/getRecommendationsCount" }, method = RequestMethod.GET, produces = "application/json")
+       public String getRecommendationsCount(HttpServletRequest request, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               Map<String, String> requestMapping = new HashMap<String, String>();
+               requestMapping.put("id", user.getOrgUserId());
+               requestMapping.put("action", "reports");
+
+               HttpHeaders headers = new HttpHeaders();
+               headers.setContentType(MediaType.APPLICATION_JSON);
+
+               // set your entity to send
+               HttpEntity<Map<String,String>> entity = new HttpEntity<>(requestMapping, headers);
+               String endpoint = SERVICE_PROTOCOL + "://"+     consulHealthService.getServiceLocation(CONSUL_ML_SERVICE_ID,
+                               SystemProperties.getProperty("microservices.m-learn.local.port")) + GET_RECOMM_COUNT;
+               logger.debug(EELFLoggerDelegate.debugLogger, "Going to hit mlearning endpoint on: {1}", endpoint);
+               ResponseEntity<String> out = new RestTemplate().exchange(endpoint, HttpMethod.POST, entity, String.class);
+               return out.getBody();
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/getRecommendations" }, method = RequestMethod.GET, produces = "application/json")
+       public String getRecommendations(HttpServletRequest request, HttpServletResponse response) {
+               EPUser user = EPUserUtils.getUserSession(request);
+               Map<String, String> requestMapping = new HashMap<String, String>();
+               requestMapping.put("id", user.getOrgUserId());
+               requestMapping.put("action", "reports");
+               requestMapping.put("recommendations", "1");
+
+               HttpHeaders headers = new HttpHeaders();
+               headers.setContentType(MediaType.APPLICATION_JSON);
+
+               // set your entity to send
+               HttpEntity<Map<String,String>> entity = new HttpEntity<>(requestMapping, headers);
+               String endpoint = SERVICE_PROTOCOL + "://"+ 
+                               consulHealthService.getServiceLocation(CONSUL_ML_SERVICE_ID,
+                                               SystemProperties.getProperty("microservices.m-learn.local.port")) + GET_RECOMMENDATION;
+               logger.debug(EELFLoggerDelegate.debugLogger, "Going to hit mlearning endpoint on: {1}", endpoint);
+               ResponseEntity<String> out = new RestTemplate().exchange(endpoint, HttpMethod.POST, entity, String.class);
+               return out.getBody();
+       }
+
+}
\ No newline at end of file
index 719b7d4..7bcd584 100644 (file)
@@ -57,7 +57,7 @@ import org.openecomp.portalsdk.core.domain.AuditLog;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.restful.domain.EcompRole;
 import org.openecomp.portalsdk.core.service.AuditService;
-import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -74,29 +74,34 @@ import org.springframework.web.bind.annotation.RestController;
 @EPAuditLog
 public class UserRolesController extends EPRestrictedBaseController {
 
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRolesController.class);
+
        @Autowired
-       SearchService searchService;
-       @Autowired
-       AdminRolesService adminRolesService;
-       @Autowired
-       UserRolesService userRolesService;
+       private SearchService searchService;
        @Autowired
-       ApplicationsRestClientService applicationsRestClientService;
+       private AdminRolesService adminRolesService;
+       private @Autowired UserRolesService userRolesService;
        @Autowired
-       RoleService roleService;
+       private ApplicationsRestClientService applicationsRestClientService;
        @Autowired
-       AuditService auditService;
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRolesController.class);
-       
-       static final String FAILURE = "failure";
+       private AuditService auditService;
+
+       private static final String FAILURE = "failure";
 
        /**
         * RESTful service method to fetch users in the WebPhone external service
         * 
+        * @param request
+        *            HttpServletRequest
+        * @param searchString
+        *            search string
+        * @param response
+        *            HttpServletResponse
         * @return array of found users as json
         */
        @RequestMapping(value = { "/portalApi/queryUsers" }, method = RequestMethod.GET, produces = "application/json")
-       public String getPhoneBookSearchResult(HttpServletRequest request, @RequestParam("search") String searchString, HttpServletResponse response) {
+       public String getPhoneBookSearchResult(HttpServletRequest request, @RequestParam("search") String searchString,
+                       HttpServletResponse response) {
                EPUser user = EPUserUtils.getUserSession(request);
                String searchResult = null;
                if (!adminRolesService.isSuperAdmin(user) && !adminRolesService.isAccountAdmin(user)) {
@@ -106,23 +111,32 @@ public class UserRolesController extends EPRestrictedBaseController {
                        if (searchString.length() > 2) {
                                searchResult = searchService.searchUsersInPhoneBook(searchString);
                        } else {
-                               logger.info(EELFLoggerDelegate.errorLogger, "getPhoneBookSearchResult - too short search string: " + searchString);
+                               logger.info(EELFLoggerDelegate.errorLogger,
+                                               "getPhoneBookSearchResult - too short search string: " + searchString);
                        }
                }
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/queryUsers", "result =", searchResult);
-               
+
                return searchResult;
        }
 
        /**
         * RESTful service method to fetch applications where user is admin
         * 
-        * @return for GET: array of all applications with boolean isAdmin=true/false for each application
+        * @param request
+        *            HttpServletRequest
+        * @param orgUserId
+        *            search string
+        * @param response
+        *            HttpServletResponse
+        * @return for GET: array of all applications with boolean
+        *         isAdmin=true/false for each application
         */
-       @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = { RequestMethod.GET }, produces = "application/json")
-       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(HttpServletRequest request, @RequestParam("user") String orgUserId,
-                       HttpServletResponse response) {
-               
+       @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(HttpServletRequest request,
+                       @RequestParam("user") String orgUserId, HttpServletResponse response) {
+
                EPUser user = EPUserUtils.getUserSession(request);
                AppsListWithAdminRole result = null;
                if (!adminRolesService.isSuperAdmin(user)) {
@@ -131,15 +145,16 @@ public class UserRolesController extends EPRestrictedBaseController {
                        if (EcompPortalUtils.legitimateUserId(orgUserId)) {
                                result = adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId);
                        } else {
-                               logger.info(EELFLoggerDelegate.errorLogger, "getAppsWithAdminRoleStateForUser - parms error, no Organization User ID");
+                               logger.info(EELFLoggerDelegate.errorLogger,
+                                               "getAppsWithAdminRoleStateForUser - parms error, no Organization User ID");
                                response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
                        }
                }
 
                StringBuilder adminAppRoles = new StringBuilder();
-               if(result != null && result.appsRoles.size() >= 1) {
+               if (result != null && result.appsRoles.size() >= 1) {
                        adminAppRoles.append("User '" + result.orgUserId + "' has admin role to the apps = {");
-                       for(AppNameIdIsAdmin adminAppRole : result.appsRoles) {
+                       for (AppNameIdIsAdmin adminAppRole : result.appsRoles) {
                                if (adminAppRole.isAdmin) {
                                        adminAppRoles.append(adminAppRole.appName + ", ");
                                }
@@ -149,36 +164,47 @@ public class UserRolesController extends EPRestrictedBaseController {
                        adminAppRoles.append("User '" + result.orgUserId + "' has no Apps with Admin Role.");
                }
                logger.info(EELFLoggerDelegate.errorLogger, adminAppRoles.toString());
-               
+
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/adminAppsRoles", "get result =", result);
 
                return result;
        }
 
-       @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = { RequestMethod.PUT }, produces = "application/json")
-       public FieldsValidator putAppsWithAdminRoleStateForUser(HttpServletRequest request, @RequestBody AppsListWithAdminRole newAppsListWithAdminRoles,
-                       HttpServletResponse response) {
-               
-               //newAppsListWithAdminRoles.appsRoles
+       /**
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param newAppsListWithAdminRoles
+        *            new apps
+        * @param response
+        *            HttpServletResponse
+        * @return FieldsValidator
+        */
+       @RequestMapping(value = { "/portalApi/adminAppsRoles" }, method = {
+                       RequestMethod.PUT }, produces = "application/json")
+       public FieldsValidator putAppsWithAdminRoleStateForUser(HttpServletRequest request,
+                       @RequestBody AppsListWithAdminRole newAppsListWithAdminRoles, HttpServletResponse response) {
+
+               // newAppsListWithAdminRoles.appsRoles
                FieldsValidator fieldsValidator = new FieldsValidator();
                StringBuilder newAppRoles = new StringBuilder();
-               if(newAppsListWithAdminRoles != null && newAppsListWithAdminRoles.appsRoles.size() >= 1) {
+               if (newAppsListWithAdminRoles != null && newAppsListWithAdminRoles.appsRoles.size() >= 1) {
                        newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has admin role to the apps = { ");
-                       for(AppNameIdIsAdmin adminAppRole : newAppsListWithAdminRoles.appsRoles) {
+                       for (AppNameIdIsAdmin adminAppRole : newAppsListWithAdminRoles.appsRoles) {
                                if (adminAppRole.isAdmin) {
                                        newAppRoles.append(adminAppRole.appName + " ,");
                                }
                        }
-                       newAppRoles.deleteCharAt(newAppRoles.length()-1);
+                       newAppRoles.deleteCharAt(newAppRoles.length() - 1);
                        newAppRoles.append("}.");
                } else {
                        newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has no Apps with Admin Role.");
                }
                logger.info(EELFLoggerDelegate.errorLogger, newAppRoles.toString());
-                       
+
                EPUser user = EPUserUtils.getUserSession(request);
                boolean changesApplied = false;
-               
+
                if (!adminRolesService.isSuperAdmin(user)) {
                        EcompPortalUtils.setBadPermissions(user, response, "putAppsWithAdminRoleStateForUser");
                } else {
@@ -190,20 +216,44 @@ public class UserRolesController extends EPRestrictedBaseController {
                        auditLog.setComments(newAppRoles.toString());
                        auditService.logActivity(auditLog, null);
 
-                       MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          
-                       MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());
-                       logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("UserRolesController.putAppsWithAdminRoleStateForUser", 
-                                       EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN, user.getOrgUserId(), newAppsListWithAdminRoles.orgUserId, newAppRoles.toString()));                     
+                       MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                       MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                       EcompPortalUtils.calculateDateTimeDifferenceForLog(
+                                       MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
+                                       MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                       logger.info(EELFLoggerDelegate.auditLogger,
+                                       EPLogUtil.formatAuditLogMessage("UserRolesController.putAppsWithAdminRoleStateForUser",
+                                                       EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN, user.getOrgUserId(),
+                                                       newAppsListWithAdminRoles.orgUserId, newAppRoles.toString()));
                        MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
                        MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                       MDC.remove(SystemProperties.MDC_TIMER);
                }
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/adminAppsRoles", "put result =", changesApplied);
-               
+
                return fieldsValidator;
        }
 
-       @RequestMapping(value = { "/portalApi/userAppRoles" }, method = { RequestMethod.GET }, produces = "application/json")
-       public List<RoleInAppForUser> getAppRolesForUser(HttpServletRequest request, @RequestParam("user") String orgUserId, @RequestParam("app") Long appid, HttpServletResponse response) {
+       /**
+        * It returns a list of user app roles for single app
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param response
+        *            HttpServletResponse
+        * @param orgUserId
+        *            user ID
+        * @param appid
+        *            application ID
+        * @param extRequestValue
+        *            set to false if request is from users page otherwise true
+        * @return List<RoleInAppForUser>
+        */
+       @RequestMapping(value = { "/portalApi/userAppRoles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<RoleInAppForUser> getAppRolesForUser(HttpServletRequest request, @RequestParam("user") String orgUserId,
+                       @RequestParam("app") Long appid, @RequestParam("externalRequest") Boolean extRequestValue,
+                       HttpServletResponse response) {
                EPUser user = EPUserUtils.getUserSession(request);
                List<RoleInAppForUser> result = null;
                String feErrorString = "";
@@ -212,16 +262,18 @@ public class UserRolesController extends EPRestrictedBaseController {
                        feErrorString = EcompPortalUtils.getFEErrorString(true, response.getStatus());
                } else {
                        if (EcompPortalUtils.legitimateUserId(orgUserId)) {
-                               result = userRolesService.getAppRolesForUser(appid, orgUserId);
+                               result = userRolesService.getAppRolesForUser(appid, orgUserId, extRequestValue);
                                int responseCode = EcompPortalUtils.getExternalAppResponseCode();
                                if (responseCode != 0 && responseCode != 200) {
                                        // external error
                                        response.setStatus(responseCode);
                                        feErrorString = EcompPortalUtils.getFEErrorString(false, responseCode);
                                } else if (result == null) {
-                                       // If the result is null, there was an internal ecomp error in the service call.
+                                       // If the result is null, there was an internal ecomp error
+                                       // in the service call.
                                        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
-                                       feErrorString = EcompPortalUtils.getFEErrorString(true, HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                                       feErrorString = EcompPortalUtils.getFEErrorString(true,
+                                                       HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                                }
                        } else {
                                logger.info(EELFLoggerDelegate.errorLogger, "getAppRolesForUser - no Organization User ID");
@@ -229,29 +281,29 @@ public class UserRolesController extends EPRestrictedBaseController {
                                feErrorString = EcompPortalUtils.getFEErrorString(true, HttpServletResponse.SC_BAD_REQUEST);
                        }
                }
-               
+
                StringBuilder sbUserApps = new StringBuilder();
-               if (result!=null && result.size()>=1) {
+               if (result != null && result.size() >= 1) {
                        sbUserApps.append("User '" + orgUserId + "' has Roles={");
-                       for(RoleInAppForUser appRole : result) {
+                       for (RoleInAppForUser appRole : result) {
                                if (appRole.isApplied) {
                                        sbUserApps.append(appRole.roleName + ", ");
                                }
                        }
                        sbUserApps.append("} assigned to the appId '" + appid + "'.");
                } else {
-                       //Not sure creating an empty object will make any difference
-                       //but would like to give it a shot for defect #DE221057
-                       if (result==null) {
+                       // Not sure creating an empty object will make any difference
+                       // but would like to give it a shot for defect #DE221057
+                       if (result == null) {
                                result = new ArrayList<RoleInAppForUser>();
                        }
                        sbUserApps.append("User '" + orgUserId + "' and appid " + appid + " has no roles");
                }
                logger.info(EELFLoggerDelegate.errorLogger, sbUserApps.toString());
-               
+
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/userAppRoles", "get result =", result);
                if (feErrorString != "") {
-                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: FEErrorString to header: "+feErrorString);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: FEErrorString to header: " + feErrorString);
 
                        response.addHeader("FEErrorString", feErrorString);
                        response.addHeader("Access-Control-Expose-Headers", "FEErrorString");
@@ -259,129 +311,155 @@ public class UserRolesController extends EPRestrictedBaseController {
                return result;
        }
 
-       @RequestMapping(value = { "/portalApi/userAppRoles" }, method = { RequestMethod.PUT }, produces = "application/json")
-       public FieldsValidator putAppWithUserRoleStateForUser(HttpServletRequest request, @RequestBody AppWithRolesForUser newAppRolesForUser,
-                       HttpServletResponse response) {
+       @RequestMapping(value = { "/portalApi/userAppRoles" }, method = {
+                       RequestMethod.PUT }, produces = "application/json")
+       public FieldsValidator putAppWithUserRoleStateForUser(HttpServletRequest request,
+                       @RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
                FieldsValidator fieldsValidator = new FieldsValidator();
                StringBuilder sbUserApps = new StringBuilder();
-               if (newAppRolesForUser!=null) {
+               if (newAppRolesForUser != null) {
                        sbUserApps.append("User '" + newAppRolesForUser.orgUserId);
-                       if (newAppRolesForUser.appRoles!=null && newAppRolesForUser.appRoles.size()>=1) {
+                       if (newAppRolesForUser.appRoles != null && newAppRolesForUser.appRoles.size() >= 1) {
                                sbUserApps.append("' has roles = { ");
-                               for(RoleInAppForUser appRole : newAppRolesForUser.appRoles) {
-                                               if (appRole.isApplied) {
-                                                       sbUserApps.append(appRole.roleName + " ,");
-                                               }
+                               for (RoleInAppForUser appRole : newAppRolesForUser.appRoles) {
+                                       if (appRole.isApplied) {
+                                               sbUserApps.append(appRole.roleName + " ,");
+                                       }
                                }
-                               sbUserApps.deleteCharAt(sbUserApps.length()-1);
+                               sbUserApps.deleteCharAt(sbUserApps.length() - 1);
                                sbUserApps.append("} assigned for the app " + newAppRolesForUser.appId);
                        } else {
                                sbUserApps.append("' has no roles assigned for app " + newAppRolesForUser.appId);
                        }
                }
                logger.info(EELFLoggerDelegate.applicationLogger, "putAppWithUserRoleStateForUser: {}", sbUserApps.toString());
-               
+
                EPUser user = EPUserUtils.getUserSession(request);
                boolean changesApplied = false;
                if (!adminRolesService.isAccountAdmin(user)) {
                        EcompPortalUtils.setBadPermissions(user, response, "putAppWithUserRoleStateForUser");
                } else {
                        changesApplied = userRolesService.setAppWithUserRoleStateForUser(user, newAppRolesForUser);
-                       if (changesApplied){
-                               logger.info(EELFLoggerDelegate.applicationLogger, "putAppWithUserRoleStateForUser: succeeded for app {}, user {}", 
-                                               newAppRolesForUser.appId, newAppRolesForUser.orgUserId);
+                       if (changesApplied) {
+                               logger.info(EELFLoggerDelegate.applicationLogger,
+                                               "putAppWithUserRoleStateForUser: succeeded for app {}, user {}", newAppRolesForUser.appId,
+                                               newAppRolesForUser.orgUserId);
                                AuditLog auditLog = new AuditLog();
                                auditLog.setUserId(user.getId());
                                auditLog.setActivityCode(EcompAuditLog.CD_ACTIVITY_UPDATE_USER);
                                auditLog.setAffectedRecordId(newAppRolesForUser.orgUserId);
                                auditLog.setComments(sbUserApps.toString());
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());         
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
                                auditService.logActivity(auditLog, null);
-                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());
-                               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatAuditLogMessage("UserRolesController.putAppWithUserRoleStateForUser", 
-                                               EcompAuditLog.CD_ACTIVITY_UPDATE_USER, user.getOrgUserId(), newAppRolesForUser.orgUserId, sbUserApps.toString()));
+                               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                               EcompPortalUtils.calculateDateTimeDifferenceForLog(
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
+                                               MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                               logger.info(EELFLoggerDelegate.auditLogger,
+                                               EPLogUtil.formatAuditLogMessage("UserRolesController.putAppWithUserRoleStateForUser",
+                                                               EcompAuditLog.CD_ACTIVITY_UPDATE_USER, user.getOrgUserId(),
+                                                               newAppRolesForUser.orgUserId, sbUserApps.toString()));
                                MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
                                MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                               MDC.remove(SystemProperties.MDC_TIMER);
                        } else {
-                               logger.error(EELFLoggerDelegate.errorLogger, "putAppWithUserRoleStateForUser: failed for app {}, user {}", 
-                                               newAppRolesForUser.appId, newAppRolesForUser.orgUserId);
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "putAppWithUserRoleStateForUser: failed for app {}, user {}", newAppRolesForUser.appId,
+                                               newAppRolesForUser.orgUserId);
                        }
                }
 
                EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/userAppRoles", "put result =", changesApplied);
                return fieldsValidator;
        }
-       
-       @RequestMapping(value = { "/portalApi/updateRemoteUserProfile" }, method = { RequestMethod.GET }, produces = "application/json")
-       public PortalRestResponse<String> updateRemoteUserProfile(HttpServletRequest request,HttpServletResponse response) {
-               
+
+       @RequestMapping(value = { "/portalApi/updateRemoteUserProfile" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public PortalRestResponse<String> updateRemoteUserProfile(HttpServletRequest request,
+                       HttpServletResponse response) {
+
                String updateRemoteUserFlag = FAILURE;
                try {
-                       //saveNewUser = userService.saveNewUser(newUser);
+                       // saveNewUser = userService.saveNewUser(newUser);
                        String orgUserId = request.getParameter("loginId");
                        Long appId = Long.parseLong(request.getParameter("appId"));
                        userRolesService.updateRemoteUserProfile(orgUserId, appId);
-                       
+
                } catch (Exception e) {
                        return new PortalRestResponse<String>(PortalRestStatusEnum.OK, updateRemoteUserFlag, e.getMessage());
                }
                return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, updateRemoteUserFlag, "");
-               
+
        }
 
-       @RequestMapping(value = { "/portalApi/app/{appId}/users" }, method = { RequestMethod.GET }, produces = "application/json")
-       public List<UserApplicationRoles> getUsersFromAppEndpoint(HttpServletRequest request, @PathVariable("appId") Long appId) throws HTTPException {
+       @RequestMapping(value = { "/portalApi/app/{appId}/users" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<UserApplicationRoles> getUsersFromAppEndpoint(HttpServletRequest request,
+                       @PathVariable("appId") Long appId) throws HTTPException {
                try {
                        logger.debug(EELFLoggerDelegate.debugLogger, "/portalApi/app/{}/users was invoked", appId);
                        List<UserApplicationRoles> appUsers = userRolesService.getUsersFromAppEndpoint(appId);
                        return appUsers;
-               } catch(Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing UserRolesController.getUsersFromAppEndpoint. Details: " + EcompPortalUtils.getStackTrace(e));
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing UserRolesController.getUsersFromAppEndpoint. Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
                        return new ArrayList<UserApplicationRoles>();
                }
        }
 
-       @RequestMapping(value = { "/portalApi/app/{appId}/roles" }, method = { RequestMethod.GET }, produces = "application/json")
-       public List<EcompRole> testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId) throws HTTPException {
+       @RequestMapping(value = { "/portalApi/app/{appId}/roles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<EcompRole> testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId)
+                       throws HTTPException {
                EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
                List<EcompRole> rolesList = Arrays.asList(appRoles);
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/app/{appId}/roles", "response for appId=" + appId, rolesList);
-               
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/app/{appId}/roles", "response for appId=" + appId,
+                               rolesList);
+
                return rolesList;
        }
 
-       @RequestMapping(value = { "/portalApi/admin/import/app/{appId}/roles" }, method = { RequestMethod.GET }, produces = "application/json")
-       public List<EPRole> importRolesFromRemoteApplication(HttpServletRequest request, @PathVariable("appId") Long appId) throws HTTPException {
+       @RequestMapping(value = { "/portalApi/admin/import/app/{appId}/roles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public List<EPRole> importRolesFromRemoteApplication(HttpServletRequest request, @PathVariable("appId") Long appId)
+                       throws HTTPException {
                List<EPRole> rolesList = userRolesService.importRolesFromRemoteApplication(appId);
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/admin/import/app/{appId}/roles", "response for appId=" + appId, rolesList);
-               
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/admin/import/app/{appId}/roles",
+                               "response for appId=" + appId, rolesList);
+
                return rolesList;
        }
 
-       @RequestMapping(value = { "/portalApi/app/{appId}/user/{orgUserId}/roles" }, method = { RequestMethod.GET }, produces = "application/json")
-       public EcompRole testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId, @PathVariable("orgUserId") String orgUserId) throws Exception {
+       @RequestMapping(value = { "/portalApi/app/{appId}/user/{orgUserId}/roles" }, method = {
+                       RequestMethod.GET }, produces = "application/json")
+       public EcompRole testGetRoles(HttpServletRequest request, @PathVariable("appId") Long appId,
+                       @PathVariable("orgUserId") String orgUserId) throws Exception {
                if (!EcompPortalUtils.legitimateUserId(orgUserId)) {
                        String msg = "Error /user/<user>/roles not legitimate orgUserId = " + orgUserId;
                        logger.error(EELFLoggerDelegate.errorLogger, msg);
                        throw new Exception(msg);
                }
-               EcompRole[] roles = applicationsRestClientService.get(EcompRole[].class, appId, String.format("/user/%s/roles", orgUserId));
+               EcompRole[] roles = applicationsRestClientService.get(EcompRole[].class, appId,
+                               String.format("/user/%s/roles", orgUserId));
                if (roles.length != 1) {
                        String msg = "Error /user/<user>/roles returned array. expected size 1 recieved size = " + roles.length;
                        logger.error(EELFLoggerDelegate.errorLogger, msg);
                        throw new Exception(msg);
                }
-               
-               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/app/{appId}/user/{orgUserId}/roles", "response for appId='" + appId + "' and orgUserId='" + orgUserId + "'", roles[0]);
+
+               EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/app/{appId}/user/{orgUserId}/roles",
+                               "response for appId='" + appId + "' and orgUserId='" + orgUserId + "'", roles[0]);
                return roles[0];
        }
-       
-       @RequestMapping(value = { "/portalApi/saveUserAppRoles" }, method = { RequestMethod.PUT }, produces = "application/json")
-       public FieldsValidator putAppWithUserRoleRequest(HttpServletRequest request, @RequestBody AppWithRolesForUser newAppRolesForUser,
-                       HttpServletResponse response) {
+
+       @RequestMapping(value = { "/portalApi/saveUserAppRoles" }, method = {
+                       RequestMethod.PUT }, produces = "application/json")
+       public FieldsValidator putAppWithUserRoleRequest(HttpServletRequest request,
+                       @RequestBody AppWithRolesForUser newAppRolesForUser, HttpServletResponse response) {
                FieldsValidator fieldsValidator = null;
                try {
-                       
+
                        EPUser user = EPUserUtils.getUserSession(request);
                        fieldsValidator = userRolesService.putUserAppRolesRequest(newAppRolesForUser, user);
                        response.setStatus(fieldsValidator.httpStatusCode.intValue());
@@ -395,7 +473,7 @@ public class UserRolesController extends EPRestrictedBaseController {
                                response.getStatus());
                return fieldsValidator;
        }
-       
+
        @RequestMapping(value = { "/portalApi/appCatalogRoles" }, method = {
                        RequestMethod.GET }, produces = "application/json")
        public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(HttpServletRequest request,
@@ -414,22 +492,24 @@ public class UserRolesController extends EPRestrictedBaseController {
                return userAppRoleList;
 
        }
+
        private Comparator<EPUserAppCatalogRoles> getUserAppCatalogRolesComparator = new Comparator<EPUserAppCatalogRoles>() {
                public int compare(EPUserAppCatalogRoles o1, EPUserAppCatalogRoles o2) {
                        return o1.getRolename().compareTo(o2.getRolename());
                }
        };
-       
+
        @RequestMapping(value = "/portalApi/externalRequestAccessSystem", method = RequestMethod.GET, produces = "application/json")
        public ExternalSystemAccess readExternalRequestAccess(HttpServletRequest request) {
                ExternalSystemAccess result = null;
-               try {           
+               try {
                        result = userRolesService.getExternalRequestAccess();
-                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/externalRequestAccessSystem", "GET result =", result);
+                       EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/externalRequestAccessSystem", "GET result =",
+                                       result);
                } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger,"readExternalRequestAccess failed: " + e.getMessage());
-               }       
+                       logger.error(EELFLoggerDelegate.errorLogger, "readExternalRequestAccess failed: " + e.getMessage());
+               }
                return result;
        }
-       
+
 }
index f1d77a3..b576161 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.InputStream;\r
-import java.nio.charset.StandardCharsets;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.apache.commons.io.IOUtils;\r
-import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EcompAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.service.AppsCacheService;\r
-import org.openecomp.portalapp.portal.transport.Analytics;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.PortalConstants;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;\r
-import org.openecomp.portalsdk.core.service.AuditService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.ResponseBody;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-import io.swagger.annotations.ApiOperation;\r
-\r
-@RestController\r
-@RequestMapping(PortalConstants.REST_AUX_API)\r
-@Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseController{\r
-       \r
-       private static final String APP_KEY = "uebkey";\r
-       \r
-       @Autowired\r
-       AuditService auditService;\r
-       \r
-       @Autowired\r
-       AppsCacheService appCacheService;\r
-       \r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebAnalyticsExtAppController.class);\r
-\r
-       protected boolean isAuxRESTfulCall() {\r
-               return true;\r
-       }\r
-\r
-       /*\r
-        * Answers requests from partner applications for a file that is expected to\r
-        * contain javascript to support web analytics.\r
-        * \r
-        * @param request\r
-        * @return\r
-        * @throws Exception\r
-        */\r
-       @ApiOperation(value = "Gets javascript with functions that support gathering and reporting web analytics.", response = String.class)\r
-       @RequestMapping(value = { "/analytics" }, method = RequestMethod.GET, produces = "application/javascript")\r
-       public String getAnalyticsScript(HttpServletRequest request) throws Exception {\r
-               String responseText = "";\r
-               final String fileName = "analytics.txt";\r
-               InputStream analyticsFileStream = null;\r
-               try {\r
-                       analyticsFileStream = this.getClass().getClassLoader().getResourceAsStream(fileName);\r
-                       responseText = IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name());\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Error reading contents of the file " + fileName, e);\r
-               } finally {\r
-                       if (analyticsFileStream != null)\r
-                               analyticsFileStream.close();\r
-               }\r
-\r
-               String feURLContext = SystemProperties.getProperty("frontend_url");\r
-               String feURL = feURLContext.substring(0, feURLContext.lastIndexOf('/'));\r
-\r
-               responseText = responseText.replace("PORTAL_ENV_URL", feURL);\r
-               return responseText;\r
-       }\r
-\r
-       /**\r
-        * Accepts data from partner applications with web analytics data.\r
-        * \r
-        * @param request\r
-        * @param analyticsMap\r
-        * @param response\r
-        * @return\r
-        * @throws Exception\r
-        */\r
-       @RequestMapping(value = { "/storeAnalytics" }, method = RequestMethod.POST, produces = "application/json")\r
-       @ResponseBody\r
-       @ApiOperation(value = "Accepts data from partner applications with web analytics data.", response = PortalAPIResponse.class)\r
-       public PortalAPIResponse storeAnalyticsScript(HttpServletRequest request, @RequestBody Analytics analyticsMap) throws Exception {       \r
-               try{\r
-               MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());          \r
-               MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP,EPEELFLoggerAdvice.getCurrentDateTimeUTC());\r
-               String appName = "";\r
-               try {\r
-                       \r
-                       String appKeyValue = request.getHeader(APP_KEY);\r
-                       if(appKeyValue == null || appKeyValue.equals("")) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, " App Key unavailable; Proceeding with null app name");\r
-                       } else {        \r
-                               EPApp appRecord = appCacheService.getAppForAnalytics(appKeyValue); \r
-                               if(appRecord == null){\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, " App could not be found for the key "+ appKeyValue);\r
-                               }\r
-                               else appName = appRecord.getName();\r
-                               \r
-                       }\r
-               \r
-               } catch(Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, " Error retrieving Application to capture app name for analytics; Proceeding with empty app name");\r
-               }\r
-               \r
-               \r
-               \r
-               logger.info(EELFLoggerDelegate.auditLogger, EPLogUtil.formatStoreAnalyticsAuditLogMessage(analyticsMap.getUserId(),appName, "WebAnalyticsExtAppController.postWebAnalyticsData", \r
-                               EcompAuditLog.CD_ACTIVITY_STORE_ANALYTICS, analyticsMap.getAction(),analyticsMap.getPage(),analyticsMap.getFunction(),analyticsMap.getType()));                 \r
-               MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);\r
-               MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);\r
-               \r
-               PortalAPIResponse response = new PortalAPIResponse(true, "success");\r
-               return response;\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "storeAnalytics failed", e);\r
-                       PortalAPIResponse response = new PortalAPIResponse(true, "error");\r
-                       return response;\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.io.IOUtils;
+import org.openecomp.portalapp.controller.EPRestrictedRESTfulBaseController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EcompAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPEELFLoggerAdvice;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.service.AppsCacheService;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.transport.Analytics;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.concurrent.FailureCallback;
+import org.springframework.util.concurrent.ListenableFuture;
+import org.springframework.util.concurrent.SuccessCallback;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.AsyncRestTemplate;
+
+import io.swagger.annotations.ApiOperation;
+
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseController {
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       private static final String MACHINE_LEARNING_SERVICE_CTX = "/ml_api";
+       private static final String REGISTER_ACTION = MACHINE_LEARNING_SERVICE_CTX + "/" + "registerAction";
+       private static final String CONSUL_ML_SERVICE_ID = "machine-learning";
+       private static final String SERVICE_PROTOCOL = "http";
+       private static final String APP_KEY = "uebkey";
+
+       @Autowired
+       AuditService auditService;
+
+       @Autowired
+       AppsCacheService appCacheService;
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WebAnalyticsExtAppController.class);
+
+       private AsyncRestTemplate restTemplate = new AsyncRestTemplate();
+
+       SuccessCallback<ResponseEntity<String>> successCallback = new SuccessCallback<ResponseEntity<String>>() {
+               @Override
+               public void onSuccess(ResponseEntity<String> arg) {
+                       logger.info(EELFLoggerDelegate.debugLogger, arg.getBody());
+               }
+       };
+
+       FailureCallback failureCallback = new FailureCallback() {
+               @Override
+               public void onFailure(Throwable arg) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "storeAuxAnalytics failed", arg);
+               }
+       };
+
+       protected boolean isAuxRESTfulCall() {
+               return true;
+       }
+
+       /**
+        * Answers requests from partner applications for a file that is expected to
+        * contain javascript to support web analytics.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return String
+        * @throws Exception
+        *             on failure
+        */
+       @ApiOperation(value = "Gets javascript with functions that support gathering and reporting web analytics.", response = String.class)
+       @RequestMapping(value = { "/analytics" }, method = RequestMethod.GET, produces = "application/javascript")
+       public String getAnalyticsScript(HttpServletRequest request) throws Exception {
+               String responseText = "";
+               final String fileName = "analytics.txt";
+               InputStream analyticsFileStream = null;
+               try {
+                       analyticsFileStream = this.getClass().getClassLoader().getResourceAsStream(fileName);
+                       responseText = IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name());
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "Error reading contents of the file " + fileName, e);
+               } finally {
+                       if (analyticsFileStream != null)
+                               analyticsFileStream.close();
+               }
+
+               String feURLContext = SystemProperties.getProperty("frontend_url");
+               String feURL = feURLContext.substring(0, feURLContext.lastIndexOf('/'));
+
+               responseText = responseText.replace("PORTAL_ENV_URL", feURL);
+               return responseText;
+       }
+
+       /**
+        * Accepts data from partner applications with web analytics data.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param analyticsMap
+        *            Analytics
+        * @return PortalAPIResponse
+        * @throws Exception
+        *             on failure
+        */
+       @RequestMapping(value = { "/storeAnalytics" }, method = RequestMethod.POST, produces = "application/json")
+       @ResponseBody
+       @ApiOperation(value = "Accepts data from partner applications with web analytics data.", response = PortalAPIResponse.class)
+       public PortalAPIResponse storeAnalyticsScript(HttpServletRequest request, @RequestBody Analytics analyticsMap)
+                       throws Exception {
+               try {
+                       MDC.put(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+                       String appName = "";
+                       try {
+                               appName = getAppName(request, appName);
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               " Error retrieving Application to capture app name for analytics; Proceeding with empty app name");
+                       }
+
+                       try {
+                               storeAuxAnalytics(analyticsMap, appName);
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               " Error retrieving Application to capture app name for analytics; Proceeding with empty app name");
+                       }
+
+                       MDC.put(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP, EPEELFLoggerAdvice.getCurrentDateTimeUTC());
+
+                       EcompPortalUtils.calculateDateTimeDifferenceForLog(
+                                       MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
+                                       MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
+                       logger.info(EELFLoggerDelegate.auditLogger,
+                                       EPLogUtil.formatStoreAnalyticsAuditLogMessage(analyticsMap.getUserId(), appName,
+                                                       "WebAnalyticsExtAppController.postWebAnalyticsData",
+                                                       EcompAuditLog.CD_ACTIVITY_STORE_ANALYTICS, analyticsMap.getAction(), analyticsMap.getPage(),
+                                                       analyticsMap.getFunction(), analyticsMap.getType()));
+
+                       MDC.remove(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+                       MDC.remove(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP);
+                       MDC.remove(SystemProperties.MDC_TIMER);
+
+                       PortalAPIResponse response = new PortalAPIResponse(true, "success");
+                       return response;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "storeAnalytics failed", e);
+                       PortalAPIResponse response = new PortalAPIResponse(true, "error");
+                       return response;
+               }
+       }
+
+       protected String getAppName(HttpServletRequest request, String appName) {
+               String appKeyValue = request.getHeader(APP_KEY);
+               if (appKeyValue == null || appKeyValue.equals("")) {
+                       logger.error(EELFLoggerDelegate.errorLogger, " App Key unavailable; Proceeding with null app name");
+               } else {
+                       EPApp appRecord = appCacheService.getAppForAnalytics(appKeyValue);
+                       if (appRecord == null) {
+                               logger.error(EELFLoggerDelegate.errorLogger, " App could not be found for the key " + appKeyValue);
+                       } else
+                               appName = appRecord.getName();
+
+               }
+               return appName;
+       }
+
+       protected void storeAuxAnalytics(Analytics analyticsMap, String appName) {
+               logger.info(EELFLoggerDelegate.debugLogger,
+                               " Registering an action for recommendation: AppName/Function/UserId " + appName + "/"
+                                               + analyticsMap.getFunction() + "/" + analyticsMap.getUserId());
+
+               Map<String, String> requestMapping = new HashMap<String, String>();
+               requestMapping.put("id", analyticsMap.getUserId());
+               requestMapping.put("action", appName + "|" + analyticsMap.getFunction());
+
+               HttpHeaders headers = new HttpHeaders();
+               headers.setContentType(MediaType.APPLICATION_JSON);
+
+               // set your entity to send
+               HttpEntity<Map<String, String>> entity = new HttpEntity<Map<String, String>>(requestMapping, headers);
+
+               // send it!
+               ListenableFuture<ResponseEntity<String>> out = restTemplate.exchange(
+                               SERVICE_PROTOCOL + "://"
+                                               + consulHealthService.getServiceLocation(CONSUL_ML_SERVICE_ID,
+                                                               SystemProperties.getProperty("microservices.m-learn.local.port"))
+                                               + REGISTER_ACTION,
+                               HttpMethod.POST, entity, String.class);
+               out.addCallback(successCallback, failureCallback);
+       }
+
+}
index f69a648..9ac81e9 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.io.FileOutputStream;\r
-import java.io.IOException;\r
-import java.io.OutputStream;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.servlet.ServletContext;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalapp.controller.EPRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceData;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;\r
-import org.openecomp.portalapp.portal.domain.WidgetParameterResult;\r
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.ConsulHealthService;\r
-import org.openecomp.portalapp.portal.service.MicroserviceService;\r
-import org.openecomp.portalapp.portal.service.WidgetParameterService;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.core.io.FileSystemResource;\r
-import org.springframework.http.HttpEntity;\r
-import org.springframework.http.HttpHeaders;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.http.MediaType;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.util.LinkedMultiValueMap;\r
-import org.springframework.util.MultiValueMap;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import org.springframework.web.client.RestClientException;\r
-import org.springframework.web.client.RestTemplate;\r
-import org.springframework.web.multipart.MultipartFile;\r
-import org.springframework.web.multipart.MultipartHttpServletRequest;\r
-import org.springframework.web.multipart.commons.CommonsMultipartResolver;\r
-\r
-@SuppressWarnings("unchecked")\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class WidgetsCatalogController extends EPRestrictedBaseController {\r
-       \r
-       private static final String HTTPS = "https://";\r
-       \r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogController.class);\r
-       RestTemplate template = new RestTemplate();\r
-       String whatService = "widgets-service";\r
-\r
-       @Autowired\r
-       private ConsulHealthService consulHealthService;\r
-\r
-       @Autowired\r
-       private MicroserviceService microserviceService;\r
-\r
-       @Autowired\r
-       private WidgetParameterService widgetParameterService;\r
-\r
-       @Bean\r
-       public CommonsMultipartResolver multipartResolver() {\r
-               return new CommonsMultipartResolver();\r
-       }\r
-\r
-       static {\r
-               // for localhost testing only\r
-               javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {\r
-\r
-                       public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {\r
-                               if (hostname.equals("localhost")) {\r
-                                       return true;\r
-                               }\r
-                               return false;\r
-                       }\r
-               });\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{loginName}" }, method = RequestMethod.GET)\r
-       public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("loginName") String loginName) throws RestClientException, Exception {\r
-               List<WidgetCatalog> widgets = new ArrayList<>();\r
-               try {\r
-                       ResponseEntity<ArrayList> ans = template.exchange(\r
-                                       HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                                       + "/widget/microservices/widgetCatalog/" + loginName,\r
-                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);\r
-                       widgets = ans.getBody();\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getUserWidgetCatalog failed", e);\r
-                       // returning null because null help check on the UI if there was a\r
-                       // communication problem with Microservice.\r
-                       return null;\r
-               }\r
-               return widgets;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog" }, method = RequestMethod.GET)\r
-       public List<WidgetCatalog> getWidgetCatalog(HttpServletRequest request, HttpServletResponse response)\r
-                       throws RestClientException, Exception {\r
-               List<WidgetCatalog> widgets = new ArrayList<>();\r
-               try {\r
-                       ResponseEntity<ArrayList> ans = template.exchange(\r
-                                       HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                                       + "/widget/microservices/widgetCatalog",\r
-                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);\r
-                       widgets = ans.getBody();\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getWidgetCatalog failed", e);\r
-                       // returning null because null help check on the UI if there was a\r
-                       // communication problem with Microservice.\r
-                       return null;\r
-               }\r
-               return widgets;\r
-       }\r
-\r
-       @RequestMapping(value = {\r
-                       "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.PUT, produces = "application/json")\r
-       public void updateWidgetCatalog(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId)\r
-                       throws RestClientException, Exception {\r
-               template.exchange(\r
-                               HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                               + "/widget/microservices/widgetCatalog/" + widgetId,\r
-                               HttpMethod.PUT, new HttpEntity(newWidgetCatalog, WidgetServiceHeaders.getInstance()), String.class);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.DELETE)\r
-       public void deleteOnboardingWidget(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               template.exchange(\r
-                               HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                               + "/widget/microservices/widgetCatalog/" + widgetId,\r
-                               HttpMethod.DELETE, new HttpEntity(WidgetServiceHeaders.getInstance()), String.class);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.POST)\r
-       public String updateWidgetCatalogWithFiles(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               MultipartHttpServletRequest mRequest;\r
-               MultiValueMap<String, Object> multipartRequest = new LinkedMultiValueMap<>();\r
-               String fileName;\r
-               String tmp_folder = "/tmp/";\r
-               String respond = null;\r
-               FileOutputStream fo = null;\r
-               try {\r
-                       mRequest = (MultipartHttpServletRequest) request;\r
-                       MultipartFile mFile = mRequest.getFile("file");\r
-                       fileName = mFile.getOriginalFilename();\r
-                       fo = new FileOutputStream(tmp_folder + fileName);\r
-                       fo.write(mFile.getBytes());\r
-\r
-                       HttpHeaders header = new HttpHeaders();\r
-                       header.setContentType(MediaType.MULTIPART_FORM_DATA);\r
-                       multipartRequest.add("file", new FileSystemResource(tmp_folder + fileName));\r
-                       multipartRequest.add("widget", request.getParameter("newWidget"));\r
-                       respond = template.postForObject(\r
-                                       HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                                       + "/widget/microservices/widgetCatalog/" + widgetId,\r
-                                       new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);\r
-                       File f = new File(tmp_folder + fileName);\r
-                       f.delete();\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "updateWidgetCatalogWithFiles failed", e);\r
-               } finally {\r
-                       try {\r
-                               if (fo != null)\r
-                                       fo.close();\r
-                       } catch (IOException e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "updateWidgetCatalogWithFiles failed 2", e);\r
-                       }\r
-               }\r
-               return respond;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog" }, method = RequestMethod.POST)\r
-       public String createWidgetCatalog(HttpServletRequest request, HttpServletResponse response)\r
-                       throws RestClientException, Exception {\r
-               MultipartHttpServletRequest mRequest;\r
-               MultiValueMap<String, Object> multipartRequest = new LinkedMultiValueMap<>();\r
-               String fileName;\r
-               String tmp_folder = "/tmp/";\r
-               String respond = null;\r
-               FileOutputStream fo = null;\r
-               try {\r
-                       mRequest = (MultipartHttpServletRequest) request;\r
-                       MultipartFile mFile = mRequest.getFile("file");\r
-                       fileName = mFile.getOriginalFilename();\r
-                       fo = new FileOutputStream(tmp_folder + fileName);\r
-                       fo.write(mFile.getBytes());\r
-\r
-                       HttpHeaders header = new HttpHeaders();\r
-                       header.setContentType(MediaType.MULTIPART_FORM_DATA);\r
-                       multipartRequest.add("file", new FileSystemResource(tmp_folder + fileName));\r
-                       multipartRequest.add("widget", request.getParameter("newWidget"));\r
-\r
-                       respond = template.postForObject(\r
-                                       HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                                       + "/widget/microservices/widgetCatalog",\r
-                                       new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);\r
-                       File f = new File(tmp_folder + fileName);\r
-                       f.delete();\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "createWidgetCatalog failed", e);\r
-               } finally {\r
-                       try {\r
-                               if (fo != null)\r
-                                       fo.close();\r
-                       } catch (IOException e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "createWidgetCatalog failed 2", e);\r
-                       }\r
-               }\r
-               return respond;\r
-       }\r
-\r
-       @RequestMapping(value = "/portalApi/microservices/{widgetId}/framework.js", method = RequestMethod.GET)\r
-       public String getWidgetFramework(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               return template.getForObject(HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                               + "/widget/microservices/" + widgetId + "/framework.js", String.class,\r
-                               WidgetServiceHeaders.getInstance());\r
-       }\r
-\r
-       @RequestMapping(value = "/portalApi/microservices/{widgetId}/controller.js", method = RequestMethod.GET)\r
-       public String getWidgetController(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               return template.getForObject(HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                               + "/widget/microservices/" + widgetId + "/controller.js", String.class,\r
-                               WidgetServiceHeaders.getInstance());\r
-       }\r
-\r
-       @RequestMapping(value = "/portalApi/microservices/{widgetId}/style.css", method = RequestMethod.GET)\r
-       public String getWidgetCSS(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               return template.getForObject(HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                               + "/widget/microservices/" + widgetId + "/styles.css", String.class,\r
-                               WidgetServiceHeaders.getInstance());\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/parameters/{widgetId}" }, method = RequestMethod.GET)\r
-       public PortalRestResponse<List<WidgetParameterResult>> getWidgetParameterResult(HttpServletRequest request,\r
-                       HttpServletResponse response, @PathVariable("widgetId") long widgetId) throws Exception {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-\r
-               List<WidgetParameterResult> list = new ArrayList<>();\r
-               Long serviceId = template.exchange(\r
-                               HTTPS + consulHealthService.getServiceLocation(whatService)\r
-                                               + "/widget/microservices/widgetCatalog/parameters/" + widgetId,\r
-                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), Long.class).getBody();\r
-               if (serviceId == null) {\r
-                       // return ok/sucess and no service parameter for this widget\r
-                       return new PortalRestResponse<List<WidgetParameterResult>>(PortalRestStatusEnum.WARN,\r
-                                       "No service parameters for this widget", list);\r
-               } else {\r
-                       List<MicroserviceParameter> defaultParam = microserviceService.getParametersById(serviceId);\r
-                       for (MicroserviceParameter param : defaultParam) {\r
-                               WidgetParameterResult user_result = new WidgetParameterResult();\r
-                               user_result.setParam_id(param.getId());\r
-                               user_result.setDefault_value(param.getPara_value());\r
-                               user_result.setParam_key(param.getPara_key());\r
-                               WidgetCatalogParameter userValue = widgetParameterService.getUserParamById(widgetId, user.getId(),\r
-                                               param.getId());\r
-                               if (userValue == null)\r
-                                       user_result.setUser_value(param.getPara_value());\r
-                               else {\r
-                                       user_result.setUser_value(userValue.getUser_value());\r
-                               }\r
-                               list.add(user_result);\r
-                       }\r
-               }\r
-               return new PortalRestResponse<List<WidgetParameterResult>>(PortalRestStatusEnum.OK, "SUCCESS", list);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/services/{paramId}" }, method = RequestMethod.GET)\r
-       public List<WidgetCatalogParameter> getUserParameterById(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("paramId") long paramId) throws Exception {\r
-               List<WidgetCatalogParameter> list = widgetParameterService.getUserParameterById(paramId);\r
-               return list;\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/services/{paramId}" }, method = RequestMethod.DELETE)\r
-       public void deleteUserParameterById(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("paramId") long paramId) throws Exception {\r
-               widgetParameterService.deleteUserParameterById(paramId);\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/download/{widgetId}" }, method = RequestMethod.GET)\r
-       public void doDownload(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-       \r
-               ServletContext context = request.getServletContext();\r
-               byte[] byteFile = template.exchange(HTTPS + consulHealthService.getServiceLocation(whatService) + "/widget/microservices/download/" + widgetId,\r
-                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), byte[].class).getBody();\r
-               String fileLocation = widgetId + ".zip";\r
-               FileOutputStream stream = new FileOutputStream(fileLocation);\r
-               stream.write(byteFile);\r
-               stream.close();\r
-\r
-               File downloadFile = new File(fileLocation);\r
-               FileInputStream inputStream = new FileInputStream(downloadFile);\r
-               String mimeType = context.getMimeType(downloadFile.getPath());\r
-               if (mimeType == null) {\r
-                       mimeType = "application/octet-stream";\r
-               }\r
-\r
-               response.setContentType(mimeType);\r
-               response.setContentLength((int) downloadFile.length());\r
-               String headerKey = "Content-Disposition";\r
-               String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName());\r
-               downloadFile.delete();\r
-               response.setHeader(headerKey, headerValue);\r
-\r
-               OutputStream outStream = response.getOutputStream();\r
-               byte[] buffer = new byte[32 * 1024];\r
-               int bytesRead = -1;\r
-               while ((bytesRead = inputStream.read(buffer)) != -1) {\r
-                       outStream.write(buffer, 0, bytesRead);\r
-               }\r
-\r
-               inputStream.close();\r
-               outStream.close();\r
-       }\r
-\r
-       @RequestMapping(value = { "/portalApi/microservices/parameters" }, method = RequestMethod.POST)\r
-       public PortalRestResponse<String> saveWidgetParameter(HttpServletRequest request, HttpServletResponse response,\r
-                       @RequestBody WidgetCatalogParameter widgetParameters) throws Exception {\r
-               EPUser user = EPUserUtils.getUserSession(request);\r
-               widgetParameters.setUserId(user.getId());\r
-               try {\r
-                       WidgetCatalogParameter oldParam = widgetParameterService.getUserParamById(widgetParameters.getWidgetId(),\r
-                                       widgetParameters.getUserId(), widgetParameters.getParamId());\r
-                       if (oldParam != null) {\r
-                               widgetParameters.setId(oldParam.getId());\r
-                       }\r
-                       widgetParameterService.saveUserParameter(widgetParameters);\r
-\r
-               } catch (Exception e) {\r
-                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());\r
-               }\r
-               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+import org.openecomp.portalapp.portal.domain.WidgetParameterResult;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalapp.portal.service.WidgetParameterService;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+
+@SuppressWarnings("unchecked")
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class WidgetsCatalogController extends EPRestrictedBaseController {
+
+       private static final String HTTPS = "https://";
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogController.class);
+       RestTemplate template = new RestTemplate();
+       String whatService = "widgets-service";
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       @Autowired
+       private MicroserviceService microserviceService;
+
+       @Autowired
+       private WidgetParameterService widgetParameterService;
+
+       @Bean
+       public CommonsMultipartResolver multipartResolver() {
+               return new CommonsMultipartResolver();
+       }
+
+       static {
+               // for localhost testing only
+               javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
+
+                       public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
+                               if (hostname.equals("localhost")) {
+                                       return true;
+                               }
+                               return false;
+                       }
+               });
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{loginName}" }, method = RequestMethod.GET)
+       public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("loginName") String loginName) throws RestClientException, Exception {
+               List<WidgetCatalog> widgets = new ArrayList<>();
+               try {
+                       ResponseEntity<ArrayList> ans = template.exchange(
+                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                                       SystemProperties.getProperty("microservices.widget.local.port"))
+                                                       + "/widget/microservices/widgetCatalog/" + loginName,
+                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
+                       widgets = ans.getBody();
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getUserWidgetCatalog failed", e);
+                       // returning null because null help check on the UI if there was a
+                       // communication problem with Microservice.
+                       return null;
+               }
+               return widgets;
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog" }, method = RequestMethod.GET)
+       public List<WidgetCatalog> getWidgetCatalog(HttpServletRequest request, HttpServletResponse response)
+                       throws RestClientException, Exception {
+               List<WidgetCatalog> widgets = new ArrayList<>();
+               try {
+                       ResponseEntity<ArrayList> ans = template.exchange(
+                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                                       SystemProperties.getProperty("microservices.widget.local.port"))
+                                                       + "/widget/microservices/widgetCatalog",
+                                       HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
+                       widgets = ans.getBody();
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getWidgetCatalog failed", e);
+                       // returning null because null help check on the UI if there was a
+                       // communication problem with Microservice.
+                       return null;
+               }
+               return widgets;
+       }
+
+       @RequestMapping(value = {
+                       "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.PUT, produces = "application/json")
+       public void updateWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId)
+                       throws RestClientException, Exception {
+               template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/" + widgetId,
+                               HttpMethod.PUT, new HttpEntity(newWidgetCatalog, WidgetServiceHeaders.getInstance()), String.class);
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.DELETE)
+       public void deleteOnboardingWidget(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/" + widgetId,
+                               HttpMethod.DELETE, new HttpEntity(WidgetServiceHeaders.getInstance()), String.class);
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.POST)
+       public String updateWidgetCatalogWithFiles(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               MultipartHttpServletRequest mRequest;
+               MultiValueMap<String, Object> multipartRequest = new LinkedMultiValueMap<>();
+               String fileName;
+               String tmp_folder = "/tmp/";
+               String respond = null;
+               FileOutputStream fo = null;
+               try {
+                       mRequest = (MultipartHttpServletRequest) request;
+                       MultipartFile mFile = mRequest.getFile("file");
+                       fileName = mFile.getOriginalFilename();
+                       fo = new FileOutputStream(tmp_folder + fileName);
+                       fo.write(mFile.getBytes());
+
+                       HttpHeaders header = new HttpHeaders();
+                       header.setContentType(MediaType.MULTIPART_FORM_DATA);
+                       multipartRequest.add("file", new FileSystemResource(tmp_folder + fileName));
+                       multipartRequest.add("widget", request.getParameter("newWidget"));
+                       respond = template.postForObject(
+                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                                       SystemProperties.getProperty("microservices.widget.local.port"))
+                                                       + "/widget/microservices/widgetCatalog/" + widgetId,
+                                       new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
+                       File f = new File(tmp_folder + fileName);
+                       f.delete();
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "updateWidgetCatalogWithFiles failed", e);
+               } finally {
+                       try {
+                               if (fo != null)
+                                       fo.close();
+                       } catch (IOException e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "updateWidgetCatalogWithFiles failed 2", e);
+                       }
+               }
+               return respond;
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/widgetCatalog" }, method = RequestMethod.POST)
+       public String createWidgetCatalog(HttpServletRequest request, HttpServletResponse response)
+                       throws RestClientException, Exception {
+               MultipartHttpServletRequest mRequest;
+               MultiValueMap<String, Object> multipartRequest = new LinkedMultiValueMap<>();
+               String fileName;
+               String tmp_folder = "/tmp/";
+               String respond = null;
+               FileOutputStream fo = null;
+               try {
+                       mRequest = (MultipartHttpServletRequest) request;
+                       MultipartFile mFile = mRequest.getFile("file");
+                       fileName = mFile.getOriginalFilename();
+                       fo = new FileOutputStream(tmp_folder + fileName);
+                       fo.write(mFile.getBytes());
+
+                       HttpHeaders header = new HttpHeaders();
+                       header.setContentType(MediaType.MULTIPART_FORM_DATA);
+                       multipartRequest.add("file", new FileSystemResource(tmp_folder + fileName));
+                       multipartRequest.add("widget", request.getParameter("newWidget"));
+
+                       respond = template.postForObject(
+                                       HTTPS + consulHealthService.getServiceLocation(whatService,
+                                                       SystemProperties.getProperty("microservices.widget.local.port"))
+                                                       + "/widget/microservices/widgetCatalog",
+                                       new HttpEntity<>(multipartRequest, WidgetServiceHeaders.getInstance()), String.class);
+                       File f = new File(tmp_folder + fileName);
+                       f.delete();
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "createWidgetCatalog failed", e);
+               } finally {
+                       try {
+                               if (fo != null)
+                                       fo.close();
+                       } catch (IOException e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "createWidgetCatalog failed 2", e);
+                       }
+               }
+               return respond;
+       }
+
+       @RequestMapping(value = "/portalApi/microservices/{widgetId}/framework.js", method = RequestMethod.GET)
+       public String getWidgetFramework(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               return template.getForObject(HTTPS
+                               + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                               + "/widget/microservices/" + widgetId + "/framework.js", String.class,
+                               WidgetServiceHeaders.getInstance());
+       }
+
+       @RequestMapping(value = "/portalApi/microservices/{widgetId}/controller.js", method = RequestMethod.GET)
+       public String getWidgetController(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               return template.getForObject(HTTPS
+                               + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                               + "/widget/microservices/" + widgetId + "/controller.js", String.class,
+                               WidgetServiceHeaders.getInstance());
+       }
+
+       @RequestMapping(value = "/portalApi/microservices/{widgetId}/style.css", method = RequestMethod.GET)
+       public String getWidgetCSS(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               return template.getForObject(HTTPS
+                               + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                               + "/widget/microservices/" + widgetId + "/styles.css", String.class,
+                               WidgetServiceHeaders.getInstance());
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/parameters/{widgetId}" }, method = RequestMethod.GET)
+       public PortalRestResponse<List<WidgetParameterResult>> getWidgetParameterResult(HttpServletRequest request,
+                       HttpServletResponse response, @PathVariable("widgetId") long widgetId) throws Exception {
+               EPUser user = EPUserUtils.getUserSession(request);
+
+               List<WidgetParameterResult> list = new ArrayList<>();
+               Long serviceId = template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/parameters/" + widgetId,
+                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), Long.class).getBody();
+               if (serviceId == null) {
+                       // return ok/sucess and no service parameter for this widget
+                       return new PortalRestResponse<List<WidgetParameterResult>>(PortalRestStatusEnum.WARN,
+                                       "No service parameters for this widget", list);
+               } else {
+                       List<MicroserviceParameter> defaultParam = microserviceService.getParametersById(serviceId);
+                       for (MicroserviceParameter param : defaultParam) {
+                               WidgetParameterResult user_result = new WidgetParameterResult();
+                               user_result.setParam_id(param.getId());
+                               user_result.setDefault_value(param.getPara_value());
+                               user_result.setParam_key(param.getPara_key());
+                               WidgetCatalogParameter userValue = widgetParameterService.getUserParamById(widgetId, user.getId(),
+                                               param.getId());
+                               if (userValue == null)
+                                       user_result.setUser_value(param.getPara_value());
+                               else {
+                                       user_result.setUser_value(userValue.getUser_value());
+                               }
+                               list.add(user_result);
+                       }
+               }
+               return new PortalRestResponse<List<WidgetParameterResult>>(PortalRestStatusEnum.OK, "SUCCESS", list);
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/services/{paramId}" }, method = RequestMethod.GET)
+       public List<WidgetCatalogParameter> getUserParameterById(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("paramId") long paramId) throws Exception {
+               List<WidgetCatalogParameter> list = widgetParameterService.getUserParameterById(paramId);
+               return list;
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/services/{paramId}" }, method = RequestMethod.DELETE)
+       public void deleteUserParameterById(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("paramId") long paramId) throws Exception {
+               widgetParameterService.deleteUserParameterById(paramId);
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/download/{widgetId}" }, method = RequestMethod.GET)
+       public void doDownload(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+
+               ServletContext context = request.getServletContext();
+               byte[] byteFile = template.exchange(
+                               HTTPS + consulHealthService.getServiceLocation(whatService,
+                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/download/" + widgetId,
+                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), byte[].class).getBody();
+
+               File downloadFile = File.createTempFile("temp", ".zip");
+               FileOutputStream stream = new FileOutputStream(downloadFile.getPath());
+               stream.write(byteFile);
+               stream.close();
+
+               FileInputStream inputStream = new FileInputStream(downloadFile);
+               String mimeType = context.getMimeType(downloadFile.getPath());
+               if (mimeType == null) {
+                       mimeType = "application/octet-stream";
+               }
+
+               response.setContentType(mimeType);
+               response.setContentLength((int) downloadFile.length());
+               String headerKey = "Content-Disposition";
+               String headerValue = String.format("attachment; filename=\"%s\"", downloadFile.getName());
+               downloadFile.delete();
+               response.setHeader(headerKey, headerValue);
+
+               OutputStream outStream = response.getOutputStream();
+               byte[] buffer = new byte[32 * 1024];
+               int bytesRead = -1;
+               while ((bytesRead = inputStream.read(buffer)) != -1) {
+                       outStream.write(buffer, 0, bytesRead);
+               }
+
+               inputStream.close();
+               outStream.close();
+       }
+
+       @RequestMapping(value = { "/portalApi/microservices/parameters" }, method = RequestMethod.POST)
+       public PortalRestResponse<String> saveWidgetParameter(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody WidgetCatalogParameter widgetParameters) throws Exception {
+               EPUser user = EPUserUtils.getUserSession(request);
+               widgetParameters.setUserId(user.getId());
+               try {
+                       WidgetCatalogParameter oldParam = widgetParameterService.getUserParamById(widgetParameters.getWidgetId(),
+                                       widgetParameters.getUserId(), widgetParameters.getParamId());
+                       if (oldParam != null) {
+                               widgetParameters.setId(oldParam.getId());
+                       }
+                       widgetParameterService.saveUserParameter(widgetParameters);
+
+               } catch (Exception e) {
+                       return new PortalRestResponse<String>(PortalRestStatusEnum.ERROR, "FAILURE", e.getMessage());
+               }
+               return new PortalRestResponse<String>(PortalRestStatusEnum.OK, "SUCCESS", "");
+       }
+
+}
index 78499ef..b0bc9fc 100644 (file)
@@ -1,83 +1,86 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.web.bind.annotation.PathVariable;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.bind.annotation.RestController;\r
-import org.springframework.web.client.RestClientException;\r
-import org.springframework.web.client.RestTemplate;\r
-import org.springframework.web.multipart.commons.CommonsMultipartResolver;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;\r
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.service.ConsulHealthService;\r
-\r
-@SuppressWarnings("unchecked")\r
-@RestController\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPAuditLog\r
-public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController {\r
-       \r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogMarkupController.class);\r
-       RestTemplate template = new RestTemplate();\r
-       String whatService = "widgets-service";\r
-\r
-       \r
-       @Autowired\r
-       private ConsulHealthService consulHealthService;\r
-\r
-       @Bean\r
-       public CommonsMultipartResolver multipartResolver() {\r
-               return new CommonsMultipartResolver();\r
-       }\r
-       \r
-       static {\r
-           //for localhost testing only\r
-           javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(\r
-           new javax.net.ssl.HostnameVerifier(){\r
-\r
-               public boolean verify(String hostname,\r
-                       javax.net.ssl.SSLSession sslSession) {\r
-                   if (hostname.equals("localhost")) {\r
-                       return true;\r
-                   }\r
-                   return false;\r
-               }\r
-           });\r
-       }       \r
-\r
-\r
-       @RequestMapping(value = "/portalApi/microservices/markup/{widgetId}", method = RequestMethod.GET)\r
-       public String getWidgetMarkup(HttpServletRequest request, HttpServletResponse response,\r
-                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {\r
-               return template.getForObject("https://" + consulHealthService.getServiceLocation(whatService) + "/widget/microservices/markup/" + widgetId, String.class,\r
-                               WidgetServiceHeaders.getInstance());\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.controller.EPUnRestrictedBaseController;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+
+@RestController
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class WidgetsCatalogMarkupController extends EPUnRestrictedBaseController {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetsCatalogMarkupController.class);
+
+       private RestTemplate template = new RestTemplate();
+
+       private final String whatService = "widgets-service";
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       @Bean
+       public CommonsMultipartResolver multipartResolver() {
+               return new CommonsMultipartResolver();
+       }
+
+       static {
+               // for localhost testing only
+               javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new javax.net.ssl.HostnameVerifier() {
+
+                       public boolean verify(String hostname, javax.net.ssl.SSLSession sslSession) {
+                               if (hostname.equals("localhost")) {
+                                       return true;
+                               }
+                               return false;
+                       }
+               });
+       }
+
+       @RequestMapping(value = "/portalApi/microservices/markup/{widgetId}", method = RequestMethod.GET)
+       public String getWidgetMarkup(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId) throws RestClientException, Exception {
+               return template
+                               .getForObject(
+                                               "https://"
+                                                               + consulHealthService.getServiceLocation(whatService,
+                                                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                                               + "/widget/microservices/markup/" + widgetId,
+                                               String.class, WidgetServiceHeaders.getInstance());
+       }
+}
index 2106851..794f26c 100644 (file)
@@ -1,62 +1,62 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-\r
-//@Entity\r
-//@Table(name = "FN_APP")\r
-public class App implements Serializable{\r
-       \r
-       private static final long serialVersionUID = 1L;\r
-\r
-       //@Id\r
-       //@Column(name = "APP_ID")\r
-       //@GeneratedValue(strategy=GenerationType.AUTO)\r
-       private Long appId;\r
-       \r
-       //@Column(name = "APP_Name")\r
-       private String appName;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-       \r
-\r
-       \r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+//@Entity
+//@Table(name = "FN_APP")
+public class App implements Serializable{
+       
+       private static final long serialVersionUID = 1L;
+
+       //@Id
+       //@Column(name = "APP_ID")
+       //@GeneratedValue(strategy=GenerationType.AUTO)
+       private Long appId;
+       
+       //@Column(name = "APP_Name")
+       private String appName;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+       
+
+       
+
+}
index d399c82..be3baa0 100644 (file)
@@ -1,86 +1,86 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * Models rows in the fn_app_contact_us table added for 1610.1.\r
- */\r
-public class AppContactUs extends DomainVo {\r
-\r
-       private static final long serialVersionUID = -2742197830465055134L;\r
-\r
-       private EPApp app;\r
-       private String description;\r
-       private String contactEmail;\r
-       private String contactName;\r
-       private String url;\r
-       private String activeYN;\r
-\r
-       public EPApp getApp() {\r
-               return app;\r
-       }\r
-\r
-       public void setApp(EPApp app) {\r
-               this.app = app;\r
-       }\r
-\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-\r
-       public String getContactEmail() {\r
-               return contactEmail;\r
-       }\r
-\r
-       public void setContactEmail(String contactEmail) {\r
-               this.contactEmail = contactEmail;\r
-       }\r
-\r
-       public String getContactName() {\r
-               return contactName;\r
-       }\r
-\r
-       public void setContactName(String contactName) {\r
-               this.contactName = contactName;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public String getActiveYN() {\r
-               return activeYN;\r
-       }\r
-\r
-       public void setActiveYN(String activeYN) {\r
-               this.activeYN = activeYN;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * Models rows in the fn_app_contact_us table added for 1610.1.
+ */
+public class AppContactUs extends DomainVo {
+
+       private static final long serialVersionUID = -2742197830465055134L;
+
+       private EPApp app;
+       private String description;
+       private String contactEmail;
+       private String contactName;
+       private String url;
+       private String activeYN;
+
+       public EPApp getApp() {
+               return app;
+       }
+
+       public void setApp(EPApp app) {
+               this.app = app;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getContactEmail() {
+               return contactEmail;
+       }
+
+       public void setContactEmail(String contactEmail) {
+               this.contactEmail = contactEmail;
+       }
+
+       public String getContactName() {
+               return contactName;
+       }
+
+       public void setContactName(String contactName) {
+               this.contactName = contactName;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getActiveYN() {
+               return activeYN;
+       }
+
+       public void setActiveYN(String activeYN) {
+               this.activeYN = activeYN;
+       }
+
+}
index 1440973..3efa26a 100644 (file)
@@ -1,63 +1,63 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-@Entity\r
-public class AppIdAndNameTransportModel implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name="APP_ID")\r
-       private Long id;\r
-       \r
-       @Column(name="APP_NAME")\r
-       private String name;\r
-\r
-       @Column(name="APP_TYPE")\r
-       private Integer appType;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-       \r
-       public Boolean isRestrictedApp() {\r
-               return (this.appType == 2 ? true : false);\r
-       }\r
-\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class AppIdAndNameTransportModel implements Serializable{
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name="APP_ID")
+       private Long id;
+       
+       @Column(name="APP_NAME")
+       private String name;
+
+       @Column(name="APP_TYPE")
+       private Integer appType;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       public Boolean isRestrictedApp() {
+               return (this.appType == 2 ? true : false);
+       }
+
+
+}
index 4935a22..05fc5fe 100644 (file)
@@ -1,76 +1,76 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-public class AppsResponse {\r
-       \r
-       public AppsResponse(Long id, String name, Boolean restrictedApp, Boolean enabled) {\r
-               this.index = id;\r
-               this.title = this.value = name;\r
-               this.restrictedApp = restrictedApp;\r
-               this.enabled = enabled;\r
-       }\r
-\r
-       public Long getIndex() {\r
-               return index;\r
-       }\r
-\r
-       public void setIndex(Long index) {\r
-               this.index = index;\r
-       }\r
-\r
-       public String getTitle() {\r
-               return title;\r
-       }\r
-\r
-       public void setTitle(String title) {\r
-               this.title = title;\r
-       }\r
-\r
-       public String getValue() {\r
-               return value;\r
-       }\r
-\r
-       public void setValue(String value) {\r
-               this.value = value;\r
-       }\r
-\r
-       // Hide the implementation of restricted and normal app from the front end.\r
-       // The json sent and received will include restrictedApp but not appType.\r
-       \r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-       \r
-       public Boolean getEnabled() {\r
-               return enabled;\r
-       }\r
-       \r
-       public void setEnabled(Boolean enabled) {\r
-               this.enabled = enabled;\r
-       }\r
-\r
-       private Long index;\r
-       private String title;\r
-       private String value;\r
-       public Boolean restrictedApp;\r
-       public Boolean enabled;\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+public class AppsResponse {
+       
+       public AppsResponse(Long id, String name, Boolean restrictedApp, Boolean enabled) {
+               this.index = id;
+               this.title = this.value = name;
+               this.restrictedApp = restrictedApp;
+               this.enabled = enabled;
+       }
+
+       public Long getIndex() {
+               return index;
+       }
+
+       public void setIndex(Long index) {
+               this.index = index;
+       }
+
+       public String getTitle() {
+               return title;
+       }
+
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+       public String getValue() {
+               return value;
+       }
+
+       public void setValue(String value) {
+               this.value = value;
+       }
+
+       // Hide the implementation of restricted and normal app from the front end.
+       // The json sent and received will include restrictedApp but not appType.
+       
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+       
+       public Boolean getEnabled() {
+               return enabled;
+       }
+       
+       public void setEnabled(Boolean enabled) {
+               this.enabled = enabled;
+       }
+
+       private Long index;
+       private String title;
+       private String value;
+       public Boolean restrictedApp;
+       public Boolean enabled;
+
+}
index e877641..a5b5c0c 100644 (file)
@@ -1,43 +1,78 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-public class BEProperty {\r
-       private String key;\r
-       private String value;\r
-       \r
-       public BEProperty(String key, String value){\r
-               this.key = key;\r
-               this.value = value;\r
-       }\r
-       \r
-       public String getKey() {\r
-               return key;\r
-       }\r
-       public void setKey(String key) {\r
-               this.key = key;\r
-       }\r
-       public String getValue() {\r
-               return value;\r
-       }\r
-       public void setValue(String value) {\r
-               this.value = value;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+public class BEProperty {
+       private String key;
+       private String value;
+
+       public BEProperty(String key, String value) {
+               this.key = key;
+               this.value = value;
+       }
+
+       public String getKey() {
+               return key;
+       }
+
+       public void setKey(String key) {
+               this.key = key;
+       }
+
+       public String getValue() {
+               return value;
+       }
+
+       public void setValue(String value) {
+               this.value = value;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((key == null) ? 0 : key.hashCode());
+               result = prime * result + ((value == null) ? 0 : value.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               BEProperty other = (BEProperty) obj;
+               if (key == null) {
+                       if (other.key != null)
+                               return false;
+               } else if (!key.equals(other.key))
+                       return false;
+               if (value == null) {
+                       if (other.value != null)
+                               return false;
+               } else if (!value.equals(other.value))
+                       return false;
+               return true;
+       }
+
+}
index 1ba9e2d..b0cd13b 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import javax.persistence.Lob;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * Model for all columns in the fn_app table.\r
- */\r
-public class EPApp extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       private String name;\r
-       private String imageUrl;\r
-       private String description;\r
-       private String notes;\r
-       private String url;\r
-       private String alternateUrl;\r
-       private String appRestEndpoint;\r
-       private String mlAppName;\r
-       private String mlAppAdminId;\r
-       private Long motsId;\r
-       private String username;\r
-       private String appPassword;\r
-       @Lob\r
-       private byte[] thumbnail;\r
-       private Boolean open;\r
-       private Boolean enabled;\r
-       private String uebTopicName;\r
-       private String uebKey;\r
-       private String uebSecret;\r
-       private Integer appType;\r
-\r
-       private AppContactUs contactUs;\r
-\r
-       public EPApp() {\r
-               // Attention!!!\r
-               // We set here all default values. We also place protection\r
-               // into setters for fields with default values.\r
-               // If we don't use such protection we are able to place null\r
-               // to these fields and save such fields into DB even if DB has\r
-               // default values for these fields.\r
-               this.name = "";\r
-               this.mlAppName = "";\r
-               this.mlAppAdminId = "";\r
-               this.username = "";\r
-               this.appPassword = "";\r
-               this.open = new Boolean(false);\r
-               this.enabled = new Boolean(true);\r
-               this.uebTopicName = "";\r
-               this.uebKey = "";\r
-               this.uebSecret = "";\r
-               this.appType = 1;\r
-       }\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               if (StringUtils.isEmpty(name)) {\r
-                       name = "";\r
-               }\r
-               this.name = name;\r
-       }\r
-\r
-       public String getImageUrl() {\r
-               return imageUrl;\r
-       }\r
-\r
-       public void setImageUrl(String imageUrl) {\r
-               this.imageUrl = imageUrl;\r
-       }\r
-\r
-       public byte[] getThumbnail() {\r
-               return this.thumbnail;\r
-       }\r
-\r
-       public void setThumbnail(byte[] thumbnail) {\r
-               this.thumbnail = thumbnail;\r
-       }\r
-\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-\r
-       public String getNotes() {\r
-               return notes;\r
-       }\r
-\r
-       public void setNotes(String notes) {\r
-               this.notes = notes;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public String getAlternateUrl() {\r
-               return alternateUrl;\r
-       }\r
-\r
-       public void setAlternateUrl(String alternateUrl) {\r
-               this.alternateUrl = alternateUrl;\r
-       }\r
-\r
-       public String getAppRestEndpoint() {\r
-               return appRestEndpoint;\r
-       }\r
-\r
-       public void setAppRestEndpoint(String appRestEndpoint) {\r
-               this.appRestEndpoint = appRestEndpoint;\r
-       }\r
-\r
-       public String getMlAppName() {\r
-               return mlAppName;\r
-       }\r
-\r
-       public void setMlAppName(String mlAppName) {\r
-               if (StringUtils.isEmpty(mlAppName)) {\r
-                       mlAppName = "";\r
-               }\r
-               this.mlAppName = mlAppName;\r
-       }\r
-\r
-       public String getMlAppAdminId() {\r
-               return mlAppAdminId;\r
-       }\r
-\r
-       public void setMlAppAdminId(String mlAppAdminId) {\r
-               if (StringUtils.isEmpty(mlAppAdminId)) {\r
-                       mlAppAdminId = "";\r
-               }\r
-               this.mlAppAdminId = mlAppAdminId;\r
-       }\r
-\r
-       public Long getMotsId() {\r
-               return motsId;\r
-       }\r
-\r
-       public void setMotsId(Long motsId) {\r
-               this.motsId = motsId;\r
-       }\r
-\r
-       public String getUsername() {\r
-               return username;\r
-       }\r
-\r
-       public void setUsername(String username) {\r
-               this.username = username;\r
-       }\r
-\r
-       public String getAppPassword() {\r
-               return appPassword;\r
-       }\r
-\r
-       public void setAppPassword(String appPassword) {\r
-               if (StringUtils.isEmpty(appPassword)) {\r
-                       appPassword = "";\r
-               }\r
-               this.appPassword = appPassword;\r
-       }\r
-\r
-       public Boolean getOpen() {\r
-               return open;\r
-       }\r
-\r
-       public void setOpen(Boolean open) {\r
-               if (open == null) {\r
-                       open = new Boolean(false);\r
-               }\r
-               this.open = open;\r
-       }\r
-\r
-       public Boolean getEnabled() {\r
-               return enabled;\r
-       }\r
-\r
-       public void setEnabled(Boolean enabled) {\r
-               if (enabled == null) {\r
-                       enabled = new Boolean(true);\r
-               }\r
-               this.enabled = enabled;\r
-       }\r
-\r
-       public Integer getAppType() {\r
-               return appType;\r
-       }\r
-\r
-       public void setAppType(Integer appType) {\r
-               if (appType == null) {\r
-                       appType = new Integer(1);\r
-               }\r
-               this.appType = appType;\r
-       }\r
-\r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               Integer result = 1;\r
-               if (restrictedApp) {\r
-                       result = 2;\r
-               }\r
-               this.appType = result;\r
-       }\r
-\r
-       public Boolean isRestrictedApp() {\r
-               return (this.appType == 2 ? true : false);\r
-       }\r
-\r
-       public int compareTo(Object obj) {\r
-               Long c1 = getId();\r
-               Long c2 = ((EPApp) obj).getId();\r
-\r
-               return c1.compareTo(c2);\r
-       }\r
-\r
-       public String getUebTopicName() {\r
-               return this.uebTopicName;\r
-       }\r
-\r
-       public void setUebTopicName(String topicName) {\r
-               if (StringUtils.isEmpty(topicName)) {\r
-                       this.uebTopicName = "";\r
-               }\r
-               this.uebTopicName = topicName;\r
-       }\r
-\r
-       public String getUebKey() {\r
-               return this.uebKey;\r
-       }\r
-\r
-       public void setUebKey(String uebKey) {\r
-               if (StringUtils.isEmpty(uebKey)) {\r
-                       this.uebKey = "";\r
-               }\r
-               this.uebKey = uebKey;\r
-       }\r
-\r
-       public String getUebSecret() {\r
-               return this.uebSecret;\r
-       }\r
-\r
-       public void setUebSecret(String uebSecret) {\r
-               if (StringUtils.isEmpty(uebSecret)) {\r
-                       this.uebSecret = "";\r
-               }\r
-               this.uebSecret = uebSecret;\r
-       }\r
-\r
-       public AppContactUs getContactUs() {\r
-               return contactUs;\r
-       }\r
-\r
-       public void setContactUs(AppContactUs contactUs) {\r
-               this.contactUs = contactUs;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               String str = "[" + getId() + ":" + getName() + "]";\r
-               return str;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import javax.persistence.Lob;
+
+import org.apache.commons.lang.StringUtils;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * Model for all columns in the fn_app table.
+ */
+public class EPApp extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+
+       private String name;
+       private String imageUrl;
+       private String description;
+       private String notes;
+       private String url;
+       private String alternateUrl;
+       private String appRestEndpoint;
+       private String mlAppName;
+       private String mlAppAdminId;
+       private Long motsId;
+       private String username;
+       private String appPassword;
+       @Lob
+       private byte[] thumbnail;
+       private Boolean open;
+       private Boolean enabled;
+       private String uebTopicName;
+       private String uebKey;
+       private String uebSecret;
+       private Integer appType;
+
+       private AppContactUs contactUs;
+
+       public EPApp() {
+               // Attention!!!
+               // We set here all default values. We also place protection
+               // into setters for fields with default values.
+               // If we don't use such protection we are able to place null
+               // to these fields and save such fields into DB even if DB has
+               // default values for these fields.
+               this.name = "";
+               this.mlAppName = "";
+               this.mlAppAdminId = "";
+               this.username = "";
+               this.appPassword = "";
+               this.open = new Boolean(false);
+               this.enabled = new Boolean(true);
+               this.uebTopicName = "";
+               this.uebKey = "";
+               this.uebSecret = "";
+               this.appType = 1;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               if (StringUtils.isEmpty(name)) {
+                       name = "";
+               }
+               this.name = name;
+       }
+
+       public String getImageUrl() {
+               return imageUrl;
+       }
+
+       public void setImageUrl(String imageUrl) {
+               this.imageUrl = imageUrl;
+       }
+
+       public byte[] getThumbnail() {
+               return this.thumbnail;
+       }
+
+       public void setThumbnail(byte[] thumbnail) {
+               this.thumbnail = thumbnail;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getNotes() {
+               return notes;
+       }
+
+       public void setNotes(String notes) {
+               this.notes = notes;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getAlternateUrl() {
+               return alternateUrl;
+       }
+
+       public void setAlternateUrl(String alternateUrl) {
+               this.alternateUrl = alternateUrl;
+       }
+
+       public String getAppRestEndpoint() {
+               return appRestEndpoint;
+       }
+
+       public void setAppRestEndpoint(String appRestEndpoint) {
+               this.appRestEndpoint = appRestEndpoint;
+       }
+
+       public String getMlAppName() {
+               return mlAppName;
+       }
+
+       public void setMlAppName(String mlAppName) {
+               if (StringUtils.isEmpty(mlAppName)) {
+                       mlAppName = "";
+               }
+               this.mlAppName = mlAppName;
+       }
+
+       public String getMlAppAdminId() {
+               return mlAppAdminId;
+       }
+
+       public void setMlAppAdminId(String mlAppAdminId) {
+               if (StringUtils.isEmpty(mlAppAdminId)) {
+                       mlAppAdminId = "";
+               }
+               this.mlAppAdminId = mlAppAdminId;
+       }
+
+       public Long getMotsId() {
+               return motsId;
+       }
+
+       public void setMotsId(Long motsId) {
+               this.motsId = motsId;
+       }
+
+       public String getUsername() {
+               return username;
+       }
+
+       public void setUsername(String username) {
+               this.username = username;
+       }
+
+       public String getAppPassword() {
+               return appPassword;
+       }
+
+       public void setAppPassword(String appPassword) {
+               if (StringUtils.isEmpty(appPassword)) {
+                       appPassword = "";
+               }
+               this.appPassword = appPassword;
+       }
+
+       public Boolean getOpen() {
+               return open;
+       }
+
+       public void setOpen(Boolean open) {
+               if (open == null) {
+                       open = new Boolean(false);
+               }
+               this.open = open;
+       }
+
+       public Boolean getEnabled() {
+               return enabled;
+       }
+
+       public void setEnabled(Boolean enabled) {
+               if (enabled == null) {
+                       enabled = new Boolean(true);
+               }
+               this.enabled = enabled;
+       }
+
+       public Integer getAppType() {
+               return appType;
+       }
+
+       public void setAppType(Integer appType) {
+               if (appType == null) {
+                       appType = new Integer(1);
+               }
+               this.appType = appType;
+       }
+
+       public void setRestrictedApp(Boolean restrictedApp) {
+               Integer result = 1;
+               if (restrictedApp) {
+                       result = 2;
+               }
+               this.appType = result;
+       }
+
+       public Boolean isRestrictedApp() {
+               return (this.appType == 2 ? true : false);
+       }
+
+       public int compareTo(Object obj) {
+               Long c1 = getId();
+               Long c2 = ((EPApp) obj).getId();
+
+               return c1.compareTo(c2);
+       }
+
+       public String getUebTopicName() {
+               return this.uebTopicName;
+       }
+
+       public void setUebTopicName(String topicName) {
+               if (StringUtils.isEmpty(topicName)) {
+                       this.uebTopicName = "";
+               }
+               this.uebTopicName = topicName;
+       }
+
+       public String getUebKey() {
+               return this.uebKey;
+       }
+
+       public void setUebKey(String uebKey) {
+               if (StringUtils.isEmpty(uebKey)) {
+                       this.uebKey = "";
+               }
+               this.uebKey = uebKey;
+       }
+
+       public String getUebSecret() {
+               return this.uebSecret;
+       }
+
+       public void setUebSecret(String uebSecret) {
+               if (StringUtils.isEmpty(uebSecret)) {
+                       this.uebSecret = "";
+               }
+               this.uebSecret = uebSecret;
+       }
+
+       public AppContactUs getContactUs() {
+               return contactUs;
+       }
+
+       public void setContactUs(AppContactUs contactUs) {
+               this.contactUs = contactUs;
+       }
+
+       @Override
+       public String toString() {
+               String str = "[" + getId() + ":" + getName() + "]";
+               return str;
+       }
+
+}
index ea70982..a1e4457 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.Iterator;\r
-import java.util.SortedSet;\r
-import java.util.TreeSet;\r
-\r
-import org.openecomp.portalsdk.core.domain.RoleFunction;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonIgnore;\r
-\r
-public class EPRole extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-       private String  name;\r
-    private boolean active;\r
-    private Integer priority;\r
-    \r
-    // ECOMP will identify the specific remote application role id by appID;appRoleId among all the application roles it persists.\r
-    private Long appId;     // used by ECOMP only \r
-    private Long appRoleId; // used by ECOMP only\r
-\r
-    private SortedSet<RoleFunction>     roleFunctions = new TreeSet<RoleFunction>();\r
-    \r
-    private SortedSet<EPRole> childRoles = new TreeSet<EPRole>();\r
-    \r
-    @JsonIgnore\r
-    private SortedSet<EPRole> parentRoles = new TreeSet<EPRole>();\r
-\r
-    public EPRole() {}\r
-\r
-    public String getName() {\r
-        return name;\r
-    }\r
-\r
-    public boolean getActive() {\r
-        return active;\r
-    }\r
-\r
-    public SortedSet<RoleFunction> getRoleFunctions() {\r
-        return roleFunctions;\r
-    }\r
-\r
-    public Integer getPriority() {\r
-        return priority;\r
-    }\r
-\r
-    public SortedSet<EPRole> getChildRoles() {\r
-        return childRoles;\r
-    }\r
-\r
-    public SortedSet<EPRole> getParentRoles() {\r
-        return parentRoles;\r
-    }\r
-\r
-    public void setName(String name) {\r
-        this.name = name;\r
-    }\r
-\r
-    public void setActive(boolean active) {\r
-        this.active = active;\r
-    }\r
-\r
-    public void setRoleFunctions(SortedSet<RoleFunction> roleFunctions) {\r
-        this.roleFunctions = roleFunctions;\r
-    }\r
-\r
-    public void setPriority(Integer priority) {\r
-        this.priority = priority;\r
-    }\r
-\r
-    public void setChildRoles(SortedSet<EPRole> childRoles) {\r
-        this.childRoles = childRoles;\r
-    }\r
-\r
-    public void setParentRoles(SortedSet<EPRole> parentRoles) {\r
-        this.parentRoles = parentRoles;\r
-    }\r
-\r
-    public void addRoleFunction(RoleFunction roleFunction) {\r
-        this.roleFunctions.add(roleFunction);\r
-    }\r
-\r
-    public void addChildRole(EPRole role) {\r
-        this.childRoles.add(role);\r
-    }\r
-\r
-    public void addParentRole(EPRole role) {\r
-        this.parentRoles.add(role);\r
-    }\r
-\r
-    public String getEditUrl() {\r
-        return "/role.htm?role_id=" + getId();         \r
-    }\r
-    \r
-       public String getToggleActiveImage() {\r
-               return "/static/fusion/images/" + (getActive() ? "active.png" : "inactive.png" );\r
-       }\r
-\r
-       public String getToggleActiveAltText() {\r
-               return getActive() ? "Click to Deactivate Role" : "Click to Activate Role";\r
-       }\r
-    \r
-    public void removeChildRole(Long roleId) {\r
-      Iterator<EPRole> i = this.childRoles.iterator();\r
-\r
-      while (i.hasNext()) {\r
-        EPRole childRole = (EPRole)i.next();\r
-        if (childRole.getId().equals(roleId)) {\r
-          this.childRoles.remove(childRole);\r
-          break;\r
-        }\r
-      }\r
-    }\r
-\r
-    public void removeParentRole(Long roleId) {\r
-        Iterator<EPRole> i = this.parentRoles.iterator();\r
-\r
-        while (i.hasNext()) {\r
-          EPRole parentRole = (EPRole)i.next();\r
-          if (parentRole.getId().equals(roleId)) {\r
-            this.parentRoles.remove(parentRole);\r
-            break;\r
-          }\r
-        }\r
-      }\r
-\r
-    public void removeRoleFunction(String roleFunctionCd) {\r
-      Iterator<RoleFunction> i = this.roleFunctions.iterator();\r
-\r
-      while (i.hasNext()) {\r
-        RoleFunction roleFunction = (RoleFunction)i.next();\r
-        if (roleFunction.getCode().equals(roleFunctionCd)) {\r
-          this.roleFunctions.remove(roleFunction);\r
-          break;\r
-        }\r
-      }\r
-    }\r
-\r
-    public int compareTo(Object obj){\r
-       EPRole other = (EPRole)obj;\r
-\r
-       if(this.appId == null)\r
-               if(other.getAppId() == null)\r
-                       return compareByName(other); //equal\r
-               else\r
-                       return -1; \r
-       else // this.appId != null\r
-               if(other.getAppId() == null)\r
-                       return 1;  // appId != null, but others is null\r
-               else{\r
-                       int appIdCompareResult = appId.compareTo(other.getAppId());\r
-                       return appIdCompareResult == 0? compareByName(other) : appIdCompareResult;\r
-               }\r
-    }\r
-\r
-       private int compareByName(EPRole other) {\r
-               String c1 = getName();\r
-       String c2 = other.getName();\r
-\r
-       return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);\r
-       }\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public Long getAppRoleId() {\r
-               return appRoleId;\r
-       }\r
-\r
-       public void setAppRoleId(Long appRoleId) {\r
-               this.appRoleId = appRoleId;\r
-       }\r
-       \r
-       @Override\r
-       public String toString() {\r
-               return "[Id = " + id + ", name = " + name + "]";\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.Iterator;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public class EPRole extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+       private String  name;
+    private boolean active;
+    private Integer priority;
+    
+    // ECOMP will identify the specific remote application role id by appID;appRoleId among all the application roles it persists.
+    private Long appId;     // used by ECOMP only 
+    private Long appRoleId; // used by ECOMP only
+
+    private SortedSet<RoleFunction>     roleFunctions = new TreeSet<RoleFunction>();
+    
+    private SortedSet<EPRole> childRoles = new TreeSet<EPRole>();
+    
+    @JsonIgnore
+    private SortedSet<EPRole> parentRoles = new TreeSet<EPRole>();
+
+    public EPRole() {}
+
+    public String getName() {
+        return name;
+    }
+
+    public boolean getActive() {
+        return active;
+    }
+
+    public SortedSet<RoleFunction> getRoleFunctions() {
+        return roleFunctions;
+    }
+
+    public Integer getPriority() {
+        return priority;
+    }
+
+    public SortedSet<EPRole> getChildRoles() {
+        return childRoles;
+    }
+
+    public SortedSet<EPRole> getParentRoles() {
+        return parentRoles;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setActive(boolean active) {
+        this.active = active;
+    }
+
+    public void setRoleFunctions(SortedSet<RoleFunction> roleFunctions) {
+        this.roleFunctions = roleFunctions;
+    }
+
+    public void setPriority(Integer priority) {
+        this.priority = priority;
+    }
+
+    public void setChildRoles(SortedSet<EPRole> childRoles) {
+        this.childRoles = childRoles;
+    }
+
+    public void setParentRoles(SortedSet<EPRole> parentRoles) {
+        this.parentRoles = parentRoles;
+    }
+
+    public void addRoleFunction(RoleFunction roleFunction) {
+        this.roleFunctions.add(roleFunction);
+    }
+
+    public void addChildRole(EPRole role) {
+        this.childRoles.add(role);
+    }
+
+    public void addParentRole(EPRole role) {
+        this.parentRoles.add(role);
+    }
+
+    public String getEditUrl() {
+        return "/role.htm?role_id=" + getId();         
+    }
+    
+       public String getToggleActiveImage() {
+               return "/static/fusion/images/" + (getActive() ? "active.png" : "inactive.png" );
+       }
+
+       public String getToggleActiveAltText() {
+               return getActive() ? "Click to Deactivate Role" : "Click to Activate Role";
+       }
+    
+    public void removeChildRole(Long roleId) {
+      Iterator<EPRole> i = this.childRoles.iterator();
+
+      while (i.hasNext()) {
+        EPRole childRole = (EPRole)i.next();
+        if (childRole.getId().equals(roleId)) {
+          this.childRoles.remove(childRole);
+          break;
+        }
+      }
+    }
+
+    public void removeParentRole(Long roleId) {
+        Iterator<EPRole> i = this.parentRoles.iterator();
+
+        while (i.hasNext()) {
+          EPRole parentRole = (EPRole)i.next();
+          if (parentRole.getId().equals(roleId)) {
+            this.parentRoles.remove(parentRole);
+            break;
+          }
+        }
+      }
+
+    public void removeRoleFunction(String roleFunctionCd) {
+      Iterator<RoleFunction> i = this.roleFunctions.iterator();
+
+      while (i.hasNext()) {
+        RoleFunction roleFunction = (RoleFunction)i.next();
+        if (roleFunction.getCode().equals(roleFunctionCd)) {
+          this.roleFunctions.remove(roleFunction);
+          break;
+        }
+      }
+    }
+
+    public int compareTo(Object obj){
+       EPRole other = (EPRole)obj;
+
+       if(this.appId == null)
+               if(other.getAppId() == null)
+                       return compareByName(other); //equal
+               else
+                       return -1; 
+       else // this.appId != null
+               if(other.getAppId() == null)
+                       return 1;  // appId != null, but others is null
+               else{
+                       int appIdCompareResult = appId.compareTo(other.getAppId());
+                       return appIdCompareResult == 0? compareByName(other) : appIdCompareResult;
+               }
+    }
+
+       private int compareByName(EPRole other) {
+               String c1 = getName();
+       String c2 = other.getName();
+
+       return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public Long getAppRoleId() {
+               return appRoleId;
+       }
+
+       public void setAppRoleId(Long appRoleId) {
+               this.appRoleId = appRoleId;
+       }
+       
+       @Override
+       public String toString() {
+               return "[Id = " + id + ", name = " + name + "]";
+       }
+}
index 9ed62d8..005d532 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-\r
-@SuppressWarnings("rawtypes")\r
-public class EPUserApp implements java.io.Serializable, Comparable {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-       \r
-       private Long userId;\r
-       private EPApp app;\r
-       private EPRole role;\r
-       private Short priority;\r
-       \r
-       public EPUserApp() {\r
-       }\r
-       \r
-       public Long getAppId() {\r
-               return this.getApp().getId();\r
-       }\r
-       \r
-       public Long getRoleId() {\r
-               return (role == null) ? null : role.getId();\r
-       }\r
-       \r
-       public Long getAppRoleId() {\r
-               return (role.getAppRoleId() == null) ? null : role.getAppRoleId();\r
-       }\r
-               \r
-       @Override \r
-       public String toString() {\r
-               String str = "[u: "+getUserId()+"; a: "+getAppId()+", r: "+getRoleId()+"; appRoleId: "+getAppRoleId()+"]";\r
-               return str;\r
-       }\r
-       \r
-       public Long getUserId() {\r
-               return userId;\r
-       }\r
-\r
-       public void setUserId(Long id) {\r
-               this.userId = id;\r
-       }\r
-\r
-       public EPApp getApp() {\r
-               return app;\r
-       }\r
-\r
-       public void setApp(EPApp app) {\r
-               this.app = app;\r
-       }\r
-\r
-       public EPRole getRole() {\r
-               return role;\r
-       }\r
-\r
-       public void setRole(EPRole role) {\r
-               this.role = role;\r
-       }\r
-               \r
-       public Short getPriority() {\r
-               return this.priority;\r
-       }\r
-\r
-       public void setPriority(Short priority) {\r
-               this.priority = priority;\r
-       }\r
-\r
-       public boolean equals(Object other) {\r
-               if ((this == other))\r
-                       return true;\r
-               if ((other == null))\r
-                       return false;\r
-               if (!(other instanceof EPUserApp))\r
-                       return false;\r
-               EPUserApp castOther = (EPUserApp) other;\r
-\r
-               return (this.getUserId().equals(castOther.getUserId()))\r
-                               && (this.getApp().getId().equals(castOther.getApp().getId()))\r
-                               && (this.getRole().getId().equals(castOther.getRole().getId()))\r
-                               && ((this.priority==null && castOther.getPriority()==null) || this.getPriority().equals(castOther.getPriority()));\r
-       }\r
-\r
-       public int hashCode() {\r
-               int result = 17;\r
-\r
-               result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue());\r
-               result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue());\r
-               result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue());\r
-               result = 37 * result + (int) (this.priority==null ? 0 : this.priority);\r
-               return result;\r
-       }\r
-\r
-       public int compareTo(Object other){\r
-           EPUserApp castOther = (EPUserApp) other;\r
-\r
-           Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()) + (this.priority==null ? 0 : this.priority);\r
-           Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()) + (castOther.priority==null ? 0 : castOther.priority);\r
-\r
-           return c1.compareTo(c2);\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+
+@SuppressWarnings("rawtypes")
+public class EPUserApp implements java.io.Serializable, Comparable {
+
+       private static final long serialVersionUID = 1L;
+       
+       private Long userId;
+       private EPApp app;
+       private EPRole role;
+       private Short priority;
+       
+       public EPUserApp() {
+       }
+       
+       public Long getAppId() {
+               return this.getApp().getId();
+       }
+       
+       public Long getRoleId() {
+               return (role == null) ? null : role.getId();
+       }
+       
+       public Long getAppRoleId() {
+               return (role.getAppRoleId() == null) ? null : role.getAppRoleId();
+       }
+               
+       @Override 
+       public String toString() {
+               String str = "[u: "+getUserId()+"; a: "+getAppId()+", r: "+getRoleId()+"; appRoleId: "+getAppRoleId()+"]";
+               return str;
+       }
+       
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long id) {
+               this.userId = id;
+       }
+
+       public EPApp getApp() {
+               return app;
+       }
+
+       public void setApp(EPApp app) {
+               this.app = app;
+       }
+
+       public EPRole getRole() {
+               return role;
+       }
+
+       public void setRole(EPRole role) {
+               this.role = role;
+       }
+               
+       public Short getPriority() {
+               return this.priority;
+       }
+
+       public void setPriority(Short priority) {
+               this.priority = priority;
+       }
+
+       public boolean equals(Object other) {
+               if ((this == other))
+                       return true;
+               if ((other == null))
+                       return false;
+               if (!(other instanceof EPUserApp))
+                       return false;
+               EPUserApp castOther = (EPUserApp) other;
+
+               return (this.getUserId().equals(castOther.getUserId()))
+                               && (this.getApp().getId().equals(castOther.getApp().getId()))
+                               && (this.getRole().getId().equals(castOther.getRole().getId()))
+                               && ((this.priority==null && castOther.getPriority()==null) || this.getPriority().equals(castOther.getPriority()));
+       }
+
+       public int hashCode() {
+               int result = 17;
+
+               result = 37 * result + (int) (this.getUserId()==null ? 0 : this.getUserId().intValue());
+               result = 37 * result + (int) (this.getApp().getId()==null ? 0 : this.getApp().getId().intValue());
+               result = 37 * result + (int) (this.getRole().getId()==null ? 0 : this.getRole().getId().intValue());
+               result = 37 * result + (int) (this.priority==null ? 0 : this.priority);
+               return result;
+       }
+
+       public int compareTo(Object other){
+           EPUserApp castOther = (EPUserApp) other;
+
+           Long c1 = (this.getUserId()==null ? 0 : this.getUserId()) + (this.getApp()==null||this.getApp().getId()==null ? 0 : this.getApp().getId()) + (this.getRole()==null||this.getRole().getId()==null ? 0 : this.getRole().getId()) + (this.priority==null ? 0 : this.priority);
+           Long c2 = (castOther.getUserId()==null ? 0 : castOther.getUserId()) + (castOther.getApp()==null||castOther.getApp().getId()==null ? 0 : castOther.getApp().getId()) + (castOther.getRole()==null||castOther.getRole().getId()==null ? 0 : castOther.getRole().getId()) + (castOther.priority==null ? 0 : castOther.priority);
+
+           return c1.compareTo(c2);
+       }
+}
index 89411ea..db04185 100644 (file)
@@ -1,92 +1,92 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@Entity\r
-@JsonInclude\r
-public class EPUserAppCatalogRoles extends DomainVo {\r
-\r
-       private static final long serialVersionUID = -5259869298825093816L;\r
-\r
-\r
-       @Id\r
-       @Column(name="requested_role_id")\r
-       public Long requestedRoleId;\r
-       \r
-       \r
-       @Id\r
-       @Column(name="role_name")\r
-       public String rolename;\r
-       \r
-       @Id\r
-       @Column(name="request_status")\r
-       public String requestStatus;\r
-       \r
-       @Id\r
-       @Column(name="app_id")\r
-       public Long appId;\r
-\r
-       public Long getRequestedRoleId() {\r
-               return requestedRoleId;\r
-       }\r
-\r
-       public void setRequestedRoleId(Long requestedRoleId) {\r
-               this.requestedRoleId = requestedRoleId;\r
-       }\r
-\r
-       public String getRolename() {\r
-               return rolename;\r
-       }\r
-\r
-       public void setRolename(String rolename) {\r
-               this.rolename = rolename;\r
-       }\r
-\r
-       public String getRequestStatus() {\r
-               return requestStatus;\r
-       }\r
-\r
-       public void setRequestStatus(String requestStatus) {\r
-               this.requestStatus = requestStatus;\r
-       }\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String toString() {\r
-               return "EPUserAppCatalogRoles [requestedRoleId=" + requestedRoleId + ", rolename=" + rolename\r
-                               + ", requestStatus=" + requestStatus + ", appId=" + appId + "]";\r
-       }\r
-\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@Entity
+@JsonInclude
+public class EPUserAppCatalogRoles extends DomainVo {
+
+       private static final long serialVersionUID = -5259869298825093816L;
+
+
+       @Id
+       @Column(name="requested_role_id")
+       public Long requestedRoleId;
+       
+       
+       @Id
+       @Column(name="role_name")
+       public String rolename;
+       
+       @Id
+       @Column(name="request_status")
+       public String requestStatus;
+       
+       @Id
+       @Column(name="app_id")
+       public Long appId;
+
+       public Long getRequestedRoleId() {
+               return requestedRoleId;
+       }
+
+       public void setRequestedRoleId(Long requestedRoleId) {
+               this.requestedRoleId = requestedRoleId;
+       }
+
+       public String getRolename() {
+               return rolename;
+       }
+
+       public void setRolename(String rolename) {
+               this.rolename = rolename;
+       }
+
+       public String getRequestStatus() {
+               return requestStatus;
+       }
+
+       public void setRequestStatus(String requestStatus) {
+               this.requestStatus = requestStatus;
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String toString() {
+               return "EPUserAppCatalogRoles [requestedRoleId=" + requestedRoleId + ", rolename=" + rolename
+                               + ", requestStatus=" + requestStatus + ", appId=" + appId + "]";
+       }
+
+       
+}
index 1d73945..c756ef5 100644 (file)
@@ -1,87 +1,85 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-\r
-import java.util.Date;\r
-import java.util.Set;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-\r
-public class EPUserAppRolesRequest extends DomainVo {\r
-       \r
-       private static final long serialVersionUID = -7225288307806389019L;\r
-       private Long userId;\r
-       private Long appId;\r
-       private Date createdDate;\r
-       private Date updatedDate;\r
-       private String requestStatus;\r
-       \r
-       private Set<EPUserAppRolesRequestDetail> epRequestIdDetail;\r
-\r
-       public final Long getUserId() {\r
-               return userId;\r
-       }\r
-\r
-       public final void setUserId(Long userId) {\r
-               this.userId = userId;\r
-       }\r
-\r
-       public final Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public final void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public final Date getCreatedDate() {\r
-               return createdDate;\r
-       }\r
-\r
-       public final void setCreatedDate(Date createdDate) {\r
-               this.createdDate = createdDate;\r
-       }\r
-\r
-       public final Date getUpdatedDate() {\r
-               return updatedDate;\r
-       }\r
-\r
-       public final void setUpdatedDate(Date updatedDate) {\r
-               this.updatedDate = updatedDate;\r
-       }\r
-\r
-       public final String getRequestStatus() {\r
-               return requestStatus;\r
-       }\r
-\r
-       public final void setRequestStatus(String requestStatus) {\r
-               this.requestStatus = requestStatus;\r
-       }\r
-\r
-       public final Set<EPUserAppRolesRequestDetail> getEpRequestIdDetail() {\r
-               return epRequestIdDetail;\r
-       }\r
-\r
-       public final void setEpRequestIdDetail(Set<EPUserAppRolesRequestDetail> epMyLoginsDetail) {\r
-               this.epRequestIdDetail = epMyLoginsDetail;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.Date;
+import java.util.Set;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class EPUserAppRolesRequest extends DomainVo {
+
+       private static final long serialVersionUID = -7225288307806389019L;
+       private Long userId;
+       private Long appId;
+       private Date createdDate;
+       private Date updatedDate;
+       private String requestStatus;
+
+       private Set<EPUserAppRolesRequestDetail> epRequestIdDetail;
+
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public Date getCreatedDate() {
+               return createdDate;
+       }
+
+       public void setCreatedDate(Date createdDate) {
+               this.createdDate = createdDate;
+       }
+
+       public Date getUpdatedDate() {
+               return updatedDate;
+       }
+
+       public void setUpdatedDate(Date updatedDate) {
+               this.updatedDate = updatedDate;
+       }
+
+       public String getRequestStatus() {
+               return requestStatus;
+       }
+
+       public void setRequestStatus(String requestStatus) {
+               this.requestStatus = requestStatus;
+       }
+
+       public Set<EPUserAppRolesRequestDetail> getEpRequestIdDetail() {
+               return epRequestIdDetail;
+       }
+
+       public void setEpRequestIdDetail(Set<EPUserAppRolesRequestDetail> epMyLoginsDetail) {
+               this.epRequestIdDetail = epMyLoginsDetail;
+       }
+}
index d7989bc..3b466f5 100644 (file)
@@ -1,52 +1,56 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class EPUserAppRolesRequestDetail extends DomainVo{\r
-\r
-       private static final long serialVersionUID = -4908856671135348157L;\r
-       \r
-       private Long reqRoleId;\r
-       private String reqType;\r
-       private EPUserAppRolesRequest epRequestIdData;\r
-       \r
-       public final EPUserAppRolesRequest getEpRequestIdData() {\r
-               return epRequestIdData;\r
-       }\r
-       public final void setEpRequestIdData(EPUserAppRolesRequest epRequestIdData) {\r
-               this.epRequestIdData = epRequestIdData;\r
-       }\r
-       public final Long getReqRoleId() {\r
-               return reqRoleId;\r
-       }\r
-       public final void setReqRoleId(Long reqRoleId) {\r
-               this.reqRoleId = reqRoleId;\r
-       }\r
-       public final String getReqType() {\r
-               return reqType;\r
-       }\r
-       public final void setReqType(String reqType) {\r
-               this.reqType = reqType;\r
-       }\r
-\r
-}\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class EPUserAppRolesRequestDetail extends DomainVo {
+
+       private static final long serialVersionUID = -4908856671135348157L;
+
+       private Long reqRoleId;
+       private String reqType;
+       private EPUserAppRolesRequest epRequestIdData;
+
+       public EPUserAppRolesRequest getEpRequestIdData() {
+               return epRequestIdData;
+       }
+
+       public void setEpRequestIdData(EPUserAppRolesRequest epRequestIdData) {
+               this.epRequestIdData = epRequestIdData;
+       }
+
+       public Long getReqRoleId() {
+               return reqRoleId;
+       }
+
+       public void setReqRoleId(Long reqRoleId) {
+               this.reqRoleId = reqRoleId;
+       }
+
+       public String getReqType() {
+               return reqType;
+       }
+
+       public void setReqType(String reqType) {
+               this.reqType = reqType;
+       }
+
+}
index 30d69ba..6c15053 100644 (file)
@@ -1,50 +1,50 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class EPUserAppsManualSortPreference extends DomainVo {\r
-\r
-       private static final long serialVersionUID = -6270136291139278216L;\r
-       private int userId;\r
-       private Long appId;\r
-       private int appManualSortOrder;\r
-       \r
-       public int getUserId() {\r
-               return userId;\r
-       }\r
-       public void setUserId(int userId) {\r
-               this.userId = userId;\r
-       }\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-       public int getAppManualSortOrder() {\r
-               return appManualSortOrder;\r
-       }\r
-       public void setAppManualSortOrder(int appManualSortOrder) {\r
-               this.appManualSortOrder = appManualSortOrder;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class EPUserAppsManualSortPreference extends DomainVo {
+
+       private static final long serialVersionUID = -6270136291139278216L;
+       private int userId;
+       private Long appId;
+       private int appManualSortOrder;
+       
+       public int getUserId() {
+               return userId;
+       }
+       public void setUserId(int userId) {
+               this.userId = userId;
+       }
+       public Long getAppId() {
+               return appId;
+       }
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+       public int getAppManualSortOrder() {
+               return appManualSortOrder;
+       }
+       public void setAppManualSortOrder(int appManualSortOrder) {
+               this.appManualSortOrder = appManualSortOrder;
+       }
+
+}
index 1cab30f..f906d0c 100644 (file)
@@ -1,44 +1,44 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class EPUserAppsSortPreference extends DomainVo{\r
-\r
-       private static final long serialVersionUID = -5267000174894006433L;\r
-\r
-       private int userId;\r
-       private String sortPref;\r
-       \r
-       public int getUserId() {\r
-               return userId;\r
-       }\r
-       public void setUserId(final int userId) {\r
-               this.userId = userId;\r
-       }\r
-       public String getSortPref() {\r
-               return sortPref;\r
-       }\r
-       public void setSortPref(final String sortPref) {\r
-               this.sortPref = sortPref;\r
-       }\r
-               \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class EPUserAppsSortPreference extends DomainVo{
+
+       private static final long serialVersionUID = -5267000174894006433L;
+
+       private int userId;
+       private String sortPref;
+       
+       public int getUserId() {
+               return userId;
+       }
+       public void setUserId(final int userId) {
+               this.userId = userId;
+       }
+       public String getSortPref() {
+               return sortPref;
+       }
+       public void setSortPref(final String sortPref) {
+               this.sortPref = sortPref;
+       }
+               
+}
index c82db4d..3562efd 100644 (file)
@@ -1,57 +1,57 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.Date;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-\r
-public class EPUserNotification extends DomainVo {     \r
-       private Long userId;\r
-       private Long notificationId;\r
-       private String viewed;\r
-       private Date updateTime;\r
-       \r
-       public Long getUserId() {\r
-               return userId;\r
-       }\r
-       public void setUserId(Long userId) {\r
-               this.userId = userId;\r
-       }\r
-       public Long getNotificationId() {\r
-               return notificationId;\r
-       }\r
-       public void setNotificationId(Long notificationId) {\r
-               this.notificationId = notificationId;\r
-       }\r
-       public String getViewed() {\r
-               return viewed;\r
-       }\r
-       public void setViewed(String viewed) {\r
-               this.viewed = viewed;\r
-       }\r
-       public Date getUpdateTime() {\r
-               return updateTime;\r
-       }\r
-       public void setUpdateTime(Date updateTime) {\r
-               this.updateTime = updateTime;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.Date;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+
+public class EPUserNotification extends DomainVo {     
+       private Long userId;
+       private Long notificationId;
+       private String viewed;
+       private Date updateTime;
+       
+       public Long getUserId() {
+               return userId;
+       }
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+       public Long getNotificationId() {
+               return notificationId;
+       }
+       public void setNotificationId(Long notificationId) {
+               this.notificationId = notificationId;
+       }
+       public String getViewed() {
+               return viewed;
+       }
+       public void setViewed(String viewed) {
+               this.viewed = viewed;
+       }
+       public Date getUpdateTime() {
+               return updateTime;
+       }
+       public void setUpdateTime(Date updateTime) {
+               this.updateTime = updateTime;
+       }
+}
index 4a3b784..9ea3c07 100644 (file)
@@ -1,70 +1,70 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class EPWidgetsManualSortPreference extends DomainVo{\r
-\r
-       private static final long serialVersionUID = 4607102334801223570L;\r
-       private int userId;\r
-       private Long widgetId;\r
-       private int widgetRow;\r
-       private int widgetCol;\r
-       private int widgetWidth;\r
-       private int widgetHeight;\r
-\r
-       public int getUserId() {\r
-               return userId;\r
-       }\r
-       public void setUserId(int userId) {\r
-               this.userId = userId;\r
-       }\r
-       public Long getWidgetId() {\r
-               return widgetId;\r
-       }\r
-       public void setWidgetId(Long widgetId) {\r
-               this.widgetId = widgetId;\r
-       }\r
-       public int getWidgetRow() {\r
-               return widgetRow;\r
-       }\r
-       public void setWidgetRow(int widgetRow) {\r
-               this.widgetRow = widgetRow;\r
-       }\r
-       public int getWidgetCol() {\r
-               return widgetCol;\r
-       }\r
-       public void setWidgetCol(int widgetCol) {\r
-               this.widgetCol = widgetCol;\r
-       }\r
-       public int getWidgetWidth() {\r
-               return widgetWidth;\r
-       }\r
-       public void setWidgetWidth(int widgetWidth) {\r
-               this.widgetWidth = widgetWidth;\r
-       }\r
-       public int getWidgetHeight() {\r
-               return widgetHeight;\r
-       }\r
-       public void setWidgetHeight(int widgetHeight) {\r
-               this.widgetHeight = widgetHeight;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class EPWidgetsManualSortPreference extends DomainVo{
+
+       private static final long serialVersionUID = 4607102334801223570L;
+       private int userId;
+       private Long widgetId;
+       private int widgetRow;
+       private int widgetCol;
+       private int widgetWidth;
+       private int widgetHeight;
+
+       public int getUserId() {
+               return userId;
+       }
+       public void setUserId(int userId) {
+               this.userId = userId;
+       }
+       public Long getWidgetId() {
+               return widgetId;
+       }
+       public void setWidgetId(Long widgetId) {
+               this.widgetId = widgetId;
+       }
+       public int getWidgetRow() {
+               return widgetRow;
+       }
+       public void setWidgetRow(int widgetRow) {
+               this.widgetRow = widgetRow;
+       }
+       public int getWidgetCol() {
+               return widgetCol;
+       }
+       public void setWidgetCol(int widgetCol) {
+               this.widgetCol = widgetCol;
+       }
+       public int getWidgetWidth() {
+               return widgetWidth;
+       }
+       public void setWidgetWidth(int widgetWidth) {
+               this.widgetWidth = widgetWidth;
+       }
+       public int getWidgetHeight() {
+               return widgetHeight;
+       }
+       public void setWidgetHeight(int widgetHeight) {
+               this.widgetHeight = widgetHeight;
+       }
+}
index 1cf89fb..6df37e8 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-/**\r
- * Model for a subset of the columns in the fn_app table.\r
- */\r
-public class EcompApp {\r
-       \r
-       protected Long id;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-       \r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-       \r
-    private String name;\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-       \r
-       private String imageUrl;\r
-\r
-       public String getImageUrl() {\r
-               return imageUrl;\r
-       }\r
-\r
-       public void setImageUrl(String imageUrl) {\r
-               this.imageUrl = imageUrl;\r
-       }\r
-       \r
-       private String description;\r
-\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-       \r
-       private String notes;\r
-\r
-       public String getNotes() {\r
-               return notes;\r
-       }\r
-\r
-       public void setNotes(String notes) {\r
-               this.notes = notes;\r
-       }       \r
-\r
-       private String url;\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       private String alternateUrl;\r
-\r
-       public String getAlternateUrl() {\r
-               return alternateUrl;\r
-       }\r
-\r
-       public void setAlternateUrl(String alternateUrl) {\r
-               this.alternateUrl = alternateUrl;\r
-       }\r
-       \r
-       private String uebTopicName;\r
-       \r
-       public String getUebTopicName() {\r
-               return uebTopicName;\r
-       }\r
-       \r
-       public void setUebTopicName(String topicName) {\r
-               this.uebTopicName = topicName;\r
-       }\r
-       \r
-       private String uebKey;\r
-       \r
-       public String getUebKey() {\r
-               return uebKey;\r
-       }\r
-       \r
-       public void setUebKey(String uebKey) {\r
-               this.uebKey = uebKey;\r
-       }\r
-       \r
-       private String uebSecret;\r
-       \r
-       public String getUebSecret() {\r
-               return uebSecret;\r
-       }\r
-       \r
-       public void setUebSecret(String secret) {\r
-               this.uebSecret = secret;\r
-       }\r
-       \r
-       private Boolean enabled;\r
-       \r
-       public Boolean isEnabled() {\r
-               return enabled;\r
-       }\r
-       \r
-       public void setEnabled(Boolean enable) {\r
-               this.enabled = enable;\r
-       }\r
-\r
-       private Boolean restrictedApp;\r
-       \r
-       public Boolean isRestrictedApp() {\r
-               return restrictedApp;\r
-       }\r
-       \r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+/**
+ * Model for a subset of the columns in the fn_app table.
+ */
+public class EcompApp {
+       
+       protected Long id;
+
+       public Long getId() {
+               return id;
+       }
+       
+       public void setId(Long id) {
+               this.id = id;
+       }
+       
+    private String name;
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       private String imageUrl;
+
+       public String getImageUrl() {
+               return imageUrl;
+       }
+
+       public void setImageUrl(String imageUrl) {
+               this.imageUrl = imageUrl;
+       }
+       
+       private String description;
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+       
+       private String notes;
+
+       public String getNotes() {
+               return notes;
+       }
+
+       public void setNotes(String notes) {
+               this.notes = notes;
+       }       
+
+       private String url;
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       private String alternateUrl;
+
+       public String getAlternateUrl() {
+               return alternateUrl;
+       }
+
+       public void setAlternateUrl(String alternateUrl) {
+               this.alternateUrl = alternateUrl;
+       }
+       
+       private String uebTopicName;
+       
+       public String getUebTopicName() {
+               return uebTopicName;
+       }
+       
+       public void setUebTopicName(String topicName) {
+               this.uebTopicName = topicName;
+       }
+       
+       private String uebKey;
+       
+       public String getUebKey() {
+               return uebKey;
+       }
+       
+       public void setUebKey(String uebKey) {
+               this.uebKey = uebKey;
+       }
+       
+       private String uebSecret;
+       
+       public String getUebSecret() {
+               return uebSecret;
+       }
+       
+       public void setUebSecret(String secret) {
+               this.uebSecret = secret;
+       }
+       
+       private Boolean enabled;
+       
+       public Boolean isEnabled() {
+               return enabled;
+       }
+       
+       public void setEnabled(Boolean enable) {
+               this.enabled = enable;
+       }
+
+       private Boolean restrictedApp;
+       
+       public Boolean isRestrictedApp() {
+               return restrictedApp;
+       }
+       
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+}
index 78cf416..52529cb 100644 (file)
@@ -1,80 +1,80 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-import javax.persistence.IdClass;\r
-\r
-@Entity\r
-@IdClass(EcompAppRoleId.class)\r
-public class EcompAppRole {\r
-\r
-       @Id\r
-       @Column(name="app_id")\r
-       private Long appId;\r
\r
-       @Id\r
-       @Column(name="app_name")\r
-       private String appName; \r
-       \r
-       @Id\r
-       @Column(name="role_id")\r
-       private Integer roleId;\r
-       \r
-       @Id\r
-       @Column(name="role_name")\r
-       private String roleName;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-       public Integer getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Integer roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+
+@Entity
+@IdClass(EcompAppRoleId.class)
+public class EcompAppRole {
+
+       @Id
+       @Column(name="app_id")
+       private Long appId;
+       @Id
+       @Column(name="app_name")
+       private String appName; 
+       
+       @Id
+       @Column(name="role_id")
+       private Integer roleId;
+       
+       @Id
+       @Column(name="role_name")
+       private String roleName;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       public Integer getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Integer roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+       
+       
+}
index d89c073..894316e 100644 (file)
@@ -1,83 +1,83 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Id;\r
-\r
-public class EcompAppRoleId implements Serializable{\r
-       \r
-       /**\r
-        * \r
-        */\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name="app_id")\r
-       private Long appId;\r
\r
-       @Id\r
-       @Column(name="app_name")\r
-       private String appName; \r
-       \r
-       @Id\r
-       @Column(name="role_id")\r
-       private Integer roleId;\r
-       \r
-       @Id\r
-       @Column(name="role_name")\r
-       private String roleName;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-       public Integer getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Integer roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-       \r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+
+public class EcompAppRoleId implements Serializable{
+       
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name="app_id")
+       private Long appId;
+       @Id
+       @Column(name="app_name")
+       private String appName; 
+       
+       @Id
+       @Column(name="role_id")
+       private Integer roleId;
+       
+       @Id
+       @Column(name="role_name")
+       private String roleName;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       public Integer getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Integer roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+       
+
+}
index 4d4ec27..3d53c8d 100644 (file)
@@ -1,61 +1,61 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.Date;\r
-\r
-import org.openecomp.portalsdk.core.domain.AuditLog;\r
-\r
-public class EcompAuditLog extends AuditLog {\r
-\r
-       private static final long serialVersionUID = 7970458389782626231L;\r
-       \r
-       // values of activity_cd column in table fu_lu_activity\r
-       // as loaded by DML sql script\r
-       public static final String CD_ACTIVITY_ADD_CHILD_ROLE = "add_child_role";\r
-       public static final String CD_ACTIVITY_ADD_ROLE = "add_role";\r
-       public static final String CD_ACTIVITY_ADD_ROLE_FUNCTION = "add_role_function";\r
-       public static final String CD_ACTIVITY_ADD_USER_ROLE = "add_user_role";\r
-       public static final String CD_ACTIVITY_APP_ACCESS = "app_access";\r
-       public static final String CD_ACTIVITY_FUNCTIONAL_ACCESS = "functional_access";\r
-       public static final String CD_ACTIVITY_GUEST_LOGIN = "guest_login";\r
-       public static final String CD_ACTIVITY_LOGIN = "login";\r
-       public static final String CD_ACTIVITY_LOGOUT = "logout";\r
-       public static final String CD_ACTIVITY_MOBILE_LOGIN = "mobile_login";\r
-       public static final String CD_ACTIVITY_MOBILE_LOGOUT = "mobile_logout";\r
-       public static final String CD_ACTIVITY_REMOVE_CHILD_ROLE = "remove_child_role";\r
-       public static final String CD_ACTIVITY_REMOVE_ROLE = "remove_role";\r
-       public static final String CD_ACTIVITY_REMOVE_ROLE_FUNCTION = "remove_role_function";\r
-       public static final String CD_ACTIVITY_REMOVE_USER_ROLE = "remove_user_role";\r
-       public static final String CD_ACTIVITY_TAB_ACCESS = "tab_access";\r
-       public static final String CD_ACTIVITY_SEARCH = "search";\r
-       public static final String CD_ACTIVITY_ADD_PORTAL_ADMIN = "apa ";\r
-       public static final String CD_ACTIVITY_DELETE_PORTAL_ADMIN = "dpa";\r
-       public static final String CD_ACTIVITY_UPDATE_USER = "uu ";\r
-       public static final String CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN = "uaa ";\r
-       public static final String CD_ACTIVITY_STORE_ANALYTICS = "store_analytics";\r
-\r
-       /**\r
-        * Creates a new object with the created field set to the current date-time.\r
-        */\r
-       public EcompAuditLog() {\r
-               setCreated(new Date());\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.Date;
+
+import org.openecomp.portalsdk.core.domain.AuditLog;
+
+public class EcompAuditLog extends AuditLog {
+
+       private static final long serialVersionUID = 7970458389782626231L;
+       
+       // values of activity_cd column in table fu_lu_activity
+       // as loaded by DML sql script
+       public static final String CD_ACTIVITY_ADD_CHILD_ROLE = "add_child_role";
+       public static final String CD_ACTIVITY_ADD_ROLE = "add_role";
+       public static final String CD_ACTIVITY_ADD_ROLE_FUNCTION = "add_role_function";
+       public static final String CD_ACTIVITY_ADD_USER_ROLE = "add_user_role";
+       public static final String CD_ACTIVITY_APP_ACCESS = "app_access";
+       public static final String CD_ACTIVITY_FUNCTIONAL_ACCESS = "functional_access";
+       public static final String CD_ACTIVITY_GUEST_LOGIN = "guest_login";
+       public static final String CD_ACTIVITY_LOGIN = "login";
+       public static final String CD_ACTIVITY_LOGOUT = "logout";
+       public static final String CD_ACTIVITY_MOBILE_LOGIN = "mobile_login";
+       public static final String CD_ACTIVITY_MOBILE_LOGOUT = "mobile_logout";
+       public static final String CD_ACTIVITY_REMOVE_CHILD_ROLE = "remove_child_role";
+       public static final String CD_ACTIVITY_REMOVE_ROLE = "remove_role";
+       public static final String CD_ACTIVITY_REMOVE_ROLE_FUNCTION = "remove_role_function";
+       public static final String CD_ACTIVITY_REMOVE_USER_ROLE = "remove_user_role";
+       public static final String CD_ACTIVITY_TAB_ACCESS = "tab_access";
+       public static final String CD_ACTIVITY_SEARCH = "search";
+       public static final String CD_ACTIVITY_ADD_PORTAL_ADMIN = "apa ";
+       public static final String CD_ACTIVITY_DELETE_PORTAL_ADMIN = "dpa";
+       public static final String CD_ACTIVITY_UPDATE_USER = "uu ";
+       public static final String CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN = "uaa ";
+       public static final String CD_ACTIVITY_STORE_ANALYTICS = "store_analytics";
+
+       /**
+        * Creates a new object with the created field set to the current date-time.
+        */
+       public EcompAuditLog() {
+               setCreated(new Date());
+       }
+}
index 1bfb184..2649cfd 100644 (file)
@@ -1,63 +1,63 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class EpUserAppRoles extends DomainVo {\r
-\r
-       private static final long serialVersionUID = -1484592641766545668L;\r
-\r
-       @Id\r
-       @Column(name ="role_id")\r
-       public Long roleId;\r
-       \r
-       @Id\r
-       @Column(name ="app_id")\r
-       public Long appId;\r
-       \r
-       public Long getRoleId() {\r
-               return roleId;\r
-       }\r
-       public void setRoleId(Long roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-       \r
-       @Override\r
-       public String toString() {\r
-               return "EpUserAppRoles [roleId=" + roleId + ", appId=" + appId + "]";\r
-       }\r
-}\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class EpUserAppRoles extends DomainVo {
+
+       private static final long serialVersionUID = -1484592641766545668L;
+
+       @Id
+       @Column(name ="role_id")
+       public Long roleId;
+       
+       @Id
+       @Column(name ="app_id")
+       public Long appId;
+       
+       public Long getRoleId() {
+               return roleId;
+       }
+       public void setRoleId(Long roleId) {
+               this.roleId = roleId;
+       }
+       public Long getAppId() {
+               return appId;
+       }
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+       
+       @Override
+       public String toString() {
+               return "EpUserAppRoles [roleId=" + roleId + ", appId=" + appId + "]";
+       }
+}
+
index a0395bf..fdbc093 100644 (file)
@@ -1,49 +1,49 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-public class ExternalSystemAccess {\r
-       \r
-       private String key;\r
-       private Boolean accessValue;\r
-               \r
-       public ExternalSystemAccess(String key, Boolean accessValue){\r
-               this.key = key;\r
-               this.accessValue = accessValue;\r
-       }\r
-       \r
-       public String getKey() {\r
-               return key;\r
-       }\r
-       public void setKey(String key) {\r
-               this.key = key;\r
-       }\r
-\r
-       public Boolean getAccessValue() {\r
-               return accessValue;\r
-       }\r
-\r
-       public void setAccessValue(Boolean accessValue) {\r
-               this.accessValue = accessValue;\r
-       }\r
-       \r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+public class ExternalSystemAccess {
+       
+       private String key;
+       private Boolean accessValue;
+               
+       public ExternalSystemAccess(String key, Boolean accessValue){
+               this.key = key;
+               this.accessValue = accessValue;
+       }
+       
+       public String getKey() {
+               return key;
+       }
+       public void setKey(String key) {
+               this.key = key;
+       }
+
+       public Boolean getAccessValue() {
+               return accessValue;
+       }
+
+       public void setAccessValue(Boolean accessValue) {
+               this.accessValue = accessValue;
+       }
+       
+       
+       
+}
index ac2bc6c..d8c916b 100644 (file)
@@ -1,96 +1,96 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.List;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Transient;\r
-/***\r
- * \r
- * This class is almost identical to org.openecomp.portalapp.portal.transport.FunctionalMenuItem\r
- * The only difference is the appId field. In FunctionMenuItem, we used @Transient as an attribute, and we are using @Column in this class.\r
- * In some sql queries, we need to have appId, but it's not a field in fn_menu_functional table.\r
- * \r
- * @author robertlo\r
- *\r
- */\r
-@Entity\r
-public class FunctionalMenuItemWithAppID{\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-    @GeneratedValue(strategy=GenerationType.IDENTITY)\r
-       @Column(name = "MENU_ID")\r
-       public Long menuId;\r
-       \r
-       @Column(name = "COLUMN_NUM")\r
-       public Integer column;\r
-       \r
-       @Column(name = "TEXT")\r
-       public String text;\r
-       \r
-       @Column(name = "PARENT_MENU_ID")\r
-       public Integer parentMenuId;\r
-       \r
-       @Column(name = "URL")\r
-       public String url;\r
-       \r
-       @Column(name="ACTIVE_YN")\r
-       public String active_yn;\r
-\r
-       @Column(name="APP_ID")\r
-       public Integer appid;\r
-       \r
-       @Transient\r
-       public List<Integer> roles;\r
-       \r
-       @Transient\r
-       public Boolean restrictedApp;\r
-       \r
-       public void normalize() {\r
-               if (this.column == null)\r
-                       this.column = new Integer(1);\r
-               this.text = (this.text == null) ? "" : this.text.trim();\r
-               if (this.parentMenuId == null)\r
-                       this.parentMenuId = new Integer(-1);\r
-               this.url = (this.url == null) ? "" : this.url.trim();\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="\r
-                               + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles\r
-                               + ", restrictedApp=" + restrictedApp + "]";\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-}\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Transient;
+/***
+ * 
+ * This class is almost identical to org.openecomp.portalapp.portal.transport.FunctionalMenuItem
+ * The only difference is the appId field. In FunctionMenuItem, we used @Transient as an attribute, and we are using @Column in this class.
+ * In some sql queries, we need to have appId, but it's not a field in fn_menu_functional table.
+ * 
+ * @author robertlo
+ *
+ */
+@Entity
+public class FunctionalMenuItemWithAppID{
+       private static final long serialVersionUID = 1L;
+
+       @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+       @Column(name = "MENU_ID")
+       public Long menuId;
+       
+       @Column(name = "COLUMN_NUM")
+       public Integer column;
+       
+       @Column(name = "TEXT")
+       public String text;
+       
+       @Column(name = "PARENT_MENU_ID")
+       public Integer parentMenuId;
+       
+       @Column(name = "URL")
+       public String url;
+       
+       @Column(name="ACTIVE_YN")
+       public String active_yn;
+
+       @Column(name="APP_ID")
+       public Integer appid;
+       
+       @Transient
+       public List<Integer> roles;
+       
+       @Transient
+       public Boolean restrictedApp;
+       
+       public void normalize() {
+               if (this.column == null)
+                       this.column = new Integer(1);
+               this.text = (this.text == null) ? "" : this.text.trim();
+               if (this.parentMenuId == null)
+                       this.parentMenuId = new Integer(-1);
+               this.url = (this.url == null) ? "" : this.url.trim();
+       }
+
+       @Override
+       public String toString() {
+               return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="
+                               + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles
+                               + ", restrictedApp=" + restrictedApp + "]";
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+}
+
index 4669426..c4b9489 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@Entity\r
-@JsonInclude\r
-public class GetAccessResult implements Serializable{\r
-\r
-\r
-       private static final long serialVersionUID = 5239527705869613411L;\r
-\r
-       @Id\r
-       @Column(name="row_id")\r
-       private String rowId;\r
-       \r
-       @Column(name="role_id")\r
-       private Long roleId;\r
-       \r
-       @Column(name="ecomp_function",nullable=true)\r
-       private String ecompFunction;\r
-       \r
-       @Column(name="app_name")\r
-       private String appName; \r
-       \r
-       @Column(name="app_mots_id",nullable=true)\r
-       private Integer appMotsId;\r
-       \r
-       @Column(name="role_name")\r
-       private String roleName;\r
-       \r
-       @Column(name="role_actv",nullable=true)\r
-       private String roleActive;\r
-       \r
-       \r
-       @Column(name="request_type",nullable=true)\r
-       private String reqType;\r
-       \r
-       \r
-       \r
-       public final String getRowId() {\r
-               return rowId;\r
-       }\r
-       public final void setRowId(String rowId) {\r
-               this.rowId = rowId;\r
-       }\r
-       public final Long getRoleId() {\r
-               return roleId;\r
-       }\r
-       public final void setRoleId(Long roleId) {\r
-               this.roleId = roleId;\r
-       } \r
-       public String getEcompFunction() {\r
-               return ecompFunction;\r
-       }\r
-       public void setEcompFunction(String ecompFunction) {\r
-               this.ecompFunction = ecompFunction;\r
-       }\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-       public Integer getAppMotsId() {\r
-               return appMotsId;\r
-       }\r
-       public void setAppMotsId(Integer appMotsId) {\r
-               this.appMotsId = appMotsId;\r
-       }\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-       public final String getRoleActive() {\r
-               return roleActive;\r
-       }\r
-       public final void setRoleActive(String roleActive) {\r
-               this.roleActive = roleActive;\r
-       }\r
-       public final String getReqType() {\r
-               return reqType;\r
-       }\r
-       public final void setReqType(String reqType) {\r
-               this.reqType = reqType;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@Entity
+@JsonInclude
+public class GetAccessResult implements Serializable{
+
+
+       private static final long serialVersionUID = 5239527705869613411L;
+
+       @Id
+       @Column(name="row_id")
+       private String rowId;
+       
+       @Column(name="role_id")
+       private Long roleId;
+       
+       @Column(name="ecomp_function",nullable=true)
+       private String ecompFunction;
+       
+       @Column(name="app_name")
+       private String appName; 
+       
+       @Column(name="app_mots_id",nullable=true)
+       private Integer appMotsId;
+       
+       @Column(name="role_name")
+       private String roleName;
+       
+       @Column(name="role_actv",nullable=true)
+       private String roleActive;
+       
+       
+       @Column(name="request_type",nullable=true)
+       private String reqType;
+       
+       
+       
+       public String getRowId() {
+               return rowId;
+       }
+       public void setRowId(String rowId) {
+               this.rowId = rowId;
+       }
+       public Long getRoleId() {
+               return roleId;
+       }
+       public void setRoleId(Long roleId) {
+               this.roleId = roleId;
+       } 
+       public String getEcompFunction() {
+               return ecompFunction;
+       }
+       public void setEcompFunction(String ecompFunction) {
+               this.ecompFunction = ecompFunction;
+       }
+       public String getAppName() {
+               return appName;
+       }
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+       public Integer getAppMotsId() {
+               return appMotsId;
+       }
+       public void setAppMotsId(Integer appMotsId) {
+               this.appMotsId = appMotsId;
+       }
+       public String getRoleName() {
+               return roleName;
+       }
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+       public String getRoleActive() {
+               return roleActive;
+       }
+       public void setRoleActive(String roleActive) {
+               this.roleActive = roleActive;
+       }
+       public String getReqType() {
+               return reqType;
+       }
+       public void setReqType(String reqType) {
+               this.reqType = reqType;
+       }
+       
+}
index 0830bfd..b050813 100644 (file)
@@ -1,64 +1,64 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Id;\r
-\r
-public class GetAccessResultId implements Serializable{\r
-       \r
-       /**\r
-        * \r
-        */\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name="ecomp_function")\r
-       private String ecompFunction;\r
-\r
-       @Id\r
-       @Column(name="app_name")\r
-       private String appName; \r
-       \r
-       @Id\r
-       @Column(name="role_name")\r
-       private String roleName;\r
-       \r
-       public String getEcompFunction() {\r
-               return ecompFunction;\r
-       }\r
-       public void setEcompFunction(String ecompFunction) {\r
-               this.ecompFunction = ecompFunction;\r
-       }\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+
+public class GetAccessResultId implements Serializable{
+       
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name="ecomp_function")
+       private String ecompFunction;
+
+       @Id
+       @Column(name="app_name")
+       private String appName; 
+       
+       @Id
+       @Column(name="role_name")
+       private String roleName;
+       
+       public String getEcompFunction() {
+               return ecompFunction;
+       }
+       public void setEcompFunction(String ecompFunction) {
+               this.ecompFunction = ecompFunction;
+       }
+       public String getAppName() {
+               return appName;
+       }
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+       public String getRoleName() {
+               return roleName;
+       }
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+}
index 91366ce..a9ca2b6 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.List;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class MicroserviceData extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public MicroserviceData() {\r
-\r
-       }\r
-\r
-       private Long id;\r
-\r
-       private String name;\r
-\r
-       private String active;\r
-\r
-       private String desc;\r
-\r
-       private long appId;\r
-\r
-       private String url;\r
-\r
-       private String securityType;\r
-\r
-       private String username;\r
-\r
-       private String password;\r
-\r
-       private List<MicroserviceParameter> parameterList;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-\r
-       public String getActive() {\r
-               return active;\r
-       }\r
-\r
-       public void setActive(String active) {\r
-               this.active = active;\r
-       }\r
-\r
-       public String getDesc() {\r
-               return desc;\r
-       }\r
-\r
-       public void setDesc(String desc) {\r
-               this.desc = desc;\r
-       }\r
-\r
-       public long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public String getSecurityType() {\r
-               return securityType;\r
-       }\r
-\r
-       public void setSecurityType(String securityType) {\r
-               this.securityType = securityType;\r
-       }\r
-\r
-       public String getUsername() {\r
-               return username;\r
-       }\r
-\r
-       public void setUsername(String username) {\r
-               this.username = username;\r
-       }\r
-\r
-       public String getPassword() {\r
-               return password;\r
-       }\r
-\r
-       public void setPassword(String password) {\r
-               this.password = password;\r
-       }\r
-\r
-       public List<MicroserviceParameter> getParameterList() {\r
-               return parameterList;\r
-       }\r
-\r
-       public void setParameterList(List<MicroserviceParameter> parameterList) {\r
-               this.parameterList = parameterList;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "MicroserviceData [id=" + id + ", name=" + name + ", desc=" + desc + ", appId=" + appId + ", url=" + url\r
-                               + ", securityType=" + securityType + ", username=" + username + ", password=" + password\r
-                               + ", parameterList=" + parameterList + "]";\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class MicroserviceData extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+
+       public MicroserviceData() {
+
+       }
+
+       private Long id;
+
+       private String name;
+
+       private String active;
+
+       private String desc;
+
+       private long appId;
+
+       private String url;
+
+       private String securityType;
+
+       private String username;
+
+       private String password;
+
+       private List<MicroserviceParameter> parameterList;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getActive() {
+               return active;
+       }
+
+       public void setActive(String active) {
+               this.active = active;
+       }
+
+       public String getDesc() {
+               return desc;
+       }
+
+       public void setDesc(String desc) {
+               this.desc = desc;
+       }
+
+       public long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(long appId) {
+               this.appId = appId;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getSecurityType() {
+               return securityType;
+       }
+
+       public void setSecurityType(String securityType) {
+               this.securityType = securityType;
+       }
+
+       public String getUsername() {
+               return username;
+       }
+
+       public void setUsername(String username) {
+               this.username = username;
+       }
+
+       public String getPassword() {
+               return password;
+       }
+
+       public void setPassword(String password) {
+               this.password = password;
+       }
+
+       public List<MicroserviceParameter> getParameterList() {
+               return parameterList;
+       }
+
+       public void setParameterList(List<MicroserviceParameter> parameterList) {
+               this.parameterList = parameterList;
+       }
+
+       @Override
+       public String toString() {
+               return "MicroserviceData [id=" + id + ", name=" + name + ", desc=" + desc + ", appId=" + appId + ", url=" + url
+                               + ", securityType=" + securityType + ", username=" + username + ", password=" + password
+                               + ", parameterList=" + parameterList + "]";
+       }
+
+}
index 74a2937..0796a5a 100644 (file)
@@ -1,82 +1,82 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class MicroserviceParameter extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public MicroserviceParameter() {\r
-\r
-       }\r
-\r
-       private Long id;\r
-\r
-       private long serviceId;\r
-\r
-       private String para_key;\r
-\r
-       private String para_value;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public long getServiceId() {\r
-               return serviceId;\r
-       }\r
-\r
-       public void setServiceId(long serviceId) {\r
-               this.serviceId = serviceId;\r
-       }\r
-\r
-       public String getPara_key() {\r
-               return para_key;\r
-       }\r
-\r
-       public void setPara_key(String para_key) {\r
-               this.para_key = para_key;\r
-       }\r
-\r
-       public String getPara_value() {\r
-               return para_value;\r
-       }\r
-\r
-       public void setPara_value(String para_value) {\r
-               this.para_value = para_value;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "MicroserviceParameter [id=" + id + ", serviceId=" + serviceId + ", para_key=" + para_key\r
-                               + ", para_value=" + para_value + "]";\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import javax.persistence.Column;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class MicroserviceParameter extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+
+       public MicroserviceParameter() {
+
+       }
+
+       private Long id;
+
+       private long serviceId;
+
+       private String para_key;
+
+       private String para_value;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public long getServiceId() {
+               return serviceId;
+       }
+
+       public void setServiceId(long serviceId) {
+               this.serviceId = serviceId;
+       }
+
+       public String getPara_key() {
+               return para_key;
+       }
+
+       public void setPara_key(String para_key) {
+               this.para_key = para_key;
+       }
+
+       public String getPara_value() {
+               return para_value;
+       }
+
+       public void setPara_value(String para_value) {
+               this.para_value = para_value;
+       }
+
+       @Override
+       public String toString() {
+               return "MicroserviceParameter [id=" + id + ", serviceId=" + serviceId + ", para_key=" + para_key
+                               + ", para_value=" + para_value + "]";
+       }
+
+}
index 68875bf..331cdb8 100644 (file)
@@ -1,78 +1,78 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * Models a row in the table with personalization of user app selections.\r
- */\r
-public class PersUserAppSelection extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1545308654500121206L;\r
-\r
-       private Long userId;\r
-\r
-       private Long appId;\r
-\r
-       private String statusCode;\r
-\r
-       public PersUserAppSelection() {}\r
-       \r
-       /**\r
-        * Convenience constructor\r
-        * \r
-        * @param id\r
-        * @param userId\r
-        * @param appId\r
-        * @param statusCode\r
-        */\r
-       public PersUserAppSelection(final Long id, final Long userId, final Long appId, final String statusCode) {\r
-               super.id = id;\r
-               this.userId = userId;\r
-               this.appId = appId;\r
-               this.statusCode = statusCode;\r
-       }\r
-       \r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public Long getUserId() {\r
-               return userId;\r
-       }\r
-\r
-       public void setUserId(Long userId) {\r
-               this.userId = userId;\r
-       }\r
-\r
-       public String getStatusCode() {\r
-               return statusCode;\r
-       }\r
-\r
-       public void setStatusCode(String statusCode) {\r
-               this.statusCode = statusCode;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * Models a row in the table with personalization of user app selections.
+ */
+public class PersUserAppSelection extends DomainVo {
+
+       private static final long serialVersionUID = 1545308654500121206L;
+
+       private Long userId;
+
+       private Long appId;
+
+       private String statusCode;
+
+       public PersUserAppSelection() {}
+       
+       /**
+        * Convenience constructor
+        * 
+        * @param id
+        * @param userId
+        * @param appId
+        * @param statusCode
+        */
+       public PersUserAppSelection(final Long id, final Long userId, final Long appId, final String statusCode) {
+               super.id = id;
+               this.userId = userId;
+               this.appId = appId;
+               this.statusCode = statusCode;
+       }
+       
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+
+       public String getStatusCode() {
+               return statusCode;
+       }
+
+       public void setStatusCode(String statusCode) {
+               this.statusCode = statusCode;
+       }
+
+}
index 4993b46..692479b 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * Models a row in the table with personalization of user widget selections.\r
- */\r
-public class PersUserWidgetSelection extends DomainVo {\r
-\r
-       /**\r
-        * \r
-        */\r
-       private static final long serialVersionUID = -6547880514779039200L;\r
-\r
-       private Long userId;\r
-\r
-       private Long widgetId;\r
-\r
-       private String statusCode;\r
-\r
-       public PersUserWidgetSelection() {}\r
-       \r
-       /**\r
-        * Convenience constructor\r
-        * \r
-        * @param id\r
-        * @param userId\r
-        * @param widgetId\r
-        * @param statusCode\r
-        */\r
-       public PersUserWidgetSelection(final Long id, final Long userId, final Long widgetId, final String statusCode) {\r
-               super.id = id;\r
-               this.userId = userId;\r
-               this.widgetId = widgetId;\r
-               this.statusCode = statusCode;\r
-       }\r
-       \r
-       public Long getWidgetId() {\r
-               return widgetId;\r
-       }\r
-\r
-       public void setWidgetId(Long widgetId) {\r
-               this.widgetId = widgetId;\r
-       }\r
-\r
-       public Long getUserId() {\r
-               return userId;\r
-       }\r
-\r
-       public void setUserId(Long userId) {\r
-               this.userId = userId;\r
-       }\r
-\r
-       public String getStatusCode() {\r
-               return statusCode;\r
-       }\r
-\r
-       public void setStatusCode(String statusCode) {\r
-               this.statusCode = statusCode;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * Models a row in the table with personalization of user widget selections.
+ */
+public class PersUserWidgetSelection extends DomainVo {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -6547880514779039200L;
+
+       private Long userId;
+
+       private Long widgetId;
+
+       private String statusCode;
+
+       public PersUserWidgetSelection() {}
+       
+       /**
+        * Convenience constructor
+        * 
+        * @param id
+        * @param userId
+        * @param widgetId
+        * @param statusCode
+        */
+       public PersUserWidgetSelection(final Long id, final Long userId, final Long widgetId, final String statusCode) {
+               super.id = id;
+               this.userId = userId;
+               this.widgetId = widgetId;
+               this.statusCode = statusCode;
+       }
+       
+       public Long getWidgetId() {
+               return widgetId;
+       }
+
+       public void setWidgetId(Long widgetId) {
+               this.widgetId = widgetId;
+       }
+
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+
+       public String getStatusCode() {
+               return statusCode;
+       }
+
+       public void setStatusCode(String statusCode) {
+               this.statusCode = statusCode;
+       }
+       
+}
index ade24dc..769016d 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-import java.util.Set;\r
-\r
-import javax.persistence.CascadeType;\r
-import javax.persistence.Column;\r
-import javax.persistence.FetchType;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.JoinColumn;\r
-import javax.persistence.ManyToMany;\r
-import javax.persistence.ManyToOne;\r
-\r
-import com.fasterxml.jackson.annotation.JsonIgnore;\r
-\r
-//@Entity\r
-//@Table(name = "FN_ROLE")\r
-public class RoleApp implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       //@Id\r
-       //@Column(name = "ROLE_ID")\r
-       //@GeneratedValue(strategy=GenerationType.AUTO)\r
-       private Long roleId;\r
-       \r
-       \r
-       //@Column(name = "ROLE_Name")\r
-       private String roleName;\r
-       \r
-       //@ManyToOne(fetch = FetchType.EAGER)\r
-       //@JoinColumn(name="APP_ID")\r
-       private App app;\r
-       \r
-       //@JsonIgnore\r
-       //@ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, mappedBy="widgetRoles")\r
-       private Set<WidgetCatalog> widgets;\r
-\r
-       /*@PreRemove\r
-       private void removeGroupsFromUsers() {\r
-           for (WidgetCatalog w : widgets) {\r
-               w.getWidgetRoles().remove(this);\r
-           }\r
-       }*/\r
-       \r
-       /*@ManyToOne\r
-       @JoinColumn(name = "WIDGET_ID", nullable = false)\r
-       WidgetCatalog widgetCatalog;*/\r
-\r
-       //@JsonIgnore\r
-       //@ManyToMany(mappedBy = "widgetRoles")\r
-       //@ManyToMany(fetch = FetchType.EAGER, mappedBy = "widgetRoles")\r
-       //private Set<WidgetCatalog> widgets  = new HashSet<WidgetCatalog>();\r
-       \r
-       public Long getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Long roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-\r
-       public App getApp() {\r
-               return app;\r
-       }\r
-\r
-       public void setApp(App app) {\r
-               this.app = app;\r
-       }\r
-       \r
-       \r
-\r
-       public Set<WidgetCatalog> getWidgets() {\r
-               return widgets;\r
-       }\r
-\r
-       public void setWidgets(Set<WidgetCatalog> widgets) {\r
-               this.widgets = widgets;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "Role [roleId=" + roleId + ", roleName=" + roleName + ", app=" + app + "]";\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+//@Entity
+//@Table(name = "FN_ROLE")
+public class RoleApp implements Serializable{
+       private static final long serialVersionUID = 1L;
+
+       //@Id
+       //@Column(name = "ROLE_ID")
+       //@GeneratedValue(strategy=GenerationType.AUTO)
+       private Long roleId;
+       
+       
+       //@Column(name = "ROLE_Name")
+       private String roleName;
+       
+       //@ManyToOne(fetch = FetchType.EAGER)
+       //@JoinColumn(name="APP_ID")
+       private App app;
+       
+       //@JsonIgnore
+       //@ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, mappedBy="widgetRoles")
+       private Set<WidgetCatalog> widgets;
+
+       /*@PreRemove
+       private void removeGroupsFromUsers() {
+           for (WidgetCatalog w : widgets) {
+               w.getWidgetRoles().remove(this);
+           }
+       }*/
+       
+       /*@ManyToOne
+       @JoinColumn(name = "WIDGET_ID", nullable = false)
+       WidgetCatalog widgetCatalog;*/
+
+       //@JsonIgnore
+       //@ManyToMany(mappedBy = "widgetRoles")
+       //@ManyToMany(fetch = FetchType.EAGER, mappedBy = "widgetRoles")
+       //private Set<WidgetCatalog> widgets  = new HashSet<WidgetCatalog>();
+       
+       public Long getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Long roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+
+       public App getApp() {
+               return app;
+       }
+
+       public void setApp(App app) {
+               this.app = app;
+       }
+       
+       
+
+       public Set<WidgetCatalog> getWidgets() {
+               return widgets;
+       }
+
+       public void setWidgets(Set<WidgetCatalog> widgets) {
+               this.widgets = widgets;
+       }
+
+       @Override
+       public String toString() {
+               return "Role [roleId=" + roleId + ", roleName=" + roleName + ", app=" + app + "]";
+       }
+       
+}
index f966c96..49333c4 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.util.Date;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * A shared context is a key-value pair in a session. All shared-context objects\r
- * should be dropped when a session is destroyed. Because there's always a\r
- * chance of missing that event, this object notes its creation time so that it\r
- * can be expired after a suitable time interval.\r
- */\r
-@Entity\r
-@Table(name = "fn_shared_context")\r
-public class SharedContext extends DomainVo {\r
-\r
-       // generated\r
-       private static final long serialVersionUID = 7287469622586677888L;\r
-\r
-       @Id\r
-       @GeneratedValue(strategy = GenerationType.AUTO)\r
-       private Long id;\r
-       private Date create_time;\r
-       private String context_id;\r
-       private String ckey;\r
-       private String cvalue;\r
-\r
-       /**\r
-        * Mandatory no-argument constructor\r
-        */\r
-       public SharedContext() {\r
-       }\r
-\r
-       /**\r
-        * Convenience constructor. The database ID and creation timestamp are\r
-        * populated when the object is added to the database.\r
-        */\r
-       public SharedContext(final String contextId, final String key, final String value) {\r
-               this.context_id = contextId;\r
-               this.ckey = key;\r
-               this.cvalue = value;\r
-       }\r
-\r
-       /**\r
-        * Gets the database row ID.\r
-        * \r
-        * @return Database row ID\r
-        */\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       /**\r
-        * Sets the database row ID.\r
-        * \r
-        * @param id\r
-        */\r
-       public void setId(final Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       /**\r
-        * Gets the creation time\r
-        * \r
-        * @return Creation time as a Date\r
-        */\r
-       public Date getCreate_time() {\r
-               return create_time;\r
-       }\r
-\r
-       /**\r
-        * Sets the creation time\r
-        * \r
-        * @param create_time\r
-        */\r
-       public void setCreate_time(final Date create_time) {\r
-               this.create_time = create_time;\r
-       }\r
-\r
-       /**\r
-        * Gets the context ID\r
-        * \r
-        * @return Context ID\r
-        */\r
-       public String getContext_id() {\r
-               return context_id;\r
-       }\r
-\r
-       /**\r
-        * Sets the context ID\r
-        * \r
-        * @param context_id\r
-        */\r
-       public void setContext_id(final String context_id) {\r
-               this.context_id = context_id;\r
-       }\r
-\r
-       /**\r
-        * Gets the key of the key-value pair. Called ckey because "key" is a\r
-        * reserved word in Mysql.\r
-        * \r
-        * @return The key\r
-        */\r
-       public String getCkey() {\r
-               return ckey;\r
-       }\r
-\r
-       /**\r
-        * Sets the key of the key-value pair.\r
-        * \r
-        * @param ckey\r
-        */\r
-       public void setCkey(final String ckey) {\r
-               this.ckey = ckey;\r
-       }\r
-\r
-       /**\r
-        * Gets the value of the key-value pair. Called cvalue because "value" is a\r
-        * reserved word in Mysql.\r
-        * \r
-        * @return\r
-        */\r
-       public String getCvalue() {\r
-               return cvalue;\r
-       }\r
-\r
-       /**\r
-        * Sets the value of the key-value pair.\r
-        * \r
-        * @param cvalue\r
-        */\r
-       public void setCvalue(final String cvalue) {\r
-               this.cvalue = cvalue;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * A shared context is a key-value pair in a session. All shared-context objects
+ * should be dropped when a session is destroyed. Because there's always a
+ * chance of missing that event, this object notes its creation time so that it
+ * can be expired after a suitable time interval.
+ */
+@Entity
+@Table(name = "fn_shared_context")
+public class SharedContext extends DomainVo {
+
+       // generated
+       private static final long serialVersionUID = 7287469622586677888L;
+
+       @Id
+       @GeneratedValue(strategy = GenerationType.AUTO)
+       private Long id;
+       private Date create_time;
+       private String context_id;
+       private String ckey;
+       private String cvalue;
+
+       /**
+        * Mandatory no-argument constructor
+        */
+       public SharedContext() {
+       }
+
+       /**
+        * Convenience constructor. The database ID and creation timestamp are
+        * populated when the object is added to the database.
+        * 
+        * @param contextId
+        *            context ID
+        * @param key
+        *            context key
+        * @param value
+        *            context value
+        */
+       public SharedContext(final String contextId, final String key, final String value) {
+               this.context_id = contextId;
+               this.ckey = key;
+               this.cvalue = value;
+       }
+
+       /**
+        * Gets the database row ID.
+        * 
+        * @return Database row ID
+        */
+       public Long getId() {
+               return id;
+       }
+
+       /**
+        * Sets the database row ID.
+        * 
+        * @param id
+        *            database row ID
+        */
+       public void setId(final Long id) {
+               this.id = id;
+       }
+
+       /**
+        * Gets the creation time
+        * 
+        * @return Creation time as a Date
+        */
+       public Date getCreate_time() {
+               return create_time;
+       }
+
+       /**
+        * Sets the creation time
+        * 
+        * @param create_time
+        *            Date
+        */
+       public void setCreate_time(final Date create_time) {
+               this.create_time = create_time;
+       }
+
+       /**
+        * Gets the context ID
+        * 
+        * @return Context ID
+        */
+       public String getContext_id() {
+               return context_id;
+       }
+
+       /**
+        * Sets the context ID
+        * 
+        * @param context_id
+        *            String
+        */
+       public void setContext_id(final String context_id) {
+               this.context_id = context_id;
+       }
+
+       /**
+        * Gets the key of the key-value pair. Called ckey because "key" is a
+        * reserved word in Mysql.
+        * 
+        * @return The key
+        */
+       public String getCkey() {
+               return ckey;
+       }
+
+       /**
+        * Sets the key of the key-value pair.
+        * 
+        * @param ckey
+        *            String
+        */
+       public void setCkey(final String ckey) {
+               this.ckey = ckey;
+       }
+
+       /**
+        * Gets the value of the key-value pair. Called cvalue because "value" is a
+        * reserved word in Mysql.
+        * 
+        * @return value
+        */
+       public String getCvalue() {
+               return cvalue;
+       }
+
+       /**
+        * Sets the value of the key-value pair.
+        * 
+        * @param cvalue
+        *            value
+        */
+       public void setCvalue(final String cvalue) {
+               this.cvalue = cvalue;
+       }
+
+}
index 1483f34..83cce3e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-\r
-public class UserRoles implements Serializable {\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       /* \r
-       private static final HashMap<Long, String> rolesDictionary;\r
-       // remove hard coded roles\r
-       static {\r
-               rolesDictionary = new HashMap<Long, String>();\r
-               rolesDictionary.put(Long.valueOf(SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID)).longValue(), "superAdmin");\r
-               rolesDictionary.put(Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID)).longValue(), "admin");\r
-       }\r
-       */\r
-\r
-       public UserRoles(UserRole user) {\r
-               setOrgUserId(user.getOrgUserId());\r
-               setFirstName(user.getFirstName());\r
-               setLastName(user.getLastName());\r
-               setGuestSession(user.getUser_Id()==-1 ? true : false);\r
-\r
-               addRole(user.getRoleName());\r
-       }\r
-\r
-       public void addRole(String roleName) {\r
-               //String normalizedRole = normalizeRole(roleId);\r
-               if (!getRoles().contains(roleName)) {\r
-                       this.roles.add(roleName);\r
-               }\r
-       }\r
-\r
-       /*\r
-       public static String normalizeRole(Long role) {\r
-               String roleTranslated = rolesDictionary.get(role);\r
-               return roleTranslated == null ? "user" : roleTranslated;\r
-       }\r
-       */\r
-\r
-       private String orgUserId;\r
-       private String firstName;\r
-       private String lastName;\r
-       private boolean guestSession;\r
-\r
-       // TODO: Make into set\r
-       private List<String> roles = new ArrayList<String>();\r
-\r
-       public String getFirstName() {\r
-               return firstName;\r
-       }\r
-\r
-       public void setFirstName(String firstName) {\r
-               this.firstName = firstName;\r
-       }\r
-\r
-       public String getLastName() {\r
-               return lastName;\r
-       }\r
-\r
-       public void setLastName(String lastName) {\r
-               this.lastName = lastName;\r
-       }\r
-\r
-       public String getOrgUserId() {\r
-               return orgUserId;\r
-       }\r
-\r
-       public void setOrgUserId(String orgUserId) {\r
-               this.orgUserId = orgUserId;\r
-       }\r
-\r
-       public List<String> getRoles() {\r
-               return roles;\r
-       }\r
-\r
-       public void setRoles(List<String> roles) {\r
-               this.roles = roles;\r
-       }\r
-\r
-       public void setGuestSession(boolean guestSession) {\r
-               this.guestSession = guestSession;\r
-       }\r
-\r
-       public boolean getGuestSession() {\r
-               return this.guestSession;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+
+public class UserRoles implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       /* 
+       private static final HashMap<Long, String> rolesDictionary;
+       // remove hard coded roles
+       static {
+               rolesDictionary = new HashMap<Long, String>();
+               rolesDictionary.put(Long.valueOf(SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID)).longValue(), "superAdmin");
+               rolesDictionary.put(Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID)).longValue(), "admin");
+       }
+       */
+
+       public UserRoles(UserRole user) {
+               setOrgUserId(user.getOrgUserId());
+               setFirstName(user.getFirstName());
+               setLastName(user.getLastName());
+               setGuestSession(user.getUser_Id()==-1 ? true : false);
+
+               addRole(user.getRoleName());
+       }
+
+       public void addRole(String roleName) {
+               //String normalizedRole = normalizeRole(roleId);
+               if (!getRoles().contains(roleName)) {
+                       this.roles.add(roleName);
+               }
+       }
+
+       /*
+       public static String normalizeRole(Long role) {
+               String roleTranslated = rolesDictionary.get(role);
+               return roleTranslated == null ? "user" : roleTranslated;
+       }
+       */
+
+       private String orgUserId;
+       private String firstName;
+       private String lastName;
+       private boolean guestSession;
+
+       // TODO: Make into set
+       private List<String> roles = new ArrayList<String>();
+
+       public String getFirstName() {
+               return firstName;
+       }
+
+       public void setFirstName(String firstName) {
+               this.firstName = firstName;
+       }
+
+       public String getLastName() {
+               return lastName;
+       }
+
+       public void setLastName(String lastName) {
+               this.lastName = lastName;
+       }
+
+       public String getOrgUserId() {
+               return orgUserId;
+       }
+
+       public void setOrgUserId(String orgUserId) {
+               this.orgUserId = orgUserId;
+       }
+
+       public List<String> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(List<String> roles) {
+               this.roles = roles;
+       }
+
+       public void setGuestSession(boolean guestSession) {
+               this.guestSession = guestSession;
+       }
+
+       public boolean getGuestSession() {
+               return this.guestSession;
+       }
+}
index c2ef3c0..302195f 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class Widget extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       private String name;\r
-\r
-       private Integer width;\r
-\r
-       private Integer height;\r
-\r
-       private String url;\r
-\r
-       private Long appId;\r
-\r
-       public Widget() {\r
-               // Attention!!!\r
-               // We set here all default values. We also place protection\r
-               // into setters for fields with default values.\r
-               // If we don't use such protection we are able to place null\r
-               // to these fields and save such fields into DB even if DB has\r
-               // default values for these fields.\r
-               this.name = "";\r
-               this.width = new Integer(0);\r
-               this.height = new Integer(0);\r
-               this.url = "";\r
-       }\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               if (StringUtils.isEmpty(name)) {\r
-                       name = "";\r
-               }\r
-               this.name = name;\r
-       }\r
-\r
-       public Integer getWidth() {\r
-               return width;\r
-       }\r
-\r
-       public void setWidth(Integer width) {\r
-               if (width == null) {\r
-                       width = new Integer(0);\r
-               }\r
-               this.width = width;\r
-       }\r
-\r
-       public Integer getHeight() {\r
-               return height;\r
-       }\r
-\r
-       public void setHeight(Integer height) {\r
-               if (height == null) {\r
-                       height = new Integer(0);\r
-               }\r
-               this.height = height;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               if (StringUtils.isEmpty(url)) {\r
-                       url = "";\r
-               }\r
-               this.url = url;\r
-       }\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.apache.commons.lang.StringUtils;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class Widget extends DomainVo {
+
+       private static final long serialVersionUID = 1L;
+
+       private String name;
+
+       private Integer width;
+
+       private Integer height;
+
+       private String url;
+
+       private Long appId;
+
+       public Widget() {
+               // Attention!!!
+               // We set here all default values. We also place protection
+               // into setters for fields with default values.
+               // If we don't use such protection we are able to place null
+               // to these fields and save such fields into DB even if DB has
+               // default values for these fields.
+               this.name = "";
+               this.width = new Integer(0);
+               this.height = new Integer(0);
+               this.url = "";
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               if (StringUtils.isEmpty(name)) {
+                       name = "";
+               }
+               this.name = name;
+       }
+
+       public Integer getWidth() {
+               return width;
+       }
+
+       public void setWidth(Integer width) {
+               if (width == null) {
+                       width = new Integer(0);
+               }
+               this.width = width;
+       }
+
+       public Integer getHeight() {
+               return height;
+       }
+
+       public void setHeight(Integer height) {
+               if (height == null) {
+                       height = new Integer(0);
+               }
+               this.height = height;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               if (StringUtils.isEmpty(url)) {
+                       url = "";
+               }
+               this.url = url;
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+}
index 605a41d..5481a22 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.io.Serializable;\r
-import java.util.Set;\r
-\r
-public class WidgetCatalog implements Serializable{\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       private long id;\r
-       \r
-       private String name;\r
-       \r
-       private String desc;\r
-       \r
-       private String fileLocation;\r
-       \r
-       private String allowAllUser;\r
-       \r
-       private Long serviceId;\r
-       \r
-       private String sortOrder;\r
-\r
-       private String statusCode;\r
-       \r
-       private Set<RoleApp> widgetRoles;\r
-       \r
-       public long getId() {\r
-               return id;\r
-       }\r
-       public void setId(long id) {\r
-               this.id = id;\r
-       }\r
-       public String getName() {\r
-               return name;\r
-       }\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-       \r
-       public Long getServiceId() {\r
-               return serviceId;\r
-       }\r
-       public void setServiceId(Long serviceId) {\r
-               this.serviceId = serviceId;\r
-       }\r
-       public String getDesc() {\r
-               return desc;\r
-       }\r
-       public void setDesc(String desc) {\r
-               this.desc = desc;\r
-       }\r
-       public String getFileLocation() {\r
-               return fileLocation;\r
-       }\r
-       public void setFileLocation(String fileLocation) {\r
-               this.fileLocation = fileLocation;\r
-       }\r
-       \r
-       public String getAllowAllUser() {\r
-               return allowAllUser;\r
-       }\r
-       public void setAllowAllUser(String allowAllUser) {\r
-               this.allowAllUser = allowAllUser;\r
-       }\r
-       public Set<RoleApp> getWidgetRoles() {\r
-               return widgetRoles;\r
-       }\r
-       public void setWidgetRoles(Set<RoleApp> widgetRoles) {\r
-               this.widgetRoles = widgetRoles;\r
-       }\r
-       \r
-       public String getSortOrder() {\r
-               return sortOrder;\r
-       }\r
-       public void setSortOrder(String sortOrder) {\r
-               this.sortOrder = sortOrder;\r
-       }\r
-       public String getStatusCode() {\r
-               return statusCode;\r
-       }\r
-       public void setStatusCode(String statusCode) {\r
-               this.statusCode = statusCode;\r
-       }\r
-       @Override\r
-       public String toString() {\r
-               return "WidgetCatalog [id=" + id + ", name=" + name + ", desc=" + desc + ", fileLocation=" + fileLocation\r
-                               + ", allowAllUser=" + allowAllUser + "]";\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.io.Serializable;
+import java.util.Set;
+
+public class WidgetCatalog implements Serializable{
+
+       private static final long serialVersionUID = 1L;
+
+       private long id;
+       
+       private String name;
+       
+       private String desc;
+       
+       private String fileLocation;
+       
+       private String allowAllUser;
+       
+       private Long serviceId;
+       
+       private String sortOrder;
+
+       private String statusCode;
+       
+       private Set<RoleApp> widgetRoles;
+       
+       public long getId() {
+               return id;
+       }
+       public void setId(long id) {
+               this.id = id;
+       }
+       public String getName() {
+               return name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       public Long getServiceId() {
+               return serviceId;
+       }
+       public void setServiceId(Long serviceId) {
+               this.serviceId = serviceId;
+       }
+       public String getDesc() {
+               return desc;
+       }
+       public void setDesc(String desc) {
+               this.desc = desc;
+       }
+       public String getFileLocation() {
+               return fileLocation;
+       }
+       public void setFileLocation(String fileLocation) {
+               this.fileLocation = fileLocation;
+       }
+       
+       public String getAllowAllUser() {
+               return allowAllUser;
+       }
+       public void setAllowAllUser(String allowAllUser) {
+               this.allowAllUser = allowAllUser;
+       }
+       public Set<RoleApp> getWidgetRoles() {
+               return widgetRoles;
+       }
+       public void setWidgetRoles(Set<RoleApp> widgetRoles) {
+               this.widgetRoles = widgetRoles;
+       }
+       
+       public String getSortOrder() {
+               return sortOrder;
+       }
+       public void setSortOrder(String sortOrder) {
+               this.sortOrder = sortOrder;
+       }
+       public String getStatusCode() {
+               return statusCode;
+       }
+       public void setStatusCode(String statusCode) {
+               this.statusCode = statusCode;
+       }
+       @Override
+       public String toString() {
+               return "WidgetCatalog [id=" + id + ", name=" + name + ", desc=" + desc + ", fileLocation=" + fileLocation
+                               + ", allowAllUser=" + allowAllUser + "]";
+       }
+}
index c72780a..6e750db 100644 (file)
@@ -1,90 +1,90 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-public class WidgetCatalogParameter extends DomainVo{\r
-       \r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public WidgetCatalogParameter() {\r
-\r
-       }\r
-       private Long id;\r
-\r
-       private Long widgetId;\r
-\r
-       private Long userId;\r
-\r
-       private Long paramId;\r
-\r
-       private String user_value;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public Long getWidgetId() {\r
-               return widgetId;\r
-       }\r
-\r
-       public void setWidgetId(Long widgetId) {\r
-               this.widgetId = widgetId;\r
-       }\r
-\r
-       public String getUser_value() {\r
-               return user_value;\r
-       }\r
-\r
-       public void setUser_value(String user_value) {\r
-               this.user_value = user_value;\r
-       }\r
-\r
-       public Long getParamId() {\r
-               return paramId;\r
-       }\r
-\r
-       public void setParamId(Long paramId) {\r
-               this.paramId = paramId;\r
-       }\r
-\r
-       public Long getUserId() {\r
-               return userId;\r
-       }\r
-\r
-       public void setUserId(Long userId) {\r
-               this.userId = userId;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "WidgetCatalogParameter [id=" + id + ", widgetId=" + widgetId + ", userId=" + userId + ", paramId="\r
-                               + paramId + ", user_value=" + user_value + "]";\r
-       }\r
-\r
-       \r
-\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+public class WidgetCatalogParameter extends DomainVo{
+       
+       private static final long serialVersionUID = 1L;
+
+       public WidgetCatalogParameter() {
+
+       }
+       private Long id;
+
+       private Long widgetId;
+
+       private Long userId;
+
+       private Long paramId;
+
+       private String user_value;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public Long getWidgetId() {
+               return widgetId;
+       }
+
+       public void setWidgetId(Long widgetId) {
+               this.widgetId = widgetId;
+       }
+
+       public String getUser_value() {
+               return user_value;
+       }
+
+       public void setUser_value(String user_value) {
+               this.user_value = user_value;
+       }
+
+       public Long getParamId() {
+               return paramId;
+       }
+
+       public void setParamId(Long paramId) {
+               this.paramId = paramId;
+       }
+
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+
+       @Override
+       public String toString() {
+               return "WidgetCatalogParameter [id=" + id + ", widgetId=" + widgetId + ", userId=" + userId + ", paramId="
+                               + paramId + ", user_value=" + user_value + "]";
+       }
+
+       
+
+       
+}
index 884ec14..b41f985 100644 (file)
@@ -1,70 +1,70 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-public class WidgetParameterResult {\r
-       \r
-       private Long param_id;\r
-       \r
-       private String param_key;\r
-       \r
-       private String user_value;\r
-       \r
-       private String default_value;\r
-\r
-       public Long getParam_id() {\r
-               return param_id;\r
-       }\r
-\r
-       public void setParam_id(Long param_id) {\r
-               this.param_id = param_id;\r
-       }\r
-\r
-       public String getParam_key() {\r
-               return param_key;\r
-       }\r
-\r
-       public void setParam_key(String param_key) {\r
-               this.param_key = param_key;\r
-       }\r
-\r
-       public String getUser_value() {\r
-               return user_value;\r
-       }\r
-\r
-       public void setUser_value(String user_value) {\r
-               this.user_value = user_value;\r
-       }\r
-\r
-       public String getDefault_value() {\r
-               return default_value;\r
-       }\r
-\r
-       public void setDefault_value(String default_value) {\r
-               this.default_value = default_value;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "WidgetParameterResult [param_id=" + param_id + ", param_key=" + param_key + ", user_value=" + user_value\r
-                               + ", default_value=" + default_value + "]";\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+public class WidgetParameterResult {
+       
+       private Long param_id;
+       
+       private String param_key;
+       
+       private String user_value;
+       
+       private String default_value;
+
+       public Long getParam_id() {
+               return param_id;
+       }
+
+       public void setParam_id(Long param_id) {
+               this.param_id = param_id;
+       }
+
+       public String getParam_key() {
+               return param_key;
+       }
+
+       public void setParam_key(String param_key) {
+               this.param_key = param_key;
+       }
+
+       public String getUser_value() {
+               return user_value;
+       }
+
+       public void setUser_value(String user_value) {
+               this.user_value = user_value;
+       }
+
+       public String getDefault_value() {
+               return default_value;
+       }
+
+       public void setDefault_value(String default_value) {
+               this.default_value = default_value;
+       }
+
+       @Override
+       public String toString() {
+               return "WidgetParameterResult [param_id=" + param_id + ", param_key=" + param_key + ", user_value=" + user_value
+                               + ", default_value=" + default_value + "]";
+       }
+
+}
index 9200add..c53df6c 100644 (file)
@@ -1,54 +1,54 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.domain;\r
-\r
-import java.nio.charset.Charset;\r
-\r
-import org.apache.commons.codec.binary.Base64;\r
-import org.springframework.http.HttpHeaders;\r
-\r
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-public class WidgetServiceHeaders {\r
-       \r
-       private static HttpHeaders widgetHeaders;\r
-       \r
-       private WidgetServiceHeaders(){}\r
-       \r
-       public static HttpHeaders getInstance() throws Exception{\r
-               if(null == widgetHeaders){\r
-                  return new HttpHeaders(){{\r
-                               \r
-                                   String username = EcompPortalUtils.getPropertyOrDefault("microservices.widget.username", "widget_user");\r
-                                   String password = CipherUtil.decrypt(EcompPortalUtils.getPropertyOrDefault("microservices.widget.password", "widget_password"));\r
-                               String auth = username + ":" + password;\r
-                               byte[] encodedAuth = Base64.encodeBase64( \r
-                                  auth.getBytes(Charset.forName("US-ASCII")) );\r
-                               String authHeader = "Basic " + new String( encodedAuth );\r
-                               set( "Authorization", authHeader );\r
-                             }\r
-                          };\r
-               }\r
-               else \r
-                       return widgetHeaders;\r
-               \r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.domain;
+
+import java.nio.charset.Charset;
+
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.http.HttpHeaders;
+
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+public class WidgetServiceHeaders {
+       
+       private static HttpHeaders widgetHeaders;
+       
+       private WidgetServiceHeaders(){}
+       
+       public static HttpHeaders getInstance() throws Exception{
+               if(null == widgetHeaders){
+                  return new HttpHeaders(){{
+                               
+                                   String username = EcompPortalUtils.getPropertyOrDefault("microservices.widget.username", "widget_user");
+                                   String password = CipherUtil.decrypt(EcompPortalUtils.getPropertyOrDefault("microservices.widget.password", "widget_password"));
+                               String auth = username + ":" + password;
+                               byte[] encodedAuth = Base64.encodeBase64( 
+                                  auth.getBytes(Charset.forName("US-ASCII")) );
+                               String authHeader = "Basic " + new String( encodedAuth );
+                               set( "Authorization", authHeader );
+                             }
+                          };
+               }
+               else 
+                       return widgetHeaders;
+               
+       }
+}
index ec20b4f..9cce4c0 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-/**\r
- * This model of an application catalog entry has some EPApp fields plus\r
- * additional fields to indicate access(ible) and select(ed) statuses.\r
- */\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class AppCatalogItem extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 6619663784935017846L;\r
-\r
-       @Id\r
-       private Long id;\r
-       private String name;\r
-       private String imageUrl;\r
-       private String description;\r
-       private String notes;\r
-       private String url;\r
-       private String alternateUrl;\r
-       private Boolean restricted;\r
-       private Boolean open;\r
-       private Boolean access;\r
-       private Boolean select;\r
-       private Boolean pending;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public String getName() {\r
-               return name;\r
-       }\r
-\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-\r
-       public String getImageUrl() {\r
-               return imageUrl;\r
-       }\r
-\r
-       public void setImageUrl(String imageUrl) {\r
-               this.imageUrl = imageUrl;\r
-       }\r
-\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-\r
-       public String getNotes() {\r
-               return notes;\r
-       }\r
-\r
-       public void setNotes(String notes) {\r
-               this.notes = notes;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public String getAlternateUrl() {\r
-               return alternateUrl;\r
-       }\r
-\r
-       public void setAlternateUrl(String alternateUrl) {\r
-               this.alternateUrl = alternateUrl;\r
-       }\r
-\r
-       public Boolean getRestricted() {\r
-               return restricted;\r
-       }\r
-\r
-       public void setRestricted(Boolean restricted) {\r
-               this.restricted = restricted;\r
-       }\r
-\r
-       public Boolean getOpen() {\r
-               return open;\r
-       }\r
-\r
-       public void setOpen(Boolean open) {\r
-               this.open = open;\r
-       }\r
-\r
-       public Boolean getAccess() {\r
-               return access;\r
-       }\r
-\r
-       public void setAccess(Boolean access) {\r
-               this.access = access;\r
-       }\r
-\r
-       public Boolean getSelect() {\r
-               return select;\r
-       }\r
-\r
-       public void setSelect(Boolean select) {\r
-               this.select = select;\r
-       }\r
-\r
-       public Boolean getPending() {\r
-               return pending;\r
-       }\r
-\r
-       public void setPending(Boolean pending) {\r
-               this.pending = pending;\r
-       }\r
-\r
-       public static long getSerialversionuid() {\r
-               return serialVersionUID;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select\r
-                               + ", pending=" + pending + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((access == null) ? 0 : access.hashCode());\r
-               result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());\r
-               result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-               result = prime * result + ((id == null) ? 0 : id.hashCode());\r
-               result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());\r
-               result = prime * result + ((name == null) ? 0 : name.hashCode());\r
-               result = prime * result + ((notes == null) ? 0 : notes.hashCode());\r
-               result = prime * result + ((open == null) ? 0 : open.hashCode());\r
-               result = prime * result + ((pending == null) ? 0 : pending.hashCode());\r
-               result = prime * result + ((restricted == null) ? 0 : restricted.hashCode());\r
-               result = prime * result + ((select == null) ? 0 : select.hashCode());\r
-               result = prime * result + ((url == null) ? 0 : url.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppCatalogItem other = (AppCatalogItem) obj;\r
-               if (access == null) {\r
-                       if (other.access != null)\r
-                               return false;\r
-               } else if (!access.equals(other.access))\r
-                       return false;\r
-               if (alternateUrl == null) {\r
-                       if (other.alternateUrl != null)\r
-                               return false;\r
-               } else if (!alternateUrl.equals(other.alternateUrl))\r
-                       return false;\r
-               if (description == null) {\r
-                       if (other.description != null)\r
-                               return false;\r
-               } else if (!description.equals(other.description))\r
-                       return false;\r
-               if (id == null) {\r
-                       if (other.id != null)\r
-                               return false;\r
-               } else if (!id.equals(other.id))\r
-                       return false;\r
-               if (imageUrl == null) {\r
-                       if (other.imageUrl != null)\r
-                               return false;\r
-               } else if (!imageUrl.equals(other.imageUrl))\r
-                       return false;\r
-               if (name == null) {\r
-                       if (other.name != null)\r
-                               return false;\r
-               } else if (!name.equals(other.name))\r
-                       return false;\r
-               if (notes == null) {\r
-                       if (other.notes != null)\r
-                               return false;\r
-               } else if (!notes.equals(other.notes))\r
-                       return false;\r
-               if (open == null) {\r
-                       if (other.open != null)\r
-                               return false;\r
-               } else if (!open.equals(other.open))\r
-                       return false;\r
-               if (pending == null) {\r
-                       if (other.pending != null)\r
-                               return false;\r
-               } else if (!pending.equals(other.pending))\r
-                       return false;\r
-               if (restricted == null) {\r
-                       if (other.restricted != null)\r
-                               return false;\r
-               } else if (!restricted.equals(other.restricted))\r
-                       return false;\r
-               if (select == null) {\r
-                       if (other.select != null)\r
-                               return false;\r
-               } else if (!select.equals(other.select))\r
-                       return false;\r
-               if (url == null) {\r
-                       if (other.url != null)\r
-                               return false;\r
-               } else if (!url.equals(other.url))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * This model of an application catalog entry has some EPApp fields plus
+ * additional fields to indicate access(ible) and select(ed) statuses.
+ */
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AppCatalogItem extends DomainVo {
+
+       private static final long serialVersionUID = 6619663784935017846L;
+
+       @Id
+       private Long id;
+       private String name;
+       private String mlAppName;
+       private String imageUrl;
+       private String description;
+       private String notes;
+       private String url;
+       private String alternateUrl;
+       private Boolean restricted;
+       private Boolean open;
+       private Boolean access;
+       private Boolean select;
+       private Boolean pending;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getMlAppName() {
+               return mlAppName;
+       }
+
+       public void setMlAppName(String mlAppName) {
+               this.mlAppName = mlAppName;
+       }
+
+       public String getImageUrl() {
+               return imageUrl;
+       }
+
+       public void setImageUrl(String imageUrl) {
+               this.imageUrl = imageUrl;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getNotes() {
+               return notes;
+       }
+
+       public void setNotes(String notes) {
+               this.notes = notes;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getAlternateUrl() {
+               return alternateUrl;
+       }
+
+       public void setAlternateUrl(String alternateUrl) {
+               this.alternateUrl = alternateUrl;
+       }
+
+       public Boolean getRestricted() {
+               return restricted;
+       }
+
+       public void setRestricted(Boolean restricted) {
+               this.restricted = restricted;
+       }
+
+       public Boolean getOpen() {
+               return open;
+       }
+
+       public void setOpen(Boolean open) {
+               this.open = open;
+       }
+
+       public Boolean getAccess() {
+               return access;
+       }
+
+       public void setAccess(Boolean access) {
+               this.access = access;
+       }
+
+       public Boolean getSelect() {
+               return select;
+       }
+
+       public void setSelect(Boolean select) {
+               this.select = select;
+       }
+
+       public Boolean getPending() {
+               return pending;
+       }
+
+       public void setPending(Boolean pending) {
+               this.pending = pending;
+       }
+
+       public static long getSerialversionuid() {
+               return serialVersionUID;
+       }
+
+       @Override
+       public String toString() {
+               return "AppCatalogItem [id=" + id + ", name=" + name + ", access=" + access + ", select=" + select
+                               + ", pending=" + pending + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((access == null) ? 0 : access.hashCode());
+               result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
+               result = prime * result + ((description == null) ? 0 : description.hashCode());
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
+               result = prime * result + ((name == null) ? 0 : name.hashCode());
+               result = prime * result + ((notes == null) ? 0 : notes.hashCode());
+               result = prime * result + ((open == null) ? 0 : open.hashCode());
+               result = prime * result + ((pending == null) ? 0 : pending.hashCode());
+               result = prime * result + ((restricted == null) ? 0 : restricted.hashCode());
+               result = prime * result + ((select == null) ? 0 : select.hashCode());
+               result = prime * result + ((url == null) ? 0 : url.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppCatalogItem other = (AppCatalogItem) obj;
+               if (access == null) {
+                       if (other.access != null)
+                               return false;
+               } else if (!access.equals(other.access))
+                       return false;
+               if (alternateUrl == null) {
+                       if (other.alternateUrl != null)
+                               return false;
+               } else if (!alternateUrl.equals(other.alternateUrl))
+                       return false;
+               if (description == null) {
+                       if (other.description != null)
+                               return false;
+               } else if (!description.equals(other.description))
+                       return false;
+               if (id == null) {
+                       if (other.id != null)
+                               return false;
+               } else if (!id.equals(other.id))
+                       return false;
+               if (imageUrl == null) {
+                       if (other.imageUrl != null)
+                               return false;
+               } else if (!imageUrl.equals(other.imageUrl))
+                       return false;
+               if (name == null) {
+                       if (other.name != null)
+                               return false;
+               } else if (!name.equals(other.name))
+                       return false;
+               if (notes == null) {
+                       if (other.notes != null)
+                               return false;
+               } else if (!notes.equals(other.notes))
+                       return false;
+               if (open == null) {
+                       if (other.open != null)
+                               return false;
+               } else if (!open.equals(other.open))
+                       return false;
+               if (pending == null) {
+                       if (other.pending != null)
+                               return false;
+               } else if (!pending.equals(other.pending))
+                       return false;
+               if (restricted == null) {
+                       if (other.restricted != null)
+                               return false;
+               } else if (!restricted.equals(other.restricted))
+                       return false;
+               if (select == null) {
+                       if (other.select != null)
+                               return false;
+               } else if (!select.equals(other.select))
+                       return false;
+               if (url == null) {
+                       if (other.url != null)
+                               return false;
+               } else if (!url.equals(other.url))
+                       return false;
+               return true;
+       }
+
+}
index b160143..9b35beb 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-/**\r
- * Carries row information for the functional table on the Contact Us page.\r
- */\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class AppCategoryFunctionsItem extends DomainVo {\r
-\r
-       private static final long serialVersionUID = -1573834082471206458L;\r
-\r
-       @Id\r
-       private String rowId;\r
-       private String appId;\r
-       private String application;\r
-       private String category;\r
-       private String functions;\r
-\r
-       public String getRowId() {\r
-               return rowId;\r
-       }\r
-\r
-       public void setRowId(String rowId) {\r
-               this.rowId = rowId;\r
-       }\r
-\r
-       public String getAppId() {\r
-               return appId;\r
-       }\r
-       \r
-       public void setAppId(String appId) {\r
-               this.appId = appId;\r
-       }\r
-       \r
-       public String getApplication() {\r
-               return application;\r
-       }\r
-\r
-       public void setApplication(String appName) {\r
-               this.application = appName;\r
-       }\r
-\r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-\r
-       public String getFunctions() {\r
-               return functions;\r
-       }\r
-\r
-       public void setFunctions(String functions) {\r
-               this.functions = functions;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppCategoryFunctionsItem [rowId=" + rowId + ", appId=" + appId + ", application=" + application\r
-                               + ", category=" + category + ", functions=" + functions + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appId == null) ? 0 : appId.hashCode());\r
-               result = prime * result + ((application == null) ? 0 : application.hashCode());\r
-               result = prime * result + ((category == null) ? 0 : category.hashCode());\r
-               result = prime * result + ((functions == null) ? 0 : functions.hashCode());\r
-               result = prime * result + ((rowId == null) ? 0 : rowId.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppCategoryFunctionsItem other = (AppCategoryFunctionsItem) obj;\r
-               if (appId == null) {\r
-                       if (other.appId != null)\r
-                               return false;\r
-               } else if (!appId.equals(other.appId))\r
-                       return false;\r
-               if (application == null) {\r
-                       if (other.application != null)\r
-                               return false;\r
-               } else if (!application.equals(other.application))\r
-                       return false;\r
-               if (category == null) {\r
-                       if (other.category != null)\r
-                               return false;\r
-               } else if (!category.equals(other.category))\r
-                       return false;\r
-               if (functions == null) {\r
-                       if (other.functions != null)\r
-                               return false;\r
-               } else if (!functions.equals(other.functions))\r
-                       return false;\r
-               if (rowId == null) {\r
-                       if (other.rowId != null)\r
-                               return false;\r
-               } else if (!rowId.equals(other.rowId))\r
-                       return false;\r
-               return true;\r
-       }\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * Carries row information for the functional table on the Contact Us page.
+ */
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AppCategoryFunctionsItem extends DomainVo {
+
+       private static final long serialVersionUID = -1573834082471206458L;
+
+       @Id
+       private String rowId;
+       private String appId;
+       private String application;
+       private String category;
+       private String functions;
+
+       public String getRowId() {
+               return rowId;
+       }
+
+       public void setRowId(String rowId) {
+               this.rowId = rowId;
+       }
+
+       public String getAppId() {
+               return appId;
+       }
+       
+       public void setAppId(String appId) {
+               this.appId = appId;
+       }
+       
+       public String getApplication() {
+               return application;
+       }
+
+       public void setApplication(String appName) {
+               this.application = appName;
+       }
+
+       public String getCategory() {
+               return category;
+       }
+
+       public void setCategory(String category) {
+               this.category = category;
+       }
+
+       public String getFunctions() {
+               return functions;
+       }
+
+       public void setFunctions(String functions) {
+               this.functions = functions;
+       }
+
+       @Override
+       public String toString() {
+               return "AppCategoryFunctionsItem [rowId=" + rowId + ", appId=" + appId + ", application=" + application
+                               + ", category=" + category + ", functions=" + functions + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+               result = prime * result + ((application == null) ? 0 : application.hashCode());
+               result = prime * result + ((category == null) ? 0 : category.hashCode());
+               result = prime * result + ((functions == null) ? 0 : functions.hashCode());
+               result = prime * result + ((rowId == null) ? 0 : rowId.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppCategoryFunctionsItem other = (AppCategoryFunctionsItem) obj;
+               if (appId == null) {
+                       if (other.appId != null)
+                               return false;
+               } else if (!appId.equals(other.appId))
+                       return false;
+               if (application == null) {
+                       if (other.application != null)
+                               return false;
+               } else if (!application.equals(other.application))
+                       return false;
+               if (category == null) {
+                       if (other.category != null)
+                               return false;
+               } else if (!category.equals(other.category))
+                       return false;
+               if (functions == null) {
+                       if (other.functions != null)
+                               return false;
+               } else if (!functions.equals(other.functions))
+                       return false;
+               if (rowId == null) {
+                       if (other.rowId != null)
+                               return false;
+               } else if (!rowId.equals(other.rowId))
+                       return false;
+               return true;
+       }
+       
+       
+}
index 5dc7bf5..1cfb664 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-/**\r
- * An easily serializable version of row information from the fn_app_contact_us\r
- * table; specifically this has an app ID instead of an EPApp object.\r
- */\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class AppContactUsItem extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 6964210807573346262L;\r
-\r
-       @Id\r
-       private Long appId;\r
-       private String appName;\r
-       private String description;\r
-       private String contactName;\r
-       private String contactEmail;\r
-       private String url;\r
-       private String activeYN;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-       public String getDescription() {\r
-               return description;\r
-       }\r
-\r
-       public void setDescription(String description) {\r
-               this.description = description;\r
-       }\r
-\r
-       public String getContactName() {\r
-               return contactName;\r
-       }\r
-\r
-       public void setContactName(String contactName) {\r
-               this.contactName = contactName;\r
-       }\r
-\r
-       public String getContactEmail() {\r
-               return contactEmail;\r
-       }\r
-\r
-       public void setContactEmail(String contactEmail) {\r
-               this.contactEmail = contactEmail;\r
-       }\r
-\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public String getActiveYN() {\r
-               return activeYN;\r
-       }\r
-\r
-       public void setActiveYN(String activeYN) {\r
-               this.activeYN = activeYN;\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((activeYN == null) ? 0 : activeYN.hashCode());\r
-               result = prime * result + ((appId == null) ? 0 : appId.hashCode());\r
-               result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
-               result = prime * result + ((contactEmail == null) ? 0 : contactEmail.hashCode());\r
-               result = prime * result + ((contactName == null) ? 0 : contactName.hashCode());\r
-               result = prime * result + ((description == null) ? 0 : description.hashCode());\r
-               result = prime * result + ((url == null) ? 0 : url.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppContactUsItem other = (AppContactUsItem) obj;\r
-               if (activeYN == null) {\r
-                       if (other.activeYN != null)\r
-                               return false;\r
-               } else if (!activeYN.equals(other.activeYN))\r
-                       return false;\r
-               if (appId == null) {\r
-                       if (other.appId != null)\r
-                               return false;\r
-               } else if (!appId.equals(other.appId))\r
-                       return false;\r
-               if (appName == null) {\r
-                       if (other.appName != null)\r
-                               return false;\r
-               } else if (!appName.equals(other.appName))\r
-                       return false;\r
-               if (contactEmail == null) {\r
-                       if (other.contactEmail != null)\r
-                               return false;\r
-               } else if (!contactEmail.equals(other.contactEmail))\r
-                       return false;\r
-               if (contactName == null) {\r
-                       if (other.contactName != null)\r
-                               return false;\r
-               } else if (!contactName.equals(other.contactName))\r
-                       return false;\r
-               if (description == null) {\r
-                       if (other.description != null)\r
-                               return false;\r
-               } else if (!description.equals(other.description))\r
-                       return false;\r
-               if (url == null) {\r
-                       if (other.url != null)\r
-                               return false;\r
-               } else if (!url.equals(other.url))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppContactUsItem [appId=" + appId + ", appName=" + appName + ", description=" + description\r
-                               + ", contactName=" + contactName + ", contactEmail=" + contactEmail + ", url=" + url + ", activeYN="\r
-                               + activeYN + "]";\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * An easily serializable version of row information from the fn_app_contact_us
+ * table; specifically this has an app ID instead of an EPApp object.
+ */
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class AppContactUsItem extends DomainVo {
+
+       private static final long serialVersionUID = 6964210807573346262L;
+
+       @Id
+       private Long appId;
+       private String appName;
+       private String description;
+       private String contactName;
+       private String contactEmail;
+       private String url;
+       private String activeYN;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getContactName() {
+               return contactName;
+       }
+
+       public void setContactName(String contactName) {
+               this.contactName = contactName;
+       }
+
+       public String getContactEmail() {
+               return contactEmail;
+       }
+
+       public void setContactEmail(String contactEmail) {
+               this.contactEmail = contactEmail;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getActiveYN() {
+               return activeYN;
+       }
+
+       public void setActiveYN(String activeYN) {
+               this.activeYN = activeYN;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((activeYN == null) ? 0 : activeYN.hashCode());
+               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+               result = prime * result + ((appName == null) ? 0 : appName.hashCode());
+               result = prime * result + ((contactEmail == null) ? 0 : contactEmail.hashCode());
+               result = prime * result + ((contactName == null) ? 0 : contactName.hashCode());
+               result = prime * result + ((description == null) ? 0 : description.hashCode());
+               result = prime * result + ((url == null) ? 0 : url.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppContactUsItem other = (AppContactUsItem) obj;
+               if (activeYN == null) {
+                       if (other.activeYN != null)
+                               return false;
+               } else if (!activeYN.equals(other.activeYN))
+                       return false;
+               if (appId == null) {
+                       if (other.appId != null)
+                               return false;
+               } else if (!appId.equals(other.appId))
+                       return false;
+               if (appName == null) {
+                       if (other.appName != null)
+                               return false;
+               } else if (!appName.equals(other.appName))
+                       return false;
+               if (contactEmail == null) {
+                       if (other.contactEmail != null)
+                               return false;
+               } else if (!contactEmail.equals(other.contactEmail))
+                       return false;
+               if (contactName == null) {
+                       if (other.contactName != null)
+                               return false;
+               } else if (!contactName.equals(other.contactName))
+                       return false;
+               if (description == null) {
+                       if (other.description != null)
+                               return false;
+               } else if (!description.equals(other.description))
+                       return false;
+               if (url == null) {
+                       if (other.url != null)
+                               return false;
+               } else if (!url.equals(other.url))
+                       return false;
+               return true;
+       }
+
+       @Override
+       public String toString() {
+               return "AppContactUsItem [appId=" + appId + ", appName=" + appName + ", description=" + description
+                               + ", contactName=" + contactName + ", contactEmail=" + contactEmail + ", url=" + url + ", activeYN="
+                               + activeYN + "]";
+       }
+
+}
index 994108d..cb712a2 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-public enum CommonWidgetsEnum{\r
-       NEWS("news"),\r
-       EVENTS("events"),\r
-       RESOURCES("resources");\r
-       \r
-       private String value;\r
-       private CommonWidgetsEnum(String value){\r
-               this.value = value;\r
-       }\r
-       \r
-       @Override\r
-    public String toString() {\r
-        return value;\r
-    }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+public enum CommonWidgetsEnum{
+       NEWS("news"),
+       EVENTS("events"),
+       RESOURCES("resources");
+       
+       private String value;
+       private CommonWidgetsEnum(String value){
+               this.value = value;
+       }
+       
+       @Override
+    public String toString() {
+        return value;
+    }
+}
index 3572d6a..21c6dfe 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-public class PortalRestResponse<T> {\r
-       \r
-       private PortalRestStatusEnum status;\r
-       private String message;\r
-       \r
-       private T response;\r
-       \r
-       public PortalRestResponse(){};\r
-       \r
-       public PortalRestResponse(PortalRestStatusEnum status, String message, T response){\r
-               this.status = status;\r
-               this.message = message;\r
-               this.response = response;\r
-       }\r
-\r
-       public PortalRestStatusEnum getStatus() {\r
-               return status;\r
-       }\r
-\r
-       public void setStatus(PortalRestStatusEnum status) {\r
-               this.status = status;\r
-       }\r
-\r
-       public String getMessage() {\r
-               return message;\r
-       }\r
-\r
-       public void setMessage(String message) {\r
-               this.message = message;\r
-       }\r
-\r
-       public T getResponse() {\r
-               return response;\r
-       }\r
-\r
-       public void setResponse(T response) {\r
-               this.response = response;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "PortalRestResponse [status=" + status + ", message=" + message + ", response=" + response + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((message == null) ? 0 : message.hashCode());\r
-               result = prime * result + ((response == null) ? 0 : response.hashCode());\r
-               result = prime * result + ((status == null) ? 0 : status.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               PortalRestResponse other = (PortalRestResponse) obj;\r
-               if (message == null) {\r
-                       if (other.message != null)\r
-                               return false;\r
-               } else if (!message.equals(other.message))\r
-                       return false;\r
-               if (response == null) {\r
-                       if (other.response != null)\r
-                               return false;\r
-               } else if (!response.equals(other.response))\r
-                       return false;\r
-               if (status != other.status)\r
-                       return false;\r
-               return true;\r
-       };      \r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+public class PortalRestResponse<T> {
+       
+       private PortalRestStatusEnum status;
+       private String message;
+       
+       private T response;
+       
+       public PortalRestResponse(){};
+       
+       public PortalRestResponse(PortalRestStatusEnum status, String message, T response){
+               this.status = status;
+               this.message = message;
+               this.response = response;
+       }
+
+       public PortalRestStatusEnum getStatus() {
+               return status;
+       }
+
+       public void setStatus(PortalRestStatusEnum status) {
+               this.status = status;
+       }
+
+       public String getMessage() {
+               return message;
+       }
+
+       public void setMessage(String message) {
+               this.message = message;
+       }
+
+       public T getResponse() {
+               return response;
+       }
+
+       public void setResponse(T response) {
+               this.response = response;
+       }
+
+       @Override
+       public String toString() {
+               return "PortalRestResponse [status=" + status + ", message=" + message + ", response=" + response + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((message == null) ? 0 : message.hashCode());
+               result = prime * result + ((response == null) ? 0 : response.hashCode());
+               result = prime * result + ((status == null) ? 0 : status.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               PortalRestResponse other = (PortalRestResponse) obj;
+               if (message == null) {
+                       if (other.message != null)
+                               return false;
+               } else if (!message.equals(other.message))
+                       return false;
+               if (response == null) {
+                       if (other.response != null)
+                               return false;
+               } else if (!response.equals(other.response))
+                       return false;
+               if (status != other.status)
+                       return false;
+               return true;
+       };      
+       
+       
+}
index b4dc63a..6c264ee 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-public enum PortalRestStatusEnum{\r
-       OK("ok"),\r
-       WARN("WARNING"),\r
-       ERROR("error");\r
-       \r
-       private String value;\r
-       private PortalRestStatusEnum(String value){\r
-               this.value = value;\r
-       }\r
-       \r
-       @Override\r
-    public String toString() {\r
-        return value;\r
-    }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+public enum PortalRestStatusEnum{
+       OK("ok"),
+       WARN("WARNING"),
+       ERROR("error");
+       
+       private String value;
+       private PortalRestStatusEnum(String value){
+               this.value = value;
+       }
+       
+       @Override
+    public String toString() {
+        return value;
+    }
+}
index c653847..dde9bc2 100644 (file)
@@ -1,86 +1,86 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ecomp.model;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-import com.fasterxml.jackson.annotation.JsonProperty;\r
-\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class SearchResultItem extends DomainVo{\r
-\r
-       @Id\r
-       private String rowId;   \r
-       \r
-       @JsonProperty("category")\r
-       private String category;\r
-       \r
-       @JsonProperty("name")\r
-       private String name;\r
-       \r
-       @JsonProperty("target")\r
-       private String target;\r
-\r
-       @JsonProperty("uuid")\r
-       private String uuid;\r
-       \r
-       public String getUuid() {\r
-               return uuid;\r
-       }\r
-       public void setUuid(String uuid) {\r
-               this.uuid = uuid;\r
-       }\r
-       public String getRowId() {\r
-               return rowId;\r
-       }\r
-       public void setRowId(String rowId) {\r
-               this.rowId = rowId;\r
-       }\r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-       public String getName() {\r
-               return name;\r
-       }\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-       \r
-       public String getTarget() {\r
-               return target;\r
-       }\r
-       public void setTarget(String target) {\r
-               this.target = target;\r
-       }\r
-       @Override\r
-       public String toString() {\r
-               return "SearchResultItem [rowId=" + rowId + ", category=" + category + ", name=" + name + ", target=" + target\r
-                               + ", uuid=" + uuid + "]";\r
-       }\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ecomp.model;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class SearchResultItem extends DomainVo{
+
+       @Id
+       private String rowId;   
+       
+       @JsonProperty("category")
+       private String category;
+       
+       @JsonProperty("name")
+       private String name;
+       
+       @JsonProperty("target")
+       private String target;
+
+       @JsonProperty("uuid")
+       private String uuid;
+       
+       public String getUuid() {
+               return uuid;
+       }
+       public void setUuid(String uuid) {
+               this.uuid = uuid;
+       }
+       public String getRowId() {
+               return rowId;
+       }
+       public void setRowId(String rowId) {
+               this.rowId = rowId;
+       }
+       public String getCategory() {
+               return category;
+       }
+       public void setCategory(String category) {
+               this.category = category;
+       }
+       public String getName() {
+               return name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       public String getTarget() {
+               return target;
+       }
+       public void setTarget(String target) {
+               this.target = target;
+       }
+       @Override
+       public String toString() {
+               return "SearchResultItem [rowId=" + rowId + ", category=" + category + ", name=" + name + ", target=" + target
+                               + ", uuid=" + uuid + "]";
+       }
+       
+       
+}
index ce0366c..55872f2 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.exceptions;\r
-\r
-import com.ecwid.consul.ConsulException;\r
-\r
-public class NoHealthyServiceException extends ConsulException{\r
-\r
-       private static final long serialVersionUID = -7089437673127729813L;\r
-       \r
-       public NoHealthyServiceException(String message){\r
-               super(message);\r
-       }\r
-       \r
-       @Override\r
-       public String toString() {\r
-               return "NoHealthyServiceException [] " + this.getMessage();\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.exceptions;
+
+import com.ecwid.consul.ConsulException;
+
+public class NoHealthyServiceException extends ConsulException{
+
+       private static final long serialVersionUID = -7089437673127729813L;
+       
+       public NoHealthyServiceException(String message){
+               super(message);
+       }
+       
+       @Override
+       public String toString() {
+               return "NoHealthyServiceException [] " + this.getMessage();
+       }
+}
index 9a2fc4d..ba4f2af 100644 (file)
@@ -18,7 +18,6 @@
  * ================================================================================*/
 package org.openecomp.portalapp.portal.interceptor;
 
-import java.net.URL;
 import java.nio.charset.Charset;
 import java.util.Base64;
 import java.util.Set;
@@ -59,7 +58,7 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
        private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalResourceInterceptor.class);
 
        @Autowired
-       private  RemoteWebServiceCallService remoteWebServiceCallService;
+       private RemoteWebServiceCallService remoteWebServiceCallService;
 
        @Autowired
        private ManageService manageService;
@@ -196,11 +195,12 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
         * @throws Exception
         */
        private boolean checkBasicAuth(HttpServletRequest request, HttpServletResponse response) throws Exception {
-               
                String uri = request.getRequestURI().toString();
                uri = uri.substring(uri.indexOf("/", 1));
-               
+
                final String authHeader = request.getHeader("Authorization");
+
+               // Unauthorized access due to missing HTTP Authorization request header
                if (authHeader == null) {
                        final String msg = "no authorization found";
                        logger.debug(EELFLoggerDelegate.debugLogger, "checkBasicAuth: {}", msg);
@@ -210,7 +210,7 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
 
                String[] accountNamePassword = getUserNamePassword(authHeader);
                if (accountNamePassword == null || accountNamePassword.length != 2) {
-                       final String msg = "failed to get username and password from auth header";
+                       final String msg = "failed to get username and password from Atuhorization header";
                        logger.debug(EELFLoggerDelegate.debugLogger, "checkBasicAuth: {}", msg);
                        sendErrorResponse(response, HttpServletResponse.SC_UNAUTHORIZED, msg);
                        return false;
@@ -218,54 +218,48 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
 
                BasicAuthCredentials creds;
                try {
-                       creds = basicAuthService.getBasicAuthCredentialByAppName(accountNamePassword[0]);
+                       creds = basicAuthService.getBasicAuthCredentialByUsernameAndPassword(accountNamePassword[0],
+                                       encrypted(accountNamePassword[1]));
                } catch (Exception e) {
                        logger.error(EELFLoggerDelegate.errorLogger, "checkBasicAuth failed to get credentials", e);
                        final String msg = "Failed while getting basic authentication credential: " + e.toString();
                        sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
                        throw e;
                }
-               
-               boolean isAllowedEp = false;
-               for(EPEndpoint ep: creds.getEndpoints()){
-                       if(ep.getName().equals(uri)){
-                               isAllowedEp = true;
-                               break;
-                       }
-               }
-               if(!isAllowedEp){
-                       response.setStatus(401);
-                       response.setContentType("application/json");
-                       response.getWriter().write("{\"error\":\"Unauthorized: Endpoint access denied\"}");
-                       response.getWriter().flush();
-                       response.getWriter().close();
+
+               // Unauthorized access due to invalid credentials (username and
+               // password)
+               if (creds == null || !creds.getUsername().equals(accountNamePassword[0])) {
+                       final String msg = "Unauthorized: Access denied";
+                       logger.debug(EELFLoggerDelegate.debugLogger, "checkBasicAuth: {}", msg);
+                       sendErrorResponse(response, HttpServletResponse.SC_UNAUTHORIZED, msg);
                        return false;
                }
-               
-               if (creds == null) {
-                       final String msg = "failed to find match for credentials";
+
+               // Unauthorized access due to inactive account
+               if (creds.getIsActive().equals("N")) {
+                       final String msg = "Unauthorized: The account is inactive";
                        logger.debug(EELFLoggerDelegate.debugLogger, "checkBasicAuth: {}", msg);
                        sendErrorResponse(response, HttpServletResponse.SC_UNAUTHORIZED, msg);
                        return false;
                }
-
-               boolean isAuth;
-               try {
-                       isAuth = authorization(authHeader, creds.getApplicationName(), creds.getPassword());
-               } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "checkBasicAuth failed to check authorization", e);
-                       final String msg = "failed while checking authorization: " + e.toString();
-                       sendErrorResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg);
-                       throw e;
+               boolean isAllowedEp = false;
+               for (EPEndpoint ep : creds.getEndpoints()) {
+                       if (ep.getName().equals(uri)) {
+                               isAllowedEp = true;
+                               break;
+                       }
                }
 
-               if (!isAuth) {
-                       response.setStatus(401);
-                       response.setContentType("application/json");
-                       response.getWriter().write("{\"error\":\"Unauthorized: Invalid username or password\"}");
-                       response.getWriter().flush();
-                       response.getWriter().close();
-                       final String msg = "Unauthorized: Access denied";
+               // If user doesn't specify any endpoint, allow all endpoints for that
+               // account
+               if (creds.getEndpoints().size() == 0)
+                       isAllowedEp = true;
+
+               // Unauthorized access due to the invalid endpoints
+               if (!isAllowedEp) {
+                       final String msg = "Unauthorized: Endpoint access denied";
+                       logger.debug(EELFLoggerDelegate.debugLogger, "checkBasicAuth: {}", msg);
                        sendErrorResponse(response, HttpServletResponse.SC_UNAUTHORIZED, msg);
                        return false;
                }
@@ -274,32 +268,6 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
                return true;
        }
 
-       /**
-        * 
-        * Basic Authorization check
-        * 
-        * @param auth
-        * @param security_user
-        * @param security_pass
-        * @return
-        * @throws Exception
-        */
-
-       protected boolean authorization(String auth, String security_user, String security_pass) throws Exception {
-
-               if (auth != null && auth.startsWith("Basic")) {
-                       String[] usernamePassword = getUserNamePassword(auth);
-                       if (security_user.equals(usernamePassword[0]) && decrypted(security_pass).equals(usernamePassword[1]))
-                               return true;
-               }
-               return false;
-       }
-
-       public static void main(String str[]) {
-               System.out.println(new PortalResourceInterceptor().getUserNamePassword("Basic Qy1CVVM6X3Bhc3M=")[0]);
-               System.out.println(new PortalResourceInterceptor().getUserNamePassword("Basic Qy1CVVM6X3Bhc3M=")[1]);
-       }
-
        private String[] getUserNamePassword(String authValue) {
                String base64Credentials = authValue.substring("Basic".length()).trim();
                String credentials = new String(Base64.getDecoder().decode(base64Credentials), Charset.forName("UTF-8"));
@@ -320,6 +288,20 @@ public class PortalResourceInterceptor extends ResourceInterceptor {
                return result;
        }
 
+       private String encrypted(String decryptedPwd) throws Exception {
+               String result = "";
+               if (decryptedPwd != null & decryptedPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.encrypt(decryptedPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword() failed", e);
+                               throw e;
+                       }
+               }
+               return result;
+       }
+
        private Boolean matchRoleFunctions(String portalApiPath, Set<? extends String> roleFunctions) {
                for (String roleFunction : roleFunctions) {
                        if (portalApiPath.matches(roleFunction))
index b8e608c..9de7a4c 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.listener;\r
-\r
-import java.util.List;\r
-\r
-import javax.annotation.PostConstruct;\r
-import javax.annotation.PreDestroy;\r
-\r
-import org.hibernate.Query;\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.ueb.EPUebHelper;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class HealthMonitor {\r
-\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-\r
-       @Autowired\r
-       private EPUebHelper epUebHelper;\r
-\r
-       private static boolean databaseUp;\r
-       private static boolean uebUp;\r
-       private static boolean frontEndUp;\r
-       private static boolean backEndUp;\r
-       private static boolean dbClusterStatusOk;\r
-       private static boolean dbPermissionsOk;\r
-       public static boolean isSuspended = false;\r
-\r
-       Thread healthMonitorThread;\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HealthMonitor.class);\r
-\r
-       public HealthMonitor() {\r
-\r
-       }\r
-\r
-       public static boolean isDatabaseUp() {\r
-               return databaseUp;\r
-       }\r
-\r
-       public static boolean isClusterStatusOk() {\r
-               return dbClusterStatusOk;\r
-       }\r
-\r
-       public static boolean isDatabasePermissionsOk() {\r
-               return dbPermissionsOk;\r
-       }\r
-\r
-       public static boolean isUebUp() {\r
-               return uebUp;\r
-       }\r
-\r
-       public static boolean isFrontEndUp() {\r
-               return frontEndUp;\r
-       }\r
-\r
-       public static boolean isBackEndUp() {\r
-               return backEndUp;\r
-       }\r
-\r
-       private void monitorEPHealth() throws InterruptedException {\r
-\r
-               int numIntervalsDatabaseHasBeenDown = 0;\r
-               int numIntervalsClusterNotHealthy = 0;\r
-               int numIntervalsDatabasePermissionsIncorrect = 0;\r
-               int numIntervalsUebHasBeenDown = 0;\r
-\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "==> Health Monitor thread started");\r
-\r
-               long sleepInterval = (Long\r
-                               .valueOf(SystemProperties.getProperty(EPCommonSystemProperties.HEALTH_POLL_INTERVAL_SECONDS)) * 1000);\r
-               long numIntervalsBetweenAlerts = Long\r
-                               .valueOf(SystemProperties.getProperty(EPCommonSystemProperties.HEALTHFAIL_ALERT_EVERY_X_INTERVALS));\r
-               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                               "Polling health every " + sleepInterval + " milliseconds. Alerting every "\r
-                                               + (sleepInterval * numIntervalsBetweenAlerts) / 1000 + " seconds when component remains down.");\r
-\r
-               while (true) {\r
-                       //\r
-                       // Get DB status. If down, signal alert once every X intervals.\r
-                       //\r
-                       databaseUp = this.checkIfDatabaseUp();\r
-                       if (databaseUp == false) {\r
-\r
-                               if ((numIntervalsDatabaseHasBeenDown % numIntervalsBetweenAlerts) == 0) {\r
-                                       // Write a Log entry that will generate an alert\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "Database down, logging to error log to trigger alert.");\r
-                                       numIntervalsDatabaseHasBeenDown++;\r
-                               } else {\r
-                                       numIntervalsDatabaseHasBeenDown = 0;\r
-                               }\r
-                       }\r
-\r
-                       dbClusterStatusOk = this.checkClusterStatus();\r
-                       if (dbClusterStatusOk == false) {\r
-\r
-                               if ((numIntervalsClusterNotHealthy % numIntervalsBetweenAlerts) == 0) {\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "Cluster nodes appear to be down, logging to error log to trigger alert.");\r
-                                       numIntervalsClusterNotHealthy++;\r
-                               } else {\r
-                                       numIntervalsClusterNotHealthy = 0;\r
-                               }\r
-                       }\r
-\r
-                       dbPermissionsOk = this.checkDatabaseAndPermissions();\r
-                       if (dbPermissionsOk == false) {\r
-\r
-                               if ((numIntervalsDatabasePermissionsIncorrect % numIntervalsBetweenAlerts) == 0) {\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "Database permissions don't seem correct, logging to error log to trigger alert.");\r
-                                       numIntervalsDatabasePermissionsIncorrect++;\r
-                               } else {\r
-                                       numIntervalsDatabasePermissionsIncorrect = 0;\r
-                               }\r
-                       }\r
-\r
-                       //\r
-                       // Get UEB status. Publish a bogus message to EP inbox, if 200 OK\r
-                       // returned, status is Up.\r
-                       // If down, signal alert once every X intervals.\r
-                       // EP will ignore this bogus message.\r
-                       //\r
-                       uebUp = this.checkIfUebUp();\r
-                       if (uebUp == false) {\r
-\r
-                               if ((numIntervalsUebHasBeenDown % numIntervalsBetweenAlerts) == 0) {\r
-                                       // Write a Log entry that will generate an alert\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckUebClusterError);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "UEB down, logging to error log to trigger alert");\r
-                                       numIntervalsUebHasBeenDown++;\r
-                               } else {\r
-                                       numIntervalsUebHasBeenDown = 0;\r
-                               }\r
-                       }\r
-\r
-                       // The front end should be up because the API is called through\r
-                       // proxy front end server.\r
-                       frontEndUp = true;\r
-\r
-                       // If the rest API called, the backend is always up\r
-                       backEndUp = true;\r
-\r
-                       //\r
-                       // future nice to have...get Partner status\r
-                       //\r
-                       // For all apps exposing a rest url, query one of the rest\r
-                       // urls(/roles?) and manage a list\r
-                       // of app name/status. We might not return back a non 200 OK in\r
-                       // health check, but we\r
-                       // could return information in the json content of a health check.\r
-                       //\r
-\r
-                       //\r
-                       // Get DB status. If down, signal alert once every X intervals.\r
-                       //\r
-                       if (Thread.interrupted()) {\r
-                               logger.info(EELFLoggerDelegate.errorLogger, "==> UebMainHandler exiting");\r
-                               break;\r
-                       }\r
-\r
-                       try {\r
-                               Thread.sleep(sleepInterval);\r
-                       } catch (InterruptedException e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "monitorEPHealth interrupted", e);\r
-                               Thread.currentThread().interrupt();\r
-                       }\r
-               }\r
-       }\r
-\r
-       @PostConstruct\r
-       public void initHealthMonitor() {\r
-\r
-               healthMonitorThread = new Thread("EP HealthMonitor thread") {\r
-                       public void run() {\r
-                               try {\r
-                                       monitorEPHealth();\r
-                               } catch (InterruptedException e) {\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "healthMonitorThread interrupted", e);\r
-                               } catch (Exception e) {\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, "healthMonitorThread failed", e);\r
-                               }\r
-                       }\r
-               };\r
-               if (healthMonitorThread != null) {\r
-                       healthMonitorThread.start();\r
-               }\r
-       }\r
-\r
-       @PreDestroy\r
-       public void closeHealthMonitor() {\r
-               this.healthMonitorThread.interrupt();\r
-       }\r
-\r
-       private boolean checkIfDatabaseUp() {\r
-\r
-               boolean isUp = false;\r
-\r
-               Session localSession = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-\r
-                       if (localSession != null) {\r
-\r
-                               String sql = "select app_name from fn_app where app_id=1";\r
-                               Query query = localSession.createSQLQuery(sql);\r
-                               @SuppressWarnings("unchecked")\r
-                               List<String> queryList = query.list();\r
-                               if (queryList != null) {\r
-                                       isUp = true;\r
-                               }\r
-                               localSession.close();\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "checkIfDatabaseUp failed", e);\r
-                       isUp = false;\r
-               }\r
-\r
-               return isUp;\r
-       }\r
-\r
-       private boolean checkClusterStatus() {\r
-\r
-               boolean isUp = false;\r
-\r
-               Session localSession = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       if (localSession != null) {\r
-                               // If all nodes are unhealthy in a cluster, this will throw an\r
-                               // exception\r
-                               String sql = "select * from mysql.user";\r
-                               Query query = localSession.createSQLQuery(sql);\r
-                               @SuppressWarnings("unchecked")\r
-                               List<String> queryList = query.list();\r
-                               if (queryList != null) {\r
-                                       isUp = true;\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "checkClusterStatus failed", e);\r
-                       if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                               "checkClusterStatus() exception msg = " + e.getCause().getMessage());\r
-                       }\r
-                       isUp = false;\r
-               } finally {\r
-                       if (localSession != null) {\r
-                               localSession.close();\r
-                       }\r
-               }\r
-\r
-               return isUp;\r
-\r
-       }\r
-\r
-       private boolean checkDatabaseAndPermissions() {\r
-\r
-               boolean isUp = false;\r
-\r
-               Session localSession = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       if (localSession != null) {\r
-                               String sql = "SHOW GRANTS FOR CURRENT_USER";\r
-                               Query query = localSession.createSQLQuery(sql);\r
-                               @SuppressWarnings("unchecked")\r
-                               List<String> grantsList = query.list();\r
-                               for (String str : grantsList) {\r
-                                       if ((str.toUpperCase().contains("ALL"))\r
-                                                       || (str.toUpperCase().contains("DELETE") && str.toUpperCase().contains("SELECT")\r
-                                                                       && str.toUpperCase().contains("UPDATE") && str.toUpperCase().contains("INSERT"))) {\r
-                                               isUp = true;\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               if (isUp == false) {\r
-                                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                                       "checkDatabaseAndPermissions() returning false.  SHOW GRANTS FOR CURRENT_USER being dumped:");\r
-                                       for (String str : grantsList) {\r
-                                               logger.error(EELFLoggerDelegate.errorLogger, "grants output item = [" + str + "]");\r
-                                       }\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "checkDatabaseAndPermissions failed", e);\r
-                       if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                               "checkDatabaseAndPermissions() exception msg = " + e.getCause().getMessage());\r
-                       }\r
-                       isUp = false;\r
-               } finally {\r
-                       if (localSession != null) {\r
-                               localSession.close();\r
-                       }\r
-               }\r
-\r
-               return isUp;\r
-\r
-       }\r
-\r
-       private boolean checkIfUebUp() {\r
-               boolean uebUp = false;\r
-               try {\r
-                       boolean isAvailable = epUebHelper.checkAvailability();\r
-                       boolean messageCanBeSent = epUebHelper.MessageCanBeSentToTopic();\r
-                       uebUp = (isAvailable && messageCanBeSent);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "checkIfUebUp failed", e);\r
-               }\r
-\r
-               return uebUp;\r
-\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.listener;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.openecomp.portalapp.portal.domain.SharedContext;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.service.SharedContextService;
+import org.openecomp.portalapp.portal.ueb.EPUebHelper;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.transaction.annotation.Transactional;
+
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class HealthMonitor {
+
+       @Autowired
+       private SessionFactory sessionFactory;
+
+       @Autowired
+       private EPUebHelper epUebHelper;
+
+       @Autowired
+       private SharedContextService sharedContextService;
+
+       private static boolean databaseUp;
+       private static boolean uebUp;
+       private static boolean frontEndUp;
+       private static boolean backEndUp;
+       private static boolean dbClusterStatusOk;
+       private static boolean dbPermissionsOk;
+       public static boolean isSuspended = false;
+
+       private Thread healthMonitorThread;
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HealthMonitor.class);
+
+       public HealthMonitor() {
+
+       }
+
+       public static boolean isDatabaseUp() {
+               return databaseUp;
+       }
+
+       public static boolean isClusterStatusOk() {
+               return dbClusterStatusOk;
+       }
+
+       public static boolean isDatabasePermissionsOk() {
+               return dbPermissionsOk;
+       }
+
+       public static boolean isUebUp() {
+               return uebUp;
+       }
+
+       public static boolean isFrontEndUp() {
+               return frontEndUp;
+       }
+
+       public static boolean isBackEndUp() {
+               return backEndUp;
+       }
+
+       private void monitorEPHealth() throws InterruptedException {
+
+               int numIntervalsDatabaseHasBeenDown = 0;
+               int numIntervalsClusterNotHealthy = 0;
+               int numIntervalsDatabasePermissionsIncorrect = 0;
+               int numIntervalsUebHasBeenDown = 0;
+
+               logger.debug(EELFLoggerDelegate.debugLogger, "monitorEPHealth started");
+
+               long sleepInterval = (Long
+                               .valueOf(SystemProperties.getProperty(EPCommonSystemProperties.HEALTH_POLL_INTERVAL_SECONDS)) * 1000);
+               long numIntervalsBetweenAlerts = Long
+                               .valueOf(SystemProperties.getProperty(EPCommonSystemProperties.HEALTHFAIL_ALERT_EVERY_X_INTERVALS));
+               logger.debug(EELFLoggerDelegate.debugLogger,
+                               "monitorEPHealth: Polling health every " + sleepInterval + " milliseconds. Alerting every "
+                                               + (sleepInterval * numIntervalsBetweenAlerts) / 1000 + " seconds when component remains down.");
+
+               while (true) {
+                       //
+                       // Get DB status. If down, signal alert once every X intervals.
+                       //
+                       databaseUp = this.checkIfDatabaseUp();
+                       if (databaseUp == false) {
+                               if ((numIntervalsDatabaseHasBeenDown % numIntervalsBetweenAlerts) == 0) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "monitorEPHealth: database down, logging to error log to trigger alert.");
+                                       // Write a Log entry that will generate an alert
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);
+                                       numIntervalsDatabaseHasBeenDown++;
+                               } else {
+                                       numIntervalsDatabaseHasBeenDown = 0;
+                               }
+                       }
+
+                       dbClusterStatusOk = this.checkClusterStatus();
+                       if (dbClusterStatusOk == false) {
+                               if ((numIntervalsClusterNotHealthy % numIntervalsBetweenAlerts) == 0) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "monitorEPHealth: cluster nodes down, logging to error log to trigger alert.");
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);
+                                       numIntervalsClusterNotHealthy++;
+                               } else {
+                                       numIntervalsClusterNotHealthy = 0;
+                               }
+                       }
+
+                       dbPermissionsOk = this.checkDatabasePermissions();
+                       if (dbPermissionsOk == false) {
+                               if ((numIntervalsDatabasePermissionsIncorrect % numIntervalsBetweenAlerts) == 0) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "monitorEPHealth: database permissions not correct, logging to error log to trigger alert.");
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckMySqlError);
+                                       numIntervalsDatabasePermissionsIncorrect++;
+                               } else {
+                                       numIntervalsDatabasePermissionsIncorrect = 0;
+                               }
+                       }
+
+                       //
+                       // Get UEB status. Publish a bogus message to EP inbox, if 200 OK
+                       // returned, status is Up.
+                       // If down, signal alert once every X intervals.
+                       // EP will ignore this bogus message.
+                       //
+                       uebUp = this.checkIfUebUp();
+                       if (uebUp == false) {
+                               if ((numIntervalsUebHasBeenDown % numIntervalsBetweenAlerts) == 0) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "UEB down, logging to error log to trigger alert");
+                                       // Write a Log entry that will generate an alert
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckUebClusterError);
+                                       numIntervalsUebHasBeenDown++;
+                               } else {
+                                       numIntervalsUebHasBeenDown = 0;
+                               }
+                       }
+
+                       // The front end should be up because the API is called through
+                       // proxy front end server.
+                       frontEndUp = true;
+
+                       // If the rest API called, the backend is always up
+                       backEndUp = true;
+
+                       //
+                       // future nice to have...get Partner status
+                       //
+                       // For all apps exposing a rest url, query one of the rest
+                       // urls(/roles?) and manage a list
+                       // of app name/status. We might not return back a non 200 OK in
+                       // health check, but we
+                       // could return information in the json content of a health check.
+                       //
+
+                       if (Thread.interrupted()) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "monitorEPHealth: interrupted, leaving loop");
+                               break;
+                       }
+
+                       try {
+                               Thread.sleep(sleepInterval);
+                       } catch (InterruptedException e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "monitorEPHealth interrupted", e);
+                               Thread.currentThread().interrupt();
+                       }
+               }
+       }
+
+       @PostConstruct
+       public void initHealthMonitor() {
+
+               healthMonitorThread = new Thread("EP HealthMonitor thread") {
+                       public void run() {
+                               try {
+                                       monitorEPHealth();
+                               } catch (InterruptedException e) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "healthMonitorThread interrupted", e);
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger, "healthMonitorThread failed", e);
+                               }
+                       }
+               };
+               if (healthMonitorThread != null) {
+                       healthMonitorThread.start();
+               }
+       }
+
+       @PreDestroy
+       public void closeHealthMonitor() {
+               this.healthMonitorThread.interrupt();
+       }
+
+       /**
+        * Writes and reads the database; cleans up when finished.
+        * 
+        * @return True on success; false otherwise.
+        */
+       private boolean checkIfDatabaseUp() {
+               boolean isUp = false;
+               try {
+                       final Date now = new Date();
+                       final String contextId = "checkIfDatabaseUp-" + Long.toString(now.getTime());
+                       final String key = "checkIfDatabaseUp-key";
+                       final String value = "checkIfDatabaseUp-value";
+                       sharedContextService.addSharedContext(contextId, key, value);
+                       SharedContext sc = sharedContextService.getSharedContext(contextId, key);
+                       if (sc == null || sc.getCvalue() == null || !value.equals(sc.getCvalue()))
+                               throw new Exception("Failed to retrieve shared context");
+                       int removed = sharedContextService.deleteSharedContexts(contextId);
+                       if (removed != 1)
+                               throw new Exception("Failed to delete shared context");
+                       isUp = true;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "checkIfDatabaseUp failed", e);
+                       isUp = false;
+               }
+               return isUp;
+       }
+
+       private boolean checkClusterStatus() {
+               boolean isUp = false;
+               Session localSession = null;
+               try {
+                       localSession = sessionFactory.openSession();
+                       if (localSession != null) {
+                               // If all nodes are unhealthy in a cluster, this will throw an
+                               // exception
+                               String sql = "select * from mysql.user";
+                               Query query = localSession.createSQLQuery(sql);
+                               @SuppressWarnings("unchecked")
+                               List<String> queryList = query.list();
+                               if (queryList != null) {
+                                       isUp = true;
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "checkClusterStatus failed", e);
+                       if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "checkClusterStatus() exception cause", e.getCause());
+                       }
+                       isUp = false;
+               } finally {
+                       if (localSession != null) {
+                               localSession.close();
+                       }
+               }
+               return isUp;
+       }
+
+       private boolean checkDatabasePermissions() {
+               boolean isUp = false;
+               Session localSession = null;
+               try {
+                       localSession = sessionFactory.openSession();
+                       if (localSession != null) {
+                               String sql = "SHOW GRANTS FOR CURRENT_USER";
+                               Query query = localSession.createSQLQuery(sql);
+                               @SuppressWarnings("unchecked")
+                               List<String> grantsList = query.list();
+                               for (String str : grantsList) {
+                                       if ((str.toUpperCase().contains("ALL"))
+                                                       || (str.toUpperCase().contains("DELETE") && str.toUpperCase().contains("SELECT")
+                                                                       && str.toUpperCase().contains("UPDATE") && str.toUpperCase().contains("INSERT"))) {
+                                               isUp = true;
+                                               break;
+                                       }
+                               }
+                               if (isUp == false) {
+                                       logger.error(EELFLoggerDelegate.errorLogger,
+                                                       "checkDatabaseAndPermissions() returning false.  SHOW GRANTS FOR CURRENT_USER being dumped:");
+                                       for (String str : grantsList) {
+                                               logger.error(EELFLoggerDelegate.errorLogger, "grants output item = [" + str + "]");
+                                       }
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "checkDatabasePermissions failed", e);
+                       if ((e.getCause() != null) && (e.getCause().getMessage() != null)) {
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "checkDatabasePermissions() exception msg = ", e.getCause());
+                       }
+                       isUp = false;
+               } finally {
+                       if (localSession != null) {
+                               localSession.close();
+                       }
+               }
+               return isUp;
+       }
+
+       private boolean checkIfUebUp() {
+               boolean uebUp = false;
+               try {
+                       boolean isAvailable = epUebHelper.checkAvailability();
+                       boolean messageCanBeSent = epUebHelper.MessageCanBeSentToTopic();
+                       uebUp = (isAvailable && messageCanBeSent);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "checkIfUebUp failed", e);
+               }
+               return uebUp;
+       }
+
+}
index 05af738..e2176ee 100644 (file)
@@ -1,51 +1,51 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.listener;\r
-\r
-import java.util.HashMap;\r
-\r
-import javax.servlet.ServletContext;\r
-import javax.servlet.ServletContextEvent;\r
-import javax.servlet.ServletContextListener;\r
-import javax.servlet.annotation.WebListener;\r
-\r
-@WebListener\r
-public class UserContextListener implements ServletContextListener{\r
-       @SuppressWarnings("rawtypes")\r
-       public void contextInitialized(ServletContextEvent event){\r
-       ServletContext context = event.getServletContext();        \r
-        //\r
-        // instanciate a map to store references to all the active\r
-        // sessions and bind it to context scope.\r
-        //\r
-        HashMap activeUsers = new HashMap();\r
-        context.setAttribute("activeUsers", activeUsers);\r
-    }\r
-\r
-    /**\r
-     * Needed for the ServletContextListener interface.\r
-     */\r
-    public void contextDestroyed(ServletContextEvent event){\r
-        // To overcome the problem with losing the session references\r
-        // during server restarts, put code here to serialize the\r
-        // activeUsers HashMap.  Then put code in the contextInitialized\r
-        // method that reads and reloads it if it exists...\r
-    }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.listener;
+
+import java.util.HashMap;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+@WebListener
+public class UserContextListener implements ServletContextListener{
+       @SuppressWarnings("rawtypes")
+       public void contextInitialized(ServletContextEvent event){
+       ServletContext context = event.getServletContext();        
+        //
+        // instanciate a map to store references to all the active
+        // sessions and bind it to context scope.
+        //
+        HashMap activeUsers = new HashMap();
+        context.setAttribute("activeUsers", activeUsers);
+    }
+
+    /**
+     * Needed for the ServletContextListener interface.
+     */
+    public void contextDestroyed(ServletContextEvent event){
+        // To overcome the problem with losing the session references
+        // during server restarts, put code here to serialize the
+        // activeUsers HashMap.  Then put code in the contextInitialized
+        // method that reads and reloads it if it exists...
+    }
+}
index 965866c..bfe81a2 100644 (file)
@@ -1,31 +1,31 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.logging.aop;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.METHOD, ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-public @interface EPAuditLog {\r
-    String value() default "";\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.logging.aop;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EPAuditLog {
+    String value() default "";
+}
index ab8a367..ce98b1c 100644 (file)
@@ -1,31 +1,31 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.logging.aop;\r
-\r
-import java.lang.annotation.ElementType;\r
-import java.lang.annotation.Retention;\r
-import java.lang.annotation.RetentionPolicy;\r
-import java.lang.annotation.Target;\r
-\r
-@Target({ElementType.METHOD, ElementType.TYPE})\r
-@Retention(RetentionPolicy.RUNTIME)\r
-public @interface EPMetricsLog {\r
-    String value() default "";\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.logging.aop;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EPMetricsLog {
+    String value() default "";
+}
index 6ee63b2..cd686ce 100644 (file)
-###\r
-# ================================================================================\r
-# ECOMP Portal\r
-# ================================================================================\r
-# Copyright (C) 2017 AT&T Intellectual Property\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-# \r
-#      http://www.apache.org/licenses/LICENSE-2.0\r
-# \r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-# ================================================================================\r
-###\r
-########################################################################\r
-#Resource key=Error Code|Message text|Resolution text |Description text\r
-#######\r
-#Newlines can be utilized to add some clarity ensuring continuing line\r
-#has atleast one leading space\r
-#ResourceKey=\\r
-#             ERR0000E\\r
-#             Sample error msg txt\\r
-#             Sample resolution msg\\r
-#             Sample description txt\r
-#\r
-######\r
-#Error code classification category\r
-#100   Permission errors\r
-#200   Availability errors/Timeouts\r
-#300   Data errors\r
-#400   Schema Interface type/validation errors\r
-#500   Business process errors\r
-#900   Unknown errors\r
-#\r
-########################################################################\r
-\r
-# Define Alarm Codes Specific to ECOMP Portal\r
-BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT= ||Reason: {0}.|\\r
-                                                                               An Authentication failure occurred during access to UEB server. Please check that UEB keys are configured correctly under fusion.properties file.\r
-\r
-BERESTAPIAUTHENTICATIONERROR =                 |||Please check application credentials defined in Database or portal.properties file.\r
-                                                                               \r
-INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.\r
-                                                                               \r
-INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.\r
-\r
-INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.\r
-\r
-INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.\r
-\r
-BEHEALTHCHECKERROR=                                            |||Please check the logs for more information.\r
-\r
-BEHEALTHCHECKMYSQLERROR=                               ||Please check the logs for more information.|\\r
-                                                                               Check connectivity to MYSQL is configured correctly under system.properties file.\r
-\r
-BEHEALTHCHECKUEBCLUSTERERROR=                  ||Please check the logs for more information.|\\r
-                                                                               Check connectivity to UEB cluster which is configured under portal.properties file.\r
-\r
-FEHEALTHCHECKERROR=                                            |||Please check connectivity from this FE instance towards BE or BE Load Balancer.\r
-                                                                               \r
-BEHEALTHCHECKRECOVERY=                                 |||Please check logs for more specific information about the problem.\r
-\r
-BEHEALTHCHECKMYSQLRECOVERY=                            |||Please check logs for more specific information about the problem.\r
-\r
-BEHEALTHCHECKUEBCLUSTERRECOVERY=               |||Please check logs for more specific information about the problem.\r
-\r
-FEHEALTHCHECKRECOVERY=                                 |||Please check logs for more specific information about the problem.\r
-\r
-#UEB communication\r
-BEUEBCONNECTIONERROR_ONE_ARGUMENT=             ||Reason: {0}.|\\r
-                                                                               Please check UEB server list and keys configured under Portal.Properties file.\r
-                                                                               \r
-BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT=             ||Cannot reach host {0}.|\\r
-                                                                               Please check UEB server list and keys configured under Portal.Properties file.\r
-\r
-#Onboarding apps\r
-BEUEBREGISTERONBOARDINGAPPERROR=               ||Reason: {0}.|\\r
-                                                                               Please check UEB server list and keys configured under Portal.Properties file.\r
-\r
-#HTTP communication\r
-BEHTTPCONNECTIONERROR_ONE_ARGUMENT=            ||Reason: {0}.|Please check the logs for more information.\r
-\r
-INTERNALCONNECTIONINFO_ONE_ARGUMENT=   ||Description: {0}.|Please check the logs for more information.\r
-\r
-INTERNALCONNECTIONWARNING_ONE_ARGUMENT=        ||Description: {0}.|Please check the logs for more information.\r
-\r
-INTERNALCONNECTIONERROR_ONE_ARGUMENT=  ||Description: {0}.|Please check the logs for more information.\r
-\r
-INTERNALCONNECTIONFATAL_ONE_ARGUMENT=  ||Description: {0}.|Please check the logs for more information.\r
-\r
-BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT= ||Data not found: {0}.|\\r
-                                                                               An error occurred during access to UEB Server, {1} failed to either register or unregister to/from UEB topic.\r
-\r
-#Login error codes\r
-BEUSERMISSINGERROR_ONE_ARGUMENT=               |||\\r
-                                                                               User {0} must be added to the corresponding application with proper user roles.\r
-                                                                               \r
-BEUSERINACTIVEWARNING_ONE_ARGUMENT=            |||\\r
-                                                                               User {0} must be added to the corresponding application with proper user roles.\r
-                                                                               \r
-BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT=        |||\\r
-                                                                               User {0} should be given proper administrator role for the corresponding application to perform the necessary actions.\r
-                                                                               \r
-BEINVALIDJSONINPUT=                                            |||Please check error logs for more information.\r
-\r
-BEINCORRECTHTTPSTATUSERROR=                            |||Please check logs for more information.\r
-\r
-BEINITIALIZATIONERROR=                                 |||Please check logs for more information.\r
-\r
-BEUEBSYSTEMERROR=                                              ||\\r
-                                                                               Operation: {0}.|\\r
-                                                                               An error occurred in {1} distribution mechanism. Please check the logs for more information.\r
-                                                                               \r
-BEDAOSYSTEMERROR=                                              |||Please check MySQL DB health or look at the logs for more details.\r
-\r
-BESYSTEMERROR=                                                 |||Please check logs for more information.\r
-\r
-BEEXECUTEROLLBACKERROR=                                        |||Please check MYSQL DB health or look at the logs for more details.\r
-\r
-FEHTTPLOGGINGERROR=                                            |||Please check MYSQL DB health or look at the logs for more details.\r
-                                                                               \r
-FEPORTALSERVLETERROR=                                  |||Please check logs for more specific information about the problem.\r
-\r
-BEDAOCLOSESESSIONERROR=                                        |||Please check MYSQL DB health or look at the logs form more details.\r
-\r
-BERESTAPIGENERALERROR=                                 |||Please check error log for more information.\r
-\r
-FEHEALTHCHECKGENERALERROR=                             |||Please check error log for more information.\r
-\r
-INTERNALUNEXPECTEDINFO_ONE_ARGUMENT=   |||Description: {0}.\r
-\r
-INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT=        |||Description: {0}.\r
-\r
-INTERNALUNEXPECTEDERROR_ONE_ARGUMENT=  |||Description: {0}.\r
-\r
-INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT=  |||Description: {0}.\r
+###
+# ================================================================================
+# ECOMP Portal
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ================================================================================
+###
+########################################################################
+#Resource key=Error Code|Message text|Resolution text |Description text
+#######
+#Newlines can be utilized to add some clarity ensuring continuing line
+#has atleast one leading space
+#ResourceKey=\
+#             ERR0000E\
+#             Sample error msg txt\
+#             Sample resolution msg\
+#             Sample description txt
+#
+######
+#Error code classification category
+#100   Permission errors
+#200   Availability errors/Timeouts
+#300   Data errors
+#400   Schema Interface type/validation errors
+#500   Business process errors
+#900   Unknown errors
+#
+########################################################################
+
+# Define Alarm Codes Specific to ECOMP Portal
+BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT= ||Reason: {0}.|\
+                                                                               An Authentication failure occurred during access to UEB server. Please check that UEB keys are configured correctly under fusion.properties file.
+
+BERESTAPIAUTHENTICATIONERROR =                 |||Please check application credentials defined in Database or portal.properties file.
+                                                                               
+INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.
+                                                                               
+INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.
+
+INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.
+
+INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT=||Description: {0}.|Please check the logs for more information.
+
+BEHEALTHCHECKERROR=                                            |||Please check the logs for more information.
+
+BEHEALTHCHECKMYSQLERROR=                               ||Please check the logs for more information.|\
+                                                                               Check connectivity to MYSQL is configured correctly under system.properties file.
+
+BEHEALTHCHECKUEBCLUSTERERROR=                  ||Please check the logs for more information.|\
+                                                                               Check connectivity to UEB cluster which is configured under portal.properties file.
+
+FEHEALTHCHECKERROR=                                            |||Please check connectivity from this FE instance towards BE or BE Load Balancer.
+                                                                               
+BEHEALTHCHECKRECOVERY=                                 |||Please check logs for more specific information about the problem.
+
+BEHEALTHCHECKMYSQLRECOVERY=                            |||Please check logs for more specific information about the problem.
+
+BEHEALTHCHECKUEBCLUSTERRECOVERY=               |||Please check logs for more specific information about the problem.
+
+FEHEALTHCHECKRECOVERY=                                 |||Please check logs for more specific information about the problem.
+
+#UEB communication
+BEUEBCONNECTIONERROR_ONE_ARGUMENT=             ||Reason: {0}.|\
+                                                                               Please check UEB server list and keys configured under Portal.Properties file.
+                                                                               
+BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT=             ||Cannot reach host {0}.|\
+                                                                               Please check UEB server list and keys configured under Portal.Properties file.
+
+#Onboarding apps
+BEUEBREGISTERONBOARDINGAPPERROR=               ||Reason: {0}.|\
+                                                                               Please check UEB server list and keys configured under Portal.Properties file.
+
+#HTTP communication
+BEHTTPCONNECTIONERROR_ONE_ARGUMENT=            ||Reason: {0}.|Please check the logs for more information.
+
+INTERNALCONNECTIONINFO_ONE_ARGUMENT=   ||Description: {0}.|Please check the logs for more information.
+
+INTERNALCONNECTIONWARNING_ONE_ARGUMENT=        ||Description: {0}.|Please check the logs for more information.
+
+INTERNALCONNECTIONERROR_ONE_ARGUMENT=  ||Description: {0}.|Please check the logs for more information.
+
+INTERNALCONNECTIONFATAL_ONE_ARGUMENT=  ||Description: {0}.|Please check the logs for more information.
+
+BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT= ||Data not found: {0}.|\
+                                                                               An error occurred during access to UEB Server, {1} failed to either register or unregister to/from UEB topic.
+
+#Login error codes
+BEUSERMISSINGERROR_ONE_ARGUMENT=               |||\
+                                                                               User {0} must be added to the corresponding application with proper user roles.
+                                                                               
+BEUSERINACTIVEWARNING_ONE_ARGUMENT=            |||\
+                                                                               User {0} must be added to the corresponding application with proper user roles.
+                                                                               
+BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT=        |||\
+                                                                               User {0} should be given proper administrator role for the corresponding application to perform the necessary actions.
+                                                                               
+BEINVALIDJSONINPUT=                                            |||Please check error logs for more information.
+
+BEINCORRECTHTTPSTATUSERROR=                            |||Please check logs for more information.
+
+BEINITIALIZATIONERROR=                                 |||Please check logs for more information.
+
+BEUEBSYSTEMERROR=                                              ||\
+                                                                               Operation: {0}.|\
+                                                                               An error occurred in {1} distribution mechanism. Please check the logs for more information.
+                                                                               
+BEDAOSYSTEMERROR=                                              |||Please check MySQL DB health or look at the logs for more details.
+
+BESYSTEMERROR=                                                 |||Please check logs for more information.
+
+BEEXECUTEROLLBACKERROR=                                        |||Please check MYSQL DB health or look at the logs for more details.
+
+FEHTTPLOGGINGERROR=                                            |||Please check MYSQL DB health or look at the logs for more details.
+                                                                               
+FEPORTALSERVLETERROR=                                  |||Please check logs for more specific information about the problem.
+
+BEDAOCLOSESESSIONERROR=                                        |||Please check MYSQL DB health or look at the logs form more details.
+
+BERESTAPIGENERALERROR=                                 |||Please check error log for more information.
+
+FEHEALTHCHECKGENERALERROR=                             |||Please check error log for more information.
+
+INTERNALUNEXPECTEDINFO_ONE_ARGUMENT=   |||Description: {0}.
+
+INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT=        |||Description: {0}.
+
+INTERNALUNEXPECTEDERROR_ONE_ARGUMENT=  |||Description: {0}.
+
+INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT=  |||Description: {0}.
index a9cb2e4..82c3ad3 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.logging.format;\r
-\r
-import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;\r
-import org.openecomp.portalsdk.core.logging.format.ErrorSeverityEnum;\r
-import org.openecomp.portalsdk.core.logging.format.ErrorTypeEnum;\r
-\r
-/**\r
- * \r
- * @author rc580q\r
- * Add ECOMP Portal Specific Error Code Enums here, for generic\r
- * ones (ones you think are useful not only Portal but also SDK), add it\r
- * to the enum class AppMessagesEnum defined in SDK.\r
- */\r
-public enum EPAppMessagesEnum {\r
-       /*\r
-       100-199 Security/Permission Related \r
-                                                                               - Authentication problems (from external client, to external server)\r
-                                                                               - Certification errors\r
-                                                                               - \r
-                                                                                       \r
-       200-299 Availability/Timeout Related\r
-                                                                               - connectivity error\r
-                                                                               - connection timeout\r
-                                                                               \r
-       300-399 Data Access/Integrity Related\r
-                                                                               - Data in graph in invalid(E.g. no creator is found for service) \r
-                                                                               - Artifact is missing in ES, but exists in graph.\r
-                                                                                \r
-       400-499 Schema Interface Type/Validation\r
-                                                                               - received Pay-load checksum is invalid\r
-                                                                               - received JSON is not valid\r
-                                                         \r
-       500-599 Business/Flow Processing Related  \r
-                                                                               -  check out to service is not allowed\r
-                                                                               -  Roll-back is done\r
-                                                                               -  failed to generate heat file\r
-                                                                                 \r
-\r
-       600-899 Reserved - do not use\r
-\r
-       900-999 Unknown Errors \r
-                                                                               - Unexpected exception\r
-                                                                               */\r
-       \r
-       BeUebAuthenticationError(EPErrorCodesEnum.BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR100E", "An Authentication failure occurred during access to UEB server", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),\r
-       \r
-       BeRestApiAuthenticationError(EPErrorCodesEnum.BERESTAPIAUTHENTICATIONERROR, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR101E", "Rejected an incoming REST API request due to invalid credentials", "", "Please check application credentials defined in Database or properties files."),\r
-       \r
-       InternalAuthenticationInfo(EPErrorCodesEnum.INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR199I", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),\r
-       \r
-       InternalAuthenticationWarning(EPErrorCodesEnum.INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,\r
-                                                               "ERR199W", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),\r
-       \r
-       InternalAuthenticationError(EPErrorCodesEnum.INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR199E", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),\r
-       \r
-       InternalAuthenticationFatal(EPErrorCodesEnum.INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,\r
-                                                               "ERR199F", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),\r
-       \r
-       BeHealthCheckError(EPErrorCodesEnum.BeHEALTHCHECKERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR200E", "ECOMP-PORTAL Back-end probably lost connectivity to either one of the following components: MySQL DB, UEB Cluster", "", "Please check the logs for more information."),\r
-\r
-       BeHealthCheckMySqlError(EPErrorCodesEnum.BEHEALTHCHECKMYSQLERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR201E", "ECOMP-PORTAL Back-end probably lost connectivity to MySQL DB", "", "Check connectivity to MYSQL is configured correctly under system.properties file."),\r
-\r
-       BeHealthCheckUebClusterError(EPErrorCodesEnum.BEHEALTHCHECKUEBCLUSTERERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR203E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "", "Check connectivity to UEB cluster which is configured under portal.properties file."),\r
-       \r
-       FeHealthCheckError(EPErrorCodesEnum.FEHEALTHCHECKERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR204E", "Unable to connect to a valid ECOMP-PORTAL Back-end Server.", "", "Please check connectivity from this FE instance towards BE or BE Load Balancer."),\r
-       \r
-       BeHealthCheckRecovery(EPErrorCodesEnum.BEHEALTHCHECKRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR205I", "ECOMP-PORTAL Back-end Recovery to either one of the following components: MySQL DB, UEB Cluster", "", "Please check logs for more specific information about the problem."),\r
-       \r
-       BeHealthCheckMySqlRecovery(EPErrorCodesEnum.BEHEALTHCHECKMYSQLRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR206I", "ECOMP-PORTAL Back-end connection recovery to MySQL DB", "", "Please check logs for more specific information about the problem."),\r
-       \r
-       BeHealthCheckUebClusterRecovery(EPErrorCodesEnum.BEHEALTHCHECKUEBCLUSTERRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR208I", "ECOMP-PORTAL Back-end connection recovery to UEB Cluster", "", "Please check logs for more specific information about the problem."),\r
-       \r
-       FeHealthCheckRecovery(EPErrorCodesEnum.FEHEALTHCHECKRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR209I", "Connectivity to ECOMP-PORTAL Front-end Server is recovered", "", "Please check logs for more specific information about the problem."),\r
-    \r
-       BeUebConnectionError(EPErrorCodesEnum.BEUEBCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR210E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),\r
-    \r
-    BeUebUnkownHostError(EPErrorCodesEnum.BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR211E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "Cannot reach host: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),\r
-       \r
-    BeUebRegisterOnboardingAppError(EPErrorCodesEnum.BEUEBREGISTERONBOARDINGAPPERROR, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR212E", "Failed to register the On-boarding application with UEB Communication server", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),\r
-    \r
-    BeHttpConnectionError(EPErrorCodesEnum.BEHTTPCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR213E", "It could be that communication to an external application might resulted an exception or failed to reach the external application", \r
-                                                               "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalConnectionInfo(EPErrorCodesEnum.INTERNALCONNECTIONINFO_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                               "ERR299I", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-       InternalConnectionWarning(EPErrorCodesEnum.INTERNALCONNECTIONWARNING_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,\r
-                                                               "ERR299W", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalConnectionError(EPErrorCodesEnum.INTERNALCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR299E", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalConnectionFatal(EPErrorCodesEnum.INTERNALCONNECTIONFATAL_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,\r
-                                                       "ERR299F", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    BeUebObjectNotFoundError(EPErrorCodesEnum.BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR303E", "Error occurred during access to U-EB Server.", "Data not found: {0}.", "An error occurred during access to UEB Server, {1} failed to either register or unregister to/from UEB topic."),\r
-    \r
-    BeUserMissingError(EPErrorCodesEnum.BEUSERMISSINGERROR_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR310E", "User is not found", "", "User {0} must be added to the corresponding application with proper user roles."),\r
-    \r
-    BeUserInactiveWarning(EPErrorCodesEnum.BEUSERINACTIVEWARNING_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,\r
-                                                       "ERR313W", "User is found but in-active", "", "User {0} must be added to the corresponding application with proper user roles."),\r
-    \r
-    BeUserAdminPrivilegesInfo(EPErrorCodesEnum.BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,\r
-                                                       "ERR314W", "User is found but don't have administrative privileges", "", "User {0} should be given administrator role for the corresponding application to perform the necessary actions."),\r
-    \r
-    BeInvalidJsonInput(EPErrorCodesEnum.BEINVALIDJSONINPUT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR405E", "Failed to convert JSON input to object", "", "Please check logs for more information."),\r
-    \r
-    BeIncorrectHttpStatusError(EPErrorCodesEnum.BEINCORRECTHTTPSTATUSERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR407E", "Communication to an external application is resulted in with Incorrect Http response code", "", "Please check logs for more information."),\r
-    \r
-    BeInitializationError(EPErrorCodesEnum.BEINITIALIZATIONERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR500E", "ECOMP-PORTAL Back-end was not initialized properly", "", "Please check logs for more information."),\r
-    \r
-    BeUebSystemError(EPErrorCodesEnum.BEUEBSYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR502E", "Error occurred during access to U-EB Server", "Details: {0}.", "An error occurred in {1} distribution mechanism. Please check the logs for more information."),\r
-    \r
-    BeDaoSystemError(EPErrorCodesEnum.BEDAOSYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR505E", "Performing DDL or DML operations on database might have failed", "", "Please check MySQL DB health or look at the logs for more details."),\r
-    \r
-    BeSystemError(EPErrorCodesEnum.BESYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR506E", "Unexpected error during operation", "", "Please check logs for more information."),\r
-    \r
-    BeExecuteRollbackError(EPErrorCodesEnum.BEEXECUTEROLLBACKERROR, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR507E", "Roll-back operation towards database has failed", "", "Please check MYSQL DB health or look at the logs for more details."),\r
-    \r
-    FeHttpLoggingError(EPErrorCodesEnum.FEHTTPLOGGINGERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR517E", "Error when logging FE HTTP request/response", "", "Please check MYSQL DB health or look at the logs for more details."),\r
-    \r
-       FePortalServletError(EPErrorCodesEnum.FEPORTALSERVLETERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                               "ERR518E", "Error when trying to access FE Portal page.", "", "Please check logs for more information."),\r
-       \r
-    BeDaoCloseSessionError(EPErrorCodesEnum.BEDAOCLOSESESSIONERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR519E", "Close local session operation with database failed", "", "Please check MYSQL DB health or look at the logs form more details."),\r
-    \r
-    BeRestApiGeneralError(EPErrorCodesEnum.BERESTAPIGENERALERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR900E", "Unexpected error during ECOMP-PORTAL Back-end REST API execution", "", "Please check error log for more information."),\r
-    \r
-    FeHealthCheckGeneralError(EPErrorCodesEnum.FEHEALTHCHECKGENERALERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR901E", "General error during FE Health Check", "", "Please check error log for more information."),\r
-    \r
-    InternalUnexpectedInfo(EPErrorCodesEnum.INTERNALUNEXPECTEDINFO_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,\r
-                                                       "ERR999I", "Unexpected error", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalUnexpectedWarning(EPErrorCodesEnum.INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,\r
-                                                       "ERR999W", "Unexpected error", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalUnexpectedError(EPErrorCodesEnum.INTERNALUNEXPECTEDERROR_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,\r
-                                                       "ERR999E", "Unexpected error", "Details: {0}.", "Please check logs for more information."),\r
-    \r
-    InternalUnexpectedFatal(EPErrorCodesEnum.INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,\r
-                                                       "ERR999F", "Unexpected error", "Details: {0}.", "Please check logs for more information."),\r
-       \r
-       ;\r
-       \r
-       ErrorTypeEnum eType;\r
-       AlarmSeverityEnum alarmSeverity;\r
-       EPErrorCodesEnum messageCode;\r
-       ErrorSeverityEnum errorSeverity;\r
-       String errorCode;\r
-       String errorDescription;\r
-       String details;\r
-       String resolution;\r
-       \r
-       EPAppMessagesEnum(EPErrorCodesEnum messageCode, ErrorTypeEnum eType, AlarmSeverityEnum alarmSeverity, ErrorSeverityEnum errorSeverity, String errorCode, String errorDescription, \r
-                                               String details, String resolution) {\r
-               this.messageCode = messageCode;\r
-               this.eType = eType;\r
-               this.alarmSeverity = alarmSeverity;\r
-               this.errorSeverity = errorSeverity;\r
-               this.errorCode = errorCode;\r
-               this.errorDescription = errorDescription;\r
-               this.details = details;\r
-               this.resolution = resolution;\r
-       }\r
-       \r
-       public String getDetails() {\r
-               return this.details;\r
-       }\r
-       \r
-       public String getResolution() {\r
-               return this.resolution;\r
-       }\r
-       public String getErrorCode() {\r
-               return this.errorCode;\r
-       }\r
-       \r
-       public String getErrorDescription() {\r
-               return this.errorDescription;\r
-       }\r
-       \r
-       public ErrorSeverityEnum getErrorSeverity() {\r
-               return this.errorSeverity;\r
-       }\r
-       \r
-       public void setErrorSeverity(ErrorSeverityEnum errorSeverity) {\r
-               this.errorSeverity = errorSeverity;\r
-       }\r
-       \r
-       public EPErrorCodesEnum getMessageCode() {\r
-               return messageCode;\r
-       }\r
-\r
-       public void setMessageCode(EPErrorCodesEnum messageCode) {\r
-               this.messageCode = messageCode;\r
-       }\r
-       \r
-       public AlarmSeverityEnum getAlarmSeverity() {\r
-               return alarmSeverity;\r
-       }\r
-\r
-       public void setAlarmSeverity(AlarmSeverityEnum alarmSeverity) {\r
-               this.alarmSeverity = alarmSeverity;\r
-       }\r
-       \r
-       public ErrorTypeEnum getErrorType() {\r
-               return eType;\r
-       }\r
-\r
-       public void setErrorType(ErrorTypeEnum eType) {\r
-               this.eType = eType;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.logging.format;
+
+import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
+import org.openecomp.portalsdk.core.logging.format.ErrorSeverityEnum;
+import org.openecomp.portalsdk.core.logging.format.ErrorTypeEnum;
+
+/**
+ * 
+ * @author rc580q
+ * Add ECOMP Portal Specific Error Code Enums here, for generic
+ * ones (ones you think are useful not only Portal but also SDK), add it
+ * to the enum class AppMessagesEnum defined in SDK.
+ */
+public enum EPAppMessagesEnum {
+       /*
+       100-199 Security/Permission Related 
+                                                                               - Authentication problems (from external client, to external server)
+                                                                               - Certification errors
+                                                                               - 
+                                                                                       
+       200-299 Availability/Timeout Related
+                                                                               - connectivity error
+                                                                               - connection timeout
+                                                                               
+       300-399 Data Access/Integrity Related
+                                                                               - Data in graph in invalid(E.g. no creator is found for service) 
+                                                                               - Artifact is missing in ES, but exists in graph.
+                                                                                
+       400-499 Schema Interface Type/Validation
+                                                                               - received Pay-load checksum is invalid
+                                                                               - received JSON is not valid
+                                                         
+       500-599 Business/Flow Processing Related  
+                                                                               -  check out to service is not allowed
+                                                                               -  Roll-back is done
+                                                                               -  failed to generate heat file
+                                                                                 
+
+       600-899 Reserved - do not use
+
+       900-999 Unknown Errors 
+                                                                               - Unexpected exception
+                                                                               */
+       
+       BeUebAuthenticationError(EPErrorCodesEnum.BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                               "ERR100E", "An Authentication failure occurred during access to UEB server", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),
+       
+       BeRestApiAuthenticationError(EPErrorCodesEnum.BERESTAPIAUTHENTICATIONERROR, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                               "ERR101E", "Rejected an incoming REST API request due to invalid credentials", "", "Please check application credentials defined in Database or properties files."),
+       
+       InternalAuthenticationInfo(EPErrorCodesEnum.INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR199I", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),
+       
+       InternalAuthenticationWarning(EPErrorCodesEnum.INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,
+                                                               "ERR199W", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),
+       
+       InternalAuthenticationError(EPErrorCodesEnum.INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                               "ERR199E", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),
+       
+       InternalAuthenticationFatal(EPErrorCodesEnum.INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT, ErrorTypeEnum.AUTHENTICATION_PROBLEM, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,
+                                                               "ERR199F", "Internal authentication problem", "Details: {0}.", "Please check the logs for more information."),
+       
+       BeHealthCheckError(EPErrorCodesEnum.BeHEALTHCHECKERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                               "ERR200E", "ECOMP-PORTAL Back-end probably lost connectivity to either one of the following components: MySQL DB, UEB Cluster", "", "Please check the logs for more information."),
+
+       BeHealthCheckMySqlError(EPErrorCodesEnum.BEHEALTHCHECKMYSQLERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                               "ERR201E", "ECOMP-PORTAL Back-end probably lost connectivity to MySQL DB", "", "Check connectivity to MYSQL is configured correctly under system.properties file."),
+
+       BeHealthCheckUebClusterError(EPErrorCodesEnum.BEHEALTHCHECKUEBCLUSTERERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                               "ERR203E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "", "Check connectivity to UEB cluster which is configured under portal.properties file."),
+       
+       FeHealthCheckError(EPErrorCodesEnum.FEHEALTHCHECKERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                               "ERR204E", "Unable to connect to a valid ECOMP-PORTAL Back-end Server.", "", "Please check connectivity from this FE instance towards BE or BE Load Balancer."),
+       
+       BeHealthCheckRecovery(EPErrorCodesEnum.BEHEALTHCHECKRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR205I", "ECOMP-PORTAL Back-end Recovery to either one of the following components: MySQL DB, UEB Cluster", "", "Please check logs for more specific information about the problem."),
+       
+       BeHealthCheckMySqlRecovery(EPErrorCodesEnum.BEHEALTHCHECKMYSQLRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR206I", "ECOMP-PORTAL Back-end connection recovery to MySQL DB", "", "Please check logs for more specific information about the problem."),
+       
+       BeHealthCheckUebClusterRecovery(EPErrorCodesEnum.BEHEALTHCHECKUEBCLUSTERRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR208I", "ECOMP-PORTAL Back-end connection recovery to UEB Cluster", "", "Please check logs for more specific information about the problem."),
+       
+       FeHealthCheckRecovery(EPErrorCodesEnum.FEHEALTHCHECKRECOVERY, ErrorTypeEnum.RECOVERY, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR209I", "Connectivity to ECOMP-PORTAL Front-end Server is recovered", "", "Please check logs for more specific information about the problem."),
+    
+       BeUebConnectionError(EPErrorCodesEnum.BEUEBCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR210E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),
+    
+    BeUebUnkownHostError(EPErrorCodesEnum.BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR211E", "ECOMP-PORTAL Back-end probably lost connectivity to UEB Cluster", "Cannot reach host: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),
+       
+    BeUebRegisterOnboardingAppError(EPErrorCodesEnum.BEUEBREGISTERONBOARDINGAPPERROR, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR212E", "Failed to register the On-boarding application with UEB Communication server", "Details: {0}.", "Please check UEB server list and keys configured under Portal.Properties file."),
+    
+    BeHttpConnectionError(EPErrorCodesEnum.BEHTTPCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                               "ERR213E", "It could be that communication to an external application might resulted an exception or failed to reach the external application", 
+                                                               "Details: {0}.", "Please check logs for more information."),
+    
+    InternalConnectionInfo(EPErrorCodesEnum.INTERNALCONNECTIONINFO_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                               "ERR299I", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),
+    
+       InternalConnectionWarning(EPErrorCodesEnum.INTERNALCONNECTIONWARNING_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,
+                                                               "ERR299W", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),
+    
+    InternalConnectionError(EPErrorCodesEnum.INTERNALCONNECTIONERROR_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR299E", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),
+    
+    InternalConnectionFatal(EPErrorCodesEnum.INTERNALCONNECTIONFATAL_ONE_ARGUMENT, ErrorTypeEnum.CONNECTION_PROBLEM, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,
+                                                       "ERR299F", "Internal Connection problem", "Details: {0}.", "Please check logs for more information."),
+    
+    BeUebObjectNotFoundError(EPErrorCodesEnum.BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR303E", "Error occurred during access to U-EB Server.", "Data not found: {0}.", "An error occurred during access to UEB Server, {1} failed to either register or unregister to/from UEB topic."),
+    
+    BeUserMissingError(EPErrorCodesEnum.BEUSERMISSINGERROR_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR310E", "User is not found", "", "User {0} must be added to the corresponding application with proper user roles."),
+    
+    BeUserInactiveWarning(EPErrorCodesEnum.BEUSERINACTIVEWARNING_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,
+                                                       "ERR313W", "User is found but in-active", "", "User {0} must be added to the corresponding application with proper user roles."),
+    
+    BeUserAdminPrivilegesInfo(EPErrorCodesEnum.BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,
+                                                       "ERR314W", "User is found but don't have administrative privileges", "", "User {0} should be given administrator role for the corresponding application to perform the necessary actions."),
+    
+    BeInvalidJsonInput(EPErrorCodesEnum.BEINVALIDJSONINPUT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR405E", "Failed to convert JSON input to object", "", "Please check logs for more information."),
+    
+    BeIncorrectHttpStatusError(EPErrorCodesEnum.BEINCORRECTHTTPSTATUSERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR407E", "Communication to an external application is resulted in with Incorrect Http response code", "", "Please check logs for more information."),
+    
+    BeInitializationError(EPErrorCodesEnum.BEINITIALIZATIONERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                       "ERR500E", "ECOMP-PORTAL Back-end was not initialized properly", "", "Please check logs for more information."),
+    
+    BeUebSystemError(EPErrorCodesEnum.BEUEBSYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR502E", "Error occurred during access to U-EB Server", "Details: {0}.", "An error occurred in {1} distribution mechanism. Please check the logs for more information."),
+    
+    BeDaoSystemError(EPErrorCodesEnum.BEDAOSYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                       "ERR505E", "Performing DDL or DML operations on database might have failed", "", "Please check MySQL DB health or look at the logs for more details."),
+    
+    BeSystemError(EPErrorCodesEnum.BESYSTEMERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                       "ERR506E", "Unexpected error during operation", "", "Please check logs for more information."),
+    
+    BeExecuteRollbackError(EPErrorCodesEnum.BEEXECUTEROLLBACKERROR, ErrorTypeEnum.DATA_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR507E", "Roll-back operation towards database has failed", "", "Please check MYSQL DB health or look at the logs for more details."),
+    
+    FeHttpLoggingError(EPErrorCodesEnum.FEHTTPLOGGINGERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR517E", "Error when logging FE HTTP request/response", "", "Please check MYSQL DB health or look at the logs for more details."),
+    
+       FePortalServletError(EPErrorCodesEnum.FEPORTALSERVLETERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                               "ERR518E", "Error when trying to access FE Portal page.", "", "Please check logs for more information."),
+       
+    BeDaoCloseSessionError(EPErrorCodesEnum.BEDAOCLOSESESSIONERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR519E", "Close local session operation with database failed", "", "Please check MYSQL DB health or look at the logs form more details."),
+    
+    BeRestApiGeneralError(EPErrorCodesEnum.BERESTAPIGENERALERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                       "ERR900E", "Unexpected error during ECOMP-PORTAL Back-end REST API execution", "", "Please check error log for more information."),
+    
+    FeHealthCheckGeneralError(EPErrorCodesEnum.FEHEALTHCHECKGENERALERROR, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.ERROR,
+                                                       "ERR901E", "General error during FE Health Check", "", "Please check error log for more information."),
+    
+    InternalUnexpectedInfo(EPErrorCodesEnum.INTERNALUNEXPECTEDINFO_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.INFORMATIONAL, ErrorSeverityEnum.INFO,
+                                                       "ERR999I", "Unexpected error", "Details: {0}.", "Please check logs for more information."),
+    
+    InternalUnexpectedWarning(EPErrorCodesEnum.INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MINOR, ErrorSeverityEnum.WARN,
+                                                       "ERR999W", "Unexpected error", "Details: {0}.", "Please check logs for more information."),
+    
+    InternalUnexpectedError(EPErrorCodesEnum.INTERNALUNEXPECTEDERROR_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.MAJOR, ErrorSeverityEnum.ERROR,
+                                                       "ERR999E", "Unexpected error", "Details: {0}.", "Please check logs for more information."),
+    
+    InternalUnexpectedFatal(EPErrorCodesEnum.INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT, ErrorTypeEnum.SYSTEM_ERROR, AlarmSeverityEnum.CRITICAL, ErrorSeverityEnum.FATAL,
+                                                       "ERR999F", "Unexpected error", "Details: {0}.", "Please check logs for more information."),
+       
+       ;
+       
+       ErrorTypeEnum eType;
+       AlarmSeverityEnum alarmSeverity;
+       EPErrorCodesEnum messageCode;
+       ErrorSeverityEnum errorSeverity;
+       String errorCode;
+       String errorDescription;
+       String details;
+       String resolution;
+       
+       EPAppMessagesEnum(EPErrorCodesEnum messageCode, ErrorTypeEnum eType, AlarmSeverityEnum alarmSeverity, ErrorSeverityEnum errorSeverity, String errorCode, String errorDescription, 
+                                               String details, String resolution) {
+               this.messageCode = messageCode;
+               this.eType = eType;
+               this.alarmSeverity = alarmSeverity;
+               this.errorSeverity = errorSeverity;
+               this.errorCode = errorCode;
+               this.errorDescription = errorDescription;
+               this.details = details;
+               this.resolution = resolution;
+       }
+       
+       public String getDetails() {
+               return this.details;
+       }
+       
+       public String getResolution() {
+               return this.resolution;
+       }
+       public String getErrorCode() {
+               return this.errorCode;
+       }
+       
+       public String getErrorDescription() {
+               return this.errorDescription;
+       }
+       
+       public ErrorSeverityEnum getErrorSeverity() {
+               return this.errorSeverity;
+       }
+       
+       public void setErrorSeverity(ErrorSeverityEnum errorSeverity) {
+               this.errorSeverity = errorSeverity;
+       }
+       
+       public EPErrorCodesEnum getMessageCode() {
+               return messageCode;
+       }
+
+       public void setMessageCode(EPErrorCodesEnum messageCode) {
+               this.messageCode = messageCode;
+       }
+       
+       public AlarmSeverityEnum getAlarmSeverity() {
+               return alarmSeverity;
+       }
+
+       public void setAlarmSeverity(AlarmSeverityEnum alarmSeverity) {
+               this.alarmSeverity = alarmSeverity;
+       }
+       
+       public ErrorTypeEnum getErrorType() {
+               return eType;
+       }
+
+       public void setErrorType(ErrorTypeEnum eType) {
+               this.eType = eType;
+       }
+}
index cbfb4fa..498bfcf 100644 (file)
@@ -1,95 +1,95 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.logging.format;\r
-\r
-import com.att.eelf.i18n.EELFResolvableErrorEnum;\r
-import com.att.eelf.i18n.EELFResourceManager;\r
-\r
-/**\r
- * \r
- * @author rc580q\r
- * Add ECOMP Portal Specific Error Code Enums here, for generic\r
- * ones (ones you think are useful not only Portal but also SDK), add it\r
- * to the enum class AppMessagesEnum defined in SDK.\r
- */\r
-public enum EPErrorCodesEnum implements EELFResolvableErrorEnum {\r
-       BERESTAPIAUTHENTICATIONERROR,\r
-       BEHTTPCONNECTIONERROR_ONE_ARGUMENT,\r
-       BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT,\r
-       \r
-       INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT,\r
-       INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT,\r
-       INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT,\r
-       INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT,\r
-       \r
-       BEHEALTHCHECKRECOVERY,\r
-       BEHEALTHCHECKMYSQLRECOVERY,\r
-       BEHEALTHCHECKUEBCLUSTERRECOVERY,\r
-       FEHEALTHCHECKRECOVERY,\r
-       BeHEALTHCHECKERROR,\r
-       \r
-       BEHEALTHCHECKMYSQLERROR,\r
-       BEHEALTHCHECKUEBCLUSTERERROR,\r
-       FEHEALTHCHECKERROR,\r
-       BEUEBCONNECTIONERROR_ONE_ARGUMENT,\r
-       BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT,\r
-       BEUEBREGISTERONBOARDINGAPPERROR,\r
-       \r
-       INTERNALCONNECTIONINFO_ONE_ARGUMENT,\r
-       INTERNALCONNECTIONWARNING_ONE_ARGUMENT,\r
-       INTERNALCONNECTIONERROR_ONE_ARGUMENT,\r
-       INTERNALCONNECTIONFATAL_ONE_ARGUMENT,\r
-       \r
-       BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT,\r
-       BEUSERMISSINGERROR_ONE_ARGUMENT,\r
-       \r
-       BEUSERINACTIVEWARNING_ONE_ARGUMENT,\r
-       BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT,\r
-       \r
-       BEINVALIDJSONINPUT,\r
-       BEINCORRECTHTTPSTATUSERROR,\r
-               \r
-       BEINITIALIZATIONERROR,\r
-       BEUEBSYSTEMERROR,\r
-       BEDAOSYSTEMERROR,\r
-       BESYSTEMERROR,\r
-       BEEXECUTEROLLBACKERROR,\r
-       \r
-       FEHTTPLOGGINGERROR,\r
-       FEPORTALSERVLETERROR,\r
-       BEDAOCLOSESESSIONERROR,\r
-       \r
-       BERESTAPIGENERALERROR,\r
-       FEHEALTHCHECKGENERALERROR,\r
-       \r
-       INTERNALUNEXPECTEDINFO_ONE_ARGUMENT,\r
-       INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT,\r
-       INTERNALUNEXPECTEDERROR_ONE_ARGUMENT,\r
-       INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT,\r
-       ;\r
-       \r
-       /**\r
-     * Static initializer to ensure the resource bundles for this class are loaded...\r
-     * Here this application loads messages from three bundles\r
-     */\r
-    static {\r
-        EELFResourceManager.loadMessageBundle("org/openecomp/portalapp/portal/logging/format/ApplicationCodes");\r
-    }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.logging.format;
+
+import com.att.eelf.i18n.EELFResolvableErrorEnum;
+import com.att.eelf.i18n.EELFResourceManager;
+
+/**
+ * 
+ * @author rc580q
+ * Add ECOMP Portal Specific Error Code Enums here, for generic
+ * ones (ones you think are useful not only Portal but also SDK), add it
+ * to the enum class AppMessagesEnum defined in SDK.
+ */
+public enum EPErrorCodesEnum implements EELFResolvableErrorEnum {
+       BERESTAPIAUTHENTICATIONERROR,
+       BEHTTPCONNECTIONERROR_ONE_ARGUMENT,
+       BEUEBAUTHENTICATIONERROR_ONE_ARGUMENT,
+       
+       INTERNALAUTHENTICATIONINFO_ONE_ARGUMENT,
+       INTERNALAUTHENTICATIONWARNING_ONE_ARGUMENT,
+       INTERNALAUTHENTICATIONERROR_ONE_ARGUMENT,
+       INTERNALAUTHENTICATIONFATAL_ONE_ARGUMENT,
+       
+       BEHEALTHCHECKRECOVERY,
+       BEHEALTHCHECKMYSQLRECOVERY,
+       BEHEALTHCHECKUEBCLUSTERRECOVERY,
+       FEHEALTHCHECKRECOVERY,
+       BeHEALTHCHECKERROR,
+       
+       BEHEALTHCHECKMYSQLERROR,
+       BEHEALTHCHECKUEBCLUSTERERROR,
+       FEHEALTHCHECKERROR,
+       BEUEBCONNECTIONERROR_ONE_ARGUMENT,
+       BEUEBUNKOWNHOSTERROR_ONE_ARGUMENT,
+       BEUEBREGISTERONBOARDINGAPPERROR,
+       
+       INTERNALCONNECTIONINFO_ONE_ARGUMENT,
+       INTERNALCONNECTIONWARNING_ONE_ARGUMENT,
+       INTERNALCONNECTIONERROR_ONE_ARGUMENT,
+       INTERNALCONNECTIONFATAL_ONE_ARGUMENT,
+       
+       BEUEBOBJECTNOTFOUNDERROR_ONE_ARGUMENT,
+       BEUSERMISSINGERROR_ONE_ARGUMENT,
+       
+       BEUSERINACTIVEWARNING_ONE_ARGUMENT,
+       BEUSERADMINPRIVILEGESINFO_ONE_ARGUMENT,
+       
+       BEINVALIDJSONINPUT,
+       BEINCORRECTHTTPSTATUSERROR,
+               
+       BEINITIALIZATIONERROR,
+       BEUEBSYSTEMERROR,
+       BEDAOSYSTEMERROR,
+       BESYSTEMERROR,
+       BEEXECUTEROLLBACKERROR,
+       
+       FEHTTPLOGGINGERROR,
+       FEPORTALSERVLETERROR,
+       BEDAOCLOSESESSIONERROR,
+       
+       BERESTAPIGENERALERROR,
+       FEHEALTHCHECKGENERALERROR,
+       
+       INTERNALUNEXPECTEDINFO_ONE_ARGUMENT,
+       INTERNALUNEXPECTEDWARNING_ONE_ARGUMENT,
+       INTERNALUNEXPECTEDERROR_ONE_ARGUMENT,
+       INTERNALUNEXPECTEDFATAL_ONE_ARGUMENT,
+       ;
+       
+       /**
+     * Static initializer to ensure the resource bundles for this class are loaded...
+     * Here this application loads messages from three bundles
+     */
+    static {
+        EELFResourceManager.loadMessageBundle("org/openecomp/portalapp/portal/logging/format/ApplicationCodes");
+    }
+}
index aa86765..ebda67e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.logging.logic;\r
-\r
-import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY;\r
-\r
-import java.text.MessageFormat;\r
-\r
-import org.slf4j.MDC;\r
-\r
-import com.att.eelf.configuration.EELFLogger;\r
-import com.att.eelf.configuration.EELFManager;\r
-\r
-import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;\r
-import org.openecomp.portalsdk.core.logging.format.ErrorSeverityEnum;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.web.support.UserUtils;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-\r
-public class EPLogUtil {\r
-\r
-       // This class has no logger.  It uses loggers passed to it.\r
-       \r
-       /**\r
-        * Formats and writes a message to the error log with the class name and the\r
-        * specified parameters, using log level info, warn or error appropriate for\r
-        * the specified severity\r
-        * \r
-        * @param classLogger\r
-        *            Logger for the class where the error occurred; the logger\r
-        *            carries the class name.\r
-        * @param epMessageEnum\r
-        *            Enum carrying alarm and error severity\r
-        * @param param\r
-        *            Values used to build the message.\r
-        */\r
-       public static void logEcompError(EELFLoggerDelegate classLogger, EPAppMessagesEnum epMessageEnum, String... param) {\r
-               logEcompError(classLogger, epMessageEnum, null, param);\r
-       }\r
-       \r
-       /**\r
-        * Formats and writes a message to the error log with the class name and the\r
-        * specified parameters, using log level info, warn or error appropriate for\r
-        * the specified severity\r
-        * \r
-        * @param classLogger\r
-        *            Logger for the class where the error occurred; the logger\r
-        *            carries the class name.\r
-        * @param epMessageEnum\r
-        *            Enum carrying alarm and error severity\r
-        * @param param\r
-        *            Values used to build the message.\r
-        */\r
-       private static EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger();\r
-       public static void logEcompError(EPAppMessagesEnum epMessageEnum, String... param) {\r
-               try {\r
-                       AlarmSeverityEnum alarmSeverityEnum = epMessageEnum.getAlarmSeverity();\r
-                       ErrorSeverityEnum errorSeverityEnum = epMessageEnum.getErrorSeverity();\r
-                       \r
-                       MDC.put(MDC_ALERT_SEVERITY, alarmSeverityEnum.name());\r
-                       MDC.put("ErrorCode", epMessageEnum.getErrorCode());\r
-                       MDC.put("ErrorDescription", epMessageEnum.getErrorDescription());\r
-                       MDC.put("ClassName", EPLogUtil.class.getName());\r
-                       \r
-                       String resolution = EPLogUtil.formatMessage(epMessageEnum.getDetails() + " " + epMessageEnum.getResolution(), (Object[]) param);\r
-                       if (errorSeverityEnum == ErrorSeverityEnum.WARN) {\r
-                               errorLogger.warn(resolution);\r
-                       } else if(errorSeverityEnum == ErrorSeverityEnum.INFO) {\r
-                               errorLogger.info(resolution);\r
-                       } else {\r
-                               errorLogger.error(resolution);\r
-                       }\r
-               } catch(Exception e) {\r
-                       errorLogger.error("Failed to log the error code. Details: " + UserUtils.getStackTrace(e));\r
-               } finally {\r
-                       MDC.remove("ErrorCode");\r
-                       MDC.remove("ErrorDescription");\r
-                       MDC.remove("ClassName");\r
-                       MDC.remove(MDC_ALERT_SEVERITY);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Formats and writes a message to the error log with the class name,\r
-        * throwable and the specified parameters, using log level info, warn or\r
-        * error appropriate for the specified severity\r
-        * \r
-        * @param classLogger\r
-        *            Logger for the class where the error occurred; the logger\r
-        *            carries the class name.\r
-        * @param epMessageEnum\r
-        *            Enum carrying alarm and error severity\r
-        * @param th\r
-        *            Throwable; ignored if null\r
-        * @param param\r
-        *            Array of Strings used to build the message.\r
-        */\r
-       @SuppressWarnings("static-access")\r
-       public static void logEcompError(EELFLoggerDelegate classLogger, EPAppMessagesEnum epMessageEnum, Throwable th,\r
-                       String... param) {\r
-\r
-               AlarmSeverityEnum alarmSeverityEnum = epMessageEnum.getAlarmSeverity();\r
-               ErrorSeverityEnum errorSeverityEnum = epMessageEnum.getErrorSeverity();\r
-\r
-               MDC.put(MDC_ALERT_SEVERITY, alarmSeverityEnum.name());\r
-               MDC.put("ErrorCode", epMessageEnum.getErrorCode());\r
-               MDC.put("ErrorDescription", epMessageEnum.getErrorDescription());\r
-\r
-               final String message = EPLogUtil.formatMessage(epMessageEnum.getDetails() + " " + epMessageEnum.getResolution(),\r
-                               (Object[]) param);\r
-               if (errorSeverityEnum == ErrorSeverityEnum.INFO) {\r
-                       if (th == null)\r
-                               classLogger.info(classLogger.errorLogger, message);\r
-                       else\r
-                               classLogger.info(classLogger.errorLogger, message, th);\r
-               } else if (errorSeverityEnum == ErrorSeverityEnum.WARN) {\r
-                       if (th == null)\r
-                               classLogger.warn(classLogger.errorLogger, message);\r
-                       else\r
-                               classLogger.warn(classLogger.errorLogger, message, th);\r
-               } else {\r
-                       if (th == null)\r
-                               classLogger.error(classLogger.errorLogger, message);\r
-                       else\r
-                               classLogger.error(classLogger.errorLogger, message, th);\r
-               }\r
-\r
-               // Clean up\r
-               MDC.remove(MDC_ALERT_SEVERITY);\r
-               MDC.remove("ErrorCode");\r
-               MDC.remove("ErrorDescription");\r
-       }\r
-\r
-       /**\r
-        * Builds a string using the format and parameters.\r
-        * @param message\r
-        * @param args\r
-        * @return\r
-        */\r
-       private static String formatMessage(String message, Object... args) {\r
-               StringBuilder sbFormattedMessage = new StringBuilder();\r
-               if (args != null && args.length > 0 && message != null && message != "") {\r
-                       MessageFormat mf = new MessageFormat(message);\r
-                       sbFormattedMessage.append(mf.format(args));\r
-               } else {\r
-                       sbFormattedMessage.append(message);\r
-               }\r
-               return sbFormattedMessage.toString();\r
-       }\r
-\r
-       /**\r
-        * Builds a comma-separated string of values to document a user action.\r
-        * \r
-        * @param action\r
-        * @param activity\r
-        * @param userId\r
-        * @param affectedId\r
-        * @param comment\r
-        * @return Value suitable for writing to the audit log file.\r
-        */\r
-       public static String formatAuditLogMessage(String action, String activity, String userId, String affectedId,\r
-                       String comment) {\r
-               StringBuilder auditLogMsg = new StringBuilder();\r
-               auditLogMsg.append("Click_A:[");\r
-               if (action != null && !action.equals("")) {\r
-                       auditLogMsg.append(" Action: ");\r
-                       auditLogMsg.append(action);\r
-               }\r
-\r
-               if (activity != null && !activity.equals("")) {\r
-                       auditLogMsg.append(",Activity CD: ");\r
-                       auditLogMsg.append(activity);\r
-               }\r
-\r
-               if (userId != null && !userId.equals("")) {\r
-                       auditLogMsg.append(",User ID: ");\r
-                       auditLogMsg.append(userId);\r
-               }\r
-\r
-               if (affectedId != null && !affectedId.equals("")) {\r
-                       auditLogMsg.append(",Affected ID: ");\r
-                       auditLogMsg.append(affectedId);\r
-               }\r
-\r
-               if (comment != null && !comment.equals("")) {\r
-                       auditLogMsg.append(",Comment: ");\r
-                       auditLogMsg.append(comment);\r
-               }\r
-               auditLogMsg.append("]");\r
-               return auditLogMsg.toString();\r
-       }\r
-\r
-       /**\r
-        * Builds a comma-separated string of values to document a user browser\r
-        * action.\r
-        * \r
-        * @param orgUserId\r
-        * @param action\r
-        * @param activity\r
-        * @param actionLink\r
-        * @param page\r
-        * @param function\r
-        * @param type\r
-        * @return Value suitable for writing to the audit log file.\r
-        */\r
-       public static String formatStoreAnalyticsAuditLogMessage(String orgUserId, String appName, String action, String activity,\r
-                       String actionLink, String page, String function, String type) {\r
-               StringBuilder auditLogStoreAnalyticsMsg = new StringBuilder();\r
-               auditLogStoreAnalyticsMsg.append("Click_Analytics:[");\r
-               if (orgUserId != null && !orgUserId.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(" Organization User ID: ");\r
-                       auditLogStoreAnalyticsMsg.append(orgUserId);\r
-               }\r
-               \r
-               if (appName != null && !appName.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",AppName: ");\r
-                       auditLogStoreAnalyticsMsg.append(appName);\r
-               }\r
-\r
-               if (action != null && !action.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",Action: ");\r
-                       auditLogStoreAnalyticsMsg.append(action);\r
-               }\r
-\r
-               if (activity != null && !activity.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",Activity: ");\r
-                       auditLogStoreAnalyticsMsg.append(activity);\r
-               }\r
-\r
-               if (actionLink != null && !actionLink.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",ActionLink: ");\r
-                       auditLogStoreAnalyticsMsg.append(actionLink);\r
-               }\r
-\r
-               if (page != null && !page.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",Page: ");\r
-                       auditLogStoreAnalyticsMsg.append(page);\r
-               }\r
-\r
-               if (function != null && !function.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",Function: ");\r
-                       auditLogStoreAnalyticsMsg.append(function);\r
-               }\r
-\r
-               if (type != null && !type.equals("")) {\r
-                       auditLogStoreAnalyticsMsg.append(",Type: ");\r
-                       auditLogStoreAnalyticsMsg.append(type);\r
-               }\r
-               auditLogStoreAnalyticsMsg.append("]");\r
-               return auditLogStoreAnalyticsMsg.toString();\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.logging.logic;
+
+import static com.att.eelf.configuration.Configuration.MDC_ALERT_SEVERITY;
+
+import java.text.MessageFormat;
+
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
+import org.openecomp.portalsdk.core.logging.format.ErrorSeverityEnum;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.slf4j.MDC;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+
+public class EPLogUtil {
+
+       // This class has no logger of its own; it uses loggers passed to it.
+       private static EELFLogger errorLogger = EELFManager.getInstance().getErrorLogger();
+
+       /**
+        * Formats and writes a message to the error log with the class name and the
+        * specified parameters, using log level info, warn or error appropriate for
+        * the specified severity
+        * 
+        * @param classLogger
+        *            Logger for the class where the error occurred; the logger
+        *            carries the class name.
+        * @param epMessageEnum
+        *            Enum carrying alarm and error severity
+        * @param param
+        *            Values used to build the message.
+        */
+       public static void logEcompError(EELFLoggerDelegate classLogger, EPAppMessagesEnum epMessageEnum, String... param) {
+               logEcompError(classLogger, epMessageEnum, null, param);
+       }
+
+       /**
+        * Formats and writes a message to the error log with the class name and the
+        * specified parameters, using log level info, warn or error appropriate for
+        * the specified severity
+        * 
+        * @param classLogger
+        *            Logger for the class where the error occurred; the logger
+        *            carries the class name.
+        * @param epMessageEnum
+        *            Enum carrying alarm and error severity
+        * @param param
+        *            Values used to build the message.
+        */
+       public static void logEcompError(EPAppMessagesEnum epMessageEnum, String... param) {
+               try {
+                       AlarmSeverityEnum alarmSeverityEnum = epMessageEnum.getAlarmSeverity();
+                       ErrorSeverityEnum errorSeverityEnum = epMessageEnum.getErrorSeverity();
+
+                       MDC.put(MDC_ALERT_SEVERITY, alarmSeverityEnum.name());
+                       MDC.put("ErrorCode", epMessageEnum.getErrorCode());
+                       MDC.put("ErrorDescription", epMessageEnum.getErrorDescription());
+                       MDC.put("ClassName", EPLogUtil.class.getName());
+
+                       String resolution = EPLogUtil
+                                       .formatMessage(epMessageEnum.getDetails() + " " + epMessageEnum.getResolution(), (Object[]) param);
+                       if (errorSeverityEnum == ErrorSeverityEnum.WARN) {
+                               errorLogger.warn(resolution);
+                       } else if (errorSeverityEnum == ErrorSeverityEnum.INFO) {
+                               errorLogger.info(resolution);
+                       } else {
+                               errorLogger.error(resolution);
+                       }
+               } catch (Exception e) {
+                       errorLogger.error("Failed to log the error code. Details: " + UserUtils.getStackTrace(e));
+               } finally {
+                       MDC.remove("ErrorCode");
+                       MDC.remove("ErrorDescription");
+                       MDC.remove("ClassName");
+                       MDC.remove(MDC_ALERT_SEVERITY);
+               }
+       }
+
+       /**
+        * Formats and writes a message to the error log with the class name,
+        * throwable and the specified parameters, using log level info, warn or
+        * error appropriate for the specified severity
+        * 
+        * @param classLogger
+        *            Logger for the class where the error occurred; the logger
+        *            carries the class name.
+        * @param epMessageEnum
+        *            Enum carrying alarm and error severity
+        * @param th
+        *            Throwable; ignored if null
+        * @param param
+        *            Array of Strings used to build the message.
+        */
+       @SuppressWarnings("static-access")
+       public static void logEcompError(EELFLoggerDelegate classLogger, EPAppMessagesEnum epMessageEnum, Throwable th,
+                       String... param) {
+
+               AlarmSeverityEnum alarmSeverityEnum = epMessageEnum.getAlarmSeverity();
+               ErrorSeverityEnum errorSeverityEnum = epMessageEnum.getErrorSeverity();
+
+               MDC.put(MDC_ALERT_SEVERITY, alarmSeverityEnum.name());
+               MDC.put("ErrorCode", epMessageEnum.getErrorCode());
+               MDC.put("ErrorDescription", epMessageEnum.getErrorDescription());
+
+               final String message = EPLogUtil.formatMessage(epMessageEnum.getDetails() + " " + epMessageEnum.getResolution(),
+                               (Object[]) param);
+               if (errorSeverityEnum == ErrorSeverityEnum.INFO) {
+                       if (th == null)
+                               classLogger.info(classLogger.errorLogger, message);
+                       else
+                               classLogger.info(classLogger.errorLogger, message, th);
+               } else if (errorSeverityEnum == ErrorSeverityEnum.WARN) {
+                       if (th == null)
+                               classLogger.warn(classLogger.errorLogger, message);
+                       else
+                               classLogger.warn(classLogger.errorLogger, message, th);
+               } else {
+                       if (th == null)
+                               classLogger.error(classLogger.errorLogger, message);
+                       else
+                               classLogger.error(classLogger.errorLogger, message, th);
+               }
+
+               // Clean up
+               MDC.remove(MDC_ALERT_SEVERITY);
+               MDC.remove("ErrorCode");
+               MDC.remove("ErrorDescription");
+       }
+
+       /**
+        * Builds a string using the format and parameters.
+        * 
+        * @param message
+        * @param args
+        * @return
+        */
+       private static String formatMessage(String message, Object... args) {
+               StringBuilder sbFormattedMessage = new StringBuilder();
+               if (args != null && args.length > 0 && message != null && message != "") {
+                       MessageFormat mf = new MessageFormat(message);
+                       sbFormattedMessage.append(mf.format(args));
+               } else {
+                       sbFormattedMessage.append(message);
+               }
+               return sbFormattedMessage.toString();
+       }
+
+       /**
+        * Builds a comma-separated string of values to document a user action.
+        * 
+        * @param action
+        *            String
+        * @param activity
+        *            String
+        * @param userId
+        *            String
+        * @param affectedId
+        *            String
+        * @param comment
+        *            String
+        * @return Value suitable for writing to the audit log file.
+        */
+       public static String formatAuditLogMessage(String action, String activity, String userId, String affectedId,
+                       String comment) {
+               StringBuilder auditLogMsg = new StringBuilder();
+               auditLogMsg.append("Click_A:[");
+               if (action != null && !action.equals("")) {
+                       auditLogMsg.append(" Action: ");
+                       auditLogMsg.append(action);
+               }
+
+               if (activity != null && !activity.equals("")) {
+                       auditLogMsg.append(",Activity CD: ");
+                       auditLogMsg.append(activity);
+               }
+
+               if (userId != null && !userId.equals("")) {
+                       auditLogMsg.append(",User ID: ");
+                       auditLogMsg.append(userId);
+               }
+
+               if (affectedId != null && !affectedId.equals("")) {
+                       auditLogMsg.append(",Affected ID: ");
+                       auditLogMsg.append(affectedId);
+               }
+
+               if (comment != null && !comment.equals("")) {
+                       auditLogMsg.append(",Comment: ");
+                       auditLogMsg.append(comment);
+               }
+               auditLogMsg.append("]");
+               return auditLogMsg.toString();
+       }
+
+       /**
+        * Builds a comma-separated string of values to document a user browser
+        * action.
+        * 
+        * @param orgUserId
+        *            String
+        * @param appName
+        *            String
+        * @param action
+        *            String
+        * @param activity
+        *            String
+        * @param actionLink
+        *            String
+        * @param page
+        *            String
+        * @param function
+        *            String
+        * @param type
+        *            String
+        * @return String value suitable for writing to the audit log file.
+        */
+       public static String formatStoreAnalyticsAuditLogMessage(String orgUserId, String appName, String action,
+                       String activity, String actionLink, String page, String function, String type) {
+               StringBuilder auditLogStoreAnalyticsMsg = new StringBuilder();
+               auditLogStoreAnalyticsMsg.append("Click_Analytics:[");
+               if (orgUserId != null && !orgUserId.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(" Organization User ID: ");
+                       auditLogStoreAnalyticsMsg.append(orgUserId);
+               }
+
+               if (appName != null && !appName.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",AppName: ");
+                       auditLogStoreAnalyticsMsg.append(appName);
+               }
+
+               if (action != null && !action.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",Action: ");
+                       auditLogStoreAnalyticsMsg.append(action);
+               }
+
+               if (activity != null && !activity.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",Activity: ");
+                       auditLogStoreAnalyticsMsg.append(activity);
+               }
+
+               if (actionLink != null && !actionLink.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",ActionLink: ");
+                       auditLogStoreAnalyticsMsg.append(actionLink);
+               }
+
+               if (page != null && !page.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",Page: ");
+                       auditLogStoreAnalyticsMsg.append(page);
+               }
+
+               if (function != null && !function.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",Function: ");
+                       auditLogStoreAnalyticsMsg.append(function);
+               }
+
+               if (type != null && !type.equals("")) {
+                       auditLogStoreAnalyticsMsg.append(",Type: ");
+                       auditLogStoreAnalyticsMsg.append(type);
+               }
+               auditLogStoreAnalyticsMsg.append("]");
+               return auditLogStoreAnalyticsMsg.toString();
+       }
+
+}
index a1016e1..529581d 100644 (file)
@@ -1,56 +1,56 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;\r
-\r
-public interface AdminRolesService {\r
-\r
-       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(String orgUserId);\r
-\r
-       public boolean setAppsWithAdminRoleStateForUser(AppsListWithAdminRole newAppsListWithAdminRoles);\r
-\r
-       /**\r
-        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.\r
-        * @param user\r
-        * @return 'true' if user has Super Administrator role SYS_ADMIN_ROLE_ID (1 for now) in ECOMP PORTAL, 'false' otherwise\r
-        */\r
-       public boolean isSuperAdmin(EPUser user);\r
-       \r
-       /**\r
-        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.\r
-        * @param user\r
-        * @return 'true' if user has Account Administrator role ACCOUNT_ADMIN_ROLE_ID (999 for now) for any application except ECOMP Portal, 'false' otherwise\r
-        */\r
-       public boolean isAccountAdmin(EPUser user);\r
-\r
-       /**\r
-        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.\r
-        * @param user\r
-        * @return 'true' if user has any remote(!) role within any application (ECOMP Portal roles are not included), 'false' otherwise\r
-        */\r
-       public boolean isUser(EPUser user);\r
-\r
-       List<EPRole> getRolesByApp(EPUser user, Long appId);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+
+public interface AdminRolesService {
+
+       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(String orgUserId);
+
+       public boolean setAppsWithAdminRoleStateForUser(AppsListWithAdminRole newAppsListWithAdminRoles);
+
+       /**
+        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.
+        * @param user
+        * @return 'true' if user has Super Administrator role SYS_ADMIN_ROLE_ID (1 for now) in ECOMP PORTAL, 'false' otherwise
+        */
+       public boolean isSuperAdmin(EPUser user);
+       
+       /**
+        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.
+        * @param user
+        * @return 'true' if user has Account Administrator role ACCOUNT_ADMIN_ROLE_ID (999 for now) for any application except ECOMP Portal, 'false' otherwise
+        */
+       public boolean isAccountAdmin(EPUser user);
+
+       /**
+        * Attention! User roles in ECOMP PORTAL cannot be managed by this function.
+        * @param user
+        * @return 'true' if user has any remote(!) role within any application (ECOMP Portal roles are not included), 'false' otherwise
+        */
+       public boolean isUser(EPUser user);
+
+       List<EPRole> getRolesByApp(EPUser user, Long appId);
+}
index 50e7348..20daa4f 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-\r
-import javax.annotation.PostConstruct;\r
-\r
-import org.apache.cxf.common.util.StringUtils;\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserApp;\r
-import org.openecomp.portalapp.portal.domain.UserIdRoleId;\r
-import org.openecomp.portalapp.portal.domain.UserRole;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;\r
-import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Service("adminRolesService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-\r
-public class AdminRolesServiceImpl implements AdminRolesService {\r
-\r
-       private Long SYS_ADMIN_ROLE_ID = 1L;\r
-       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;\r
-       private Long ECOMP_APP_ID = 1L;\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminRolesServiceImpl.class);\r
-\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       SearchService searchService;\r
-       @Autowired\r
-       EPAppService appsService;\r
-\r
-       @PostConstruct\r
-       private void init() {\r
-               try {\r
-                       SYS_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.SYS_ADMIN_ROLE_ID));\r
-                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));\r
-                       ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID));\r
-               } catch(Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               }\r
-       }\r
-       \r
-       @Override\r
-       @EPMetricsLog\r
-       @SuppressWarnings("unchecked")\r
-       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(String orgUserId) {\r
-               AppsListWithAdminRole appsListWithAdminRole = null;\r
-\r
-               try {\r
-                       List<EPUser> userList = dataAccessService.getList(EPUser.class, " where orgUserId = '" + orgUserId + "'", null,\r
-                                       null);\r
-                       HashMap<Long, Long> appsUserAdmin = new HashMap<Long, Long>();\r
-                       if (userList.size() > 0) {\r
-                               EPUser user = userList.get(0);\r
-                               List<EPUserApp> userAppList = null;\r
-                               try {\r
-                                       userAppList = dataAccessService.getList(EPUserApp.class,\r
-                                                       " where userId = " + user.getId() + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID, null, null);\r
-                               } catch (Exception e) {\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                                       EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);\r
-                               }\r
-                               for (EPUserApp userApp : userAppList) {\r
-                                       appsUserAdmin.put(userApp.getAppId(), userApp.getUserId());\r
-                               }\r
-                       }\r
-\r
-                       appsListWithAdminRole = new AppsListWithAdminRole();\r
-                       appsListWithAdminRole.orgUserId = orgUserId;\r
-                       List<EPApp> appsList = null;\r
-                       try {\r
-                               appsList = dataAccessService.getList(EPApp.class, "  where ( enabled = 'Y' or id = " + ECOMP_APP_ID + ")", null, null);\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                               EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);\r
-                       }\r
-                       for (EPApp app : appsList) {\r
-                               AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();\r
-                               appNameIdIsAdmin.id = app.getId();\r
-                               appNameIdIsAdmin.appName = app.getName();       \r
-                               appNameIdIsAdmin.isAdmin = new Boolean(appsUserAdmin.containsKey(app.getId()));\r
-                               appNameIdIsAdmin.restrictedApp = app.isRestrictedApp();\r
-                               appsListWithAdminRole.appsRoles.add(appNameIdIsAdmin);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing AdminRolesServiceImpl.getAppsWithAdminRoleStateForUser operation, Details:"\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-\r
-               return appsListWithAdminRole;\r
-       }\r
-\r
-       private static final Object syncRests = new Object();\r
-\r
-       @Override\r
-       @EPMetricsLog\r
-       @SuppressWarnings("unchecked")\r
-       public boolean setAppsWithAdminRoleStateForUser(AppsListWithAdminRole newAppsListWithAdminRoles) {\r
-               boolean result = false;\r
-               // No changes if no new roles list or no userId.\r
-               if (!StringUtils.isEmpty(newAppsListWithAdminRoles.orgUserId) && newAppsListWithAdminRoles.appsRoles != null) {\r
-                       synchronized (syncRests) {\r
-                               List<EPApp> apps = appsService.getAppsFullList();\r
-                               HashMap<Long, EPApp> enabledApps = new HashMap<Long, EPApp>();\r
-                               for (EPApp app : apps) {\r
-                                       if (app.getEnabled().booleanValue() || app.getId() == ECOMP_APP_ID) {\r
-                                               enabledApps.put(app.getId(), app);\r
-                                       }\r
-                               }\r
-                               List<AppNameIdIsAdmin> newAppsWhereUserIsAdmin = new ArrayList<AppNameIdIsAdmin>();\r
-                               for (AppNameIdIsAdmin adminRole : newAppsListWithAdminRoles.appsRoles) {\r
-                                       // user Admin role may be added only for enabled apps\r
-                                       if (adminRole.isAdmin.booleanValue() && enabledApps.containsKey(adminRole.id)) {\r
-                                               newAppsWhereUserIsAdmin.add(adminRole);\r
-                                       }\r
-                               }\r
-                               EPUser user = null;\r
-                               boolean createNewUser = false;\r
-                               String orgUserId = newAppsListWithAdminRoles.orgUserId.trim();\r
-                               List<EPUser> localUserList = dataAccessService.getList(EPUser.class, " where org_user_id='" + orgUserId + "'",\r
-                                               null, null);\r
-                               List<EPUserApp> oldAppsWhereUserIsAdmin = new ArrayList<EPUserApp>();\r
-                               if (localUserList.size() > 0) {\r
-                                       EPUser tmpUser = localUserList.get(0);\r
-                                       oldAppsWhereUserIsAdmin = dataAccessService.getList(EPUserApp.class,\r
-                                                       " where userId = " + tmpUser.getId() + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID, null,\r
-                                                       null);\r
-                                       if (oldAppsWhereUserIsAdmin.size() > 0 || newAppsWhereUserIsAdmin.size() > 0) {\r
-                                               user = tmpUser;\r
-                                       }\r
-                               } else if (newAppsWhereUserIsAdmin.size() > 0) {\r
-                                       // we create new user only if he has Admin Role for any App\r
-                                       createNewUser = true;\r
-                               }\r
-                               if (user != null || createNewUser) {\r
-                                       Session localSession = null;\r
-                                       Transaction transaction = null;\r
-                                       try {\r
-                                               localSession = sessionFactory.openSession();\r
-                                               transaction = localSession.beginTransaction();\r
-                                               if (createNewUser) {\r
-                                                       user = this.searchService.searchUserByUserId(orgUserId);\r
-                                                       if (user != null) {\r
-                                                               // insert the user with active true in order to\r
-                                                               // pass login phase.\r
-                                                               user.setActive(true);\r
-                                                               localSession.save(EPUser.class.getName(), user);\r
-                                                       }\r
-                                               }\r
-                                               for (EPUserApp oldUserApp : oldAppsWhereUserIsAdmin) {\r
-                                                       // user Admin role may be deleted only for enabled\r
-                                                       // apps\r
-                                                       if (enabledApps.containsKey(oldUserApp.getAppId())) {\r
-                                                               localSession.delete(oldUserApp);\r
-                                                       }\r
-                                               }\r
-                                               for (AppNameIdIsAdmin appNameIdIsAdmin : newAppsWhereUserIsAdmin) {\r
-                                                       EPApp app = (EPApp) localSession.get(EPApp.class, appNameIdIsAdmin.id);\r
-                                                       EPRole role = (EPRole) localSession.get(EPRole.class, new Long(ACCOUNT_ADMIN_ROLE_ID));\r
-                                                       EPUserApp newUserApp = new EPUserApp();\r
-                                                       newUserApp.setUserId(user.getId());\r
-                                                       newUserApp.setApp(app);\r
-                                                       newUserApp.setRole(role);\r
-                                                       localSession.save(EPUserApp.class.getName(), newUserApp);\r
-                                               }\r
-                                               transaction.commit();\r
-                                               result = true;\r
-                                       } catch (Exception e) {\r
-                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                                               logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 2", e);\r
-                                               try {\r
-                                                       transaction.rollback();\r
-                                               } catch (Exception ex) {\r
-                                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeExecuteRollbackError, e);\r
-                                                       logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 3", ex);\r
-                                               }\r
-                                       } finally {\r
-                                               try {\r
-                                                       localSession.close();\r
-                                               } catch (Exception e) {\r
-                                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoCloseSessionError, e);\r
-                                                       logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 4", e);\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-\r
-               return result;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public boolean isSuperAdmin(EPUser user) {\r
-               if ((user != null) /* && (user.getId() == null) */ && (user.getOrgUserId() != null)) {\r
-                       String sql = "SELECT user.USER_ID, user.org_user_id, userrole.ROLE_ID, userrole.APP_ID FROM fn_user_role userrole "\r
-                                       + "INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID " + "WHERE user.org_user_id = '"\r
-                                       + user.getOrgUserId() + "' " + "AND userrole.ROLE_ID = '" + SYS_ADMIN_ROLE_ID + "' "\r
-                                       + "AND userrole.APP_ID = '" + ECOMP_APP_ID + "';";\r
-                       try {\r
-                               List<UserRole> userRoleList = dataAccessService.executeSQLQuery(sql, UserIdRoleId.class, null);\r
-                               if (userRoleList != null && userRoleList.size() > 0) {\r
-                                       return true;\r
-                               }\r
-                       } catch (Exception e) {\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isSuperAdmin operation", e);\r
-                       }\r
-               }\r
-               // else\r
-               // {\r
-               // User currentUser = user != null ? (User)\r
-               // dataAccessService.getDomainObject(User.class, user.getId(), null) :\r
-               // null;\r
-               // if (currentUser != null && currentUser.getId() != null) {\r
-               // for (UserApp userApp : currentUser.getUserApps()) {\r
-               // if (userApp.getApp().getId().equals(ECOMP_APP_ID) &&\r
-               // userApp.getRole().getId().equals(SYS_ADMIN_ROLE_ID)) {\r
-               // // Super Administrator role is global, no need to keep iterating\r
-               // return true;\r
-               // }\r
-               // }\r
-               // }\r
-               // }\r
-               return false;\r
-       }\r
-\r
-       public boolean isAccountAdmin(EPUser user) {\r
-               try {\r
-                       EPUser currentUser = user != null\r
-                                       ? (EPUser) dataAccessService.getDomainObject(EPUser.class, user.getId(), null) : null;\r
-                       if (currentUser != null && currentUser.getId() != null) {\r
-                               for (EPUserApp userApp : currentUser.getEPUserApps()) {\r
-                                       if (//!userApp.getApp().getId().equals(ECOMP_APP_ID)\r
-                                                       // && \r
-                                                       userApp.getRole().getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {\r
-                                               // Account Administrator sees only the applications\r
-                                               // he/she is Administrator\r
-                                               return true;\r
-                                       }\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isAccountAdmin operation", e);\r
-               }\r
-               return false;\r
-       }\r
-\r
-       public boolean isUser(EPUser user) {\r
-               try {\r
-                       EPUser currentUser = user != null\r
-                                       ? (EPUser) dataAccessService.getDomainObject(EPUser.class, user.getId(), null) : null;\r
-                       if (currentUser != null && currentUser.getId() != null) {\r
-                               for (EPUserApp userApp : currentUser.getEPUserApps()) {\r
-                                       if (!userApp.getApp().getId().equals(ECOMP_APP_ID)) {\r
-                                               EPRole role = userApp.getRole();\r
-                                               if (!role.getId().equals(SYS_ADMIN_ROLE_ID) && !role.getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {\r
-                                                       if (role.getActive()) {\r
-                                                               return true;\r
-                                                       }\r
-                                               }\r
-                                       }\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isUser operation", e);\r
-               }\r
-               return false;\r
-       }\r
-\r
-       @Override\r
-       @EPMetricsLog\r
-       public List<EPRole> getRolesByApp(EPUser user, Long appId) {\r
-               List<EPRole> list = new ArrayList<>();\r
-               String sql = "SELECT * FROM FN_ROLE WHERE APP_ID = " + appId;\r
-               @SuppressWarnings("unchecked")\r
-               List<EPRole> roles = dataAccessService.executeSQLQuery(sql, EPRole.class, null);\r
-               for (EPRole role: roles) {\r
-                       list.add(role);\r
-               }\r
-               return list;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.cxf.common.util.StringUtils;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.UserIdRoleId;
+import org.openecomp.portalapp.portal.domain.UserRole;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+@Service("adminRolesService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+
+public class AdminRolesServiceImpl implements AdminRolesService {
+
+       private Long SYS_ADMIN_ROLE_ID = 1L;
+       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+       private Long ECOMP_APP_ID = 1L;
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AdminRolesServiceImpl.class);
+
+       @Autowired
+       private SessionFactory sessionFactory;
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       SearchService searchService;
+       @Autowired
+       EPAppService appsService;
+
+       @PostConstruct
+       private void init() {
+               try {
+                       SYS_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.SYS_ADMIN_ROLE_ID));
+                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
+                       ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID));
+               } catch(Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               }
+       }
+       
+       @Override
+       @EPMetricsLog
+       @SuppressWarnings("unchecked")
+       public AppsListWithAdminRole getAppsWithAdminRoleStateForUser(String orgUserId) {
+               AppsListWithAdminRole appsListWithAdminRole = null;
+
+               try {
+                       List<EPUser> userList = dataAccessService.getList(EPUser.class, " where orgUserId = '" + orgUserId + "'", null,
+                                       null);
+                       HashMap<Long, Long> appsUserAdmin = new HashMap<Long, Long>();
+                       if (userList.size() > 0) {
+                               EPUser user = userList.get(0);
+                               List<EPUserApp> userAppList = null;
+                               try {
+                                       userAppList = dataAccessService.getList(EPUserApp.class,
+                                                       " where userId = " + user.getId() + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID, null, null);
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                                       EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
+                               }
+                               for (EPUserApp userApp : userAppList) {
+                                       appsUserAdmin.put(userApp.getAppId(), userApp.getUserId());
+                               }
+                       }
+
+                       appsListWithAdminRole = new AppsListWithAdminRole();
+                       appsListWithAdminRole.orgUserId = orgUserId;
+                       List<EPApp> appsList = null;
+                       try {
+                               appsList = dataAccessService.getList(EPApp.class, "  where ( enabled = 'Y' or id = " + ECOMP_APP_ID + ")", null, null);
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                               EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
+                       }
+                       for (EPApp app : appsList) {
+                               AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+                               appNameIdIsAdmin.id = app.getId();
+                               appNameIdIsAdmin.appName = app.getName();       
+                               appNameIdIsAdmin.isAdmin = new Boolean(appsUserAdmin.containsKey(app.getId()));
+                               appNameIdIsAdmin.restrictedApp = app.isRestrictedApp();
+                               appsListWithAdminRole.appsRoles.add(appNameIdIsAdmin);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing AdminRolesServiceImpl.getAppsWithAdminRoleStateForUser operation, Details:"
+                                                       + EcompPortalUtils.getStackTrace(e));
+               }
+
+               return appsListWithAdminRole;
+       }
+
+       private static final Object syncRests = new Object();
+
+       @Override
+       @EPMetricsLog
+       @SuppressWarnings("unchecked")
+       public boolean setAppsWithAdminRoleStateForUser(AppsListWithAdminRole newAppsListWithAdminRoles) {
+               boolean result = false;
+               // No changes if no new roles list or no userId.
+               if (!StringUtils.isEmpty(newAppsListWithAdminRoles.orgUserId) && newAppsListWithAdminRoles.appsRoles != null) {
+                       synchronized (syncRests) {
+                               List<EPApp> apps = appsService.getAppsFullList();
+                               HashMap<Long, EPApp> enabledApps = new HashMap<Long, EPApp>();
+                               for (EPApp app : apps) {
+                                       if (app.getEnabled().booleanValue() || app.getId() == ECOMP_APP_ID) {
+                                               enabledApps.put(app.getId(), app);
+                                       }
+                               }
+                               List<AppNameIdIsAdmin> newAppsWhereUserIsAdmin = new ArrayList<AppNameIdIsAdmin>();
+                               for (AppNameIdIsAdmin adminRole : newAppsListWithAdminRoles.appsRoles) {
+                                       // user Admin role may be added only for enabled apps
+                                       if (adminRole.isAdmin.booleanValue() && enabledApps.containsKey(adminRole.id)) {
+                                               newAppsWhereUserIsAdmin.add(adminRole);
+                                       }
+                               }
+                               EPUser user = null;
+                               boolean createNewUser = false;
+                               String orgUserId = newAppsListWithAdminRoles.orgUserId.trim();
+                               List<EPUser> localUserList = dataAccessService.getList(EPUser.class, " where org_user_id='" + orgUserId + "'",
+                                               null, null);
+                               List<EPUserApp> oldAppsWhereUserIsAdmin = new ArrayList<EPUserApp>();
+                               if (localUserList.size() > 0) {
+                                       EPUser tmpUser = localUserList.get(0);
+                                       oldAppsWhereUserIsAdmin = dataAccessService.getList(EPUserApp.class,
+                                                       " where userId = " + tmpUser.getId() + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID, null,
+                                                       null);
+                                       if (oldAppsWhereUserIsAdmin.size() > 0 || newAppsWhereUserIsAdmin.size() > 0) {
+                                               user = tmpUser;
+                                       }
+                               } else if (newAppsWhereUserIsAdmin.size() > 0) {
+                                       // we create new user only if he has Admin Role for any App
+                                       createNewUser = true;
+                               }
+                               if (user != null || createNewUser) {
+                                       Session localSession = null;
+                                       Transaction transaction = null;
+                                       try {
+                                               localSession = sessionFactory.openSession();
+                                               transaction = localSession.beginTransaction();
+                                               if (createNewUser) {
+                                                       user = this.searchService.searchUserByUserId(orgUserId);
+                                                       if (user != null) {
+                                                               // insert the user with active true in order to
+                                                               // pass login phase.
+                                                               user.setActive(true);
+                                                               localSession.save(EPUser.class.getName(), user);
+                                                       }
+                                               }
+                                               for (EPUserApp oldUserApp : oldAppsWhereUserIsAdmin) {
+                                                       // user Admin role may be deleted only for enabled
+                                                       // apps
+                                                       if (enabledApps.containsKey(oldUserApp.getAppId())) {
+                                                               localSession.delete(oldUserApp);
+                                                       }
+                                               }
+                                               for (AppNameIdIsAdmin appNameIdIsAdmin : newAppsWhereUserIsAdmin) {
+                                                       EPApp app = (EPApp) localSession.get(EPApp.class, appNameIdIsAdmin.id);
+                                                       EPRole role = (EPRole) localSession.get(EPRole.class, new Long(ACCOUNT_ADMIN_ROLE_ID));
+                                                       EPUserApp newUserApp = new EPUserApp();
+                                                       newUserApp.setUserId(user.getId());
+                                                       newUserApp.setApp(app);
+                                                       newUserApp.setRole(role);
+                                                       localSession.save(EPUserApp.class.getName(), newUserApp);
+                                               }
+                                               transaction.commit();
+                                               result = true;
+                                       } catch (Exception e) {
+                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                                               logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 2", e);
+                                               try {
+                                                       transaction.rollback();
+                                               } catch (Exception ex) {
+                                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeExecuteRollbackError, e);
+                                                       logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 3", ex);
+                                               }
+                                       } finally {
+                                               try {
+                                                       localSession.close();
+                                               } catch (Exception e) {
+                                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoCloseSessionError, e);
+                                                       logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 4", e);
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return result;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public boolean isSuperAdmin(EPUser user) {
+               if ((user != null) /* && (user.getId() == null) */ && (user.getOrgUserId() != null)) {
+                       String sql = "SELECT user.USER_ID, user.org_user_id, userrole.ROLE_ID, userrole.APP_ID FROM fn_user_role userrole "
+                                       + "INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID " + "WHERE user.org_user_id = '"
+                                       + user.getOrgUserId() + "' " + "AND userrole.ROLE_ID = '" + SYS_ADMIN_ROLE_ID + "' "
+                                       + "AND userrole.APP_ID = '" + ECOMP_APP_ID + "';";
+                       try {
+                               List<UserRole> userRoleList = dataAccessService.executeSQLQuery(sql, UserIdRoleId.class, null);
+                               if (userRoleList != null && userRoleList.size() > 0) {
+                                       return true;
+                               }
+                       } catch (Exception e) {
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isSuperAdmin operation", e);
+                       }
+               }
+               // else
+               // {
+               // User currentUser = user != null ? (User)
+               // dataAccessService.getDomainObject(User.class, user.getId(), null) :
+               // null;
+               // if (currentUser != null && currentUser.getId() != null) {
+               // for (UserApp userApp : currentUser.getUserApps()) {
+               // if (userApp.getApp().getId().equals(ECOMP_APP_ID) &&
+               // userApp.getRole().getId().equals(SYS_ADMIN_ROLE_ID)) {
+               // // Super Administrator role is global, no need to keep iterating
+               // return true;
+               // }
+               // }
+               // }
+               // }
+               return false;
+       }
+
+       public boolean isAccountAdmin(EPUser user) {
+               try {
+                       EPUser currentUser = user != null
+                                       ? (EPUser) dataAccessService.getDomainObject(EPUser.class, user.getId(), null) : null;
+                       if (currentUser != null && currentUser.getId() != null) {
+                               for (EPUserApp userApp : currentUser.getEPUserApps()) {
+                                       if (//!userApp.getApp().getId().equals(ECOMP_APP_ID)
+                                                       // && 
+                                                       userApp.getRole().getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {
+                                               // Account Administrator sees only the applications
+                                               // he/she is Administrator
+                                               return true;
+                                       }
+                               }
+                       }
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isAccountAdmin operation", e);
+               }
+               return false;
+       }
+
+       public boolean isUser(EPUser user) {
+               try {
+                       EPUser currentUser = user != null
+                                       ? (EPUser) dataAccessService.getDomainObject(EPUser.class, user.getId(), null) : null;
+                       if (currentUser != null && currentUser.getId() != null) {
+                               for (EPUserApp userApp : currentUser.getEPUserApps()) {
+                                       if (!userApp.getApp().getId().equals(ECOMP_APP_ID)) {
+                                               EPRole role = userApp.getRole();
+                                               if (!role.getId().equals(SYS_ADMIN_ROLE_ID) && !role.getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {
+                                                       if (role.getActive()) {
+                                                               return true;
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while executing isUser operation", e);
+               }
+               return false;
+       }
+
+       @Override
+       @EPMetricsLog
+       public List<EPRole> getRolesByApp(EPUser user, Long appId) {
+               List<EPRole> list = new ArrayList<>();
+               String sql = "SELECT * FROM FN_ROLE WHERE APP_ID = " + appId;
+               @SuppressWarnings("unchecked")
+               List<EPRole> roles = dataAccessService.executeSQLQuery(sql, EPRole.class, null);
+               for (EPRole role: roles) {
+                       list.add(role);
+               }
+               return list;
+       }
+}
index e8ef64f..d71e80f 100644 (file)
@@ -1,55 +1,55 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;\r
-\r
-public interface AppContactUsService {\r
-       \r
-       /**\r
-        * Gets a list of contact-us information for all entries in\r
-        * the fn_app_contact_us table, sorted by app name.  If an application is active but has no fn_app_contact_us entry, it will have no entry in this result.\r
-       * \r
-        * @return List of AppContactUsItem, one for each item in fn_app_contact_us table.\r
-        * @throws Exception\r
-        */\r
-       public List<AppContactUsItem> getAppContactUs() throws Exception;\r
-\r
-       /**\r
-        * Gets a list of contact-us information for all applications\r
-        * in the fn_app table, extended with any information in the fn_app_contact_us table.\r
-        * \r
-        * @return List of AppContactUsItem, one for each item in fn_app table.\r
-        * @throws Exception\r
-        */\r
-       public List<AppContactUsItem> getAppsAndContacts() throws Exception;\r
-       \r
-       public List<AppCategoryFunctionsItem> getAppCategoryFunctions() throws Exception;\r
-       \r
-       public String saveAppContactUs(List<AppContactUsItem> contactUs) throws Exception;\r
-       \r
-       public String saveAppContactUs(AppContactUsItem contactUs) throws Exception;\r
-\r
-       public String deleteContactUs(Long id) throws Exception;\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+
+public interface AppContactUsService {
+       
+       /**
+        * Gets a list of contact-us information for all entries in
+        * the fn_app_contact_us table, sorted by app name.  If an application is active but has no fn_app_contact_us entry, it will have no entry in this result.
+       * 
+        * @return List of AppContactUsItem, one for each item in fn_app_contact_us table.
+        * @throws Exception
+        */
+       public List<AppContactUsItem> getAppContactUs() throws Exception;
+
+       /**
+        * Gets a list of contact-us information for all applications
+        * in the fn_app table, extended with any information in the fn_app_contact_us table.
+        * 
+        * @return List of AppContactUsItem, one for each item in fn_app table.
+        * @throws Exception
+        */
+       public List<AppContactUsItem> getAppsAndContacts() throws Exception;
+       
+       public List<AppCategoryFunctionsItem> getAppCategoryFunctions() throws Exception;
+       
+       public String saveAppContactUs(List<AppContactUsItem> contactUs) throws Exception;
+       
+       public String saveAppContactUs(AppContactUsItem contactUs) throws Exception;
+
+       public String deleteContactUs(Long id) throws Exception;
+       
+}
index 41c5d9f..628414d 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Collections;\r
-import java.util.Comparator;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.AppContactUs;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;\r
-\r
-/**\r
- * Provides database access for the contact-us page controllers.\r
- */\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-public class AppContactUsServiceImpl implements AppContactUsService {\r
-\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppContactUsServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.AppContactUsService#\r
-        * getAppContactUs()\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<AppContactUsItem> getAppContactUs() throws Exception {\r
-               List<AppContactUsItem> contactUsItemList = (List<AppContactUsItem>) getDataAccessService()\r
-                               .executeNamedQuery("getAppContactUsItems", null, null);\r
-               Collections.sort(contactUsItemList, new AppContactUsItemCompare());\r
-               return contactUsItemList;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.AppContactUsService#\r
-        * getAllAppsAndContacts()\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<AppContactUsItem> getAppsAndContacts() throws Exception {\r
-               List<AppContactUsItem> contactUsItemList = (List<AppContactUsItem>) getDataAccessService()\r
-                               .executeNamedQuery("getAppsAndContacts", null, null);\r
-               Collections.sort(contactUsItemList, new AppContactUsItemCompare());\r
-               return contactUsItemList;\r
-       }\r
-\r
-       /**\r
-        * Assists in sorting app-contact-us items by application name.\r
-        */\r
-       class AppContactUsItemCompare implements Comparator<AppContactUsItem> {\r
-               @Override\r
-               public int compare(AppContactUsItem o1, AppContactUsItem o2) {\r
-                       return o1.getAppName().compareTo(o2.getAppName());\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Gets a table of category and function details for apps that participate\r
-        * in the functional menu.\r
-        */\r
-       @Override\r
-       public List<AppCategoryFunctionsItem> getAppCategoryFunctions() throws Exception {\r
-               @SuppressWarnings("unchecked")\r
-               // This named query requires no parameters.\r
-               List<AppCategoryFunctionsItem> list = (List<AppCategoryFunctionsItem>) dataAccessService\r
-                               .executeNamedQuery("getAppCategoryFunctions", null, null);\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "getAppCategoryFunctions: result list size is " + list.size());\r
-               return list;\r
-       }\r
-\r
-       /**\r
-        * Saves the list of contact-us objects to the database.\r
-        */\r
-       @Override\r
-       @Transactional(rollbackFor = Exception.class)\r
-       public String saveAppContactUs(List<AppContactUsItem> contactUsModelList) throws Exception {\r
-               try {\r
-                       for (AppContactUsItem contactUs : contactUsModelList) {\r
-                               String status = saveAppContactUs(contactUs);\r
-                               if (!status.equals("success"))\r
-                                       throw new Exception("saveAppContaatUsFailed: service returned " + status);\r
-                       }\r
-                       return "success";\r
-\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "", e);\r
-                       throw new Exception(e);\r
-               }\r
-\r
-       }\r
-\r
-       /**\r
-        * Saves a single contact-us object to the database, either creating a new\r
-        * row or updating if the argument has the ID of an existing row.\r
-        */\r
-       @Override\r
-       @Transactional(rollbackFor = Exception.class)\r
-       public String saveAppContactUs(AppContactUsItem contactUsModel) throws Exception {\r
-               try {\r
-                       HashMap<String, Object> map = new HashMap<String, Object>();\r
-                       AppContactUs contactUs = null;\r
-                       try {\r
-                               contactUs = (AppContactUs) getDataAccessService().getDomainObject(AppContactUs.class,\r
-                                               contactUsModel.getAppId(), map);\r
-                       } catch (Exception e) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "saveAppContactUs: not found for App {}, adding new entry",\r
-                                               contactUsModel.getAppName());\r
-                               contactUs = new AppContactUs();\r
-                       }\r
-\r
-                       // Populate the AppContactUs model for the database.\r
-                       EPApp app = (EPApp) getDataAccessService().getDomainObject(EPApp.class, contactUsModel.getAppId(), map);\r
-                       if (app == null || app.getId() == null)\r
-                               throw new Exception("saveAppContactus: App not found for Id " + contactUsModel.getAppId());\r
-                       contactUs.setApp(app);\r
-                       contactUs.setDescription(contactUsModel.getDescription());\r
-                       contactUs.setContactName(contactUsModel.getContactName());\r
-                       contactUs.setContactEmail(contactUsModel.getContactEmail());\r
-                       contactUs.setActiveYN(contactUsModel.getActiveYN());\r
-                       contactUs.setUrl(contactUsModel.getUrl());\r
-                       getDataAccessService().saveDomainObject(contactUs, map);\r
-                       return "success";\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppContactUs failed", e);\r
-                       throw e;\r
-                       // return "failure";\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Deletes the row from the app contact us table with the specified ID.\r
-        */\r
-       @Override\r
-       public String deleteContactUs(Long id) throws Exception {\r
-               try {\r
-                       HashMap<String, Object> map = new HashMap<String, Object>();\r
-                       AppContactUs contactUs = (AppContactUs) getDataAccessService().getDomainObject(AppContactUs.class, id, map);\r
-                       if (contactUs.getApp() == null)\r
-                               throw new Exception("Delete unsuccessful for Id " + id);\r
-                       getDataAccessService().deleteDomainObject(contactUs, map);\r
-                       return "success";\r
-               } catch (Exception e) {\r
-\r
-                       logger.info(EELFLoggerDelegate.errorLogger, "", e);\r
-                       throw e;\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.AppContactUs;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+
+/**
+ * Provides database access for the contact-us page controllers.
+ */
+@Transactional
+@org.springframework.context.annotation.Configuration
+public class AppContactUsServiceImpl implements AppContactUsService {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppContactUsServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.AppContactUsService#
+        * getAppContactUs()
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<AppContactUsItem> getAppContactUs() throws Exception {
+               List<AppContactUsItem> contactUsItemList = (List<AppContactUsItem>) getDataAccessService()
+                               .executeNamedQuery("getAppContactUsItems", null, null);
+               Collections.sort(contactUsItemList, new AppContactUsItemCompare());
+               return contactUsItemList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.AppContactUsService#
+        * getAllAppsAndContacts()
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<AppContactUsItem> getAppsAndContacts() throws Exception {
+               List<AppContactUsItem> contactUsItemList = (List<AppContactUsItem>) getDataAccessService()
+                               .executeNamedQuery("getAppsAndContacts", null, null);
+               Collections.sort(contactUsItemList, new AppContactUsItemCompare());
+               return contactUsItemList;
+       }
+
+       /**
+        * Assists in sorting app-contact-us items by application name.
+        */
+       class AppContactUsItemCompare implements Comparator<AppContactUsItem> {
+               @Override
+               public int compare(AppContactUsItem o1, AppContactUsItem o2) {
+                       return o1.getAppName().compareTo(o2.getAppName());
+               }
+       }
+
+       /**
+        * Gets a table of category and function details for apps that participate
+        * in the functional menu.
+        */
+       @Override
+       public List<AppCategoryFunctionsItem> getAppCategoryFunctions() throws Exception {
+               @SuppressWarnings("unchecked")
+               // This named query requires no parameters.
+               List<AppCategoryFunctionsItem> list = (List<AppCategoryFunctionsItem>) dataAccessService
+                               .executeNamedQuery("getAppCategoryFunctions", null, null);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getAppCategoryFunctions: result list size is " + list.size());
+               return list;
+       }
+
+       /**
+        * Saves the list of contact-us objects to the database.
+        */
+       @Override
+       @Transactional(rollbackFor = Exception.class)
+       public String saveAppContactUs(List<AppContactUsItem> contactUsModelList) throws Exception {
+               try {
+                       for (AppContactUsItem contactUs : contactUsModelList) {
+                               String status = saveAppContactUs(contactUs);
+                               if (!status.equals("success"))
+                                       throw new Exception("saveAppContaatUsFailed: service returned " + status);
+                       }
+                       return "success";
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "", e);
+                       throw new Exception(e);
+               }
+
+       }
+
+       /**
+        * Saves a single contact-us object to the database, either creating a new
+        * row or updating if the argument has the ID of an existing row.
+        */
+       @Override
+       @Transactional(rollbackFor = Exception.class)
+       public String saveAppContactUs(AppContactUsItem contactUsModel) throws Exception {
+               try {
+                       HashMap<String, Object> map = new HashMap<String, Object>();
+                       AppContactUs contactUs = null;
+                       try {
+                               contactUs = (AppContactUs) getDataAccessService().getDomainObject(AppContactUs.class,
+                                               contactUsModel.getAppId(), map);
+                       } catch (Exception e) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "saveAppContactUs: not found for App {}, adding new entry",
+                                               contactUsModel.getAppName());
+                               contactUs = new AppContactUs();
+                       }
+
+                       // Populate the AppContactUs model for the database.
+                       EPApp app = (EPApp) getDataAccessService().getDomainObject(EPApp.class, contactUsModel.getAppId(), map);
+                       if (app == null || app.getId() == null)
+                               throw new Exception("saveAppContactus: App not found for Id " + contactUsModel.getAppId());
+                       contactUs.setApp(app);
+                       contactUs.setDescription(contactUsModel.getDescription());
+                       contactUs.setContactName(contactUsModel.getContactName());
+                       contactUs.setContactEmail(contactUsModel.getContactEmail());
+                       contactUs.setActiveYN(contactUsModel.getActiveYN());
+                       contactUs.setUrl(contactUsModel.getUrl());
+                       getDataAccessService().saveDomainObject(contactUs, map);
+                       return "success";
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppContactUs failed", e);
+                       throw e;
+                       // return "failure";
+               }
+       }
+
+       /**
+        * Deletes the row from the app contact us table with the specified ID.
+        */
+       @Override
+       public String deleteContactUs(Long id) throws Exception {
+               try {
+                       HashMap<String, Object> map = new HashMap<String, Object>();
+                       AppContactUs contactUs = (AppContactUs) getDataAccessService().getDomainObject(AppContactUs.class, id, map);
+                       if (contactUs.getApp() == null)
+                               throw new Exception("Delete unsuccessful for Id " + id);
+                       getDataAccessService().deleteDomainObject(contactUs, map);
+                       return "success";
+               } catch (Exception e) {
+
+                       logger.info(EELFLoggerDelegate.errorLogger, "", e);
+                       throw e;
+               }
+       }
+
+}
index aefbbbd..2ee9864 100644 (file)
@@ -1,42 +1,42 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-\r
-public interface AppsCacheService {\r
-       \r
-       /**\r
-        * returns an app by id from the cache\r
-        * @param appId\r
-        * @return corresponding App\r
-        */\r
-       EPApp getApp(Long appId);\r
-       \r
-       /**\r
-        * returns the corresponding application endpoint\r
-        * @param appId\r
-        * @return if appId exists in cache, then return corresponding application endpoint, null otherwise.\r
-        */\r
-       String getAppEndpoint(Long appId);\r
-\r
-       EPApp getAppForAnalytics(String appKey);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.domain.EPApp;
+
+public interface AppsCacheService {
+       
+       /**
+        * returns an app by id from the cache
+        * @param appId
+        * @return corresponding App
+        */
+       EPApp getApp(Long appId);
+       
+       /**
+        * returns the corresponding application endpoint
+        * @param appId
+        * @return if appId exists in cache, then return corresponding application endpoint, null otherwise.
+        */
+       String getAppEndpoint(Long appId);
+
+       EPApp getAppForAnalytics(String appKey);
+}
index 80aa00d..c5856c6 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.annotation.PostConstruct;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("appsCacheService")\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class AppsCacheServiceImple implements AppsCacheService {\r
-       @Autowired\r
-       EPAppService appsService;\r
-       \r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsCacheServiceImple.class);\r
-       \r
-       final class CacheConfiguration {\r
-               \r
-               private long updateTime = 0;\r
-               private int updateInterval = 10;\r
-               \r
-               public CacheConfiguration (long _updateTime, int _updateInterval) {\r
-                       updateTime = _updateTime;\r
-                       updateInterval = _updateInterval;\r
-               }\r
-       }\r
-       \r
-       CacheConfiguration appConf = null;\r
-       CacheConfiguration analyticsAppConf = null;\r
-       \r
-       \r
-       private static volatile Map<Long, EPApp> appsMap;\r
-       private static volatile Map<String, EPApp> anlyticsAppsMap;\r
-       \r
-       @PostConstruct\r
-       public void init() {\r
-               appConf = new CacheConfiguration(0, 10);\r
-               analyticsAppConf = new CacheConfiguration(0, 3600);\r
-               \r
-               this.refreshAppsMap(appConf);\r
-       }\r
-\r
-       private Map<Long, EPApp> refreshAppsMap(CacheConfiguration conf) {\r
-               long now = System.currentTimeMillis();\r
-               \r
-               if(noNeedToUpdate(now, conf))\r
-                       return null;\r
-               \r
-               synchronized (this) {\r
-                       if(noNeedToUpdate(now, conf))\r
-                               return null;\r
-                       List<EPApp> allApps = appsService.getAppsFullList();\r
-                       Map<Long, EPApp> newAppsMap = new HashMap<Long, EPApp>();\r
-                       for (EPApp app : allApps) {\r
-                               newAppsMap.put(app.getId(), app);\r
-                       }\r
-                       \r
-                       Map<String, EPApp> newAnalyticsAppsMap = new HashMap<String, EPApp>();\r
-                       for (EPApp app : allApps) {\r
-                               newAnalyticsAppsMap.put(app.getUebKey(), app);\r
-                       }\r
-                       // Switch cache with the new one.\r
-                       appsMap = newAppsMap;\r
-                       anlyticsAppsMap = newAnalyticsAppsMap;\r
-                       conf.updateTime = now;\r
-               }\r
-               \r
-               return appsMap;\r
-       }\r
-\r
-       private boolean noNeedToUpdate(long now, CacheConfiguration conf) {\r
-               long secondsPassed = (now - conf.updateTime)/1000;\r
-               if(secondsPassed < conf.updateInterval){\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "no need to refresh yet, seconds since last refresh: " + secondsPassed + ", refresh interval (sec) = " + conf.updateInterval);\r
-                       return true; // no need to update cache\r
-               }\r
-               return false; // its time to update\r
-       }\r
-\r
-       @Override\r
-       public String getAppEndpoint(Long appId) {\r
-               refreshAppsMap(appConf);\r
-               EPApp app = appsMap.get(appId);\r
-               if(app != null)\r
-                       return app.getAppRestEndpoint();\r
-               return null;\r
-       }\r
-       \r
-       @Override\r
-       public EPApp getApp(Long appId) {\r
-               refreshAppsMap(appConf);\r
-               EPApp app = appsMap.get(appId);\r
-               if(app != null)\r
-                       return app;\r
-               return null;            \r
-       }\r
-       \r
-       @Override\r
-       public EPApp getAppForAnalytics(String appKey) {\r
-               refreshAppsMap(analyticsAppConf);\r
-               EPApp app = anlyticsAppsMap.get(appKey);\r
-               if(app != null)\r
-                       return app;\r
-               return null;            \r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("appsCacheService")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class AppsCacheServiceImple implements AppsCacheService {
+       @Autowired
+       EPAppService appsService;
+       
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(AppsCacheServiceImple.class);
+       
+       final class CacheConfiguration {
+               
+               private long updateTime = 0;
+               private int updateInterval = 10;
+               
+               public CacheConfiguration (long _updateTime, int _updateInterval) {
+                       updateTime = _updateTime;
+                       updateInterval = _updateInterval;
+               }
+       }
+       
+       CacheConfiguration appConf = null;
+       CacheConfiguration analyticsAppConf = null;
+       
+       
+       private static volatile Map<Long, EPApp> appsMap;
+       private static volatile Map<String, EPApp> anlyticsAppsMap;
+       
+       @PostConstruct
+       public void init() {
+               appConf = new CacheConfiguration(0, 10);
+               analyticsAppConf = new CacheConfiguration(0, 3600);
+               
+               this.refreshAppsMap(appConf);
+       }
+
+       private Map<Long, EPApp> refreshAppsMap(CacheConfiguration conf) {
+               long now = System.currentTimeMillis();
+               
+               if(noNeedToUpdate(now, conf))
+                       return null;
+               
+               synchronized (this) {
+                       if(noNeedToUpdate(now, conf))
+                               return null;
+                       List<EPApp> allApps = appsService.getAppsFullList();
+                       Map<Long, EPApp> newAppsMap = new HashMap<Long, EPApp>();
+                       for (EPApp app : allApps) {
+                               newAppsMap.put(app.getId(), app);
+                       }
+                       
+                       Map<String, EPApp> newAnalyticsAppsMap = new HashMap<String, EPApp>();
+                       for (EPApp app : allApps) {
+                               newAnalyticsAppsMap.put(app.getUebKey(), app);
+                       }
+                       // Switch cache with the new one.
+                       appsMap = newAppsMap;
+                       anlyticsAppsMap = newAnalyticsAppsMap;
+                       conf.updateTime = now;
+               }
+               
+               return appsMap;
+       }
+
+       private boolean noNeedToUpdate(long now, CacheConfiguration conf) {
+               long secondsPassed = (now - conf.updateTime)/1000;
+               if(secondsPassed < conf.updateInterval){
+                       logger.debug(EELFLoggerDelegate.debugLogger, "no need to refresh yet, seconds since last refresh: " + secondsPassed + ", refresh interval (sec) = " + conf.updateInterval);
+                       return true; // no need to update cache
+               }
+               return false; // its time to update
+       }
+
+       @Override
+       public String getAppEndpoint(Long appId) {
+               refreshAppsMap(appConf);
+               EPApp app = appsMap.get(appId);
+               if(app != null)
+                       return app.getAppRestEndpoint();
+               return null;
+       }
+       
+       @Override
+       public EPApp getApp(Long appId) {
+               refreshAppsMap(appConf);
+               EPApp app = appsMap.get(appId);
+               if(app != null)
+                       return app;
+               return null;            
+       }
+       
+       @Override
+       public EPApp getAppForAnalytics(String appKey) {
+               refreshAppsMap(analyticsAppConf);
+               EPApp app = anlyticsAppsMap.get(appKey);
+               if(app != null)
+                       return app;
+               return null;            
+       }
+
+}
index 011a648..4b4342d 100644 (file)
@@ -6,42 +6,59 @@ import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
 import org.openecomp.portalapp.portal.domain.EPEndpoint;
 
 public interface BasicAuthAccountService {
-       
+
        /**
-        * Saves Basic Authentication account for external systems 
-        * @param BasicAuthCredentials
+        * Saves Basic Authentication account for external systems
+        * 
+        * @param newCredential
+        *            BasicAuthCredentials
         * @return Id of the newly created account
+        * @throws Exception
         */
        Long saveBasicAuthAccount(BasicAuthCredentials newCredential) throws Exception;
-       
+
        /**
-        * Saves Endpoint associated with a Basic Auth account 
-        * @param EPEndpoint
+        * Saves Endpoint associated with a Basic Auth account
+        * 
+        * @param endpoint
+        *            EPEndpoint
         * @return Id of the newly created endpoint
+        * @throws Exception
         */
        Long saveEndpoints(EPEndpoint endpoint) throws Exception;
-       
+
        /**
-        * Saves Endpoint associated with a Basic Auth account 
-        * @param accountId, endpointId
+        * Saves Endpoint associated with a Basic Auth account
+        * 
+        * @param accountId
+        * @param endpointId
+        * @throws Exception
         */
        void saveEndpointAccount(Long accountId, Long endpointId) throws Exception;
-       
+
        /**
-        * Returns list of all  BasicAuthCredentials in the sytem
+        * Returns list of all BasicAuthCredentials in the sytem
+        * 
         * @return List<BasicAuthCredentials>
+        * @throws Exception
         */
        List<BasicAuthCredentials> getAccountData() throws Exception;
-       
+
        /**
         * Deletes BasicAuthenticationAccount
+        * 
         * @param accountId
+        * @throws Exception
         */
        void deleteEndpointAccout(Long accountId) throws Exception;
-       
+
        /**
         * Updates BasicAuthenticationAccount
-        * @param accountId, BasicAuthCredentials
+        * 
+        * @param accountId
+        * @param newCredential
+        *            BasicAuthCredentials
+        * @throws Exception
         */
        void updateBasicAuthAccount(Long accountId, BasicAuthCredentials newCredential) throws Exception;
 }
index fd0fb59..753a501 100644 (file)
@@ -5,14 +5,11 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.hibernate.Session;
 import org.hibernate.criterion.Criterion;
 import org.hibernate.criterion.Restrictions;
 import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
 import org.openecomp.portalapp.portal.domain.EPEndpoint;
 import org.openecomp.portalapp.portal.domain.EPEndpointAccount;
-import org.openecomp.portalapp.portal.domain.MicroserviceData;
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
 import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
@@ -136,6 +133,7 @@ public class BasicAuthAccountServiceImpl implements BasicAuthAccountService{
 
        @Override
        public List<BasicAuthCredentials> getAccountData() throws Exception {
+               @SuppressWarnings("unchecked")
                List<BasicAuthCredentials> list = (List<BasicAuthCredentials>) dataAccessService.getList(BasicAuthCredentials.class, null);
                for (int i = 0; i < list.size(); i++) {
                        if (list.get(i).getPassword() != null)
index 459a650..e596660 100644 (file)
@@ -1,35 +1,35 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;\r
-\r
-public interface BasicAuthenticationCredentialService {\r
-       /**\r
-        * Gets the basic authentication credential for the specified appName from\r
-        * table ep_basic_auth_account\r
-        * \r
-        * @param appName\r
-        *            External application name\r
-        * @return BasicAuthCredentials for the specified app; null if the app is\r
-        *         not known.\r
-        */\r
-       public BasicAuthCredentials getBasicAuthCredentialByAppName(String appName);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
+
+public interface BasicAuthenticationCredentialService {
+       /**
+        * Gets the basic authentication credential for the specified appName from
+        * table ep_basic_auth_account
+        * 
+        * @param username
+        *            External user name
+        * @return BasicAuthCredentials for the specified app; null if the username
+        *         is not known.
+        */
+       public BasicAuthCredentials getBasicAuthCredentialByUsernameAndPassword(String username, String password);
+}
index 54a9d2a..8a7dd19 100644 (file)
@@ -27,7 +27,6 @@ import org.hibernate.criterion.Restrictions;
 import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
 import org.openecomp.portalapp.portal.domain.EPEndpoint;
 import org.openecomp.portalapp.portal.domain.EPEndpointAccount;
-import org.openecomp.portalapp.portal.domain.SharedContext;
 import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.openecomp.portalsdk.core.service.DataAccessService;
@@ -46,16 +45,20 @@ public class BasicAuthenticationCredentialServiceImpl implements BasicAuthentica
        private DataAccessService dataAccessService;
 
        @Override
-       public BasicAuthCredentials getBasicAuthCredentialByAppName(String appName) {
-       
+       public BasicAuthCredentials getBasicAuthCredentialByUsernameAndPassword(String username, String password) {
+
                List<Criterion> restrictionsList = new ArrayList<Criterion>();
-               Criterion contextIdCrit = Restrictions.eq("applicationName", appName);
-               restrictionsList.add(contextIdCrit);
+               Criterion contextUserNameCrit = Restrictions.eq("username", username);
+               restrictionsList.add(contextUserNameCrit);
+               Criterion contextPasswordCrit = Restrictions.eq("password", password);
+               restrictionsList.add(contextPasswordCrit);
+
                @SuppressWarnings("unchecked")
-               List<BasicAuthCredentials> credList = (List<BasicAuthCredentials>) dataAccessService.getList(BasicAuthCredentials.class, null, restrictionsList, null);
+               List<BasicAuthCredentials> credList = (List<BasicAuthCredentials>) dataAccessService
+                               .getList(BasicAuthCredentials.class, null, restrictionsList, null);
                if (credList == null || credList.size() == 0) {
                        logger.error(EELFLoggerDelegate.errorLogger,
-                                       "getBasicAuthCredentialByAppName: no credential(s) for " + appName);
+                                       "getBasicAuthCredentialByAppName: no credential(s) for " + username);
                        return null;
                }
                logger.debug(EELFLoggerDelegate.debugLogger,
@@ -64,15 +67,16 @@ public class BasicAuthenticationCredentialServiceImpl implements BasicAuthentica
                cred.setEndpoints(getEndpointsByAccountId(cred.getId()));
                return cred;
        }
-       
-       private List<EPEndpoint> getEndpointsByAccountId(long id){
-               
+
+       private List<EPEndpoint> getEndpointsByAccountId(long id) {
                List<EPEndpoint> list = new ArrayList<>();
                List<Criterion> restrictionsList = new ArrayList<Criterion>();
                Criterion contextIdCrit = Restrictions.eq("account_id", id);
                restrictionsList.add(contextIdCrit);
-               List<EPEndpointAccount> epList = (List<EPEndpointAccount>) dataAccessService.getList(EPEndpointAccount.class, null, restrictionsList, null);
-               for(EPEndpointAccount ep: epList){
+               @SuppressWarnings("unchecked")
+               List<EPEndpointAccount> epList = (List<EPEndpointAccount>) dataAccessService.getList(EPEndpointAccount.class,
+                               null, restrictionsList, null);
+               for (EPEndpointAccount ep : epList) {
                        list.add((EPEndpoint) dataAccessService.getDomainObject(EPEndpoint.class, ep.getEp_id(), null));
                }
                return list;
index 6ceb2ca..24367e6 100644 (file)
@@ -1,32 +1,43 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;\r
-import com.ecwid.consul.ConsulException;\r
-import com.orbitz.consul.model.health.ServiceHealth;\r
-\r
-public interface ConsulHealthService {\r
-       public String getServiceLocation(String service)  throws NoHealthyServiceException;\r
-       public List<ServiceHealth> getAllHealthyNodes(String service)  throws ConsulException;\r
-       public List<ServiceHealth> getAllNodes(String service)  throws ConsulException;\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+import com.ecwid.consul.ConsulException;
+import com.orbitz.consul.model.health.ServiceHealth;
+
+public interface ConsulHealthService {
+       /**
+        * This method returns the location of one healthy node if found in Consul -
+        * If not found in / by Consul, it falls back to 'localhost'
+        * 
+        * @param service
+        * @param fallbackPortOnLocalhost
+        *            value provided by the calling service
+        * @return Service location
+        */
+       public String getServiceLocation(String service, String fallbackPortOnLocalhost) throws NoHealthyServiceException;
+
+       public List<ServiceHealth> getAllHealthyNodes(String service) throws ConsulException;
+
+       public List<ServiceHealth> getAllNodes(String service) throws ConsulException;
+}
index 1d741dc..175a1c7 100644 (file)
@@ -1,91 +1,95 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.springframework.stereotype.Component;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import com.ecwid.consul.ConsulException;\r
-import com.orbitz.consul.Consul;\r
-import com.orbitz.consul.HealthClient;\r
-import com.orbitz.consul.model.health.ServiceHealth;\r
-\r
-@Component\r
-public class ConsulHealthServiceImpl implements ConsulHealthService {\r
-       \r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ConsulHealthServiceImpl.class);\r
-\r
-       @Override\r
-       public String getServiceLocation(String service){\r
-\r
-               List<ServiceHealth> nodes = null;\r
-               \r
-               try{\r
-                       Consul consul = Consul.builder().build();\r
-                       HealthClient healthClient = consul.healthClient();\r
-                       nodes = healthClient.getHealthyServiceInstances(service).getResponse();\r
-               }\r
-               catch(Exception e){\r
-                       //using both loggers.\r
-                       logger.debug(logger.debugLogger, " problem getting nodes for service - " + service + e.getMessage() + " - Defaulting to localhost", e);\r
-                       logger.error(logger.errorLogger, " problem getting nodes for service - " + service + e.getMessage() + " - Defaulting to localhost", e);\r
-\r
-                       return "localhost:" + SystemProperties.getProperty("microservices.widget.local.port");\r
-               }\r
-               \r
-               if(nodes == null || nodes.size() == 0){\r
-                       logger.debug(logger.debugLogger, "No healthy node found in the consul cluster running service " + service + ". Defaulting to localhost");\r
-                       return "localhost:" + SystemProperties.getProperty("microservices.widget.local.port");\r
-               }\r
-               else{\r
-                       String locationFromConsul;\r
-                       ServiceHealth node = nodes.get(0);\r
-                       locationFromConsul = node.getNode().getNode()  + ":" + node.getService().getPort();\r
-                       logger.debug(logger.debugLogger, "Found healthy service location using consul - returning location " + locationFromConsul);\r
-                       \r
-                       //if locationFromConsul is null for some reason (very unlikely at this point), default to localhost             \r
-                       if(null == locationFromConsul || "".equals(locationFromConsul)){\r
-                               logger.debug(logger.debugLogger, "Couldn't get location from consul for service " + service + ". Defaulting to localhost");\r
-                               return "localhost:" + SystemProperties.getProperty("microservices.widget.local.port");\r
-                       }\r
-                       else{\r
-                               logger.debug(logger.debugLogger, "Found service location from consul for service " + service + ". Location is " + locationFromConsul);\r
-                               return locationFromConsul;\r
-                       }                       \r
-               }               \r
-       }\r
-\r
-       @Override\r
-       public List<ServiceHealth> getAllHealthyNodes(String service) throws ConsulException{\r
-               Consul consul = Consul.builder().build();\r
-               HealthClient healthClient = consul.healthClient();\r
-               return healthClient.getHealthyServiceInstances(service).getResponse();\r
-       }\r
-\r
-       @Override\r
-       public List<ServiceHealth> getAllNodes(String service){\r
-               Consul consul = Consul.builder().build();\r
-               HealthClient healthClient = consul.healthClient();\r
-               return healthClient.getAllServiceInstances(service).getResponse();\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.stereotype.Component;
+
+import com.ecwid.consul.ConsulException;
+import com.orbitz.consul.Consul;
+import com.orbitz.consul.HealthClient;
+import com.orbitz.consul.model.health.ServiceHealth;
+
+@Component
+public class ConsulHealthServiceImpl implements ConsulHealthService {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ConsulHealthServiceImpl.class);
+
+       @Override
+       public String getServiceLocation(String service, String fallbackPortOnLocalHost) {
+
+               List<ServiceHealth> nodes = null;
+
+               try {
+                       Consul consul = Consul.builder().build();
+                       HealthClient healthClient = consul.healthClient();
+                       nodes = healthClient.getHealthyServiceInstances(service).getResponse();
+               } catch (Exception e) {
+                       String localFallbackServiceLocation = "localhost:" + fallbackPortOnLocalHost;
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       " problem getting nodes for service {1}. Defaulting to {2}. Exception: {3}", service,
+                                       localFallbackServiceLocation, e.getMessage());
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       " problem getting nodes for service {1}. Defaulting to {2}. Exception: {3}", service,
+                                       localFallbackServiceLocation, e);
+                       return localFallbackServiceLocation;
+               }
+
+               if (nodes == null || nodes.size() == 0) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "No healthy node found in the consul cluster running service " + service
+                                       + ". Defaulting to localhost");
+                       return "localhost:" + fallbackPortOnLocalHost;
+               } else {
+                       String locationFromConsul;
+                       ServiceHealth node = nodes.get(0);
+                       locationFromConsul = node.getNode().getNode() + ":" + node.getService().getPort();
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "Found healthy service location using consul - returning location " + locationFromConsul);
+
+                       // if locationFromConsul is null for some reason (very unlikely at
+                       // this point), default to localhost
+                       if (null == locationFromConsul || "".equals(locationFromConsul)) {
+                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                               "Couldn't get location from consul for service " + service + ". Defaulting to localhost");
+                               return "localhost:" + fallbackPortOnLocalHost;
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "Found service location from consul for service " + service
+                                               + ". Location is " + locationFromConsul);
+                               return locationFromConsul;
+                       }
+               }
+       }
+
+       @Override
+       public List<ServiceHealth> getAllHealthyNodes(String service) throws ConsulException {
+               Consul consul = Consul.builder().build();
+               HealthClient healthClient = consul.healthClient();
+               return healthClient.getHealthyServiceInstances(service).getResponse();
+       }
+
+       @Override
+       public List<ServiceHealth> getAllNodes(String service) {
+               Consul consul = Consul.builder().build();
+               HealthClient healthClient = consul.healthClient();
+               return healthClient.getAllServiceInstances(service).getResponse();
+       }
+}
index 177f0e6..538678b 100644 (file)
@@ -1,37 +1,37 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.openecomp.portalapp.portal.transport.CommonWidget;\r
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;\r
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;\r
-\r
-public interface DashboardSearchService {\r
-       public Map<String, List<SearchResultItem>> searchResults(String userId, String searchString);\r
-       public List<String> getRelatedUsers(String userId);\r
-       \r
-       public CommonWidgetMeta getWidgetData(String resourceType);\r
-       public String saveWidgetDataBulk(CommonWidgetMeta commonWidgetMetaData);\r
-       public String saveWidgetData(CommonWidget commonWidgetData);\r
-       public String deleteWidgetData(CommonWidget eventWidget);       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+
+public interface DashboardSearchService {
+       public Map<String, List<SearchResultItem>> searchResults(String userId, String searchString);
+       public List<String> getRelatedUsers(String userId);
+       
+       public CommonWidgetMeta getWidgetData(String resourceType);
+       public String saveWidgetDataBulk(CommonWidgetMeta commonWidgetMetaData);
+       public String saveWidgetData(CommonWidget commonWidgetData);
+       public String deleteWidgetData(CommonWidget eventWidget);       
+}
index 412d833..336a752 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.transport.CommonWidget;\r
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;\r
-import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;\r
-\r
-@Component\r
-public class DashboardSearchServiceImpl implements DashboardSearchService {\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       public Map<String, List<SearchResultItem>> searchResults(String userId, String searchString) {\r
-               Map<String, String> params = new HashMap<>();\r
-               params.put("userId", userId);\r
-               params.put("searchQuery", searchString);\r
-               // Named query is stored in a *.hbm.xml file, mapped to SearchResultItem\r
-               @SuppressWarnings("unchecked")\r
-               List<SearchResultItem> list = dataAccessService.executeNamedQuery("searchPortal", params, null);\r
-               Map<String, List<SearchResultItem>> finalJson = null;\r
-               if (list.size() > 0) {\r
-                       finalJson = new HashMap<String, List<SearchResultItem>>();\r
-                       for (SearchResultItem thisResult : list) {\r
-                               List<SearchResultItem> thisList = finalJson.get(thisResult.getCategory().toLowerCase());\r
-                               if (thisList == null)\r
-                                       thisList = new ArrayList<SearchResultItem>();\r
-                               thisList.add(thisResult);\r
-                               finalJson.put(thisResult.getCategory().toLowerCase(), thisList);\r
-                       }\r
-               }\r
-               return finalJson;\r
-       }\r
-\r
-       @Override\r
-       public List<String> getRelatedUsers(String userId) {\r
-               Map<String, String> params = new HashMap<>();\r
-               params.put("userId", userId);\r
-               @SuppressWarnings("unchecked")\r
-               List<String> activeUsers = dataAccessService.executeNamedQuery("relatedUsers", params, null);\r
-               return activeUsers;\r
-       }\r
-\r
-       @Override\r
-       public CommonWidgetMeta getWidgetData(String resourceType) {\r
-               Map<String, String> params = new HashMap<>();\r
-               params.put("cat", resourceType);\r
-               @SuppressWarnings("unchecked")\r
-               List<CommonWidget> widgetItems = (List<CommonWidget>) dataAccessService.executeNamedQuery("getCommonWidgetItem", params, null);\r
-               return new CommonWidgetMeta(resourceType, widgetItems);\r
-       }\r
-\r
-       @Override\r
-       public String saveWidgetDataBulk(CommonWidgetMeta commonMetaWidgetData) {\r
-               for (CommonWidget widgetData : commonMetaWidgetData.getItems()) {\r
-                       widgetData.setCategory(commonMetaWidgetData.getCategory());\r
-                       dataAccessService.saveDomainObject(widgetData, null);\r
-               }\r
-               return "success";\r
-       }\r
-\r
-       @Override\r
-       public String saveWidgetData(CommonWidget commonWidgetData) {\r
-               dataAccessService.saveDomainObject(commonWidgetData, null);\r
-               return "success";\r
-       }\r
-\r
-       @Override\r
-       public String deleteWidgetData(CommonWidget eventWidget) {\r
-               dataAccessService.deleteDomainObject(eventWidget, null);\r
-               return "success";\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+
+@Component
+public class DashboardSearchServiceImpl implements DashboardSearchService {
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       public Map<String, List<SearchResultItem>> searchResults(String userId, String searchString) {
+               Map<String, String> params = new HashMap<>();
+               params.put("userId", userId);
+               params.put("searchQuery", searchString);
+               // Named query is stored in a *.hbm.xml file, mapped to SearchResultItem
+               @SuppressWarnings("unchecked")
+               List<SearchResultItem> list = dataAccessService.executeNamedQuery("searchPortal", params, null);
+               Map<String, List<SearchResultItem>> finalJson = null;
+               if (list.size() > 0) {
+                       finalJson = new HashMap<String, List<SearchResultItem>>();
+                       for (SearchResultItem thisResult : list) {
+                               List<SearchResultItem> thisList = finalJson.get(thisResult.getCategory().toLowerCase());
+                               if (thisList == null)
+                                       thisList = new ArrayList<SearchResultItem>();
+                               thisList.add(thisResult);
+                               finalJson.put(thisResult.getCategory().toLowerCase(), thisList);
+                       }
+               }
+               return finalJson;
+       }
+
+       @Override
+       public List<String> getRelatedUsers(String userId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("userId", userId);
+               @SuppressWarnings("unchecked")
+               List<String> activeUsers = dataAccessService.executeNamedQuery("relatedUsers", params, null);
+               return activeUsers;
+       }
+
+       @Override
+       public CommonWidgetMeta getWidgetData(String resourceType) {
+               Map<String, String> params = new HashMap<>();
+               params.put("cat", resourceType);
+               @SuppressWarnings("unchecked")
+               List<CommonWidget> widgetItems = (List<CommonWidget>) dataAccessService.executeNamedQuery("getCommonWidgetItem", params, null);
+               return new CommonWidgetMeta(resourceType, widgetItems);
+       }
+
+       @Override
+       public String saveWidgetDataBulk(CommonWidgetMeta commonMetaWidgetData) {
+               for (CommonWidget widgetData : commonMetaWidgetData.getItems()) {
+                       widgetData.setCategory(commonMetaWidgetData.getCategory());
+                       dataAccessService.saveDomainObject(widgetData, null);
+               }
+               return "success";
+       }
+
+       @Override
+       public String saveWidgetData(CommonWidget commonWidgetData) {
+               dataAccessService.saveDomainObject(commonWidgetData, null);
+               return "success";
+       }
+
+       @Override
+       public String deleteWidgetData(CommonWidget eventWidget) {
+               dataAccessService.deleteDomainObject(eventWidget, null);
+               return "success";
+       }
+}
index a5b15e2..4ef6e89 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.io.IOException;\r
-import java.util.ArrayList;\r
-import java.util.Base64;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import javax.annotation.PostConstruct;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.lang.StringUtils;\r
-import org.hibernate.Query;\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.openecomp.portalapp.portal.domain.AdminUserApp;\r
-import org.openecomp.portalapp.portal.domain.AdminUserApplications;\r
-import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;\r
-import org.openecomp.portalapp.portal.domain.AppsResponse;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserAppsManualSortPreference;\r
-import org.openecomp.portalapp.portal.domain.EPUserAppsSortPreference;\r
-import org.openecomp.portalapp.portal.domain.EPWidgetsManualSortPreference;\r
-import org.openecomp.portalapp.portal.domain.EcompApp;\r
-import org.openecomp.portalapp.portal.domain.UserRole;\r
-import org.openecomp.portalapp.portal.domain.UserRoles;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;\r
-import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;\r
-import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.LocalRole;\r
-import org.openecomp.portalapp.portal.transport.OnboardingApp;\r
-import org.openecomp.portalapp.portal.ueb.EPUebHelper;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.Helper;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.TopicManager;\r
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;\r
-import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;\r
-import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-\r
-import com.att.nsa.apiClient.http.HttpException;\r
-import com.att.nsa.cambria.client.CambriaClient.CambriaApiException;\r
-import com.att.nsa.cambria.client.CambriaClientBuilders;\r
-import com.att.nsa.cambria.client.CambriaIdentityManager;\r
-import com.google.common.primitives.Ints;\r
-\r
-public class EPAppCommonServiceImpl implements EPAppService {\r
-\r
-       protected String ECOMP_APP_ID = "1";\r
-       protected String SUPER_ADMIN_ROLE_ID = "1";\r
-       protected String ACCOUNT_ADMIN_ROLE_ID = "999";\r
-       protected String RESTRICTED_APP_ROLE_ID = "900";\r
-\r
-       private static final String urlField = "url";\r
-       private static final String nameField = "name";\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPAppCommonServiceImpl.class);\r
-\r
-       @Autowired\r
-       AdminRolesService adminRolesService;\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       EPUebHelper epUebHelper;\r
-\r
-       @PostConstruct\r
-       private void init() {\r
-               SUPER_ADMIN_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.SYS_ADMIN_ROLE_ID);\r
-               ACCOUNT_ADMIN_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID);\r
-               ECOMP_APP_ID = SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);\r
-               RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.RESTRICTED_APP_ROLE_ID);\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getUserAsAdminApps(EPUser user) {\r
-               if (adminRolesService.isAccountAdmin(user)) {\r
-                       String sql = "SELECT * FROM FN_APP join FN_USER_ROLE ON FN_USER_ROLE.APP_ID=FN_APP.APP_ID where "\r
-                                       + "FN_USER_ROLE.USER_ID=" + user.getId() + " AND FN_USER_ROLE.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID\r
-                                       + " AND FN_APP.ENABLED = 'Y'";\r
-                       logQuery(sql);\r
-                       try {\r
-                               @SuppressWarnings("unchecked")\r
-                               List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);\r
-                               return adminApps;\r
-                       } catch (Exception e) {\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                               return null;\r
-                       }\r
-               } else {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "getUserAsAdminApps: only Account Admin may invoke this function!");\r
-                       return new ArrayList<EPApp>();\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId) {\r
-               String format = "SELECT * FROM FN_APP app INNER JOIN FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "\r
-                               + "INNER JOIN FN_USER user on user.USER_ID = userrole.USER_ID "\r
-                               + "WHERE user.org_user_id = '%s' AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID\r
-                               + " AND FN_APP.ENABLED = 'Y'";\r
-\r
-               String sql = String.format(format, orgUserId);\r
-               logQuery(sql);\r
-\r
-               try {\r
-                       @SuppressWarnings("unchecked")\r
-                       List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);\r
-                       return adminApps;\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getAppsFullList() {\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> apps = dataAccessService.getList(EPApp.class, null);\r
-               return apps;\r
-       }\r
-\r
-       @Override\r
-       public List<EcompApp> getEcompAppAppsFullList() {\r
-               return transformAppsToEcompApps(getAppsFullList());\r
-       }\r
-\r
-       @Override\r
-       public List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList) {\r
-               List<EcompApp> ecompAppList = new ArrayList<EcompApp>();\r
-               for (EPApp app : appsList) {\r
-                       EcompApp ecompApp = new EcompApp();\r
-                       ecompApp.setId(app.getId());\r
-                       ecompApp.setName(app.getName());\r
-                       ecompApp.setImageUrl(app.getImageUrl());\r
-                       ecompApp.setDescription(app.getDescription());\r
-                       ecompApp.setNotes(app.getNotes());\r
-                       ecompApp.setUrl(app.getUrl());\r
-                       ecompApp.setAlternateUrl(app.getAlternateUrl());\r
-                       ecompApp.setUebTopicName(app.getUebTopicName());\r
-                       ecompApp.setUebKey(app.getUebKey());\r
-                       ecompApp.setUebSecret(app.getUebSecret());\r
-                       ecompApp.setEnabled(app.getEnabled());\r
-                       ecompApp.setRestrictedApp(app.isRestrictedApp());\r
-                       ecompAppList.add(ecompApp);\r
-               }\r
-               return ecompAppList;\r
-       }\r
-\r
-       @Override\r
-       public EPApp getApp(Long appId) {\r
-               try {\r
-                       @SuppressWarnings("unchecked")\r
-                       List<EPApp> apps = dataAccessService.getList(EPApp.class, " where id = " + appId, null, null);\r
-                       return (apps.size() > 0) ? apps.get(0) : null;\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<AppIdAndNameTransportModel> getAdminApps(EPUser user) {\r
-               if (adminRolesService.isAccountAdmin(user)) {\r
-                       String format = "SELECT app.APP_ID, app.APP_NAME, app.APP_TYPE FROM FN_APP app inner join FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "\r
-                                       + "where userrole.USER_ID = %d AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID\r
-                                       + " AND (app.ENABLED = 'Y' OR app.APP_ID=1)";\r
-                       String sql = String.format(format, user.getId());\r
-                       // sql += " AND app.APP_REST_ENDPOINT IS NOT NULL AND\r
-                       // app.APP_REST_ENDPOINT <> ''";\r
-                       logQuery(sql);\r
-                       try {\r
-                               return dataAccessService.executeSQLQuery(sql, AppIdAndNameTransportModel.class, null);\r
-                       } catch (Exception e) {\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                               "Exception occurred while fetching the adminApps for user " + user.getLoginId(), e);\r
-                       }\r
-               }\r
-               return new ArrayList<AppIdAndNameTransportModel>();\r
-       }\r
-\r
-       @Override\r
-       public EPApp getAppDetail(String appName) {\r
-               final Map<String, String> params = new HashMap<String, String>();\r
-               try {\r
-                       params.put("appName", appName);\r
-                       @SuppressWarnings("unchecked")\r
-                       List<EPApp> apps = (List<EPApp>) dataAccessService.executeNamedQuery("getAppDetails", params, null);\r
-                       return (apps.size() > 0) ? apps.get(0) : null;\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user) {\r
-               if (adminRolesService.isSuperAdmin(user) || adminRolesService.isAccountAdmin(user)) {\r
-                       String format = "";\r
-                       String sql = "";\r
-                       if (adminRolesService.isSuperAdmin(user)) {\r
-                               format = "SELECT app.APP_ID, app.APP_NAME, app.APP_TYPE FROM FN_APP app "\r
-                                               + "where app.ENABLED = 'Y' AND app.app_type = 1";\r
-                       } else {\r
-                               format = "SELECT app.APP_ID, app.APP_NAME, APP_TYPE FROM FN_APP app inner join FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "\r
-                                               + "where userrole.USER_ID = %d AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID\r
-                                               + " AND app.ENABLED = 'Y' AND app.app_type = 1";\r
-                       }\r
-                       sql = String.format(format, user.getId());\r
-                       // sql += " AND app.APP_REST_ENDPOINT IS NOT NULL AND\r
-                       // app.APP_REST_ENDPOINT <> ''";\r
-                       logQuery(sql);\r
-                       try {\r
-                               return dataAccessService.executeSQLQuery(sql, AppIdAndNameTransportModel.class, null);\r
-                       } catch (Exception e) {\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                               "Exception occurred while fetching the adminApps for user " + user.getLoginId(), e);\r
-                       }\r
-               }\r
-               return new ArrayList<AppIdAndNameTransportModel>();\r
-       }\r
-\r
-       protected void logQuery(String sql) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "logQuery: " + sql);\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-       @Override\r
-       public List<AdminUserApplications> getAppsAdmins() {\r
-               String sql = "SELECT apps.APP_NAME, apps.APP_ID, user.USER_ID, user.FIRST_NAME, user.LAST_NAME, user.org_user_id FROM fn_user_role userrole "\r
-                               + "INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID "\r
-                               + "INNER JOIN fn_app apps ON apps.APP_ID = userrole.APP_ID " + "WHERE userrole.ROLE_ID = "\r
-                               + ACCOUNT_ADMIN_ROLE_ID + " AND (apps.ENABLED = 'Y' OR apps.APP_ID=1)";\r
-               logQuery(sql);\r
-               try {\r
-                       @SuppressWarnings("unchecked")\r
-                       List<AdminUserApp> adminApps = dataAccessService.executeSQLQuery(sql, AdminUserApp.class, null);\r
-                       // DataAccessService does not use generic types.\r
-                       return aggregateRowsResultsByUserId(adminApps);\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       private List<AdminUserApplications> aggregateRowsResultsByUserId(List<AdminUserApp> adminApps) {\r
-               HashMap<Long, AdminUserApplications> adminUserApplications = new HashMap<Long, AdminUserApplications>();\r
-               for (AdminUserApp app : adminApps) {\r
-                       Long userId = app.getUser_Id();\r
-                       if (adminUserApplications.get(userId) == null)\r
-                               adminUserApplications.put(userId, new AdminUserApplications(app));\r
-                       else\r
-                               adminUserApplications.get(userId).addApp(app.getAppId(), app.getAppName());\r
-               }\r
-               return new ArrayList<AdminUserApplications>(adminUserApplications.values());\r
-       }\r
-\r
-       @Override\r
-       public List<AppsResponse> getAllApps(Boolean all) {\r
-               // If all is true, return both active and inactive apps. Otherwise, just\r
-               // active apps.\r
-               @SuppressWarnings("unchecked")\r
-               // Sort the list by application name so the drop-down looks pretty.\r
-               List<EPApp> apps = all\r
-                               ? (List<EPApp>) dataAccessService.getList(EPApp.class, " where id != " + ECOMP_APP_ID, "name", null)\r
-                               : (List<EPApp>) dataAccessService.getList(EPApp.class,\r
-                                               " where ( enabled = 'Y' or id = " + ECOMP_APP_ID + ")", "name", null);\r
-\r
-               List<AppsResponse> appsModified = new ArrayList<AppsResponse>();\r
-               for (EPApp app : apps) {\r
-                       appsModified.add(new AppsResponse(app.getId(), app.getName(), app.isRestrictedApp(), app.getEnabled()));\r
-               }\r
-               return appsModified;\r
-       }\r
-\r
-       @Override\r
-       public UserRoles getUserProfile(String loginId) {\r
-               String format = "SELECT DISTINCT user.USER_ID, role.ROLE_ID, user.org_user_id, user.FIRST_NAME, user.LAST_NAME, role.ROLE_NAME  FROM fn_user_role userrole "\r
-                               + "INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID "\r
-                               + "INNER JOIN fn_role role ON role.ROLE_ID = userrole.ROLE_ID "\r
-                               + "WHERE user.org_user_id = \"%s\" and (userrole.app_id = 1 or role.role_id = " + ACCOUNT_ADMIN_ROLE_ID\r
-                               + ") ";\r
-               String sql = String.format(format, loginId);\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<UserRole> userRoleList = dataAccessService.executeSQLQuery(sql, UserRole.class, null);\r
-               ArrayList<UserRoles> usersRolesList = aggregateUserProfileRowsResultsByRole(userRoleList);\r
-               if (usersRolesList == null || usersRolesList.size() < 1)\r
-                       return null;\r
-\r
-               return usersRolesList.get(0);\r
-       }\r
-\r
-       @Override\r
-       public UserRoles getUserProfileNormalized(EPUser user) {\r
-               // Check database.\r
-               UserRoles userAndRoles = getUserProfile(user.getLoginId());\r
-               // If no roles are defined, treat this user as a guest.\r
-               if (user.isGuest() || userAndRoles == null) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "getUserProfile: treating user {} as guest",\r
-                                       user.getLoginId());\r
-                       UserRole userRole = new UserRole();\r
-                       userRole.setUser_Id(user.getId());\r
-                       userRole.setOrgUserId(user.getLoginId());\r
-                       userRole.setFirstName(user.getFirstName());\r
-                       userRole.setLastName(user.getLastName());\r
-                       userRole.setRoleId(-1L);\r
-                       userRole.setRoleName("Guest");\r
-                       userRole.setUser_Id(-1L);\r
-                       userAndRoles = new UserRoles(userRole);\r
-               }\r
-\r
-               return userAndRoles;\r
-       }\r
-\r
-       protected ArrayList<UserRoles> aggregateUserProfileRowsResultsByRole(List<UserRole> userRoleList) {\r
-               HashMap<String, UserRoles> userRoles = new HashMap<String, UserRoles>();\r
-               for (UserRole user : userRoleList) {\r
-                       String orgUserId = user.getOrgUserId();\r
-                       if (userRoles.get(orgUserId) == null)\r
-                               userRoles.put(orgUserId, new UserRoles(user));\r
-                       else\r
-                               userRoles.get(orgUserId).addRole(user.getRoleName());\r
-               }\r
-               return new ArrayList<UserRoles>(userRoles.values());\r
-       }\r
-\r
-       private boolean isRestrictedApp(Long appId) {\r
-               EPApp app = getApp(appId);\r
-               return app.isRestrictedApp();\r
-       }\r
-\r
-       // For the functional menu edit\r
-       @Override\r
-       public List<LocalRole> getAppRoles(Long appId) {\r
-               String sql = "";\r
-               if (isRestrictedApp(appId)) {\r
-                       sql = "SELECT ROLE_ID, ROLE_NAME from FN_ROLE where ROLE_ID = '" + RESTRICTED_APP_ROLE_ID + "'";\r
-               } else {\r
-                       sql = "SELECT ROLE_ID, ROLE_NAME from FN_ROLE where APP_ID = '" + appId + "'";\r
-               }\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<LocalRole> appRoles = dataAccessService.executeSQLQuery(sql, LocalRole.class, null);\r
-               return appRoles;\r
-       }\r
-\r
-       protected String userAppsQuery(EPUser user) {\r
-               StringBuilder query = new StringBuilder();\r
-               if (adminRolesService.isSuperAdmin(user)) {\r
-                       query.append("SELECT * FROM FN_APP where FN_APP.ENABLED = 'Y' ORDER BY APP_NAME");\r
-               } else {\r
-                       query.append("SELECT * FROM FN_APP join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = FN_APP.APP_ID where ");\r
-                       query.append(\r
-                                       "FN_USER_ROLE.USER_ID = " + user.getId() + " AND FN_USER_ROLE.ROLE_ID != " + SUPER_ADMIN_ROLE_ID);\r
-                       query.append(" AND FN_APP.ENABLED = 'Y'");\r
-               }\r
-               return query.toString();\r
-       }\r
-\r
-       protected FieldsValidator onboardingAppFieldsChecker(OnboardingApp onboardingApp) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               if (onboardingApp.name == null || onboardingApp.name.length() == 0 || onboardingApp.url == null\r
-                               || onboardingApp.url.length() == 0 || onboardingApp.restrictedApp == null\r
-                               || onboardingApp.isOpen == null || onboardingApp.isEnabled == null\r
-                               || (onboardingApp.id != null && onboardingApp.id.equals(ECOMP_APP_ID))\r
-                               // For a normal app (appType==1), these fields must be filled\r
-                               // in.\r
-                               // For a restricted app (appType==2), they will be empty.\r
-                               || ((!onboardingApp.restrictedApp)\r
-                                               && (onboardingApp.username == null || onboardingApp.username.length() == 0\r
-                                                               || onboardingApp.appPassword == null || onboardingApp.appPassword.length() == 0))) {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getUserApps(EPUser user) {\r
-               List<EPApp> openApps = getOpenApps();\r
-\r
-               if (user.isGuest()) {\r
-                       return openApps;\r
-               } else {\r
-                       String sql = userAppsQuery(user);\r
-                       logQuery(sql);\r
-\r
-                       // TreeSet<EPApp> distinctApps = new TreeSet<EPApp>();\r
-                       List<EPApp> appsList = new ArrayList<>();\r
-                       @SuppressWarnings("unchecked")\r
-                       List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);\r
-                       HashSet<EPApp> appSet = new HashSet<>();\r
-                       for (EPApp app : adminApps) {\r
-                               appSet.add(app);\r
-                               appsList.add(app);\r
-                       }\r
-\r
-                       for (EPApp app : openApps) {\r
-                               if (!appSet.contains(app))\r
-                                       appsList.add(app);\r
-                       }\r
-\r
-                       return appsList;\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getPersAdminApps(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               params.put("userId", user.getId());\r
-               // Named query is stored in EP.hbm.xml, mapped to EPApp\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> list = dataAccessService.executeNamedQuery("getPersAdminApps", params, null);\r
-               return list;\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getPersUserApps(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               params.put("userId", user.getId());\r
-               // Named query is stored in EP.hbm.xml, mapped to EPApp\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> list = dataAccessService.executeNamedQuery("getPersUserApps", params, null);\r
-               return list;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        *\r
-        * @see\r
-        * org.openecomp.portalapp.portal.service.EPAppService#getAppCatalog(com.att\r
-        * .fusionapp.ecomp.portal.domain.EPUser)\r
-        */\r
-       @Override\r
-       public List<AppCatalogItem> getUserAppCatalog(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               params.put("userId", user.getId());\r
-               // Named query is stored in EP.hbm.xml, mapped to AppCatalogItem\r
-               @SuppressWarnings("unchecked")\r
-               List<AppCatalogItem> list = dataAccessService.executeNamedQuery("getUserAppCatalog", params, null);\r
-               return list;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        *\r
-        * @see\r
-        * org.openecomp.portalapp.portal.service.EPAppService#getAdminAppCatalog(\r
-        * org.openecomp.portalapp.portal.domain.EPUser)\r
-        */\r
-       @Override\r
-       public List<AppCatalogItem> getAdminAppCatalog(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               params.put("userId", user.getId());\r
-               // Named query is stored in EP.hbm.xml, mapped to AppCatalogItem\r
-               @SuppressWarnings("unchecked")\r
-               List<AppCatalogItem> list = dataAccessService.executeNamedQuery("getAdminAppCatalog", params, null);\r
-               return list;\r
-       }\r
-\r
-       private List<EPApp> getOpenApps() {\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> openApps = dataAccessService.getList(EPApp.class, " where open='Y' and enabled='Y'", null, null);\r
-               return openApps;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<EPApp> getAppsOrderByName(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPApp> sortedAppsByName = null;\r
-               try {\r
-                       if (adminRolesService.isSuperAdmin(user)) {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByName = dataAccessService.executeNamedQuery("getPersAdminAppsOrderByName", params, null);\r
-                       } else {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByName = dataAccessService.executeNamedQuery("getPersUserAppsOrderByName", params, null);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByName failed", e);\r
-               }\r
-               return sortedAppsByName;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<EPApp> getAppsOrderByLastUsed(EPUser user) {\r
-\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPApp> sortedAppsByLastUsed = new ArrayList<EPApp>();\r
-               List<EPApp> finalsortedAppsByLastUsed = new ArrayList<EPApp>();\r
-               try {\r
-                       if (adminRolesService.isSuperAdmin(user)) {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByLastUsed = dataAccessService.executeNamedQuery("getAdminAppsOrderByLastUsed", params, null);\r
-                       } else {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByLastUsed = dataAccessService.executeNamedQuery("getUserAppsOrderByLastUsed", params, null);\r
-                       }\r
-                       Set<String> epAppSet = new HashSet<String>();\r
-                       for (EPApp eapp : sortedAppsByLastUsed)\r
-                               if (!epAppSet.contains(eapp.getName())) {\r
-                                       finalsortedAppsByLastUsed.add(eapp);\r
-                                       epAppSet.add(eapp.getName());\r
-                               }\r
-\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByLastUsed failed", e);\r
-               }\r
-               return finalsortedAppsByLastUsed;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<EPApp> getAppsOrderByMostUsed(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPApp> sortedAppsByMostUsed = new ArrayList<EPApp>();\r
-               List<EPApp> finalsortedAppsByMostUsed = new ArrayList<EPApp>();\r
-               try {\r
-                       if (adminRolesService.isSuperAdmin(user)) {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByMostUsed = dataAccessService.executeNamedQuery("getAdminAppsOrderByMostUsed", params, null);\r
-                       } else {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByMostUsed = dataAccessService.executeNamedQuery("getUserAppsOrderByMostUsed", params, null);\r
-                       }\r
-                       Set<String> epAppSet = new HashSet<String>();\r
-\r
-                       for (EPApp eapp : sortedAppsByMostUsed) {\r
-                               if (!epAppSet.contains(eapp.getName())) {\r
-                                       finalsortedAppsByMostUsed.add(eapp);\r
-                                       epAppSet.add(eapp.getName());\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByMostUsed failed", e);\r
-               }\r
-\r
-               return finalsortedAppsByMostUsed;\r
-       }\r
-\r
-       /*\r
-        * This Method retrieves the User Apps by Sort Manual Preference\r
-        *\r
-        * @param: user--contains LoggedIn User Data\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<EPApp> getAppsOrderByManual(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPApp> sortedAppsByManual = new ArrayList<EPApp>();\r
-               List<EPApp> finalsortedAppsByManual = new ArrayList<EPApp>();\r
-               try {\r
-                       if (adminRolesService.isSuperAdmin(user)) {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByManual = dataAccessService.executeNamedQuery("getAdminAppsOrderByManual", params, null);\r
-                       } else {\r
-                               params.put("userId", user.getId());\r
-                               sortedAppsByManual = dataAccessService.executeNamedQuery("getUserAppsOrderByManual", params, null);\r
-                       }\r
-                       Set<String> epAppSet = new HashSet<String>();\r
-\r
-                       for (EPApp eapp : sortedAppsByManual) {\r
-                               if (!epAppSet.contains(eapp.getName())) {\r
-                                       finalsortedAppsByManual.add(eapp);\r
-                                       epAppSet.add(eapp.getName());\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByManual failed", e);\r
-               }\r
-               return finalsortedAppsByManual;\r
-       }\r
-\r
-       @Override\r
-       public List<OnboardingApp> getOnboardingApps() {\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> apps = dataAccessService.getList(EPApp.class, " where id!=" + ECOMP_APP_ID, null, null);\r
-               List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>();\r
-               for (EPApp app : apps) {\r
-                       OnboardingApp onboardingApp = new OnboardingApp();\r
-                       createOnboardingFromApp(app, onboardingApp);\r
-                       onboardingAppsList.add(onboardingApp);\r
-               }\r
-               return onboardingAppsList;\r
-       }\r
-\r
-       @Override\r
-       public List<OnboardingApp> getEnabledNonOpenOnboardingApps() {\r
-               @SuppressWarnings("unchecked")\r
-               List<EPApp> apps = dataAccessService.getList(EPApp.class,\r
-                               " where enabled = true and open = false and id!=" + ECOMP_APP_ID, null, null);\r
-               List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>();\r
-               for (EPApp app : apps) {\r
-                       OnboardingApp onboardingApp = new OnboardingApp();\r
-                       createOnboardingFromApp(app, onboardingApp);\r
-                       onboardingAppsList.add(onboardingApp);\r
-               }\r
-               return onboardingAppsList;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       private void validateOnboardingApp(OnboardingApp onboardingApp, FieldsValidator fieldsValidator) {\r
-               boolean duplicatedUrl = false;\r
-               boolean duplicatedName = false;\r
-               List<EPApp> apps;\r
-               if (onboardingApp.id == null) {\r
-                       apps = dataAccessService.getList(EPApp.class,\r
-                                       " where url = '" + onboardingApp.url + "' or name = '" + onboardingApp.name + "'", null, null);\r
-               } else {\r
-                       apps = dataAccessService.getList(EPApp.class, " where id = " + onboardingApp.id + " or url = '"\r
-                                       + onboardingApp.url + "' or name = '" + onboardingApp.name + "'", null, null);\r
-               }\r
-               for (EPApp app : apps) {\r
-                       if (onboardingApp.id != null && onboardingApp.id.equals(app.getId())) {\r
-                               continue;\r
-                       }\r
-                       if (!duplicatedUrl && app.getUrl().equalsIgnoreCase(onboardingApp.url)) {\r
-                               duplicatedUrl = true;\r
-                               if (duplicatedName) {\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if (!duplicatedName && app.getName().equalsIgnoreCase(onboardingApp.name)) {\r
-                               duplicatedName = true;\r
-                               if (duplicatedUrl) {\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               if (duplicatedUrl || duplicatedName) {\r
-                       if (duplicatedUrl) {\r
-                               fieldsValidator.addProblematicFieldName(urlField);\r
-                       }\r
-                       if (duplicatedName) {\r
-                               fieldsValidator.addProblematicFieldName(nameField);\r
-                       }\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);\r
-                       fieldsValidator.errorCode = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering modifyOnboardingApp");\r
-               FieldsValidator fieldsValidator = onboardingAppFieldsChecker(modifiedOnboardingApp);\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       validateOnboardingApp(modifiedOnboardingApp, fieldsValidator);\r
-               }\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       if (modifiedOnboardingApp.id != null) {\r
-                               updateApp(modifiedOnboardingApp.id, modifiedOnboardingApp, fieldsValidator, user);\r
-                       } else {\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                       }\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @Override\r
-       public FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user) {\r
-               FieldsValidator fieldsValidator = onboardingAppFieldsChecker(newOnboardingApp);\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       validateOnboardingApp(newOnboardingApp, fieldsValidator);\r
-               }\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       if (newOnboardingApp.id == null) {\r
-                               updateApp(null, newOnboardingApp, fieldsValidator, user);\r
-                       } else {\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                       }\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @Override\r
-       public FieldsValidator deleteOnboardingApp(EPUser user, Long appid) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               if (!adminRolesService.isSuperAdmin(user)) {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);\r
-                       return fieldsValidator;\r
-               }\r
-               Boolean result = false;\r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-\r
-                       // 1) Remove the URL for any functional menu item associated with\r
-                       // this app\r
-                       String sql = "UPDATE fn_menu_functional m, fn_menu_functional_roles mr SET m.url='' "\r
-                                       + " WHERE m.menu_id=mr.menu_id " + " AND mr.app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       Query query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove any favorites associated with a menu item that is\r
-                       // associated with this app\r
-                       sql = "Delete from fn_menu_favorites " + " using fn_menu_favorites inner join fn_menu_functional_roles "\r
-                                       + " where fn_menu_functional_roles.app_id='" + appid + "' "\r
-                                       + " AND fn_menu_functional_roles.menu_id=fn_menu_favorites.menu_id";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove all role, appid records from fn_menu_functional_role\r
-                       // that are associated with this app\r
-                       sql = "delete from fn_menu_functional_roles where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove all records from fn_user_role associated with this app\r
-                       sql = "delete from fn_user_role where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove any widgets associated with this app\r
-                       sql = "delete from ep_widget_catalog_role where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove any roles associated with this app\r
-                       sql = "delete from ep_role_notification " + " using ep_role_notification inner join fn_role "\r
-                                       + " where fn_role.app_id='" + appid + "' " + " and ep_role_notification.role_id= fn_role.role_id";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove all records from fn_role associated with this app\r
-                       sql = "delete from fn_role where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove app contact us entries\r
-                       sql = "delete from fn_app_contact_us where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove any widgets associated with this app\r
-                       sql = "delete from fn_widget where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove rows in the app personalization selection table\r
-                       sql = "delete from fn_pers_user_app_sel where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Remove rows in the app personalization sort table\r
-                       sql = "delete from ep_pers_user_app_man_sort where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       // Delete the app\r
-                       sql = "delete from fn_app where app_id='" + appid + "'";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-\r
-                       transaction.commit();\r
-                       result = true;\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "deleteOnboardingApp failed", e);\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError);\r
-                       EcompPortalUtils.rollbackTransaction(transaction, "deleteOnboardingApp rollback, exception = " + e);\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "deleteOnboardingApp");\r
-               }\r
-               if (!result) {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       private static Object syncRests = new Object();\r
-\r
-       // An app has been enabled/disabled. Must enable/disable all associated\r
-       // functional menu items.\r
-       private void setFunctionalMenuItemsEnabled(Session localSession, Boolean enabled, Long appId) {\r
-               String active_yn = enabled ? "Y" : "N";\r
-               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "\r
-                               + "FROM fn_menu_functional m, fn_menu_functional_roles r " + "WHERE m.menu_id = r.menu_id "\r
-                               + " AND r.app_id = '" + appId + "' ";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               for (FunctionalMenuItem menuItem : menuItems) {\r
-                       FunctionalMenuItem myMenuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class,\r
-                                       menuItem.menuId);\r
-                       myMenuItem.active_yn = active_yn;\r
-                       localSession.save(myMenuItem);\r
-               }\r
-       }\r
-\r
-       // Attention! If (appId == null) we use this function to create application\r
-       // otherwise we use it to modify existing application\r
-       private void updateApp(Long appId, OnboardingApp onboardingApp, FieldsValidator fieldsValidator, EPUser user) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering updateApp");\r
-               // Separate out the code for a restricted app, since it doesn't need any\r
-               // of the UEB code.\r
-               if (onboardingApp.restrictedApp) {\r
-                       boolean result = false;\r
-                       Session localSession = null;\r
-                       Transaction transaction = null;\r
-                       try {\r
-                               localSession = sessionFactory.openSession();\r
-                               transaction = localSession.beginTransaction();\r
-                               EPApp app;\r
-                               if (appId == null) {\r
-                                       app = new EPApp();\r
-                               } else {\r
-                                       app = (EPApp) localSession.get(EPApp.class, appId);\r
-                                       if (app == null || app.getId() == null) { // App is already\r
-                                               // deleted!\r
-                                               transaction.commit();\r
-                                               localSession.close();\r
-                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);\r
-                                               return;\r
-                                       }\r
-                               }\r
-                               createAppFromOnboarding(app, onboardingApp, localSession);\r
-                               localSession.saveOrUpdate(app);\r
-                               // Enable or disable all menu items associated with this app\r
-                               setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId);\r
-                               transaction.commit();\r
-                               result = true;\r
-                       } catch (Exception e) {\r
-                               EcompPortalUtils.rollbackTransaction(transaction,\r
-                                               "updateApp rollback, exception = " + EcompPortalUtils.getStackTrace(e));\r
-                       } finally {\r
-                               EcompPortalUtils.closeLocalSession(localSession, "updateApp");\r
-                       }\r
-                       if (!result) {\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       }\r
-\r
-               } else {\r
-                       synchronized (syncRests) {\r
-                               boolean result = false;\r
-                               Session localSession = null;\r
-                               Transaction transaction = null;\r
-                               try {\r
-                                       localSession = sessionFactory.openSession();\r
-                                       transaction = localSession.beginTransaction();\r
-                                       EPApp app;\r
-                                       if (appId == null) {\r
-                                               app = new EPApp();\r
-                                               // -------------------------------------------------------------------------------------------\r
-                                               // Register this App with the UEB communication server.\r
-                                               // Save\r
-                                               // the App's unique mailbox/topic\r
-                                               // name and keys to the FN_APP table. The App's mailbox\r
-                                               // and\r
-                                               // keys will be visible to the\r
-                                               // admin on the ECOMP portal.\r
-                                               // -------------------------------------------------------------------------------------------\r
-                                               TopicManager topicManager = new TopicManager();\r
-                                               final CambriaIdentityManager im = new CambriaClientBuilders.IdentityManagerBuilder()\r
-                                                               .usingHosts(Helper.uebUrlList()).build();\r
-                                               com.att.nsa.apiClient.credentials.ApiCredential credential = im.createApiKey(user.getEmail(),\r
-                                                               "ECOMP Portal Owner");\r
-                                               String appKey = credential.getApiKey();\r
-                                               String appSecret = credential.getApiSecret();\r
-                                               String appMailboxName = null;\r
-\r
-                                               int maxNumAttemptsToCreateATopic = 3;\r
-                                               boolean successfullyCreatedMailbox = false;\r
-                                               for (int i = 0; i < maxNumAttemptsToCreateATopic; i++) {\r
-                                                       appMailboxName = "ECOMP-PORTAL-OUTBOX-" + (int) (Math.random() * 100000.0);\r
-\r
-                                                       try {\r
-                                                               topicManager.createTopic(\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET),\r
-                                                                               appMailboxName, "ECOMP outbox for app" + onboardingApp.name);\r
-                                                               successfullyCreatedMailbox = true;\r
-                                                               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                                               "Successfully created " + appMailboxName + " for App " + onboardingApp.name);\r
-                                                               logger.debug(EELFLoggerDelegate.debugLogger, "    Key = " + appKey + " Secret = "\r
-                                                                               + appSecret + " generated using = " + user.getEmail());\r
-                                                               break;\r
-                                                       } catch (HttpException e) {\r
-                                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, e);\r
-                                                               if (e.getStatusCode() == 409) {\r
-                                                                       logger.error(EELFLoggerDelegate.errorLogger, "Topic/mailbox " + appMailboxName\r
-                                                                                       + " already exists. Will try using a different name", e);\r
-                                                               } else {\r
-                                                                       logger.error(EELFLoggerDelegate.errorLogger, "HttpException when onboarding App: ",\r
-                                                                                       e);\r
-                                                               }\r
-                                                       }\r
-                                               }\r
-\r
-                                               if (successfullyCreatedMailbox) {\r
-                                                       onboardingApp.setUebTopicName(appMailboxName);\r
-                                                       onboardingApp.setUebKey(appKey);\r
-                                                       onboardingApp.setUebSecret(appSecret);\r
-\r
-                                                       try {\r
-                                                               /*\r
-                                                                * EP is a publisher to this App's new mailbox\r
-                                                                */\r
-                                                               topicManager.addPublisher(\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET),\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),\r
-                                                                               appMailboxName);\r
-\r
-                                                               /*\r
-                                                                * This App is a subscriber of its own mailbox\r
-                                                                */\r
-                                                               topicManager.addSubscriber(\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), appKey,\r
-                                                                               appMailboxName);\r
-\r
-                                                               /*\r
-                                                                * This App is a publisher to EP\r
-                                                                */\r
-                                                               topicManager.addPublisher(\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), appKey,\r
-                                                                               PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));\r
-                                                       } catch (HttpException | CambriaApiException | IOException e) {\r
-                                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebRegisterOnboardingAppError, e);\r
-                                                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                                                               "Error when configuring Publisher/Subscriber for App's new mailbox", e);\r
-                                                               transaction.commit();\r
-                                                               localSession.close();\r
-                                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);\r
-                                                               return;\r
-                                                       }\r
-                                               } else {\r
-                                                       transaction.commit();\r
-                                                       localSession.close();\r
-                                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);\r
-                                                       return;\r
-                                               }\r
-                                       } else {\r
-                                               app = (EPApp) localSession.get(EPApp.class, appId);\r
-                                               if (app == null || app.getId() == null) {\r
-                                                       // App is already deleted!\r
-                                                       transaction.commit();\r
-                                                       localSession.close();\r
-                                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);\r
-                                                       return;\r
-                                               }\r
-                                       }\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: about to call createAppFromOnboarding");\r
-                                       createAppFromOnboarding(app, onboardingApp, localSession);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "LR: updateApp: finished calling createAppFromOnboarding");\r
-                                       localSession.saveOrUpdate(app);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "LR: updateApp: finished calling localSession.saveOrUpdate");\r
-                                       // Enable or disable all menu items associated with this app\r
-                                       setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "LR: updateApp: finished calling setFunctionalMenuItemsEnabled");\r
-                                       transaction.commit();\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: updateApp: finished calling transaction.commit");\r
-                                       epUebHelper.addPublisher(app);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                                       "LR: updateApp: finished calling epUebHelper.addPublisher");\r
-                                       result = true;\r
-                               } catch (Exception e) {\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, "updateApp failed", e);\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebRegisterOnboardingAppError, e);\r
-                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                                       EcompPortalUtils.rollbackTransaction(transaction,\r
-                                                       "updateApp rollback, exception = " + EcompPortalUtils.getStackTrace(e));\r
-                               } finally {\r
-                                       EcompPortalUtils.closeLocalSession(localSession, "updateApp");\r
-                               }\r
-                               if (!result) {\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                               }\r
-                       }\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Populates a transport model of the application from a database row model.\r
-        * Leaves out the thumbnail because the FE fetches images via a different\r
-        * API.\r
-        * \r
-        * @param app\r
-        *            Model of database row\r
-        * @param onboardingApp\r
-        *            Model for transport as JSON\r
-        */\r
-       @Override\r
-       public void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp) {\r
-               onboardingApp.id = app.getId();\r
-               onboardingApp.name = app.getName();\r
-               onboardingApp.imageUrl = app.getImageUrl();\r
-               onboardingApp.description = app.getDescription();\r
-               onboardingApp.notes = app.getNotes();\r
-               onboardingApp.url = app.getUrl();\r
-               onboardingApp.alternateUrl = app.getAlternateUrl();\r
-               onboardingApp.restUrl = app.getAppRestEndpoint();\r
-               onboardingApp.isOpen = app.getOpen();\r
-               onboardingApp.isEnabled = app.getEnabled();\r
-               onboardingApp.username = app.getUsername();\r
-               onboardingApp.appPassword = decryptedPassword(app.getAppPassword(), app);\r
-               onboardingApp.uebTopicName = app.getUebTopicName();\r
-               onboardingApp.uebKey = app.getUebKey();\r
-               onboardingApp.uebSecret = app.getUebSecret();\r
-               onboardingApp.setRestrictedApp(app.isRestrictedApp());\r
-               // if (app.getThumbnail() != null)\r
-               // onboardingApp.thumbnail = new\r
-               // String(Base64.getEncoder().encode(app.getThumbnail()));\r
-       }\r
-\r
-       /**\r
-        * Creates a database object for an application from an uploaded transport\r
-        * model. Must decode the thumbnail, if any.\r
-        * \r
-        * @param app\r
-        * @param onboardingApp\r
-        * @param localSession\r
-        * @return The first argument.\r
-        */\r
-       protected EPApp createAppFromOnboarding(EPApp app, OnboardingApp onboardingApp, Session localSession) {\r
-               app.setName(onboardingApp.name);\r
-               app.setDescription(onboardingApp.description);\r
-               app.setNotes(onboardingApp.notes);\r
-               app.setUrl(onboardingApp.url);\r
-               app.setAlternateUrl(onboardingApp.alternateUrl);\r
-               app.setAppRestEndpoint(onboardingApp.restUrl);\r
-               app.setOpen(onboardingApp.isOpen);\r
-               app.setEnabled(onboardingApp.isEnabled);\r
-               app.setUsername(onboardingApp.username);\r
-               app.setAppPassword(this.encryptedPassword(onboardingApp.appPassword, app));\r
-               app.setUebTopicName(onboardingApp.uebTopicName);\r
-               app.setUebKey(onboardingApp.uebKey);\r
-               app.setUebSecret(onboardingApp.uebSecret);\r
-               app.setRestrictedApp(onboardingApp.restrictedApp);\r
-               if (!StringUtils.isEmpty(onboardingApp.thumbnail)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: onboarding thumbnail is NOT empty");\r
-                       String[] splitBase64Thumbnail = onboardingApp.thumbnail.split("base64,");\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "createAppFromOnboarding: length of splitBase64Thumbnail: " + splitBase64Thumbnail.length);\r
-                       if (splitBase64Thumbnail.length > 1) {\r
-                               // This occurs when we have a new image, not an existing image\r
-                               byte[] decodedImage = Base64.getDecoder().decode(splitBase64Thumbnail[1].getBytes());\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: finished calling decode");\r
-                               // This is basically a boolean indicator that an image is\r
-                               // present.\r
-                               app.setImageUrl(constructImageName(onboardingApp));\r
-                               app.setThumbnail(decodedImage);\r
-                       }\r
-               } else if (app.getThumbnail() != null) {\r
-                       // The thumbnail that came in from the json is empty; the previous\r
-                       // thumbnail is NOT empty. Must delete it.\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "createAppFromOnboarding: onboarding thumbnail is empty; db thumbnail is NOT null");\r
-                       app.setImageUrl(null);\r
-                       app.setThumbnail(null);\r
-               } else {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       "createAppFromOnboarding: onboarding thumbnail is empty; db thumbnail is null");\r
-               }\r
-               return app;\r
-       }\r
-\r
-       protected String constructImageName(OnboardingApp onboardingApp) {\r
-               return "portal_" + String.valueOf(onboardingApp.url.hashCode() + "_" + (int) (Math.random() * 100000.0))\r
-                               + ".png";\r
-       }\r
-\r
-       // Don't encrypt or decrypt the password if it is null or the empty string\r
-       private String decryptedPassword(String encryptedAppPwd, EPApp app) {\r
-               String result = "";\r
-               if (encryptedAppPwd != null & encryptedAppPwd.length() > 0) {\r
-                       try {\r
-                               result = CipherUtil.decrypt(encryptedAppPwd,\r
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed for app " + app.getName(), e);\r
-                       }\r
-               }\r
-               return result;\r
-       }\r
-\r
-       protected String encryptedPassword(String decryptedAppPwd, EPApp app) {\r
-               String result = "";\r
-               if (decryptedAppPwd != null & decryptedAppPwd.length() > 0) {\r
-                       try {\r
-                               result = CipherUtil.encrypt(decryptedAppPwd,\r
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword failed for app " + app.getName(), e);\r
-                       }\r
-               }\r
-               return result;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPWidgetsManualSortPreference> epManualWidgets = new ArrayList<EPWidgetsManualSortPreference>();\r
-\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       epManualWidgets = dataAccessService.executeNamedQuery("userWidgetManualSortPrfQuery", params, null);\r
-                       Map<Long, EPWidgetsManualSortPreference> existingWidgetsIds = new HashMap<Long, EPWidgetsManualSortPreference>();\r
-                       for (EPWidgetsManualSortPreference userWidgetManualPref : epManualWidgets) {\r
-                               existingWidgetsIds.put(userWidgetManualPref.getWidgetId(), userWidgetManualPref);\r
-                       }\r
-                       for (EPWidgetsSortPreference epWidgetsManPref : widgetsSortManual) {\r
-                               if (epWidgetsManPref.getWidgetid() != null) {\r
-                                       Long widgetid = epWidgetsManPref.getWidgetid();\r
-                                       if (existingWidgetsIds.containsKey(widgetid)) {\r
-                                               EPWidgetsManualSortPreference epWidgetsManualSort = existingWidgetsIds.get(widgetid);\r
-                                               epWidgetsManualSort.setWidgetRow(epWidgetsManPref.getRow());\r
-                                               epWidgetsManualSort.setWidgetCol(epWidgetsManPref.getCol());\r
-                                               epWidgetsManualSort.setWidgetWidth(epWidgetsManPref.getSizeX());\r
-                                               epWidgetsManualSort.setWidgetHeight(epWidgetsManPref.getSizeY());\r
-                                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();\r
-                                               additionalUpdateParam.put("userId", epWidgetsManualSort.getUserId());\r
-                                               dataAccessService.saveDomainObject(epWidgetsManualSort, additionalUpdateParam);\r
-                                       } else {\r
-                                               EPWidgetsManualSortPreference epWidgetsManualSort = new EPWidgetsManualSortPreference();\r
-                                               epWidgetsManualSort.setWidgetId(epWidgetsManPref.getWidgetid());\r
-                                               epWidgetsManualSort.setWidgetRow(epWidgetsManPref.getRow());\r
-                                               epWidgetsManualSort.setWidgetCol(epWidgetsManPref.getCol());\r
-                                               epWidgetsManualSort.setWidgetWidth(epWidgetsManPref.getSizeX());\r
-                                               epWidgetsManualSort.setWidgetHeight(epWidgetsManPref.getSizeY());\r
-                                               epWidgetsManualSort.setUserId(Ints.checkedCast(user.getId()));\r
-                                               dataAccessService.saveDomainObject(epWidgetsManualSort, null);\r
-                                       }\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "saveWidgetsSortManual failed", e);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPWidgetsManualSortPreference> epWidgets = new ArrayList<EPWidgetsManualSortPreference>();\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       epWidgets = dataAccessService.executeNamedQuery("userWidgetManualSortPrfQuery", params, null);\r
-                       Map<Long, EPWidgetsManualSortPreference> existingWidgetIds = new HashMap<Long, EPWidgetsManualSortPreference>();\r
-                       for (EPWidgetsManualSortPreference userWidgetSortPref : epWidgets) {\r
-                               existingWidgetIds.put(userWidgetSortPref.getWidgetId(), userWidgetSortPref);\r
-                       }\r
-                       for (EPWidgetsSortPreference delEpWidgetsManPref : delWidgetSortPref) {\r
-                               if (delEpWidgetsManPref.getWidgetid() != null) {\r
-                                       Long widgetId = delEpWidgetsManPref.getWidgetid();\r
-                                       if (existingWidgetIds.containsKey(widgetId)) {\r
-                                               dataAccessService.deleteDomainObjects(EPWidgetsManualSortPreference.class,\r
-                                                               "widget_id=" + widgetId + " AND user_id=" + user.getId(), null);\r
-                                       }\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserWidgetSortPref failed", e);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /*\r
-        * This Method Stores the Sort Order of User Apps by Sort Manual Preference\r
-        *\r
-        * @param: appsSortManual--contains User Apps Data\r
-        *\r
-        * @param: user--contains LoggedIn User Data\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPUserAppsManualSortPreference> epManualApps = new ArrayList<EPUserAppsManualSortPreference>();\r
-\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       epManualApps = dataAccessService.executeNamedQuery("userAppsManualSortPrfQuery", params, null);\r
-                       Map<Long, EPUserAppsManualSortPreference> existingAppIds = new HashMap<Long, EPUserAppsManualSortPreference>();\r
-                       for (EPUserAppsManualSortPreference userAppManualPref : epManualApps) {\r
-                               existingAppIds.put(userAppManualPref.getAppId(), userAppManualPref);\r
-                       }\r
-                       for (EPAppsManualPreference epAppsManPref : appsSortManual) {\r
-                               if (epAppsManPref.getAppid() != null) {\r
-                                       Long appid = epAppsManPref.getAppid();\r
-                                       if (existingAppIds.containsKey(appid)) {\r
-                                               EPUserAppsManualSortPreference epAppsManualSort = existingAppIds.get(appid);\r
-                                               epAppsManualSort\r
-                                                               .setAppManualSortOrder((epAppsManPref.getCol() + (6 * epAppsManPref.getRow())) + 1);\r
-                                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();\r
-                                               additionalUpdateParam.put("userId", epAppsManualSort.getUserId());\r
-                                               dataAccessService.saveDomainObject(epAppsManualSort, additionalUpdateParam);\r
-                                       } else {\r
-                                               EPUserAppsManualSortPreference epAppsManualSort = new EPUserAppsManualSortPreference();\r
-                                               epAppsManualSort.setAppId(epAppsManPref.getAppid());\r
-                                               epAppsManualSort\r
-                                                               .setAppManualSortOrder((epAppsManPref.getCol() + (6 * epAppsManPref.getRow())) + 1);\r
-                                               epAppsManualSort.setUserId(Ints.checkedCast(user.getId()));\r
-                                               dataAccessService.saveDomainObject(epAppsManualSort, null);\r
-                                       }\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppsSortManual failed", e);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        *\r
-        * @see org.openecomp.portalapp.portal.service.EPAppService#\r
-        * deleteUserAppSortManual(java.lang.String,\r
-        * org.openecomp.portalapp.portal.domain.EPUser)\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPUserAppsManualSortPreference> epManualApps = new ArrayList<EPUserAppsManualSortPreference>();\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       epManualApps = dataAccessService.executeNamedQuery("userAppsManualSortPrfQuery", params, null);\r
-                       Map<Long, EPUserAppsManualSortPreference> existingAppIds = new HashMap<Long, EPUserAppsManualSortPreference>();\r
-                       for (EPUserAppsManualSortPreference userAppPref : epManualApps) {\r
-                               existingAppIds.put(userAppPref.getAppId(), userAppPref);\r
-                       }\r
-                       if (existingAppIds.containsKey(delAppSortManual.getAppId()) && !delAppSortManual.isSelect()) {\r
-                               dataAccessService.deleteDomainObjects(EPUserAppsManualSortPreference.class,\r
-                                               "app_id=" + delAppSortManual.getAppId() + " AND user_id=" + user.getId(), null);\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserAppSortManual failed", e);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPUserAppsSortPreference> epSortTypes = new ArrayList<EPUserAppsSortPreference>();\r
-               EPUserAppsSortPreference usrSortPr = null;\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       epSortTypes = dataAccessService.executeNamedQuery("userAppsSortPreferenceQuery", params, null);\r
-                       if (epSortTypes.size() == 0) {\r
-                               usrSortPr = new EPUserAppsSortPreference();\r
-                               usrSortPr.setUserId(Ints.checkedCast(user.getId()));\r
-                               usrSortPr.setSortPref(appsSortPreference.getValue());\r
-                               dataAccessService.saveDomainObject(usrSortPr, null);\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                       } else {\r
-                               usrSortPr = epSortTypes.get(0);\r
-                               usrSortPr.setSortPref(appsSortPreference.getValue());\r
-                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();\r
-                               additionalUpdateParam.put("userId", usrSortPr.getUserId());\r
-                               dataAccessService.saveDomainObject(usrSortPr, additionalUpdateParam);\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppsSortPreference failed", e);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public String getUserAppsSortTypePreference(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<EPUserAppsSortPreference> userSortPrefs = new ArrayList<EPUserAppsSortPreference>();\r
-               try {\r
-                       params.put("userId", user.getId());\r
-                       userSortPrefs = dataAccessService.executeNamedQuery("userAppsSortPreferenceQuery", params, null);\r
-                       if (userSortPrefs.size() > 0)\r
-                               return userSortPrefs.get(0).getSortPref();\r
-                       else\r
-                               return null;\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getUserAppsSortTypePreference failed", e);\r
-               }\r
-               return null;\r
-\r
-       }\r
-\r
-       @Override\r
-       public List<EPApp> getUserRemoteApps(String id) {\r
-               throw new RuntimeException(" Cannot be called from parent class");\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang.StringUtils;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.openecomp.portalapp.portal.domain.AdminUserApp;
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.openecomp.portalapp.portal.domain.AppsResponse;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserAppsManualSortPreference;
+import org.openecomp.portalapp.portal.domain.EPUserAppsSortPreference;
+import org.openecomp.portalapp.portal.domain.EPWidgetsManualSortPreference;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.domain.UserRole;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.LocalRole;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.portal.ueb.EPUebHelper;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.ueb.Helper;
+import org.openecomp.portalsdk.core.onboarding.ueb.TopicManager;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.att.nsa.apiClient.http.HttpException;
+import com.att.nsa.cambria.client.CambriaClient.CambriaApiException;
+import com.att.nsa.cambria.client.CambriaClientBuilders;
+import com.att.nsa.cambria.client.CambriaIdentityManager;
+import com.att.nsa.cambria.client.CambriaTopicManager;
+import com.google.common.primitives.Ints;
+
+public class EPAppCommonServiceImpl implements EPAppService {
+
+       protected String ECOMP_APP_ID = "1";
+       protected String SUPER_ADMIN_ROLE_ID = "1";
+       protected String ACCOUNT_ADMIN_ROLE_ID = "999";
+       protected String RESTRICTED_APP_ROLE_ID = "900";
+
+       private static final String urlField = "url";
+       private static final String nameField = "name";
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPAppCommonServiceImpl.class);
+
+       @Autowired
+       private AdminRolesService adminRolesService;
+       @Autowired
+       private SessionFactory sessionFactory;
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       private EPUebHelper epUebHelper;
+
+       @PostConstruct
+       private void init() {
+               SUPER_ADMIN_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.SYS_ADMIN_ROLE_ID);
+               ACCOUNT_ADMIN_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID);
+               ECOMP_APP_ID = SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);
+               RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.RESTRICTED_APP_ROLE_ID);
+       }
+
+       @Override
+       public List<EPApp> getUserAsAdminApps(EPUser user) {
+               if (adminRolesService.isAccountAdmin(user)) {
+                       String sql = "SELECT * FROM FN_APP join FN_USER_ROLE ON FN_USER_ROLE.APP_ID=FN_APP.APP_ID where "
+                                       + "FN_USER_ROLE.USER_ID=" + user.getId() + " AND FN_USER_ROLE.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID
+                                       + " AND FN_APP.ENABLED = 'Y'";
+                       logQuery(sql);
+                       try {
+                               @SuppressWarnings("unchecked")
+                               List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);
+                               return adminApps;
+                       } catch (Exception e) {
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                               return null;
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "getUserAsAdminApps: only Account Admin may invoke this function!");
+                       return new ArrayList<EPApp>();
+               }
+       }
+
+       @Override
+       public List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId) {
+               String format = "SELECT * FROM FN_APP app INNER JOIN FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "
+                               + "INNER JOIN FN_USER user on user.USER_ID = userrole.USER_ID "
+                               + "WHERE user.org_user_id = '%s' AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID
+                               + " AND FN_APP.ENABLED = 'Y'";
+
+               String sql = String.format(format, orgUserId);
+               logQuery(sql);
+
+               try {
+                       @SuppressWarnings("unchecked")
+                       List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);
+                       return adminApps;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       return null;
+               }
+       }
+
+       @Override
+       public List<EPApp> getAppsFullList() {
+               @SuppressWarnings("unchecked")
+               List<EPApp> apps = dataAccessService.getList(EPApp.class, null);
+               return apps;
+       }
+
+       @Override
+       public List<EcompApp> getEcompAppAppsFullList() {
+               return transformAppsToEcompApps(getAppsFullList());
+       }
+
+       @Override
+       public List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList) {
+               List<EcompApp> ecompAppList = new ArrayList<EcompApp>();
+               for (EPApp app : appsList) {
+                       EcompApp ecompApp = new EcompApp();
+                       ecompApp.setId(app.getId());
+                       ecompApp.setName(app.getName());
+                       ecompApp.setImageUrl(app.getImageUrl());
+                       ecompApp.setDescription(app.getDescription());
+                       ecompApp.setNotes(app.getNotes());
+                       ecompApp.setUrl(app.getUrl());
+                       ecompApp.setAlternateUrl(app.getAlternateUrl());
+                       ecompApp.setUebTopicName(app.getUebTopicName());
+                       ecompApp.setUebKey(app.getUebKey());
+                       ecompApp.setUebSecret(app.getUebSecret());
+                       ecompApp.setEnabled(app.getEnabled());
+                       ecompApp.setRestrictedApp(app.isRestrictedApp());
+                       ecompAppList.add(ecompApp);
+               }
+               return ecompAppList;
+       }
+
+       @Override
+       public EPApp getApp(Long appId) {
+               try {
+                       @SuppressWarnings("unchecked")
+                       List<EPApp> apps = dataAccessService.getList(EPApp.class, " where id = " + appId, null, null);
+                       return (apps.size() > 0) ? apps.get(0) : null;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       return null;
+               }
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<AppIdAndNameTransportModel> getAdminApps(EPUser user) {
+               if (adminRolesService.isAccountAdmin(user)) {
+                       String format = "SELECT app.APP_ID, app.APP_NAME, app.APP_TYPE FROM FN_APP app inner join FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "
+                                       + "where userrole.USER_ID = %d AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID
+                                       + " AND (app.ENABLED = 'Y' OR app.APP_ID=1)";
+                       String sql = String.format(format, user.getId());
+                       // sql += " AND app.APP_REST_ENDPOINT IS NOT NULL AND
+                       // app.APP_REST_ENDPOINT <> ''";
+                       logQuery(sql);
+                       try {
+                               return dataAccessService.executeSQLQuery(sql, AppIdAndNameTransportModel.class, null);
+                       } catch (Exception e) {
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "Exception occurred while fetching the adminApps for user " + user.getLoginId(), e);
+                       }
+               }
+               return new ArrayList<AppIdAndNameTransportModel>();
+       }
+
+       @Override
+       public EPApp getAppDetail(String appName) {
+               final Map<String, String> params = new HashMap<String, String>();
+               try {
+                       params.put("appName", appName);
+                       @SuppressWarnings("unchecked")
+                       List<EPApp> apps = (List<EPApp>) dataAccessService.executeNamedQuery("getMyloginAppDetails", params, null);
+                       return (apps.size() > 0) ? apps.get(0) : null;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       return null;
+               }
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user) {
+               if (adminRolesService.isSuperAdmin(user) || adminRolesService.isAccountAdmin(user)) {
+                       String format = "";
+                       String sql = "";
+                       if (adminRolesService.isSuperAdmin(user)) {
+                               format = "SELECT app.APP_ID, app.APP_NAME, app.APP_TYPE FROM FN_APP app "
+                                               + "where app.ENABLED = 'Y' AND app.app_type = 1";
+                       } else {
+                               format = "SELECT app.APP_ID, app.APP_NAME, APP_TYPE FROM FN_APP app inner join FN_USER_ROLE userrole ON userrole.APP_ID=app.APP_ID "
+                                               + "where userrole.USER_ID = %d AND userrole.ROLE_ID=" + ACCOUNT_ADMIN_ROLE_ID
+                                               + " AND app.ENABLED = 'Y' AND app.app_type = 1";
+                       }
+                       sql = String.format(format, user.getId());
+                       // sql += " AND app.APP_REST_ENDPOINT IS NOT NULL AND
+                       // app.APP_REST_ENDPOINT <> ''";
+                       logQuery(sql);
+                       try {
+                               return dataAccessService.executeSQLQuery(sql, AppIdAndNameTransportModel.class, null);
+                       } catch (Exception e) {
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "Exception occurred while fetching the adminApps for user " + user.getLoginId(), e);
+                       }
+               }
+               return new ArrayList<AppIdAndNameTransportModel>();
+       }
+
+       protected void logQuery(String sql) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "logQuery: " + sql);
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<AdminUserApplications> getAppsAdmins() {
+               try {
+                       Map<String, String> params = new HashMap<>();
+                       params.put("accountAdminRoleId", ACCOUNT_ADMIN_ROLE_ID);
+                       List<AdminUserApp> adminApps = (List<AdminUserApp>) dataAccessService.executeNamedQuery("getAppsAdmins",
+                                       params, null);
+                       return aggregateRowsResultsByUserId(adminApps);
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       return null;
+               }
+       }
+
+       private List<AdminUserApplications> aggregateRowsResultsByUserId(List<AdminUserApp> adminApps) {
+               HashMap<Long, AdminUserApplications> adminUserApplications = new HashMap<Long, AdminUserApplications>();
+               for (AdminUserApp app : adminApps) {
+                       Long userId = app.getUser_Id();
+                       if (adminUserApplications.get(userId) == null)
+                               adminUserApplications.put(userId, new AdminUserApplications(app));
+                       else
+                               adminUserApplications.get(userId).addApp(app.getAppId(), app.getAppName());
+               }
+               return new ArrayList<AdminUserApplications>(adminUserApplications.values());
+       }
+
+       @Override
+       public List<AppsResponse> getAllApps(Boolean all) {
+               // If all is true, return both active and inactive apps. Otherwise, just
+               // active apps.
+               @SuppressWarnings("unchecked")
+               // Sort the list by application name so the drop-down looks pretty.
+               List<EPApp> apps = all
+                               ? (List<EPApp>) dataAccessService.getList(EPApp.class, " where id != " + ECOMP_APP_ID, "name", null)
+                               : (List<EPApp>) dataAccessService.getList(EPApp.class,
+                                               " where ( enabled = 'Y' or id = " + ECOMP_APP_ID + ")", "name", null);
+
+               List<AppsResponse> appsModified = new ArrayList<AppsResponse>();
+               for (EPApp app : apps) {
+                       appsModified.add(new AppsResponse(app.getId(), app.getName(), app.isRestrictedApp(), app.getEnabled()));
+               }
+               return appsModified;
+       }
+
+       @Override
+       public UserRoles getUserProfile(String loginId) {
+               String format = "SELECT DISTINCT user.USER_ID, role.ROLE_ID, user.org_user_id, user.FIRST_NAME, user.LAST_NAME, role.ROLE_NAME  FROM fn_user_role userrole "
+                               + "INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID "
+                               + "INNER JOIN fn_role role ON role.ROLE_ID = userrole.ROLE_ID "
+                               + "WHERE user.org_user_id = \"%s\" and (userrole.app_id = 1 or role.role_id = " + ACCOUNT_ADMIN_ROLE_ID
+                               + ") ";
+               String sql = String.format(format, loginId);
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<UserRole> userRoleList = dataAccessService.executeSQLQuery(sql, UserRole.class, null);
+               ArrayList<UserRoles> usersRolesList = aggregateUserProfileRowsResultsByRole(userRoleList);
+               if (usersRolesList == null || usersRolesList.size() < 1)
+                       return null;
+
+               return usersRolesList.get(0);
+       }
+
+       @Override
+       public UserRoles getUserProfileNormalized(EPUser user) {
+               // Check database.
+               UserRoles userAndRoles = getUserProfile(user.getLoginId());
+               // If no roles are defined, treat this user as a guest.
+               if (user.isGuest() || userAndRoles == null) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "getUserProfile: treating user {} as guest",
+                                       user.getLoginId());
+                       UserRole userRole = new UserRole();
+                       userRole.setUser_Id(user.getId());
+                       userRole.setOrgUserId(user.getLoginId());
+                       userRole.setFirstName(user.getFirstName());
+                       userRole.setLastName(user.getLastName());
+                       userRole.setRoleId(-1L);
+                       userRole.setRoleName("Guest");
+                       userRole.setUser_Id(-1L);
+                       userAndRoles = new UserRoles(userRole);
+               }
+
+               return userAndRoles;
+       }
+
+       protected ArrayList<UserRoles> aggregateUserProfileRowsResultsByRole(List<UserRole> userRoleList) {
+               HashMap<String, UserRoles> userRoles = new HashMap<String, UserRoles>();
+               for (UserRole user : userRoleList) {
+                       String orgUserId = user.getOrgUserId();
+                       if (userRoles.get(orgUserId) == null)
+                               userRoles.put(orgUserId, new UserRoles(user));
+                       else
+                               userRoles.get(orgUserId).addRole(user.getRoleName());
+               }
+               return new ArrayList<UserRoles>(userRoles.values());
+       }
+
+       private boolean isRestrictedApp(Long appId) {
+               EPApp app = getApp(appId);
+               return app.isRestrictedApp();
+       }
+
+       // For the functional menu edit
+       @Override
+       public List<LocalRole> getAppRoles(Long appId) {
+               String sql = "";
+               if (isRestrictedApp(appId)) {
+                       sql = "SELECT ROLE_ID, ROLE_NAME from FN_ROLE where ROLE_ID = '" + RESTRICTED_APP_ROLE_ID + "'";
+               } else {
+                       sql = "SELECT ROLE_ID, ROLE_NAME from FN_ROLE where APP_ID = '" + appId + "'";
+               }
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<LocalRole> appRoles = dataAccessService.executeSQLQuery(sql, LocalRole.class, null);
+               return appRoles;
+       }
+
+       protected String userAppsQuery(EPUser user) {
+               StringBuilder query = new StringBuilder();
+               if (adminRolesService.isSuperAdmin(user)) {
+                       query.append("SELECT * FROM FN_APP where FN_APP.ENABLED = 'Y' ORDER BY APP_NAME");
+               } else {
+                       query.append("SELECT * FROM FN_APP join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = FN_APP.APP_ID where ");
+                       query.append(
+                                       "FN_USER_ROLE.USER_ID = " + user.getId() + " AND FN_USER_ROLE.ROLE_ID != " + SUPER_ADMIN_ROLE_ID);
+                       query.append(" AND FN_APP.ENABLED = 'Y'");
+               }
+               return query.toString();
+       }
+
+       protected FieldsValidator onboardingAppFieldsChecker(OnboardingApp onboardingApp) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               if (onboardingApp.name == null || onboardingApp.name.length() == 0 || onboardingApp.url == null
+                               || onboardingApp.url.length() == 0 || onboardingApp.restrictedApp == null
+                               || onboardingApp.isOpen == null || onboardingApp.isEnabled == null
+                               || (onboardingApp.id != null && onboardingApp.id.equals(ECOMP_APP_ID))
+                               // For a normal app (appType==1), these fields must be filled
+                               // in.
+                               // For a restricted app (appType==2), they will be empty.
+                               || ((!onboardingApp.restrictedApp)
+                                               && (onboardingApp.username == null || onboardingApp.username.length() == 0
+                                                               || onboardingApp.appPassword == null || onboardingApp.appPassword.length() == 0))) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+               }
+               return fieldsValidator;
+       }
+
+       @Override
+       public List<EPApp> getUserApps(EPUser user) {
+               List<EPApp> openApps = getOpenApps();
+
+               if (user.isGuest()) {
+                       return openApps;
+               } else {
+                       String sql = userAppsQuery(user);
+                       logQuery(sql);
+
+                       // TreeSet<EPApp> distinctApps = new TreeSet<EPApp>();
+                       List<EPApp> appsList = new ArrayList<>();
+                       @SuppressWarnings("unchecked")
+                       List<EPApp> adminApps = dataAccessService.executeSQLQuery(sql, EPApp.class, null);
+                       HashSet<EPApp> appSet = new HashSet<>();
+                       for (EPApp app : adminApps) {
+                               appSet.add(app);
+                               appsList.add(app);
+                       }
+
+                       for (EPApp app : openApps) {
+                               if (!appSet.contains(app))
+                                       appsList.add(app);
+                       }
+
+                       return appsList;
+               }
+       }
+
+       @Override
+       public List<EPApp> getPersAdminApps(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               params.put("userId", user.getId());
+               // Named query is stored in EP.hbm.xml, mapped to EPApp
+               @SuppressWarnings("unchecked")
+               List<EPApp> list = dataAccessService.executeNamedQuery("getPersAdminApps", params, null);
+               return list;
+       }
+
+       @Override
+       public List<EPApp> getPersUserApps(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               params.put("userId", user.getId());
+               // Named query is stored in EP.hbm.xml, mapped to EPApp
+               @SuppressWarnings("unchecked")
+               List<EPApp> list = dataAccessService.executeNamedQuery("getPersUserApps", params, null);
+               return list;
+       }
+
+       /*
+        * (non-Javadoc)
+        *
+        * @see
+        * org.openecomp.portalapp.portal.service.EPAppService#getAppCatalog(com.att
+        * .fusionapp.ecomp.portal.domain.EPUser)
+        */
+       @Override
+       public List<AppCatalogItem> getUserAppCatalog(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               params.put("userId", user.getId());
+               // Named query is stored in EP.hbm.xml, mapped to AppCatalogItem
+               @SuppressWarnings("unchecked")
+               List<AppCatalogItem> list = dataAccessService.executeNamedQuery("getUserAppCatalog", params, null);
+               return list;
+       }
+
+       /*
+        * (non-Javadoc)
+        *
+        * @see
+        * org.openecomp.portalapp.portal.service.EPAppService#getAdminAppCatalog(
+        * org.openecomp.portalapp.portal.domain.EPUser)
+        */
+       @Override
+       public List<AppCatalogItem> getAdminAppCatalog(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               params.put("userId", user.getId());
+               // Named query is stored in EP.hbm.xml, mapped to AppCatalogItem
+               @SuppressWarnings("unchecked")
+               List<AppCatalogItem> list = dataAccessService.executeNamedQuery("getAdminAppCatalog", params, null);
+               return list;
+       }
+
+       private List<EPApp> getOpenApps() {
+               @SuppressWarnings("unchecked")
+               List<EPApp> openApps = dataAccessService.getList(EPApp.class, " where open='Y' and enabled='Y'", null, null);
+               return openApps;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<EPApp> getAppsOrderByName(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               List<EPApp> sortedAppsByName = null;
+               try {
+                       if (adminRolesService.isSuperAdmin(user)) {
+                               params.put("userId", user.getId());
+                               sortedAppsByName = dataAccessService.executeNamedQuery("getPersAdminAppsOrderByName", params, null);
+                       } else {
+                               params.put("userId", user.getId());
+                               sortedAppsByName = dataAccessService.executeNamedQuery("getPersUserAppsOrderByName", params, null);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByName failed", e);
+               }
+               return sortedAppsByName;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<EPApp> getAppsOrderByLastUsed(EPUser user) {
+
+               final Map<String, Long> params = new HashMap<>();
+               List<EPApp> sortedAppsByLastUsed = new ArrayList<EPApp>();
+               List<EPApp> finalsortedAppsByLastUsed = new ArrayList<EPApp>();
+               try {
+                       if (adminRolesService.isSuperAdmin(user)) {
+                               params.put("userId", user.getId());
+                               sortedAppsByLastUsed = dataAccessService.executeNamedQuery("getAdminAppsOrderByLastUsed", params, null);
+                       } else {
+                               params.put("userId", user.getId());
+                               sortedAppsByLastUsed = dataAccessService.executeNamedQuery("getUserAppsOrderByLastUsed", params, null);
+                       }
+                       Set<String> epAppSet = new HashSet<String>();
+                       for (EPApp eapp : sortedAppsByLastUsed)
+                               if (!epAppSet.contains(eapp.getName())) {
+                                       finalsortedAppsByLastUsed.add(eapp);
+                                       epAppSet.add(eapp.getName());
+                               }
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByLastUsed failed", e);
+               }
+               return finalsortedAppsByLastUsed;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<EPApp> getAppsOrderByMostUsed(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               List<EPApp> sortedAppsByMostUsed = new ArrayList<EPApp>();
+               List<EPApp> finalsortedAppsByMostUsed = new ArrayList<EPApp>();
+               try {
+                       if (adminRolesService.isSuperAdmin(user)) {
+                               params.put("userId", user.getId());
+                               sortedAppsByMostUsed = dataAccessService.executeNamedQuery("getAdminAppsOrderByMostUsed", params, null);
+                       } else {
+                               params.put("userId", user.getId());
+                               sortedAppsByMostUsed = dataAccessService.executeNamedQuery("getUserAppsOrderByMostUsed", params, null);
+                       }
+                       Set<String> epAppSet = new HashSet<String>();
+
+                       for (EPApp eapp : sortedAppsByMostUsed) {
+                               if (!epAppSet.contains(eapp.getName())) {
+                                       finalsortedAppsByMostUsed.add(eapp);
+                                       epAppSet.add(eapp.getName());
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByMostUsed failed", e);
+               }
+
+               return finalsortedAppsByMostUsed;
+       }
+
+       /*
+        * This Method retrieves the User Apps by Sort Manual Preference
+        *
+        * @param: user--contains LoggedIn User Data
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<EPApp> getAppsOrderByManual(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               List<EPApp> sortedAppsByManual = new ArrayList<EPApp>();
+               List<EPApp> finalsortedAppsByManual = new ArrayList<EPApp>();
+               try {
+                       if (adminRolesService.isSuperAdmin(user)) {
+                               params.put("userId", user.getId());
+                               sortedAppsByManual = dataAccessService.executeNamedQuery("getAdminAppsOrderByManual", params, null);
+                       } else {
+                               params.put("userId", user.getId());
+                               sortedAppsByManual = dataAccessService.executeNamedQuery("getUserAppsOrderByManual", params, null);
+                       }
+                       Set<String> epAppSet = new HashSet<String>();
+
+                       for (EPApp eapp : sortedAppsByManual) {
+                               if (!epAppSet.contains(eapp.getName())) {
+                                       finalsortedAppsByManual.add(eapp);
+                                       epAppSet.add(eapp.getName());
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getAppsOrderByManual failed", e);
+               }
+               return finalsortedAppsByManual;
+       }
+
+       @Override
+       public List<OnboardingApp> getOnboardingApps() {
+               @SuppressWarnings("unchecked")
+               List<EPApp> apps = dataAccessService.getList(EPApp.class, " where id!=" + ECOMP_APP_ID, null, null);
+               List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>();
+               for (EPApp app : apps) {
+                       OnboardingApp onboardingApp = new OnboardingApp();
+                       createOnboardingFromApp(app, onboardingApp);
+                       onboardingAppsList.add(onboardingApp);
+               }
+               return onboardingAppsList;
+       }
+
+       @Override
+       public List<OnboardingApp> getEnabledNonOpenOnboardingApps() {
+               @SuppressWarnings("unchecked")
+               List<EPApp> apps = dataAccessService.getList(EPApp.class,
+                               " where enabled = true and open = false and id!=" + ECOMP_APP_ID, null, null);
+               List<OnboardingApp> onboardingAppsList = new ArrayList<OnboardingApp>();
+               for (EPApp app : apps) {
+                       OnboardingApp onboardingApp = new OnboardingApp();
+                       createOnboardingFromApp(app, onboardingApp);
+                       onboardingAppsList.add(onboardingApp);
+               }
+               return onboardingAppsList;
+       }
+
+       @SuppressWarnings("unchecked")
+       private void validateOnboardingApp(OnboardingApp onboardingApp, FieldsValidator fieldsValidator) {
+               boolean duplicatedUrl = false;
+               boolean duplicatedName = false;
+               List<EPApp> apps;
+               if (onboardingApp.id == null) {
+                       apps = dataAccessService.getList(EPApp.class,
+                                       " where url = '" + onboardingApp.url + "' or name = '" + onboardingApp.name + "'", null, null);
+               } else {
+                       apps = dataAccessService.getList(EPApp.class, " where id = " + onboardingApp.id + " or url = '"
+                                       + onboardingApp.url + "' or name = '" + onboardingApp.name + "'", null, null);
+               }
+               for (EPApp app : apps) {
+                       if (onboardingApp.id != null && onboardingApp.id.equals(app.getId())) {
+                               continue;
+                       }
+                       if (!duplicatedUrl && app.getUrl().equalsIgnoreCase(onboardingApp.url)) {
+                               duplicatedUrl = true;
+                               if (duplicatedName) {
+                                       break;
+                               }
+                       }
+                       if (!duplicatedName && app.getName().equalsIgnoreCase(onboardingApp.name)) {
+                               duplicatedName = true;
+                               if (duplicatedUrl) {
+                                       break;
+                               }
+                       }
+               }
+               if (duplicatedUrl || duplicatedName) {
+                       if (duplicatedUrl) {
+                               fieldsValidator.addProblematicFieldName(urlField);
+                       }
+                       if (duplicatedName) {
+                               fieldsValidator.addProblematicFieldName(nameField);
+                       }
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                       fieldsValidator.errorCode = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);
+               }
+       }
+
+       @Override
+       public FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering modifyOnboardingApp");
+               FieldsValidator fieldsValidator = onboardingAppFieldsChecker(modifiedOnboardingApp);
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       validateOnboardingApp(modifiedOnboardingApp, fieldsValidator);
+               }
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       if (modifiedOnboardingApp.id != null) {
+                               updateApp(modifiedOnboardingApp.id, modifiedOnboardingApp, fieldsValidator, user);
+                       } else {
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                       }
+               }
+               return fieldsValidator;
+       }
+
+       @Override
+       public FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user) {
+               FieldsValidator fieldsValidator = onboardingAppFieldsChecker(newOnboardingApp);
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       validateOnboardingApp(newOnboardingApp, fieldsValidator);
+               }
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       if (newOnboardingApp.id == null) {
+                               updateApp(null, newOnboardingApp, fieldsValidator, user);
+                       } else {
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                       }
+               }
+               return fieldsValidator;
+       }
+
+       @Override
+       public FieldsValidator deleteOnboardingApp(EPUser user, Long appid) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               if (!adminRolesService.isSuperAdmin(user)) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);
+                       return fieldsValidator;
+               }
+               Boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+
+                       // 1) Remove the URL for any functional menu item associated with
+                       // this app
+                       String sql = "UPDATE fn_menu_functional m, fn_menu_functional_roles mr SET m.url='' "
+                                       + " WHERE m.menu_id=mr.menu_id " + " AND mr.app_id='" + appid + "'";
+                       logQuery(sql);
+                       Query query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove any favorites associated with a menu item that is
+                       // associated with this app
+                       sql = "Delete from fn_menu_favorites " + " using fn_menu_favorites inner join fn_menu_functional_roles "
+                                       + " where fn_menu_functional_roles.app_id='" + appid + "' "
+                                       + " AND fn_menu_functional_roles.menu_id=fn_menu_favorites.menu_id";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove all role, appid records from fn_menu_functional_role
+                       // that are associated with this app
+                       sql = "delete from fn_menu_functional_roles where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove all records from fn_user_role associated with this app
+                       sql = "delete from fn_user_role where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove any widgets associated with this app
+                       sql = "delete from ep_widget_catalog_role where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove any roles associated with this app
+                       sql = "delete from ep_role_notification " + " using ep_role_notification inner join fn_role "
+                                       + " where fn_role.app_id='" + appid + "' " + " and ep_role_notification.role_id= fn_role.role_id";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove all records from fn_role associated with this app
+                       sql = "delete from fn_role where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove app contact us entries
+                       sql = "delete from fn_app_contact_us where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove rows in the app personalization selection table
+                       sql = "delete from fn_pers_user_app_sel where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove rows in the app personalization sort table
+                       sql = "delete from ep_pers_user_app_man_sort where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove rows in the app personalization sort table
+                       sql = "delete from ep_user_roles_request where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Remove rows in the app personalization sort table
+                       sql = "delete from ep_web_analytics_source where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       // Delete the app
+                       sql = "delete from fn_app where app_id='" + appid + "'";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+
+                       transaction.commit();
+                       result = true;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "deleteOnboardingApp failed", e);
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError);
+                       EcompPortalUtils.rollbackTransaction(transaction, "deleteOnboardingApp rollback, exception = " + e);
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "deleteOnboardingApp");
+               }
+               if (!result) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       private static Object syncRests = new Object();
+
+       // An app has been enabled/disabled. Must enable/disable all associated
+       // functional menu items.
+       private void setFunctionalMenuItemsEnabled(Session localSession, Boolean enabled, Long appId) {
+               String active_yn = enabled ? "Y" : "N";
+               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "
+                               + "FROM fn_menu_functional m, fn_menu_functional_roles r " + "WHERE m.menu_id = r.menu_id "
+                               + " AND r.app_id = '" + appId + "' ";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               for (FunctionalMenuItem menuItem : menuItems) {
+                       FunctionalMenuItem myMenuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class,
+                                       menuItem.menuId);
+                       myMenuItem.active_yn = active_yn;
+                       localSession.save(myMenuItem);
+               }
+       }
+
+       // Attention! If (appId == null) we use this function to create application
+       // otherwise we use it to modify existing application
+       private void updateApp(Long appId, OnboardingApp onboardingApp, FieldsValidator fieldsValidator, EPUser user) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "LR: entering updateApp");
+               // Separate out the code for a restricted app, since it doesn't need any
+               // of the UEB code.
+               if (onboardingApp.restrictedApp) {
+                       boolean result = false;
+                       Session localSession = null;
+                       Transaction transaction = null;
+                       try {
+                               localSession = sessionFactory.openSession();
+                               transaction = localSession.beginTransaction();
+                               EPApp app;
+                               if (appId == null) {
+                                       app = new EPApp();
+                               } else {
+                                       app = (EPApp) localSession.get(EPApp.class, appId);
+                                       if (app == null || app.getId() == null) { // App is already
+                                               // deleted!
+                                               transaction.commit();
+                                               localSession.close();
+                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);
+                                               return;
+                                       }
+                               }
+                               createAppFromOnboarding(app, onboardingApp, localSession);
+                               localSession.saveOrUpdate(app);
+                               // Enable or disable all menu items associated with this app
+                               setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId);
+                               transaction.commit();
+                               result = true;
+                       } catch (Exception e) {
+                               EcompPortalUtils.rollbackTransaction(transaction,
+                                               "updateApp rollback, exception = " + EcompPortalUtils.getStackTrace(e));
+                       } finally {
+                               EcompPortalUtils.closeLocalSession(localSession, "updateApp");
+                       }
+                       if (!result) {
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       }
+
+               } else {
+                       synchronized (syncRests) {
+                               boolean result = false;
+                               Session localSession = null;
+                               Transaction transaction = null;
+                               try {
+                                       localSession = sessionFactory.openSession();
+                                       transaction = localSession.beginTransaction();
+                                       EPApp app;
+                                       if (appId == null) {
+                                               app = new EPApp();
+                                               // -------------------------------------------------------------------------------------------
+                                               // Register this App with the UEB communication server.
+                                               // Save
+                                               // the App's unique mailbox/topic
+                                               // name and keys to the FN_APP table. The App's mailbox
+                                               // and
+                                               // keys will be visible to the
+                                               // admin on the ECOMP portal.
+                                               // -------------------------------------------------------------------------------------------
+                                               TopicManager topicManager = new TopicManager() {
+
+                                                       EPAppCommonServiceImpl service;
+
+                                                       public void init(EPAppCommonServiceImpl _service) {
+                                                               service = _service;
+                                                       }
+
+                                                       public void createTopic(String key, String secret, String topicName,
+                                                                       String topicDescription) throws HttpException, CambriaApiException, IOException {
+
+                                                               init(EPAppCommonServiceImpl.this);
+                                                               final LinkedList<String> urlList = Helper.uebUrlList();
+                                                               if (logger.isInfoEnabled()) {
+                                                                       logger.info("==> createTopic");
+                                                                       logger.info("topicName: " + topicName);
+                                                                       logger.info("topicDescription: " + topicDescription);
+                                                               }
+                                                               CambriaTopicManager tm = null;
+                                                               try {
+                                                                       tm = service.getTopicManager(urlList, key, secret);
+                                                               } catch (Exception e) {
+                                                                       logger.error("pub.build Exception ", e);
+                                                                       throw new CambriaApiException(topicName);
+                                                               }
+                                                               tm.createTopic(topicName, topicDescription, 1, 1);
+                                                       }
+
+                                                       public void addPublisher(String topicOwnerKey, String topicOwnerSecret, String publisherKey,
+                                                                       String topicName) throws HttpException, CambriaApiException, IOException {
+                                                               logger.info("==> addPublisher to topic " + topicName);
+                                                               final LinkedList<String> urlList = Helper.uebUrlList();
+                                                               CambriaTopicManager tm = null;
+                                                               try {
+                                                                       tm = service.getTopicManager(urlList, topicOwnerKey, topicOwnerSecret);
+                                                               } catch (Exception e) {
+                                                                       logger.error("pub.build Exception ", e);
+                                                                       throw new CambriaApiException(topicName);
+                                                               }
+                                                               tm.allowProducer(topicName, publisherKey);
+                                                       }
+
+                                               };
+                                               final CambriaIdentityManager im = new CambriaClientBuilders.IdentityManagerBuilder()
+                                                               .usingHosts(Helper.uebUrlList()).build();
+                                               com.att.nsa.apiClient.credentials.ApiCredential credential = im.createApiKey(user.getEmail(),
+                                                               "ECOMP Portal Owner");
+                                               String appKey = credential.getApiKey();
+                                               String appSecret = credential.getApiSecret();
+                                               String appMailboxName = null;
+
+                                               int maxNumAttemptsToCreateATopic = 3;
+                                               boolean successfullyCreatedMailbox = false;
+                                               for (int i = 0; i < maxNumAttemptsToCreateATopic; i++) {
+                                                       appMailboxName = "ECOMP-PORTAL-OUTBOX-" + (int) (Math.random() * 100000.0);
+
+                                                       try {
+                                                               topicManager.createTopic(
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET),
+                                                                               appMailboxName, "ECOMP outbox for app" + onboardingApp.name);
+                                                               successfullyCreatedMailbox = true;
+                                                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                               "Successfully created " + appMailboxName + " for App " + onboardingApp.name);
+                                                               logger.debug(EELFLoggerDelegate.debugLogger, "    Key = " + appKey + " Secret = "
+                                                                               + appSecret + " generated using = " + user.getEmail());
+                                                               break;
+                                                       } catch (HttpException e) {
+                                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, e);
+                                                               if (e.getStatusCode() == 409) {
+                                                                       logger.error(EELFLoggerDelegate.errorLogger, "Topic/mailbox " + appMailboxName
+                                                                                       + " already exists. Will try using a different name", e);
+                                                               } else {
+                                                                       logger.error(EELFLoggerDelegate.errorLogger, "HttpException when onboarding App: ",
+                                                                                       e);
+                                                               }
+                                                       }
+                                               }
+
+                                               if (successfullyCreatedMailbox) {
+                                                       onboardingApp.setUebTopicName(appMailboxName);
+                                                       onboardingApp.setUebKey(appKey);
+                                                       onboardingApp.setUebSecret(appSecret);
+
+                                                       try {
+                                                               /*
+                                                                * EP is a publisher to this App's new mailbox
+                                                                */
+                                                               topicManager.addPublisher(
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET),
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),
+                                                                               appMailboxName);
+
+                                                               /*
+                                                                * This App is a subscriber of its own mailbox
+                                                                */
+                                                               topicManager.addSubscriber(
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), appKey,
+                                                                               appMailboxName);
+
+                                                               /*
+                                                                * This App is a publisher to EP
+                                                                */
+                                                               topicManager.addPublisher(
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY),
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), appKey,
+                                                                               PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));
+                                                       } catch (HttpException | CambriaApiException | IOException e) {
+                                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebRegisterOnboardingAppError, e);
+                                                               logger.error(EELFLoggerDelegate.errorLogger,
+                                                                               "Error when configuring Publisher/Subscriber for App's new mailbox", e);
+                                                               transaction.commit();
+                                                               localSession.close();
+                                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                                                               return;
+                                                       }
+                                               } else {
+                                                       transaction.commit();
+                                                       localSession.close();
+                                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                                                       return;
+                                               }
+                                       } else {
+                                               app = (EPApp) localSession.get(EPApp.class, appId);
+                                               if (app == null || app.getId() == null) {
+                                                       // App is already deleted!
+                                                       transaction.commit();
+                                                       localSession.close();
+                                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);
+                                                       return;
+                                               }
+                                       }
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: about to call createAppFromOnboarding");
+                                       createAppFromOnboarding(app, onboardingApp, localSession);
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "LR: updateApp: finished calling createAppFromOnboarding");
+                                       localSession.saveOrUpdate(app);
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "LR: updateApp: finished calling localSession.saveOrUpdate");
+                                       // Enable or disable all menu items associated with this app
+                                       setFunctionalMenuItemsEnabled(localSession, onboardingApp.isEnabled, appId);
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "LR: updateApp: finished calling setFunctionalMenuItemsEnabled");
+                                       transaction.commit();
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: updateApp: finished calling transaction.commit");
+                                       epUebHelper.addPublisher(app);
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "LR: updateApp: finished calling epUebHelper.addPublisher");
+                                       result = true;
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger, "updateApp failed", e);
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebRegisterOnboardingAppError, e);
+                                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                                       EcompPortalUtils.rollbackTransaction(transaction,
+                                                       "updateApp rollback, exception = " + EcompPortalUtils.getStackTrace(e));
+                               } finally {
+                                       EcompPortalUtils.closeLocalSession(localSession, "updateApp");
+                               }
+                               if (!result) {
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               }
+                       }
+               }
+       }
+
+       public CambriaTopicManager getTopicManager(LinkedList<String> urlList, String key, String secret)
+                       throws GeneralSecurityException, Exception {
+               throw new Exception("This method can only be invoked from child class");
+       }
+
+       /**
+        * Populates a transport model of the application from a database row model.
+        * Leaves out the thumbnail because the FE fetches images via a different
+        * API.
+        * 
+        * @param app
+        *            Model of database row
+        * @param onboardingApp
+        *            Model for transport as JSON
+        */
+       @Override
+       public void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp) {
+               onboardingApp.id = app.getId();
+               onboardingApp.name = app.getName();
+               onboardingApp.imageUrl = app.getImageUrl();
+               onboardingApp.description = app.getDescription();
+               onboardingApp.notes = app.getNotes();
+               onboardingApp.url = app.getUrl();
+               onboardingApp.alternateUrl = app.getAlternateUrl();
+               onboardingApp.restUrl = app.getAppRestEndpoint();
+               onboardingApp.isOpen = app.getOpen();
+               onboardingApp.isEnabled = app.getEnabled();
+               onboardingApp.username = app.getUsername();
+               onboardingApp.appPassword = decryptedPassword(app.getAppPassword(), app);
+               onboardingApp.uebTopicName = app.getUebTopicName();
+               onboardingApp.uebKey = app.getUebKey();
+               onboardingApp.uebSecret = app.getUebSecret();
+               onboardingApp.setRestrictedApp(app.isRestrictedApp());
+               // if (app.getThumbnail() != null)
+               // onboardingApp.thumbnail = new
+               // String(Base64.getEncoder().encode(app.getThumbnail()));
+       }
+
+       /**
+        * Creates a database object for an application from an uploaded transport
+        * model. Must decode the thumbnail, if any.
+        * 
+        * @param app
+        * @param onboardingApp
+        * @param localSession
+        * @return The first argument.
+        */
+       protected EPApp createAppFromOnboarding(EPApp app, OnboardingApp onboardingApp, Session localSession) {
+               app.setName(onboardingApp.name);
+               app.setDescription(onboardingApp.description);
+               app.setNotes(onboardingApp.notes);
+               app.setUrl(onboardingApp.url);
+               app.setAlternateUrl(onboardingApp.alternateUrl);
+               app.setAppRestEndpoint(onboardingApp.restUrl);
+               app.setOpen(onboardingApp.isOpen);
+               app.setEnabled(onboardingApp.isEnabled);
+               app.setUsername(onboardingApp.username);
+               app.setAppPassword(this.encryptedPassword(onboardingApp.appPassword, app));
+               app.setUebTopicName(onboardingApp.uebTopicName);
+               app.setUebKey(onboardingApp.uebKey);
+               app.setUebSecret(onboardingApp.uebSecret);
+               app.setRestrictedApp(onboardingApp.restrictedApp);
+               if (!StringUtils.isEmpty(onboardingApp.thumbnail)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: onboarding thumbnail is NOT empty");
+                       String[] splitBase64Thumbnail = onboardingApp.thumbnail.split("base64,");
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "createAppFromOnboarding: length of splitBase64Thumbnail: " + splitBase64Thumbnail.length);
+                       if (splitBase64Thumbnail.length > 1) {
+                               // This occurs when we have a new image, not an existing image
+                               byte[] decodedImage = Base64.getDecoder().decode(splitBase64Thumbnail[1].getBytes());
+                               logger.debug(EELFLoggerDelegate.debugLogger, "createAppFromOnboarding: finished calling decode");
+                               // This is basically a boolean indicator that an image is
+                               // present.
+                               app.setImageUrl(constructImageName(onboardingApp));
+                               app.setThumbnail(decodedImage);
+                       }
+               } else if (app.getThumbnail() != null && onboardingApp.imageLink == null) {
+                       // The thumbnail that came in from the json is empty; the previous
+                       // thumbnail is NOT empty. Must delete it.
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "createAppFromOnboarding: onboarding thumbnail is empty; db thumbnail is NOT null");
+                       app.setImageUrl(null);
+                       app.setThumbnail(null);
+               } else {
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "createAppFromOnboarding: making no changes to thumbnail as imageLink is not null");
+               }
+               return app;
+       }
+
+       protected String constructImageName(OnboardingApp onboardingApp) {
+               return "portal_" + String.valueOf(onboardingApp.url.hashCode() + "_" + (int) (Math.random() * 100000.0))
+                               + ".png";
+       }
+
+       // Don't encrypt or decrypt the password if it is null or the empty string
+       private String decryptedPassword(String encryptedAppPwd, EPApp app) {
+               String result = "";
+               if (encryptedAppPwd != null & encryptedAppPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.decrypt(encryptedAppPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed for app " + app.getName(), e);
+                       }
+               }
+               return result;
+       }
+
+       protected String encryptedPassword(String decryptedAppPwd, EPApp app) {
+               String result = "";
+               if (decryptedAppPwd != null & decryptedAppPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.encrypt(decryptedAppPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword failed for app " + app.getName(), e);
+                       }
+               }
+               return result;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               List<EPWidgetsManualSortPreference> epManualWidgets = new ArrayList<EPWidgetsManualSortPreference>();
+
+               try {
+                       params.put("userId", user.getId());
+                       epManualWidgets = dataAccessService.executeNamedQuery("userWidgetManualSortPrfQuery", params, null);
+                       Map<Long, EPWidgetsManualSortPreference> existingWidgetsIds = new HashMap<Long, EPWidgetsManualSortPreference>();
+                       for (EPWidgetsManualSortPreference userWidgetManualPref : epManualWidgets) {
+                               existingWidgetsIds.put(userWidgetManualPref.getWidgetId(), userWidgetManualPref);
+                       }
+                       for (EPWidgetsSortPreference epWidgetsManPref : widgetsSortManual) {
+                               if (epWidgetsManPref.getWidgetid() != null) {
+                                       Long widgetid = epWidgetsManPref.getWidgetid();
+                                       if (existingWidgetsIds.containsKey(widgetid)) {
+                                               EPWidgetsManualSortPreference epWidgetsManualSort = existingWidgetsIds.get(widgetid);
+                                               epWidgetsManualSort.setWidgetRow(epWidgetsManPref.getRow());
+                                               epWidgetsManualSort.setWidgetCol(epWidgetsManPref.getCol());
+                                               epWidgetsManualSort.setWidgetWidth(epWidgetsManPref.getSizeX());
+                                               epWidgetsManualSort.setWidgetHeight(epWidgetsManPref.getSizeY());
+                                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();
+                                               additionalUpdateParam.put("userId", epWidgetsManualSort.getUserId());
+                                               dataAccessService.saveDomainObject(epWidgetsManualSort, additionalUpdateParam);
+                                       } else {
+                                               EPWidgetsManualSortPreference epWidgetsManualSort = new EPWidgetsManualSortPreference();
+                                               epWidgetsManualSort.setWidgetId(epWidgetsManPref.getWidgetid());
+                                               epWidgetsManualSort.setWidgetRow(epWidgetsManPref.getRow());
+                                               epWidgetsManualSort.setWidgetCol(epWidgetsManPref.getCol());
+                                               epWidgetsManualSort.setWidgetWidth(epWidgetsManPref.getSizeX());
+                                               epWidgetsManualSort.setWidgetHeight(epWidgetsManPref.getSizeY());
+                                               epWidgetsManualSort.setUserId(Ints.checkedCast(user.getId()));
+                                               dataAccessService.saveDomainObject(epWidgetsManualSort, null);
+                                       }
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "saveWidgetsSortManual failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               List<EPWidgetsManualSortPreference> epWidgets = new ArrayList<EPWidgetsManualSortPreference>();
+               try {
+                       params.put("userId", user.getId());
+                       epWidgets = dataAccessService.executeNamedQuery("userWidgetManualSortPrfQuery", params, null);
+                       Map<Long, EPWidgetsManualSortPreference> existingWidgetIds = new HashMap<Long, EPWidgetsManualSortPreference>();
+                       for (EPWidgetsManualSortPreference userWidgetSortPref : epWidgets) {
+                               existingWidgetIds.put(userWidgetSortPref.getWidgetId(), userWidgetSortPref);
+                       }
+                       for (EPWidgetsSortPreference delEpWidgetsManPref : delWidgetSortPref) {
+                               if (delEpWidgetsManPref.getWidgetid() != null) {
+                                       Long widgetId = delEpWidgetsManPref.getWidgetid();
+                                       if (existingWidgetIds.containsKey(widgetId)) {
+                                               dataAccessService.deleteDomainObjects(EPWidgetsManualSortPreference.class,
+                                                               "widget_id=" + widgetId + " AND user_id=" + user.getId(), null);
+                                       }
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserWidgetSortPref failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       /*
+        * This Method Stores the Sort Order of User Apps by Sort Manual Preference
+        *
+        * @param: appsSortManual--contains User Apps Data
+        *
+        * @param: user--contains LoggedIn User Data
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               List<EPUserAppsManualSortPreference> epManualApps = new ArrayList<EPUserAppsManualSortPreference>();
+
+               try {
+                       params.put("userId", user.getId());
+                       epManualApps = dataAccessService.executeNamedQuery("userAppsManualSortPrfQuery", params, null);
+                       Map<Long, EPUserAppsManualSortPreference> existingAppIds = new HashMap<Long, EPUserAppsManualSortPreference>();
+                       for (EPUserAppsManualSortPreference userAppManualPref : epManualApps) {
+                               existingAppIds.put(userAppManualPref.getAppId(), userAppManualPref);
+                       }
+                       for (EPAppsManualPreference epAppsManPref : appsSortManual) {
+                               if (epAppsManPref.getAppid() != null) {
+                                       Long appid = epAppsManPref.getAppid();
+                                       if (existingAppIds.containsKey(appid)) {
+                                               EPUserAppsManualSortPreference epAppsManualSort = existingAppIds.get(appid);
+                                               epAppsManualSort
+                                                               .setAppManualSortOrder((epAppsManPref.getCol() + (6 * epAppsManPref.getRow())) + 1);
+                                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();
+                                               additionalUpdateParam.put("userId", epAppsManualSort.getUserId());
+                                               dataAccessService.saveDomainObject(epAppsManualSort, additionalUpdateParam);
+                                       } else {
+                                               EPUserAppsManualSortPreference epAppsManualSort = new EPUserAppsManualSortPreference();
+                                               epAppsManualSort.setAppId(epAppsManPref.getAppid());
+                                               epAppsManualSort
+                                                               .setAppManualSortOrder((epAppsManPref.getCol() + (6 * epAppsManPref.getRow())) + 1);
+                                               epAppsManualSort.setUserId(Ints.checkedCast(user.getId()));
+                                               dataAccessService.saveDomainObject(epAppsManualSort, null);
+                                       }
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppsSortManual failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       /*
+        * (non-Javadoc)
+        *
+        * @see org.openecomp.portalapp.portal.service.EPAppService#
+        * deleteUserAppSortManual(java.lang.String,
+        * org.openecomp.portalapp.portal.domain.EPUser)
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               List<EPUserAppsManualSortPreference> epManualApps = new ArrayList<EPUserAppsManualSortPreference>();
+               try {
+                       params.put("userId", user.getId());
+                       epManualApps = dataAccessService.executeNamedQuery("userAppsManualSortPrfQuery", params, null);
+                       Map<Long, EPUserAppsManualSortPreference> existingAppIds = new HashMap<Long, EPUserAppsManualSortPreference>();
+                       for (EPUserAppsManualSortPreference userAppPref : epManualApps) {
+                               existingAppIds.put(userAppPref.getAppId(), userAppPref);
+                       }
+                       if (existingAppIds.containsKey(delAppSortManual.getAppId()) && !delAppSortManual.isSelect()) {
+                               dataAccessService.deleteDomainObjects(EPUserAppsManualSortPreference.class,
+                                               "app_id=" + delAppSortManual.getAppId() + " AND user_id=" + user.getId(), null);
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "deleteUserAppSortManual failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               List<EPUserAppsSortPreference> epSortTypes = new ArrayList<EPUserAppsSortPreference>();
+               EPUserAppsSortPreference usrSortPr = null;
+               try {
+                       params.put("userId", user.getId());
+                       epSortTypes = dataAccessService.executeNamedQuery("userAppsSortPreferenceQuery", params, null);
+                       if (epSortTypes.size() == 0) {
+                               usrSortPr = new EPUserAppsSortPreference();
+                               usrSortPr.setUserId(Ints.checkedCast(user.getId()));
+                               usrSortPr.setSortPref(appsSortPreference.getValue());
+                               dataAccessService.saveDomainObject(usrSortPr, null);
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                       } else {
+                               usrSortPr = epSortTypes.get(0);
+                               usrSortPr.setSortPref(appsSortPreference.getValue());
+                               HashMap<String, Integer> additionalUpdateParam = new HashMap<String, Integer>();
+                               additionalUpdateParam.put("userId", usrSortPr.getUserId());
+                               dataAccessService.saveDomainObject(usrSortPr, additionalUpdateParam);
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "saveAppsSortPreference failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public String getUserAppsSortTypePreference(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               List<EPUserAppsSortPreference> userSortPrefs = new ArrayList<EPUserAppsSortPreference>();
+               try {
+                       params.put("userId", user.getId());
+                       userSortPrefs = dataAccessService.executeNamedQuery("userAppsSortPreferenceQuery", params, null);
+                       if (userSortPrefs.size() > 0)
+                               return userSortPrefs.get(0).getSortPref();
+                       else
+                               return null;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getUserAppsSortTypePreference failed", e);
+               }
+               return null;
+
+       }
+
+       @Override
+       public List<EPApp> getUserRemoteApps(String id) {
+               throw new RuntimeException(" Cannot be called from parent class");
+       }
+
+}
index c7bf680..1e12dd5 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.AdminUserApplications;\r
-import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;\r
-import org.openecomp.portalapp.portal.domain.AppsResponse;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompApp;\r
-import org.openecomp.portalapp.portal.domain.UserRoles;\r
-import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;\r
-import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;\r
-import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;\r
-import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.LocalRole;\r
-import org.openecomp.portalapp.portal.transport.OnboardingApp;\r
-\r
-public interface EPAppService {\r
-\r
-       /**\r
-        * Get all applications adminId is an admin\r
-        * \r
-        * @param adminId\r
-        *            - the admin\r
-        * @return the admin's applications\r
-        */\r
-       List<EPApp> getUserAsAdminApps(EPUser user);\r
-\r
-       List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId);\r
-\r
-       /**\r
-        * Gets all rows and all fields from the fn_app table.\r
-        * \r
-        * @return list of EPApp objects\r
-        */\r
-       List<EPApp> getAppsFullList();\r
-\r
-       /**\r
-        * Gets all rows and most fields from the fn_app table.\r
-        * \r
-        * @return list of EcompApp objects.\r
-        */\r
-       List<EcompApp> getEcompAppAppsFullList();\r
-\r
-       /**\r
-        * Get apps with app app admins\r
-        * \r
-        * @return List of AdminUserApplications\r
-        */\r
-       List<AdminUserApplications> getAppsAdmins();\r
-\r
-       /**\r
-        * Get all apps from fn_app table (index, name, title only).\r
-        * \r
-        * @param all\r
-        *            If all is true, returns active and inactive apps; otherwise,\r
-        *            just active apps.\r
-        * @return List of AppsResponse objects.\r
-        */\r
-       List<AppsResponse> getAllApps(Boolean all);\r
-\r
-       UserRoles getUserProfile(String loginId);\r
-\r
-       UserRoles getUserProfileNormalized(EPUser user);\r
-\r
-       List<LocalRole> getAppRoles(Long appId);\r
-\r
-       List<AppIdAndNameTransportModel> getAdminApps(EPUser user);\r
-\r
-       List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user);\r
-\r
-       /**\r
-        * Gets the applications accessible to the specified user, which includes\r
-        * all enabled open applications, plus all enabled applications for which\r
-        * the user has a defined role for that app.\r
-        * \r
-        * @param user\r
-        *            EPUser object with the user's ATT UID\r
-        * @return the user's list of applications, which may be empty.\r
-        */\r
-       List<EPApp> getUserApps(EPUser user);\r
-\r
-       /**\r
-        * Gets the user-personalized list of applications for the Portal (super)\r
-        * admin, which includes enabled open applications, enabled applications for\r
-        * which the user has a defined role for that app, and/or enabled\r
-        * applications which the user has chosen to show.\r
-        * \r
-        * @param user\r
-        *            EPUser object with the user's ATT UID\r
-        * @return the user's personalized list of applications, which may be empty.\r
-        */\r
-       List<EPApp> getPersAdminApps(EPUser user);\r
-\r
-       /**\r
-        * Gets the user-personalized list of accessible applications, which\r
-        * includes enabled open applications and/or enabled applications for which\r
-        * the user has a defined role for that app. Personalization means the user\r
-        * can indicate an accessible application should be excluded from this\r
-        * result.\r
-        * \r
-        * @param user\r
-        *            EPUser object with the user's ATT UID\r
-        * @return the user's personalized list of applications, which may be empty.\r
-        */\r
-       List<EPApp> getPersUserApps(EPUser user);\r
-\r
-       /**\r
-        * Gets the application catalog for the specified user who is a super admin.\r
-        * This includes all enabled applications. Each item indicates whether the\r
-        * user has access (open or via a role), and whether the application is\r
-        * selected for showing in the user's home (applications) page. Admin sees\r
-        * slightly different behavior - can force an app onto the home page using\r
-        * the personalization feature (user-app-selection table).\r
-        * \r
-        * @param user\r
-        * @return list of all enabled applications, which may be empty\r
-        */\r
-       List<AppCatalogItem> getAdminAppCatalog(EPUser user);\r
-\r
-       /**\r
-        * Gets the application catalog for the specified user, who is a regular\r
-        * user. This includes all enabled applications. Each item indicates whether\r
-        * the user has access (open or via a role), and whether the application is\r
-        * selected for showing in the user's home (applications) page.\r
-        * \r
-        * @param user\r
-        * @return list of all enabled applications, which may be empty\r
-        */\r
-       List<AppCatalogItem> getUserAppCatalog(EPUser user);\r
-\r
-       List<OnboardingApp> getOnboardingApps();\r
-\r
-       List<OnboardingApp> getEnabledNonOpenOnboardingApps();\r
-\r
-       FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user);\r
-\r
-       FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user);\r
-\r
-       /**\r
-        * Deletes the specified application from all tables where the app_id is\r
-        * used, and ultimately from the fn_app table.\r
-        * \r
-        * @param user\r
-        *            Must be Portal (super) administrator\r
-        * @param onboardingAppId\r
-        *            ID of application to be deleted\r
-        * @return Status code\r
-        */\r
-       FieldsValidator deleteOnboardingApp(EPUser user, Long onboardingAppId);\r
-\r
-       List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList);\r
-\r
-       EPApp getApp(Long appId);\r
-\r
-       EPApp getAppDetail(String appName);\r
-\r
-       List<EPApp> getAppsOrderByName(EPUser user);\r
-\r
-       FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user);\r
-\r
-       FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user);\r
-\r
-       FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user);\r
-\r
-       /**\r
-        * Deletes the sort order of user apps by sort manual preference\r
-        * \r
-        * @param delAppSortManual\r
-        *            User Apps Data\r
-        * @param user\r
-        *            LoggedIn User Data\r
-        * @return FieldsValidator\r
-        */\r
-       FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user);\r
-\r
-       FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user);\r
-\r
-       String getUserAppsSortTypePreference(EPUser user);\r
-\r
-       List<EPApp> getAppsOrderByLastUsed(EPUser user);\r
-\r
-       List<EPApp> getAppsOrderByMostUsed(EPUser user);\r
-\r
-       List<EPApp> getAppsOrderByManual(EPUser user);\r
-\r
-       List<EPApp> getUserRemoteApps(String id);\r
-\r
-       void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.openecomp.portalapp.portal.domain.AppsResponse;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.LocalRole;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+
+public interface EPAppService {
+
+       /**
+        * Get all applications adminId is an admin
+        * 
+        * @param user
+        *            the admin user
+        * @return the admin's applications
+        */
+       List<EPApp> getUserAsAdminApps(EPUser user);
+
+       List<EPApp> getUserByOrgUserIdAsAdminApps(String orgUserId);
+
+       /**
+        * Gets all rows and all fields from the fn_app table.
+        * 
+        * @return list of EPApp objects
+        */
+       List<EPApp> getAppsFullList();
+
+       /**
+        * Gets all rows and most fields from the fn_app table.
+        * 
+        * @return list of EcompApp objects.
+        */
+       List<EcompApp> getEcompAppAppsFullList();
+
+       /**
+        * Get apps with app app admins
+        * 
+        * @return List of AdminUserApplications
+        */
+       List<AdminUserApplications> getAppsAdmins();
+
+       /**
+        * Get all apps from fn_app table (index, name, title only).
+        * 
+        * @param all
+        *            If all is true, returns active and inactive apps; otherwise,
+        *            just active apps.
+        * @return List of AppsResponse objects.
+        */
+       List<AppsResponse> getAllApps(Boolean all);
+
+       UserRoles getUserProfile(String loginId);
+
+       UserRoles getUserProfileNormalized(EPUser user);
+
+       List<LocalRole> getAppRoles(Long appId);
+
+       List<AppIdAndNameTransportModel> getAdminApps(EPUser user);
+
+       List<AppIdAndNameTransportModel> getAppsForSuperAdminAndAccountAdmin(EPUser user);
+
+       /**
+        * Gets the applications accessible to the specified user, which includes
+        * all enabled open applications, plus all enabled applications for which
+        * the user has a defined role for that app.
+        * 
+        * @param user
+        *            EPUser object with the user's ATT UID
+        * @return the user's list of applications, which may be empty.
+        */
+       List<EPApp> getUserApps(EPUser user);
+
+       /**
+        * Gets the user-personalized list of applications for the Portal (super)
+        * admin, which includes enabled open applications, enabled applications for
+        * which the user has a defined role for that app, and/or enabled
+        * applications which the user has chosen to show.
+        * 
+        * @param user
+        *            EPUser object with the user's ATT UID
+        * @return the user's personalized list of applications, which may be empty.
+        */
+       List<EPApp> getPersAdminApps(EPUser user);
+
+       /**
+        * Gets the user-personalized list of accessible applications, which
+        * includes enabled open applications and/or enabled applications for which
+        * the user has a defined role for that app. Personalization means the user
+        * can indicate an accessible application should be excluded from this
+        * result.
+        * 
+        * @param user
+        *            EPUser object with the user's ATT UID
+        * @return the user's personalized list of applications, which may be empty.
+        */
+       List<EPApp> getPersUserApps(EPUser user);
+
+       /**
+        * Gets the application catalog for the specified user who is a super admin.
+        * This includes all enabled applications. Each item indicates whether the
+        * user has access (open or via a role), and whether the application is
+        * selected for showing in the user's home (applications) page. Admin sees
+        * slightly different behavior - can force an app onto the home page using
+        * the personalization feature (user-app-selection table).
+        * 
+        * @param user
+        * @return list of all enabled applications, which may be empty
+        */
+       List<AppCatalogItem> getAdminAppCatalog(EPUser user);
+
+       /**
+        * Gets the application catalog for the specified user, who is a regular
+        * user. This includes all enabled applications. Each item indicates whether
+        * the user has access (open or via a role), and whether the application is
+        * selected for showing in the user's home (applications) page.
+        * 
+        * @param user
+        * @return list of all enabled applications, which may be empty
+        */
+       List<AppCatalogItem> getUserAppCatalog(EPUser user);
+
+       List<OnboardingApp> getOnboardingApps();
+
+       List<OnboardingApp> getEnabledNonOpenOnboardingApps();
+
+       FieldsValidator modifyOnboardingApp(OnboardingApp modifiedOnboardingApp, EPUser user);
+
+       FieldsValidator addOnboardingApp(OnboardingApp newOnboardingApp, EPUser user);
+
+       /**
+        * Deletes the specified application from all tables where the app_id is
+        * used, and ultimately from the fn_app table.
+        * 
+        * @param user
+        *            Must be Portal (super) administrator
+        * @param onboardingAppId
+        *            ID of application to be deleted
+        * @return Status code
+        */
+       FieldsValidator deleteOnboardingApp(EPUser user, Long onboardingAppId);
+
+       List<EcompApp> transformAppsToEcompApps(List<EPApp> appsList);
+
+       EPApp getApp(Long appId);
+
+       EPApp getAppDetail(String appName);
+
+       List<EPApp> getAppsOrderByName(EPUser user);
+
+       FieldsValidator saveAppsSortPreference(EPAppsSortPreference appsSortPreference, EPUser user);
+
+       FieldsValidator saveAppsSortManual(List<EPAppsManualPreference> appsSortManual, EPUser user);
+
+       FieldsValidator saveWidgetsSortManual(List<EPWidgetsSortPreference> widgetsSortManual, EPUser user);
+
+       /**
+        * Deletes the sort order of user apps by sort manual preference
+        * 
+        * @param delAppSortManual
+        *            User Apps Data
+        * @param user
+        *            LoggedIn User Data
+        * @return FieldsValidator
+        */
+       FieldsValidator deleteUserAppSortManual(EPDeleteAppsManualSortPref delAppSortManual, EPUser user);
+
+       FieldsValidator deleteUserWidgetSortPref(List<EPWidgetsSortPreference> delWidgetSortPref, EPUser user);
+
+       String getUserAppsSortTypePreference(EPUser user);
+
+       List<EPApp> getAppsOrderByLastUsed(EPUser user);
+
+       List<EPApp> getAppsOrderByMostUsed(EPUser user);
+
+       List<EPApp> getAppsOrderByManual(EPUser user);
+
+       List<EPApp> getUserRemoteApps(String id);
+
+       void createOnboardingFromApp(EPApp app, OnboardingApp onboardingApp);
+
+}
index a35a8ba..ef43647 100644 (file)
@@ -1,27 +1,27 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Date;\r
-\r
-public interface EPAuditService {\r
-       public Date getGuestLastLogin(String userId);\r
-       public void delAuditLogFromDay();\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Date;
+
+public interface EPAuditService {
+       public Date getGuestLastLogin(String userId);
+       public void delAuditLogFromDay();
+}
index 1a34386..a7b7161 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.time.LocalDate;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.domain.AuditLog;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-\r
-@Service("epAuditService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class EPAuditServiceImpl implements EPAuditService {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPAuditServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService  dataAccessService;\r
-\r
-       @Override\r
-       /* get the guest last login time with orgUserId as param.\r
-        * If record not found in table, return null.\r
-        *  \r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.EPUserService#getGuestLastLogin(java.lang.String)\r
-        */\r
-       public Date getGuestLastLogin(String userId) {\r
-               Map<String, String> params = new HashMap<>();\r
-               params.put("userId", userId);\r
-               List<Date> list = getDataAccessService().executeNamedQuery("getGuestLastLogin", params, null);  \r
-               Date date=null;\r
-               if(list!=null){\r
-                       if(list.size()==1) /* if list only contains one item, meaning this is the first time user logs in or record not found in db*/\r
-                               date = list.get(0); /*the guest's current log in time*/\r
-                       else if(list.size()==2)\r
-                               date = list.get(1); /*most recent login date from db*/\r
-               }\r
-               return date;    \r
-       }\r
-\r
-       @Override\r
-       /* Clean all the records in fn_audit_log table that are less than defined date in system.property\r
-        * \r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.EPAuditService#delAuditLogFromDay()\r
-        */\r
-       public void delAuditLogFromDay(){       \r
-               if (EPCommonSystemProperties.containsProperty(EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM)) {\r
-                       String day = EPCommonSystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM);                              \r
-                       LocalDate removeDateFrom = LocalDate.now().minusDays(Integer.valueOf(day));\r
-                       getDataAccessService().deleteDomainObjects(AuditLog.class, "audit_date  <'"+removeDateFrom+"'",null);\r
-               }else{\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "delAuditLogFromDay Exception = system.propertiy value is empty on" + EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM);\r
-               }       \r
-       }\r
-       \r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.time.LocalDate;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+
+@Service("epAuditService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class EPAuditServiceImpl implements EPAuditService {
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPAuditServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @Override
+       /*
+        * get the guest last login time with orgUserId as param. If record not
+        * found in table, return null.
+        * 
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.openecomp.portalapp.portal.service.EPUserService#getGuestLastLogin(
+        * java.lang.String)
+        */
+       public Date getGuestLastLogin(String userId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("userId", userId);
+               @SuppressWarnings("unchecked")
+               List<Date> list = getDataAccessService().executeNamedQuery("getGuestLastLogin", params, null);
+               Date date = null;
+               if (list != null) {
+                       /*
+                        * if list only contains one item, meaning this is the first time
+                        * user logs in or record not found in db
+                        */
+                       if (list.size() == 1)
+                               date = list.get(0); /* the guest's current log in time */
+                       else if (list.size() == 2)
+                               date = list.get(1); /* most recent login date from db */
+               }
+               return date;
+       }
+
+       /*
+        * Cleans all the records in fn_audit_log table that are less than defined
+        * date in system.property
+        * 
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.openecomp.portalapp.portal.service.EPAuditService#delAuditLogFromDay(
+        * )
+        */
+       @Override
+       public void delAuditLogFromDay() {
+               if (EPCommonSystemProperties.containsProperty(EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM)) {
+                       String day = EPCommonSystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM);
+                       LocalDate removeDateFrom = LocalDate.now().minusDays(Integer.valueOf(day));
+                       getDataAccessService().deleteDomainObjects(AuditLog.class, "audit_date  <'" + removeDateFrom + "'", null);
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "delAuditLogFromDay Exception = system.propertiy value is empty on"
+                                                       + EPCommonSystemProperties.AUDITLOG_DEL_DAY_FROM);
+               }
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+}
index c77684f..4bdecc9 100644 (file)
@@ -1,31 +1,31 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalsdk.core.command.support.SearchResult;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-\r
-public interface EPLdapService {\r
-\r
-    // search POST for users based on the criteria selected in the Request\r
-    SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, int pageNo, int dataSize, int userId) throws Exception;\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalsdk.core.command.support.SearchResult;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+
+public interface EPLdapService {
+
+    // search POST for users based on the criteria selected in the Request
+    SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, int pageNo, int dataSize, int userId) throws Exception;
+
+}
index dfcc0c7..664ee1a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-import javax.naming.NamingEnumeration;\r
-import javax.naming.NamingException;\r
-import javax.naming.directory.Attribute;\r
-import javax.naming.directory.Attributes;\r
-import javax.naming.directory.DirContext;\r
-import javax.naming.directory.SearchControls;\r
-\r
-import org.slf4j.MDC;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.command.support.SearchResult;\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.support.FusionService;\r
-import org.openecomp.portalsdk.core.service.support.ServiceLocator;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Service("epLdapService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-public class EPLdapServiceImpl extends FusionService implements EPLdapService {\r
-       @Autowired\r
-       private ServiceLocator serviceLocator;\r
-       \r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLdapServiceImpl.class);\r
-\r
-       @EPAuditLog\r
-    @SuppressWarnings({ "rawtypes", "unchecked" })\r
-       public SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, \r
-               int pageNo, int dataSize, int userId) throws Exception {\r
-\r
-       String remoteHost = "";\r
-                       \r
-               // initialize the directory context to access POST\r
-        DirContext dirContext = serviceLocator.getDirContext(SystemProperties.getProperty(SystemProperties.POST_INITIAL_CONTEXT_FACTORY),\r
-                                                                  SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL),\r
-                                                                  SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL));\r
-        \r
-        SearchResult searchResult = new SearchResult();\r
-\r
-        try {\r
-        \r
-               remoteHost = String.format("%s/%s", SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL), \r
-                                                                       SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL));\r
-               MDC.put(EPCommonSystemProperties.FULL_URL, remoteHost);\r
-               \r
-          String[] postAttributes =  {"nickname","givenName","initials","sn","employeeNumber","mail","telephoneNumber",\r
-                               "departmentNumber","a1","street","roomNumber","l","st","postalCode","zip4","physicalDeliveryOfficeName","bc",\r
-                               "friendlyCountryName","bd","bdname","bu","buname","jtname","mgrid","a2","compcode","compdesc",\r
-                               "costcenter","silo","b2"};\r
-\r
-          SearchControls searchControls = new SearchControls();\r
-          searchControls.setTimeLimit(5000);\r
-          searchControls.setReturningAttributes(postAttributes);\r
-\r
-          StringBuffer filterClause = new StringBuffer("(&(objectClass=*)");\r
-\r
-          EPUser user = (EPUser)searchCriteria;\r
-\r
-          if(Utilities.nvl(user.getFirstName()).length() > 0) {\r
-            filterClause.append("(givenName=").append(user.getFirstName()).append("*)");\r
-          }\r
-          if(Utilities.nvl(user.getLastName()).length() > 0) {\r
-            filterClause.append("(sn=").append(user.getLastName()).append("*)");\r
-          }\r
-          if(Utilities.nvl(user.getHrid()).length() > 0) {\r
-            filterClause.append("(employeeNumber=").append(user.getHrid()).append("*)");\r
-          }\r
-          if(Utilities.nvl(user.getOrgManagerUserId()).length() > 0) {\r
-              filterClause.append("(mgrid=").append(user.getOrgManagerUserId()).append("*)");\r
-            }\r
-          if(Utilities.nvl(user.getOrgCode()).length() > 0) {\r
-            filterClause.append("(departmentNumber=").append(user.getOrgCode()).append("*)");\r
-          }\r
-          if(Utilities.nvl(user.getEmail()).length() > 0) {\r
-            filterClause.append("(mail=").append(user.getEmail()).append("*)");\r
-          }\r
-          if(Utilities.nvl(user.getOrgUserId()).length() > 0) {\r
-            filterClause.append("(a1=").append(user.getOrgUserId()).append("*)");\r
-          }\r
-          filterClause.append("(c3=N)"); // this has been added to filter CP09 entries on the LDAP server that are duplicates of existing individuals\r
-          filterClause.append(")");\r
-\r
-          List list = new ArrayList();\r
-          if (!filterClause.toString().equals("(&(objectClass=*))")) {\r
-                 NamingEnumeration e = dirContext.search(SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL) + "/" +\r
-                                                      SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL),\r
-                                                      filterClause.toString(),\r
-                                                      searchControls);\r
-                 list = processResults(e);\r
-          }\r
-          \r
-          Collections.sort(list);\r
-\r
-          searchResult = new SearchResult(list);\r
-          searchResult.setPageNo(pageNo);\r
-          if(dataSize >= 0) {\r
-            searchResult.setDataSize(dataSize);\r
-          }\r
-          else {\r
-            searchResult.setDataSize(list.size());\r
-          }\r
-        } catch(NamingException ne) {\r
-               String stackTrace = EcompPortalUtils.getStackTrace(ne);\r
-               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the LDAP search. Details: " + stackTrace);\r
-        } catch(Exception e) {\r
-               String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the LDAP search. Details: " + stackTrace);\r
-        }\r
-        finally {\r
-               dirContext.close();\r
-        }\r
-\r
-        return searchResult;\r
-    }\r
-\r
-\r
-    @SuppressWarnings({ "rawtypes", "unchecked" })\r
-    @EPMetricsLog\r
-       private ArrayList processResults(NamingEnumeration e) throws NamingException {\r
-      ArrayList results = new ArrayList();\r
-      int count = 0;\r
-\r
-      while (e.hasMore()) {\r
-        javax.naming.directory.SearchResult searchResult = (javax.naming.directory.SearchResult)e.next();\r
-        results.add(processAttributes(searchResult.getAttributes()));\r
-        count++;\r
-\r
-        if(count > Integer.parseInt(SystemProperties.getProperty(SystemProperties.POST_MAX_RESULT_SIZE))) {\r
-          break;\r
-        }\r
-      }\r
-      return results;\r
-    }\r
-\r
-\r
-    @SuppressWarnings("rawtypes")\r
-    @EPMetricsLog\r
-       private DomainVo processAttributes(Attributes resultAttributes) throws NamingException {\r
-      EPUser user = new EPUser();\r
-\r
-      try {\r
-        if (resultAttributes == null) {\r
-          logger.debug(EELFLoggerDelegate.debugLogger, "This result has no attributes");\r
-        } else {\r
-          for (NamingEnumeration e = resultAttributes.getAll(); e.hasMore();) { //why the nested loop?\r
-            Attribute attribute = (Attribute)e.next();\r
-            for (NamingEnumeration ie = attribute.getAll(); ie.hasMore();) {\r
-              if (attribute.getID().equalsIgnoreCase("nickname")) {\r
-                  user.setFirstName((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("initials")) {\r
-                  user.setMiddleInitial((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("sn")) {\r
-                  user.setLastName((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("employeeNumber")) {\r
-                  user.setHrid((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("mail")) {\r
-                  user.setEmail((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("telephoneNumber")) {\r
-                  user.setPhone((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("departmentNumber")) {\r
-                  user.setOrgCode((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("a1")) {\r
-                  user.setOrgUserId((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("street")) {\r
-                  user.setAddress1((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("roomNumber")) {\r
-                  user.setAddress2((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("l")) {\r
-                  user.setCity((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("st")) {\r
-                  user.setState((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("postalCode")) {\r
-                  user.setZipCode((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("zip4")) {\r
-                  user.setZipCodeSuffix((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("physicalDeliveryOfficeName")) {\r
-                  user.setLocationClli((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("bc")) {\r
-                  user.setBusinessCountryCode((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("friendlyCountryName")) {\r
-                  user.setBusinessCountryName((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("bd")) {\r
-                  user.setDepartment((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("bdname")) {\r
-                  user.setDepartmentName((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("jtname")) {\r
-                  user.setJobTitle((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("mgrid")) {\r
-                  user.setOrgManagerUserId((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("a2")) {\r
-                  user.setCommandChain((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("compcode")) {\r
-                  user.setCompanyCode((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("compdesc")) {\r
-                  user.setCompany((String) ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("bu")) {\r
-                  user.setBusinessUnit((String)ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("buname")) {\r
-                  user.setBusinessUnitName((String)ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("silo")) {\r
-                  user.setSiloStatus((String)ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("costcenter")) {\r
-                  user.setCostCenter((String)ie.next());\r
-              }\r
-              else if (attribute.getID().equalsIgnoreCase("b2")) {\r
-                  user.setFinancialLocCode((String)ie.next());\r
-              }\r
-              else { //we don't care about returned attribute, let's move on\r
-                ie.next();\r
-              }\r
-\r
-            }\r
-          }\r
-        }\r
-      } catch (NamingException e) {\r
-         String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-         logger.error(EELFLoggerDelegate.errorLogger, "An error occurred while processing the following user from POST with an Organization User ID of " + user.getOrgUserId());\r
-         logger.error(EELFLoggerDelegate.errorLogger, "Exception occcurred while processing LDAP search results, Details: " + stackTrace);\r
-      } catch(Exception e) {\r
-         String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-         logger.error(EELFLoggerDelegate.errorLogger, "Exception occcurred while processing LDAP search results, Details: " + stackTrace);\r
-      }\r
-      \r
-      return user;\r
-    }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.SearchControls;
+
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.command.support.SearchResult;
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.support.FusionService;
+import org.openecomp.portalsdk.core.service.support.ServiceLocator;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+@Service("epLdapService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class EPLdapServiceImpl extends FusionService implements EPLdapService {
+       @Autowired
+       private ServiceLocator serviceLocator;
+       
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLdapServiceImpl.class);
+
+       @EPAuditLog
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+       public SearchResult searchPost(DomainVo searchCriteria, String sortBy1, String sortBy2, String sortBy3, 
+               int pageNo, int dataSize, int userId) throws Exception {
+
+       String remoteHost = "";
+                       
+               // initialize the directory context to access POST
+        DirContext dirContext = serviceLocator.getDirContext(SystemProperties.getProperty(SystemProperties.POST_INITIAL_CONTEXT_FACTORY),
+                                                                  SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL),
+                                                                  SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL));
+        
+        SearchResult searchResult = new SearchResult();
+
+        try {
+        
+               remoteHost = String.format("%s/%s", SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL), 
+                                                                       SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL));
+               MDC.put(EPCommonSystemProperties.FULL_URL, remoteHost);
+               
+          String[] postAttributes =  {"nickname","givenName","initials","sn","employeeNumber","mail","telephoneNumber",
+                               "departmentNumber","a1","street","roomNumber","l","st","postalCode","zip4","physicalDeliveryOfficeName","bc",
+                               "friendlyCountryName","bd","bdname","bu","buname","jtname","mgrid","a2","compcode","compdesc",
+                               "costcenter","silo","b2"};
+
+          SearchControls searchControls = new SearchControls();
+          searchControls.setTimeLimit(5000);
+          searchControls.setReturningAttributes(postAttributes);
+
+          StringBuffer filterClause = new StringBuffer("(&(objectClass=*)");
+
+          EPUser user = (EPUser)searchCriteria;
+
+          if(Utilities.nvl(user.getFirstName()).length() > 0) {
+            filterClause.append("(givenName=").append(user.getFirstName()).append("*)");
+          }
+          if(Utilities.nvl(user.getLastName()).length() > 0) {
+            filterClause.append("(sn=").append(user.getLastName()).append("*)");
+          }
+          if(Utilities.nvl(user.getHrid()).length() > 0) {
+            filterClause.append("(employeeNumber=").append(user.getHrid()).append("*)");
+          }
+          if(Utilities.nvl(user.getOrgManagerUserId()).length() > 0) {
+              filterClause.append("(mgrid=").append(user.getOrgManagerUserId()).append("*)");
+            }
+          if(Utilities.nvl(user.getOrgCode()).length() > 0) {
+            filterClause.append("(departmentNumber=").append(user.getOrgCode()).append("*)");
+          }
+          if(Utilities.nvl(user.getEmail()).length() > 0) {
+            filterClause.append("(mail=").append(user.getEmail()).append("*)");
+          }
+          if(Utilities.nvl(user.getOrgUserId()).length() > 0) {
+            filterClause.append("(a1=").append(user.getOrgUserId()).append("*)");
+          }
+          filterClause.append("(c3=N)"); // this has been added to filter CP09 entries on the LDAP server that are duplicates of existing individuals
+          filterClause.append(")");
+
+          List list = new ArrayList();
+          if (!filterClause.toString().equals("(&(objectClass=*))")) {
+                 NamingEnumeration e = dirContext.search(SystemProperties.getProperty(SystemProperties.POST_PROVIDER_URL) + "/" +
+                                                      SystemProperties.getProperty(SystemProperties.POST_SECURITY_PRINCIPAL),
+                                                      filterClause.toString(),
+                                                      searchControls);
+                 list = processResults(e);
+          }
+          
+          Collections.sort(list);
+
+          searchResult = new SearchResult(list);
+          searchResult.setPageNo(pageNo);
+          if(dataSize >= 0) {
+            searchResult.setDataSize(dataSize);
+          }
+          else {
+            searchResult.setDataSize(list.size());
+          }
+        } catch(NamingException ne) {
+               String stackTrace = EcompPortalUtils.getStackTrace(ne);
+               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the LDAP search. Details: " + stackTrace);
+        } catch(Exception e) {
+               String stackTrace = EcompPortalUtils.getStackTrace(e);
+               logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the LDAP search. Details: " + stackTrace);
+        }
+        finally {
+               dirContext.close();
+        }
+
+        return searchResult;
+    }
+
+
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @EPMetricsLog
+       private ArrayList processResults(NamingEnumeration e) throws NamingException {
+      ArrayList results = new ArrayList();
+      int count = 0;
+
+      while (e.hasMore()) {
+        javax.naming.directory.SearchResult searchResult = (javax.naming.directory.SearchResult)e.next();
+        results.add(processAttributes(searchResult.getAttributes()));
+        count++;
+
+        if(count > Integer.parseInt(SystemProperties.getProperty(SystemProperties.POST_MAX_RESULT_SIZE))) {
+          break;
+        }
+      }
+      return results;
+    }
+
+
+    @SuppressWarnings("rawtypes")
+    @EPMetricsLog
+       private DomainVo processAttributes(Attributes resultAttributes) throws NamingException {
+      EPUser user = new EPUser();
+
+      try {
+        if (resultAttributes == null) {
+          logger.debug(EELFLoggerDelegate.debugLogger, "This result has no attributes");
+        } else {
+          for (NamingEnumeration e = resultAttributes.getAll(); e.hasMore();) { //why the nested loop?
+            Attribute attribute = (Attribute)e.next();
+            for (NamingEnumeration ie = attribute.getAll(); ie.hasMore();) {
+              if (attribute.getID().equalsIgnoreCase("nickname")) {
+                  user.setFirstName((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("initials")) {
+                  user.setMiddleInitial((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("sn")) {
+                  user.setLastName((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("employeeNumber")) {
+                  user.setHrid((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("mail")) {
+                  user.setEmail((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("telephoneNumber")) {
+                  user.setPhone((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("departmentNumber")) {
+                  user.setOrgCode((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("a1")) {
+                  user.setOrgUserId((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("street")) {
+                  user.setAddress1((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("roomNumber")) {
+                  user.setAddress2((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("l")) {
+                  user.setCity((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("st")) {
+                  user.setState((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("postalCode")) {
+                  user.setZipCode((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("zip4")) {
+                  user.setZipCodeSuffix((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("physicalDeliveryOfficeName")) {
+                  user.setLocationClli((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("bc")) {
+                  user.setBusinessCountryCode((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("friendlyCountryName")) {
+                  user.setBusinessCountryName((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("bd")) {
+                  user.setDepartment((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("bdname")) {
+                  user.setDepartmentName((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("jtname")) {
+                  user.setJobTitle((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("mgrid")) {
+                  user.setOrgManagerUserId((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("a2")) {
+                  user.setCommandChain((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("compcode")) {
+                  user.setCompanyCode((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("compdesc")) {
+                  user.setCompany((String) ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("bu")) {
+                  user.setBusinessUnit((String)ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("buname")) {
+                  user.setBusinessUnitName((String)ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("silo")) {
+                  user.setSiloStatus((String)ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("costcenter")) {
+                  user.setCostCenter((String)ie.next());
+              }
+              else if (attribute.getID().equalsIgnoreCase("b2")) {
+                  user.setFinancialLocCode((String)ie.next());
+              }
+              else { //we don't care about returned attribute, let's move on
+                ie.next();
+              }
+
+            }
+          }
+        }
+      } catch (NamingException e) {
+         String stackTrace = EcompPortalUtils.getStackTrace(e);
+         logger.error(EELFLoggerDelegate.errorLogger, "An error occurred while processing the following user from POST with an Organization User ID of " + user.getOrgUserId());
+         logger.error(EELFLoggerDelegate.errorLogger, "Exception occcurred while processing LDAP search results, Details: " + stackTrace);
+      } catch(Exception e) {
+         String stackTrace = EcompPortalUtils.getStackTrace(e);
+         logger.error(EELFLoggerDelegate.errorLogger, "Exception occcurred while processing LDAP search results, Details: " + stackTrace);
+      }
+      
+      return user;
+    }
+}
index ed9c3c4..9785f2b 100644 (file)
@@ -1,44 +1,44 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Set;\r
-\r
-import org.openecomp.portalsdk.core.domain.MenuData;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public interface EPLeftMenuService {\r
-       \r
-       /**\r
-        * Builds a JSON suitable for populating the front-end left menu from the supplied set of menu items.\r
-        * @param user \r
-        * \r
-        * @param fullMenuSet\r
-        * @param roleFunctionSet \r
-        * @return JSON String of this form:\r
-        * <PRE>\r
-        * {"navItems":[\r
-        *              {"name":"Home","imageSrc":"icon-location-pin","state":"root.applicationsHome"},\r
-        *      ...\r
-        * ] }\r
-        * </PRE>\r
-        */\r
-       String getLeftMenuItems(EPUser user, Set<MenuData> fullMenuSet, Set<String> roleFunctionSet);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Set;
+
+import org.openecomp.portalsdk.core.domain.MenuData;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public interface EPLeftMenuService {
+       
+       /**
+        * Builds a JSON suitable for populating the front-end left menu from the supplied set of menu items.
+        * @param user 
+        * 
+        * @param fullMenuSet
+        * @param roleFunctionSet 
+        * @return JSON String of this form:
+        * <PRE>
+        * {"navItems":[
+        *              {"name":"Home","imageSrc":"icon-location-pin","state":"root.applicationsHome"},
+        *      ...
+        * ] }
+        * </PRE>
+        */
+       String getLeftMenuItems(EPUser user, Set<MenuData> fullMenuSet, Set<String> roleFunctionSet);
+}
index 2a1f466..9158e99 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Collection;\r
-import java.util.Comparator;\r
-import java.util.LinkedHashMap;\r
-import java.util.Map;\r
-import java.util.Set;\r
-import java.util.SortedSet;\r
-import java.util.TreeSet;\r
-\r
-import org.json.JSONArray;\r
-import org.json.JSONObject;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.domain.MenuData;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.UserRoles;\r
-//import org.openecomp.portalapp.portal.domain.Menu;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("leftMenuService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-\r
-public class EPLeftMenuServiceImpl implements EPLeftMenuService {\r
-\r
-       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLeftMenuServiceImpl.class);\r
-\r
-       @Autowired\r
-       private EPAppService appService;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see\r
-        * org.openecomp.portalapp.portal.service.EPLeftMenuService#getLeftMenuItems\r
-        * (java.util.Set)\r
-        */\r
-       @Override\r
-       public String getLeftMenuItems(EPUser user, Set<MenuData> fullMenuSet, Set<String> roleFunctionSet) {\r
-               final Map<String, JSONObject> defaultNavMap = new LinkedHashMap<String, JSONObject>();\r
-\r
-               resetNavMap(defaultNavMap);\r
-\r
-               loadDefaultNavMap(defaultNavMap);\r
-\r
-               // Handle Account Administrator in a special way; soon this will\r
-               // be revised as Account Administrator may become obsolete\r
-               try {\r
-                       if (user != null) {\r
-                               UserRoles uRoles = appService.getUserProfileNormalized(user);\r
-                               if (uRoles.getRoles().contains("Account Administrator"))\r
-                                       loadAccAdminNavMap(defaultNavMap);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "getLeftMenuItems: failed to get roles for user " + user.getOrgUserId(), e);\r
-               }\r
-\r
-               loadNavMapByRole(defaultNavMap, fullMenuSet);\r
-\r
-               return convertToSideBarModel(defaultNavMap);\r
-       }\r
-\r
-       /**\r
-        * Clears the map\r
-        * \r
-        * @param defaultNavMap\r
-        */\r
-       private void resetNavMap(Map<String, JSONObject> defaultNavMap) {\r
-               defaultNavMap.clear();\r
-       }\r
-\r
-       /**\r
-        * \r
-        * @param defaultNavMap\r
-        * @param fullMenuSet\r
-        */\r
-       private void loadNavMapByRole(Map<String, JSONObject> defaultNavMap, Set<MenuData> fullMenuSet) {\r
-\r
-               class SortOrderComparator implements Comparator<MenuData> {\r
-                       @Override\r
-                       public int compare(MenuData e1, MenuData e2) {\r
-                               return e1.getSortOrder().compareTo(e2.getSortOrder());\r
-                       }\r
-               }\r
-\r
-               SortedSet<MenuData> sortMenuSet = new TreeSet<MenuData>(new SortOrderComparator());\r
-               for (MenuData mn : fullMenuSet) {\r
-                       sortMenuSet.add(mn);\r
-               }\r
-\r
-               for (MenuData mn : sortMenuSet) {\r
-                       JSONObject navItemsDetails = new JSONObject();\r
-                       navItemsDetails.put("name", mn.getLabel());\r
-                       navItemsDetails.put("state", mn.getAction());\r
-                       navItemsDetails.put("imageSrc", mn.getImageSrc());\r
-                       defaultNavMap.put(mn.getAction(), navItemsDetails);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * \r
-        * @param defaultNavMap\r
-        * @return\r
-        */\r
-       private String convertToSideBarModel(Map<String, JSONObject> defaultNavMap) {\r
-               JSONObject sidebarModel = new JSONObject();\r
-               JSONArray navItems = new JSONArray();\r
-               Collection<JSONObject> jsonObjs = defaultNavMap.values();\r
-\r
-               for (JSONObject navItemsDetail : jsonObjs)\r
-                       navItems.put(navItemsDetail);\r
-\r
-               sidebarModel.put("label", "ECOMP portal");\r
-               sidebarModel.put("navItems", navItems);\r
-               return sidebarModel.toString();\r
-       }\r
-\r
-       /**\r
-        * Loads default entries for regular user.\r
-        * \r
-        * @param defaultNavMap\r
-        */\r
-       private void loadDefaultNavMap(Map<String, JSONObject> defaultNavMap) {\r
-\r
-               JSONObject navItemsDetails1 = new JSONObject();\r
-               navItemsDetails1.put("name", "Home");\r
-               navItemsDetails1.put("state", "root.applicationsHome");\r
-               navItemsDetails1.put("imageSrc", "icon-building-home");\r
-               defaultNavMap.put("root.applicationsHome", navItemsDetails1);\r
-\r
-               JSONObject navItemsDetails2 = new JSONObject();\r
-               navItemsDetails2.put("name", "Application Catalog");\r
-               navItemsDetails2.put("state", "root.appCatalog");\r
-               navItemsDetails2.put("imageSrc", "icon-apps-marketplace");\r
-               defaultNavMap.put("root.appCatalog", navItemsDetails2);\r
-\r
-               JSONObject navItemsDetails3 = new JSONObject();\r
-               navItemsDetails3.put("name", "Widget Catalog");\r
-               navItemsDetails3.put("state", "root.widgetCatalog");\r
-               navItemsDetails3.put("imageSrc", "icon-apps-marketplace");\r
-               defaultNavMap.put("root.widgetCatalog", navItemsDetails3);\r
-\r
-       }\r
-\r
-       /**\r
-        * Loads default entries for application administrator.\r
-        * \r
-        * @param defaultNavMap\r
-        */\r
-       private void loadAccAdminNavMap(Map<String, JSONObject> defaultNavMap) {\r
-\r
-               JSONObject navItemsDetails1 = new JSONObject();\r
-               navItemsDetails1.put("name", "Users");\r
-               navItemsDetails1.put("state", "root.users");\r
-               navItemsDetails1.put("imageSrc", "icon-user");\r
-               defaultNavMap.put("root.users", navItemsDetails1);\r
-\r
-               // No more widget onboarding like this:\r
-               //\r
-               // JSONObject navItemsDetails2 = new JSONObject();\r
-               // navItemsDetails2.put("name", "Widget Onboarding");\r
-               // navItemsDetails2.put("state", "root.widgetOnboarding");\r
-               // navItemsDetails2.put("imageSrc", "icon-add-widget");\r
-               // defaultNavMap.put("root.widgetOnboarding", navItemsDetails2);\r
-\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.domain.MenuData;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+//import org.openecomp.portalapp.portal.domain.Menu;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("leftMenuService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+
+public class EPLeftMenuServiceImpl implements EPLeftMenuService {
+
+       private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLeftMenuServiceImpl.class);
+
+       @Autowired
+       private EPAppService appService;
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.openecomp.portalapp.portal.service.EPLeftMenuService#getLeftMenuItems
+        * (java.util.Set)
+        */
+       @Override
+       public String getLeftMenuItems(EPUser user, Set<MenuData> fullMenuSet, Set<String> roleFunctionSet) {
+               final Map<String, JSONObject> defaultNavMap = new LinkedHashMap<String, JSONObject>();
+
+               resetNavMap(defaultNavMap);
+
+               loadDefaultNavMap(defaultNavMap);
+
+               // Handle Account Administrator in a special way; soon this will
+               // be revised as Account Administrator may become obsolete
+               try {
+                       if (user != null) {
+                               UserRoles uRoles = appService.getUserProfileNormalized(user);
+                               if (uRoles.getRoles().contains("Account Administrator"))
+                                       loadAccAdminNavMap(defaultNavMap);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "getLeftMenuItems: failed to get roles for user " + user.getOrgUserId(), e);
+               }
+
+               loadNavMapByRole(defaultNavMap, fullMenuSet);
+
+               return convertToSideBarModel(defaultNavMap);
+       }
+
+       /**
+        * Clears the map
+        * 
+        * @param defaultNavMap
+        */
+       private void resetNavMap(Map<String, JSONObject> defaultNavMap) {
+               defaultNavMap.clear();
+       }
+
+       /**
+        * 
+        * @param defaultNavMap
+        * @param fullMenuSet
+        */
+       private void loadNavMapByRole(Map<String, JSONObject> defaultNavMap, Set<MenuData> fullMenuSet) {
+
+               class SortOrderComparator implements Comparator<MenuData> {
+                       @Override
+                       public int compare(MenuData e1, MenuData e2) {
+                               return e1.getSortOrder().compareTo(e2.getSortOrder());
+                       }
+               }
+
+               SortedSet<MenuData> sortMenuSet = new TreeSet<MenuData>(new SortOrderComparator());
+               for (MenuData mn : fullMenuSet) {
+                       sortMenuSet.add(mn);
+               }
+
+               for (MenuData mn : sortMenuSet) {
+                       JSONObject navItemsDetails = new JSONObject();
+                       navItemsDetails.put("name", mn.getLabel());
+                       navItemsDetails.put("state", mn.getAction());
+                       navItemsDetails.put("imageSrc", mn.getImageSrc());
+                       defaultNavMap.put(mn.getAction(), navItemsDetails);
+               }
+       }
+
+       /**
+        * 
+        * @param defaultNavMap
+        * @return
+        */
+       private String convertToSideBarModel(Map<String, JSONObject> defaultNavMap) {
+               JSONObject sidebarModel = new JSONObject();
+               JSONArray navItems = new JSONArray();
+               Collection<JSONObject> jsonObjs = defaultNavMap.values();
+
+               for (JSONObject navItemsDetail : jsonObjs)
+                       navItems.put(navItemsDetail);
+
+               sidebarModel.put("label", "ECOMP portal");
+               sidebarModel.put("navItems", navItems);
+               return sidebarModel.toString();
+       }
+
+       /**
+        * Loads default entries for regular user.
+        * 
+        * @param defaultNavMap
+        */
+       private void loadDefaultNavMap(Map<String, JSONObject> defaultNavMap) {
+
+               JSONObject navItemsDetails1 = new JSONObject();
+               navItemsDetails1.put("name", "Home");
+               navItemsDetails1.put("state", "root.applicationsHome");
+               navItemsDetails1.put("imageSrc", "icon-building-home");
+               defaultNavMap.put("root.applicationsHome", navItemsDetails1);
+
+               JSONObject navItemsDetails2 = new JSONObject();
+               navItemsDetails2.put("name", "Application Catalog");
+               navItemsDetails2.put("state", "root.appCatalog");
+               navItemsDetails2.put("imageSrc", "icon-apps-marketplace");
+               defaultNavMap.put("root.appCatalog", navItemsDetails2);
+
+               JSONObject navItemsDetails3 = new JSONObject();
+               navItemsDetails3.put("name", "Widget Catalog");
+               navItemsDetails3.put("state", "root.widgetCatalog");
+               navItemsDetails3.put("imageSrc", "icon-apps-marketplace");
+               defaultNavMap.put("root.widgetCatalog", navItemsDetails3);
+
+       }
+
+       /**
+        * Loads default entries for application administrator.
+        * 
+        * @param defaultNavMap
+        */
+       private void loadAccAdminNavMap(Map<String, JSONObject> defaultNavMap) {
+
+               JSONObject navItemsDetails1 = new JSONObject();
+               navItemsDetails1.put("name", "Users");
+               navItemsDetails1.put("state", "root.users");
+               navItemsDetails1.put("imageSrc", "icon-user");
+               defaultNavMap.put("root.users", navItemsDetails1);
+
+               // No more widget onboarding like this:
+               //
+               // JSONObject navItemsDetails2 = new JSONObject();
+               // navItemsDetails2.put("name", "Widget Onboarding");
+               // navItemsDetails2.put("state", "root.widgetOnboarding");
+               // navItemsDetails2.put("imageSrc", "icon-add-widget");
+               // defaultNavMap.put("root.widgetOnboarding", navItemsDetails2);
+
+       }
+
+}
index 4bdb200..d8d2a29 100644 (file)
@@ -1,70 +1,72 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.HashMap;\r
-\r
-import org.openecomp.portalapp.command.EPLoginBean;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public interface EPLoginService {\r
-\r
-       /**\r
-        * Calls {@link #findUser(EPLoginBean, String, HashMap, boolean)} with the\r
-        * last parameter set to true.\r
-        * \r
-        * @param bean\r
-        * @param menuPropertiesFilename\r
-        * @param additionalParams\r
-        * @return EPUser object; null on error or if no match.\r
-        * @throws Exception\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception;\r
-\r
-       /**\r
-        * Searches the fn_user table for a row that matches information in the\r
-        * bean. Uses the bean's Organization User ID property if present; if not, uses the bean's\r
-        * LoginId property and (optionally, depending on matchPassword parameter)\r
-        * loginPwd property.\r
-        * \r
-        * @param bean\r
-        *            EPLoginBean\r
-        * @param menuPropertiesFileName\r
-        *            Always ignored\r
-        * @param additionalParams\r
-        *            Used by DataAccessService when updating a matched user object\r
-        * @param matchPassword\r
-        *            If true, the search must match the password\r
-        * @return EPUser object; null on error or if no match.\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams,\r
-                       boolean matchPassword) throws Exception;\r
-\r
-       /**\r
-        * Searches the fn_user table for a row with a value in column login_id that\r
-        * matches the specified value.\r
-        * \r
-        * @param loginId\r
-        * @return EPUser object; null on error or if no match.\r
-        */\r
-       public EPUser findUserWithoutPwd(String loginId);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.HashMap;
+
+import org.openecomp.portalapp.command.EPLoginBean;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public interface EPLoginService {
+
+       /**
+        * Calls {@link #findUser(EPLoginBean, String, HashMap, boolean)} with the
+        * last parameter set to true.
+        * 
+        * @param bean
+        * @param menuPropertiesFilename
+        * @param additionalParams
+        * @return EPUser object; null on error or if no match.
+        * @throws Exception
+        */
+       @SuppressWarnings("rawtypes")
+       EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams) throws Exception;
+
+       /**
+        * Searches the fn_user table for a row that matches information in the
+        * bean. Uses the bean's Organization User ID property if present; if not,
+        * uses the bean's LoginId property and (optionally, depending on
+        * matchPassword parameter) loginPwd property.
+        * 
+        * @param bean
+        *            EPLoginBean
+        * @param menuPropertiesFileName
+        *            Always ignored
+        * @param additionalParams
+        *            Used by DataAccessService when updating a matched user object
+        * @param matchPassword
+        *            If true, the search must match the password
+        * @return EPUser object; null on error or if no match.
+        * @throws Exception
+        */
+       @SuppressWarnings("rawtypes")
+       EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFileName, HashMap additionalParams,
+                       boolean matchPassword) throws Exception;
+
+       /**
+        * Searches the fn_user table for a row with a value in column login_id that
+        * matches the specified value.
+        * 
+        * @param loginId
+        *            Login name
+        * @return EPUser object; null on error or if no match.
+        */
+       public EPUser findUserWithoutPwd(String loginId);
+}
index ba202d6..f912506 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.menu.MenuBuilder;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.service.support.FusionService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalsdk.core.web.support.AppUtils;\r
-import org.openecomp.portalapp.command.EPLoginBean;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.util.EPUserUtils;\r
-\r
-@Service("eploginService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class EPLoginServiceImpl extends FusionService implements EPLoginService {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLoginServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUser(org.openecomp.portalapp.command.EPLoginBean, java.lang.String, java.util.HashMap)\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams)\r
-                       throws Exception {\r
-               return findUser(bean, menuPropertiesFilename, additionalParams, true);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUser(org.openecomp.portalapp.command.EPLoginBean, java.lang.String, java.util.HashMap, boolean)\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename_ignored, HashMap additionalParams,\r
-                       boolean matchPassword) throws Exception {\r
-               EPUser user = null;\r
-               EPUser userCopy = null;\r
-\r
-               if (bean.getOrgUserId() != null) {\r
-                       user = (EPUser) findUser(bean);\r
-               } else {\r
-                       if (matchPassword)\r
-                               user = (EPUser) findUser(bean.getLoginId(), bean.getLoginPwd());\r
-                       else\r
-                               user = (EPUser) findUserWithoutPwd(bean.getLoginId());\r
-               }\r
-\r
-               // run this command to fetch more information from the lazily loaded\r
-               // object\r
-\r
-               // This is funny - commenting out the following method call\r
-               // 1. What are we doing with the returned values of the following two\r
-               // methods? Nothing.\r
-               // 2. Use a guest user scenario - user object will be null - clealry,\r
-               // NPE.\r
-               // 3. A check of if(user !=null) is made AFTER these bogus calls :) - If\r
-               // these calls WERE doing anything significat (which they are not),\r
-               // shouln't they have been moved inside that if check?\r
-\r
-               // user.getEPUserApps();\r
-\r
-               // Comments\r
-               // 1. This method is clearly doing more than 'getting roles' - Not a\r
-               // good name -\r
-               // 2. Also, there is no null check - guest user scenarios will break the\r
-               // code with NPE - added the check - Do not want to remove the call\r
-               // altogether - not sure how it will effect things.\r
-\r
-               if (user != null) {\r
-                       user.getEPRoles();\r
-\r
-                       // raise an error if the portal application is locked and the user\r
-                       // does not\r
-                       // have system administrator privileges\r
-                       if (AppUtils.isApplicationLocked()\r
-                                       && !EPUserUtils.hasRole(user, SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID))) {\r
-                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_APPLICATION_LOCKED);\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserAdminPrivilegesInfo, user.getLoginId());\r
-                       }\r
-\r
-                       // raise an error if the user is inactive\r
-                       if (!user.getActive()) {\r
-                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_INACTIVE);\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserInactiveWarning, user.getLoginId());\r
-                       }\r
-\r
-                       // only login the user if no errors have occurred\r
-                       if (bean.getLoginErrorMessage() == null) {\r
-\r
-                               // this will be a snapshot of the user's information as\r
-                               // retrieved from the database\r
-                               userCopy = (EPUser) user.clone();\r
-\r
-                               // update the last logged in date for the user\r
-                               user.setLastLoginDate(new Date());\r
-                               getDataAccessService().saveDomainObject(user, additionalParams);\r
-\r
-                               // create the application menu based on the user's privileges\r
-                               MenuBuilder menuBuilder = new MenuBuilder();\r
-                               Set appMenu = menuBuilder.getMenu(\r
-                                               SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_SET_NAME), dataAccessService);\r
-                               bean.setMenu(appMenu != null ? appMenu : new HashSet());\r
-                               Set businessDirectMenu = menuBuilder.getMenu(\r
-                                               SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_SET_NAME),\r
-                                               dataAccessService);\r
-                               bean.setBusinessDirectMenu(businessDirectMenu != null ? businessDirectMenu : new HashSet());\r
-\r
-                               bean.setUser(userCopy);\r
-                       }\r
-\r
-               } else {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserMissingError, bean.getOrgUserId());\r
-               }\r
-\r
-               return bean;\r
-       }\r
-\r
-       /**\r
-        * Searches the fn_user table for a row that matches the specified login_id\r
-        * and login_pwd values.\r
-        * \r
-        * @param loginId\r
-        * @param password\r
-        * @return EPUser object; null on error or if no match.\r
-        */\r
-       private EPUser findUser(String loginId, String password) {\r
-               List<?> list = null;\r
-\r
-               StringBuffer criteria = new StringBuffer();\r
-               criteria.append(" where login_id = '").append(loginId).append("'").append(" and login_pwd = '").append(password)\r
-                               .append("'");\r
-\r
-               try {\r
-                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "findUser(String) failed on " + loginId, e);\r
-               }\r
-\r
-               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUserWithoutPwd(java.lang.String)\r
-        */\r
-       @Override\r
-       public EPUser findUserWithoutPwd(String loginId) {\r
-               List<?> list = null;\r
-\r
-               StringBuffer criteria = new StringBuffer();\r
-               criteria.append(" where login_id = '").append(loginId).append("'");\r
-\r
-               try {\r
-                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       String message = "findUserWithoutPwd failed on " + loginId;\r
-                       logger.error(EELFLoggerDelegate.errorLogger, message, e);\r
-               }\r
-\r
-               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);\r
-       }\r
-\r
-       /**\r
-        * Searches the fn_user table for a row that matches the value of the bean's\r
-        * Organization User ID property.\r
-        * \r
-        * @param bean\r
-        * @return EPUser object; null on error or if no match.\r
-        */\r
-       private EPUser findUser(EPLoginBean bean) {\r
-               List<?> list = null;\r
-\r
-               StringBuffer criteria = new StringBuffer();\r
-               criteria.append(" where orgUserId = '").append(bean.getOrgUserId()).append("'");\r
-\r
-               try {\r
-                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "findUser(EPLoginBean) failed", e);\r
-               }\r
-\r
-               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.menu.MenuBuilder;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.support.FusionService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.openecomp.portalapp.command.EPLoginBean;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+@Service("eploginService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class EPLoginServiceImpl extends FusionService implements EPLoginService {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPLoginServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       /*
+        * (non-Javadoc)
+        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUser(org.openecomp.portalapp.command.EPLoginBean, java.lang.String, java.util.HashMap)
+        */
+       @SuppressWarnings("rawtypes")
+       public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename, HashMap additionalParams)
+                       throws Exception {
+               return findUser(bean, menuPropertiesFilename, additionalParams, true);
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUser(org.openecomp.portalapp.command.EPLoginBean, java.lang.String, java.util.HashMap, boolean)
+        */
+       @SuppressWarnings("rawtypes")
+       public EPLoginBean findUser(EPLoginBean bean, String menuPropertiesFilename_ignored, HashMap additionalParams,
+                       boolean matchPassword) throws Exception {
+               EPUser user = null;
+               EPUser userCopy = null;
+
+               if (bean.getOrgUserId() != null) {
+                       user = (EPUser) findUser(bean);
+               } else {
+                       if (matchPassword)
+                               user = (EPUser) findUser(bean.getLoginId(), bean.getLoginPwd());
+                       else
+                               user = (EPUser) findUserWithoutPwd(bean.getLoginId());
+               }
+
+               // run this command to fetch more information from the lazily loaded
+               // object
+
+               // This is funny - commenting out the following method call
+               // 1. What are we doing with the returned values of the following two
+               // methods? Nothing.
+               // 2. Use a guest user scenario - user object will be null - clealry,
+               // NPE.
+               // 3. A check of if(user !=null) is made AFTER these bogus calls :) - If
+               // these calls WERE doing anything significat (which they are not),
+               // shouln't they have been moved inside that if check?
+
+               // user.getEPUserApps();
+
+               // Comments
+               // 1. This method is clearly doing more than 'getting roles' - Not a
+               // good name -
+               // 2. Also, there is no null check - guest user scenarios will break the
+               // code with NPE - added the check - Do not want to remove the call
+               // altogether - not sure how it will effect things.
+
+               if (user != null) {
+                       user.getEPRoles();
+
+                       // raise an error if the portal application is locked and the user
+                       // does not
+                       // have system administrator privileges
+                       if (AppUtils.isApplicationLocked()
+                                       && !EPUserUtils.hasRole(user, SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID))) {
+                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_APPLICATION_LOCKED);
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserAdminPrivilegesInfo, user.getLoginId());
+                       }
+
+                       // raise an error if the user is inactive
+                       if (!user.getActive()) {
+                               bean.setLoginErrorMessage(SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_INACTIVE);
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserInactiveWarning, user.getLoginId());
+                       }
+
+                       // only login the user if no errors have occurred
+                       if (bean.getLoginErrorMessage() == null) {
+
+                               // this will be a snapshot of the user's information as
+                               // retrieved from the database
+                               userCopy = (EPUser) user.clone();
+
+                               // update the last logged in date for the user
+                               user.setLastLoginDate(new Date());
+                               getDataAccessService().saveDomainObject(user, additionalParams);
+
+                               // create the application menu based on the user's privileges
+                               MenuBuilder menuBuilder = new MenuBuilder();
+                               Set appMenu = menuBuilder.getMenu(
+                                               SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_SET_NAME), dataAccessService);
+                               bean.setMenu(appMenu != null ? appMenu : new HashSet());
+                               Set businessDirectMenu = menuBuilder.getMenu(
+                                               SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_SET_NAME),
+                                               dataAccessService);
+                               bean.setBusinessDirectMenu(businessDirectMenu != null ? businessDirectMenu : new HashSet());
+
+                               bean.setUser(userCopy);
+                       }
+
+               } else {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUserMissingError, bean.getOrgUserId());
+               }
+
+               return bean;
+       }
+
+       /**
+        * Searches the fn_user table for a row that matches the specified login_id
+        * and login_pwd values.
+        * 
+        * @param loginId
+        * @param password
+        * @return EPUser object; null on error or if no match.
+        */
+       private EPUser findUser(String loginId, String password) {
+               List<?> list = null;
+
+               StringBuffer criteria = new StringBuffer();
+               criteria.append(" where login_id = '").append(loginId).append("'").append(" and login_pwd = '").append(password)
+                               .append("'");
+
+               try {
+                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "findUser(String) failed on " + loginId, e);
+               }
+
+               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.openecomp.portalapp.portal.service.EPLoginService#findUserWithoutPwd(java.lang.String)
+        */
+       @Override
+       public EPUser findUserWithoutPwd(String loginId) {
+               List<?> list = null;
+
+               StringBuffer criteria = new StringBuffer();
+               criteria.append(" where login_id = '").append(loginId).append("'");
+
+               try {
+                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       String message = "findUserWithoutPwd failed on " + loginId;
+                       logger.error(EELFLoggerDelegate.errorLogger, message, e);
+               }
+
+               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);
+       }
+
+       /**
+        * Searches the fn_user table for a row that matches the value of the bean's
+        * Organization User ID property.
+        * 
+        * @param bean
+        * @return EPUser object; null on error or if no match.
+        */
+       private EPUser findUser(EPLoginBean bean) {
+               List<?> list = null;
+
+               StringBuffer criteria = new StringBuffer();
+               criteria.append(" where orgUserId = '").append(bean.getOrgUserId()).append("'");
+
+               try {
+                       list = getDataAccessService().getList(EPUser.class, criteria.toString(), null, null);
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "findUser(EPLoginBean) failed", e);
+               }
+
+               return (list == null || list.size() == 0) ? null : (EPUser) list.get(0);
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+}
index 32dccbe..cec7dd6 100644 (file)
@@ -1,37 +1,37 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalsdk.core.domain.RoleFunction;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-\r
-\r
-public interface EPRoleService {\r
-       \r
-       // Used by ECOMP. Get cached role by two columns used by ECOMP only. app id, and external app role id.\r
-       EPRole getRole(Long appId, Long appRoleid);\r
-       public void saveRole(EPRole domainRole);\r
-       EPRole getAppRole(String roleName, Long appId);\r
-       public List<RoleFunction> getRoleFunctions();\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalapp.portal.domain.EPRole;
+
+
+public interface EPRoleService {
+       
+       // Used by ECOMP. Get cached role by two columns used by ECOMP only. app id, and external app role id.
+       EPRole getRole(Long appId, Long appRoleid);
+       public void saveRole(EPRole domainRole);
+       EPRole getAppRole(String roleName, Long appId);
+       public List<RoleFunction> getRoleFunctions();
+       
+       
+}
index d7661e9..e509fcf 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.HashMap;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-import java.util.TreeSet;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.domain.RoleFunction;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("epRoleService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class EPRoleServiceImpl implements EPRoleService{\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPRoleServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService  dataAccessService;\r
-       \r
-       @SuppressWarnings("unchecked")  \r
-       public List<RoleFunction> getRoleFunctions() {\r
-               //List msgDB = getDataAccessService().getList(Profile.class, null);\r
-               return getDataAccessService().getList(RoleFunction.class, null);\r
-       }\r
-       \r
-       @SuppressWarnings("unchecked")\r
-       public List<EPRole> getAvailableChildRoles(Long roleId) {\r
-               List<EPRole> availableChildRoles = (List<EPRole>)getDataAccessService().getList(EPRole.class,null);\r
-               if(roleId==null || roleId==0){\r
-                       return availableChildRoles;\r
-               }\r
-               \r
-               EPRole currentRole = (EPRole)getDataAccessService().getDomainObject(EPRole.class,roleId,null);\r
-               Set<EPRole> allParentRoles = new TreeSet<EPRole>();\r
-               allParentRoles = getAllParentRolesAsList(currentRole, allParentRoles);\r
-\r
-               \r
-               Iterator<EPRole> availableChildRolesIterator = availableChildRoles.iterator();\r
-               while (availableChildRolesIterator.hasNext()) {\r
-                       EPRole role = availableChildRolesIterator.next(); \r
-                       if(!role.getActive() || allParentRoles.contains(role) || role.getId().equals(roleId)){\r
-                               availableChildRolesIterator.remove();\r
-                       }\r
-               }\r
-               return availableChildRoles;\r
-       }\r
-       \r
-       private Set<EPRole> getAllParentRolesAsList(EPRole role, Set<EPRole> allParentRoles) {\r
-               Set<EPRole> parentRoles = role.getParentRoles();\r
-               allParentRoles.addAll(parentRoles);\r
-               Iterator<EPRole> parentRolesIterator = parentRoles.iterator();\r
-               while (parentRolesIterator.hasNext()) {\r
-                       getAllParentRolesAsList(parentRolesIterator.next(),allParentRoles);\r
-               }\r
-               return allParentRoles;\r
-       }\r
-       \r
-       public RoleFunction getRoleFunction(String code) {\r
-               return (RoleFunction)getDataAccessService().getDomainObject(RoleFunction.class, code, null);\r
-       }\r
-       \r
-       public void saveRoleFunction(RoleFunction domainRoleFunction) {\r
-               getDataAccessService().saveDomainObject(domainRoleFunction, null);\r
-       }\r
-       \r
-       public void deleteRoleFunction(RoleFunction domainRoleFunction) {\r
-               getDataAccessService().deleteDomainObject(domainRoleFunction, null);\r
-       }\r
-       \r
-       public EPRole getRole(Long id) {\r
-               return (EPRole)getDataAccessService().getDomainObject(EPRole.class, id, null);\r
-       }\r
-       \r
-       // TODO: refactor\r
-       private static final String getAppRoleSqlFormat ="SELECT * FROM fn_role where APP_ID = %s AND APP_ROLE_ID = %s";\r
-       \r
-       @SuppressWarnings("unchecked")\r
-       public EPRole getRole(Long appId, Long appRoleid) {\r
-               if(appId == null || appRoleid == null){\r
-                       logger.error(EELFLoggerDelegate.errorLogger, String.format("getRole does not support null appId or roleId. appRoleid=%s, appRoleid=%s", appId, appRoleid));\r
-                       return null;\r
-               }\r
-               \r
-               String sql = String.format(getAppRoleSqlFormat, appId, appRoleid);\r
-               \r
-               List<EPRole> roles = (List<EPRole>)dataAccessService.executeSQLQuery(sql, EPRole.class, null);\r
-               int resultsCount = roles.size();\r
-               if(resultsCount > 1){\r
-                       logger.error(EELFLoggerDelegate.errorLogger, String.format("search by appId=%s, appRoleid=%s should have returned 0 or 1 results. Got %d. This is an internal server error.", appId, appRoleid, resultsCount));\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar.");\r
-                       return roles.get(0);\r
-               } else if(resultsCount == 1){\r
-                       return roles.get(0);\r
-               }\r
-               return null;\r
-       }\r
-               \r
-       @SuppressWarnings("unchecked")\r
-       public EPRole getAppRole(String roleName, Long appId) {\r
-                       \r
-               final Map<String, String> params = new HashMap<String, String>();\r
-               params.put("appId", appId.toString());\r
-               params.put("roleName", roleName);\r
-               \r
-               List<EPRole> roles = (List<EPRole>)dataAccessService.executeNamedQuery("getAppRoles", params, null);\r
-               int resultsCount = roles.size();\r
-               if(resultsCount > 1){\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar.");\r
-                       return roles.get(0);\r
-               } else if(resultsCount == 1){\r
-                       return roles.get(0);\r
-               }\r
-               return null;\r
-       }\r
-       \r
-       \r
-       public void saveRole(EPRole domainRole) {\r
-               getDataAccessService().saveDomainObject(domainRole, null);\r
-       }\r
-       \r
-       public void deleteRole(EPRole domainRole) {\r
-               getDataAccessService().deleteDomainObject(domainRole, null);\r
-       }\r
-       \r
-       @SuppressWarnings("unchecked")\r
-       public List<EPRole> getAvailableRoles() {\r
-               return getDataAccessService().getList(EPRole.class, null);\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-}\r
-\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+
+@Service("epRoleService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class EPRoleServiceImpl implements EPRoleService {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPRoleServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @SuppressWarnings("unchecked")
+       public List<RoleFunction> getRoleFunctions() {
+               // List msgDB = getDataAccessService().getList(Profile.class, null);
+               return getDataAccessService().getList(RoleFunction.class, null);
+       }
+
+       @SuppressWarnings("unchecked")
+       public List<EPRole> getAvailableChildRoles(Long roleId) {
+               List<EPRole> availableChildRoles = (List<EPRole>) getDataAccessService().getList(EPRole.class, null);
+               if (roleId == null || roleId == 0) {
+                       return availableChildRoles;
+               }
+
+               EPRole currentRole = (EPRole) getDataAccessService().getDomainObject(EPRole.class, roleId, null);
+               Set<EPRole> allParentRoles = new TreeSet<EPRole>();
+               allParentRoles = getAllParentRolesAsList(currentRole, allParentRoles);
+
+               Iterator<EPRole> availableChildRolesIterator = availableChildRoles.iterator();
+               while (availableChildRolesIterator.hasNext()) {
+                       EPRole role = availableChildRolesIterator.next();
+                       if (!role.getActive() || allParentRoles.contains(role) || role.getId().equals(roleId)) {
+                               availableChildRolesIterator.remove();
+                       }
+               }
+               return availableChildRoles;
+       }
+
+       private Set<EPRole> getAllParentRolesAsList(EPRole role, Set<EPRole> allParentRoles) {
+               Set<EPRole> parentRoles = role.getParentRoles();
+               allParentRoles.addAll(parentRoles);
+               Iterator<EPRole> parentRolesIterator = parentRoles.iterator();
+               while (parentRolesIterator.hasNext()) {
+                       getAllParentRolesAsList(parentRolesIterator.next(), allParentRoles);
+               }
+               return allParentRoles;
+       }
+
+       public RoleFunction getRoleFunction(String code) {
+               return (RoleFunction) getDataAccessService().getDomainObject(RoleFunction.class, code, null);
+       }
+
+       public void saveRoleFunction(RoleFunction domainRoleFunction) {
+               getDataAccessService().saveDomainObject(domainRoleFunction, null);
+       }
+
+       public void deleteRoleFunction(RoleFunction domainRoleFunction) {
+               getDataAccessService().deleteDomainObject(domainRoleFunction, null);
+       }
+
+       public EPRole getRole(Long id) {
+               return (EPRole) getDataAccessService().getDomainObject(EPRole.class, id, null);
+       }
+
+       // TODO: refactor
+       private static final String getAppRoleSqlFormat = "SELECT * FROM fn_role where APP_ID = %s AND APP_ROLE_ID = %s";
+
+       @SuppressWarnings("unchecked")
+       public EPRole getRole(Long appId, Long appRoleid) {
+               if (appId == null || appRoleid == null) {
+                       logger.error(EELFLoggerDelegate.errorLogger, String.format(
+                                       "getRole does not support null appId or roleId. appRoleid=%s, appRoleid=%s", appId, appRoleid));
+                       return null;
+               }
+
+               String sql = String.format(getAppRoleSqlFormat, appId, appRoleid);
+
+               List<EPRole> roles = (List<EPRole>) dataAccessService.executeSQLQuery(sql, EPRole.class, null);
+               int resultsCount = roles.size();
+               if (resultsCount > 1) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       String.format(
+                                                       "search by appId=%s, appRoleid=%s should have returned 0 or 1 results. Got %d. This is an internal server error.",
+                                                       appId, appRoleid, resultsCount));
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar.");
+                       return roles.get(0);
+               } else if (resultsCount == 1) {
+                       return roles.get(0);
+               }
+               return null;
+       }
+
+       @SuppressWarnings("unchecked")
+       public EPRole getAppRole(String roleName, Long appId) {
+
+               final Map<String, String> params = new HashMap<String, String>();
+               final Map<String, String> portalParams = new HashMap<String, String>();
+               List<EPRole> roles = null;
+               params.put("appId", appId.toString());
+               params.put("roleName", roleName);
+               portalParams.put("appRoleName", roleName);
+               if (appId == 1 || roleName.equals(PortalConstants.ADMIN_ROLE)) {
+                       roles = (List<EPRole>) dataAccessService.executeNamedQuery("getPortalAppRoles", portalParams, null);
+               } else if (appId != 1 && !roleName.equals(PortalConstants.ADMIN_ROLE)) {
+                       roles = (List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", params, null);
+               }
+               int resultsCount = roles.size();
+               if (resultsCount > 1) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar.");
+                       return roles.get(0);
+               } else if (resultsCount == 1) {
+                       return roles.get(0);
+               }
+               return null;
+       }
+
+       public void saveRole(EPRole domainRole) {
+               getDataAccessService().saveDomainObject(domainRole, null);
+       }
+
+       public void deleteRole(EPRole domainRole) {
+               getDataAccessService().deleteDomainObject(domainRole, null);
+       }
+
+       @SuppressWarnings("unchecked")
+       public List<EPRole> getAvailableRoles() {
+               return getDataAccessService().getList(EPRole.class, null);
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+}
index 0fa790c..c9aac85 100644 (file)
@@ -1,58 +1,58 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;\r
-\r
-public interface FunctionalMenuService {\r
-       List<FunctionalMenuItem> getFunctionalMenuItems (EPUser user);\r
-       // return all active menu items\r
-       List<FunctionalMenuItem> getFunctionalMenuItems ();\r
-       // return all active menu items. If all is true, return all active and inactive menu items.\r
-       List<FunctionalMenuItem> getFunctionalMenuItems(Boolean all);\r
-       // return all active Functional menu items for Notification Tree in User Notification . If all is true, return all active menu items.\r
-       List<FunctionalMenuItem> getFunctionalMenuItemsForNotificationTree(Boolean all);\r
-       List<FunctionalMenuItem> getFunctionalMenuItemsForApp (Integer appId);\r
-       List<FunctionalMenuItem> getFunctionalMenuItemsForUser (String orgUserId);\r
-       FunctionalMenuItem getFunctionalMenuItemDetails (Integer menuid);\r
-       FieldsValidator createFunctionalMenuItem (FunctionalMenuItemWithRoles menuItemJson);\r
-       FieldsValidator editFunctionalMenuItem (FunctionalMenuItemWithRoles menuItemJson);\r
-       FieldsValidator deleteFunctionalMenuItem (Long menuId);\r
-       FieldsValidator regenerateAncestorTable ();\r
-       //Methods relevant to favorites\r
-       FieldsValidator setFavoriteItem(FavoritesFunctionalMenuItem menuItemJson);\r
-       List<FavoritesFunctionalMenuItemJson> getFavoriteItems(Long userId);\r
-       FieldsValidator removeFavoriteItem (Long userId, Long menuId);\r
-       List<FunctionalMenuItem> transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(List<FunctionalMenuItemWithAppID> functionalMenuItemWithAppIDList);\r
-       List<FunctionalMenuRole> getFunctionalMenuRole();\r
-       //Assign URLs under Help Menu\r
-       void assignHelpURLs(List<FunctionalMenuItem> menuItems);\r
-       List<BusinessCardApplicationRole> getUserAppRolesList(String userId);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+
+public interface FunctionalMenuService {
+       List<FunctionalMenuItem> getFunctionalMenuItems (EPUser user);
+       // return all active menu items
+       List<FunctionalMenuItem> getFunctionalMenuItems ();
+       // return all active menu items. If all is true, return all active and inactive menu items.
+       List<FunctionalMenuItem> getFunctionalMenuItems(Boolean all);
+       // return all active Functional menu items for Notification Tree in User Notification . If all is true, return all active menu items.
+       List<FunctionalMenuItem> getFunctionalMenuItemsForNotificationTree(Boolean all);
+       List<FunctionalMenuItem> getFunctionalMenuItemsForApp (Integer appId);
+       List<FunctionalMenuItem> getFunctionalMenuItemsForUser (String orgUserId);
+       FunctionalMenuItem getFunctionalMenuItemDetails (Integer menuid);
+       FieldsValidator createFunctionalMenuItem (FunctionalMenuItemWithRoles menuItemJson);
+       FieldsValidator editFunctionalMenuItem (FunctionalMenuItemWithRoles menuItemJson);
+       FieldsValidator deleteFunctionalMenuItem (Long menuId);
+       FieldsValidator regenerateAncestorTable ();
+       //Methods relevant to favorites
+       FieldsValidator setFavoriteItem(FavoritesFunctionalMenuItem menuItemJson);
+       List<FavoritesFunctionalMenuItemJson> getFavoriteItems(Long userId);
+       FieldsValidator removeFavoriteItem (Long userId, Long menuId);
+       List<FunctionalMenuItem> transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(List<FunctionalMenuItemWithAppID> functionalMenuItemWithAppIDList);
+       List<FunctionalMenuRole> getFunctionalMenuRole();
+       //Assign URLs under Help Menu
+       void assignHelpURLs(List<FunctionalMenuItem> menuItems);
+       List<BusinessCardApplicationRole> getUserAppRolesList(String userId);
+}
index a6a1120..6a71bc7 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import javax.annotation.PostConstruct;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.lang3.StringUtils;\r
-import org.hibernate.Criteria;\r
-import org.hibernate.Query;\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.hibernate.criterion.Projections;\r
-import org.hibernate.criterion.Restrictions;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;\r
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Service("functionalMenuService")\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class FunctionalMenuServiceImpl implements FunctionalMenuService {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuServiceImpl.class);\r
-\r
-       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;\r
-       private String RESTRICTED_APP_ROLE_ID = "900";\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-\r
-       @PostConstruct\r
-       private void init() {\r
-               try {\r
-                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));\r
-                       RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.RESTRICTED_APP_ROLE_ID);\r
-               } catch(Exception e) {\r
-               }\r
-       }\r
-       \r
-       public List<FunctionalMenuItem> getFunctionalMenuItems(EPUser user) {\r
-               List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();\r
-               return menuItems;\r
-       }\r
-\r
-       public List<FunctionalMenuItem> getFunctionalMenuItems() {\r
-               return getFunctionalMenuItems(false);\r
-       }\r
-       \r
-       public List<FunctionalMenuItem> getFunctionalMenuItems(Boolean all) {\r
-               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,\r
-               // and one that returns all the other menu items. Then we can easily add the boolean flag\r
-               // restrictedApp to each FunctionalMenuItem, to be used by the front end.\r
-               String activeWhereClause = "";\r
-               if (! all) {\r
-                       activeWhereClause = " AND UPPER(m.active_yn) = 'Y' ";\r
-               }\r
-               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "\r
-                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "\r
-                               + "WHERE m.menu_id = r.menu_id "\r
-                               + activeWhereClause //" AND UPPER(m.active_yn) = 'Y' "\r
-                               + " AND r.role_id != '" + RESTRICTED_APP_ROLE_ID + "' "\r
-                       + " UNION "\r
-                       + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id "\r
-                               + " FROM fn_menu_functional m "\r
-                               + " WHERE m.url='' "\r
-                               + activeWhereClause; //" AND UPPER(m.active_yn) = 'Y' ";\r
-               logQuery(sql);\r
-\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItemWithAppID> menuItemsWithAppIdList = dataAccessService.executeSQLQuery(sql,FunctionalMenuItemWithAppID.class, null);\r
-               List<FunctionalMenuItem> menuItems = new ArrayList<>(); \r
-               menuItems = transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(menuItemsWithAppIdList);\r
-               for (FunctionalMenuItem menuItem : menuItems) {\r
-                       menuItem.restrictedApp = false;\r
-               }\r
-               \r
-               sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "\r
-                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "\r
-                               + "WHERE m.menu_id = r.menu_id "\r
-                               + activeWhereClause //" AND UPPER(m.active_yn) = 'Y' "\r
-                               + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               for (FunctionalMenuItem menuItem : menuItems2) {\r
-                       menuItem.restrictedApp = true;\r
-                       menuItems.add(menuItem);\r
-               }\r
-               \r
-               return menuItems;\r
-       }\r
-\r
-       \r
-       public List<FunctionalMenuItem> getFunctionalMenuItemsForNotificationTree(Boolean all) {\r
-               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,\r
-               // and one that returns all the other menu items which are active. Then we can easily add the boolean flag\r
-               // restrictedApp to each FunctionalMenuItem, to be used by the front end.\r
-               String activeWhereClause = "";\r
-               if (! all) {\r
-                       activeWhereClause = " AND UPPER(m.active_yn) = 'Y' ";\r
-               }\r
-               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "\r
-                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "\r
-                               + "WHERE m.menu_id = r.menu_id "\r
-                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' "\r
-                               + " AND r.role_id != '" + RESTRICTED_APP_ROLE_ID + "' "\r
-                       + " UNION "\r
-                       + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id "\r
-                               + " FROM fn_menu_functional m "\r
-                               + " WHERE m.url='' "\r
-                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' ";\r
-               logQuery(sql);\r
-\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItemWithAppID> menuItemsWithAppIdList = dataAccessService.executeSQLQuery(sql,FunctionalMenuItemWithAppID.class, null);\r
-               List<FunctionalMenuItem> menuItems = new ArrayList<>(); \r
-               menuItems = transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(menuItemsWithAppIdList);\r
-               for (FunctionalMenuItem menuItem : menuItems) {\r
-                       menuItem.restrictedApp = false;\r
-               }\r
-               \r
-               sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "\r
-                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "\r
-                               + "WHERE m.menu_id = r.menu_id "\r
-                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' "\r
-                               + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               for (FunctionalMenuItem menuItem : menuItems2) {\r
-                       menuItem.restrictedApp = true;\r
-                       menuItems.add(menuItem);\r
-               }\r
-               \r
-               return menuItems;\r
-       }\r
-\r
-       public List<FunctionalMenuItem> getFunctionalMenuItemsForApp(Integer appId) {\r
-               String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "\r
-                               + " FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr "\r
-                               + " WHERE " + " mr.app_id='" + appId + "' " + " AND mr.menu_id = m.menu_id " + " AND UPPER(m.active_yn) = 'Y'"\r
-                               + " AND UPPER(m1.active_yn) ='Y'" + " AND a.menu_id = m.menu_id " + " AND a.ancestor_menu_id = m1.menu_id";\r
-               logQuery(sql);\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuItemsForApp: logged the query");\r
-\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               \r
-               return menuItems;\r
-       }\r
-       /**\r
-        * convert List of FunctionalMenuItemWithAppID into List of FunctionalMenuItem\r
-        * \r
-        */\r
-       public List<FunctionalMenuItem> transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(List<FunctionalMenuItemWithAppID> functionalMenuItemWithAppIDList) {\r
-               List<FunctionalMenuItem> functionalMenuItemList = new ArrayList<FunctionalMenuItem>();\r
-               for (FunctionalMenuItemWithAppID functionalMenuItemWithAppID : functionalMenuItemWithAppIDList) {\r
-                       FunctionalMenuItem menuItem = new FunctionalMenuItem();\r
-                       menuItem.menuId=functionalMenuItemWithAppID.menuId;\r
-                       menuItem.column=functionalMenuItemWithAppID.column;\r
-                       menuItem.text=functionalMenuItemWithAppID.text;\r
-                       menuItem.parentMenuId=functionalMenuItemWithAppID.parentMenuId;\r
-                       menuItem.url=functionalMenuItemWithAppID.url;\r
-                       menuItem.active_yn=functionalMenuItemWithAppID.active_yn;\r
-                       menuItem.appid=functionalMenuItemWithAppID.appid;\r
-                       menuItem.setRoles(functionalMenuItemWithAppID.roles);\r
-                       menuItem.restrictedApp=functionalMenuItemWithAppID.restrictedApp;\r
-                       functionalMenuItemList.add(menuItem);\r
-               }\r
-               return functionalMenuItemList;\r
-       }\r
-       \r
-       public List<FunctionalMenuItem> getFunctionalMenuItemsForUser(String orgUserId) {\r
-               // m represents the functional menu items that are the leaf nodes\r
-               // m1 represents the functional menu items for all the nodes\r
-\r
-               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,\r
-               // and one that returns all the other menu items. Then we can easily add the boolean flag\r
-               // restrictedApp to each FunctionalMenuItem, to be used by the front end.\r
-               String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "\r
-                               + " FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, "\r
-                               + " fn_menu_functional_roles mr, fn_user u , fn_user_role ur " + " WHERE " + " u.org_user_id='" + orgUserId\r
-                               + "' " + " AND u.user_id = ur.user_id " + " AND ur.app_id = mr.app_id " +\r
-                               // " AND ur.role_id = mr.role_id " +\r
-                               " AND (ur.role_id = mr.role_id " + "     OR ur.role_id = '" + ACCOUNT_ADMIN_ROLE_ID + "') "\r
-                               + " AND m.menu_id = mr.menu_id " + " AND UPPER(m.active_yn) = 'Y'" + " AND UPPER(m1.active_yn) ='Y' "\r
-                               + " AND a.menu_id = m.menu_id " + " AND a.ancestor_menu_id = m1.menu_id "\r
-                               + " UNION "\r
-                               // the ancestors of the restricted app menu items\r
-                               + " select m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m1.active_yn "\r
-                               + " FROM fn_menu_functional m, fn_menu_functional_roles mr, fn_menu_functional m1, "\r
-                               + " fn_menu_functional_ancestors a "\r
-                               + " where a.menu_id = m.menu_id "\r
-                               + " AND a.ancestor_menu_id = m1.menu_id "\r
-                               + " AND m.menu_id != m1.menu_id "\r
-                               + " AND m.menu_id = mr.menu_id "\r
-                               + " AND mr.role_id = '" + RESTRICTED_APP_ROLE_ID + "' "\r
-                               + " AND UPPER(m.active_yn) = 'Y'" + " AND UPPER(m1.active_yn) ='Y' "\r
-                               // Add the Favorites menu item\r
-                               + " UNION "\r
-                               + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "\r
-                               + " FROM fn_menu_functional m "\r
-                               + " WHERE m.text in ('Favorites','Get Access','Contact Us','Support','User Guide','Help')";\r
-               \r
-               logQuery(sql);\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuItemsForUser: logged the query");\r
-\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               for (FunctionalMenuItem menuItem : menuItems) {\r
-                       menuItem.restrictedApp = false;\r
-               }\r
-               \r
-               sql = " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "\r
-                       + " FROM fn_menu_functional m, fn_menu_functional_roles r "\r
-                       + " WHERE m.menu_id = r.menu_id "\r
-                       + " AND UPPER(m.active_yn) = 'Y' "\r
-                       + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               for (FunctionalMenuItem menuItem : menuItems2) {\r
-                       menuItem.restrictedApp = true;\r
-                       menuItems.add(menuItem);\r
-               }\r
-               \r
-               return menuItems;\r
-       }\r
-\r
-       public FunctionalMenuItem getFunctionalMenuItemDetails(Integer menuid) {\r
-               // First, fill in the fields that apply to all menu items\r
-\r
-               String sql = "SELECT * FROM fn_menu_functional WHERE menu_id = '" + menuid + "'";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);\r
-               FunctionalMenuItem menuItem = (menuItems == null || menuItems.isEmpty() ? null : menuItems.get(0));\r
-               // If it is a bottom-level menu item, must fill in the appid and the\r
-               // roles\r
-               sql = "SELECT * FROM fn_menu_functional_roles WHERE menu_id = '" + menuid + "'";\r
-               logQuery(sql);\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuRole> roleItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuRole.class, null);\r
-               if (roleItems.size() > 0) {\r
-                       Integer appid = roleItems.get(0).appId;\r
-                       menuItem.appid = appid;\r
-                       List<Integer> roles = new ArrayList<Integer>();\r
-                       for (FunctionalMenuRole roleItem : roleItems) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: app_id: " + roleItem.appId + "; role_id: " + roleItem.roleId + "\n");\r
-                               roles.add(roleItem.roleId);\r
-                       }\r
-                       menuItem.setRoles(roles);\r
-               }\r
-               \r
-               return menuItem;\r
-       }\r
-\r
-       private FieldsValidator menuItemFieldsChecker(FunctionalMenuItemWithRoles menuItemJson) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               try {\r
-                       // TODO: validate all the fields\r
-                       @SuppressWarnings("unchecked")\r
-                       List<FunctionalMenuItem> functionalMenuItems = dataAccessService.getList(FunctionalMenuItem.class,\r
-                                       " where text = '" + menuItemJson.text + "'", null, null);\r
-                       \r
-                       boolean dublicatedName = false;\r
-                       for (FunctionalMenuItem fnMenuItem : functionalMenuItems) {\r
-                               if (menuItemJson.menuId != null && menuItemJson.menuId.equals(fnMenuItem.menuId)) {\r
-                                       // FunctionalMenuItem should not be compared with itself\r
-                                       continue;\r
-                               }\r
-\r
-                               if (!dublicatedName && fnMenuItem.text.equalsIgnoreCase(menuItemJson.text)) {\r
-                                       dublicatedName = true;\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if (dublicatedName) {\r
-                               fieldsValidator.addProblematicFieldName("text");\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);\r
-                               fieldsValidator.errorCode = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we have an duplicate text field");\r
-                       } else if (StringUtils.isEmpty(menuItemJson.text) && menuItemJson.menuId == null) { \r
-                               // text must be non empty for a create. For an edit, can be empty, which means it is a move request.\r
-                               // a null menuId indicates a create.\r
-                               fieldsValidator.addProblematicFieldName("text");\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we have an empty text field");\r
-                       } else {\r
-                               // The url, appid, and roles must either be all filled or all empty.\r
-                               Boolean urlIsEmpty = StringUtils.isEmpty(menuItemJson.url);\r
-                               Boolean rolesIsEmpty = menuItemJson.getRoles() == null || menuItemJson.getRoles().isEmpty();\r
-                               Boolean appidIsEmpty = menuItemJson.appid == null || menuItemJson.appid == 0;\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: menuItemfieldsChecker: urlIsEmpty: " + urlIsEmpty + "; rolesIsEmpty: " + rolesIsEmpty + "; appidIsEmpty: " + appidIsEmpty +"\n");\r
-                               if (!((urlIsEmpty && rolesIsEmpty && appidIsEmpty) || (!urlIsEmpty && !rolesIsEmpty && !appidIsEmpty)))\r
-                               {\r
-                                       fieldsValidator.addProblematicFieldName("url,roles,appid");\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we don't have: either all 3 fields empty or all 3 fields nonempty");\r
-                               } else {\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Success: either all 3 fields empty or all 3 fields nonempty");\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while validating the FunctionalMenuItems. Details: " + EcompPortalUtils.getStackTrace(e));\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               \r
-               return fieldsValidator;\r
-       }\r
-       \r
-       // Turn foreign key checks on or off\r
-       protected void setForeignKeys(Session localSession, Boolean on) {\r
-               String keyCheck = "0";\r
-               if (on) {\r
-                       keyCheck = "1";\r
-               }\r
-               String sql = "set FOREIGN_KEY_CHECKS="+keyCheck;\r
-               logQuery(sql);\r
-               Query query = localSession.createSQLQuery(sql);\r
-               query.executeUpdate();\r
-       }\r
-\r
-       public FieldsValidator createFunctionalMenuItem(FunctionalMenuItemWithRoles menuItemJson) {\r
-               FieldsValidator fieldsValidator = menuItemFieldsChecker(menuItemJson);\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: test 1");\r
-                       boolean result = false;\r
-                       Session localSession = null;\r
-                       Transaction transaction = null;\r
-                       try {\r
-                               FunctionalMenuItem menuItem = new FunctionalMenuItem();\r
-                               menuItem.appid = menuItemJson.appid;\r
-                               menuItem.setRoles(menuItemJson.getRoles());\r
-                               menuItem.url = menuItemJson.url;\r
-                               menuItem.text = menuItemJson.text;\r
-                               menuItem.parentMenuId = menuItemJson.parentMenuId;\r
-                               menuItem.active_yn = "Y";\r
-                               localSession = sessionFactory.openSession();\r
-                               \r
-                               // If the app is disabled, deactivate the menu item.\r
-                               if (menuItemJson.appid != null) {\r
-                                       Long appidLong = Long.valueOf(menuItemJson.appid);\r
-                                       EPApp app = (EPApp) localSession.get(EPApp.class, appidLong);\r
-                                       if (app != null && ! app.getEnabled()) {\r
-                                               menuItem.active_yn = "N";\r
-                                       }\r
-                               }\r
-\r
-                               // Set the column number to 1 higher than the highest column\r
-                               // number under this parent.\r
-                               Criteria criteria = localSession.createCriteria(FunctionalMenuItem.class);\r
-                               criteria.setProjection(Projections.max("column"));\r
-                               criteria.add(Restrictions.eq("parentMenuId", menuItem.parentMenuId));\r
-                               Integer maxColumn = (Integer) criteria.uniqueResult();\r
-                               if (maxColumn == null) {\r
-                                       maxColumn = 0;\r
-                               }\r
-                               menuItem.column = maxColumn + 1;\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "about to create menu item: " + menuItem.toString());\r
-\r
-                               transaction = localSession.beginTransaction();\r
-                               // localSession.saveOrUpdate(newMenuItem);\r
-                               localSession.save(menuItem);\r
-                               Long menuid = menuItem.menuId;\r
-                               menuItemJson.menuId = menuid;\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "after saving menu object, new id: " + menuid);\r
-\r
-                               // Next, save all the roles\r
-\r
-                               addRoles(menuItemJson, localSession);\r
-                               transaction.commit();\r
-                               result = true;\r
-                       } catch (Exception e) {\r
-                               EcompPortalUtils.rollbackTransaction(transaction, \r
-                                               "createFunctionalMenuItem rollback, exception = " + e);\r
-                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                       } finally {\r
-                               EcompPortalUtils.closeLocalSession(localSession, "createFunctionalMenuItem");\r
-                       }\r
-                       if (result) {\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: no result. setting httpStatusCode to "\r
-                                               + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       }\r
-               } else {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "FunctionalMenuServiceImpl.createFunctionalMenuItem: bad request");\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       /* Add all the roles in the menu item to the database */\r
-       public void addRoles(FunctionalMenuItemWithRoles menuItemJson, Session localSession) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "entering addRoles.");\r
-               List<Integer> roles = menuItemJson.getRoles();\r
-               if (roles != null && roles.size() > 0) {\r
-                       Integer appid = menuItemJson.appid;\r
-                       Long menuid = menuItemJson.menuId;\r
-                       for (Integer roleid : roles) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "about to create record for role: " + roleid);\r
-                               FunctionalMenuRole role = new FunctionalMenuRole();\r
-                               role.appId = appid;\r
-                               role.menuId = menuid;\r
-                               role.roleId = roleid;\r
-                               localSession.save(role);\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "after saving role menu object, new id: " + role.id);\r
-                       }\r
-               }\r
-       }\r
-\r
-       /* Delete all the roles associated with the menu item from the database */\r
-       public void deleteRoles(Long menuId) {\r
-               dataAccessService.deleteDomainObjects(FunctionalMenuRole.class, "menu_id='" + menuId + "'", null);\r
-       }\r
-\r
-       /* Delete all favorites associated with the menu item from the database */\r
-       public void deleteFavorites(Long menuId) {\r
-               dataAccessService.deleteDomainObjects(FavoritesFunctionalMenuItem.class, "menu_id='" + menuId + "'", null);\r
-       }\r
-       \r
-       private Boolean parentMenuIdEqual(Integer menuId1, Integer menuId2) {\r
-               return ((menuId1 == null && menuId2 == null) || (menuId1 != null && menuId1.equals(menuId2)));\r
-       }\r
-\r
-       private void updateColumnForSiblings(Session localSession, Long menuId, Integer oldParentMenuId,\r
-                       Integer newParentMenuId, Integer oldColumn, Integer newColumn) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "entering updateColumnForSiblings");\r
-               Criteria criteria = localSession.createCriteria(FunctionalMenuItem.class);\r
-               criteria.add(Restrictions.ne("menuId", menuId));\r
-               if (parentMenuIdEqual(oldParentMenuId, newParentMenuId)) {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under the same parent");\r
-                       // We are moving to a new position under the same parent\r
-                       if (newParentMenuId == null) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is null, so using isNull");\r
-                               criteria.add(Restrictions.isNull("parentMenuId"));\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is NOT null, so using eq");\r
-                               criteria.add(Restrictions.eq("parentMenuId", newParentMenuId));\r
-                       }\r
-                       if (oldColumn > newColumn) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "moving to a lower column under the same parent");\r
-                               // We are moving to a lower column under the same parent\r
-                               criteria.add(Restrictions.ge("column", newColumn));\r
-                               criteria.add(Restrictions.lt("column", oldColumn));\r
-                               @SuppressWarnings("unchecked")\r
-                               List<FunctionalMenuItem> menuItems = criteria.list();\r
-                               for (FunctionalMenuItem menuItem : menuItems) {\r
-                                       menuItem.column += 1;\r
-                                       localSession.save(menuItem);\r
-                               }\r
-                       } else if (oldColumn < newColumn) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "moving to a higher column under the same parent");\r
-                               // We are moving to a higher column under the same parent\r
-                               criteria.add(Restrictions.gt("column", oldColumn));\r
-                               criteria.add(Restrictions.le("column", newColumn));\r
-                               @SuppressWarnings("unchecked")\r
-                               List<FunctionalMenuItem> menuItems = criteria.list();\r
-                               for (FunctionalMenuItem menuItem : menuItems) {\r
-                                       menuItem.column -= 1;\r
-                                       localSession.save(menuItem);\r
-                               }\r
-                       } else {\r
-                               // No info has changed\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "no info has changed, so we are not moving");\r
-                       }\r
-               } else {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under a new parent");\r
-                       // We are moving under a new parent.\r
-\r
-                       // Adjust the children under the old parent\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "about to adjust the children under the old parent");\r
-\r
-                       // If the parentId is null, must check for its children differently\r
-                       if (oldParentMenuId == null) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "oldParentMenuId is null, so using isNull");\r
-                               criteria.add(Restrictions.isNull("parentMenuId"));\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "oldParentMenuId is NOT null, so using eq");\r
-                               criteria.add(Restrictions.eq("parentMenuId", oldParentMenuId));\r
-                       }\r
-\r
-                       criteria.add(Restrictions.gt("column", oldColumn));\r
-                       @SuppressWarnings("unchecked")\r
-                       List<FunctionalMenuItem> menuItems1 = criteria.list();\r
-                       for (FunctionalMenuItem menuItem : menuItems1) {\r
-                               menuItem.column -= 1;\r
-                               localSession.save(menuItem);\r
-                       }\r
-                       // Adjust the children under the new parent.\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "about to adjust the children under the new parent");\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "get all menu items where menuId!=" + menuId + "; parentMenuId==" + newParentMenuId\r
-                                       + "; column>=" + newColumn);\r
-                       criteria = localSession.createCriteria(FunctionalMenuItem.class);\r
-                       criteria.add(Restrictions.ne("menuId", menuId));\r
-                       if (newParentMenuId == null) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is null, so using isNull");\r
-                               criteria.add(Restrictions.isNull("parentMenuId"));\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is NOT null, so using eq");\r
-                               criteria.add(Restrictions.eq("parentMenuId", newParentMenuId));\r
-                       }\r
-\r
-                       criteria.add(Restrictions.ge("column", newColumn));\r
-                       @SuppressWarnings("unchecked")\r
-                       List<FunctionalMenuItem> menuItems2 = criteria.list();\r
-                       if (menuItems2 != null) {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "found " + menuItems2.size() + " menu items");\r
-                       } else {\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "found null menu items");\r
-                       }\r
-                       for (FunctionalMenuItem menuItem : menuItems2) {\r
-                               menuItem.column += 1;\r
-                               localSession.save(menuItem);\r
-                       }\r
-               }\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "done with updateColumnForSiblings");\r
-       }\r
-\r
-       public void removeAppInfo(Session localSession, Long menuId) {\r
-               // Remove the url, role, and app info from a menu item\r
-               FunctionalMenuItem menuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class, menuId);\r
-               menuItem.url = "";\r
-               deleteRoles(menuId);\r
-       }\r
-\r
-       public FieldsValidator editFunctionalMenuItem(FunctionalMenuItemWithRoles menuItemJson) {\r
-               boolean result                  = false;\r
-               Session localSession    = null;\r
-               Transaction transaction = null;\r
-               Long menuId                     = menuItemJson.menuId;\r
-\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "LR: editFunctionalMenuItem: test 1");\r
-               FieldsValidator fieldsValidator = menuItemFieldsChecker(menuItemJson);\r
-               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                       // TODO: make sure menuId is here. And, it might not already exist\r
-                       // in db table.\r
-                       if (menuId == null) {\r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "FunctionalMenuServiceImpl.editFunctionalMenuItem: bad request");\r
-                       } else {\r
-                               // To simplify the code, assume we will have a transaction\r
-                               try {\r
-                                       localSession = sessionFactory.openSession();\r
-                                       transaction = localSession.beginTransaction();\r
-\r
-                                       // Get the existing info associated with menuItem from the DB\r
-                                       FunctionalMenuItem menuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class, menuId);\r
-                                       Integer oldColumn = menuItem.column;\r
-                                       Integer oldParentMenuId = menuItem.parentMenuId;\r
-                                       Integer newColumn = menuItemJson.column;\r
-                                       Integer newParentMenuId = menuItemJson.parentMenuId;\r
-\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "prev info: column: " + oldColumn + "; parentMenuId: " + oldParentMenuId);\r
-\r
-                                       if (menuItemJson.appid != null && menuItemJson.getRoles() != null && !menuItemJson.getRoles().isEmpty()\r
-                                                       && menuItemJson.url != null && !menuItemJson.url.isEmpty() && menuItemJson.text != null\r
-                                                       && !menuItemJson.text.isEmpty()) {\r
-                                               // Scenario: appid, roles, url and text are all non-null.\r
-                                               // This menu item is associated with an app.\r
-                                               // (Note: this should only occur for a bottom-level menu\r
-                                               // item with no children.)\r
-                                               // 1) Remove all the records from fn_menu_functional_role\r
-                                               // for this menuId.\r
-                                               // 2) Add records to the fn_menu_function_role table for the\r
-                                               // appId and each roleId\r
-                                               // 3) Update the url and text for this menu item.\r
-\r
-                                               // Because of foreign key constraints, delete the roles,\r
-                                               // then update the menuItem then add the roles.\r
-                                               deleteRoles(menuId);\r
-                                               // Assumption: this is not a Move, so don't change the\r
-                                               // parentMenuId and column.\r
-                                               menuItem.appid = menuItemJson.appid;\r
-                                               menuItem.setRoles(menuItemJson.getRoles());\r
-                                               menuItem.url = menuItemJson.url;\r
-                                               menuItem.text = menuItemJson.text;\r
-                                               \r
-                                               // If the app is disabled, deactivate the menu item.\r
-                                               Long appidLong = Long.valueOf(menuItemJson.appid);\r
-                                               EPApp app = (EPApp) localSession.get(EPApp.class, appidLong);\r
-                                               if (app != null && ! app.getEnabled()) {\r
-                                                       menuItem.active_yn = "N";\r
-                                               } else {\r
-                                                       menuItem.active_yn = "Y";\r
-                                               }\r
-\r
-\r
-                                               localSession.update(menuItem);\r
-                                               addRoles(menuItemJson, localSession);\r
-\r
-                                       } else if (menuItemJson.appid == null && (menuItemJson.getRoles() == null || menuItemJson.getRoles().isEmpty())\r
-                                                       && (menuItemJson.url == null || menuItemJson.url.isEmpty()) && menuItemJson.text != null\r
-                                                       && !menuItemJson.text.isEmpty()) {\r
-                                               // Scenario: appid, roles and url are all null; text is\r
-                                               // non-null.\r
-                                               // This menu item is NOT associated with an app.\r
-                                               // 1) Remove all the records from fn_menu_functional_role\r
-                                               // for this menuId\r
-                                               // (in case it was previously associated with an app).\r
-                                               // 2) Update the text for this menu item.\r
-                                               // 3) Set the url to ""\r
-                                               deleteRoles(menuId);\r
-                                               // Assumption: this is not a Move, so don't change the\r
-                                               // parentMenuId and column.\r
-                                               menuItem.text = menuItemJson.text;\r
-                                               menuItem.url = "";\r
-                                               menuItem.active_yn = "Y";\r
-                                               localSession.update(menuItem);\r
-\r
-                                       } else if (newColumn != null) {\r
-                                               // This is a "move" request.\r
-                                               // Menu item has been moved to a different position under\r
-                                               // the same parent, or under a new parent.\r
-                                               logger.debug(EELFLoggerDelegate.debugLogger, "Doing a move operation.");\r
-                                               if (parentMenuIdEqual(oldParentMenuId, newParentMenuId)) {\r
-                                                       // The parent is the same. We have just changed the\r
-                                                       // column\r
-                                                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under the same parent");\r
-                                                       menuItem.column = newColumn;\r
-                                                       localSession.update(menuItem);\r
-                                               } else {\r
-                                                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under a different parent");\r
-                                                       menuItem.parentMenuId = newParentMenuId;\r
-                                                       menuItem.column = newColumn;\r
-                                                       localSession.update(menuItem);\r
-                                                       // If we are moving under a new parent, must delete any\r
-                                                       // app/role info from\r
-                                                       // the new parent, since it is no longer a leaf menu\r
-                                                       // item and cannot have app info\r
-                                                       // associated with it. The front end will have warned\r
-                                                       // the user and gotten confirmation.\r
-                                                       if (menuItemJson.parentMenuId != null) {\r
-                                                               Long parentMenuIdLong = new Long(menuItemJson.parentMenuId);\r
-                                                               removeAppInfo(localSession, parentMenuIdLong);\r
-                                                               // deleteRoles(parentMenuIdLong);\r
-                                                       }\r
-                                               }\r
-                                               // must update the column for all old and new sibling menu\r
-                                               // items\r
-                                               updateColumnForSiblings(localSession, menuId, oldParentMenuId, newParentMenuId, oldColumn,\r
-                                                               newColumn);\r
-                                       }\r
-\r
-                                       transaction.commit();\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: editFunctionalMenuItem: finished committing transaction");\r
-                                       result = true;\r
-                               } catch (Exception e) {\r
-                                       EcompPortalUtils.rollbackTransaction(transaction,\r
-                                                       "createFunctionalMenuItem rollback, exception = " + e);\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                               } finally {\r
-                                       EcompPortalUtils.closeLocalSession(localSession, "editFunctionalMenuItem");\r
-                               }\r
-                               \r
-                               if (result) {\r
-                               } else {\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: no result. setting httpStatusCode to "\r
-                                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                               }\r
-                       }\r
-               }       \r
-               \r
-               return fieldsValidator;\r
-       }\r
-\r
-       public FieldsValidator deleteFunctionalMenuItem(Long menuId) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "LR: deleteFunctionalMenuItem: test 1");\r
-               boolean result = false;\r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       // We must turn off foreign keys before deleting a menu item. Otherwise there will be a \r
-                       // constraint violation from the ancestors table.\r
-                       setForeignKeys(localSession, false);\r
-                       deleteRoles(menuId);\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: after deleting roles");\r
-                       deleteFavorites(menuId);\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: after deleting favorites");\r
-                       localSession.delete(localSession.get(FunctionalMenuItem.class, menuId));\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: about to commit");\r
-                       transaction.commit();\r
-                       result = true;\r
-               } catch (Exception e) {\r
-                       EcompPortalUtils.rollbackTransaction(transaction,\r
-                                       "deleteFunctionalMenuItem rollback, exception = " + e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "deleteFunctionalMenuItem");\r
-               }\r
-               if (result) {\r
-               } else {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: deleteFunctionalMenuItem: no result. setting httpStatusCode to "\r
-                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-       \r
-       // Regenerate the fn_menu_functional_ancestors table, which is used\r
-       // by the queries that return the functional menu items.\r
-       public FieldsValidator regenerateAncestorTable() {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       String sql = "DELETE FROM fn_menu_functional_ancestors";\r
-                       logQuery(sql);\r
-                       Query query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 1");\r
-                       \r
-                       sql = "ALTER TABLE fn_menu_functional_ancestors AUTO_INCREMENT=1";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: reset AUTO_INCREMENT to 1");\r
-\r
-                       int depth = 0;\r
-                       sql = "INSERT INTO fn_menu_functional_ancestors(menu_id, ancestor_menu_id, depth) "\r
-                                       + "SELECT m.menu_id, m.menu_id, " + depth + " FROM fn_menu_functional m";\r
-                       logQuery(sql);\r
-                       query = localSession.createSQLQuery(sql);\r
-                       query.executeUpdate();\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 2");\r
-                       for (depth = 0; depth < 3; depth++) {\r
-                               int depthPlusOne = depth + 1;\r
-                               sql = "INSERT INTO fn_menu_functional_ancestors(menu_id, ancestor_menu_id, depth) "\r
-                                               + " SELECT a.menu_id, m.parent_menu_id, " + depthPlusOne\r
-                                               + " FROM fn_menu_functional m, fn_menu_functional_ancestors a " + " WHERE a.depth='" + depth\r
-                                               + "' AND " + " a.ancestor_menu_id = m.menu_id AND " + " m.parent_menu_id != '-1'";\r
-                               logQuery(sql);\r
-                               query = localSession.createSQLQuery(sql);\r
-                               query.executeUpdate();\r
-                       }\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 3");\r
-                       transaction.commit();\r
-               } catch (Exception e) {\r
-                       EcompPortalUtils.rollbackTransaction(transaction,\r
-                                       "regenerateAncestorTable rollback, exception = " + e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "regenerateAncestorTable");\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       private void logQuery(String sql) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);\r
-       }\r
-\r
-       public FieldsValidator setFavoriteItem(FavoritesFunctionalMenuItem menuItemJson) {\r
-               boolean result = false;\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               \r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-               \r
-               try {\r
-            logger.debug(EELFLoggerDelegate.debugLogger, String.format("Before adding favorite for user id:{0} and menu id:{1} ",menuItemJson.userId,menuItemJson.menuId));\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       localSession.save(menuItemJson);\r
-                       transaction.commit();                           \r
-                       result = true;\r
-            logger.debug(EELFLoggerDelegate.debugLogger, String.format("After adding favorite for user id:{0} and menu id:{1} ",menuItemJson.userId,menuItemJson.menuId));                                                             \r
-               } catch (Exception e) {\r
-                       EcompPortalUtils.rollbackTransaction(transaction,"setFavoriteItem rollback, exception = " + e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "setFavoriteItem");\r
-               }                                                                                       \r
-               \r
-               if(result) {\r
-               }\r
-               else {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               \r
-               return fieldsValidator;\r
-       }\r
-       \r
-       public List<FavoritesFunctionalMenuItemJson> getFavoriteItems(Long userId) {            \r
-               try {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "Before getting favorites for user id: " + userId);\r
-                       \r
-                       // Divide this into 2 queries: one which returns the favorites items associated with Restricted apps,\r
-                       // and one that returns all the other favorites items. Then we can easily add the boolean flag\r
-                       // restrictedApp to each FavoritesFunctionalMenuItemJson, to be used by the front end.\r
-\r
-                       String sql = "SELECT f.user_id,f.menu_id,m.text,m.url "\r
-                                       + " FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "\r
-                                       + " WHERE f.user_id='" + userId + "' AND f.menu_id = m.menu_id "\r
-                                       + " AND f.menu_id = mr.menu_id "\r
-                                       + " AND mr.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";\r
-\r
-                       @SuppressWarnings("unchecked")\r
-                       List<FavoritesFunctionalMenuItemJson> menuItems = dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null);\r
-                       for (FavoritesFunctionalMenuItemJson menuItem : menuItems) {\r
-                               menuItem.restrictedApp = true;\r
-                       }\r
-                       \r
-                       sql = "SELECT DISTINCT f.user_id,f.menu_id,m.text,m.url "\r
-                                       + " FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "\r
-                                       + " WHERE f.user_id='" + userId + "' AND f.menu_id = m.menu_id "\r
-                                       + " AND f.menu_id = mr.menu_id "\r
-                                       + " AND mr.role_id != '" + RESTRICTED_APP_ROLE_ID + "' ";\r
-                       @SuppressWarnings("unchecked")\r
-                       List<FavoritesFunctionalMenuItemJson> menuItems2 = dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null);\r
-                       for (FavoritesFunctionalMenuItemJson menuItem : menuItems2) {\r
-                               menuItem.restrictedApp = false;\r
-                               menuItems.add(menuItem);\r
-                       }\r
-                       \r
-                       return menuItems;\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in FunctionalMenuServiceImpl.getFavoriteItems. Details: " + EcompPortalUtils.getStackTrace(e));\r
-                       List<FavoritesFunctionalMenuItemJson> menuItems = new ArrayList<FavoritesFunctionalMenuItemJson>();\r
-                       return menuItems;\r
-               }                                                                                                                                       \r
-       }\r
-       \r
-       public FieldsValidator removeFavoriteItem(Long userId, Long menuId) {\r
-               boolean result = false;\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               \r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-               \r
-               try {                   \r
-                       \r
-                       FavoritesFunctionalMenuItem menuItemJson = new FavoritesFunctionalMenuItem();\r
-                       menuItemJson.userId = userId;\r
-                       menuItemJson.menuId = menuId;\r
-                       \r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       localSession.delete(menuItemJson);\r
-                       localSession.flush();\r
-                       transaction.commit();                           \r
-                       result = true;\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, String.format("After removing favorite for user id: " + userId + "; menu id: " + menuId));                                                         \r
-               } catch (Exception e) {\r
-                       EcompPortalUtils.rollbackTransaction(transaction,"removeFavoriteItem rollback, exception = " + e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               } finally {                                                             \r
-                       EcompPortalUtils.closeLocalSession(localSession, "removeFavoriteItem");\r
-               }                                                                                       \r
-               \r
-               if(result) {\r
-               }\r
-               else {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               \r
-               return fieldsValidator;\r
-       }\r
-       \r
-       @Override\r
-       public void assignHelpURLs(List<FunctionalMenuItem> menuItems) {\r
-               try {\r
-                       String user_guide_link = SystemProperties.getProperty(EPCommonSystemProperties.USER_GUIDE_URL);\r
-                       \r
-                       for(FunctionalMenuItem menuItem: menuItems){\r
-                               if(menuItem.text.equalsIgnoreCase("Contact Us")){\r
-                                       menuItem.setUrl("contactUs");\r
-                                       //menuItem.setRestrictedApp(true);\r
-                               }\r
-                               if(menuItem.text.equalsIgnoreCase("Get Access")) {\r
-                                       menuItem.setUrl("getAccess");\r
-                               }\r
-                               if(menuItem.text.equalsIgnoreCase("User Guide")) {\r
-                                       menuItem.setUrl(user_guide_link);\r
-                                       menuItem.setRestrictedApp(true);\r
-                               }\r
-                       }\r
-               } catch (Exception e) {         \r
-                       logger.error(EELFLoggerDelegate.errorLogger, "assignHelpURLs process failed. Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               \r
-       }\r
-\r
-       public List<FunctionalMenuRole> getFunctionalMenuRole() {\r
-               String sql = "SELECT * from fn_menu_functional_roles";\r
-               logQuery(sql);\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuRole: logged the query");\r
-\r
-               @SuppressWarnings("unchecked")\r
-               List<FunctionalMenuRole> functionalMenuRole = dataAccessService.executeSQLQuery(sql, FunctionalMenuRole.class, null);\r
-               \r
-               return functionalMenuRole;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<BusinessCardApplicationRole> getUserAppRolesList(String userId) {\r
-               Map<String, String> params = new HashMap<>();\r
-               params.put("userId", userId);\r
-\r
-               List<BusinessCardApplicationRole> userAppRoles = null;\r
-               try {\r
-                       userAppRoles = dataAccessService\r
-                                       .executeNamedQuery("getUserApproles", params, null);\r
-               } catch (Exception e) {\r
-                       // TODO Auto-generated catch block\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getUserAppRolesList failed", e);\r
-               }               \r
-               return userAppRoles;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.criterion.Projections;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+@Service("functionalMenuService")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class FunctionalMenuServiceImpl implements FunctionalMenuService {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuServiceImpl.class);
+
+       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+       private String RESTRICTED_APP_ROLE_ID = "900";
+
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       private SessionFactory sessionFactory;
+
+       @PostConstruct
+       private void init() {
+               try {
+                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
+                       RESTRICTED_APP_ROLE_ID = SystemProperties.getProperty(EPCommonSystemProperties.RESTRICTED_APP_ROLE_ID);
+               } catch(Exception e) {
+               }
+       }
+       
+       public List<FunctionalMenuItem> getFunctionalMenuItems(EPUser user) {
+               List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();
+               return menuItems;
+       }
+
+       public List<FunctionalMenuItem> getFunctionalMenuItems() {
+               return getFunctionalMenuItems(false);
+       }
+       
+       public List<FunctionalMenuItem> getFunctionalMenuItems(Boolean all) {
+               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,
+               // and one that returns all the other menu items. Then we can easily add the boolean flag
+               // restrictedApp to each FunctionalMenuItem, to be used by the front end.
+               String activeWhereClause = "";
+               if (! all) {
+                       activeWhereClause = " AND UPPER(m.active_yn) = 'Y' ";
+               }
+               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "
+                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "
+                               + "WHERE m.menu_id = r.menu_id "
+                               + activeWhereClause //" AND UPPER(m.active_yn) = 'Y' "
+                               + " AND r.role_id != '" + RESTRICTED_APP_ROLE_ID + "' "
+                       + " UNION "
+                       + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id "
+                               + " FROM fn_menu_functional m "
+                               + " WHERE m.url='' "
+                               + activeWhereClause; //" AND UPPER(m.active_yn) = 'Y' ";
+               logQuery(sql);
+
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItemWithAppID> menuItemsWithAppIdList = dataAccessService.executeSQLQuery(sql,FunctionalMenuItemWithAppID.class, null);
+               List<FunctionalMenuItem> menuItems = new ArrayList<>(); 
+               menuItems = transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(menuItemsWithAppIdList);
+               for (FunctionalMenuItem menuItem : menuItems) {
+                       menuItem.restrictedApp = false;
+               }
+               
+               sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "
+                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "
+                               + "WHERE m.menu_id = r.menu_id "
+                               + activeWhereClause //" AND UPPER(m.active_yn) = 'Y' "
+                               + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               for (FunctionalMenuItem menuItem : menuItems2) {
+                       menuItem.restrictedApp = true;
+                       menuItems.add(menuItem);
+               }
+               
+               return menuItems;
+       }
+
+       
+       public List<FunctionalMenuItem> getFunctionalMenuItemsForNotificationTree(Boolean all) {
+               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,
+               // and one that returns all the other menu items which are active. Then we can easily add the boolean flag
+               // restrictedApp to each FunctionalMenuItem, to be used by the front end.
+               String activeWhereClause = "";
+               if (! all) {
+                       activeWhereClause = " AND UPPER(m.active_yn) = 'Y' ";
+               }
+               String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "
+                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "
+                               + "WHERE m.menu_id = r.menu_id "
+                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' "
+                               + " AND r.role_id != '" + RESTRICTED_APP_ROLE_ID + "' "
+                       + " UNION "
+                       + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id "
+                               + " FROM fn_menu_functional m "
+                               + " WHERE m.url='' "
+                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' ";
+               logQuery(sql);
+
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItemWithAppID> menuItemsWithAppIdList = dataAccessService.executeSQLQuery(sql,FunctionalMenuItemWithAppID.class, null);
+               List<FunctionalMenuItem> menuItems = new ArrayList<>(); 
+               menuItems = transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(menuItemsWithAppIdList);
+               for (FunctionalMenuItem menuItem : menuItems) {
+                       menuItem.restrictedApp = false;
+               }
+               
+               sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id "
+                               + "FROM fn_menu_functional m, fn_menu_functional_roles r "
+                               + "WHERE m.menu_id = r.menu_id "
+                               + activeWhereClause + " AND UPPER(m.active_yn) = 'Y' "
+                               + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               for (FunctionalMenuItem menuItem : menuItems2) {
+                       menuItem.restrictedApp = true;
+                       menuItems.add(menuItem);
+               }
+               
+               return menuItems;
+       }
+
+       public List<FunctionalMenuItem> getFunctionalMenuItemsForApp(Integer appId) {
+               String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+                               + " FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr "
+                               + " WHERE " + " mr.app_id='" + appId + "' " + " AND mr.menu_id = m.menu_id " + " AND UPPER(m.active_yn) = 'Y'"
+                               + " AND UPPER(m1.active_yn) ='Y'" + " AND a.menu_id = m.menu_id " + " AND a.ancestor_menu_id = m1.menu_id";
+               logQuery(sql);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuItemsForApp: logged the query");
+
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               
+               return menuItems;
+       }
+       /**
+        * convert List of FunctionalMenuItemWithAppID into List of FunctionalMenuItem
+        * 
+        */
+       public List<FunctionalMenuItem> transformFunctionalMenuItemWithAppIDToFunctionalMenuItem(List<FunctionalMenuItemWithAppID> functionalMenuItemWithAppIDList) {
+               List<FunctionalMenuItem> functionalMenuItemList = new ArrayList<FunctionalMenuItem>();
+               for (FunctionalMenuItemWithAppID functionalMenuItemWithAppID : functionalMenuItemWithAppIDList) {
+                       FunctionalMenuItem menuItem = new FunctionalMenuItem();
+                       menuItem.menuId=functionalMenuItemWithAppID.menuId;
+                       menuItem.column=functionalMenuItemWithAppID.column;
+                       menuItem.text=functionalMenuItemWithAppID.text;
+                       menuItem.parentMenuId=functionalMenuItemWithAppID.parentMenuId;
+                       menuItem.url=functionalMenuItemWithAppID.url;
+                       menuItem.active_yn=functionalMenuItemWithAppID.active_yn;
+                       menuItem.appid=functionalMenuItemWithAppID.appid;
+                       menuItem.setRoles(functionalMenuItemWithAppID.roles);
+                       menuItem.restrictedApp=functionalMenuItemWithAppID.restrictedApp;
+                       functionalMenuItemList.add(menuItem);
+               }
+               return functionalMenuItemList;
+       }
+       
+       public List<FunctionalMenuItem> getFunctionalMenuItemsForUser(String orgUserId) {
+               // m represents the functional menu items that are the leaf nodes
+               // m1 represents the functional menu items for all the nodes
+
+               // Divide this into 2 queries: one which returns the bottom-level menu items associated with Restricted apps,
+               // and one that returns all the other menu items. Then we can easily add the boolean flag
+               // restrictedApp to each FunctionalMenuItem, to be used by the front end.
+               String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+                               + " FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, "
+                               + " fn_menu_functional_roles mr, fn_user u , fn_user_role ur " + " WHERE " + " u.org_user_id='" + orgUserId
+                               + "' " + " AND u.user_id = ur.user_id " + " AND ur.app_id = mr.app_id " +
+                               // " AND ur.role_id = mr.role_id " +
+                               " AND (ur.role_id = mr.role_id " + "     OR ur.role_id = '" + ACCOUNT_ADMIN_ROLE_ID + "') "
+                               + " AND m.menu_id = mr.menu_id " + " AND UPPER(m.active_yn) = 'Y'" + " AND UPPER(m1.active_yn) ='Y' "
+                               + " AND a.menu_id = m.menu_id " + " AND a.ancestor_menu_id = m1.menu_id "
+                               + " UNION "
+                               // the ancestors of the restricted app menu items
+                               + " select m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m1.active_yn "
+                               + " FROM fn_menu_functional m, fn_menu_functional_roles mr, fn_menu_functional m1, "
+                               + " fn_menu_functional_ancestors a "
+                               + " where a.menu_id = m.menu_id "
+                               + " AND a.ancestor_menu_id = m1.menu_id "
+                               + " AND m.menu_id != m1.menu_id "
+                               + " AND m.menu_id = mr.menu_id "
+                               + " AND mr.role_id = '" + RESTRICTED_APP_ROLE_ID + "' "
+                               + " AND UPPER(m.active_yn) = 'Y'" + " AND UPPER(m1.active_yn) ='Y' "
+                               // Add the Favorites menu item
+                               + " UNION "
+                               + " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "
+                               + " FROM fn_menu_functional m "
+                               + " WHERE m.text in ('Favorites','Get Access','Contact Us','Support','User Guide','Help')";
+               
+               logQuery(sql);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuItemsForUser: logged the query");
+
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               for (FunctionalMenuItem menuItem : menuItems) {
+                       menuItem.restrictedApp = false;
+               }
+               
+               sql = " SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn "
+                       + " FROM fn_menu_functional m, fn_menu_functional_roles r "
+                       + " WHERE m.menu_id = r.menu_id "
+                       + " AND UPPER(m.active_yn) = 'Y' "
+                       + " AND r.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems2 = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               for (FunctionalMenuItem menuItem : menuItems2) {
+                       menuItem.restrictedApp = true;
+                       menuItems.add(menuItem);
+               }
+               
+               return menuItems;
+       }
+
+       public FunctionalMenuItem getFunctionalMenuItemDetails(Integer menuid) {
+               // First, fill in the fields that apply to all menu items
+
+               String sql = "SELECT * FROM fn_menu_functional WHERE menu_id = '" + menuid + "'";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuItem> menuItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuItem.class, null);
+               FunctionalMenuItem menuItem = (menuItems == null || menuItems.isEmpty() ? null : menuItems.get(0));
+               // If it is a bottom-level menu item, must fill in the appid and the
+               // roles
+               sql = "SELECT * FROM fn_menu_functional_roles WHERE menu_id = '" + menuid + "'";
+               logQuery(sql);
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuRole> roleItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuRole.class, null);
+               if (roleItems.size() > 0) {
+                       Integer appid = roleItems.get(0).appId;
+                       menuItem.appid = appid;
+                       List<Integer> roles = new ArrayList<Integer>();
+                       for (FunctionalMenuRole roleItem : roleItems) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: app_id: " + roleItem.appId + "; role_id: " + roleItem.roleId + "\n");
+                               roles.add(roleItem.roleId);
+                       }
+                       menuItem.setRoles(roles);
+               }
+               
+               return menuItem;
+       }
+
+       private FieldsValidator menuItemFieldsChecker(FunctionalMenuItemWithRoles menuItemJson) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               try {
+                       // TODO: validate all the fields
+                       @SuppressWarnings("unchecked")
+                       List<FunctionalMenuItem> functionalMenuItems = dataAccessService.getList(FunctionalMenuItem.class,
+                                       " where text = '" + menuItemJson.text + "'", null, null);
+                       
+                       boolean dublicatedName = false;
+                       for (FunctionalMenuItem fnMenuItem : functionalMenuItems) {
+                               if (menuItemJson.menuId != null && menuItemJson.menuId.equals(fnMenuItem.menuId)) {
+                                       // FunctionalMenuItem should not be compared with itself
+                                       continue;
+                               }
+
+                               if (!dublicatedName && fnMenuItem.text.equalsIgnoreCase(menuItemJson.text)) {
+                                       dublicatedName = true;
+                                       break;
+                               }
+                       }
+                       if (dublicatedName) {
+                               fieldsValidator.addProblematicFieldName("text");
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                               fieldsValidator.errorCode = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);
+                               logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we have an duplicate text field");
+                       } else if (StringUtils.isEmpty(menuItemJson.text) && menuItemJson.menuId == null) { 
+                               // text must be non empty for a create. For an edit, can be empty, which means it is a move request.
+                               // a null menuId indicates a create.
+                               fieldsValidator.addProblematicFieldName("text");
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                               logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we have an empty text field");
+                       } else {
+                               // The url, appid, and roles must either be all filled or all empty.
+                               Boolean urlIsEmpty = StringUtils.isEmpty(menuItemJson.url);
+                               Boolean rolesIsEmpty = menuItemJson.getRoles() == null || menuItemJson.getRoles().isEmpty();
+                               Boolean appidIsEmpty = menuItemJson.appid == null || menuItemJson.appid == 0;
+                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: menuItemfieldsChecker: urlIsEmpty: " + urlIsEmpty + "; rolesIsEmpty: " + rolesIsEmpty + "; appidIsEmpty: " + appidIsEmpty +"\n");
+                               if (!((urlIsEmpty && rolesIsEmpty && appidIsEmpty) || (!urlIsEmpty && !rolesIsEmpty && !appidIsEmpty)))
+                               {
+                                       fieldsValidator.addProblematicFieldName("url,roles,appid");
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Error: we don't have: either all 3 fields empty or all 3 fields nonempty");
+                               } else {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "In menuItemFieldsChecker, Success: either all 3 fields empty or all 3 fields nonempty");
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while validating the FunctionalMenuItems. Details: " + EcompPortalUtils.getStackTrace(e));
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               
+               return fieldsValidator;
+       }
+       
+       // Turn foreign key checks on or off
+       protected void setForeignKeys(Session localSession, Boolean on) {
+               String keyCheck = "0";
+               if (on) {
+                       keyCheck = "1";
+               }
+               String sql = "set FOREIGN_KEY_CHECKS="+keyCheck;
+               logQuery(sql);
+               Query query = localSession.createSQLQuery(sql);
+               query.executeUpdate();
+       }
+
+       public FieldsValidator createFunctionalMenuItem(FunctionalMenuItemWithRoles menuItemJson) {
+               FieldsValidator fieldsValidator = menuItemFieldsChecker(menuItemJson);
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: test 1");
+                       boolean result = false;
+                       Session localSession = null;
+                       Transaction transaction = null;
+                       try {
+                               FunctionalMenuItem menuItem = new FunctionalMenuItem();
+                               menuItem.appid = menuItemJson.appid;
+                               menuItem.setRoles(menuItemJson.getRoles());
+                               menuItem.url = menuItemJson.url;
+                               menuItem.text = menuItemJson.text;
+                               menuItem.parentMenuId = menuItemJson.parentMenuId;
+                               menuItem.active_yn = "Y";
+                               localSession = sessionFactory.openSession();
+                               
+                               // If the app is disabled, deactivate the menu item.
+                               if (menuItemJson.appid != null) {
+                                       Long appidLong = Long.valueOf(menuItemJson.appid);
+                                       EPApp app = (EPApp) localSession.get(EPApp.class, appidLong);
+                                       if (app != null && ! app.getEnabled()) {
+                                               menuItem.active_yn = "N";
+                                       }
+                               }
+
+                               // Set the column number to 1 higher than the highest column
+                               // number under this parent.
+                               Criteria criteria = localSession.createCriteria(FunctionalMenuItem.class);
+                               criteria.setProjection(Projections.max("column"));
+                               criteria.add(Restrictions.eq("parentMenuId", menuItem.parentMenuId));
+                               Integer maxColumn = (Integer) criteria.uniqueResult();
+                               if (maxColumn == null) {
+                                       maxColumn = 0;
+                               }
+                               menuItem.column = maxColumn + 1;
+                               logger.debug(EELFLoggerDelegate.debugLogger, "about to create menu item: " + menuItem.toString());
+
+                               transaction = localSession.beginTransaction();
+                               // localSession.saveOrUpdate(newMenuItem);
+                               localSession.save(menuItem);
+                               Long menuid = menuItem.menuId;
+                               menuItemJson.menuId = menuid;
+                               logger.debug(EELFLoggerDelegate.debugLogger, "after saving menu object, new id: " + menuid);
+
+                               // Next, save all the roles
+
+                               addRoles(menuItemJson, localSession);
+                               transaction.commit();
+                               result = true;
+                       } catch (Exception e) {
+                               EcompPortalUtils.rollbackTransaction(transaction, 
+                                               "createFunctionalMenuItem rollback, exception = " + e);
+                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                       } finally {
+                               EcompPortalUtils.closeLocalSession(localSession, "createFunctionalMenuItem");
+                       }
+                       if (result) {
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: no result. setting httpStatusCode to "
+                                               + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger, "FunctionalMenuServiceImpl.createFunctionalMenuItem: bad request");
+               }
+               return fieldsValidator;
+       }
+
+       /* Add all the roles in the menu item to the database */
+       public void addRoles(FunctionalMenuItemWithRoles menuItemJson, Session localSession) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "entering addRoles.");
+               List<Integer> roles = menuItemJson.getRoles();
+               if (roles != null && roles.size() > 0) {
+                       Integer appid = menuItemJson.appid;
+                       Long menuid = menuItemJson.menuId;
+                       for (Integer roleid : roles) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "about to create record for role: " + roleid);
+                               FunctionalMenuRole role = new FunctionalMenuRole();
+                               role.appId = appid;
+                               role.menuId = menuid;
+                               role.roleId = roleid;
+                               localSession.save(role);
+                               logger.debug(EELFLoggerDelegate.debugLogger, "after saving role menu object, new id: " + role.id);
+                       }
+               }
+       }
+
+       /* Delete all the roles associated with the menu item from the database */
+       public void deleteRoles(Long menuId) {
+               dataAccessService.deleteDomainObjects(FunctionalMenuRole.class, "menu_id='" + menuId + "'", null);
+       }
+
+       /* Delete all favorites associated with the menu item from the database */
+       public void deleteFavorites(Long menuId) {
+               dataAccessService.deleteDomainObjects(FavoritesFunctionalMenuItem.class, "menu_id='" + menuId + "'", null);
+       }
+       
+       private Boolean parentMenuIdEqual(Integer menuId1, Integer menuId2) {
+               return ((menuId1 == null && menuId2 == null) || (menuId1 != null && menuId1.equals(menuId2)));
+       }
+
+       private void updateColumnForSiblings(Session localSession, Long menuId, Integer oldParentMenuId,
+                       Integer newParentMenuId, Integer oldColumn, Integer newColumn) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "entering updateColumnForSiblings");
+               Criteria criteria = localSession.createCriteria(FunctionalMenuItem.class);
+               criteria.add(Restrictions.ne("menuId", menuId));
+               if (parentMenuIdEqual(oldParentMenuId, newParentMenuId)) {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under the same parent");
+                       // We are moving to a new position under the same parent
+                       if (newParentMenuId == null) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is null, so using isNull");
+                               criteria.add(Restrictions.isNull("parentMenuId"));
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is NOT null, so using eq");
+                               criteria.add(Restrictions.eq("parentMenuId", newParentMenuId));
+                       }
+                       if (oldColumn > newColumn) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "moving to a lower column under the same parent");
+                               // We are moving to a lower column under the same parent
+                               criteria.add(Restrictions.ge("column", newColumn));
+                               criteria.add(Restrictions.lt("column", oldColumn));
+                               @SuppressWarnings("unchecked")
+                               List<FunctionalMenuItem> menuItems = criteria.list();
+                               for (FunctionalMenuItem menuItem : menuItems) {
+                                       menuItem.column += 1;
+                                       localSession.save(menuItem);
+                               }
+                       } else if (oldColumn < newColumn) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "moving to a higher column under the same parent");
+                               // We are moving to a higher column under the same parent
+                               criteria.add(Restrictions.gt("column", oldColumn));
+                               criteria.add(Restrictions.le("column", newColumn));
+                               @SuppressWarnings("unchecked")
+                               List<FunctionalMenuItem> menuItems = criteria.list();
+                               for (FunctionalMenuItem menuItem : menuItems) {
+                                       menuItem.column -= 1;
+                                       localSession.save(menuItem);
+                               }
+                       } else {
+                               // No info has changed
+                               logger.debug(EELFLoggerDelegate.debugLogger, "no info has changed, so we are not moving");
+                       }
+               } else {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under a new parent");
+                       // We are moving under a new parent.
+
+                       // Adjust the children under the old parent
+                       logger.debug(EELFLoggerDelegate.debugLogger, "about to adjust the children under the old parent");
+
+                       // If the parentId is null, must check for its children differently
+                       if (oldParentMenuId == null) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "oldParentMenuId is null, so using isNull");
+                               criteria.add(Restrictions.isNull("parentMenuId"));
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "oldParentMenuId is NOT null, so using eq");
+                               criteria.add(Restrictions.eq("parentMenuId", oldParentMenuId));
+                       }
+
+                       criteria.add(Restrictions.gt("column", oldColumn));
+                       @SuppressWarnings("unchecked")
+                       List<FunctionalMenuItem> menuItems1 = criteria.list();
+                       for (FunctionalMenuItem menuItem : menuItems1) {
+                               menuItem.column -= 1;
+                               localSession.save(menuItem);
+                       }
+                       // Adjust the children under the new parent.
+                       logger.debug(EELFLoggerDelegate.debugLogger, "about to adjust the children under the new parent");
+                       logger.debug(EELFLoggerDelegate.debugLogger, "get all menu items where menuId!=" + menuId + "; parentMenuId==" + newParentMenuId
+                                       + "; column>=" + newColumn);
+                       criteria = localSession.createCriteria(FunctionalMenuItem.class);
+                       criteria.add(Restrictions.ne("menuId", menuId));
+                       if (newParentMenuId == null) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is null, so using isNull");
+                               criteria.add(Restrictions.isNull("parentMenuId"));
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "newParentMenuId is NOT null, so using eq");
+                               criteria.add(Restrictions.eq("parentMenuId", newParentMenuId));
+                       }
+
+                       criteria.add(Restrictions.ge("column", newColumn));
+                       @SuppressWarnings("unchecked")
+                       List<FunctionalMenuItem> menuItems2 = criteria.list();
+                       if (menuItems2 != null) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "found " + menuItems2.size() + " menu items");
+                       } else {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "found null menu items");
+                       }
+                       for (FunctionalMenuItem menuItem : menuItems2) {
+                               menuItem.column += 1;
+                               localSession.save(menuItem);
+                       }
+               }
+               logger.debug(EELFLoggerDelegate.debugLogger, "done with updateColumnForSiblings");
+       }
+
+       public void removeAppInfo(Session localSession, Long menuId) {
+               // Remove the url, role, and app info from a menu item
+               FunctionalMenuItem menuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class, menuId);
+               menuItem.url = "";
+               deleteRoles(menuId);
+       }
+
+       public FieldsValidator editFunctionalMenuItem(FunctionalMenuItemWithRoles menuItemJson) {
+               boolean result                  = false;
+               Session localSession    = null;
+               Transaction transaction = null;
+               Long menuId                     = menuItemJson.menuId;
+
+               logger.debug(EELFLoggerDelegate.debugLogger, "LR: editFunctionalMenuItem: test 1");
+               FieldsValidator fieldsValidator = menuItemFieldsChecker(menuItemJson);
+               if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                       // TODO: make sure menuId is here. And, it might not already exist
+                       // in db table.
+                       if (menuId == null) {
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                               logger.error(EELFLoggerDelegate.errorLogger, "FunctionalMenuServiceImpl.editFunctionalMenuItem: bad request");
+                       } else {
+                               // To simplify the code, assume we will have a transaction
+                               try {
+                                       localSession = sessionFactory.openSession();
+                                       transaction = localSession.beginTransaction();
+
+                                       // Get the existing info associated with menuItem from the DB
+                                       FunctionalMenuItem menuItem = (FunctionalMenuItem) localSession.get(FunctionalMenuItem.class, menuId);
+                                       Integer oldColumn = menuItem.column;
+                                       Integer oldParentMenuId = menuItem.parentMenuId;
+                                       Integer newColumn = menuItemJson.column;
+                                       Integer newParentMenuId = menuItemJson.parentMenuId;
+
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "prev info: column: " + oldColumn + "; parentMenuId: " + oldParentMenuId);
+
+                                       if (menuItemJson.appid != null && menuItemJson.getRoles() != null && !menuItemJson.getRoles().isEmpty()
+                                                       && menuItemJson.url != null && !menuItemJson.url.isEmpty() && menuItemJson.text != null
+                                                       && !menuItemJson.text.isEmpty()) {
+                                               // Scenario: appid, roles, url and text are all non-null.
+                                               // This menu item is associated with an app.
+                                               // (Note: this should only occur for a bottom-level menu
+                                               // item with no children.)
+                                               // 1) Remove all the records from fn_menu_functional_role
+                                               // for this menuId.
+                                               // 2) Add records to the fn_menu_function_role table for the
+                                               // appId and each roleId
+                                               // 3) Update the url and text for this menu item.
+
+                                               // Because of foreign key constraints, delete the roles,
+                                               // then update the menuItem then add the roles.
+                                               deleteRoles(menuId);
+                                               // Assumption: this is not a Move, so don't change the
+                                               // parentMenuId and column.
+                                               menuItem.appid = menuItemJson.appid;
+                                               menuItem.setRoles(menuItemJson.getRoles());
+                                               menuItem.url = menuItemJson.url;
+                                               menuItem.text = menuItemJson.text;
+                                               
+                                               // If the app is disabled, deactivate the menu item.
+                                               Long appidLong = Long.valueOf(menuItemJson.appid);
+                                               EPApp app = (EPApp) localSession.get(EPApp.class, appidLong);
+                                               if (app != null && ! app.getEnabled()) {
+                                                       menuItem.active_yn = "N";
+                                               } else {
+                                                       menuItem.active_yn = "Y";
+                                               }
+
+
+                                               localSession.update(menuItem);
+                                               addRoles(menuItemJson, localSession);
+
+                                       } else if (menuItemJson.appid == null && (menuItemJson.getRoles() == null || menuItemJson.getRoles().isEmpty())
+                                                       && (menuItemJson.url == null || menuItemJson.url.isEmpty()) && menuItemJson.text != null
+                                                       && !menuItemJson.text.isEmpty()) {
+                                               // Scenario: appid, roles and url are all null; text is
+                                               // non-null.
+                                               // This menu item is NOT associated with an app.
+                                               // 1) Remove all the records from fn_menu_functional_role
+                                               // for this menuId
+                                               // (in case it was previously associated with an app).
+                                               // 2) Update the text for this menu item.
+                                               // 3) Set the url to ""
+                                               deleteRoles(menuId);
+                                               // Assumption: this is not a Move, so don't change the
+                                               // parentMenuId and column.
+                                               menuItem.text = menuItemJson.text;
+                                               menuItem.url = "";
+                                               menuItem.active_yn = "Y";
+                                               localSession.update(menuItem);
+
+                                       } else if (newColumn != null) {
+                                               // This is a "move" request.
+                                               // Menu item has been moved to a different position under
+                                               // the same parent, or under a new parent.
+                                               logger.debug(EELFLoggerDelegate.debugLogger, "Doing a move operation.");
+                                               if (parentMenuIdEqual(oldParentMenuId, newParentMenuId)) {
+                                                       // The parent is the same. We have just changed the
+                                                       // column
+                                                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under the same parent");
+                                                       menuItem.column = newColumn;
+                                                       localSession.update(menuItem);
+                                               } else {
+                                                       logger.debug(EELFLoggerDelegate.debugLogger, "moving under a different parent");
+                                                       menuItem.parentMenuId = newParentMenuId;
+                                                       menuItem.column = newColumn;
+                                                       localSession.update(menuItem);
+                                                       // If we are moving under a new parent, must delete any
+                                                       // app/role info from
+                                                       // the new parent, since it is no longer a leaf menu
+                                                       // item and cannot have app info
+                                                       // associated with it. The front end will have warned
+                                                       // the user and gotten confirmation.
+                                                       if (menuItemJson.parentMenuId != null) {
+                                                               Long parentMenuIdLong = new Long(menuItemJson.parentMenuId);
+                                                               removeAppInfo(localSession, parentMenuIdLong);
+                                                               // deleteRoles(parentMenuIdLong);
+                                                       }
+                                               }
+                                               // must update the column for all old and new sibling menu
+                                               // items
+                                               updateColumnForSiblings(localSession, menuId, oldParentMenuId, newParentMenuId, oldColumn,
+                                                               newColumn);
+                                       }
+
+                                       transaction.commit();
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: editFunctionalMenuItem: finished committing transaction");
+                                       result = true;
+                               } catch (Exception e) {
+                                       EcompPortalUtils.rollbackTransaction(transaction,
+                                                       "createFunctionalMenuItem rollback, exception = " + e);
+                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                               } finally {
+                                       EcompPortalUtils.closeLocalSession(localSession, "editFunctionalMenuItem");
+                               }
+                               
+                               if (result) {
+                               } else {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: createFunctionalMenuItem: no result. setting httpStatusCode to "
+                                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               }
+                       }
+               }       
+               
+               return fieldsValidator;
+       }
+
+       public FieldsValidator deleteFunctionalMenuItem(Long menuId) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               logger.debug(EELFLoggerDelegate.debugLogger, "LR: deleteFunctionalMenuItem: test 1");
+               boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       // We must turn off foreign keys before deleting a menu item. Otherwise there will be a 
+                       // constraint violation from the ancestors table.
+                       setForeignKeys(localSession, false);
+                       deleteRoles(menuId);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: after deleting roles");
+                       deleteFavorites(menuId);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: after deleting favorites");
+                       localSession.delete(localSession.get(FunctionalMenuItem.class, menuId));
+                       logger.debug(EELFLoggerDelegate.debugLogger, "deleteFunctionalMenuItem: about to commit");
+                       transaction.commit();
+                       result = true;
+               } catch (Exception e) {
+                       EcompPortalUtils.rollbackTransaction(transaction,
+                                       "deleteFunctionalMenuItem rollback, exception = " + e);
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "deleteFunctionalMenuItem");
+               }
+               if (result) {
+               } else {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "LR: deleteFunctionalMenuItem: no result. setting httpStatusCode to "
+                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+       
+       // Regenerate the fn_menu_functional_ancestors table, which is used
+       // by the queries that return the functional menu items.
+       public FieldsValidator regenerateAncestorTable() {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               Session localSession = null;
+               Transaction transaction = null;
+
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       String sql = "DELETE FROM fn_menu_functional_ancestors";
+                       logQuery(sql);
+                       Query query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 1");
+                       
+                       sql = "ALTER TABLE fn_menu_functional_ancestors AUTO_INCREMENT=1";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: reset AUTO_INCREMENT to 1");
+
+                       int depth = 0;
+                       sql = "INSERT INTO fn_menu_functional_ancestors(menu_id, ancestor_menu_id, depth) "
+                                       + "SELECT m.menu_id, m.menu_id, " + depth + " FROM fn_menu_functional m";
+                       logQuery(sql);
+                       query = localSession.createSQLQuery(sql);
+                       query.executeUpdate();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 2");
+                       for (depth = 0; depth < 3; depth++) {
+                               int depthPlusOne = depth + 1;
+                               sql = "INSERT INTO fn_menu_functional_ancestors(menu_id, ancestor_menu_id, depth) "
+                                               + " SELECT a.menu_id, m.parent_menu_id, " + depthPlusOne
+                                               + " FROM fn_menu_functional m, fn_menu_functional_ancestors a " + " WHERE a.depth='" + depth
+                                               + "' AND " + " a.ancestor_menu_id = m.menu_id AND " + " m.parent_menu_id != '-1'";
+                               logQuery(sql);
+                               query = localSession.createSQLQuery(sql);
+                               query.executeUpdate();
+                       }
+                       logger.debug(EELFLoggerDelegate.debugLogger, "regenerateAncestorTable: finished query 3");
+                       transaction.commit();
+               } catch (Exception e) {
+                       EcompPortalUtils.rollbackTransaction(transaction,
+                                       "regenerateAncestorTable rollback, exception = " + e);
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "regenerateAncestorTable");
+               }
+               return fieldsValidator;
+       }
+
+       private void logQuery(String sql) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+       }
+
+       public FieldsValidator setFavoriteItem(FavoritesFunctionalMenuItem menuItemJson) {
+               boolean result = false;
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               
+               Session localSession = null;
+               Transaction transaction = null;
+               
+               try {
+            logger.debug(EELFLoggerDelegate.debugLogger, String.format("Before adding favorite for user id:{0} and menu id:{1} ",menuItemJson.userId,menuItemJson.menuId));
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       localSession.save(menuItemJson);
+                       transaction.commit();                           
+                       result = true;
+            logger.debug(EELFLoggerDelegate.debugLogger, String.format("After adding favorite for user id:{0} and menu id:{1} ",menuItemJson.userId,menuItemJson.menuId));                                                             
+               } catch (Exception e) {
+                       EcompPortalUtils.rollbackTransaction(transaction,"setFavoriteItem rollback, exception = " + e);
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "setFavoriteItem");
+               }                                                                                       
+               
+               if(result) {
+               }
+               else {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               
+               return fieldsValidator;
+       }
+       
+       public List<FavoritesFunctionalMenuItemJson> getFavoriteItems(Long userId) {            
+               try {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Before getting favorites for user id: " + userId);
+                       
+                       // Divide this into 2 queries: one which returns the favorites items associated with Restricted apps,
+                       // and one that returns all the other favorites items. Then we can easily add the boolean flag
+                       // restrictedApp to each FavoritesFunctionalMenuItemJson, to be used by the front end.
+
+                       String sql = "SELECT f.user_id,f.menu_id,m.text,m.url "
+                                       + " FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "
+                                       + " WHERE f.user_id='" + userId + "' AND f.menu_id = m.menu_id "
+                                       + " AND f.menu_id = mr.menu_id "
+                                       + " AND mr.role_id = '" + RESTRICTED_APP_ROLE_ID + "' ";
+
+                       @SuppressWarnings("unchecked")
+                       List<FavoritesFunctionalMenuItemJson> menuItems = dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null);
+                       for (FavoritesFunctionalMenuItemJson menuItem : menuItems) {
+                               menuItem.restrictedApp = true;
+                       }
+                       
+                       sql = "SELECT DISTINCT f.user_id,f.menu_id,m.text,m.url "
+                                       + " FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "
+                                       + " WHERE f.user_id='" + userId + "' AND f.menu_id = m.menu_id "
+                                       + " AND f.menu_id = mr.menu_id "
+                                       + " AND mr.role_id != '" + RESTRICTED_APP_ROLE_ID + "' ";
+                       @SuppressWarnings("unchecked")
+                       List<FavoritesFunctionalMenuItemJson> menuItems2 = dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null);
+                       for (FavoritesFunctionalMenuItemJson menuItem : menuItems2) {
+                               menuItem.restrictedApp = false;
+                               menuItems.add(menuItem);
+                       }
+                       
+                       return menuItems;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in FunctionalMenuServiceImpl.getFavoriteItems. Details: " + EcompPortalUtils.getStackTrace(e));
+                       List<FavoritesFunctionalMenuItemJson> menuItems = new ArrayList<FavoritesFunctionalMenuItemJson>();
+                       return menuItems;
+               }                                                                                                                                       
+       }
+       
+       public FieldsValidator removeFavoriteItem(Long userId, Long menuId) {
+               boolean result = false;
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               
+               Session localSession = null;
+               Transaction transaction = null;
+               
+               try {                   
+                       
+                       FavoritesFunctionalMenuItem menuItemJson = new FavoritesFunctionalMenuItem();
+                       menuItemJson.userId = userId;
+                       menuItemJson.menuId = menuId;
+                       
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       localSession.delete(menuItemJson);
+                       localSession.flush();
+                       transaction.commit();                           
+                       result = true;
+                       logger.debug(EELFLoggerDelegate.debugLogger, String.format("After removing favorite for user id: " + userId + "; menu id: " + menuId));                                                         
+               } catch (Exception e) {
+                       EcompPortalUtils.rollbackTransaction(transaction,"removeFavoriteItem rollback, exception = " + e);
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               } finally {                                                             
+                       EcompPortalUtils.closeLocalSession(localSession, "removeFavoriteItem");
+               }                                                                                       
+               
+               if(result) {
+               }
+               else {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               
+               return fieldsValidator;
+       }
+       
+       @Override
+       public void assignHelpURLs(List<FunctionalMenuItem> menuItems) {
+               try {
+                       String user_guide_link = SystemProperties.getProperty(EPCommonSystemProperties.USER_GUIDE_URL);
+                       
+                       for(FunctionalMenuItem menuItem: menuItems){
+                               if(menuItem.text.equalsIgnoreCase("Contact Us")){
+                                       menuItem.setUrl("contactUs");
+                                       //menuItem.setRestrictedApp(true);
+                               }
+                               if(menuItem.text.equalsIgnoreCase("Get Access")) {
+                                       menuItem.setUrl("getAccess");
+                               }
+                               if(menuItem.text.equalsIgnoreCase("User Guide")) {
+                                       menuItem.setUrl(user_guide_link);
+                                       menuItem.setRestrictedApp(true);
+                               }
+                       }
+               } catch (Exception e) {         
+                       logger.error(EELFLoggerDelegate.errorLogger, "assignHelpURLs process failed. Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+               
+       }
+
+       public List<FunctionalMenuRole> getFunctionalMenuRole() {
+               String sql = "SELECT * from fn_menu_functional_roles";
+               logQuery(sql);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getFunctionalMenuRole: logged the query");
+
+               @SuppressWarnings("unchecked")
+               List<FunctionalMenuRole> functionalMenuRole = dataAccessService.executeSQLQuery(sql, FunctionalMenuRole.class, null);
+               
+               return functionalMenuRole;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<BusinessCardApplicationRole> getUserAppRolesList(String userId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("userId", userId);
+
+               List<BusinessCardApplicationRole> userAppRoles = null;
+               try {
+                       userAppRoles = dataAccessService
+                                       .executeNamedQuery("getUserApproles", params, null);
+               } catch (Exception e) {
+                       // TODO Auto-generated catch block
+                       logger.error(EELFLoggerDelegate.errorLogger, "getUserAppRolesList failed", e);
+               }               
+               return userAppRoles;
+       }
+       
+}
index 8b5e72e..e9dc281 100644 (file)
@@ -1,33 +1,33 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.GetAccessResult;\r
-\r
-public interface GetAccessService {\r
-       /**\r
-        * @return One entry per application function AND role; i.e., each application\r
-        *         appears many times.\r
-        */\r
-       List<GetAccessResult> getAppAccessList(EPUser user);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+
+public interface GetAccessService {
+       /**
+        * @return One entry per application function AND role; i.e., each application
+        *         appears many times.
+        */
+       List<GetAccessResult> getAppAccessList(EPUser user);
+}
index 37af1da..1f21592 100644 (file)
@@ -1,61 +1,61 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.GetAccessResult;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("getAccessService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class GetAccessServiceImpl implements GetAccessService{\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.GetAccessService#getAppAccessList()\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<GetAccessResult> getAppAccessList(EPUser user) {\r
-               final Map<String, Long> params = new HashMap<>();\r
-               List<GetAccessResult> appAccessList = null;\r
-               params.put("userId", user.getId());\r
-               appAccessList = dataAccessService\r
-                               .executeNamedQuery("getAppAccessFunctionRole", params, null);\r
-               return appAccessList;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("getAccessService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class GetAccessServiceImpl implements GetAccessService{
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       /*
+        * (non-Javadoc)
+        * @see org.openecomp.portalapp.portal.service.GetAccessService#getAppAccessList()
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<GetAccessResult> getAppAccessList(EPUser user) {
+               final Map<String, Long> params = new HashMap<>();
+               List<GetAccessResult> appAccessList = null;
+               params.put("userId", user.getId());
+               appAccessList = dataAccessService
+                               .executeNamedQuery("getAppAccessFunctionRole", params, null);
+               return appAccessList;
+       }
+
+}
index 7a10568..66932bf 100644 (file)
@@ -1,33 +1,33 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.io.IOException;\r
-import java.util.jar.Attributes;\r
-\r
-public interface ManifestService {\r
-       /**\r
-        * Gets the content of the webapp manifest file META-INF/MANIFEST.MF.\r
-        *\r
-        * @return Attributes object with key-value pairs from the manifest\r
-        * @throws IOException\r
-        */\r
-       public Attributes getWebappManifest() throws IOException;\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.io.IOException;
+import java.util.jar.Attributes;
+
+public interface ManifestService {
+       /**
+        * Gets the content of the webapp manifest file META-INF/MANIFEST.MF.
+        *
+        * @return Attributes object with key-value pairs from the manifest
+        * @throws IOException
+        */
+       public Attributes getWebappManifest() throws IOException;
+}
index 3d0f34a..5136985 100644 (file)
@@ -1,62 +1,62 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.jar.Attributes;\r
-import java.util.jar.Manifest;\r
-\r
-import javax.servlet.ServletContext;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("manifestService")\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class ManifestServiceImpl implements ManifestService {\r
-       @Autowired\r
-       ServletContext context;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.ManifestService#getWebappManifest()\r
-        */\r
-       public Attributes getWebappManifest() throws IOException {\r
-               EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestServiceImpl.class);\r
-               // Path to resource on classpath\r
-               final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";\r
-               // Manifest is formatted as Java-style properties\r
-               try {\r
-                       InputStream inputStream = context.getResourceAsStream(MANIFEST_RESOURCE_PATH);\r
-                       Manifest manifest = new Manifest(inputStream);\r
-                       inputStream.close();\r
-                       return manifest.getMainAttributes();\r
-               } catch (IOException e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getWebappManifest: failed to read/find manifest");\r
-                       throw e;\r
-               }\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.servlet.ServletContext;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("manifestService")
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class ManifestServiceImpl implements ManifestService {
+       @Autowired
+       ServletContext context;
+
+       /*
+        * (non-Javadoc)
+        * @see org.openecomp.portalapp.portal.service.ManifestService#getWebappManifest()
+        */
+       public Attributes getWebappManifest() throws IOException {
+               EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestServiceImpl.class);
+               // Path to resource on classpath
+               final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+               // Manifest is formatted as Java-style properties
+               try {
+                       InputStream inputStream = context.getResourceAsStream(MANIFEST_RESOURCE_PATH);
+                       Manifest manifest = new Manifest(inputStream);
+                       inputStream.close();
+                       return manifest.getMainAttributes();
+               } catch (IOException e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getWebappManifest: failed to read/find manifest");
+                       throw e;
+               }
+       }
+}
index 00fc9ad..3feffde 100644 (file)
@@ -1,59 +1,59 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.springframework.web.client.RestClientException;\r
-\r
-public interface MicroserviceProxyService {\r
-\r
-       /**\r
-        * Gets the specific microservice from table ep_microservice, communicates\r
-        * to microservice with the specified security type. The microservice sends\r
-        * back the response.\r
-        * \r
-        * Gets the data while testing the microservice with no widget associated with\r
-        * \r
-        * @param serviceId\r
-        *            Id of microservice to be used\r
-        * @return response sent from microservice\r
-        * @throws Exception\r
-        */\r
-       String proxyToDestination(long serviceId, EPUser user, HttpServletRequest request) throws Exception;\r
-       \r
-       \r
-       \r
-       /**\r
-        * Gets the microservice data based on the user id and widget id. Different\r
-        * users have his/her own parameters for one widget. The method sends back\r
-        * the response.\r
-        * \r
-        * @param widgetId\r
-        *                        Id of widget to be used\r
-        * @param user\r
-        *                        User information\r
-        * @param request\r
-        * @return response sent from microserivce \r
-        * @throws Exception\r
-        */\r
-       String proxyToDestinationByWidgetId(long widgetId, EPUser user, HttpServletRequest request) throws Exception;\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.springframework.web.client.RestClientException;
+
+public interface MicroserviceProxyService {
+
+       /**
+        * Gets the specific microservice from table ep_microservice, communicates
+        * to microservice with the specified security type. The microservice sends
+        * back the response.
+        * 
+        * Gets the data while testing the microservice with no widget associated with
+        * 
+        * @param serviceId
+        *            Id of microservice to be used
+        * @return response sent from microservice
+        * @throws Exception
+        */
+       String proxyToDestination(long serviceId, EPUser user, HttpServletRequest request) throws Exception;
+       
+       
+       
+       /**
+        * Gets the microservice data based on the user id and widget id. Different
+        * users have his/her own parameters for one widget. The method sends back
+        * the response.
+        * 
+        * @param widgetId
+        *                        Id of widget to be used
+        * @param user
+        *                        User information
+        * @param request
+        * @return response sent from microserivce 
+        * @throws Exception
+        */
+       String proxyToDestinationByWidgetId(long widgetId, EPUser user, HttpServletRequest request) throws Exception;
+}
index 3a520c8..df835a9 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-\r
-import org.apache.commons.codec.binary.Base64;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceData;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;\r
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.http.HttpEntity;\r
-import org.springframework.http.HttpHeaders;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.http.MediaType;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.web.client.HttpClientErrorException;\r
-import org.springframework.web.client.RestTemplate;\r
-\r
-@Service("microserviceProxyService")\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class MicroserviceProxyServiceImpl implements MicroserviceProxyService {\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceProxyServiceImpl.class);\r
-       private static final String BASIC_AUTH = "Basic Authentication";\r
-       private static final String NO_AUTH = "No Authentication";\r
-       private static final String COOKIE_AUTH = "Cookie based Authentication";\r
-       private static final String QUESTION_MARK = "?";\r
-       private static final String ADD_MARK = "&";\r
-\r
-       String whatService = "widgets-service";\r
-\r
-       @Autowired\r
-       private ConsulHealthService consulHealthService;\r
-       \r
-       @Autowired\r
-       MicroserviceService microserviceService;\r
-\r
-       @Autowired\r
-       WidgetParameterService widgetParameterService;\r
-\r
-       RestTemplate template = new RestTemplate();\r
-\r
-       @Override\r
-       public String proxyToDestination(long serviceId, EPUser user, HttpServletRequest request) throws Exception {\r
-\r
-               String response = null;\r
-               \r
-               // get the microservice object by the id\r
-               MicroserviceData data = microserviceService.getMicroserviceDataById(serviceId);\r
-\r
-               // No such microservice available\r
-               if (data == null) {\r
-                       return response;\r
-               }\r
-               List<MicroserviceParameter> params = data.getParameterList();\r
-               if (data.getSecurityType().equals(NO_AUTH)) {\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-\r
-               } else if (data.getSecurityType().equals(BASIC_AUTH)) {\r
-                       // encoding the username and password\r
-                       String plainCreds = data.getUsername() + ":" + decryptedPassword(data.getPassword());\r
-                       byte[] plainCredsBytes = plainCreds.getBytes();\r
-                       byte[] base64CredsBytes = Base64.encodeBase64(plainCredsBytes);\r
-                       String base64Creds = new String(base64CredsBytes);\r
-\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.add("Authorization", "Basic " + base64Creds);\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-               } else if (data.getSecurityType().equals(COOKIE_AUTH)) {\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       String rawCookie = request.getHeader("Cookie");\r
-                       headers.add("Cookie", rawCookie);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-               }\r
-               return response;\r
-       }\r
-       \r
-       @Override\r
-       public String proxyToDestinationByWidgetId(long widgetId, EPUser user, HttpServletRequest request) throws Exception {\r
-\r
-               String response = null;\r
-               \r
-               ResponseEntity<Long> ans = (ResponseEntity<Long>) template.exchange(\r
-                               "https://" + consulHealthService.getServiceLocation(whatService)\r
-                                               + "/widget/microservices/widgetCatalog/parameters/" + widgetId,\r
-                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), Long.class);\r
-               Long serviceId = ans.getBody();\r
-               \r
-               // get the microservice object by the id\r
-               MicroserviceData data = microserviceService.getMicroserviceDataById(serviceId);\r
-\r
-               // No such microservice available\r
-               if (data == null) {\r
-                       return response;\r
-               }\r
-\r
-               List<MicroserviceParameter> params = data.getParameterList();\r
-\r
-               for (MicroserviceParameter p : params) {\r
-                       WidgetCatalogParameter userValue = widgetParameterService.getUserParamById(widgetId, user.getId(), p.getId());\r
-                       if (userValue != null)\r
-                               p.setPara_value(userValue.getUser_value());\r
-               }\r
-\r
-               if (data.getSecurityType().equals(NO_AUTH)) {\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       try {\r
-                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-                       } catch (HttpClientErrorException e) {\r
-                               throw e;\r
-                       }\r
-               } else if (data.getSecurityType().equals(BASIC_AUTH)) {\r
-                       // encoding the username and password\r
-                       String plainCreds = data.getUsername() + ":" + decryptedPassword(data.getPassword());\r
-                       byte[] plainCredsBytes = plainCreds.getBytes();\r
-                       byte[] base64CredsBytes = Base64.encodeBase64(plainCredsBytes);\r
-                       String base64Creds = new String(base64CredsBytes);\r
-\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.add("Authorization", "Basic " + base64Creds);\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       try {\r
-                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-                       } catch (HttpClientErrorException e) {\r
-                               throw e;\r
-                       }\r
-               } else if (data.getSecurityType().equals(COOKIE_AUTH)) {\r
-                       HttpHeaders headers = new HttpHeaders();\r
-                       headers.setContentType(MediaType.APPLICATION_JSON);\r
-                       String rawCookie = request.getHeader("Cookie");\r
-                       headers.add("Cookie", rawCookie);\r
-                       HttpEntity<String> entity = new HttpEntity<String>(headers);\r
-\r
-                       String url = microserviceUrlConverter(data, params);\r
-                       try {\r
-                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();\r
-                       } catch (HttpClientErrorException e) {\r
-                               throw e;\r
-                       }\r
-               }\r
-               return response;\r
-       }\r
-\r
-       private String decryptedPassword(String encryptedPwd) throws Exception {\r
-               String result = "";\r
-               if (encryptedPwd != null & encryptedPwd.length() > 0) {\r
-                       try {\r
-                               result = CipherUtil.decrypt(encryptedPwd,\r
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);\r
-                               throw e;\r
-                       }\r
-               }\r
-               return result;\r
-       }\r
-\r
-       private String microserviceUrlConverter(MicroserviceData data, List<MicroserviceParameter> params) {\r
-               String url = data.getUrl();\r
-               for (int i = 0; i < params.size(); i++) {\r
-                       if (i == 0) {\r
-                               url += QUESTION_MARK;\r
-                       }\r
-                       url += params.get(i).getPara_key() + "=" + params.get(i).getPara_value();\r
-                       if (i != (params.size() - 1)) {\r
-                               url += ADD_MARK;\r
-                       }\r
-               }\r
-               return url;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.codec.binary.Base64;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+@Service("microserviceProxyService")
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class MicroserviceProxyServiceImpl implements MicroserviceProxyService {
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceProxyServiceImpl.class);
+       private static final String BASIC_AUTH = "Basic Authentication";
+       private static final String NO_AUTH = "No Authentication";
+       private static final String COOKIE_AUTH = "Cookie based Authentication";
+       private static final String QUESTION_MARK = "?";
+       private static final String ADD_MARK = "&";
+
+       String whatService = "widgets-service";
+
+       @Autowired
+       private ConsulHealthService consulHealthService;
+
+       @Autowired
+       MicroserviceService microserviceService;
+
+       @Autowired
+       WidgetParameterService widgetParameterService;
+
+       RestTemplate template = new RestTemplate();
+
+       @Override
+       public String proxyToDestination(long serviceId, EPUser user, HttpServletRequest request) throws Exception {
+
+               String response = null;
+
+               // get the microservice object by the id
+               MicroserviceData data = microserviceService.getMicroserviceDataById(serviceId);
+
+               // No such microservice available
+               if (data == null) {
+                       return response;
+               }
+               List<MicroserviceParameter> params = data.getParameterList();
+               MicroserviceParameter userId_param = new MicroserviceParameter();
+               userId_param.setPara_key("userId");
+               userId_param.setPara_value(user.getOrgUserId());
+               params.add(userId_param);
+
+               if (data.getSecurityType().equals(NO_AUTH)) {
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Before making no authentication call: {}", url);
+                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "No authentication call response: {}", response);
+
+               } else if (data.getSecurityType().equals(BASIC_AUTH)) {
+                       // encoding the username and password
+                       String plainCreds = data.getUsername() + ":" + decryptedPassword(data.getPassword());
+                       byte[] plainCredsBytes = plainCreds.getBytes();
+                       byte[] base64CredsBytes = Base64.encodeBase64(plainCredsBytes);
+                       String base64Creds = new String(base64CredsBytes);
+
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.add("Authorization", "Basic " + base64Creds);
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Before making basic authentication call: {}", url);
+                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Basic authentication call response: {}", response);
+
+               } else if (data.getSecurityType().equals(COOKIE_AUTH)) {
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       String rawCookie = request.getHeader("Cookie");
+                       headers.add("Cookie", rawCookie);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Before making cookie-based authentication call: {}", url);
+                       response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "Cookie-based authentication call response: {}", response);
+               }
+               return response;
+       }
+
+       @Override
+       public String proxyToDestinationByWidgetId(long widgetId, EPUser user, HttpServletRequest request)
+                       throws Exception {
+
+               String response = null;
+
+               @SuppressWarnings({ "rawtypes", "unchecked" })
+               ResponseEntity<Long> ans = (ResponseEntity<Long>) template.exchange(
+                               "https://"
+                                               + consulHealthService.getServiceLocation(whatService,
+                                                               SystemProperties.getProperty("microservices.widget.local.port"))
+                                               + "/widget/microservices/widgetCatalog/parameters/" + widgetId,
+                               HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), Long.class);
+               Long serviceId = ans.getBody();
+
+               // get the microservice object by the id
+               MicroserviceData data = microserviceService.getMicroserviceDataById(serviceId);
+
+               // No such microservice available
+               if (data == null) {
+                       return response;
+               }
+
+               List<MicroserviceParameter> params = data.getParameterList();
+               MicroserviceParameter userId_param = new MicroserviceParameter();
+               userId_param.setPara_key("userId");
+               userId_param.setPara_value(user.getOrgUserId());
+               params.add(userId_param);
+
+               for (MicroserviceParameter p : params) {
+                       WidgetCatalogParameter userValue = widgetParameterService.getUserParamById(widgetId, user.getId(),
+                                       p.getId());
+                       if (userValue != null)
+                               p.setPara_value(userValue.getUser_value());
+               }
+
+               if (data.getSecurityType().equals(NO_AUTH)) {
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       try {
+                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       } catch (HttpClientErrorException e) {
+                               throw e;
+                       }
+               } else if (data.getSecurityType().equals(BASIC_AUTH)) {
+                       // encoding the username and password
+                       String plainCreds = data.getUsername() + ":" + decryptedPassword(data.getPassword());
+                       byte[] plainCredsBytes = plainCreds.getBytes();
+                       byte[] base64CredsBytes = Base64.encodeBase64(plainCredsBytes);
+                       String base64Creds = new String(base64CredsBytes);
+
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.add("Authorization", "Basic " + base64Creds);
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       try {
+                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       } catch (HttpClientErrorException e) {
+                               throw e;
+                       }
+               } else if (data.getSecurityType().equals(COOKIE_AUTH)) {
+                       HttpHeaders headers = new HttpHeaders();
+                       headers.setContentType(MediaType.APPLICATION_JSON);
+                       String rawCookie = request.getHeader("Cookie");
+                       headers.add("Cookie", rawCookie);
+                       HttpEntity<String> entity = new HttpEntity<String>(headers);
+
+                       String url = microserviceUrlConverter(data, params);
+                       try {
+                               response = template.exchange(url, HttpMethod.GET, entity, String.class).getBody();
+                       } catch (HttpClientErrorException e) {
+                               throw e;
+                       }
+               }
+               return response;
+       }
+
+       private String decryptedPassword(String encryptedPwd) throws Exception {
+               String result = "";
+               if (encryptedPwd != null & encryptedPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.decrypt(encryptedPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);
+                               throw e;
+                       }
+               }
+               return result;
+       }
+
+       private String microserviceUrlConverter(MicroserviceData data, List<MicroserviceParameter> params) {
+               String url = data.getUrl();
+               for (int i = 0; i < params.size(); i++) {
+                       if (i == 0) {
+                               url += QUESTION_MARK;
+                       }
+                       url += params.get(i).getPara_key() + "=" + params.get(i).getPara_value();
+                       if (i != (params.size() - 1)) {
+                               url += ADD_MARK;
+                       }
+               }
+               return url;
+       }
+
+}
index cfc7ddb..df55abb 100644 (file)
@@ -1,86 +1,87 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.MicroserviceData;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;\r
-\r
-public interface MicroserviceService {\r
-\r
-       /**\r
-        * Get all microservices from the ep_microservice\r
-        * \r
-        * @return list of all microservices\r
-        * @throws Exception\r
-        */\r
-       List<MicroserviceData> getMicroserviceData() throws Exception;\r
-\r
-       /**\r
-        * Gets the specified microservice with id from ep_microservice\r
-        * \r
-        * @param id\r
-        *            ID of microservice to be fetched\r
-        * @return the microservice with the specified id\r
-        */\r
-       MicroserviceData getMicroserviceDataById(long id);\r
-\r
-       /**\r
-        * Saves the specified microservice to the table ep_microservice\r
-        * \r
-        * @param newService\r
-        *            Content of microservice to be saved\r
-        * @return new microservice id\r
-        * @throws Exception\r
-        */\r
-       Long saveMicroservice(MicroserviceData newService) throws Exception;\r
-\r
-       void saveServiceParameters(long serviceId, List<MicroserviceParameter> list) throws Exception;\r
-\r
-       /**\r
-        * Deletes the specified microservice from all tables where the serviceId is\r
-        * used\r
-        * \r
-        * @param serviceId\r
-        * @throws Exception\r
-        */\r
-       void deleteMicroservice(long serviceId) throws Exception;\r
-\r
-       /**\r
-        * Updates the specified microservice from all tables where the serviceId is\r
-        * used\r
-        * \r
-        * @param serviceId\r
-        *            Id of microservice to be updated\r
-        * @param newService\r
-        *            Content of microservice to be updated\r
-        * @throws Exception\r
-        */\r
-       void updateMicroservice(long serviceId, MicroserviceData newService) throws Exception;\r
-       \r
-       /**\r
-        * Gets the Service parameters by the service Id\r
-        * @param serviceId\r
-        * @return\r
-        */\r
-       List<MicroserviceParameter> getParametersById(long serviceId);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+
+public interface MicroserviceService {
+
+       /**
+        * Get all microservices from the ep_microservice
+        * 
+        * @return list of all microservices
+        * @throws Exception
+        */
+       List<MicroserviceData> getMicroserviceData() throws Exception;
+
+       /**
+        * Gets the specified microservice with id from ep_microservice
+        * 
+        * @param id
+        *            ID of microservice to be fetched
+        * @return the microservice with the specified id
+        */
+       MicroserviceData getMicroserviceDataById(long id);
+
+       /**
+        * Saves the specified microservice to the table ep_microservice
+        * 
+        * @param newService
+        *            Content of microservice to be saved
+        * @return new microservice id
+        * @throws Exception
+        */
+       Long saveMicroservice(MicroserviceData newService) throws Exception;
+
+       void saveServiceParameters(long serviceId, List<MicroserviceParameter> list) throws Exception;
+
+       /**
+        * Deletes the specified microservice from all tables where the serviceId is
+        * used
+        * 
+        * @param serviceId
+        * @throws Exception
+        */
+       void deleteMicroservice(long serviceId) throws Exception;
+
+       /**
+        * Updates the specified microservice from all tables where the serviceId is
+        * used
+        * 
+        * @param serviceId
+        *            Id of microservice to be updated
+        * @param newService
+        *            Content of microservice to be updated
+        * @throws Exception
+        */
+       void updateMicroservice(long serviceId, MicroserviceData newService) throws Exception;
+
+       /**
+        * Gets the Service parameters by the service Id
+        * 
+        * @param serviceId
+        * @return List<MicroserviceParameter>
+        */
+       List<MicroserviceParameter> getParametersById(long serviceId);
+
+}
index c0a2fa4..aaadfa1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.hibernate.criterion.Criterion;\r
-import org.hibernate.criterion.Restrictions;\r
-import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;\r
-import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequestDetail;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceData;\r
-import org.openecomp.portalapp.portal.domain.MicroserviceParameter;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalog;\r
-import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;\r
-import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.core.ParameterizedTypeReference;\r
-import org.springframework.http.HttpEntity;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.web.client.RestTemplate;\r
-\r
-@Service("microserviceService")\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class MicroserviceServiceImpl implements MicroserviceService {\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceServiceImpl.class);\r
-\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-\r
-       public Long saveMicroservice(MicroserviceData newService) throws Exception {\r
-               if (newService.getPassword() != null)\r
-                       newService.setPassword(encryptedPassword(newService.getPassword()));\r
-               getDataAccessService().saveDomainObject(newService, null);\r
-               return newService.getId();\r
-       }\r
-\r
-       public void saveServiceParameters(long serviceId, List<MicroserviceParameter> list) throws Exception {\r
-               for (int i = 0; i < list.size(); i++) {\r
-                       MicroserviceParameter para = list.get(i);\r
-                       para.setServiceId(serviceId);\r
-                       getDataAccessService().saveDomainObject(para, null);\r
-               }\r
-       }\r
-\r
-       @Override\r
-       public MicroserviceData getMicroserviceDataById(long id) {\r
-               MicroserviceData data = null;\r
-               try {\r
-                       data = (MicroserviceData) dataAccessService\r
-                                       .getList(MicroserviceData.class, " where id = '" + id + "'", null, null).get(0);\r
-                       data.setParameterList(getServiceParameters(id));\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "getMicroserviceDataById failed", e);\r
-                       throw e;\r
-               }\r
-               return data;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<MicroserviceData> getMicroserviceData() throws Exception {\r
-               List<MicroserviceData> list = (List<MicroserviceData>) dataAccessService.getList(MicroserviceData.class, null);\r
-               for (int i = 0; i < list.size(); i++) {\r
-                       if (list.get(i).getPassword() != null)\r
-                               list.get(i).setPassword(decryptedPassword(list.get(i).getPassword()));\r
-                       list.get(i).setParameterList(getServiceParameters(list.get(i).getId()));\r
-               }\r
-               return list;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       private List<MicroserviceParameter> getServiceParameters(long serviceId) {\r
-               List<MicroserviceParameter> list = (List<MicroserviceParameter>) dataAccessService\r
-                               .getList(MicroserviceParameter.class, " where service_id = '" + serviceId + "'", null, null);\r
-               return list;\r
-       }\r
-\r
-       @Override\r
-       public void deleteMicroservice(long serviceId) throws Exception {\r
-\r
-               try {\r
-                       Map<String, String> params = new HashMap<String, String>();\r
-                       params.put("serviceId", Long.toString(serviceId));\r
-\r
-                       dataAccessService.executeNamedQuery("deleteMicroserviceParameter", params, null);\r
-                       dataAccessService.executeNamedQuery("deleteMicroservice", params, null);\r
-\r
-               } catch (Exception e) {\r
-                       e.printStackTrace();\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "deleteMicroservice failed", e);\r
-                       throw e;\r
-               }\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public void updateMicroservice(long serviceId, MicroserviceData newService) throws Exception {\r
-               try {\r
-                       newService.setId(serviceId);\r
-                       if (newService.getPassword() != null)\r
-                               newService.setPassword(encryptedPassword(newService.getPassword()));\r
-                       getDataAccessService().saveDomainObject(newService, null);\r
-                       List<MicroserviceParameter> oldService = getServiceParameters(serviceId);\r
-                       boolean foundParam;\r
-                       for (int i = 0; i < oldService.size(); i++) {\r
-                               foundParam = false;\r
-                               for (int n = 0; n < newService.getParameterList().size(); n++) {\r
-                                       if (newService.getParameterList().get(n).getId() == oldService.get(i).getId()) {\r
-                                               foundParam = true;\r
-                                               break;\r
-                                       }\r
-                               }\r
-                               if (foundParam == false) {\r
-                                       MicroserviceParameter pd = oldService.get(i);\r
-                                       Session localSession = sessionFactory.openSession();\r
-                                       localSession.delete(pd);\r
-                                       localSession.flush();\r
-                                       localSession.clear();\r
-                               }\r
-\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "updateMicroservice failed", e);\r
-                       throw e;\r
-               }\r
-               saveServiceParameters(serviceId, newService.getParameterList());\r
-       }\r
-\r
-       @Override\r
-       @SuppressWarnings("unchecked")\r
-       public List<MicroserviceParameter> getParametersById(long serviceId) {\r
-               List<Criterion> restrictionsList = new ArrayList<Criterion>();\r
-               Criterion contextIdCrit = Restrictions.eq("serviceId", serviceId);\r
-               restrictionsList.add(contextIdCrit);\r
-               List<MicroserviceParameter> list = (List<MicroserviceParameter>) dataAccessService\r
-                               .getList(MicroserviceParameter.class, null, restrictionsList, null);\r
-               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                               "getParametersById: microservice parameters list size: " + list.size());\r
-               return list;\r
-       }\r
-\r
-       private String decryptedPassword(String encryptedPwd) throws Exception {\r
-               String result = "";\r
-               if (encryptedPwd != null & encryptedPwd.length() > 0) {\r
-                       try {\r
-                               result = CipherUtil.decrypt(encryptedPwd,\r
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);\r
-                               throw e;\r
-                       }\r
-               }\r
-               return result;\r
-       }\r
-\r
-       private String encryptedPassword(String decryptedPwd) throws Exception {\r
-               String result = "";\r
-               if (decryptedPwd != null & decryptedPwd.length() > 0) {\r
-                       try {\r
-                               result = CipherUtil.encrypt(decryptedPwd,\r
-                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword failed", e);\r
-                               throw e;\r
-                       }\r
-               }\r
-               return result;\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.Restrictions;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("microserviceService")
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class MicroserviceServiceImpl implements MicroserviceService {
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MicroserviceServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       public Long saveMicroservice(MicroserviceData newService) throws Exception {
+               if (newService.getPassword() != null)
+                       newService.setPassword(encryptedPassword(newService.getPassword()));
+               getDataAccessService().saveDomainObject(newService, null);
+               return newService.getId();
+       }
+
+       public void saveServiceParameters(long serviceId, List<MicroserviceParameter> list) throws Exception {
+               for (int i = 0; i < list.size(); i++) {
+                       MicroserviceParameter para = list.get(i);
+                       para.setServiceId(serviceId);
+                       getDataAccessService().saveDomainObject(para, null);
+               }
+       }
+
+       @Override
+       public MicroserviceData getMicroserviceDataById(long id) {
+               MicroserviceData data = null;
+               try {
+                       data = (MicroserviceData) dataAccessService
+                                       .getList(MicroserviceData.class, " where id = '" + id + "'", null, null).get(0);
+                       data.setParameterList(getServiceParameters(id));
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getMicroserviceDataById failed", e);
+                       throw e;
+               }
+               return data;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<MicroserviceData> getMicroserviceData() throws Exception {
+               List<MicroserviceData> list = (List<MicroserviceData>) dataAccessService.getList(MicroserviceData.class, null);
+               for (int i = 0; i < list.size(); i++) {
+                       if (list.get(i).getPassword() != null)
+                               list.get(i).setPassword(decryptedPassword(list.get(i).getPassword()));
+                       list.get(i).setParameterList(getServiceParameters(list.get(i).getId()));
+               }
+               return list;
+       }
+
+       @SuppressWarnings("unchecked")
+       private List<MicroserviceParameter> getServiceParameters(long serviceId) {
+               List<MicroserviceParameter> list = (List<MicroserviceParameter>) dataAccessService
+                               .getList(MicroserviceParameter.class, " where service_id = '" + serviceId + "'", null, null);
+               return list;
+       }
+
+       @Override
+       public void deleteMicroservice(long serviceId) throws Exception {
+
+               try {
+                       Map<String, String> params = new HashMap<String, String>();
+                       params.put("serviceId", Long.toString(serviceId));
+
+                       dataAccessService.executeNamedQuery("deleteMicroserviceParameter", params, null);
+                       dataAccessService.executeNamedQuery("deleteMicroservice", params, null);
+
+               } catch (Exception e) {
+                       e.printStackTrace();
+                       logger.error(EELFLoggerDelegate.errorLogger, "deleteMicroservice failed", e);
+                       throw e;
+               }
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public void updateMicroservice(long serviceId, MicroserviceData newService) throws Exception {
+               try {
+                       newService.setId(serviceId);
+                       if (newService.getPassword() != null)
+                               newService.setPassword(encryptedPassword(newService.getPassword()));
+                       getDataAccessService().saveDomainObject(newService, null);
+                       List<MicroserviceParameter> oldService = getServiceParameters(serviceId);
+                       boolean foundParam;
+                       for (int i = 0; i < oldService.size(); i++) {
+                               foundParam = false;
+                               for (int n = 0; n < newService.getParameterList().size(); n++) {
+                                       if (newService.getParameterList().get(n).getId().equals(oldService.get(i).getId())) {
+                                               foundParam = true;
+                                               break;
+                                       }
+                               }
+                               if (foundParam == false) {
+                                       MicroserviceParameter pd = oldService.get(i);
+                                       getDataAccessService().deleteDomainObject(pd, null);
+                               }
+                       }
+                       for (int i = 0; i < newService.getParameterList().size(); i++) {
+                               MicroserviceParameter param = newService.getParameterList().get(i);
+                               param.setServiceId(serviceId);
+                               getDataAccessService().saveDomainObject(param, null);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "updateMicroservice failed", e);
+                       throw e;
+               }
+               saveServiceParameters(serviceId, newService.getParameterList());
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       public List<MicroserviceParameter> getParametersById(long serviceId) {
+               List<Criterion> restrictionsList = new ArrayList<Criterion>();
+               Criterion contextIdCrit = Restrictions.eq("serviceId", serviceId);
+               restrictionsList.add(contextIdCrit);
+               List<MicroserviceParameter> list = (List<MicroserviceParameter>) dataAccessService
+                               .getList(MicroserviceParameter.class, null, restrictionsList, null);
+               logger.debug(EELFLoggerDelegate.debugLogger,
+                               "getParametersById: microservice parameters list size: " + list.size());
+               return list;
+       }
+
+       private String decryptedPassword(String encryptedPwd) throws Exception {
+               String result = "";
+               if (encryptedPwd != null & encryptedPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.decrypt(encryptedPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "decryptedPassword failed", e);
+                               throw e;
+                       }
+               }
+               return result;
+       }
+
+       private String encryptedPassword(String decryptedPwd) throws Exception {
+               String result = "";
+               if (decryptedPwd != null & decryptedPwd.length() > 0) {
+                       try {
+                               result = CipherUtil.encrypt(decryptedPwd,
+                                               SystemProperties.getProperty(SystemProperties.Decryption_Key));
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "encryptedPassword failed", e);
+                               throw e;
+                       }
+               }
+               return result;
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+}
index 7874fa7..af957dc 100644 (file)
@@ -1,42 +1,42 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public interface PersUserAppService {\r
-\r
-       /**\r
-        * Sets the appropriate code in the user personalization table to indicate\r
-        * the application is (de)selected and/or pending.\r
-        * \r
-        * @param user\r
-        *            EP User\r
-        * @param app\r
-        *            EP Application\r
-        * @param select\r
-        *            True or false\r
-        * @param select\r
-        *            True or false\r
-        */\r
-       void setPersUserAppValue(EPUser user, EPApp app, boolean select, boolean pending);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public interface PersUserAppService {
+
+       /**
+        * Sets the appropriate code in the user personalization table to indicate
+        * the application is (de)selected and/or pending.
+        * 
+        * @param user
+        *            EP User
+        * @param app
+        *            EP Application
+        * @param select
+        *            True or false
+        * @param pending
+        *            True or false
+        */
+       void setPersUserAppValue(EPUser user, EPApp app, boolean select, boolean pending);
+
+}
index 6ff10ab..243b61e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserApp;\r
-import org.openecomp.portalapp.portal.domain.PersUserAppSelection;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("persUserAppService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class PersUserAppServiceImpl implements PersUserAppService {\r
-\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PersUserAppServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       private AdminRolesService adminRolesService;\r
-       @Autowired\r
-       private UserRolesService userRolesService;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.UserAppSelectService#\r
-        * setAppCatalogSelection(org.openecomp.portalapp.portal.domain.EPUser,\r
-        * org.openecomp.portalapp.portal.transport.AppCatalogSelection)\r
-        */\r
-       @Override\r
-       public void setPersUserAppValue(EPUser user, EPApp app, boolean select, boolean pending) {\r
-               if (user == null || app == null)\r
-                       throw new IllegalArgumentException("setPersUserAppValue: Null values");\r
-\r
-               // Find the record for this user-app combo, if any\r
-               String filter = " where user_id = " + Long.toString(user.getId()) + " and app_id = "\r
-                               + Long.toString(app.getId());\r
-               @SuppressWarnings("unchecked")\r
-               List<PersUserAppSelection> persList = dataAccessService.getList(PersUserAppSelection.class, filter, null, null);\r
-\r
-               // Key constraint limits to 1 row\r
-               PersUserAppSelection persRow = null;\r
-               if (persList.size() == 1)\r
-                       persRow = persList.get(0);\r
-               else\r
-                       persRow = new PersUserAppSelection(null, user.getId(), app.getId(), null);\r
-\r
-               if (app.getOpen()) {\r
-                       // Pending status is not meaningful for open apps.\r
-                       if (pending)\r
-                               logger.error(EELFLoggerDelegate.errorLogger,\r
-                                               "setPersUserAppValue: invalid request, ignoring set-pending for open app");\r
-\r
-                       // Open apps have same behavior for regular and admin users\r
-                       if (select) {\r
-                               // Selection of an open app requires a record\r
-                               persRow.setStatusCode("S"); // show\r
-                               dataAccessService.saveDomainObject(persRow, null);\r
-                       } else {\r
-                               // De-selection of an open app requires no record\r
-                               if (persRow.getId() != null)\r
-                                       dataAccessService.deleteDomainObject(persRow, null);\r
-                       }\r
-               } else {\r
-                       // Non-open app.\r
-\r
-                       // Pending overrides select.\r
-                       if (pending) {\r
-                               persRow.setStatusCode("P");\r
-                               dataAccessService.saveDomainObject(persRow, null);\r
-                       } else {\r
-                               // Behavior depends on Portal (super) admin status, bcos an\r
-                               // admin can force an app onto the dashboard.\r
-                               boolean isPortalAdmin = adminRolesService.isSuperAdmin(user);\r
-                               boolean adminUserHasAppRole = false;\r
-                               if (isPortalAdmin) {\r
-                                       List<EPUserApp> roles = userRolesService.getCachedAppRolesForUser(app.getId(), user.getId());\r
-                                       adminUserHasAppRole = (roles.size() > 0);\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "setPersUserAppValue: app {}, admin user {}, role count {}",\r
-                                                       app.getId(), user.getId(), roles.size());\r
-                               }\r
-\r
-                               if (select) {\r
-                                       if (isPortalAdmin && !adminUserHasAppRole) {\r
-                                               // The special case: portal admin, no role\r
-                                               persRow.setStatusCode("S"); // show\r
-                                               dataAccessService.saveDomainObject(persRow, null);\r
-                                       } else {\r
-                                               // User has role-based access to the app.\r
-                                               // Showing an accessible app requires no record.\r
-                                               if (persRow.getId() != null)\r
-                                                       dataAccessService.deleteDomainObject(persRow, null);\r
-                                       }\r
-                               } // select\r
-                               else {\r
-                                       if (isPortalAdmin && !adminUserHasAppRole) {\r
-                                               // The special case: portal admin, no role\r
-                                               if (persRow.getId() != null)\r
-                                                       dataAccessService.deleteDomainObject(persRow, null);\r
-                                       } else {\r
-                                               // User has role-based access to the app.\r
-                                               // Hiding an accessible app requires a record\r
-                                               persRow.setStatusCode("H"); // hide\r
-                                               dataAccessService.saveDomainObject(persRow, null);\r
-                                       }\r
-                               } // deselect\r
-                       }\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("persUserAppService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class PersUserAppServiceImpl implements PersUserAppService {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PersUserAppServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       private AdminRolesService adminRolesService;
+       @Autowired
+       private UserRolesService userRolesService;
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserAppSelectService#
+        * setAppCatalogSelection(org.openecomp.portalapp.portal.domain.EPUser,
+        * org.openecomp.portalapp.portal.transport.AppCatalogSelection)
+        */
+       @Override
+       public void setPersUserAppValue(EPUser user, EPApp app, boolean select, boolean pending) {
+               if (user == null || app == null)
+                       throw new IllegalArgumentException("setPersUserAppValue: Null values");
+
+               // Find the record for this user-app combo, if any
+               String filter = " where user_id = " + Long.toString(user.getId()) + " and app_id = "
+                               + Long.toString(app.getId());
+               @SuppressWarnings("unchecked")
+               List<PersUserAppSelection> persList = dataAccessService.getList(PersUserAppSelection.class, filter, null, null);
+
+               // Key constraint limits to 1 row
+               PersUserAppSelection persRow = null;
+               if (persList.size() == 1)
+                       persRow = persList.get(0);
+               else
+                       persRow = new PersUserAppSelection(null, user.getId(), app.getId(), null);
+
+               if (app.getOpen()) {
+                       // Pending status is not meaningful for open apps.
+                       if (pending)
+                               logger.error(EELFLoggerDelegate.errorLogger,
+                                               "setPersUserAppValue: invalid request, ignoring set-pending for open app");
+
+                       // Open apps have same behavior for regular and admin users
+                       if (select) {
+                               // Selection of an open app requires a record
+                               persRow.setStatusCode("S"); // show
+                               dataAccessService.saveDomainObject(persRow, null);
+                       } else {
+                               // De-selection of an open app requires no record
+                               if (persRow.getId() != null)
+                                       dataAccessService.deleteDomainObject(persRow, null);
+                       }
+               } else {
+                       // Non-open app.
+
+                       // Pending overrides select.
+                       if (pending) {
+                               persRow.setStatusCode("P");
+                               dataAccessService.saveDomainObject(persRow, null);
+                       } else {
+                               // Behavior depends on Portal (super) admin status, bcos an
+                               // admin can force an app onto the dashboard.
+                               boolean isPortalAdmin = adminRolesService.isSuperAdmin(user);
+                               boolean adminUserHasAppRole = false;
+                               if (isPortalAdmin) {
+                                       List<EPUserApp> roles = userRolesService.getCachedAppRolesForUser(app.getId(), user.getId());
+                                       adminUserHasAppRole = (roles.size() > 0);
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "setPersUserAppValue: app {}, admin user {}, role count {}",
+                                                       app.getId(), user.getId(), roles.size());
+                               }
+
+                               if (select) {
+                                       if (isPortalAdmin) {
+                                               // The special case: portal admin
+                                               persRow.setStatusCode("S"); // show
+                                               dataAccessService.saveDomainObject(persRow, null);
+                                       } else {
+                                               // User has role-based access to the app.
+                                               // Showing an accessible app requires no record.
+                                               if (persRow.getId() != null)
+                                                       dataAccessService.deleteDomainObject(persRow, null);
+                                       }
+                               } // select
+                               else {
+                                       if (isPortalAdmin && !adminUserHasAppRole) {
+                                               // The special case: portal admin, no role
+                                               if (persRow.getId() != null)
+                                                       dataAccessService.deleteDomainObject(persRow, null);
+                                       } else {
+                                               // User has role-based access to the app.
+                                               // Hiding an accessible app requires a record
+                                               persRow.setStatusCode("H"); // hide
+                                               dataAccessService.saveDomainObject(persRow, null);
+                                       }
+                               } // deselect
+                       }
+               }
+       }
+
+}
index d3a46d9..1b18e65 100644 (file)
@@ -1,41 +1,39 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public interface PersUserWidgetService {\r
-       \r
-       /**\r
-        * Sets the appropriate code in the user personalization table to indicate\r
-        * the application is (de)selected and/or pending.\r
-        * \r
-        * @param user\r
-        *            EP User\r
-        * @param app\r
-        *            EP Application\r
-        * @param select\r
-        *            True or false\r
-        * @param select\r
-        *            True or false\r
-        */\r
-       void setPersUserAppValue(EPUser user, Long widgetId, boolean select);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public interface PersUserWidgetService {
+
+       /**
+        * Sets the appropriate code in the user personalization table to indicate
+        * the application is (de)selected and/or pending.
+        * 
+        * @param user
+        *            EP User
+        * @param widgetId
+        *            widget
+        * @param select
+        *            True or false
+        */
+       void setPersUserAppValue(EPUser user, Long widgetId, boolean select);
+
+}
index 9a45dea..189b310 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("persUserWidgetService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class PersUserWidgetServiceImpl implements PersUserWidgetService{\r
-       \r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PersUserAppServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       \r
-       @Override\r
-       public void setPersUserAppValue(EPUser user, Long widgetId, boolean select) {\r
-               if (user == null || widgetId == null)\r
-                       throw new IllegalArgumentException("setPersUserAppValue: Null values");\r
-\r
-               String filter = " where user_id = " + Long.toString(user.getId()) + " and widget_id = "\r
-                               + Long.toString(widgetId);\r
-               @SuppressWarnings("unchecked")\r
-               List<PersUserWidgetSelection> persList = dataAccessService.getList(PersUserWidgetSelection.class, filter, null, null);\r
-\r
-               // Key constraint limits to 1 row\r
-               PersUserWidgetSelection persRow = null;\r
-               if (persList.size() == 1){\r
-                       persRow = persList.get(0);\r
-               }\r
-               else {\r
-                       persRow = new PersUserWidgetSelection(null, user.getId(), widgetId, null);\r
-               }                       \r
-               if(select){\r
-                       if (persRow.getId() != null){\r
-                               dataAccessService.deleteDomainObject(persRow, null);                            \r
-                       }\r
-                       persRow.setStatusCode("S"); // show\r
-                       dataAccessService.saveDomainObject(persRow, null);                      \r
-               } else{\r
-                       if (persRow.getId() != null){\r
-                               dataAccessService.deleteDomainObject(persRow, null);\r
-                       } \r
-                       persRow.setStatusCode("H"); // Hide\r
-                       dataAccessService.saveDomainObject(persRow, null);                      \r
-               }\r
-               \r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("persUserWidgetService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class PersUserWidgetServiceImpl implements PersUserWidgetService{
+       
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PersUserAppServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+       
+       @Override
+       public void setPersUserAppValue(EPUser user, Long widgetId, boolean select) {
+               if (user == null || widgetId == null)
+                       throw new IllegalArgumentException("setPersUserAppValue: Null values");
+
+               String filter = " where user_id = " + Long.toString(user.getId()) + " and widget_id = "
+                               + Long.toString(widgetId);
+               @SuppressWarnings("unchecked")
+               List<PersUserWidgetSelection> persList = dataAccessService.getList(PersUserWidgetSelection.class, filter, null, null);
+
+               // Key constraint limits to 1 row
+               PersUserWidgetSelection persRow = null;
+               if (persList.size() == 1){
+                       persRow = persList.get(0);
+               }
+               else {
+                       persRow = new PersUserWidgetSelection(null, user.getId(), widgetId, null);
+               }                       
+               if(select){
+                       if (persRow.getId() != null){
+                               dataAccessService.deleteDomainObject(persRow, null);                            
+                       }
+                       persRow.setStatusCode("S"); // show
+                       dataAccessService.saveDomainObject(persRow, null);                      
+               } else{
+                       if (persRow.getId() != null){
+                               dataAccessService.deleteDomainObject(persRow, null);
+                       } 
+                       persRow.setStatusCode("H"); // Hide
+                       dataAccessService.saveDomainObject(persRow, null);                      
+               }
+               
+       }
+
+}
index 55b3afd..ebbe52f 100644 (file)
@@ -1,31 +1,31 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.PortalAdmin;\r
-\r
-public interface PortalAdminService {\r
-       List<PortalAdmin> getPortalAdmins ();\r
-       FieldsValidator createPortalAdmin(String orgUserId);\r
-       FieldsValidator deletePortalAdmin(Long userId);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.PortalAdmin;
+
+public interface PortalAdminService {
+       List<PortalAdmin> getPortalAdmins ();
+       FieldsValidator createPortalAdmin(String orgUserId);
+       FieldsValidator deletePortalAdmin(Long userId);
+}
index 639bfc4..0963f04 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import javax.annotation.PostConstruct;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.PortalAdmin;\r
-import org.openecomp.portalapp.portal.transport.PortalAdminUserRole;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Service("portalAdminService")\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class PortalAdminServiceImpl implements PortalAdminService {\r
-\r
-       private String SYS_ADMIN_ROLE_ID = "1";\r
-       private String ECOMP_APP_ID = "1";\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalAdminServiceImpl.class);\r
-\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       SearchService searchService;\r
-\r
-       @PostConstruct\r
-       private void init() {\r
-               SYS_ADMIN_ROLE_ID = SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID);\r
-               ECOMP_APP_ID = SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);\r
-       }\r
-\r
-       public List<PortalAdmin> getPortalAdmins() {\r
-               try {\r
-                       String sql = "SELECT u.user_id, u.first_name, u.last_name, u.login_id "\r
-                                       + " FROM fn_user u, fn_user_role ur WHERE u.user_id = ur.user_id AND ur.role_id="\r
-                                       + SYS_ADMIN_ROLE_ID;\r
-                       logQuery(sql);\r
-\r
-                       @SuppressWarnings("unchecked")\r
-                       List<PortalAdmin> portalAdmins = dataAccessService.executeSQLQuery(sql, PortalAdmin.class, null);\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "getPortalAdmins was successful");\r
-                       return portalAdmins;\r
-\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred while performing getPortalAdmins operation, Details: "\r
-                                                       + EcompPortalUtils.getStackTrace(e));\r
-                       return null;\r
-               }\r
-       }\r
-\r
-       @SuppressWarnings("unchecked") \r
-       public FieldsValidator createPortalAdmin(String orgUserId) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator(); \r
-               logger.debug(EELFLoggerDelegate.debugLogger, "LR: createPortalAdmin: test 1"); \r
-               boolean result = false; \r
-               EPUser user = null; \r
-               boolean createNewUser = false; \r
-               List<EPUser> localUserList = dataAccessService.getList(EPUser.class, " where orgUserId='" + orgUserId + "'",\r
-                               null, null); \r
-               if (localUserList.size() > 0) { \r
-                       user = localUserList.get(0); \r
-               } else { \r
-                       createNewUser = true; \r
-               } \r
\r
-               if (user!=null && isLoggedInUserPortalAdmin(user.getId())) { \r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT); \r
-                       logger.error(EELFLoggerDelegate.errorLogger, "User '" + user.getOrgUserId() + "' already has PortalAdmin role assigned."); \r
-               } \r
-               else if (user != null || createNewUser) { \r
-                       Session localSession = null; \r
-                       Transaction transaction = null; \r
-                       try { \r
-                               localSession = sessionFactory.openSession(); \r
\r
-                               transaction = localSession.beginTransaction(); \r
-                               if (createNewUser) { \r
-                               user = this.searchService.searchUserByUserId(orgUserId);\r
-                                       if (user != null) { \r
-                                               // insert the user with active true in order to \r
-                                               // pass login phase. \r
-                                               user.setActive(true); \r
-                                               localSession.save(EPUser.class.getName(), user); \r
-                                       } \r
-                               } \r
-                               if (user != null) { \r
-                                       Long userid = user.getId(); \r
-                                       PortalAdminUserRole userRole = new PortalAdminUserRole(); \r
-                                       userRole.userId = userid; \r
-                                       userRole.roleId = Long.valueOf(SYS_ADMIN_ROLE_ID); \r
-                                       userRole.appId = Long.valueOf(ECOMP_APP_ID); \r
\r
-                                       localSession.save(PortalAdminUserRole.class.getName(), userRole); \r
-                               } \r
-       //                      logger.debug(EELFLoggerDelegate.debugLogger, "after saving menu object, new id: " + userid); \r
\r
-                               transaction.commit(); \r
-                               result = true; \r
-                       } catch (Exception e) { \r
-                               EcompPortalUtils.rollbackTransaction(transaction, \r
-                                               "createPortalAdmin rollback, exception = " + e); \r
-                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e)); \r
-                       } finally { \r
-                               EcompPortalUtils.closeLocalSession(localSession, "createPortalAdmin"); \r
-                       } \r
-                       if (!result) { \r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "LR: createPortalAdmin: no result. setting httpStatusCode to " \r
-                                               + HttpServletResponse.SC_INTERNAL_SERVER_ERROR); \r
-                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); \r
-                               logger.error(EELFLoggerDelegate.errorLogger, "PortalAdminServiceImpl.createPortalAdmin: bad request"); \r
-                       } \r
-               } \r
-               return fieldsValidator; \r
-       }\r
-       \r
-       public FieldsValidator deletePortalAdmin(Long userId) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "deletePortalAdmin: test 1");\r
-               boolean result = false;\r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       dataAccessService.deleteDomainObjects(PortalAdminUserRole.class,\r
-                                       "user_id='" + userId + "' AND role_id='" + SYS_ADMIN_ROLE_ID + "'", null);\r
-                       transaction.commit();\r
-                       result = true;\r
-               } catch (Exception e) {\r
-                       EcompPortalUtils.rollbackTransaction(transaction, "deletePortalAdmin rollback, exception = " + e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "deletePortalAdmin");\r
-               }\r
-               if (result) {\r
-               } else {\r
-                       logger.debug(EELFLoggerDelegate.debugLogger, "deletePortalAdmin: no result. setting httpStatusCode to "\r
-                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       private void logQuery(String sql) {\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);\r
-       }\r
-       \r
-       private boolean isLoggedInUserPortalAdmin(Long userId) { \r
-               try { \r
-                       String sql = "SELECT u.user_id, u.first_name, u.last_name, u.login_id " + \r
-                                       " FROM fn_user u, fn_user_role ur " + \r
-                                       " WHERE u.user_id = ur.user_id " + \r
-                                       " AND ur.user_id=" + userId + \r
-                                       " AND ur.role_id=" + SYS_ADMIN_ROLE_ID;\r
\r
-                       logQuery(sql); \r
\r
-                       @SuppressWarnings("unchecked") \r
-                       List<PortalAdmin> portalAdmins = dataAccessService.executeSQLQuery(sql, PortalAdmin.class, null); \r
-                       logger.debug(EELFLoggerDelegate.debugLogger, portalAdmins.toString()); \r
-                       if (portalAdmins==null || portalAdmins.size()<=0) { \r
-                               return false; \r
-                       } \r
-                       return true; \r
\r
-               } catch (Exception e) { \r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing isLoggedInUserPortalAdmin operation, Details: " + EcompPortalUtils.getStackTrace(e)); \r
-                       return false; \r
-               } \r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletResponse;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.PortalAdmin;
+import org.openecomp.portalapp.portal.transport.PortalAdminUserRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("portalAdminService")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class PortalAdminServiceImpl implements PortalAdminService {
+
+       private String SYS_ADMIN_ROLE_ID = "1";
+       private String ECOMP_APP_ID = "1";
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PortalAdminServiceImpl.class);
+
+       @Autowired
+       private SessionFactory sessionFactory;
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       SearchService searchService;
+
+       @PostConstruct
+       private void init() {
+               SYS_ADMIN_ROLE_ID = SystemProperties.getProperty(SystemProperties.SYS_ADMIN_ROLE_ID);
+               ECOMP_APP_ID = SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);
+       }
+
+       public List<PortalAdmin> getPortalAdmins() {
+               try {
+                       Map<String, String> params = new HashMap<>();
+                       params.put("adminRoleId", SYS_ADMIN_ROLE_ID);
+                       @SuppressWarnings("unchecked")
+                       List<PortalAdmin> portalAdmins = (List<PortalAdmin>) dataAccessService.executeNamedQuery("getPortalAdmins",
+                                       params, null);
+                       logger.debug(EELFLoggerDelegate.debugLogger, "getPortalAdmins was successful");
+                       return portalAdmins;
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing getPortalAdmins operation, Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+                       return null;
+               }
+       }
+
+       @SuppressWarnings("unchecked")
+       public FieldsValidator createPortalAdmin(String orgUserId) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               logger.debug(EELFLoggerDelegate.debugLogger, "LR: createPortalAdmin: test 1");
+               boolean result = false;
+               EPUser user = null;
+               boolean createNewUser = false;
+               List<EPUser> localUserList = dataAccessService.getList(EPUser.class, " where orgUserId='" + orgUserId + "'",
+                               null, null);
+               if (localUserList.size() > 0) {
+                       user = localUserList.get(0);
+               } else {
+                       createNewUser = true;
+               }
+
+               if (user != null && isLoggedInUserPortalAdmin(user.getId())) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "User '" + user.getOrgUserId() + "' already has PortalAdmin role assigned.");
+               } else if (user != null || createNewUser) {
+                       Session localSession = null;
+                       Transaction transaction = null;
+                       try {
+                               localSession = sessionFactory.openSession();
+
+                               transaction = localSession.beginTransaction();
+                               if (createNewUser) {
+                                       user = this.searchService.searchUserByUserId(orgUserId);
+                                       if (user != null) {
+                                               // insert the user with active true in order to
+                                               // pass login phase.
+                                               user.setActive(true);
+                                               localSession.save(EPUser.class.getName(), user);
+                                       }
+                               }
+                               if (user != null) {
+                                       Long userid = user.getId();
+                                       PortalAdminUserRole userRole = new PortalAdminUserRole();
+                                       userRole.userId = userid;
+                                       userRole.roleId = Long.valueOf(SYS_ADMIN_ROLE_ID);
+                                       userRole.appId = Long.valueOf(ECOMP_APP_ID);
+
+                                       localSession.save(PortalAdminUserRole.class.getName(), userRole);
+                               }
+
+                               transaction.commit();
+                               result = true;
+                       } catch (Exception e) {
+                               EcompPortalUtils.rollbackTransaction(transaction, "createPortalAdmin rollback, exception = " + e);
+                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                       } finally {
+                               EcompPortalUtils.closeLocalSession(localSession, "createPortalAdmin");
+                       }
+                       if (!result) {
+                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                               "LR: createPortalAdmin: no result. setting httpStatusCode to "
+                                                               + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                               logger.error(EELFLoggerDelegate.errorLogger, "PortalAdminServiceImpl.createPortalAdmin: bad request");
+                       }
+               }
+               return fieldsValidator;
+       }
+
+       public FieldsValidator deletePortalAdmin(Long userId) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               logger.debug(EELFLoggerDelegate.debugLogger, "deletePortalAdmin: test 1");
+               boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       dataAccessService.deleteDomainObjects(PortalAdminUserRole.class,
+                                       "user_id='" + userId + "' AND role_id='" + SYS_ADMIN_ROLE_ID + "'", null);
+                       transaction.commit();
+                       result = true;
+               } catch (Exception e) {
+                       EcompPortalUtils.rollbackTransaction(transaction, "deletePortalAdmin rollback, exception = " + e);
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "deletePortalAdmin");
+               }
+               if (result) {
+               } else {
+                       logger.debug(EELFLoggerDelegate.debugLogger, "deletePortalAdmin: no result. setting httpStatusCode to "
+                                       + HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       private void logQuery(String sql) {
+               logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+       }
+
+       private boolean isLoggedInUserPortalAdmin(Long userId) {
+               try {
+                       String sql = "SELECT u.user_id, u.first_name, u.last_name, u.login_id "
+                                       + " FROM fn_user u, fn_user_role ur " + " WHERE u.user_id = ur.user_id " + " AND ur.user_id="
+                                       + userId + " AND ur.role_id=" + SYS_ADMIN_ROLE_ID;
+
+                       logQuery(sql);
+
+                       @SuppressWarnings("unchecked")
+                       List<PortalAdmin> portalAdmins = dataAccessService.executeSQLQuery(sql, PortalAdmin.class, null);
+                       logger.debug(EELFLoggerDelegate.debugLogger, portalAdmins.toString());
+                       if (portalAdmins == null || portalAdmins.size() <= 0) {
+                               return false;
+                       }
+                       return true;
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred while performing isLoggedInUserPortalAdmin operation, Details: "
+                                                       + EcompPortalUtils.getStackTrace(e));
+                       return false;
+               }
+       }
+}
index 9aa2469..cf88fb7 100644 (file)
@@ -1,30 +1,30 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-public interface SearchService {\r
-\r
-       public String searchUsersInPhoneBook(String searchString);\r
-\r
-       public EPUser searchUserByUserId(String orgUserId);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public interface SearchService {
+
+       public String searchUsersInPhoneBook(String searchString);
+
+       public EPUser searchUserByUserId(String orgUserId);
+
+}
index 88dc299..a2b56e5 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-@Service("searchService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class SearchServiceImpl implements SearchService {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SearchServiceImpl.class);\r
-       \r
-       // TODO: the values below should be defined in other place\r
-       private static final int maxSizeOfSearchResult = 100;\r
-\r
-\r
-       @Autowired\r
-       EPLdapService ldapService;\r
-\r
-       @Override\r
-       public String searchUsersInPhoneBook(String searchString) {\r
-               String orgUserId = null;\r
-               List<String> tokens = EcompPortalUtils.parsingByRegularExpression(searchString, " ");\r
-               for (int i = 0; i < tokens.size(); i++) { // find orgUserId if possible and remove it from tokens\r
-                       if (tokens.get(i).matches(".*\\d+.*")) {\r
-                               orgUserId = tokens.get(i);\r
-                               tokens.remove(i);\r
-                       }\r
-               }\r
-               while (tokens.size() > 2) { // we use no more then first 2 tokens (orgUserId is removed, see above)\r
-                       tokens.remove(tokens.size() - 1);\r
-               }\r
-               EPUser attrUser = new EPUser();\r
-               attrUser.setOrgUserId(orgUserId);\r
-               List<UserWithNameSurnameTitle> resultOfSearch = new ArrayList<UserWithNameSurnameTitle>(), resultOfAdditionalSearch = null;\r
-               if (tokens.size() == 2) {\r
-                       attrUser.setFirstName(tokens.get(0));\r
-                       attrUser.setLastName(tokens.get(1));\r
-                       resultOfSearch = this.searchUsersByAttrs(attrUser);\r
-                       resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));\r
-                       resultOfSearch = this.removeWrongLastNames(resultOfSearch, tokens.get(1));\r
-                       if (resultOfSearch.size() < maxSizeOfSearchResult) {\r
-                               attrUser.setFirstName(tokens.get(1));\r
-                               attrUser.setLastName(tokens.get(0));\r
-                               resultOfAdditionalSearch = this.searchUsersByAttrs(attrUser);\r
-                               resultOfAdditionalSearch = this.removeWrongFirstNames(resultOfAdditionalSearch, tokens.get(1));\r
-                               resultOfAdditionalSearch = this.removeWrongLastNames(resultOfAdditionalSearch, tokens.get(0));\r
-                       }\r
-               } else if (tokens.size() == 1) {\r
-                       attrUser.setFirstName(tokens.get(0));\r
-                       resultOfSearch = this.searchUsersByAttrs(attrUser);\r
-                       resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));\r
-                       if (resultOfSearch.size() < maxSizeOfSearchResult) {\r
-                               attrUser.setFirstName(null);\r
-                               attrUser.setLastName(tokens.get(0));\r
-                               resultOfAdditionalSearch = this.searchUsersByAttrs(attrUser);\r
-                               resultOfAdditionalSearch = this.removeWrongLastNames(resultOfAdditionalSearch, tokens.get(0));\r
-                       }\r
-               } else if (orgUserId != null) {\r
-                       resultOfSearch = this.searchUsersByAttrs(attrUser);\r
-               }\r
-               if (resultOfAdditionalSearch != null) {\r
-                       resultOfSearch.addAll(resultOfAdditionalSearch);\r
-               }\r
-               resultOfSearch = this.cutSearchResultToMaximumSize(resultOfSearch);\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               String result = "[]";\r
-               try {\r
-                       result = mapper.writeValueAsString(resultOfSearch);\r
-               } catch (JsonProcessingException e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "searchUsersInPhoneBook Exception = " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return result;\r
-       }\r
-\r
-       private List<UserWithNameSurnameTitle> searchUsersByAttrs(EPUser attrUser) {\r
-               List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();\r
-               try {\r
-                       org.openecomp.portalsdk.core.command.support.SearchResult searchResult = this.ldapService.searchPost(attrUser, null, null, null, 0, 0, -1);\r
-                       for (Object obj : searchResult) {\r
-                               EPUser user = (EPUser) obj;\r
-                               UserWithNameSurnameTitle foundUser = new UserWithNameSurnameTitle(user.getOrgUserId(), user.getFirstName(), user.getLastName(), user.getJobTitle());\r
-                               foundUsers.add(foundUser);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "searchInPhoneBookWithToken Exception = " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return foundUsers;\r
-       }\r
-\r
-       private List<UserWithNameSurnameTitle> removeWrongFirstNames(List<UserWithNameSurnameTitle> resultOfSearch, String firstName) {\r
-               firstName = firstName.toUpperCase();\r
-               for (int i = resultOfSearch.size() - 1; i >= 0; i--) {\r
-                       UserWithNameSurnameTitle user = resultOfSearch.get(i);\r
-                       if ((user.firstName == null) || !user.firstName.toUpperCase().startsWith(firstName)) {\r
-                               resultOfSearch.remove(i);\r
-                       }\r
-               }\r
-               return resultOfSearch;\r
-       }\r
-\r
-       private List<UserWithNameSurnameTitle> removeWrongLastNames(List<UserWithNameSurnameTitle> resultOfSearch, String lastName) {\r
-               lastName = lastName.toUpperCase();\r
-               for (int i = resultOfSearch.size() - 1; i >= 0; i--) {\r
-                       UserWithNameSurnameTitle user = resultOfSearch.get(i);\r
-                       if ((user.lastName == null) || !user.lastName.toUpperCase().startsWith(lastName)) {\r
-                               resultOfSearch.remove(i);\r
-                       }\r
-               }\r
-               return resultOfSearch;\r
-       }\r
-\r
-       private List<UserWithNameSurnameTitle> cutSearchResultToMaximumSize(List<UserWithNameSurnameTitle> resultOfSearch) {\r
-               for (int i = resultOfSearch.size() - 1; i >= maxSizeOfSearchResult; i--) {\r
-                       resultOfSearch.remove(i);\r
-               }\r
-               return resultOfSearch;\r
-       }\r
-\r
-       @Override\r
-       @SuppressWarnings("unchecked")\r
-       public EPUser searchUserByUserId(String orgUserId) {\r
-               EPUser user = null;\r
-               EPUser searchedUser = new EPUser();\r
-               searchedUser.setOrgUserId(orgUserId);\r
-               try {\r
-                       List<Object> searchResult = ldapService.searchPost(searchedUser, "", null, null, 0, -1, 1);\r
-                       for (Object obj : searchResult) {\r
-                               if (obj instanceof EPUser) {\r
-                                       user = (EPUser) obj;\r
-                                       // This assignment should be checked later!\r
-                                       user.setLoginId(orgUserId);\r
-                                       break;\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "searchUserBy orgUserId exception = " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return user;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Service("searchService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class SearchServiceImpl implements SearchService {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SearchServiceImpl.class);
+       
+       // TODO: the values below should be defined in other place
+       private static final int maxSizeOfSearchResult = 100;
+
+
+       @Autowired
+       EPLdapService ldapService;
+
+       @Override
+       public String searchUsersInPhoneBook(String searchString) {
+               String orgUserId = null;
+               List<String> tokens = EcompPortalUtils.parsingByRegularExpression(searchString, " ");
+               for (int i = 0; i < tokens.size(); i++) { // find orgUserId if possible and remove it from tokens
+                       if (tokens.get(i).matches(".*\\d+.*")) {
+                               orgUserId = tokens.get(i);
+                               tokens.remove(i);
+                       }
+               }
+               while (tokens.size() > 2) { // we use no more then first 2 tokens (orgUserId is removed, see above)
+                       tokens.remove(tokens.size() - 1);
+               }
+               EPUser attrUser = new EPUser();
+               attrUser.setOrgUserId(orgUserId);
+               List<UserWithNameSurnameTitle> resultOfSearch = new ArrayList<UserWithNameSurnameTitle>(), resultOfAdditionalSearch = null;
+               if (tokens.size() == 2) {
+                       attrUser.setFirstName(tokens.get(0));
+                       attrUser.setLastName(tokens.get(1));
+                       resultOfSearch = this.searchUsersByAttrs(attrUser);
+                       resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));
+                       resultOfSearch = this.removeWrongLastNames(resultOfSearch, tokens.get(1));
+                       if (resultOfSearch.size() < maxSizeOfSearchResult) {
+                               attrUser.setFirstName(tokens.get(1));
+                               attrUser.setLastName(tokens.get(0));
+                               resultOfAdditionalSearch = this.searchUsersByAttrs(attrUser);
+                               resultOfAdditionalSearch = this.removeWrongFirstNames(resultOfAdditionalSearch, tokens.get(1));
+                               resultOfAdditionalSearch = this.removeWrongLastNames(resultOfAdditionalSearch, tokens.get(0));
+                       }
+               } else if (tokens.size() == 1) {
+                       attrUser.setFirstName(tokens.get(0));
+                       resultOfSearch = this.searchUsersByAttrs(attrUser);
+                       resultOfSearch = this.removeWrongFirstNames(resultOfSearch, tokens.get(0));
+                       if (resultOfSearch.size() < maxSizeOfSearchResult) {
+                               attrUser.setFirstName(null);
+                               attrUser.setLastName(tokens.get(0));
+                               resultOfAdditionalSearch = this.searchUsersByAttrs(attrUser);
+                               resultOfAdditionalSearch = this.removeWrongLastNames(resultOfAdditionalSearch, tokens.get(0));
+                       }
+               } else if (orgUserId != null) {
+                       resultOfSearch = this.searchUsersByAttrs(attrUser);
+               }
+               if (resultOfAdditionalSearch != null) {
+                       resultOfSearch.addAll(resultOfAdditionalSearch);
+               }
+               resultOfSearch = this.cutSearchResultToMaximumSize(resultOfSearch);
+               ObjectMapper mapper = new ObjectMapper();
+               String result = "[]";
+               try {
+                       result = mapper.writeValueAsString(resultOfSearch);
+               } catch (JsonProcessingException e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "searchUsersInPhoneBook Exception = " + EcompPortalUtils.getStackTrace(e));
+               }
+               return result;
+       }
+
+       private List<UserWithNameSurnameTitle> searchUsersByAttrs(EPUser attrUser) {
+               List<UserWithNameSurnameTitle> foundUsers = new ArrayList<UserWithNameSurnameTitle>();
+               try {
+                       org.openecomp.portalsdk.core.command.support.SearchResult searchResult = this.ldapService.searchPost(attrUser, null, null, null, 0, 0, -1);
+                       for (Object obj : searchResult) {
+                               EPUser user = (EPUser) obj;
+                               UserWithNameSurnameTitle foundUser = new UserWithNameSurnameTitle(user.getOrgUserId(), user.getFirstName(), user.getLastName(), user.getJobTitle());
+                               foundUsers.add(foundUser);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "searchInPhoneBookWithToken Exception = " + EcompPortalUtils.getStackTrace(e));
+               }
+               return foundUsers;
+       }
+
+       private List<UserWithNameSurnameTitle> removeWrongFirstNames(List<UserWithNameSurnameTitle> resultOfSearch, String firstName) {
+               firstName = firstName.toUpperCase();
+               for (int i = resultOfSearch.size() - 1; i >= 0; i--) {
+                       UserWithNameSurnameTitle user = resultOfSearch.get(i);
+                       if ((user.firstName == null) || !user.firstName.toUpperCase().startsWith(firstName)) {
+                               resultOfSearch.remove(i);
+                       }
+               }
+               return resultOfSearch;
+       }
+
+       private List<UserWithNameSurnameTitle> removeWrongLastNames(List<UserWithNameSurnameTitle> resultOfSearch, String lastName) {
+               lastName = lastName.toUpperCase();
+               for (int i = resultOfSearch.size() - 1; i >= 0; i--) {
+                       UserWithNameSurnameTitle user = resultOfSearch.get(i);
+                       if ((user.lastName == null) || !user.lastName.toUpperCase().startsWith(lastName)) {
+                               resultOfSearch.remove(i);
+                       }
+               }
+               return resultOfSearch;
+       }
+
+       private List<UserWithNameSurnameTitle> cutSearchResultToMaximumSize(List<UserWithNameSurnameTitle> resultOfSearch) {
+               for (int i = resultOfSearch.size() - 1; i >= maxSizeOfSearchResult; i--) {
+                       resultOfSearch.remove(i);
+               }
+               return resultOfSearch;
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       public EPUser searchUserByUserId(String orgUserId) {
+               EPUser user = null;
+               EPUser searchedUser = new EPUser();
+               searchedUser.setOrgUserId(orgUserId);
+               try {
+                       List<Object> searchResult = ldapService.searchPost(searchedUser, "", null, null, 0, -1, 1);
+                       for (Object obj : searchResult) {
+                               if (obj instanceof EPUser) {
+                                       user = (EPUser) obj;
+                                       // This assignment should be checked later!
+                                       user.setLoginId(orgUserId);
+                                       break;
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "searchUserBy orgUserId exception = " + EcompPortalUtils.getStackTrace(e));
+               }
+               return user;
+       }
+
+}
index 0b1a6df..72f3bcb 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.SharedContext;\r
-\r
-/**\r
- * Defines the methods exposed by the service that manages shared context\r
- * objects in the database via Hibernate.\r
- */\r
-public interface SharedContextService {\r
-\r
-       /**\r
-        * Gets all shared context objects for the specified context ID.\r
-        * \r
-        * @return List of SharedContext objects\r
-        */\r
-       List<SharedContext> getSharedContexts(String contextId);\r
-\r
-       /**\r
-        * Gets the shared context with the specified context ID and key.\r
-        * \r
-        * @param contextId\r
-        *            Context ID; usually a session ID\r
-        * @param key\r
-        *            Key for the key-value pair\r
-        * @return Value found in the database, null if any parameter is null or no\r
-        *         shared context exists with that context ID - key pair.\r
-        */\r
-       SharedContext getSharedContext(String contextId, String key);\r
-\r
-       /**\r
-        * Creates a new shared context in the database with the specified context\r
-        * ID, key and value.\r
-        * \r
-        * @param context\r
-        *            SharedContext object to save.\r
-        * @param key\r
-        *            Key for the key-value pair.\r
-        * @param value\r
-        *            Value for the key-value pair.\r
-        */\r
-       void addSharedContext(String contextId, String key, String value);\r
-\r
-       /**\r
-        * Saves the specified shared context to the database.\r
-        * \r
-        * @param context\r
-        *            SharedContext object to save.\r
-        */\r
-       void saveSharedContext(SharedContext context);\r
-\r
-       /**\r
-        * Deletes the specified shared context from the database.\r
-        * \r
-        * @param context\r
-        *            SharedContext object to delete.\r
-        */\r
-       void deleteSharedContext(SharedContext context);\r
-\r
-       /**\r
-        * Deletes all shared contexts with the specified context ID.\r
-        * \r
-        * @param contextId\r
-        *            Context ID; usually a session ID\r
-        * @return number of shared-context objects deleted\r
-        */\r
-       int deleteSharedContexts(String contextId);\r
-\r
-       /**\r
-        * Deletes all shared contexts with a creation time that is older than the\r
-        * specified value.\r
-        * \r
-        * @param ageInSeconds\r
-        *            Expiration threshold in seconds\r
-        */\r
-       void expireSharedContexts(int ageInSeconds);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.SharedContext;
+
+/**
+ * Defines the methods exposed by the service that manages shared context
+ * objects in the database.
+ */
+public interface SharedContextService {
+
+       /**
+        * Gets all shared context objects for the specified context ID.
+        * 
+        * @param contextId
+        *            SharedContext ID
+        * @return List of SharedContext objects
+        */
+       List<SharedContext> getSharedContexts(String contextId);
+
+       /**
+        * Gets the shared context with the specified context ID and key.
+        * 
+        * @param contextId
+        *            Context ID; usually a session ID
+        * @param key
+        *            Key for the key-value pair
+        * @return Value found in the database, null if any parameter is null or no
+        *         shared context exists with that context ID - key pair.
+        */
+       SharedContext getSharedContext(String contextId, String key);
+
+       /**
+        * Creates a new shared context entry with the specified context ID, key and
+        * value.
+        * 
+        * @param contextId
+        *            SharedContext ID
+        * @param key
+        *            Key for the key-value pair.
+        * @param value
+        *            Value for the key-value pair.
+        */
+       void addSharedContext(String contextId, String key, String value);
+
+       /**
+        * Saves the specified shared context.
+        * 
+        * @param context
+        *            SharedContext object to save.
+        */
+       void saveSharedContext(SharedContext context);
+
+       /**
+        * Deletes the specified shared context.
+        * 
+        * @param context
+        *            SharedContext object to delete.
+        */
+       void deleteSharedContext(SharedContext context);
+
+       /**
+        * Deletes all shared contexts with the specified context ID.
+        * 
+        * @param contextId
+        *            Context ID; usually a session ID
+        * @return number of shared-context objects deleted
+        */
+       int deleteSharedContexts(String contextId);
+
+       /**
+        * Deletes all shared contexts with a creation time that is older than the
+        * specified value.
+        * 
+        * @param ageInSeconds
+        *            Expiration threshold in seconds
+        */
+       void expireSharedContexts(int ageInSeconds);
+
+}
index 428f135..1b1b606 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.text.SimpleDateFormat;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import org.hibernate.criterion.Criterion;\r
-import org.hibernate.criterion.Restrictions;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.SharedContext;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-/**\r
- * Implementation of the shared-context service that talks to the database.\r
- */\r
-@Service("sharedContextService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class SharedContextServiceImpl implements SharedContextService {\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SharedContextServiceImpl.class);\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalsdk.core.service.SharedContextService#\r
-        * getSharedContexts()\r
-        */\r
-       @Override\r
-       @SuppressWarnings("unchecked")\r
-       public List<SharedContext> getSharedContexts(String contextId) {\r
-               List<Criterion> restrictionsList = new ArrayList<Criterion>();\r
-               Criterion contextIdCrit = Restrictions.eq("context_id", contextId);\r
-               restrictionsList.add(contextIdCrit);\r
-               List<SharedContext> contexts = (List<SharedContext>) getDataAccessService().getList(SharedContext.class, null,\r
-                               restrictionsList, null);\r
-\r
-               return contexts;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalsdk.core.service.SharedContextService#\r
-        * getSharedContext(java. lang.String, java.lang.String)\r
-        */\r
-       @Override\r
-       public SharedContext getSharedContext(String contextId, String key) {\r
-               SharedContext context = null;\r
-               List<Criterion> restrictionsList = new ArrayList<Criterion>();\r
-               Criterion contextIdCrit = Restrictions.eq("context_id", contextId);\r
-               Criterion keyCrit = Restrictions.eq("ckey", key);\r
-               restrictionsList.add(contextIdCrit);\r
-               restrictionsList.add(keyCrit);\r
-               @SuppressWarnings("unchecked")\r
-               List<SharedContext> contexts = (List<SharedContext>) getDataAccessService().getList(SharedContext.class, null,\r
-                               restrictionsList, null);\r
-               if (contexts != null && contexts.size() == 1)\r
-                       context = contexts.get(0);\r
-\r
-               return context;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.SharedContextService#\r
-        * addSharedContext(java.lang.String, java.lang.String, java.lang.String)\r
-        */\r
-       @Override\r
-       public void addSharedContext(String contextId, String key, String value) {\r
-               SharedContext context = new SharedContext(contextId, key, value);\r
-               saveSharedContext(context);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalsdk.core.service.SharedContextService#\r
-        * saveSharedContext(com. att.fusion.core.domain.SharedContext)\r
-        */\r
-       @Override\r
-       public void saveSharedContext(SharedContext context) {\r
-               getDataAccessService().saveDomainObject(context, null);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalsdk.core.service.SharedContextService#\r
-        * deleteSharedContext(com. att.fusion.core.domain.SharedContext)\r
-        */\r
-       @Override\r
-       public void deleteSharedContext(SharedContext context) {\r
-               getDataAccessService().deleteDomainObject(context, null);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.SharedContextService#\r
-        * deleteSharedContexts(java.lang.String)\r
-        */\r
-       @Override\r
-       public int deleteSharedContexts(String contextId) {\r
-               // Uses an inefficient method to avoid a where clause\r
-               // that could be used to mount a SQL injection attack.\r
-               List<SharedContext> contexts = getSharedContexts(contextId);\r
-               if (contexts == null)\r
-                       return 0;\r
-\r
-               logger.debug(EELFLoggerDelegate.debugLogger, "deleteSharedContexts: count is " + contexts.size());\r
-               for (SharedContext sc : contexts)\r
-                       deleteSharedContext(sc);\r
-\r
-               return contexts.size();\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.SharedContextService#\r
-        * expireSharedContexts(int)\r
-        */\r
-       @Override\r
-       public void expireSharedContexts(int ageInSeconds) {\r
-               // Specific to the MySQL database.\r
-               // final String whereClause = " where create_time < ADDDATE(NOW(),\r
-               // INTERVAL - " + ageInSeconds + " SECOND)";\r
-               final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");\r
-               Date expiredDateTime = new Date(System.currentTimeMillis() - ageInSeconds * 1000);\r
-               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                               "expireSharedContexts: expire time is " + expiredDateTime.toString());\r
-               final String whereClause = " create_time < '" + dateFormat.format(expiredDateTime) + "'";\r
-               getDataAccessService().deleteDomainObjects(SharedContext.class, whereClause, null);\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.Restrictions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.SharedContext;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+/**
+ * Implementation of the shared-context service that talks to the database.
+ */
+@Service("sharedContextService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class SharedContextServiceImpl implements SharedContextService {
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SharedContextServiceImpl.class);
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalsdk.core.service.SharedContextService#
+        * getSharedContexts()
+        */
+       @Override
+       @SuppressWarnings("unchecked")
+       public List<SharedContext> getSharedContexts(String contextId) {
+               List<Criterion> restrictionsList = new ArrayList<Criterion>();
+               Criterion contextIdCrit = Restrictions.eq("context_id", contextId);
+               restrictionsList.add(contextIdCrit);
+               List<SharedContext> contexts = (List<SharedContext>) getDataAccessService().getList(SharedContext.class, null,
+                               restrictionsList, null);
+
+               return contexts;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalsdk.core.service.SharedContextService#
+        * getSharedContext(java. lang.String, java.lang.String)
+        */
+       @Override
+       public SharedContext getSharedContext(String contextId, String key) {
+               SharedContext context = null;
+               List<Criterion> restrictionsList = new ArrayList<Criterion>();
+               Criterion contextIdCrit = Restrictions.eq("context_id", contextId);
+               Criterion keyCrit = Restrictions.eq("ckey", key);
+               restrictionsList.add(contextIdCrit);
+               restrictionsList.add(keyCrit);
+               @SuppressWarnings("unchecked")
+               List<SharedContext> contexts = (List<SharedContext>) getDataAccessService().getList(SharedContext.class, null,
+                               restrictionsList, null);
+               if (contexts != null && contexts.size() == 1)
+                       context = contexts.get(0);
+
+               return context;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.SharedContextService#
+        * addSharedContext(java.lang.String, java.lang.String, java.lang.String)
+        */
+       @Override
+       public void addSharedContext(String contextId, String key, String value) {
+               SharedContext context = new SharedContext(contextId, key, value);
+               saveSharedContext(context);
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalsdk.core.service.SharedContextService#
+        * saveSharedContext(com. att.fusion.core.domain.SharedContext)
+        */
+       @Override
+       public void saveSharedContext(SharedContext context) {
+               getDataAccessService().saveDomainObject(context, null);
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalsdk.core.service.SharedContextService#
+        * deleteSharedContext(com. att.fusion.core.domain.SharedContext)
+        */
+       @Override
+       public void deleteSharedContext(SharedContext context) {
+               getDataAccessService().deleteDomainObject(context, null);
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.SharedContextService#
+        * deleteSharedContexts(java.lang.String)
+        */
+       @Override
+       public int deleteSharedContexts(String contextId) {
+               // Uses an inefficient method to avoid a where clause
+               // that could be used to mount a SQL injection attack.
+               List<SharedContext> contexts = getSharedContexts(contextId);
+               if (contexts == null)
+                       return 0;
+
+               logger.debug(EELFLoggerDelegate.debugLogger, "deleteSharedContexts: count is " + contexts.size());
+               for (SharedContext sc : contexts)
+                       deleteSharedContext(sc);
+
+               return contexts.size();
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.SharedContextService#
+        * expireSharedContexts(int)
+        */
+       @Override
+       public void expireSharedContexts(int ageInSeconds) {
+               // Specific to the MySQL database.
+               // final String whereClause = " where create_time < ADDDATE(NOW(),
+               // INTERVAL - " + ageInSeconds + " SECOND)";
+               final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+               Date expiredDateTime = new Date(System.currentTimeMillis() - ageInSeconds * 1000);
+               logger.debug(EELFLoggerDelegate.debugLogger,
+                               "expireSharedContexts: expire time is " + expiredDateTime.toString());
+               final String whereClause = " create_time < '" + dateFormat.format(expiredDateTime) + "'";
+               getDataAccessService().deleteDomainObjects(SharedContext.class, whereClause, null);
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+}
index 063fdf0..447cacf 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EcompAppRole;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;\r
-import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;\r
-\r
-public interface UserNotificationService {\r
-\r
-       List<EpNotificationItem> getNotifications(Long userId);\r
-\r
-       List<EpRoleNotificationItem> getNotificationRoles(Long notificationId);\r
-\r
-       List<EcompAppRole> getAppRoleList();\r
-       /**\r
-        * Marks the notification as viewed by the specified user.\r
-        * \r
-        * @param notificationId\r
-        * @param userId\r
-        */\r
-       void setNotificationRead(Long notificationId, int userId);\r
-\r
-       String saveNotification(EpNotificationItem notificationItem) throws Exception;\r
-\r
-       List<EpNotificationItemVO> getNotificationHistoryVO(Long userId);\r
-\r
-       List<EpNotificationItemVO> getAdminNotificationVOS();\r
-       \r
-       List<EPUser> getUsersByOrgIds(List<String> OrgIds);\r
-\r
-       List<String> getMessageRecipients(Long notificationId);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAppRole;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+
+public interface UserNotificationService {
+
+       /**
+        * Gets the specified notifications with userId from ep_notification
+        * 
+        * @param userId
+        * 
+        * @return the notifications with the specified userId
+        */
+
+       List<EpNotificationItem> getNotifications(Long userId);
+
+       /**
+        * Gets the specified roles from ep_role_notification
+        * 
+        * @param notificationId
+        * 
+        * @return the roles for a specified notification
+        */
+
+       List<EpRoleNotificationItem> getNotificationRoles(Long notificationId);
+
+       /**
+        * Get all app role list from the fn_app and fn_role table
+        * 
+        * @return list of all roles associated with the applications
+        */
+       List<EcompAppRole> getAppRoleList();
+
+       /**
+        * Marks the notification as viewed by the specified user.
+        * 
+        * @param notificationId
+        * @param userId
+        */
+       void setNotificationRead(Long notificationId, int userId);
+
+       /**
+        * Saves the specified notification to the table ep_notification
+        * 
+        * @param notificationItem
+        * @throws Exception
+        */
+
+       String saveNotification(EpNotificationItem notificationItem) throws Exception;
+
+       /**
+        * Gets the specified notification with the userId for view all recent
+        * notifications
+        * 
+        * @param userId
+        * 
+        * @return the notification list
+        */
+
+       List<EpNotificationItemVO> getNotificationHistoryVO(Long userId);
+
+       /**
+        * Gets the notifications with the userId for user notifications
+        * 
+        * @param userId
+        * 
+        * @return the notification list
+        */
+
+       List<EpNotificationItemVO> getAdminNotificationVOS(Long userId);
+
+       /**
+        * Gets the user list from fn_user
+        * 
+        * @param OrgIds
+        * 
+        * @return the users list
+        */
+
+       List<EPUser> getUsersByOrgIds(List<String> OrgIds);
+
+       /**
+        * Gets the received recipient to whom the notification is delivered from
+        * external system
+        * 
+        * @param notificationId
+        * 
+        * @return the active users
+        */
+
+       List<String> getMessageRecipients(Long notificationId);
+
+       /**
+        * delete the records from ep_notification table when the endtime is more
+        * than 3 months
+        * 
+        */
+
+       void deleteNotificationsFromEpNotificationTable();
+
+       /**
+        * delete the records from ep_user_notification table when the endtime is
+        * more than 3 months
+        * 
+        */
+       void deleteNotificationsFromEpUserNotificationTable();
+
+       /**
+        * delete the records from ep_role_notification table when the endtime is
+        * more than 3 months
+        * 
+        */
+       void deleteNotificationsFromEpRoleNotificationTable();
+
+}
index 4017b2f..52bc492 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.hibernate.SessionFactory;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserNotification;\r
-import org.openecomp.portalapp.portal.domain.EcompAppRole;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItem;\r
-import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;\r
-import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-@Service("userNotificationService")\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class UserNotificationServiceImpl implements UserNotificationService {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#getNotifications(java.lang.Long)\r
-        */\r
-       @Override\r
-       public List<EpNotificationItem> getNotifications(Long userId) {\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               params.put("user_id", userId.toString());\r
-               @SuppressWarnings("unchecked")\r
-               List<EpNotificationItem> notificationList = dataAccessService.executeNamedQuery("getNotifications", params,\r
-                               null);\r
-               // set the roles to null for pure retrieval of all notifications\r
-               for (EpNotificationItem item : notificationList) {\r
-                       item.setRoles(null);\r
-               }\r
-               return notificationList;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#getNotificationHistoryVO(java.lang.Long)\r
-        */\r
-       @Override\r
-       public List<EpNotificationItemVO> getNotificationHistoryVO(Long userId) {\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               params.put("user_id", userId.toString());\r
-               @SuppressWarnings("unchecked")\r
-               List<EpNotificationItemVO> notificationList = dataAccessService.executeNamedQuery("getNotificationHistoryVO",\r
-                               params, null);\r
-               return notificationList;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#getAdminNotificationVOS()\r
-        */\r
-       @Override\r
-       public List<EpNotificationItemVO> getAdminNotificationVOS() {\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               @SuppressWarnings("unchecked")\r
-               List<EpNotificationItemVO> notificationList = dataAccessService\r
-                               .executeNamedQuery("getAdminNotificationHistoryVO", params, null);\r
-               return notificationList;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#getNotificationRoles(java.lang.Long)\r
-        */\r
-       @Override\r
-       public List<EpRoleNotificationItem> getNotificationRoles(Long notificationId) {\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               params.put("notificationId", Long.toString(notificationId));\r
-               @SuppressWarnings("unchecked")\r
-               List<EpRoleNotificationItem> roleNotifList = dataAccessService.executeNamedQuery("getNotificationRoles", params,\r
-                               null);\r
-               return roleNotifList;\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#getAppRoleList()\r
-        */\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<EcompAppRole> getAppRoleList() {\r
-               List<EcompAppRole> appRoleList = (List<EcompAppRole>) dataAccessService.executeNamedQuery("getEpNotificationAppRoles", null, null);             \r
-               return appRoleList;             \r
-       }       \r
-       \r
-       /*\r
-        * (non-Javadoc)\r
-        * \r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#\r
-        * setNotificationsRead(java.lang.Long, int)\r
-        */\r
-       @Override\r
-       public void setNotificationRead(Long notificationId, int userId) {\r
-               EPUserNotification userNotification = new EPUserNotification();\r
-               userNotification.setNotificationId(notificationId);\r
-               userNotification.setUpdateTime(new Date());\r
-               userNotification.setViewed("Y");\r
-               userNotification.setUserId((long) userId);\r
-               getDataAccessService().saveDomainObject(userNotification, null);\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.openecomp.portalapp.portal.service.UserNotificationService#saveNotification(org.openecomp.portalapp.portal.transport.EpNotificationItem)\r
-        */\r
-       @Override\r
-       public String saveNotification(EpNotificationItem notificationItem) throws Exception {\r
-\r
-               // gather the roles\r
-               if (notificationItem.getRoleIds() != null && !notificationItem.getIsForAllRoles().equals("Y")) {\r
-                       if (notificationItem.getRoles() == null) {\r
-                               Set<EpRoleNotificationItem> roleSet = new HashSet<EpRoleNotificationItem>();\r
-                               notificationItem.setRoles(roleSet);\r
-                       }\r
-                       for (Long roleId : notificationItem.getRoleIds()) {\r
-                               EpRoleNotificationItem roleItem = new EpRoleNotificationItem();\r
-                               roleItem.setNotificationId(notificationItem.getNotificationId());\r
-                               roleItem.setRoleId(roleId.intValue());\r
-                               notificationItem.getRoles().add(roleItem);\r
-                       }\r
-               }\r
-\r
-               \r
-                       // for updates fetch roles and then save\r
-                       if (notificationItem.getNotificationId() != null) {\r
-                               EpNotificationItem updateNotificationItem = (EpNotificationItem) getDataAccessService()\r
-                                               .getDomainObject(EpNotificationItem.class, notificationItem.getNotificationId(), null);\r
-                               notificationItem.setRoles(updateNotificationItem.getRoles());\r
-                       }\r
-                        if(notificationItem.msgSource == null)\r
-                   {\r
-                       notificationItem.setMsgSource("EP");\r
-                   }\r
-                       getDataAccessService().saveDomainObject(notificationItem, null);\r
-                        return "" ;\r
-\r
-               } \r
-         @Override\r
-           public List<EPUser> getUsersByOrgIds(List<String> OrgIds) {\r
-               Map<String, Object> params = new HashMap<String, Object>();\r
-               params.put("OrgIds", OrgIds);\r
-               @SuppressWarnings("unchecked")\r
-               List<EPUser> userList = dataAccessService.executeNamedQuery("getUsersByOrgIdsNotifications", params,    null);\r
-               return userList;\r
-           }\r
-         \r
-         @Override\r
-                       public List<String> getMessageRecipients(Long notificationId) {\r
-                               Map<String, String> params = new HashMap<>();\r
-                               params.put("notificationId", Long.toString(notificationId));\r
-                               @SuppressWarnings("unchecked")\r
-                               List<String> activeUsers = dataAccessService.executeNamedQuery("messageRecipients", params, null);\r
-                               return activeUsers;\r
-                       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-\r
-       public SessionFactory getSessionFactory() {\r
-               return sessionFactory;\r
-       }\r
-\r
-       public void setSessionFactory(SessionFactory sessionFactory) {\r
-               this.sessionFactory = sessionFactory;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.hibernate.SessionFactory;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserNotification;
+import org.openecomp.portalapp.portal.domain.EcompAppRole;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("userNotificationService")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class UserNotificationServiceImpl implements UserNotificationService {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FunctionalMenuServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       private SessionFactory sessionFactory;
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * getNotifications(java.lang.Long)
+        */
+       @Override
+       public List<EpNotificationItem> getNotifications(Long userId) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("user_id", userId.toString());
+               @SuppressWarnings("unchecked")
+               List<EpNotificationItem> notificationList = dataAccessService.executeNamedQuery("getNotifications", params,
+                               null);
+               // set the roles to null for pure retrieval of all notifications
+               for (EpNotificationItem item : notificationList) {
+                       item.setRoles(null);
+               }
+               return notificationList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * getNotificationHistoryVO(java.lang.Long)
+        */
+       @Override
+       public List<EpNotificationItemVO> getNotificationHistoryVO(Long userId) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("user_id", userId.toString());
+               @SuppressWarnings("unchecked")
+               List<EpNotificationItemVO> notificationList = dataAccessService.executeNamedQuery("getNotificationHistoryVO",
+                               params, null);
+               return notificationList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * getAdminNotificationVOS()
+        */
+       @Override
+       public List<EpNotificationItemVO> getAdminNotificationVOS(Long userId) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("user_id", userId.toString());
+               @SuppressWarnings("unchecked")
+               List<EpNotificationItemVO> notificationList = dataAccessService
+                               .executeNamedQuery("getAdminNotificationHistoryVO", params, null);
+               return notificationList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * getNotificationRoles(java.lang.Long)
+        */
+       @Override
+       public List<EpRoleNotificationItem> getNotificationRoles(Long notificationId) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("notificationId", Long.toString(notificationId));
+               @SuppressWarnings("unchecked")
+               List<EpRoleNotificationItem> roleNotifList = dataAccessService.executeNamedQuery("getNotificationRoles", params,
+                               null);
+               return roleNotifList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * getAppRoleList()
+        */
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<EcompAppRole> getAppRoleList() {
+               List<EcompAppRole> appRoleList = (List<EcompAppRole>) dataAccessService
+                               .executeNamedQuery("getEpNotificationAppRoles", null, null);
+               return appRoleList;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * setNotificationsRead(java.lang.Long, int)
+        */
+       @Override
+       public void setNotificationRead(Long notificationId, int userId) {
+               EPUserNotification userNotification = new EPUserNotification();
+               userNotification.setNotificationId(notificationId);
+               userNotification.setUpdateTime(new Date());
+               userNotification.setViewed("Y");
+               userNotification.setUserId((long) userId);
+               getDataAccessService().saveDomainObject(userNotification, null);
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserNotificationService#
+        * saveNotification(org.openecomp.portalapp.portal.transport.
+        * EpNotificationItem)
+        */
+       @Override
+       public String saveNotification(EpNotificationItem notificationItem) throws Exception {
+
+               // gather the roles
+               if (notificationItem.getRoleIds() != null && !notificationItem.getIsForAllRoles().equals("Y")) {
+                       if (notificationItem.getRoles() == null) {
+                               Set<EpRoleNotificationItem> roleSet = new HashSet<EpRoleNotificationItem>();
+                               notificationItem.setRoles(roleSet);
+                       }
+                       for (Long roleId : notificationItem.getRoleIds()) {
+                               EpRoleNotificationItem roleItem = new EpRoleNotificationItem();
+                               roleItem.setNotificationId(notificationItem.getNotificationId());
+                               roleItem.setRoleId(roleId.intValue());
+                               notificationItem.getRoles().add(roleItem);
+                       }
+               }
+
+               // for updates fetch roles and then save
+               if (notificationItem.getNotificationId() != null) {
+                       EpNotificationItem updateNotificationItem = (EpNotificationItem) getDataAccessService()
+                                       .getDomainObject(EpNotificationItem.class, notificationItem.getNotificationId(), null);
+                       notificationItem.setRoles(updateNotificationItem.getRoles());
+               }
+               if (notificationItem.msgSource == null) {
+                       notificationItem.setMsgSource("EP");
+               }
+               getDataAccessService().saveDomainObject(notificationItem, null);
+               return "";
+
+       }
+
+       @Override
+       public List<EPUser> getUsersByOrgIds(List<String> OrgIds) {
+               Map<String, Object> params = new HashMap<String, Object>();
+               params.put("OrgIds", OrgIds);
+               @SuppressWarnings("unchecked")
+               List<EPUser> userList = dataAccessService.executeNamedQuery("getUsersByOrgIdsNotifications", params, null);
+               return userList;
+       }
+
+       @Override
+       public List<String> getMessageRecipients(Long notificationId) {
+               Map<String, String> params = new HashMap<>();
+               params.put("notificationId", Long.toString(notificationId));
+               @SuppressWarnings("unchecked")
+               List<String> activeUsers = dataAccessService.executeNamedQuery("messageRecipients", params, null);
+               return activeUsers;
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+
+       public SessionFactory getSessionFactory() {
+               return sessionFactory;
+       }
+
+       public void setSessionFactory(SessionFactory sessionFactory) {
+               this.sessionFactory = sessionFactory;
+       }
+
+       @Override
+       public void deleteNotificationsFromEpNotificationTable() {
+               Map<String, String> params = new HashMap<String, String>();
+               dataAccessService.executeNamedUpdateQuery("deleteNotificationsFromEpNotificationTable", params, null);
+       }
+
+       @Override
+       public void deleteNotificationsFromEpUserNotificationTable() {
+               Map<String, String> params = new HashMap<String, String>();
+               dataAccessService.executeNamedUpdateQuery("deleteNotificationsFromEpUserNotificationTable", params, null);
+
+       }
+
+       @Override
+       public void deleteNotificationsFromEpRoleNotificationTable() {
+               Map<String, String> params = new HashMap<String, String>();
+               dataAccessService.executeNamedUpdateQuery("deleteNotificationsFromEpRoleNotificationTable", params, null);
+       }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java
new file mode 100644 (file)
index 0000000..727f83d
--- /dev/null
@@ -0,0 +1,1479 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.cxf.transport.http.HTTPException;
+import org.hibernate.Query;
+import org.hibernate.SQLQuery;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequest;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequestDetail;
+import org.openecomp.portalapp.portal.domain.EpUserAppRoles;
+import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.portal.transport.RemoteUserWithRoles;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.openecomp.portalapp.portal.transport.RolesInAppForUser;
+import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.restful.domain.EcompRole;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@EPMetricsLog
+public class UserRolesCommonServiceImpl  {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRolesCommonServiceImpl.class);
+
+       private static final Object syncRests = new Object();
+       
+       @Autowired
+       private DataAccessService dataAccessService;
+       @Autowired
+       private SessionFactory sessionFactory;
+       @Autowired
+       private SearchService searchService;
+       @Autowired
+       private EPAppService appsService;
+       @Autowired
+       private ApplicationsRestClientService applicationsRestClientService;
+       @Autowired
+       private EPRoleService epRoleService;
+       @Autowired
+       private RoleService roleService;
+       
+       /**
+        * 
+        * @param ecompRoles
+        * @return  HashMap<Long, EcompRole>
+        */
+       private static HashMap<Long, EcompRole> hashMapFromEcompRoles(EcompRole[] ecompRoles) {
+               HashMap<Long, EcompRole> result = new HashMap<Long, EcompRole>();
+               if (ecompRoles != null) {
+                       for (int i = 0; i < ecompRoles.length; i++) {
+                               if (ecompRoles[i].getId() != null) {
+                                       result.put(ecompRoles[i].getId(), ecompRoles[i]);
+                               }
+                       }
+               }
+               return result;
+       }
+       
+       /**
+        * 
+        * @param userId
+        */
+       protected void createLocalUserIfNecessary(String userId) {
+               if (StringUtils.isEmpty(userId)) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "createLocalUserIfNecessary : empty userId!");
+                       return;
+               }
+               Session localSession = null;
+               Transaction transaction = null;
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       @SuppressWarnings("unchecked")
+                       List<EPUser> userList = localSession
+                                       .createQuery("from " + EPUser.class.getName() + " where orgUserId='" + userId + "'").list();
+                       if (userList.size() == 0) {
+                               EPUser client = searchService.searchUserByUserId(userId);
+                               if (client == null) {
+                                       String msg = "createLocalUserIfNecessary: cannot create user " + userId
+                                                       + ", because not found in phonebook";
+                                       logger.error(EELFLoggerDelegate.errorLogger, msg);
+                               } else {
+                                       client.setLoginId(userId);
+                                       client.setActive(true);
+                                       localSession.save(client);
+                               }
+                       }
+                       transaction.commit();
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       EcompPortalUtils.rollbackTransaction(transaction, "searchOrCreateUser rollback, exception = " + e);
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "searchOrCreateUser");
+               }
+       }
+       
+       /**
+        * This method return nothing and remove roles before adding any roles for an app
+        * @param userRole
+        * @param appId
+        * @param localSession
+        * @param userAppRoles
+        * @param newUserAppRolesMap
+        */
+       private static void syncUserRolesExtension(EPUserApp userRole, Long appId, Session localSession, EcompRole[] userAppRoles, HashMap<Long, EcompRole> newUserAppRolesMap) {
+
+               Long userAppRoleId = 0L;
+               if (appId == PortalConstants.PORTAL_APP_ID) { // local app
+                       userAppRoleId = userRole.getRoleId();
+               } else { // remote app
+                       userAppRoleId = userRole.getAppRoleId();
+               }
+
+               if (!newUserAppRolesMap.containsKey(userAppRoleId)) {
+                       localSession.delete(userRole);
+               } else {
+                       newUserAppRolesMap.remove(userAppRoleId);
+               }
+       }
+       
+       /**
+        * Checks whether the role is inactive
+        *  
+        * @param epRole
+        * @throws Exception
+        *                      if role is inactive, throws exception
+        */
+       private void checkIfRoleInactive(EPRole epRole) throws Exception{       
+               if(!epRole.getActive()){
+                       throw new Exception(epRole.getName()+ " role is unavailable");
+               }
+       }
+       
+       /**
+        * 
+        * @param sessionFactory
+        * @param userId
+        * @param appId
+        * @param userAppRoles
+        * @param extRequestValue 
+        *                      set to false if request is from users page otherwise true
+        * @throws Exception
+        */
+       protected void syncUserRoles(SessionFactory sessionFactory, String userId, Long appId,
+                       EcompRole[] userAppRoles, Boolean extRequestValue, String reqType) throws Exception {
+               boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+               String roleActive = null;
+               final Map<String, String> userAppParams = new HashMap<>();
+               final Map<String, String> appParams = new HashMap<>();
+               HashMap<Long, EcompRole> newUserAppRolesMap = hashMapFromEcompRoles(userAppRoles);
+
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       @SuppressWarnings("unchecked")
+                       List<EPUser> userList = localSession
+                                       .createQuery("from " + EPUser.class.getName() + " where orgUserId='" + userId + "'").list();
+                       if (userList.size() > 0) {
+                               EPUser client = userList.get(0);
+                               roleActive = ("DELETE".equals(reqType)) ? "" : " and role.active = 'Y'";
+                               @SuppressWarnings("unchecked")
+                               List<EPUserApp> userRoles = localSession.createQuery("from " + EPUserApp.class.getName()
+                                               + " where app.id=" + appId + roleActive + " and userId=" + client.getId()).list();
+                               
+                               if ("DELETE".equals(reqType)) {
+                                       for (EPUserApp userAppRoleList : userRoles) {
+                                               userAppParams.put("roleName", String.valueOf(userAppRoleList.getRole().getName()));
+                                               userAppParams.put("appId",  String.valueOf(appId));
+                                               appParams.put("appRoleName", userAppRoleList.getRole().getName());
+                                               @SuppressWarnings("unchecked")
+                                               List<EPRole>  rolesList = (!userAppRoleList.getRole().getName().equals(PortalConstants.ADMIN_ROLE)) ? (List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", userAppParams, null) : (List<EPRole>) dataAccessService.executeNamedQuery("getPortalAppRoles", appParams, null);        
+                                               if(rolesList.size() > 0 || !rolesList.isEmpty()){
+                                               checkIfRoleInactive(rolesList.get(0));
+                                               }
+                                       }
+                               }
+
+                               for (EPUserApp userRole : userRoles) {
+                                       if (!userRole.getRoleId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID) && userRole.getRoleId() != PortalConstants.SYS_ADMIN_ROLE_ID && !extRequestValue){
+                                               syncUserRolesExtension(userRole, appId, localSession, userAppRoles, newUserAppRolesMap);
+                                               }
+                                       else if (extRequestValue){
+                                               syncUserRolesExtension(userRole, appId, localSession, userAppRoles, newUserAppRolesMap);
+                                       }
+                               }
+                               Collection<EcompRole> newRolesToAdd = newUserAppRolesMap.values();
+                               if (newRolesToAdd.size() > 0) {
+                                       EPApp app = (EPApp) localSession.get(EPApp.class, appId);
+
+                                       HashMap<Long, EPRole> rolesMap = new HashMap<Long, EPRole>();
+                                       if (appId == PortalConstants.PORTAL_APP_ID) { // local app
+                                               String appIdValue = null;
+                                               if(!extRequestValue){
+                                                       appIdValue = "and id != " +  PortalConstants.PORTAL_APP_ID; 
+                                               }else{
+                                                       appIdValue = ""; 
+                                               }
+                                               @SuppressWarnings("unchecked")
+                                               List<EPRole> roles = localSession
+                                                               .createQuery("from " + EPRole.class.getName() + " where appId is null " + appIdValue).list();
+                                               for (EPRole role : roles) {
+                                                       role.setAppId(1L);
+                                                       rolesMap.put(role.getId(), role);
+                                               }
+                                       } else { // remote app
+                                               @SuppressWarnings("unchecked")
+                                               List<EPRole> roles = localSession
+                                                               .createQuery("from " + EPRole.class.getName() + " where appId=" + appId).list();
+                                               for (EPRole role : roles) {
+                                                       rolesMap.put(role.getAppRoleId(), role);
+                                               }
+                                       }
+                                       EPRole role = null;
+                                       for (EcompRole userRole : newRolesToAdd) {
+                                               if (("PUT".equals(reqType) || "POST".equals(reqType)) && userRole.getName().equals(PortalConstants.ADMIN_ROLE)) {
+                                                       role = (EPRole) localSession.get(EPRole.class, new Long(PortalConstants.ACCOUNT_ADMIN_ROLE_ID));
+                                               } else if (userRole.getId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID) && !extRequestValue){
+                                                               continue;
+                                               }
+                                               EPUserApp userApp = new EPUserApp();
+                                               userApp.setUserId(client.getId());
+                                               userApp.setApp(app);
+                                               userApp.setRole(("PUT".equals(reqType) || "POST".equals(reqType) && userRole.getId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID)) ?  role : rolesMap.get(userRole.getId()));
+                                               localSession.save(userApp);
+                                               localSession.flush();
+                                       }
+
+                                       if (appId == PortalConstants.PORTAL_APP_ID) {
+                                               /*
+                                                * for local app -- hack - always make sure fn_role
+                                                * table's app_id is null and not 1 for primary app in
+                                                * this case being ecomp portal app; reason: hibernate
+                                                * is rightly setting this to 1 while persisting to
+                                                * fn_role as per the mapping but SDK role management
+                                                * code expects the app_id to be null as there is no
+                                                * concept of App_id in SDK
+                                                */
+                                               SQLQuery sqlQuery = localSession
+                                                               .createSQLQuery("update fn_role set app_id = null where app_id = 1 ");
+                                               sqlQuery.executeUpdate();
+
+                                               
+                                       }
+                               }
+                       }
+                       transaction.commit();
+                       result = true;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       EcompPortalUtils.rollbackTransaction(transaction,
+                                       "Exception occurred in syncUserRoles, Details: " + EcompPortalUtils.getStackTrace(e));
+                       if("DELETE".equals(reqType)){
+                               throw new Exception(e.getMessage());
+                       }
+               } finally {
+                       localSession.close();
+                       if (!result && !"DELETE".equals(reqType)) {
+                               throw new Exception(
+                                               "Exception occurred in syncUserRoles while closing database session for app: '" + appId + "'.");
+                       }
+               }
+       }
+       
+       /**
+        * Called when getting the list of roles for the user
+        * 
+        * @param appRoles
+        * @param userAppRoles
+        * @return List<RoleInAppForUser> 
+        */
+       protected List<RoleInAppForUser> constructRolesInAppForUserGet(EcompRole[] appRoles, EcompRole[] userAppRoles) {
+               List<RoleInAppForUser> rolesInAppForUser = new ArrayList<RoleInAppForUser>();
+
+               Set<Long> userAppRolesMap = new HashSet<Long>();
+               if (userAppRoles != null) {
+                       for (EcompRole ecompRole : userAppRoles) {
+                               userAppRolesMap.add(ecompRole.getId());
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "constructRolesInAppForUserGet has received userAppRoles list empty");
+               }
+
+               if (appRoles != null) {
+                       for (EcompRole ecompRole : appRoles) {
+                               RoleInAppForUser roleForUser = new RoleInAppForUser(ecompRole.getId(), ecompRole.getName());
+                               roleForUser.isApplied = userAppRolesMap.contains(ecompRole.getId());
+                               rolesInAppForUser.add(roleForUser);
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger, "constructRolesInAppForUser has received appRoles list empty");
+               }
+               return rolesInAppForUser;
+       }
+
+       /**
+        * Called when getting the list of roles for the user
+        * 
+        * @param appRoles
+        * @param userAppRoles
+        * @param extRequestValue 
+        *                      set to false if request is from users page otherwise true
+        * @return List<RoleInAppForUser>
+        */
+       protected List<RoleInAppForUser> constructRolesInAppForUserGet(List<Role> appRoles, EPRole[] userAppRoles, Boolean extRequestValue) {
+               List<RoleInAppForUser> rolesInAppForUser = new ArrayList<RoleInAppForUser>();
+
+               Set<Long> userAppRolesMap = new HashSet<Long>();
+               if (userAppRoles != null) {
+                       for (EPRole ecompRole : userAppRoles) {
+                               userAppRolesMap.add(ecompRole.getId());
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "constructRolesInAppForUserGet has received userAppRoles list empty.");
+               }
+
+               if (appRoles != null) {
+                       for (Role ecompRole : appRoles) {
+                               if (ecompRole.getId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID) && !extRequestValue)
+                                       continue;
+                               RoleInAppForUser roleForUser = new RoleInAppForUser(ecompRole.getId(), ecompRole.getName());
+                               roleForUser.isApplied = userAppRolesMap.contains(ecompRole.getId());
+                               rolesInAppForUser.add(roleForUser);
+                       }
+               } else {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "constructRolesInAppForUser has received appRoles list empty.");
+               }
+               return rolesInAppForUser;
+       }
+
+       
+       /**
+        * copies of methods in GetAppsWithUserRoleState
+        * 
+        * @param sessionFactory
+        * @param appId
+        * @param appRoles
+        * @throws Exception
+        */
+       protected void syncAppRoles(SessionFactory sessionFactory, Long appId, EcompRole[] appRoles) throws Exception {
+               logger.debug(EELFLoggerDelegate.debugLogger, "entering syncAppRoles for appId: " + appId);
+               HashMap<Long, EcompRole> newRolesMap = hashMapFromEcompRoles(appRoles);
+               boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       // Attention! All roles from remote application supposed to be
+                       // active!
+                       @SuppressWarnings("unchecked")
+                       List<EPRole> currentAppRoles = localSession
+                                       .createQuery("from " + EPRole.class.getName() + " where appId=" + appId).list();
+                       List<EPRole> obsoleteRoles = new ArrayList<EPRole>();
+                       for (int i = 0; i < currentAppRoles.size(); i++) {
+                               EPRole oldAppRole = currentAppRoles.get(i);
+                               if (oldAppRole.getAppRoleId() != null) {
+                                       EcompRole role = null;
+                                       role = newRolesMap.get(oldAppRole.getAppRoleId());
+                                       if (role != null) {
+                                               if (!(role.getName() == null || oldAppRole.getName().equals(role.getName()))) {
+                                                       oldAppRole.setName(role.getName());
+                                                       localSession.update(oldAppRole);
+                                               }
+                                               newRolesMap.remove(oldAppRole.getAppRoleId());
+                                       } else {
+                                               obsoleteRoles.add(oldAppRole);
+                                       }
+                               } else {
+                                       obsoleteRoles.add(oldAppRole);
+                               }
+                       }
+                       Collection<EcompRole> newRolesToAdd = newRolesMap.values();
+                       for (EcompRole role : newRolesToAdd) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "about to add missing role: " + role.toString());
+                               EPRole newRole = new EPRole();
+                               // Attention! All roles from remote application supposed to be
+                               // active!
+                               newRole.setActive(true);
+                               newRole.setName(role.getName());
+                               newRole.setAppId(appId);
+                               newRole.setAppRoleId(role.getId());
+                               localSession.save(newRole);
+                       }
+                       if (obsoleteRoles.size() > 0) {
+                               logger.debug(EELFLoggerDelegate.debugLogger, "we have obsolete roles to delete");
+                               for (EPRole role : obsoleteRoles) {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "obsolete role: " + role.toString());
+                                       Long roleId = role.getId();
+                                       // delete obsolete roles here
+                                       // Must delete all records with foreign key constraints on
+                                       // fn_role:
+                                       // fn_user_role, fn_role_composite, fn_role_function,
+                                       // fn_user_pseudo_role, fn_menu_functional_roles.
+                                       // And for fn_menu_functional, if no other roles for that
+                                       // menu item, remove the url.
+
+                                       // Delete from fn_user_role
+                                       @SuppressWarnings("unchecked")
+                                       List<EPUserApp> userRoles = localSession.createQuery(
+                                                       "from " + EPUserApp.class.getName() + " where app.id=" + appId + " and role_id=" + roleId)
+                                                       .list();
+
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "number of userRoles to delete: " + userRoles.size());
+                                       for (EPUserApp userRole : userRoles) {
+                                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                                               "about to delete userRole: " + userRole.toString());
+                                               localSession.delete(userRole);
+                                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                                               "finished deleting userRole: " + userRole.toString());
+                                       }
+
+                                       // Delete from fn_menu_functional_roles
+                                       @SuppressWarnings("unchecked")
+                                       List<FunctionalMenuRole> funcMenuRoles = localSession
+                                                       .createQuery("from " + FunctionalMenuRole.class.getName() + " where roleId=" + roleId)
+                                                       .list();
+                                       int numMenuRoles = funcMenuRoles.size();
+                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                       "number of funcMenuRoles for roleId: " + roleId + ": " + numMenuRoles);
+                                       for (FunctionalMenuRole funcMenuRole : funcMenuRoles) {
+                                               Long menuId = funcMenuRole.menuId;
+                                               // If this is the only role for this menu item, then the
+                                               // app and roles will be gone,
+                                               // so must null out the url too, to be consistent
+                                               @SuppressWarnings("unchecked")
+                                               List<FunctionalMenuRole> funcMenuRoles2 = localSession
+                                                               .createQuery("from " + FunctionalMenuRole.class.getName() + " where menuId=" + menuId)
+                                                               .list();
+                                               int numMenuRoles2 = funcMenuRoles2.size();
+                                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                                               "number of funcMenuRoles for menuId: " + menuId + ": " + numMenuRoles2);
+                                               localSession.delete(funcMenuRole);
+                                               if (numMenuRoles2 == 1) {
+                                                       // If this is the only role for this menu item, then
+                                                       // the app and roles will be gone,
+                                                       // so must null out the url too, to be consistent
+                                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                       "There is exactly 1 menu item for this role, so emptying the url");
+                                                       @SuppressWarnings("unchecked")
+                                                       List<FunctionalMenuItem> funcMenuItems = localSession
+                                                                       .createQuery(
+                                                                                       "from " + FunctionalMenuItem.class.getName() + " where menuId=" + menuId)
+                                                                       .list();
+                                                       if (funcMenuItems.size() > 0) {
+                                                               logger.debug(EELFLoggerDelegate.debugLogger, "got the menu item");
+                                                               FunctionalMenuItem funcMenuItem = funcMenuItems.get(0);
+                                                               funcMenuItem.url = "";
+                                                               localSession.update(funcMenuItem);
+                                                       }
+                                               }
+                                       }
+
+                                       // Delete from fn_role_function
+                                       String sql = "DELETE FROM fn_role_function WHERE role_id=" + roleId;
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+                                       Query query = localSession.createSQLQuery(sql);
+                                       query.executeUpdate();
+                                       
+                                       // Delete from ep_role_notification
+                                       sql = "DELETE FROM ep_role_notification WHERE role_id=" + roleId;
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+                                       query = localSession.createSQLQuery(sql);
+                                       query.executeUpdate();
+                                       
+                                       // Delete from fn_role_composite
+                                       sql = "DELETE FROM fn_role_composite WHERE parent_role_id=" + roleId + " OR child_role_id="
+                                                       + roleId;
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+                                       query = localSession.createSQLQuery(sql);
+                                       query.executeUpdate();
+
+                                       // Delete from fn_user_pseudo_role
+                                       sql = "DELETE FROM fn_user_pseudo_role WHERE pseudo_role_id=" + roleId;
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
+                                       query = localSession.createSQLQuery(sql);
+                                       query.executeUpdate();
+
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "about to delete the role: " + role.toString());
+                                       localSession.delete(role);
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "deleted the role");
+                               }
+                       }
+                       logger.debug(EELFLoggerDelegate.debugLogger, "about to commit the transaction");
+                       transaction.commit();
+                       logger.debug(EELFLoggerDelegate.debugLogger, "committed the transaction");
+                       result = true;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       EcompPortalUtils.rollbackTransaction(transaction,
+                                       "Exception occurred in syncAppRoles, Details: " + EcompPortalUtils.getStackTrace(e));
+               } finally {
+                       localSession.close();
+                       if (!result) {
+                               throw new Exception(
+                                               "Exception occurred in syncAppRoles while closing database session for app: '" + appId + "'.");
+                       }
+               }
+       }
+       
+       /**
+        * Called when updating the list of roles for the user
+        * 
+        * @param userId
+        * @param appId
+        * @param userRolesInRemoteApp
+        * @return RolesInAppForUser
+        */
+       protected RolesInAppForUser constructRolesInAppForUserUpdate(String userId, Long appId,
+                       Set<EcompRole> userRolesInRemoteApp) {
+               RolesInAppForUser result;
+               result = new RolesInAppForUser();
+               result.appId = appId;
+               result.orgUserId = userId;
+               for (EcompRole role : userRolesInRemoteApp) {
+                       RoleInAppForUser roleInAppForUser = new RoleInAppForUser();
+                       roleInAppForUser.roleId = role.getId();
+                       roleInAppForUser.roleName = role.getName();
+                       roleInAppForUser.isApplied = new Boolean(true);
+                       result.roles.add(roleInAppForUser);
+               }
+               return result;
+       }
+       
+       /**
+        * 
+        * @param roleInAppForUserList
+        * @return boolean
+        */
+       protected boolean remoteUserShouldBeCreated(List<RoleInAppForUser> roleInAppForUserList) {
+               for (RoleInAppForUser roleInAppForUser : roleInAppForUserList) {
+                       if (roleInAppForUser.isApplied.booleanValue()) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+       
+       /**
+        * Builds JSON and posts it to a remote application to update user roles.
+        * 
+        * @param roleInAppForUserList
+        * @param mapper
+        * @param applicationsRestClientService
+        * @param appId
+        * @param userId
+        * @return Set of roles as sent; NOT the response from the app.
+        * @throws JsonProcessingException
+        * @throws HTTPException
+        */
+       protected Set<EcompRole> postUsersRolesToRemoteApp(List<RoleInAppForUser> roleInAppForUserList, ObjectMapper mapper,
+                       ApplicationsRestClientService applicationsRestClientService, Long appId, String userId)
+                       throws JsonProcessingException, HTTPException {
+               Set<EcompRole> updatedUserRolesinRemote = constructUsersRemoteAppRoles(roleInAppForUserList);
+               Set<EcompRole> updateUserRolesInEcomp = constructUsersEcompRoles(roleInAppForUserList);
+               String userRolesAsString = mapper.writeValueAsString(updatedUserRolesinRemote);
+               applicationsRestClientService.post(EcompRole.class, appId, userRolesAsString,
+                               String.format("/user/%s/roles", userId));
+               // TODO: We should add code that verifies that the post operation did
+               // succeed. Because the SDK may still return 200 OK with an html page
+               // even when it fails!
+               return updateUserRolesInEcomp;
+       }
+       
+       /**
+        * 
+        * @param roleInAppForUserList
+        * @return Set<EcompRole> 
+        */
+       protected Set<EcompRole> constructUsersEcompRoles(List<RoleInAppForUser> roleInAppForUserList) {
+               Set<EcompRole> existingUserRoles = new TreeSet<EcompRole>();
+               for (RoleInAppForUser roleInAppForUser : roleInAppForUserList) {
+                       if (roleInAppForUser.isApplied) {
+                               EcompRole ecompRole = new EcompRole();
+                               ecompRole.setId(roleInAppForUser.roleId);
+                               ecompRole.setName(roleInAppForUser.roleName);
+                               existingUserRoles.add(ecompRole);
+                       }
+               }
+               return existingUserRoles;
+       }
+       
+       /**
+        * Constructs user app roles excluding Account Administrator role
+        * 
+        * @param roleInAppForUserList
+        * @return
+        *            List of roles with Role name, Role Id
+        */
+       protected Set<EcompRole> constructUsersRemoteAppRoles(List<RoleInAppForUser> roleInAppForUserList) {
+               Set<EcompRole> existingUserRoles = new TreeSet<EcompRole>();
+               for (RoleInAppForUser roleInAppForUser : roleInAppForUserList) {
+                       if (roleInAppForUser.isApplied && !roleInAppForUser.getRoleId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID)) {
+                               EcompRole ecompRole = new EcompRole();
+                               ecompRole.setId(roleInAppForUser.roleId);
+                               ecompRole.setName(roleInAppForUser.roleName);
+                               existingUserRoles.add(ecompRole);
+                       }
+               }
+               return existingUserRoles;
+       }
+       
+       /**
+        * This is for a single app
+        * 
+        * @param rolesInAppForUser
+        * @param externalSystemRequest  
+        *                      set to false if requests from Users page otherwise true
+        * @return true on success, false otherwise
+        */
+       protected boolean applyChangesInUserRolesForAppToEcompDB(RolesInAppForUser rolesInAppForUser, boolean externalSystemRequest, String reqType) throws Exception {
+               boolean result = false;
+               String userId = rolesInAppForUser.orgUserId;
+               Long appId = rolesInAppForUser.appId;
+               synchronized (syncRests) {
+                       if (rolesInAppForUser != null) {
+                               createLocalUserIfNecessary(userId);
+                       }
+
+                       if (rolesInAppForUser != null) {
+                               EcompRole[] userAppRoles = new EcompRole[rolesInAppForUser.roles.size()];
+                               for (int i = 0; i < rolesInAppForUser.roles.size(); i++) {
+                                       RoleInAppForUser roleInAppForUser = rolesInAppForUser.roles.get(i);
+                                       EcompRole role = new EcompRole();
+                                       role.setId(roleInAppForUser.roleId);
+                                       role.setName(roleInAppForUser.roleName);
+                                       userAppRoles[i] = role;
+                               }
+                               try {
+                                       syncUserRoles(sessionFactory, userId, appId, userAppRoles, externalSystemRequest, reqType);
+                                       result = true;
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger,
+                                                       "applyChangesInUserRolesForAppToEcompDB: failed to syncUserRoles for attuid " + userId, e);
+                                       if("DELETE".equals(reqType)){
+                                               throw new Exception(e.getMessage());
+                                       }
+                               }
+                       }
+               }
+               return result;
+       }
+       
+       /**
+        * 
+        * @param appId
+        * @param remoteUser
+        * @return UserApplicationRoles
+        */
+       protected UserApplicationRoles convertToUserApplicationRoles(Long appId, RemoteUserWithRoles remoteUser) {
+               UserApplicationRoles userWithRemoteAppRoles = new UserApplicationRoles();
+               userWithRemoteAppRoles.setAppId(appId);
+               userWithRemoteAppRoles.setOrgUserId(remoteUser.getOrgUserId());
+               userWithRemoteAppRoles.setFirstName(remoteUser.getFirstName());
+               userWithRemoteAppRoles.setLastName(remoteUser.getLastName());
+               userWithRemoteAppRoles.setRoles(remoteUser.getRoles());
+               return userWithRemoteAppRoles;
+       }
+       
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserRolesService#
+        * importRolesFromRemoteApplication(java.lang.Long)
+        */
+       public List<EPRole> importRolesFromRemoteApplication(Long appId) throws HTTPException {
+               EPRole[] appRolesFull = applicationsRestClientService.get(EPRole[].class, appId, "/rolesFull");
+               List<EPRole> rolesList = Arrays.asList(appRolesFull);
+               for (EPRole externalAppRole : rolesList) {
+
+                       // Try to find an existing extern role for the app in the local
+                       // ecomp DB. If so, then use its id to update the existing external
+                       // application role record.
+                       Long externAppId = externalAppRole.getId();
+                       EPRole existingAppRole = epRoleService.getRole(appId, externAppId);
+                       if (existingAppRole != null) {
+                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                               String.format("ecomp role already exists for app=%s; appRoleId=%s. No need to import this one.",
+                                                               appId, externAppId));
+                               continue;
+                       }
+                       // persistExternalRoleInEcompDb(externalAppRole, appId,
+                       // roleService);
+               }
+
+               return rolesList;
+       }
+       
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserRolesService#
+        * setAppWithUserRoleStateForUser(org.openecomp.portalapp.portal.domain.
+        * EPUser, org.openecomp.portalapp.portal.transport.AppWithRolesForUser)
+        */
+       public boolean setAppWithUserRoleStateForUser(EPUser user, AppWithRolesForUser newAppRolesForUser) {
+               boolean result = false;
+               boolean epRequestValue = false;
+               String userId = "";
+               if (newAppRolesForUser != null && newAppRolesForUser.orgUserId != null) {
+                       userId = newAppRolesForUser.orgUserId.trim();
+               }
+               Long appId = newAppRolesForUser.appId;
+               List<RoleInAppForUser> roleInAppForUserList = newAppRolesForUser.appRoles;
+               if (userId.length() > 0) {
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+                       try {
+                               EPApp app = appsService.getApp(appId);
+                               applyChangesToUserAppRolesForMyLoginsRequest(user, appId);
+
+                               // if local app
+                               if (appId == PortalConstants.PORTAL_APP_ID) {
+                                       // EPUser localUser = getUserFromApp(userId, app, applicationsRestClientService);
+                                       Set<EcompRole> userRolesInLocalApp = postUsersRolesToLocalApp(roleInAppForUserList, mapper,
+                                                       applicationsRestClientService, appId, userId);
+                                       RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(userId, appId,
+                                                       userRolesInLocalApp);
+                                       result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, epRequestValue, null);
+
+                               } else {// remote app
+                                       EPUser remoteAppUser = null;
+                                       try {
+                                               remoteAppUser = getUserFromApp(userId, app, applicationsRestClientService);
+                                       } catch (HTTPException e) {
+                                               // Some apps are returning 400 if user is not found.
+                                               if (e.getResponseCode() == 400) {
+                                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                       "setAppWithUserRoleStateForUser: getuserFromApp threw exception with response code 400; continuing",
+                                                                       e);
+                                               } else {
+                                                       // Other response code, let it come thru.
+                                                       throw e;
+                                               }
+                                       }
+                                       if (remoteAppUser == null) {
+                                               if (remoteUserShouldBeCreated(roleInAppForUserList)) {
+                                                       
+                                                       createNewUserOnRemoteApp(userId, app, applicationsRestClientService, searchService, mapper, isAppUpgradeVersion(app));
+                                                       // If we succeed, we know that the new user was
+                                                       // persisted on remote app.
+                                                       remoteAppUser = getUserFromApp(userId, app, applicationsRestClientService);
+                                                       if (remoteAppUser == null) {
+                                                               logger.error(EELFLoggerDelegate.errorLogger,
+                                                                               "Failed to persist new user: " + userId + " in remote app. appId = " + appId);
+                                                               // return null;
+                                                       }
+                                               }
+                                       }
+                                       if (remoteAppUser != null) {
+                                               Set<EcompRole> userRolesInRemoteApp = postUsersRolesToRemoteApp(roleInAppForUserList, mapper,
+                                                               applicationsRestClientService, appId, userId);
+                                               RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(userId, appId,
+                                                               userRolesInRemoteApp);
+                                               result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, epRequestValue, null);
+
+                                               // If no roles remain, request app to set user inactive.
+                                               if (userRolesInRemoteApp.size() == 0) {
+                                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                       "setAppWithUserRoleStateForUser: no roles in app {}, set user {} to inactive", app,
+                                                                       userId);
+                                                       remoteAppUser.setActive(false);
+                                                       postUserToRemoteApp(userId, user, app, applicationsRestClientService);
+                                               }
+                                       }
+                               }
+                       } catch (Exception e) {
+                               String message = String.format(
+                                               "Failed to create user or update user roles for User %s, AppId %s",
+                                               userId, Long.toString(appId));
+                               logger.error(EELFLoggerDelegate.errorLogger, message, e);
+                               result = false;
+                       }
+
+               }
+               return result;
+       }
+       
+       /**
+        * 
+        * @param userId
+        * @param app
+        * @param applicationsRestClientService
+        * @param searchService
+        * @param mapper
+        * @throws Exception
+        */
+       protected void createNewUserOnRemoteApp(String userId, EPApp app,
+                       ApplicationsRestClientService applicationsRestClientService, SearchService searchService,
+                       ObjectMapper mapper, boolean postOpenSource) throws Exception {
+
+                       
+                       EPUser client = searchService.searchUserByUserId(userId);
+                       
+                       mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+                       
+                       if (client == null) {
+                               String msg = "cannot create user " + userId + ", because he/she cannot be found in phonebook.";
+                               logger.error(EELFLoggerDelegate.errorLogger, msg);
+                               throw new Exception(msg);
+                       }
+
+                       client.setLoginId(userId);
+                       client.setActive(true);
+
+                       String userInString = null;
+                       userInString = mapper.writerFor(EPUser.class).writeValueAsString(client);
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       "about to post new client to remote application, users json = " + userInString);
+                       applicationsRestClientService.post(EPUser.class, app.getId(), userInString, String.format("/user", userId));
+
+       }
+       
+       @SuppressWarnings("unchecked")
+       protected void applyChangesToAppRolesRequest(Long appId, Long userId, String updateStatus, EPUserAppRolesRequest epUserAppRolesRequest) {
+               final Map<String, Long> epRequestParams = new HashMap<>();
+               try {
+                       EPUserAppRolesRequest epAppRolesRequestData = epUserAppRolesRequest;
+                       epAppRolesRequestData.setUpdatedDate(new Date());
+                       epAppRolesRequestData.setRequestStatus(updateStatus);
+                       HashMap<String, Long> addiotonalUpdateParam = new HashMap<String, Long>();
+                       addiotonalUpdateParam.put("userId", userId);
+                       dataAccessService.saveDomainObject(epAppRolesRequestData, addiotonalUpdateParam);
+                       epRequestParams.put("reqId", epUserAppRolesRequest.getId());
+                       List<EPUserAppRolesRequestDetail> epUserAppRolessDetailList = new ArrayList<EPUserAppRolesRequestDetail>();
+                       epUserAppRolessDetailList = dataAccessService.executeNamedQuery("userAppRolesRequestDetailList",
+                                       epRequestParams, null);
+                       if (epUserAppRolessDetailList.size() > 0) {
+                               for (EPUserAppRolesRequestDetail epRequestUpdateData : epUserAppRolessDetailList) {
+                                       EPUserAppRolesRequestDetail epAppRoleDetailData = epRequestUpdateData;
+                                       epAppRoleDetailData.setReqType(updateStatus);
+                                       epAppRoleDetailData.setEpRequestIdData(epAppRolesRequestData);
+                                       HashMap<String, Long> updateDetailsParam = new HashMap<String, Long>();
+                                       addiotonalUpdateParam.put("reqId", epUserAppRolesRequest.getId());
+                                       dataAccessService.saveDomainObject(epAppRoleDetailData, updateDetailsParam);
+                               }
+                       }
+                       logger.debug(EELFLoggerDelegate.debugLogger, "The request is set to complete");
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "applyChangesToAppRolesRequest failed", e);
+               }
+       }
+       
+       @SuppressWarnings("unchecked")
+       public void applyChangesToUserAppRolesForMyLoginsRequest(EPUser user, Long appId) {
+               final Map<String, Long> params = new HashMap<>();
+               final Map<String, Long> epDetailParams = new HashMap<>();
+               List<EPUserAppRolesRequest> epRequestIdVal = new ArrayList<EPUserAppRolesRequest>();
+               params.put("appId", appId);
+               params.put("userId", user.getId());
+               try {
+                       epRequestIdVal = (List<EPUserAppRolesRequest>) dataAccessService
+                                       .executeNamedQuery("userAppRolesRequestList", params, null);
+                       if (epRequestIdVal.size() > 0) {
+                               EPUserAppRolesRequest epAppRolesRequestData = epRequestIdVal.get(0);
+                               epAppRolesRequestData.setUpdatedDate(new Date());
+                               epAppRolesRequestData.setRequestStatus("O");
+                               HashMap<String, Long> addiotonalUpdateParam = new HashMap<String, Long>();
+                               addiotonalUpdateParam.put("userId", user.getId());
+                               dataAccessService.saveDomainObject(epAppRolesRequestData, addiotonalUpdateParam);
+                               epDetailParams.put("reqId", epAppRolesRequestData.getId());
+                               List<EPUserAppRolesRequestDetail> epUserAppRolesDetailList = new ArrayList<EPUserAppRolesRequestDetail>();
+                               epUserAppRolesDetailList = dataAccessService.executeNamedQuery("userAppRolesRequestDetailList",
+                                               epDetailParams, null);
+                               if (epUserAppRolesDetailList.size() > 0) {
+                                       for (EPUserAppRolesRequestDetail epRequestUpdateList : epUserAppRolesDetailList) {
+                                               EPUserAppRolesRequestDetail epAppRoleDetailData = epRequestUpdateList;
+                                               epAppRoleDetailData.setReqType("O");
+                                               epAppRoleDetailData.setEpRequestIdData(epAppRolesRequestData);
+                                               HashMap<String, Long> updateDetailsParams = new HashMap<String, Long>();
+                                               addiotonalUpdateParam.put("reqId", epAppRolesRequestData.getId());
+                                               dataAccessService.saveDomainObject(epAppRoleDetailData, updateDetailsParams);
+                                       }
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "User App roles request from User Page is overridden");
+                               }
+                       }
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "applyChangesToUserAppRolesRequest failed", e);
+               }
+       }
+       
+       /**
+        * Pushes specified user details to the specified remote app.
+        * 
+        * @param userId
+        *            ATT UID identifying user at remote app in REST endpoint path
+        * @param user
+        *            User details to be pushed
+        * @param app
+        *            Remote app
+        * @param applicationsRestClientService
+        * @throws HTTPException
+        */
+       protected void postUserToRemoteApp(String userId, EPUser user, EPApp app,
+                       ApplicationsRestClientService applicationsRestClientService) throws HTTPException {
+       
+                getUser(userId, app, applicationsRestClientService);
+                                       
+       }
+       
+       /**
+        * It returns user details for single org user id
+        * 
+        * @param userParams
+        * @return
+        *              if user exists it returns list of user details otherwise empty value
+        */
+       @SuppressWarnings("unchecked")
+       private List<EPUser> checkIfUserExists(Map<String, String> userParams){ 
+               return (List<EPUser>)dataAccessService.executeNamedQuery("epUserAppId", userParams, null);
+       }
+       
+       /**
+        * It checks whether the new user is valid or not otherwise throws exception
+        * 
+        * @param orgUserId
+        * @param app
+        * @return 
+        *                      Checks if user is valid and returns message otherwise throws exception
+        * @throws Exception
+        */
+       private String validateNewUser(String orgUserId, EPApp app) throws Exception {
+               EPUser epUser = searchService.searchUserByUserId(orgUserId);
+               if (epUser == null) {
+                       throw new Exception("User does not exist");
+               } else if (!epUser.getOrgUserId().equals(orgUserId)) {
+                       throw new Exception("User does not exist");
+               } else if (app == null) {
+                       throw new Exception("Application does not exist");
+               }
+               return "Saved Successfully";
+       }
+       
+       /**
+        *   Checks if the fields exists or not
+        *   
+        * @param userList
+        *                      contains user information
+        * @param app
+        *                      contains app name
+        * @throws Exception
+        *                      throws exception if the field is not valid
+        */
+       private void validateExternalRequestFields(List<EPUser> userList, EPApp app) throws Exception{
+               if (userList.size() == 0 || userList.isEmpty() ) {
+                       throw new Exception("User does not exist");
+               } else if(app == null) {
+                       throw new Exception("Application does not exist");
+               } else if(!app.getEnabled() && !app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
+                       throw new Exception(app.getMlAppName()+" application is unavailable");
+               }
+       }
+       
+       @SuppressWarnings("unchecked")
+       public ExternalRequestFieldsValidator setExternalRequestUserAppRole(ExternalSystemUser newAppRolesForUser, String reqType) {
+               boolean result = false;
+               boolean externalSystemRequest = true;
+               final Map<String, Long> params = new HashMap<>();
+               final Map<String, String> userParams = new HashMap<>();
+               List<EPUser> userInfo = null;
+               EPUser userId = null;
+               List<EPUserAppRolesRequest> epRequestId = null;
+               String orgUserId = "";
+               String updateStatus = "";
+               String reqMessage = "";
+               EPApp app = null;
+               if (newAppRolesForUser != null && newAppRolesForUser.getLoginId() != null) {
+                       orgUserId = newAppRolesForUser.getLoginId().trim();
+               }
+               String appName = newAppRolesForUser.getApplicationName();
+               String logMessage = ("DELETE").equals(reqType) ? "Deleting": "Assigning/Updating" ;
+               if (orgUserId.length() > 0) {
+                       ObjectMapper mapper = new ObjectMapper();
+                       mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+                       int epRequestIdSize = 0;
+                       try {
+                               app = appsService.getAppDetail(appName);
+                               userParams.put("orgUserIdValue", orgUserId);
+                               userInfo = checkIfUserExists(userParams);
+                               reqMessage = "Updated Successfully";
+                               if (!reqType.equals("DELETE") && (userInfo.size() == 0 || userInfo.isEmpty())) {
+                                       reqMessage = validateNewUser(orgUserId, app);
+                               }
+                               if (userInfo.size() != 0 || !userInfo.isEmpty()) {
+                                       validateExternalRequestFields(userInfo, app);
+                                       userId = userInfo.get(0);
+                                       params.put("appId", app.getId());
+                                       params.put("userId", userId.getId());
+                                       epRequestId = (List<EPUserAppRolesRequest>) dataAccessService
+                                                       .executeNamedQuery("userAppRolesRequestList", params, null);
+                                       epRequestIdSize = epRequestId.size();
+                               }
+                               if(!app.getId().equals(PortalConstants.PORTAL_APP_ID)){ 
+                               EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, app.getId(), "/roles");
+                               syncAppRoles(sessionFactory, app.getId(), appRoles);
+                               }
+                               
+                               List<RoleInAppForUser> roleInAppForUserList = roleInAppForUserList(newAppRolesForUser.getRoles(),
+                                               app.getId(), app.getMlAppName());
+                               // if local app
+                               if (app.getId() == PortalConstants.PORTAL_APP_ID) {
+                                       // EPUser localUser = getUserFromApp(orgUserId, app, applicationsRestClientService);
+                                       Set<EcompRole> userRolesInLocalApp = postUsersRolesToLocalApp(roleInAppForUserList, mapper,
+                                                       applicationsRestClientService, app.getId(), orgUserId);
+                                       RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(orgUserId, app.getId(),
+                                                       userRolesInLocalApp);
+                                       logger.info(EELFLoggerDelegate.debugLogger, "{} user app roles: for app {}, user {}", 
+                                                       logMessage, newAppRolesForUser.getApplicationName(), newAppRolesForUser.getLoginId());
+                                       result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, externalSystemRequest, reqType);
+                               } else {// remote app
+                                       EPUser remoteAppUser = null;
+                                       try {
+                                               remoteAppUser = getUserFromApp(orgUserId, app, applicationsRestClientService);
+                                       } catch (HTTPException e) {
+                                               // Some apps are returning 400 if user is not found.
+                                               if (e.getResponseCode() == 400) {
+                                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                       "setAppWithUserRoleStateForUser: getuserFromApp threw exception with response code 400; continuing",
+                                                                       e);
+                                               } else {
+                                                       // Other response code, let it come thru.
+                                                       throw e;
+                                               }
+                                       }
+                                       if (remoteAppUser == null) {
+                                               createNewUserOnRemoteApp(orgUserId, app, applicationsRestClientService, searchService, mapper,
+                                                               isAppUpgradeVersion(app));
+                                               // If we succeed, we know that the new user was
+                                               // persisted on remote app.
+                                               remoteAppUser = getUserFromApp(orgUserId, app, applicationsRestClientService);
+                                               if (remoteAppUser == null) {
+                                                       logger.error(EELFLoggerDelegate.errorLogger, "Failed to persist new user: " + orgUserId
+                                                                       + " in remote app. appId = " + app.getId());
+                                                       // return null;
+                                               }
+                                               reqMessage = "Saved Successfully";
+                                       }
+                                       if (remoteAppUser != null) {
+                                                       Set<EcompRole> userRolesInRemoteApp = postUsersRolesToRemoteApp(roleInAppForUserList,
+                                                                                       mapper, applicationsRestClientService, app.getId(), orgUserId); 
+                                                       
+                                                       RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(orgUserId,
+                                                                       app.getId(), userRolesInRemoteApp);
+                                                       logger.info(EELFLoggerDelegate.debugLogger, "{} user app roles: for app {}, user {}", 
+                                                                       logMessage, newAppRolesForUser.getApplicationName(), newAppRolesForUser.getLoginId());
+                                                       result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser, externalSystemRequest, reqType);
+                                                       // If no roles remain, request app to set user inactive.
+                                                       /*if (userRolesInRemoteApp.size() == 0) {
+                                                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                               "setAppWithUserRoleStateForUser: no roles in app {}, set user {} to inactive", app,
+                                                                               attuid);
+                                                               //TODO Need  to fix the logged in user is not set to inactive
+                                                               remoteAppUser.setActive(false);
+                                                               postUserToRemoteApp(attuid, user, app, applicationsRestClientService);
+                                                       }*/
+
+                                       }
+                                       if(!result){
+                                               reqMessage = "Failed to save the user app role(s)";
+                                       }
+                                       if (epRequestIdSize > 0 && !userInfo.isEmpty()) {
+                                               updateStatus = "C";
+                                               applyChangesToAppRolesRequest(app.getId(), userId.getId(), updateStatus, epRequestId.get(0));
+                                       }
+                                       
+                               }
+                       } catch (Exception e) {
+                               String message = String.format("Failed to create user or update user roles for User %s, AppId %s",
+                                               orgUserId, appName);
+                               logger.error(EELFLoggerDelegate.errorLogger, message, e);
+                               result = false;
+                               reqMessage = e.getMessage();
+                                if(epRequestIdSize > 0 && !userInfo.isEmpty()){
+                                updateStatus = "F";
+                                applyChangesToAppRolesRequest(app.getId(), userId.getId(),
+                                updateStatus, epRequestId.get(0));
+                                }
+                       }
+
+               }
+               return new ExternalRequestFieldsValidator(result, reqMessage);
+       }
+       
+       /**
+        * 
+        * @param roleInAppForUserList
+        * @param mapper
+        * @param applicationsRestClientService
+        * @param appId
+        * @param userId
+        * @return  Set<EcompRole>
+        * @throws JsonProcessingException
+        * @throws HTTPException
+        */
+       private Set<EcompRole> postUsersRolesToLocalApp(List<RoleInAppForUser> roleInAppForUserList, ObjectMapper mapper,
+                       ApplicationsRestClientService applicationsRestClientService, Long appId, String userId)
+                       throws JsonProcessingException, HTTPException {
+               Set<EcompRole> updatedUserRoles = constructUsersEcompRoles(roleInAppForUserList);
+               return updatedUserRoles;
+       }
+       
+       /**
+        * It constructs and returns list of user app roles when the external API role approval system calls
+        * this method
+        * 
+        * @param roleInAppForUserList
+        * @param appId
+        * @return list of user app roles
+        * @throws Exception
+        *                 throws exceptions if role id does not exits 
+        */
+       private List<RoleInAppForUser> roleInAppForUserList(List<ExternalSystemRoleApproval> roleInAppForUserList,
+                       Long appId, String appName) throws Exception {
+               List<RoleInAppForUser> existingUserRoles = new ArrayList<RoleInAppForUser>();
+               EPRole existingAppRole = null;
+               for (ExternalSystemRoleApproval roleInAppForUser : roleInAppForUserList) {
+                       RoleInAppForUser ecompRole = new RoleInAppForUser();
+                       existingAppRole = epRoleService.getAppRole(roleInAppForUser.getRoleName(), appId);
+                       if (existingAppRole == null) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "roleInAppForUserList failed for the roles {}",
+                                               roleInAppForUserList);
+                               throw new Exception("'" +roleInAppForUser.getRoleName() + "'" +" role does not exist for" + appName + " application");
+                       }
+                       if (!existingAppRole.getActive()) {
+                               logger.error(EELFLoggerDelegate.errorLogger, "roleInAppForUserList failed for the roles {}",
+                                               roleInAppForUserList);
+                               throw new Exception(roleInAppForUser.getRoleName() + " role is unavailable for "+ appName + " application");
+                       } else {
+                               ecompRole.roleId = (appId == 1 || roleInAppForUser.getRoleName().equals(PortalConstants.ADMIN_ROLE)) ? existingAppRole.getId() : existingAppRole.getAppRoleId();
+                               ecompRole.roleName = roleInAppForUser.getRoleName();
+                               ecompRole.isApplied = true;
+                               existingUserRoles.add(ecompRole);
+                       }
+               }
+               return existingUserRoles;
+       }
+       
+       
+
+       /**
+        * 
+        * @param userId
+        * @param app
+        * @param applicationsRestClientService
+        * @return EPUser
+        * @throws HTTPException
+        */
+       protected EPUser getUserFromApp(String userId, EPApp app, ApplicationsRestClientService applicationsRestClientService)
+                       throws HTTPException {
+               // local app
+               if (app.getId() == PortalConstants.PORTAL_APP_ID) {
+                       // Map<String,String> params = new HashMap<String,String>();
+                       // params.put("sbcid",userId);
+                       @SuppressWarnings("unchecked")
+                       List<EPUser> userList = (List<EPUser>) dataAccessService
+                                       .executeQuery("from EPUser where orgUserId='" + userId + "'", null);
+                       if (userList != null && !userList.isEmpty())
+                               return userList.get(0);
+                       else
+                               return null;
+               }
+               // remote app
+               
+               return getUser(userId, app, applicationsRestClientService);
+       }
+       
+       protected EPUser getUser(String userId, EPApp app, ApplicationsRestClientService applicationsRestClientService)
+                       throws HTTPException {
+               return applicationsRestClientService.get(EPUser.class, app.getId(), String.format("/user/%s", userId), true);
+
+       }
+       
+       protected boolean isAppUpgradeVersion(EPApp app){
+               return true;
+       }
+       
+       
+       public ExternalSystemAccess getExternalRequestAccess(){
+               ExternalSystemAccess res = null; 
+               try {
+                       res = new ExternalSystemAccess(EPCommonSystemProperties.EXTERNAL_ACCESS_ENABLE,
+                                       Boolean.parseBoolean(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_ACCESS_ENABLE)));
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "getExternalRequestAccess failed" + e.getMessage());
+               }
+               return res;             
+       }
+       
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserRolesService#
+        * getAppRolesForUser(java.lang.Long, java.lang.String)
+        */
+       public List<RoleInAppForUser> getAppRolesForUser(Long appId, String userId, Boolean extRequestValue) {
+
+               List<RoleInAppForUser> rolesInAppForUser = null;
+               try {
+
+                       // for ecomp portal app, no need to make a remote call
+                       if (appId == PortalConstants.PORTAL_APP_ID) {
+
+                               List<Role> roleList = roleService.getAvailableRoles();
+                               List<Role> activeRoleList = new ArrayList<Role>();
+                               for(Role role: roleList) {
+                                       if(role.getActive()) {
+                                               if(role.getId() != 1){ // prevent portal admin from being added
+                                                       activeRoleList.add(role);
+                                               } else if(extRequestValue){
+                                                       activeRoleList.add(role);
+                                               }
+                                       }
+                                               
+                               }
+                               
+                               EPApp app = appsService.getApp(appId);
+                               EPUser localUser = getUserFromApp(userId, app, applicationsRestClientService);
+                               Set<EPRole> roleSet = localUser.getAppEPRoles(app);
+                               rolesInAppForUser = constructRolesInAppForUserGet(activeRoleList, roleSet.toArray(new EPRole[0]), extRequestValue);
+                               return rolesInAppForUser;
+                       }
+
+                       EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
+
+                       // Test this error case, for generating an internal Ecomp Portal
+                       // error
+                       // EcompRole[] appRoles = null;
+                       // If there is an exception in the rest client api, then null will
+                       // be returned.
+                       if (appRoles != null) {
+                               syncAppRoles(sessionFactory, appId, appRoles);
+                               EcompRole[] userAppRoles = null;
+                               try {
+                                       try {
+                                               userAppRoles = applicationsRestClientService.get(EcompRole[].class, appId,
+                                                               String.format("/user/%s/roles", userId));
+                                       } catch (HTTPException e) {
+                                               // Some apps are returning 400 if user is not found.
+                                               if (e.getResponseCode() == 400) {
+                                                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                                                       "getAppRolesForUser caught exception with response code 400; continuing", e);
+                                               } else {
+                                                       // Other response code, let it come thru.
+                                                       throw e;
+                                               }
+                                       }
+                                       if (userAppRoles == null) {
+                                               if (EcompPortalUtils.getExternalAppResponseCode() == 400) {
+                                                       EcompPortalUtils.setExternalAppResponseCode(200);
+                                                       String message = String.format(
+                                                                       "getAppRolesForUser: App %s, User %, endpoint /user/{userid}/roles returned 400, "
+                                                                                       + "assuming user doesn't exist, app is framework SDK based, and things are ok. "
+                                                                                       + "Overriding to 200 until framework SDK returns a useful response.",
+                                                                       Long.toString(appId), userId);
+                                                       logger.warn(EELFLoggerDelegate.applicationLogger, message);
+                                               }
+                                       }
+                                       
+                                        HashMap<Long, EcompRole> appRolesActiveMap =hashMapFromEcompRoles(appRoles);
+                                               ArrayList<EcompRole> activeRoles = new ArrayList<EcompRole>();
+                                               for (int i = 0; i < userAppRoles.length; i++) {
+                                                       if (appRolesActiveMap.containsKey(userAppRoles[i].getId())) {
+                                                               EcompRole role = new EcompRole();
+                                                               role.setId(userAppRoles[i].getId());
+                                                               role.setName(userAppRoles[i].getName());
+                                                               activeRoles.add(role);
+                                                       }
+                                               }
+                                               EcompRole[]     userAppRolesActive = activeRoles.toArray(new EcompRole[activeRoles.size()]);
+                                       
+                                       // If the remote application isn't down we MUST sync user
+                                       // roles here in case we have this user here!
+                                       syncUserRoles(sessionFactory, userId, appId, userAppRolesActive, extRequestValue, null);
+                               } catch (Exception e) {
+                                       // TODO: we may need to check if user exists, maybe remote
+                                       // app is down.
+                                       String message = String.format(
+                                                       "getAppRolesForUser: user %s does not exist in remote application %s", userId,
+                                                       Long.toString(appId));
+                                       logger.error(EELFLoggerDelegate.errorLogger, message, e);
+                                       userAppRoles = new EcompRole[0];
+                               }
+                               rolesInAppForUser = constructRolesInAppForUserGet(appRoles, userAppRoles);
+                       }
+               } catch (Exception e) {
+                       String message = String.format("getAppRolesForUser: failed for User %s, AppId %s", userId,
+                                       Long.toString(appId));
+                       logger.error(EELFLoggerDelegate.errorLogger, message, e);
+               }
+               return rolesInAppForUser;
+
+       }
+       
+       private boolean postUserRolesToMylogins(AppWithRolesForUser userAppRolesData,
+                       ApplicationsRestClientService applicationsRestClientService, Long appId, Long userId)
+                       throws JsonProcessingException, HTTPException {
+               boolean result = false;
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+               String userRolesAsString = mapper.writeValueAsString(userAppRolesData);
+               logger.error(EELFLoggerDelegate.errorLogger,"Should not be reached here, as the endpoint is not defined yet from the Mylogins");
+               applicationsRestClientService.post(AppWithRolesForUser.class, appId, userRolesAsString, String.format("/user/%s/myLoginroles", userId));
+               return result;
+       }
+
+       public FieldsValidator putUserAppRolesRequest(AppWithRolesForUser userAppRolesData, EPUser user) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               final Map<String, Long> params = new HashMap<>();
+               EpUserAppRoles  appRole= new EpUserAppRoles();
+               try {
+                       logger.error(EELFLoggerDelegate.errorLogger,"Should not be reached here, still the endpoint is yet to be defined");
+                       boolean result = postUserRolesToMylogins(userAppRolesData, applicationsRestClientService, userAppRolesData.appId, user.getId());
+                       
+                       params.put("appId", userAppRolesData.appId);
+                       EPUserAppRolesRequest epAppRolesRequestData = new EPUserAppRolesRequest();
+                       epAppRolesRequestData.setCreatedDate(new Date());
+                       epAppRolesRequestData.setUpdatedDate(new Date());
+                       epAppRolesRequestData.setUserId(user.getId());
+                       epAppRolesRequestData.setAppId(userAppRolesData.appId);
+                       epAppRolesRequestData.setRequestStatus("P");
+                       List<RoleInAppForUser> appRoleIdList = userAppRolesData.appRoles;
+                       Set<EPUserAppRolesRequestDetail> appRoleDetails = new LinkedHashSet<EPUserAppRolesRequestDetail>();
+                       dataAccessService.saveDomainObject(epAppRolesRequestData, null);
+                       for (RoleInAppForUser userAppRoles : appRoleIdList) {
+                               Boolean isAppliedVal = userAppRoles.isApplied;
+                               params.put("appRoleId", userAppRoles.roleId);                           
+                               if (isAppliedVal) {
+                                       appRole = (EpUserAppRoles) dataAccessService.executeNamedQuery("appRoles", params, null).get(0);
+                                       EPUserAppRolesRequestDetail epAppRoleDetail = new EPUserAppRolesRequestDetail();
+                                       epAppRoleDetail.setReqRoleId(appRole.getRoleId());
+                                       epAppRoleDetail.setReqType("P");
+                                       epAppRoleDetail.setEpRequestIdData(epAppRolesRequestData);
+                                       dataAccessService.saveDomainObject(epAppRoleDetail, null);
+                                       }                       
+                       }
+                       epAppRolesRequestData.setEpRequestIdDetail(appRoleDetails);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_OK);
+
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "putUserAppRolesRequest failed", e);
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+               return fieldsValidator;
+       }
+
+       public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(EPUser userid, String appName) {      
+               Map<String, String> params = new HashMap<>();
+               params.put("userid", userid.getId().toString());
+               //params.put("appid", appid);
+               params.put("appName", appName);
+                       
+               @SuppressWarnings("unchecked")
+               List<EPUserAppCatalogRoles> userAppRoles = (List<EPUserAppCatalogRoles>) dataAccessService
+                               .executeNamedQuery("userAppCatalogRoles", params, null);
+               return userAppRoles;    
+       }
+       
+       public String updateRemoteUserProfile(String orgUserId, Long appId) {
+               ObjectMapper mapper = new ObjectMapper();
+               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+               EPUser client = searchService.searchUserByUserId(orgUserId);
+               EPUser newUser = new EPUser();
+               newUser.setActive(client.getActive());
+               newUser.setFirstName(client.getFirstName());
+               newUser.setLastName(client.getLastName());
+               newUser.setLoginId(client.getLoginId());
+               newUser.setLoginPwd(client.getLoginPwd());
+               newUser.setMiddleInitial(client.getMiddleInitial());
+               newUser.setEmail(client.getEmail());
+               newUser.setOrgUserId(client.getLoginId());
+               try {
+                       String userAsString = mapper.writeValueAsString(newUser);
+                       List<EPApp> appList = appsService.getUserRemoteApps(client.getId().toString());
+                       // applicationsRestClientService.post(EPUser.class, appId,
+                       // userAsString, String.format("/user", orgUserId));
+                       for (EPApp eachApp : appList) {
+                               try {
+                                       applicationsRestClientService.post(EPUser.class, eachApp.getId(), userAsString,
+                                                       String.format("/user/%s", orgUserId));
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger, "Failed to update user: " + client.getOrgUserId()
+                                                       + " in remote app. appId = " + eachApp.getId());
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "updateRemoteUserProfile failed", e);
+                       return "failure";
+               }
+
+               return "success";
+       }
+
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.openecomp.portalapp.portal.service.UserRolesService#
+        * getCachedAppRolesForUser(java.lang.Long, java.lang.Long)
+        */
+       public List<EPUserApp> getCachedAppRolesForUser(Long appId, Long userId) {
+               // Find the records for this user-app combo, if any
+               String filter = " where user_id = " + Long.toString(userId) + " and app_id = " + Long.toString(appId);
+               @SuppressWarnings("unchecked")
+               List<EPUserApp> roleList = dataAccessService.getList(EPUserApp.class, filter, null, null);
+               logger.debug(EELFLoggerDelegate.debugLogger, "getCachedAppRolesForUser: list size is {}", roleList.size());
+               return roleList;
+       }
+
+}
index 1b9dfd0..eebf3bf 100644 (file)
@@ -1,67 +1,91 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.apache.cxf.transport.http.HTTPException;\r
-import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserApp;\r
-import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;\r
-import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;\r
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;\r
-import org.openecomp.portalapp.portal.transport.UserApplicationRoles;\r
-\r
-public interface UserRolesService {\r
-\r
-       public List<RoleInAppForUser> getAppRolesForUser(Long appId, String userId);\r
-\r
-       public boolean setAppWithUserRoleStateForUser(EPUser user, AppWithRolesForUser newAppRolesForUser);\r
-\r
-       public List<UserApplicationRoles> getUsersFromAppEndpoint(Long appId) throws HTTPException;\r
-\r
-       public List<EPRole> importRolesFromRemoteApplication(Long appId) throws HTTPException;\r
-       \r
-       /**\r
-        * Gets entries from the local fn_user_role table for the specified user and\r
-        * app.\r
-        * \r
-        * @param appId\r
-        *            ID of row in fn_app\r
-        * @param userid\r
-        *            ID of row in fn_user\r
-        * @return List of EPRole; empty if none found.\r
-        */\r
-       public List<EPUserApp> getCachedAppRolesForUser(Long appId, Long userId);\r
-       \r
-       public FieldsValidator putUserAppRolesRequest(AppWithRolesForUser userAppRolesData, EPUser user);\r
-\r
-       String setAppWithUserRoleStateForUser(ExternalSystemUser newAppRolesForUser);\r
-\r
-       public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(EPUser user, String appName);\r
-       \r
-       public String updateRemoteUserProfile(String orgUserId, Long appId);\r
-       \r
-       public ExternalSystemAccess getExternalRequestAccess();\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.apache.cxf.transport.http.HTTPException;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;
+import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
+
+public interface UserRolesService {
+
+       /**
+        * Returns list of app roles of a single app
+        * 
+        * @param appId
+        *            ID of row in fn_app
+        * @param userId
+        *            ID of row in fn_user
+        * @param extRequestValue
+        *            set to false if request is from users page otherwise true
+        * @return List<RoleInAppForUser>
+        */
+       public List<RoleInAppForUser> getAppRolesForUser(Long appId, String userId, Boolean extRequestValue);
+
+       public boolean setAppWithUserRoleStateForUser(EPUser user, AppWithRolesForUser newAppRolesForUser);
+
+       public List<UserApplicationRoles> getUsersFromAppEndpoint(Long appId) throws HTTPException;
+
+       public List<EPRole> importRolesFromRemoteApplication(Long appId) throws HTTPException;
+
+       /**
+        * Gets entries from the local fn_user_role table for the specified user and
+        * app.
+        * 
+        * @param appId
+        *            ID of row in fn_app
+        * @param userId
+        *            ID of row in fn_user
+        * @return List of EPRole; empty if none found.
+        */
+       public List<EPUserApp> getCachedAppRolesForUser(Long appId, Long userId);
+
+       public FieldsValidator putUserAppRolesRequest(AppWithRolesForUser userAppRolesData, EPUser user);
+
+       /**
+        * Save user app roles in the database from the external request
+        * 
+        * @param newAppRolesForUser
+        * 
+        *            contains login id, app name, request id, and list of role
+        *            names
+        * @param reqType
+        * @return if any exceptions, returns detail message and true or false
+        */
+       ExternalRequestFieldsValidator setExternalRequestUserAppRole(ExternalSystemUser newAppRolesForUser, String reqType);
+
+       public List<EPUserAppCatalogRoles> getUserAppCatalogRoles(EPUser user, String appName);
+
+       public String updateRemoteUserProfile(String orgUserId, Long appId);
+
+       public ExternalSystemAccess getExternalRequestAccess();
+
+}
index 2d8e911..b08f9e8 100644 (file)
@@ -24,11 +24,13 @@ import java.util.List;
 import org.openecomp.portalapp.portal.domain.EPUser;
 
 public interface UserService {
-       
+
        List<EPUser> getUserByUserId(String orgUserId);
-       
+
        List<EPUser> getUserByFirstLastName(String firstName, String lastName);
-       
+
        public String saveNewUser(EPUser newUser, String checkDuplicate) throws Exception;
-       
+
+       public void saveUser(EPUser user) throws Exception;
+
 }
index 4de2c49..88c482b 100644 (file)
@@ -113,7 +113,7 @@ public class UserServiceImpl implements UserService {
                                        in.close();
                                        con.disconnect();
                                } catch (IOException e) {
-                                       logger.error(EELFLoggerDelegate.errorLogger,"getUserByUserId failed to close", e);
+                                       logger.error(EELFLoggerDelegate.errorLogger, "getUserByUserId failed to close", e);
                                }
                        }
 
@@ -257,4 +257,9 @@ public class UserServiceImpl implements UserService {
                return "success";
        };
 
+       @Override
+       public void saveUser(EPUser user) throws Exception {
+               getDataAccessService().saveDomainObject(user, null);
+       }
+
 }
index df01fb9..d3c3259 100644 (file)
@@ -1,64 +1,64 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;\r
-\r
-public interface WidgetParameterService {\r
-       \r
-       /**\r
-        * Saves the specified user-defined widget parameters to the table ep_widget_parameters\r
-        * \r
-        * @param newParameter\r
-        */\r
-       void saveUserParameter(WidgetCatalogParameter newParameter);\r
-       \r
-       /**\r
-        * Gets the specified user-defined widget parameter where paramId is used from all users \r
-        * \r
-        * @param paramId\r
-        * @return\r
-        * List of widget parameters\r
-        */\r
-       List<WidgetCatalogParameter> getUserParameterById(Long paramId);\r
-       \r
-       \r
-       /**\r
-        * Deletes the specified user-defined widget parameters from ep_widget_parameters table \r
-        * where paramId is used\r
-        * \r
-        * @param paramId\r
-        */\r
-       void deleteUserParameterById(Long paramId);\r
-\r
-       \r
-       /**\r
-        * Gets the specified user-defined widget parameter where paramId is used from the specified\r
-        * user with userId \r
-        * @param widgetId\r
-        * @param userId\r
-        * @param paramId\r
-        * @return\r
-        */\r
-       WidgetCatalogParameter getUserParamById(Long widgetId, Long userId, Long paramId);\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+
+public interface WidgetParameterService {
+       
+       /**
+        * Saves the specified user-defined widget parameters to the table ep_widget_parameters
+        * 
+        * @param newParameter
+        */
+       void saveUserParameter(WidgetCatalogParameter newParameter);
+       
+       /**
+        * Gets the specified user-defined widget parameter where paramId is used from all users 
+        * 
+        * @param paramId
+        * @return
+        * List of widget parameters
+        */
+       List<WidgetCatalogParameter> getUserParameterById(Long paramId);
+       
+       
+       /**
+        * Deletes the specified user-defined widget parameters from ep_widget_parameters table 
+        * where paramId is used
+        * 
+        * @param paramId
+        */
+       void deleteUserParameterById(Long paramId);
+
+       
+       /**
+        * Gets the specified user-defined widget parameter where paramId is used from the specified
+        * user with userId 
+        * @param widgetId
+        * @param userId
+        * @param paramId
+        * @return WidgetCatalogParameter
+        */
+       WidgetCatalogParameter getUserParamById(Long widgetId, Long userId, Long paramId);
+       
+}
index a3e9c61..d768562 100644 (file)
@@ -1,92 +1,91 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-import java.util.Map;\r
-\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.criterion.Criterion;\r
-import org.hibernate.criterion.Restrictions;\r
-import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-\r
-@Service("widgetParameterService")\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class WidgetParameterServiceImpl implements WidgetParameterService{\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetParameterServiceImpl.class);\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public WidgetCatalogParameter getUserParamById(Long widgetId, Long userId, Long paramId) {\r
-               List<Criterion> restrictionsList = new ArrayList<Criterion>();\r
-               Criterion widgetIdCrit = Restrictions.eq("widgetId", widgetId);\r
-               restrictionsList.add(widgetIdCrit);\r
-               Criterion attIdCrit = Restrictions.eq("userId", userId);\r
-               restrictionsList.add(attIdCrit);\r
-               Criterion paramIdCrit = Restrictions.eq("paramId", paramId);\r
-               restrictionsList.add(paramIdCrit);\r
-               \r
-               \r
-               WidgetCatalogParameter widgetParam = null;\r
-               List<WidgetCatalogParameter> list = (List<WidgetCatalogParameter>) dataAccessService\r
-                               .getList(WidgetCatalogParameter.class, null, restrictionsList, null);\r
-               if(list.size() != 0)\r
-                       widgetParam = list.get(0);\r
-               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                               "getUserParamById: widget parameters: " + widgetParam);\r
-               return widgetParam;\r
-       }\r
-\r
-       @Override\r
-       public void saveUserParameter(WidgetCatalogParameter newParameter) {\r
-               dataAccessService.saveDomainObject(newParameter, null);\r
-       }\r
-       \r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<WidgetCatalogParameter> getUserParameterById(Long paramId) {\r
-               List<Criterion> restrictionsList = new ArrayList<Criterion>();\r
-               Criterion paramIdCrit = Restrictions.eq("paramId", paramId);\r
-               restrictionsList.add(paramIdCrit);\r
-               List<WidgetCatalogParameter> list = (List<WidgetCatalogParameter>) dataAccessService\r
-                               .getList(WidgetCatalogParameter.class, null, restrictionsList, null);\r
-               return list;\r
-       }\r
-\r
-       @Override\r
-       public void deleteUserParameterById(Long paramId) {\r
-               Map<String, String> params = new HashMap<String, String>();\r
-               params.put("paramId", Long.toString(paramId));\r
-               dataAccessService.executeNamedQuery("deleteWidgetCatalogParameter", params, null);\r
-               dataAccessService.executeNamedQuery("deleteMicroserviceParameterById", params, null);\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.Restrictions;
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("widgetParameterService")
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class WidgetParameterServiceImpl implements WidgetParameterService{
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetParameterServiceImpl.class);
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public WidgetCatalogParameter getUserParamById(Long widgetId, Long userId, Long paramId) {
+               List<Criterion> restrictionsList = new ArrayList<Criterion>();
+               Criterion widgetIdCrit = Restrictions.eq("widgetId", widgetId);
+               restrictionsList.add(widgetIdCrit);
+               Criterion attIdCrit = Restrictions.eq("userId", userId);
+               restrictionsList.add(attIdCrit);
+               Criterion paramIdCrit = Restrictions.eq("paramId", paramId);
+               restrictionsList.add(paramIdCrit);
+               
+               
+               WidgetCatalogParameter widgetParam = null;
+               List<WidgetCatalogParameter> list = (List<WidgetCatalogParameter>) dataAccessService
+                               .getList(WidgetCatalogParameter.class, null, restrictionsList, null);
+               if(list.size() != 0)
+                       widgetParam = list.get(0);
+               logger.debug(EELFLoggerDelegate.debugLogger,
+                               "getUserParamById: widget parameters: " + widgetParam);
+               return widgetParam;
+       }
+
+       @Override
+       public void saveUserParameter(WidgetCatalogParameter newParameter) {
+               dataAccessService.saveDomainObject(newParameter, null);
+       }
+       
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<WidgetCatalogParameter> getUserParameterById(Long paramId) {
+               List<Criterion> restrictionsList = new ArrayList<Criterion>();
+               Criterion paramIdCrit = Restrictions.eq("paramId", paramId);
+               restrictionsList.add(paramIdCrit);
+               List<WidgetCatalogParameter> list = (List<WidgetCatalogParameter>) dataAccessService
+                               .getList(WidgetCatalogParameter.class, null, restrictionsList, null);
+               return list;
+       }
+
+       @Override
+       public void deleteUserParameterById(Long paramId) {
+               Map<String, String> params = new HashMap<String, String>();
+               params.put("paramId", Long.toString(paramId));
+               dataAccessService.executeNamedQuery("deleteWidgetCatalogParameter", params, null);
+               dataAccessService.executeNamedQuery("deleteMicroserviceParameterById", params, null);
+       }
+}
index b44a19f..5c3ea76 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.OnboardingWidget;\r
-\r
-public interface WidgetService {\r
-\r
-       List<OnboardingWidget> getOnboardingWidgets(EPUser user, boolean managed);\r
-\r
-       FieldsValidator setOnboardingWidget(EPUser user, OnboardingWidget onboardingWidget);\r
-\r
-       FieldsValidator deleteOnboardingWidget(EPUser user, Long onboardingWidgetId);\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingWidget;
+
+public interface WidgetService {
+
+       List<OnboardingWidget> getOnboardingWidgets(EPUser user, boolean managed);
+
+       FieldsValidator setOnboardingWidget(EPUser user, OnboardingWidget onboardingWidget);
+
+       FieldsValidator deleteOnboardingWidget(EPUser user, Long onboardingWidgetId);
+
+}
index 484bef4..c19730e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.service;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.annotation.PostConstruct;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.hibernate.Transaction;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserApp;\r
-import org.openecomp.portalapp.portal.domain.Widget;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.transport.FieldsValidator;\r
-import org.openecomp.portalapp.portal.transport.OnboardingWidget;\r
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Service("widgetService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class WidgetServiceImpl implements WidgetService {\r
-\r
-       private static final String baseSqlToken = " widget.WIDGET_ID, widget.WDG_NAME, widget.APP_ID, app.APP_NAME, widget.WDG_WIDTH, widget.WDG_HEIGHT, widget.WDG_URL"\r
-                       + " from FN_WIDGET widget join FN_APP app ON widget.APP_ID = app.APP_ID";\r
-\r
-       private String validAppsFilter = "";\r
-\r
-       private Long LONG_ECOMP_APP_ID = 1L;\r
-       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;\r
-       private static final Long DUBLICATED_FIELD_VALUE_ECOMP_ERROR = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);\r
-\r
-       private static final String urlField = "url";\r
-\r
-       private static final String nameField = "name";\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetServiceImpl.class);\r
-\r
-       @Autowired\r
-       AdminRolesService adminRolesService;\r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       @PostConstruct\r
-       private void init() {\r
-               try {\r
-                       validAppsFilter = " AND app.ENABLED = 'Y' AND app.APP_ID != " + SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);\r
-                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));\r
-                       LONG_ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID));\r
-               } catch(Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               }\r
-       }\r
-       \r
-       private String sqlWidgetsForAllApps() {\r
-               return "SELECT" + baseSqlToken + validAppsFilter;\r
-       }\r
-\r
-       private String sqlWidgetsForAllAppsWhereUserIsAdmin(Long userId) {\r
-               return "SELECT" + baseSqlToken + " join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = app.APP_ID where FN_USER_ROLE.USER_ID = " + userId\r
-                               + " AND FN_USER_ROLE.ROLE_ID = " + ACCOUNT_ADMIN_ROLE_ID + validAppsFilter;\r
-       }\r
-\r
-       private String sqlWidgetsForAllAppsWhereUserHasAnyRole(Long userId) {\r
-               return "SELECT DISTINCT" + baseSqlToken + " join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = app.APP_ID where FN_USER_ROLE.USER_ID = "\r
-                               + userId + validAppsFilter;\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       @Override\r
-       public List<OnboardingWidget> getOnboardingWidgets(EPUser user, boolean managed) {\r
-               List<OnboardingWidget> onboardingWidgets = new ArrayList<OnboardingWidget>();\r
-               String sql = null;\r
-               if (adminRolesService.isSuperAdmin(user)) {\r
-                       sql = this.sqlWidgetsForAllApps();\r
-               } else if (managed) {\r
-                       if (adminRolesService.isAccountAdmin(user)) {\r
-                               sql = this.sqlWidgetsForAllAppsWhereUserIsAdmin(user.getId());\r
-                       }\r
-               } else if (adminRolesService.isAccountAdmin(user) || adminRolesService.isUser(user)) {\r
-                       sql = this.sqlWidgetsForAllAppsWhereUserHasAnyRole(user.getId());\r
-               }\r
-               if (sql != null) {\r
-                       onboardingWidgets = dataAccessService.executeSQLQuery(sql, OnboardingWidget.class, null);\r
-               }\r
-               return onboardingWidgets;\r
-       }\r
-\r
-       private static final Object syncRests = new Object();\r
-\r
-       private boolean isUserAdminOfAppForWidget(boolean superAdmin, Long userId, Long appId) {\r
-               if (!superAdmin) {\r
-                       @SuppressWarnings("unchecked")\r
-                       List<EPUserApp> userRoles = dataAccessService.getList(EPUserApp.class,\r
-                                       " where userId = " + userId + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID + " and app.id = " + appId, null, null);\r
-                       return (userRoles.size() > 0);\r
-               }\r
-               return true;\r
-       }\r
-\r
-       private void validateOnboardingWidget(OnboardingWidget onboardingWidget, FieldsValidator fieldsValidator) {\r
-               @SuppressWarnings("unchecked")\r
-               List<Widget> widgets = dataAccessService.getList(Widget.class,\r
-                               " where url = '" + onboardingWidget.url + "'" + " or name = '" + onboardingWidget.name + "'", null, null);\r
-               boolean dublicatedUrl = false;\r
-               boolean dublicatedName = false;\r
-               for (Widget widget : widgets) {\r
-                       if (onboardingWidget.id != null && onboardingWidget.id.equals(widget.getId())) {\r
-                               // widget should not be compared with itself\r
-                               continue;\r
-                       }\r
-                       if (!dublicatedUrl && widget.getUrl().equals(onboardingWidget.url)) {\r
-                               dublicatedUrl = true;\r
-                               if (dublicatedName) {\r
-                                       break;\r
-                               }\r
-                       }\r
-                       if (!dublicatedName && widget.getName().equalsIgnoreCase(onboardingWidget.name) && widget.getAppId().equals(onboardingWidget.appId)) {\r
-                               dublicatedName = true;\r
-                               if (dublicatedUrl) {\r
-                                       break;\r
-                               }\r
-                       }\r
-               }\r
-               if (dublicatedUrl || dublicatedName) {\r
-                       if (dublicatedUrl) {\r
-                               fieldsValidator.addProblematicFieldName(urlField);\r
-                       }\r
-                       if (dublicatedName) {\r
-                               fieldsValidator.addProblematicFieldName(nameField);\r
-                       }\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);\r
-                       fieldsValidator.errorCode = DUBLICATED_FIELD_VALUE_ECOMP_ERROR;\r
-               }\r
-       }\r
-\r
-       private void applyOnboardingWidget(OnboardingWidget onboardingWidget, FieldsValidator fieldsValidator) {\r
-               boolean result = false;\r
-               Session localSession = null;\r
-               Transaction transaction = null;\r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-                       transaction = localSession.beginTransaction();\r
-                       Widget widget;\r
-                       if (onboardingWidget.id == null) {\r
-                               widget = new Widget();\r
-                       } else {\r
-                               widget = (Widget) localSession.get(Widget.class, onboardingWidget.id);\r
-                       }\r
-                       widget.setAppId(onboardingWidget.appId);\r
-                       widget.setName(onboardingWidget.name);\r
-                       widget.setWidth(onboardingWidget.width);\r
-                       widget.setHeight(onboardingWidget.height);\r
-                       widget.setUrl(onboardingWidget.url);\r
-                       localSession.saveOrUpdate(widget);\r
-                       transaction.commit();\r
-                       result = true;\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                       EcompPortalUtils.rollbackTransaction(transaction, "applyOnboardingWidget rollback, exception = " + e);\r
-               } finally {\r
-                       EcompPortalUtils.closeLocalSession(localSession, "applyOnboardingWidget");\r
-               }\r
-               if (!result) {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-               }\r
-       }\r
-\r
-       private FieldsValidator updateOrSaveWidget(boolean superAdmin, Long userId, OnboardingWidget onboardingWidget) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               if (!this.isUserAdminOfAppForWidget(superAdmin, userId, onboardingWidget.appId)) {\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);\r
-                       return fieldsValidator;\r
-               }\r
-               synchronized (syncRests) {\r
-                       // onboardingWidget.id is null for POST and not null for PUT\r
-                       if (onboardingWidget.id == null) {\r
-                               this.validateOnboardingWidget(onboardingWidget, fieldsValidator);\r
-                       } else {\r
-                               Widget widget = (Widget) dataAccessService.getDomainObject(Widget.class, onboardingWidget.id, null);\r
-                               if (widget == null || widget.getId() == null) {\r
-                                       // Widget not found\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);\r
-                                       return fieldsValidator;\r
-                               }\r
-                               this.validateOnboardingWidget(onboardingWidget, fieldsValidator);\r
-                       }\r
-                       if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {\r
-                               this.applyOnboardingWidget(onboardingWidget, fieldsValidator);\r
-                       }\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-       @Override\r
-       public FieldsValidator setOnboardingWidget(EPUser user, OnboardingWidget onboardingWidget) {\r
-               if (onboardingWidget.name.length() == 0 || onboardingWidget.url.length() == 0 || onboardingWidget.appId == null\r
-                               || onboardingWidget.appId.equals(LONG_ECOMP_APP_ID) || onboardingWidget.width.intValue() <= 0 || onboardingWidget.height.intValue() <= 0) {\r
-                       if (onboardingWidget.appId.equals(LONG_ECOMP_APP_ID)) {\r
-                               // logger.error("Alarm!!! Security breach attempt on user " + user.getFullName() + ", userId = " + user.getUserId());\r
-                       }\r
-                       FieldsValidator fieldsValidator = new FieldsValidator();\r
-                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);\r
-                       return fieldsValidator;\r
-               }\r
-               return this.updateOrSaveWidget(adminRolesService.isSuperAdmin(user), user.getId(), onboardingWidget);\r
-       }\r
-\r
-       @Override\r
-       public FieldsValidator deleteOnboardingWidget(EPUser user, Long onboardingWidgetId) {\r
-               FieldsValidator fieldsValidator = new FieldsValidator();\r
-               synchronized (syncRests) {\r
-                       Widget widget = (Widget) dataAccessService.getDomainObject(Widget.class, onboardingWidgetId, null);\r
-                       if (widget != null && widget.getId() != null) { // widget exists\r
-                               if (!this.isUserAdminOfAppForWidget(adminRolesService.isSuperAdmin(user), user.getId(), widget.getAppId())) {\r
-                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);\r
-                               } else {\r
-                                       boolean result = false;\r
-                                       Session localSession = null;\r
-                                       Transaction transaction = null;\r
-                                       try {\r
-                                               localSession = sessionFactory.openSession();\r
-                                               transaction = localSession.beginTransaction();\r
-                                               localSession.delete(localSession.get(Widget.class, onboardingWidgetId));\r
-                                               transaction.commit();\r
-                                               result = true;\r
-                                       } catch (Exception e) {\r
-                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);\r
-                                               EcompPortalUtils.rollbackTransaction(transaction, "deleteOnboardingWidget rollback, exception = " + e);\r
-                                       } finally {\r
-                                               EcompPortalUtils.closeLocalSession(localSession, "deleteOnboardingWidget");\r
-                                       }\r
-                                       if (!result) {\r
-                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               return fieldsValidator;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+import javax.servlet.http.HttpServletResponse;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.Widget;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingWidget;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+@Service("widgetService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class WidgetServiceImpl implements WidgetService {
+
+       private static final String baseSqlToken = " widget.WIDGET_ID, widget.WDG_NAME, widget.APP_ID, app.APP_NAME, widget.WDG_WIDTH, widget.WDG_HEIGHT, widget.WDG_URL"
+                       + " from FN_WIDGET widget join FN_APP app ON widget.APP_ID = app.APP_ID";
+
+       private String validAppsFilter = "";
+
+       private Long LONG_ECOMP_APP_ID = 1L;
+       private Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+       private static final Long DUBLICATED_FIELD_VALUE_ECOMP_ERROR = new Long(EPCommonSystemProperties.DUBLICATED_FIELD_VALUE_ECOMP_ERROR);
+
+       private static final String urlField = "url";
+
+       private static final String nameField = "name";
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(WidgetServiceImpl.class);
+
+       @Autowired
+       AdminRolesService adminRolesService;
+       @Autowired
+       private SessionFactory sessionFactory;
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @PostConstruct
+       private void init() {
+               try {
+                       validAppsFilter = " AND app.ENABLED = 'Y' AND app.APP_ID != " + SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID);
+                       ACCOUNT_ADMIN_ROLE_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
+                       LONG_ECOMP_APP_ID = Long.valueOf(SystemProperties.getProperty(EPCommonSystemProperties.ECOMP_APP_ID));
+               } catch(Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               }
+       }
+       
+       private String sqlWidgetsForAllApps() {
+               return "SELECT" + baseSqlToken + validAppsFilter;
+       }
+
+       private String sqlWidgetsForAllAppsWhereUserIsAdmin(Long userId) {
+               return "SELECT" + baseSqlToken + " join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = app.APP_ID where FN_USER_ROLE.USER_ID = " + userId
+                               + " AND FN_USER_ROLE.ROLE_ID = " + ACCOUNT_ADMIN_ROLE_ID + validAppsFilter;
+       }
+
+       private String sqlWidgetsForAllAppsWhereUserHasAnyRole(Long userId) {
+               return "SELECT DISTINCT" + baseSqlToken + " join FN_USER_ROLE ON FN_USER_ROLE.APP_ID = app.APP_ID where FN_USER_ROLE.USER_ID = "
+                               + userId + validAppsFilter;
+       }
+
+       @SuppressWarnings("unchecked")
+       @Override
+       public List<OnboardingWidget> getOnboardingWidgets(EPUser user, boolean managed) {
+               List<OnboardingWidget> onboardingWidgets = new ArrayList<OnboardingWidget>();
+               String sql = null;
+               if (adminRolesService.isSuperAdmin(user)) {
+                       sql = this.sqlWidgetsForAllApps();
+               } else if (managed) {
+                       if (adminRolesService.isAccountAdmin(user)) {
+                               sql = this.sqlWidgetsForAllAppsWhereUserIsAdmin(user.getId());
+                       }
+               } else if (adminRolesService.isAccountAdmin(user) || adminRolesService.isUser(user)) {
+                       sql = this.sqlWidgetsForAllAppsWhereUserHasAnyRole(user.getId());
+               }
+               if (sql != null) {
+                       onboardingWidgets = dataAccessService.executeSQLQuery(sql, OnboardingWidget.class, null);
+               }
+               return onboardingWidgets;
+       }
+
+       private static final Object syncRests = new Object();
+
+       private boolean isUserAdminOfAppForWidget(boolean superAdmin, Long userId, Long appId) {
+               if (!superAdmin) {
+                       @SuppressWarnings("unchecked")
+                       List<EPUserApp> userRoles = dataAccessService.getList(EPUserApp.class,
+                                       " where userId = " + userId + " and role.id = " + ACCOUNT_ADMIN_ROLE_ID + " and app.id = " + appId, null, null);
+                       return (userRoles.size() > 0);
+               }
+               return true;
+       }
+
+       private void validateOnboardingWidget(OnboardingWidget onboardingWidget, FieldsValidator fieldsValidator) {
+               @SuppressWarnings("unchecked")
+               List<Widget> widgets = dataAccessService.getList(Widget.class,
+                               " where url = '" + onboardingWidget.url + "'" + " or name = '" + onboardingWidget.name + "'", null, null);
+               boolean dublicatedUrl = false;
+               boolean dublicatedName = false;
+               for (Widget widget : widgets) {
+                       if (onboardingWidget.id != null && onboardingWidget.id.equals(widget.getId())) {
+                               // widget should not be compared with itself
+                               continue;
+                       }
+                       if (!dublicatedUrl && widget.getUrl().equals(onboardingWidget.url)) {
+                               dublicatedUrl = true;
+                               if (dublicatedName) {
+                                       break;
+                               }
+                       }
+                       if (!dublicatedName && widget.getName().equalsIgnoreCase(onboardingWidget.name) && widget.getAppId().equals(onboardingWidget.appId)) {
+                               dublicatedName = true;
+                               if (dublicatedUrl) {
+                                       break;
+                               }
+                       }
+               }
+               if (dublicatedUrl || dublicatedName) {
+                       if (dublicatedUrl) {
+                               fieldsValidator.addProblematicFieldName(urlField);
+                       }
+                       if (dublicatedName) {
+                               fieldsValidator.addProblematicFieldName(nameField);
+                       }
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_CONFLICT);
+                       fieldsValidator.errorCode = DUBLICATED_FIELD_VALUE_ECOMP_ERROR;
+               }
+       }
+
+       private void applyOnboardingWidget(OnboardingWidget onboardingWidget, FieldsValidator fieldsValidator) {
+               boolean result = false;
+               Session localSession = null;
+               Transaction transaction = null;
+               try {
+                       localSession = sessionFactory.openSession();
+                       transaction = localSession.beginTransaction();
+                       Widget widget;
+                       if (onboardingWidget.id == null) {
+                               widget = new Widget();
+                       } else {
+                               widget = (Widget) localSession.get(Widget.class, onboardingWidget.id);
+                       }
+                       widget.setAppId(onboardingWidget.appId);
+                       widget.setName(onboardingWidget.name);
+                       widget.setWidth(onboardingWidget.width);
+                       widget.setHeight(onboardingWidget.height);
+                       widget.setUrl(onboardingWidget.url);
+                       localSession.saveOrUpdate(widget);
+                       transaction.commit();
+                       result = true;
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                       EcompPortalUtils.rollbackTransaction(transaction, "applyOnboardingWidget rollback, exception = " + e);
+               } finally {
+                       EcompPortalUtils.closeLocalSession(localSession, "applyOnboardingWidget");
+               }
+               if (!result) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+               }
+       }
+
+       private FieldsValidator updateOrSaveWidget(boolean superAdmin, Long userId, OnboardingWidget onboardingWidget) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               if (!this.isUserAdminOfAppForWidget(superAdmin, userId, onboardingWidget.appId)) {
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);
+                       return fieldsValidator;
+               }
+               synchronized (syncRests) {
+                       // onboardingWidget.id is null for POST and not null for PUT
+                       if (onboardingWidget.id == null) {
+                               this.validateOnboardingWidget(onboardingWidget, fieldsValidator);
+                       } else {
+                               Widget widget = (Widget) dataAccessService.getDomainObject(Widget.class, onboardingWidget.id, null);
+                               if (widget == null || widget.getId() == null) {
+                                       // Widget not found
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_NOT_FOUND);
+                                       return fieldsValidator;
+                               }
+                               this.validateOnboardingWidget(onboardingWidget, fieldsValidator);
+                       }
+                       if (fieldsValidator.httpStatusCode.intValue() == HttpServletResponse.SC_OK) {
+                               this.applyOnboardingWidget(onboardingWidget, fieldsValidator);
+                       }
+               }
+               return fieldsValidator;
+       }
+
+       @Override
+       public FieldsValidator setOnboardingWidget(EPUser user, OnboardingWidget onboardingWidget) {
+               if (onboardingWidget.name.length() == 0 || onboardingWidget.url.length() == 0 || onboardingWidget.appId == null
+                               || onboardingWidget.appId.equals(LONG_ECOMP_APP_ID) || onboardingWidget.width.intValue() <= 0 || onboardingWidget.height.intValue() <= 0) {
+                       if (onboardingWidget.appId.equals(LONG_ECOMP_APP_ID)) {
+                               // logger.error("Alarm!!! Security breach attempt on user " + user.getFullName() + ", userId = " + user.getUserId());
+                       }
+                       FieldsValidator fieldsValidator = new FieldsValidator();
+                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_BAD_REQUEST);
+                       return fieldsValidator;
+               }
+               return this.updateOrSaveWidget(adminRolesService.isSuperAdmin(user), user.getId(), onboardingWidget);
+       }
+
+       @Override
+       public FieldsValidator deleteOnboardingWidget(EPUser user, Long onboardingWidgetId) {
+               FieldsValidator fieldsValidator = new FieldsValidator();
+               synchronized (syncRests) {
+                       Widget widget = (Widget) dataAccessService.getDomainObject(Widget.class, onboardingWidgetId, null);
+                       if (widget != null && widget.getId() != null) { // widget exists
+                               if (!this.isUserAdminOfAppForWidget(adminRolesService.isSuperAdmin(user), user.getId(), widget.getAppId())) {
+                                       fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_FORBIDDEN);
+                               } else {
+                                       boolean result = false;
+                                       Session localSession = null;
+                                       Transaction transaction = null;
+                                       try {
+                                               localSession = sessionFactory.openSession();
+                                               transaction = localSession.beginTransaction();
+                                               localSession.delete(localSession.get(Widget.class, onboardingWidgetId));
+                                               transaction.commit();
+                                               result = true;
+                                       } catch (Exception e) {
+                                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
+                                               EcompPortalUtils.rollbackTransaction(transaction, "deleteOnboardingWidget rollback, exception = " + e);
+                                       } finally {
+                                               EcompPortalUtils.closeLocalSession(localSession, "deleteOnboardingWidget");
+                                       }
+                                       if (!result) {
+                                               fieldsValidator.httpStatusCode = new Long(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+                                       }
+                               }
+                       }
+               }
+               return fieldsValidator;
+       }
+
+}
index da776de..f56d611 100644 (file)
@@ -1,40 +1,40 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-public class AllAppsWithRolesForUser {\r
-\r
-       public String orgUserId;\r
-\r
-       public List<AppWithUserRoles> apps;\r
-\r
-       public static class AppWithUserRoles {\r
-\r
-               public Long appId;\r
-\r
-               public String appName;\r
-               \r
-               public List<RoleInAppForUser> appRoles;\r
-\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+public class AllAppsWithRolesForUser {
+
+       public String orgUserId;
+
+       public List<AppWithUserRoles> apps;
+
+       public static class AppWithUserRoles {
+
+               public Long appId;
+
+               public String appName;
+               
+               public List<RoleInAppForUser> appRoles;
+
+       }
+
+}
index adc5ad2..059999a 100644 (file)
@@ -1,66 +1,66 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class Analytics {\r
-       \r
-       private String action;\r
-       private String page;\r
-       private String function;\r
-       private String userId;\r
-       private String type;\r
-       \r
-       public String getType() {\r
-               return type;\r
-       }\r
-       public void setType(String type) {\r
-               this.type = type;\r
-       }\r
-       public String getAction() {\r
-               return action;\r
-       }\r
-       public void setAction(String action) {\r
-               this.action = action;\r
-       }\r
-       public String getPage() {\r
-               return page;\r
-       }\r
-       public void setPage(String page) {\r
-               this.page = page;\r
-       }\r
-       public String getFunction() {\r
-               return function;\r
-       }\r
-       public void setFunction(String function) {\r
-               this.function = function;\r
-       }\r
-       public String getUserId() {\r
-               return userId;\r
-       }\r
-       public void setUserId(String userId) {\r
-               this.userId = userId;\r
-       }\r
-       \r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Analytics {
+       
+       private String action;
+       private String page;
+       private String function;
+       private String userId;
+       private String type;
+       
+       public String getType() {
+               return type;
+       }
+       public void setType(String type) {
+               this.type = type;
+       }
+       public String getAction() {
+               return action;
+       }
+       public void setAction(String action) {
+               this.action = action;
+       }
+       public String getPage() {
+               return page;
+       }
+       public void setPage(String page) {
+               this.page = page;
+       }
+       public String getFunction() {
+               return function;
+       }
+       public void setFunction(String function) {
+               this.function = function;
+       }
+       public String getUserId() {
+               return userId;
+       }
+       public void setUserId(String userId) {
+               this.userId = userId;
+       }
+       
+       
+       
+}
index 7c24917..f07ae6e 100644 (file)
@@ -1,94 +1,94 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-/**\r
- * Model for the object PUT to the controller when the user takes an action on\r
- * an application in the catalog.\r
- */\r
-public class AppCatalogPersonalization {\r
-\r
-       public Long appId;\r
-       public Boolean select;\r
-       public Boolean pending;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public Boolean getSelect() {\r
-               return select;\r
-       }\r
-\r
-       public void setSelect(Boolean select) {\r
-               this.select = select;\r
-       }\r
-\r
-       public Boolean getPending() {\r
-               return pending;\r
-       }\r
-\r
-       public void setPending(Boolean pending) {\r
-               this.pending = pending;\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appId == null) ? 0 : appId.hashCode());\r
-               result = prime * result + ((pending == null) ? 0 : pending.hashCode());\r
-               result = prime * result + ((select == null) ? 0 : select.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppCatalogPersonalization other = (AppCatalogPersonalization) obj;\r
-               if (appId == null) {\r
-                       if (other.appId != null)\r
-                               return false;\r
-               } else if (!appId.equals(other.appId))\r
-                       return false;\r
-               if (pending == null) {\r
-                       if (other.pending != null)\r
-                               return false;\r
-               } else if (!pending.equals(other.pending))\r
-                       return false;\r
-               if (select == null) {\r
-                       if (other.select != null)\r
-                               return false;\r
-               } else if (!select.equals(other.select))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+/**
+ * Model for the object PUT to the controller when the user takes an action on
+ * an application in the catalog.
+ */
+public class AppCatalogPersonalization {
+
+       public Long appId;
+       public Boolean select;
+       public Boolean pending;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public Boolean getSelect() {
+               return select;
+       }
+
+       public void setSelect(Boolean select) {
+               this.select = select;
+       }
+
+       public Boolean getPending() {
+               return pending;
+       }
+
+       public void setPending(Boolean pending) {
+               this.pending = pending;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+               result = prime * result + ((pending == null) ? 0 : pending.hashCode());
+               result = prime * result + ((select == null) ? 0 : select.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppCatalogPersonalization other = (AppCatalogPersonalization) obj;
+               if (appId == null) {
+                       if (other.appId != null)
+                               return false;
+               } else if (!appId.equals(other.appId))
+                       return false;
+               if (pending == null) {
+                       if (other.pending != null)
+                               return false;
+               } else if (!pending.equals(other.pending))
+                       return false;
+               if (select == null) {
+                       if (other.select != null)
+                               return false;
+               } else if (!select.equals(other.select))
+                       return false;
+               return true;
+       }
+
+       
+}
index 484fffa..135b298 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class AppNameIdIsAdmin {\r
-\r
-       public Long id;\r
-\r
-       public String appName;\r
-\r
-       public Boolean isAdmin;\r
-\r
-       public Boolean restrictedApp;\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-       public Boolean getIsAdmin() {\r
-               return isAdmin;\r
-       }\r
-\r
-       public void setIsAdmin(Boolean isAdmin) {\r
-               this.isAdmin = isAdmin;\r
-       }\r
-\r
-       public Boolean getRestrictedApp() {\r
-               return restrictedApp;\r
-       }\r
-\r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
-               result = prime * result + ((id == null) ? 0 : id.hashCode());\r
-               result = prime * result + ((isAdmin == null) ? 0 : isAdmin.hashCode());\r
-               result = prime * result + ((restrictedApp == null) ? 0 : restrictedApp.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppNameIdIsAdmin other = (AppNameIdIsAdmin) obj;\r
-               if (appName == null) {\r
-                       if (other.appName != null)\r
-                               return false;\r
-               } else if (!appName.equals(other.appName))\r
-                       return false;\r
-               if (id == null) {\r
-                       if (other.id != null)\r
-                               return false;\r
-               } else if (!id.equals(other.id))\r
-                       return false;\r
-               if (isAdmin == null) {\r
-                       if (other.isAdmin != null)\r
-                               return false;\r
-               } else if (!isAdmin.equals(other.isAdmin))\r
-                       return false;\r
-               if (restrictedApp == null) {\r
-                       if (other.restrictedApp != null)\r
-                               return false;\r
-               } else if (!restrictedApp.equals(other.restrictedApp))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppNameIdIsAdmin [id=" + id + ", appName=" + appName + ", isAdmin=" + isAdmin + ", restrictedApp="\r
-                               + restrictedApp + "]";\r
-       }\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class AppNameIdIsAdmin {
+
+       public Long id;
+
+       public String appName;
+
+       public Boolean isAdmin;
+
+       public Boolean restrictedApp;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       public Boolean getIsAdmin() {
+               return isAdmin;
+       }
+
+       public void setIsAdmin(Boolean isAdmin) {
+               this.isAdmin = isAdmin;
+       }
+
+       public Boolean getRestrictedApp() {
+               return restrictedApp;
+       }
+
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appName == null) ? 0 : appName.hashCode());
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((isAdmin == null) ? 0 : isAdmin.hashCode());
+               result = prime * result + ((restrictedApp == null) ? 0 : restrictedApp.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppNameIdIsAdmin other = (AppNameIdIsAdmin) obj;
+               if (appName == null) {
+                       if (other.appName != null)
+                               return false;
+               } else if (!appName.equals(other.appName))
+                       return false;
+               if (id == null) {
+                       if (other.id != null)
+                               return false;
+               } else if (!id.equals(other.id))
+                       return false;
+               if (isAdmin == null) {
+                       if (other.isAdmin != null)
+                               return false;
+               } else if (!isAdmin.equals(other.isAdmin))
+                       return false;
+               if (restrictedApp == null) {
+                       if (other.restrictedApp != null)
+                               return false;
+               } else if (!restrictedApp.equals(other.restrictedApp))
+                       return false;
+               return true;
+       }
+
+       @Override
+       public String toString() {
+               return "AppNameIdIsAdmin [id=" + id + ", appName=" + appName + ", isAdmin=" + isAdmin + ", restrictedApp="
+                               + restrictedApp + "]";
+       }
+       
+       
+}
index 4e37ee0..16ba67b 100644 (file)
@@ -1,73 +1,72 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-public class AppWithRolesForUser {\r
-\r
-       public String orgUserId;\r
-\r
-       public Long appId;\r
-\r
-       public String appName;\r
-               \r
-       public List<RoleInAppForUser> appRoles;\r
-\r
-       public String getOrgUserId() {\r
-               return orgUserId;\r
-       }\r
-\r
-       public void setOrgUserId(String orgUserId) {\r
-               this.orgUserId = orgUserId;\r
-       }\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-       public List<RoleInAppForUser> getAppRoles() {\r
-               return appRoles;\r
-       }\r
-\r
-       public void setAppRoles(List<RoleInAppForUser> appRoles) {\r
-               this.appRoles = appRoles;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppWithRolesForUser [orgUserId=" + orgUserId + ", appId=" + appId + ", appName=" + appName\r
-                               + ", appRoles=" + appRoles + "]";\r
-       }\r
-\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+public class AppWithRolesForUser {
+
+       public String orgUserId;
+
+       public Long appId;
+
+       public String appName;
+
+       public List<RoleInAppForUser> appRoles;
+
+       public String getOrgUserId() {
+               return orgUserId;
+       }
+
+       public void setOrgUserId(String orgUserId) {
+               this.orgUserId = orgUserId;
+       }
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       public List<RoleInAppForUser> getAppRoles() {
+               return appRoles;
+       }
+
+       public void setAppRoles(List<RoleInAppForUser> appRoles) {
+               this.appRoles = appRoles;
+       }
+
+       @Override
+       public String toString() {
+               return "AppWithRolesForUser [orgUserId=" + orgUserId + ", appId=" + appId + ", appName=" + appName
+                               + ", appRoles=" + appRoles + "]";
+       }
+
+}
index 0000e2a..fc9bc88 100644 (file)
@@ -1,86 +1,86 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.ArrayList;\r
-\r
-public class AppsListWithAdminRole {\r
-\r
-       public String orgUserId;\r
-\r
-       public ArrayList<AppNameIdIsAdmin> appsRoles;\r
-\r
-       public AppsListWithAdminRole() {\r
-               appsRoles = new ArrayList<AppNameIdIsAdmin>();\r
-       }\r
-\r
-       public String getOrgUserId() {\r
-               return orgUserId;\r
-       }\r
-\r
-       public void setOrgUserId(String orgUserId) {\r
-               this.orgUserId = orgUserId;\r
-       }\r
-\r
-       public ArrayList<AppNameIdIsAdmin> getAppsRoles() {\r
-               return appsRoles;\r
-       }\r
-\r
-       public void setAppsRoles(ArrayList<AppNameIdIsAdmin> appsRoles) {\r
-               this.appsRoles = appsRoles;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "AppsListWithAdminRole [orgUserId=" + orgUserId + ", appsRoles=" + appsRoles + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appsRoles == null) ? 0 : appsRoles.hashCode());\r
-               result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               AppsListWithAdminRole other = (AppsListWithAdminRole) obj;\r
-               if (appsRoles == null) {\r
-                       if (other.appsRoles != null)\r
-                               return false;\r
-               } else if (!appsRoles.equals(other.appsRoles))\r
-                       return false;\r
-               if (orgUserId == null) {\r
-                       if (other.orgUserId != null)\r
-                               return false;\r
-               } else if (!orgUserId.equals(other.orgUserId))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.ArrayList;
+
+public class AppsListWithAdminRole {
+
+       public String orgUserId;
+
+       public ArrayList<AppNameIdIsAdmin> appsRoles;
+
+       public AppsListWithAdminRole() {
+               appsRoles = new ArrayList<AppNameIdIsAdmin>();
+       }
+
+       public String getOrgUserId() {
+               return orgUserId;
+       }
+
+       public void setOrgUserId(String orgUserId) {
+               this.orgUserId = orgUserId;
+       }
+
+       public ArrayList<AppNameIdIsAdmin> getAppsRoles() {
+               return appsRoles;
+       }
+
+       public void setAppsRoles(ArrayList<AppNameIdIsAdmin> appsRoles) {
+               this.appsRoles = appsRoles;
+       }
+
+       @Override
+       public String toString() {
+               return "AppsListWithAdminRole [orgUserId=" + orgUserId + ", appsRoles=" + appsRoles + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appsRoles == null) ? 0 : appsRoles.hashCode());
+               result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               AppsListWithAdminRole other = (AppsListWithAdminRole) obj;
+               if (appsRoles == null) {
+                       if (other.appsRoles != null)
+                               return false;
+               } else if (!appsRoles.equals(other.appsRoles))
+                       return false;
+               if (orgUserId == null) {
+                       if (other.orgUserId != null)
+                               return false;
+               } else if (!orgUserId.equals(other.orgUserId))
+                       return false;
+               return true;
+       }
+
+}
index 4765878..5fb847f 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@Entity\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class BusinessCardApplicationRole implements Serializable{\r
-       \r
-       /**\r
-        * \r
-        */\r
-       private static final long serialVersionUID = 1L;\r
-\r
-\r
-       public BusinessCardApplicationRole() {\r
-       }\r
-\r
-       \r
-    @Id\r
-       @Column(name="app_name")\r
-       private String appName;\r
-       \r
-       @Id\r
-       @Column(name="role_name")\r
-       private String roleName;\r
-\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-\r
-\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "BusinessCardUserApplicationRoles [appName=" + appName + ", roleName=" + roleName + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
-               result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               BusinessCardApplicationRole other = (BusinessCardApplicationRole) obj;\r
-               if (appName == null) {\r
-                       if (other.appName != null)\r
-                               return false;\r
-               } else if (!appName.equals(other.appName))\r
-                       return false;\r
-               if (roleName == null) {\r
-                       if (other.roleName != null)\r
-                               return false;\r
-               } else if (!roleName.equals(other.roleName))\r
-                       return false;\r
-               return true;\r
-       }       \r
-       \r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@Entity
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class BusinessCardApplicationRole implements Serializable{
+       
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+
+
+       public BusinessCardApplicationRole() {
+       }
+
+       
+    @Id
+       @Column(name="app_name")
+       private String appName;
+       
+       @Id
+       @Column(name="role_name")
+       private String roleName;
+
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+
+       @Override
+       public String toString() {
+               return "BusinessCardUserApplicationRoles [appName=" + appName + ", roleName=" + roleName + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appName == null) ? 0 : appName.hashCode());
+               result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               BusinessCardApplicationRole other = (BusinessCardApplicationRole) obj;
+               if (appName == null) {
+                       if (other.appName != null)
+                               return false;
+               } else if (!appName.equals(other.appName))
+                       return false;
+               if (roleName == null) {
+                       if (other.roleName != null)
+                               return false;
+               } else if (!roleName.equals(other.roleName))
+                       return false;
+               return true;
+       }       
+       
+
+}
index 15c3aff..51feb11 100644 (file)
@@ -1,86 +1,86 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class BusinessCardApplicationRolesList {\r
-\r
-       public BusinessCardApplicationRolesList(){}\r
-\r
-    private String appName;\r
-       private List<String> roleNames;\r
-\r
-\r
-       public String getAppName() {\r
-               return appName;\r
-       }\r
-       public void setAppName(String appName) {\r
-               this.appName = appName;\r
-       }\r
-       public List<String> getRoleNames() {\r
-               return roleNames;\r
-       }\r
-       public void setRoleNames(List<String> roleNames) {\r
-               this.roleNames = roleNames;\r
-       }\r
-       public BusinessCardApplicationRolesList(String appName, List<String> roleNames) {\r
-               super();\r
-               this.appName = appName;\r
-               this.roleNames = roleNames;\r
-       }\r
-       @Override\r
-       public String toString() {\r
-               return "BusinessCardUserAppRoles [appName=" + appName + ", roleNames=" + roleNames + "]";\r
-       }\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
-               result = prime * result + ((roleNames == null) ? 0 : roleNames.hashCode());\r
-               return result;\r
-       }\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               BusinessCardApplicationRolesList other = (BusinessCardApplicationRolesList) obj;\r
-               if (appName == null) {\r
-                       if (other.appName != null)\r
-                               return false;\r
-               } else if (!appName.equals(other.appName))\r
-                       return false;\r
-               if (roleNames == null) {\r
-                       if (other.roleNames != null)\r
-                               return false;\r
-               } else if (!roleNames.equals(other.roleNames))\r
-                       return false;\r
-               return true;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class BusinessCardApplicationRolesList {
+
+       public BusinessCardApplicationRolesList(){}
+
+    private String appName;
+       private List<String> roleNames;
+
+
+       public String getAppName() {
+               return appName;
+       }
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+       public List<String> getRoleNames() {
+               return roleNames;
+       }
+       public void setRoleNames(List<String> roleNames) {
+               this.roleNames = roleNames;
+       }
+       public BusinessCardApplicationRolesList(String appName, List<String> roleNames) {
+               super();
+               this.appName = appName;
+               this.roleNames = roleNames;
+       }
+       @Override
+       public String toString() {
+               return "BusinessCardUserAppRoles [appName=" + appName + ", roleNames=" + roleNames + "]";
+       }
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appName == null) ? 0 : appName.hashCode());
+               result = prime * result + ((roleNames == null) ? 0 : roleNames.hashCode());
+               return result;
+       }
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               BusinessCardApplicationRolesList other = (BusinessCardApplicationRolesList) obj;
+               if (appName == null) {
+                       if (other.appName != null)
+                               return false;
+               } else if (!appName.equals(other.appName))
+                       return false;
+               if (roleNames == null) {
+                       if (other.roleNames != null)
+                               return false;
+               } else if (!roleNames.equals(other.roleNames))
+                       return false;
+               return true;
+       }
+       
+}
index da2ae4e..ceb5d46 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-/**\r
- * This is to handle portal admins\r
- * @author aw3218\r
- */\r
-@Entity \r
-@Table(name="fn_common_widget_data")\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class CommonWidget extends DomainVo{\r
-\r
-       private static final long serialVersionUID = 7897021982887364557L;\r
-       \r
-       @Id\r
-       @GeneratedValue(strategy=GenerationType.AUTO)\r
-       @Column(name = "id")\r
-       private Long id;\r
-\r
-       @Column(name = "category")\r
-       public String category;\r
-       \r
-       @Column(name = "href")\r
-       public String href;\r
-\r
-       @Column(name = "title")\r
-       public String title;\r
-       \r
-       @Column(name = "content")\r
-       public String content;\r
-\r
-       @Column(name = "event_date")\r
-       public String eventDate;\r
-       \r
-       @Column(name = "sort_order")\r
-       public Integer sortOrder;\r
-\r
-       \r
-       public CommonWidget(){\r
-               \r
-       }\r
-       \r
-       public CommonWidget(String category, String href, String title, String content, String eventDate, Integer sortOrder){\r
-               this.category = category;\r
-               this.href = href;\r
-               this.title = title;\r
-               this.content = content;\r
-               this.eventDate = eventDate;\r
-               this.sortOrder = sortOrder;\r
-       }\r
-\r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-\r
-       public String getHref() {\r
-               return href;\r
-       }\r
-\r
-       public void setHref(String href) {\r
-               this.href = href;\r
-       }\r
-\r
-       public String getTitle() {\r
-               return title;\r
-       }\r
-\r
-       public void setTitle(String title) {\r
-               this.title = title;\r
-       }\r
-\r
-       public Integer getSortOrder() {\r
-               return sortOrder;\r
-       }\r
-\r
-       public void setSortOrder(Integer sortOrder) {\r
-               this.sortOrder = sortOrder;\r
-       }\r
-\r
-       public static long getSerialversionuid() {\r
-               return serialVersionUID;\r
-       }\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {            \r
-               this.id = id;\r
-       }\r
-\r
-       public String getContent() {\r
-               return content;\r
-       }\r
-\r
-       public void setContent(String content) {\r
-               this.content = content;\r
-       }\r
-\r
-       public String getEventDate() {\r
-               return eventDate;\r
-       }\r
-\r
-       public void setEventDate(String eventDate) {\r
-               this.eventDate = eventDate;\r
-       }       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * This is to handle portal admins
+ * @author aw3218
+ */
+@Entity 
+@Table(name="fn_common_widget_data")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class CommonWidget extends DomainVo{
+
+       private static final long serialVersionUID = 7897021982887364557L;
+       
+       @Id
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       @Column(name = "id")
+       private Long id;
+
+       @Column(name = "category")
+       public String category;
+       
+       @Column(name = "href")
+       public String href;
+
+       @Column(name = "title")
+       public String title;
+       
+       @Column(name = "content")
+       public String content;
+
+       @Column(name = "event_date")
+       public String eventDate;
+       
+       @Column(name = "sort_order")
+       public Integer sortOrder;
+
+       
+       public CommonWidget(){
+               
+       }
+       
+       public CommonWidget(String category, String href, String title, String content, String eventDate, Integer sortOrder){
+               this.category = category;
+               this.href = href;
+               this.title = title;
+               this.content = content;
+               this.eventDate = eventDate;
+               this.sortOrder = sortOrder;
+       }
+
+       public String getCategory() {
+               return category;
+       }
+
+       public void setCategory(String category) {
+               this.category = category;
+       }
+
+       public String getHref() {
+               return href;
+       }
+
+       public void setHref(String href) {
+               this.href = href;
+       }
+
+       public String getTitle() {
+               return title;
+       }
+
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+       public Integer getSortOrder() {
+               return sortOrder;
+       }
+
+       public void setSortOrder(Integer sortOrder) {
+               this.sortOrder = sortOrder;
+       }
+
+       public static long getSerialversionuid() {
+               return serialVersionUID;
+       }
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {            
+               this.id = id;
+       }
+
+       public String getContent() {
+               return content;
+       }
+
+       public void setContent(String content) {
+               this.content = content;
+       }
+
+       public String getEventDate() {
+               return eventDate;
+       }
+
+       public void setEventDate(String eventDate) {
+               this.eventDate = eventDate;
+       }       
+}
index ad71b08..ebf2439 100644 (file)
@@ -1,50 +1,50 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-public class CommonWidgetMeta {\r
-       \r
-       private String category;\r
-       private List<CommonWidget> items;\r
-       \r
-       public CommonWidgetMeta(){      \r
-               \r
-       }\r
-\r
-       public CommonWidgetMeta(String category, List<CommonWidget> items){\r
-               this.category = category;\r
-               this.items = items;\r
-       }\r
-       \r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-       public List<CommonWidget> getItems() {\r
-               return items;\r
-       }\r
-       public void setItems(List<CommonWidget> items) {\r
-               this.items = items;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+public class CommonWidgetMeta {
+       
+       private String category;
+       private List<CommonWidget> items;
+       
+       public CommonWidgetMeta(){      
+               
+       }
+
+       public CommonWidgetMeta(String category, List<CommonWidget> items){
+               this.category = category;
+               this.items = items;
+       }
+       
+       public String getCategory() {
+               return category;
+       }
+       public void setCategory(String category) {
+               this.category = category;
+       }
+       public List<CommonWidget> getItems() {
+               return items;
+       }
+       public void setItems(List<CommonWidget> items) {
+               this.items = items;
+       }
+}
index 658ef51..7d8b8cd 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class EPAppsManualPreference {\r
-       \r
-       private Long appid;\r
-       private int col;\r
-       private String headerText;\r
-       private String imageLink;\r
-       private int order;\r
-       private boolean restrictedApp;\r
-       private int row;\r
-       private int sizeX;\r
-       private int sizeY;\r
-       private String subHeaderText;\r
-       private String url;\r
-       private boolean addRemoveApps;\r
-       \r
-       \r
-       public boolean isAddRemoveApps() {\r
-               return addRemoveApps;\r
-       }\r
-       public void setAddRemoveApps(boolean addRemoveApps) {\r
-               this.addRemoveApps = addRemoveApps;\r
-       }\r
-       public Long getAppid() {\r
-               return appid;\r
-       }\r
-       public void setAppid(Long appid) {\r
-               this.appid = appid;\r
-       }\r
-       public int getCol() {\r
-               return col;\r
-       }\r
-       public void setCol(int col) {\r
-               this.col = col;\r
-       }\r
-       public String getHeaderText() {\r
-               return headerText;\r
-       }\r
-       public void setHeaderText(String headerText) {\r
-               this.headerText = headerText;\r
-       }\r
-       public String getImageLink() {\r
-               return imageLink;\r
-       }\r
-       public void setImageLink(String imageLink) {\r
-               this.imageLink = imageLink;\r
-       }\r
-       public int getOrder() {\r
-               return order;\r
-       }\r
-       public void setOrder(int order) {\r
-               this.order = order;\r
-       }\r
-       public boolean isRestrictedApp() {\r
-               return restrictedApp;\r
-       }\r
-       public void setRestrictedApp(boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-       public int getRow() {\r
-               return row;\r
-       }\r
-       public void setRow(int row) {\r
-               this.row = row;\r
-       }\r
-       public int getSizeX() {\r
-               return sizeX;\r
-       }\r
-       public void setSizeX(int sizeX) {\r
-               this.sizeX = sizeX;\r
-       }\r
-       public int getSizeY() {\r
-               return sizeY;\r
-       }\r
-       public void setSizeY(int sizeY) {\r
-               this.sizeY = sizeY;\r
-       }\r
-       public String getSubHeaderText() {\r
-               return subHeaderText;\r
-       }\r
-       public void setSubHeaderText(String subHeaderText) {\r
-               this.subHeaderText = subHeaderText;\r
-       }\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-       \r
-       public boolean isValid(){\r
-               return appid != null;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class EPAppsManualPreference {
+       
+       private Long appid;
+       private int col;
+       private String headerText;
+       private String imageLink;
+       private int order;
+       private boolean restrictedApp;
+       private int row;
+       private int sizeX;
+       private int sizeY;
+       private String subHeaderText;
+       private String url;
+       private boolean addRemoveApps;
+       
+       
+       public boolean isAddRemoveApps() {
+               return addRemoveApps;
+       }
+       public void setAddRemoveApps(boolean addRemoveApps) {
+               this.addRemoveApps = addRemoveApps;
+       }
+       public Long getAppid() {
+               return appid;
+       }
+       public void setAppid(Long appid) {
+               this.appid = appid;
+       }
+       public int getCol() {
+               return col;
+       }
+       public void setCol(int col) {
+               this.col = col;
+       }
+       public String getHeaderText() {
+               return headerText;
+       }
+       public void setHeaderText(String headerText) {
+               this.headerText = headerText;
+       }
+       public String getImageLink() {
+               return imageLink;
+       }
+       public void setImageLink(String imageLink) {
+               this.imageLink = imageLink;
+       }
+       public int getOrder() {
+               return order;
+       }
+       public void setOrder(int order) {
+               this.order = order;
+       }
+       public boolean isRestrictedApp() {
+               return restrictedApp;
+       }
+       public void setRestrictedApp(boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+       public int getRow() {
+               return row;
+       }
+       public void setRow(int row) {
+               this.row = row;
+       }
+       public int getSizeX() {
+               return sizeX;
+       }
+       public void setSizeX(int sizeX) {
+               this.sizeX = sizeX;
+       }
+       public int getSizeY() {
+               return sizeY;
+       }
+       public void setSizeY(int sizeY) {
+               this.sizeY = sizeY;
+       }
+       public String getSubHeaderText() {
+               return subHeaderText;
+       }
+       public void setSubHeaderText(String subHeaderText) {
+               this.subHeaderText = subHeaderText;
+       }
+       public String getUrl() {
+               return url;
+       }
+       public void setUrl(String url) {
+               this.url = url;
+       }
+       
+       public boolean isValid(){
+               return appid != null;
+       }
+}
index 8aa0860..5e337bb 100644 (file)
@@ -1,47 +1,47 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class EPAppsSortPreference {\r
-       \r
-       private int index;\r
-       private String value;\r
-       private String title;\r
-       \r
-       public int getIndex() {\r
-               return index;\r
-       }\r
-       public void setIndex(int index) {\r
-               this.index = index;\r
-       }\r
-       public String getValue() {\r
-               return value;\r
-       }\r
-       public void setValue(String value) {\r
-               this.value = value;\r
-       }\r
-       public String getTitle() {\r
-               return title;\r
-       }\r
-       public void setTitle(String title) {\r
-               this.title = title;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class EPAppsSortPreference {
+       
+       private int index;
+       private String value;
+       private String title;
+       
+       public int getIndex() {
+               return index;
+       }
+       public void setIndex(int index) {
+               this.index = index;
+       }
+       public String getValue() {
+               return value;
+       }
+       public void setValue(String value) {
+               this.value = value;
+       }
+       public String getTitle() {
+               return title;
+       }
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+}
index 700b74b..73a12ee 100644 (file)
@@ -1,51 +1,51 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class EPDeleteAppsManualSortPref {\r
-       private Long appId;\r
-       private boolean select;\r
-       private boolean pending;\r
-\r
-       public Long getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Long appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public boolean isSelect() {\r
-               return select;\r
-       }\r
-\r
-       public void setSelect(boolean select) {\r
-               this.select = select;\r
-       }\r
-\r
-       public boolean isPending() {\r
-               return pending;\r
-       }\r
-\r
-       public void setPending(boolean pending) {\r
-               this.pending = pending;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class EPDeleteAppsManualSortPref {
+       private Long appId;
+       private boolean select;
+       private boolean pending;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public boolean isSelect() {
+               return select;
+       }
+
+       public void setSelect(boolean select) {
+               this.select = select;
+       }
+
+       public boolean isPending() {
+               return pending;
+       }
+
+       public void setPending(boolean pending) {
+               this.pending = pending;
+       }
+
+}
index 3fadf1a..bb29ef7 100644 (file)
@@ -1,92 +1,92 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-public class EPWidgetsSortPreference {\r
-       \r
-       private int SizeX;\r
-       private int SizeY;\r
-       private String headerText;\r
-       private String url;\r
-       private Long widgetid;\r
-       private List<Object> attrb;\r
-       private String widgetIdentifier;\r
-       private int row;\r
-       private int col;\r
-       \r
-       public String getWidgetIdentifier() {\r
-               return widgetIdentifier;\r
-       }\r
-       public List<Object> getAttrb() {\r
-               return attrb;\r
-       }\r
-       public void setAttrb(List<Object> attrb) {\r
-               this.attrb = attrb;\r
-       }\r
-       public void setWidgetIdentifier(String widgetIdentifier) {\r
-               this.widgetIdentifier = widgetIdentifier;\r
-       }\r
-       public int getSizeX() {\r
-               return SizeX;\r
-       }\r
-       public void setSizeX(int sizeX) {\r
-               SizeX = sizeX;\r
-       }\r
-       public int getSizeY() {\r
-               return SizeY;\r
-       }\r
-       public void setSizeY(int sizeY) {\r
-               SizeY = sizeY;\r
-       }\r
-       public String getHeaderText() {\r
-               return headerText;\r
-       }\r
-       public void setHeaderText(String headerText) {\r
-               this.headerText = headerText;\r
-       }\r
-       public String getUrl() {\r
-               return url;\r
-       }\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-       public Long getWidgetid() {\r
-               return widgetid;\r
-       }\r
-       public void setWidgetid(Long widgetid) {\r
-               this.widgetid = widgetid;\r
-       }\r
-       public int getRow() {\r
-               return row;\r
-       }\r
-       public void setRow(int row) {\r
-               this.row = row;\r
-       }\r
-       public int getCol() {\r
-               return col;\r
-       }\r
-       public void setCol(int col) {\r
-               this.col = col;\r
-       }\r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+public class EPWidgetsSortPreference {
+       
+       private int SizeX;
+       private int SizeY;
+       private String headerText;
+       private String url;
+       private Long widgetid;
+       private List<Object> attrb;
+       private String widgetIdentifier;
+       private int row;
+       private int col;
+       
+       public String getWidgetIdentifier() {
+               return widgetIdentifier;
+       }
+       public List<Object> getAttrb() {
+               return attrb;
+       }
+       public void setAttrb(List<Object> attrb) {
+               this.attrb = attrb;
+       }
+       public void setWidgetIdentifier(String widgetIdentifier) {
+               this.widgetIdentifier = widgetIdentifier;
+       }
+       public int getSizeX() {
+               return SizeX;
+       }
+       public void setSizeX(int sizeX) {
+               SizeX = sizeX;
+       }
+       public int getSizeY() {
+               return SizeY;
+       }
+       public void setSizeY(int sizeY) {
+               SizeY = sizeY;
+       }
+       public String getHeaderText() {
+               return headerText;
+       }
+       public void setHeaderText(String headerText) {
+               this.headerText = headerText;
+       }
+       public String getUrl() {
+               return url;
+       }
+       public void setUrl(String url) {
+               this.url = url;
+       }
+       public Long getWidgetid() {
+               return widgetid;
+       }
+       public void setWidgetid(Long widgetid) {
+               this.widgetid = widgetid;
+       }
+       public int getRow() {
+               return row;
+       }
+       public void setRow(int row) {
+               this.row = row;
+       }
+       public int getCol() {
+               return col;
+       }
+       public void setCol(int col) {
+               this.col = col;
+       }
+       
+       
+}
index 94fbe59..00df522 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.Date;\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import javax.persistence.CascadeType;\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.FetchType;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.JoinColumn;\r
-import javax.persistence.OneToMany;\r
-import javax.persistence.Table;\r
-import javax.persistence.Transient;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-\r
-/**\r
- * This is to handle notifications in notification PopUp\r
- */\r
-\r
-\r
-@Entity\r
-@Table(name = "ep_notification")\r
-public class EpNotificationItem extends DomainVo {\r
-       public EpNotificationItem() {\r
-       };\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @GeneratedValue(strategy = GenerationType.IDENTITY)\r
-       @Column(name = "notification_ID")\r
-       public Long notificationId;\r
-\r
-       @Column(name = "is_for_online_users")\r
-       public String isForOnlineUsers;\r
-\r
-       @Column(name = "is_for_all_roles")\r
-       public String isForAllRoles;\r
-\r
-       @Column(name = "active_YN")\r
-       public String activeYn;\r
-       \r
-       @Column(name = "msg_header")\r
-       public String msgHeader;\r
-\r
-       @Column(name = "msg_description")\r
-       public String msgDescription;\r
-       \r
-       @Column(name = "msg_source")\r
-       public String msgSource;\r
-\r
-       @Column(name = "start_time")\r
-       public Date startTime;\r
-       \r
-       @Column(name = "end_time")\r
-       public Date endTime;\r
-\r
-       @Column(name = "priority")\r
-       public Long priority;\r
-       \r
-       @Column(name = "creator_ID")\r
-       public Long creatorId;\r
-       \r
-       @Column(name = "created_date")\r
-       public Date createdDate;\r
-               \r
-       \r
-       @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL}, orphanRemoval = true)\r
-       @JoinColumn(name="notification_ID")\r
-       private Set<EpRoleNotificationItem> roles;\r
-       \r
-       @Transient\r
-       private List<Long> roleIds;\r
-       \r
-       public Long getNotificationId() {\r
-               return notificationId;\r
-       }\r
-\r
-       public void setNotificationId(Long notificationId) {\r
-               this.notificationId = notificationId;\r
-       }\r
-\r
-       public String getIsForOnlineUsers() {\r
-               return isForOnlineUsers;\r
-       }\r
-\r
-       public void setIsForOnlineUsers(String isForOnlineUsers) {\r
-               this.isForOnlineUsers = isForOnlineUsers;\r
-       }\r
-\r
-       public String getIsForAllRoles() {\r
-               return isForAllRoles;\r
-       }\r
-\r
-       public void setIsForAllRoles(String isForAllRoles) {\r
-               this.isForAllRoles = isForAllRoles;\r
-       }\r
-       \r
-       public String getActiveYn() {\r
-               return activeYn;\r
-       }\r
-\r
-       public void setActiveYn(String activeYn) {\r
-               this.activeYn = activeYn;\r
-       }\r
-\r
-       public String getMsgHeader() {\r
-               return msgHeader;\r
-       }\r
-\r
-       public void setMsgHeader(String msgHeader) {\r
-               this.msgHeader = msgHeader;\r
-       }\r
-\r
-       public String getMsgDescription() {\r
-               return msgDescription;\r
-       }\r
-\r
-       public void setMsgDescription(String msgDescription) {\r
-               this.msgDescription = msgDescription;\r
-       }\r
-\r
-       public Date getStartTime() {\r
-               return startTime;\r
-       }\r
-\r
-       public void setStartTime(Date startTime) {\r
-               this.startTime = startTime;\r
-       }\r
-\r
-       public Date getEndTime() {\r
-               return endTime;\r
-       }\r
-\r
-       public void setEndTime(Date endTime) {\r
-               this.endTime = endTime;\r
-       }\r
-\r
-       public Long getPriority() {\r
-               return priority;\r
-       }\r
-\r
-       public void setPriority(Long priority) {\r
-               this.priority = priority;\r
-       }\r
-\r
-       public Long getCreatorId() {\r
-               return creatorId;\r
-       }\r
-\r
-       public void setCreatorId(Long creatorId) {\r
-               this.creatorId = creatorId;\r
-       }\r
-\r
-       public Date getCreatedDate() {\r
-               return createdDate;\r
-       }\r
-\r
-       public void setCreatedDate(Date createdDate) {\r
-               this.createdDate = createdDate;\r
-       }\r
-\r
-       public static long getSerialversionuid() {\r
-               return serialVersionUID;\r
-       }\r
-\r
-       public Set<EpRoleNotificationItem> getRoles() {\r
-               return roles;\r
-       }\r
-\r
-       public void setRoles(Set<EpRoleNotificationItem> roles) {\r
-               this.roles = roles;\r
-       }\r
-\r
-       public List<Long> getRoleIds() {\r
-               return roleIds;\r
-       }\r
-\r
-       public void setRoleIds(List<Long> roleIds) {\r
-               this.roleIds = roleIds;\r
-       }\r
-       \r
-       public String getMsgSource() {\r
-               return msgSource;\r
-       }\r
-\r
-       public void setMsgSource(String msgSource) {\r
-               this.msgSource = msgSource;\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((activeYn == null) ? 0 : activeYn.hashCode());\r
-               result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode());\r
-               result = prime * result + ((creatorId == null) ? 0 : creatorId.hashCode());\r
-               result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());\r
-               result = prime * result + ((isForAllRoles == null) ? 0 : isForAllRoles.hashCode());\r
-               result = prime * result + ((isForOnlineUsers == null) ? 0 : isForOnlineUsers.hashCode());\r
-               result = prime * result + ((msgDescription == null) ? 0 : msgDescription.hashCode());\r
-               result = prime * result + ((msgHeader == null) ? 0 : msgHeader.hashCode());\r
-               result = prime * result + ((msgSource == null) ? 0 : msgSource.hashCode());\r
-               result = prime * result + ((notificationId == null) ? 0 : notificationId.hashCode());\r
-               result = prime * result + ((priority == null) ? 0 : priority.hashCode());\r
-               result = prime * result + ((roleIds == null) ? 0 : roleIds.hashCode());\r
-               result = prime * result + ((roles == null) ? 0 : roles.hashCode());\r
-               result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               EpNotificationItem other = (EpNotificationItem) obj;\r
-               if (activeYn == null) {\r
-                       if (other.activeYn != null)\r
-                               return false;\r
-               } else if (!activeYn.equals(other.activeYn))\r
-                       return false;\r
-               if (createdDate == null) {\r
-                       if (other.createdDate != null)\r
-                               return false;\r
-               } else if (!createdDate.equals(other.createdDate))\r
-                       return false;\r
-               if (creatorId == null) {\r
-                       if (other.creatorId != null)\r
-                               return false;\r
-               } else if (!creatorId.equals(other.creatorId))\r
-                       return false;\r
-               if (endTime == null) {\r
-                       if (other.endTime != null)\r
-                               return false;\r
-               } else if (!endTime.equals(other.endTime))\r
-                       return false;\r
-               if (isForAllRoles == null) {\r
-                       if (other.isForAllRoles != null)\r
-                               return false;\r
-               } else if (!isForAllRoles.equals(other.isForAllRoles))\r
-                       return false;\r
-               if (isForOnlineUsers == null) {\r
-                       if (other.isForOnlineUsers != null)\r
-                               return false;\r
-               } else if (!isForOnlineUsers.equals(other.isForOnlineUsers))\r
-                       return false;\r
-               if (msgDescription == null) {\r
-                       if (other.msgDescription != null)\r
-                               return false;\r
-               } else if (!msgDescription.equals(other.msgDescription))\r
-                       return false;\r
-               if (msgHeader == null) {\r
-                       if (other.msgHeader != null)\r
-                               return false;\r
-               } else if (!msgHeader.equals(other.msgHeader))\r
-                       return false;\r
-               if (msgSource == null) {\r
-                       if (other.msgSource != null)\r
-                               return false;\r
-               } else if (!msgSource.equals(other.msgSource))\r
-                       return false;\r
-               if (notificationId == null) {\r
-                       if (other.notificationId != null)\r
-                               return false;\r
-               } else if (!notificationId.equals(other.notificationId))\r
-                       return false;\r
-               if (priority == null) {\r
-                       if (other.priority != null)\r
-                               return false;\r
-               } else if (!priority.equals(other.priority))\r
-                       return false;\r
-               if (roleIds == null) {\r
-                       if (other.roleIds != null)\r
-                               return false;\r
-               } else if (!roleIds.equals(other.roleIds))\r
-                       return false;\r
-               if (roles == null) {\r
-                       if (other.roles != null)\r
-                               return false;\r
-               } else if (!roles.equals(other.roles))\r
-                       return false;\r
-               if (startTime == null) {\r
-                       if (other.startTime != null)\r
-                               return false;\r
-               } else if (!startTime.equals(other.startTime))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "EpNotificationItem [notificationId=" + notificationId + ", isForOnlineUsers=" + isForOnlineUsers\r
-                               + ", isForAllRoles=" + isForAllRoles + ", activeYn=" + activeYn + ", msgHeader=" + msgHeader\r
-                               + ", msgDescription=" + msgDescription + ", msgSource=" + msgSource + ", startTime=" + startTime\r
-                               + ", endTime=" + endTime + ", priority=" + priority + ", creatorId=" + creatorId + ", createdDate="\r
-                               + createdDate + ", roles=" + roles + ", roleIds=" + roleIds + "]";\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+
+/**
+ * This is to handle notifications in notification PopUp
+ */
+
+
+@Entity
+@Table(name = "ep_notification")
+public class EpNotificationItem extends DomainVo {
+       public EpNotificationItem() {
+       };
+
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @GeneratedValue(strategy = GenerationType.IDENTITY)
+       @Column(name = "notification_ID")
+       public Long notificationId;
+
+       @Column(name = "is_for_online_users")
+       public String isForOnlineUsers;
+
+       @Column(name = "is_for_all_roles")
+       public String isForAllRoles;
+
+       @Column(name = "active_YN")
+       public String activeYn;
+       
+       @Column(name = "msg_header")
+       public String msgHeader;
+
+       @Column(name = "msg_description")
+       public String msgDescription;
+       
+       @Column(name = "msg_source")
+       public String msgSource;
+
+       @Column(name = "start_time")
+       public Date startTime;
+       
+       @Column(name = "end_time")
+       public Date endTime;
+
+       @Column(name = "priority")
+       public Long priority;
+       
+       @Column(name = "creator_ID")
+       public Long creatorId;
+       
+       @Column(name = "created_date")
+       public Date createdDate;
+               
+       
+       @OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.ALL}, orphanRemoval = true)
+       @JoinColumn(name="notification_ID")
+       private Set<EpRoleNotificationItem> roles;
+       
+       @Transient
+       private List<Long> roleIds;
+       
+       public Long getNotificationId() {
+               return notificationId;
+       }
+
+       public void setNotificationId(Long notificationId) {
+               this.notificationId = notificationId;
+       }
+
+       public String getIsForOnlineUsers() {
+               return isForOnlineUsers;
+       }
+
+       public void setIsForOnlineUsers(String isForOnlineUsers) {
+               this.isForOnlineUsers = isForOnlineUsers;
+       }
+
+       public String getIsForAllRoles() {
+               return isForAllRoles;
+       }
+
+       public void setIsForAllRoles(String isForAllRoles) {
+               this.isForAllRoles = isForAllRoles;
+       }
+       
+       public String getActiveYn() {
+               return activeYn;
+       }
+
+       public void setActiveYn(String activeYn) {
+               this.activeYn = activeYn;
+       }
+
+       public String getMsgHeader() {
+               return msgHeader;
+       }
+
+       public void setMsgHeader(String msgHeader) {
+               this.msgHeader = msgHeader;
+       }
+
+       public String getMsgDescription() {
+               return msgDescription;
+       }
+
+       public void setMsgDescription(String msgDescription) {
+               this.msgDescription = msgDescription;
+       }
+
+       public Date getStartTime() {
+               return startTime;
+       }
+
+       public void setStartTime(Date startTime) {
+               this.startTime = startTime;
+       }
+
+       public Date getEndTime() {
+               return endTime;
+       }
+
+       public void setEndTime(Date endTime) {
+               this.endTime = endTime;
+       }
+
+       public Long getPriority() {
+               return priority;
+       }
+
+       public void setPriority(Long priority) {
+               this.priority = priority;
+       }
+
+       public Long getCreatorId() {
+               return creatorId;
+       }
+
+       public void setCreatorId(Long creatorId) {
+               this.creatorId = creatorId;
+       }
+
+       public Date getCreatedDate() {
+               return createdDate;
+       }
+
+       public void setCreatedDate(Date createdDate) {
+               this.createdDate = createdDate;
+       }
+
+       public static long getSerialversionuid() {
+               return serialVersionUID;
+       }
+
+       public Set<EpRoleNotificationItem> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(Set<EpRoleNotificationItem> roles) {
+               this.roles = roles;
+       }
+
+       public List<Long> getRoleIds() {
+               return roleIds;
+       }
+
+       public void setRoleIds(List<Long> roleIds) {
+               this.roleIds = roleIds;
+       }
+       
+       public String getMsgSource() {
+               return msgSource;
+       }
+
+       public void setMsgSource(String msgSource) {
+               this.msgSource = msgSource;
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((activeYn == null) ? 0 : activeYn.hashCode());
+               result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode());
+               result = prime * result + ((creatorId == null) ? 0 : creatorId.hashCode());
+               result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
+               result = prime * result + ((isForAllRoles == null) ? 0 : isForAllRoles.hashCode());
+               result = prime * result + ((isForOnlineUsers == null) ? 0 : isForOnlineUsers.hashCode());
+               result = prime * result + ((msgDescription == null) ? 0 : msgDescription.hashCode());
+               result = prime * result + ((msgHeader == null) ? 0 : msgHeader.hashCode());
+               result = prime * result + ((msgSource == null) ? 0 : msgSource.hashCode());
+               result = prime * result + ((notificationId == null) ? 0 : notificationId.hashCode());
+               result = prime * result + ((priority == null) ? 0 : priority.hashCode());
+               result = prime * result + ((roleIds == null) ? 0 : roleIds.hashCode());
+               result = prime * result + ((roles == null) ? 0 : roles.hashCode());
+               result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               EpNotificationItem other = (EpNotificationItem) obj;
+               if (activeYn == null) {
+                       if (other.activeYn != null)
+                               return false;
+               } else if (!activeYn.equals(other.activeYn))
+                       return false;
+               if (createdDate == null) {
+                       if (other.createdDate != null)
+                               return false;
+               } else if (!createdDate.equals(other.createdDate))
+                       return false;
+               if (creatorId == null) {
+                       if (other.creatorId != null)
+                               return false;
+               } else if (!creatorId.equals(other.creatorId))
+                       return false;
+               if (endTime == null) {
+                       if (other.endTime != null)
+                               return false;
+               } else if (!endTime.equals(other.endTime))
+                       return false;
+               if (isForAllRoles == null) {
+                       if (other.isForAllRoles != null)
+                               return false;
+               } else if (!isForAllRoles.equals(other.isForAllRoles))
+                       return false;
+               if (isForOnlineUsers == null) {
+                       if (other.isForOnlineUsers != null)
+                               return false;
+               } else if (!isForOnlineUsers.equals(other.isForOnlineUsers))
+                       return false;
+               if (msgDescription == null) {
+                       if (other.msgDescription != null)
+                               return false;
+               } else if (!msgDescription.equals(other.msgDescription))
+                       return false;
+               if (msgHeader == null) {
+                       if (other.msgHeader != null)
+                               return false;
+               } else if (!msgHeader.equals(other.msgHeader))
+                       return false;
+               if (msgSource == null) {
+                       if (other.msgSource != null)
+                               return false;
+               } else if (!msgSource.equals(other.msgSource))
+                       return false;
+               if (notificationId == null) {
+                       if (other.notificationId != null)
+                               return false;
+               } else if (!notificationId.equals(other.notificationId))
+                       return false;
+               if (priority == null) {
+                       if (other.priority != null)
+                               return false;
+               } else if (!priority.equals(other.priority))
+                       return false;
+               if (roleIds == null) {
+                       if (other.roleIds != null)
+                               return false;
+               } else if (!roleIds.equals(other.roleIds))
+                       return false;
+               if (roles == null) {
+                       if (other.roles != null)
+                               return false;
+               } else if (!roles.equals(other.roles))
+                       return false;
+               if (startTime == null) {
+                       if (other.startTime != null)
+                               return false;
+               } else if (!startTime.equals(other.startTime))
+                       return false;
+               return true;
+       }
+
+       @Override
+       public String toString() {
+               return "EpNotificationItem [notificationId=" + notificationId + ", isForOnlineUsers=" + isForOnlineUsers
+                               + ", isForAllRoles=" + isForAllRoles + ", activeYn=" + activeYn + ", msgHeader=" + msgHeader
+                               + ", msgDescription=" + msgDescription + ", msgSource=" + msgSource + ", startTime=" + startTime
+                               + ", endTime=" + endTime + ", priority=" + priority + ", creatorId=" + creatorId + ", createdDate="
+                               + createdDate + ", roles=" + roles + ", roleIds=" + roleIds + "]";
+       }
+       
+}
index 4a3dc80..c8c466e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.Date;\r
-\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class EpNotificationItemExtVO {\r
-       \r
-       private Character activeYn;\r
-\r
-       private String msgHeader;\r
-\r
-       private String msgDescription;\r
-\r
-       private Date startTime;\r
-\r
-       private Date endTime;\r
-\r
-       private Integer priority;\r
-\r
-       private Integer creatorId;\r
-\r
-       private Date createdDate;\r
-       \r
-       private String loginId;\r
-\r
-       public Character getActiveYn() {\r
-               return activeYn;\r
-       }\r
-\r
-       public void setActiveYn(Character activeYn) {\r
-               this.activeYn = activeYn;\r
-       }\r
-\r
-       public String getMsgHeader() {\r
-               return msgHeader;\r
-       }\r
-\r
-       public void setMsgHeader(String msgHeader) {\r
-               this.msgHeader = msgHeader;\r
-       }\r
-\r
-       public String getMsgDescription() {\r
-               return msgDescription;\r
-       }\r
-\r
-       public void setMsgDescription(String msgDescription) {\r
-               this.msgDescription = msgDescription;\r
-       }\r
-\r
-       public Date getStartTime() {\r
-               return startTime;\r
-       }\r
-\r
-       public void setStartTime(Date startTime) {\r
-               this.startTime = startTime;\r
-       }\r
-\r
-       public Date getEndTime() {\r
-               return endTime;\r
-       }\r
-\r
-       public void setEndTime(Date endTime) {\r
-               this.endTime = endTime;\r
-       }\r
-\r
-       public Integer getPriority() {\r
-               return priority;\r
-       }\r
-\r
-       public void setPriority(Integer priority) {\r
-               this.priority = priority;\r
-       }\r
-\r
-       public Integer getCreatorId() {\r
-               return creatorId;\r
-       }\r
-\r
-       public void setCreatorId(Integer creatorId) {\r
-               this.creatorId = creatorId;\r
-       }\r
-\r
-       public Date getCreatedDate() {\r
-               return createdDate;\r
-       }\r
-\r
-       public void setCreatedDate(Date createdDate) {\r
-               this.createdDate = createdDate;\r
-       }\r
-\r
-       public String getLoginId() {\r
-               return loginId;\r
-       }\r
-\r
-       public void setLoginId(String loginId) {\r
-               this.loginId = loginId;\r
-       } \r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class EpNotificationItemExtVO {
+       
+       private Character activeYn;
+
+       private String msgHeader;
+
+       private String msgDescription;
+
+       private Date startTime;
+
+       private Date endTime;
+
+       private Integer priority;
+
+       private Integer creatorId;
+
+       private Date createdDate;
+       
+       private String loginId;
+
+       public Character getActiveYn() {
+               return activeYn;
+       }
+
+       public void setActiveYn(Character activeYn) {
+               this.activeYn = activeYn;
+       }
+
+       public String getMsgHeader() {
+               return msgHeader;
+       }
+
+       public void setMsgHeader(String msgHeader) {
+               this.msgHeader = msgHeader;
+       }
+
+       public String getMsgDescription() {
+               return msgDescription;
+       }
+
+       public void setMsgDescription(String msgDescription) {
+               this.msgDescription = msgDescription;
+       }
+
+       public Date getStartTime() {
+               return startTime;
+       }
+
+       public void setStartTime(Date startTime) {
+               this.startTime = startTime;
+       }
+
+       public Date getEndTime() {
+               return endTime;
+       }
+
+       public void setEndTime(Date endTime) {
+               this.endTime = endTime;
+       }
+
+       public Integer getPriority() {
+               return priority;
+       }
+
+       public void setPriority(Integer priority) {
+               this.priority = priority;
+       }
+
+       public Integer getCreatorId() {
+               return creatorId;
+       }
+
+       public void setCreatorId(Integer creatorId) {
+               this.creatorId = creatorId;
+       }
+
+       public Date getCreatedDate() {
+               return createdDate;
+       }
+
+       public void setCreatedDate(Date createdDate) {
+               this.createdDate = createdDate;
+       }
+
+       public String getLoginId() {
+               return loginId;
+       }
+
+       public void setLoginId(String loginId) {
+               this.loginId = loginId;
+       } 
+
+}
index d22a4b7..3cb0f3a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.Date;\r
-\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-/**\r
- * This is to handle notifications in user notifications and in notification history\r
- */\r
-\r
-/**\r
- * POJO that models a single notification with the org user ID (not integer\r
- * user_id).\r
- */\r
-@Entity\r
-public class EpNotificationItemVO extends DomainVo {\r
-\r
-       private static final long serialVersionUID = 9095479701352339201L;\r
-\r
-       @Id\r
-       private Integer notificationId;\r
-\r
-       private Character isForOnlineUsers;\r
-\r
-       private Character isForAllRoles;\r
-\r
-       private Character activeYn;\r
-\r
-       private String msgHeader;\r
-\r
-       private String msgDescription;\r
-       \r
-       private String msgSource;\r
-\r
-       private Date startTime;\r
-\r
-       private Date endTime;\r
-\r
-       private Integer priority;\r
-\r
-       private Integer creatorId;\r
-\r
-       private Date createdDate;\r
-\r
-       private String loginId;\r
-\r
-       /**\r
-        * Answers whether the notification is expired.\r
-        * \r
-        * @return true if the end time is past the current time, else false.\r
-        */\r
-       public boolean isExpired() {\r
-               boolean result = false;\r
-               if (endTime != null) {\r
-                       int expired = endTime.compareTo(new Date());\r
-                       result = (expired == -1) ? true : false;\r
-               }\r
-               return result;\r
-       }\r
-\r
-       public String getLoginId() {\r
-               return loginId;\r
-       }\r
-\r
-       public void setLoginId(String loginId) {\r
-               this.loginId = loginId;\r
-       }\r
-\r
-       public Integer getNotificationId() {\r
-               return notificationId;\r
-       }\r
-\r
-       public void setNotificationId(Integer notificationId) {\r
-               this.notificationId = notificationId;\r
-       }\r
-\r
-       public Character getIsForOnlineUsers() {\r
-               return isForOnlineUsers;\r
-       }\r
-\r
-       public void setIsForOnlineUsers(Character isForOnlineUsers) {\r
-               this.isForOnlineUsers = isForOnlineUsers;\r
-       }\r
-\r
-       public Character getIsForAllRoles() {\r
-               return isForAllRoles;\r
-       }\r
-\r
-       public void setIsForAllRoles(Character isForAllRoles) {\r
-               this.isForAllRoles = isForAllRoles;\r
-       }\r
-\r
-       public Character getActiveYn() {\r
-               return activeYn;\r
-       }\r
-\r
-       public void setActiveYn(Character activeYn) {\r
-               this.activeYn = activeYn;\r
-       }\r
-\r
-       public String getMsgHeader() {\r
-               return msgHeader;\r
-       }\r
-\r
-       public void setMsgHeader(String msgHeader) {\r
-               this.msgHeader = msgHeader;\r
-       }\r
-\r
-       public String getMsgDescription() {\r
-               return msgDescription;\r
-       }\r
-\r
-       public void setMsgDescription(String msgDescription) {\r
-               this.msgDescription = msgDescription;\r
-       }\r
-\r
-       public Date getStartTime() {\r
-               return startTime;\r
-       }\r
-\r
-       public void setStartTime(Date startTime) {\r
-               this.startTime = startTime;\r
-       }\r
-\r
-       public Date getEndTime() {\r
-               return endTime;\r
-       }\r
-\r
-       public void setEndTime(Date endTime) {\r
-               this.endTime = endTime;\r
-       }\r
-\r
-       public Integer getPriority() {\r
-               return priority;\r
-       }\r
-\r
-       public void setPriority(Integer priority) {\r
-               this.priority = priority;\r
-       }\r
-\r
-       public Integer getCreatorId() {\r
-               return creatorId;\r
-       }\r
-\r
-       public void setCreatorId(Integer creatorId) {\r
-               this.creatorId = creatorId;\r
-       }\r
-\r
-       public Date getCreatedDate() {\r
-               return createdDate;\r
-       }\r
-\r
-       public void setCreatedDate(Date createdDate) {\r
-               this.createdDate = createdDate;\r
-       }\r
-\r
-       public static long getSerialversionuid() {\r
-               return serialVersionUID;\r
-       }\r
-\r
-       \r
-       public String getMsgSource() {\r
-               return msgSource;\r
-       }\r
-\r
-       public void setMsgSource(String msgSource) {\r
-               this.msgSource = msgSource;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.Date;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+/**
+ * This is to handle notifications in user notifications and in notification history
+ */
+
+/**
+ * POJO that models a single notification with the org user ID (not integer
+ * user_id).
+ */
+@Entity
+public class EpNotificationItemVO extends DomainVo {
+
+       private static final long serialVersionUID = 9095479701352339201L;
+
+       @Id
+       private Integer notificationId;
+
+       private Character isForOnlineUsers;
+
+       private Character isForAllRoles;
+
+       private Character activeYn;
+
+       private String msgHeader;
+
+       private String msgDescription;
+       
+       private String msgSource;
+
+       private Date startTime;
+
+       private Date endTime;
+
+       private Integer priority;
+
+       private Integer creatorId;
+
+       private Date createdDate;
+
+       private String loginId;
+
+       /**
+        * Answers whether the notification is expired.
+        * 
+        * @return true if the end time is past the current time, else false.
+        */
+       public boolean isExpired() {
+               boolean result = false;
+               if (endTime != null) {
+                       int expired = endTime.compareTo(new Date());
+                       result = (expired == -1) ? true : false;
+               }
+               return result;
+       }
+
+       public String getLoginId() {
+               return loginId;
+       }
+
+       public void setLoginId(String loginId) {
+               this.loginId = loginId;
+       }
+
+       public Integer getNotificationId() {
+               return notificationId;
+       }
+
+       public void setNotificationId(Integer notificationId) {
+               this.notificationId = notificationId;
+       }
+
+       public Character getIsForOnlineUsers() {
+               return isForOnlineUsers;
+       }
+
+       public void setIsForOnlineUsers(Character isForOnlineUsers) {
+               this.isForOnlineUsers = isForOnlineUsers;
+       }
+
+       public Character getIsForAllRoles() {
+               return isForAllRoles;
+       }
+
+       public void setIsForAllRoles(Character isForAllRoles) {
+               this.isForAllRoles = isForAllRoles;
+       }
+
+       public Character getActiveYn() {
+               return activeYn;
+       }
+
+       public void setActiveYn(Character activeYn) {
+               this.activeYn = activeYn;
+       }
+
+       public String getMsgHeader() {
+               return msgHeader;
+       }
+
+       public void setMsgHeader(String msgHeader) {
+               this.msgHeader = msgHeader;
+       }
+
+       public String getMsgDescription() {
+               return msgDescription;
+       }
+
+       public void setMsgDescription(String msgDescription) {
+               this.msgDescription = msgDescription;
+       }
+
+       public Date getStartTime() {
+               return startTime;
+       }
+
+       public void setStartTime(Date startTime) {
+               this.startTime = startTime;
+       }
+
+       public Date getEndTime() {
+               return endTime;
+       }
+
+       public void setEndTime(Date endTime) {
+               this.endTime = endTime;
+       }
+
+       public Integer getPriority() {
+               return priority;
+       }
+
+       public void setPriority(Integer priority) {
+               this.priority = priority;
+       }
+
+       public Integer getCreatorId() {
+               return creatorId;
+       }
+
+       public void setCreatorId(Integer creatorId) {
+               this.creatorId = creatorId;
+       }
+
+       public Date getCreatedDate() {
+               return createdDate;
+       }
+
+       public void setCreatedDate(Date createdDate) {
+               this.createdDate = createdDate;
+       }
+
+       public static long getSerialversionuid() {
+               return serialVersionUID;
+       }
+
+       
+       public String getMsgSource() {
+               return msgSource;
+       }
+
+       public void setMsgSource(String msgSource) {
+               this.msgSource = msgSource;
+       }
+}
index 66840ed..26cf548 100644 (file)
@@ -1,90 +1,90 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-\r
-@Entity\r
-@Table(name="ep_role_notification")\r
-public class EpRoleNotificationItem extends DomainVo  {\r
-       public EpRoleNotificationItem(){};\r
-       \r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-    @GeneratedValue(strategy=GenerationType.IDENTITY)\r
-       @Column(name = "ID")\r
-       public Long id;\r
-       \r
-       @Column(name = "notification_ID")\r
-       public Long notificationId;\r
-               \r
-       @Column(name = "role_ID")\r
-       public Integer roleId;\r
-       \r
-       @Column(name = "recv_user_id")\r
-       public Integer RecvUserId;\r
-\r
-\r
-       public Long getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public Long getNotificationId() {\r
-               return notificationId;\r
-       }\r
-\r
-       public void setNotificationId(Long notificationId) {\r
-               this.notificationId = notificationId;\r
-       }\r
-\r
-       public Integer getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Integer roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       public static long getSerialversionuid() {\r
-               return serialVersionUID;\r
-       }\r
-       \r
-       public Integer getRecvUserId() {\r
-               return RecvUserId;\r
-       }\r
-\r
-       public void setRecvUserId(Integer recvUserId) {\r
-               RecvUserId = recvUserId;\r
-       }\r
-\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+
+@Entity
+@Table(name="ep_role_notification")
+public class EpRoleNotificationItem extends DomainVo  {
+       public EpRoleNotificationItem(){};
+       
+       private static final long serialVersionUID = 1L;
+
+       @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+       @Column(name = "ID")
+       public Long id;
+       
+       @Column(name = "notification_ID")
+       public Long notificationId;
+               
+       @Column(name = "role_ID")
+       public Integer roleId;
+       
+       @Column(name = "recv_user_id")
+       public Integer RecvUserId;
+
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public Long getNotificationId() {
+               return notificationId;
+       }
+
+       public void setNotificationId(Long notificationId) {
+               this.notificationId = notificationId;
+       }
+
+       public Integer getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Integer roleId) {
+               this.roleId = roleId;
+       }
+
+       public static long getSerialversionuid() {
+               return serialVersionUID;
+       }
+       
+       public Integer getRecvUserId() {
+               return RecvUserId;
+       }
+
+       public void setRecvUserId(Integer recvUserId) {
+               RecvUserId = recvUserId;
+       }
+
+
+}
index 569dc13..4922b03 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/*package org.openecomp.portalapp.portal.transport;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-import org.openecomp.portalsdk.core.domain.support.DomainVo;\r
-import com.fasterxml.jackson.annotation.JsonInclude;\r
-\r
-*//**\r
- * This is to handle portal admins\r
- * @author aw3218\r
- *//*\r
-@Entity \r
-@Table(name="fn_event_widget_data")\r
-@JsonInclude(JsonInclude.Include.NON_NULL)\r
-public class EventWidget extends DomainVo{\r
-\r
-       *//**\r
-        * \r
-        *//*\r
-       private static final long serialVersionUID = -2784849102886421352L;\r
-\r
-       \r
-       @Id\r
-       @GeneratedValue(strategy=GenerationType.AUTO)\r
-       @Column(name = "id")\r
-       private Long id;\r
-\r
-       @Column(name = "category")\r
-       private String category;\r
-\r
-       @Column(name = "title")\r
-       private String title;\r
-       \r
-       @Column(name = "href")\r
-       private String href;\r
-\r
-       @Column(name = "content")\r
-       private String content;\r
-       \r
-       @Column(name = "month_val")\r
-       private String mon;\r
-\r
-       @Column(name = "day_val")\r
-       private Integer  day;\r
-\r
-       @Column(name = "year_val")\r
-       private Integer year;\r
-\r
-       @Column(name = "sort_order")\r
-       private Integer sortOrder;\r
-\r
-       public String getTitle() {\r
-               return title;\r
-       }\r
-\r
-       public void setTitle(String title) {\r
-               this.title = title;\r
-       }\r
-\r
-       public String getHref() {\r
-               return href;\r
-       }\r
-\r
-       public void setHref(String href) {\r
-               this.href = href;\r
-       }\r
-\r
-       public String getContent() {\r
-               return content;\r
-       }\r
-\r
-       public void setContent(String content) {\r
-               this.content = content;\r
-       }\r
-\r
-       public String getMon() {\r
-               return mon;\r
-       }\r
-\r
-       public void setMonth(String mon) {\r
-               this.mon = mon;\r
-       }\r
-\r
-       public Integer getDay() {\r
-               return day;\r
-       }\r
-\r
-       public void setDay(Integer day) {\r
-               this.day = day;\r
-       }\r
-\r
-       public Integer getYear() {\r
-               return year;\r
-       }\r
-\r
-       public void setYear(Integer year) {\r
-               this.year = year;\r
-       }\r
-\r
-       public Integer getSortOrder() {\r
-               return sortOrder;\r
-       }\r
-\r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-       \r
-       \r
-}\r
-*/\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/*package org.openecomp.portalapp.portal.transport;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.openecomp.portalsdk.core.domain.support.DomainVo;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+*//**
+ * This is to handle portal admins
+ * @author aw3218
+ *//*
+@Entity 
+@Table(name="fn_event_widget_data")
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class EventWidget extends DomainVo{
+
+       *//**
+        * 
+        *//*
+       private static final long serialVersionUID = -2784849102886421352L;
+
+       
+       @Id
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       @Column(name = "id")
+       private Long id;
+
+       @Column(name = "category")
+       private String category;
+
+       @Column(name = "title")
+       private String title;
+       
+       @Column(name = "href")
+       private String href;
+
+       @Column(name = "content")
+       private String content;
+       
+       @Column(name = "month_val")
+       private String mon;
+
+       @Column(name = "day_val")
+       private Integer  day;
+
+       @Column(name = "year_val")
+       private Integer year;
+
+       @Column(name = "sort_order")
+       private Integer sortOrder;
+
+       public String getTitle() {
+               return title;
+       }
+
+       public void setTitle(String title) {
+               this.title = title;
+       }
+
+       public String getHref() {
+               return href;
+       }
+
+       public void setHref(String href) {
+               this.href = href;
+       }
+
+       public String getContent() {
+               return content;
+       }
+
+       public void setContent(String content) {
+               this.content = content;
+       }
+
+       public String getMon() {
+               return mon;
+       }
+
+       public void setMonth(String mon) {
+               this.mon = mon;
+       }
+
+       public Integer getDay() {
+               return day;
+       }
+
+       public void setDay(Integer day) {
+               this.day = day;
+       }
+
+       public Integer getYear() {
+               return year;
+       }
+
+       public void setYear(Integer year) {
+               this.year = year;
+       }
+
+       public Integer getSortOrder() {
+               return sortOrder;
+       }
+
+       public String getCategory() {
+               return category;
+       }
+
+       public void setCategory(String category) {
+               this.category = category;
+       }
+       
+       
+}
+*/
index 2182d7b..39488a2 100644 (file)
@@ -1,51 +1,51 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/*package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.List;\r
-\r
-public class EventWidgetMeta {\r
-       \r
-       private String category;\r
-       private List<EventWidget> items;\r
-       \r
-       public EventWidgetMeta(){       \r
-               \r
-       }\r
-\r
-       public EventWidgetMeta(String category, List<EventWidget> items){\r
-               this.category = category;\r
-               this.items = items;\r
-       }\r
-       \r
-       public String getCategory() {\r
-               return category;\r
-       }\r
-       public void setCategory(String category) {\r
-               this.category = category;\r
-       }\r
-       public List<EventWidget> getItems() {\r
-               return items;\r
-       }\r
-       public void setItems(List<EventWidget> items) {\r
-               this.items = items;\r
-       }\r
-}\r
-*/\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/*package org.openecomp.portalapp.portal.transport;
+
+import java.util.List;
+
+public class EventWidgetMeta {
+       
+       private String category;
+       private List<EventWidget> items;
+       
+       public EventWidgetMeta(){       
+               
+       }
+
+       public EventWidgetMeta(String category, List<EventWidget> items){
+               this.category = category;
+               this.items = items;
+       }
+       
+       public String getCategory() {
+               return category;
+       }
+       public void setCategory(String category) {
+               this.category = category;
+       }
+       public List<EventWidget> getItems() {
+               return items;
+       }
+       public void setItems(List<EventWidget> items) {
+               this.items = items;
+       }
+}
+*/
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRequestFieldsValidator.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRequestFieldsValidator.java
new file mode 100644 (file)
index 0000000..d5122ea
--- /dev/null
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.portal.transport;
+
+public class ExternalRequestFieldsValidator {
+
+       private boolean result;
+       private String detailMessage;
+       
+       public ExternalRequestFieldsValidator(boolean result, String detailMessage) {
+               super();
+               this.result = result;
+               this.detailMessage = detailMessage;
+       }
+       public boolean isResult() {
+               return result;
+       }
+       public void setResult(boolean result) {
+               this.result = result;
+       }
+       public String getDetailMessage() {
+               return detailMessage;
+       }
+       public void setDetailMessage(String detailMessage) {
+               this.detailMessage = detailMessage;
+       }
+       
+       
+       
+}
index d90dfc1..606cd67 100644 (file)
@@ -1,45 +1,45 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-\r
-/**\r
- * This is to handle functional menu favorites\r
- */\r
-@Entity\r
-@Table(name="fn_menu_favorites")\r
-public class FavoritesFunctionalMenuItem implements Serializable {\r
-       private static final long serialVersionUID = 1L;\r
-       \r
-       @Id\r
-       @Column(name = "user_id")\r
-       public Long userId;\r
-       \r
-       @Id\r
-       @Column(name = "menu_id")\r
-       public Long menuId;     \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+
+/**
+ * This is to handle functional menu favorites
+ */
+@Entity
+@Table(name="fn_menu_favorites")
+public class FavoritesFunctionalMenuItem implements Serializable {
+       private static final long serialVersionUID = 1L;
+       
+       @Id
+       @Column(name = "user_id")
+       public Long userId;
+       
+       @Id
+       @Column(name = "menu_id")
+       public Long menuId;     
+}
index e469e0f..7826e6c 100644 (file)
@@ -1,57 +1,57 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-import javax.persistence.Transient;\r
-\r
-\r
-\r
-/**\r
- * This is to handle functional menu favorites\r
- */\r
-@Entity\r
-@Table(name="fn_menu_favorites")\r
-public class FavoritesFunctionalMenuItemJson implements Serializable {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-       \r
-       @Id\r
-       @Column(name = "user_id")\r
-       public Long userId;\r
-       \r
-       @Id\r
-       @Column(name = "menu_id")\r
-       public Long menuId;\r
-       \r
-       @Column(name = "text")\r
-       public String text;\r
-       \r
-       @Column(name = "url")\r
-       public String url;\r
-       \r
-       @Transient\r
-       public Boolean restrictedApp;\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+
+
+/**
+ * This is to handle functional menu favorites
+ */
+@Entity
+@Table(name="fn_menu_favorites")
+public class FavoritesFunctionalMenuItemJson implements Serializable {
+
+       private static final long serialVersionUID = 1L;
+       
+       @Id
+       @Column(name = "user_id")
+       public Long userId;
+       
+       @Id
+       @Column(name = "menu_id")
+       public Long menuId;
+       
+       @Column(name = "text")
+       public String text;
+       
+       @Column(name = "url")
+       public String url;
+       
+       @Transient
+       public Boolean restrictedApp;
+}
index ab51b7b..fee83b2 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-public class FieldsValidator {\r
-\r
-       public Long httpStatusCode = new Long(HttpServletResponse.SC_OK);\r
-\r
-       public Long errorCode;\r
-\r
-       public class FieldName {\r
-\r
-               public String name;\r
-\r
-               public FieldName(String name) {\r
-                       this.name = name;\r
-               }\r
-\r
-               public String getName() {\r
-                       return name;\r
-               }\r
-\r
-               public void setName(String name) {\r
-                       this.name = name;\r
-               }\r
-\r
-       }\r
-       \r
-\r
-       public List<FieldName> fields = new ArrayList<FieldName>();\r
-\r
-       public void addProblematicFieldName(String name) {\r
-               fields.add(new FieldName(name));\r
-       }\r
-\r
-       public Long getHttpStatusCode() {\r
-               return httpStatusCode;\r
-       }\r
-\r
-       public void setHttpStatusCode(Long httpStatusCode) {\r
-               this.httpStatusCode = httpStatusCode;\r
-       }\r
-\r
-       public Long getErrorCode() {\r
-               return errorCode;\r
-       }\r
-\r
-       public void setErrorCode(Long errorCode) {\r
-               this.errorCode = errorCode;\r
-       }\r
-\r
-       public List<FieldName> getFields() {\r
-               return fields;\r
-       }\r
-\r
-       public void setFields(List<FieldName> fields) {\r
-               this.fields = fields;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "FieldsValidator [httpStatusCode=" + httpStatusCode + ", errorCode=" + errorCode + ", fields=" + fields\r
-                               + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((errorCode == null) ? 0 : errorCode.hashCode());\r
-               result = prime * result + ((fields == null) ? 0 : fields.hashCode());\r
-               result = prime * result + ((httpStatusCode == null) ? 0 : httpStatusCode.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               FieldsValidator other = (FieldsValidator) obj;\r
-               if (errorCode == null) {\r
-                       if (other.errorCode != null)\r
-                               return false;\r
-               } else if (!errorCode.equals(other.errorCode))\r
-                       return false;\r
-               if (fields == null) {\r
-                       if (other.fields != null)\r
-                               return false;\r
-               } else if (!fields.equals(other.fields))\r
-                       return false;\r
-               if (httpStatusCode == null) {\r
-                       if (other.httpStatusCode != null)\r
-                               return false;\r
-               } else if (!httpStatusCode.equals(other.httpStatusCode))\r
-                       return false;\r
-               return true;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+public class FieldsValidator {
+
+       public Long httpStatusCode = new Long(HttpServletResponse.SC_OK);
+
+       public Long errorCode;
+
+       public class FieldName {
+
+               public String name;
+
+               public FieldName(String name) {
+                       this.name = name;
+               }
+
+               public String getName() {
+                       return name;
+               }
+
+               public void setName(String name) {
+                       this.name = name;
+               }
+
+       }
+       
+
+       public List<FieldName> fields = new ArrayList<FieldName>();
+
+       public void addProblematicFieldName(String name) {
+               fields.add(new FieldName(name));
+       }
+
+       public Long getHttpStatusCode() {
+               return httpStatusCode;
+       }
+
+       public void setHttpStatusCode(Long httpStatusCode) {
+               this.httpStatusCode = httpStatusCode;
+       }
+
+       public Long getErrorCode() {
+               return errorCode;
+       }
+
+       public void setErrorCode(Long errorCode) {
+               this.errorCode = errorCode;
+       }
+
+       public List<FieldName> getFields() {
+               return fields;
+       }
+
+       public void setFields(List<FieldName> fields) {
+               this.fields = fields;
+       }
+
+       @Override
+       public String toString() {
+               return "FieldsValidator [httpStatusCode=" + httpStatusCode + ", errorCode=" + errorCode + ", fields=" + fields
+                               + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((errorCode == null) ? 0 : errorCode.hashCode());
+               result = prime * result + ((fields == null) ? 0 : fields.hashCode());
+               result = prime * result + ((httpStatusCode == null) ? 0 : httpStatusCode.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               FieldsValidator other = (FieldsValidator) obj;
+               if (errorCode == null) {
+                       if (other.errorCode != null)
+                               return false;
+               } else if (!errorCode.equals(other.errorCode))
+                       return false;
+               if (fields == null) {
+                       if (other.fields != null)
+                               return false;
+               } else if (!fields.equals(other.fields))
+                       return false;
+               if (httpStatusCode == null) {
+                       if (other.httpStatusCode != null)
+                               return false;
+               } else if (!httpStatusCode.equals(other.httpStatusCode))
+                       return false;
+               return true;
+       }
+
+}
index 707b08b..93d53d0 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-import java.util.List;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-import javax.persistence.Transient;\r
-\r
-@Entity\r
-@Table(name="fn_menu_functional")\r
-public class FunctionalMenuItem implements Serializable {\r
-       public FunctionalMenuItem(){};\r
-       \r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-    @GeneratedValue(strategy=GenerationType.IDENTITY)\r
-       @Column(name = "MENU_ID")\r
-       public Long menuId;\r
-       \r
-       @Column(name = "COLUMN_NUM")\r
-       public Integer column;\r
-       \r
-       @Column(name = "TEXT")\r
-       public String text;\r
-       \r
-       @Column(name = "PARENT_MENU_ID")\r
-       public Integer parentMenuId;\r
-       \r
-       @Column(name = "URL")\r
-       public String url;\r
-       \r
-       @Column(name="ACTIVE_YN")\r
-       public String active_yn;\r
-\r
-       @Transient\r
-       public Integer appid;\r
-       \r
-       public List<Integer> getRoles() {\r
-               return roles;\r
-       }\r
-\r
-       public void setRoles(List<Integer> roles) {\r
-               this.roles = roles;\r
-       }\r
-\r
-       @Transient\r
-       private List<Integer> roles;\r
-       \r
-       @Transient\r
-       public Boolean restrictedApp;\r
-       \r
-       public void normalize() {\r
-               if (this.column == null)\r
-                       this.column = new Integer(1);\r
-               this.text = (this.text == null) ? "" : this.text.trim();\r
-               if (this.parentMenuId == null)\r
-                       this.parentMenuId = new Integer(-1);\r
-               this.url = (this.url == null) ? "" : this.url.trim();\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="\r
-                               + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles\r
-                               + ", restrictedApp=" + restrictedApp + "]";\r
-       }\r
-\r
-       public void setUrl(String url) {\r
-               this.url = url;\r
-       }\r
-\r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+@Entity
+@Table(name="fn_menu_functional")
+public class FunctionalMenuItem implements Serializable {
+       public FunctionalMenuItem(){};
+       
+       private static final long serialVersionUID = 1L;
+
+       @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+       @Column(name = "MENU_ID")
+       public Long menuId;
+       
+       @Column(name = "COLUMN_NUM")
+       public Integer column;
+       
+       @Column(name = "TEXT")
+       public String text;
+       
+       @Column(name = "PARENT_MENU_ID")
+       public Integer parentMenuId;
+       
+       @Column(name = "URL")
+       public String url;
+       
+       @Column(name="ACTIVE_YN")
+       public String active_yn;
+
+       @Transient
+       public Integer appid;
+       
+       public List<Integer> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(List<Integer> roles) {
+               this.roles = roles;
+       }
+
+       @Transient
+       private List<Integer> roles;
+       
+       @Transient
+       public Boolean restrictedApp;
+       
+       public void normalize() {
+               if (this.column == null)
+                       this.column = new Integer(1);
+               this.text = (this.text == null) ? "" : this.text.trim();
+               if (this.parentMenuId == null)
+                       this.parentMenuId = new Integer(-1);
+               this.url = (this.url == null) ? "" : this.url.trim();
+       }
+
+       @Override
+       public String toString() {
+               return "FunctionalMenuItem [menuId=" + menuId + ", column=" + column + ", text=" + text + ", parentMenuId="
+                               + parentMenuId + ", url=" + url + ", active_yn=" + active_yn + ", appid=" + appid + ", roles=" + roles
+                               + ", restrictedApp=" + restrictedApp + "]";
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+}
index 8e33a5f..e74f084 100644 (file)
@@ -1,60 +1,60 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-import java.util.List;\r
-\r
-// This type is used to read the Json in from the API call from the Front End\r
-public class FunctionalMenuItemWithRoles implements Serializable {\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       public Long menuId;\r
-       \r
-       public Integer column;\r
-       \r
-       public String text;\r
-       \r
-       public Integer parentMenuId;\r
-       \r
-       public String url;\r
-\r
-       public Integer appid;\r
-       \r
-       private List<Integer> roles;\r
-\r
-       public List<Integer> getRoles() {\r
-               return roles;\r
-       }\r
-\r
-       public void setRoles(List<Integer> roles) {\r
-               this.roles = roles;\r
-       }\r
-\r
-       public void normalize() {\r
-               if (this.column == null)\r
-                       this.column = new Integer(1);\r
-               this.text = (this.text == null) ? "" : this.text.trim();\r
-               if (this.parentMenuId == null)\r
-                       this.parentMenuId = new Integer(-1);\r
-               this.url = (this.url == null) ? "" : this.url.trim();\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+import java.util.List;
+
+// This type is used to read the Json in from the API call from the Front End
+public class FunctionalMenuItemWithRoles implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       public Long menuId;
+       
+       public Integer column;
+       
+       public String text;
+       
+       public Integer parentMenuId;
+       
+       public String url;
+
+       public Integer appid;
+       
+       private List<Integer> roles;
+
+       public List<Integer> getRoles() {
+               return roles;
+       }
+
+       public void setRoles(List<Integer> roles) {
+               this.roles = roles;
+       }
+
+       public void normalize() {
+               if (this.column == null)
+                       this.column = new Integer(1);
+               this.text = (this.text == null) ? "" : this.text.trim();
+               if (this.parentMenuId == null)
+                       this.parentMenuId = new Integer(-1);
+               this.url = (this.url == null) ? "" : this.url.trim();
+       }
+
+}
index 0033b62..2c2124f 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-@Entity\r
-@Table(name="fn_menu_functional_roles")\r
-public class FunctionalMenuRole implements Serializable {\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-    @GeneratedValue(strategy=GenerationType.IDENTITY)\r
-       @Column(name = "ID")\r
-       public Integer id;\r
-       \r
-       @Column(name = "MENU_ID")\r
-       public Long menuId;\r
-       \r
-       @Column(name = "APP_ID")\r
-       public Integer appId;\r
-       \r
-       @Column(name = "ROLE_ID")\r
-       public Integer roleId;\r
-\r
-       public Integer getId() {\r
-               return id;\r
-       }\r
-\r
-       public void setId(Integer id) {\r
-               this.id = id;\r
-       }\r
-\r
-       public Long getMenuId() {\r
-               return menuId;\r
-       }\r
-\r
-       public void setMenuId(Long menuId) {\r
-               this.menuId = menuId;\r
-       }\r
-\r
-       public Integer getAppId() {\r
-               return appId;\r
-       }\r
-\r
-       public void setAppId(Integer appId) {\r
-               this.appId = appId;\r
-       }\r
-\r
-       public Integer getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Integer roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "FunctionalMenuRole [id=" + id + ", menuId=" + menuId + ", appId=" + appId + ", roleId=" + roleId + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((appId == null) ? 0 : appId.hashCode());\r
-               result = prime * result + ((id == null) ? 0 : id.hashCode());\r
-               result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());\r
-               result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-    public boolean equals(Object o) {\r
-\r
-        if (o == this) return true;\r
-        if (!(o instanceof FunctionalMenuRole)) {\r
-            return false;\r
-        }\r
-        FunctionalMenuRole functionalMenuRole = (FunctionalMenuRole) o;\r
-        System.out.println("test");\r
-        return  id.equals(functionalMenuRole.getId()) &&\r
-                       menuId.equals(functionalMenuRole.menuId) &&\r
-                       appId.equals(functionalMenuRole.appId) &&\r
-                       roleId.equals(functionalMenuRole.roleId) ;\r
-    }\r
-       \r
-       \r
-       \r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="fn_menu_functional_roles")
+public class FunctionalMenuRole implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       @Id
+    @GeneratedValue(strategy=GenerationType.IDENTITY)
+       @Column(name = "ID")
+       public Integer id;
+       
+       @Column(name = "MENU_ID")
+       public Long menuId;
+       
+       @Column(name = "APP_ID")
+       public Integer appId;
+       
+       @Column(name = "ROLE_ID")
+       public Integer roleId;
+
+       public Integer getId() {
+               return id;
+       }
+
+       public void setId(Integer id) {
+               this.id = id;
+       }
+
+       public Long getMenuId() {
+               return menuId;
+       }
+
+       public void setMenuId(Long menuId) {
+               this.menuId = menuId;
+       }
+
+       public Integer getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Integer appId) {
+               this.appId = appId;
+       }
+
+       public Integer getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Integer roleId) {
+               this.roleId = roleId;
+       }
+
+       @Override
+       public String toString() {
+               return "FunctionalMenuRole [id=" + id + ", menuId=" + menuId + ", appId=" + appId + ", roleId=" + roleId + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+               result = prime * result + ((id == null) ? 0 : id.hashCode());
+               result = prime * result + ((menuId == null) ? 0 : menuId.hashCode());
+               result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());
+               return result;
+       }
+
+       @Override
+    public boolean equals(Object o) {
+
+        if (o == this) return true;
+        if (!(o instanceof FunctionalMenuRole)) {
+            return false;
+        }
+        FunctionalMenuRole functionalMenuRole = (FunctionalMenuRole) o;
+        System.out.println("test");
+        return  id.equals(functionalMenuRole.getId()) &&
+                       menuId.equals(functionalMenuRole.menuId) &&
+                       appId.equals(functionalMenuRole.appId) &&
+                       roleId.equals(functionalMenuRole.roleId) ;
+    }
+       
+       
+       
+       
+}
index 06fd6ae..4ec2228 100644 (file)
@@ -1,42 +1,59 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-@Entity\r
-public class LocalRole implements Serializable {\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name = "ROLE_ID")\r
-       public Integer roleId;\r
-       \r
-       @Column(name = "ROLE_NAME")\r
-       public String rolename;\r
-       \r
-       public void normalize() {\r
-               this.rolename = (this.rolename == null) ? "" : this.rolename.trim();\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class LocalRole implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name = "ROLE_ID")
+       public Integer roleId;
+
+       @Column(name = "ROLE_NAME")
+       public String rolename;
+
+       public void normalize() {
+               this.rolename = (this.rolename == null) ? "" : this.rolename.trim();
+       }
+
+       public Integer getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Integer roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRolename() {
+               return rolename;
+       }
+
+       public void setRolename(String rolename) {
+               this.rolename = rolename;
+       }
+
+}
index 977269d..a4198d1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-/**\r
- * Model of rows in the fn_app table; serialized as a message add or update an\r
- * on-boarded application.\r
- */\r
-public class OnboardingApp {\r
-\r
-       public Long id;\r
-\r
-       public String name;\r
-\r
-       public String imageUrl;\r
-\r
-       public String description;\r
-\r
-       public String notes;\r
-\r
-       public String url;\r
-\r
-       public String alternateUrl;\r
-\r
-       public String restUrl;\r
-\r
-       public Boolean isOpen;\r
-\r
-       public Boolean isEnabled;\r
-\r
-       public Long motsId;\r
-\r
-       public String myLoginsAppName;\r
-\r
-       public String myLoginsAppOwner;\r
-\r
-       public String username;\r
-\r
-       public String appPassword;\r
-\r
-       public String thumbnail;\r
-\r
-       public String uebTopicName;\r
-\r
-       public String uebKey;\r
-\r
-       public String uebSecret;\r
-\r
-       public Boolean restrictedApp;\r
-\r
-       /**\r
-        * Sets the name, myLoginsAppName, myLoginsAppOwner, username and\r
-        * appPassword fields to the empty string OR trims leading/trailing space,\r
-        * as appropriate.\r
-        */\r
-       public void normalize() {\r
-               this.name = (this.name == null) ? "" : this.name.trim();\r
-               this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim();\r
-               this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim();\r
-               this.username = (this.username == null) ? "" : this.username.trim();\r
-               this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim();\r
-       }\r
-\r
-       public void setUebTopicName(String topicName) {\r
-               this.uebTopicName = topicName;\r
-       }\r
-\r
-       public void setUebKey(String key) {\r
-               this.uebKey = key;\r
-       }\r
-\r
-       public void setUebSecret(String secret) {\r
-               this.uebSecret = secret;\r
-       }\r
-\r
-       // Hide the implementation of restricted and normal app from the front end.\r
-       // The json sent and received will include restrictedApp but not appType.\r
-\r
-       public void setRestrictedApp(Boolean restrictedApp) {\r
-               this.restrictedApp = restrictedApp;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+/**
+ * Model of rows in the fn_app table; serialized as a message add or update an
+ * on-boarded application.
+ */
+public class OnboardingApp {
+
+       public Long id;
+
+       public String name;
+
+       public String imageUrl;
+
+       public String imageLink;
+
+       public String description;
+
+       public String notes;
+
+       public String url;
+
+       public String alternateUrl;
+
+       public String restUrl;
+
+       public Boolean isOpen;
+
+       public Boolean isEnabled;
+
+       public Long motsId;
+
+       public String myLoginsAppName;
+
+       public String myLoginsAppOwner;
+
+       public String username;
+
+       public String appPassword;
+
+       public String thumbnail;
+
+       public String uebTopicName;
+
+       public String uebKey;
+
+       public String uebSecret;
+
+       public Boolean restrictedApp;
+
+       /**
+        * Sets the name, myLoginsAppName, myLoginsAppOwner, username and
+        * appPassword fields to the empty string OR trims leading/trailing space,
+        * as appropriate.
+        */
+       public void normalize() {
+               this.name = (this.name == null) ? "" : this.name.trim();
+               this.myLoginsAppName = (this.myLoginsAppName == null) ? "" : this.myLoginsAppName.trim();
+               this.myLoginsAppOwner = (this.myLoginsAppOwner == null) ? "" : this.myLoginsAppOwner.trim();
+               this.username = (this.username == null) ? "" : this.username.trim();
+               this.appPassword = (this.appPassword == null) ? "" : this.appPassword.trim();
+       }
+
+       public void setUebTopicName(String topicName) {
+               this.uebTopicName = topicName;
+       }
+
+       public void setUebKey(String key) {
+               this.uebKey = key;
+       }
+
+       public void setUebSecret(String secret) {
+               this.uebSecret = secret;
+       }
+
+       // Hide the implementation of restricted and normal app from the front end.
+       // The json sent and received will include restrictedApp but not appType.
+
+       public void setRestrictedApp(Boolean restrictedApp) {
+               this.restrictedApp = restrictedApp;
+       }
+}
index 09471d7..9c81299 100644 (file)
@@ -1,65 +1,65 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-\r
-@Entity\r
-public class OnboardingWidget implements Serializable {\r
-\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name = "WIDGET_ID")\r
-       public Long id;\r
-\r
-       @Column(name = "WDG_NAME")\r
-       public String name;\r
-\r
-       @Column(name = "APP_ID")\r
-       public Long appId;\r
-\r
-       @Column(name = "APP_NAME")\r
-       public String appName;\r
-\r
-       @Column(name = "WDG_WIDTH")\r
-       public Integer width;\r
-\r
-       @Column(name = "WDG_HEIGHT")\r
-       public Integer height;\r
-\r
-       @Column(name = "WDG_URL")\r
-       public String url;\r
-\r
-       public void normalize() {\r
-               this.name = (this.name == null) ? "" : this.name.trim();\r
-               this.appName = (this.appName == null) ? "" : this.appName.trim();\r
-               if (this.width == null)\r
-                       this.width = new Integer(0);\r
-               if (this.height == null)\r
-                       this.height = new Integer(0);\r
-               this.url = (this.url == null) ? "" : this.url.trim();\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class OnboardingWidget implements Serializable {
+
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name = "WIDGET_ID")
+       public Long id;
+
+       @Column(name = "WDG_NAME")
+       public String name;
+
+       @Column(name = "APP_ID")
+       public Long appId;
+
+       @Column(name = "APP_NAME")
+       public String appName;
+
+       @Column(name = "WDG_WIDTH")
+       public Integer width;
+
+       @Column(name = "WDG_HEIGHT")
+       public Integer height;
+
+       @Column(name = "WDG_URL")
+       public String url;
+
+       public void normalize() {
+               this.name = (this.name == null) ? "" : this.name.trim();
+               this.appName = (this.appName == null) ? "" : this.appName.trim();
+               if (this.width == null)
+                       this.width = new Integer(0);
+               if (this.height == null)
+                       this.height = new Integer(0);
+               this.url = (this.url == null) ? "" : this.url.trim();
+       }
+
+}
index 0481eb6..294b859 100644 (file)
@@ -1,53 +1,85 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.GeneratedValue;\r
-import javax.persistence.GenerationType;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-/**\r
- * This is to handle portal admins\r
- */\r
-@Entity\r
-@Table(name="fn_user")\r
-public class PortalAdmin implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-    @GeneratedValue(strategy=GenerationType.IDENTITY)\r
-       @Column(name = "user_id")\r
-       public Long userId;\r
-       \r
-       @Column(name = "login_id")\r
-       public String loginId;          \r
-       \r
-       @Column(name = "first_name")\r
-       public String firstName;\r
-       \r
-       @Column(name = "last_name")\r
-       public String lastName;\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * This is to handle portal admins
+ */
+@Entity
+@Table(name = "fn_user")
+public class PortalAdmin implements Serializable {
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @GeneratedValue(strategy = GenerationType.IDENTITY)
+       @Column(name = "user_id")
+       public Long userId;
+
+       @Column(name = "login_id")
+       public String loginId;
+
+       @Column(name = "first_name")
+       public String firstName;
+
+       @Column(name = "last_name")
+       public String lastName;
+
+       public Long getUserId() {
+               return userId;
+       }
+
+       public void setUserId(Long userId) {
+               this.userId = userId;
+       }
+
+       public String getLoginId() {
+               return loginId;
+       }
+
+       public void setLoginId(String loginId) {
+               this.loginId = loginId;
+       }
+
+       public String getFirstName() {
+               return firstName;
+       }
+
+       public void setFirstName(String firstName) {
+               this.firstName = firstName;
+       }
+
+       public String getLastName() {
+               return lastName;
+       }
+
+       public void setLastName(String lastName) {
+               this.lastName = lastName;
+       }
+
+}
index 06229fc..17306ad 100644 (file)
@@ -1,48 +1,48 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.io.Serializable;\r
-\r
-import javax.persistence.Column;\r
-import javax.persistence.Entity;\r
-import javax.persistence.Id;\r
-import javax.persistence.Table;\r
-\r
-/**\r
- * This is to handle portal admins\r
- */\r
-@Entity\r
-@Table(name="fn_user_role")\r
-public class PortalAdminUserRole implements Serializable{\r
-       private static final long serialVersionUID = 1L;\r
-\r
-       @Id\r
-       @Column(name = "user_id")\r
-       public Long userId;\r
-       \r
-       @Id\r
-       @Column(name = "role_id")\r
-       public Long roleId;\r
-       \r
-       @Column(name = "app_id")\r
-       public Long appId;\r
-               \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * This is to handle portal admins
+ */
+@Entity
+@Table(name="fn_user_role")
+public class PortalAdminUserRole implements Serializable{
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name = "user_id")
+       public Long userId;
+       
+       @Id
+       @Column(name = "role_id")
+       public Long roleId;
+       
+       @Column(name = "app_id")
+       public Long appId;
+               
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ProfileDetail.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ProfileDetail.java
new file mode 100644 (file)
index 0000000..11c0bad
--- /dev/null
@@ -0,0 +1,60 @@
+package org.openecomp.portalapp.portal.transport;
+
+public class ProfileDetail {
+       
+       private String firstName;
+       private String lastName;
+       private String middleName;
+       private String email;
+       private String loginId;
+       private String loginPassword;
+       
+       public ProfileDetail(){}
+       public ProfileDetail(String firstName, String lastName, String middleName, String email, String loginId, String loginPassword) {
+               this.firstName = firstName;
+               this.lastName = lastName;
+               this.middleName = middleName;
+               this.email = email;
+               this.loginId = loginId;
+               this.loginPassword = loginPassword;
+       }
+
+       public String getFirstName() {
+               return firstName;
+       }
+       public void setFirstName(String firstName) {
+               this.firstName = firstName;
+       }
+       public String getLastName() {
+               return lastName;
+       }
+       public void setLastName(String lastName) {
+               this.lastName = lastName;
+       }
+       public String getMiddleName() {
+               return middleName;
+       }
+       public void setMiddleName(String middleName) {
+               this.middleName = middleName;
+       }
+       public String getEmail() {
+               return email;
+       }
+       public void setEmail(String email) {
+               this.email = email;
+       }
+       public String getLoginId() {
+               return loginId;
+       }
+       public void setLoginId(String loginId) {
+               this.loginId = loginId;
+       }
+       public String getLoginPassword() {
+               return loginPassword;
+       }
+       public void setLoginPassword(String loginPassword) {
+               this.loginPassword = loginPassword;
+       }
+       
+       
+}
index 0f15277..8a2d623 100644 (file)
@@ -1,44 +1,44 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class RemoteRole {\r
-\r
-       private Long id;\r
-       private String name;\r
-       \r
-       public Long getId() {\r
-               return id;\r
-       }\r
-       public void setId(Long id) {\r
-               this.id = id;\r
-       }\r
-       public String getName() {\r
-               return name;\r
-       }\r
-       public void setName(String name) {\r
-               this.name = name;\r
-       }\r
-       \r
-       @Override\r
-       public String toString() {\r
-               return "RemoteRole [id=" + id + ", name=" + name + "]";\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class RemoteRole {
+
+       private Long id;
+       private String name;
+       
+       public Long getId() {
+               return id;
+       }
+       public void setId(Long id) {
+               this.id = id;
+       }
+       public String getName() {
+               return name;
+       }
+       public void setName(String name) {
+               this.name = name;
+       }
+       
+       @Override
+       public String toString() {
+               return "RemoteRole [id=" + id + ", name=" + name + "]";
+       }
+}
index dad1c98..27a3461 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-public class RoleInAppForUser {\r
-\r
-\r
-       public RoleInAppForUser() {\r
-       }\r
-       \r
-       public RoleInAppForUser(Long id, String name) {\r
-               this.roleId = id;\r
-               this.roleName = name;\r
-       }\r
-\r
-       public Long roleId;\r
-\r
-       public String roleName;\r
-\r
-       public Boolean isApplied;\r
-\r
-       public Long getRoleId() {\r
-               return roleId;\r
-       }\r
-\r
-       public void setRoleId(Long roleId) {\r
-               this.roleId = roleId;\r
-       }\r
-\r
-       public String getRoleName() {\r
-               return roleName;\r
-       }\r
-\r
-       public void setRoleName(String roleName) {\r
-               this.roleName = roleName;\r
-       }\r
-\r
-       public Boolean getIsApplied() {\r
-               return isApplied;\r
-       }\r
-\r
-       public void setIsApplied(Boolean isApplied) {\r
-               this.isApplied = isApplied;\r
-       }\r
-\r
-       @Override\r
-       public String toString() {\r
-               return "RoleInAppForUser [roleId=" + roleId + ", roleName=" + roleName + ", isApplied=" + isApplied + "]";\r
-       }\r
-\r
-       @Override\r
-       public int hashCode() {\r
-               final int prime = 31;\r
-               int result = 1;\r
-               result = prime * result + ((isApplied == null) ? 0 : isApplied.hashCode());\r
-               result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());\r
-               result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());\r
-               return result;\r
-       }\r
-\r
-       @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               RoleInAppForUser other = (RoleInAppForUser) obj;\r
-               if (isApplied == null) {\r
-                       if (other.isApplied != null)\r
-                               return false;\r
-               } else if (!isApplied.equals(other.isApplied))\r
-                       return false;\r
-               if (roleId == null) {\r
-                       if (other.roleId != null)\r
-                               return false;\r
-               } else if (!roleId.equals(other.roleId))\r
-                       return false;\r
-               if (roleName == null) {\r
-                       if (other.roleName != null)\r
-                               return false;\r
-               } else if (!roleName.equals(other.roleName))\r
-                       return false;\r
-               return true;\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+public class RoleInAppForUser {
+
+
+       public RoleInAppForUser() {
+       }
+       
+       public RoleInAppForUser(Long id, String name) {
+               this.roleId = id;
+               this.roleName = name;
+       }
+
+       public Long roleId;
+
+       public String roleName;
+
+       public Boolean isApplied;
+
+       public Long getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Long roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+
+       public Boolean getIsApplied() {
+               return isApplied;
+       }
+
+       public void setIsApplied(Boolean isApplied) {
+               this.isApplied = isApplied;
+       }
+
+       @Override
+       public String toString() {
+               return "RoleInAppForUser [roleId=" + roleId + ", roleName=" + roleName + ", isApplied=" + isApplied + "]";
+       }
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((isApplied == null) ? 0 : isApplied.hashCode());
+               result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());
+               result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               RoleInAppForUser other = (RoleInAppForUser) obj;
+               if (isApplied == null) {
+                       if (other.isApplied != null)
+                               return false;
+               } else if (!isApplied.equals(other.isApplied))
+                       return false;
+               if (roleId == null) {
+                       if (other.roleId != null)
+                               return false;
+               } else if (!roleId.equals(other.roleId))
+                       return false;
+               if (roleName == null) {
+                       if (other.roleName != null)
+                               return false;
+               } else if (!roleName.equals(other.roleName))
+                       return false;
+               return true;
+       }
+       
+}
index 8720304..2b3b451 100644 (file)
@@ -1,33 +1,33 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-public class RolesInAppForUser {\r
-\r
-       public String orgUserId;\r
-       \r
-       public Long appId;\r
-\r
-       public List<RoleInAppForUser> roles = new ArrayList<RoleInAppForUser>();\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RolesInAppForUser {
+
+       public String orgUserId;
+       
+       public Long appId;
+
+       public List<RoleInAppForUser> roles = new ArrayList<RoleInAppForUser>();
+
+}
index 5117e8f..0674e44 100644 (file)
@@ -1,57 +1,57 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.transport;\r
-\r
-/**\r
- * Model for the object PUT to the controller when the user takes an action on\r
- * a widget in the catalog.\r
- */\r
-\r
-public class WidgetCatalogPersonalization {\r
-       \r
-               public Long widgetId;\r
-               public Boolean select;\r
-               // not needed as only 'SHOW' and 'HIDE' status_cd is expected from the micro service now\r
-               //public Boolean pending;\r
-\r
-               public Long getWidgetId() {\r
-                       return widgetId;\r
-               }\r
-\r
-               public void setWidgetId(Long widgetId) {\r
-                       this.widgetId = widgetId;\r
-               }\r
-\r
-               public Boolean getSelect() {\r
-                       return select;\r
-               }\r
-\r
-               public void setSelect(Boolean select) {\r
-                       this.select = select;\r
-               }\r
-\r
-               /*public Boolean getPending() {\r
-                       return pending;\r
-               }\r
-\r
-               public void setPending(Boolean pending) {\r
-                       this.pending = pending;\r
-               }*/\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.transport;
+
+/**
+ * Model for the object PUT to the controller when the user takes an action on
+ * a widget in the catalog.
+ */
+
+public class WidgetCatalogPersonalization {
+       
+               public Long widgetId;
+               public Boolean select;
+               // not needed as only 'SHOW' and 'HIDE' status_cd is expected from the micro service now
+               //public Boolean pending;
+
+               public Long getWidgetId() {
+                       return widgetId;
+               }
+
+               public void setWidgetId(Long widgetId) {
+                       this.widgetId = widgetId;
+               }
+
+               public Boolean getSelect() {
+                       return select;
+               }
+
+               public void setSelect(Boolean select) {
+                       this.select = select;
+               }
+
+               /*public Boolean getPending() {
+                       return pending;
+               }
+
+               public void setPending(Boolean pending) {
+                       this.pending = pending;
+               }*/
+}
index 3c447e2..34be46e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ueb;\r
-\r
-import java.net.HttpURLConnection;\r
-import java.net.URL;\r
-import java.util.LinkedList;\r
-import java.util.List;\r
-\r
-import javax.annotation.PostConstruct;\r
-\r
-import org.hibernate.Session;\r
-import org.hibernate.SessionFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Component;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;\r
-import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.Helper;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.Publisher;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.UebException;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.UebManager;\r
-import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg;\r
-import org.openecomp.portalapp.portal.domain.EPApp;\r
-import org.openecomp.portalapp.portal.domain.EcompApp;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalapp.portal.service.EPAppService;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-\r
-@Component\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-public class EPUebHelper {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUebHelper.class);\r
-       \r
-       @Autowired\r
-       EPAppService appsService;\r
-       \r
-       \r
-       @Autowired\r
-       private SessionFactory sessionFactory;\r
-       \r
-       @SuppressWarnings("unused")\r
-       private Publisher epPublisher;\r
-       \r
-       public EPUebHelper() {\r
-               \r
-       }\r
-       //\r
-       // This should only be called by the ECOMP Portal App, other Apps have just one publisher and use appPublisher\r
-       //\r
-       @SuppressWarnings("unused")\r
-       @EPMetricsLog\r
-       public void refreshPublisherList()\r
-       {\r
-               Session localSession = null;\r
-           boolean addedPublisher = false;\r
-           \r
-               try {\r
-                       localSession = sessionFactory.openSession();\r
-               \r
-                       List<EcompApp> apps = appsService.getEcompAppAppsFullList();\r
-                       for (int i = 0; i < apps.size(); i++) \r
-                       {\r
-                               if ((apps.get(i).isEnabled()) &&\r
-                                       (apps.get(i).getUebTopicName() != null) &&\r
-                                       !(apps.get(i).getUebTopicName().toUpperCase().contains("ECOMP-PORTAL-INBOX")))\r
-                               {\r
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "UEBManager adding publisher for " + apps.get(i).getUebTopicName());\r
-                                       UebManager.getInstance().addPublisher(apps.get(i).getUebTopicName());\r
-                       addedPublisher = true;\r
-                           }\r
-                               else if ((apps.get(i).getId() != 1) && // App may have been disabled, remove the publisher\r
-                                                !(apps.get(i).isEnabled()))\r
-                               {\r
-                                       if(apps.get(i).getUebTopicName()!=null){\r
-                                               UebManager.getInstance().removePublisher(apps.get(i).getUebTopicName());\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               catch (Exception e)\r
-               {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebSystemError, e, "add/remove Publisher");\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while refreshing the publisher list", e);\r
-               }\r
-               \r
-               //publisherList.print();\r
-               \r
-               if (addedPublisher == true) // Give publishers time to initialize\r
-               {\r
-                       Helper.sleep(400);\r
-               }\r
-       }\r
-       \r
-       @PostConstruct\r
-       @EPMetricsLog\r
-       public void initUeb() {\r
-               try {\r
-                       epPublisher = new Publisher(PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY), \r
-                                                           PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), \r
-                                                           PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, e);\r
-                       String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while initializing the publisher. Details: " + stackTrace);\r
-               }\r
-               \r
-               Thread thread = new Thread("EPUebManager: postConstructMethod - refreshPublisherList") {\r
-                   public void run(){\r
-                       refreshPublisherList();\r
-                   }\r
-               };\r
-               if (thread != null) {\r
-                   thread.start();\r
-               }\r
-       }\r
-\r
-       @EPMetricsLog\r
-       public void addPublisher(EPApp app) {\r
-               // TODO Auto-generated method stub\r
-               try {\r
-                       UebManager.getInstance().addPublisher(app.getUebTopicName());\r
-               } catch (UebException e) {\r
-                       String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception while adding a publisher. Details: " + stackTrace);\r
-               }\r
-       }\r
-       \r
-       public boolean checkAvailability() {\r
-               \r
-               //\r
-               //  Test existence of topic at UEB url\r
-               //\r
-               //  (ie http://uebsb91kcdc.it.att.com:3904/topics/ECOMP-PORTAL-INBOX)\r
-               //\r
-               boolean available = true;\r
-               LinkedList<String> urlList = Helper.uebUrlList();\r
-               if (!urlList.isEmpty()) {\r
-                   String url = "http://" + urlList.getFirst() + ":3904/topics/" + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME);\r
-                   if (!url.isEmpty()) {\r
-                       try {\r
-                           URL siteURL = new URL(url);\r
-                           HttpURLConnection connection = (HttpURLConnection) siteURL.openConnection();\r
-                           connection.setRequestMethod("GET");\r
-                           connection.connect();\r
-                    \r
-                           int code = connection.getResponseCode();\r
-                           if (code == 200) {\r
-                               available = true;\r
-                           }\r
-                           else {\r
-                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, url);\r
-                               available = false;\r
-                               logger.warn(EELFLoggerDelegate.errorLogger, "Warning! UEB topic existence check failed, topic = " + url );\r
-                               logger.debug(EELFLoggerDelegate.debugLogger, "Warning! UEB topic existence check failed, topic = " + url );\r
-                           }\r
-                       }\r
-                       catch (Exception e) {\r
-                           available = false;\r
-                           String stackTrace = EcompPortalUtils.getStackTrace(e);\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the UEB Healthcheck. Details: " + stackTrace);\r
-                       }\r
-                   }\r
-               }\r
-               return available;\r
-       }\r
-       \r
-    public boolean MessageCanBeSentToTopic() {\r
-    \r
-       boolean sentMsgSuccessfully = false;\r
-       \r
-           UebMsg msg = new UebMsg();\r
-           msg.putSourceTopicName(PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));\r
-           msg.putPayload("Pinging topic for health check");\r
-           msg.putMsgType(EPUebMsgTypes.UEB_MSG_TYPE_HEALTH_CHECK);\r
-       \r
-           try {\r
-                  // epPublisher.send(msg);\r
-                   sentMsgSuccessfully = true;\r
-           } \r
-           catch (Exception e) {\r
-               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckUebClusterError, e);\r
-                   sentMsgSuccessfully = false;\r
-                   logger.warn(EELFLoggerDelegate.errorLogger, "Warning! could not successfully publish a UEB msg to " \r
-                                    + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME), e); \r
-           } \r
-           \r
-           return sentMsgSuccessfully;\r
-    }\r
-    \r
-}\r
-\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ueb;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+import javax.annotation.PostConstruct;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.onboarding.ueb.Helper;
+import org.openecomp.portalsdk.core.onboarding.ueb.Publisher;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebException;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebManager;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+
+@Component
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class EPUebHelper {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUebHelper.class);
+       
+       @Autowired
+       EPAppService appsService;
+       
+       
+       @Autowired
+       private SessionFactory sessionFactory;
+       
+       @SuppressWarnings("unused")
+       private Publisher epPublisher;
+       
+       public EPUebHelper() {
+               
+       }
+       //
+       // This should only be called by the ECOMP Portal App, other Apps have just one publisher and use appPublisher
+       //
+       @SuppressWarnings("unused")
+       @EPMetricsLog
+       public void refreshPublisherList()
+       {
+               Session localSession = null;
+           boolean addedPublisher = false;
+           
+               try {
+                       localSession = sessionFactory.openSession();
+               
+                       List<EcompApp> apps = appsService.getEcompAppAppsFullList();
+                       for (int i = 0; i < apps.size(); i++) 
+                       {
+                               if ((apps.get(i).isEnabled()) &&
+                                       (apps.get(i).getUebTopicName() != null) &&
+                                       !(apps.get(i).getUebTopicName().toUpperCase().contains("ECOMP-PORTAL-INBOX")))
+                               {
+                                       logger.debug(EELFLoggerDelegate.debugLogger, "UEBManager adding publisher for " + apps.get(i).getUebTopicName());
+                                       UebManager.getInstance().addPublisher(apps.get(i).getUebTopicName());
+                       addedPublisher = true;
+                           }
+                               else if ((apps.get(i).getId() != 1) && // App may have been disabled, remove the publisher
+                                                !(apps.get(i).isEnabled()))
+                               {
+                                       if(apps.get(i).getUebTopicName()!=null){
+                                               UebManager.getInstance().removePublisher(apps.get(i).getUebTopicName());
+                                       }
+                               }
+                       }
+               }
+               catch (Exception e)
+               {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebSystemError, e, "add/remove Publisher");
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while refreshing the publisher list", e);
+               }
+               
+               //publisherList.print();
+               
+               if (addedPublisher == true) // Give publishers time to initialize
+               {
+                       Helper.sleep(400);
+               }
+       }
+       
+       @PostConstruct
+       @EPMetricsLog
+       public void initUeb() {
+               try {
+                       epPublisher = new Publisher(PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY), 
+                                                           PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_SECRET), 
+                                                           PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, e);
+                       String stackTrace = EcompPortalUtils.getStackTrace(e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while initializing the publisher. Details: " + stackTrace);
+               }
+               
+               Thread thread = new Thread("EPUebManager: postConstructMethod - refreshPublisherList") {
+                   public void run(){
+                       refreshPublisherList();
+                   }
+               };
+               if (thread != null) {
+                   thread.start();
+               }
+       }
+
+       @EPMetricsLog
+       public void addPublisher(EPApp app) {
+               // TODO Auto-generated method stub
+               try {
+                       UebManager.getInstance().addPublisher(app.getUebTopicName());
+               } catch (UebException e) {
+                       String stackTrace = EcompPortalUtils.getStackTrace(e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception while adding a publisher. Details: " + stackTrace);
+               }
+       }
+       
+       public boolean checkAvailability() {
+               
+               //
+               //  Test existence of topic at UEB url
+               //
+               //  (ie http://uebsb91kcdc.it.att.com:3904/topics/ECOMP-PORTAL-INBOX)
+               //
+               boolean available = true;
+               LinkedList<String> urlList = Helper.uebUrlList();
+               if (!urlList.isEmpty()) {
+                   String url = "http://" + urlList.getFirst() + ":3904/topics/" + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME);
+                   if (!url.isEmpty()) {
+                       try {
+                           URL siteURL = new URL(url);
+                           HttpURLConnection connection = (HttpURLConnection) siteURL.openConnection();
+                           connection.setRequestMethod("GET");
+                           connection.connect();
+                    
+                           int code = connection.getResponseCode();
+                           if (code == 200) {
+                               available = true;
+                           }
+                           else {
+                               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeUebConnectionError, url);
+                               available = false;
+                               logger.warn(EELFLoggerDelegate.errorLogger, "Warning! UEB topic existence check failed, topic = " + url );
+                               logger.debug(EELFLoggerDelegate.debugLogger, "Warning! UEB topic existence check failed, topic = " + url );
+                           }
+                       }
+                       catch (Exception e) {
+                           available = false;
+                           String stackTrace = EcompPortalUtils.getStackTrace(e);
+                                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing the UEB Healthcheck. Details: " + stackTrace);
+                       }
+                   }
+               }
+               return available;
+       }
+       
+    public boolean MessageCanBeSentToTopic() {
+    
+       boolean sentMsgSuccessfully = false;
+       
+           UebMsg msg = new UebMsg();
+           msg.putSourceTopicName(PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME));
+           msg.putPayload("Pinging topic for health check");
+           msg.putMsgType(EPUebMsgTypes.UEB_MSG_TYPE_HEALTH_CHECK);
+       
+           try {
+                  // epPublisher.send(msg);
+                   sentMsgSuccessfully = true;
+           } 
+           catch (Exception e) {
+               EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHealthCheckUebClusterError, e);
+                   sentMsgSuccessfully = false;
+                   logger.warn(EELFLoggerDelegate.errorLogger, "Warning! could not successfully publish a UEB msg to " 
+                                    + PortalApiProperties.getProperty(PortalApiConstants.ECOMP_PORTAL_INBOX_NAME), e); 
+           } 
+           
+           return sentMsgSuccessfully;
+    }
+    
+}
+
+
index aef0254..d6eb9eb 100644 (file)
@@ -1,27 +1,27 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.ueb;\r
-\r
-import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes;\r
-\r
-public interface EPUebMsgTypes extends UebMsgTypes {\r
-\r
-       public static final String UEB_MSG_TYPE_HEALTH_CHECK = "uebHealthCheckPing";\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.ueb;
+
+import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes;
+
+public interface EPUebMsgTypes extends UebMsgTypes {
+
+       public static final String UEB_MSG_TYPE_HEALTH_CHECK = "uebHealthCheckPing";
+}
index a43f517..ac019d5 100644 (file)
@@ -1,54 +1,54 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import ch.qos.logback.classic.Level;\r
-import ch.qos.logback.classic.spi.ILoggingEvent;\r
-import ch.qos.logback.core.filter.Filter;\r
-import ch.qos.logback.core.spi.FilterReply;\r
-\r
-/**\r
- * Custom Filter class bind with logback.xml\r
- * configuration file to strip out certain log messages\r
- * coming out of special packages or classes.\r
- *\r
- */\r
-public class CustomLoggingFilter extends Filter<ILoggingEvent> {\r
-\r
-       /**\r
-        * Custom Filter is added to strip out the continuous U-EB logging messages\r
-        * But make sure we log the ERROR & WARNING Level messages.\r
-        */\r
-       @Override\r
-       public FilterReply decide(ILoggingEvent event) {\r
-               try {\r
-                       if ((event.getLevel() != Level.ERROR || event.getLevel() != Level.WARN) && \r
-                               (event.getThreadName().equalsIgnoreCase("UEBConsumerThread")) &&\r
-                               (event.getLoggerName().contains("org.openecomp.nsa") || event.getLoggerName().contains("org.apache.http"))\r
-                               ) {\r
-                               return FilterReply.DENY;\r
-                       } else {\r
-                               return FilterReply.NEUTRAL;\r
-                       }\r
-               } catch(Exception e) {\r
-                       return FilterReply.NEUTRAL;\r
-               } \r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.filter.Filter;
+import ch.qos.logback.core.spi.FilterReply;
+
+/**
+ * Custom Filter class bind with logback.xml
+ * configuration file to strip out certain log messages
+ * coming out of special packages or classes.
+ *
+ */
+public class CustomLoggingFilter extends Filter<ILoggingEvent> {
+
+       /**
+        * Custom Filter is added to strip out the continuous U-EB logging messages
+        * But make sure we log the ERROR & WARNING Level messages.
+        */
+       @Override
+       public FilterReply decide(ILoggingEvent event) {
+               try {
+                       if ((event.getLevel() != Level.ERROR || event.getLevel() != Level.WARN) && 
+                               (event.getThreadName().equalsIgnoreCase("UEBConsumerThread")) &&
+                               (event.getLoggerName().contains("org.openecomp.nsa") || event.getLoggerName().contains("org.apache.http"))
+                               ) {
+                               return FilterReply.DENY;
+                       } else {
+                               return FilterReply.NEUTRAL;
+                       }
+               } catch(Exception e) {
+                       return FilterReply.NEUTRAL;
+               } 
+       }
+}
index 38b6608..8ef4593 100644 (file)
@@ -61,4 +61,5 @@ public class EPCommonSystemProperties extends SystemProperties {
        
        public static final String AUTH_USER_SERVER                                     = "auth_user_server";
        public static final String EXTERNAL_ACCESS_ENABLE                               = "external_access_enable";
+
 }
\ No newline at end of file
index adf36b2..48c2dbe 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import java.io.PrintWriter;\r
-import java.io.StringWriter;\r
-import java.net.InetAddress;\r
-import java.net.UnknownHostException;\r
-import java.text.SimpleDateFormat;\r
-import java.util.ArrayList;\r
-import java.util.Date;\r
-import java.util.List;\r
-\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.hibernate.Session;\r
-import org.hibernate.Transaction;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;\r
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.slf4j.MDC;\r
-\r
-import com.fasterxml.jackson.core.JsonProcessingException;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-public class EcompPortalUtils {\r
-\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class);\r
-\r
-       /**\r
-        * @param orgUserId\r
-        * @return true if orgUserId is not empty and contains only alphanumeric,\r
-        *         false otherwise\r
-        */\r
-       public static boolean legitimateUserId(String orgUserId) {\r
-               return orgUserId.matches("^[a-zA-Z0-9]+$");\r
-       }\r
-\r
-       /**\r
-        * Splits the string into a list of tokens using the specified regular\r
-        * expression\r
-        * \r
-        * @param source\r
-        * @param regex\r
-        * @return List of tokens split from the source\r
-        */\r
-       public static List<String> parsingByRegularExpression(String source, String regex) {\r
-               List<String> tokens = new ArrayList<String>();\r
-               if (source != null && source.length() > 0) {\r
-                       String[] parsed = source.split(regex);\r
-                       for (String token : parsed) {\r
-                               if (token.length() > 0) {\r
-                                       tokens.add(token);\r
-                               }\r
-                       }\r
-               }\r
-               return tokens;\r
-       }\r
-\r
-       /**\r
-        * Builds a JSON object with error code and message information.\r
-        * \r
-        * @param errorCode\r
-        * @param errorMessage\r
-        * @return JSON object as a String\r
-        */\r
-       public static String jsonErrorMessageResponse(int errorCode, String errorMessage) {\r
-               return "{\"error\":{\"code\":" + errorCode + "," + "\"message\":\"" + errorMessage + "\"}}";\r
-       }\r
-\r
-       /**\r
-        * Builds a JSON object with the specified message\r
-        * \r
-        * @param message\r
-        * @return JSON object as a String\r
-        */\r
-       public static String jsonMessageResponse(String message) {\r
-               return String.format("{\"message\":\"%s\"}", message);\r
-       }\r
-\r
-       /**\r
-        * Serializes the specified object as JSON and writes the result to the\r
-        * debug log. If serialization fails, logs a message to the error logger.\r
-        * \r
-        * @param logger\r
-        *            Logger for the class where the object was built; the logger\r
-        *            carries the class name.\r
-        * @param source\r
-        *            First portion of the log message\r
-        * @param msg\r
-        *            Second portion of the log message\r
-        * @param obj\r
-        *            Object to serialize as JSON\r
-        */\r
-       public static void logAndSerializeObject(EELFLoggerDelegate logger, String source, String msg, Object obj) {\r
-               try {\r
-                       String objectAsJson = new ObjectMapper().writeValueAsString(obj);\r
-                       logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                       String.format("source= [%s]; %s [%s];", source, msg, objectAsJson));\r
-               } catch (JsonProcessingException e) {\r
-                       logger.warn(EELFLoggerDelegate.errorLogger, "logAndSerializedObject failed to serialize", e);\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "logAndSerializedObject failed", e);\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);\r
-               }\r
-       }\r
-\r
-       /**\r
-        * Serializes the specified object as JSON and writes the result to the\r
-        * debug log. If serialization fails, logs a message to the error logger.\r
-        * \r
-        * @param source\r
-        *            First portion of the log message\r
-        * @param msg\r
-        *            Second portion of the log message\r
-        * @param obj\r
-        *            Object to serialize as JSON\r
-        */\r
-       public static void logAndSerializeObject(String source, String msg, Object obj) {\r
-               logAndSerializeObject(logger, source, msg, obj);\r
-       }\r
-\r
-       public static void rollbackTransaction(Transaction transaction, String errorMessage) {\r
-               logger.error(EELFLoggerDelegate.errorLogger, errorMessage);\r
-               try {\r
-                       if (transaction != null) {\r
-                               transaction.rollback();\r
-                       }\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeExecuteRollbackError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing a rollback transaction",\r
-                                       e);\r
-               }\r
-       }\r
-\r
-       public static void closeLocalSession(Session localSession, String errorMessage) {\r
-               logger.error(EELFLoggerDelegate.errorLogger, errorMessage);\r
-               try {\r
-                       if (localSession != null) {\r
-                               localSession.close();\r
-                       }\r
-               } catch (Exception e) {\r
-                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoCloseSessionError, e);\r
-                       logger.error(EELFLoggerDelegate.errorLogger, errorMessage + ", closeLocalSession exception", e);\r
-               }\r
-       }\r
-\r
-       // TODO: GLOBAL_LOGIN_URL is the same as in SessionTimeoutInterceptor.\r
-       // It should be defined in SystemProperties.\r
-       private static final String GLOBAL_LOGIN_URL = "global-login-url";\r
-\r
-       /**\r
-        * Set response status to Unauthorized if user == null and to Forbidden in\r
-        * all (!) other cases. Logging is not performed if invocator == null\r
-        * \r
-        * @param user\r
-        * @param response\r
-        * @param invocator\r
-        *            - may be null\r
-        */\r
-       public static void setBadPermissions(EPUser user, HttpServletResponse response, String invocator) {\r
-               if (user == null) {\r
-                       String loginUrl = SystemProperties.getProperty(EPCommonSystemProperties.LOGIN_URL_NO_RET_VAL);\r
-                       response.setHeader(GLOBAL_LOGIN_URL, loginUrl);\r
-                       response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\r
-                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_UNAUTHORIZED));\r
-               } else {\r
-                       response.setStatus(HttpServletResponse.SC_FORBIDDEN);\r
-                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_FORBIDDEN));\r
-               }\r
-               if (invocator != null) {\r
-                       logger.warn(EELFLoggerDelegate.errorLogger,\r
-                                       invocator + ", permissions problem, response status = " + response.getStatus());\r
-               }\r
-       }\r
-\r
-       public static int getExternalAppResponseCode() {\r
-               String responseCode = MDC.get(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE);\r
-               int responseCodeInt = 0;\r
-               try {\r
-                       if (responseCode != null && responseCode != "") {\r
-                               responseCodeInt = Integer.valueOf(responseCode);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred in getResponseCode(). Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return responseCodeInt;\r
-       }\r
-\r
-       // This method might be just for testing purposes.\r
-       public static void setExternalAppResponseCode(int responseCode) {\r
-               try {\r
-                       String responseCodeString = String.valueOf(responseCode);\r
-                       MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE, responseCodeString);\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred in setResponseCode(). Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-       }\r
-\r
-       public static String getHTTPStatusString(int httpStatusCode) {\r
-               String httpStatusString = "unknown_error";\r
-               try {\r
-                       httpStatusString = org.springframework.http.HttpStatus.valueOf(httpStatusCode).name();\r
-                       if (httpStatusString != null) {\r
-                               httpStatusString = httpStatusString.toLowerCase();\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred in getHTTPStatusString(). Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return httpStatusString;\r
-       }\r
-\r
-       public static String getFEErrorString(Boolean internal, int responseCode) {\r
-               // Return a String like the following:\r
-               // "Internal Ecomp Error: 500 internal_server_error" or\r
-               // "External App Error: 404 not_found"\r
-               // TODO: create our own Ecomp error codes, starting with 1000 and up.\r
-               String responseString = "";\r
-               String internalExternalString = internal ? "Ecomp Error: " : "App Error: ";\r
-               String httpStatusString = "unknown_error";\r
-               try {\r
-                       if (responseCode < 1000) {\r
-                               httpStatusString = getHTTPStatusString(responseCode);\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger,\r
-                                       "Exception occurred in getFEErrorString(). Details: " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               responseString = internalExternalString + responseCode + " " + httpStatusString;\r
-               return responseString;\r
-       }\r
-\r
-       public static boolean isProductionBuild() {\r
-               boolean productionBuild = true;\r
-               String epVersion = EcompVersion.buildNumber;\r
-               if (epVersion != null) {\r
-                       int buildNum = epVersion.lastIndexOf('.');\r
-                       if (buildNum > 0) {\r
-                               int buildNumber = Integer.parseInt(epVersion.substring(buildNum + 1));\r
-                               if (buildNumber < 3000) // Production versions are 3000+, (ie\r
-                                                                               // 1.0.3003)\r
-                               {\r
-                                       productionBuild = false;\r
-                               }\r
-                       }\r
-               }\r
-               return productionBuild;\r
-       }\r
-\r
-       private static final Object stackTraceLock = new Object();\r
-\r
-       public static String getStackTrace(Throwable t) {\r
-               synchronized (stackTraceLock) {\r
-                       StringWriter sw = new StringWriter();\r
-                       PrintWriter pw = new PrintWriter(sw);\r
-                       t.printStackTrace(pw);\r
-                       return sw.toString();\r
-               }\r
-       }\r
-\r
-       public static String getMyIpAdddress() {\r
-               InetAddress ip;\r
-               String localIp;\r
-               try {\r
-                       ip = InetAddress.getLocalHost();\r
-                       localIp = ip.getHostAddress();\r
-               } catch (UnknownHostException e) {\r
-                       localIp = "unknown";\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return localIp;\r
-       }\r
-\r
-       public static String getMyHostName() {\r
-               InetAddress ip;\r
-               String hostName;\r
-               try {\r
-                       ip = InetAddress.getLocalHost();\r
-                       hostName = ip.getHostName();\r
-               } catch (UnknownHostException e) {\r
-                       hostName = "unknown";\r
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-               }\r
-               return hostName;\r
-       }\r
-\r
-       /* return a default property if the expected one is not available */\r
-       public static String getPropertyOrDefault(String property, String defaultValue) {\r
-               return ((null == SystemProperties.getProperty(property) || SystemProperties.getProperty(property).equals(""))\r
-                               ? defaultValue : SystemProperties.getProperty(property));\r
-       }\r
-\r
-       public static void calculateDateTimeDifferenceForLog(String beginDateTime, String endDateTime) {\r
-               if (beginDateTime != null && endDateTime != null) {\r
-                       try {\r
-                               SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");\r
-\r
-                               Date beginDate = ecompLogDateFormat.parse(beginDateTime);\r
-                               Date endDate = ecompLogDateFormat.parse(endDateTime);\r
-                               String timeDifference = String.format("%d", endDate.getTime() - beginDate.getTime());\r
-                               MDC.put(SystemProperties.MDC_TIMER, timeDifference);\r
-                       } catch (Exception e) {\r
-                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                       }\r
-               }\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import javax.servlet.http.HttpServletResponse;
+
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
+import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.slf4j.MDC;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class EcompPortalUtils {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EcompPortalUtils.class);
+
+       /**
+        * @param orgUserId
+        * @return true if orgUserId is not empty and contains only alphanumeric,
+        *         false otherwise
+        */
+       public static boolean legitimateUserId(String orgUserId) {
+               return orgUserId.matches("^[a-zA-Z0-9]+$");
+       }
+
+       /**
+        * Splits the string into a list of tokens using the specified regular
+        * expression
+        * 
+        * @param source
+        * @param regex
+        * @return List of tokens split from the source
+        */
+       public static List<String> parsingByRegularExpression(String source, String regex) {
+               List<String> tokens = new ArrayList<String>();
+               if (source != null && source.length() > 0) {
+                       String[] parsed = source.split(regex);
+                       for (String token : parsed) {
+                               if (token.length() > 0) {
+                                       tokens.add(token);
+                               }
+                       }
+               }
+               return tokens;
+       }
+
+       /**
+        * Builds a JSON object with error code and message information.
+        * 
+        * @param errorCode
+        * @param errorMessage
+        * @return JSON object as a String
+        */
+       public static String jsonErrorMessageResponse(int errorCode, String errorMessage) {
+               return "{\"error\":{\"code\":" + errorCode + "," + "\"message\":\"" + errorMessage + "\"}}";
+       }
+
+       /**
+        * Builds a JSON object with the specified message
+        * 
+        * @param message
+        * @return JSON object as a String
+        */
+       public static String jsonMessageResponse(String message) {
+               return String.format("{\"message\":\"%s\"}", message);
+       }
+
+       /**
+        * Serializes the specified object as JSON and writes the result to the
+        * debug log. If serialization fails, logs a message to the error logger.
+        * 
+        * @param logger
+        *            Logger for the class where the object was built; the logger
+        *            carries the class name.
+        * @param source
+        *            First portion of the log message
+        * @param msg
+        *            Second portion of the log message
+        * @param obj
+        *            Object to serialize as JSON
+        */
+       public static void logAndSerializeObject(EELFLoggerDelegate logger, String source, String msg, Object obj) {
+               try {
+                       String objectAsJson = new ObjectMapper().writeValueAsString(obj);
+                       logger.debug(EELFLoggerDelegate.debugLogger,
+                                       String.format("source= [%s]; %s [%s];", source, msg, objectAsJson));
+               } catch (JsonProcessingException e) {
+                       logger.warn(EELFLoggerDelegate.errorLogger, "logAndSerializedObject failed to serialize", e);
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "logAndSerializedObject failed", e);
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeInvalidJsonInput, e);
+               }
+       }
+
+       /**
+        * Serializes the specified object as JSON and writes the result to the
+        * debug log. If serialization fails, logs a message to the error logger.
+        * 
+        * @param source
+        *            First portion of the log message
+        * @param msg
+        *            Second portion of the log message
+        * @param obj
+        *            Object to serialize as JSON
+        */
+       public static void logAndSerializeObject(String source, String msg, Object obj) {
+               logAndSerializeObject(logger, source, msg, obj);
+       }
+
+       public static void rollbackTransaction(Transaction transaction, String errorMessage) {
+               logger.error(EELFLoggerDelegate.errorLogger, errorMessage);
+               try {
+                       if (transaction != null) {
+                               transaction.rollback();
+                       }
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeExecuteRollbackError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred while performing a rollback transaction",
+                                       e);
+               }
+       }
+
+       public static void closeLocalSession(Session localSession, String errorMessage) {
+               logger.error(EELFLoggerDelegate.errorLogger, errorMessage);
+               try {
+                       if (localSession != null) {
+                               localSession.close();
+                       }
+               } catch (Exception e) {
+                       EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoCloseSessionError, e);
+                       logger.error(EELFLoggerDelegate.errorLogger, errorMessage + ", closeLocalSession exception", e);
+               }
+       }
+
+       // TODO: GLOBAL_LOGIN_URL is the same as in SessionTimeoutInterceptor.
+       // It should be defined in SystemProperties.
+       private static final String GLOBAL_LOGIN_URL = "global-login-url";
+
+       /**
+        * Set response status to Unauthorized if user == null and to Forbidden in
+        * all (!) other cases. Logging is not performed if invocator == null
+        * 
+        * @param user
+        * @param response
+        * @param invocator
+        *            - may be null
+        */
+       public static void setBadPermissions(EPUser user, HttpServletResponse response, String invocator) {
+               if (user == null) {
+                       String loginUrl = SystemProperties.getProperty(EPCommonSystemProperties.LOGIN_URL_NO_RET_VAL);
+                       response.setHeader(GLOBAL_LOGIN_URL, loginUrl);
+                       response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_UNAUTHORIZED));
+               } else {
+                       response.setStatus(HttpServletResponse.SC_FORBIDDEN);
+                       MDC.put(EPCommonSystemProperties.RESPONSE_CODE, Integer.toString(HttpServletResponse.SC_FORBIDDEN));
+               }
+               if (invocator != null) {
+                       logger.warn(EELFLoggerDelegate.errorLogger,
+                                       invocator + ", permissions problem, response status = " + response.getStatus());
+               }
+       }
+
+       public static int getExternalAppResponseCode() {
+               String responseCode = MDC.get(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE);
+               int responseCodeInt = 0;
+               try {
+                       if (responseCode != null && responseCode != "") {
+                               responseCodeInt = Integer.valueOf(responseCode);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred in getResponseCode(). Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+               return responseCodeInt;
+       }
+
+       // This method might be just for testing purposes.
+       public static void setExternalAppResponseCode(int responseCode) {
+               try {
+                       String responseCodeString = String.valueOf(responseCode);
+                       MDC.put(EPCommonSystemProperties.EXTERNAL_API_RESPONSE_CODE, responseCodeString);
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred in setResponseCode(). Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+       }
+
+       public static String getHTTPStatusString(int httpStatusCode) {
+               String httpStatusString = "unknown_error";
+               try {
+                       httpStatusString = org.springframework.http.HttpStatus.valueOf(httpStatusCode).name();
+                       if (httpStatusString != null) {
+                               httpStatusString = httpStatusString.toLowerCase();
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred in getHTTPStatusString(). Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+               return httpStatusString;
+       }
+
+       public static String getFEErrorString(Boolean internal, int responseCode) {
+               // Return a String like the following:
+               // "Internal Ecomp Error: 500 internal_server_error" or
+               // "External App Error: 404 not_found"
+               // TODO: create our own Ecomp error codes, starting with 1000 and up.
+               String responseString = "";
+               String internalExternalString = internal ? "Ecomp Error: " : "App Error: ";
+               String httpStatusString = "unknown_error";
+               try {
+                       if (responseCode < 1000) {
+                               httpStatusString = getHTTPStatusString(responseCode);
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger,
+                                       "Exception occurred in getFEErrorString(). Details: " + EcompPortalUtils.getStackTrace(e));
+               }
+               responseString = internalExternalString + responseCode + " " + httpStatusString;
+               return responseString;
+       }
+
+       public static boolean isProductionBuild() {
+               boolean productionBuild = true;
+               String epVersion = EcompVersion.buildNumber;
+               if (epVersion != null) {
+                       int buildNum = epVersion.lastIndexOf('.');
+                       if (buildNum > 0) {
+                               int buildNumber = Integer.parseInt(epVersion.substring(buildNum + 1));
+                               if (buildNumber < 3000) // Production versions are 3000+, (ie
+                                                                               // 1.0.3003)
+                               {
+                                       productionBuild = false;
+                               }
+                       }
+               }
+               return productionBuild;
+       }
+
+       private static final Object stackTraceLock = new Object();
+
+       public static String getStackTrace(Throwable t) {
+               synchronized (stackTraceLock) {
+                       StringWriter sw = new StringWriter();
+                       PrintWriter pw = new PrintWriter(sw);
+                       t.printStackTrace(pw);
+                       return sw.toString();
+               }
+       }
+
+       public static String getMyIpAdddress() {
+               InetAddress ip;
+               String localIp;
+               try {
+                       ip = InetAddress.getLocalHost();
+                       localIp = ip.getHostAddress();
+               } catch (UnknownHostException e) {
+                       localIp = "unknown";
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               }
+               return localIp;
+       }
+
+       public static String getMyHostName() {
+               InetAddress ip;
+               String hostName;
+               try {
+                       ip = InetAddress.getLocalHost();
+                       hostName = ip.getHostName();
+               } catch (UnknownHostException e) {
+                       hostName = "unknown";
+                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+               }
+               return hostName;
+       }
+
+       /* return a default property if the expected one is not available */
+       public static String getPropertyOrDefault(String property, String defaultValue) {
+               return ((null == SystemProperties.getProperty(property) || SystemProperties.getProperty(property).equals(""))
+                               ? defaultValue : SystemProperties.getProperty(property));
+       }
+
+       /**
+        * Calculates the time duration of a function call for logging purpose. It
+        * stores the result by using "MDC.put(SystemProperties.MDC_TIMER,
+        * timeDifference);" It is important to call
+        * "MDC.remove(SystemProperties.MDC_TIMER);" after this method call to clean
+        * up the record in MDC
+        *
+        * @param beginDateTime
+        *            the given begin time for the call
+        * @param endDateTime
+        *            the given end time for the call
+        * 
+        */
+       public static void calculateDateTimeDifferenceForLog(String beginDateTime, String endDateTime) {
+               if (beginDateTime != null && endDateTime != null) {
+                       try {
+                               SimpleDateFormat ecompLogDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXXX");
+
+                               Date beginDate = ecompLogDateFormat.parse(beginDateTime);
+                               Date endDate = ecompLogDateFormat.parse(endDateTime);
+                               String timeDifference = String.format("%d", endDate.getTime() - beginDate.getTime());
+                               MDC.put(SystemProperties.MDC_TIMER, timeDifference);
+                       } catch (Exception e) {
+                               logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                       }
+               }
+       }
+
+}
index a4d5e0c..8afde4e 100644 (file)
@@ -1,33 +1,33 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-//\r
-// Hardcoded for now, wanted to use maven and resource file.  Possibly just read\r
-// pom.properties file with version added, but spent several hours already running\r
-// into issues with that and other ideas not working.  So, for 1604 deadlines I \r
-// am just putting the version in the code here... for now.\r
-//\r
-public final class EcompVersion {\r
-\r
-       // TODO - not used - manifest service reads from manifest\r
-    public static final String buildNumber="1610.1.999";\r
-    \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+//
+// Hardcoded for now, wanted to use maven and resource file.  Possibly just read
+// pom.properties file with version added, but spent several hours already running
+// into issues with that and other ideas not working.  So, for 1604 deadlines I 
+// am just putting the version in the code here... for now.
+//
+public final class EcompVersion {
+
+       // TODO - not used - manifest service reads from manifest
+    public static final String buildNumber="1610.1.999";
+    
+}
index 3a781af..a953bf1 100644 (file)
@@ -1,99 +1,99 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import java.lang.reflect.Field;\r
-import java.lang.reflect.Method;\r
-import java.util.HashMap;\r
-import java.util.List;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-\r
-/**\r
- * \r
- * @author Vladimir Turovets This class is used to create HashMap<String, T>\r
- *         from the list of T objects. We suppose that\r
- *         1) T object contains field 'parmName' or getter 'getParmName()'.\r
- *         The value of object.parmName or object.getParmName() is used as\r
- *         a key in created hashMap.\r
- *         2) for all objects in the list 'parmName' or getter\r
- *         'getParmName().toString' has to be unique and not null.\r
- *         This class has one function only:\r
- *         HashMap<String, T> hashMap(List<T> list, String name) and returns\r
- *         hash map created from list.\r
- *\r
- * @param <T>\r
- */\r
-public class HashMapFromList<T> {\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HashMapFromList.class);\r
-       \r
-       public HashMap<String, T> hashMap(List<T> list, String name) {\r
-               HashMap<String, T> result = new HashMap<String, T>();\r
-               if (list == null || list.size() == 0 || name == null) {\r
-                       return result;\r
-               }\r
-               name = name.trim();\r
-               if (name.length() > 0) {\r
-                       T object = list.get(0);\r
-                       try {\r
-                               String parmName = name;\r
-                               Field field = object.getClass().getField(parmName);\r
-                               for (T obj : list) {\r
-                                       try {\r
-                                               Object o = field.get(obj);\r
-                                               if (o != null)\r
-                                                       result.put(o.toString(), obj);\r
-                                       } catch (Exception e1) {\r
-                                               String stackTrace = EcompPortalUtils.getStackTrace(e1);\r
-                                               logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", field " + parmName + ". Details: ", stackTrace);\r
-                                               return new HashMap<String, T>();\r
-                                       }\r
-                               }\r
-                       } catch (Exception e) {\r
-                               String getterName = "get" + (name.length() == 1 ? name.toUpperCase() : (name.substring(0, 1).toUpperCase() + name.substring(1)));\r
-                               try {\r
-                                       Class<?>[] parmClasses = null;\r
-                                       Method method = object.getClass().getMethod(getterName, parmClasses);\r
-                                       Object[] parmValues = new Object[0];\r
-                                       for (T obj : list) {\r
-                                               try {\r
-                                                       Object o = method.invoke(obj, parmValues);\r
-                                                       if (o != null)\r
-                                                               result.put(o.toString(), obj);\r
-                                               } catch (Exception e2) {\r
-                                                       String stackTrace = EcompPortalUtils.getStackTrace(e2);\r
-                                                       logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", method " + getterName + ". Details: ", stackTrace);\r
-                                                       return new HashMap<String, T>();\r
-                                               }\r
-                                       }\r
-                               } catch (Exception e3) {\r
-                                       String stackTrace = EcompPortalUtils.getStackTrace(e3);\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", bad field '" + name + "' or method '" + getterName + "()'. Details: " + stackTrace);\r
-                                       return new HashMap<String, T>();\r
-                               }\r
-                       }\r
-               }\r
-               if (list.size() != result.size()) {\r
-                       logger.warn(EELFLoggerDelegate.errorLogger, "Duplicated or empty keys were found!!!");\r
-               }\r
-               return result;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.List;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+/**
+ * 
+ * @author Vladimir Turovets This class is used to create HashMap<String, T>
+ *         from the list of T objects. We suppose that
+ *         1) T object contains field 'parmName' or getter 'getParmName()'.
+ *         The value of object.parmName or object.getParmName() is used as
+ *         a key in created hashMap.
+ *         2) for all objects in the list 'parmName' or getter
+ *         'getParmName().toString' has to be unique and not null.
+ *         This class has one function only:
+ *         HashMap<String, T> hashMap(List<T> list, String name) and returns
+ *         hash map created from list.
+ *
+ * @param <T>
+ */
+public class HashMapFromList<T> {
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HashMapFromList.class);
+       
+       public HashMap<String, T> hashMap(List<T> list, String name) {
+               HashMap<String, T> result = new HashMap<String, T>();
+               if (list == null || list.size() == 0 || name == null) {
+                       return result;
+               }
+               name = name.trim();
+               if (name.length() > 0) {
+                       T object = list.get(0);
+                       try {
+                               String parmName = name;
+                               Field field = object.getClass().getField(parmName);
+                               for (T obj : list) {
+                                       try {
+                                               Object o = field.get(obj);
+                                               if (o != null)
+                                                       result.put(o.toString(), obj);
+                                       } catch (Exception e1) {
+                                               String stackTrace = EcompPortalUtils.getStackTrace(e1);
+                                               logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", field " + parmName + ". Details: ", stackTrace);
+                                               return new HashMap<String, T>();
+                                       }
+                               }
+                       } catch (Exception e) {
+                               String getterName = "get" + (name.length() == 1 ? name.toUpperCase() : (name.substring(0, 1).toUpperCase() + name.substring(1)));
+                               try {
+                                       Class<?>[] parmClasses = null;
+                                       Method method = object.getClass().getMethod(getterName, parmClasses);
+                                       Object[] parmValues = new Object[0];
+                                       for (T obj : list) {
+                                               try {
+                                                       Object o = method.invoke(obj, parmValues);
+                                                       if (o != null)
+                                                               result.put(o.toString(), obj);
+                                               } catch (Exception e2) {
+                                                       String stackTrace = EcompPortalUtils.getStackTrace(e2);
+                                                       logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", method " + getterName + ". Details: ", stackTrace);
+                                                       return new HashMap<String, T>();
+                                               }
+                                       }
+                               } catch (Exception e3) {
+                                       String stackTrace = EcompPortalUtils.getStackTrace(e3);
+                                       logger.error(EELFLoggerDelegate.errorLogger, "Object of class " + object.getClass().getName() + ", bad field '" + name + "' or method '" + getterName + "()'. Details: " + stackTrace);
+                                       return new HashMap<String, T>();
+                               }
+                       }
+               }
+               if (list.size() != result.size()) {
+                       logger.warn(EELFLoggerDelegate.errorLogger, "Duplicated or empty keys were found!!!");
+               }
+               return result;
+       }
+
+}
index 1ddb550..0354798 100644 (file)
@@ -1,83 +1,83 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-import java.util.concurrent.Callable;\r
-import java.util.concurrent.ExecutorService;\r
-import java.util.concurrent.Executors;\r
-import java.util.concurrent.Future;\r
-\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-\r
-public abstract class ParallelExecutor<T> {\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ParallelExecutor.class);\r
-\r
-       protected static abstract class ThreadOperation<T> {\r
-               public abstract T execute(List<Object> parms);\r
-       }\r
-\r
-       protected abstract ThreadOperation<T> getThreadOperation();\r
-\r
-       private static class CallableOperationThread<T> implements Callable<T> {\r
-\r
-               List<Object> parms;\r
-\r
-               private ThreadOperation<T> operation;\r
-\r
-               public CallableOperationThread(ThreadOperation<T> operation, List<Object> parms) {\r
-                       this.parms = parms;\r
-                       this.operation = operation;\r
-               }\r
-\r
-               @Override\r
-               public T call() throws Exception {\r
-                       return this.operation.execute(this.parms);\r
-               }\r
-\r
-       }\r
-\r
-       public List<T> performAllOperations(int ThreadPoolSize, List<List<Object>> listOfParms) {\r
-               List<T> result = new ArrayList<T>();\r
-               if (ThreadPoolSize > 0 && listOfParms != null) {\r
-                       ExecutorService executor = Executors.newFixedThreadPool(ThreadPoolSize);\r
-                       List<Future<T>> list = new ArrayList<Future<T>>();\r
-                       for (List<Object> parms : listOfParms) {\r
-                               CallableOperationThread<T> getter = new CallableOperationThread<T>(this.getThreadOperation(), parms);\r
-                               Future<T> submit = executor.submit(getter);\r
-                               list.add(submit);\r
-                       }\r
-                       for (Future<T> future : list) {\r
-                               try {\r
-                                       if (future != null) {\r
-                                               result.add(future.get());\r
-                                       }\r
-                               } catch (Exception e) {\r
-                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));\r
-                               }\r
-                       }\r
-                       executor.shutdown();\r
-               }\r
-               return result;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+public abstract class ParallelExecutor<T> {
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ParallelExecutor.class);
+
+       protected static abstract class ThreadOperation<T> {
+               public abstract T execute(List<Object> parms);
+       }
+
+       protected abstract ThreadOperation<T> getThreadOperation();
+
+       private static class CallableOperationThread<T> implements Callable<T> {
+
+               List<Object> parms;
+
+               private ThreadOperation<T> operation;
+
+               public CallableOperationThread(ThreadOperation<T> operation, List<Object> parms) {
+                       this.parms = parms;
+                       this.operation = operation;
+               }
+
+               @Override
+               public T call() throws Exception {
+                       return this.operation.execute(this.parms);
+               }
+
+       }
+
+       public List<T> performAllOperations(int ThreadPoolSize, List<List<Object>> listOfParms) {
+               List<T> result = new ArrayList<T>();
+               if (ThreadPoolSize > 0 && listOfParms != null) {
+                       ExecutorService executor = Executors.newFixedThreadPool(ThreadPoolSize);
+                       List<Future<T>> list = new ArrayList<Future<T>>();
+                       for (List<Object> parms : listOfParms) {
+                               CallableOperationThread<T> getter = new CallableOperationThread<T>(this.getThreadOperation(), parms);
+                               Future<T> submit = executor.submit(getter);
+                               list.add(submit);
+                       }
+                       for (Future<T> future : list) {
+                               try {
+                                       if (future != null) {
+                                               result.add(future.get());
+                                       }
+                               } catch (Exception e) {
+                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
+                               }
+                       }
+                       executor.shutdown();
+               }
+               return result;
+       }
+
+}
index a0dc7d6..485a80f 100644 (file)
@@ -1,26 +1,29 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-public interface PortalConstants {\r
-       public static final Long PORTAL_APP_ID = 1L;\r
-       public static final Long DEFAULT_NOTIFICATION_CREATOR = 1L;\r
-       public static final String REST_AUX_API = "/auxapi";\r
-}      \r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+public interface PortalConstants {
+       public static final Long PORTAL_APP_ID = 1L;
+       public static final Long DEFAULT_NOTIFICATION_CREATOR = 1L;
+       public static final String REST_AUX_API = "/auxapi";
+       public static final Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+       public static final int SYS_ADMIN_ROLE_ID = 1;
+       public static final String ADMIN_ROLE = "Account Administrator";
+}
index 3585f3a..7ceca0e 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.service;\r
-\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-\r
-@Service("adminAuthExtension")\r
-@Transactional\r
-public class AdminAuthExtension {\r
-       \r
-       public void saveUserExtension(EPUser user){\r
-               //app's developer implement their own logic here, like updating app's related tables\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.service;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+
+@Service("adminAuthExtension")
+@Transactional
+public class AdminAuthExtension {
+       
+       public void saveUserExtension(EPUser user){
+               //app's developer implement their own logic here, like updating app's related tables
+       }
+
+}
index 0adde12..2ea5b58 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.service;\r
-\r
-import java.util.List;\r
-\r
-import org.openecomp.portalsdk.core.domain.Profile;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-\r
-\r
-public interface EPProfileService {\r
-       List<Profile> findAll();\r
-       \r
-       Profile getProfile(int id);\r
-       \r
-       EPUser getUser(String id);\r
-       \r
-       void saveUser(EPUser user);\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.service;
+
+import java.util.List;
+
+import org.openecomp.portalsdk.core.domain.Profile;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+
+public interface EPProfileService {
+       List<Profile> findAll();
+       
+       Profile getProfile(int id);
+       
+       EPUser getUser(String id);
+       
+       void saveUser(EPUser user);
+}
index 2797597..ecd6a13 100644 (file)
@@ -1,77 +1,77 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.service;\r
-\r
-import java.util.List;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.context.annotation.EnableAspectJAutoProxy;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.transaction.annotation.Transactional;\r
-\r
-import org.openecomp.portalsdk.core.dao.ProfileDao;\r
-import org.openecomp.portalsdk.core.domain.Profile;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;\r
-\r
-@Service("epProfileService")\r
-@Transactional\r
-@org.springframework.context.annotation.Configuration\r
-@EnableAspectJAutoProxy\r
-@EPMetricsLog\r
-public class EPProfileServiceImpl implements EPProfileService {\r
-\r
-       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPProfileServiceImpl.class);\r
-       \r
-       @Autowired\r
-       private ProfileDao profileDao;\r
-\r
-       @Autowired\r
-       private DataAccessService dataAccessService;\r
-\r
-       @SuppressWarnings("unchecked")\r
-       public List<Profile> findAll() {\r
-               // List msgDB = getDataAccessService().getList(Profile.class, null);\r
-               return getDataAccessService().getList(Profile.class, null);\r
-       }\r
-\r
-       public EPUser getUser(String userId) {\r
-               return (EPUser) getDataAccessService().getDomainObject(EPUser.class, Long.parseLong(userId), null);\r
-       }\r
-\r
-       public void saveUser(EPUser user) {\r
-\r
-               getDataAccessService().saveDomainObject(user, null);\r
-       }\r
-\r
-       public Profile getProfile(int id) {\r
-               return profileDao.getProfile(id);\r
-       }\r
-\r
-       public DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               this.dataAccessService = dataAccessService;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.service;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import org.openecomp.portalsdk.core.dao.ProfileDao;
+import org.openecomp.portalsdk.core.domain.Profile;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
+
+@Service("epProfileService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@EPMetricsLog
+public class EPProfileServiceImpl implements EPProfileService {
+
+       EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPProfileServiceImpl.class);
+       
+       @Autowired
+       private ProfileDao profileDao;
+
+       @Autowired
+       private DataAccessService dataAccessService;
+
+       @SuppressWarnings("unchecked")
+       public List<Profile> findAll() {
+               // List msgDB = getDataAccessService().getList(Profile.class, null);
+               return getDataAccessService().getList(Profile.class, null);
+       }
+
+       public EPUser getUser(String userId) {
+               return (EPUser) getDataAccessService().getDomainObject(EPUser.class, Long.parseLong(userId), null);
+       }
+
+       public void saveUser(EPUser user) {
+
+               getDataAccessService().saveDomainObject(user, null);
+       }
+
+       public Profile getProfile(int id) {
+               return profileDao.getProfile(id);
+       }
+
+       public DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               this.dataAccessService = dataAccessService;
+       }
+}
index 71d9dd1..1fd36ae 100644 (file)
@@ -1,48 +1,54 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.service;\r
-\r
-public interface RemoteWebServiceCallService {\r
-\r
-       /**\r
-        * Answers whether the specified credentials match application information\r
-        * in the database.\r
-        * \r
-        * @param secretKey\r
-        *            Key used to decrypt passwords; ignored if null.\r
-        * @param requestUebKey\r
-        *            UEB key that identifies the application\r
-        * @param requesUserName\r
-        *            User name for the application\r
-        * @param requestPassword\r
-        *            Password for the application\r
-        * @return True if the UEB key and the credentials match the database\r
-        *         entries; else false.\r
-        * @throws Exception\r
-        *             If decryption fails.\r
-        */\r
-       public boolean verifyRESTCredential(String secretKey, String requestUebKey, String requestUserName,\r
-                       String requestPassword) throws Exception;\r
-       \r
-       \r
-       \r
-       public boolean verifyAppKeyCredential(String requestUebKey) throws Exception;\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.service;
+
+public interface RemoteWebServiceCallService {
+
+       /**
+        * Answers whether the specified credentials match application information
+        * in the database.
+        * 
+        * @param secretKey
+        *            Key used to decrypt passwords; ignored if null.
+        * @param requestUebKey
+        *            UEB key that identifies the application
+        * @param requestUserName
+        *            User name for the application
+        * @param requestPassword
+        *            Password for the application
+        * @return True if the UEB key and the credentials match the database
+        *         entries; else false.
+        * @throws Exception
+        *             If decryption fails.
+        */
+       public boolean verifyRESTCredential(String secretKey, String requestUebKey, String requestUserName,
+                       String requestPassword) throws Exception;
+
+       /**
+        * 
+        * @param requestUebKey
+        *            UEB key
+        * @return boolean
+        * @throws Exception
+        *             on error
+        */
+       public boolean verifyAppKeyCredential(String requestUebKey) throws Exception;
+
+}
index a14bbe8..7dcf0e9 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.util;\r
-\r
-import java.util.Enumeration;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-import java.util.Set;\r
-import java.util.UUID;\r
-\r
-import javax.servlet.ServletContext;\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpSession;\r
-\r
-import org.openecomp.portalapp.portal.domain.EPRole;\r
-import org.openecomp.portalapp.portal.domain.EPUser;\r
-import org.openecomp.portalapp.portal.domain.EPUserApp;\r
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;\r
-import org.openecomp.portalsdk.core.domain.RoleFunction;\r
-import org.openecomp.portalsdk.core.exception.SessionExpiredException;\r
-import org.openecomp.portalsdk.core.lm.FusionLicenseManager;\r
-import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;\r
-import org.openecomp.portalsdk.core.menu.MenuBuilder;\r
-import org.openecomp.portalsdk.core.service.DataAccessService;\r
-import org.openecomp.portalsdk.core.util.SystemProperties;\r
-import org.openecomp.portalsdk.core.web.support.AppUtils;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-\r
-public class EPUserUtils {\r
-\r
-       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUserUtils.class);\r
-\r
-       private final static Long ACCOUNT_ADMIN_ROLE_ID = 999L;\r
-\r
-       public static final String ALL_ROLE_FUNCTIONS = "allRoleFunctions";\r
-\r
-       private static DataAccessService dataAccessService;\r
-\r
-       /**\r
-        * Gets the EPUser object from the session.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return EPUser object that was created upon login\r
-        * @throws SessionExpiredException\r
-        *             if no session exists.\r
-        */\r
-       public static EPUser getUserSession(HttpServletRequest request) {\r
-               HttpSession session = AppUtils.getSession(request);\r
-               if (session == null)\r
-                       throw new SessionExpiredException();\r
-               return (EPUser) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));\r
-       }\r
-\r
-       /**\r
-        * Establishes the user's portal session\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @param user\r
-        *            EPUser\r
-        * @param applicationMenuData\r
-        *            Menu data\r
-        * @param businessDirectMenuData\r
-        *            Menu data\r
-        * @param loginMethod_ignored\r
-        *            How the user authenticated; ignored\r
-        * @param allRoleFunctions\r
-        *            Set of user's roles\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       public static void setUserSession(HttpServletRequest request, EPUser user, Set applicationMenuData,\r
-                       Set businessDirectMenuData, String loginMethod_ignored, List<RoleFunction> allRoleFunctions) {\r
-               HttpSession session = request.getSession(true);\r
-\r
-               // clear the current user session to avoid any conflicts\r
-               EPUserUtils.clearUserSession(request);\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);\r
-\r
-               getAllRoleFunctions(allRoleFunctions, session);\r
-\r
-               getRoleFunctions(request);\r
-\r
-               // truncate the role (and therefore the role function) data to save\r
-               // memory in the session\r
-               user.setEPRoles(null);\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_NAME), user.getFullName());\r
-\r
-               ServletContext context = session.getServletContext();\r
-               int licenseVerificationFlag = 3;\r
-               try {\r
-                       licenseVerificationFlag = (Integer) context.getAttribute("licenseVerification");\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "setUserSession failed to get licenseVerification attribute",\r
-                                       e);\r
-               }\r
-               switch (licenseVerificationFlag) {\r
-               case FusionLicenseManager.DEVELOPER_LICENSE:\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),\r
-                                       "My Portal [Development Version]");\r
-                       break;\r
-               case FusionLicenseManager.EXPIRED_LICENSE:\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),\r
-                                       "My Portal [LICENSE EXPIRED]");\r
-                       break;\r
-               case FusionLicenseManager.VALID_LICENSE:\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME), "My Portal");\r
-                       break;\r
-               default:\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),\r
-                                       "My Portal [INVALID LICENSE]");\r
-                       break;\r
-               }\r
-\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME),\r
-                               MenuBuilder.filterMenu(applicationMenuData, request));\r
-               session.setAttribute(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_ATTRIBUTE_NAME),\r
-                               MenuBuilder.filterMenu(businessDirectMenuData, request));\r
-       }\r
-\r
-       /**\r
-        * Creates a set of role function names and stores the set as a session\r
-        * attribute.\r
-        * \r
-        * @param allRoleFunctions\r
-        *            List of role functions.\r
-        * @param session\r
-        *            HttpSession\r
-        */\r
-       private static void getAllRoleFunctions(List<RoleFunction> allRoleFunctions, HttpSession session) {\r
-               if (allRoleFunctions == null)\r
-                       return;\r
-               Set<String> roleFnSet = new HashSet<String>();\r
-               for (RoleFunction roleFn : allRoleFunctions)\r
-                       roleFnSet.add(roleFn.getCode());\r
-               session.setAttribute(ALL_ROLE_FUNCTIONS, roleFnSet);\r
-       }\r
-\r
-       /**\r
-        * Removes all stored attributes from the user's session\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @throws SessionExpiredException\r
-        *             if no session exists\r
-        */\r
-       private static void clearUserSession(HttpServletRequest request) {\r
-               HttpSession session = AppUtils.getSession(request);\r
-               if (session == null)\r
-                       throw new SessionExpiredException();\r
-\r
-               // removes all stored attributes from the current user's session\r
-               session.removeAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));\r
-               session.removeAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));\r
-               session.removeAttribute(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_ATTRIBUTE_NAME));\r
-               session.removeAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME));\r
-               session.removeAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME));\r
-       }\r
-\r
-       /**\r
-        * Builds a set of role functions and sets a session attribute with it.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return Set of role functions that was built.\r
-        */\r
-       @SuppressWarnings({ "rawtypes", "unchecked" })\r
-       private static Set getRoleFunctions(HttpServletRequest request) {\r
-               HashSet roleFunctions = null;\r
-\r
-               HttpSession session = request.getSession();\r
-               roleFunctions = (HashSet) session\r
-                               .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME));\r
-\r
-               if (roleFunctions == null) {\r
-                       HashMap roles = getRoles(request);\r
-                       roleFunctions = new HashSet();\r
-\r
-                       Iterator i = roles.keySet().iterator();\r
-\r
-                       while (i.hasNext()) {\r
-                               Long roleKey = (Long) i.next();\r
-                               EPRole role = (EPRole) roles.get(roleKey);\r
-\r
-                               Iterator j = role.getRoleFunctions().iterator();\r
-\r
-                               while (j.hasNext()) {\r
-                                       RoleFunction function = (RoleFunction) j.next();\r
-                                       roleFunctions.add(function.getCode());\r
-                               }\r
-                       }\r
-\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME),\r
-                                       roleFunctions);\r
-               }\r
-\r
-               return roleFunctions;\r
-       }\r
-\r
-       /**\r
-        * Gets role information from the user session, in the cached user object.\r
-        * As a side effect sets a session variable with the roles.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return Map of role ID to role object\r
-        */\r
-       @SuppressWarnings("rawtypes")\r
-       private static HashMap getRoles(HttpServletRequest request) {\r
-               HashMap roles = null;\r
-\r
-               HttpSession session = AppUtils.getSession(request);\r
-               roles = (HashMap) session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME));\r
-\r
-               // if roles are not already cached, let's grab them from the user\r
-               // session\r
-               if (roles == null) {\r
-                       EPUser user = getUserSession(request);\r
-\r
-                       // get all user roles (including the tree of child roles)\r
-                       roles = getAllUserRoles(user);\r
-\r
-                       session.setAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME), roles);\r
-               }\r
-\r
-               return roles;\r
-       }\r
-\r
-       /**\r
-        * Builds a map of role ID to role object.\r
-        * \r
-        * @param user\r
-        *            EPUser\r
-        * @return Map of role ID to role object\r
-        */\r
-       @SuppressWarnings({ "rawtypes", "unchecked" })\r
-       private static HashMap getAllUserRoles(EPUser user) {\r
-               HashMap roles = new HashMap();\r
-               Iterator i = user.getEPRoles().iterator();\r
-\r
-               while (i.hasNext()) {\r
-                       EPRole role = (EPRole) i.next();\r
-\r
-                       if (role.getActive()) {\r
-                               roles.put(role.getId(), role);\r
-\r
-                               // let's take a recursive trip down the tree to add all child\r
-                               // roles\r
-                               addChildRoles(role, roles);\r
-                       }\r
-               }\r
-\r
-               // Additionally; the account admin role is overloaded between ecomp\r
-               // portal and partners; lets also include that\r
-               Iterator<EPUserApp> appRolesIterator = user.getEPUserApps().iterator();\r
-               while (appRolesIterator.hasNext()) {\r
-                       EPRole role = (EPRole) appRolesIterator.next().getRole();\r
-\r
-                       if (role.getActive() && role.getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {\r
-                               roles.put(role.getId(), role);\r
-\r
-                               // let's take a recursive trip down the tree to add all child\r
-                               // roles\r
-                               addChildRoles(role, roles);\r
-                       }\r
-               }\r
-\r
-               return roles;\r
-       }\r
-\r
-       /**\r
-        * Adds all child roles of the specified role to the map of roles.\r
-        * \r
-        * @param role\r
-        *            EPRole\r
-        * @param roles\r
-        *            Maps role id to role object\r
-        */\r
-       @SuppressWarnings({ "rawtypes", "unchecked" })\r
-       private static void addChildRoles(EPRole role, HashMap roles) {\r
-               Set childRoles = role.getChildRoles();\r
-\r
-               if (childRoles != null && childRoles.size() > 0) {\r
-                       Iterator j = childRoles.iterator();\r
-                       while (j.hasNext()) {\r
-                               EPRole childRole = (EPRole) j.next();\r
-\r
-                               if (childRole.getActive()) {\r
-                                       roles.put(childRole.getId(), childRole);\r
-\r
-                                       addChildRoles(childRole, roles);\r
-                               }\r
-                       }\r
-               }\r
-\r
-       }\r
-\r
-       public static boolean hasRole(EPUser user, String roleKey) {\r
-               return getAllUserRoles(user).keySet().contains(new Long(roleKey));\r
-       }\r
-\r
-       public static DataAccessService getDataAccessService() {\r
-               return dataAccessService;\r
-       }\r
-\r
-       @Autowired\r
-       public void setDataAccessService(DataAccessService dataAccessService) {\r
-               EPUserUtils.dataAccessService = dataAccessService;\r
-       }\r
-\r
-       /**\r
-        * Gets the user's ID from the user object in the session\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return Integer ID of current user\r
-        */\r
-       public static int getUserId(HttpServletRequest request) {\r
-               return getUserIdAsLong(request).intValue();\r
-       }\r
-\r
-       /**\r
-        * Gets the user's ID from the user object in the session\r
-        * \r
-        * @param request\r
-        *            HttpServletREquest\r
-        * @return Long ID of current user\r
-        */\r
-       public static Long getUserIdAsLong(HttpServletRequest request) {\r
-               Long userId = new Long(SystemProperties.getProperty(SystemProperties.APPLICATION_USER_ID));\r
-               if (request != null) {\r
-                       if (getUserSession(request) != null) {\r
-                               userId = getUserSession(request).getId();\r
-                       }\r
-               }\r
-               return userId;\r
-       }\r
-\r
-       /**\r
-        * Gets the request ID from the request.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return Request ID\r
-        */\r
-       public static String getRequestId(HttpServletRequest request) {\r
-               Enumeration<String> headerNames = request.getHeaderNames();\r
-\r
-               String requestId = "";\r
-               try {\r
-                       while (headerNames.hasMoreElements()) {\r
-                               String headerName = (String) headerNames.nextElement();\r
-                               logger.debug(EELFLoggerDelegate.debugLogger,\r
-                                               "One header is " + headerName + " : " + request.getHeader(headerName));\r
-                               if (headerName.equalsIgnoreCase(SystemProperties.ECOMP_REQUEST_ID)) {\r
-                                       requestId = request.getHeader(headerName);\r
-                                       break;\r
-                               }\r
-                       }\r
-               } catch (Exception e) {\r
-                       logger.error(EELFLoggerDelegate.errorLogger, "HEADER!!!! Exception : " + EcompPortalUtils.getStackTrace(e));\r
-               }\r
-\r
-               return (requestId.isEmpty() ? UUID.randomUUID().toString() : requestId);\r
-       }\r
-\r
-       /**\r
-        * Gets the full URL from the request.\r
-        * \r
-        * @param request\r
-        *            HttpServletRequest\r
-        * @return Full URL\r
-        */\r
-       public static String getFullURL(HttpServletRequest request) {\r
-               if (request != null) {\r
-                       StringBuffer requestURL = request.getRequestURL();\r
-                       String queryString = request.getQueryString();\r
-\r
-                       if (queryString == null) {\r
-                               return requestURL.toString();\r
-                       } else {\r
-                               return requestURL.append('?').append(queryString).toString();\r
-                       }\r
-               }\r
-               return "";\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.util;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.exception.SessionExpiredException;
+import org.openecomp.portalsdk.core.lm.FusionLicenseManager;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.menu.MenuBuilder;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class EPUserUtils {
+
+       private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EPUserUtils.class);
+
+       private final static Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+
+       public static final String ALL_ROLE_FUNCTIONS = "allRoleFunctions";
+
+       private static DataAccessService dataAccessService;
+
+       /**
+        * Gets the EPUser object from the session.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return EPUser object that was created upon login
+        * @throws SessionExpiredException
+        *             if no session exists.
+        */
+       public static EPUser getUserSession(HttpServletRequest request) {
+               HttpSession session = AppUtils.getSession(request);
+               if (session == null)
+                       throw new SessionExpiredException();
+               return (EPUser) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
+       }
+
+       /**
+        * Establishes the user's portal session
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @param user
+        *            EPUser
+        * @param applicationMenuData
+        *            Menu data
+        * @param businessDirectMenuData
+        *            Menu data
+        * @param loginMethod_ignored
+        *            How the user authenticated; ignored
+        * @param allRoleFunctions
+        *            Set of user's roles
+        */
+       @SuppressWarnings("rawtypes")
+       public static void setUserSession(HttpServletRequest request, EPUser user, Set applicationMenuData,
+                       Set businessDirectMenuData, String loginMethod_ignored, List<RoleFunction> allRoleFunctions) {
+               HttpSession session = request.getSession(true);
+
+               // clear the current user session to avoid any conflicts
+               EPUserUtils.clearUserSession(request);
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+               getAllRoleFunctions(allRoleFunctions, session);
+
+               getRoleFunctions(request);
+
+               // truncate the role (and therefore the role function) data to save
+               // memory in the session
+               user.setEPRoles(null);
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_NAME), user.getFullName());
+
+               ServletContext context = session.getServletContext();
+               int licenseVerificationFlag = 3;
+               try {
+                       licenseVerificationFlag = (Integer) context.getAttribute("licenseVerification");
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "setUserSession failed to get licenseVerification attribute",
+                                       e);
+               }
+               switch (licenseVerificationFlag) {
+               case FusionLicenseManager.DEVELOPER_LICENSE:
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
+                                       "My Portal [Development Version]");
+                       break;
+               case FusionLicenseManager.EXPIRED_LICENSE:
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
+                                       "My Portal [LICENSE EXPIRED]");
+                       break;
+               case FusionLicenseManager.VALID_LICENSE:
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME), "My Portal");
+                       break;
+               default:
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME),
+                                       "My Portal [INVALID LICENSE]");
+                       break;
+               }
+
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME),
+                               MenuBuilder.filterMenu(applicationMenuData, request));
+               session.setAttribute(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_ATTRIBUTE_NAME),
+                               MenuBuilder.filterMenu(businessDirectMenuData, request));
+       }
+
+       /**
+        * Creates a set of role function names and stores the set as a session
+        * attribute.
+        * 
+        * @param allRoleFunctions
+        *            List of role functions.
+        * @param session
+        *            HttpSession
+        */
+       private static void getAllRoleFunctions(List<RoleFunction> allRoleFunctions, HttpSession session) {
+               if (allRoleFunctions == null)
+                       return;
+               Set<String> roleFnSet = new HashSet<String>();
+               for (RoleFunction roleFn : allRoleFunctions)
+                       roleFnSet.add(roleFn.getCode());
+               session.setAttribute(ALL_ROLE_FUNCTIONS, roleFnSet);
+       }
+
+       /**
+        * Removes all stored attributes from the user's session
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @throws SessionExpiredException
+        *             if no session exists
+        */
+       private static void clearUserSession(HttpServletRequest request) {
+               HttpSession session = AppUtils.getSession(request);
+               if (session == null)
+                       throw new SessionExpiredException();
+
+               // removes all stored attributes from the current user's session
+               session.removeAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
+               session.removeAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
+               session.removeAttribute(SystemProperties.getProperty(SystemProperties.BUSINESS_DIRECT_MENU_ATTRIBUTE_NAME));
+               session.removeAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME));
+               session.removeAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME));
+       }
+
+       /**
+        * Builds a set of role functions and sets a session attribute with it.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return Set of role functions that was built.
+        */
+       @SuppressWarnings({ "rawtypes", "unchecked" })
+       private static Set getRoleFunctions(HttpServletRequest request) {
+               HashSet roleFunctions = null;
+
+               HttpSession session = request.getSession();
+               roleFunctions = (HashSet) session
+                               .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME));
+
+               if (roleFunctions == null) {
+                       HashMap roles = getRoles(request);
+                       roleFunctions = new HashSet();
+
+                       Iterator i = roles.keySet().iterator();
+
+                       while (i.hasNext()) {
+                               Long roleKey = (Long) i.next();
+                               EPRole role = (EPRole) roles.get(roleKey);
+
+                               Iterator j = role.getRoleFunctions().iterator();
+
+                               while (j.hasNext()) {
+                                       RoleFunction function = (RoleFunction) j.next();
+                                       roleFunctions.add(function.getCode());
+                               }
+                       }
+
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME),
+                                       roleFunctions);
+               }
+
+               return roleFunctions;
+       }
+
+       /**
+        * Gets role information from the user session, in the cached user object.
+        * As a side effect sets a session variable with the roles.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return Map of role ID to role object
+        */
+       @SuppressWarnings("rawtypes")
+       private static HashMap getRoles(HttpServletRequest request) {
+               HashMap roles = null;
+
+               HttpSession session = AppUtils.getSession(request);
+               roles = (HashMap) session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME));
+
+               // if roles are not already cached, let's grab them from the user
+               // session
+               if (roles == null) {
+                       EPUser user = getUserSession(request);
+
+                       // get all user roles (including the tree of child roles)
+                       roles = getAllUserRoles(user);
+
+                       session.setAttribute(SystemProperties.getProperty(SystemProperties.ROLES_ATTRIBUTE_NAME), roles);
+               }
+
+               return roles;
+       }
+
+       /**
+        * Builds a map of role ID to role object.
+        * 
+        * @param user
+        *            EPUser
+        * @return Map of role ID to role object
+        */
+       @SuppressWarnings({ "rawtypes", "unchecked" })
+       private static HashMap getAllUserRoles(EPUser user) {
+               HashMap roles = new HashMap();
+               Iterator i = user.getEPRoles().iterator();
+
+               while (i.hasNext()) {
+                       EPRole role = (EPRole) i.next();
+
+                       if (role.getActive()) {
+                               roles.put(role.getId(), role);
+
+                               // let's take a recursive trip down the tree to add all child
+                               // roles
+                               addChildRoles(role, roles);
+                       }
+               }
+
+               // Additionally; the account admin role is overloaded between ecomp
+               // portal and partners; lets also include that
+               Iterator<EPUserApp> appRolesIterator = user.getEPUserApps().iterator();
+               while (appRolesIterator.hasNext()) {
+                       EPRole role = (EPRole) appRolesIterator.next().getRole();
+
+                       if (role.getActive() && role.getId().equals(ACCOUNT_ADMIN_ROLE_ID)) {
+                               roles.put(role.getId(), role);
+
+                               // let's take a recursive trip down the tree to add all child
+                               // roles
+                               addChildRoles(role, roles);
+                       }
+               }
+
+               return roles;
+       }
+
+       /**
+        * Adds all child roles of the specified role to the map of roles.
+        * 
+        * @param role
+        *            EPRole
+        * @param roles
+        *            Maps role id to role object
+        */
+       @SuppressWarnings({ "rawtypes", "unchecked" })
+       private static void addChildRoles(EPRole role, HashMap roles) {
+               Set childRoles = role.getChildRoles();
+
+               if (childRoles != null && childRoles.size() > 0) {
+                       Iterator j = childRoles.iterator();
+                       while (j.hasNext()) {
+                               EPRole childRole = (EPRole) j.next();
+
+                               if (childRole.getActive()) {
+                                       roles.put(childRole.getId(), childRole);
+
+                                       addChildRoles(childRole, roles);
+                               }
+                       }
+               }
+
+       }
+
+       public static boolean hasRole(EPUser user, String roleKey) {
+               return getAllUserRoles(user).keySet().contains(new Long(roleKey));
+       }
+
+       public static DataAccessService getDataAccessService() {
+               return dataAccessService;
+       }
+
+       @Autowired
+       public void setDataAccessService(DataAccessService dataAccessService) {
+               EPUserUtils.dataAccessService = dataAccessService;
+       }
+
+       /**
+        * Gets the user's ID from the user object in the session
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return Integer ID of current user
+        */
+       public static int getUserId(HttpServletRequest request) {
+               return getUserIdAsLong(request).intValue();
+       }
+
+       /**
+        * Gets the user's ID from the user object in the session
+        * 
+        * @param request
+        *            HttpServletREquest
+        * @return Long ID of current user
+        */
+       public static Long getUserIdAsLong(HttpServletRequest request) {
+               Long userId = new Long(SystemProperties.getProperty(SystemProperties.APPLICATION_USER_ID));
+               if (request != null) {
+                       if (getUserSession(request) != null) {
+                               userId = getUserSession(request).getId();
+                       }
+               }
+               return userId;
+       }
+
+       /**
+        * Gets the request ID from the request.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return Request ID
+        */
+       public static String getRequestId(HttpServletRequest request) {
+               Enumeration<String> headerNames = request.getHeaderNames();
+
+               String requestId = "";
+               try {
+                       while (headerNames.hasMoreElements()) {
+                               String headerName = (String) headerNames.nextElement();
+                               logger.debug(EELFLoggerDelegate.debugLogger,
+                                               "One header is " + headerName + " : " + request.getHeader(headerName));
+                               if (headerName.equalsIgnoreCase(SystemProperties.ECOMP_REQUEST_ID)) {
+                                       requestId = request.getHeader(headerName);
+                                       break;
+                               }
+                       }
+               } catch (Exception e) {
+                       logger.error(EELFLoggerDelegate.errorLogger, "HEADER!!!! Exception : " + EcompPortalUtils.getStackTrace(e));
+               }
+
+               return (requestId.isEmpty() ? UUID.randomUUID().toString() : requestId);
+       }
+
+       /**
+        * Gets the full URL from the request.
+        * 
+        * @param request
+        *            HttpServletRequest
+        * @return Full URL
+        */
+       public static String getFullURL(HttpServletRequest request) {
+               if (request != null) {
+                       StringBuffer requestURL = request.getRequestURL();
+                       String queryString = request.getQueryString();
+
+                       if (queryString == null) {
+                               return requestURL.toString();
+                       } else {
+                               return requestURL.append('?').append(queryString).toString();
+                       }
+               }
+               return "";
+       }
+
+}
index fb0e35f..44b8d40 100644 (file)
@@ -1,26 +1,26 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.util;\r
-\r
-public enum SystemType {\r
-\r
-       APPLICATION,\r
-//     SYSTEM\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.util;
+
+public enum SystemType {
+
+       APPLICATION,
+//     SYSTEM
+}
index 18445f2..0fa84a9 100644 (file)
@@ -1,38 +1,38 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<!DOCTYPE tiles-definitions PUBLIC\r
-       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"\r
-       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">\r
-<tiles-definitions>\r
-\r
-    <definition extends="ebz_template" name="leafletMap">   \r
-       <put-attribute name="body" value="/WEB-INF/jsp/leafletMap.jsp"></put-attribute>\r
-    </definition>  \r
-    \r
-    <definition extends="ebz_template" name="callflow">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/sequence/details.jsp"></put-attribute>\r
-    </definition>\r
-    \r
\r
-    <definition name="net_map_int" template="/WEB-INF/jsp/net_map.jsp"/>\r
-\r
-</tiles-definitions>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+<tiles-definitions>
+
+    <definition extends="ebz_template" name="leafletMap">   
+       <put-attribute name="body" value="/WEB-INF/jsp/leafletMap.jsp"></put-attribute>
+    </definition>  
+    
+    <definition extends="ebz_template" name="callflow">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/sequence/details.jsp"></put-attribute>
+    </definition>
+    
+    <definition name="net_map_int" template="/WEB-INF/jsp/net_map.jsp"/>
+
+</tiles-definitions>
index 433fec8..4749dbb 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<!DOCTYPE tiles-definitions PUBLIC\r
-       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"\r
-       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">\r
-<tiles-definitions>\r
-\r
-    <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">  \r
-      <put-attribute name="title" value=""></put-attribute>  \r
-      <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>  \r
-      <put-attribute name="body" value=""></put-attribute>\r
-      <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>  \r
-    </definition>\r
-    \r
-    <definition name="ebz_template_raptor" template="/WEB-INF/fusion/jsp/ebz_template_raptor.jsp">  \r
-      <put-attribute name="title" value=""></put-attribute>  \r
-      <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header_raptor.jsp"></put-attribute>  \r
-      <put-attribute name="body" value=""></put-attribute>\r
-      <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer_raptor.jsp"></put-attribute>  \r
-    </definition>\r
-\r
-    <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">  \r
-      <put-attribute name="body" value=""></put-attribute>\r
-    </definition>  \r
-\r
-      <definition name="ebz_template_report_embedded"\r
-    template="/WEB-INF/fusion/jsp/ebz/ebz_template_report_embedded.jsp">\r
-    <put-attribute name="body" value=""></put-attribute>\r
-  </definition>\r
-      \r
-     <definition extends="ebz_template" name="user_profile">  \r
-       <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute>\r
-    </definition>  \r
-    \r
-    <definition extends="ebz_template" name="profile_search">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="profile_search"></put-attribute>  \r
-    </definition>\r
-    \r
-    <definition extends="ebz_template" name="profile">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="profile"></put-attribute>  \r
-    </definition>   \r
-    \r
-       <definition extends="ebz_template" name="menu">   \r
-       <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="menu"></put-attribute>  \r
-    </definition>  \r
-    \r
-    \r
-    <definition extends="ebz_template" name="welcome">   \r
-       <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="welcome"></put-attribute>  \r
-    </definition>  \r
-    \r
-    <definition extends="ebz_template" name="role_list">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="role_list"></put-attribute>  \r
-    </definition> \r
-    \r
-    <definition extends="ebz_template" name="role">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="role"></put-attribute>  \r
-    </definition>    \r
-     \r
-    <definition extends="ebz_template" name="role_function_list">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="role_function_list"></put-attribute>  \r
-    </definition>     \r
-     \r
-    <definition extends="ebz_template" name="post_search">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="post_search"></put-attribute>  \r
-    </definition> \r
-    \r
-     <definition extends="ebz_template" name="error">   \r
-       <put-attribute name="body" value="/WEB-INF/jsp/error.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="error"></put-attribute>  \r
-    </definition> \r
-    \r
-     <definition extends="ebz_template_raptor" name="report">\r
-               <put-attribute name="body"\r
-                       value="/WEB-INF/fusion/raptor/report_ebz.jsp"></put-attribute>\r
-               <put-attribute name="viewName"\r
-                       value="report"></put-attribute>\r
-       </definition> \r
-       \r
-       <definition extends="ebz_template" name="report_wizard">\r
-               <put-attribute name="body"\r
-                       value="/WEB-INF/fusion/raptor/report_wizard.jsp"></put-attribute>\r
-               <put-attribute name="viewName" value="report_wizard"></put-attribute>\r
-       </definition>\r
-\r
-  <definition extends="ebz_template_report_embedded" name="report_embedded">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/report_ebz_embedded.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template" name="report_sample">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/report_sample.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="test_run_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/test_run_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="date_start_field_run_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/date_start_field_run_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="date_end_field_run_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/date_end_field_run_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="test_field_run_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="default_field_run_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/default_field_run_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_testrun_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_semaphore">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_semaphore.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_import_semaphore">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_import_semaphore.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_table_cols">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_table_cols.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_drill_down_report">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_drill_down_report.jsp"></put-attribute>\r
-  </definition>\r
-  <definition extends="ebz_template_noheader_nofooter" name="popup_sql">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/popup_sql.jsp"></put-attribute>\r
-  </definition>\r
-  \r
-  <definition name="raptor/error_page.jsp"   template="/WEB-INF/fusion/raptor/error_page.jsp"/>   \r
-\r
-    <definition extends="ebz_template_raptor" name="wizard_schedule_only">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/wizard_schedule_only.jsp"></put-attribute>\r
-    <put-attribute name="viewName" value="wizard_schedule_only"></put-attribute>\r
-  </definition>\r
-\r
-  <definition extends="ebz_template" name="report_import">\r
-    <put-attribute name="body"\r
-      value="/WEB-INF/fusion/raptor/report_import.jsp"></put-attribute>\r
-    <put-attribute name="viewName" value="report_import"></put-attribute>\r
-  </definition>\r
-\r
-  <definition name="data_out" template="/WEB-INF/fusion/jsp/data_out.jsp" />\r
-    <definition extends="ebz_template" name="collaborate_list">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute>\r
-    </definition> \r
-    \r
-\r
-    <definition extends="ebz_template" name="jcs_admin">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="jcs_admin"></put-attribute> \r
-    </definition>\r
-    \r
-    <definition extends="ebz_template" name="usage_list">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute>\r
-       <put-attribute name="viewName" value="usage_list"></put-attribute> \r
-    </definition>\r
-    <!-- \r
-    <definition extends="ebz_template_noheader_nofooter" name="collaboration">   \r
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"></put-attribute>\r
-    </definition>\r
-    -->\r
-    <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/>\r
-    \r
-       \r
-</tiles-definitions>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
+       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
+<tiles-definitions>
+
+    <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">  
+      <put-attribute name="title" value=""></put-attribute>  
+      <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>  
+      <put-attribute name="body" value=""></put-attribute>
+      <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>  
+    </definition>
+    
+    <definition name="ebz_template_raptor" template="/WEB-INF/fusion/jsp/ebz_template_raptor.jsp">  
+      <put-attribute name="title" value=""></put-attribute>  
+      <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header_raptor.jsp"></put-attribute>  
+      <put-attribute name="body" value=""></put-attribute>
+      <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer_raptor.jsp"></put-attribute>  
+    </definition>
+
+    <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">  
+      <put-attribute name="body" value=""></put-attribute>
+    </definition>  
+
+      <definition name="ebz_template_report_embedded"
+    template="/WEB-INF/fusion/jsp/ebz/ebz_template_report_embedded.jsp">
+    <put-attribute name="body" value=""></put-attribute>
+  </definition>
+      
+     <definition extends="ebz_template" name="user_profile">  
+       <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute>
+    </definition>  
+    
+    <definition extends="ebz_template" name="profile_search">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute>
+       <put-attribute name="viewName" value="profile_search"></put-attribute>  
+    </definition>
+    
+    <definition extends="ebz_template" name="profile">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute>
+       <put-attribute name="viewName" value="profile"></put-attribute>  
+    </definition>   
+    
+       <definition extends="ebz_template" name="menu">   
+       <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute>
+       <put-attribute name="viewName" value="menu"></put-attribute>  
+    </definition>  
+    
+    
+    <definition extends="ebz_template" name="welcome">   
+       <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute>
+       <put-attribute name="viewName" value="welcome"></put-attribute>  
+    </definition>  
+    
+    <definition extends="ebz_template" name="role_list">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute>
+       <put-attribute name="viewName" value="role_list"></put-attribute>  
+    </definition> 
+    
+    <definition extends="ebz_template" name="role">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute>
+       <put-attribute name="viewName" value="role"></put-attribute>  
+    </definition>    
+     
+    <definition extends="ebz_template" name="role_function_list">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute>
+       <put-attribute name="viewName" value="role_function_list"></put-attribute>  
+    </definition>     
+     
+    <definition extends="ebz_template" name="post_search">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute>
+       <put-attribute name="viewName" value="post_search"></put-attribute>  
+    </definition> 
+    
+    <definition name="error" template="/WEB-INF/jsp/error.jsp"/>
+    
+       <definition name="report" template="/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html" />
+       
+       <definition extends="ebz_template" name="report_wizard">
+               <put-attribute name="body"
+                       value="/WEB-INF/fusion/raptor/report_wizard.jsp"></put-attribute>
+               <put-attribute name="viewName" value="report_wizard"></put-attribute>
+       </definition>
+
+  <definition extends="ebz_template_report_embedded" name="report_embedded">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/report_ebz_embedded.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template" name="report_sample">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/report_sample.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="test_run_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/test_run_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="date_start_field_run_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/date_start_field_run_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="date_end_field_run_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/date_end_field_run_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="test_field_run_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="default_field_run_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/default_field_run_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_testrun_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_semaphore">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_semaphore.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_import_semaphore">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_import_semaphore.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_table_cols">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_table_cols.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_drill_down_report">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_drill_down_report.jsp"></put-attribute>
+  </definition>
+  <definition extends="ebz_template_noheader_nofooter" name="popup_sql">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/popup_sql.jsp"></put-attribute>
+  </definition>
+  
+  <definition name="raptor/error_page.jsp"   template="/WEB-INF/fusion/raptor/error_page.jsp"/>   
+
+    <definition extends="ebz_template_raptor" name="wizard_schedule_only">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/wizard_schedule_only.jsp"></put-attribute>
+    <put-attribute name="viewName" value="wizard_schedule_only"></put-attribute>
+  </definition>
+
+  <definition extends="ebz_template" name="report_import">
+    <put-attribute name="body"
+      value="/WEB-INF/fusion/raptor/report_import.jsp"></put-attribute>
+    <put-attribute name="viewName" value="report_import"></put-attribute>
+  </definition>
+
+  <definition name="data_out" template="/WEB-INF/fusion/jsp/data_out.jsp" />
+    <definition extends="ebz_template" name="collaborate_list">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute>
+    </definition> 
+    
+    <definition extends="ebz_template" name="jcs_admin">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute>
+       <put-attribute name="viewName" value="jcs_admin"></put-attribute> 
+    </definition>
+    
+    <definition extends="ebz_template" name="usage_list">   
+       <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute>
+       <put-attribute name="viewName" value="usage_list"></put-attribute> 
+    </definition>
+
+    <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/>    
+       
+</tiles-definitions>
index bda281c..84f7b7e 100644 (file)
                                select user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN
                                from
                                (
-                               select a.*, b.role_id,b.recv_user_id 
+                               select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+                                       a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date,b.role_id,b.recv_user_id 
                                from ep_notification a, ep_role_notification b
                                where a.notification_id = b.notification_id
                                and (end_time is null ||  SYSDATE() <= end_time )
                                )b
                                where
                                (
-                               a.role_id = b.role_id||a.recv_user_id=:user_id
+                               a.role_id = b.role_id
+                               )
+                               union
+                               select :user_id, notification_id, is_for_online_users, is_for_all_roles, msg_header, msg_description,msg_source,start_Time, end_time, priority, created_date, creator_ID,active_YN
+                               from
+                               (
+                               select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+                                       a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, b.role_id,b.recv_user_id 
+                               from ep_notification a, ep_role_notification b
+                               where a.notification_id = b.notification_id
+                               and (end_time is null ||  SYSDATE() <= end_time )
+                               and (start_time is null ||  SYSDATE() >= start_time)
+                               and a.is_for_all_roles = 'N'
+                               ) a
+                               where
+                               (
+                               a.recv_user_id=:user_id
                                )
                                union
                                (
                                and
                                        not exists
                                (
-                               select * from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y'
+                               select ID,User_ID,notification_ID,is_viewed,updated_time from ep_user_notification m where user_id = :user_id and m.notification_id = a.notification_id and is_viewed = 'Y'
                                )
-                               order by priority desc, start_Time desc,created_date desc
+                               order by priority desc, created_date desc,start_Time desc
                        
                        
                         ) t,
                <return alias="adminNotificationHistoryVOResult"
                        class="org.openecomp.portalapp.portal.transport.EpNotificationItemVO" /> 
                <![CDATA[
-               SELECT 
+               SELECT * from (
+SELECT 
                        n.notification_ID AS notificationId, 
                        n.is_for_online_users AS isForOnlineUsers, 
                        n.is_for_all_roles AS isForAllRoles,
                LEFT JOIN
                        fn_user u on u.user_id = n.creator_id 
                WHERE
-                       n.active_YN='Y' order by n.start_time desc
+                       n.active_YN='Y' and msg_source='EP' 
+      
+      UNION
+      
+      SELECT 
+                       n.notification_ID AS notificationId, 
+                       n.is_for_online_users AS isForOnlineUsers, 
+                       n.is_for_all_roles AS isForAllRoles,
+                       n.active_YN AS activeYn,                        
+                       n.msg_header AS msgHeader, 
+                       n.msg_description AS msgDescription, 
+                       n.msg_source AS msgSource, 
+                       n.start_Time AS startTime, 
+                       n.end_time AS endTime, 
+                       n.priority,
+                       n.creator_ID AS creatorId,
+                       n.created_date AS createdDate, 
+                       u.org_user_id AS loginId
+               FROM 
+                       ep_notification n 
+               LEFT JOIN
+                       fn_user u on u.user_id = n.creator_id 
+    JOIN
+                       ep_role_notification r on r.notification_ID=n.notification_ID 
+               WHERE
+                       n.active_YN='Y' and r.recv_user_id = :user_id and msg_source!='EP'
+      )n order by n.startTime desc
                ]]>
        </sql-query>
 
@@ -757,7 +801,9 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                                        creator_ID,active_YN
                                from
                                (
-                                       select a.*, b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
+                                       select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+                                       a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, 
+                                        b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
                    
                    ELSE NULL
               END  AS login_id,b.recv_user_id 
@@ -785,8 +831,38 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                                ) b
                                where
                                (
-                               a.role_id = b.role_id||a.recv_user_id=:user_id
+                               a.role_id = b.role_id
                                )
+                                  UNION
+                       select 
+                                       :user_id, login_id,notification_id, is_for_online_users, is_for_all_roles, 
+                                       msg_header, msg_description,msg_source, start_Time, end_time, priority, created_date, 
+                                       creator_ID,active_YN
+                               from
+                               (
+                                       select a.notification_ID,a.is_for_online_users,a.is_for_all_roles,a.active_YN,
+                                       a.msg_header,a.msg_description,a.msg_source,a.start_time,a.end_time,a.priority,a.creator_ID,a.created_date, 
+                                        b.role_id,CASE WHEN a.creator_ID IS NOT NULL THEN u.org_user_id
+                   
+                   ELSE NULL
+              END  AS login_id,b.recv_user_id 
+                               from ep_notification a, ep_role_notification b,fn_user u
+                               where a.notification_id = b.notification_id and  (u.user_id=a.creator_ID OR a.creator_ID IS NULL)
+                               and a.is_for_all_roles = 'N'
+                               and (
+                               (start_time is null and end_time is null and a.created_date >= DATE_ADD(curdate(),INTERVAL-31 DAY))
+                               or
+                               (start_time is not null and end_time is null and start_time >= DATE_ADD(curdate(),INTERVAL  -31 DAY))
+                               or
+                               (start_time is null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL  -31 DAY))
+                               or
+                               (start_time is not null and end_time is not null and end_time >= DATE_ADD(curdate(),INTERVAL  -31 DAY))
+                               )
+                               ) a
+                       where
+                       (
+                       a.recv_user_id=:user_id
+                       )
                                union
                                (
                                select 
@@ -973,6 +1049,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                ]]>
        </sql-query>
 
+       <sql-query name="getAppsAdmins">
+               <return alias="adminUserApp" class="org.openecomp.portalapp.portal.domain.AdminUserApp" />   
+       <![CDATA[
+       SELECT apps.APP_NAME, apps.APP_ID, user.USER_ID, user.FIRST_NAME, user.LAST_NAME, user.org_user_id FROM fn_user_role userrole INNER JOIN fn_user user ON user.USER_ID = userrole.USER_ID INNER JOIN fn_app apps ON apps.APP_ID = userrole.APP_ID  WHERE user.active_yn='Y' AND userrole.ROLE_ID = :accountAdminRoleId AND (apps.ENABLED = 'Y' OR apps.APP_ID=1)      
+       ]]>
+       </sql-query>
+       
+       <sql-query name="getPortalAdmins">
+               <return alias="portalAdmin" class="org.openecomp.portalapp.portal.transport.PortalAdmin" />   
+       <![CDATA[
+               SELECT u.user_id, u.first_name, u.last_name, u.login_id FROM fn_user u, fn_user_role ur WHERE u.active_yn = 'Y' AND u.user_id = ur.user_id AND ur.role_id= :adminRoleId
+       ]]>
+       </sql-query>
+       
        <!-- Gets personalized list of enabled and accessible apps for regular user -->
        <sql-query name="getPersUserApps">
                <return alias="persUserApps" class="org.openecomp.portalapp.portal.domain.EPApp" />
@@ -1322,7 +1412,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                <![CDATA[
                                                select 
                                distinct  -- multiple roles yield multiple rows
-                           a.APP_ID as id, a.APP_NAME as name, a.APP_IMAGE_URL as imageUrl,
+                           a.APP_ID as id, a.APP_NAME as name, a.ML_APP_NAME as mlAppName, a.APP_IMAGE_URL as imageUrl,
                            a.APP_DESCRIPTION as description, a.APP_NOTES as notes,
                            a.APP_URL as url, a.APP_ALTERNATE_URL as alternateUrl,
                                IF(a.app_type = '2', TRUE, FALSE) as restricted,
@@ -1361,12 +1451,11 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                ]]>
        </sql-query>
 
-       <sql-query name="getAppDetails">
-               <return alias="appDetails" class="org.openecomp.portalapp.portal.domain.EPApp" />
+       <sql-query name="getMyloginAppDetails">
+               <return alias="myloginAppDetails" class="org.openecomp.portalapp.portal.domain.EPApp" />
                
                <![CDATA[ 
-                               
-               SELECT * FROM fn_app  where app_name =:appName
+               SELECT * FROM fn_app  where ml_app_name =:appName
                ;               
                ]]>
        </sql-query>
@@ -1374,7 +1463,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
        
        <sql-query name="deleteAccountEndpoint">
                <![CDATA[ 
-                               
                DELETE FROM ep_endpoints_basic_auth_account WHERE account_id =:accountId
                ;               
                ]]>
@@ -1382,7 +1470,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
        
        <sql-query name="deleteAccountEndpointRecord">
                <![CDATA[ 
-                               
                DELETE FROM ep_endpoints_basic_auth_account WHERE account_id =:accountId AND ep_id =:epId
                ;               
                ]]>
@@ -1390,7 +1477,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
        
        <sql-query name="deleteEPEndpoint">
                <![CDATA[ 
-                               
                DELETE FROM ep_endpoints WHERE id =:epId
                ;               
                ]]>
@@ -1398,7 +1484,6 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
        
        <sql-query name="deleteBasicAuthAccount">
                <![CDATA[ 
-                               
                DELETE FROM ep_basic_auth_account WHERE id =:accountId
                ;               
                ]]>
@@ -1408,12 +1493,20 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                <return alias="appRoles" class="org.openecomp.portalapp.portal.domain.EPRole" />
                
                <![CDATA[ 
-                               
                SELECT * FROM fn_role where role_name =:roleName and app_id =:appId
                ;               
                ]]>
        </sql-query>
-
+       
+       <sql-query name="getPortalAppRoles">
+               <return alias="appRoles" class="org.openecomp.portalapp.portal.domain.EPRole" />
+               
+               <![CDATA[ 
+                               
+               SELECT * FROM fn_role where role_name =:appRoleName and app_id is null
+               ;               
+               ]]>
+       </sql-query>
 
        <sql-query name="deleteMicroserviceParameter">
                <![CDATA[ 
@@ -1523,7 +1616,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                <![CDATA[
                        select 
                                distinct  -- multiple roles yield multiple rows
-                           a.APP_ID as id, a.APP_NAME as name, a.APP_IMAGE_URL as imageUrl,
+                           a.APP_ID as id, a.APP_NAME as name, a.ML_APP_NAME as mlAppName, a.APP_IMAGE_URL as imageUrl,
                            a.APP_DESCRIPTION as description, a.APP_NOTES as notes,
                            a.APP_URL as url, a.APP_ALTERNATE_URL as alternateUrl,
                                IF(a.app_type = '2', TRUE, FALSE) as restricted,
@@ -1540,6 +1633,8 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
                 case
                                        -- regular app, user has a role, no personalization
                                        when a.OPEN = 'N' and r.ROLE_ID is not null and p.STATUS_CD is null then TRUE
+                                       -- regular app, user has role, admin forced a personalization
+                                       when a.OPEN = 'N' and r.ROLE_ID is not null and p.STATUS_CD = 'S' then TRUE
                                        -- regular app, user has no role, admin forced a personalization
                                        when a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S' then TRUE
                     -- open app and has personalization
@@ -1591,5 +1686,30 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' order by app_name
  
                ]]>
        </sql-query>
+     
+    <!--delete the records from ep_notification table when the endtime is more than 3 months-->
+       <sql-query name="deleteNotificationsFromEpNotificationTable">
+               
+               <![CDATA[
+               delete from ep_notification where  curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH)
+               ]]>
+       </sql-query>
+
+
+               <!-- delete the records from ep_role_notification table when the endtime is more than 3 months -->
+       <sql-query name="deleteNotificationsFromEpRoleNotificationTable">
+               
+               <![CDATA[
+       delete from ep_role_notification where  notification_id in (select notification_id from ep_notification where  curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH))
+               ]]>
+       </sql-query> 
+       
+       <!-- delete the records from ep_user_notification table when the endtime is more than 3 months-->
+       <sql-query name="deleteNotificationsFromEpUserNotificationTable">
+               
+               <![CDATA[
+       delete from ep_user_notification where  notification_id in (select notification_id from ep_notification where  curdate() >= DATE_ADD(end_time,INTERVAL 3 MONTH))
+               ]]>
+       </sql-query>
 
 </hibernate-mapping>
index f6d22a2..c1d6fa1 100644 (file)
-<?xml version="1.0"?>\r
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-\r
-<!-- \r
-Publishes mappings and queries for EP SDK library features ONLY.\r
-Portal app mappings and features are in EP.hbm.xml.\r
--->\r
-<hibernate-mapping package="org.openecomp.portalsdk.core.domain">\r
-\r
-     <!-- User class mapping details -->\r
-    <class name="User" table="FN_USER">\r
-        <id name="id" column="user_id" > \r
-          <generator class="native">\r
-             <param name="sequence">seq_fn_user</param> \r
-          </generator>\r
-        </id>\r
-\r
-        <property name="orgId"         column="org_id"/>\r
-        <property name="managerId"     column="manager_id"/>\r
-        <property name="firstName"     column="first_name"/>\r
-        <property name="middleInitial" column="middle_name"/>\r
-        <property name="lastName"      column="last_name"/>\r
-        <property name="phone"         column="phone"/>\r
-        <property name="fax"           column="fax"/>\r
-        <property name="cellular"      column="cellular"/>\r
-        <property name="email"         column="email"/>\r
-        <property name="addressId"     column="address_id"/>\r
-        <property name="alertMethodCd" column="alert_method_cd"/>\r
-\r
-        <property name="address1"      column="address_line_1"/>\r
-        <property name="address2"      column="address_line_2"/>\r
-        <property name="city"          column="city"/>\r
-        <property name="state"         column="state_cd"/>\r
-        <property name="zipCode"       column="zip_code"/>\r
-        <property name="country"       column="country_cd"/>\r
-\r
-        <property name="hrid"          column="hrid"/>\r
-        <property name="orgUserId"     column="org_user_id"/>\r
-        <property name="orgCode"       column="org_code"/>\r
-        <property name="loginId"       column="login_id"/>\r
-        <property name="loginPwd"      column="login_pwd"/>\r
-        <property name="lastLoginDate" column="last_login_date"  type="timestamp"/>\r
-\r
-        <property name="locationClli"  column="location_clli" />\r
-        <property name="orgManagerUserId" column="org_manager_userid" />\r
-        <property name="company"       column="company" />\r
-        <property name="department"    column="department" />\r
-        <property name="departmentName"        column="department_name" />\r
-        <property name="businessUnit"                  column="business_unit" />\r
-        <property name="businessUnitName"   column="business_unit_name" />\r
-        <property name="jobTitle"                      column="job_title" />\r
-        <property name="siloStatus"                    column="silo_status" />\r
-        <property name="financialLocCode"   column="fin_loc_code" />\r
-\r
-        <property name="active"        column="active_yn"       type="yes_no"/>\r
-        <property name="internal"      column="is_internal_yn"  type="yes_no"/>\r
-\r
-        <property name="created"  type="timestamp" column="created_date"  />\r
-        <property name="modified" type="timestamp" column="modified_date" />\r
-\r
-        <property name="createdId"  column="created_id" />\r
-        <property name="modifiedId" column="modified_id" />\r
-               <property name="timeZoneId" column="timezone" />\r
-               \r
-        <set name="userApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true" cascade="all-delete-orphan">\r
-            <key column="user_id"/>\r
-            <one-to-many class="org.openecomp.portalsdk.core.domain.UserApp" />\r
-        </set>\r
-\r
-        <set name="pseudoRoles" table="FN_USER_PSEUDO_ROLE" lazy="false" sort="natural">\r
-            <key column="user_id"/>\r
-            <many-to-many column="pseudo_role_id" class="org.openecomp.portalsdk.core.domain.Role" />\r
-        </set>\r
-    </class>\r
-\r
-       <class name="UserApp" table="fn_user_role">\r
-        <composite-id>\r
-            <key-property name="userId" type="long">\r
-                <column name="user_id" precision="11" scale="0" />\r
-            </key-property>\r
-               <key-many-to-one name="app" class="org.openecomp.portalsdk.core.domain.App" column="app_id" />\r
-               <key-many-to-one name="role" class="org.openecomp.portalsdk.core.domain.Role" column="role_id" />\r
-        </composite-id>\r
-        <property name="priority" type="java.lang.Short">\r
-            <column name="priority" precision="4" scale="0" />\r
-        </property>\r
-    </class>\r
-\r
-    <!-- User App class mapping details -->\r
-    <class name="App" table="fn_app">\r
-        <id name="id" column="app_id"/>\r
-        <property name="name"      column="app_name"/>\r
-        <property name="appPassword"      column="app_password"/>\r
-        <property name="username"      column="app_username"/>        \r
-        \r
-    </class>\r
-\r
-    <!-- User Role class mapping details -->\r
-    <class name="Role" table="FN_ROLE_V">\r
-        <id name="id" column="role_id">\r
-           <generator class="native">\r
-             <param name="sequence">seq_fn_role</param> \r
-          </generator>\r
-        </id>\r
-\r
-        <property name="name"      column="role_name"/>\r
-        <property name="priority"  column="priority" />\r
-        <property name="active"    column="active_yn"  type="yes_no"/>\r
-\r
-        <set name="roleFunctions" table="FN_ROLE_FUNCTION" lazy="false" sort="natural">\r
-            <key column="role_id"/>\r
-            <many-to-many column="function_cd" class="org.openecomp.portalsdk.core.domain.RoleFunction"/>\r
-        </set>\r
-\r
-        <set name="childRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">\r
-            <key column="parent_role_id"/>\r
-            <many-to-many column="child_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>\r
-        </set>\r
-        \r
-        <set name="parentRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">\r
-            <key column="child_role_id"/>\r
-            <many-to-many column="parent_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>\r
-        </set>\r
-\r
-    </class>\r
-    \r
\r
-\r
-    <!-- User Role Function class mapping details -->\r
-    <class name="RoleFunction" table="FN_FUNCTION">\r
-        <id        name="code"  column="function_cd"   />\r
-        <property  name="name"  column="function_name" />\r
-    </class>\r
-    \r
-    <!-- Menu class mapping details -->\r
-    <class name="Menu" table="FN_MENU">\r
-        <id name="id" column="menu_id">\r
-          <generator class="native">\r
-             <param name="sequence">seq_fn_menu</param> \r
-          </generator>\r
-        </id>\r
-\r
-         <property name="menuLevel"   column="level-1"/>\r
-         <property name="label"       column="label"/>\r
-         <property name="parentId"    column="parent_id"/>\r
-         <property name="action"      column="action"/>\r
-         <property name="functionCd"  column="function_cd"/>\r
-         <property name="sortOrder"   column="sort_order"/>\r
-         <property name="servlet"     column="servlet"/>\r
-         <property name="queryString" column="query_string"/>\r
-         <property name="externalUrl" column="external_url"/>\r
-         <property name="target"      column="target"/>\r
-         <property name="active"      column="active_yn"    type="yes_no"/>\r
-         <property name="separator"   column="separator_yn" type="yes_no"/>\r
-         <property name="imageSrc"    column="image_src" />\r
-    </class>\r
-\r
-    <class name="MenuData" table="FN_MENU">\r
-        <!--  <id       name="id"          column="menu_id"/> -->\r
-        <id name="id" column="menu_id">\r
-          <generator class="native">\r
-             <param name="sequence">seq_fn_menu</param> \r
-          </generator>\r
-        </id>\r
-        <property name="label"       column="label"/>\r
-        <property name="action"      column="action"/>\r
-        <property name="functionCd"  column="function_cd"/>\r
-        <property name="sortOrder"   column="sort_order"/>\r
-        <property name="servlet"     column="servlet"/>\r
-        <property name="queryString" column="query_string"/>\r
-        <property name="externalUrl" column="external_url"/>\r
-        <property name="target"      column="target"/>\r
-        <property name="active"      column="active_yn"    type="yes_no"/>\r
-        <property name="separator"   column="separator_yn" type="yes_no"/>\r
-        <property name="imageSrc"    column="image_src" />\r
-        <property name="menuSetCode" column="menu_set_cd"  />\r
-\r
-        <many-to-one name="parentMenu" column="parent_id" class="MenuData"/>\r
-\r
-        <set name="childMenus" lazy="false" sort="natural" inverse="true" where="active_yn = 'Y'">\r
-            <key column="parent_id"/>\r
-            <one-to-many class="MenuData"/>\r
-        </set>\r
-    </class>\r
-    \r
-    <!-- Broadcast Message class mapping details -->\r
-    <class name="BroadcastMessage" table="fn_broadcast_message">\r
-        <id name="id" column="message_id">\r
-            <generator class="native">\r
-              <param name="sequence">seq_fn_broadcast_message</param>\r
-            </generator>\r
-        </id>\r
-        <property name="messageText" column="message_text"/>\r
-        <property name="locationId"  column="message_location_id"/>\r
-\r
-        <property name="startDate"   column="broadcast_start_date"  type="timestamp"/>\r
-        <property name="endDate"     column="broadcast_end_date"    type="timestamp"/>\r
-\r
-        <property name="sortOrder"   column="sort_order"/>\r
-        <property name="active"      column="active_yn"             type="yes_no"/>\r
-\r
-        <property name="siteCd"      column="broadcast_site_cd"    />\r
-    </class>\r
-        \r
-    <!-- State Lookup class mapping details -->\r
-    <class name="LuState" table="FN_LU_STATE">\r
-        <id       name="abbr"  column="state_cd" />\r
-        <property name="state"                   />\r
-    </class>\r
-    \r
-    <!-- Country Lookup class mapping details -->\r
-    <class name="LuCountry" table="FN_LU_COUNTRY">\r
-        <id       name="abbr"  column="country_cd" />\r
-        <property name="country"                   />\r
-        <property name="fullName" column="full_name" />\r
-        <property name="webphoneCountryLabel" column="fullwebphone_country_label_name" />\r
-    </class>\r
-    \r
-    <class name="LuTimeZone" table="FN_LU_TIMEZONE">\r
-        <id       name="timezoneId"  column="timezone_id" />\r
-        <property name="name" column="timezone_name" />\r
-        <property name="value" column="timezone_value" />\r
-    </class>\r
-\r
-       <!-- Audit Log class mapping details -->\r
-    <class name="AuditLog" table="fn_audit_log">\r
-        <id name="id" column="log_id">\r
-          <generator class="native">\r
-                       <param name="sequence">seq_fn_audit_log</param>\r
-                 </generator>\r
-        </id>\r
-        <property name="activityCode"      column="activity_cd"/>\r
-        <property name="affectedRecordId"  column="affected_record_id"  />\r
-        <property name="comments"          column="comments"  />\r
-        <property name="userId"         column="user_id" />\r
-    </class>\r
-    \r
-    <!-- Lookup (id/value bean) class mapping details -->\r
-    <class name="Lookup">\r
-        <composite-id  name="nameValueId" class="org.openecomp.portalsdk.core.domain.support.NameValueId">\r
-          <key-property name="val"/>\r
-          <key-property name="lab" />\r
-        </composite-id>\r
-    </class>\r
-\r
-       <class name="UrlsAccessible" table="V_URL_ACCESS">\r
-      <composite-id  name="urlsAccessibleKey" class="org.openecomp.portalsdk.core.domain.UrlsAccessibleKey">\r
-       <key-property   name="url"      column="url"/>\r
-       <key-property   name="functionCd"       column="function_cd"/>\r
-      </composite-id>\r
-    </class>\r
-    \r
-       <query name="functionCDlist">\r
-      select distinct functionCd from MenuData \r
-    </query>\r
-    \r
-       <query name="menuData">\r
-      from MenuData where menuSetCode = :menu_set_cd and parentMenu is null\r
-    </query>\r
-       <query name="restrictedUrls">\r
-      FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url)\r
-    </query>\r
-\r
-    <query name="getUserNameById">\r
-      select firstName, lastName from User where id = :user_id\r
-    </query>\r
-\r
-    <query name="getUserEmail">\r
-      select email from User where id = :user_id\r
-    </query>\r
-\r
-    <query name="getAllUsers">\r
-      select id, firstName, lastName from User where active = true order by lastName, firstName\r
-    </query>\r
-       \r
-    <query name="getRoleNameById">\r
-      select name from Role where id = :role_id\r
-    </query>\r
-\r
-    <query name="getAllRoles">\r
-      select id, name from Role order by name\r
-    </query>\r
-    \r
-       <sql-query name="getBytesPublishedDelivered">\r
-               <return-scalar column="Published" type="java.lang.String"/>\r
-               <return-scalar column="Delivered" type="java.lang.String"/>\r
-               <![CDATA[\r
-       select concat(Round(sum(bytespublished)/(1024*1024*1024*1024), 0), ' Pb') 'Published', concat(Round(sum(bytesdelivered)/(1024*1024*1024*1024), 0), ' Pb') ' Delivered' from kpi_drvolumes where day = (select max(day) from kpi_drvolumes)\r
-               ]]>\r
-       </sql-query>\r
-       \r
-       <sql-query name="getDataRouterFeedStats">\r
-               <return-scalar column="TOTAL_FEEDS" type="java.lang.Long"/>\r
-               <return-scalar column="ACTIVE_FEEDS" type="java.lang.Long"/>\r
-               <return-scalar column="ACTIVE_SUBS" type="java.lang.Long"/>\r
-               <![CDATA[\r
-       SELECT SUM(TOTALFEEDS) TOTAL_FEEDS, SUM(ACTIVEFEEDS) ACTIVE_FEEDS, SUM(ACTIVESUBS) ACTIVE_SUBS FROM kpi_drsumm where day = (select max(day) from kpi_drvolumes)\r
-               ]]>\r
-       </sql-query>    \r
-\r
-       <sql-query name="getLOCStatsCat">\r
-       <![CDATA[\r
-               select CATEGORY1 CATEGORY from demo_kpi_sourcecode_stats group by category1\r
-       ]]>\r
-       </sql-query>\r
-\r
-       <sql-query name="getLOCStats">\r
-       <![CDATA[\r
-               select sum(total_lines) TOTAL_LINES from demo_kpi_sourcecode_stats group by category1\r
-       ]]>\r
-       </sql-query>\r
-       \r
-</hibernate-mapping>\r
+<?xml version="1.0"?>
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!-- 
+Publishes mappings and queries for EP SDK library features ONLY.
+Portal app mappings and features are in EP.hbm.xml.
+-->
+<hibernate-mapping package="org.openecomp.portalsdk.core.domain">
+
+     <!-- User class mapping details -->
+    <class name="User" table="FN_USER">
+        <id name="id" column="user_id" > 
+          <generator class="native">
+             <param name="sequence">seq_fn_user</param> 
+          </generator>
+        </id>
+
+        <property name="orgId"         column="org_id"/>
+        <property name="managerId"     column="manager_id"/>
+        <property name="firstName"     column="first_name"/>
+        <property name="middleInitial" column="middle_name"/>
+        <property name="lastName"      column="last_name"/>
+        <property name="phone"         column="phone"/>
+        <property name="fax"           column="fax"/>
+        <property name="cellular"      column="cellular"/>
+        <property name="email"         column="email"/>
+        <property name="addressId"     column="address_id"/>
+        <property name="alertMethodCd" column="alert_method_cd"/>
+
+        <property name="address1"      column="address_line_1"/>
+        <property name="address2"      column="address_line_2"/>
+        <property name="city"          column="city"/>
+        <property name="state"         column="state_cd"/>
+        <property name="zipCode"       column="zip_code"/>
+        <property name="country"       column="country_cd"/>
+
+        <property name="hrid"          column="hrid"/>
+        <property name="orgUserId"     column="org_user_id"/>
+        <property name="orgCode"       column="org_code"/>
+        <property name="loginId"       column="login_id"/>
+        <property name="loginPwd"      column="login_pwd"/>
+        <property name="lastLoginDate" column="last_login_date"  type="timestamp"/>
+
+        <property name="locationClli"  column="location_clli" />
+        <property name="orgManagerUserId" column="org_manager_userid" />
+        <property name="company"       column="company" />
+        <property name="department"    column="department" />
+        <property name="departmentName"        column="department_name" />
+        <property name="businessUnit"                  column="business_unit" />
+        <property name="businessUnitName"   column="business_unit_name" />
+        <property name="jobTitle"                      column="job_title" />
+        <property name="siloStatus"                    column="silo_status" />
+        <property name="financialLocCode"   column="fin_loc_code" />
+
+        <property name="active"        column="active_yn"       type="yes_no"/>
+        <property name="internal"      column="is_internal_yn"  type="yes_no"/>
+
+        <property name="created"  type="timestamp" column="created_date"  />
+        <property name="modified" type="timestamp" column="modified_date" />
+
+        <property name="createdId"  column="created_id" />
+        <property name="modifiedId" column="modified_id" />
+               <property name="timeZoneId" column="timezone" />
+               
+        <set name="userApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true" cascade="all-delete-orphan">
+            <key column="user_id"/>
+            <one-to-many class="org.openecomp.portalsdk.core.domain.UserApp" />
+        </set>
+
+        <set name="pseudoRoles" table="FN_USER_PSEUDO_ROLE" lazy="false" sort="natural">
+            <key column="user_id"/>
+            <many-to-many column="pseudo_role_id" class="org.openecomp.portalsdk.core.domain.Role" />
+        </set>
+    </class>
+
+       <class name="UserApp" table="fn_user_role">
+        <composite-id>
+            <key-property name="userId" type="long">
+                <column name="user_id" precision="11" scale="0" />
+            </key-property>
+               <key-many-to-one name="app" class="org.openecomp.portalsdk.core.domain.App" column="app_id" />
+               <key-many-to-one name="role" class="org.openecomp.portalsdk.core.domain.Role" column="role_id" />
+        </composite-id>
+        <property name="priority" type="java.lang.Short">
+            <column name="priority" precision="4" scale="0" />
+        </property>
+    </class>
+
+    <!-- User App class mapping details -->
+    <class name="App" table="fn_app">
+        <id name="id" column="app_id"/>
+        <property name="name"      column="app_name"/>
+        <property name="appPassword"      column="app_password"/>
+        <property name="username"      column="app_username"/>        
+        
+    </class>
+
+    <!-- User Role class mapping details -->
+    <class name="Role" table="FN_ROLE_V">
+        <id name="id" column="role_id">
+           <generator class="native">
+             <param name="sequence">seq_fn_role</param> 
+          </generator>
+        </id>
+
+        <property name="name"      column="role_name"/>
+        <property name="priority"  column="priority" />
+        <property name="active"    column="active_yn"  type="yes_no"/>
+
+        <set name="roleFunctions" table="FN_ROLE_FUNCTION" lazy="false" sort="natural">
+            <key column="role_id"/>
+            <many-to-many column="function_cd" class="org.openecomp.portalsdk.core.domain.RoleFunction"/>
+        </set>
+
+        <set name="childRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">
+            <key column="parent_role_id"/>
+            <many-to-many column="child_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>
+        </set>
+        
+        <set name="parentRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">
+            <key column="child_role_id"/>
+            <many-to-many column="parent_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>
+        </set>
+
+    </class>
+    
+
+    <!-- User Role Function class mapping details -->
+    <class name="RoleFunction" table="FN_FUNCTION">
+        <id        name="code"  column="function_cd"   />
+        <property  name="name"  column="function_name" />
+    </class>
+    
+    <!-- Menu class mapping details -->
+    <class name="Menu" table="FN_MENU">
+        <id name="id" column="menu_id">
+          <generator class="native">
+             <param name="sequence">seq_fn_menu</param> 
+          </generator>
+        </id>
+
+         <property name="menuLevel"   column="level-1"/>
+         <property name="label"       column="label"/>
+         <property name="parentId"    column="parent_id"/>
+         <property name="action"      column="action"/>
+         <property name="functionCd"  column="function_cd"/>
+         <property name="sortOrder"   column="sort_order"/>
+         <property name="servlet"     column="servlet"/>
+         <property name="queryString" column="query_string"/>
+         <property name="externalUrl" column="external_url"/>
+         <property name="target"      column="target"/>
+         <property name="active"      column="active_yn"    type="yes_no"/>
+         <property name="separator"   column="separator_yn" type="yes_no"/>
+         <property name="imageSrc"    column="image_src" />
+    </class>
+
+    <class name="MenuData" table="FN_MENU">
+        <!--  <id       name="id"          column="menu_id"/> -->
+        <id name="id" column="menu_id">
+          <generator class="native">
+             <param name="sequence">seq_fn_menu</param> 
+          </generator>
+        </id>
+        <property name="label"       column="label"/>
+        <property name="action"      column="action"/>
+        <property name="functionCd"  column="function_cd"/>
+        <property name="sortOrder"   column="sort_order"/>
+        <property name="servlet"     column="servlet"/>
+        <property name="queryString" column="query_string"/>
+        <property name="externalUrl" column="external_url"/>
+        <property name="target"      column="target"/>
+        <property name="active"      column="active_yn"    type="yes_no"/>
+        <property name="separator"   column="separator_yn" type="yes_no"/>
+        <property name="imageSrc"    column="image_src" />
+        <property name="menuSetCode" column="menu_set_cd"  />
+
+        <many-to-one name="parentMenu" column="parent_id" class="MenuData"/>
+
+        <set name="childMenus" lazy="false" sort="natural" inverse="true" where="active_yn = 'Y'">
+            <key column="parent_id"/>
+            <one-to-many class="MenuData"/>
+        </set>
+    </class>
+    
+    <!-- Broadcast Message class mapping details -->
+    <class name="BroadcastMessage" table="fn_broadcast_message">
+        <id name="id" column="message_id">
+            <generator class="native">
+              <param name="sequence">seq_fn_broadcast_message</param>
+            </generator>
+        </id>
+        <property name="messageText" column="message_text"/>
+        <property name="locationId"  column="message_location_id"/>
+
+        <property name="startDate"   column="broadcast_start_date"  type="timestamp"/>
+        <property name="endDate"     column="broadcast_end_date"    type="timestamp"/>
+
+        <property name="sortOrder"   column="sort_order"/>
+        <property name="active"      column="active_yn"             type="yes_no"/>
+
+        <property name="siteCd"      column="broadcast_site_cd"    />
+    </class>
+        
+    <!-- State Lookup class mapping details -->
+    <class name="LuState" table="FN_LU_STATE">
+        <id       name="abbr"  column="state_cd" />
+        <property name="state"                   />
+    </class>
+    
+    <!-- Country Lookup class mapping details -->
+    <class name="LuCountry" table="FN_LU_COUNTRY">
+        <id       name="abbr"  column="country_cd" />
+        <property name="country"                   />
+        <property name="fullName" column="full_name" />
+        <property name="webphoneCountryLabel" column="fullwebphone_country_label_name" />
+    </class>
+    
+    <class name="LuTimeZone" table="FN_LU_TIMEZONE">
+        <id       name="timezoneId"  column="timezone_id" />
+        <property name="name" column="timezone_name" />
+        <property name="value" column="timezone_value" />
+    </class>
+
+       <!-- Audit Log class mapping details -->
+    <class name="AuditLog" table="fn_audit_log">
+        <id name="id" column="log_id">
+          <generator class="native">
+                       <param name="sequence">seq_fn_audit_log</param>
+                 </generator>
+        </id>
+        <property name="activityCode"      column="activity_cd"/>
+        <property name="affectedRecordId"  column="affected_record_id"  />
+        <property name="comments"          column="comments"  />
+        <property name="userId"         column="user_id" />
+    </class>
+    
+    <!-- Lookup (id/value bean) class mapping details -->
+    <class name="Lookup">
+        <composite-id  name="nameValueId" class="org.openecomp.portalsdk.core.domain.support.NameValueId">
+          <key-property name="val"/>
+          <key-property name="lab" />
+        </composite-id>
+    </class>
+
+       <class name="UrlsAccessible" table="V_URL_ACCESS">
+      <composite-id  name="urlsAccessibleKey" class="org.openecomp.portalsdk.core.domain.UrlsAccessibleKey">
+       <key-property   name="url"      column="url"/>
+       <key-property   name="functionCd"       column="function_cd"/>
+      </composite-id>
+    </class>
+    
+       <query name="functionCDlist">
+      select distinct functionCd from MenuData 
+    </query>
+    
+       <query name="menuData">
+      from MenuData where menuSetCode = :menu_set_cd and parentMenu is null
+    </query>
+       <query name="restrictedUrls">
+      FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url)
+    </query>
+
+    <query name="getUserNameById">
+      select firstName, lastName from User where id = :user_id
+    </query>
+
+    <query name="getUserEmail">
+      select email from User where id = :user_id
+    </query>
+
+    <query name="getAllUsers">
+      select id, firstName, lastName from User where active = true order by lastName, firstName
+    </query>
+       
+    <query name="getRoleNameById">
+      select name from Role where id = :role_id
+    </query>
+
+    <query name="getAllRoles">
+      select id, name from Role order by name
+    </query>
+    
+       <sql-query name="getBytesPublishedDelivered">
+               <return-scalar column="Published" type="java.lang.String"/>
+               <return-scalar column="Delivered" type="java.lang.String"/>
+               <![CDATA[
+       select concat(Round(sum(bytespublished)/(1024*1024*1024*1024), 0), ' Pb') 'Published', concat(Round(sum(bytesdelivered)/(1024*1024*1024*1024), 0), ' Pb') ' Delivered' from kpi_drvolumes where day = (select max(day) from kpi_drvolumes)
+               ]]>
+       </sql-query>
+       
+       <sql-query name="getDataRouterFeedStats">
+               <return-scalar column="TOTAL_FEEDS" type="java.lang.Long"/>
+               <return-scalar column="ACTIVE_FEEDS" type="java.lang.Long"/>
+               <return-scalar column="ACTIVE_SUBS" type="java.lang.Long"/>
+               <![CDATA[
+       SELECT SUM(TOTALFEEDS) TOTAL_FEEDS, SUM(ACTIVEFEEDS) ACTIVE_FEEDS, SUM(ACTIVESUBS) ACTIVE_SUBS FROM kpi_drsumm where day = (select max(day) from kpi_drvolumes)
+               ]]>
+       </sql-query>    
+
+       <sql-query name="getLOCStatsCat">
+       <![CDATA[
+               select CATEGORY1 CATEGORY from demo_kpi_sourcecode_stats group by category1
+       ]]>
+       </sql-query>
+
+       <sql-query name="getLOCStats">
+       <![CDATA[
+               select sum(total_lines) TOTAL_LINES from demo_kpi_sourcecode_stats group by category1
+       ]]>
+       </sql-query>
+       
+</hibernate-mapping>
index 9a853e7..b1ea7a4 100644 (file)
@@ -1,48 +1,48 @@
-<?xml version="1.0"?>\r
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<!DOCTYPE hibernate-mapping PUBLIC\r
-        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"\r
-        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">\r
-\r
-<hibernate-mapping package="org.openecomp.portalsdk.workflow.domain">\r
-\r
-    \r
-        <!-- WorkflowSchedule mapping details -->\r
-    <class name="WorkflowSchedule" table="fn_schedule_workflows">\r
-        <id name="id" column="id_schedule_workflows"> \r
-          <generator class="native">\r
-          </generator>\r
-        </id>\r
-\r
-        <property name="serverUrl"         column="workflow_server_url"/>\r
-        <property name="workflowKey"     column="workflow_key"/>\r
-        <property name="arguments"     column="workflow_arguments"/>\r
-        <property name="cronDetails" column="startDateTimeCron"/>\r
-        <property name="startDateTime" column="start_date_time"/>\r
-        <property name="endDateTime" column="endDateTime"/>\r
-        <property name="recurrence" column="recurrence"/>\r
-        \r
-       </class>\r
-       \r
-       \r
-       \r
-</hibernate-mapping>\r
+<?xml version="1.0"?>
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping package="org.openecomp.portalsdk.workflow.domain">
+
+    
+        <!-- WorkflowSchedule mapping details -->
+    <class name="WorkflowSchedule" table="fn_schedule_workflows">
+        <id name="id" column="id_schedule_workflows"> 
+          <generator class="native">
+          </generator>
+        </id>
+
+        <property name="serverUrl"         column="workflow_server_url"/>
+        <property name="workflowKey"     column="workflow_key"/>
+        <property name="arguments"     column="workflow_arguments"/>
+        <property name="cronDetails" column="startDateTimeCron"/>
+        <property name="startDateTime" column="start_date_time"/>
+        <property name="endDateTime" column="endDateTime"/>
+        <property name="recurrence" column="recurrence"/>
+        
+       </class>
+       
+       
+       
+</hibernate-mapping>
index 0505b68..84d7223 100644 (file)
@@ -1,20 +1,20 @@
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-${errMsg}\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+${errMsg}
index 39437e7..3ead17c 100644 (file)
@@ -1,21 +1,21 @@
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
-<c:redirect url="/index.html"/>\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
+<c:redirect url="/index.html"/>
index e10ba62..d90704c 100644 (file)
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>\r
-<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
-<%@ page import="java.net.URLEncoder" %>\r
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>\r
-<!DOCTYPE html>\r
-<html ng-app="abs">\r
-       <head>\r
-               <meta charset="utf-8">\r
-               <meta http-equiv="X-UA-Compatible" content="IE=edge">\r
-               <meta name="viewport" content="width=device-width, initial-scale=1"> \r
-       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\r
-               <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >\r
-               <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/style.css" >\r
-               <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>\r
-               <script src= "static/ebz/angular_js/angular.js"></script> \r
-               <script src= "static/ebz/angular_js/angular-sanitize.js"></script>\r
-               <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>\r
-               <script src= "static/ebz/angular_js/app.js"></script>\r
-               <script src= "static/ebz/angular_js/gestures.js"></script>\r
-               <script src="static/js/modalService.js"></script>\r
-               <style>\r
-                       .terms {\r
-                               font-family: Verdana,Arial,Helvetica, sans-serif;\r
-                               font-size: 12px;\r
-                       }\r
-               </style>\r
-       </head>\r
-       <body style="padding-top: 15px;display: none;">\r
-       <% \r
-       String returnUrl = request.getParameter("returnUrl");\r
-          String redirectUrl = request.getParameter("redirectUrl");\r
-       returnUrl = ((returnUrl == null) ? (request.isSecure() ?"https://":"http://") + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/process_csp" + "?redirectUrl=" + redirectUrl: URLEncoder.encode(returnUrl));\r
-     %>\r
-     <c:set var="returnUrl"       value="<%=returnUrl%>"/>\r
-     <c:set var="cspLoginUrl"     value="<%=SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL)%>"/>\r
-       <div ng-controller="loginController">\r
-               <!-- AT&T Logo -->\r
-               <div style="position: fixed; left:15px; top:15px; ">\r
-               <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />\r
-        </div>\r
-               <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">\r
-                       <div class="centered" style="height:15px">\r
-                               <div class="centered">\r
-                               <div align="center" style="display: block;margin-left: auto;margin-right: auto;width: 100%;">\r
-                                       <img src="static/fusion/images/ecomp-login.jpg" height="250"/>\r
-                                       <br>\r
-                                       <font class="headerText">\r
-                               <a id="goUrl" href="${cspLoginUrl}"><b>Click here to login</b></a>\r
-                           </font>             \r
-                               </div>\r
-                               <br />\r
-                               <br />\r
-                       </div>\r
-               </div>\r
-                               <br/><br/><br/><br/><br/><br/><br/><br/>\r
-               <div id="footer" style="margin-top:300px">\r
-                       <div style="margin-left:auto;margin-right:auto;text-align: center;">\r
-                               <p><font class="terms">\r
-                                       <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. \r
-                                       Unauthorized access is a violation of the law. \r
-                                       <br>\r
-                                       This service may be monitored for administrative and security reasons. \r
-                                       By proceeding, you consent to this monitoring.\r
-                               </font></p>\r
-                       </div>  \r
-                       <div class="terms" style="text-align: center;">\r
-                               <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | \r
-                               <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.\r
-                               <br><span>&#169; 2017 AT&amp;T.  All rights reserved.</span>\r
-                   </div>\r
-               </div>\r
-    </div>\r
-    </body>\r
-<script>\r
-               function getParameterByName(name, url) {\r
-                   if (!url) url = window.location.href;\r
-                   name = name.replace(/[\[\]]/g, "\\$&");\r
-                   var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),\r
-                       results = regex.exec(url);\r
-                   if (!results) return '';\r
-                   if (!results[2]) return '';\r
-                   return (results[2].replace(/\+/g, " "));\r
-               }\r
-               \r
-               var winHref = window.location.href;\r
-               var appPathIndex = winHref.substring(0,winHref.lastIndexOf(".htm")).lastIndexOf("/");\r
-               var goUrl =winHref.substring(0,appPathIndex+1) + "process_csp" + "?redirectUrl=" + getParameterByName('redirectUrl') ;\r
-               document.getElementById("goUrl").href = document.getElementById("goUrl").href + goUrl; \r
-               if(getParameterByName('skipClick')=="Yes"){\r
-                       document.getElementById("goUrl").click();\r
-               }else{\r
-                       $("body").show();\r
-               }\r
-               \r
-</script>\r
-<script>\r
-app.controller("loginController", function ($scope) { \r
-       \r
-});\r
-</script>\r
-</html>\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ page import="java.net.URLEncoder" %>
+<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
+<!DOCTYPE html>
+<html ng-app="abs">
+       <head>
+               <meta charset="utf-8">
+               <meta http-equiv="X-UA-Compatible" content="IE=edge">
+               <meta name="viewport" content="width=device-width, initial-scale=1"> 
+       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+               <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >
+               <link rel="stylesheet" type="text/css" href="static/ebz/sandbox/styles/style.css" >
+               <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
+               <script src= "static/ebz/angular_js/angular.js"></script> 
+               <script src= "static/ebz/angular_js/angular-sanitize.js"></script>
+               <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>
+               <script src= "static/ebz/angular_js/app.js"></script>
+               <script src= "static/ebz/angular_js/gestures.js"></script>
+               <script src="static/js/modalService.js"></script>
+               <style>
+                       .terms {
+                               font-family: Verdana,Arial,Helvetica, sans-serif;
+                               font-size: 12px;
+                       }
+               </style>
+       </head>
+       <body style="padding-top: 15px;display: none;">
+       <% 
+       String returnUrl = request.getParameter("returnUrl");
+          String redirectUrl = request.getParameter("redirectUrl");
+       returnUrl = ((returnUrl == null) ? (request.isSecure() ?"https://":"http://") + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/process_csp" + "?redirectUrl=" + redirectUrl: URLEncoder.encode(returnUrl));
+     %>
+     <c:set var="returnUrl"       value="<%=returnUrl%>"/>
+     <c:set var="cspLoginUrl"     value="<%=SystemProperties.getProperty(SystemProperties.CSP_LOGIN_URL)%>"/>
+       <div ng-controller="loginController">
+               <!-- AT&T Logo -->
+               <div style="position: fixed; left:15px; top:15px; ">
+               <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />
+        </div>
+               <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">
+                       <div class="centered" style="height:15px">
+                               <div class="centered">
+                               <div align="center" style="display: block;margin-left: auto;margin-right: auto;width: 100%;">
+                                       <img src="static/fusion/images/ecomp-login.jpg" height="250"/>
+                                       <br>
+                                       <font class="headerText">
+                               <a id="goUrl" href="${cspLoginUrl}"><b>Click here to login</b></a>
+                           </font>             
+                               </div>
+                               <br />
+                               <br />
+                       </div>
+               </div>
+                               <br/><br/><br/><br/><br/><br/><br/><br/>
+               <div id="footer" style="margin-top:300px">
+                       <div style="margin-left:auto;margin-right:auto;text-align: center;">
+                               <p><font class="terms">
+                                       <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. 
+                                       Unauthorized access is a violation of the law. 
+                                       <br>
+                                       This service may be monitored for administrative and security reasons. 
+                                       By proceeding, you consent to this monitoring.
+                               </font></p>
+                       </div>  
+                       <div class="terms" style="text-align: center;">
+                               <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | 
+                               <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.
+                               <br><span>&#169; 2017 AT&amp;T.  All rights reserved.</span>
+                   </div>
+               </div>
+    </div>
+    </body>
+<script>
+               function getParameterByName(name, url) {
+                   if (!url) url = window.location.href;
+                   name = name.replace(/[\[\]]/g, "\\$&");
+                   var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
+                       results = regex.exec(url);
+                   if (!results) return '';
+                   if (!results[2]) return '';
+                   return (results[2].replace(/\+/g, " "));
+               }
+               
+               var winHref = window.location.href;
+               var appPathIndex = winHref.substring(0,winHref.lastIndexOf(".htm")).lastIndexOf("/");
+               var goUrl =winHref.substring(0,appPathIndex+1) + "process_csp" + "?redirectUrl=" + getParameterByName('redirectUrl') ;
+               document.getElementById("goUrl").href = document.getElementById("goUrl").href + goUrl; 
+               if(getParameterByName('skipClick')=="Yes"){
+                       document.getElementById("goUrl").click();
+               }else{
+                       $("body").show();
+               }
+               
+</script>
+<script>
+app.controller("loginController", function ($scope) { 
+       
+});
+</script>
+</html>
index fe5eef0..94c2f55 100644 (file)
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>\r
-<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
-<%@ taglib prefix="fmt"    uri="http://java.sun.com/jsp/jstl/fmt" %>\r
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>\r
-<c:set var="title" value="Login" />\r
-<c:set var="isMobileEnabled"\r
-       value="<%=(SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE)!= null && SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE).trim().equals(\"true\"))%>" />\r
-\r
-<!DOCTYPE html>\r
-<html ng-app="abs">\r
-       <head>\r
-           <title>\r
-             Login\r
-        </title>\r
-               <meta charset="utf-8">\r
-               <meta http-equiv="X-UA-Compatible" content="IE=edge">\r
-               <meta name="viewport" content="width=device-width, initial-scale=1"> \r
-       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->\r
-               <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >\r
-        <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">\r
-               <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>\r
-               <script src= "static/ebz/angular_js/angular.js"></script> \r
-               <script src= "static/ebz/angular_js/angular-sanitize.js"></script>\r
-               <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>\r
-               <script src= "static/ebz/angular_js/app.js"></script>\r
-               <script src= "static/ebz/angular_js/gestures.js"></script>\r
-               <script src="static/js/modalService.js"></script>\r
-               <style>\r
-                       .terms {\r
-                               font-family: Verdana,Arial,Helvetica, sans-serif;\r
-                               font-size: 9px;\r
-                       }\r
-               </style>\r
-       </head>\r
-       <body style="padding-top: 15px;">\r
-       <div ng-controller="externalLoginController">\r
-               <!-- Remove Video -----                         \r
-           <div style="position: fixed; left: -25%; top: -25%; height: 150%; width: 150%; z-index:-1;">\r
-                  <video src="http://www.business.att.com/content/mixedmedia/network-on-demand.mp4" autoplay="true" defaultmuted="true" muted="true" height="100%" width="100%"></video>\r
-           </div>\r
-           -->\r
-        <div style="position: fixed; left:15px; top:15px;z-index:-1;">\r
-               <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />\r
-        </div>\r
-               <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">\r
-                       <div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div>\r
-                       <br/>\r
-                       <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;background-color:white">\r
-                               <img src="static/fusion/images/ecomp-login.jpg"/><span style="    color: #c97d25;   font-size: 56px; position: relative;     text-shadow: 3px 0 #8F9477, 0 2px #d7e7dc, 4px 0 #72b7b2, 0 0px black; top:-144px;  left: -26px;  font-weight: bold;  font-style: italic; font-family:sans-serif">Portal</span>\r
-                               <h2> ECOMP Portal </h2>\r
-                               <label>\r
-                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label class="form-field__label">Login ID:</label>\r
-                               </label>\r
-                               <input  type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"\r
-                                       maxlength="30" />\r
-                               <br/>\r
-                               <br/>\r
-                               <label >&nbsp;Password:</label>\r
-                               <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"\r
-                                       maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> \r
-                               <br />\r
-                               <br />\r
-                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r
-                               <input id="loginBtn" type="image" ng-click="loginExternal();" src="static/fusion/images/login_button.gif" alt="Login" />\r
-                               <br>\r
-                       </div>\r
-               </div>\r
-               <br/><br/><br/><br/><br/><br/><br/>\r
-               <div id="footer">\r
-                       <div style="margin-left:auto;margin-right:auto;text-align: center;">\r
-                               <p><font class="terms">\r
-                                       <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. Unauthorized access is a violation of the law. This service may be monitored for administrative and security reasons. By proceeding, you consent to this monitoring.\r
-                               </font></p>\r
-                       </div>  \r
-                       <div class="terms" align="left">\r
-                               <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.<br><span>&#169; 2016 AT&amp;T.  All rights reserved.</span>\r
-                   </div>\r
-               </div>\r
-    </div>\r
-    </body>\r
-<script>\r
-app.controller("externalLoginController", function ($scope) { \r
-       // Table Data\r
-       \r
-       $scope.viewPerPage = 200;\r
-       $scope.currentPage = 2;\r
-       $scope.totalPage;\r
-       $scope.searchCategory = "";\r
-       $scope.searchString = "";\r
-       $scope.loginId="";\r
-       $scope.password="";\r
-       $scope.loginError=true;\r
-       $scope.viewPerPage = 200;\r
-       $scope.currentPage = 2;\r
-       $scope.totalPage;\r
-       $scope.searchCategory = "";\r
-       $scope.searchString = "";\r
-       $scope.loginId="";\r
-       $scope.password="";\r
-       \r
-       \r
-       $scope.loginExternal = function() {\r
-\r
-               $.ajax({\r
-                   url: "login_external/login?"+"loginId="+$scope.loginId+"&password="+$scope.password,\r
-                type : "POST",\r
-                success:function (response){\r
-                  if(response=="success"){\r
-                    window.location.href = 'welcome.htm';\r
-                  }else{\r
-                       $("#errorInfo").show();\r
-                  }\r
-                },\r
-                error:function( jqXHR, status,error ){\r
-                       $("#errorInfo").show();\r
-                }\r
-                \r
-        });\r
-\r
-    };\r
-       \r
-       \r
-       /**\r
-       $scope.loginExternal = function() {\r
-\r
-        \r
-                 var redirectUrl = "login_external/login";\r
-          var form = $('<form action="' + redirectUrl + '" method="post">' +\r
-                  '<input type="hidden" name="loginId" value='+$scope.loginId+' />' +\r
-                  '<input type="hidden" name="password" value='+$scope.password+' />' +\r
-                  '</form>');\r
-                  \r
-                  $('body').append(form);\r
-                  $(form).submit();\r
-         \r
-\r
-    };\r
-    */\r
-       \r
-});\r
-</script>\r
-       \r
-</html>\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="fmt"    uri="http://java.sun.com/jsp/jstl/fmt" %>
+<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
+<c:set var="title" value="Login" />
+<c:set var="isMobileEnabled"
+       value="<%=(SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE)!= null && SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE).trim().equals(\"true\"))%>" />
+
+<!DOCTYPE html>
+<html ng-app="abs">
+       <head>
+           <title>
+             Login
+        </title>
+               <meta charset="utf-8">
+               <meta http-equiv="X-UA-Compatible" content="IE=edge">
+               <meta name="viewport" content="width=device-width, initial-scale=1"> 
+       <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
+               <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >
+        <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
+               <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
+               <script src= "static/ebz/angular_js/angular.js"></script> 
+               <script src= "static/ebz/angular_js/angular-sanitize.js"></script>
+               <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>
+               <script src= "static/ebz/angular_js/app.js"></script>
+               <script src= "static/ebz/angular_js/gestures.js"></script>
+               <script src="static/js/modalService.js"></script>
+               <style>
+                       .terms {
+                               font-family: Verdana,Arial,Helvetica, sans-serif;
+                               font-size: 9px;
+                       }
+               </style>
+       </head>
+       <body style="padding-top: 15px;">
+       <div ng-controller="externalLoginController">
+               <!-- Remove Video -----                         
+           <div style="position: fixed; left: -25%; top: -25%; height: 150%; width: 150%; z-index:-1;">
+                  <video src="http://www.business.att.com/content/mixedmedia/network-on-demand.mp4" autoplay="true" defaultmuted="true" muted="true" height="100%" width="100%"></video>
+           </div>
+           -->
+        <div style="position: fixed; left:15px; top:15px;z-index:-1;">
+               <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />
+        </div>
+               <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">
+                       <div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div>
+                       <br/>
+                       <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;background-color:white">
+                               <img src="static/fusion/images/ecomp-login.jpg"/><span style="    color: #c97d25;   font-size: 56px; position: relative;     text-shadow: 3px 0 #8F9477, 0 2px #d7e7dc, 4px 0 #72b7b2, 0 0px black; top:-144px;  left: -26px;  font-weight: bold;  font-style: italic; font-family:sans-serif">Portal</span>
+                               <h2> ECOMP Portal </h2>
+                               <label>
+                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label class="form-field__label">Login ID:</label>
+                               </label>
+                               <input  type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
+                                       maxlength="30" />
+                               <br/>
+                               <br/>
+                               <label >&nbsp;Password:</label>
+                               <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
+                                       maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> 
+                               <br />
+                               <br />
+                               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                               <input id="loginBtn" type="image" ng-click="loginExternal();" src="static/fusion/images/login_button.gif" alt="Login" />
+                               <br>
+                       </div>
+               </div>
+               <br/><br/><br/><br/><br/><br/><br/>
+               <div id="footer">
+                       <div style="margin-left:auto;margin-right:auto;text-align: center;">
+                               <p><font class="terms">
+                                       <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. Unauthorized access is a violation of the law. This service may be monitored for administrative and security reasons. By proceeding, you consent to this monitoring.
+                               </font></p>
+                       </div>  
+                       <div class="terms" align="left">
+                               <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.<br><span>&#169; 2016 AT&amp;T.  All rights reserved.</span>
+                   </div>
+               </div>
+    </div>
+    </body>
+<script>
+app.controller("externalLoginController", function ($scope) { 
+       // Table Data
+       
+       $scope.viewPerPage = 200;
+       $scope.currentPage = 2;
+       $scope.totalPage;
+       $scope.searchCategory = "";
+       $scope.searchString = "";
+       $scope.loginId="";
+       $scope.password="";
+       $scope.loginError=true;
+       $scope.viewPerPage = 200;
+       $scope.currentPage = 2;
+       $scope.totalPage;
+       $scope.searchCategory = "";
+       $scope.searchString = "";
+       $scope.loginId="";
+       $scope.password="";
+       
+       
+       $scope.loginExternal = function() {
+
+               $.ajax({
+                   url: "login_external/login?"+"loginId="+$scope.loginId+"&password="+$scope.password,
+                type : "POST",
+                success:function (response){
+                  if(response=="success"){
+                    window.location.href = 'welcome.htm';
+                  }else{
+                       $("#errorInfo").show();
+                  }
+                },
+                error:function( jqXHR, status,error ){
+                       $("#errorInfo").show();
+                }
+                
+        });
+
+    };
+       
+       
+       /**
+       $scope.loginExternal = function() {
+
+        
+                 var redirectUrl = "login_external/login";
+          var form = $('<form action="' + redirectUrl + '" method="post">' +
+                  '<input type="hidden" name="loginId" value='+$scope.loginId+' />' +
+                  '<input type="hidden" name="password" value='+$scope.password+' />' +
+                  '</form>');
+                  
+                  $('body').append(form);
+                  $(form).submit();
+         
+
+    };
+    */
+       
+});
+</script>
+       
+</html>
index 9c89f94..2aa2d26 100644 (file)
@@ -1,56 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">\r
-       <display-name>fusion</display-name>\r
-       \r
-       <!--  \r
-       <context-param>\r
-       <param-name>log4jConfigLocation</param-name>\r
-       <param-value>/WEB-INF/conf/log4j.properties</param-value>\r
-       </context-param>\r
-\r
-       <listener>\r
-       <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>\r
-       </listener>     \r
-        -->\r
-        \r
-       <!-- The Portal app can function on a HA cluster -->\r
-       <distributable/>\r
-\r
-       <filter>\r
-       <filter-name>CorsFilter</filter-name>\r
-               <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>\r
-           <init-param>\r
-               <param-name>cors.allowed.methods</param-name>\r
-               <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>\r
-           </init-param>\r
-           <init-param>\r
-               <param-name>cors.allowed.headers</param-name>\r
-               <param-value>EPService,JSESSIONID,X-ECOMP-RequestID,X-Widgets-Type,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>\r
-           </init-param>       \r
-       </filter>\r
-    \r
-    <filter-mapping>\r
-      <filter-name>CorsFilter</filter-name>\r
-      <url-pattern>/*</url-pattern>\r
-    </filter-mapping>\r
-</web-app>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+       <display-name>fusion</display-name>
+       
+       <!--  
+       <context-param>
+       <param-name>log4jConfigLocation</param-name>
+       <param-value>/WEB-INF/conf/log4j.properties</param-value>
+       </context-param>
+
+       <listener>
+       <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
+       </listener>     
+        -->
+        
+       <!-- The Portal app can function on a HA cluster -->
+       <distributable/>
+
+       <filter>
+       <filter-name>CorsFilter</filter-name>
+               <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
+           <init-param>
+               <param-name>cors.allowed.methods</param-name>
+               <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value>
+           </init-param>
+           <init-param>
+               <param-name>cors.allowed.headers</param-name>
+               <param-value>EPService,JSESSIONID,X-ECOMP-RequestID,X-Widgets-Type,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value>
+           </init-param>       
+       </filter>
+    
+    <filter-mapping>
+      <filter-name>CorsFilter</filter-name>
+      <url-pattern>/*</url-pattern>
+    </filter-mapping>
+</web-app>
index dfff393..c8f0a6d 100644 (file)
@@ -1,34 +1,34 @@
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
-\r
-<%-- Redirected because we can't set the welcome page to a virtual URL. --%>\r
-<%-- <c:redirect url="/login.htm"/>\r
- --%>\r
- <html>\r
- <head>\r
- <title>ecompportal-BE index.jsp</title>\r
- </head>\r
- <body>\r
- <h2>ECOMP Portal Core</h2>\r
- This is the ecompportal-BE application, page index.jsp.\r
- </body>\r
- </html>\r
\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
+
+<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
+<%-- <c:redirect url="/login.htm"/>
+ --%>
+ <html>
+ <head>
+ <title>ecompportal-BE index.jsp</title>
+ </head>
+ <body>
+ <h2>ECOMP Portal Core</h2>
+ This is the ecompportal-BE application, page index.jsp.
+ </body>
+ </html>
index fdafe5c..8e5d3e1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.net.URI;\r
-import java.security.cert.CertificateException;\r
-import java.security.cert.X509Certificate;\r
-\r
-import javax.net.ssl.SSLContext;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.apache.http.Consts;\r
-import org.apache.http.HttpEntity;\r
-import org.apache.http.client.methods.CloseableHttpResponse;\r
-import org.apache.http.client.methods.HttpGet;\r
-import org.apache.http.client.methods.HttpPost;\r
-import org.apache.http.client.utils.URIBuilder;\r
-import org.apache.http.conn.ssl.NoopHostnameVerifier;\r
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;\r
-import org.apache.http.entity.ContentType;\r
-import org.apache.http.entity.StringEntity;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.apache.http.impl.client.HttpClientBuilder;\r
-import org.apache.http.impl.client.HttpClients;\r
-import org.apache.http.ssl.SSLContexts;\r
-import org.apache.http.ssl.TrustStrategy;\r
-import org.apache.http.util.EntityUtils;\r
-\r
-/**\r
- * Provides reusable features for test cases to get or post from an REST\r
- * endpoint, allowing use of HTTPS connections to servers that use self-signed\r
- * certificates.\r
- */\r
-public class SharedContextRestClient {\r
-\r
-       private static final Log logger = LogFactory.getLog(SharedContextRestClient.class);\r
-\r
-       /**\r
-        * Convenience method that builds and sends a GET request using properties\r
-        * to build the URI and populate header with credentials.\r
-        * \r
-        * @param task\r
-        *            last component(s) of REST endpoint name; e.g., "get".\r
-        * @param contextId\r
-        * @param contextKey\r
-        * @return JSON string fetched\r
-        * @throws Exception\r
-        *             if the HTTP response code is anything other than OK.\r
-        */\r
-       public static String getJson(final SharedContextTestProperties properties, final String task,\r
-                       final String contextId, final String contextKey) throws Exception {\r
-               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //\r
-                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //\r
-                               + '/' + task;\r
-               return getJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PORT, -1), //\r
-                               properties.getProperty(SharedContextTestProperties.SECURE, true), //\r
-                               properties.getProperty(SharedContextTestProperties.UEBKEY), //\r
-                               properties.getProperty(SharedContextTestProperties.USERNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PASSWORD), requestPath, //\r
-                               contextId, //\r
-                               contextKey);\r
-       }\r
-\r
-       /**\r
-        * Constructs and sends a GET request using the specified values.\r
-        * \r
-        * @param hostname\r
-        * @param port\r
-        *            ignored if negative\r
-        * @param secure\r
-        *            If true, uses https; else http.\r
-        * @param headerUebkey\r
-        * @param headerUsername\r
-        * @param headerPassword\r
-        * @param requestPath\r
-        *            full path of the REST endpoint\r
-        * @param contextId\r
-        * @param contextKey\r
-        * Ignored if null\r
-        * @return JSON result\r
-        */\r
-       public static String getJson(final String hostname, final int port, boolean secure, final String headerUebkey,\r
-                       final String headerUsername, final String headerPassword, final String requestPath, final String contextId,\r
-                       final String contextKey) throws Exception {\r
-\r
-               URIBuilder uriBuilder = new URIBuilder();\r
-               if (secure)\r
-                       uriBuilder.setScheme("https");\r
-               else\r
-                       uriBuilder.setScheme("http");\r
-               uriBuilder.setHost(hostname);\r
-               if (port > 0)\r
-                       uriBuilder.setPort(port);\r
-               uriBuilder.setPath(requestPath);\r
-               uriBuilder.addParameter("context_id", contextId);\r
-               if (contextKey != null)\r
-                       uriBuilder.addParameter("ckey", contextKey);\r
-               final URI uri = uriBuilder.build();\r
-\r
-               CloseableHttpClient httpClient;\r
-               if (secure) {\r
-                       // Tell HttpClient to accept any server certificate for HTTPS.\r
-                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error\r
-                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {\r
-                               @Override\r
-                               public boolean isTrusted(final X509Certificate[] chain, final String authType)\r
-                                               throws CertificateException {\r
-                                       return true;\r
-                               }\r
-                       }).build();\r
-                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,\r
-                                       NoopHostnameVerifier.INSTANCE);\r
-                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();\r
-               } else {\r
-                       httpClient = HttpClients.createDefault();\r
-               }\r
-\r
-               HttpGet httpGet = new HttpGet(uri);\r
-               httpGet.setHeader("uebkey", headerUebkey);\r
-               httpGet.setHeader("username", headerUsername);\r
-               httpGet.setHeader("password", headerPassword);\r
-\r
-               String json = null;\r
-               CloseableHttpResponse response = null;\r
-               try {\r
-                       logger.debug("GET from " + uri);\r
-                       response = httpClient.execute(httpGet);\r
-                       logger.info("Status is " + response.getStatusLine());\r
-                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)\r
-                               throw new Exception("Status is " + response.getStatusLine().toString());\r
-                       HttpEntity entity = response.getEntity();\r
-                       if (entity == null) {\r
-                               logger.warn("Entity is null!");\r
-                       } else {\r
-                               // entity content length is never set.\r
-                               // this naively tries to read everything.\r
-                               json = EntityUtils.toString(entity);\r
-                               EntityUtils.consume(entity);\r
-                       }\r
-               } finally {\r
-                       if (response != null)\r
-                               response.close();\r
-               }\r
-               return json;\r
-       }\r
-\r
-       /**\r
-        * Convenience method that builds and sends a POST request using properties\r
-        * to build the URI and populate header with credentials.\r
-        * \r
-        * @param path\r
-        *            last component(s) of REST endpoint name; e.g., "users" or\r
-        *            "user/ab1234/roles".\r
-        * @return JSON string fetched\r
-        * @throws Exception\r
-        *             if the HTTP response code is anything other than OK.\r
-        */\r
-       public static String postJson(final SharedContextTestProperties properties, final String path, final String json)\r
-                       throws Exception {\r
-               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //\r
-                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //\r
-                               + '/' + path;\r
-               return postJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PORT, -1), //\r
-                               properties.getProperty(SharedContextTestProperties.SECURE, true), //\r
-                               properties.getProperty(SharedContextTestProperties.UEBKEY), //\r
-                               properties.getProperty(SharedContextTestProperties.USERNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PASSWORD), //\r
-                               requestPath, //\r
-                               json);\r
-       }\r
-\r
-       /**\r
-        * Constructs and sends a POST request using the specified values.\r
-        * \r
-        * @param hostname\r
-        * @param port\r
-        * @param secure\r
-        *            If true, uses https; else http.\r
-        * @param requestPath\r
-        *            full path of the REST endpoint\r
-        * @param headerUebkey\r
-        * @param headerUsername\r
-        * @param headerPassword\r
-        * @param json\r
-        *            Content to post\r
-        * @return JSON result\r
-        * @throws Exception\r
-        */\r
-       public static String postJson(final String hostname, final int port, boolean secure, final String headerUebkey,\r
-                       final String headerUsername, final String headerPassword, final String requestPath, final String json)\r
-                       throws Exception {\r
-\r
-               URIBuilder builder = new URIBuilder();\r
-               if (secure)\r
-                       builder.setScheme("https");\r
-               else\r
-                       builder.setScheme("http");\r
-               builder.setHost(hostname);\r
-               if (port > 0)\r
-                       builder.setPort(port);\r
-               builder.setPath(requestPath);\r
-               final URI uri = builder.build();\r
-\r
-               CloseableHttpClient httpClient;\r
-               if (secure) {\r
-                       // Tell HttpClient to accept any server certificate for HTTPS.\r
-                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error\r
-                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {\r
-                               @Override\r
-                               public boolean isTrusted(final X509Certificate[] chain, final String authType)\r
-                                               throws CertificateException {\r
-                                       return true;\r
-                               }\r
-                       }).build();\r
-                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,\r
-                                       NoopHostnameVerifier.INSTANCE);\r
-                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();\r
-               } else {\r
-                       httpClient = HttpClients.createDefault();\r
-               }\r
-               HttpPost httpPost = new HttpPost(uri);\r
-               httpPost.setHeader("uebkey", headerUebkey);\r
-               httpPost.setHeader("username", headerUsername);\r
-               httpPost.setHeader("password", headerPassword);\r
-\r
-               StringEntity postEntity = new StringEntity(json, ContentType.create("application/json", Consts.UTF_8));\r
-               httpPost.setEntity(postEntity);\r
-\r
-               String responseJson = null;\r
-               CloseableHttpResponse response = null;\r
-               try {\r
-                       logger.debug("POST to " + uri);\r
-                       response = httpClient.execute(httpPost);\r
-                       logger.info("Status is " + response.getStatusLine());\r
-                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)\r
-                               throw new Exception("Status is " + response.getStatusLine().toString());\r
-\r
-                       HttpEntity entity = response.getEntity();\r
-                       if (entity == null) {\r
-                               logger.warn("Entity is null!");\r
-                       } else {\r
-                               long len = entity.getContentLength();\r
-                               if (len < 0)\r
-                                       logger.warn("Content length is -1");\r
-                               if (len < 2048) {\r
-                                       responseJson = EntityUtils.toString(entity);\r
-                                       logger.debug(responseJson);\r
-                               } else {\r
-                                       logger.warn("Not implemented - stream content");\r
-                               }\r
-                               EntityUtils.consume(entity);\r
-                       }\r
-               } finally {\r
-                       if (response != null)\r
-                               response.close();\r
-               }\r
-               return responseJson;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.net.URI;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.SSLContext;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * Provides reusable features for test cases to get or post from an REST
+ * endpoint, allowing use of HTTPS connections to servers that use self-signed
+ * certificates.
+ */
+public class SharedContextRestClient {
+
+       private static final Log logger = LogFactory.getLog(SharedContextRestClient.class);
+
+       /**
+        * Convenience method that builds and sends a GET request using properties
+        * to build the URI and populate header with credentials.
+        * 
+        * @param task
+        *            last component(s) of REST endpoint name; e.g., "get".
+        * @param contextId
+        * @param contextKey
+        * @return JSON string fetched
+        * @throws Exception
+        *             if the HTTP response code is anything other than OK.
+        */
+       public static String getJson(final SharedContextTestProperties properties, final String task,
+                       final String contextId, final String contextKey) throws Exception {
+               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //
+                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //
+                               + '/' + task;
+               return getJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //
+                               properties.getProperty(SharedContextTestProperties.PORT, -1), //
+                               properties.getProperty(SharedContextTestProperties.SECURE, true), //
+                               properties.getProperty(SharedContextTestProperties.UEBKEY), //
+                               properties.getProperty(SharedContextTestProperties.USERNAME), //
+                               properties.getProperty(SharedContextTestProperties.PASSWORD), requestPath, //
+                               contextId, //
+                               contextKey);
+       }
+
+       /**
+        * Constructs and sends a GET request using the specified values.
+        * 
+        * @param hostname
+        * @param port
+        *            ignored if negative
+        * @param secure
+        *            If true, uses https; else http.
+        * @param headerUebkey
+        * @param headerUsername
+        * @param headerPassword
+        * @param requestPath
+        *            full path of the REST endpoint
+        * @param contextId
+        * @param contextKey
+        * Ignored if null
+        * @return JSON result
+        */
+       public static String getJson(final String hostname, final int port, boolean secure, final String headerUebkey,
+                       final String headerUsername, final String headerPassword, final String requestPath, final String contextId,
+                       final String contextKey) throws Exception {
+
+               URIBuilder uriBuilder = new URIBuilder();
+               if (secure)
+                       uriBuilder.setScheme("https");
+               else
+                       uriBuilder.setScheme("http");
+               uriBuilder.setHost(hostname);
+               if (port > 0)
+                       uriBuilder.setPort(port);
+               uriBuilder.setPath(requestPath);
+               uriBuilder.addParameter("context_id", contextId);
+               if (contextKey != null)
+                       uriBuilder.addParameter("ckey", contextKey);
+               final URI uri = uriBuilder.build();
+
+               CloseableHttpClient httpClient;
+               if (secure) {
+                       // Tell HttpClient to accept any server certificate for HTTPS.
+                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error
+                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+                               @Override
+                               public boolean isTrusted(final X509Certificate[] chain, final String authType)
+                                               throws CertificateException {
+                                       return true;
+                               }
+                       }).build();
+                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,
+                                       NoopHostnameVerifier.INSTANCE);
+                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();
+               } else {
+                       httpClient = HttpClients.createDefault();
+               }
+
+               HttpGet httpGet = new HttpGet(uri);
+               httpGet.setHeader("uebkey", headerUebkey);
+               httpGet.setHeader("username", headerUsername);
+               httpGet.setHeader("password", headerPassword);
+
+               String json = null;
+               CloseableHttpResponse response = null;
+               try {
+                       logger.debug("GET from " + uri);
+                       response = httpClient.execute(httpGet);
+                       logger.info("Status is " + response.getStatusLine());
+                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)
+                               throw new Exception("Status is " + response.getStatusLine().toString());
+                       HttpEntity entity = response.getEntity();
+                       if (entity == null) {
+                               logger.warn("Entity is null!");
+                       } else {
+                               // entity content length is never set.
+                               // this naively tries to read everything.
+                               json = EntityUtils.toString(entity);
+                               EntityUtils.consume(entity);
+                       }
+               } finally {
+                       if (response != null)
+                               response.close();
+               }
+               return json;
+       }
+
+       /**
+        * Convenience method that builds and sends a POST request using properties
+        * to build the URI and populate header with credentials.
+        * 
+        * @param path
+        *            last component(s) of REST endpoint name; e.g., "users" or
+        *            "user/ab1234/roles".
+        * @return JSON string fetched
+        * @throws Exception
+        *             if the HTTP response code is anything other than OK.
+        */
+       public static String postJson(final SharedContextTestProperties properties, final String path, final String json)
+                       throws Exception {
+               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //
+                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //
+                               + '/' + path;
+               return postJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //
+                               properties.getProperty(SharedContextTestProperties.PORT, -1), //
+                               properties.getProperty(SharedContextTestProperties.SECURE, true), //
+                               properties.getProperty(SharedContextTestProperties.UEBKEY), //
+                               properties.getProperty(SharedContextTestProperties.USERNAME), //
+                               properties.getProperty(SharedContextTestProperties.PASSWORD), //
+                               requestPath, //
+                               json);
+       }
+
+       /**
+        * Constructs and sends a POST request using the specified values.
+        * 
+        * @param hostname
+        * @param port
+        * @param secure
+        *            If true, uses https; else http.
+        * @param requestPath
+        *            full path of the REST endpoint
+        * @param headerUebkey
+        * @param headerUsername
+        * @param headerPassword
+        * @param json
+        *            Content to post
+        * @return JSON result
+        * @throws Exception
+        */
+       public static String postJson(final String hostname, final int port, boolean secure, final String headerUebkey,
+                       final String headerUsername, final String headerPassword, final String requestPath, final String json)
+                       throws Exception {
+
+               URIBuilder builder = new URIBuilder();
+               if (secure)
+                       builder.setScheme("https");
+               else
+                       builder.setScheme("http");
+               builder.setHost(hostname);
+               if (port > 0)
+                       builder.setPort(port);
+               builder.setPath(requestPath);
+               final URI uri = builder.build();
+
+               CloseableHttpClient httpClient;
+               if (secure) {
+                       // Tell HttpClient to accept any server certificate for HTTPS.
+                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error
+                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+                               @Override
+                               public boolean isTrusted(final X509Certificate[] chain, final String authType)
+                                               throws CertificateException {
+                                       return true;
+                               }
+                       }).build();
+                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,
+                                       NoopHostnameVerifier.INSTANCE);
+                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();
+               } else {
+                       httpClient = HttpClients.createDefault();
+               }
+               HttpPost httpPost = new HttpPost(uri);
+               httpPost.setHeader("uebkey", headerUebkey);
+               httpPost.setHeader("username", headerUsername);
+               httpPost.setHeader("password", headerPassword);
+
+               StringEntity postEntity = new StringEntity(json, ContentType.create("application/json", Consts.UTF_8));
+               httpPost.setEntity(postEntity);
+
+               String responseJson = null;
+               CloseableHttpResponse response = null;
+               try {
+                       logger.debug("POST to " + uri);
+                       response = httpClient.execute(httpPost);
+                       logger.info("Status is " + response.getStatusLine());
+                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)
+                               throw new Exception("Status is " + response.getStatusLine().toString());
+
+                       HttpEntity entity = response.getEntity();
+                       if (entity == null) {
+                               logger.warn("Entity is null!");
+                       } else {
+                               long len = entity.getContentLength();
+                               if (len < 0)
+                                       logger.warn("Content length is -1");
+                               if (len < 2048) {
+                                       responseJson = EntityUtils.toString(entity);
+                                       logger.debug(responseJson);
+                               } else {
+                                       logger.warn("Not implemented - stream content");
+                               }
+                               EntityUtils.consume(entity);
+                       }
+               } finally {
+                       if (response != null)
+                               response.close();
+               }
+               return responseJson;
+       }
+
+}
index 723a67a..1224898 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/*package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.UUID;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.junit.Assert;\r
-\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-*//**\r
- * Tests the endpoints exposed by the Shared Context REST controller in Portal\r
- * Core.\r
- * \r
- * @author clott\r
- *//*\r
-public class SharedContextRestControllerTest {\r
-\r
-       private final Log logger = LogFactory.getLog(getClass());\r
-\r
-       private final SharedContextTestProperties properties;\r
-\r
-       private final String ckey = "ckey";\r
-       private final String cvalue = "cvalue";\r
-       \r
-       // Supposed to be a Portal session ID\r
-       private final String cxid = UUID.randomUUID().toString();\r
-\r
-       private final String key = "key123";\r
-       private final String value1 = "first value";\r
-       private final String value2 = "second value";\r
-\r
-       public SharedContextRestControllerTest() throws IOException {\r
-               properties = new SharedContextTestProperties();\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       //@Test\r
-       public void test() throws Exception {\r
-               String response = null, val = null;\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               Map<String, Object> responseMap, jsonMap;\r
-\r
-               logger.info("Get on empty context");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               // Should not exist - just generated the UUID\r
-               Map<String, Object> responseMap1 = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap1.get("response");\r
-               Assert.assertNull(response);\r
-\r
-               logger.info("Set a new context");\r
-               response = setContext(cxid, key, value1);\r
-               Assert.assertNotNull(response);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               String responseValue = (String) responseMap.get("response");\r
-               Assert.assertNotNull(responseValue);\r
-               Assert.assertEquals("added", responseValue);\r
-\r
-               logger.info("Get existing context");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               jsonMap = (Map<String,Object>) responseMap.get("response");\r
-               Assert.assertNotNull(jsonMap);\r
-               val = (String) jsonMap.get(cvalue);\r
-               Assert.assertEquals(val, value1);\r
-\r
-               logger.info("Overwrite exiting context");\r
-               response = setContext(cxid, key, value2);\r
-               Assert.assertNotNull(response);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap.get("response");\r
-               Assert.assertNotNull(responseValue);\r
-               // Assert.assertEquals("replaced", responseValue);\r
-\r
-               logger.info("Get existing context to verify overwrite");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               jsonMap = (Map<String,Object>) responseMap.get("response");\r
-               Assert.assertNotNull(jsonMap);\r
-               val = (String) jsonMap.get(cvalue);\r
-               Assert.assertEquals(val, value2);\r
-\r
-               logger.info("Delete one context");\r
-               response = SharedContextRestClient.getJson(properties, "remove", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap.get("response");\r
-               Assert.assertEquals(response, "removed");\r
-\r
-               logger.info("Clear the context");\r
-               response = SharedContextRestClient.getJson(properties, "clear", cxid, null);\r
-               Assert.assertEquals("", response);\r
-       }\r
-\r
-       private String setContext(String context, String id, String value) throws Exception {\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               HashMap<String,String> stringMap = new HashMap<String,String>();\r
-               stringMap.put("context_id", cxid);\r
-               stringMap.put(ckey, key);\r
-               stringMap.put(cvalue, value2);\r
-               String json = mapper.writeValueAsString(stringMap);\r
-               String response = SharedContextRestClient.postJson(properties, "set", json);\r
-               return response;\r
-       }\r
-}\r
-*/\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/*package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Assert;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+*//**
+ * Tests the endpoints exposed by the Shared Context REST controller in Portal
+ * Core.
+ * 
+ * @author clott
+ *//*
+public class SharedContextRestControllerTest {
+
+       private final Log logger = LogFactory.getLog(getClass());
+
+       private final SharedContextTestProperties properties;
+
+       private final String ckey = "ckey";
+       private final String cvalue = "cvalue";
+       
+       // Supposed to be a Portal session ID
+       private final String cxid = UUID.randomUUID().toString();
+
+       private final String key = "key123";
+       private final String value1 = "first value";
+       private final String value2 = "second value";
+
+       public SharedContextRestControllerTest() throws IOException {
+               properties = new SharedContextTestProperties();
+       }
+
+       @SuppressWarnings("unchecked")
+       //@Test
+       public void test() throws Exception {
+               String response = null, val = null;
+               ObjectMapper mapper = new ObjectMapper();
+               Map<String, Object> responseMap, jsonMap;
+
+               logger.info("Get on empty context");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               // Should not exist - just generated the UUID
+               Map<String, Object> responseMap1 = mapper.readValue(response, Map.class);
+               response = (String) responseMap1.get("response");
+               Assert.assertNull(response);
+
+               logger.info("Set a new context");
+               response = setContext(cxid, key, value1);
+               Assert.assertNotNull(response);
+               responseMap = mapper.readValue(response, Map.class);
+               String responseValue = (String) responseMap.get("response");
+               Assert.assertNotNull(responseValue);
+               Assert.assertEquals("added", responseValue);
+
+               logger.info("Get existing context");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               jsonMap = (Map<String,Object>) responseMap.get("response");
+               Assert.assertNotNull(jsonMap);
+               val = (String) jsonMap.get(cvalue);
+               Assert.assertEquals(val, value1);
+
+               logger.info("Overwrite exiting context");
+               response = setContext(cxid, key, value2);
+               Assert.assertNotNull(response);
+               responseMap = mapper.readValue(response, Map.class);
+               response = (String) responseMap.get("response");
+               Assert.assertNotNull(responseValue);
+               // Assert.assertEquals("replaced", responseValue);
+
+               logger.info("Get existing context to verify overwrite");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               jsonMap = (Map<String,Object>) responseMap.get("response");
+               Assert.assertNotNull(jsonMap);
+               val = (String) jsonMap.get(cvalue);
+               Assert.assertEquals(val, value2);
+
+               logger.info("Delete one context");
+               response = SharedContextRestClient.getJson(properties, "remove", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               response = (String) responseMap.get("response");
+               Assert.assertEquals(response, "removed");
+
+               logger.info("Clear the context");
+               response = SharedContextRestClient.getJson(properties, "clear", cxid, null);
+               Assert.assertEquals("", response);
+       }
+
+       private String setContext(String context, String id, String value) throws Exception {
+               ObjectMapper mapper = new ObjectMapper();
+               HashMap<String,String> stringMap = new HashMap<String,String>();
+               stringMap.put("context_id", cxid);
+               stringMap.put(ckey, key);
+               stringMap.put(cvalue, value2);
+               String json = mapper.writeValueAsString(stringMap);
+               String response = SharedContextRestClient.postJson(properties, "set", json);
+               return response;
+       }
+}
+*/
index baed554..9344150 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.Properties;\r
-\r
-/**\r
- * Trivial extension of Properties that populates itself from a known source.\r
- */\r
-public class SharedContextTestProperties extends Properties {\r
-\r
-       private static final long serialVersionUID = -4064100267979036550L;\r
-\r
-       // property names\r
-       public static final String HOSTNAME = "hostname";\r
-       public static final String PORT = "port";\r
-       public static final String SECURE = "secure";\r
-       public static final String APPNAME = "appname";\r
-       public static final String RESTPATH = "restpath";\r
-       public static final String UEBKEY = "uebkey";\r
-       public static final String USERNAME = "username";\r
-       public static final String PASSWORD = "password";\r
-\r
-       /**\r
-        * Expected on the classpath\r
-        */\r
-       private static final String propertiesFileName = "shared-context-test.properties";\r
-\r
-       /**\r
-        * Constructor populates itself from properties file found in same package.\r
-        * \r
-        * @throws Exception\r
-        */\r
-       public SharedContextTestProperties() throws IOException {\r
-               InputStream inStream = getClass().getResourceAsStream(propertiesFileName);\r
-               if (inStream == null)\r
-                       throw new IOException("Failed to find file on classpath: " + propertiesFileName);\r
-               super.load(inStream);\r
-               inStream.close();\r
-       }\r
-\r
-       public int getProperty(final String name, final int defVal) throws NumberFormatException {\r
-               String prop = getProperty(name);\r
-               if (prop == null)\r
-                       return defVal;\r
-               return Integer.parseInt(prop);\r
-       }\r
-       \r
-       public boolean getProperty(final String name, final boolean defVal) {\r
-               String prop = getProperty(name);\r
-               if (prop == null)\r
-                       return false;\r
-               return Boolean.parseBoolean(prop);\r
-       }\r
-       \r
-       // Test this class\r
-       public static void main(String[] args) throws Exception {\r
-               SharedContextTestProperties p = new SharedContextTestProperties();\r
-               System.out.println("Property " + SharedContextTestProperties.HOSTNAME + " = "\r
-                               + p.getProperty(SharedContextTestProperties.HOSTNAME));\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * Trivial extension of Properties that populates itself from a known source.
+ */
+public class SharedContextTestProperties extends Properties {
+
+       private static final long serialVersionUID = -4064100267979036550L;
+
+       // property names
+       public static final String HOSTNAME = "hostname";
+       public static final String PORT = "port";
+       public static final String SECURE = "secure";
+       public static final String APPNAME = "appname";
+       public static final String RESTPATH = "restpath";
+       public static final String UEBKEY = "uebkey";
+       public static final String USERNAME = "username";
+       public static final String PASSWORD = "password";
+
+       /**
+        * Expected on the classpath
+        */
+       private static final String propertiesFileName = "shared-context-test.properties";
+
+       /**
+        * Constructor populates itself from properties file found in same package.
+        * 
+        * @throws Exception
+        */
+       public SharedContextTestProperties() throws IOException {
+               InputStream inStream = getClass().getResourceAsStream(propertiesFileName);
+               if (inStream == null)
+                       throw new IOException("Failed to find file on classpath: " + propertiesFileName);
+               super.load(inStream);
+               inStream.close();
+       }
+
+       public int getProperty(final String name, final int defVal) throws NumberFormatException {
+               String prop = getProperty(name);
+               if (prop == null)
+                       return defVal;
+               return Integer.parseInt(prop);
+       }
+       
+       public boolean getProperty(final String name, final boolean defVal) {
+               String prop = getProperty(name);
+               if (prop == null)
+                       return false;
+               return Boolean.parseBoolean(prop);
+       }
+       
+       // Test this class
+       public static void main(String[] args) throws Exception {
+               SharedContextTestProperties p = new SharedContextTestProperties();
+               System.out.println("Property " + SharedContextTestProperties.HOSTNAME + " = "
+                               + p.getProperty(SharedContextTestProperties.HOSTNAME));
+       }
+}
index cfdf3b7..f6315ab 100644 (file)
@@ -1,28 +1,28 @@
-###\r
-# ================================================================================\r
-# ECOMP Portal\r
-# ================================================================================\r
-# Copyright (C) 2017 AT&T Intellectual Property\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-# \r
-#      http://www.apache.org/licenses/LICENSE-2.0\r
-# \r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-# ================================================================================\r
-###\r
-\r
-hostname= ecomp.homer.att.com\r
-# port = 80\r
-secure = true\r
-appname = ecompportal\r
-restpath = context\r
-uebkey = xgnLrmNmkfCRnIwa\r
-username = Default\r
-password = AppPassword!1\r
+###
+# ================================================================================
+# ECOMP Portal
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ================================================================================
+###
+
+hostname= ecomp.homer.att.com
+# port = 80
+secure = true
+appname = ecompportal
+restpath = context
+uebkey = xgnLrmNmkfCRnIwa
+username = Default
+password = AppPassword!1
index 6d01f2c..f87f5bd 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.listener;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import org.junit.Test;\r
-\r
-public class HealthMonitorTest {\r
-\r
-       @Test\r
-       public void initialFlagsTest() {\r
-               assertEquals(false, HealthMonitor.isBackEndUp());\r
-               assertEquals(false, HealthMonitor.isFrontEndUp());\r
-               assertEquals(false, HealthMonitor.isDatabaseUp());\r
-               assertEquals(false, HealthMonitor.isUebUp());\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.listener;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class HealthMonitorTest {
+
+       @Test
+       public void initialFlagsTest() {
+               assertEquals(false, HealthMonitor.isBackEndUp());
+               assertEquals(false, HealthMonitor.isFrontEndUp());
+               assertEquals(false, HealthMonitor.isDatabaseUp());
+               assertEquals(false, HealthMonitor.isUebUp());
+       }
+       
+}
index b8b7bb1..c71c8a1 100644 (file)
@@ -1,37 +1,37 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import org.junit.Test;\r
-\r
-public class EcompPortalUtilsTest {\r
-\r
-       @Test\r
-       public void legitimateAttuidSuccessTest() {\r
-               assertEquals(true, EcompPortalUtils.legitimateUserId("mm016f"));\r
-       }\r
-\r
-       @Test\r
-       public void legitimateAttuidFailureTest() {\r
-               assertEquals(false, EcompPortalUtils.legitimateUserId("1#@23456"));\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class EcompPortalUtilsTest {
+
+       @Test
+       public void legitimateAttuidSuccessTest() {
+               assertEquals(true, EcompPortalUtils.legitimateUserId("mm016f"));
+       }
+
+       @Test
+       public void legitimateAttuidFailureTest() {
+               assertEquals(false, EcompPortalUtils.legitimateUserId("1#@23456"));
+       }
+}
index 09ae55b..6464c27 100644 (file)
@@ -1,23 +1,22 @@
-# ECOMP Portal Web Application Back End Common Files
+# ECOMP Portal Web Application Back End for Open Source
 
 ## Overview
 
-This is a Maven overlay project with the ECOMP Portal back-end common files. 
-This is not a stand-alone web application.  This project has common Java classes
-that are used for the ECOMP Portal web application.  Those specific versions are built using separate
-Maven projects that copy in ("overlay") the contents of this project at package time.
+This is a Maven project with the ECOMP Portal web application back-end files
+for public release, containing Java files specific to requirements of the
+open-source version.  This project uses the Maven war plugin to copy in
+("overlay") the contents of the ECOMP Portal web application back-end
+common distribution at package time.
 
+Use Apache Maven to build, package and deploy this webapp to a web container
+like Apache Tomcat.  Eclipse users must install the M2E-WTP connector, see 
+https://www.eclipse.org/m2e-wtp/
 
 ## Release Notes
 
-Release notes for all ECOMP Portal *COMMON* files, back-end files and front-end files,
-are tracked here for convenience.
+Version 1.1.0, July 2017
+- [Portal-7] Improvements added as part of the rebasing process
+- [Portal-6] Updates to License and Trademark in the PORTAL Source Code
 
-The last number in each build identifier is assigned by the Jenkins CI system to
-the back-end component.
-
-
-
-Build 1.1.0-SNAPSHOT, ?? May 2017
-[ PORTAL 7] Rebase; This rebasing includes addition of common libraries and common overlays projects
-and abstraction of components
\ No newline at end of file
+Version 1.0.0, February 2017
+- Initial release
index 8ff8768..0e7eb0b 100644 (file)
@@ -20,7 +20,6 @@
                <nexusproxy>https://nexus.onap.org</nexusproxy>
                <snapshotNexusPath>content/repositories/snapshots/</snapshotNexusPath>
                <releaseNexusPath>content/repositories/releases/</releaseNexusPath>
-               <stagingNexusPath>content/repositories/staging/</stagingNexusPath>
        </properties>
 
        <reporting>
@@ -41,7 +40,6 @@
                                        <useStandardDocletOptions>true</useStandardDocletOptions>
                                </configuration>
                        </plugin>
-               
                </plugins>
        </reporting>
        <distributionManagement>
                </site>
        </distributionManagement>
        <repositories>
-                               <repository>
-                       <!-- Snapshots repository has ECOMP snapshot artifacts -->
+               <repository>
                        <id>ecomp-releases</id>
                        <name>OpenECOMP - Release Repository</name>
                        <url>${nexusproxy}/${releaseNexusPath}</url>
                </repository>
                <repository>
-                       <!-- Snapshots repository has ECOMP snapshot artifacts -->
-                       <id>ecomp-snapshots</id>
-                       <name>OpenECOMP - Snapshot Repository</name>
-                       <url>${nexusproxy}/${snapshotNexusPath}</url>
-               </repository>
-               <repository>
-                       <!-- Staging repository has ECOMP staging artifacts -->
-                       <id>ecomp-staging</id>
-                       <name>OpenECOMP - Staging Repository</name>
-                       <url>${nexusproxy}/${stagingNexusPath}</url>
+                       <id>ecomp-snapshots</id>
+                       <name>OpenECOMP - Snapshot Repository</name>
+                       <url>${nexusproxy}/${snapshotNexusPath}</url>
                </repository>
                <repository>
-                       <!-- Snapshots repository has ECOMP snapshot artifacts -->
-                                       <id>ecomp-public</id>
-                       <name>ecomp onap public Repository</name>
-                       <url>https://nexus.onap.org/content/groups/public</url>
+                       <id>ecomp-public</id>
+                       <name>ecomp onap public Repository</name>
+                       <url>https://nexus.onap.org/content/groups/public</url>
                </repository>
        </repositories>
 
                        </exclusions>
                </dependency>
 
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>aspectjrt</artifactId>
+                       <version>1.8.9</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.aspectj</groupId>
+                       <artifactId>aspectjweaver</artifactId>
+                       <version>1.8.9</version>
+               </dependency>
 
        </dependencies>
 </project>
index 971c671..a16cf56 100644 (file)
@@ -97,6 +97,7 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
 
        @Override
        public void addResourceHandlers(ResourceHandlerRegistry registry) {
+               registry.addResourceHandler("/app/fusion/**").addResourceLocations("/app/fusion/");             
                registry.addResourceHandler("/static/**").addResourceLocations("/static/");
                registry.addResourceHandler("/images/**").addResourceLocations("/images/");
                registry.addResourceHandler("/**").addResourceLocations("/public/");
index 1f45d98..67f79b8 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal SDK\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.controller;\r
-\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-\r
-import javax.servlet.http.HttpServletRequest;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.openecomp.portalsdk.core.auth.LoginStrategy;\r
-import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;\r
-import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;\r
-import org.openecomp.portalsdk.core.service.LoginService;\r
-import org.openecomp.portalsdk.core.service.ProfileService;\r
-import org.openecomp.portalsdk.core.web.support.AppUtils;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.bind.annotation.RequestMethod;\r
-import org.springframework.web.servlet.ModelAndView;\r
-\r
-@Controller\r
-@RequestMapping("/")\r
-public class ONAPLoginController extends UnRestrictedBaseController {\r
-       @Autowired\r
-       ProfileService service;\r
-       @Autowired\r
-       private LoginService loginService;\r
-       @Autowired\r
-       private LoginStrategy loginStrategy;\r
-       String viewName;\r
-\r
-       @RequestMapping(value = { "/doLogin" }, method = RequestMethod.GET)\r
-       public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {\r
-               return loginStrategy.doLogin(request, response);\r
-       }\r
-\r
-       public String getJessionId(HttpServletRequest request) {\r
-               return request.getSession().getId();\r
-       }\r
-\r
-       protected void initateSessionMgtHandler(HttpServletRequest request) {\r
-               String jSessionId = getJessionId(request);\r
-               PortalTimeoutHandler.sessionCreated(jSessionId, jSessionId, AppUtils.getSession(request));\r
-       }\r
-\r
-       public String getViewName() {\r
-               return viewName;\r
-       }\r
-\r
-       public void setViewName(String viewName) {\r
-               this.viewName = viewName;\r
-       }\r
-\r
-       public LoginService getLoginService() {\r
-               return loginService;\r
-       }\r
-\r
-       public void setLoginService(LoginService loginService) {\r
-               this.loginService = loginService;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.auth.LoginStrategy;
+import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
+import org.openecomp.portalsdk.core.service.LoginService;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class ONAPLoginController extends UnRestrictedBaseController {
+       @Autowired
+       ProfileService service;
+       @Autowired
+       private LoginService loginService;
+       @Autowired
+       private LoginStrategy loginStrategy;
+       String viewName;
+
+       @RequestMapping(value = { "/doLogin" }, method = RequestMethod.GET)
+       public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {
+               return loginStrategy.doLogin(request, response);
+       }
+
+       public String getJessionId(HttpServletRequest request) {
+               return request.getSession().getId();
+       }
+
+       protected void initateSessionMgtHandler(HttpServletRequest request) {
+               String jSessionId = getJessionId(request);
+               PortalTimeoutHandler.sessionCreated(jSessionId, jSessionId, AppUtils.getSession(request));
+       }
+
+       public String getViewName() {
+               return viewName;
+       }
+
+       public void setViewName(String viewName) {
+               this.viewName = viewName;
+       }
+
+       public LoginService getLoginService() {
+               return loginService;
+       }
+
+       public void setLoginService(LoginService loginService) {
+               this.loginService = loginService;
+       }
+
+}
index 074821f..1f82938 100644 (file)
@@ -20,7 +20,9 @@
 package org.openecomp.portalapp.portal.service;
 
 
+import java.security.GeneralSecurityException;
 import java.util.ArrayList;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.TreeSet;
 
@@ -33,6 +35,9 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import com.att.nsa.cambria.client.CambriaClientFactory;
+import com.att.nsa.cambria.client.CambriaTopicManager;
+
 @Service("epAppService")
 @Transactional
 @org.springframework.context.annotation.Configuration
@@ -68,4 +73,9 @@ public class EPAppServiceImpl extends EPAppCommonServiceImpl implements EPAppSer
                        return userApps;
        
        }
+       
+       public CambriaTopicManager getTopicManager(LinkedList<String> urlList, String key, String secret) throws GeneralSecurityException, Exception{
+               return CambriaClientFactory.createTopicManager( null, urlList, key, secret);
+       }
+
 }
\ No newline at end of file
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/UserRolesService.java
deleted file mode 100644 (file)
index b285051..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*-
- * ================================================================================
- * ECOMP Portal
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * 
- *      http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ================================================================================
- */
-package org.openecomp.portalapp.portal.service;
-
-import java.util.List;
-
-import org.apache.cxf.transport.http.HTTPException;
-import org.openecomp.portalapp.portal.domain.EPRole;
-import org.openecomp.portalapp.portal.domain.EPUser;
-import org.openecomp.portalapp.portal.domain.EPUserApp;
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
-import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
-
-public interface UserRolesService {
-
-       public List<RoleInAppForUser> getAppRolesForUser(Long appId, String userId);
-
-       public boolean setAppWithUserRoleStateForUser(EPUser user, AppWithRolesForUser newAppRolesForUser);
-
-       public List<UserApplicationRoles> getUsersFromAppEndpoint(Long appId) throws HTTPException;
-
-       public List<EPRole> importRolesFromRemoteApplication(Long appId) throws HTTPException;
-       
-       
-       /**
-        * Gets entries from the local fn_user_role table for the specified user and
-        * app.
-        * 
-        * @param appId
-        *            ID of row in fn_app
-        * @param userid
-        *            ID of row in fn_user
-        * @return List of EPRole; empty if none found.
-        */
-       public List<EPUserApp> getCachedAppRolesForUser(Long appId, Long userId);
-       
-       public String updateRemoteUserProfile(String orgUserId, Long appId);
-
-
-}
index a0aac92..1f98e75 100644 (file)
 package org.openecomp.portalapp.portal.service;
 
 import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
 
-import javax.annotation.PostConstruct;
-
-import org.apache.commons.lang.StringUtils;
 import org.apache.cxf.transport.http.HTTPException;
-import org.hibernate.Query;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.Transaction;
 import org.openecomp.portalapp.portal.domain.EPApp;
 import org.openecomp.portalapp.portal.domain.EPRole;
 import org.openecomp.portalapp.portal.domain.EPUser;
 import org.openecomp.portalapp.portal.domain.EPUserApp;
 import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
-import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
-import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
-import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
-import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
 import org.openecomp.portalapp.portal.transport.RemoteUserWithRoles;
-import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
-import org.openecomp.portalapp.portal.transport.RolesInAppForUser;
 import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
-import org.openecomp.portalapp.portal.utils.EPSystemProperties;
-import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.restful.domain.EcompRole;
 import org.openecomp.portalsdk.core.service.DataAccessService;
-import org.openecomp.portalsdk.core.service.UserProfileService;
-import org.openecomp.portalsdk.core.util.SystemProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 
@@ -71,398 +45,14 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 @org.springframework.context.annotation.Configuration
 @EnableAspectJAutoProxy
 @EPMetricsLog
-public class UserRolesServiceImpl implements UserRolesService {
-       private static Long ACCOUNT_ADMIN_ROLE_ID = 999L;
+public class UserRolesServiceImpl extends UserRolesCommonServiceImpl implements UserRolesService {
 
        private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserRolesServiceImpl.class);
 
-       @Autowired
-       private SessionFactory sessionFactory;
        @Autowired
        private DataAccessService dataAccessService;
        @Autowired
-       SearchService searchService;
-       @Autowired
-       EPAppService appsService;
-       @Autowired
-       EPLdapService ldapService;
-       @Autowired
-       ApplicationsRestClientService applicationsRestClientService;
-       @Autowired
-       EPRoleService epRoleService;
-       @Autowired
-       UserProfileService userProfileService;
-
-       @PostConstruct
-       private void init() {
-               try {
-                       ACCOUNT_ADMIN_ROLE_ID = Long
-                                       .valueOf(SystemProperties.getProperty(EPSystemProperties.ACCOUNT_ADMIN_ROLE_ID));
-               } catch (Exception e) {
-                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
-               }
-       }
-
-       private static HashMap<Long, EcompRole> hashMapFromEcompRoles(EcompRole[] ecompRoles) {
-               HashMap<Long, EcompRole> result = new HashMap<Long, EcompRole>();
-               if (ecompRoles != null) {
-                       for (int i = 0; i < ecompRoles.length; i++) {
-                               if (ecompRoles[i].getId() != null) {
-                                       result.put(ecompRoles[i].getId(), ecompRoles[i]);
-                               }
-                       }
-               }
-               return result;
-       }
-
-       private void createLocalUserIfNecessary(String orgUserId) {
-               if (StringUtils.isEmpty(orgUserId)) {
-                       logger.error(EELFLoggerDelegate.errorLogger, "createLocalUserIfNecessary : empty orgUserId!");
-                       return;
-               }
-               Session localSession = null;
-               Transaction transaction = null;
-               try {
-                       localSession = sessionFactory.openSession();
-                       transaction = localSession.beginTransaction();
-                       @SuppressWarnings("unchecked")
-                       List<EPUser> userList = localSession
-                                       .createQuery("from " + EPUser.class.getName() + " where org_user_id='" + orgUserId + "'").list();
-                       if (userList.size() == 0) {
-                               EPUser client = searchService.searchUserByUserId(orgUserId);
-                               if (client == null) {
-                                       String msg = "cannot create user " + orgUserId + ", because he cannot be found in phonebook";
-                                       logger.error(EELFLoggerDelegate.errorLogger, msg);
-                               } else {
-                                       client.setLoginId(orgUserId);
-                                       client.setActive(true);
-                                       localSession.save(client);
-                               }
-                       }
-                       transaction.commit();
-               } catch (Exception e) {
-                       EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
-                       EcompPortalUtils.rollbackTransaction(transaction, "searchOrCreateUser rollback, exception = " + e);
-               } finally {
-                       EcompPortalUtils.closeLocalSession(localSession, "searchOrCreateUser");
-               }
-       }
-
-       private static void syncUserRoles(SessionFactory sessionFactory, String orgUserId, Long appId,
-                       EcompRole[] userAppRoles) throws Exception {
-               HashMap<Long, EcompRole> newUserAppRolesMap = hashMapFromEcompRoles(userAppRoles);
-               boolean result = false;
-               Session localSession = null;
-               Transaction transaction = null;
-
-               try {
-                       localSession = sessionFactory.openSession();
-                       transaction = localSession.beginTransaction();
-                       @SuppressWarnings("unchecked")
-                       List<EPUser> userList = localSession
-                                       .createQuery("from " + EPUser.class.getName() + " where org_user_id='" + orgUserId + "'").list();
-                       if (userList.size() > 0) {
-                               EPUser client = userList.get(0);
-                               @SuppressWarnings("unchecked")
-                               List<EPUserApp> userRoles = localSession.createQuery("from " + EPUserApp.class.getName()
-                                               + " where app.id=" + appId + " and userId=" + client.getId()).list();
-                               for (EPUserApp userRole : userRoles) {
-                                       if (!userRole.getRoleId().equals(ACCOUNT_ADMIN_ROLE_ID)) {
-
-                                               Long userAppRoleId = userRole.getAppRoleId();
-                                               if (!newUserAppRolesMap.containsKey(userAppRoleId)) {
-                                                       localSession.delete(userRole);
-                                               } else {
-                                                       newUserAppRolesMap.remove(userAppRoleId);
-                                               }
-                                       }
-                               }
-                               Collection<EcompRole> newRolesToAdd = newUserAppRolesMap.values();
-                               if (newRolesToAdd.size() > 0) {
-                                       EPApp app = (EPApp) localSession.get(EPApp.class, appId);
-                                       @SuppressWarnings("unchecked")
-                                       List<EPRole> roles = localSession
-                                                       .createQuery("from " + EPRole.class.getName() + " where appId=" + appId).list();
-                                       HashMap<Long, EPRole> rolesMap = new HashMap<Long, EPRole>();
-                                       for (EPRole role : roles) {
-                                               rolesMap.put(role.getAppRoleId(), role);
-                                       }
-                                       for (EcompRole userRole : newRolesToAdd) {
-                                               EPUserApp userApp = new EPUserApp();
-                                               userApp.setUserId(client.getId());
-                                               userApp.setApp(app);
-                                               userApp.setRole(rolesMap.get(userRole.getId()));
-                                               localSession.save(userApp);
-                                       }
-                               }
-                       }
-                       transaction.commit();
-                       result = true;
-               } catch (Exception e) {
-                       EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
-                       EcompPortalUtils.rollbackTransaction(transaction,
-                                       "Exception occurred in syncUserRoles, Details: " + EcompPortalUtils.getStackTrace(e));
-               } finally {
-                       localSession.close();
-                       if (!result) {
-                               throw new Exception(
-                                               "Exception occurred in syncUserRoles while closing database session for app: '" + appId + "'.");
-                       }
-               }
-       }
-
-       // Called when getting the list of roles for the user
-       private List<RoleInAppForUser> constructRolesInAppForUserGet(EcompRole[] appRoles, EcompRole[] userAppRoles) {
-               List<RoleInAppForUser> rolesInAppForUser = new ArrayList<RoleInAppForUser>();
-
-               Set<Long> userAppRolesMap = new HashSet<Long>();
-               if (userAppRoles != null) {
-                       for (EcompRole ecompRole : userAppRoles) {
-                               userAppRolesMap.add(ecompRole.getId());
-                       }
-               } else {
-                       String message = String
-                                       .format("UserRolesServiceImpl.constructRolesInAppForUserGet has received userAppRoles list empty.");
-                       logger.info(EELFLoggerDelegate.errorLogger, message);
-               }
-
-               if (appRoles != null) {
-                       for (EcompRole ecompRole : appRoles) {
-                               RoleInAppForUser roleForUser = new RoleInAppForUser(ecompRole.getId(), ecompRole.getName());
-                               roleForUser.isApplied = userAppRolesMap.contains(ecompRole.getId());
-                               rolesInAppForUser.add(roleForUser);
-                       }
-               } else {
-                       String message = String
-                                       .format("UserRolesServiceImpl.constructRolesInAppForUser has received appRoles list empty.");
-                       logger.info(EELFLoggerDelegate.errorLogger, message);
-               }
-               return rolesInAppForUser;
-       }
-
-       public List<RoleInAppForUser> getAppRolesForUser(Long appId, String orgUserId) {
-               List<RoleInAppForUser> rolesInAppForUser = null;
-               try {
-                       EcompRole[] appRoles = applicationsRestClientService.get(EcompRole[].class, appId, "/roles");
-
-                       // Test this error case, for generating an internal Ecomp Portal
-                       // error
-                       // EcompRole[] appRoles = null;
-                       // If there is an exception in the rest client api, then null will
-                       // be returned.
-                       if (appRoles != null) {
-                               syncAppRoles(sessionFactory, appId, appRoles);
-                               EcompRole[] userAppRoles;
-                               try {
-                                       userAppRoles = applicationsRestClientService.get(EcompRole[].class, appId,
-                                                       String.format("/user/%s/roles", orgUserId));
-                                       if (userAppRoles == null) {
-                                               if (EcompPortalUtils.getExternalAppResponseCode() == 400) {
-                                                       EcompPortalUtils.setExternalAppResponseCode(200);
-                                                       logger.error(EELFLoggerDelegate.errorLogger,
-                                                                       "400 returned from /user/{userid}/roles, assuming user doesn't exist, app is framework SDK based, and things are ok. Overriding to 200 until framework SDK returns a useful response.");
-                                                       logger.debug(EELFLoggerDelegate.debugLogger,
-                                                                       "400 returned from /user/{userid}/roles, assuming user doesn't exist, app is framework SDK based, and things are ok. Overriding to 200 until framework SDK returns a useful response.");
-                                               }
-                                       }
-                                       // If the remote application isn't down we MUST to sync user
-                                       // roles here in case we have this user here!
-                                       syncUserRoles(sessionFactory, orgUserId, appId, userAppRoles);
-                               } catch (Exception e) {
-                                       // TODO: we may need to check if user exists, maybe remote
-                                       // app is down.
-                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
-                                       logger.error(EELFLoggerDelegate.errorLogger,
-                                                       "LR: user " + orgUserId + " does not exist in remote application: " + appId + ".");
-                                       userAppRoles = new EcompRole[0];
-                               }
-                               rolesInAppForUser = constructRolesInAppForUserGet(appRoles, userAppRoles);
-                               // Test this error case, for generating an external app error
-                               // EcompPortalUtils.setResponseCode(404);
-                       }
-               } catch (Exception e) {
-                       String message = String.format(
-                                       "Received an exception while performing getAppRolesForUser for the User %s, and for the AppId %s, Details: %s",
-                                       orgUserId, Long.toString(appId), EcompPortalUtils.getStackTrace(e));
-                       logger.error(EELFLoggerDelegate.errorLogger, message);
-               }
-               return rolesInAppForUser;
-
-       }
-
-       // copies of methods in GetAppsWithUserRoleState
-       private void syncAppRoles(SessionFactory sessionFactory, Long appId, EcompRole[] appRoles) throws Exception {
-               logger.debug(EELFLoggerDelegate.debugLogger, "entering syncAppRoles for appId: " + appId);
-               HashMap<Long, EcompRole> newRolesMap = hashMapFromEcompRoles(appRoles);
-               boolean result = false;
-               Session localSession = null;
-               Transaction transaction = null;
-
-               try {
-                       localSession = sessionFactory.openSession();
-                       transaction = localSession.beginTransaction();
-                       // Attention! All roles from remote application supposed to be
-                       // active!
-                       @SuppressWarnings("unchecked")
-                       List<EPRole> currentAppRoles = localSession
-                                       .createQuery("from " + EPRole.class.getName() + " where appId=" + appId).list();
-                       List<EPRole> obsoleteRoles = new ArrayList<EPRole>();
-                       for (int i = 0; i < currentAppRoles.size(); i++) {
-                               EPRole oldAppRole = currentAppRoles.get(i);
-                               if (oldAppRole.getAppRoleId() != null) {
-                                       EcompRole role = null;
-                                       role = newRolesMap.get(oldAppRole.getAppRoleId());
-                                       if (role != null) {
-                                               if (!(role.getName() == null || oldAppRole.getName().equals(role.getName()))) {
-                                                       oldAppRole.setName(role.getName());
-                                                       localSession.update(oldAppRole);
-                                               }
-                                               newRolesMap.remove(oldAppRole.getAppRoleId());
-                                       } else {
-                                               obsoleteRoles.add(oldAppRole);
-                                       }
-                               } else {
-                                       obsoleteRoles.add(oldAppRole);
-                               }
-                       }
-                       Collection<EcompRole> newRolesToAdd = newRolesMap.values();
-                       for (EcompRole role : newRolesToAdd) {
-                               logger.debug(EELFLoggerDelegate.debugLogger, "about to add missing role: " + role.toString());
-                               EPRole newRole = new EPRole();
-                               // Attention! All roles from remote application supposed to be
-                               // active!
-                               newRole.setActive(true);
-                               newRole.setName(role.getName());
-                               newRole.setAppId(appId);
-                               newRole.setAppRoleId(role.getId());
-                               localSession.save(newRole);
-                       }
-                       if (obsoleteRoles.size() > 0) {
-                               logger.debug(EELFLoggerDelegate.debugLogger, "we have obsolete roles to delete");
-                               for (EPRole role : obsoleteRoles) {
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "obsolete role: " + role.toString());
-                                       Long roleId = role.getId();
-                                       // delete obsolete roles here
-                                       // Must delete all records with foreign key constraints on
-                                       // fn_role:
-                                       // fn_user_role, fn_role_composite, fn_role_function,
-                                       // fn_user_pseudo_role, fn_menu_functional_roles.
-                                       // And for fn_menu_functional, if no other roles for that
-                                       // menu item, remove the url.
-
-                                       // Delete from fn_user_role
-                                       @SuppressWarnings("unchecked")
-                                       List<EPUserApp> userRoles = localSession.createQuery(
-                                                       "from " + EPUserApp.class.getName() + " where app.id=" + appId + " and role_id=" + roleId)
-                                                       .list();
-
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "number of userRoles to delete: " + userRoles.size());
-                                       for (EPUserApp userRole : userRoles) {
-                                               logger.debug(EELFLoggerDelegate.debugLogger,
-                                                               "about to delete userRole: " + userRole.toString());
-                                               localSession.delete(userRole);
-                                               logger.debug(EELFLoggerDelegate.debugLogger,
-                                                               "finished deleting userRole: " + userRole.toString());
-                                       }
-
-                                       // Delete from fn_menu_functional_roles
-                                       @SuppressWarnings("unchecked")
-                                       List<FunctionalMenuRole> funcMenuRoles = localSession
-                                                       .createQuery("from " + FunctionalMenuRole.class.getName() + " where roleId=" + roleId)
-                                                       .list();
-                                       int numMenuRoles = funcMenuRoles.size();
-                                       logger.debug(EELFLoggerDelegate.debugLogger,
-                                                       "number of funcMenuRoles for roleId: " + roleId + ": " + numMenuRoles);
-                                       for (FunctionalMenuRole funcMenuRole : funcMenuRoles) {
-                                               Long menuId = funcMenuRole.menuId;
-                                               // If this is the only role for this menu item, then the
-                                               // app and roles will be gone,
-                                               // so must null out the url too, to be consistent
-                                               @SuppressWarnings("unchecked")
-                                               List<FunctionalMenuRole> funcMenuRoles2 = localSession
-                                                               .createQuery("from " + FunctionalMenuRole.class.getName() + " where menuId=" + menuId)
-                                                               .list();
-                                               int numMenuRoles2 = funcMenuRoles2.size();
-                                               logger.debug(EELFLoggerDelegate.debugLogger,
-                                                               "number of funcMenuRoles for menuId: " + menuId + ": " + numMenuRoles2);
-                                               localSession.delete(funcMenuRole);
-                                               if (numMenuRoles2 == 1) {
-                                                       // If this is the only role for this menu item, then
-                                                       // the app and roles will be gone,
-                                                       // so must null out the url too, to be consistent
-                                                       logger.debug(EELFLoggerDelegate.debugLogger,
-                                                                       "There is exactly 1 menu item for this role, so emptying the url");
-                                                       @SuppressWarnings("unchecked")
-                                                       List<FunctionalMenuItem> funcMenuItems = localSession
-                                                                       .createQuery(
-                                                                                       "from " + FunctionalMenuItem.class.getName() + " where menuId=" + menuId)
-                                                                       .list();
-                                                       if (funcMenuItems.size() > 0) {
-                                                               logger.debug(EELFLoggerDelegate.debugLogger, "got the menu item");
-                                                               FunctionalMenuItem funcMenuItem = funcMenuItems.get(0);
-                                                               funcMenuItem.url = "";
-                                                               localSession.update(funcMenuItem);
-                                                       }
-                                               }
-                                       }
-
-                                       // Delete from fn_role_function
-                                       String sql = "DELETE FROM fn_role_function WHERE role_id=" + roleId;
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
-                                       Query query = localSession.createSQLQuery(sql);
-                                       query.executeUpdate();
-
-                                       // Delete from fn_role_composite
-                                       sql = "DELETE FROM fn_role_composite WHERE parent_role_id=" + roleId + " OR child_role_id="
-                                                       + roleId;
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
-                                       query = localSession.createSQLQuery(sql);
-                                       query.executeUpdate();
-
-                                       // Delete from fn_user_pseudo_role
-                                       sql = "DELETE FROM fn_user_pseudo_role WHERE pseudo_role_id=" + roleId;
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "Executing query: " + sql);
-                                       query = localSession.createSQLQuery(sql);
-                                       query.executeUpdate();
-
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "about to delete the role: " + role.toString());
-                                       localSession.delete(role);
-                                       logger.debug(EELFLoggerDelegate.debugLogger, "deleted the role");
-                               }
-                       }
-                       logger.debug(EELFLoggerDelegate.debugLogger, "about to commit the transaction");
-                       transaction.commit();
-                       logger.debug(EELFLoggerDelegate.debugLogger, "committed the transaction");
-                       result = true;
-               } catch (Exception e) {
-                       EPLogUtil.logEcompError(EPAppMessagesEnum.BeDaoSystemError);
-                       EcompPortalUtils.rollbackTransaction(transaction,
-                                       "Exception occurred in syncAppRoles, Details: " + EcompPortalUtils.getStackTrace(e));
-               } finally {
-                       localSession.close();
-                       if (!result) {
-                               throw new Exception(
-                                               "Exception occurred in syncAppRoles while closing database session for app: '" + appId + "'.");
-                       }
-               }
-       }
-
-       // Called when updating the list of roles for the user
-       private RolesInAppForUser constructRolesInAppForUserUpdate(String orgUserId, Long appId,
-                       Set<EcompRole> userRolesInRemoteApp) {
-               RolesInAppForUser result;
-               result = new RolesInAppForUser();
-               result.appId = appId;
-               result.orgUserId = orgUserId;
-               for (EcompRole role : userRolesInRemoteApp) {
-                       RoleInAppForUser roleInAppForUser = new RoleInAppForUser();
-                       roleInAppForUser.roleId = role.getId();
-                       roleInAppForUser.roleName = role.getName();
-                       roleInAppForUser.isApplied = new Boolean(true);
-                       result.roles.add(roleInAppForUser);
-               }
-               return result;
-       }
+       private ApplicationsRestClientService applicationsRestClientService;
 
        private EPUser getUserFromRemoteApp(String orgUserId, EPApp app,
                        ApplicationsRestClientService applicationsRestClientService) throws HTTPException {
@@ -471,41 +61,6 @@ public class UserRolesServiceImpl implements UserRolesService {
                return user;
        }
 
-       private boolean remoteUserShouldBeCreated(List<RoleInAppForUser> roleInAppForUserList) {
-               for (RoleInAppForUser roleInAppForUser : roleInAppForUserList) {
-                       if (roleInAppForUser.isApplied.booleanValue()) {
-                               return true;
-                       }
-               }
-               return false;
-       }
-
-       private Set<EcompRole> postUsersRolesToRemoteApp(List<RoleInAppForUser> roleInAppForUserList, ObjectMapper mapper,
-                       ApplicationsRestClientService applicationsRestClientService, Long appId, String orgUserId)
-                       throws JsonProcessingException, HTTPException {
-               Set<EcompRole> updatedUserRoles = constructUsersEcompRoles(roleInAppForUserList);
-               String userRolesAsString = mapper.writeValueAsString(updatedUserRoles);
-               applicationsRestClientService.post(EcompRole.class, appId, userRolesAsString,
-                               String.format("/user/%s/roles", orgUserId));
-               // TODO: We should add code that verifies that the post operation did
-               // succeed. Because the SDK may still return 200 OK with an html page
-               // even when it fails!
-               return updatedUserRoles;
-       }
-
-       private Set<EcompRole> constructUsersEcompRoles(List<RoleInAppForUser> roleInAppForUserList) {
-               Set<EcompRole> existingUserRoles = new TreeSet<EcompRole>();
-               for (RoleInAppForUser roleInAppForUser : roleInAppForUserList) {
-                       if (roleInAppForUser.isApplied) {
-                               EcompRole ecompRole = new EcompRole();
-                               ecompRole.setId(roleInAppForUser.roleId);
-                               ecompRole.setName(roleInAppForUser.roleName);
-                               existingUserRoles.add(ecompRole);
-                       }
-               }
-               return existingUserRoles;
-       }
-
        private static void createNewUserOnRemoteApp(String orgUserId, EPApp app,
                        ApplicationsRestClientService applicationsRestClientService, SearchService searchService,
                        ObjectMapper mapper) throws Exception {
@@ -527,126 +82,6 @@ public class UserRolesServiceImpl implements UserRolesService {
                applicationsRestClientService.post(EPUser.class, app.getId(), userAsString, String.format("/user", orgUserId));
        }
 
-       public String updateRemoteUserProfile(String orgUserId, Long appId) {
-
-               ObjectMapper mapper = new ObjectMapper();
-               mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-               EPUser client = searchService.searchUserByUserId(orgUserId);
-               EPUser newUser = new EPUser();
-               newUser.setActive(client.getActive());
-               newUser.setFirstName(client.getFirstName());
-               newUser.setLastName(client.getLastName());
-               newUser.setLoginId(client.getLoginId());
-               newUser.setLoginPwd(client.getLoginPwd());
-               newUser.setMiddleInitial(client.getMiddleInitial());
-               newUser.setEmail(client.getEmail());
-               newUser.setOrgUserId(client.getLoginId());
-               try {
-                       String userAsString = mapper.writeValueAsString(newUser);
-                       List<EPApp> appList = appsService.getUserRemoteApps(client.getId().toString());
-                       // applicationsRestClientService.post(EPUser.class, appId,
-                       // userAsString, String.format("/user", orgUserId));
-                       for (EPApp eachApp : appList) {
-                               try {
-                                       applicationsRestClientService.post(EPUser.class, eachApp.getId(), userAsString,
-                                                       String.format("/user/%s", orgUserId));
-                               } catch (Exception e) {
-                                       logger.error(EELFLoggerDelegate.errorLogger, "Failed to update user: " + client.getOrgUserId()
-                                                       + " in remote app. appId = " + eachApp.getId());
-                               }
-                       }
-               } catch (Exception e) {
-                       // TODO Auto-generated catch block
-                       e.printStackTrace();
-                       return "failure";
-               }
-
-               return "success";
-
-       }
-
-       private static final Object syncRests = new Object();
-
-       @Override
-       public boolean setAppWithUserRoleStateForUser(EPUser user, AppWithRolesForUser newAppRolesForUser) {
-               boolean result = false;
-               String orgUserId = "";
-               if (newAppRolesForUser != null && newAppRolesForUser.orgUserId != null) {
-                       orgUserId = newAppRolesForUser.orgUserId.trim();
-               }
-               Long appId = newAppRolesForUser.appId;
-               List<RoleInAppForUser> roleInAppForUserList = newAppRolesForUser.appRoles;
-               if (orgUserId.length() > 0) {
-                       ObjectMapper mapper = new ObjectMapper();
-                       mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-
-                       try {
-                               EPApp app = appsService.getApp(appId);
-                               EPUser remoteAppUser = getUserFromRemoteApp(orgUserId, app, applicationsRestClientService);
-                               if (remoteAppUser == null) {
-                                       if (remoteUserShouldBeCreated(roleInAppForUserList)) {
-                                               createNewUserOnRemoteApp(orgUserId, app, applicationsRestClientService, searchService, mapper);
-                                               // If we succeed, we know that the new user was
-                                               // persisted on remote app.
-                                               remoteAppUser = getUserFromRemoteApp(orgUserId, app, applicationsRestClientService);
-                                               if (remoteAppUser == null) {
-                                                       logger.error(EELFLoggerDelegate.errorLogger,
-                                                                       "Failed to persist new user: " + orgUserId + " in remote app. appId = " + appId);
-                                                       // return null;
-                                               }
-                                       }
-                               }
-                               if (remoteAppUser != null) {
-                                       Set<EcompRole> userRolesInRemoteApp = postUsersRolesToRemoteApp(roleInAppForUserList, mapper,
-                                                       applicationsRestClientService, appId, orgUserId);
-                                       RolesInAppForUser rolesInAppForUser = constructRolesInAppForUserUpdate(orgUserId, appId,
-                                                       userRolesInRemoteApp);
-                                       result = applyChangesInUserRolesForAppToEcompDB(rolesInAppForUser);
-                               }
-                       } catch (Exception e) {
-                               String message = String.format(
-                                               "Failed to create user or update user roles for the User %s, and for the AppId %s, Details: %s",
-                                               orgUserId, Long.toString(appId), EcompPortalUtils.getStackTrace(e));
-                               logger.error(EELFLoggerDelegate.errorLogger, message);
-                               result = false;
-                       }
-
-               }
-               return result;
-       }
-
-       // This is for a single app
-       private boolean applyChangesInUserRolesForAppToEcompDB(RolesInAppForUser rolesInAppForUser) {
-               boolean result = false;
-               String orgUserId = rolesInAppForUser.orgUserId;
-               Long appId = rolesInAppForUser.appId;
-               synchronized (syncRests) {
-                       if (rolesInAppForUser != null) {
-                               createLocalUserIfNecessary(orgUserId);
-                       }
-
-                       if (rolesInAppForUser != null) {
-                               EcompRole[] userAppRoles = new EcompRole[rolesInAppForUser.roles.size()];
-                               for (int i = 0; i < rolesInAppForUser.roles.size(); i++) {
-                                       RoleInAppForUser roleInAppForUser = rolesInAppForUser.roles.get(i);
-                                       EcompRole role = new EcompRole();
-                                       role.setId(roleInAppForUser.roleId);
-                                       role.setName(roleInAppForUser.roleName);
-                                       userAppRoles[i] = role;
-                               }
-                               try {
-                                       syncUserRoles(sessionFactory, orgUserId, appId, userAppRoles);
-                                       result = true;
-                               } catch (Exception e) {
-                                       logger.error(EELFLoggerDelegate.errorLogger,
-                                                       "applyChangesInUserRolesForAppToEcompDB syncUserRoles, orgUserId = " + orgUserId);
-                                       logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
-                               }
-                       }
-               }
-               return result;
-       }
-
        @Override
        public List<UserApplicationRoles> getUsersFromAppEndpoint(Long appId) throws HTTPException {
                RemoteUserWithRoles[] remoteUsers = applicationsRestClientService.get(RemoteUserWithRoles[].class, appId,
@@ -654,7 +89,7 @@ public class UserRolesServiceImpl implements UserRolesService {
                ArrayList<UserApplicationRoles> userApplicationRoles = new ArrayList<UserApplicationRoles>();
                for (RemoteUserWithRoles remoteUser : remoteUsers) {
                        UserApplicationRoles userWithRemoteAppRoles = convertToUserApplicationRoles(appId, remoteUser);
-                       if(userWithRemoteAppRoles.getRoles()!=null && userWithRemoteAppRoles.getRoles().size()>0) {
+                       if (userWithRemoteAppRoles.getRoles() != null && userWithRemoteAppRoles.getRoles().size() > 0) {
                                userApplicationRoles.add(userWithRemoteAppRoles);
                        } else {
                                logger.debug(EELFLoggerDelegate.debugLogger, "User " + userWithRemoteAppRoles.getOrgUserId()
@@ -666,16 +101,6 @@ public class UserRolesServiceImpl implements UserRolesService {
                return userApplicationRoles;
        }
 
-       private UserApplicationRoles convertToUserApplicationRoles(Long appId, RemoteUserWithRoles remoteUser) {
-               UserApplicationRoles userWithRemoteAppRoles = new UserApplicationRoles();
-               userWithRemoteAppRoles.setAppId(appId);
-               userWithRemoteAppRoles.setOrgUserId(remoteUser.getLoginId());
-               userWithRemoteAppRoles.setFirstName(remoteUser.getFirstName());
-               userWithRemoteAppRoles.setLastName(remoteUser.getLastName());
-               userWithRemoteAppRoles.setRoles(remoteUser.getRoles());
-               return userWithRemoteAppRoles;
-       }
-
        public static void persistExternalRoleInEcompDb(EPRole externalAppRole, Long appId, EPRoleService roleService) {
                externalAppRole.setAppId(appId);
                externalAppRole.setAppRoleId(externalAppRole.getId());
@@ -689,30 +114,6 @@ public class UserRolesServiceImpl implements UserRolesService {
                                                externalAppRole.getAppRoleId(), externalAppRole.getName()));
        }
 
-       @Override
-       public List<EPRole> importRolesFromRemoteApplication(Long appId) throws HTTPException {
-               EPRole[] appRolesFull = applicationsRestClientService.get(EPRole[].class, appId, "/rolesFull");
-               List<EPRole> rolesList = Arrays.asList(appRolesFull);
-               for (EPRole externalAppRole : rolesList) {
-
-                       // Try to find an existing extern role for the app in the local
-                       // ecomp DB. If so, then use its id to update the existing external
-                       // application role record.
-                       Long externAppId = externalAppRole.getId();
-                       EPRole existingAppRole = epRoleService.getRole(appId, externAppId);
-                       if (existingAppRole != null) {
-                               logger.debug(EELFLoggerDelegate.debugLogger,
-                                               String.format("ecomp role already exists for app=%s; appRoleId=%s. No need to import this one.",
-                                                               appId, externAppId));
-                               continue;
-                       }
-                       // persistExternalRoleInEcompDb(externalAppRole, appId,
-                       // roleService);
-               }
-
-               return rolesList;
-       }
-
        @Override
        public List<EPUserApp> getCachedAppRolesForUser(Long appId, Long userId) {
                // Find the records for this user-app combo, if any
index 8c68264..0fc2c69 100644 (file)
@@ -33,7 +33,8 @@ hb.show_sql = false
 hb.db_reconnect = true
 hb.idle_connection_test_period = 3600
 
-app_display_name                                         = app_display_name
+# Ecomp portal title
+app_display_name                                         = Portal
 files_path = /demeter/WebApps/dev/ECOMP_APP/files
 context_root = ECOMPPORTAL
 # menu settings
@@ -109,10 +110,9 @@ microservices.widget.local.port = 8082
 #delete auditlog from number of days ago
 auditlog_del_day_from = 365
 
-
 #authenticate user server
 authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers
 
 #window width threshold to collapse left/right menu when page onload
 window_width_threshold_left_menu = 1400
-window_width_threshold_right_menu = 1350
\ No newline at end of file
+window_width_threshold_right_menu = 1350
index 603e114..0fa84a9 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
   ================================================================================
-  eCOMP Portal
+  ECOMP Portal
   ================================================================================
   Copyright (C) 2017 AT&T Intellectual Property
   ================================================================================
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
deleted file mode 100644 (file)
index f11b39a..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ================================================================================
-  eCOMP Portal
-  ================================================================================
-  Copyright (C) 2017 AT&T Intellectual Property
-  ================================================================================
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-  
-       http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-  ================================================================================
-  -->
-
-<!DOCTYPE tiles-definitions PUBLIC
-       "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
-       "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
-<tiles-definitions>
-
-    <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">  
-      <put-attribute name="title" value=""></put-attribute>  
-      <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>  
-      <put-attribute name="body" value=""></put-attribute>
-      <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>  
-    </definition>
-    
-    <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">  
-      <put-attribute name="body" value=""></put-attribute>
-    </definition>  
-      
-     <definition extends="ebz_template" name="user_profile">  
-       <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute>
-    </definition>  
-    
-    <definition extends="ebz_template" name="profile_search">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute>
-       <put-attribute name="viewName" value="profile_search"></put-attribute>  
-    </definition>
-    
-    <definition extends="ebz_template" name="profile">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute>
-       <put-attribute name="viewName" value="profile"></put-attribute>  
-    </definition>   
-    
-       <definition extends="ebz_template" name="menu">   
-       <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute>
-       <put-attribute name="viewName" value="menu"></put-attribute>  
-    </definition>  
-    
-    
-    <definition extends="ebz_template" name="welcome">   
-       <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute>
-       <put-attribute name="viewName" value="welcome"></put-attribute>  
-    </definition>
-    
-    <definition extends="ebz_template" name="openIdLogin">   
-       <put-attribute name="body" value="/WEB-INF/jsp/oid-login.jsp"></put-attribute>
-       <put-attribute name="viewName" value="openIdLogin"></put-attribute>  
-    </definition>
-    
-    
-    <definition extends="ebz_template" name="role_list">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute>
-       <put-attribute name="viewName" value="role_list"></put-attribute>  
-    </definition> 
-    
-    <definition extends="ebz_template" name="role">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute>
-       <put-attribute name="viewName" value="role"></put-attribute>  
-    </definition>    
-     
-    <definition extends="ebz_template" name="role_function_list">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute>
-       <put-attribute name="viewName" value="role_function_list"></put-attribute>  
-    </definition>     
-     
-    <definition extends="ebz_template" name="post_search">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute>
-       <put-attribute name="viewName" value="post_search"></put-attribute>  
-    </definition> 
-    
-     <definition extends="ebz_template" name="error">   
-       <put-attribute name="body" value="/WEB-INF/jsp/error.jsp"></put-attribute>
-       <put-attribute name="viewName" value="error"></put-attribute>  
-    </definition> 
-    
-     <definition extends="ebz_template" name="report_search">   
-       <put-attribute name="body" value="/WEB-INF/fusion/raptor/report_search.jsp"></put-attribute>
-       <put-attribute name="viewName" value="report_search"></put-attribute>  
-    </definition>  
-    
-    <definition extends="ebz_template" name="collaborate_list">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute>
-    </definition> 
-    
-    <definition extends="ebz_template" name="jcs_admin">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute>
-       <put-attribute name="viewName" value="jcs_admin"></put-attribute> 
-    </definition>
-    
-    <definition extends="ebz_template" name="usage_list">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute>
-       <put-attribute name="viewName" value="usage_list"></put-attribute> 
-    </definition>
-    <!-- 
-    <definition extends="ebz_template_noheader_nofooter" name="collaboration">   
-       <put-attribute name="body" value="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"></put-attribute>
-    </definition>
-    -->
-    <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/>
-    
-       
-</tiles-definitions>
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/font_icons.css b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/font_icons.css
new file mode 100644 (file)
index 0000000..0aa5b85
--- /dev/null
@@ -0,0 +1 @@
+/* font_icons.css is in open source - this empty file prevents 404 error in browser */
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css
new file mode 100644 (file)
index 0000000..0bbd8a3
--- /dev/null
@@ -0,0 +1,156 @@
+@charset "UTF-8";
+
+@font-face {
+    font-family: "Ionicons"; 
+    src: url("../fonts/ionicons.eot?v=2.0.0"); 
+    src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); 
+    font-weight: normal; 
+    font-style: normal;
+}
+
+.ionicons, .icon-arrows-download:before,
+.icon-securityalerts-alertL:before,
+.icon-controls-add-maximize:before,
+.icon-controls-add-maximize-circle:before, .icon-misc-time:before,
+.icoSecurityalerts:before, .icon-apps-marketplace:before ,
+.icon-content-grid:before, .icon-documents-archive:before,
+.icon-arrows-vertical-arrow-down:before, .icoArrows-download:before,
+.icoArrows-incoming-call:before, .icon-arrows-outgoing-call:before,
+.icon-arrows-upload:before, .icon-arrows-straight-arrow:before,
+.icoArrows-vertical-arrow:before, .icon-people-userbookmark:before,
+.icon-controls-check:before, .icon-chevron-down:before,
+.icon-controls-down:before, .icon-controls-left:before,
+.icon-controls-right:before, .icon-chevron-up:before,
+.icoDocuments-report:before, .icon-edit:before, .icon-misc-pen:before,
+.icon-controls-up:before, .icon-overview:before,
+.icon-settings:before, .icon-building-home:before,
+.icon-documents-book:before, .icoDocuments-book-outline:before,
+.icoDocuments-bookmarks:before,
+.icoDocuments-bookmarks-outline:before, .icon-add-widget:before ,
+.icon-documents-copy:before, .icon-content-flag:before,
+.icon-primary-accordion-minus:before, .icon-misc-piechart:before,
+.icon-misc-piechart-outline:before,
+.icon-primary-accordion-plus:before, .icon-star:before,
+.icon-building-door:before, .icon-content-gridguide:before,
+.icon-user:before, .icon-people-oneperson:before,
+.icon-people-oneperson-add:before,
+.icon-people-oneperson-stalker:before, .icon-controls-pointer:before,
+.icon-arrows-replay-restart:before, .icon-content-star:before,
+.icon-misc-trash:before, .icon-arrows-upload:before,
+.icon-controls-upPRIMARY, .ion-navicon                                                                         
+{
+    display: inline-block;
+    font-family: "Ionicons";
+    speak: none;
+    font-style: normal; 
+    font-weight: normal; 
+    font-variant: normal;
+    text-transform: none; 
+    text-rendering: auto; 
+    line-height: 1;
+    -webkit-font-smoothing: antialiased; 
+    -moz-osx-font-smoothing:
+    grayscale; 
+}
+
+.icoSecurityalerts-alert:before { content: "\f100"; }
+
+.icon-arrows-download:before { content: "\f41f"; }
+
+.icon-controls-add-maximize:before { content: "\f2c7"; }
+
+.icon-controls-add-maximize-circle:before { content: "\f359"; }
+
+.icon-misc-time:before { content: "\f35a"; }
+
+.icoSecurityalerts:before { content: "\f35b"; }
+
+.icon-content-grid:before { content: "\f35c"; }
+
+.icon-documents-archive:before { content: "\f2c9"; }
+
+.icon-arrows-vertical-arrow-down:before { content: "\f35d"; }
+
+.icon-arrows-download:before { content: "\f35e"; }
+
+.icon-arrows-incoming-call:before { content: "\f360"; }
+
+.icoArrows-outgoing-call:before { content: "\f362"; }
+
+.icoArrows-upload:before { content: "\f364"; }
+
+.icoArrows-straight-arrow:before { content: "\f30f"; }
+
+.icon-arrows-vertical-arrow:before { content: "\f366"; }
+
+.icon-people-userbookmark:before { content: "\f39f"; }
+
+.icon-controls-check:before { content: "\f121"; }
+
+.icon-chevron-down:before { content: "\f123"; }
+
+.icon-controls-left:before { content: "\f124"; }
+
+.icon-controls-right:before { content: "\f125"; }
+
+.icon-chevron-up:before { content: "\f126"; }
+
+.icoDocuments-report:before { content: "\f274"; }
+
+.icon-overview:before { content: "\f133"; }
+
+.icon-controls-down:before { content: "\f3d0"; }
+
+.icon-controls-up:before { content: "\f3d8"; }
+
+.icon-documents-book:before { content: "\f3e8"; }
+
+.icoDocuments-book-outline:before { content: "\f3e7"; }
+
+.icoDocuments-bookmarks:before { content: "\f3ea"; }
+
+.icoDocuments-bookmarks-outline:before { content: "\f3e9"; }
+
+.icon-documents-copy:before { content: "\f41c"; }
+
+.icon-content-flag:before { content: "\f42d"; }
+
+.icon-primary-accordion-minus:before { content: "\f463"; }
+
+.icon-misc-piechart:before { content: "\f484"; }
+
+.icon-misc-piechart-outline:before { content: "\f483"; }
+
+.icon-primary-accordion-plus:before { content: "\f48a"; }
+
+.icon-building-door:before { content: "\f29f"; }
+
+.icon-content-gridguide:before { content: "\f20d"; }
+
+.icon-people-oneperson:before { content: "\f213"; }
+
+.icon-people-oneperson-add:before { content: "\f211"; }
+
+.icon-people-oneperson-stalker:before { content: "\f212"; }
+
+.icon-arrows-replay-restart:before { content: "\f21c"; }
+
+.icon-misc-trash:before { content: "\f252"; }
+
+.icon-arrows-upload:before { content: "\f255"; }
+
+.icon-user:before { content: "\f213"; } 
+
+.icon-star:before { content: "\f4b3"; }
+
+.icon-edit:before { content: "\f2bf"; }
+
+.icon-settings:before { content: "\f13d"; }
+
+.icon-apps-marketplace:before { content: "\f35c"; }
+
+.icon-add-widget:before { content: "\f3f0"; }
+
+.icon-controls-upPRIMARY:before { content: "\f3d8";  }
+
+.ion-navicon:before { content: "\f20e"; }
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/digital-ng-library/ionicons.css
new file mode 100644 (file)
index 0000000..885aa6b
--- /dev/null
@@ -0,0 +1,1480 @@
+@charset "UTF-8";
+/*!
+  Ionicons, v2.0.0
+  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/
+  https://twitter.com/benjsperry  https://twitter.com/ionicframework
+  MIT License: https://github.com/driftyco/ionicons
+
+  Android-style icons originally built by Google’s
+  Material Design Icons: https://github.com/google/material-design-icons
+  used under CC BY http://creativecommons.org/licenses/by/4.0/
+  Modified icons to fit ionicon’s grid from original.
+*/
+@font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; }
+.ion, .ionicons, .ion-alert:before, .ion-alert-circled:before, .ion-android-add:before, .ion-android-add-circle:before, .ion-android-alarm-clock:before, .ion-android-alert:before, .ion-android-apps:before, .ion-android-archive:before, .ion-android-arrow-back:before, .ion-android-arrow-down:before, .ion-android-arrow-dropdown:before, .ion-android-arrow-dropdown-circle:before, .ion-android-arrow-dropleft:before, .ion-android-arrow-dropleft-circle:before, .ion-android-arrow-dropright:before, .ion-android-arrow-dropright-circle:before, .ion-android-arrow-dropup:before, .ion-android-arrow-dropup-circle:before, .ion-android-arrow-forward:before, .ion-android-arrow-up:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done:before, .ion-android-done-all:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite:before, .ion-android-favorite-outline:before, .ion-android-film:before, .ion-android-folder:before, .ion-android-folder-open:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone:before, .ion-android-microphone-off:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person:before, .ion-android-person-add:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove:before, .ion-android-remove-circle:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share:before, .ion-android-share-alt:before, .ion-android-star:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace:before, .ion-backspace-outline:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox:before, .ion-chatbox-working:before, .ion-chatboxes:before, .ion-chatbubble:before, .ion-chatbubble-working:before, .ion-chatbubbles:before, .ion-checkmark:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .ion-chevron-down:before, .ion-chevron-left:before, .ion-chevron-right:before, .ion-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close:before, .ion-close-circled:before, .ion-close-round:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code:before, .ion-code-download:before, .ion-code-working:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .ion-connection-bars:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document:before, .ion-document-text:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .ion-edit:before, .ion-egg:before, .ion-eject:before, .ion-email:before, .ion-email-unread:before, .ion-erlenmeyer-flask:before, .ion-erlenmeyer-flask-bubbles:before, .ion-eye:before, .ion-eye-disabled:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash:before, .ion-flash-off:before, .ion-folder:before, .ion-fork:before, .ion-fork-repo:before, .ion-forward:before, .ion-funnel:before, .ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy:before, .ion-happy-outline:before, .ion-headphone:before, .ion-heart:before, .ion-heart-broken:before, .ion-help:before, .ion-help-buoy:before, .ion-help-circled:before, .ion-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information:before, .ion-information-circled:before, .ion-ionic:before, .ion-ios-alarm:before, .ion-ios-alarm-outline:before, .ion-ios-albums:before, .ion-ios-albums-outline:before, .ion-ios-americanfootball:before, .ion-ios-americanfootball-outline:before, .ion-ios-analytics:before, .ion-ios-analytics-outline:before, .ion-ios-arrow-back:before, .ion-ios-arrow-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .ion-ios-arrow-up:before, .ion-ios-at:before, .ion-ios-at-outline:before, .ion-ios-barcode:before, .ion-ios-barcode-outline:before, .ion-ios-baseball:before, .ion-ios-baseball-outline:before, .ion-ios-basketball:before, .ion-ios-basketball-outline:before, .ion-ios-bell:before, .ion-ios-bell-outline:before, .ion-ios-body:before, .ion-ios-body-outline:before, .ion-ios-bolt:before, .ion-ios-bolt-outline:before, .ion-ios-book:before, .ion-ios-book-outline:before, .ion-ios-bookmarks:before, .ion-ios-bookmarks-outline:before, .ion-ios-box:before, .ion-ios-box-outline:before, .ion-ios-briefcase:before, .ion-ios-briefcase-outline:before, .ion-ios-browsers:before, .ion-ios-browsers-outline:before, .ion-ios-calculator:before, .ion-ios-calculator-outline:before, .ion-ios-calendar:before, .ion-ios-calendar-outline:before, .ion-ios-camera:before, .ion-ios-camera-outline:before, .ion-ios-cart:before, .ion-ios-cart-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatbubble:before, .ion-ios-chatbubble-outline:before, .ion-ios-checkmark:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock:before, .ion-ios-clock-outline:before, .ion-ios-close:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-cloud:before, .ion-ios-cloud-download:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloudy:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-outline:before, .ion-ios-cog:before, .ion-ios-cog-outline:before, .ion-ios-color-filter:before, .ion-ios-color-filter-outline:before, .ion-ios-color-wand:before, .ion-ios-color-wand-outline:before, .ion-ios-compose:before, .ion-ios-compose-outline:before, .ion-ios-contact:before, .ion-ios-contact-outline:before, .ion-ios-copy:before, .ion-ios-copy-outline:before, .ion-ios-crop:before, .ion-ios-crop-strong:before, .ion-ios-download:before, .ion-ios-download-outline:before, .ion-ios-drag:before, .ion-ios-email:before, .ion-ios-email-outline:before, .ion-ios-eye:before, .ion-ios-eye-outline:before, .ion-ios-fastforward:before, .ion-ios-fastforward-outline:before, .ion-ios-filing:before, .ion-ios-filing-outline:before, .ion-ios-film:before, .ion-ios-film-outline:before, .ion-ios-flag:before, .ion-ios-flag-outline:before, .ion-ios-flame:before, .ion-ios-flame-outline:before, .ion-ios-flask:before, .ion-ios-flask-outline:before, .ion-ios-flower:before, .ion-ios-flower-outline:before, .ion-ios-folder:before, .ion-ios-folder-outline:before, .ion-ios-football:before, .ion-ios-football-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-b:before, .ion-ios-game-controller-b-outline:before, .ion-ios-gear:before, .ion-ios-gear-outline:before, .ion-ios-glasses:before, .ion-ios-glasses-outline:before, .ion-ios-grid-view:before, .ion-ios-grid-view-outline:before, .ion-ios-heart:before, .ion-ios-heart-outline:before, .ion-ios-help:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-home:before, .ion-ios-home-outline:before, .ion-ios-infinite:before, .ion-ios-infinite-outline:before, .ion-ios-information:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-ionic-outline:before, .ion-ios-keypad:before, .ion-ios-keypad-outline:before, .ion-ios-lightbulb:before, .ion-ios-lightbulb-outline:before, .ion-ios-list:before, .ion-ios-list-outline:before, .ion-ios-location:before, .ion-ios-location-outline:before, .ion-ios-locked:before, .ion-ios-locked-outline:before, .ion-ios-loop:before, .ion-ios-loop-strong:before, .ion-ios-medical:before, .ion-ios-medical-outline:before, .ion-ios-medkit:before, .ion-ios-medkit-outline:before, .ion-ios-mic:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-minus:before, .ion-ios-minus-empty:before, .ion-ios-minus-outline:before, .ion-ios-monitor:before, .ion-ios-monitor-outline:before, .ion-ios-moon:before, .ion-ios-moon-outline:before, .ion-ios-more:before, .ion-ios-more-outline:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate:before, .ion-ios-navigate-outline:before, .ion-ios-nutrition:before, .ion-ios-nutrition-outline:before, .ion-ios-paper:before, .ion-ios-paper-outline:before, .ion-ios-paperplane:before, .ion-ios-paperplane-outline:before, .ion-ios-partlysunny:before, .ion-ios-partlysunny-outline:before, .ion-ios-pause:before, .ion-ios-pause-outline:before, .ion-ios-paw:before, .ion-ios-paw-outline:before, .ion-ios-people:before, .ion-ios-people-outline:before, .ion-ios-person:before, .ion-ios-person-outline:before, .ion-ios-personadd:before, .ion-ios-personadd-outline:before, .ion-ios-photos:before, .ion-ios-photos-outline:before, .ion-ios-pie:before, .ion-ios-pie-outline:before, .ion-ios-pint:before, .ion-ios-pint-outline:before, .ion-ios-play:before, .ion-ios-play-outline:before, .ion-ios-plus:before, .ion-ios-plus-empty:before, .ion-ios-plus-outline:before, .ion-ios-pricetag:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetags:before, .ion-ios-pricetags-outline:before, .ion-ios-printer:before, .ion-ios-printer-outline:before, .ion-ios-pulse:before, .ion-ios-pulse-strong:before, .ion-ios-rainy:before, .ion-ios-rainy-outline:before, .ion-ios-recording:before, .ion-ios-recording-outline:before, .ion-ios-redo:before, .ion-ios-redo-outline:before, .ion-ios-refresh:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-reload:before, .ion-ios-reverse-camera:before, .ion-ios-reverse-camera-outline:before, .ion-ios-rewind:before, .ion-ios-rewind-outline:before, .ion-ios-rose:before, .ion-ios-rose-outline:before, .ion-ios-search:before, .ion-ios-search-strong:before, .ion-ios-settings:before, .ion-ios-settings-strong:before, .ion-ios-shuffle:before, .ion-ios-shuffle-strong:before, .ion-ios-skipbackward:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipforward:before, .ion-ios-skipforward-outline:before, .ion-ios-snowy:before, .ion-ios-speedometer:before, .ion-ios-speedometer-outline:before, .ion-ios-star:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-stopwatch:before, .ion-ios-stopwatch-outline:before, .ion-ios-sunny:before, .ion-ios-sunny-outline:before, .ion-ios-telephone:before, .ion-ios-telephone-outline:before, .ion-ios-tennisball:before, .ion-ios-tennisball-outline:before, .ion-ios-thunderstorm:before, .ion-ios-thunderstorm-outline:before, .ion-ios-time:before, .ion-ios-time-outline:before, .ion-ios-timer:before, .ion-ios-timer-outline:before, .ion-ios-toggle:before, .ion-ios-toggle-outline:before, .ion-ios-trash:before, .ion-ios-trash-outline:before, .ion-ios-undo:before, .ion-ios-undo-outline:before, .ion-ios-unlocked:before, .ion-ios-unlocked-outline:before, .ion-ios-upload:before, .ion-ios-upload-outline:before, .ion-ios-videocam:before, .ion-ios-videocam-outline:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass:before, .ion-ios-wineglass-outline:before, .ion-ios-world:before, .ion-ios-world-outline:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .ion-log-out:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon:before, .ion-navicon-round:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .ion-person:before, .ion-person-add:before, .ion-person-stalker:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .ion-play:before, .ion-playstation:before, .ion-plus:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .ion-refresh:before, .ion-reply:before, .ion-reply-all:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad:before, .ion-sad-outline:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android:before, .ion-social-android-outline:before, .ion-social-angular:before, .ion-social-angular-outline:before, .ion-social-apple:before, .ion-social-apple-outline:before, .ion-social-bitcoin:before, .ion-social-bitcoin-outline:before, .ion-social-buffer:before, .ion-social-buffer-outline:before, .ion-social-chrome:before, .ion-social-chrome-outline:before, .ion-social-codepen:before, .ion-social-codepen-outline:before, .ion-social-css3:before, .ion-social-css3-outline:before, .ion-social-designernews:before, .ion-social-designernews-outline:before, .ion-social-dribbble:before, .ion-social-dribbble-outline:before, .ion-social-dropbox:before, .ion-social-dropbox-outline:before, .ion-social-euro:before, .ion-social-euro-outline:before, .ion-social-facebook:before, .ion-social-facebook-outline:before, .ion-social-foursquare:before, .ion-social-foursquare-outline:before, .ion-social-freebsd-devil:before, .ion-social-github:before, .ion-social-github-outline:before, .ion-social-google:before, .ion-social-google-outline:before, .ion-social-googleplus:before, .ion-social-googleplus-outline:before, .ion-social-hackernews:before, .ion-social-hackernews-outline:before, .ion-social-html5:before, .ion-social-html5-outline:before, .ion-social-instagram:before, .ion-social-instagram-outline:before, .ion-social-javascript:before, .ion-social-javascript-outline:before, .ion-social-linkedin:before, .ion-social-linkedin-outline:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest:before, .ion-social-pinterest-outline:before, .ion-social-python:before, .ion-social-reddit:before, .ion-social-reddit-outline:before, .ion-social-rss:before, .ion-social-rss-outline:before, .ion-social-sass:before, .ion-social-skype:before, .ion-social-skype-outline:before, .ion-social-snapchat:before, .ion-social-snapchat-outline:before, .ion-social-tumblr:before, .ion-social-tumblr-outline:before, .ion-social-tux:before, .ion-social-twitch:before, .ion-social-twitch-outline:before, .ion-social-twitter:before, .ion-social-twitter-outline:before, .ion-social-usd:before, .ion-social-usd-outline:before, .ion-social-vimeo:before, .ion-social-vimeo-outline:before, .ion-social-whatsapp:before, .ion-social-whatsapp-outline:before, .ion-social-windows:before, .ion-social-windows-outline:before, .ion-social-wordpress:before, .ion-social-wordpress-outline:before, .ion-social-yahoo:before, .ion-social-yahoo-outline:before, .ion-social-yen:before, .ion-social-yen-outline:before, .ion-social-youtube:before, .ion-social-youtube-outline:before, .ion-soup-can:before, .ion-soup-can-outline:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .ion-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle:before, .ion-toggle-filled:before, .ion-transgender:before, .ion-trash-a:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt:before, .ion-tshirt-outline:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .ion-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
+
+.ion-alert:before { content: "\f101"; }
+
+.ion-alert-circled:before { content: "\f100"; }
+
+.ion-android-add:before { content: "\f2c7"; }
+
+.ion-android-add-circle:before { content: "\f359"; }
+
+.ion-android-alarm-clock:before { content: "\f35a"; }
+
+.ion-android-alert:before { content: "\f35b"; }
+
+.ion-android-apps:before { content: "\f35c"; }
+
+.ion-android-archive:before { content: "\f2c9"; }
+
+.ion-android-arrow-back:before { content: "\f2ca"; }
+
+.ion-android-arrow-down:before { content: "\f35d"; }
+
+.ion-android-arrow-dropdown:before { content: "\f35f"; }
+
+.ion-android-arrow-dropdown-circle:before { content: "\f35e"; }
+
+.ion-android-arrow-dropleft:before { content: "\f361"; }
+
+.ion-android-arrow-dropleft-circle:before { content: "\f360"; }
+
+.ion-android-arrow-dropright:before { content: "\f363"; }
+
+.ion-android-arrow-dropright-circle:before { content: "\f362"; }
+
+.ion-android-arrow-dropup:before { content: "\f365"; }
+
+.ion-android-arrow-dropup-circle:before { content: "\f364"; }
+
+.ion-android-arrow-forward:before { content: "\f30f"; }
+
+.ion-android-arrow-up:before { content: "\f366"; }
+
+.ion-android-attach:before { content: "\f367"; }
+
+.ion-android-bar:before { content: "\f368"; }
+
+.ion-android-bicycle:before { content: "\f369"; }
+
+.ion-android-boat:before { content: "\f36a"; }
+
+.ion-android-bookmark:before { content: "\f36b"; }
+
+.ion-android-bulb:before { content: "\f36c"; }
+
+.ion-android-bus:before { content: "\f36d"; }
+
+.ion-android-calendar:before { content: "\f2d1"; }
+
+.ion-android-call:before { content: "\f2d2"; }
+
+.ion-android-camera:before { content: "\f2d3"; }
+
+.ion-android-cancel:before { content: "\f36e"; }
+
+.ion-android-car:before { content: "\f36f"; }
+
+.ion-android-cart:before { content: "\f370"; }
+
+.ion-android-chat:before { content: "\f2d4"; }
+
+.ion-android-checkbox:before { content: "\f374"; }
+
+.ion-android-checkbox-blank:before { content: "\f371"; }
+
+.ion-android-checkbox-outline:before { content: "\f373"; }
+
+.ion-android-checkbox-outline-blank:before { content: "\f372"; }
+
+.ion-android-checkmark-circle:before { content: "\f375"; }
+
+.ion-android-clipboard:before { content: "\f376"; }
+
+.ion-android-close:before { content: "\f2d7"; }
+
+.ion-android-cloud:before { content: "\f37a"; }
+
+.ion-android-cloud-circle:before { content: "\f377"; }
+
+.ion-android-cloud-done:before { content: "\f378"; }
+
+.ion-android-cloud-outline:before { content: "\f379"; }
+
+.ion-android-color-palette:before { content: "\f37b"; }
+
+.ion-android-compass:before { content: "\f37c"; }
+
+.ion-android-contact:before { content: "\f2d8"; }
+
+.ion-android-contacts:before { content: "\f2d9"; }
+
+.ion-android-contract:before { content: "\f37d"; }
+
+.ion-android-create:before { content: "\f37e"; }
+
+.ion-android-delete:before { content: "\f37f"; }
+
+.ion-android-desktop:before { content: "\f380"; }
+
+.ion-android-document:before { content: "\f381"; }
+
+.ion-android-done:before { content: "\f383"; }
+
+.ion-android-done-all:before { content: "\f382"; }
+
+.ion-android-download:before { content: "\f2dd"; }
+
+.ion-android-drafts:before { content: "\f384"; }
+
+.ion-android-exit:before { content: "\f385"; }
+
+.ion-android-expand:before { content: "\f386"; }
+
+.ion-android-favorite:before { content: "\f388"; }
+
+.ion-android-favorite-outline:before { content: "\f387"; }
+
+.ion-android-film:before { content: "\f389"; }
+
+.ion-android-folder:before { content: "\f2e0"; }
+
+.ion-android-folder-open:before { content: "\f38a"; }
+
+.ion-android-funnel:before { content: "\f38b"; }
+
+.ion-android-globe:before { content: "\f38c"; }
+
+.ion-android-hand:before { content: "\f2e3"; }
+
+.ion-android-hangout:before { content: "\f38d"; }
+
+.ion-android-happy:before { content: "\f38e"; }
+
+.ion-android-home:before { content: "\f38f"; }
+
+.ion-android-image:before { content: "\f2e4"; }
+
+.ion-android-laptop:before { content: "\f390"; }
+
+.ion-android-list:before { content: "\f391"; }
+
+.ion-android-locate:before { content: "\f2e9"; }
+
+.ion-android-lock:before { content: "\f392"; }
+
+.ion-android-mail:before { content: "\f2eb"; }
+
+.ion-android-map:before { content: "\f393"; }
+
+.ion-android-menu:before { content: "\f394"; }
+
+.ion-android-microphone:before { content: "\f2ec"; }
+
+.ion-android-microphone-off:before { content: "\f395"; }
+
+.ion-android-more-horizontal:before { content: "\f396"; }
+
+.ion-android-more-vertical:before { content: "\f397"; }
+
+.ion-android-navigate:before { content: "\f398"; }
+
+.ion-android-notifications:before { content: "\f39b"; }
+
+.ion-android-notifications-none:before { content: "\f399"; }
+
+.ion-android-notifications-off:before { content: "\f39a"; }
+
+.ion-android-open:before { content: "\f39c"; }
+
+.ion-android-options:before { content: "\f39d"; }
+
+.ion-android-people:before { content: "\f39e"; }
+
+.ion-android-person:before { content: "\f3a0"; }
+
+.ion-android-person-add:before { content: "\f39f"; }
+
+.ion-android-phone-landscape:before { content: "\f3a1"; }
+
+.ion-android-phone-portrait:before { content: "\f3a2"; }
+
+.ion-android-pin:before { content: "\f3a3"; }
+
+.ion-android-plane:before { content: "\f3a4"; }
+
+.ion-android-playstore:before { content: "\f2f0"; }
+
+.ion-android-print:before { content: "\f3a5"; }
+
+.ion-android-radio-button-off:before { content: "\f3a6"; }
+
+.ion-android-radio-button-on:before { content: "\f3a7"; }
+
+.ion-android-refresh:before { content: "\f3a8"; }
+
+.ion-android-remove:before { content: "\f2f4"; }
+
+.ion-android-remove-circle:before { content: "\f3a9"; }
+
+.ion-android-restaurant:before { content: "\f3aa"; }
+
+.ion-android-sad:before { content: "\f3ab"; }
+
+.ion-android-search:before { content: "\f2f5"; }
+
+.ion-android-send:before { content: "\f2f6"; }
+
+.ion-android-settings:before { content: "\f2f7"; }
+
+.ion-android-share:before { content: "\f2f8"; }
+
+.ion-android-share-alt:before { content: "\f3ac"; }
+
+.ion-android-star:before { content: "\f2fc"; }
+
+.ion-android-star-half:before { content: "\f3ad"; }
+
+.ion-android-star-outline:before { content: "\f3ae"; }
+
+.ion-android-stopwatch:before { content: "\f2fd"; }
+
+.ion-android-subway:before { content: "\f3af"; }
+
+.ion-android-sunny:before { content: "\f3b0"; }
+
+.ion-android-sync:before { content: "\f3b1"; }
+
+.ion-android-textsms:before { content: "\f3b2"; }
+
+.ion-android-time:before { content: "\f3b3"; }
+
+.ion-android-train:before { content: "\f3b4"; }
+
+.ion-android-unlock:before { content: "\f3b5"; }
+
+.ion-android-upload:before { content: "\f3b6"; }
+
+.ion-android-volume-down:before { content: "\f3b7"; }
+
+.ion-android-volume-mute:before { content: "\f3b8"; }
+
+.ion-android-volume-off:before { content: "\f3b9"; }
+
+.ion-android-volume-up:before { content: "\f3ba"; }
+
+.ion-android-walk:before { content: "\f3bb"; }
+
+.ion-android-warning:before { content: "\f3bc"; }
+
+.ion-android-watch:before { content: "\f3bd"; }
+
+.ion-android-wifi:before { content: "\f305"; }
+
+.ion-aperture:before { content: "\f313"; }
+
+.ion-archive:before { content: "\f102"; }
+
+.ion-arrow-down-a:before { content: "\f103"; }
+
+.ion-arrow-down-b:before { content: "\f104"; }
+
+.ion-arrow-down-c:before { content: "\f105"; }
+
+.ion-arrow-expand:before { content: "\f25e"; }
+
+.ion-arrow-graph-down-left:before { content: "\f25f"; }
+
+.ion-arrow-graph-down-right:before { content: "\f260"; }
+
+.ion-arrow-graph-up-left:before { content: "\f261"; }
+
+.ion-arrow-graph-up-right:before { content: "\f262"; }
+
+.ion-arrow-left-a:before { content: "\f106"; }
+
+.ion-arrow-left-b:before { content: "\f107"; }
+
+.ion-arrow-left-c:before { content: "\f108"; }
+
+.ion-arrow-move:before { content: "\f263"; }
+
+.ion-arrow-resize:before { content: "\f264"; }
+
+.ion-arrow-return-left:before { content: "\f265"; }
+
+.ion-arrow-return-right:before { content: "\f266"; }
+
+.ion-arrow-right-a:before { content: "\f109"; }
+
+.ion-arrow-right-b:before { content: "\f10a"; }
+
+.ion-arrow-right-c:before { content: "\f10b"; }
+
+.ion-arrow-shrink:before { content: "\f267"; }
+
+.ion-arrow-swap:before { content: "\f268"; }
+
+.ion-arrow-up-a:before { content: "\f10c"; }
+
+.ion-arrow-up-b:before { content: "\f10d"; }
+
+.ion-arrow-up-c:before { content: "\f10e"; }
+
+.ion-asterisk:before { content: "\f314"; }
+
+.ion-at:before { content: "\f10f"; }
+
+.ion-backspace:before { content: "\f3bf"; }
+
+.ion-backspace-outline:before { content: "\f3be"; }
+
+.ion-bag:before { content: "\f110"; }
+
+.ion-battery-charging:before { content: "\f111"; }
+
+.ion-battery-empty:before { content: "\f112"; }
+
+.ion-battery-full:before { content: "\f113"; }
+
+.ion-battery-half:before { content: "\f114"; }
+
+.ion-battery-low:before { content: "\f115"; }
+
+.ion-beaker:before { content: "\f269"; }
+
+.ion-beer:before { content: "\f26a"; }
+
+.ion-bluetooth:before { content: "\f116"; }
+
+.ion-bonfire:before { content: "\f315"; }
+
+.ion-bookmark:before { content: "\f26b"; }
+
+.ion-bowtie:before { content: "\f3c0"; }
+
+.ion-briefcase:before { content: "\f26c"; }
+
+.ion-bug:before { content: "\f2be"; }
+
+.ion-calculator:before { content: "\f26d"; }
+
+.ion-calendar:before { content: "\f117"; }
+
+.ion-camera:before { content: "\f118"; }
+
+.ion-card:before { content: "\f119"; }
+
+.ion-cash:before { content: "\f316"; }
+
+.ion-chatbox:before { content: "\f11b"; }
+
+.ion-chatbox-working:before { content: "\f11a"; }
+
+.ion-chatboxes:before { content: "\f11c"; }
+
+.ion-chatbubble:before { content: "\f11e"; }
+
+.ion-chatbubble-working:before { content: "\f11d"; }
+
+.ion-chatbubbles:before { content: "\f11f"; }
+
+.ion-checkmark:before { content: "\f122"; }
+
+.ion-checkmark-circled:before { content: "\f120"; }
+
+.ion-checkmark-round:before { content: "\f121"; }
+
+.ion-chevron-down:before { content: "\f123"; }
+
+.ion-chevron-left:before { content: "\f124"; }
+
+.ion-chevron-right:before { content: "\f125"; }
+
+.ion-chevron-up:before { content: "\f126"; }
+
+.ion-clipboard:before { content: "\f127"; }
+
+.ion-clock:before { content: "\f26e"; }
+
+.ion-close:before { content: "\f12a"; }
+
+.ion-close-circled:before { content: "\f128"; }
+
+.ion-close-round:before { content: "\f129"; }
+
+.ion-closed-captioning:before { content: "\f317"; }
+
+.ion-cloud:before { content: "\f12b"; }
+
+.ion-code:before { content: "\f271"; }
+
+.ion-code-download:before { content: "\f26f"; }
+
+.ion-code-working:before { content: "\f270"; }
+
+.ion-coffee:before { content: "\f272"; }
+
+.ion-compass:before { content: "\f273"; }
+
+.ion-compose:before { content: "\f12c"; }
+
+.ion-connection-bars:before { content: "\f274"; }
+
+.ion-contrast:before { content: "\f275"; }
+
+.ion-crop:before { content: "\f3c1"; }
+
+.ion-cube:before { content: "\f318"; }
+
+.ion-disc:before { content: "\f12d"; }
+
+.ion-document:before { content: "\f12f"; }
+
+.ion-document-text:before { content: "\f12e"; }
+
+.ion-drag:before { content: "\f130"; }
+
+.ion-earth:before { content: "\f276"; }
+
+.ion-easel:before { content: "\f3c2"; }
+
+.ion-edit:before { content: "\f2bf"; }
+
+.ion-egg:before { content: "\f277"; }
+
+.ion-eject:before { content: "\f131"; }
+
+.ion-email:before { content: "\f132"; }
+
+.ion-email-unread:before { content: "\f3c3"; }
+
+.ion-erlenmeyer-flask:before { content: "\f3c5"; }
+
+.ion-erlenmeyer-flask-bubbles:before { content: "\f3c4"; }
+
+.ion-eye:before { content: "\f133"; }
+
+.ion-eye-disabled:before { content: "\f306"; }
+
+.ion-female:before { content: "\f278"; }
+
+.ion-filing:before { content: "\f134"; }
+
+.ion-film-marker:before { content: "\f135"; }
+
+.ion-fireball:before { content: "\f319"; }
+
+.ion-flag:before { content: "\f279"; }
+
+.ion-flame:before { content: "\f31a"; }
+
+.ion-flash:before { content: "\f137"; }
+
+.ion-flash-off:before { content: "\f136"; }
+
+.ion-folder:before { content: "\f139"; }
+
+.ion-fork:before { content: "\f27a"; }
+
+.ion-fork-repo:before { content: "\f2c0"; }
+
+.ion-forward:before { content: "\f13a"; }
+
+.ion-funnel:before { content: "\f31b"; }
+
+.ion-gear-a:before { content: "\f13d"; }
+
+.ion-gear-b:before { content: "\f13e"; }
+
+.ion-grid:before { content: "\f13f"; }
+
+.ion-hammer:before { content: "\f27b"; }
+
+.ion-happy:before { content: "\f31c"; }
+
+.ion-happy-outline:before { content: "\f3c6"; }
+
+.ion-headphone:before { content: "\f140"; }
+
+.ion-heart:before { content: "\f141"; }
+
+.ion-heart-broken:before { content: "\f31d"; }
+
+.ion-help:before { content: "\f143"; }
+
+.ion-help-buoy:before { content: "\f27c"; }
+
+.ion-help-circled:before { content: "\f142"; }
+
+.ion-home:before { content: "\f144"; }
+
+.ion-icecream:before { content: "\f27d"; }
+
+.ion-image:before { content: "\f147"; }
+
+.ion-images:before { content: "\f148"; }
+
+.ion-information:before { content: "\f14a"; }
+
+.ion-information-circled:before { content: "\f149"; }
+
+.ion-ionic:before { content: "\f14b"; }
+
+.ion-ios-alarm:before { content: "\f3c8"; }
+
+.ion-ios-alarm-outline:before { content: "\f3c7"; }
+
+.ion-ios-albums:before { content: "\f3ca"; }
+
+.ion-ios-albums-outline:before { content: "\f3c9"; }
+
+.ion-ios-americanfootball:before { content: "\f3cc"; }
+
+.ion-ios-americanfootball-outline:before { content: "\f3cb"; }
+
+.ion-ios-analytics:before { content: "\f3ce"; }
+
+.ion-ios-analytics-outline:before { content: "\f3cd"; }
+
+.ion-ios-arrow-back:before { content: "\f3cf"; }
+
+.ion-ios-arrow-down:before { content: "\f3d0"; }
+
+.ion-ios-arrow-forward:before { content: "\f3d1"; }
+
+.ion-ios-arrow-left:before { content: "\f3d2"; }
+
+.ion-ios-arrow-right:before { content: "\f3d3"; }
+
+.ion-ios-arrow-thin-down:before { content: "\f3d4"; }
+
+.ion-ios-arrow-thin-left:before { content: "\f3d5"; }
+
+.ion-ios-arrow-thin-right:before { content: "\f3d6"; }
+
+.ion-ios-arrow-thin-up:before { content: "\f3d7"; }
+
+.ion-ios-arrow-up:before { content: "\f3d8"; }
+
+.ion-ios-at:before { content: "\f3da"; }
+
+.ion-ios-at-outline:before { content: "\f3d9"; }
+
+.ion-ios-barcode:before { content: "\f3dc"; }
+
+.ion-ios-barcode-outline:before { content: "\f3db"; }
+
+.ion-ios-baseball:before { content: "\f3de"; }
+
+.ion-ios-baseball-outline:before { content: "\f3dd"; }
+
+.ion-ios-basketball:before { content: "\f3e0"; }
+
+.ion-ios-basketball-outline:before { content: "\f3df"; }
+
+.ion-ios-bell:before { content: "\f3e2"; }
+
+.ion-ios-bell-outline:before { content: "\f3e1"; }
+
+.ion-ios-body:before { content: "\f3e4"; }
+
+.ion-ios-body-outline:before { content: "\f3e3"; }
+
+.ion-ios-bolt:before { content: "\f3e6"; }
+
+.ion-ios-bolt-outline:before { content: "\f3e5"; }
+
+.ion-ios-book:before { content: "\f3e8"; }
+
+.ion-ios-book-outline:before { content: "\f3e7"; }
+
+.ion-ios-bookmarks:before { content: "\f3ea"; }
+
+.ion-ios-bookmarks-outline:before { content: "\f3e9"; }
+
+.ion-ios-box:before { content: "\f3ec"; }
+
+.ion-ios-box-outline:before { content: "\f3eb"; }
+
+.ion-ios-briefcase:before { content: "\f3ee"; }
+
+.ion-ios-briefcase-outline:before { content: "\f3ed"; }
+
+.ion-ios-browsers:before { content: "\f3f0"; }
+
+.ion-ios-browsers-outline:before { content: "\f3ef"; }
+
+.ion-ios-calculator:before { content: "\f3f2"; }
+
+.ion-ios-calculator-outline:before { content: "\f3f1"; }
+
+.ion-ios-calendar:before { content: "\f3f4"; }
+
+.ion-ios-calendar-outline:before { content: "\f3f3"; }
+
+.ion-ios-camera:before { content: "\f3f6"; }
+
+.ion-ios-camera-outline:before { content: "\f3f5"; }
+
+.ion-ios-cart:before { content: "\f3f8"; }
+
+.ion-ios-cart-outline:before { content: "\f3f7"; }
+
+.ion-ios-chatboxes:before { content: "\f3fa"; }
+
+.ion-ios-chatboxes-outline:before { content: "\f3f9"; }
+
+.ion-ios-chatbubble:before { content: "\f3fc"; }
+
+.ion-ios-chatbubble-outline:before { content: "\f3fb"; }
+
+.ion-ios-checkmark:before { content: "\f3ff"; }
+
+.ion-ios-checkmark-empty:before { content: "\f3fd"; }
+
+.ion-ios-checkmark-outline:before { content: "\f3fe"; }
+
+.ion-ios-circle-filled:before { content: "\f400"; }
+
+.ion-ios-circle-outline:before { content: "\f401"; }
+
+.ion-ios-clock:before { content: "\f403"; }
+
+.ion-ios-clock-outline:before { content: "\f402"; }
+
+.ion-ios-close:before { content: "\f406"; }
+
+.ion-ios-close-empty:before { content: "\f404"; }
+
+.ion-ios-close-outline:before { content: "\f405"; }
+
+.ion-ios-cloud:before { content: "\f40c"; }
+
+.ion-ios-cloud-download:before { content: "\f408"; }
+
+.ion-ios-cloud-download-outline:before { content: "\f407"; }
+
+.ion-ios-cloud-outline:before { content: "\f409"; }
+
+.ion-ios-cloud-upload:before { content: "\f40b"; }
+
+.ion-ios-cloud-upload-outline:before { content: "\f40a"; }
+
+.ion-ios-cloudy:before { content: "\f410"; }
+
+.ion-ios-cloudy-night:before { content: "\f40e"; }
+
+.ion-ios-cloudy-night-outline:before { content: "\f40d"; }
+
+.ion-ios-cloudy-outline:before { content: "\f40f"; }
+
+.ion-ios-cog:before { content: "\f412"; }
+
+.ion-ios-cog-outline:before { content: "\f411"; }
+
+.ion-ios-color-filter:before { content: "\f414"; }
+
+.ion-ios-color-filter-outline:before { content: "\f413"; }
+
+.ion-ios-color-wand:before { content: "\f416"; }
+
+.ion-ios-color-wand-outline:before { content: "\f415"; }
+
+.ion-ios-compose:before { content: "\f418"; }
+
+.ion-ios-compose-outline:before { content: "\f417"; }
+
+.ion-ios-contact:before { content: "\f41a"; }
+
+.ion-ios-contact-outline:before { content: "\f419"; }
+
+.ion-ios-copy:before { content: "\f41c"; }
+
+.ion-ios-copy-outline:before { content: "\f41b"; }
+
+.ion-ios-crop:before { content: "\f41e"; }
+
+.ion-ios-crop-strong:before { content: "\f41d"; }
+
+.ion-ios-download:before { content: "\f420"; }
+
+.ion-ios-download-outline:before { content: "\f41f"; }
+
+.ion-ios-drag:before { content: "\f421"; }
+
+.ion-ios-email:before { content: "\f423"; }
+
+.ion-ios-email-outline:before { content: "\f422"; }
+
+.ion-ios-eye:before { content: "\f425"; }
+
+.ion-ios-eye-outline:before { content: "\f424"; }
+
+.ion-ios-fastforward:before { content: "\f427"; }
+
+.ion-ios-fastforward-outline:before { content: "\f426"; }
+
+.ion-ios-filing:before { content: "\f429"; }
+
+.ion-ios-filing-outline:before { content: "\f428"; }
+
+.ion-ios-film:before { content: "\f42b"; }
+
+.ion-ios-film-outline:before { content: "\f42a"; }
+
+.ion-ios-flag:before { content: "\f42d"; }
+
+.ion-ios-flag-outline:before { content: "\f42c"; }
+
+.ion-ios-flame:before { content: "\f42f"; }
+
+.ion-ios-flame-outline:before { content: "\f42e"; }
+
+.ion-ios-flask:before { content: "\f431"; }
+
+.ion-ios-flask-outline:before { content: "\f430"; }
+
+.ion-ios-flower:before { content: "\f433"; }
+
+.ion-ios-flower-outline:before { content: "\f432"; }
+
+.ion-ios-folder:before { content: "\f435"; }
+
+.ion-ios-folder-outline:before { content: "\f434"; }
+
+.ion-ios-football:before { content: "\f437"; }
+
+.ion-ios-football-outline:before { content: "\f436"; }
+
+.ion-ios-game-controller-a:before { content: "\f439"; }
+
+.ion-ios-game-controller-a-outline:before { content: "\f438"; }
+
+.ion-ios-game-controller-b:before { content: "\f43b"; }
+
+.ion-ios-game-controller-b-outline:before { content: "\f43a"; }
+
+.ion-ios-gear:before { content: "\f43d"; }
+
+.ion-ios-gear-outline:before { content: "\f43c"; }
+
+.ion-ios-glasses:before { content: "\f43f"; }
+
+.ion-ios-glasses-outline:before { content: "\f43e"; }
+
+.ion-ios-grid-view:before { content: "\f441"; }
+
+.ion-ios-grid-view-outline:before { content: "\f440"; }
+
+.ion-ios-heart:before { content: "\f443"; }
+
+.ion-ios-heart-outline:before { content: "\f442"; }
+
+.ion-ios-help:before { content: "\f446"; }
+
+.ion-ios-help-empty:before { content: "\f444"; }
+
+.ion-ios-help-outline:before { content: "\f445"; }
+
+.ion-ios-home:before { content: "\f448"; }
+
+.ion-ios-home-outline:before { content: "\f447"; }
+
+.ion-ios-infinite:before { content: "\f44a"; }
+
+.ion-ios-infinite-outline:before { content: "\f449"; }
+
+.ion-ios-information:before { content: "\f44d"; }
+
+.ion-ios-information-empty:before { content: "\f44b"; }
+
+.ion-ios-information-outline:before { content: "\f44c"; }
+
+.ion-ios-ionic-outline:before { content: "\f44e"; }
+
+.ion-ios-keypad:before { content: "\f450"; }
+
+.ion-ios-keypad-outline:before { content: "\f44f"; }
+
+.ion-ios-lightbulb:before { content: "\f452"; }
+
+.ion-ios-lightbulb-outline:before { content: "\f451"; }
+
+.ion-ios-list:before { content: "\f454"; }
+
+.ion-ios-list-outline:before { content: "\f453"; }
+
+.ion-ios-location:before { content: "\f456"; }
+
+.ion-ios-location-outline:before { content: "\f455"; }
+
+.ion-ios-locked:before { content: "\f458"; }
+
+.ion-ios-locked-outline:before { content: "\f457"; }
+
+.ion-ios-loop:before { content: "\f45a"; }
+
+.ion-ios-loop-strong:before { content: "\f459"; }
+
+.ion-ios-medical:before { content: "\f45c"; }
+
+.ion-ios-medical-outline:before { content: "\f45b"; }
+
+.ion-ios-medkit:before { content: "\f45e"; }
+
+.ion-ios-medkit-outline:before { content: "\f45d"; }
+
+.ion-ios-mic:before { content: "\f461"; }
+
+.ion-ios-mic-off:before { content: "\f45f"; }
+
+.ion-ios-mic-outline:before { content: "\f460"; }
+
+.ion-ios-minus:before { content: "\f464"; }
+
+.ion-ios-minus-empty:before { content: "\f462"; }
+
+.ion-ios-minus-outline:before { content: "\f463"; }
+
+.ion-ios-monitor:before { content: "\f466"; }
+
+.ion-ios-monitor-outline:before { content: "\f465"; }
+
+.ion-ios-moon:before { content: "\f468"; }
+
+.ion-ios-moon-outline:before { content: "\f467"; }
+
+.ion-ios-more:before { content: "\f46a"; }
+
+.ion-ios-more-outline:before { content: "\f469"; }
+
+.ion-ios-musical-note:before { content: "\f46b"; }
+
+.ion-ios-musical-notes:before { content: "\f46c"; }
+
+.ion-ios-navigate:before { content: "\f46e"; }
+
+.ion-ios-navigate-outline:before { content: "\f46d"; }
+
+.ion-ios-nutrition:before { content: "\f470"; }
+
+.ion-ios-nutrition-outline:before { content: "\f46f"; }
+
+.ion-ios-paper:before { content: "\f472"; }
+
+.ion-ios-paper-outline:before { content: "\f471"; }
+
+.ion-ios-paperplane:before { content: "\f474"; }
+
+.ion-ios-paperplane-outline:before { content: "\f473"; }
+
+.ion-ios-partlysunny:before { content: "\f476"; }
+
+.ion-ios-partlysunny-outline:before { content: "\f475"; }
+
+.ion-ios-pause:before { content: "\f478"; }
+
+.ion-ios-pause-outline:before { content: "\f477"; }
+
+.ion-ios-paw:before { content: "\f47a"; }
+
+.ion-ios-paw-outline:before { content: "\f479"; }
+
+.ion-ios-people:before { content: "\f47c"; }
+
+.ion-ios-people-outline:before { content: "\f47b"; }
+
+.ion-ios-person:before { content: "\f47e"; }
+
+.ion-ios-person-outline:before { content: "\f47d"; }
+
+.ion-ios-personadd:before { content: "\f480"; }
+
+.ion-ios-personadd-outline:before { content: "\f47f"; }
+
+.ion-ios-photos:before { content: "\f482"; }
+
+.ion-ios-photos-outline:before { content: "\f481"; }
+
+.ion-ios-pie:before { content: "\f484"; }
+
+.ion-ios-pie-outline:before { content: "\f483"; }
+
+.ion-ios-pint:before { content: "\f486"; }
+
+.ion-ios-pint-outline:before { content: "\f485"; }
+
+.ion-ios-play:before { content: "\f488"; }
+
+.ion-ios-play-outline:before { content: "\f487"; }
+
+.ion-ios-plus:before { content: "\f48b"; }
+
+.ion-ios-plus-empty:before { content: "\f489"; }
+
+.ion-ios-plus-outline:before { content: "\f48a"; }
+
+.ion-ios-pricetag:before { content: "\f48d"; }
+
+.ion-ios-pricetag-outline:before { content: "\f48c"; }
+
+.ion-ios-pricetags:before { content: "\f48f"; }
+
+.ion-ios-pricetags-outline:before { content: "\f48e"; }
+
+.ion-ios-printer:before { content: "\f491"; }
+
+.ion-ios-printer-outline:before { content: "\f490"; }
+
+.ion-ios-pulse:before { content: "\f493"; }
+
+.ion-ios-pulse-strong:before { content: "\f492"; }
+
+.ion-ios-rainy:before { content: "\f495"; }
+
+.ion-ios-rainy-outline:before { content: "\f494"; }
+
+.ion-ios-recording:before { content: "\f497"; }
+
+.ion-ios-recording-outline:before { content: "\f496"; }
+
+.ion-ios-redo:before { content: "\f499"; }
+
+.ion-ios-redo-outline:before { content: "\f498"; }
+
+.ion-ios-refresh:before { content: "\f49c"; }
+
+.ion-ios-refresh-empty:before { content: "\f49a"; }
+
+.ion-ios-refresh-outline:before { content: "\f49b"; }
+
+.ion-ios-reload:before { content: "\f49d"; }
+
+.ion-ios-reverse-camera:before { content: "\f49f"; }
+
+.ion-ios-reverse-camera-outline:before { content: "\f49e"; }
+
+.ion-ios-rewind:before { content: "\f4a1"; }
+
+.ion-ios-rewind-outline:before { content: "\f4a0"; }
+
+.ion-ios-rose:before { content: "\f4a3"; }
+
+.ion-ios-rose-outline:before { content: "\f4a2"; }
+
+.ion-ios-search:before { content: "\f4a5"; }
+
+.ion-ios-search-strong:before { content: "\f4a4"; }
+
+.ion-ios-settings:before { content: "\f4a7"; }
+
+.ion-ios-settings-strong:before { content: "\f4a6"; }
+
+.ion-ios-shuffle:before { content: "\f4a9"; }
+
+.ion-ios-shuffle-strong:before { content: "\f4a8"; }
+
+.ion-ios-skipbackward:before { content: "\f4ab"; }
+
+.ion-ios-skipbackward-outline:before { content: "\f4aa"; }
+
+.ion-ios-skipforward:before { content: "\f4ad"; }
+
+.ion-ios-skipforward-outline:before { content: "\f4ac"; }
+
+.ion-ios-snowy:before { content: "\f4ae"; }
+
+.ion-ios-speedometer:before { content: "\f4b0"; }
+
+.ion-ios-speedometer-outline:before { content: "\f4af"; }
+
+.ion-ios-star:before { content: "\f4b3"; }
+
+.ion-ios-star-half:before { content: "\f4b1"; }
+
+.ion-ios-star-outline:before { content: "\f4b2"; }
+
+.ion-ios-stopwatch:before { content: "\f4b5"; }
+
+.ion-ios-stopwatch-outline:before { content: "\f4b4"; }
+
+.ion-ios-sunny:before { content: "\f4b7"; }
+
+.ion-ios-sunny-outline:before { content: "\f4b6"; }
+
+.ion-ios-telephone:before { content: "\f4b9"; }
+
+.ion-ios-telephone-outline:before { content: "\f4b8"; }
+
+.ion-ios-tennisball:before { content: "\f4bb"; }
+
+.ion-ios-tennisball-outline:before { content: "\f4ba"; }
+
+.ion-ios-thunderstorm:before { content: "\f4bd"; }
+
+.ion-ios-thunderstorm-outline:before { content: "\f4bc"; }
+
+.ion-ios-time:before { content: "\f4bf"; }
+
+.ion-ios-time-outline:before { content: "\f4be"; }
+
+.ion-ios-timer:before { content: "\f4c1"; }
+
+.ion-ios-timer-outline:before { content: "\f4c0"; }
+
+.ion-ios-toggle:before { content: "\f4c3"; }
+
+.ion-ios-toggle-outline:before { content: "\f4c2"; }
+
+.ion-ios-trash:before { content: "\f4c5"; }
+
+.ion-ios-trash-outline:before { content: "\f4c4"; }
+
+.ion-ios-undo:before { content: "\f4c7"; }
+
+.ion-ios-undo-outline:before { content: "\f4c6"; }
+
+.ion-ios-unlocked:before { content: "\f4c9"; }
+
+.ion-ios-unlocked-outline:before { content: "\f4c8"; }
+
+.ion-ios-upload:before { content: "\f4cb"; }
+
+.ion-ios-upload-outline:before { content: "\f4ca"; }
+
+.ion-ios-videocam:before { content: "\f4cd"; }
+
+.ion-ios-videocam-outline:before { content: "\f4cc"; }
+
+.ion-ios-volume-high:before { content: "\f4ce"; }
+
+.ion-ios-volume-low:before { content: "\f4cf"; }
+
+.ion-ios-wineglass:before { content: "\f4d1"; }
+
+.ion-ios-wineglass-outline:before { content: "\f4d0"; }
+
+.ion-ios-world:before { content: "\f4d3"; }
+
+.ion-ios-world-outline:before { content: "\f4d2"; }
+
+.ion-ipad:before { content: "\f1f9"; }
+
+.ion-iphone:before { content: "\f1fa"; }
+
+.ion-ipod:before { content: "\f1fb"; }
+
+.ion-jet:before { content: "\f295"; }
+
+.ion-key:before { content: "\f296"; }
+
+.ion-knife:before { content: "\f297"; }
+
+.ion-laptop:before { content: "\f1fc"; }
+
+.ion-leaf:before { content: "\f1fd"; }
+
+.ion-levels:before { content: "\f298"; }
+
+.ion-lightbulb:before { content: "\f299"; }
+
+.ion-link:before { content: "\f1fe"; }
+
+.ion-load-a:before { content: "\f29a"; }
+
+.ion-load-b:before { content: "\f29b"; }
+
+.ion-load-c:before { content: "\f29c"; }
+
+.ion-load-d:before { content: "\f29d"; }
+
+.ion-location:before { content: "\f1ff"; }
+
+.ion-lock-combination:before { content: "\f4d4"; }
+
+.ion-locked:before { content: "\f200"; }
+
+.ion-log-in:before { content: "\f29e"; }
+
+.ion-log-out:before { content: "\f29f"; }
+
+.ion-loop:before { content: "\f201"; }
+
+.ion-magnet:before { content: "\f2a0"; }
+
+.ion-male:before { content: "\f2a1"; }
+
+.ion-man:before { content: "\f202"; }
+
+.ion-map:before { content: "\f203"; }
+
+.ion-medkit:before { content: "\f2a2"; }
+
+.ion-merge:before { content: "\f33f"; }
+
+.ion-mic-a:before { content: "\f204"; }
+
+.ion-mic-b:before { content: "\f205"; }
+
+.ion-mic-c:before { content: "\f206"; }
+
+.ion-minus:before { content: "\f209"; }
+
+.ion-minus-circled:before { content: "\f207"; }
+
+.ion-minus-round:before { content: "\f208"; }
+
+.ion-model-s:before { content: "\f2c1"; }
+
+.ion-monitor:before { content: "\f20a"; }
+
+.ion-more:before { content: "\f20b"; }
+
+.ion-mouse:before { content: "\f340"; }
+
+.ion-music-note:before { content: "\f20c"; }
+
+.ion-navicon:before { content: "\f20e"; }
+
+.ion-navicon-round:before { content: "\f20d"; }
+
+.ion-navigate:before { content: "\f2a3"; }
+
+.ion-network:before { content: "\f341"; }
+
+.ion-no-smoking:before { content: "\f2c2"; }
+
+.ion-nuclear:before { content: "\f2a4"; }
+
+.ion-outlet:before { content: "\f342"; }
+
+.ion-paintbrush:before { content: "\f4d5"; }
+
+.ion-paintbucket:before { content: "\f4d6"; }
+
+.ion-paper-airplane:before { content: "\f2c3"; }
+
+.ion-paperclip:before { content: "\f20f"; }
+
+.ion-pause:before { content: "\f210"; }
+
+.ion-person:before { content: "\f213"; }
+
+.ion-person-add:before { content: "\f211"; }
+
+.ion-person-stalker:before { content: "\f212"; }
+
+.ion-pie-graph:before { content: "\f2a5"; }
+
+.ion-pin:before { content: "\f2a6"; }
+
+.ion-pinpoint:before { content: "\f2a7"; }
+
+.ion-pizza:before { content: "\f2a8"; }
+
+.ion-plane:before { content: "\f214"; }
+
+.ion-planet:before { content: "\f343"; }
+
+.ion-play:before { content: "\f215"; }
+
+.ion-playstation:before { content: "\f30a"; }
+
+.ion-plus:before { content: "\f218"; }
+
+.ion-plus-circled:before { content: "\f216"; }
+
+.ion-plus-round:before { content: "\f217"; }
+
+.ion-podium:before { content: "\f344"; }
+
+.ion-pound:before { content: "\f219"; }
+
+.ion-power:before { content: "\f2a9"; }
+
+.ion-pricetag:before { content: "\f2aa"; }
+
+.ion-pricetags:before { content: "\f2ab"; }
+
+.ion-printer:before { content: "\f21a"; }
+
+.ion-pull-request:before { content: "\f345"; }
+
+.ion-qr-scanner:before { content: "\f346"; }
+
+.ion-quote:before { content: "\f347"; }
+
+.ion-radio-waves:before { content: "\f2ac"; }
+
+.ion-record:before { content: "\f21b"; }
+
+.ion-refresh:before { content: "\f21c"; }
+
+.ion-reply:before { content: "\f21e"; }
+
+.ion-reply-all:before { content: "\f21d"; }
+
+.ion-ribbon-a:before { content: "\f348"; }
+
+.ion-ribbon-b:before { content: "\f349"; }
+
+.ion-sad:before { content: "\f34a"; }
+
+.ion-sad-outline:before { content: "\f4d7"; }
+
+.ion-scissors:before { content: "\f34b"; }
+
+.ion-search:before { content: "\f21f"; }
+
+.ion-settings:before { content: "\f2ad"; }
+
+.ion-share:before { content: "\f220"; }
+
+.ion-shuffle:before { content: "\f221"; }
+
+.ion-skip-backward:before { content: "\f222"; }
+
+.ion-skip-forward:before { content: "\f223"; }
+
+.ion-social-android:before { content: "\f225"; }
+
+.ion-social-android-outline:before { content: "\f224"; }
+
+.ion-social-angular:before { content: "\f4d9"; }
+
+.ion-social-angular-outline:before { content: "\f4d8"; }
+
+.ion-social-apple:before { content: "\f227"; }
+
+.ion-social-apple-outline:before { content: "\f226"; }
+
+.ion-social-bitcoin:before { content: "\f2af"; }
+
+.ion-social-bitcoin-outline:before { content: "\f2ae"; }
+
+.ion-social-buffer:before { content: "\f229"; }
+
+.ion-social-buffer-outline:before { content: "\f228"; }
+
+.ion-social-chrome:before { content: "\f4db"; }
+
+.ion-social-chrome-outline:before { content: "\f4da"; }
+
+.ion-social-codepen:before { content: "\f4dd"; }
+
+.ion-social-codepen-outline:before { content: "\f4dc"; }
+
+.ion-social-css3:before { content: "\f4df"; }
+
+.ion-social-css3-outline:before { content: "\f4de"; }
+
+.ion-social-designernews:before { content: "\f22b"; }
+
+.ion-social-designernews-outline:before { content: "\f22a"; }
+
+.ion-social-dribbble:before { content: "\f22d"; }
+
+.ion-social-dribbble-outline:before { content: "\f22c"; }
+
+.ion-social-dropbox:before { content: "\f22f"; }
+
+.ion-social-dropbox-outline:before { content: "\f22e"; }
+
+.ion-social-euro:before { content: "\f4e1"; }
+
+.ion-social-euro-outline:before { content: "\f4e0"; }
+
+.ion-social-facebook:before { content: "\f231"; }
+
+.ion-social-facebook-outline:before { content: "\f230"; }
+
+.ion-social-foursquare:before { content: "\f34d"; }
+
+.ion-social-foursquare-outline:before { content: "\f34c"; }
+
+.ion-social-freebsd-devil:before { content: "\f2c4"; }
+
+.ion-social-github:before { content: "\f233"; }
+
+.ion-social-github-outline:before { content: "\f232"; }
+
+.ion-social-google:before { content: "\f34f"; }
+
+.ion-social-google-outline:before { content: "\f34e"; }
+
+.ion-social-googleplus:before { content: "\f235"; }
+
+.ion-social-googleplus-outline:before { content: "\f234"; }
+
+.ion-social-hackernews:before { content: "\f237"; }
+
+.ion-social-hackernews-outline:before { content: "\f236"; }
+
+.ion-social-html5:before { content: "\f4e3"; }
+
+.ion-social-html5-outline:before { content: "\f4e2"; }
+
+.ion-social-instagram:before { content: "\f351"; }
+
+.ion-social-instagram-outline:before { content: "\f350"; }
+
+.ion-social-javascript:before { content: "\f4e5"; }
+
+.ion-social-javascript-outline:before { content: "\f4e4"; }
+
+.ion-social-linkedin:before { content: "\f239"; }
+
+.ion-social-linkedin-outline:before { content: "\f238"; }
+
+.ion-social-markdown:before { content: "\f4e6"; }
+
+.ion-social-nodejs:before { content: "\f4e7"; }
+
+.ion-social-octocat:before { content: "\f4e8"; }
+
+.ion-social-pinterest:before { content: "\f2b1"; }
+
+.ion-social-pinterest-outline:before { content: "\f2b0"; }
+
+.ion-social-python:before { content: "\f4e9"; }
+
+.ion-social-reddit:before { content: "\f23b"; }
+
+.ion-social-reddit-outline:before { content: "\f23a"; }
+
+.ion-social-rss:before { content: "\f23d"; }
+
+.ion-social-rss-outline:before { content: "\f23c"; }
+
+.ion-social-sass:before { content: "\f4ea"; }
+
+.ion-social-skype:before { content: "\f23f"; }
+
+.ion-social-skype-outline:before { content: "\f23e"; }
+
+.ion-social-snapchat:before { content: "\f4ec"; }
+
+.ion-social-snapchat-outline:before { content: "\f4eb"; }
+
+.ion-social-tumblr:before { content: "\f241"; }
+
+.ion-social-tumblr-outline:before { content: "\f240"; }
+
+.ion-social-tux:before { content: "\f2c5"; }
+
+.ion-social-twitch:before { content: "\f4ee"; }
+
+.ion-social-twitch-outline:before { content: "\f4ed"; }
+
+.ion-social-twitter:before { content: "\f243"; }
+
+.ion-social-twitter-outline:before { content: "\f242"; }
+
+.ion-social-usd:before { content: "\f353"; }
+
+.ion-social-usd-outline:before { content: "\f352"; }
+
+.ion-social-vimeo:before { content: "\f245"; }
+
+.ion-social-vimeo-outline:before { content: "\f244"; }
+
+.ion-social-whatsapp:before { content: "\f4f0"; }
+
+.ion-social-whatsapp-outline:before { content: "\f4ef"; }
+
+.ion-social-windows:before { content: "\f247"; }
+
+.ion-social-windows-outline:before { content: "\f246"; }
+
+.ion-social-wordpress:before { content: "\f249"; }
+
+.ion-social-wordpress-outline:before { content: "\f248"; }
+
+.ion-social-yahoo:before { content: "\f24b"; }
+
+.ion-social-yahoo-outline:before { content: "\f24a"; }
+
+.ion-social-yen:before { content: "\f4f2"; }
+
+.ion-social-yen-outline:before { content: "\f4f1"; }
+
+.ion-social-youtube:before { content: "\f24d"; }
+
+.ion-social-youtube-outline:before { content: "\f24c"; }
+
+.ion-soup-can:before { content: "\f4f4"; }
+
+.ion-soup-can-outline:before { content: "\f4f3"; }
+
+.ion-speakerphone:before { content: "\f2b2"; }
+
+.ion-speedometer:before { content: "\f2b3"; }
+
+.ion-spoon:before { content: "\f2b4"; }
+
+.ion-star:before { content: "\f24e"; }
+
+.ion-stats-bars:before { content: "\f2b5"; }
+
+.ion-steam:before { content: "\f30b"; }
+
+.ion-stop:before { content: "\f24f"; }
+
+.ion-thermometer:before { content: "\f2b6"; }
+
+.ion-thumbsdown:before { content: "\f250"; }
+
+.ion-thumbsup:before { content: "\f251"; }
+
+.ion-toggle:before { content: "\f355"; }
+
+.ion-toggle-filled:before { content: "\f354"; }
+
+.ion-transgender:before { content: "\f4f5"; }
+
+.ion-trash-a:before { content: "\f252"; }
+
+.ion-trash-b:before { content: "\f253"; }
+
+.ion-trophy:before { content: "\f356"; }
+
+.ion-tshirt:before { content: "\f4f7"; }
+
+.ion-tshirt-outline:before { content: "\f4f6"; }
+
+.ion-umbrella:before { content: "\f2b7"; }
+
+.ion-university:before { content: "\f357"; }
+
+.ion-unlocked:before { content: "\f254"; }
+
+.ion-upload:before { content: "\f255"; }
+
+.ion-usb:before { content: "\f2b8"; }
+
+.ion-videocamera:before { content: "\f256"; }
+
+.ion-volume-high:before { content: "\f257"; }
+
+.ion-volume-low:before { content: "\f258"; }
+
+.ion-volume-medium:before { content: "\f259"; }
+
+.ion-volume-mute:before { content: "\f25a"; }
+
+.ion-wand:before { content: "\f358"; }
+
+.ion-waterdrop:before { content: "\f25b"; }
+
+.ion-wifi:before { content: "\f25c"; }
+
+.ion-wineglass:before { content: "\f2b9"; }
+
+.ion-woman:before { content: "\f25d"; }
+
+.ion-wrench:before { content: "\f2ba"; }
+
+.ion-xbox:before { content: "\f30c"; }
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.eot b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.eot
new file mode 100644 (file)
index 0000000..92a3f20
Binary files /dev/null and b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.eot differ
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.svg b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.svg
new file mode 100644 (file)
index 0000000..49fc8f3
--- /dev/null
@@ -0,0 +1,2230 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<!--
+2014-12-4: Created.
+-->
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata>
+Created by FontForge 20120731 at Thu Dec  4 09:51:48 2014
+ By Adam Bradley
+Created by Adam Bradley with FontForge 2.0 (http://fontforge.sf.net)
+</metadata>
+<defs>
+<font id="Ionicons" horiz-adv-x="448" >
+  <font-face 
+    font-family="Ionicons"
+    font-weight="500"
+    font-stretch="normal"
+    units-per-em="512"
+    panose-1="2 0 6 3 0 0 0 0 0 0"
+    ascent="448"
+    descent="-64"
+    bbox="-0.54049 -64 512.487 448"
+    underline-thickness="25.6"
+    underline-position="-51.2"
+    unicode-range="U+F100-F4F7"
+  />
+    <missing-glyph />
+    <glyph glyph-name="ion-alert-circled" unicode="&#xf100;" 
+d="M445 26c3 -5 5 -13 2 -18s-8 -8 -14 -8h-418c-6 0 -11 3 -14 8s-1 13 2 18l207 349c3 5 8 9 14 9s11 -4 14 -9zM256 48v48h-64v-48h64zM256 128v144h-64v-144h64z" />
+    <glyph glyph-name="ion-alert" unicode="&#xf101;" horiz-adv-x="128" 
+d="M128 -32h-128v96h128v-96zM112 128h-96l-16 288h128z" />
+    <glyph glyph-name="ion-android-add-circle" unicode="&#xf359;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM315 171v42h-86v86h-42v-86h-86v-42h86v-86h42v86h86z" />
+    <glyph glyph-name="ion-android-add" unicode="&#xf2c7;" horiz-adv-x="320" 
+d="M320 171h-139v-139h-42v139h-139v42h139v139h42v-139h139v-42z" />
+    <glyph glyph-name="ion-android-alarm-clock" unicode="&#xf35a;" horiz-adv-x="428" 
+d="M428 323l-28 -33l-98 82l28 33zM125 373l-97 -83l-28 33l97 83zM225 275v0v-111l85 -50l-16 -27l-101 61v127h32zM214 360c106 0 193 -86 193 -191s-87 -191 -193 -191c-107 0 -193 86 -193 191s86 191 193 191zM214 20c82 0 150 66 150 149c0 82 -68 149 -150 149
+s-150 -67 -150 -149s68 -149 150 -149z" />
+    <glyph glyph-name="ion-android-alert" unicode="&#xf35b;" horiz-adv-x="416" 
+d="M208 400c114 0 208 -94 208 -208s-94 -208 -208 -208s-208 94 -208 208s94 208 208 208zM232 88v40h-48v-40h48zM232 176v128h-48v-128h48z" />
+    <glyph glyph-name="ion-android-apps" unicode="&#xf35c;" horiz-adv-x="320" 
+d="M0 272v80h80v-80h-80zM120 32v80h80v-80h-80zM0 32v80h80v-80h-80zM0 152v80h80v-80h-80zM120 152v80h80v-80h-80zM240 352h80v-80h-80v80zM120 272v80h80v-80h-80zM240 152v80h80v-80h-80zM240 32v80h80v-80h-80z" />
+    <glyph glyph-name="ion-android-archive" unicode="&#xf2c9;" horiz-adv-x="416" 
+d="M406 348c7 -7 10 -17 10 -29v-289c0 -25 -21 -46 -46 -46h-324c-25 0 -46 21 -46 46v289c0 12 3 22 10 29l33 39c6 8 16 13 26 13h278c10 0 20 -5 26 -13zM208 65l127 127h-81v46h-92v-46h-81zM49 354h317l-22 23h-277z" />
+    <glyph glyph-name="ion-android-arrow-back" unicode="&#xf2ca;" horiz-adv-x="342" 
+d="M342 213v-42h-260l119 -120l-30 -30l-171 171l171 171l31 -30l-120 -120h260z" />
+    <glyph glyph-name="ion-android-arrow-down" unicode="&#xf35d;" horiz-adv-x="342" 
+d="M192 363v-260l120 120l30 -31l-171 -171l-171 171l30 30l120 -119v260h42z" />
+    <glyph glyph-name="ion-android-arrow-dropdown-circle" unicode="&#xf35e;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 128l96 96h-192z" />
+    <glyph glyph-name="ion-android-arrow-dropdown" unicode="&#xf35f;" horiz-adv-x="256" 
+d="M0 256h256l-128 -128z" />
+    <glyph glyph-name="ion-android-arrow-dropleft-circle" unicode="&#xf360;" horiz-adv-x="416" 
+d="M416 192c0 -115 -93 -208 -208 -208s-208 93 -208 208s93 208 208 208s208 -93 208 -208zM144 192l96 -96v192z" />
+    <glyph glyph-name="ion-android-arrow-dropleft" unicode="&#xf361;" horiz-adv-x="128" 
+d="M128 320v-256l-128 128z" />
+    <glyph glyph-name="ion-android-arrow-dropright-circle" unicode="&#xf362;" horiz-adv-x="416" 
+d="M208 -16c-115 0 -208 93 -208 208s93 208 208 208s208 -93 208 -208s-93 -208 -208 -208zM176 96l96 96l-96 96v-192z" />
+    <glyph glyph-name="ion-android-arrow-dropright" unicode="&#xf363;" horiz-adv-x="128" 
+d="M0 320l128 -128l-128 -128v256z" />
+    <glyph glyph-name="ion-android-arrow-dropup-circle" unicode="&#xf364;" horiz-adv-x="416" 
+d="M416 192c0 -115 -93 -208 -208 -208s-208 93 -208 208s93 208 208 208s208 -93 208 -208zM304 160l-96 96l-96 -96h192z" />
+    <glyph glyph-name="ion-android-arrow-dropup" unicode="&#xf365;" horiz-adv-x="256" 
+d="M0 128l128 128l128 -128h-256z" />
+    <glyph glyph-name="ion-android-arrow-forward" unicode="&#xf30f;" horiz-adv-x="342" 
+d="M0 171v42h260l-119 120l30 30l171 -171l-171 -171l-31 30l120 120h-260z" />
+    <glyph glyph-name="ion-android-arrow-up" unicode="&#xf366;" horiz-adv-x="342" 
+d="M192 21h-42v260l-120 -119l-30 30l171 171l171 -171l-30 -31l-120 120v-260z" />
+    <glyph glyph-name="ion-android-attach" unicode="&#xf367;" horiz-adv-x="235" 
+d="M203 320h32v-235c0 -65 -53 -117 -118 -117s-117 52 -117 117v246c0 47 38 85 85 85s86 -38 86 -85v-246c0 -30 -24 -53 -54 -53s-53 23 -53 53v203h32v-203c0 -12 9 -21 21 -21s22 9 22 21v246c0 30 -24 53 -54 53s-53 -23 -53 -53v-246c0 -47 38 -85 85 -85
+s86 38 86 85v235z" />
+    <glyph glyph-name="ion-android-bar" unicode="&#xf368;" horiz-adv-x="384" 
+d="M171 171l-171 170v43h384v-43l-171 -170v-131h107v-40h-256v40h107v131zM96 299h192l43 42h-278z" />
+    <glyph glyph-name="ion-android-bicycle" unicode="&#xf369;" 
+d="M299 317c-19 0 -34 14 -34 33s15 34 34 34s33 -15 33 -34s-14 -33 -33 -33zM355 187c51 0 93 -43 93 -94s-42 -93 -93 -93s-94 42 -94 93s43 94 94 94zM355 28c36 0 65 29 65 65s-29 66 -65 66s-66 -30 -66 -66s30 -65 66 -65zM274 224l-30 45l-43 -45l39 -32v-112h-32
+v86l-61 38c-9 6 -19 15 -19 27c0 8 3 17 9 23l72 69c6 6 14 9 22 9c11 0 22 -7 28 -16l34 -60h59v-32h-78zM93 187c51 0 94 -43 94 -94s-43 -93 -94 -93s-93 42 -93 93s42 94 93 94zM93 28c36 0 66 29 66 65s-30 66 -66 66s-65 -30 -65 -66s29 -65 65 -65z" />
+    <glyph glyph-name="ion-android-boat" unicode="&#xf36a;" 
+d="M52 35l-51 139c-2 6 -1 12 1 17s8 8 13 10l38 13v98c0 23 20 43 43 43h64l16 53h96l16 -53h64c23 0 43 -20 43 -43v-98l38 -13c5 -2 11 -5 13 -10s3 -12 1 -17l-51 -139h-1c-34 0 -65 20 -86 43c-21 -23 -51 -43 -85 -43s-64 19 -85 42c-21 -23 -52 -42 -86 -42h-1z
+M96 312v-84l128 41l128 -41v84h-256zM309 40c0 0 59 -64 107 -64h-21c-30 0 -59 12 -86 26c-53 -28 -117 -28 -170 0c-27 -14 -56 -26 -86 -26h-21c49 0 107 64 107 64c52 -36 118 -36 170 0z" />
+    <glyph glyph-name="ion-android-bookmark" unicode="&#xf36b;" horiz-adv-x="288" 
+d="M248 384c22 0 40 -18 40 -40v-344l-144 64l-144 -64v344c0 22 18 40 40 40h208z" />
+    <glyph glyph-name="ion-android-bulb" unicode="&#xf36c;" 
+d="M224 278c-25 0 -50 -10 -68 -28s-28 -43 -28 -68c0 -34 18 -66 48 -83l16 -10v-18v-71h64v71v18l16 10c15 8 27 20 35 34c9 15 13 31 13 49c0 25 -10 50 -28 68s-43 28 -68 28zM245 416v0v-64h-42v64h42zM374 362v0l30 -30l-38 -38l-30 30zM74 362v0l38 -38l-30 -30
+l-38 38zM224 310v0c70 0 128 -58 128 -128c0 -48 -26 -89 -64 -111v-103h-128v103c-38 22 -64 64 -64 111c0 70 58 128 128 128zM448 203v0v-42h-64v42h64zM64 203v0v-42h-64v42h64z" />
+    <glyph glyph-name="ion-android-bus" unicode="&#xf36d;" horiz-adv-x="352" 
+d="M0 96v204c0 75 82 84 176 84s176 -9 176 -84v-204c0 -18 -14 -24 -27 -36v-39c0 -12 -9 -21 -21 -21h-21c-12 0 -22 9 -22 21v22h-170v-22c0 -12 -10 -21 -22 -21h-21c-12 0 -21 9 -21 21v39c-13 12 -27 17 -27 36zM80 80c18 0 32 14 32 32s-14 32 -32 32
+s-32 -14 -32 -32s14 -32 32 -32zM272 80c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM304 203v106h-256v-106h256z" />
+    <glyph glyph-name="ion-android-calendar" unicode="&#xf2d1;" horiz-adv-x="384" 
+d="M304 176v-96h-96v96h96zM272 384h48v-32h24c22 0 40 -18 40 -40v-272c0 -22 -18 -40 -40 -40h-304c-22 0 -40 18 -40 40v272c0 22 18 40 40 40h24v32h48v-32h160v32zM344 40v212h-304v-212h304z" />
+    <glyph glyph-name="ion-android-call" unicode="&#xf2d2;" horiz-adv-x="384" 
+d="M363 117c12 0 21 -9 21 -21v-75c0 -12 -9 -21 -21 -21c-201 0 -363 162 -363 363c0 12 9 21 21 21h75c12 0 21 -9 21 -21c0 -27 4 -52 13 -77c2 -7 0 -16 -5 -21l-47 -47c31 -61 80 -110 141 -141l47 47c5 6 14 7 21 5c23 -7 49 -12 76 -12z" />
+    <glyph glyph-name="ion-android-camera" unicode="&#xf2d3;" 
+d="M161 168c0 42 21 63 63 63s63 -21 63 -63s-21 -63 -63 -63s-63 21 -63 63zM408 352c11 0 20 -4 28 -12s12 -17 12 -28v-272c0 -11 -4 -20 -12 -28s-17 -12 -28 -12h-368c-11 0 -20 4 -28 12s-12 17 -12 28v272c0 11 4 20 12 28s17 12 28 12h88l32 32h128l32 -32h88z
+M224 56c31 0 57 11 79 33s33 48 33 79s-11 57 -33 79s-48 33 -79 33s-57 -11 -79 -33s-33 -48 -33 -79s11 -57 33 -79s48 -33 79 -33z" />
+    <glyph glyph-name="ion-android-cancel" unicode="&#xf36e;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM312 117l-75 75l75 75l-29 29l-75 -75l-75 75l-29 -29l75 -75l-75 -75l29 -29l75 75l75 -75z" />
+    <glyph glyph-name="ion-android-car" unicode="&#xf36f;" horiz-adv-x="384" 
+d="M339 331l45 -118v-160c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v11h-256v-11c0 -12 -9 -21 -21 -21h-22c-12 0 -21 9 -21 21v160l45 118c4 13 16 21 30 21h234c14 0 26 -8 30 -21zM75 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM309 128
+c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM43 235h298l-32 85h-234z" />
+    <glyph glyph-name="ion-android-cart" unicode="&#xf370;" horiz-adv-x="416" 
+d="M122 70c23 0 41 -18 41 -41s-18 -42 -41 -42s-42 19 -42 42s19 41 42 41zM0 397h68l19 -42h308c11 0 21 -9 21 -20c0 -4 -1 -8 -2 -10l-75 -129c-7 -14 -20 -22 -36 -22h-155l-21 -32s-2 -5 -2 -6c0 -3 2 -5 5 -5h238v-40h-243c-26 0 -45 14 -45 42c0 7 2 15 5 20l31 51
+l-74 151h-42v42zM326 70c23 0 42 -18 42 -41s-19 -42 -42 -42s-41 19 -41 42s18 41 41 41z" />
+    <glyph glyph-name="ion-android-chat" unicode="&#xf2d4;" horiz-adv-x="416" 
+d="M344 384c4 0 7 -4 7 -8v-214c0 -4 -3 -9 -7 -9h-187l-90 -89v89h-57c-4 0 -10 5 -10 9v214c0 4 6 8 10 8h334zM408 321c4 0 8 -5 8 -9v-214c0 -4 -4 -9 -8 -9h-57v-89l-90 89h-130l39 39h181c18 0 25 10 25 26v167h32z" />
+    <glyph glyph-name="ion-android-checkbox-blank" unicode="&#xf371;" horiz-adv-x="384" 
+d="M341 384c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" />
+    <glyph glyph-name="ion-android-checkbox-outline-blank" unicode="&#xf372;" horiz-adv-x="384" 
+d="M341 341h-298v-298h298v298zM341 384v0c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298z" />
+    <glyph glyph-name="ion-android-checkbox-outline" unicode="&#xf373;" horiz-adv-x="384" 
+d="M105 233l66 -66l183 183l30 -30l-213 -213l-96 96zM341 43v170h43v-170c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h213v-43h-213v-298h298z" />
+    <glyph glyph-name="ion-android-checkbox" unicode="&#xf374;" horiz-adv-x="384" 
+d="M341 384c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298zM149 85l192 192l-30 30l-162 -162l-76 77l-30 -30z" />
+    <glyph glyph-name="ion-android-checkmark-circle" unicode="&#xf375;" horiz-adv-x="416" 
+d="M123 232l64 -64l179 178l29 -29l-208 -208l-93 93zM374 192h42c0 -114 -94 -208 -208 -208s-208 94 -208 208s94 208 208 208c28 0 54 -6 78 -16l-32 -32c-15 4 -30 6 -46 6c-92 0 -166 -74 -166 -166s74 -166 166 -166s166 74 166 166z" />
+    <glyph glyph-name="ion-android-clipboard" unicode="&#xf376;" horiz-adv-x="384" 
+d="M341 368c23 0 43 -20 43 -43v-314c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v314c0 23 20 43 43 43h87c7 28 32 48 62 48s55 -20 62 -48h87zM192 368c-12 0 -21 -9 -21 -21s9 -22 21 -22s21 10 21 22s-9 21 -21 21zM344 8v320h-40v-72h-224v72h-40v-320h304z" />
+    <glyph glyph-name="ion-android-close" unicode="&#xf2d7;" horiz-adv-x="298" 
+d="M298 311l-119 -119l119 -119l-30 -30l-119 119l-119 -119l-30 30l119 119l-119 119l30 30l119 -119l119 119z" />
+    <glyph glyph-name="ion-android-cloud-circle" unicode="&#xf377;" horiz-adv-x="416" 
+d="M208 400c114 0 208 -94 208 -208s-94 -208 -208 -208s-208 94 -208 208s94 208 208 208zM302 109c29 0 52 23 52 52s-23 52 -52 52h-11c0 46 -37 83 -83 83c-38 0 -71 -26 -80 -62h-3c-34 0 -63 -29 -63 -63s29 -62 63 -62h177z" />
+    <glyph glyph-name="ion-android-cloud-done" unicode="&#xf378;" horiz-adv-x="480" 
+d="M387 231c52 -3 93 -46 93 -99c0 -55 -45 -100 -100 -100h-260c-66 0 -120 54 -120 120c0 62 47 113 107 119c25 48 75 81 133 81c73 0 133 -52 147 -121zM197 85l141 141l-30 30l-111 -111l-44 45l-30 -30z" />
+    <glyph glyph-name="ion-android-cloud-outline" unicode="&#xf379;" horiz-adv-x="480" 
+d="M387 231c52 -3 93 -46 93 -99c0 -55 -45 -100 -100 -100h-260c-66 0 -120 54 -120 120c0 62 47 113 107 119c25 48 75 81 133 81c73 0 133 -52 147 -121zM380 72c33 0 60 27 60 60s-27 60 -60 60h-30v10c0 61 -49 110 -110 110c-51 0 -93 -34 -106 -80h-14
+c-44 0 -80 -36 -80 -80s36 -80 80 -80h260z" />
+    <glyph glyph-name="ion-android-cloud" unicode="&#xf37a;" horiz-adv-x="480" 
+d="M387 231c52 -3 93 -46 93 -99c0 -55 -45 -100 -100 -100h-260c-66 0 -120 54 -120 120c0 62 47 113 107 119c25 48 75 81 133 81c73 0 133 -52 147 -121z" />
+    <glyph glyph-name="ion-android-color-palette" unicode="&#xf37b;" horiz-adv-x="384" 
+d="M192 384c106 0 192 -77 192 -171c0 -59 -48 -106 -107 -106h-38c-18 0 -32 -14 -32 -32c0 -9 3 -17 8 -22s9 -12 9 -21c0 -18 -14 -32 -32 -32c-106 0 -192 86 -192 192s86 192 192 192zM75 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM139 277
+c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM245 277c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM309 192c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-android-compass" unicode="&#xf37c;" 
+d="M224 217c13 0 25 -12 25 -25s-12 -25 -25 -25s-25 12 -25 25s12 25 25 25zM224 416c123 0 224 -101 224 -224s-101 -224 -224 -224s-224 101 -224 224s101 224 224 224zM273 143l85 183l-183 -85l-85 -183z" />
+    <glyph glyph-name="ion-android-contact" unicode="&#xf2d8;" horiz-adv-x="384" 
+d="M267 110c59 -18 104 -58 117 -110h-384c13 52 58 92 117 110c22 -13 48 -20 75 -20s53 7 75 20zM192 384c73 0 132 -59 132 -132s-59 -132 -132 -132s-132 59 -132 132s59 132 132 132zM192 153c42 0 78 26 92 63h-184c14 -37 50 -63 92 -63z" />
+    <glyph glyph-name="ion-android-contacts" unicode="&#xf2d9;" 
+d="M207 104c47 -14 76 -62 87 -104h-294c11 42 40 90 87 104c18 -10 38 -16 60 -16s42 6 60 16zM147 328c58 0 106 -48 106 -106s-48 -106 -106 -106s-106 48 -106 106s48 106 106 106zM147 141c34 0 62 23 74 51h-148c12 -28 40 -51 74 -51zM291 64c-13 20 -34 43 -60 53
+c11 9 21 23 28 35c13 -5 27 -8 42 -8c22 0 42 6 60 16c47 -14 76 -54 87 -96h-157zM275 248c-8 37 -31 69 -63 87c19 29 52 49 89 49c58 0 106 -48 106 -106s-48 -106 -106 -106c-11 0 -22 2 -32 5c3 8 6 16 7 25c8 -3 16 -4 25 -4c34 0 62 22 74 50h-100z" />
+    <glyph glyph-name="ion-android-contract" unicode="&#xf37d;" horiz-adv-x="384" 
+d="M0 77v51h128v-128h-51v77h-77zM77 307v77h51v-128h-128v51h77zM256 0v128h128v-51h-77v-77h-51zM307 307h77v-51h-128v128h51v-77z" />
+    <glyph glyph-name="ion-android-create" unicode="&#xf37e;" horiz-adv-x="384" 
+d="M0 80l236 236l80 -80l-236 -236h-80v80zM378 298l-40 -40l-80 80l40 40c9 9 20 9 29 0l51 -51c9 -9 9 -20 0 -29z" />
+    <glyph glyph-name="ion-android-delete" unicode="&#xf37f;" horiz-adv-x="320" 
+d="M32 43v245h256v-245c0 -23 -20 -43 -43 -43h-170c-23 0 -43 20 -43 43zM320 352v-32h-320v32h80l27 32h106l27 -32h80z" />
+    <glyph glyph-name="ion-android-desktop" unicode="&#xf380;" 
+d="M405 416c23 0 43 -20 43 -43v-282c0 -23 -20 -43 -43 -43h-138l42 -48v-32h-170v32l42 48h-138c-23 0 -43 20 -43 43v282c0 23 20 43 43 43h362zM405 128v245h-362v-245h362z" />
+    <glyph glyph-name="ion-android-document" unicode="&#xf381;" horiz-adv-x="320" 
+d="M192 400l128 -128v-248c0 -22 -18 -40 -40 -40h-240c-22 0 -40 18 -40 40v336c0 22 18 40 40 40h152zM176 256h112l-112 112v-112z" />
+    <glyph glyph-name="ion-android-done-all" unicode="&#xf382;" horiz-adv-x="512" 
+d="M388 308l-140 -139l-31 31l140 139zM481 339l31 -31l-264 -263l-122 123l30 31l92 -91zM0 168l32 31l122 -123l-31 -31z" />
+    <glyph glyph-name="ion-android-done" unicode="&#xf383;" horiz-adv-x="384" 
+d="M122 108l230 230l32 -31l-262 -261l-122 122l32 31z" />
+    <glyph glyph-name="ion-android-download" unicode="&#xf2dd;" horiz-adv-x="480" 
+d="M387 231c52 -3 93 -46 93 -99c0 -55 -45 -100 -100 -100h-260c-66 0 -120 54 -120 120c0 62 47 113 107 119c25 48 75 81 133 81c73 0 133 -52 147 -121zM208 180h-68l100 -100l100 100h-68v76h-64v-76z" />
+    <glyph glyph-name="ion-android-drafts" unicode="&#xf384;" 
+d="M448 246v-203c0 -23 -20 -43 -43 -43h-362c-23 0 -43 20 -43 43v203c0 15 8 30 20 37l204 101l204 -101c13 -7 20 -22 20 -37zM224 144l171 112l-171 85l-171 -85z" />
+    <glyph glyph-name="ion-android-exit" unicode="&#xf385;" horiz-adv-x="384" 
+d="M151 115l55 56h-206v42h207l-56 56l30 30l107 -107l-107 -107zM341 384c23 0 43 -20 43 -43v-298c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v85h43v-85h298v298h-298v-85h-43v85c0 23 20 43 43 43h298z" />
+    <glyph glyph-name="ion-android-expand" unicode="&#xf386;" horiz-adv-x="384" 
+d="M333 51v77h51v-128h-128v51h77zM333 333h-77v51h128v-128h-51v77zM51 333v-77h-51v128h128v-51h-77zM51 51h77v-51h-128v128h51v-77z" />
+    <glyph glyph-name="ion-android-favorite-outline" unicode="&#xf387;" horiz-adv-x="416" 
+d="M302 384c64 0 114 -50 114 -115c0 -80 -71 -144 -178 -242l-30 -27l-30 27c-107 98 -178 162 -178 242c0 65 50 115 114 115c36 0 71 -17 94 -44c23 27 58 44 94 44zM221 55c50 46 94 86 123 122c28 35 40 63 40 92c0 23 -9 44 -24 59s-35 24 -58 24
+c-26 0 -53 -13 -70 -33l-24 -29l-24 29c-17 20 -44 33 -70 33c-23 0 -43 -9 -58 -24s-24 -36 -24 -59c0 -29 12 -57 40 -92c29 -36 73 -76 123 -122l4 -4l9 -8l9 8z" />
+    <glyph glyph-name="ion-android-favorite" unicode="&#xf388;" horiz-adv-x="416" 
+d="M208 0l-30 27c-107 98 -178 162 -178 242c0 65 50 115 114 115c36 0 71 -17 94 -44c23 27 58 44 94 44c64 0 114 -50 114 -115c0 -80 -71 -144 -178 -242z" />
+    <glyph glyph-name="ion-android-film" unicode="&#xf389;" horiz-adv-x="320" 
+d="M280 384h40v-384h-40v43h-40v-43h-160v43h-40v-43h-40v384h40v-43h40v43h160v-43h40v43zM80 85v43h-40v-43h40zM80 171v42h-40v-42h40zM80 256v43h-40v-43h40zM280 85v43h-40v-43h40zM280 171v42h-40v-42h40zM280 256v43h-40v-43h40z" />
+    <glyph glyph-name="ion-android-folder-open" unicode="&#xf38a;" 
+d="M405 304c23 0 43 -20 43 -43v-186c0 -23 -20 -43 -43 -43h-362c-23 0 -43 20 -43 43v234c0 23 20 43 43 43h138l43 -48h181zM416 75v186c0 6 -5 11 -11 11h-373v-197c0 -6 5 -11 11 -11h362c6 0 11 5 11 11z" />
+    <glyph glyph-name="ion-android-folder" unicode="&#xf2e0;" 
+d="M181 352l43 -48h181c23 0 43 -20 43 -43v-186c0 -23 -20 -43 -43 -43h-362c-23 0 -43 20 -43 43v234c0 23 20 43 43 43h138z" />
+    <glyph glyph-name="ion-android-funnel" unicode="&#xf38b;" 
+d="M176 48v48h96v-48h-96zM0 336h448v-48h-448v48zM80 167v50h288v-50h-288z" />
+    <glyph glyph-name="ion-android-globe" unicode="&#xf38c;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM186 15c6 15 21 29 8 39c-8 7 -16 14 -23 21c-2 2 -11 20 -9 23c5 9 6 14 8 24c3 12 -3 16 -13 22c-15 10 -29 23 -43 34c-7 5 -17 10 -20 19s-5 20 -10 28c-14 20 -12 34 -10 58
+c0 7 -1 16 -2 25c-28 -32 -42 -73 -42 -116c0 -48 18 -92 52 -126c29 -29 65 -46 104 -51zM334 66c23 23 39 51 47 82c-8 -1 -19 2 -19 2s-21 24 -23 45c-2 22 0 39 -3 57c-3 16 -20 31 -27 46c-7 14 -13 28 -20 42c2 -1 5 -2 7 -3c5 1 10 2 14 2c-23 16 -49 25 -76 29v-8
+l4 -9l-14 -13l-9 3l-10 10l-10 12l-14 5c-16 -2 -31 -7 -45 -13v-7c7 3 16 5 23 8c3 1 13 -7 16 -9c-4 -5 -21 -15 -22 -21c0 -2 7 -6 7 -10c0 -6 -1 -11 -1 -17c3 3 20 21 22 21c13 3 35 -19 37 -26s-22 -24 -33 -34c-8 -8 -25 -12 -20 -24c2 -4 10 -20 5 -24
+c-6 -5 -14 9 -17 12c-8 10 -26 7 -38 7c0 -17 -1 -31 15 -43c15 -11 30 -25 47 -33c13 -6 36 7 47 -1c16 -11 29 -21 47 -29c8 -3 33 -20 26 -31c-5 -8 -10 -15 -14 -23s-13 -20 -20 -25c-8 -6 -16 -17 -21 -29c35 7 66 23 92 49z" />
+    <glyph glyph-name="ion-android-hand" unicode="&#xf2e3;" horiz-adv-x="414" 
+d="M401 174c15 -15 18 -36 3 -51c0 0 -96 -103 -126 -121v0c-28 -21 -65 -34 -100 -34c-55 0 -101 36 -117 85v0v1c0 1 -1 2 -1 3l-58 189c-5 15 2 32 17 37s30 -3 35 -18l34 -88c1 -4 2 -2 2 1l-22 161c-3 15 7 30 22 33s30 -8 33 -23l25 -138c0 -2 2 -2 2 0v177
+c0 15 13 28 28 28s28 -13 28 -28l8 -175c0 -5 3 -4 4 -1l23 135c2 15 16 27 31 25s27 -17 25 -32l-21 -172c-1 -12 -3 -30 2 -36c8 -9 20 -9 31 2l42 42c15 15 35 13 50 -2z" />
+    <glyph glyph-name="ion-android-hangout" unicode="&#xf38d;" horiz-adv-x="352" 
+d="M176 400c97 0 176 -77 176 -172c0 -91 -76 -196 -176 -244v71c-97 0 -176 78 -176 173s79 172 176 172zM166 217v61h-62v-61h31l-21 -40h31zM248 217v61h-62v-61h31l-20 -40h31z" />
+    <glyph glyph-name="ion-android-happy" unicode="&#xf38e;" horiz-adv-x="416" 
+d="M208 400c114 0 208 -94 208 -208s-93 -208 -208 -208s-208 94 -208 208s93 208 208 208zM208 26c92 0 166 74 166 166s-74 166 -166 166s-166 -74 -166 -166s74 -166 166 -166zM281 213c-18 0 -31 13 -31 31s13 31 31 31s31 -13 31 -31s-13 -31 -31 -31zM135 213
+c-18 0 -31 13 -31 31s13 31 31 31s31 -13 31 -31s-13 -31 -31 -31zM208 78c-49 0 -89 29 -106 72h212c-17 -43 -57 -72 -106 -72z" />
+    <glyph glyph-name="ion-android-home" unicode="&#xf38f;" horiz-adv-x="416" 
+d="M160 0h-98v192h-62l208 192l208 -192h-62v-192h-98v128h-96v-128z" />
+    <glyph glyph-name="ion-android-image" unicode="&#xf2e4;" horiz-adv-x="384" 
+d="M384 43c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h298c23 0 43 -20 43 -43v-298zM117 160l-74 -96h298l-96 128l-74 -96z" />
+    <glyph glyph-name="ion-android-laptop" unicode="&#xf390;" horiz-adv-x="512" 
+d="M437 32h75c0 -23 -64 -32 -96 -32h-320c-32 0 -96 9 -96 32h75c-23 0 -43 20 -43 43v266c0 23 20 43 43 43h362c23 0 43 -20 43 -43v-266c0 -23 -20 -43 -43 -43zM75 341v-272h362v272h-362zM256 13c12 0 21 10 21 22s-9 21 -21 21s-21 -9 -21 -21s9 -22 21 -22z" />
+    <glyph glyph-name="ion-android-list" unicode="&#xf391;" horiz-adv-x="384" 
+d="M344 384c22 0 40 -18 40 -40v-304c0 -22 -18 -40 -40 -40h-304c-22 0 -40 18 -40 40v304c0 22 18 40 40 40h304zM240 80v48h-160v-48h160zM304 168v48h-224v-48h224zM304 256v48h-224v-48h224z" />
+    <glyph glyph-name="ion-android-locate" unicode="&#xf2e9;" 
+d="M224 272c44 0 80 -36 80 -80s-36 -80 -80 -80s-80 36 -80 80s36 80 80 80zM415 213h33v-42h-33c-10 -89 -81 -160 -170 -170v-33h-42v33c-89 10 -160 81 -170 170h-33v42h33c10 89 81 160 170 170v33h42v-33c89 -10 160 -81 170 -170zM224 43c82 0 149 67 149 149
+s-67 149 -149 149s-149 -67 -149 -149s67 -149 149 -149z" />
+    <glyph glyph-name="ion-android-lock" unicode="&#xf392;" horiz-adv-x="320" 
+d="M280 262c22 0 40 -18 40 -40v-200c0 -22 -18 -40 -40 -40h-240c-22 0 -40 18 -40 40v200c0 22 18 40 40 40h20v40c0 55 45 100 100 100s100 -45 100 -100v-40h20zM160 80c22 0 40 18 40 40s-18 40 -40 40s-40 -18 -40 -40s18 -40 40 -40zM222 262v40c0 34 -28 62 -62 62
+s-62 -28 -62 -62v-40h124z" />
+    <glyph glyph-name="ion-android-mail" unicode="&#xf2eb;" 
+d="M405 368c23 0 43 -20 43 -43v-266c0 -23 -20 -43 -43 -43h-362c-23 0 -43 20 -43 43v266c0 23 20 43 43 43h362zM400 277v43l-176 -117l-176 117v-43l176 -117z" />
+    <glyph glyph-name="ion-android-map" unicode="&#xf393;" horiz-adv-x="384" 
+d="M373 384c6 0 11 -5 11 -11v-322c0 -5 -3 -9 -7 -10l-121 -41l-128 45s-105 -41 -108 -42s-7 -3 -9 -3c-6 0 -11 5 -11 11v322c0 5 3 9 7 10l121 41l128 -45s103 40 108 42s7 3 9 3zM256 43v254l-128 44v-254z" />
+    <glyph glyph-name="ion-android-menu" unicode="&#xf394;" horiz-adv-x="384" 
+d="M0 64v43h384v-43h-384zM0 171v42h384v-42h-384zM0 320h384v-43h-384v43z" />
+    <glyph glyph-name="ion-android-microphone-off" unicode="&#xf395;" horiz-adv-x="408" 
+d="M316 93l58 -58l-58 58l58 -58l34 -33l-24 -24l-95 95c-19 -11 -40 -20 -62 -23v-82h-46v82c-75 10 -137 76 -137 153h39c0 -68 58 -117 121 -117c20 0 40 5 57 14l-32 33c-8 -3 -16 -5 -25 -5c-38 0 -69 31 -69 69v29l-135 134l24 24l111 -110v0l140 -140l5 -5l9 -9z
+M273 197c0 -4 0 -8 -1 -12l-137 137v25c0 38 31 69 69 69s69 -31 69 -69v-150zM365 203c0 -31 -10 -60 -27 -84l-27 28c9 17 15 36 15 56h39zM408 2v0l-34 33z" />
+    <glyph glyph-name="ion-android-microphone" unicode="&#xf2ec;" horiz-adv-x="320" 
+d="M160 128c-38 0 -69 31 -69 69v150c0 38 31 69 69 69s69 -31 69 -69v-150c0 -38 -31 -69 -69 -69zM281 203h39c0 -78 -62 -142 -137 -153v-82h-46v82c-75 10 -137 75 -137 153h39c0 -69 58 -116 121 -116s121 47 121 116z" />
+    <glyph glyph-name="ion-android-more-horizontal" unicode="&#xf396;" horiz-adv-x="320" 
+d="M40 232c22 0 40 -18 40 -40s-18 -40 -40 -40s-40 18 -40 40s18 40 40 40zM280 232c22 0 40 -18 40 -40s-18 -40 -40 -40s-40 18 -40 40s18 40 40 40zM160 232c22 0 40 -18 40 -40s-18 -40 -40 -40s-40 18 -40 40s18 40 40 40z" />
+    <glyph glyph-name="ion-android-more-vertical" unicode="&#xf397;" horiz-adv-x="80" 
+d="M80 312c0 -22 -18 -40 -40 -40s-40 18 -40 40s18 40 40 40s40 -18 40 -40zM80 72c0 -22 -18 -40 -40 -40s-40 18 -40 40s18 40 40 40s40 -18 40 -40zM80 192c0 -22 -18 -40 -40 -40s-40 18 -40 40s18 40 40 40s40 -18 40 -40z" />
+    <glyph glyph-name="ion-android-navigate" unicode="&#xf398;" horiz-adv-x="320" 
+d="M160 384l160 -369l-15 -15l-145 64l-145 -64l-15 15z" />
+    <glyph glyph-name="ion-android-notifications-none" unicode="&#xf399;" horiz-adv-x="352" 
+d="M177 328h-2c-6 0 -24 -5 -24 -5c-46 -10 -78 -53 -78 -100v-114v-13l-9 -10l-8 -8h240l-8 8l-9 10v13v114c0 47 -32 90 -78 100c0 0 -17 5 -24 5zM176 400v0c18 0 31 -13 31 -31v-15c59 -14 104 -68 104 -131v-114l41 -42v-21h-352v21l41 42v114c0 63 45 117 104 131v15
+c0 18 13 31 31 31zM217 26v0c0 -23 -18 -42 -41 -42s-41 19 -41 42h82z" />
+    <glyph glyph-name="ion-android-notifications-off" unicode="&#xf39a;" horiz-adv-x="364" 
+d="M182 -16c-23 0 -41 19 -41 42h82c0 -23 -18 -42 -41 -42zM57 341l295 -295v0l12 -12l-24 -24l-36 36h-298v21l41 41v115c0 23 6 44 16 63l-63 64l24 24l33 -33v0zM317 223v-94l-208 207c13 8 27 15 42 18v15c0 18 13 31 31 31s31 -13 31 -31v-15c59 -14 104 -67 104 -131
+z" />
+    <glyph glyph-name="ion-android-notifications" unicode="&#xf39b;" horiz-adv-x="352" 
+d="M176 -16c-23 0 -41 19 -41 42h82c0 -23 -18 -42 -41 -42zM311 109l41 -42v-21h-352v21l41 42v114c0 63 45 117 104 131v15c0 18 13 31 31 31s31 -13 31 -31v-15c59 -14 104 -68 104 -131v-114z" />
+    <glyph glyph-name="ion-android-open" unicode="&#xf39c;" horiz-adv-x="384" 
+d="M341 43v133h43v-133c0 -23 -20 -43 -43 -43h-298c-23 0 -43 20 -43 43v298c0 23 20 43 43 43h133v-43h-133v-298h298zM224 384h160v-160h-43v87l-215 -215l-30 30l215 215h-87v43z" />
+    <glyph glyph-name="ion-android-options" unicode="&#xf39d;" 
+d="M0 32v32h272v-32h-272zM368 32v32h80v-32h-80zM352 0c0 -18 -14 -32 -32 -32v0c-18 0 -32 14 -32 32v96c0 18 14 32 32 32v0c18 0 32 -14 32 -32v-96zM0 176v32h80v-32h-80zM176 176v32h272v-32h-272zM160 144c0 -18 -14 -32 -32 -32v0c-18 0 -32 14 -32 32v96
+c0 18 14 32 32 32v0c18 0 32 -14 32 -32v-96zM0 320v32h272v-32h-272zM368 320v32h80v-32h-80zM352 288c0 -18 -14 -32 -32 -32v0c-18 0 -32 14 -32 32v96c0 18 14 32 32 32v0c18 0 32 -14 32 -32v-96z" />
+    <glyph glyph-name="ion-android-people" unicode="&#xf39e;" 
+d="M305 216c-34 0 -61 27 -61 60s27 60 61 60s62 -27 62 -60s-28 -60 -62 -60zM143 216c-34 0 -62 27 -62 60s28 60 62 60s61 -27 61 -60s-27 -60 -61 -60zM143 172c48 0 145 -23 145 -70v-54h-288v54c0 47 95 70 143 70zM305 161c48 0 143 -12 143 -59v-54h-128v54
+c0 30 -9 41 -32 58c7 1 11 1 17 1z" />
+    <glyph glyph-name="ion-android-person-add" unicode="&#xf39f;" horiz-adv-x="480" 
+d="M288 192c-53 0 -96 43 -96 96s43 96 96 96s96 -43 96 -96s-43 -96 -96 -96zM288 144c64 0 192 -32 192 -96v-48h-384v48c0 64 128 96 192 96zM96 224h64v-32h-64v-64h-32v64h-64v32h64v64h32v-64z" />
+    <glyph glyph-name="ion-android-person" unicode="&#xf3a0;" horiz-adv-x="384" 
+d="M192 192c-53 0 -96 43 -96 96s43 96 96 96s96 -43 96 -96s-43 -96 -96 -96zM192 144c64 0 192 -32 192 -96v-48h-384v48c0 64 128 96 192 96z" />
+    <glyph glyph-name="ion-android-phone-landscape" unicode="&#xf3a1;" 
+d="M448 89c0 -23 -19 -41 -41 -41h-366c-22 0 -41 18 -41 41v206c0 23 19 41 41 41h366c22 0 41 -18 41 -41v-206zM80 84h288v216h-288v-216z" />
+    <glyph glyph-name="ion-android-phone-portrait" unicode="&#xf3a2;" horiz-adv-x="288" 
+d="M247 416c23 0 41 -19 41 -41v-366c0 -22 -18 -41 -41 -41h-206c-23 0 -41 19 -41 41v366c0 22 18 41 41 41h206zM252 48v288h-216v-288h216z" />
+    <glyph glyph-name="ion-android-pin" unicode="&#xf3a3;" horiz-adv-x="320" 
+d="M160 416c88 0 160 -71 160 -157c0 -118 -160 -291 -160 -291s-160 173 -160 291c0 86 72 157 160 157zM160 203c32 0 57 25 57 56s-25 56 -57 56s-57 -25 -57 -56s25 -56 57 -56z" />
+    <glyph glyph-name="ion-android-plane" unicode="&#xf3a4;" horiz-adv-x="384" 
+d="M384 112l-160 48v-114l48 -31v-31l-80 16l-80 -16v31l48 31v114l-160 -48v40l160 104v113c0 18 15 31 32 31s32 -13 32 -31v-113l160 -104v-40z" />
+    <glyph glyph-name="ion-android-playstore" unicode="&#xf2f0;" horiz-adv-x="416" 
+d="M416 296c-19 -214 -13 -312 -13 -312h-390s6 96 -13 312h104c0 57 47 104 104 104s104 -47 104 -104h104zM208 374c-43 0 -78 -35 -78 -78h156c0 43 -35 78 -78 78zM156 50l143 85l-143 84v-169z" />
+    <glyph glyph-name="ion-android-print" unicode="&#xf3a5;" horiz-adv-x="416" 
+d="M352 288c35 0 64 -29 64 -64v-139h-80v-85h-256v85h-80v139c0 35 29 64 64 64h288zM304 32v128h-192v-128h192zM336 384v0v-80h-256v80h256z" />
+    <glyph glyph-name="ion-android-radio-button-off" unicode="&#xf3a6;" horiz-adv-x="416" 
+d="M208 400c114 0 208 -94 208 -208s-94 -208 -208 -208s-208 94 -208 208s94 208 208 208zM208 26c92 0 166 74 166 166s-74 166 -166 166s-166 -74 -166 -166s74 -166 166 -166z" />
+    <glyph glyph-name="ion-android-radio-button-on" unicode="&#xf3a7;" horiz-adv-x="416" 
+d="M208 296c57 0 104 -47 104 -104s-47 -104 -104 -104s-104 47 -104 104s47 104 104 104zM208 400c114 0 208 -94 208 -208s-94 -208 -208 -208s-208 94 -208 208s94 208 208 208zM208 26c92 0 166 74 166 166s-74 166 -166 166s-166 -74 -166 -166s74 -166 166 -166z" />
+    <glyph glyph-name="ion-android-refresh" unicode="&#xf3a8;" horiz-adv-x="352" 
+d="M176 60c56 0 104 34 123 84h46c-21 -74 -88 -128 -169 -128c-98 0 -176 79 -176 176s79 176 176 176c48 0 92 -20 124 -52l52 52v-154h-154l70 70c-23 24 -56 40 -92 40c-73 0 -132 -59 -132 -132s59 -132 132 -132z" />
+    <glyph glyph-name="ion-android-remove-circle" unicode="&#xf3a9;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM315 171v42h-214v-42h214z" />
+    <glyph glyph-name="ion-android-remove" unicode="&#xf2f4;" horiz-adv-x="320" 
+d="M0 171v42h320v-42h-320z" />
+    <glyph glyph-name="ion-android-restaurant" unicode="&#xf3aa;" horiz-adv-x="415" 
+d="M116 168l-91 89c-34 33 -34 86 0 119l153 -148zM264 206l-33 -31l150 -145l-30 -30l-150 146l-150 -146l-30 30s163 159 211 207c-15 32 -4 77 31 111c41 40 101 49 132 17c33 -31 24 -89 -17 -129c-34 -34 -80 -45 -114 -30z" />
+    <glyph glyph-name="ion-android-sad" unicode="&#xf3ab;" horiz-adv-x="416" 
+d="M208 160c45 0 83 -26 102 -64h-204c19 38 57 64 102 64zM208 400c114 0 208 -94 208 -208s-93 -208 -208 -208s-208 94 -208 208s93 208 208 208zM208 26c92 0 166 74 166 166s-74 166 -166 166s-166 -74 -166 -166s74 -166 166 -166zM281 213c-18 0 -31 13 -31 31
+s13 31 31 31s31 -13 31 -31s-13 -31 -31 -31zM135 213c-18 0 -31 13 -31 31s13 31 31 31s31 -13 31 -31s-13 -31 -31 -31z" />
+    <glyph glyph-name="ion-android-search" unicode="&#xf2f5;" horiz-adv-x="384" 
+d="M274 143l110 -110l-33 -33l-109 110v17l-7 6c-25 -21 -58 -34 -93 -34c-79 0 -142 63 -142 142s63 143 141 143c79 0 142 -64 142 -143c0 -36 -13 -68 -34 -93l7 -5h18zM142 143c55 0 99 43 99 98s-44 99 -99 99s-98 -44 -98 -99s43 -98 98 -98z" />
+    <glyph glyph-name="ion-android-send" unicode="&#xf2f6;" horiz-adv-x="416" 
+d="M0 0v149l298 43l-298 43v149l416 -192z" />
+    <glyph glyph-name="ion-android-settings" unicode="&#xf2f7;" horiz-adv-x="416" 
+d="M366 171l47 -34c3 -3 4 -10 2 -14l-43 -71c-2 -4 -7 -7 -12 -5l-54 21c-12 -8 -23 -16 -36 -21l-8 -55c-1 -4 -6 -8 -11 -8h-85c-5 0 -10 3 -11 8l-8 55c-13 5 -25 13 -36 21l-54 -21c-4 -2 -10 1 -12 5l-43 71c-3 5 -2 11 2 14l45 34c0 7 -1 14 -1 21s1 14 1 21l-46 34
+c-3 3 -4 10 -2 14l43 71c2 4 7 7 12 5l54 -21c12 8 23 16 36 21l8 55c1 4 6 8 11 8h85c5 0 10 -4 11 -8l7 -55c13 -5 25 -13 36 -21l53 21c4 2 11 -1 13 -5l43 -71c3 -5 2 -11 -2 -14l-45 -34c0 -7 1 -14 1 -21s0 -15 -1 -21zM207 119c41 0 75 32 75 73s-34 73 -75 73
+s-74 -32 -74 -73s33 -73 74 -73z" />
+    <glyph glyph-name="ion-android-share-alt" unicode="&#xf3ac;" horiz-adv-x="384" 
+d="M320 104c34 0 62 -28 62 -62s-28 -62 -62 -62s-62 28 -62 62c0 5 1 10 2 14l-152 88c-12 -11 -27 -17 -44 -17c-35 0 -64 29 -64 64s28 64 63 64c17 0 32 -6 44 -17l151 87c-1 5 -2 10 -2 15c0 35 29 64 64 64s64 -29 64 -64s-29 -64 -64 -64c-17 0 -32 6 -44 17
+l-151 -87c1 -5 2 -10 2 -15s-1 -10 -2 -15l153 -88c11 11 26 16 42 16z" />
+    <glyph glyph-name="ion-android-share" unicode="&#xf2f8;" horiz-adv-x="384" 
+d="M384 200l-160 -147v88c-107 0 -171 -34 -224 -109c21 107 75 214 224 235v85z" />
+    <glyph glyph-name="ion-android-star-half" unicode="&#xf3ad;" horiz-adv-x="404" 
+d="M404 238l-110 -96l33 -142l-125 75l-125 -75l33 142l-110 96l145 12l57 134l57 -134zM219 103l60 -36l-16 68l-5 19l15 12l53 46l-70 6l-19 2l-8 18l-27 64v-189z" />
+    <glyph glyph-name="ion-android-star-outline" unicode="&#xf3ae;" horiz-adv-x="404" 
+d="M404 238l-110 -96l33 -142l-125 75l-125 -75l33 142l-110 96l145 12l57 134l57 -134zM219 103l60 -36l-16 68l-5 19l15 12l53 46l-70 6l-19 2l-8 18l-27 64l-27 -64l-8 -18l-19 -2l-70 -6l53 -46l15 -12l-5 -19l-16 -68l60 36l17 10z" />
+    <glyph glyph-name="ion-android-star" unicode="&#xf2fc;" horiz-adv-x="404" 
+d="M202 75l-125 -75l33 142l-110 96l145 12l57 134l57 -134l145 -12l-110 -96l33 -142z" />
+    <glyph glyph-name="ion-android-stopwatch" unicode="&#xf2fd;" horiz-adv-x="384" 
+d="M168 141v131h48v-131h-48zM344 278c25 -33 40 -74 40 -118c0 -106 -86 -192 -192 -192s-192 86 -192 192s86 192 192 192c44 0 85 -15 118 -40l31 30l33 -33zM298 54c28 28 44 66 44 106s-16 78 -44 106s-66 44 -106 44s-78 -16 -106 -44s-44 -66 -44 -106
+s16 -78 44 -106s66 -44 106 -44s78 16 106 44zM128 368v48h128v-48h-128z" />
+    <glyph glyph-name="ion-android-subway" unicode="&#xf3af;" horiz-adv-x="352" 
+d="M176 400c94 0 176 -10 176 -85v-214c0 -42 -33 -74 -75 -74l27 -27v-16h-256v16l27 27c-42 0 -75 32 -75 74v214c0 75 82 85 176 85zM80 64c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM160 208v96h-112v-96h112zM272 64c18 0 32 14 32 32
+s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM304 208v96h-112v-96h112z" />
+    <glyph glyph-name="ion-android-sunny" unicode="&#xf3b0;" 
+d="M224 288c-25 0 -50 -10 -68 -28s-28 -43 -28 -68s10 -50 28 -68s43 -28 68 -28s50 10 68 28s28 43 28 68s-10 50 -28 68s-43 28 -68 28zM245 416v0v-64h-42v64h42zM374 372v0l30 -30l-38 -38l-30 30zM74 372v0l38 -38l-30 -30l-38 38zM224 320v0c70 0 128 -58 128 -128
+s-58 -128 -128 -128s-128 58 -128 128s58 128 128 128zM448 213v0v-42h-64v42h64zM64 213v0v-42h-64v42h64zM366 80v0l38 -38l-30 -30l-38 38zM82 80v0l30 -30l-38 -38l-30 30zM245 32v0v-64h-42v64h42z" />
+    <glyph glyph-name="ion-android-sync" unicode="&#xf3b1;" horiz-adv-x="320" 
+d="M160 355c88 0 160 -73 160 -163c0 -32 -9 -62 -25 -87l-29 30c9 17 14 37 14 57c0 67 -54 122 -120 122v-61l-80 82l80 81v-61zM160 70v61l80 -82l-80 -81v61c-88 0 -160 73 -160 163c0 32 9 63 25 87l29 -30c-9 -17 -14 -37 -14 -57c0 -67 54 -122 120 -122z" />
+    <glyph glyph-name="ion-android-textsms" unicode="&#xf3b2;" horiz-adv-x="384" 
+d="M344 384c22 0 40 -18 40 -40v-240c0 -22 -18 -40 -40 -40h-280l-64 -64v344c0 22 10 40 32 40h312zM134 206v40h-38v-40h38zM211 206v40h-38v-40h38zM288 206v40h-38v-40h38z" />
+    <glyph glyph-name="ion-android-time" unicode="&#xf3b3;" horiz-adv-x="426" 
+d="M213 405c117 0 213 -96 213 -213s-95 -213 -213 -213s-213 96 -213 213s95 213 213 213zM213 22c94 0 170 76 170 170s-76 170 -170 170s-170 -76 -170 -170s76 -170 170 -170zM224 298v-111l96 -57l-16 -26l-112 67v127h32z" />
+    <glyph glyph-name="ion-android-train" unicode="&#xf3b4;" horiz-adv-x="352" 
+d="M0 101v214c0 75 82 85 176 85s176 -10 176 -85v-214c0 -42 -33 -74 -75 -74l27 -27v-16h-256v16l27 27c-42 0 -75 32 -75 74zM176 72c22 0 40 18 40 40s-18 40 -40 40s-40 -18 -40 -40s18 -40 40 -40zM304 224v96h-256v-96h256z" />
+    <glyph glyph-name="ion-android-unlock" unicode="&#xf3b5;" horiz-adv-x="320" 
+d="M280 262c22 0 40 -18 40 -40v-200c0 -22 -18 -40 -40 -40h-240c-22 0 -40 18 -40 40v200c0 22 18 40 40 40h182v40v0c0 34 -28 62 -62 62s-62 -28 -62 -62h-38c0 55 45 100 100 100s100 -45 100 -100v-40h20zM160 80c22 0 40 18 40 40s-18 40 -40 40s-40 -18 -40 -40
+s18 -40 40 -40z" />
+    <glyph glyph-name="ion-android-upload" unicode="&#xf3b6;" horiz-adv-x="480" 
+d="M387 231c52 -3 93 -46 93 -99c0 -55 -45 -100 -100 -100h-260c-66 0 -120 54 -120 120c0 62 47 113 107 119c25 48 75 81 133 81c73 0 133 -52 147 -121zM272 172h68l-100 100l-100 -100h68v-76h64v76z" />
+    <glyph glyph-name="ion-android-volume-down" unicode="&#xf3b7;" horiz-adv-x="288" 
+d="M0 256h85l107 112v-352l-107 112h-85v128zM288 192c0 -38 -21 -73 -53 -88v177c32 -16 53 -51 53 -89z" />
+    <glyph glyph-name="ion-android-volume-mute" unicode="&#xf3b8;" horiz-adv-x="192" 
+d="M0 256h85l107 112v-352l-107 112h-85v128z" />
+    <glyph glyph-name="ion-android-volume-off" unicode="&#xf3b9;" horiz-adv-x="384" 
+d="M342 192c0 69 -45 128 -107 147v45c85 -20 149 -99 149 -192c0 -35 -8 -68 -24 -96l-32 32c9 19 14 41 14 64zM192 368v-104l-51 51zM357 51v0l24 -24l-24 -24l-40 40c-23 -21 -51 -36 -82 -43v45c19 6 37 15 52 28l-95 95v-152l-107 112h-85v128h85l9 10l-91 91l24 24z
+M288 192c0 -7 0 -15 -2 -22l-51 51v60c32 -16 53 -51 53 -89z" />
+    <glyph glyph-name="ion-android-volume-up" unicode="&#xf3ba;" horiz-adv-x="384" 
+d="M0 256h85l107 112v-352l-107 112h-85v128zM288 192c0 -38 -21 -73 -53 -88v177c32 -16 53 -51 53 -89zM235 384c85 -20 149 -99 149 -192s-64 -172 -149 -192v45c62 19 106 78 106 147s-44 128 -106 147v45z" />
+    <glyph glyph-name="ion-android-walk" unicode="&#xf3bb;" horiz-adv-x="272" 
+d="M168 336c-22 0 -40 18 -40 40s18 40 40 40s40 -18 40 -40s-18 -40 -40 -40zM168 216l-20 38l-20 -62l57 -96v-128h-38v96l-50 68l-57 -164h-40l81 320l-41 -16v-80h-40v112l111 38c4 1 10 1 13 1c13 0 23 -6 31 -18l45 -69h72v-40h-104z" />
+    <glyph glyph-name="ion-android-warning" unicode="&#xf3bc;" 
+d="M0 -16l224 416l224 -416h-448zM248 48v48h-48v-48h48zM248 128v96h-48v-96h48z" />
+    <glyph glyph-name="ion-android-watch" unicode="&#xf3bd;" horiz-adv-x="320" 
+d="M320 192c0 -51 -24 -96 -61 -125l-19 -115h-160l-19 115c-37 29 -61 74 -61 125s24 96 61 125l19 115h160l19 -115c37 -29 61 -74 61 -125zM40 192c0 -66 54 -120 120 -120s120 54 120 120s-54 120 -120 120s-120 -54 -120 -120z" />
+    <glyph glyph-name="ion-android-wifi" unicode="&#xf305;" horiz-adv-x="416" 
+d="M208 219c23 0 42 -18 42 -41s-19 -41 -42 -41s-42 18 -42 41s19 41 42 41zM333 178c0 -45 -26 -85 -63 -107l-20 36c25 14 41 40 41 71c0 45 -37 82 -83 82s-83 -37 -83 -82c0 -31 16 -57 41 -71l-20 -36c-37 22 -63 62 -63 107c0 68 56 124 125 124s125 -56 125 -124z
+M208 384c114 0 208 -93 208 -206c0 -76 -42 -142 -104 -178l-21 36c50 28 83 81 83 142c0 91 -74 165 -166 165s-166 -74 -166 -165c0 -61 33 -113 83 -142l-21 -36c-62 36 -104 102 -104 178c0 113 94 206 208 206z" />
+    <glyph glyph-name="ion-aperture" unicode="&#xf313;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56s-100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136s85 -56 136 -56s100 20 136 56zM168 342l56 -86h-147
+c17 40 50 71 91 86zM381 160h-102l72 129c21 -27 33 -60 33 -97c0 -11 -1 -22 -3 -32zM328 314l-49 -90l-78 126c8 1 15 2 23 2c40 0 76 -14 104 -38zM67 224h102l-72 -129c-21 27 -33 60 -33 97c0 11 1 22 3 32zM280 42l-56 86h147c-17 -40 -50 -71 -91 -86zM120 70l49 90
+l78 -126c-8 -1 -15 -2 -23 -2c-40 0 -76 14 -104 38z" />
+    <glyph glyph-name="ion-archive" unicode="&#xf102;" 
+d="M224 140l-128 116h80v96h96v-96h80zM433 151c11 -6 17 -19 15 -32l-9 -67c-2 -13 -9 -20 -28 -20h-374c-18 0 -26 7 -28 20l-9 67c-2 13 3 26 14 32l72 55h42l-62 -62h50c2 0 5 -1 6 -3l18 -45h168l18 45c1 2 3 3 5 3h51l-62 62h42z" />
+    <glyph glyph-name="ion-arrow-down-a" unicode="&#xf103;" horiz-adv-x="384" 
+d="M192 -0l-192 192h112v192h160v-192h112z" />
+    <glyph glyph-name="ion-arrow-down-b" unicode="&#xf104;" horiz-adv-x="320" 
+d="M3 263c-2 2 -3 6 -3 9c0 9 8 16 17 16v0h286v0c9 0 17 -7 17 -16c0 -3 -1 -6 -3 -8l-2 -3l-136 -156c-5 -5 -11 -9 -19 -9s-14 4 -19 9l-136 156z" />
+    <glyph glyph-name="ion-arrow-down-c" unicode="&#xf105;" horiz-adv-x="274" 
+d="M265 125l-105 -100c-6 -6 -14 -9 -23 -9s-16 3 -22 9l-106 100c-12 12 -12 31 0 43s34 12 46 0l50 -48v217c0 17 14 31 32 31s32 -14 32 -31v-217l50 48c12 12 34 12 46 0s12 -31 0 -43z" />
+    <glyph glyph-name="ion-arrow-expand" unicode="&#xf25e;" horiz-adv-x="320" 
+d="M178 238l64 64l-50 50h128v-128l-50 50l-64 -64zM178 146l28 28l64 -64l50 50v-128h-128l50 50zM142 146l-64 -64l50 -50h-128v128l50 -50l64 64zM142 238l-28 -28l-64 64l-50 -50v128h128l-50 -50z" />
+    <glyph glyph-name="ion-arrow-graph-down-left" unicode="&#xf25f;" 
+d="M0 64v160l61 -61l131 141l107 -112l149 128l-149 -203l-107 107l-94 -98l62 -62h-160z" />
+    <glyph glyph-name="ion-arrow-graph-down-right" unicode="&#xf260;" 
+d="M288 64l62 62l-94 98l-107 -107l-149 203l149 -128l107 112l131 -141l61 61v-160h-160z" />
+    <glyph glyph-name="ion-arrow-graph-up-left" unicode="&#xf261;" 
+d="M160 320l-62 -62l94 -98l107 107l149 -203l-149 128l-107 -112l-131 141l-61 -61v160h160z" />
+    <glyph glyph-name="ion-arrow-graph-up-right" unicode="&#xf262;" 
+d="M288 320h160v-160l-61 61l-131 -141l-107 112l-149 -128l149 203l107 -107l94 98z" />
+    <glyph glyph-name="ion-arrow-left-a" unicode="&#xf106;" horiz-adv-x="384" 
+d="M0 192l192 192v-112h192v-160h-192v-112z" />
+    <glyph glyph-name="ion-arrow-left-b" unicode="&#xf107;" horiz-adv-x="192" 
+d="M167 349c2 2 6 3 9 3c9 0 16 -8 16 -17v0v-286v0c0 -9 -7 -17 -16 -17c-3 0 -7 1 -9 3l-2 2l-156 136c-5 5 -9 11 -9 19s4 14 9 19l156 136z" />
+    <glyph glyph-name="ion-arrow-left-c" unicode="&#xf108;" horiz-adv-x="352" 
+d="M109 320c12 12 32 12 44 0s12 -34 0 -46l-49 -50h217c17 0 31 -14 31 -32s-14 -32 -31 -32h-217l48 -50c12 -12 12 -34 0 -46s-31 -12 -43 0l-100 106c-6 6 -9 13 -9 22s3 17 9 23z" />
+    <glyph glyph-name="ion-arrow-move" unicode="&#xf263;" 
+d="M448 192l-96 -96v76h-109l1 -108h76l-96 -96l-96 96h76v108h-108v-76l-96 96l96 96v-76h108v108h-76l96 96l96 -96h-76v-108h108v76z" />
+    <glyph glyph-name="ion-arrow-resize" unicode="&#xf264;" horiz-adv-x="320" 
+d="M192 352h128v-128l-50 50l-9 -9l-183 -183l50 -50h-128v128l50 -50l128 128v0l64 64z" />
+    <glyph glyph-name="ion-arrow-return-left" unicode="&#xf265;" horiz-adv-x="384" 
+d="M128 352v-64h248c4 0 8 -4 8 -8v-240c0 -4 -4 -8 -8 -8h-304c-4 0 -8 4 -8 8v48c0 4 4 8 8 8h248v128h-192v-64l-128 96z" />
+    <glyph glyph-name="ion-arrow-return-right" unicode="&#xf266;" horiz-adv-x="384" 
+d="M384 256l-128 -96v64h-192v-128h248c4 0 8 -4 8 -8v-48c0 -4 -4 -8 -8 -8h-304c-4 0 -8 4 -8 8v240c0 4 4 8 8 8h248v64z" />
+    <glyph glyph-name="ion-arrow-right-a" unicode="&#xf109;" horiz-adv-x="384" 
+d="M384 192l-192 -192v112h-192v160h192v112z" />
+    <glyph glyph-name="ion-arrow-right-b" unicode="&#xf10a;" horiz-adv-x="192" 
+d="M25 35c-2 -2 -6 -3 -9 -3c-9 0 -16 8 -16 17v0v286v0c0 9 7 17 16 17c3 0 6 -1 8 -3l3 -2l156 -136c5 -5 9 -11 9 -19s-4 -14 -9 -19l-156 -136z" />
+    <glyph glyph-name="ion-arrow-right-c" unicode="&#xf10b;" horiz-adv-x="352" 
+d="M243 320l100 -105c6 -6 9 -14 9 -23s-3 -16 -9 -22l-100 -106c-12 -12 -31 -12 -43 0s-12 34 0 46l48 50h-217c-17 0 -31 14 -31 32s14 32 31 32h217l-49 50c-12 12 -12 34 0 46s32 12 44 0z" />
+    <glyph glyph-name="ion-arrow-shrink" unicode="&#xf267;" horiz-adv-x="384" 
+d="M384 356l-82 -82l50 -50h-128v128l50 -50l82 82zM384 28l-28 -28l-82 82l-50 -50v128h128l-50 -50zM0 28l82 82l-50 50h128v-128l-50 50l-82 -82zM0 356l28 28l82 -82l50 50v-128h-128l50 50z" />
+    <glyph glyph-name="ion-arrow-swap" unicode="&#xf268;" horiz-adv-x="384" 
+d="M0 120c0 4 4 8 8 8h248v64l128 -96l-128 -96v64h-248c-4 0 -8 4 -8 8v48zM384 264c0 -4 -4 -8 -8 -8h-248v-64l-128 96l128 96v-64h248c4 0 8 -4 8 -8v-48z" />
+    <glyph glyph-name="ion-arrow-up-a" unicode="&#xf10c;" horiz-adv-x="384" 
+d="M192 384l192 -192h-112v-192h-160v192h-112z" />
+    <glyph glyph-name="ion-arrow-up-b" unicode="&#xf10d;" horiz-adv-x="320" 
+d="M317 121c2 -2 3 -6 3 -9c0 -9 -8 -16 -17 -16v0h-286v0c-9 0 -17 7 -17 16c0 3 1 6 3 8l2 3l136 156c5 5 11 9 19 9s14 -4 19 -9l136 -156z" />
+    <glyph glyph-name="ion-arrow-up-c" unicode="&#xf10e;" horiz-adv-x="274" 
+d="M9 259l105 100c6 6 14 9 23 9s16 -3 22 -9l106 -100c12 -12 12 -31 0 -43s-34 -12 -46 0l-50 48v-217c0 -17 -14 -31 -32 -31s-32 14 -32 31v217l-50 -49c-12 -12 -34 -12 -46 0s-12 32 0 44z" />
+    <glyph glyph-name="ion-asterisk" unicode="&#xf314;" 
+d="M448 224v-64l-186 10l104 -170l-56 -32l-86 176l-86 -176l-56 32l104 170l-186 -10v64l187 -7l-109 167l60 32l86 -176l86 176l60 -32l-109 -167z" />
+    <glyph glyph-name="ion-at" unicode="&#xf10f;" 
+d="M422 41c-24 -25 -52 -43 -85 -55s-69 -18 -105 -18c-35 0 -66 6 -95 17s-53 26 -73 46s-36 43 -47 71s-17 58 -17 90s6 62 18 89s29 51 50 71s46 35 74 47c28 11 58 17 90 17c28 0 55 -4 81 -12s49 -20 69 -36s36 -36 48 -60s18 -53 18 -85c0 -24 -3 -46 -10 -64
+s-16 -34 -27 -46s-24 -22 -38 -28s-29 -10 -45 -10s-29 4 -39 12s-15 17 -15 29h-3c-6 -10 -15 -19 -28 -28s-28 -13 -46 -13c-28 0 -49 9 -64 27s-23 42 -23 71c0 17 3 34 9 50s14 31 24 44s23 23 38 31s31 12 49 12c15 0 27 -4 38 -10c10 -6 18 -15 21 -24h1l5 24h54
+l-24 -113c-1 -6 -2 -12 -3 -19s-2 -13 -2 -19c0 -7 1 -13 4 -18s7 -7 15 -7c16 0 29 9 39 26s16 40 16 68c0 24 -4 45 -12 64s-20 34 -34 47s-32 23 -52 29s-41 9 -65 9c-26 0 -49 -4 -70 -13s-39 -22 -54 -38s-27 -34 -35 -56c-8 -21 -13 -44 -13 -69c0 -26 4 -51 13 -72
+s21 -39 37 -54s35 -27 57 -35s46 -12 72 -12c33 0 61 6 85 16s45 25 65 43zM231 260c-10 0 -18 -2 -25 -8s-14 -13 -19 -22s-8 -18 -11 -28s-4 -20 -4 -30c0 -5 0 -10 1 -16c1 -5 3 -10 6 -15s7 -8 12 -11s11 -5 19 -5c11 0 20 3 28 8s14 13 19 21s9 16 11 26s3 19 3 27
+c0 6 0 13 -1 19s-4 12 -7 17s-7 9 -12 12s-12 5 -20 5z" />
+    <glyph glyph-name="ion-backspace-outline" unicode="&#xf3be;" horiz-adv-x="512" 
+d="M413 116c2 -2 3 -4 3 -6s-1 -4 -3 -6l-21 -22c-2 -2 -4 -2 -6 -2s-4 0 -6 2l-76 77l-76 -77c-2 -2 -4 -2 -6 -2s-4 0 -6 2l-21 22c-2 2 -3 4 -3 6s1 4 3 6l76 76l-77 76c-3 3 -3 9 0 12l22 22c2 2 4 2 6 2s4 0 6 -2l76 -76l76 76c2 2 4 2 6 2s4 0 6 -2l22 -22
+c3 -3 3 -9 0 -12l-77 -76zM499 354c9 -9 13 -20 13 -33v-256c0 -27 -20 -49 -46 -49h-298c-13 0 -24 3 -34 9c-9 5 -16 11 -23 20v0l-1 1l-110 146l110 148c14 19 34 28 58 28h298c13 0 24 -5 33 -14zM480 65v256c0 9 -5 15 -14 15h-298c-11 0 -22 -3 -32 -16l-96 -128
+l96 -128c8 -10 17 -16 32 -16h298c9 0 14 8 14 17z" />
+    <glyph glyph-name="ion-backspace" unicode="&#xf3bf;" horiz-adv-x="512" 
+d="M499 354c9 -9 13 -20 13 -33v-256c0 -27 -20 -49 -46 -49h-298c-13 0 -24 3 -34 9c-9 5 -16 11 -23 20v0l-1 1l-110 146l110 148c14 19 34 28 58 28h298c13 0 24 -5 33 -14zM413 116l-76 76l77 76c3 3 3 9 0 12l-22 22c-2 2 -4 2 -6 2s-4 0 -6 -2l-76 -76l-76 76
+c-2 2 -4 2 -6 2s-4 0 -6 -2l-22 -22c-3 -3 -3 -9 0 -12l77 -76l-76 -76c-2 -2 -3 -4 -3 -6s1 -4 3 -6l21 -22c2 -2 4 -2 6 -2s4 0 6 2l76 77l76 -77c2 -2 4 -2 6 -2s4 0 6 2l21 22c2 2 3 4 3 6s-1 4 -3 6z" />
+    <glyph glyph-name="ion-bag" unicode="&#xf110;" 
+d="M416 288l32 -320h-448l32 320h64v4c0 68 56 124 124 124h8c68 0 124 -56 124 -124v-4h64zM128 292v-4h192v4c0 51 -41 92 -92 92v0h-8c-51 0 -92 -41 -92 -92zM36 0h376l-25 256h-35v-36c10 -6 16 -16 16 -28c0 -18 -14 -32 -32 -32s-32 14 -32 32c0 12 6 22 16 28v36
+h-192v-36c10 -6 16 -16 16 -28c0 -18 -14 -32 -32 -32s-32 14 -32 32c0 12 6 22 16 28v36h-35z" />
+    <glyph glyph-name="ion-battery-charging" unicode="&#xf111;" 
+d="M10 64c-6 0 -10 4 -10 10v236c0 6 4 10 10 10h381c6 0 10 -4 10 -10v-54h37c6 0 10 -4 10 -10v-108c0 -6 -4 -10 -10 -10h-37v-54c0 -6 -4 -10 -10 -10h-381zM225 288l-100 -111h61l-27 -81l100 111h-61z" />
+    <glyph glyph-name="ion-battery-empty" unicode="&#xf112;" 
+d="M438 256c6 0 10 -4 10 -10v-108c0 -6 -4 -10 -10 -10h-37v-54c0 -6 -4 -10 -10 -10h-381c-6 0 -10 4 -10 10v236c0 6 4 10 10 10h381c6 0 10 -4 10 -10v-54h37zM416 160v64h-15h-32v32v32h-337v-192h337v32v32h32h15z" />
+    <glyph glyph-name="ion-battery-full" unicode="&#xf113;" 
+d="M438 256c6 0 10 -4 10 -10v-108c0 -6 -4 -10 -10 -10h-37v-54c0 -6 -4 -10 -10 -10h-381c-6 0 -10 4 -10 10v236c0 6 4 10 10 10h381c6 0 10 -4 10 -10v-54h37z" />
+    <glyph glyph-name="ion-battery-half" unicode="&#xf114;" 
+d="M438 256c6 0 10 -4 10 -10v-108c0 -6 -4 -10 -10 -10h-37v-54c0 -6 -4 -10 -10 -10h-381c-6 0 -10 4 -10 10v236c0 6 4 10 10 10h381c6 0 10 -4 10 -10v-54h37zM416 160v64h-15h-32v32v32h-81l32 -192h49v32v32h32h15z" />
+    <glyph glyph-name="ion-battery-low" unicode="&#xf115;" 
+d="M10 64c-6 0 -10 4 -10 10v236c0 6 4 10 10 10h381c6 0 10 -4 10 -10v-54h37c6 0 10 -4 10 -10v-108c0 -6 -4 -10 -10 -10h-37v-54c0 -6 -4 -10 -10 -10h-381zM369 288h-209l32 -192h177v32v32h32h15v64h-15h-32v32v32z" />
+    <glyph glyph-name="ion-beaker" unicode="&#xf269;" horiz-adv-x="384" 
+d="M80 256h240v-224c0 -9 -7 -16 -16 -16h-208c-9 0 -16 7 -16 16v224zM296 104v48c0 4 -4 8 -8 8s-8 -4 -8 -8v-48c0 -4 4 -8 8 -8s8 4 8 8zM288 176c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8zM381 416c3 0 3 -2 3 -3s-2 -3 -3 -5s-13 -20 -13 -40v-336
+c0 -35 -29 -64 -64 -64h-208c-35 0 -64 29 -64 64v307c0 32 -2 33 -32 37c0 12 11 40 65 40h316zM336 368c0 5 0 16 1 16h-273c-1 0 -3 0 -4 -1c5 -7 4 -32 4 -44v-307c0 -18 14 -32 32 -32h210c17 0 30 14 30 32v336z" />
+    <glyph glyph-name="ion-beer" unicode="&#xf26a;" 
+d="M384 288c35 0 64 -29 64 -64v-96c0 -35 -29 -64 -64 -64h-32v-80c0 -9 -7 -16 -16 -16h-256c-9 0 -16 7 -16 16v223c-26 0 -48 22 -48 48v54v1c-10 11 -16 26 -16 42c0 35 29 64 64 64c18 0 34 -8 46 -20c10 12 26 20 43 20c14 0 27 -6 37 -14c12 9 26 14 42 14
+c17 0 34 -6 46 -16c11 10 26 16 42 16c35 0 64 -29 64 -64c0 -24 -18 -44 -32 -48v-16h32zM296 144c4 0 8 3 8 8v0v48c0 4 -4 8 -8 8s-8 -4 -8 -8v-48c0 -3 2 -6 4 -7c1 -1 2 -1 4 -1zM303 220c1 2 1 4 1 6s-1 4 -3 5s-4 1 -6 1s-4 -2 -5 -4s-2 -4 -2 -6s2 -4 4 -5
+s4 -1 6 -1s4 2 5 4zM320 288v32h-20c-3 -8 -7 -16 -13 -23c-13 -16 -33 -25 -55 -25c-26 0 -48 13 -61 33c-6 -2 -12 -3 -18 -3c-12 0 -23 4 -32 10c-2 1 -3 3 -5 4c-1 -2 -2 -3 -3 -5c-5 -6 -11 -10 -17 -14v-32v-9h80c0 4 4 8 8 8s8 -4 8 -8h128v32zM351 343c1 3 1 6 1 9
+c0 18 -14 32 -32 32c-9 0 -17 -4 -23 -10c-2 -2 -6 -5 -16 -6h-8c-6 1 -12 3 -14 5c-7 7 -16 11 -27 11c-9 0 -18 -4 -25 -9l-7 -7c0 -1 0 -1 -1 -2c-3 -3 -7 -5 -11 -5c-5 0 -8 3 -11 6c-1 2 -2 3 -3 5s-3 4 -5 6c-4 4 -10 6 -16 6c-10 0 -18 -9 -25 -16
+c-7 -8 -27 -8 -34 0s-18 16 -30 16c-18 0 -32 -14 -32 -32c0 -2 1 -5 1 -7c2 -9 7 -17 15 -21v-34v-35c0 -9 7 -16 16 -16v26v23v32c10 0 18 4 24 11c2 2 3 4 4 6c0 0 6 10 12 11s20 6 30 -5c4 -5 11 -9 19 -9c3 0 5 1 7 2c3 1 7 2 9 4v0c3 2 6 4 10 4c7 0 12 -4 14 -10
+c0 0 1 -1 1 -2c1 -3 1 -5 3 -8c7 -12 20 -20 35 -20c13 0 25 6 32 16c5 7 8 15 8 24s9 8 9 8h7h48c6 0 13 -3 15 -9zM416 128v96c0 18 -14 32 -32 32h-32v-160h32c18 0 32 14 32 32zM128 280c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM288 280c0 5 3 8 8 8s8 -3 8 -8
+s-3 -8 -8 -8s-8 3 -8 8z" />
+    <glyph glyph-name="ion-bluetooth" unicode="&#xf116;" horiz-adv-x="256" 
+d="M12 304c16 16 18 13 19 12l68 -65v0v0c2 -2 10 -10 10 -3v156v0v2c0 6 6 10 12 10c4 0 7 -2 9 -4v0s117 -113 122 -117s5 -10 1 -14l-84 -81s-4 -4 -4 -8s4 -8 4 -8l84 -81c4 -4 4 -10 -1 -14s-122 -117 -122 -117v0c-2 -2 -5 -4 -9 -4c-6 0 -12 4 -12 10v2v0v156
+s-8 -1 -10 -3v0v-1l-68 -64c-1 -1 -3 -4 -19 12s-12 17 -11 18s90 86 90 86s4 3 4 8v0c0 5 -4 8 -4 8s-89 85 -90 86s-5 2 11 18zM152 328v-79c0 -8 8 -1 10 1l30 30s3 5 3 7s-1 5 -3 7l-30 30c-2 2 -10 11 -10 4zM152 135v-79s8 2 10 4l30 30c2 2 3 5 3 7s-1 5 -3 7l-30 30
+c-2 2 -10 9 -10 1z" />
+    <glyph glyph-name="ion-bonfire" unicode="&#xf315;" horiz-adv-x="384" 
+d="M207 97l15 -89c1 -3 1 -5 1 -8c0 -18 -14 -32 -32 -32s-32 14 -32 32c0 2 0 5 1 7l15 92v0c2 7 8 13 16 13s15 -7 16 -15zM242 93v0v0v0zM329 58c9 -8 10 -25 0 -35s-27 -9 -35 0c-1 1 -2 3 -3 4l-49 66c-3 5 -2 11 2 15c5 5 10 5 16 1l64 -47c2 -1 3 -3 5 -4zM309 113v0
+v0v0zM371 126c9 -1 13 -7 13 -19c0 -9 -10 -14 -18 -12l-57 18v0v0c-3 2 -6 5 -5 9s4 7 8 6zM75 113v0v0v0zM75 113v0l-58 -18c-8 -2 -17 3 -17 12c0 12 3 18 12 19l60 2c4 1 7 -2 8 -6s-2 -7 -5 -9v0zM124 109c5 4 11 4 16 -1c4 -4 5 -10 2 -15l-49 -66c-1 -1 -2 -3 -3 -4
+c-10 -10 -25 -10 -35 0s-10 25 0 35c2 2 3 3 5 4zM288 320c0 -32 -9 -58 -50 -86c-37 -26 -94 -46 -110 -106c0 0 -58 24 -48 96s124 106 112 192c24 0 96 -35 96 -96zM288 192c-16 -50 -44 -64 -80 -64c-15 0 -32 9 -43 26c12 15 28 26 47 37c9 5 20 10 29 16
+c21 14 38 31 47 49c5 -15 5 -48 0 -64zM88 288c-6 4 -9 14 -8 27c2 22 34 39 32 69c14 2 31 -3 42 -24c-5 -11 -15 -21 -28 -34s-26 -22 -38 -38z" />
+    <glyph glyph-name="ion-bookmark" unicode="&#xf26b;" horiz-adv-x="192" 
+d="M184 384c4 0 8 -4 8 -8v-56h-192v56c0 4 4 8 8 8h176zM0 0v304h192v-304l-96 96z" />
+    <glyph glyph-name="ion-bowtie" unicode="&#xf3c0;" 
+d="M192 236c0 0 8 5 20 7c21 4 39 5 47 -9c10 -17 19 -53 17 -85c-1 -17 -5 -22 -5 -22s-15 -10 -47 -7c-35 3 -40 15 -40 15s5 12 8 43s0 58 0 58zM152 163c-17 -4 -38 -10 -38 -10s45 4 64 9c-4 -21 -10 -34 -10 -34s-83 -80 -116 -80c-28 0 -52 68 -52 144s26 144 52 144
+c35 0 106 -57 128 -97c0 0 3 -16 2 -32c-10 5 -24 10 -44 14c-28 6 -42 3 -42 3s18 -4 57 -17c15 -5 22 -8 29 -10c0 -3 -1 -7 -1 -10c0 -5 0 -10 -1 -15c-5 -2 -15 -6 -28 -9zM396 336c26 0 52 -68 52 -144s-24 -144 -52 -144c-37 0 -104 68 -112 79c0 0 4 5 5 22v9
+c16 -7 70 -13 70 -13s-21 6 -40 11c-13 4 -25 8 -30 10c-1 11 -2 23 -4 33c17 11 69 34 69 34s-15 -2 -35 -9c-14 -5 -29 -11 -37 -14c-3 10 -7 18 -10 24c0 1 -1 4 -1 4v1c22 40 89 97 125 97z" />
+    <glyph glyph-name="ion-briefcase" unicode="&#xf26c;" 
+d="M240 176v8h208v-176c0 -4 -4 -8 -8 -8h-432c-4 0 -8 4 -8 8v176h208v-8h32zM440 304c4 0 8 -4 8 -8v-96h-208v8h-32v-8h-208v96c0 4 4 8 8 8h120v31c1 28 22 49 51 49h90c30 0 50 -21 51 -49v-31h120zM288 332v1c0 10 -9 19 -19 19h-90c-10 0 -19 -9 -19 -19v-1v-1v-27
+h128v27v1z" />
+    <glyph glyph-name="ion-bug" unicode="&#xf2be;" 
+d="M343 321c-6 -16 -16 -31 -28 -43c-24 -24 -57 -37 -91 -37s-67 13 -91 37c-12 12 -22 27 -28 43c29 39 72 63 119 63s90 -24 119 -63zM95 305c22 -45 68 -77 121 -80v-225c-40 2 -77 22 -104 54c-7 -6 -10 -9 -13 -15c8 -9 7 -22 -1 -31c-9 -10 -24 -11 -34 -2
+s-11 24 -2 34l3 3s2 1 2 1c4 13 13 25 27 36c-15 26 -26 57 -29 90c-7 0 -12 -2 -17 -3c-1 -13 -11 -23 -24 -23s-24 11 -24 24s11 24 24 24h3c4 2 8 5 12 6c7 2 14 4 25 4c1 23 6 45 13 65c-6 4 -11 7 -15 11c-6 5 -11 13 -14 19c-1 0 -3 1 -4 2c-12 6 -15 21 -9 33
+s21 15 33 9c11 -6 15 -20 10 -31c2 -3 3 -7 4 -8c2 -2 5 -3 8 -5c2 3 3 5 5 8zM424 192c13 0 24 -11 24 -24s-11 -24 -24 -24s-23 10 -24 23c-5 1 -10 3 -17 3c-3 -33 -14 -64 -29 -90c14 -11 23 -23 27 -36c0 0 1 0 2 -1l3 -3c9 -10 8 -25 -2 -34s-25 -8 -34 2
+c-8 9 -9 22 -1 31c-3 6 -6 9 -13 15c-27 -32 -64 -52 -104 -54v225c53 3 99 35 121 80c2 -3 3 -5 5 -8c3 2 6 3 8 5c1 1 2 5 4 8c-5 11 -1 25 10 31c12 6 27 3 33 -9s3 -27 -9 -33c-1 -1 -3 -2 -4 -2c-3 -6 -8 -14 -14 -19c-4 -4 -9 -7 -15 -11c7 -20 12 -42 13 -65
+c11 0 18 -2 25 -4c4 -1 8 -4 12 -6h3z" />
+    <glyph glyph-name="ion-calculator" unicode="&#xf26d;" horiz-adv-x="320" 
+d="M304 416c9 0 16 -7 16 -16v-416c0 -9 -7 -16 -16 -16h-288c-9 0 -16 7 -16 16v416c0 9 7 16 16 16h288zM48 240v-32h32v32h-32zM48 176v-32h32v32h-32zM48 112v-32h32v32h-32zM144 16v32h-96v-32h96zM144 80v32h-32v-32h32zM144 144v32h-32v-32h32zM144 208v32h-32v-32
+h32zM208 16v32h-32v-32h32zM208 80v32h-32v-32h32zM208 144v32h-32v-32h32zM208 208v32h-32v-32h32zM272 16v96h-32v-96h32zM272 144v32h-32v-32h32zM272 208v32h-32v-32h32zM272 288v80h-224v-80h224z" />
+    <glyph glyph-name="ion-calendar" unicode="&#xf117;" 
+d="M112 320c-18 0 -32 14 -32 32v32c0 18 14 32 32 32s32 -14 32 -32v-32c0 -18 -14 -32 -32 -32zM336 320c-18 0 -32 14 -32 32v32c0 18 14 32 32 32s32 -14 32 -32v-32c0 -18 -14 -32 -32 -32zM440 384c4 0 8 -4 8 -8v-400c0 -4 -4 -8 -8 -8h-432c-4 0 -8 4 -8 8v400
+c0 4 4 8 8 8h56v-41c0 -22 24 -39 48 -39s48 17 48 39v41h128v-41c0 -22 25 -39 49 -39s47 17 47 39v41h56zM400 16v256h-352v-256h352z" />
+    <glyph glyph-name="ion-camera" unicode="&#xf118;" horiz-adv-x="416" 
+d="M382 301c18 0 34 -14 34 -33v-202c0 -19 -16 -34 -34 -34h-348c-19 0 -34 15 -34 34v202c0 19 15 33 34 33h69l39 40v0c6 7 15 11 25 11h84c9 0 17 -4 23 -10v0v0v0l41 -41h67zM208 82c51 0 92 42 92 93s-41 93 -92 93s-92 -42 -92 -93s41 -93 92 -93zM376 248
+c8 0 14 6 14 14s-6 14 -14 14s-14 -6 -14 -14s6 -14 14 -14zM208 245c38 0 70 -31 70 -70s-32 -70 -70 -70c-39 0 -70 31 -70 70s31 70 70 70z" />
+    <glyph glyph-name="ion-card" unicode="&#xf119;" 
+d="M420 352c16 0 28 -12 28 -28v0v-264v0c0 -16 -12 -28 -28 -28h-392c-16 0 -28 12 -28 28v0v0v264v0v0c0 16 12 28 28 28h392zM45 320c-7 0 -12 -5 -13 -12v-20h384v20c-1 7 -6 12 -13 12h-358zM403 64c7 0 12 5 13 12v116h-384v-116c1 -7 6 -12 13 -12h358zM64 128v16
+h192v-16h-192zM64 96v16h96v-16h-96zM320 96v48h64v-48h-64z" />
+    <glyph glyph-name="ion-cash" unicode="&#xf316;" horiz-adv-x="512" 
+d="M0 352h512v-256h-512v256zM193 128c-20 23 -33 58 -33 96s13 73 33 96h-97c0 -35 -29 -64 -64 -64v-80c27 0 48 -21 48 -48h113zM298 187c3 4 4 9 4 15c0 3 0 5 -1 8s-2 6 -4 8s-4 4 -7 6s-6 4 -10 5c-1 0 -4 1 -7 2s-5 0 -8 1v31c2 -1 5 -2 7 -3c4 -3 6 -7 7 -13h20
+c0 5 -2 9 -4 13s-5 8 -9 11s-9 5 -14 6c-2 1 -5 2 -7 2v9h-18v-9c-2 0 -4 -1 -6 -2c-5 -1 -10 -2 -14 -5s-7 -6 -9 -10s-4 -9 -4 -14c0 -3 0 -5 1 -8s2 -5 4 -7s5 -5 8 -7s7 -4 12 -5c3 -1 6 0 8 -1v-35c-3 1 -6 2 -9 4s-5 4 -6 7s-2 6 -2 9h-20c0 -5 2 -11 4 -16
+c3 -5 6 -8 10 -11s9 -6 15 -7c3 -1 5 -2 8 -2v-9h18v9c3 0 6 1 9 2c5 1 10 2 14 5s7 7 10 11zM480 176v80c-35 0 -64 29 -64 64h-97c20 -23 33 -58 33 -96s-13 -73 -33 -96h113c0 27 22 48 48 48zM64 224c0 21 11 32 32 32s32 -11 32 -32s-11 -32 -32 -32s-32 11 -32 32z
+M384 224c0 21 11 32 32 32s32 -11 32 -32s-11 -32 -32 -32s-32 11 -32 32zM273 213c2 -1 4 -2 6 -4s3 -5 3 -9c0 -2 0 -4 -1 -6s-2 -4 -4 -5s-5 -3 -8 -4c-1 0 -2 -1 -4 -1v31c3 -1 6 -1 8 -2zM236 257c1 2 3 3 5 4s4 2 6 2v-26c-4 1 -7 3 -9 5s-4 4 -4 8c0 3 1 5 2 7zM0 32
+v32h512v-32h-512z" />
+    <glyph glyph-name="ion-chatbox-working" unicode="&#xf11a;" horiz-adv-x="416" 
+d="M76 48c-42 0 -76 31 -76 71v209c0 40 34 72 76 72h264c42 0 76 -32 76 -72v-209c0 -40 -34 -71 -76 -71h-4v-64s-79 54 -86 59s-7 5 -21 5h-153zM304 256c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM208 256c-18 0 -32 -14 -32 -32s14 -32 32 -32
+s32 14 32 32s-14 32 -32 32zM112 256c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32z" />
+    <glyph glyph-name="ion-chatbox" unicode="&#xf11b;" horiz-adv-x="416" 
+d="M76 48c-42 0 -76 31 -76 71v209c0 40 34 72 76 72h264c42 0 76 -32 76 -72v-209c0 -40 -34 -71 -76 -71h-4v-64s-79 54 -86 59s-7 5 -21 5h-153z" />
+    <glyph glyph-name="ion-chatboxes" unicode="&#xf11c;" horiz-adv-x="416" 
+d="M246 82l26 -18c-4 -21 -29 -32 -52 -32h-90c-8 0 -11 -2 -13 -3l-53 -45v48h-16c-26 0 -48 16 -48 41v129c0 25 20 45 46 45h2v-101c0 -33 29 -59 64 -59h117c10 0 14 -3 17 -5zM353 400c35 0 63 -27 63 -60v-168c0 -33 -28 -60 -63 -60h-17v-64l-75 60c-2 2 -7 4 -17 4
+h-101c-35 0 -63 27 -63 60v98v70c0 33 21 60 56 60h217z" />
+    <glyph glyph-name="ion-chatbubble-working" unicode="&#xf11d;" horiz-adv-x="416" 
+d="M208 -1c-115 0 -208 89 -208 200s93 201 208 201s208 -90 208 -201c0 -40 -12 -77 -33 -108c-1 -1 -2 -3 -3 -4v0c-2 -4 -4 -10 -4 -15l22 -88l-84 31c-4 2 -8 2 -12 2s-7 -1 -11 -2v0c-1 0 -1 -1 -2 -1c-25 -10 -52 -15 -81 -15zM304 224c-18 0 -32 -14 -32 -32
+s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM208 224c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM112 224c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32z" />
+    <glyph glyph-name="ion-chatbubble" unicode="&#xf11e;" horiz-adv-x="416" 
+d="M208 -1c-115 0 -208 89 -208 200s93 201 208 201s208 -90 208 -201c0 -40 -12 -77 -33 -108c-1 -1 -2 -3 -3 -4v0c-2 -4 -4 -10 -4 -15l22 -88l-84 31c-4 2 -8 2 -12 2s-7 -1 -11 -2v0c-1 0 -1 -1 -2 -1c-25 -10 -52 -15 -81 -15z" />
+    <glyph glyph-name="ion-chatbubbles" unicode="&#xf11f;" horiz-adv-x="416" 
+d="M25 57c-1 1 0 2 -1 3c-15 22 -24 49 -24 77c0 42 19 80 49 106c-2 -11 -4 -22 -4 -34c0 -92 78 -168 174 -168c15 0 30 2 44 6c-27 -32 -69 -53 -115 -53c-20 0 -40 5 -58 12h-1v0c-2 1 -5 2 -8 2s-6 -1 -9 -2l-56 -22l12 63c0 4 -1 7 -3 10v0zM242 400
+c96 0 174 -76 174 -168c0 -33 -11 -64 -28 -90c-1 -1 -1 -2 -2 -3v0c-2 -4 -3 -8 -3 -12l17 -74l-69 26c-3 1 -6 2 -10 2c-3 0 -6 -1 -9 -2v0l-2 -1c-8 -3 -16 -5 -24 -7c-14 -4 -29 -6 -44 -6c-96 0 -173 75 -173 167c0 12 1 24 3 35c16 76 86 133 170 133z" />
+    <glyph glyph-name="ion-checkmark-circled" unicode="&#xf120;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM339 267c1 1 1 2 1 3s0 3 -1 4l-31 24c-1 1 -3 1 -4 1s-2 0 -3 -1l-111 -143s-44 42 -45 43s-4 3 -6 3s-3 -2 -4 -3l-25 -25l-1 -1c-1 -1 -1 -3 -1 -4s0 -2 1 -3l2 -1
+s78 -75 79 -76s3 -3 5 -3s4 2 5 3z" />
+    <glyph glyph-name="ion-checkmark-round" unicode="&#xf121;" horiz-adv-x="416" 
+d="M400 376c17 -13 22 -39 9 -57l-207 -302c-13 -18 -37 -22 -54 -9s-137 147 -137 147c-15 16 -15 42 1 58s40 15 55 -2l99 -107l180 263c13 18 37 22 54 9z" />
+    <glyph glyph-name="ion-checkmark" unicode="&#xf122;" horiz-adv-x="416" 
+d="M414 338c1 -2 2 -4 2 -6s-1 -4 -2 -6l-249 -320c-2 -2 -5 -6 -9 -6s-8 3 -10 5s-141 136 -141 136l-3 3c-1 2 -2 4 -2 6s1 3 2 5l2 2c14 15 42 44 44 46s4 6 8 6s8 -4 10 -6s80 -78 80 -78l200 257c2 2 4 2 6 2s5 -1 7 -2z" />
+    <glyph glyph-name="ion-chevron-down" unicode="&#xf123;" 
+d="M224 150v0v0l174 167c4 4 12 4 16 0l31 -30c4 -4 4 -12 0 -16l-213 -204c-2 -2 -5 -3 -8 -3s-6 1 -8 3l-213 204c-4 4 -4 12 0 16l31 30c4 4 12 4 16 0z" />
+    <glyph glyph-name="ion-chevron-left" unicode="&#xf124;" horiz-adv-x="256" 
+d="M86 192l167 -174c4 -4 4 -12 0 -16l-30 -31c-4 -4 -12 -4 -16 0l-204 213c-2 2 -3 5 -3 8s1 6 3 8l204 213c4 4 12 3 16 -1l30 -30c4 -4 4 -12 0 -16l-167 -174v0v0z" />
+    <glyph glyph-name="ion-chevron-right" unicode="&#xf125;" horiz-adv-x="256" 
+d="M170 192v0v0l-167 174c-4 4 -4 12 0 16l30 30c4 4 12 5 16 1l204 -213c2 -2 3 -5 3 -8s-1 -6 -3 -8l-204 -213c-4 -4 -12 -4 -16 0l-30 31c-4 4 -4 12 0 16z" />
+    <glyph glyph-name="ion-chevron-up" unicode="&#xf126;" 
+d="M224 234l-174 -167c-4 -4 -12 -4 -16 0l-31 30c-4 4 -4 12 0 16l213 204c2 2 5 3 8 3s6 -1 8 -3l213 -204c4 -4 4 -12 0 -16l-31 -30c-4 -4 -12 -4 -16 0l-174 167v0v0z" />
+    <glyph glyph-name="ion-clipboard" unicode="&#xf127;" horiz-adv-x="352" 
+d="M80 288c2 20 10 35 28 40l1 1c12 3 21 7 21 20v21c0 26 21 46 46 46s46 -20 46 -46v-21c0 -13 9 -18 21 -21h2c18 -5 25 -20 27 -40h-192zM176 384c-8 0 -13 -6 -13 -14s5 -14 13 -14s14 6 14 14s-6 14 -14 14zM325 384c15 0 27 -12 27 -28v-360c0 -16 -12 -28 -27 -28
+h-149h-148c-15 0 -28 12 -28 28v360c0 16 13 28 28 28h73v-13c0 -11 -9 -19 -19 -19h-37c-7 0 -12 -6 -12 -13v-327c0 -6 5 -12 11 -12h265c6 0 11 6 11 12v327c0 7 -5 13 -12 13h-37c-10 0 -20 8 -20 19v13h74zM64 224v32h112v-32h-112zM64 32v32h160v-32h-160zM64 96v32
+h129v-32h-129zM64 160v32h208v-32h-208z" />
+    <glyph glyph-name="ion-clock" unicode="&#xf26e;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c10 10 19 21 26 33l-27 16l8 14l27 -16c13 25 21 52 22 81h-32v16h32c-1 29 -9 56 -22 81l-27 -16l-8 14l27 16c-7 12 -16 23 -26 33s-21 19 -33 26l-16 -27l-14 8
+l16 27c-25 13 -52 21 -81 22v-32h-16v32c-29 -1 -56 -9 -81 -22l16 -27l-14 -8l-16 27c-12 -7 -23 -16 -33 -26s-19 -21 -26 -33l27 -16l-8 -14l-27 16c-13 -25 -21 -52 -22 -81h32v-16h-32c1 -29 9 -56 22 -81l27 16l8 -14l-27 -16c7 -12 16 -23 26 -33s21 -19 33 -26
+l16 27l14 -8l-16 -27c25 -13 52 -21 81 -22v32h16v-32c29 1 56 9 81 22l-16 27l14 8l16 -27c12 7 23 16 33 26zM368 207v-32h-117c-6 -9 -16 -15 -27 -15c-18 0 -32 14 -32 32c0 12 6 22 16 28v68h32v-68c5 -3 9 -8 12 -13h116z" />
+    <glyph glyph-name="ion-close-circled" unicode="&#xf128;" 
+d="M224 415c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM332 116l-75 75l76 75c3 3 3 9 0 12l-22 21c-2 2 -4 3 -6 3s-3 -1 -5 -3l-76 -74l-76 74c-2 2 -3 3 -5 3s-4 -1 -6 -3l-21 -21c-3 -3 -3 -9 0 -12l76 -75l-76 -76
+c-2 -1 -2 -3 -2 -5s0 -4 2 -6l21 -22c2 -2 4 -2 6 -2s4 0 6 2l75 76l76 -75c2 -2 3 -3 5 -3s4 1 6 3l21 21c2 1 3 4 3 6s-1 4 -3 6z" />
+    <glyph glyph-name="ion-close-round" unicode="&#xf129;" horiz-adv-x="384" 
+d="M374 61c14 -14 14 -37 0 -51s-37 -14 -51 0l-131 131l-131 -131c-14 -14 -36 -14 -50 0s-14 37 0 51l130 131l-130 131c-14 14 -14 37 0 51s36 14 50 0l131 -131l131 131c14 14 37 14 51 0s14 -37 0 -51l-131 -131z" />
+    <glyph glyph-name="ion-close" unicode="&#xf12a;" horiz-adv-x="384" 
+d="M380 61c3 -3 4 -6 4 -10s-1 -7 -4 -10l-38 -37c-3 -3 -5 -4 -9 -4s-7 1 -10 4l-131 131l-131 -131c-3 -3 -5 -4 -9 -4s-7 1 -10 4l-38 37c-3 3 -4 6 -4 10s1 7 4 10l132 131l-132 130c-5 5 -5 15 0 20l37 38c3 2 6 4 10 4s7 -1 10 -4l131 -130l131 130c3 2 6 4 10 4
+s7 -1 10 -4l37 -38c5 -5 5 -14 0 -19l-132 -130z" />
+    <glyph glyph-name="ion-closed-captioning" unicode="&#xf317;" horiz-adv-x="512" 
+d="M0 384h512v-384h-512v384zM464 192c0 27 0 44 -4 80s-23 56 -59 60s-91 4 -138 4h-7h-7c-47 0 -102 0 -138 -4s-55 -24 -59 -60s-4 -53 -4 -80s2 -47 4 -80s19 -56 59 -60s96 -4 145 -4s105 0 145 4s57 27 59 60s4 53 4 80zM372 164v4h53c0 -27 -7 -48 -19 -62
+s-32 -21 -61 -21c-14 0 -26 2 -36 5s-18 9 -25 17s-12 19 -15 33s-5 30 -5 51s3 39 7 53s9 25 17 33s17 14 27 17s22 5 34 5c25 0 44 -7 57 -21s19 -37 19 -62h-52v1c0 20 -12 33 -27 33s-25 -11 -28 -30c0 0 -2 -11 -2 -29s2 -28 2 -28c1 -17 12 -29 27 -29s27 10 27 29v1z
+M195 164v4h53c0 -27 -7 -48 -19 -62s-32 -21 -61 -21c-14 0 -26 2 -36 5s-18 9 -25 17s-12 19 -15 33s-5 30 -5 51s3 39 7 53s9 25 17 33s17 14 27 17s22 5 34 5c25 0 44 -7 57 -21s19 -37 19 -62h-52v1c0 20 -12 33 -27 33s-25 -11 -28 -30c0 0 -2 -11 -2 -29s2 -28 2 -28
+c1 -17 12 -29 27 -29s27 10 27 29v1z" />
+    <glyph glyph-name="ion-cloud" unicode="&#xf12b;" 
+d="M366 215c45 0 82 -38 82 -84s-37 -83 -82 -83v0h-276c-49 0 -90 41 -90 91c0 40 26 74 61 86c5 29 29 51 59 51c10 0 18 -3 26 -7c19 40 59 67 105 67c64 0 115 -53 115 -118v-3z" />
+    <glyph glyph-name="ion-code-download" unicode="&#xf26f;" 
+d="M299 164l-63 -63v0l-1 -1v0l-2 -1v0l-1 -1v0l-2 -1v0h-1v0h-1c-1 0 -3 -1 -4 -1s-3 1 -4 1h-1v0h-1v0l-2 1v0l-1 1v0c-1 1 -2 1 -3 2v0l-63 63c-6 6 -6 17 0 23s18 6 24 0l35 -34v118c0 9 7 17 16 17s16 -8 16 -17v-118l35 34c6 6 18 6 24 0s6 -17 0 -23zM136 56
+c-6 0 -12 2 -17 7l-112 112c-9 9 -9 25 0 34l112 112c9 9 25 9 34 0s9 -25 0 -34l-95 -95l95 -95c9 -9 9 -25 0 -34c-5 -5 -11 -7 -17 -7zM312 56c-6 0 -12 2 -17 7c-9 9 -9 25 0 34l95 95l-95 95c-9 9 -9 25 0 34s25 9 34 0l112 -112c9 -9 9 -25 0 -34l-112 -112
+c-5 -5 -11 -7 -17 -7z" />
+    <glyph glyph-name="ion-code-working" unicode="&#xf270;" 
+d="M128 192c0 16 8 24 24 24s24 -8 24 -24s-8 -24 -24 -24s-24 8 -24 24zM200 192c0 16 8 24 24 24s24 -8 24 -24s-8 -24 -24 -24s-24 8 -24 24zM272 192c0 16 8 24 24 24s24 -8 24 -24s-8 -24 -24 -24s-24 8 -24 24zM136 56c-7 0 -12 2 -17 7l-112 112c-5 5 -7 10 -7 17
+s2 12 7 17l112 112c5 5 10 7 17 7s12 -2 17 -7s7 -10 7 -17s-2 -12 -7 -17l-95 -95l95 -95c5 -5 7 -10 7 -17s-2 -12 -7 -17s-10 -7 -17 -7zM312 56c-7 0 -12 2 -17 7s-7 10 -7 17s2 12 7 17l95 95l-95 95c-5 5 -7 10 -7 17s2 12 7 17s10 7 17 7s12 -2 17 -7l112 -112
+c5 -5 7 -10 7 -17s-2 -12 -7 -17l-112 -112c-5 -5 -10 -7 -17 -7z" />
+    <glyph glyph-name="ion-code" unicode="&#xf271;" 
+d="M136 56c-6 0 -12 2 -17 7l-112 112c-9 9 -9 25 0 34l112 112c9 9 25 9 34 0s9 -25 0 -34l-95 -95l95 -95c9 -9 9 -25 0 -34c-5 -5 -11 -7 -17 -7zM312 56c-6 0 -12 2 -17 7c-9 9 -9 25 0 34l95 95l-95 95c-9 9 -9 25 0 34s25 9 34 0l112 -112c9 -9 9 -25 0 -34l-112 -112
+c-5 -5 -11 -7 -17 -7z" />
+    <glyph glyph-name="ion-coffee" unicode="&#xf272;" horiz-adv-x="384" 
+d="M319 191c37 -7 65 -40 65 -79c0 -20 -8 -39 -21 -54c-15 -17 -37 -26 -61 -26c-8 0 -17 1 -25 3c-6 1 -10 3 -15 5c-11 -15 -23 -25 -32 -33v0c-5 -5 -12 -7 -19 -7h-102c-7 0 -14 2 -19 7v0c-17 15 -41 36 -62 86s-28 91 -28 111s3 20 16 20h101c-5 17 -37 19 -37 46
+c0 17 15 32 28 37c-2 -8 -3 -14 -3 -21c0 -19 39 -30 39 -53c0 -3 0 -6 -1 -9h56c1 5 2 10 2 14c0 36 -56 36 -56 84c0 28 21 55 47 62c-4 -14 -9 -23 -9 -35c0 -32 57 -50 57 -88c0 -13 -5 -25 -12 -37h76c13 0 16 0 16 -20c0 -4 0 -8 -1 -13zM302 64c33 0 50 25 50 48
+s-17 43 -39 47c-4 -19 -11 -42 -21 -66c-4 -9 -8 -17 -12 -25c6 -3 13 -4 22 -4z" />
+    <glyph glyph-name="ion-compass" unicode="&#xf273;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224c0 39 10 76 27 108c-16 12 -27 30 -27 52c0 35 29 64 64 64c22 0 40 -11 52 -27c32 17 69 27 108 27zM32 352c0 -10 5 -20 13 -26c13 17 28 32 45 45c-6 8 -16 13 -26 13c-18 0 -32 -14 -32 -32z
+M360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56s-100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136s85 -56 136 -56s100 20 136 56zM320 320c0 0 -54 -130 -72 -152s-120 -104 -120 -104s54 132 72 152s120 104 120 104z" />
+    <glyph glyph-name="ion-compose" unicode="&#xf12c;" horiz-adv-x="384" 
+d="M379 348c7 -7 7 -18 0 -25l-32 -31l-55 55l31 32c7 7 18 7 25 0zM282 338l55 -55l-177 -173l-64 -14l14 64zM320 192l32 32v-201c0 -13 -10 -23 -23 -23h-306c-13 0 -23 10 -23 23v306c0 13 10 23 23 23h201l-32 -32h-149c-6 0 -11 -5 -11 -10v-268s4 -10 10 -10h269
+s9 5 9 10v150z" />
+    <glyph glyph-name="ion-connection-bars" unicode="&#xf274;" horiz-adv-x="352" 
+d="M0 32v64h64v-64h-64zM96 32v128h64v-128h-64zM192 32v224h64v-224h-64zM288 32v320h64v-320h-64z" />
+    <glyph glyph-name="ion-contrast" unicode="&#xf275;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56v-384c51 0 100 20 136 56z" />
+    <glyph glyph-name="ion-crop" unicode="&#xf3c1;" 
+d="M320 -32v48h64v-48h-64zM384 96h64v-64h-384v256h-64v64h64v64h64v-320h192v192h-176v64h240v-256z" />
+    <glyph glyph-name="ion-cube" unicode="&#xf318;" 
+d="M435 280c7 0 13 -6 13 -12v-183c0 -9 -6 -17 -14 -22v-1l-175 -92v-1c-2 -1 -4 -1 -6 -1c-7 0 -13 6 -13 12v185c0 9 5 17 13 22v0l3 2l172 89l2 1c2 1 3 1 5 1zM422 329c0 0 8 -3 8 -9c0 -7 -8 -11 -8 -11l-183 -97l-2 -1c-4 -2 -8 -3 -13 -3s-9 1 -13 3l-2 1l-183 96
+s-8 5 -8 12c0 6 8 9 8 9l181 82s11 5 17 5s17 -5 17 -5zM195 187c8 -5 13 -13 13 -22v-185c0 -6 -6 -12 -13 -12c-2 0 -4 1 -6 2v0l-175 92v1c-8 5 -14 13 -14 22v183c0 6 6 12 13 12c2 0 4 0 5 -1l2 -1l171 -89z" />
+    <glyph glyph-name="ion-disc" unicode="&#xf12d;" 
+d="M224 289c54 0 97 -43 97 -97s-43 -97 -97 -97s-97 43 -97 97s43 97 97 97zM224 148c24 0 44 20 44 44s-20 44 -44 44s-44 -20 -44 -44s20 -44 44 -44zM224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM224 69
+c68 0 123 55 123 123s-55 123 -123 123s-123 -55 -123 -123s55 -123 123 -123z" />
+    <glyph glyph-name="ion-document-text" unicode="&#xf12e;" horiz-adv-x="288" 
+d="M286 279c1 -3 2 -6 2 -10v-245c0 -13 -10 -24 -22 -24h-243c-12 0 -23 11 -23 24v336c0 13 11 24 23 24h160c3 0 6 0 9 -2c2 -1 5 -3 7 -5l84 -92c2 -2 2 -4 3 -6zM48 269v-10c0 -1 1 -3 3 -3h71c2 0 3 2 3 3v10c0 2 -1 3 -3 3h-71c-2 0 -3 -1 -3 -3zM48 141v-10
+c0 -1 1 -3 3 -3h123c2 0 2 2 2 3v10c0 2 0 3 -2 3h-123c-2 0 -3 -1 -3 -3zM208 67v10c0 2 0 3 -2 3h-155c-2 0 -3 -1 -3 -3v-10c0 -1 1 -3 3 -3h155c2 0 2 2 2 3zM240 195v10c0 2 0 3 -2 3h-187c-2 0 -3 -1 -3 -3v-10c0 -1 1 -3 3 -3h187c2 0 2 2 2 3zM193 270h60l-71 78
+v-66c0 -6 5 -12 11 -12z" />
+    <glyph glyph-name="ion-document" unicode="&#xf12f;" horiz-adv-x="288" 
+d="M287 279c1 -3 1 -5 1 -9v-244c0 -13 -9 -26 -21 -26h-243c-12 0 -24 13 -24 26v335c0 13 12 23 24 23h160c3 0 6 0 9 -2c2 -1 5 -2 7 -4l83 -92c2 -2 3 -4 4 -7zM193 337v-63h58zM32 32h224v210h-67c-15 0 -28 13 -28 28v82h-129v-320z" />
+    <glyph glyph-name="ion-drag" unicode="&#xf130;" horiz-adv-x="512" 
+d="M0 272v32h512v-32h-512zM0 176v32h512v-32h-512zM0 80v32h512v-32h-512z" />
+    <glyph glyph-name="ion-earth" unicode="&#xf276;" 
+d="M325 322c2 -4 7 -12 3 -15c-3 -2 -10 -2 -13 5s0 11 -5 9s-7 3 -6 4c1 2 3 3 5 4c0 2 -4 8 2 7c4 -1 12 -10 14 -14zM344 277v0v0zM403 251c0 0 -2 0 0 0v0zM224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM141 19l8 -4
+c3 -1 6 -2 10 -3c14 -5 28 -8 43 -10c28 -3 56 -1 83 8c15 5 30 11 43 20c6 4 6 16 10 24c8 16 -2 33 12 47c12 14 4 19 4 34c0 10 8 18 4 29c-1 4 -7 -3 -9 1c-5 7 -21 1 -28 2c-13 2 -24 14 -33 23c-5 5 0 20 1 26c4 15 0 33 19 38c5 1 5 9 10 11c5 1 10 3 15 4
+c9 1 17 -2 26 -2c10 0 14 -5 22 -11c7 -6 13 -3 22 -5c7 0 0 5 -2 8c-3 2 -6 2 -8 2c-16 4 -23 22 -36 30c-6 3 -9 2 -11 0c-1 -1 1 -12 1 -12c-1 -3 -10 -4 -13 -5c-9 -2 -29 17 -15 22c4 1 27 5 24 15c-3 6 2 13 -5 14c-8 1 -7 7 -15 8c-5 1 -5 11 -5 14c0 9 2 6 9 7
+c-17 11 -37 19 -57 24c-1 -3 -5 -12 -8 -12c-5 -1 -6 0 -9 -3c-9 -10 -16 -28 -25 -7c-4 11 5 19 2 28h-6h-3c6 -12 -5 -18 -8 -19c-8 0 -10 5 -17 4c-4 -1 -7 4 -11 2s-13 -8 -14 -12c-3 -12 6 -13 14 -6c6 6 17 12 25 6c6 -5 5 -9 5 -14s-1 -18 -9 -16c-4 1 -7 6 -11 3
+c-8 -7 -18 -6 -29 -9c-10 -2 -16 -6 -25 -9c-8 -3 -11 -4 -12 -12c0 -2 0 -14 -3 -15c-5 -2 -8 22 -22 20c-12 -1 -30 -13 -25 -28c2 -5 28 -3 10 -14c-2 -1 2 -17 2 -20c1 -8 13 -18 21 -10c6 6 6 5 14 2c15 -8 33 -15 45 -27c6 -6 9 -24 17 -28c9 -5 19 -5 26 -14
+c6 -7 -2 -19 -8 -23c-4 -2 -12 -24 -16 -29c-2 -4 -12 -6 -16 -7c-3 0 -7 -9 -9 -11c-7 -7 -8 -13 -17 -19c-18 -12 -22 -23 -18 -44c2 -8 5 -13 11 -16zM100 46l2 -2c7 -6 15 -11 23 -16c-21 21 -23 49 -21 78l3 24c1 3 -4 7 -4 11c0 10 0 5 -8 13c-4 4 -10 11 -12 17
+c-7 16 1 30 10 43c9 14 -7 20 -10 32c-1 6 -7 6 -6 12c1 7 -4 5 -9 9c-12 8 -1 20 -7 26c-43 -70 -36 -162 16 -224c1 -1 0 -1 1 -2h1c3 -4 6 -8 9 -11s7 -6 10 -9z" />
+    <glyph glyph-name="ion-easel" unicode="&#xf3c2;" 
+d="M48 112v192h352v-192h-352zM432 352c9 0 16 -7 16 -16v-256c0 -9 -7 -16 -16 -16h-416c-9 0 -16 7 -16 16v256c0 9 7 16 16 16h416zM416 96v224h-384v-224h384zM48 -32l29 80h31l-28 -80h-32zM239 416l17 -48h-64l17 48h30zM340 48h31l29 -80h-32zM208 0v48h32v-48h-32z
+" />
+    <glyph glyph-name="ion-edit" unicode="&#xf2bf;" 
+d="M381 259l-250 -251l-91 91l251 250zM440 360c12 -12 11 -32 -2 -45l-45 -45l-91 91l45 45c13 13 33 14 45 2zM32 85l85 -85l-117 -32z" />
+    <glyph glyph-name="ion-egg" unicode="&#xf277;" horiz-adv-x="320" 
+d="M160 416c64 0 160 -133 160 -257s-64 -191 -160 -191s-160 67 -160 191s96 257 160 257z" />
+    <glyph glyph-name="ion-eject" unicode="&#xf131;" horiz-adv-x="320" 
+d="M303 128h-286v0c-10 0 -17 7 -17 16c0 3 1 5 3 8l138 191c5 5 11 9 19 9s14 -4 19 -9l138 -190c2 -3 3 -6 3 -9c0 -9 -7 -16 -17 -16v0zM308 96c7 0 12 -5 12 -12v-40c0 -7 -5 -12 -12 -12h-296c-7 0 -12 5 -12 12v40c0 7 5 12 12 12h296z" />
+    <glyph glyph-name="ion-email-unread" unicode="&#xf3c3;" horiz-adv-x="480" 
+d="M352 288c0 43 21 64 64 64s64 -21 64 -64s-21 -64 -64 -64s-64 21 -64 64zM209 288h127c0 -17 5 -33 15 -47c-6 -3 -14 -8 -22 -12s-16 -8 -23 -12s-14 -8 -22 -12s-15 -8 -21 -11s-11 -6 -16 -9s-9 -5 -12 -7s-4 -3 -5 -3c-6 -3 -13 -4 -21 -4s-15 1 -21 4
+c-1 1 -15 8 -42 23s-54 29 -81 44s-43 23 -46 25c-7 4 -12 8 -13 11c-1 4 -1 6 1 8s6 2 11 2h191zM277 175c18 11 45 30 83 56c16 -15 34 -23 56 -23v-155c0 -2 -1 -4 -2 -7s-3 -5 -5 -7s-4 -4 -7 -5s-6 -2 -8 -2h-185h-185c-5 0 -11 2 -16 7s-8 9 -8 14v205c0 6 3 8 9 5
+c2 -1 11 -7 26 -17s32 -22 53 -36s39 -26 53 -35l-83 -93c-2 -2 -2 -4 -1 -5c2 -1 4 -1 6 1l98 83c16 -10 25 -16 27 -17c6 -3 13 -4 21 -4s15 1 21 4c2 1 11 7 27 17l98 -83c2 -2 5 -2 6 -1s0 3 -2 5z" />
+    <glyph glyph-name="ion-email" unicode="&#xf132;" horiz-adv-x="416" 
+d="M19 299c-4 2 -11 7 -13 11c-3 8 1 10 12 10h191h191c11 0 15 -2 12 -10c-2 -4 -9 -9 -13 -11c-11 -6 -163 -89 -169 -92s-12 -4 -21 -4s-15 1 -21 4s-158 86 -169 92zM408 295c9 4 8 -1 8 -5v-205c0 -9 -12 -21 -22 -21h-185h-185c-10 0 -24 12 -24 21v205s0 9 9 5
+c8 -4 83 -56 132 -88l-83 -93c-2 -2 -2 -4 -1 -5s4 -1 6 1l98 83c15 -10 25 -16 27 -17c8 -4 14 -4 21 -4s13 0 21 4c2 1 12 7 27 17l98 -83c2 -2 5 -2 6 -1s0 3 -2 5l-82 93c49 32 123 84 131 88z" />
+    <glyph glyph-name="ion-erlenmeyer-flask-bubbles" unicode="&#xf3c4;" horiz-adv-x="384" 
+d="M382 21c2 -4 3 -10 0 -14s-8 -7 -13 -7h-177h-178c-5 0 -9 3 -12 7s-2 10 0 14l118 199v150c0 8 6 14 14 14s15 -6 15 -14v-80c4 3 10 5 16 5c15 0 27 -12 27 -27s-12 -26 -27 -26c-6 0 -12 2 -16 5v-31c0 -2 -1 -4 -2 -6l-35 -59h72c-15 6 -26 20 -26 37
+c0 23 19 42 43 42c15 0 27 -8 35 -19c-1 2 -1 3 -1 5v154c0 8 6 14 14 14s15 -6 15 -14v-150zM218 151h53l-31 54c2 -5 3 -11 3 -17c0 -17 -10 -31 -25 -37zM201 319c-12 0 -22 9 -22 21s10 21 22 21s22 -9 22 -21s-10 -21 -22 -21z" />
+    <glyph glyph-name="ion-erlenmeyer-flask" unicode="&#xf3c5;" horiz-adv-x="384" 
+d="M375 52c6 -9 9 -20 9 -32c0 -28 -16 -52 -63 -52h-258c-47 0 -63 24 -63 52c0 12 3 23 9 32l49 73l49 77c13 20 21 44 21 70v92s-14 34 -16 43c-2 8 1 9 17 9h126c16 0 18 -1 16 -9c-2 -9 -15 -22 -15 -42v-93c0 -26 6 -50 19 -70zM345 7c3 3 7 8 7 14c0 5 -2 10 -4 14
+l-101 150c-16 26 -23 56 -23 87v112h-64v-112c0 -32 -9 -62 -25 -87l-99 -150c-2 -4 -4 -9 -4 -14c0 -6 3 -11 6 -14c4 -4 12 -7 25 -7h258c13 0 20 3 24 7zM325 37c1 -2 3 -6 3 -8c0 -7 -6 -15 -14 -15h-244c-7 0 -14 6 -14 14c0 3 1 6 3 8l81 124h103l82 -124v1zM238 106
+c2 -1 4 -2 6 -2s3 0 5 2c1 2 3 4 3 6s-1 4 -3 6c-1 2 -3 2 -5 2s-4 0 -6 -2c-1 -2 -2 -4 -2 -6s0 -4 2 -6zM285 47c4 2 4 7 2 11l-23 36c-1 2 -4 4 -7 4c-2 0 -3 0 -4 -1c-4 -2 -4 -7 -2 -11l23 -36c1 -2 5 -4 7 -4c1 0 3 0 4 1z" />
+    <glyph glyph-name="ion-eye-disabled" unicode="&#xf306;" 
+d="M344 290c41 -27 76 -66 104 -100c-51 -54 -124 -135 -224 -135c-36 0 -65 8 -92 22l-77 -77l-23 23l71 71c-36 25 -68 61 -103 98c78 85 142 137 224 137c34 0 64 -9 92 -23l77 78l23 -23zM134 192c0 -19 6 -36 16 -51l27 27c-4 7 -5 15 -5 24c0 29 23 53 52 53h8
+c-5 -6 -8 -13 -8 -21c0 -3 0 -5 1 -8l51 50c-15 11 -33 17 -52 17c-49 0 -90 -41 -90 -91zM224 101c49 0 90 41 90 91c0 19 -6 37 -16 52l-50 -51c3 -1 5 -1 8 -1c8 0 14 3 20 7v-7c0 -29 -23 -53 -52 -53c-9 0 -17 2 -24 6l-28 -27c15 -11 33 -17 52 -17z" />
+    <glyph glyph-name="ion-eye" unicode="&#xf133;" 
+d="M224 320c99 0 172 -70 224 -129c-51 -50 -124 -127 -224 -127s-157 60 -224 128c78 79 142 128 224 128zM224 101c49 0 90 41 90 91s-41 91 -90 91s-90 -41 -90 -91s41 -91 90 -91zM224 224c0 -18 14 -32 32 -32c8 0 14 3 20 7v-7c0 -29 -23 -53 -52 -53s-52 24 -52 53
+s23 53 52 53h8c-5 -6 -8 -13 -8 -21z" />
+    <glyph glyph-name="ion-female" unicode="&#xf278;" horiz-adv-x="256" 
+d="M160 164v-68h64v-64h-64v-64h-64v64h-64v64h64v68c-55 14 -96 64 -96 124c0 71 57 128 128 128s128 -57 128 -128c0 -60 -41 -110 -96 -124zM128 208c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80z" />
+    <glyph glyph-name="ion-filing" unicode="&#xf134;" horiz-adv-x="384" 
+d="M317 319c12 0 19 0 19 -20v-28h-288v28c0 20 8 20 20 20h249zM269 352c13 0 19 -1 19 -19h-192c0 18 7 19 20 19h153zM368 278c13 -8 17 -17 15 -41l-17 -184c-4 -21 -16 -21 -24 -21h-300c-8 0 -20 0 -24 21l-17 185c-3 26 1 31 15 40l15 10v-32h321v32z" />
+    <glyph glyph-name="ion-film-marker" unicode="&#xf135;" horiz-adv-x="416" 
+d="M400 240c9 0 16 -7 16 -15v-210c0 -8 -7 -15 -16 -15h-384c-9 0 -16 7 -16 15v210c0 8 6 14 13 15c-2 2 -3 4 -4 7l-9 45c-2 8 5 16 13 18l370 74c8 2 16 -4 18 -12l9 -46c2 -8 -4 -16 -12 -18l-342 -68h344zM257 46l-20 58l51 36h-62l-20 58l-19 -58h-63l51 -36l-19 -58
+l50 36z" />
+    <glyph glyph-name="ion-fireball" unicode="&#xf319;" horiz-adv-x="320" 
+d="M297 210c14 -24 23 -52 23 -82c0 -33 -10 -63 -26 -88v0v0c-29 -43 -78 -72 -134 -72c-17 0 -32 1 -46 7s-25 13 -33 25c-11 16 -17 28 -21 52c-6 -25 2 -48 9 -60c-43 26 -69 71 -69 125v4c5 78 65 109 90 151c8 14 13 30 10 48c11 -9 15 -25 15 -39
+c0 -16 -3 -29 -3 -29c4 8 7 18 9 31c6 35 2 85 -37 132l-1 1s7 0 18 -3c95 -16 169 -91 184 -186c2 -12 3 -23 3 -35c0 -16 -2 -32 -5 -47c10 23 13 43 14 55v10z" />
+    <glyph glyph-name="ion-flag" unicode="&#xf279;" horiz-adv-x="384" 
+d="M362 266c0 0 12 2 22 6c0 -16 -7 -32 -9 -36c-28 -50 -99 -123 -181 -84c-65 31 -92 30 -117 24c-1 0 -2 -1 -3 -1c-3 -1 -15 -5 -26 -1v197c0 16 14 31 33 35c39 7 106 5 148 -74c39 -74 97 -72 133 -66zM24 416c4 0 8 -4 8 -8v-432c0 -4 -4 -8 -8 -8h-16
+c-4 0 -8 4 -8 8v432c0 4 4 8 8 8h16z" />
+    <glyph glyph-name="ion-flame" unicode="&#xf31a;" horiz-adv-x="256" 
+d="M1 128c-11 109 72 224 159 288c-26 -145 97 -142 96 -288c-1 -120 -105 -160 -128 -160s-114 26 -127 160zM88 80c0 -44 40 -80 40 -80s41 36 41 80s-41 80 -41 80s-40 -36 -40 -80z" />
+    <glyph glyph-name="ion-flash-off" unicode="&#xf136;" 
+d="M115 -4c-69 38 -115 112 -115 196c0 124 100 224 224 224c24 0 47 -4 68 -11c2 -1 3 -1 5 -2c12 -4 24 -9 35 -15v0c69 -38 116 -112 116 -196c0 -124 -100 -224 -224 -224c-24 0 -47 4 -68 11c-2 1 -3 1 -5 2c-12 4 -24 8 -35 14zM86 291c-20 -28 -32 -62 -32 -99
+c0 -65 36 -121 90 -150c6 -3 13 -7 19 -9c2 -1 3 -1 5 -2c9 -3 19 -5 29 -7c9 -2 18 -2 27 -2c37 0 71 12 99 32l-52 53l36 40l55 -54c20 28 32 62 32 99c0 66 -37 123 -91 151c-6 3 -12 6 -18 8c-2 1 -3 1 -5 2c-9 3 -19 5 -29 7c-9 2 -18 2 -27 2c-37 0 -72 -12 -100 -32
+l53 -52l-36 -41zM178 58l38 113h-85l139 155l-38 -113h85z" />
+    <glyph glyph-name="ion-flash" unicode="&#xf137;" horiz-adv-x="320" 
+d="M0 160l224 256l-51 -192h147l-224 -256l51 192h-147z" />
+    <glyph glyph-name="ion-folder" unicode="&#xf139;" horiz-adv-x="384" 
+d="M366 256c18 0 19 -7 18 -18l-12 -186c-1 -11 -3 -20 -21 -20h-317c-18 0 -20 9 -21 20l-13 184c-1 11 0 20 18 20h348zM362 305l2 -33h-344c0 6 4 46 6 63c2 18 8 17 25 17h75c28 0 23 0 37 -15c16 -18 19 -17 41 -17h143c11 0 15 -3 15 -15z" />
+    <glyph glyph-name="ion-fork-repo" unicode="&#xf2c0;" horiz-adv-x="320" 
+d="M320 368v-64h-48v-48h-64v48h-48v64h48v48h64v-48h48zM208 208h64v-5v0c0 -43 -7 -70 -38 -95c-23 -19 -51 -20 -75 -22c-9 -1 -18 -2 -26 -3c-6 -1 -13 -5 -20 -10c9 -11 15 -25 15 -41c0 -35 -29 -64 -64 -64s-64 29 -64 64c0 24 13 44 32 55v210c-19 11 -32 31 -32 55
+c0 35 29 64 64 64s64 -29 64 -64c0 -24 -13 -44 -32 -55v-160c8 4 18 7 27 9c11 2 21 2 31 3c17 1 33 3 40 9c10 8 14 11 14 50zM64 384c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM64 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32
+s14 -32 32 -32z" />
+    <glyph glyph-name="ion-fork" unicode="&#xf27a;" horiz-adv-x="128" 
+d="M78 299v0v0v0zM128 282c0 -26 -15 -48 -37 -58c-12 -6 -11 -11 -11 -11s16 -200 16 -213s-3 -18 -9 -24s-15 -8 -23 -8v0v0c-8 0 -16 2 -22 8s-10 13 -10 24s16 213 16 213s0 6 -11 11c-22 10 -37 32 -37 58c0 43 15 93 24 134h8v-117c0 -6 3 -11 9 -11s9 4 10 10v1
+l9 117h8l10 -117v-1c1 -6 3 -10 9 -10s9 5 9 11v117h8v0c9 -40 24 -91 24 -134z" />
+    <glyph glyph-name="ion-forward" unicode="&#xf13a;" horiz-adv-x="384" 
+d="M224 150c-102 0 -171 -9 -224 -102c0 0 37 208 224 208v80l160 -144l-160 -134v92z" />
+    <glyph glyph-name="ion-funnel" unicode="&#xf31b;" 
+d="M224 416c124 0 224 -36 224 -80c0 -8 -3 -15 -9 -22v0c-35 -43 -151 -179 -151 -218v-4v-83v0c0 -23 -29 -41 -64 -41s-64 18 -64 41v0v87c0 39 -117 177 -149 216v0c-7 8 -11 16 -11 24c0 44 100 80 224 80zM224 288c92 0 176 22 176 48s-83 48 -176 48
+s-176 -22 -176 -48s84 -48 176 -48z" />
+    <glyph glyph-name="ion-gear-a" unicode="&#xf13d;" horiz-adv-x="384" 
+d="M347 192c0 -24 15 -43 37 -56c-4 -13 -10 -26 -16 -38c-25 6 -45 -3 -62 -20s-22 -37 -16 -62c-12 -6 -25 -12 -38 -16c-13 22 -36 37 -60 37s-47 -15 -60 -37c-13 4 -27 10 -39 16c6 25 2 45 -15 62s-37 21 -62 15c-6 12 -12 26 -16 39c22 13 37 36 37 60s-15 43 -37 56
+c4 13 9 26 16 38c25 -6 45 3 62 20s21 37 15 62c12 6 26 12 39 16c13 -22 36 -37 60 -37s47 15 60 37c13 -4 27 -10 39 -16c-6 -25 -2 -45 15 -62s37 -26 62 -20c6 -12 12 -25 16 -38c-22 -13 -37 -32 -37 -56zM192 94c54 0 98 44 98 98s-44 98 -98 98s-98 -44 -98 -98
+s44 -98 98 -98z" />
+    <glyph glyph-name="ion-gear-b" unicode="&#xf13e;" horiz-adv-x="384" 
+d="M384 154h-44c-4 -14 -10 -27 -17 -39l32 -32l-54 -54l-33 32c-12 -7 -24 -11 -38 -15v-46h-76v46c-13 4 -26 8 -38 15l-33 -32l-54 54l32 32c-7 12 -13 25 -17 39h-44v76h43c4 14 9 29 16 41l-30 30l54 54l29 -29c13 8 27 13 42 17v41h76v-41c15 -4 29 -9 42 -17l29 29
+l54 -54l-30 -30c7 -12 13 -27 16 -41h43v-76zM192 138c30 0 54 24 54 54s-24 54 -54 54s-54 -24 -54 -54s24 -54 54 -54z" />
+    <glyph glyph-name="ion-grid" unicode="&#xf13f;" horiz-adv-x="320" 
+d="M64 295c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM192 295c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM320 295c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM64 167
+c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM192 167c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM320 167c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM64 39
+c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM192 39c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50zM320 39c0 -4 -3 -7 -7 -7h-50c-4 0 -7 3 -7 7v50c0 4 3 7 7 7h50c4 0 7 -3 7 -7v-50z" />
+    <glyph glyph-name="ion-hammer" unicode="&#xf27b;" horiz-adv-x="320" 
+d="M314 416c3 0 6 -3 6 -6v-84c0 -3 -3 -6 -6 -6h-52c-3 0 -6 3 -6 6v14c-6 5 -16 9 -22 7c-7 -2 -23 -13 -30 -25s-6 -28 -6 -66l8 -2c5 -1 7 -6 7 -9v-70c0 -95 11 -201 11 -201c0 -3 -3 -6 -6 -6h-84c-3 0 -6 3 -6 6c0 0 11 106 11 201v70c0 3 3 8 7 9l7 2
+c0 43 -5 58 -22 74c-18 16 -41 19 -63 17s-51 -35 -58 -45s-10 2 -10 11c1 16 22 60 72 81s91 22 102 22s27 -1 38 -3s16 -18 26 -18c7 0 14 5 18 9v6c0 3 3 6 6 6h52z" />
+    <glyph glyph-name="ion-happy-outline" unicode="&#xf3c6;" 
+d="M355 158c8 -4 11 -13 7 -21c-24 -46 -78 -73 -138 -73c-62 0 -118 29 -139 74c-4 8 0 17 8 21c2 1 5 1 7 1c6 0 11 -3 14 -9c16 -34 60 -55 110 -55c49 0 92 21 110 56c3 5 8 8 14 8c3 0 5 -1 7 -2zM381 217c5 -7 4 -17 -4 -22c-3 -2 -6 -3 -10 -3c-5 0 -11 2 -14 6
+s-7 10 -17 10s-14 -6 -17 -10s-9 -6 -14 -6c-4 0 -7 1 -10 3c-8 6 -9 15 -3 22c11 14 23 23 44 23s35 -9 45 -23zM157 217c5 -7 4 -17 -4 -22c-3 -2 -6 -3 -10 -3c-5 0 -11 2 -14 6s-7 10 -17 10s-14 -6 -17 -10s-9 -6 -14 -6c-4 0 -7 1 -10 3c-8 6 -9 15 -3 22
+c11 14 23 23 44 23s35 -9 45 -23zM224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56s-100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136s85 -56 136 -56
+s100 20 136 56z" />
+    <glyph glyph-name="ion-happy" unicode="&#xf31c;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM71 195c3 -2 6 -3 10 -3c5 0 11 2 14 6s7 10 17 10s14 -6 17 -10s9 -6 14 -6c4 0 7 1 10 3c8 5 9 15 4 22c-10 14 -24 23 -45 23s-33 -9 -44 -23c-6 -7 -5 -16 3 -22zM362 137
+c4 8 1 17 -7 21c-2 1 -4 2 -7 2c-6 0 -11 -3 -14 -8c-18 -35 -61 -56 -110 -56c-50 0 -94 21 -110 55c-3 6 -8 9 -14 9c-2 0 -5 0 -7 -1c-8 -4 -12 -13 -8 -21c21 -45 77 -74 139 -74c60 0 114 27 138 73zM377 195c8 5 9 15 4 22c-10 14 -24 23 -45 23s-33 -9 -44 -23
+c-6 -7 -5 -16 3 -22c3 -2 6 -3 10 -3c5 0 11 2 14 6s7 10 17 10s14 -6 17 -10s9 -6 14 -6c4 0 7 1 10 3z" />
+    <glyph glyph-name="ion-headphone" unicode="&#xf140;" horiz-adv-x="384" 
+d="M383 210c3 -51 -3 -130 -13 -162c-20 -67 -40 -80 -72 -80s-58 27 -58 59v106c0 33 23 59 53 59c18 0 34 -9 44 -24c0 0 11 7 13 22s4 34 -5 64s-21 19 -36 38c-2 3 -5 7 -8 10l-10 10c-2 2 -3 3 -5 4c-11 9 -21 17 -34 23c-19 9 -39 13 -60 13s-42 -4 -61 -13
+c-13 -6 -22 -14 -33 -23c-2 -1 -3 -2 -5 -4l-10 -10s-6 -7 -8 -10c-15 -19 -27 -8 -36 -38c-9 -31 -7 -49 -5 -64s13 -22 13 -22c10 15 26 24 44 24c30 0 53 -27 53 -59v-106c0 -32 -26 -59 -58 -59s-52 13 -72 80c-10 32 -16 111 -13 162c3 60 22 108 56 145v0
+c8 8 15 16 24 23s19 13 29 18c25 13 53 20 82 20s57 -7 82 -20c10 -5 19 -11 28 -18s17 -15 25 -23v0c34 -37 53 -85 56 -145z" />
+    <glyph glyph-name="ion-heart-broken" unicode="&#xf31d;" horiz-adv-x="416" 
+d="M181 160c0 -36 -2 -71 4 -107c2 -10 2 -20 2 -31l-153 159c-45 47 -45 124 0 171c40 41 103 43 144 3c-2 -15 -3 -31 -3 -46c-18 -14 -40 -21 -56 -39l11 7c17 11 15 8 35 14c3 1 8 3 11 5c0 -1 -1 -5 -1 -6c1 -20 11 -39 15 -60c0 -5 1 -10 -1 -15c-8 -17 -7 -37 -8 -55
+zM274 147c8 -18 23 -29 38 -39l-104 -108l-17 18c0 13 -4 26 -4 38c-2 48 10 94 21 142v0c1 -1 2 -1 3 -1c30 -6 52 -24 63 -50zM382 352c46 -47 46 -124 0 -171l-68 -70c-28 24 -42 54 -65 81c-12 13 -26 23 -41 32c-3 13 -8 26 -11 39c-3 12 14 21 16 31c3 12 3 26 3 39
+l19 19c40 42 107 42 147 0z" />
+    <glyph glyph-name="ion-heart" unicode="&#xf141;" horiz-adv-x="416" 
+d="M382 352c46 -47 46 -124 0 -171l-174 -181l-174 181c-46 47 -46 124 0 171c40 42 107 42 147 0l27 -28l28 28c40 42 106 42 146 0z" />
+    <glyph glyph-name="ion-help-buoy" unicode="&#xf27c;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM402 264c-10 24 -23 45 -42 64s-41 32 -65 42l-19 -61c14 -6 27 -15 38 -26s21 -24 27 -38zM224 96c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM88 328
+c-19 -19 -32 -41 -42 -65l61 -19c6 14 15 27 26 38s24 21 38 27l-19 61c-24 -10 -45 -23 -64 -42zM46 120c10 -24 23 -45 42 -64s41 -32 65 -42l19 61c-14 6 -27 15 -38 26s-21 24 -27 38zM360 56c19 19 32 41 42 65l-61 19c-6 -14 -15 -27 -26 -38s-24 -21 -38 -27l19 -61
+c24 10 45 23 64 42z" />
+    <glyph glyph-name="ion-help-circled" unicode="&#xf142;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM244 89c1 18 -12 31 -29 31c-16 0 -30 -11 -30 -29s12 -30 28 -30c17 0 31 10 31 28zM293 217c7 10 12 22 12 36c0 23 -9 40 -25 52c-17 13 -37 18 -62 18
+c-19 0 -34 -4 -47 -13c-19 -13 -28 -34 -28 -68h49c0 9 -1 19 4 27s13 15 26 15s19 -3 25 -11c5 -7 8 -15 8 -23c0 -7 -4 -14 -8 -20c-2 -4 -6 -7 -10 -10c0 0 -26 -15 -35 -30c-7 -11 -9 -24 -10 -41c0 -1 0 -4 4 -4h39s5 3 5 4c0 6 1 15 2 19c2 7 6 12 12 17l14 9
+c12 9 21 17 25 23z" />
+    <glyph glyph-name="ion-help" unicode="&#xf143;" horiz-adv-x="256" 
+d="M217 371c25 -19 39 -46 39 -83c0 -22 -8 -42 -19 -57c-7 -9 -21 -21 -40 -36l-21 -14c-10 -8 -17 -18 -20 -28c-2 -6 -3 -19 -3 -29c0 -2 -1 -6 -7 -6h-62c-7 0 -7 3 -7 5c1 26 4 49 15 66c15 23 57 48 57 48c6 5 11 9 15 15c7 10 12 21 12 32c0 13 -3 26 -11 36
+c-10 12 -21 18 -41 18s-32 -11 -40 -24s-7 -29 -7 -43h-77c0 54 14 88 44 108c20 14 45 20 75 20c39 0 70 -7 98 -28zM114 78c27 -1 47 -20 46 -48s-22 -46 -49 -45c-26 1 -46 19 -45 47s22 47 48 46z" />
+    <glyph glyph-name="ion-home" unicode="&#xf144;" horiz-adv-x="384" 
+d="M384 160h-48v-160h-96v128h-96v-128h-96v160h-48l192 224z" />
+    <glyph glyph-name="ion-icecream" unicode="&#xf27d;" horiz-adv-x="320" 
+d="M32 192h256l-128 -224zM307 275c8 -5 13 -13 13 -23c0 -16 -14 -28 -30 -28h-4h-252h-4c-16 0 -30 13 -30 28c0 10 6 18 14 23c1 0 1 2 2 2c4 3 7 7 8 12v1c-2 6 -2 12 -2 18c0 42 34 76 76 76c8 0 16 -2 23 -4c-3 -12 -4 -31 -4 -31c2 15 11 29 11 29c18 23 46 38 77 38
+c53 0 96 -43 96 -96c0 -11 -2 -21 -5 -30v-1c0 -4 4 -9 8 -12c1 0 2 -2 3 -2z" />
+    <glyph glyph-name="ion-image" unicode="&#xf147;" 
+d="M336 224c-26 0 -48 22 -48 48s22 48 48 48s48 -22 48 -48s-22 -48 -48 -48zM420 384c16 0 28 -12 28 -28v-328c0 -16 -12 -28 -28 -28h-392c-16 0 -28 12 -28 28v328c0 16 12 28 28 28h392zM317 186l99 -106v260c0 7 -6 12 -13 12h-358c-7 0 -12 -5 -13 -12v-260l126 152
+c4 4 10 8 17 8s13 -2 17 -7l54 -59l4 -4c3 -2 7 -4 11 -4s8 2 12 5l18 16c4 3 8 5 13 5s10 -2 13 -6z" />
+    <glyph glyph-name="ion-images" unicode="&#xf148;" 
+d="M426 308c13 -1 23 -12 22 -24l-14 -263c-1 -13 -12 -22 -25 -21l-330 16c-13 1 -23 10 -22 23l2 46l-15 -1c-12 -1 -22 7 -23 18l-21 236c-1 11 7 21 19 22l296 24c12 1 22 -7 23 -18l5 -54zM71 302c1 12 11 22 24 22l219 -11l-2 31h-1v1c-1 5 -5 8 -10 8l-261 -22
+c-5 0 -10 -4 -10 -9v0v-1l16 -178l18 25zM405 66l10 198v1v0c0 6 -5 10 -11 10l-58 3l-29 2l-204 9c-6 0 -11 -4 -12 -9v0v-1l-3 -63l-7 -128v-7l6 7l102 109c4 4 8 6 14 6s11 -3 14 -7l43 -49l3 -3c2 -2 6 -4 10 -4s5 1 9 3l17 12c4 3 7 4 11 4s9 -2 11 -5l27 -33zM341 186
+c-20 0 -35 15 -35 35s16 35 35 35c20 0 35 -16 35 -35s-16 -35 -35 -35z" />
+    <glyph glyph-name="ion-information-circled" unicode="&#xf149;" 
+d="M448 195c2 -124 -97 -225 -221 -227s-225 97 -227 221s97 225 221 227s225 -97 227 -221zM224 336c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM268 53v11h-22v172h-66v-12h22v-160h-22v-11h88z" />
+    <glyph glyph-name="ion-information" unicode="&#xf14a;" horiz-adv-x="128" 
+d="M96 0h32v-16h-128v16h32v240h-32v16h96v-256zM64 304c-27 0 -48 21 -48 48s21 48 48 48s48 -21 48 -48s-21 -48 -48 -48z" />
+    <glyph glyph-name="ion-ionic" unicode="&#xf14b;" horiz-adv-x="416" 
+d="M376 315c25 -34 40 -77 40 -123c0 -115 -93 -208 -208 -208s-208 93 -208 208s93 208 208 208c46 0 89 -15 123 -40c5 3 11 5 18 5c18 0 32 -14 32 -32c0 -7 -2 -13 -5 -18zM344 56c18 18 31 38 41 61c10 24 15 49 15 75s-5 51 -15 75c-6 13 -13 26 -21 38
+c-4 -2 -10 -4 -15 -4c-18 0 -32 14 -32 32c0 5 2 11 4 15c-12 8 -25 15 -38 21c-24 10 -49 15 -75 15s-51 -5 -75 -15c-23 -10 -43 -23 -61 -41s-31 -38 -41 -61c-10 -24 -15 -49 -15 -75s5 -51 15 -75c10 -23 23 -43 41 -61s38 -31 61 -41c24 -10 49 -15 75 -15s51 5 75 15
+c23 10 43 23 61 41zM112 192c0 64 32 96 96 96s96 -32 96 -96s-32 -96 -96 -96s-96 32 -96 96z" />
+    <glyph glyph-name="ion-ios-alarm-outline" unicode="&#xf3c7;" horiz-adv-x="404" 
+d="M384 256l-54 52l-9 -9c35 -32 57 -79 57 -130c0 -44 -16 -83 -43 -114l36 -45l-12 -10l-35 43c-32 -30 -75 -49 -122 -49v0v0c-47 0 -90 19 -122 49l-35 -43l-12 10l36 45c-27 31 -43 71 -43 115c0 51 22 97 57 129l-9 9l-54 -52c-12 14 -20 32 -20 52c0 44 35 80 80 82
+h5c20 0 39 -7 54 -18l-54 -52l11 -11c26 19 56 32 90 35v0c0 8 8 16 16 16s15 -8 15 -16v0c34 -3 65 -16 91 -35l11 11l-54 52c15 11 34 18 54 18h5c45 -2 80 -38 80 -82c0 -20 -8 -38 -20 -52zM22 280l91 89c-9 5 -19 7 -32 6c-37 -2 -65 -32 -65 -67c0 -10 2 -19 6 -28z
+M362 172c0 88 -72 158 -160 158s-160 -70 -160 -158s72 -158 160 -158s160 70 160 158zM291 369l91 -89c4 9 6 18 6 28c0 35 -28 65 -65 67c-13 1 -23 -1 -32 -6zM202 288h16v-144h-112v16h96v128z" />
+    <glyph glyph-name="ion-ios-alarm" unicode="&#xf3c8;" horiz-adv-x="404" 
+d="M385 256l-55 52l-9 -9c35 -32 57 -79 57 -130c0 -44 -16 -83 -43 -114l37 -45l-13 -10l-35 43c-32 -30 -75 -49 -122 -49v0v0c-47 0 -90 19 -122 49l-35 -43l-12 10l36 45c-27 31 -43 70 -43 114c0 51 22 98 57 130l-9 9l-54 -52c-12 14 -20 32 -20 52c0 44 35 80 80 82
+h5c20 0 39 -7 54 -18l-54 -53l11 -10c26 19 56 32 90 35v0c0 8 8 16 16 16s15 -8 15 -16v0c34 -3 65 -16 91 -35l11 11l-54 52c15 11 34 18 54 18h5c45 -2 80 -38 80 -82c0 -20 -7 -38 -19 -52zM218 144v144h-16v-128h-96v-16h112z" />
+    <glyph glyph-name="ion-ios-albums-outline" unicode="&#xf3c9;" 
+d="M432 304h-416v-288h416v288zM448 320v0v-320h-448v320h448zM40 336v16h368v-16h-368zM72 368v16h304v-16h-304z" />
+    <glyph glyph-name="ion-ios-albums" unicode="&#xf3ca;" 
+d="M448 320v0v-320h-448v320h448zM40 336v16h368v-16h-368zM72 368v16h304v-16h-304z" />
+    <glyph glyph-name="ion-ios-americanfootball-outline" unicode="&#xf3cb;" horiz-adv-x="416" 
+d="M331 315c112 -112 81 -327 81 -327s-26 -4 -65 -4c-73 0 -189 12 -262 85c-112 112 -81 327 -81 327s26 4 65 4c73 0 189 -12 262 -85zM17 383c-2 -19 -5 -60 0 -107c1 -8 2 -16 3 -23l127 127c-25 3 -51 5 -78 5v0v0c-22 0 -41 -1 -52 -2zM96 80c30 -30 72 -53 124 -66
+c10 -3 20 -5 31 -7l142 142c-4 22 -10 44 -17 63c-14 37 -32 68 -56 92c-30 30 -72 53 -124 66c-10 3 -20 5 -31 7l-142 -142c4 -22 10 -44 17 -63c14 -37 32 -68 56 -92zM399 1c2 19 5 60 0 107c-1 8 -2 16 -3 23l-127 -127c25 -3 51 -5 78 -5c22 0 41 1 52 2zM259 130
+l-28 -29l-12 12l29 28l-23 23l-28 -29l-12 12l29 28l-23 23l-28 -29l-12 12l29 28l-23 23l-28 -29l-12 12l29 28l-22 23l-29 -29l-11 12l67 67l12 -11l-29 -29l23 -22l28 29l12 -12l-29 -28l23 -23l28 29l12 -12l-29 -28l23 -23l28 29l12 -12l-29 -28l22 -23l29 29l12 -12
+l-29 -28l22 -23l29 29l11 -12l-67 -67l-12 11l29 29z" />
+    <glyph glyph-name="ion-ios-americanfootball" unicode="&#xf3cc;" horiz-adv-x="416" 
+d="M331 315c112 -112 81 -327 81 -327s-26 -4 -65 -4c-73 0 -189 12 -262 85c-112 112 -81 327 -81 327s26 4 65 4c73 0 189 -12 262 -85zM20 253l3 -18l142 142l-18 3zM219 113l12 -12l28 29l23 -22l-29 -29l12 -11l67 67l-11 12l-29 -29l-22 23l29 28l-12 12l-28 -29
+l-23 23l29 28l-12 12l-28 -29l-23 23l29 28l-12 12l-28 -29l-23 23l29 28l-12 12l-28 -29l-23 22l29 29l-12 11l-67 -67l11 -12l29 29l22 -23l-29 -28l12 -12l28 29l23 -23l-29 -28l12 -12l28 29l23 -23l-29 -28l12 -12l28 29l23 -23zM269 4l127 127l-3 18l-142 -142z" />
+    <glyph glyph-name="ion-ios-analytics-outline" unicode="&#xf3cd;" 
+d="M224 400c-28 0 -55 -5 -81 -16c-25 -10 -47 -26 -66 -45s-35 -41 -45 -66c-11 -26 -16 -53 -16 -81s5 -55 16 -81c10 -25 26 -47 45 -66s41 -35 66 -45c26 -11 53 -16 81 -16s55 5 81 16c25 10 47 26 66 45s35 41 45 66c11 26 16 53 16 81s-5 55 -16 81
+c-10 25 -26 47 -45 66s-41 35 -66 45c-26 11 -53 16 -81 16zM224 416v0c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM76 128c-25 0 -41 18 -42 19c-3 3 -2 9 1 12s8 2 11 -1c1 -1 15 -17 36 -14c12 2 27 26 38 42c4 6 9 12 12 16
+c17 21 34 23 45 21c24 -3 45 -28 54 -50c7 -18 18 -28 32 -29c15 -1 31 11 43 30c1 2 3 4 4 7c9 17 24 43 52 43c31 0 52 -35 53 -36c2 -4 1 -9 -3 -11s-9 -1 -11 3c0 0 -5 8 -12 15c-6 6 -16 13 -27 13c-18 0 -29 -19 -38 -35c-1 -3 -3 -5 -4 -7c-15 -25 -36 -40 -58 -38
+c-20 1 -36 15 -46 39s-28 39 -41 41c-11 1 -21 -4 -31 -16c-3 -4 -6 -9 -10 -15c-14 -20 -31 -45 -50 -48c-3 0 -5 -1 -8 -1z" />
+    <glyph glyph-name="ion-ios-analytics" unicode="&#xf3ce;" 
+d="M224 416c124 0 224 -100 224 -224c0 -13 -1 -25 -3 -37c-1 -6 -2 -12 -3 -17c-24 -98 -113 -170 -218 -170c-122 0 -221 98 -224 219v5c0 9 1 17 2 26c13 111 107 198 222 198zM431 168c1 8 1 16 1 24c0 28 -5 55 -16 81c-10 25 -26 47 -45 66s-41 35 -66 45
+c-26 11 -53 16 -81 16s-55 -5 -81 -16c-25 -10 -47 -26 -66 -45s-35 -41 -45 -66c-11 -26 -16 -53 -16 -81v0c14 -21 29 -34 29 -34h1v-1c1 -1 15 -16 36 -13c12 2 27 26 38 42c4 6 9 12 12 16c17 21 34 23 45 21c24 -3 45 -27 54 -50c7 -18 18 -28 32 -29c15 -1 31 9 43 29
+c1 2 3 4 4 7c9 17 24 44 52 44c31 0 52 -35 53 -36c3 -4 9 -12 16 -20z" />
+    <glyph glyph-name="ion-ios-arrow-back" unicode="&#xf3cf;" horiz-adv-x="192" 
+d="M192 320l-127 -128l127 -128l-32 -32l-160 160v0v0l160 160z" />
+    <glyph glyph-name="ion-ios-arrow-down" unicode="&#xf3d0;" horiz-adv-x="320" 
+d="M301 288l19 -21l-160 -171l-160 171l19 21l141 -150z" />
+    <glyph glyph-name="ion-ios-arrow-forward" unicode="&#xf3d1;" horiz-adv-x="192" 
+d="M0 320l32 32l160 -160v0v0l-160 -160l-32 32l127 128z" />
+    <glyph glyph-name="ion-ios-arrow-left" unicode="&#xf3d2;" horiz-adv-x="192" 
+d="M192 333l-150 -141l150 -141l-21 -19l-171 160l171 160z" />
+    <glyph glyph-name="ion-ios-arrow-right" unicode="&#xf3d3;" horiz-adv-x="192" 
+d="M0 333l21 19l171 -160l-171 -160l-21 19l150 141z" />
+    <glyph glyph-name="ion-ios-arrow-thin-down" unicode="&#xf3d4;" horiz-adv-x="192" 
+d="M190 126c2 -2 2 -4 2 -6s0 -4 -2 -6c0 0 -87 -79 -88 -80s-3 -2 -6 -2s-5 1 -6 2s-88 80 -88 80c-3 3 -3 9 0 12s9 3 12 0l74 -67v285c0 4 4 8 8 8s8 -4 8 -8v-285l74 67c3 3 9 3 12 0z" />
+    <glyph glyph-name="ion-ios-arrow-thin-left" unicode="&#xf3d5;" horiz-adv-x="320" 
+d="M94 98c-2 -2 -4 -2 -6 -2s-4 0 -6 2c0 0 -79 87 -80 88s-2 3 -2 6s1 5 2 6s80 88 80 88c3 3 9 3 12 0s3 -9 0 -12l-67 -74h285c4 0 8 -4 8 -8s-4 -8 -8 -8h-285l67 -74c3 -3 3 -9 0 -12z" />
+    <glyph glyph-name="ion-ios-arrow-thin-right" unicode="&#xf3d6;" horiz-adv-x="320" 
+d="M226 98c-3 3 -3 9 0 12l67 74h-285c-4 0 -8 4 -8 8s4 8 8 8h285l-67 74c-3 3 -3 9 0 12s9 3 12 0c0 0 79 -87 80 -88s2 -3 2 -6s-1 -5 -2 -6s-80 -88 -80 -88c-2 -2 -4 -2 -6 -2s-4 0 -6 2z" />
+    <glyph glyph-name="ion-ios-arrow-thin-up" unicode="&#xf3d7;" horiz-adv-x="192" 
+d="M190 258c-3 -3 -9 -3 -12 0l-74 67v-285c0 -4 -4 -8 -8 -8s-8 4 -8 8v285l-74 -67c-3 -3 -9 -3 -12 0s-3 9 0 12c0 0 87 79 88 80s3 2 6 2s5 -1 6 -2s88 -80 88 -80c2 -2 2 -4 2 -6s0 -4 -2 -6z" />
+    <glyph glyph-name="ion-ios-arrow-up" unicode="&#xf3d8;" horiz-adv-x="320" 
+d="M301 96l-141 150l-141 -150l-19 21l160 171l160 -171z" />
+    <glyph glyph-name="ion-ios-at-outline" unicode="&#xf3d9;" horiz-adv-x="255" 
+d="M236 127v1h19l-3 -6c-3 -6 -13 -19 -22 -27s-18 -14 -28 -20s-21 -10 -32 -13s-23 -5 -34 -5c-16 0 -33 3 -49 8s-30 13 -43 24c-12 11 -26 29 -34 46c-7 16 -10 33 -10 58c0 18 4 38 11 55c7 16 17 30 29 42s27 21 43 28c15 6 33 9 53 9c16 0 32 -3 46 -8
+c15 -5 28 -12 39 -22s17 -21 24 -35c6 -13 8 -26 8 -44c0 -14 -2 -28 -7 -40s-9 -20 -17 -30c-8 -9 -13 -15 -23 -21c-11 -6 -20 -9 -29 -9c-8 0 -15 2 -20 7c-3 2 -5 6 -6 9c-6 -6 -11 -10 -17 -12c-10 -3 -18 -4 -26 -4s-15 1 -21 4s-12 7 -17 12s-8 11 -11 18
+s-5 14 -5 22c0 12 3 24 7 36v2c4 11 5 16 13 26c8 11 17 19 28 26s24 11 38 11c12 0 21 -3 31 -9c7 -4 12 -10 16 -16l6 17h18l-38 -102c-2 -5 -4 -10 -5 -14s-1 -7 -1 -10c0 -2 1 -4 3 -5s4 -2 8 -2c6 0 11 2 20 7c8 4 12 9 19 17c6 8 10 14 14 25s6 23 6 35
+c0 15 -2 25 -7 36c-6 13 -10 22 -19 30s-20 15 -33 20s-27 7 -42 7c-19 0 -35 -3 -48 -9c-15 -6 -27 -14 -37 -24c-11 -10 -19 -23 -25 -37c-6 -15 -10 -32 -10 -48c0 -22 2 -36 8 -49c6 -15 17 -31 28 -41s24 -18 38 -23s30 -7 46 -7c10 0 20 1 30 4s18 6 27 11
+s17 11 24 18s14 13 19 21zM147 154c4 5 8 12 11 20l21 57c-2 5 -4 10 -7 13c-3 4 -6 6 -10 8c-1 0 -1 1 -2 1c-3 2 -5 3 -9 4c-5 1 -9 2 -13 2c-10 0 -19 -3 -28 -9s-17 -13 -23 -22c-5 -8 -7 -11 -10 -20c0 -1 -1 -3 -1 -4c-4 -11 -5 -20 -5 -30c0 -6 1 -11 3 -16
+s5 -9 8 -13s7 -6 12 -8s9 -3 15 -3c4 0 9 1 14 2c4 1 8 2 12 5s8 7 12 13z" />
+    <glyph glyph-name="ion-ios-at" unicode="&#xf3da;" horiz-adv-x="256" 
+d="M228 128v0h28c-1 -1 -2 -4 -3 -6c-4 -6 -14 -19 -23 -27s-18 -14 -28 -20s-20 -10 -32 -13c-11 -3 -23 -5 -34 -5c-16 0 -33 3 -49 8s-30 13 -43 24c-12 10 -26 28 -34 46c-7 16 -10 33 -10 58c0 19 4 39 11 55s17 30 29 42s28 21 44 28c15 6 32 9 52 9c16 0 31 -3 46 -8
+s28 -12 39 -22s18 -22 25 -36c6 -14 8 -26 8 -44c0 -14 -2 -28 -7 -40c-4 -11 -9 -20 -17 -30c-7 -9 -14 -16 -24 -22c-12 -6 -21 -9 -30 -9s-16 2 -22 8c-2 1 -3 3 -4 5c-4 -4 -9 -6 -14 -8c-10 -3 -18 -5 -27 -5c-8 0 -16 2 -23 5s-12 7 -17 12s-9 12 -12 19s-4 14 -4 22
+c0 12 2 25 6 37l1 1c4 10 5 17 13 27c8 11 17 20 28 27c12 7 24 10 38 10c12 0 22 -3 33 -9c5 -3 8 -6 12 -10l5 12h25l-39 -104c-2 -5 -3 -9 -4 -13c-1 -3 -1 -7 -1 -9s0 -3 1 -3c0 0 1 -1 5 -1c5 0 11 2 19 7c7 4 10 8 16 16s9 13 13 23s6 20 6 32c0 14 -1 24 -6 34
+c-5 12 -10 21 -18 28c-9 8 -19 14 -31 18s-26 7 -40 7c-18 0 -32 -3 -44 -8c-14 -6 -25 -13 -35 -23s-18 -22 -24 -35c-6 -14 -9 -30 -9 -45c0 -21 3 -34 8 -46c6 -14 16 -30 26 -39s22 -16 35 -21c14 -5 28 -7 43 -7c10 0 20 2 29 4s18 6 26 11s28 20 38 33zM144 157
+c4 5 7 12 10 19l20 55c-1 4 -3 7 -5 9c-3 3 -6 6 -9 8h-1h-1v1c-3 2 -5 2 -8 3c-4 1 -8 1 -12 1c-9 0 -17 -2 -25 -7c-10 -6 -17 -14 -21 -21c-5 -8 -6 -11 -9 -19c0 -1 -1 -2 -1 -3c-3 -10 -6 -19 -6 -28c0 -5 1 -10 3 -14s4 -8 7 -11s7 -6 11 -8s8 -2 13 -2c4 0 8 0 12 1
+v0c4 1 7 2 11 5c3 2 7 5 11 11z" />
+    <glyph glyph-name="ion-ios-barcode-outline" unicode="&#xf3db;" horiz-adv-x="416" 
+d="M0 64v256h80v-16h-64v-224h64v-16h-80zM336 320h80v-256h-80v16h64v224h-64v16zM64 128v128h16v-128h-16zM336 128v128h16v-128h-16zM272 96v192h16v-192h-16zM128 96v192h16v-192h-16zM199 112v160h16v-160h-16z" />
+    <glyph glyph-name="ion-ios-barcode" unicode="&#xf3dc;" horiz-adv-x="416" 
+d="M0 320h416v-256h-416v256zM80 128v128h-16v-128h16zM144 96v192h-16v-192h16zM215 112v160h-16v-160h16zM288 96v192h-16v-192h16zM352 128v128h-16v-128h16z" />
+    <glyph glyph-name="ion-ios-baseball-outline" unicode="&#xf3dd;" horiz-adv-x="416" 
+d="M415 169v-1v0c-11 -97 -90 -174 -187 -183v0h-2c-2 0 -3 -1 -5 -1h-1h-3h-1h-8c-115 0 -208 93 -208 208v8v1v3v1c0 2 1 3 1 5v2v0c9 97 86 176 183 187v0v0c8 1 16 1 24 1c115 0 208 -93 208 -208c0 -7 0 -14 -1 -20v0v-3zM399 192c0 105 -86 191 -191 191
+c-3 0 -5 -1 -8 -1c0 -11 2 -21 4 -31l20 6l5 -15l-21 -7c2 -7 4 -14 7 -21c2 -5 5 -11 8 -16l17 12l9 -13l-19 -13c7 -12 16 -23 26 -33l14 15l12 -12l-15 -15c11 -10 22 -18 34 -25l12 18l14 -9l-12 -17c5 -2 10 -5 15 -7c7 -3 14 -5 22 -7l7 20l15 -5l-6 -19
+c10 -2 20 -4 30 -4c0 3 1 5 1 8zM17 192c0 -105 86 -191 191 -191h4c-1 9 -1 17 -3 26l-22 -7l-5 16l23 7c-2 8 -5 16 -8 24c-2 5 -4 9 -6 14l-20 -13l-9 13l21 14c-7 12 -16 24 -26 35l-17 -17l-11 11l17 17c-10 10 -22 18 -34 25l-14 -21l-14 9l14 20c-5 2 -10 5 -15 7
+c-7 3 -15 6 -23 8l-8 -24l-15 5l7 23c-9 2 -18 2 -27 3v-4zM228 2c88 9 158 78 169 166c-11 1 -23 3 -34 5l-9 -27l-15 5l8 25c-14 4 -28 10 -41 17l-15 -23l-13 9l14 21c-13 8 -26 17 -37 28l-19 -19l-11 11l19 19c-10 11 -19 23 -27 36l-21 -14l-9 13l22 15
+c-7 13 -12 27 -16 41l-25 -8l-5 16l26 8c-2 12 -4 23 -5 35c-88 -11 -157 -81 -166 -169c10 -1 21 -2 31 -4l8 23l15 -5l-7 -22c14 -4 28 -9 42 -16l13 19l14 -9l-13 -18c13 -8 25 -17 36 -28l17 17l11 -11l-17 -17c11 -12 20 -24 28 -37l19 13l9 -14l-20 -13
+c7 -14 12 -28 16 -42l23 7l5 -15l-24 -8c2 -10 3 -20 4 -30z" />
+    <glyph glyph-name="ion-ios-baseball" unicode="&#xf3de;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208c0 -8 0 -16 -1 -24v0v0c-12 -104 -100 -184 -207 -184c-115 0 -208 93 -208 208c0 107 80 195 184 207v0v0c8 1 16 1 24 1zM212 1c5 0 11 0 16 1c-1 10 -2 20 -4 30l24 8l-5 15l-23 -7c-4 14 -9 28 -16 42l20 13l-9 14l-19 -13
+c-8 13 -17 25 -28 37l17 17l-11 11l-17 -17c-11 11 -23 20 -36 28l13 18l-14 9l-13 -19c-14 7 -28 12 -42 16l7 22l-15 5l-8 -23c-10 2 -21 3 -31 4c-1 -5 -1 -11 -1 -16c9 -1 18 -1 27 -3l-7 -23l15 -5l8 24c8 -2 16 -5 23 -8c5 -2 10 -5 15 -7l-14 -20l14 -9l14 21
+c12 -7 24 -15 34 -25l-17 -17l11 -11l17 17c10 -11 19 -23 26 -35l-21 -14l9 -13l20 13c2 -5 4 -9 6 -14c3 -8 6 -16 8 -24l-23 -7l5 -16l22 7c2 -8 2 -17 3 -26zM363 173c11 -2 23 -4 34 -5c1 5 1 11 1 16c-10 1 -20 2 -30 4l6 19l-15 5l-7 -20c-8 2 -15 4 -22 7
+c-5 2 -10 5 -15 7l12 17l-14 9l-12 -18c-12 7 -23 15 -34 25l15 15l-12 12l-15 -15c-10 10 -18 21 -25 33l19 13l-9 13l-17 -12c-3 5 -6 11 -8 16c-3 7 -5 14 -7 21l21 7l-5 15l-20 -6c-2 10 -3 20 -4 31c-5 0 -11 0 -16 -1c1 -12 3 -23 5 -35l-26 -8l5 -16l25 8
+c4 -14 9 -28 16 -41l-22 -15l9 -13l21 14c8 -13 17 -25 27 -36l-19 -19l11 -11l19 19c11 -11 24 -20 37 -28l-14 -21l13 -9l15 23c13 -7 27 -13 41 -17l-8 -25l15 -5z" />
+    <glyph glyph-name="ion-ios-basketball-outline" unicode="&#xf3df;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM399 192c0 55 -24 105 -62 140c-14 -34 -31 -65 -52 -95c15 -12 31 -21 49 -29c21 -9 43 -14 65 -16v0zM325 343c-32 25 -73 40 -117 40v0c2 -22 6 -44 15 -65
+c10 -25 26 -47 45 -66c2 -1 2 -3 4 -4c20 29 38 60 52 93c0 1 1 1 1 2zM192 382c-51 -4 -96 -29 -128 -65c64 -28 121 -69 169 -119c11 12 21 24 30 37c-40 37 -67 89 -71 147zM233 174c-15 -16 -31 -30 -48 -44c28 -35 45 -79 47 -127c33 4 63 17 88 35
+c-22 50 -51 95 -87 136zM214 178l8 8l-10 10c-46 46 -99 82 -158 108c-18 -25 -31 -55 -35 -88c62 -3 116 -31 155 -74c14 11 27 23 40 36zM18 200c0 -3 -1 -5 -1 -8c0 -45 16 -87 43 -120c36 16 71 36 102 60l-7 7c-19 19 -41 35 -66 45c-22 9 -46 15 -71 16zM71 59
+c35 -36 83 -58 137 -58c3 0 5 1 8 1c-1 25 -6 48 -16 71c-7 17 -17 33 -28 47c-31 -24 -65 -45 -101 -61zM333 48c37 32 61 77 65 128c-46 3 -89 21 -123 48c-10 -13 -20 -26 -31 -38c36 -41 67 -87 89 -138z" />
+    <glyph glyph-name="ion-ios-basketball" unicode="&#xf3e0;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM333 48c-22 51 -53 97 -89 138c11 12 21 25 31 38c34 -27 77 -45 123 -48c0 5 1 11 1 16c-22 2 -44 7 -65 16c-18 8 -34 17 -49 29c21 30 38 61 52 95c-4 4 -8 8 -12 11
+c0 -1 -1 -1 -1 -2c-14 -33 -32 -64 -52 -93c-2 1 -2 2 -4 4c-19 19 -35 41 -45 66c-9 21 -13 43 -15 65c-5 0 -11 -1 -16 -1c4 -58 31 -110 71 -147c-9 -13 -19 -25 -30 -37c-48 50 -105 91 -169 119c-4 -4 -7 -9 -10 -13c59 -26 112 -62 158 -108l10 -10l-8 -8
+c-13 -13 -26 -25 -40 -36c-39 43 -93 71 -155 74c-1 -5 -1 -11 -1 -16c25 -1 49 -7 71 -16c25 -10 47 -26 66 -45l7 -7c-31 -24 -66 -44 -102 -60c4 -4 7 -9 11 -13c36 16 70 37 101 61c11 -14 21 -30 28 -47c10 -23 15 -46 16 -71c5 0 11 0 16 1c-2 48 -19 92 -47 127
+c17 14 33 28 48 44c36 -41 65 -86 87 -136c4 3 9 6 13 10z" />
+    <glyph glyph-name="ion-ios-bell-outline" unicode="&#xf3e1;" horiz-adv-x="384" 
+d="M318 222c0 -114 28 -126 66 -158h-384c38 32 66 44 66 158c0 98 53 130 102 138v2c0 12 11 22 24 22s24 -10 24 -22v-2c49 -7 102 -40 102 -138zM43 80h298c-25 25 -40 58 -40 142c0 46 -13 80 -37 101c-23 19 -52 23 -72 23s-49 -4 -72 -23c-25 -21 -37 -55 -37 -101
+c0 -51 -5 -85 -17 -110c-6 -13 -14 -23 -23 -32zM192 0c-27 0 -49 20 -52 43h104c-3 -23 -25 -43 -52 -43z" />
+    <glyph glyph-name="ion-ios-bell" unicode="&#xf3e2;" horiz-adv-x="384" 
+d="M318 222c0 -114 28 -126 66 -158h-384c38 32 66 44 66 158c0 98 53 130 102 138v2c0 12 11 22 24 22s24 -10 24 -22v-2c49 -7 102 -40 102 -138zM192 0c-27 0 -49 20 -52 43h104c-3 -23 -25 -43 -52 -43z" />
+    <glyph glyph-name="ion-ios-body-outline" unicode="&#xf3e3;" horiz-adv-x="384" 
+d="M192 400c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM192 416v0c27 0 48 -21 48 -48s-21 -48 -48 -48s-48 21 -48 48s21 48 48 48zM360 304c13 0 24 -11 24 -24s-11 -24 -24 -24h-100c-5 0 -14 -5 -18 -15c-5 -12 -2 -33 1 -51l4 -21v-1v0l32 -172
+c2 -13 -6 -26 -19 -28h-5c-11 0 -22 8 -24 20l-21 120v0s-5 31 -17 31h-2c-12 0 -19 -31 -19 -31v0l-21 -120c-2 -12 -11 -20 -22 -20h-5c-13 2 -21 15 -19 28l32 172v1l4 21c3 18 6 39 1 51c-4 10 -12 15 -18 15h-100c-13 0 -24 11 -24 24s11 24 24 24h336zM24 272
+c-4 0 -8 4 -8 8s4 8 8 8h336c4 0 8 -4 8 -8s-4 -8 -8 -8h-102c-16 0 -26 -15 -30 -24c-5 -13 -6 -32 -1 -61v0v0l3 -19l1 -3l32 -172c0 -3 0 -5 -1 -6s-2 -2 -5 -3h-2c-4 0 -7 2 -8 6l-21 120v0c0 2 -2 10 -5 19c-2 6 -5 11 -8 15c-7 9 -14 11 -20 11h-2
+c-5 0 -13 -2 -20 -11c-3 -4 -6 -9 -8 -15c-4 -9 -6 -17 -6 -18v-1l-21 -120c-1 -4 -3 -6 -7 -6h-2c-3 0 -4 2 -5 3s-2 3 -1 6l32 172v0v1l4 21v0v0c5 29 5 48 0 61c-4 9 -14 24 -32 24z" />
+    <glyph glyph-name="ion-ios-body" unicode="&#xf3e4;" horiz-adv-x="384" 
+d="M144 368c0 32 16 48 48 48s48 -16 48 -48s-16 -48 -48 -48s-48 16 -48 48zM360 304c7 0 12 -2 17 -7s7 -10 7 -17s-2 -12 -7 -17s-10 -7 -17 -7h-98c-8 -2 -15 -6 -18 -14c-4 -9 -3 -27 1 -52l4 -21v-1v0l30 -172c1 -7 0 -13 -4 -18s-8 -9 -15 -10s-13 0 -18 4
+s-9 9 -10 16l-21 120v-1l-2 9c-1 5 -3 11 -6 16s-6 8 -10 8h-2c-8 0 -14 -11 -18 -33v1l-21 -120c-1 -7 -5 -12 -10 -16s-11 -5 -18 -4s-11 5 -15 10s-5 11 -4 18l30 172v0v1l4 21c4 25 5 43 1 52c-3 8 -10 12 -18 14h-98c-7 0 -12 2 -17 7s-7 10 -7 17s2 12 7 17s10 7 17 7
+h336z" />
+    <glyph glyph-name="ion-ios-bolt-outline" unicode="&#xf3e5;" horiz-adv-x="226" 
+d="M131 316l-100 -140h65h19l-3 -19l-17 -89l100 140h-65h-19l3 19zM160 384v0l-30 -160h96l-160 -224l30 160h-96z" />
+    <glyph glyph-name="ion-ios-bolt" unicode="&#xf3e6;" horiz-adv-x="226" 
+d="M160 384v0l-30 -160h96l-160 -224l30 160h-96z" />
+    <glyph glyph-name="ion-ios-book-outline" unicode="&#xf3e7;" horiz-adv-x="384" 
+d="M284 384c55 0 100 -26 100 -79v-1v-4v-261v-17h-6h-11h-5c-17 30 -44 42 -78 42c-40 0 -74 -28 -82 -64h-20c-8 36 -42 64 -82 64c-34 0 -65 -16 -78 -42h-5h-11h-6v9v264v9v1c0 53 45 79 100 79c41 0 78 -14 92 -44c12 30 51 44 92 44zM184 37v254v13v2
+c-1 43 -39 62 -84 62c-44 0 -81 -19 -84 -61v-1v0v-262h1c19 26 48 36 83 36s66 -17 84 -43zM368 300v14v1c-3 42 -40 53 -84 53c-46 0 -84 -20 -84 -64v-1v-266c18 26 49 43 84 43s66 -10 84 -36v256z" />
+    <glyph glyph-name="ion-ios-book" unicode="&#xf3e8;" horiz-adv-x="384" 
+d="M100 384c35 0 67 -10 84 -31v-353h-2c-8 36 -42 64 -82 64c-34 0 -65 -16 -78 -42h-5h-11h-6v9v264v9v1c0 53 45 79 100 79zM284 384c55 0 100 -26 100 -79v-1v-4v-261v-17h-6h-11h-5c-17 30 -44 42 -78 42c-40 0 -74 -28 -82 -64h-2v353c17 21 50 31 84 31z" />
+    <glyph glyph-name="ion-ios-bookmarks-outline" unicode="&#xf3e9;" horiz-adv-x="418" 
+d="M385 384c19 0 33 -13 33 -32v-286c0 -19 -14 -34 -33 -34h-143s-25 -4 -25 -19v-13h-8h-8v13c0 15 -11 19 -25 19h-143c-19 0 -33 15 -33 34v286c0 19 14 32 33 32h150c10 0 20 -5 26 -12v0v0c6 7 16 12 26 12h150zM201 37v309c0 9 -12 22 -25 22h-143
+c-9 0 -16 -7 -16 -16v-286c0 -9 7 -18 16 -18h144c10 0 19 -3 24 -11zM273 368v-100l23 14l9 6l9 -6l23 -14v100h-64zM401 66v286c0 9 -7 16 -16 16h-32v-131l-48 32l-48 -32v131h-15c-13 0 -25 -13 -25 -22v-309c5 9 14 11 24 11h144c9 0 16 9 16 18z" />
+    <glyph glyph-name="ion-ios-bookmarks" unicode="&#xf3ea;" horiz-adv-x="418" 
+d="M296 283l-23 -15v116h64v-116l-23 15l-9 6zM385 384c19 0 33 -13 33 -32v-286c0 -19 -14 -34 -33 -34h-143s-25 -4 -25 -19v-13h-8h-8v13c0 15 -11 19 -25 19h-143c-19 0 -33 15 -33 34v286c0 19 14 32 33 32h150s18 -8 18 -15v-329l8 -6l8 6v329s10 15 18 15h22v-146
+l48 32l48 -32v146h32z" />
+    <glyph glyph-name="ion-ios-box-outline" unicode="&#xf3eb;" horiz-adv-x="320" 
+d="M192 208h-1h-63c-9 0 -16 -7 -16 -16s7 -16 16 -16h64c9 0 16 7 16 16s-7 16 -16 16zM192 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32h-64c-18 0 -32 14 -32 32s14 32 32 32h64zM320 336v-80h-16v-208h-288v208h-16v80h320zM288 64v192h-256v-192h256zM304 272v48h-288
+v-48h288z" />
+    <glyph glyph-name="ion-ios-box" unicode="&#xf3ec;" horiz-adv-x="320" 
+d="M16 48v192h288v-192h-288zM128 208c-9 0 -16 -7 -16 -16s7 -16 16 -16h64c9 0 16 7 16 16s-7 16 -16 16h-64zM0 336h320v-80h-16h-288h-16v80z" />
+    <glyph glyph-name="ion-ios-briefcase-outline" unicode="&#xf3ed;" horiz-adv-x="416" 
+d="M368 320h48v-320h-416v320h48v16h32v-16h48v30v2c0 18 10 32 29 32h99c19 0 32 -14 32 -32v-2v-30h48v16h32v-16zM144 320v0h128v0v30c0 10 -7 18 -17 18h-97c-11 0 -14 -8 -14 -18v-30zM400 16v224h-384v-224h384zM400 256v48h-32v-16h-32v16h-256v-16h-32v16h-32v-48
+h384z" />
+    <glyph glyph-name="ion-ios-briefcase" unicode="&#xf3ee;" horiz-adv-x="416" 
+d="M48 320v16h32v-16h-32zM0 0v240h416v-240h-416zM336 320v16h32v-16h-32zM368 320h48v-64h-416v64h48v-32h32v32h48v30v2c0 18 10 32 29 32h99c19 0 32 -14 32 -32v-2v-30h48v-32h32v32zM272 320v30c0 10 -7 18 -17 18h-97c-11 0 -14 -8 -14 -18v-30v0h128v0z" />
+    <glyph glyph-name="ion-ios-browsers-outline" unicode="&#xf3ef;" horiz-adv-x="384" 
+d="M0 304h304v-304h-304v304zM288 16v272h-272v-272h272zM384 384v-304h-64v16h48v272h-272v-48h-16v64h304z" />
+    <glyph glyph-name="ion-ios-browsers" unicode="&#xf3f0;" horiz-adv-x="384" 
+d="M0 304h304v-304h-304v304zM80 384h304v-304h-64v240h-240v64z" />
+    <glyph glyph-name="ion-ios-calculator-outline" unicode="&#xf3f1;" horiz-adv-x="288" 
+d="M32 288v64h224v-64h-224zM48 336v-32h192v32h-192zM256 384c18 0 32 -14 32 -32v-320c0 -18 -14 -32 -32 -32h-224c-18 0 -32 14 -32 32v320c0 18 14 32 32 32h224zM272 32v320c0 9 -7 16 -16 16h-224c-9 0 -16 -7 -16 -16v-320c0 -9 7 -16 16 -16h224c9 0 16 7 16 16z
+M48 208h32h16v-16h-64v64h16v-16v-32zM48 128h32h16v-16h-64v64h16v-16v-32zM48 48h32h16v-16h-64v64h16v-16v-32zM128 208h32h16v-16h-64v64h16v-16v-32zM208 208h32h16v-16h-64v64h16v-16v-32zM128 128h32h16v-16h-64v64h16v-16v-32zM128 48h32h16v-16h-64v64h16v-16v-32z
+M208 48h32h16v-16h-64v144h16v-96v-32z" />
+    <glyph glyph-name="ion-ios-calculator" unicode="&#xf3f2;" horiz-adv-x="288" 
+d="M256 384c18 0 32 -14 32 -32v-320c0 -18 -14 -32 -32 -32h-224c-18 0 -32 14 -32 32v320c0 18 14 32 32 32h224zM248 168h-48v-128h48v128zM248 248h-48v-48h48v48zM168 88h-48v-48h48v48zM168 168h-48v-48h48v48zM168 248h-48v-48h48v48zM88 88h-48v-48h48v48zM88 168
+h-48v-48h48v48zM88 248h-48v-48h48v48zM40 296h208v48h-208v-48z" />
+    <glyph glyph-name="ion-ios-calendar-outline" unicode="&#xf3f3;" horiz-adv-x="384" 
+d="M16 336v-64h352v64zM288 352h96v-352h-384v352h96v32h16v-32h160v32h16v-32zM368 16v240h-352v-240h352zM368 272v64h-80v-32h-16v32h-160v-32h-16v32h-80v-64h352z" />
+    <glyph glyph-name="ion-ios-calendar" unicode="&#xf3f4;" horiz-adv-x="384" 
+d="M0 0v256h384v-256h-384zM384 352v-80h-384v80h96v-48h16v48h160v-48h16v48h96zM96 352v32h16v-32h-16zM272 352v32h16v-32h-16z" />
+    <glyph glyph-name="ion-ios-camera-outline" unicode="&#xf3f5;" horiz-adv-x="384" 
+d="M354 288c18 0 30 -13 30 -31v-176c0 -18 -12 -33 -30 -33h-320c-18 0 -34 15 -34 33v176c0 18 16 31 34 31h13v16h34v-16h13c32 36 43 48 55 48h88c12 0 23 -12 55 -48h62zM368 81v176c0 9 -5 15 -14 15h-62h-7l-5 3c-3 4 -7 8 -10 11c-12 13 -20 24 -26 30
+c-5 5 -7 4 -7 4h-88s-2 0 -7 -4c-6 -5 -14 -14 -25 -27c-3 -4 -7 -10 -11 -14l-5 -3h-7h-60c-9 0 -18 -7 -18 -15v-176c0 -9 9 -17 18 -17h320c8 0 14 8 14 17zM192 258c47 0 86 -38 86 -85s-39 -85 -86 -85s-86 38 -86 85s39 85 86 85zM192 104c38 0 70 31 70 69
+s-32 69 -70 69s-70 -31 -70 -69s32 -69 70 -69zM288 239v17h17v-17h-17zM160 173c0 21 11 32 32 32s32 -11 32 -32s-11 -32 -32 -32s-32 11 -32 32z" />
+    <glyph glyph-name="ion-ios-camera" unicode="&#xf3f6;" horiz-adv-x="384" 
+d="M354 288c18 0 30 -13 30 -31v-176c0 -18 -12 -33 -30 -33h-320c-18 0 -34 15 -34 33v176c0 18 16 31 34 31h13v16h34v-16h13c32 36 43 48 55 48h88c12 0 23 -12 55 -48h62zM192 88c47 0 86 38 86 85s-39 85 -86 85s-86 -38 -86 -85s39 -85 86 -85zM305 239v17h-17v-17h17
+zM192 242c38 0 70 -31 70 -69s-32 -69 -70 -69s-70 31 -70 69s32 69 70 69zM192 141c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-ios-cart-outline" unicode="&#xf3f7;" horiz-adv-x="384" 
+d="M96 48c13 0 24 -11 24 -24s-11 -24 -24 -24s-24 11 -24 24s11 24 24 24zM96 16c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8zM320 48c13 0 24 -11 24 -24s-11 -24 -24 -24s-24 11 -24 24s11 24 24 24zM320 16c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8zM384 320
+l-16 -128l-271 -48l5 -30c7 -34 21 -34 26 -34h240v-16h-240c-11 0 -21 5 -28 14c-6 8 -11 19 -13 33l-43 234v0c-2 8 -3 12 -7 16c-6 5 -18 7 -37 7v16c23 0 38 -4 47 -11c7 -6 10 -14 12 -21zM355 206l11 99l-304 31l32 -176z" />
+    <glyph glyph-name="ion-ios-cart" unicode="&#xf3f8;" horiz-adv-x="384" 
+d="M96 48c13 0 24 -11 24 -24s-11 -24 -24 -24s-24 11 -24 24s11 24 24 24zM320 48c13 0 24 -11 24 -24s-11 -24 -24 -24s-24 11 -24 24s11 24 24 24zM384 320l-16 -128l-271 -48l5 -30c7 -34 21 -34 26 -34h240v-16h-240c-11 0 -21 5 -28 14c-6 8 -11 19 -13 33l-43 234v0
+c-2 8 -3 12 -7 16c-6 5 -18 7 -37 7v16c23 0 38 -4 47 -11c7 -6 10 -14 12 -21z" />
+    <glyph glyph-name="ion-ios-chatboxes-outline" unicode="&#xf3f9;" horiz-adv-x="416" 
+d="M16 384v-192h96v-16h-112v224h288v-112h-16v96h-256zM128 272h288v-224h-48v-64h-13l-64 64h-163v224zM400 64v192h-256v-192h153l55 -55v55h48z" />
+    <glyph glyph-name="ion-ios-chatboxes" unicode="&#xf3fa;" horiz-adv-x="416" 
+d="M288 400v-112h-176v-112h-112v224h288zM128 272h288v-224h-48v-64h-13l-64 64h-163v224z" />
+    <glyph glyph-name="ion-ios-chatbubble-outline" unicode="&#xf3fb;" horiz-adv-x="384" 
+d="M192 336c-97 0 -176 -62 -176 -138c0 -26 10 -51 27 -73c0 -1 0 -2 1 -3s2 -1 2 -2c4 -6 6 -13 6 -20c0 -3 1 -3 -13 -47l39 17v0c2 1 10 4 11 4h1v0c5 2 10 3 16 3c5 0 9 -1 14 -2l1 -1h2c19 -6 41 -10 70 -10c48 0 92 15 125 40c32 25 50 58 50 94
+c0 76 -79 138 -176 138zM192 352v0c106 0 192 -69 192 -154s-85 -150 -191 -150c-27 0 -52 3 -75 11h-2v0c-3 1 -6 2 -10 2s-9 -1 -12 -2h1h-1c-1 0 -9 -4 -10 -4l-50 -22l-2 -1h-3h-3c-6 1 -8 6 -7 10v0s17 57 17 58c0 4 -1 8 -3 11v0v0v0l1 -1l-4 4c-19 24 -30 53 -30 84
+c0 85 86 154 192 154z" />
+    <glyph glyph-name="ion-ios-chatbubble" unicode="&#xf3fc;" horiz-adv-x="384" 
+d="M192 352v0c106 0 192 -69 192 -154s-85 -150 -191 -150c-27 0 -52 3 -75 11h-2v0c-3 1 -6 2 -10 2s-9 -1 -12 -2h1h-1c-1 0 -9 -4 -10 -4l-50 -22l-2 -1h-3h-3c-6 1 -8 6 -7 10v0s17 57 17 58c0 4 -1 8 -3 11v0v0v0l1 -1l-4 4c-19 24 -30 53 -30 84c0 85 86 154 192 154z
+" />
+    <glyph glyph-name="ion-ios-checkmark-empty" unicode="&#xf3fd;" horiz-adv-x="207" 
+d="M74 118c-2 -2 -6 -4 -9 -4s-7 2 -9 4l-56 56l18 18l47 -47l125 126l17 -18z" />
+    <glyph glyph-name="ion-ios-checkmark-outline" unicode="&#xf3fe;" horiz-adv-x="416" 
+d="M292 271l18 -18l-134 -135c-2 -2 -6 -4 -9 -4s-7 2 -9 4l-56 56l18 18l47 -47zM208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191z" />
+    <glyph glyph-name="ion-ios-checkmark" unicode="&#xf3ff;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM176 118l134 135l-18 18l-125 -126l-47 47l-18 -18l56 -56c2 -2 6 -4 9 -4s7 2 9 4z" />
+    <glyph glyph-name="ion-ios-circle-filled" unicode="&#xf400;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191zM208 352c88 0 160 -72 160 -160s-72 -160 -160 -160s-160 72 -160 160s72 160 160 160z" />
+    <glyph glyph-name="ion-ios-circle-outline" unicode="&#xf401;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191z" />
+    <glyph glyph-name="ion-ios-clock-outline" unicode="&#xf402;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191zM208 192v128h17v-145h-113v17h96z" />
+    <glyph glyph-name="ion-ios-clock" unicode="&#xf403;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM225 175v145h-17v-128h-96v-17h113z" />
+    <glyph glyph-name="ion-ios-close-empty" unicode="&#xf404;" horiz-adv-x="192" 
+d="M180 288l12 -12l-84 -84l84 -84l-12 -12l-84 84l-84 -84l-12 12l84 84l-84 84l12 12l84 -84z" />
+    <glyph glyph-name="ion-ios-close-outline" unicode="&#xf405;" horiz-adv-x="416" 
+d="M355 339c81 -81 81 -213 0 -294s-213 -81 -294 0s-81 213 0 294s213 81 294 0zM343 57c74 74 74 196 0 270s-196 74 -270 0s-74 -196 0 -270s196 -74 270 0zM292 288l12 -12l-84 -84l84 -84l-12 -12l-84 84l-84 -84l-12 12l84 84l-84 84l12 12l84 -84z" />
+    <glyph glyph-name="ion-ios-close" unicode="&#xf406;" horiz-adv-x="416" 
+d="M355 339c81 -81 81 -213 0 -294s-213 -81 -294 0s-81 213 0 294s213 81 294 0zM304 108l-84 84l84 84l-12 12l-84 -84l-84 84l-12 -12l84 -84l-84 -84l12 -12l84 84l84 -84z" />
+    <glyph glyph-name="ion-ios-cloud-download-outline" unicode="&#xf407;" 
+d="M161 67l55 -54v242h16v-242l55 54l12 -12l-75 -73l-74 73zM367 284c45 0 81 -37 81 -82s-37 -82 -82 -82v0h-101v16h97h4c37 0 66 30 66 66s-29 67 -66 67h-15v20c0 55 -46 97 -101 97c-38 0 -73 -22 -90 -56l-6 -14l-14 7c-6 3 -13 5 -20 5c-22 0 -40 -18 -44 -39l-1 -9
+l-9 -3c-30 -10 -50 -36 -50 -67c0 -40 33 -74 74 -74h91v-16h-91c-50 0 -90 40 -90 89c0 39 26 71 61 83c5 28 29 51 59 51c10 0 18 -2 26 -6c19 39 59 65 105 65c64 0 117 -51 117 -115c0 -1 -1 -2 -1 -3z" />
+    <glyph glyph-name="ion-ios-cloud-download" unicode="&#xf408;" 
+d="M216 13v107h16v-107l55 54l12 -12l-75 -73l-74 73l11 12zM367 284c45 0 81 -37 81 -82s-37 -82 -82 -82h-134v135h-16v-135h-35h-21h-70c-50 0 -90 40 -90 89c0 39 26 71 61 83c5 28 29 51 59 51c10 0 18 -2 26 -6c19 39 59 65 105 65c64 0 117 -51 117 -115
+c0 -1 -1 -2 -1 -3z" />
+    <glyph glyph-name="ion-ios-cloud-outline" unicode="&#xf409;" 
+d="M367 215c45 0 81 -37 81 -83c0 -45 -37 -84 -82 -84h-276c-50 0 -90 42 -90 92c0 40 26 71 61 83c5 28 29 52 59 52c10 0 18 -2 26 -6c19 39 59 67 105 67c64 0 117 -53 117 -117c0 -1 -1 -3 -1 -4zM366 64c37 0 66 32 66 69s-29 67 -66 67h-15v21c0 56 -46 99 -101 99
+c-38 0 -73 -23 -90 -58l-6 -14l-14 7c-6 3 -13 5 -20 5c-22 0 -40 -17 -44 -39l-1 -9l-9 -3c-30 -10 -50 -37 -50 -69c0 -41 33 -76 74 -76h272h4z" />
+    <glyph glyph-name="ion-ios-cloud-upload-outline" unicode="&#xf40a;" 
+d="M161 188l-11 11l74 75l75 -75l-12 -11l-55 54v-242h-16v242zM367 264c45 0 81 -39 81 -85s-37 -83 -82 -83v0h-101v16h97h4c37 0 66 30 66 67s-29 70 -66 70l-15 1v20c0 56 -46 99 -101 99c-38 0 -73 -23 -90 -58l-6 -13l-14 6c-6 3 -13 5 -20 5c-22 0 -40 -17 -44 -39
+l-1 -9l-9 -3c-30 -10 -50 -39 -50 -71c0 -41 33 -75 74 -75h91v-16h-91c-50 0 -90 40 -90 90c0 40 26 74 61 86c5 28 29 52 59 52c10 0 18 -2 26 -6c19 39 59 66 105 66c64 0 117 -52 117 -116c0 -1 -1 -3 -1 -4z" />
+    <glyph glyph-name="ion-ios-cloud-upload" unicode="&#xf40b;" 
+d="M216 0v96h16v-96h-16zM367 264c45 0 81 -39 81 -85s-37 -83 -82 -83h-134v146l55 -54l12 11l-75 75l-74 -75l11 -11l55 54v-146h-35h-31h-60c-50 0 -90 40 -90 90c0 40 26 74 61 86c5 28 29 52 59 52c10 0 18 -2 26 -6c19 39 59 66 105 66c64 0 117 -52 117 -116
+c0 -1 -1 -3 -1 -4z" />
+    <glyph glyph-name="ion-ios-cloud" unicode="&#xf40c;" 
+d="M367 215c45 0 81 -37 81 -83c0 -45 -37 -84 -82 -84h-276c-50 0 -90 42 -90 92c0 40 26 71 61 83c5 28 29 52 59 52c10 0 18 -2 26 -6c19 39 59 67 105 67c64 0 117 -53 117 -117c0 -1 -1 -3 -1 -4z" />
+    <glyph glyph-name="ion-ios-cloudy-night-outline" unicode="&#xf40d;" horiz-adv-x="384" 
+d="M125 224c-34 0 -63 -28 -63 -62v-12s1 -10 1 -10c-5 0 -12 -1 -14 -1c-19 -3 -33 -18 -33 -37c0 -10 3 -19 10 -26s16 -11 26 -11h157c27 0 49 22 49 49s-22 50 -49 50c-2 0 -4 -1 -6 -1l-14 -2l-3 14c-3 14 -11 26 -22 35s-25 14 -39 14zM125 240v0c37 0 68 -26 76 -61
+h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v8c0 43 35 78 78 78zM361 142c8 0 15 2 23 4c-4 -7 -9 -14 -14 -20c-21 -24 -50 -41 -84 -45c4 6 6 12 8 19c19 4 36 13 50 25c-18 1 -35 6 -50 13c-23 11 -42 29 -56 51
+c-14 21 -22 48 -22 75c0 15 2 30 7 44c-24 -12 -43 -33 -53 -59c-5 2 -12 4 -18 5c14 36 45 65 82 77c8 2 16 4 24 5c-5 -6 -9 -13 -12 -20c-8 -16 -12 -34 -12 -52c0 -32 12 -63 35 -86s54 -36 86 -36h6z" />
+    <glyph glyph-name="ion-ios-cloudy-night" unicode="&#xf40e;" horiz-adv-x="384" 
+d="M361 142c8 0 15 2 23 4c-4 -7 -9 -15 -14 -21c-21 -24 -50 -40 -84 -44h-3c4 10 7 21 7 32c0 22 -9 43 -24 58c-14 15 -33 23 -53 24c-6 16 -16 29 -29 40c-10 8 -20 13 -32 17v2c14 36 45 65 82 77c8 2 16 4 24 5c-5 -6 -9 -13 -12 -20c-8 -16 -12 -34 -12 -52
+c0 -32 12 -63 35 -86s54 -36 86 -36h6zM125 239v0c37 0 68 -26 76 -61h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v7c0 43 35 79 78 79z" />
+    <glyph glyph-name="ion-ios-cloudy-outline" unicode="&#xf40f;" horiz-adv-x="274" 
+d="M125 272c-34 0 -63 -28 -63 -62v-12s1 -10 1 -10c-6 0 -12 -1 -14 -1c-19 -3 -33 -18 -33 -37c0 -10 3 -19 10 -26s16 -11 26 -11h157c27 0 49 22 49 49s-22 50 -49 50c-2 0 -4 -1 -6 -1l-14 -2l-3 14c-3 14 -11 26 -22 35s-25 14 -39 14zM125 288v0c37 0 68 -26 76 -61
+h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v8c0 43 35 78 78 78z" />
+    <glyph glyph-name="ion-ios-cloudy" unicode="&#xf410;" horiz-adv-x="274" 
+d="M125 288v0c37 0 68 -26 76 -61h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v8c0 43 35 78 78 78z" />
+    <glyph glyph-name="ion-ios-cog-outline" unicode="&#xf411;" horiz-adv-x="384" 
+d="M384 175l-33 -8l-3 -14l27 -20l-12 -30l-34 5l-8 -11l17 -29l-23 -23l-29 17l-10 -7l5 -34l-29 -12l-21 27l-14 -3l-8 -33h-32l-9 33l-13 3l-21 -28l-29 12l4 34l-11 8l-30 -19l-23 23l18 31l-7 11l-35 -5l-12 29l28 22l-2 12l-35 9v32l35 9l2 12l-29 22l12 30l36 -5
+l7 10l-19 32l22 22l32 -19l11 8l-4 35l29 13l22 -29l12 2l9 35h32l9 -35l12 -2l22 28l29 -12l-5 -35l11 -8l30 18l22 -23l-17 -30l7 -10l35 5l12 -30l-28 -21l3 -13l33 -9v-32zM356 127l-26 20l6 33l32 8v7l-32 8l-6 33l26 19l-3 7l-32 -5l-19 27l17 28l-5 6l-28 -17l-28 18
+l5 34l-6 2l-20 -26l-32 6l-8 33h-7l-9 -33l-32 -6l-20 27l-7 -3l5 -34l-28 -18l-9 6l-21 12l-5 -5l18 -30l-18 -27l-33 5l-3 -7l27 -20l-6 -32l-33 -8v-7l33 -9l6 -32l-27 -20l3 -6l33 4l18 -27l-17 -29l5 -6l29 18l28 -18l-5 -33l7 -3l19 27l33 -7l8 -31h8l7 31l33 7
+l20 -26l7 3l-5 32l26 18l28 -16l5 5l-16 27l19 28l32 -4zM192 320c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128zM80 192c0 -7 1 -15 2 -22l104 28l28 104c-7 1 -15 2 -22 2c-30 0 -58 -12 -79 -33s-33 -49 -33 -79zM192 80c27 0 53 10 73 27
+l-75 75l-104 -28c6 -15 15 -29 27 -41c21 -21 49 -33 79 -33zM276 118c18 20 28 47 28 74c0 30 -12 58 -33 79c-12 12 -26 22 -42 27l-28 -105z" />
+    <glyph glyph-name="ion-ios-cog" unicode="&#xf412;" horiz-adv-x="384" 
+d="M229 298c16 -5 30 -15 42 -27c21 -21 33 -49 33 -79c0 -27 -10 -54 -28 -74l-75 75zM214 302l-28 -104l-104 -28c-1 7 -2 15 -2 22c0 30 12 58 33 79s49 33 79 33c7 0 15 -1 22 -2zM86 154l104 28l75 -75c-20 -17 -46 -27 -73 -27c-30 0 -58 12 -79 33
+c-12 12 -21 26 -27 41zM384 175l-33 -8l-3 -14l27 -20l-12 -30l-34 5l-8 -11l17 -29l-23 -23l-29 17l-10 -7l5 -34l-29 -12l-21 27l-14 -3l-8 -33h-32l-9 33l-13 3l-21 -28l-29 12l4 34l-11 8l-30 -19l-23 23l18 31l-7 11l-35 -5l-12 29l28 22l-2 12l-35 9v32l35 9l2 12
+l-29 22l12 30l36 -5l7 10l-19 32l22 22l32 -19l11 8l-4 35l29 13l22 -29l12 2l9 35h32l9 -35l12 -2l22 28l29 -12l-5 -35l11 -8l30 18l22 -23l-17 -30l7 -10l35 5l12 -30l-28 -21l3 -13l33 -9v-32zM192 64c71 0 128 57 128 128s-57 128 -128 128s-128 -57 -128 -128
+s57 -128 128 -128z" />
+    <glyph glyph-name="ion-ios-color-filter-outline" unicode="&#xf413;" horiz-adv-x="384" 
+d="M302 236c47 -13 82 -57 82 -108c0 -62 -50 -112 -112 -112c-31 0 -60 13 -80 34c-20 -21 -49 -34 -80 -34c-62 0 -112 50 -112 112c0 51 35 95 82 108c-1 7 -2 13 -2 20c0 62 50 112 112 112s112 -50 112 -112c0 -7 -1 -13 -2 -20zM96 256c0 -6 0 -12 1 -17
+c5 1 10 1 15 1c31 0 60 -13 80 -34c20 21 49 34 80 34c5 0 10 0 15 -1c1 5 1 11 1 17c0 53 -43 96 -96 96s-96 -43 -96 -96zM208 128c0 6 0 12 -1 17c-5 -1 -10 -1 -15 -1s-10 0 -15 1c-1 -5 -1 -11 -1 -17c0 -20 6 -38 16 -53c10 15 16 33 16 53zM192 160c3 0 7 1 10 1
+c-3 7 -6 14 -10 20c-4 -6 -7 -13 -10 -20c3 0 7 -1 10 -1zM166 164c4 11 9 21 16 30c-18 18 -43 30 -70 30c-3 0 -7 -1 -10 -1c10 -29 34 -51 64 -59zM202 194c7 -9 12 -19 16 -30c30 8 54 30 64 59c-3 0 -7 1 -10 1c-27 0 -52 -12 -70 -30zM112 32c27 0 52 12 70 30
+c-14 19 -22 41 -22 66c0 7 1 13 2 20c-36 10 -64 37 -76 72c-40 -11 -70 -48 -70 -92c0 -53 43 -96 96 -96zM272 32c53 0 96 43 96 96c0 44 -30 81 -70 92c-12 -35 -40 -62 -76 -72c1 -7 2 -13 2 -20c0 -25 -8 -47 -22 -66c18 -18 43 -30 70 -30z" />
+    <glyph glyph-name="ion-ios-color-filter" unicode="&#xf414;" horiz-adv-x="384" 
+d="M302 236c47 -13 82 -57 82 -108c0 -62 -50 -112 -112 -112c-31 0 -60 13 -80 34c-20 -21 -49 -34 -80 -34c-62 0 -112 50 -112 112c0 51 35 95 82 108c-1 7 -2 13 -2 20c0 62 50 112 112 112s112 -50 112 -112c0 -7 -1 -13 -2 -20zM192 53l1 -2c3 3 6 7 9 11
+c14 19 22 41 22 66c0 7 -1 13 -2 20c36 10 64 37 76 72c2 5 3 10 4 15c-1 0 -2 1 -3 1v1c-4 1 -8 1 -12 2c-5 1 -10 1 -15 1c-31 0 -60 -13 -80 -34c-20 21 -49 34 -80 34c-5 0 -10 0 -15 -1c-4 -1 -8 -1 -12 -2v-1c-1 0 -2 -1 -3 -1c1 -5 2 -10 4 -15c12 -35 40 -62 76 -72
+c-1 -7 -2 -13 -2 -20c0 -25 8 -47 22 -66c3 -4 6 -8 9 -11zM207 145c1 -5 1 -11 1 -17c0 -20 -6 -38 -16 -53c-10 15 -16 33 -16 53c0 6 0 12 1 17c5 -1 10 -1 15 -1s10 0 15 1zM282 223c-10 -29 -34 -51 -64 -59c-4 11 -9 21 -16 30c18 18 43 30 70 30c3 0 7 -1 10 -1z
+M202 161c-3 0 -7 -1 -10 -1s-7 1 -10 1c3 7 6 14 10 20c4 -6 7 -13 10 -20zM112 224c27 0 52 -12 70 -30c-7 -9 -12 -19 -16 -30c-30 8 -54 30 -64 59c3 0 7 1 10 1z" />
+    <glyph glyph-name="ion-ios-color-wand-outline" unicode="&#xf415;" horiz-adv-x="384" 
+d="M128 298l256 -256l-34 -34l-256 256zM149 232l201 -201l11 11l-201 202zM120 344v40h16v-40h-16zM120 140v40h16v-40h-16zM216 256v16h40v-16h-40zM0 256v16h40v-16h-40zM47 354l29 -29l-12 -11l-28 28zM76 198l-29 -28l-11 11l28 28zM220 342l-28 -28l-12 11l29 29z" />
+    <glyph glyph-name="ion-ios-color-wand" unicode="&#xf416;" horiz-adv-x="396" 
+d="M140 289l256 -257l-34 -34l-256 257zM124 322v64h32v-64h-32zM124 118v64h32v-64h-32zM216 238v32h64v-32h-64zM246 336l-45 -45l-23 22l45 46zM34 336l23 23l45 -46l-23 -22zM34 169l45 45l23 -22l-45 -46zM0 238v32h64v-32h-64z" />
+    <glyph glyph-name="ion-ios-compose-outline" unicode="&#xf417;" horiz-adv-x="384" 
+d="M304 32v208l16 16v-240h-320v304h256l-16 -16h-224v-272h288zM174 164l171 171l11 -11l-180 -180h-32v32l180 180l11 -11l-171 -171zM380 368c2 -3 4 -6 4 -10s-2 -7 -4 -10l-12 -12l-21 21l-11 11v0l12 12c3 2 6 4 10 4s7 -2 10 -4z" />
+    <glyph glyph-name="ion-ios-compose" unicode="&#xf418;" horiz-adv-x="384" 
+d="M192 128l128 128v-240h-320v304h256l-128 -128v-64h64zM324 356l32 -32l-180 -180h-32v32zM380 368c2 -3 4 -6 4 -10s-2 -7 -4 -10l-12 -12l-21 21l-11 11v0l12 12c3 2 6 4 10 4s7 -2 10 -4z" />
+    <glyph glyph-name="ion-ios-contact-outline" unicode="&#xf419;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 383c-105 0 -191 -86 -191 -191c0 -47 17 -89 45 -122c18 8 62 24 90 32c2 1 3 0 3 10c0 11 -1 18 -4 24c-4 8 -7 20 -9 31c-4 5 -10 15 -14 33c-3 16 -1 22 1 28v2
+c1 4 0 23 -3 38c-2 10 1 34 15 52c9 12 27 26 58 28h18c32 -2 49 -16 58 -28c14 -18 17 -42 15 -52c-3 -15 -4 -34 -3 -38c0 0 1 -1 1 -2c2 -6 3 -12 0 -28c-4 -18 -10 -27 -14 -32c-2 -11 -5 -24 -9 -32c-3 -7 -6 -15 -6 -23c0 -10 0 -10 2 -11c27 -8 73 -24 93 -32
+c28 33 45 76 45 122c0 105 -86 191 -191 191z" />
+    <glyph glyph-name="ion-ios-contact" unicode="&#xf41a;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c59 0 111 27 146 69c-20 8 -66 24 -93 32c-2 1 -3 1 -3 11c0 8 4 16 7 23c4 8 7 21 9 32c4 5 10 14 14 32c3 16 2 22 0 28c0 0 -1 1 -1 2c-1 4 0 23 3 38c2 10 -1 34 -15 52
+c-9 12 -26 26 -58 28h-18c-31 -2 -49 -16 -58 -28c-14 -18 -17 -42 -15 -52c3 -15 4 -34 3 -38v-2c-2 -6 -4 -12 -1 -28c4 -18 10 -28 14 -33c2 -11 5 -23 9 -31c3 -6 4 -13 4 -24c0 -10 -1 -9 -3 -10c-28 -8 -72 -24 -90 -32c35 -42 87 -69 146 -69z" />
+    <glyph glyph-name="ion-ios-copy-outline" unicode="&#xf41b;" horiz-adv-x="288" 
+d="M192 352v-64h64v-16h-80v80h16zM213 384l75 -75v-261h-48v-48h-240v336h48v48h165zM224 16v32h-176v272h-32v-304h208zM272 64v238l-65 66h-143v-304h208z" />
+    <glyph glyph-name="ion-ios-copy" unicode="&#xf41c;" horiz-adv-x="288" 
+d="M32 32h16h192v-32h-240v336h32v-288v-16zM213 384l75 -75v-261h-48h-192v288v48h165zM256 272v16h-64v64h-16v-80h80z" />
+    <glyph glyph-name="ion-ios-crop-strong" unicode="&#xf41d;" horiz-adv-x="384" 
+d="M64 336v48h32v-48h-32zM96 96h176v-32h-208v208h32v-176zM336 64v32h48v-32h-48zM0 320h320v-320h-32v288h-288v32z" />
+    <glyph glyph-name="ion-ios-crop" unicode="&#xf41e;" horiz-adv-x="384" 
+d="M64 336v48h16v-48h-16zM80 80h208v-16h-224v224h16v-208zM336 64v16h48v-16h-48zM0 320h320v-320h-16v304h-304v16z" />
+    <glyph glyph-name="ion-ios-download-outline" unicode="&#xf41f;" horiz-adv-x="320" 
+d="M192 304h128v-304h-320v304h128v-16h-112v-272h288v272h-112v16zM97 196l55 -55v243h16v-243l55 55l11 -12l-74 -74l-74 74z" />
+    <glyph glyph-name="ion-ios-download" unicode="&#xf420;" horiz-adv-x="320" 
+d="M168 304h152v-304h-320v304h152v-163l-55 55l-11 -12l74 -74l74 74l-11 12l-55 -55v163zM152 304v80h16v-80h-16z" />
+    <glyph glyph-name="ion-ios-drag" unicode="&#xf421;" horiz-adv-x="352" 
+d="M0 128v16h352v-16h-352zM0 184v16h352v-16h-352zM0 240v16h352v-16h-352z" />
+    <glyph glyph-name="ion-ios-email-outline" unicode="&#xf422;" horiz-adv-x="384" 
+d="M0 320h384v-256h-384v256zM192 180l163 124h-326zM16 80h352v214l-115 -88l68 -77l-2 -2l-79 70l-48 -37l-48 37l-79 -70l-2 2l68 77l-115 88v-214z" />
+    <glyph glyph-name="ion-ios-email" unicode="&#xf423;" horiz-adv-x="384" 
+d="M384 64h-384v242l131 -100l-68 -77l2 -2l79 70l48 -37l48 37l79 -70l2 2l-68 77l131 100v-242zM376 320l-184 -140l-184 140h368z" />
+    <glyph glyph-name="ion-ios-eye-outline" unicode="&#xf424;" horiz-adv-x="384" 
+d="M383 192l1 -1l-6 -6c-21 -21 -47 -48 -78 -69c-36 -24 -72 -36 -108 -36c-83 0 -130 49 -185 105l-7 7l1 1c39 40 67 64 94 81c32 20 63 30 97 30c83 0 146 -60 191 -112zM192 288c-62 0 -111 -36 -170 -96c24 -24 48 -50 76 -68c30 -20 60 -28 94 -28
+c75 0 133 56 171 95c-26 29 -50 50 -74 66c-32 21 -64 31 -97 31zM192 112c-44 0 -80 36 -80 80s36 80 80 80s80 -36 80 -80s-36 -80 -80 -80zM192 256c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64zM224 192h16v0c0 -26 -22 -48 -48 -48s-48 21 -48 48
+s22 48 48 48v-16c-16 0 -32 -13 -32 -31s15 -33 32 -33s32 14 32 32v0z" />
+    <glyph glyph-name="ion-ios-eye" unicode="&#xf425;" horiz-adv-x="384" 
+d="M383 192l1 -1l-6 -6c-21 -21 -47 -48 -78 -69c-36 -24 -72 -36 -108 -36c-83 0 -130 49 -185 105l-7 7l1 1c39 40 67 64 94 81c32 20 63 30 97 30c83 0 146 -60 191 -112zM192 112c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80zM186 221
+c0 -19 16 -35 35 -35c7 0 14 2 19 6v0c0 -27 -22 -48 -48 -48s-48 21 -48 48s22 48 48 48c-4 -5 -6 -12 -6 -19z" />
+    <glyph glyph-name="ion-ios-fastforward-outline" unicode="&#xf426;" 
+d="M16 293v-202l184 101zM240 292v0v-78v-27v-95l176 100zM224 320v0l224 -128l-224 -128v123l-224 -123v256l224 -123v123z" />
+    <glyph glyph-name="ion-ios-fastforward" unicode="&#xf427;" 
+d="M224 320v0l224 -128l-224 -128v123l-224 -123v256l224 -123v123z" />
+    <glyph glyph-name="ion-ios-filing-outline" unicode="&#xf428;" horiz-adv-x="352" 
+d="M288 320l64 -96v-160h-176h-176v160l64 96h224zM333 224l-45 68v-68h45zM80 304v-80h48c0 -26 22 -48 48 -48s48 22 48 48h48v80h-192zM64 292l-45 -68h45v68zM336 80v128h-98c-7 -28 -32 -48 -62 -48s-55 20 -62 48h-98v-128h160h160z" />
+    <glyph glyph-name="ion-ios-filing" unicode="&#xf429;" horiz-adv-x="352" 
+d="M176 160c30 0 55 20 62 48h114v-144h-176h-176v144h114c7 -28 32 -48 62 -48zM64 224h-7h-57l64 96v0v-80h16v80h192v-80h16v80v0l64 -96h-56h-8h-16h-8h-40c0 -26 -22 -48 -48 -48s-48 22 -48 48h-39h-9h-16z" />
+    <glyph glyph-name="ion-ios-film-outline" unicode="&#xf42a;" horiz-adv-x="400" 
+d="M0 360h400v-336h-400v336zM72 40v48h-56v-48h56zM72 104v48h-56v-48h56zM72 168v48h-56v-48h56zM72 232v48h-56v-48h56zM72 296v48h-56v-48h56zM312 40v144h-224v-144h224zM312 200v144h-224v-144h224zM384 40v48h-56v-48h56zM384 104v48h-56v-48h56zM384 168v48h-56v-48
+h56zM384 232v48h-56v-48h56zM384 296v48h-56v-48h56z" />
+    <glyph glyph-name="ion-ios-film" unicode="&#xf42b;" horiz-adv-x="400" 
+d="M0 360h400v-336h-400v336zM72 40v48h-56v-48h56zM72 104v48h-56v-48h56zM72 168v48h-56v-48h56zM72 232v48h-56v-48h56zM72 296v48h-56v-48h56zM312 184v16h-224v-16h224zM384 40v48h-56v-48h56zM384 104v48h-56v-48h56zM384 168v48h-56v-48h56zM384 232v48h-56v-48h56z
+M384 296v48h-56v-48h56z" />
+    <glyph glyph-name="ion-ios-flag-outline" unicode="&#xf42c;" horiz-adv-x="256" 
+d="M240 336c6 1 11 1 16 2v-16v-157c-5 -1 -10 -1 -16 -2c-11 -1 -24 -3 -39 -3c-25 0 -47 4 -69 9s-42 13 -64 13c-30 0 -46 -5 -52 -7v-143h-16v142v162v2l3 3c2 1 18 11 65 11c24 0 45 -4 67 -9c21 -4 42 -11 65 -11c15 0 29 3 40 4zM240 179v0v141c-11 -1 -25 -4 -40 -4
+c-25 0 -46 6 -68 11s-42 9 -64 9c-30 0 -46 -5 -52 -7v-137c10 3 26 6 52 6c24 0 45 -8 67 -13c21 -4 43 -9 66 -9c15 0 28 2 39 3z" />
+    <glyph glyph-name="ion-ios-flag" unicode="&#xf42d;" horiz-adv-x="256" 
+d="M240 336c6 1 11 1 16 2v-16v-157c-5 -1 -10 -1 -16 -2c-11 -1 -24 -3 -39 -3c-25 0 -47 4 -69 9s-42 13 -64 13c-30 0 -46 -5 -52 -7v-143h-16v142v162v2l3 3c2 1 18 11 65 11c24 0 45 -4 67 -9c21 -4 42 -11 65 -11c15 0 29 3 40 4z" />
+    <glyph glyph-name="ion-ios-flame-outline" unicode="&#xf42e;" horiz-adv-x="256" 
+d="M96 416c87 -64 170 -179 159 -288c-13 -134 -104 -160 -127 -160s-127 40 -128 160c-1 146 122 143 96 288zM128 -24c0 0 40 36 40 80s-40 80 -40 80s-41 -36 -41 -80s41 -80 41 -80zM239 130c5 47 -10 99 -41 151c-22 36 -50 70 -83 99c0 -57 -24 -91 -49 -123
+c-26 -34 -50 -65 -50 -129c0 -25 5 -48 15 -68c8 -17 20 -32 35 -45c8 -7 16 -12 23 -16c-9 16 -18 35 -18 57c0 51 44 90 46 92l11 9l11 -9c2 -2 45 -41 45 -92c0 -23 -9 -44 -19 -60c7 4 13 8 20 14c14 12 25 27 34 44c11 21 17 47 20 76z" />
+    <glyph glyph-name="ion-ios-flame" unicode="&#xf42f;" horiz-adv-x="256" 
+d="M96 416c87 -64 170 -179 159 -288c-13 -134 -104 -160 -127 -160s-127 40 -128 160c-1 146 122 143 96 288zM128 -24c0 0 40 36 40 80s-40 80 -40 80s-41 -36 -41 -80s41 -80 41 -80z" />
+    <glyph glyph-name="ion-ios-flask-outline" unicode="&#xf430;" horiz-adv-x="384" 
+d="M373 78c8 -16 11 -32 11 -46c-1 -36 -27 -64 -63 -64h-256c-36 0 -64 27 -65 64c0 14 4 30 12 46l116 195v127h-16v16h16h16v-16v-16h48v-16h-48v-32h32v-16h-32v-32h48v-16h-48v-3l-2 -4l-15 -25h49v-16h-58l-92 -154c-13 -25 -14 -43 -2 -63c9 -14 23 -23 41 -23h256
+c17 0 33 8 41 22c5 8 6 17 6 26c0 12 -2 25 -9 38l-116 195l-3 4v131v16h16h16v-16h-16v-127zM44 73l72 119h153l72 -119c7 -11 10 -24 10 -33c-1 -24 -16 -40 -46 -40h-226c-30 0 -46 12 -46 40c0 9 4 22 11 33zM260 176h-135l-67 -111v0v0c-5 -8 -9 -19 -9 -25
+c0 -13 5 -17 6 -18c4 -4 13 -6 24 -6h226c10 0 18 3 23 7c4 4 7 10 7 18c0 6 -3 16 -8 24v0v0z" />
+    <glyph glyph-name="ion-ios-flask" unicode="&#xf431;" horiz-adv-x="384" 
+d="M327 65v0c5 -8 8 -18 8 -24c0 -8 -3 -14 -7 -18c-5 -4 -13 -7 -23 -7h-226c-11 0 -20 2 -24 6c-1 1 -6 5 -6 18c0 6 4 17 9 25v0v0l67 111h135l67 -111v0zM373 78c8 -16 11 -32 11 -46c-1 -36 -27 -64 -63 -64h-256c-36 0 -64 27 -65 64c0 14 4 30 12 46l116 195v127h-16
+v16h160v-16h-16v-127zM144 384v-16h48v16h-48zM144 336v-16h32v16h-32zM144 288v-16h48v16h-48zM127 240l-9 -16h58v16h-49zM351 40c0 9 -3 22 -10 33l-72 119h-154l-71 -119c-7 -11 -11 -24 -11 -33c0 -28 16 -40 46 -40h226c30 0 45 16 46 40z" />
+    <glyph glyph-name="ion-ios-flower-outline" unicode="&#xf432;" 
+d="M363 164c-29 0 -65 7 -93 14c-1 -3 -2 -6 -4 -9c25 -15 56 -36 76 -56c40 -40 53 -68 41 -80c-3 -3 -7 -4 -12 -4c-15 0 -38 15 -68 45c-20 20 -41 51 -56 76c-3 -2 -7 -3 -10 -4c7 -28 15 -64 15 -93c0 -56 -12 -85 -28 -85s-28 29 -28 85c0 29 8 65 15 93
+c-3 1 -7 2 -10 4c-15 -25 -36 -56 -56 -76c-30 -30 -53 -45 -68 -45c-5 0 -9 1 -12 4c-12 12 1 40 41 80c20 20 51 41 76 56c-2 3 -3 6 -4 9c-28 -7 -64 -14 -93 -14c-56 0 -85 12 -85 28s29 28 85 28c29 0 65 -8 93 -15c1 3 2 7 4 10c-25 15 -56 35 -76 55
+c-40 40 -53 68 -41 80c3 3 7 4 12 4c15 0 38 -14 68 -44c20 -20 41 -51 56 -76c3 2 7 3 10 4c-7 28 -15 64 -15 93c0 56 12 85 28 85s28 -29 28 -85c0 -29 -8 -65 -15 -93c3 -1 7 -2 10 -4c15 25 36 56 56 76c30 30 53 44 68 44c5 0 9 -1 12 -4c12 -12 -1 -40 -41 -80
+c-20 -20 -51 -40 -76 -55c2 -3 3 -7 4 -10c28 7 64 15 93 15c56 0 85 -12 85 -28s-29 -28 -85 -28zM288 193v-3c30 -7 56 -10 75 -10c21 0 39 2 52 5c10 3 14 6 16 7c-2 1 -6 4 -16 7c-13 3 -31 5 -52 5c-19 0 -45 -4 -75 -11zM314 299c-14 -14 -30 -35 -46 -61l2 -2
+c26 16 47 32 61 46c15 15 26 28 33 40c5 9 7 14 7 16c-4 0 -22 -4 -57 -39zM178 236l2 2c-16 26 -32 47 -46 61c-35 35 -53 39 -57 39c0 -2 2 -7 7 -16c7 -12 18 -25 33 -40c14 -14 35 -30 61 -46zM85 180c19 0 45 3 75 10v3c-30 7 -56 11 -75 11c-21 0 -39 -2 -52 -5
+c-10 -3 -14 -6 -16 -7c2 -1 5 -4 15 -7c13 -3 32 -5 53 -5zM134 85c14 14 30 35 46 61l-2 2c-26 -16 -47 -32 -61 -46c-15 -15 -26 -29 -33 -41c-5 -9 -7 -14 -7 -16c4 0 22 5 57 40zM270 148l-2 -2c16 -26 32 -47 46 -61c35 -35 53 -40 57 -40c0 2 -2 7 -7 16
+c-7 12 -18 26 -33 41c-14 14 -35 30 -61 46zM217 383c-3 -13 -5 -31 -5 -52c0 -19 4 -45 11 -75h2c7 30 11 56 11 75c0 21 -2 39 -5 52c-3 10 -6 14 -7 16c-1 -2 -4 -6 -7 -16zM231 0c3 13 5 32 5 53c0 19 -4 45 -11 75h-2c-7 -30 -11 -56 -11 -75c0 -21 2 -40 5 -53
+c3 -10 6 -13 7 -15c1 2 4 5 7 15zM224 160c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM313 42c10 -34 7 -53 -5 -58c-2 -1 -3 -1 -5 -1c-11 0 -25 13 -37 35c5 35 -2 76 -2 76s24 -34 49 -52zM302 -1c1 4 2 14 -3 34c-5 4 -10 9 -15 14
+c0 -9 0 -17 -1 -25c10 -16 16 -22 19 -23zM182 365c-6 -35 1 -75 1 -75s-27 35 -48 51c-10 35 -7 54 5 59c2 1 3 1 5 1c11 0 24 -12 37 -36zM164 337c0 9 0 17 1 25c-10 16 -16 21 -19 22c-1 -4 -2 -14 3 -34c5 -4 10 -8 15 -13zM50 149c35 -4 76 2 76 2s-34 -24 -51 -48
+c-12 -4 -26 -6 -35 -6c-13 0 -21 4 -24 11c-5 11 7 25 34 41zM66 117c4 5 8 10 13 15c-9 0 -17 0 -25 1c-16 -10 -21 -16 -22 -19c1 0 4 -1 8 -1c7 0 16 1 26 4zM432 276c5 -11 -7 -26 -34 -42c-35 5 -76 -2 -76 -2s33 25 51 49c13 4 26 5 35 5c13 0 21 -3 24 -10zM394 250
+c16 10 21 16 22 19c-1 0 -4 1 -8 1c-7 0 -16 -1 -26 -4c-4 -5 -8 -9 -13 -14c9 0 17 -1 25 -2zM131 39c31 24 53 55 53 55s-7 -39 -3 -71c-15 -26 -28 -39 -39 -39c-2 0 -4 0 -6 1c-11 5 -13 24 -5 54zM143 1c4 2 12 8 22 26c0 6 -1 13 -1 20c-6 -6 -13 -12 -19 -17
+c-4 -18 -3 -26 -2 -29zM312 398c11 -5 13 -22 5 -54c-29 -21 -53 -55 -53 -55s8 48 3 71c13 25 28 39 39 39c2 0 4 0 6 -1zM303 353c5 18 3 27 2 30c-4 -2 -12 -8 -22 -26c0 -6 1 -14 1 -21c6 6 13 12 19 17zM71 285c18 -24 55 -53 55 -53s-40 7 -70 3c-28 15 -43 32 -38 44
+c3 7 10 11 22 11c8 0 21 -1 31 -5zM33 273c2 -4 8 -12 26 -22c6 0 13 1 20 1c-6 6 -12 12 -17 18c-8 2 -16 4 -22 4c-4 0 -6 -1 -7 -1zM392 149c30 -17 43 -33 38 -45c-3 -7 -10 -10 -22 -10c-8 0 -19 1 -31 5c-20 27 -55 52 -55 52s45 -8 70 -2zM408 110c4 0 6 1 7 1
+c-2 4 -8 12 -26 22c-6 0 -13 -1 -20 -1c6 -6 12 -13 17 -19c8 -2 16 -3 22 -3z" />
+    <glyph glyph-name="ion-ios-flower" unicode="&#xf433;" 
+d="M363 220c56 0 85 -12 85 -28s-29 -28 -85 -28c-29 0 -65 7 -93 14c-1 -3 -2 -6 -4 -9c25 -15 56 -36 76 -56c40 -40 53 -68 41 -80s-40 1 -80 41c-20 20 -41 51 -56 76c-3 -2 -7 -3 -10 -4c7 -28 15 -64 15 -93c0 -56 -12 -85 -28 -85s-28 29 -28 85c0 29 8 65 15 93
+c-3 1 -7 2 -10 4c-15 -25 -36 -56 -56 -76c-40 -40 -68 -53 -80 -41s1 40 41 80c20 20 51 41 76 56c-2 3 -3 6 -4 9c-28 -7 -64 -14 -93 -14c-56 0 -85 12 -85 28s29 28 85 28c29 0 65 -8 93 -15c1 3 2 7 4 10c-25 15 -56 35 -76 55c-40 40 -53 68 -41 80s40 0 80 -40
+c20 -20 41 -51 56 -76c3 2 6 3 9 4c-7 28 -14 64 -14 93c0 56 12 85 28 85s28 -29 28 -85c0 -29 -7 -65 -14 -93c3 -1 6 -2 9 -4c15 25 36 56 56 76c40 40 68 52 80 40s-1 -40 -41 -80c-20 -20 -51 -40 -76 -55c2 -3 3 -7 4 -10c28 7 64 15 93 15zM264 94c0 0 24 -34 49 -52
+c10 -34 7 -53 -5 -58c-2 -1 -3 -1 -5 -1c-11 0 -25 13 -37 35c5 35 -2 76 -2 76zM183 290c0 0 -27 35 -48 51c-10 35 -7 54 5 59c2 1 3 1 5 1c11 0 24 -12 37 -36c-6 -35 1 -75 1 -75zM126 151c0 0 -34 -24 -51 -48c-12 -4 -26 -6 -35 -6c-13 0 -21 4 -24 11
+c-5 11 7 25 34 41c35 -4 76 2 76 2zM322 232c0 0 33 25 51 49c13 4 26 5 35 5c13 0 21 -3 24 -10c5 -11 -7 -26 -34 -42c-35 5 -76 -2 -76 -2zM131 39c31 24 53 55 53 55s-7 -39 -3 -71c-15 -26 -28 -39 -39 -39c-2 0 -4 0 -6 1c-11 5 -13 24 -5 54zM317 344
+c-29 -21 -53 -55 -53 -55s8 48 3 71c13 25 28 39 39 39c2 0 4 0 6 -1c11 -5 13 -22 5 -54zM56 235c-28 15 -43 32 -38 44c3 7 10 11 22 11c8 0 21 -1 31 -5c18 -24 55 -53 55 -53s-40 7 -70 3zM392 149c30 -17 43 -33 38 -45c-3 -7 -10 -10 -22 -10c-8 0 -19 1 -31 5
+c-20 27 -55 52 -55 52s45 -8 70 -2z" />
+    <glyph glyph-name="ion-ios-folder-outline" unicode="&#xf434;" 
+d="M425 352c13 0 23 -10 23 -23v-304c0 -14 -10 -25 -23 -25h-400c-13 0 -25 12 -25 25v336c0 13 11 23 25 23h112c8 0 12 -2 17 -7v0l23 -23c2 -2 3 -2 6 -2h242zM25 368c-4 0 -9 -3 -9 -7v-74c3 1 5 1 8 1h400c3 0 5 0 8 -1v42c0 4 -3 7 -7 7h-242c-7 0 -12 2 -17 7
+l-23 23c-2 2 -3 2 -6 2h-112zM432 25v239c0 4 -4 8 -8 8h-400c-4 0 -8 -4 -8 -8v-239c0 -4 5 -9 9 -9h400c4 0 7 5 7 9z" />
+    <glyph glyph-name="ion-ios-folder" unicode="&#xf435;" 
+d="M440 272c4 0 8 -4 8 -8v-239c0 -14 -10 -25 -23 -25h-400c-13 0 -25 12 -25 25v239c0 4 4 8 8 8h432zM425 352c13 0 23 -10 23 -23v-42c-3 1 -5 1 -8 1h-432c-3 0 -5 0 -8 -1v74c0 13 11 23 25 23h112c8 0 12 -2 17 -7v0l23 -23c2 -2 3 -2 6 -2h242z" />
+    <glyph glyph-name="ion-ios-football-outline" unicode="&#xf436;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM249 6c3 1 5 1 8 2l24 64l-20 39v1h-106l-20 -39l25 -65c2 -1 5 -1 7 -2c12 -3 25 -5 38 -5c14 0 30 2 44 5zM41 284c-15 -27 -23 -57 -24 -89l43 37v0zM142 371
+c-36 -14 -68 -38 -90 -69l22 -64l5 -2l49 -23l71 60v58zM277 201l-70 58l-69 -58v-1l18 -72h104l18 72zM399 195c-1 32 -9 63 -24 90l-19 -53v0zM364 302c-22 31 -54 56 -90 69l-58 -40v-58l71 -60l54 24zM18 175c3 -34 15 -66 33 -92l70 -1l21 39l-20 77l-1 1l-49 22z
+M295 82l70 1c18 26 30 58 33 92l-54 46l-50 -23l-20 -77zM207 345l47 32c-15 4 -30 6 -46 6s-32 -2 -47 -6zM118 66l-54 1c20 -23 46 -42 75 -53l-20 50zM277 14c29 11 55 30 75 53l-56 -1l-2 -3z" />
+    <glyph glyph-name="ion-ios-football" unicode="&#xf437;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM249 6c3 1 5 1 8 2l24 64l-20 39v1h-106l-20 -39l25 -65c2 -1 5 -1 7 -2c12 -3 25 -5 38 -5c14 0 30 2 44 5zM142 371c-36 -14 -68 -38 -90 -69l22 -64l5 -2l49 -23l71 60v58z
+M364 302c-22 31 -54 56 -90 69l-58 -40v-58l71 -60l54 24zM18 175c3 -34 15 -66 33 -92l70 -1l21 39l-20 77l-1 1l-49 22zM295 82l70 1c18 26 30 58 33 92l-54 46l-50 -23l-20 -77z" />
+    <glyph glyph-name="ion-ios-game-controller-a-outline" unicode="&#xf438;" 
+d="M163 208c3 0 5 -2 5 -5v-22c0 -3 -2 -5 -5 -5h-35v-35c0 -3 -3 -5 -6 -5h-21c-3 0 -5 2 -5 5v35h-35c-3 0 -5 3 -5 6v21c0 3 2 5 5 5h35v35c0 3 2 5 5 5h22c3 0 5 -2 5 -5v-35h35zM330 169c11 0 20 -8 20 -19s-9 -19 -20 -19s-19 8 -19 19s8 19 19 19zM288 211
+c11 0 19 -8 19 -19s-8 -19 -19 -19s-20 8 -20 19s9 19 20 19zM373 211c11 0 19 -8 19 -19s-8 -19 -19 -19s-20 8 -20 19s9 19 20 19zM330 253c11 0 20 -8 20 -19s-9 -20 -20 -20s-19 9 -19 20s8 19 19 19zM337 286h-226c-26 0 -49 -9 -67 -26s-28 -41 -28 -67s10 -51 28 -68
+s41 -27 67 -27h226c26 0 49 10 67 27s28 42 28 68s-10 50 -28 67s-41 26 -67 26zM337 302v0c61 0 111 -45 111 -109s-50 -111 -111 -111h-226c-61 0 -111 47 -111 111s50 109 111 109h226z" />
+    <glyph glyph-name="ion-ios-game-controller-a" unicode="&#xf439;" 
+d="M337 302c61 0 111 -45 111 -109s-50 -111 -111 -111h-226c-61 0 -111 47 -111 111s50 109 111 109h226zM168 181v0v22c0 3 -2 5 -5 5h-35v35c0 3 -2 5 -5 5h-22c-3 0 -5 -2 -5 -5v-35h-35c-3 0 -5 -2 -5 -5v-21c0 -3 2 -6 5 -6h35v-35c0 -3 2 -5 5 -5h21c3 0 6 2 6 5v35
+h35c3 0 5 2 5 5zM288 173c11 0 19 8 19 19s-8 19 -19 19s-20 -8 -20 -19s9 -19 20 -19zM330 131c11 0 20 8 20 19s-9 19 -20 19s-19 -8 -19 -19s8 -19 19 -19zM330 214c11 0 20 9 20 20s-9 19 -20 19s-19 -8 -19 -19s8 -20 19 -20zM373 173c11 0 19 8 19 19s-8 19 -19 19
+s-20 -8 -20 -19s9 -19 20 -19z" />
+    <glyph glyph-name="ion-ios-game-controller-b-outline" unicode="&#xf43a;" 
+d="M276 244c11 0 20 -9 20 -20s-9 -20 -20 -20s-20 9 -20 20s9 20 20 20zM320 200c11 0 20 -9 20 -20s-9 -20 -20 -20s-20 9 -20 20s9 20 20 20zM103 264c22 0 39 -18 39 -40s-17 -40 -39 -40s-39 18 -39 40s17 40 39 40zM103 205c11 0 19 8 19 19s-8 19 -19 19
+s-19 -8 -19 -19s8 -19 19 -19zM320 288c11 0 20 -9 20 -20s-9 -20 -20 -20s-20 9 -20 20s9 20 20 20zM364 244c11 0 20 -9 20 -20s-9 -20 -20 -20s-20 9 -20 20s9 20 20 20zM434 199c21 -88 18 -152 -7 -164c-4 -2 -9 -3 -13 -3c-22 0 -45 24 -68 52c-26 32 -32 33 -110 33
+h-24c-78 0 -84 -1 -110 -33c-23 -28 -46 -52 -68 -52c-4 0 -9 1 -13 3c-25 12 -28 76 -7 164s43 136 88 149c10 3 18 4 26 4c28 0 47 -15 96 -15s68 15 96 15c8 0 16 -1 26 -4c45 -13 67 -61 88 -149zM420 49c10 5 23 48 -1 146c-21 90 -43 128 -78 138c-8 2 -14 3 -21 3
+c-10 0 -19 -2 -30 -5c-16 -4 -36 -10 -66 -10s-50 6 -66 10c-11 3 -20 5 -30 5c-7 0 -13 -1 -21 -3c-35 -10 -57 -48 -78 -138c-24 -98 -11 -141 -1 -146c2 -1 4 -1 6 -1c6 0 14 4 23 12s19 18 32 34s24 28 44 34c17 5 38 5 79 5h24c41 0 62 0 79 -5c20 -6 31 -18 44 -34
+s23 -26 32 -34s17 -12 23 -12c2 0 4 0 6 1z" />
+    <glyph glyph-name="ion-ios-game-controller-b" unicode="&#xf43b;" 
+d="M103 243c11 0 19 -8 19 -19s-8 -19 -19 -19s-19 8 -19 19s8 19 19 19zM434 199c21 -88 18 -152 -7 -164c-4 -2 -9 -3 -13 -3c-22 0 -45 24 -68 52c-26 32 -32 33 -110 33h-24c-78 0 -84 -1 -110 -33c-23 -28 -46 -52 -68 -52c-4 0 -9 1 -13 3c-25 12 -28 76 -7 164
+s43 136 88 149c10 3 18 4 26 4c28 0 47 -15 96 -15s68 15 96 15c8 0 16 -1 26 -4c45 -13 67 -61 88 -149zM103 184c22 0 39 18 39 40s-17 40 -39 40s-39 -18 -39 -40s17 -40 39 -40zM276 204c11 0 20 9 20 20s-9 20 -20 20s-20 -9 -20 -20s9 -20 20 -20zM320 160
+c11 0 20 9 20 20s-9 20 -20 20s-20 -9 -20 -20s9 -20 20 -20zM320 248c11 0 20 9 20 20s-9 20 -20 20s-20 -9 -20 -20s9 -20 20 -20zM364 204c11 0 20 9 20 20s-9 20 -20 20s-20 -9 -20 -20s9 -20 20 -20z" />
+    <glyph glyph-name="ion-ios-gear-outline" unicode="&#xf43c;" horiz-adv-x="384" 
+d="M193 288c26 0 50 -10 68 -28s28 -42 28 -68s-10 -50 -28 -68s-42 -28 -68 -28s-50 10 -68 28s-28 42 -28 68s10 50 28 68s42 28 68 28zM193 112c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80zM138 365c-10 -3 -20 -7 -30 -12c2 -8 1 -16 0 -24
+c-2 -13 -8 -25 -18 -35c-12 -12 -29 -19 -46 -19c-4 0 -9 0 -13 1c-5 -10 -9 -20 -12 -30c7 -4 12 -10 17 -17c8 -11 12 -24 12 -37s-4 -26 -12 -37c-5 -7 -10 -13 -17 -17c3 -10 7 -20 12 -30c4 1 9 1 13 1c17 0 34 -7 46 -19c10 -10 16 -22 18 -35c1 -8 2 -16 0 -24
+c10 -5 20 -9 30 -12c4 7 10 12 17 17c11 8 24 12 37 12s26 -4 37 -12c7 -5 13 -10 17 -17c10 3 20 7 30 12c-2 8 -1 16 0 24c2 13 8 25 18 35c12 12 29 19 46 19c4 0 9 0 13 -1c5 10 9 20 12 30c-7 4 -12 10 -17 17c-8 11 -12 24 -12 37s4 26 12 37c5 7 10 13 17 17
+c-3 10 -7 20 -12 30c-4 -1 -9 -1 -13 -1c-17 0 -34 7 -46 19c-10 10 -16 22 -18 35c-1 8 -2 16 0 24c-10 5 -20 9 -30 12c-4 -7 -10 -12 -17 -17c-11 -8 -24 -12 -37 -12s-26 4 -37 12c-7 5 -13 10 -17 17zM238 384v0c20 -5 40 -13 57 -24c-8 -18 -5 -40 10 -55
+c10 -10 22 -14 35 -14c7 0 14 1 20 4c11 -17 19 -37 24 -57c-19 -7 -32 -25 -32 -46s14 -39 32 -46c-5 -20 -13 -40 -24 -57c-6 3 -13 4 -20 4c-13 0 -25 -4 -35 -14c-15 -15 -18 -37 -10 -55c-17 -11 -37 -19 -57 -24c-7 18 -25 32 -46 32s-39 -14 -46 -32
+c-20 5 -40 13 -57 24c8 18 5 40 -10 55c-10 10 -22 14 -35 14c-7 0 -14 -1 -20 -4c-11 17 -19 37 -24 57c18 7 32 25 32 46s-13 39 -32 46c5 20 13 40 24 57c6 -3 13 -4 20 -4c13 0 25 4 35 14c15 15 18 37 10 55c17 11 37 19 57 24c7 -19 25 -32 46 -32s39 13 46 32z" />
+    <glyph glyph-name="ion-ios-gear" unicode="&#xf43d;" horiz-adv-x="384" 
+d="M352 192c0 -21 14 -39 32 -46c-5 -20 -13 -40 -24 -57c-6 3 -13 4 -20 4c-13 0 -25 -4 -35 -14c-15 -15 -18 -37 -10 -55c-17 -11 -37 -19 -57 -24c-7 18 -25 32 -46 32s-39 -14 -46 -32c-20 5 -40 13 -57 24c8 18 5 40 -10 55c-10 10 -22 14 -35 14c-7 0 -14 -1 -20 -4
+c-11 17 -19 37 -24 57c18 7 32 25 32 46s-13 39 -32 46c5 20 13 40 24 57c6 -3 13 -4 20 -4c13 0 25 4 35 14c15 15 18 37 10 55c17 11 37 19 57 24c7 -19 25 -32 46 -32s39 13 46 32c20 -5 40 -13 57 -24c-8 -18 -5 -40 10 -55c10 -10 22 -14 35 -14c7 0 14 1 20 4
+c11 -17 19 -37 24 -57c-19 -7 -32 -25 -32 -46zM193 112c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80z" />
+    <glyph glyph-name="ion-ios-glasses-outline" unicode="&#xf43e;" 
+d="M433 201v0h15v-18h-15c-2 -22 -13 -43 -29 -58c-17 -16 -39 -25 -62 -25c-51 0 -92 41 -92 92v0v0c0 10 -12 22 -26 22s-26 -12 -26 -22v0v0c0 -51 -41 -92 -92 -92c-23 0 -45 9 -62 25c-16 15 -27 36 -29 58h-15v18h15c2 22 13 43 29 59c17 16 39 24 62 24
+c42 0 78 -27 89 -67c7 7 18 12 29 12s22 -5 29 -12c11 40 47 67 89 67c23 0 45 -9 62 -25c16 -15 27 -36 29 -58zM342 115c42 0 77 35 77 77s-35 77 -77 77s-77 -35 -77 -77s35 -77 77 -77zM106 115c42 0 77 35 77 77s-35 77 -77 77s-77 -35 -77 -77s35 -77 77 -77z" />
+    <glyph glyph-name="ion-ios-glasses" unicode="&#xf43f;" 
+d="M433 201v0h15v-18h-15c-2 -22 -13 -43 -29 -58c-17 -16 -39 -25 -62 -25c-51 0 -92 41 -92 92v0v0c0 10 -12 22 -26 22s-26 -12 -26 -22v0v0c0 -51 -41 -92 -92 -92c-23 0 -45 9 -62 25c-16 15 -27 36 -29 58h-15v18h15c2 22 13 43 29 59c17 16 39 24 62 24
+c42 0 78 -27 89 -67c7 7 18 12 29 12s22 -5 29 -12c11 40 47 67 89 67c23 0 45 -9 62 -25c16 -15 27 -36 29 -58z" />
+    <glyph glyph-name="ion-ios-grid-view-outline" unicode="&#xf440;" horiz-adv-x="384" 
+d="M384 256h-112v-128h112v-16h-112v-112h-16v112h-128v-112h-16v112h-112v16h112v128h-112v16h112v112h16v-112h128v112h16v-112h112v-16zM256 128v128h-128v-128h128z" />
+    <glyph glyph-name="ion-ios-grid-view" unicode="&#xf441;" horiz-adv-x="384" 
+d="M128 128v128h128v-128h-128zM0 384h384v-384h-384v384zM352 256v16h-80v80h-16v-80h-128v80h-16v-80h-80v-16h80v-128h-80v-16h80v-80h16v80h128v-80h16v80h80v16h-80v128h80z" />
+    <glyph glyph-name="ion-ios-heart-outline" unicode="&#xf442;" 
+d="M327 368c69 0 121 -43 121 -116c0 -31 -13 -71 -41 -105s-45 -52 -100 -88s-83 -43 -83 -43s-28 7 -83 43s-72 54 -100 88s-41 74 -41 105c0 73 52 116 121 116c39 0 82 -18 103 -53c21 35 64 53 103 53zM395 157c12 14 22 31 28 49c6 16 9 31 9 46c0 30 -10 56 -29 74
+c-9 8 -20 15 -33 19c-13 5 -28 7 -43 7c-38 0 -73 -18 -89 -45l-14 -23l-14 23c-16 27 -51 45 -89 45c-15 0 -30 -2 -43 -7c-13 -4 -24 -11 -33 -19c-19 -18 -29 -44 -29 -74c0 -15 3 -30 9 -46c6 -18 16 -35 28 -49c27 -32 42 -49 97 -85c40 -27 65 -36 74 -39
+c9 3 34 12 74 39c55 36 70 53 97 85z" />
+    <glyph glyph-name="ion-ios-heart" unicode="&#xf443;" 
+d="M327 368c69 0 121 -43 121 -116c0 -31 -13 -71 -41 -105s-45 -52 -100 -88s-83 -43 -83 -43s-28 7 -83 43s-72 54 -100 88s-41 74 -41 105c0 73 52 116 121 116c39 0 82 -18 103 -53c21 35 64 53 103 53z" />
+    <glyph glyph-name="ion-ios-help-empty" unicode="&#xf444;" horiz-adv-x="128" 
+d="M68 82c-9 0 -17 8 -17 17s8 17 17 17s17 -8 17 -17s-8 -17 -17 -17zM102 197c-23 -22 -22 -27 -23 -53h-19c1 28 7 43 30 64c11 10 19 24 19 39c0 24 -19 39 -42 39c-32 0 -49 -16 -48 -46h-19c0 42 25 62 68 62c33 0 60 -20 60 -54c0 -22 -11 -37 -26 -51z" />
+    <glyph glyph-name="ion-ios-help-outline" unicode="&#xf445;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191zM212 302c33 0 60 -21 60 -55c0 -22 -11 -36 -26 -50c-23 -23 -22 -27 -23 -53h-19
+c1 28 7 43 30 64c11 10 19 23 19 38c0 24 -19 40 -42 40c-32 0 -49 -16 -48 -46h-19c0 42 25 62 68 62zM212 116c9 0 17 -8 17 -17s-8 -17 -17 -17s-17 8 -17 17s8 17 17 17z" />
+    <glyph glyph-name="ion-ios-help" unicode="&#xf446;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM212 82c9 0 17 8 17 17s-8 17 -17 17s-17 -8 -17 -17s8 -17 17 -17zM246 197c15 14 26 29 26 51c0 34 -27 54 -60 54c-43 0 -68 -20 -68 -62h19c-1 30 16 46 48 46
+c23 0 42 -15 42 -39c0 -15 -8 -29 -19 -39c-23 -21 -29 -36 -30 -64h19c1 26 0 31 23 53z" />
+    <glyph glyph-name="ion-ios-home-outline" unicode="&#xf447;" horiz-adv-x="384" 
+d="M192 336l160 -128v-208h-112v128h-96v-128h-112v208zM336 16v184l-144 116l-144 -116v-184h80v128h128v-128h80zM192 384l192 -153l-12 -12l-180 145l-180 -145l-12 12l32 25v96h64v-45zM80 294v42h-32v-67z" />
+    <glyph glyph-name="ion-ios-home" unicode="&#xf448;" horiz-adv-x="384" 
+d="M192 336l160 -128v-208h-112v128h-96v-128h-112v208zM192 384l192 -153l-12 -12l-180 145l-180 -145l-12 12l32 25v96h64v-45z" />
+    <glyph glyph-name="ion-ios-infinite-outline" unicode="&#xf449;" 
+d="M419 260c19 -19 29 -43 29 -68s-10 -49 -29 -68c-19 -18 -44 -28 -70 -28s-50 10 -69 28l-126 123c-15 15 -35 22 -56 22s-40 -7 -55 -22c-31 -30 -31 -80 0 -110c15 -15 34 -22 55 -22s41 7 56 22l43 42l13 -14l-42 -41c-19 -18 -44 -28 -70 -28s-50 10 -69 28
+c-19 19 -29 43 -29 68s10 49 29 68c19 18 43 28 69 28s51 -10 70 -28l126 -123c15 -15 34 -22 55 -22s41 7 56 22c31 30 31 80 0 110c-15 15 -35 22 -56 22s-40 -7 -55 -22l-43 -42l-13 14l42 41c19 18 44 28 70 28s50 -10 69 -28z" />
+    <glyph glyph-name="ion-ios-infinite" unicode="&#xf44a;" horiz-adv-x="464" 
+d="M433 266c20 -20 31 -46 31 -74s-11 -54 -31 -74s-48 -30 -76 -30s-55 10 -75 30l-125 123c-13 13 -32 20 -51 20s-37 -7 -50 -20s-21 -31 -21 -49c0 -19 8 -36 21 -49s31 -20 50 -20s38 7 51 20l39 38l25 -25l-39 -38c-20 -20 -48 -30 -76 -30s-55 10 -75 30
+s-31 46 -31 74s11 54 31 74s47 30 75 30s56 -10 76 -30l125 -123c13 -13 31 -20 50 -20s38 7 51 20s20 31 20 49c0 19 -7 36 -20 49s-32 20 -51 20s-37 -7 -50 -20l-39 -38l-25 25l39 38c20 20 48 30 76 30s55 -10 75 -30z" />
+    <glyph glyph-name="ion-ios-information-empty" unicode="&#xf44b;" horiz-adv-x="64" 
+d="M8 276c0 13 7 20 20 20s20 -7 20 -20s-7 -20 -20 -20s-20 7 -20 20zM48 104h16v-8h-64v8h16v120h-16v8h48v-128z" />
+    <glyph glyph-name="ion-ios-information-outline" unicode="&#xf44c;" horiz-adv-x="416" 
+d="M184 276c0 13 7 20 20 20s20 -7 20 -20s-7 -20 -20 -20s-20 7 -20 20zM224 104h16v-8h-64v8h16v120h-16v8h48v-128zM208 400c57 0 106 -20 147 -61s61 -90 61 -147s-20 -106 -61 -147s-90 -61 -147 -61s-106 20 -147 61s-61 90 -61 147s20 106 61 147s90 61 147 61z
+M208 1c53 0 98 19 135 56s56 82 56 135s-19 98 -56 135s-82 56 -135 56s-98 -19 -135 -56s-56 -82 -56 -135s19 -98 56 -135s82 -56 135 -56z" />
+    <glyph glyph-name="ion-ios-information" unicode="&#xf44d;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM204 296c-11 0 -20 -9 -20 -20s9 -20 20 -20s20 9 20 20s-9 20 -20 20zM240 96v8h-16v128h-48v-8h16v-120h-16v-8h64z" />
+    <glyph glyph-name="ion-ios-ionic-outline" unicode="&#xf44e;" horiz-adv-x="416" 
+d="M378 313c24 -34 38 -76 38 -121c0 -115 -92 -208 -207 -208s-209 93 -209 208s94 208 209 208c45 0 86 -14 120 -38c6 5 13 8 21 8c19 0 35 -16 35 -35c0 -8 -2 -16 -7 -22zM350 357c-12 0 -22 -10 -22 -22s10 -22 22 -22s22 10 22 22s-10 22 -22 22zM344 56
+c18 18 31 39 41 62c10 24 15 48 15 74s-5 51 -15 75c-5 13 -12 25 -20 36c-5 -2 -10 -3 -15 -3c-19 0 -35 16 -35 35c0 5 2 11 4 15c-11 8 -23 15 -36 20c-24 10 -49 14 -75 14s-51 -4 -75 -14c-23 -10 -43 -24 -61 -42s-31 -38 -41 -61c-10 -24 -15 -49 -15 -75
+s5 -50 15 -74c10 -23 23 -44 41 -62s38 -31 61 -41c24 -10 49 -15 75 -15s51 5 75 15c23 10 43 23 61 41zM208 288c53 0 96 -43 96 -96s-43 -96 -96 -96s-96 43 -96 96s43 96 96 96zM208 112c44 0 80 36 80 80s-36 80 -80 80s-79 -36 -79 -80s35 -80 79 -80z" />
+    <glyph glyph-name="ion-ios-keypad-outline" unicode="&#xf44f;" horiz-adv-x="384" 
+d="M331 107c30 0 53 -24 53 -54s-23 -53 -53 -53s-54 23 -54 53s24 54 54 54zM331 16c21 0 37 16 37 37s-16 38 -37 38s-38 -17 -38 -38s17 -37 38 -37zM192 107c30 0 53 -24 53 -54s-23 -53 -53 -53s-53 23 -53 53s23 54 53 54zM192 16c21 0 37 16 37 37s-16 38 -37 38
+s-37 -17 -37 -38s16 -37 37 -37zM53 107c30 0 54 -24 54 -54s-24 -53 -54 -53s-53 23 -53 53s23 54 53 54zM53 16c21 0 38 16 38 37s-17 38 -38 38s-37 -17 -37 -38s16 -37 37 -37zM331 245c30 0 53 -23 53 -53s-23 -53 -53 -53s-54 23 -54 53s24 53 54 53zM331 155
+c21 0 37 16 37 37s-16 37 -37 37s-38 -16 -38 -37s17 -37 38 -37zM192 245c30 0 53 -23 53 -53s-23 -53 -53 -53s-53 23 -53 53s23 53 53 53zM192 155c21 0 37 16 37 37s-16 37 -37 37s-37 -16 -37 -37s16 -37 37 -37zM53 245c30 0 54 -23 54 -53s-24 -53 -54 -53
+s-53 23 -53 53s23 53 53 53zM53 155c21 0 38 16 38 37s-17 37 -38 37s-37 -16 -37 -37s16 -37 37 -37zM331 277c-30 0 -54 24 -54 54s24 53 54 53s53 -23 53 -53s-23 -54 -53 -54zM331 368c-21 0 -38 -16 -38 -37s17 -38 38 -38s37 17 37 38s-16 37 -37 37zM192 384
+c30 0 53 -23 53 -53s-23 -54 -53 -54s-53 24 -53 54s23 53 53 53zM192 293c21 0 37 17 37 38s-16 37 -37 37s-37 -16 -37 -37s16 -38 37 -38zM53 384c30 0 54 -23 54 -53s-24 -54 -54 -54s-53 24 -53 54s23 53 53 53zM53 293c21 0 38 17 38 38s-17 37 -38 37
+s-37 -16 -37 -37s16 -38 37 -38z" />
+    <glyph glyph-name="ion-ios-keypad" unicode="&#xf450;" horiz-adv-x="384" 
+d="M331 107c30 0 53 -24 53 -54s-23 -53 -53 -53s-54 23 -54 53s24 54 54 54zM192 107c30 0 53 -24 53 -54s-23 -53 -53 -53s-53 23 -53 53s23 54 53 54zM53 107c30 0 54 -24 54 -54s-24 -53 -54 -53s-53 23 -53 53s23 54 53 54zM331 245c30 0 53 -23 53 -53
+s-23 -53 -53 -53s-54 23 -54 53s24 53 54 53zM192 245c30 0 53 -23 53 -53s-23 -53 -53 -53s-53 23 -53 53s23 53 53 53zM53 245c30 0 54 -23 54 -53s-24 -53 -54 -53s-53 23 -53 53s23 53 53 53zM331 277c-30 0 -54 24 -54 54s24 53 54 53s53 -23 53 -53s-23 -54 -53 -54z
+M192 384c30 0 53 -23 53 -53s-23 -54 -53 -54s-53 24 -53 54s23 53 53 53zM53 384c30 0 54 -23 54 -53s-24 -54 -54 -54s-53 24 -53 54s23 53 53 53z" />
+    <glyph glyph-name="ion-ios-lightbulb-outline" unicode="&#xf451;" horiz-adv-x="288" 
+d="M288 275c0 -31 -13 -59 -30 -83v0c-11 -15 -22 -28 -32 -45c-22 -38 -18 -73 -18 -82v-1h-128v1c0 7 3 44 -19 82c-10 17 -20 30 -31 45v0c-17 24 -30 52 -30 83c0 78 66 141 144 141s144 -63 144 -141zM239 194l6 8c16 22 27 47 27 73c0 33 -16 65 -40 89s-55 36 -88 36
+s-64 -12 -88 -36s-40 -56 -40 -89c0 -26 11 -51 27 -73l19 -26v0c5 -6 9 -13 13 -21c17 -29 21 -58 21 -75h16v112l-32 64h17l31 -64v-112h32v112l31 64h17l-32 -64v-112h16c0 17 4 45 21 75c8 14 16 25 24 36c1 1 1 2 2 3zM112 -32v16h64v-16h-64zM96 0v16h96v-16h-96z
+M96 32v16h96v-16h-96z" />
+    <glyph glyph-name="ion-ios-lightbulb" unicode="&#xf452;" horiz-adv-x="288" 
+d="M288 275c0 -31 -13 -59 -30 -83v0c-11 -15 -22 -28 -32 -45c-22 -38 -18 -73 -18 -82v-1h-32v128l32 64h-16l-32 -64v-128h-32v128l-31 64h-17l32 -64v-128h-32v1c0 7 3 44 -19 82c-10 17 -20 30 -31 45v0c-17 24 -30 52 -30 83c0 78 66 141 144 141s144 -63 144 -141z
+M112 -32v16h64v-16h-64zM96 0v16h96v-16h-96zM96 32v16h96v-16h-96z" />
+    <glyph glyph-name="ion-ios-list-outline" unicode="&#xf453;" horiz-adv-x="384" 
+d="M368 368h-352v-352h352v352zM384 384v0v-384h-384v384h384zM128 280v16h192v-16h-192zM128 184v16h192v-16h-192zM128 88v16h192v-16h-192zM64 288c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16s-16 5 -16 16zM64 192c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16
+s-16 5 -16 16zM64 96c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16s-16 5 -16 16z" />
+    <glyph glyph-name="ion-ios-list" unicode="&#xf454;" horiz-adv-x="384" 
+d="M0 384h384v-384h-384v384zM80 80c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM80 176c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM80 272c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM320 88v16h-192v-16h192zM320 184v16
+h-192v-16h192zM320 280v16h-192v-16h192z" />
+    <glyph glyph-name="ion-ios-location-outline" unicode="&#xf455;" horiz-adv-x="288" 
+d="M144 400c-34 0 -67 -13 -91 -37s-37 -57 -37 -91c0 -43 24 -107 70 -186c22 -38 44 -72 58 -91c14 19 36 53 58 91c46 79 70 143 70 186c0 34 -13 67 -37 91s-57 37 -91 37zM144 416v0c80 0 144 -64 144 -144c0 -112 -144 -304 -144 -304s-144 192 -144 304
+c0 80 64 144 144 144zM144 336c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM144 225c26 0 47 21 47 47s-21 47 -47 47s-47 -21 -47 -47s21 -47 47 -47z" />
+    <glyph glyph-name="ion-ios-location" unicode="&#xf456;" horiz-adv-x="288" 
+d="M144 416c80 0 144 -64 144 -144c0 -112 -144 -304 -144 -304s-144 192 -144 304c0 80 64 144 144 144zM144 225c26 0 47 21 47 47s-21 47 -47 47s-47 -21 -47 -47s21 -47 47 -47z" />
+    <glyph glyph-name="ion-ios-locked-outline" unicode="&#xf457;" horiz-adv-x="320" 
+d="M264 224h56v-240h-320v240h56v72c0 57 47 104 104 104s104 -47 104 -104v-72zM72 296v-72h176v72c0 49 -39 88 -88 88s-88 -39 -88 -88zM304 0v208h-288v-208h288zM160 160c18 0 32 -14 32 -32c0 -15 -10 -27 -24 -31v-33h-16v33c-14 4 -24 16 -24 31c0 18 14 32 32 32z
+M160 112c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16z" />
+    <glyph glyph-name="ion-ios-locked" unicode="&#xf458;" horiz-adv-x="320" 
+d="M264 224h56v-240h-320v240h56v72c0 57 47 104 104 104s104 -47 104 -104v-72zM168 97c14 4 24 16 24 31c0 18 -14 32 -32 32s-32 -14 -32 -32c0 -15 10 -27 24 -31v-33h16v33zM248 224v72c0 49 -39 88 -88 88s-88 -39 -88 -88v-72h176zM160 144c9 0 16 -7 16 -16
+s-7 -16 -16 -16s-16 7 -16 16s7 16 16 16z" />
+    <glyph glyph-name="ion-ios-loop-strong" unicode="&#xf459;" horiz-adv-x="512" 
+d="M256 400c115 0 208 -93 208 -208c0 -14 -1 -28 -4 -42l-1 -4l-24 5l1 4c2 12 4 24 4 37c0 101 -83 184 -184 184c-66 0 -127 -36 -160 -94l-2 -3l-21 11l2 4c37 65 106 106 181 106zM416 102l2 3l21 -11l-2 -4c-37 -65 -106 -106 -181 -106c-115 0 -208 93 -208 208
+c0 14 1 28 4 42l1 4l24 -5l-1 -4c-2 -12 -4 -24 -4 -37c0 -101 83 -184 184 -184c66 0 127 36 160 94zM384 192h128l-64 -64zM0 192l64 64l64 -64h-128z" />
+    <glyph glyph-name="ion-ios-loop" unicode="&#xf45a;" horiz-adv-x="489" 
+d="M478 192l11 -11l-52 -53l-53 53l10 11l43 -41zM449 192v0v0c0 -7 0 -14 -1 -21l-16 1c1 7 1 14 1 21c-1 103 -85 187 -188 187c-68 0 -131 -37 -164 -96l-14 8c36 64 104 104 178 104c112 0 203 -91 204 -202v0v-2zM409 100l14 -8c-36 -64 -104 -104 -178 -104
+c-111 0 -202 90 -204 200v0v3v1v0c0 7 0 14 1 21l16 -1c-1 -7 -1 -14 -1 -21c0 -103 85 -187 188 -187c68 0 131 37 164 96zM53 256l52 -53l-11 -11l-41 41l-42 -41l-11 11z" />
+    <glyph glyph-name="ion-ios-medical-outline" unicode="&#xf45b;" horiz-adv-x="364" 
+d="M364 260l-118 -68l118 -68l-32 -56l-118 69v-137h-64v137l-118 -69l-32 56l118 68l-118 68l32 56l118 -69v137h64v-137l118 69zM342 118l-128 74l128 74l-16 28l-128 -74v148h-32v-148l-128 74l-16 -28l128 -74l-128 -74l16 -28l128 74v-148h32v148l128 -74z" />
+    <glyph glyph-name="ion-ios-medical" unicode="&#xf45c;" horiz-adv-x="364" 
+d="M364 260l-118 -68l118 -68l-32 -56l-118 69v-137h-64v137l-118 -69l-32 56l118 68l-118 68l32 56l118 -69v137h64v-137l118 69z" />
+    <glyph glyph-name="ion-ios-medkit-outline" unicode="&#xf45d;" horiz-adv-x="416" 
+d="M224 240h-32v-48v-16h-16h-48v-32h48h16v-16v-48h32v48v16h16h48v32h-48h-16v16v48zM240 256v0v-64h64v-64h-64v-64h-64v64h-64v64h64v64h64zM288 320h128v-320h-416v320h128v32c0 18 10 32 29 32h99c19 0 32 -14 32 -32v-32zM144 350v-30h128v30c0 10 -7 18 -17 18h-97
+c-11 0 -14 -8 -14 -18zM400 16v288h-384v-288h384z" />
+    <glyph glyph-name="ion-ios-medkit" unicode="&#xf45e;" horiz-adv-x="416" 
+d="M224 176h16h48v-32h-48h-16v-16v-48h-32v48v16h-16h-48v32h48h16v16v48h32v-48v-16zM288 320h128v-320h-416v320h128v32c0 18 10 32 29 32h99c19 0 32 -14 32 -32v-32zM144 350v-30h128v30c0 10 -7 18 -17 18h-97c-11 0 -14 -8 -14 -18zM304 128v64h-64v64h-64v-64h-64
+v-64h64v-64h64v64h64z" />
+    <glyph glyph-name="ion-ios-mic-off" unicode="&#xf45f;" horiz-adv-x="280" 
+d="M266 -32l-258 440l14 8l258 -440zM128 95c-44 0 -79 37 -79 83v118l113 -193c-10 -5 -22 -8 -34 -8zM207 178c0 -10 -2 -19 -5 -28l-136 234c14 20 37 32 62 32c44 0 79 -38 79 -84v-154zM256 176c0 -28 -9 -54 -24 -75l-10 17c11 17 17 36 17 58v80h17v-80zM139 49v0
+v-63h69v-18h-161v18h73v63c-67 5 -120 60 -120 127v80h19v-80c0 -60 50 -109 110 -109c17 0 34 4 48 11l9 -16c-14 -7 -30 -12 -47 -13z" />
+    <glyph glyph-name="ion-ios-mic-outline" unicode="&#xf460;" horiz-adv-x="256" 
+d="M128 416c44 0 79 -38 79 -84v-154c0 -46 -35 -84 -79 -84s-79 38 -79 84v154c0 46 35 84 79 84zM191 178v154c0 37 -28 68 -63 68s-63 -31 -63 -68v-154c0 -37 28 -68 63 -68s63 31 63 68zM239 256h17v-80c0 -67 -51 -122 -117 -127v-63h69v-18h-161v18h73v63
+c-67 5 -120 60 -120 127v80h19v-80c0 -60 50 -109 110 -109s110 49 110 109v80z" />
+    <glyph glyph-name="ion-ios-mic" unicode="&#xf461;" horiz-adv-x="256" 
+d="M128 94c-44 0 -79 38 -79 84v154c0 46 35 84 79 84s79 -38 79 -84v-154c0 -46 -35 -84 -79 -84zM239 256h17v-80c0 -67 -51 -122 -117 -127v-63h69v-18h-161v18h73v63c-67 5 -120 60 -120 127v80h19v-80c0 -60 50 -109 110 -109s110 49 110 109v80z" />
+    <glyph glyph-name="ion-ios-minus-empty" unicode="&#xf462;" horiz-adv-x="256" 
+d="M256 183h-256v17h256v-17z" />
+    <glyph glyph-name="ion-ios-minus-outline" unicode="&#xf463;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191zM80 183v17h256v-17h-256z" />
+    <glyph glyph-name="ion-ios-minus" unicode="&#xf464;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM336 183v17h-256v-17h256z" />
+    <glyph glyph-name="ion-ios-monitor-outline" unicode="&#xf465;" horiz-adv-x="480" 
+d="M480 64h-176v-16h64v-16h-257v16h64v16h-175v288h480v-288zM16 336v-256h448v256h-448z" />
+    <glyph glyph-name="ion-ios-monitor" unicode="&#xf466;" horiz-adv-x="480" 
+d="M480 64h-176v-16h64v-16h-257v16h64v16h-175v288h480v-288zM16 336v-256h448v256h-448zM32 96v224h416v-224h-416z" />
+    <glyph glyph-name="ion-ios-moon-outline" unicode="&#xf467;" horiz-adv-x="216" 
+d="M195 133c7 0 14 1 21 3c-4 -7 -7 -12 -12 -18c-21 -25 -53 -41 -88 -41c-64 0 -116 51 -116 115c0 52 34 96 81 111c7 2 14 3 22 4c-4 -6 -8 -12 -11 -18c-7 -14 -11 -30 -11 -47c0 -29 11 -56 32 -77s48 -32 77 -32h5zM116 93c25 0 48 9 65 24c-65 5 -116 59 -116 125
+c0 14 2 28 6 40c-33 -16 -55 -51 -55 -90c0 -55 45 -99 100 -99z" />
+    <glyph glyph-name="ion-ios-moon" unicode="&#xf468;" horiz-adv-x="216" 
+d="M195 133c7 0 14 1 21 3c-4 -7 -7 -12 -12 -18c-21 -25 -53 -41 -88 -41c-64 0 -116 51 -116 115c0 52 34 96 81 111c7 2 14 3 22 4c-4 -6 -8 -12 -11 -18c-7 -14 -11 -30 -11 -47c0 -29 11 -56 32 -77s48 -32 77 -32h5z" />
+    <glyph glyph-name="ion-ios-more-outline" unicode="&#xf469;" horiz-adv-x="320" 
+d="M160 210c-10 0 -18 -8 -18 -18s8 -18 18 -18s18 8 18 18s-8 18 -18 18zM160 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM32 210c-10 0 -18 -8 -18 -18s8 -18 18 -18s18 8 18 18s-8 18 -18 18zM32 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32
+s-32 14 -32 32s14 32 32 32zM288 210c-10 0 -18 -8 -18 -18s8 -18 18 -18s18 8 18 18s-8 18 -18 18zM288 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32z" />
+    <glyph glyph-name="ion-ios-more" unicode="&#xf46a;" horiz-adv-x="320" 
+d="M160 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM32 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM288 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32z" />
+    <glyph glyph-name="ion-ios-musical-note" unicode="&#xf46b;" horiz-adv-x="192" 
+d="M192 346v-1v-65c0 -3 -3 -6 -6 -5v0l-73 13v-192c0 -33 1 -80 -51 -82c-48 -2 -62 16 -62 41c0 19 9 39 51 41c22 1 37 1 45 1v273l90 -19l2 -1c2 0 3 -1 4 -3v0v-1v0z" />
+    <glyph glyph-name="ion-ios-musical-notes" unicode="&#xf46c;" horiz-adv-x="320" 
+d="M320 128c0 -34 4 -80 -49 -82c-49 -2 -62 16 -62 41c0 20 9 39 52 41c23 1 34 2 43 2v160l-191 -32v-161c0 -34 3 -81 -50 -83c-49 -2 -63 17 -63 42c0 20 9 39 52 41c23 1 35 1 44 1v237l224 35v-242z" />
+    <glyph glyph-name="ion-ios-navigate-outline" unicode="&#xf46d;" horiz-adv-x="416" 
+d="M208 384c-51 0 -99 -21 -135 -57s-57 -84 -57 -135s21 -99 57 -135s84 -57 135 -57s99 21 135 57s57 84 57 135s-21 99 -57 135s-84 57 -135 57zM208 400v0c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM304 288l-96 -224v128h-128z" />
+    <glyph glyph-name="ion-ios-navigate" unicode="&#xf46e;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 64l96 224l-224 -96h128v-128z" />
+    <glyph glyph-name="ion-ios-nutrition-outline" unicode="&#xf46f;" horiz-adv-x="384" 
+d="M294 214v0c6 -6 10 -14 10 -23c0 -11 -5 -20 -13 -26v0s-51 -37 -106 -77l-38 31c-2 2 -4 3 -6 3c-1 0 -2 0 -3 -1v0c-2 -2 -2 -6 1 -10l29 -35l-115 -84c-6 -4 -13 -8 -21 -8c-18 0 -32 14 -32 32c0 7 1 13 4 18v0c2 2 17 25 37 57l21 -17c2 -2 4 -2 6 -2c1 0 3 0 4 1v0
+c2 2 1 6 -2 10l-19 23c27 43 60 96 84 134l36 -30c2 -2 4 -3 6 -3c1 0 2 1 3 2v0c2 2 2 5 -1 9l-33 40c11 18 19 29 19 29v0c6 10 15 16 27 16c9 0 18 -4 24 -10v0l78 -79v0v0zM282 178c4 3 6 8 6 13c0 4 -2 9 -5 12l-5 4v1l-69 69v0l-5 5c-3 3 -8 5 -12 5
+c-6 0 -10 -3 -13 -8l-5 -8c-2 -3 -5 -7 -8 -12l25 -30v0l1 -1c8 -10 8 -22 0 -30l-1 -1l-1 -1c-4 -3 -8 -5 -13 -5s-11 2 -16 6v1h-1l-21 18l-24 -39l-44 -70l12 -14v0v0c8 -10 8 -23 0 -31v0c-4 -4 -9 -6 -15 -6c-5 0 -11 2 -16 6v0v0l-7 5c-3 -5 -5 -9 -8 -13
+c-12 -19 -16 -26 -18 -29c-1 -3 -2 -6 -2 -9c0 -9 7 -16 16 -16c3 0 6 2 11 5l101 74l-18 22h-1v0c-8 10 -8 23 0 31v0v0v0c4 4 10 6 15 6s11 -2 16 -6v0h1l28 -24c49 36 93 68 96 70zM376 333l8 -14l-5 -3l-103 -60l-17 17l71 123l2 4l14 -8l-3 -4l-63 -111l91 53z" />
+    <glyph glyph-name="ion-ios-nutrition" unicode="&#xf470;" horiz-adv-x="384" 
+d="M295 214v0c6 -6 9 -13 9 -22c0 -11 -5 -20 -13 -26v0s-51 -38 -106 -78l-38 32c-4 3 -8 3 -10 1v0c-2 -2 -2 -6 1 -10l29 -35l-114 -84c-6 -4 -13 -8 -21 -8c-18 0 -32 14 -32 32c0 7 2 13 5 18v0c1 2 16 25 36 57l20 -17c4 -3 8 -3 10 -1v0c2 2 2 6 -1 10l-20 23
+c27 43 60 96 84 134l36 -30c4 -3 8 -3 10 -1v0c2 2 2 6 -1 10l-33 40c11 18 18 29 18 29v0c6 10 16 16 28 16c9 0 18 -4 24 -10v0l78 -79l1 -1v0zM384 309l-103 -59l-28 29l70 121l28 -16l-50 -85l67 38z" />
+    <glyph glyph-name="ion-ios-paper-outline" unicode="&#xf471;" horiz-adv-x="384" 
+d="M48 384h336v-353c0 -17 -14 -31 -31 -31h-322c-17 0 -31 14 -31 31v305h32v-16h-16v-289c0 -8 7 -15 15 -15h322c8 0 15 7 15 15v337h-304v-320h-16v320v16zM96 320v16h128v-16h-128zM96 240v16h240v-16h-240zM96 160v16h192v-16h-192zM96 80v16h240v-16h-240z" />
+    <glyph glyph-name="ion-ios-paper" unicode="&#xf472;" horiz-adv-x="384" 
+d="M48 384h336v-353c0 -17 -14 -31 -31 -31h-322c-17 0 -31 14 -31 31v305h32v-288h16v288v32v16zM96 336v-16h128v16h-128zM96 176v-16h192v16h-192zM336 80v16h-240v-16h240zM336 240v16h-240v-16h240z" />
+    <glyph glyph-name="ion-ios-paperplane-outline" unicode="&#xf473;" horiz-adv-x="320" 
+d="M0 198l320 154l-146 -320l-57 115zM132 152l41 -83l115 249zM286 320l-248 -121l83 -36z" />
+    <glyph glyph-name="ion-ios-paperplane" unicode="&#xf474;" horiz-adv-x="320" 
+d="M0 198l320 154l-214 -200zM320 352l-146 -320l-52 104z" />
+    <glyph glyph-name="ion-ios-partlysunny-outline" unicode="&#xf475;" horiz-adv-x="384" 
+d="M144 298v54h16v-54h-16zM0 192v16h55v-16h-55zM44 299l10 11l32 -32l-11 -11zM223 268l-11 11l32 32l11 -11zM56 96l-10 11l31 31l11 -11zM129 153c-4 -3 -8 -7 -12 -12c-23 12 -39 36 -39 63c0 39 32 71 71 71c21 0 40 -10 53 -25c-4 -2 -9 -4 -14 -8
+c-10 11 -23 17 -39 17c-30 0 -55 -25 -55 -55c0 -23 15 -43 35 -51zM235 208c-34 0 -63 -28 -63 -62v-12s1 -10 1 -10c-5 0 -12 -1 -14 -1c-19 -3 -33 -18 -33 -37c0 -10 3 -19 10 -26s16 -11 26 -11h157c27 0 49 22 49 49s-22 50 -49 50c-2 0 -4 -1 -6 -1l-14 -2l-3 14
+c-3 14 -11 26 -22 35s-25 14 -39 14zM235 224v0c37 0 68 -26 76 -61h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v8c0 43 35 78 78 78z" />
+    <glyph glyph-name="ion-ios-partlysunny" unicode="&#xf476;" horiz-adv-x="384" 
+d="M144 298v54h16v-54h-16zM0 192v16h55v-16h-55zM44 299l10 11l32 -32l-11 -11zM223 268l-11 11l32 32l11 -11zM56 96l-10 11l31 31l11 -11zM235 224v0c37 0 68 -26 76 -61h8c36 0 65 -29 65 -65s-29 -66 -65 -66h-157c-28 0 -52 24 -52 53c0 27 21 51 47 53v8
+c0 43 35 78 78 78zM201 252l1 -2v0c-31 -5 -62 -43 -62 -75c0 -2 1 -5 1 -7l-1 -1h-1c-11 -6 -18 -14 -22 -26v1v-1c-23 12 -39 36 -39 63c0 39 32 71 71 71c21 0 39 -9 52 -23z" />
+    <glyph glyph-name="ion-ios-pause-outline" unicode="&#xf477;" horiz-adv-x="256" 
+d="M63 336h-47v-288h47v288zM79 352v0v-320h-79v320h79zM240 336h-47v-288h47v288zM256 352v0v-320h-79v320h79z" />
+    <glyph glyph-name="ion-ios-pause" unicode="&#xf478;" horiz-adv-x="256" 
+d="M0 32v320h79v-320h-79zM177 32v320h79v-320h-79z" />
+    <glyph glyph-name="ion-ios-paw-outline" unicode="&#xf479;" horiz-adv-x="384" 
+d="M380 252c6 -17 5 -38 -3 -57c-10 -25 -31 -43 -51 -43c-5 0 -10 1 -15 3c-22 10 -30 45 -17 79c10 28 31 46 51 46c5 0 10 -1 14 -3c10 -4 17 -13 21 -25zM362 202c6 15 7 31 2 44c-2 5 -5 12 -12 15c-2 1 -4 2 -7 2c-13 0 -28 -15 -36 -36c-9 -25 -6 -50 8 -56
+c2 -1 5 -1 8 -1c14 0 29 13 37 32zM90 234c13 -34 5 -69 -17 -79c-5 -2 -10 -3 -15 -3c-20 0 -41 18 -51 43c-8 19 -9 40 -3 57c4 12 11 21 21 25c4 2 9 3 14 3c20 0 41 -18 51 -46zM67 171c14 6 17 31 8 56c-8 21 -23 36 -36 36c-3 0 -5 -1 -7 -2c-7 -3 -10 -10 -12 -15
+c-5 -13 -4 -29 2 -44c8 -19 23 -32 37 -32c3 0 6 0 8 1zM134 237c-28 1 -52 32 -56 69c-2 23 4 45 16 60c8 10 19 17 31 18h6c27 -1 46 -29 50 -67c3 -24 -1 -48 -13 -63c-8 -9 -17 -15 -28 -16c-2 0 -4 -1 -6 -1zM107 356c-10 -12 -14 -29 -12 -48c3 -29 21 -53 40 -54h3
+c6 1 12 4 17 10c10 12 12 31 10 51c-3 29 -17 52 -35 53h-3c-9 -1 -16 -7 -20 -12zM192 208c64 0 128 -76 128 -149c0 -22 -11 -40 -22 -47c-13 -9 -23 -12 -42 -12c-23 0 -29 8 -40 15c-8 5 -14 10 -24 10s-16 -5 -24 -10c-11 -7 -17 -15 -40 -15c-19 0 -29 3 -42 12
+c-11 7 -22 25 -22 47c0 73 64 149 128 149zM290 27c6 4 14 16 14 32c0 30 -14 64 -36 91c-11 13 -23 24 -36 31c-13 8 -27 11 -40 11s-27 -3 -40 -11c-13 -7 -25 -18 -36 -31c-22 -27 -36 -61 -36 -91c0 -16 8 -28 14 -32c11 -7 18 -10 34 -10c14 0 19 4 26 9c2 1 4 3 6 4
+c9 6 18 12 32 12s23 -6 32 -12c2 -1 4 -3 6 -4c7 -5 12 -9 26 -9c16 0 23 3 34 10zM244 238c-11 1 -20 7 -28 16c-12 15 -16 39 -13 63c4 38 23 66 50 67h7c12 -1 22 -8 30 -18c12 -15 18 -37 16 -60c-4 -37 -28 -67 -56 -68h-6zM219 315c-2 -20 0 -39 10 -51
+c5 -6 11 -9 17 -10h3c19 1 38 25 41 54c2 19 -3 36 -13 48c-4 5 -10 11 -19 12h-4c-18 -1 -32 -24 -35 -53z" />
+    <glyph glyph-name="ion-ios-paw" unicode="&#xf47a;" horiz-adv-x="384" 
+d="M380 252c6 -17 5 -38 -3 -57c-10 -25 -31 -43 -51 -43c-5 0 -10 1 -15 3c-22 10 -30 45 -17 79c10 28 31 46 51 46c5 0 10 -1 14 -3c10 -4 17 -13 21 -25zM90 234c13 -34 5 -69 -17 -79c-5 -2 -10 -3 -15 -3c-20 0 -41 18 -51 43c-8 19 -9 40 -3 57c4 12 11 21 21 25
+c4 2 9 3 14 3c20 0 41 -18 51 -46zM134 237c-28 1 -52 32 -56 69c-2 23 4 45 16 60c8 10 19 17 31 18h6c27 -1 46 -29 50 -67c3 -24 -1 -48 -13 -63c-8 -9 -17 -15 -28 -16c-2 0 -4 -1 -6 -1zM192 208c64 0 128 -76 128 -149c0 -22 -11 -40 -22 -47c-13 -9 -23 -12 -42 -12
+c-23 0 -29 8 -40 15c-8 5 -14 10 -24 10s-16 -5 -24 -10c-11 -7 -17 -15 -40 -15c-19 0 -29 3 -42 12c-11 7 -22 25 -22 47c0 73 64 149 128 149zM244 238c-11 1 -20 7 -28 16c-12 15 -16 39 -13 63c4 38 23 66 50 67h7c12 -1 22 -8 30 -18c12 -15 18 -37 16 -60
+c-4 -37 -28 -67 -56 -68h-6z" />
+    <glyph glyph-name="ion-ios-people-outline" unicode="&#xf47b;" 
+d="M224 336v0v0zM317 113c11 -4 -11 4 0 0c28 -10 46 -35 46 -65h-28h-250c0 22 9 42 27 55c15 11 31 12 49 16c7 1 24 5 26 13s1 15 1 23c0 3 0 3 -2 5c-4 4 -6 9 -8 14c-2 8 -3 16 -4 24c-9 -2 -10 16 -12 21c-1 4 -7 24 3 21c-3 5 -4 13 -5 19c-2 13 -2 26 3 39
+c10 26 37 39 64 38c26 -1 51 -16 59 -42c4 -12 3 -26 1 -39c-1 -5 -2 -11 -4 -15c10 3 4 -20 3 -23c-2 -5 -3 -21 -12 -19c-1 -10 -2 -22 -7 -31c-1 -2 -7 -8 -7 -10v-11c0 -5 0 -10 2 -15s10 -7 14 -8c14 -5 27 -5 41 -10zM115 84c-6 -6 9 10 0 0c-6 -6 -10 -12 -12 -20h4
+h238c-4 15 -17 27 -30 33s-28 4 -41 9s-25 9 -28 25c-2 11 -2 22 -2 33c0 2 7 7 8 9c3 5 4 11 5 17c1 5 0 12 4 15c5 4 7 7 9 13c2 8 3 12 -1 19c-3 5 0 8 1 13c3 11 4 24 2 36c-8 37 -62 45 -86 19c-12 -13 -12 -31 -9 -47c1 -6 6 -14 3 -19c-1 -3 -5 -6 -4 -10
+c2 -5 2 -11 4 -16c2 -4 4 -6 7 -8s3 -6 3 -9c1 -7 2 -17 6 -23c3 -4 8 -6 8 -11v-21c-1 -8 -2 -18 -8 -24c-7 -6 -18 -10 -27 -12c-11 -3 -23 -3 -33 -7c-8 -3 -15 -8 -21 -14zM112 126c-15 -7 9 4 0 0c-9 -5 -18 -11 -25 -19c-1 -2 -6 -11 -7 -11h-25h-55c0 20 13 34 31 40
+c6 2 27 4 30 11c2 5 0 11 0 16c-10 -1 -24 1 -32 7c-2 2 3 9 4 12l3 12c1 9 1 19 1 28c0 16 -1 34 8 48c8 13 23 18 38 18c24 0 43 -13 47 -37c3 -16 1 -32 2 -48c0 -8 2 -16 5 -24c1 -2 5 -7 3 -9l-6 -3c-5 -2 -11 -3 -17 -4c-1 0 -8 0 -9 -1s0 -9 0 -11c0 -4 1 -6 5 -7
+c6 -2 19 -3 23 -8c2 -3 1 -5 -2 -5c-8 -1 -15 -1 -22 -5zM71 112c6 10 16 18 26 24c-9 9 -5 26 -4 37c0 2 0 5 2 5h8c6 0 11 1 17 2c-7 23 0 47 -5 70c-3 16 -15 23 -31 23c-17 0 -27 -9 -30 -25c-4 -22 3 -46 -4 -68c9 -1 17 -2 26 -2c1 0 1 -28 1 -29
+c-1 -12 -8 -18 -19 -22c-12 -4 -29 -3 -36 -15h49zM368 96c-2 8 -10 14 -16 19c-8 6 -18 13 -28 15c-3 1 -16 -1 -13 5c2 4 9 5 13 6s15 2 16 7c0 1 1 14 0 14c-6 0 -12 1 -18 2c-4 1 -7 2 -11 4c-6 3 -2 6 0 11c14 32 -10 88 32 105c15 6 34 5 48 -3c15 -9 20 -27 20 -44
+c0 -20 -4 -44 7 -62c2 -3 4 -4 0 -6c-2 -1 -4 -1 -6 -2l-12 -3s-9 -1 -13 -1c0 -4 -2 -13 1 -17c6 -7 21 -7 29 -10c18 -6 31 -20 31 -40h-80zM367 123c4 -4 -5 5 0 0s8 -11 15 -11h16h28c-7 12 -26 11 -38 16c-11 4 -16 12 -17 24c0 2 -1 27 1 27c9 0 18 0 26 1
+c-7 23 1 47 -4 70c-3 15 -15 23 -30 23c-17 0 -28 -8 -31 -25c-4 -23 2 -46 -5 -68c6 -2 12 -2 18 -2s8 1 9 -5c1 -11 5 -28 -4 -37c6 -4 11 -8 16 -13z" />
+    <glyph glyph-name="ion-ios-people" unicode="&#xf47c;" 
+d="M317 113c11 -4 -11 4 0 0v0zM317 113c28 -10 46 -35 46 -65h-28h-250c0 22 9 42 27 55c15 11 31 12 49 16c7 1 24 5 26 13s1 15 1 23c0 3 0 3 -2 5c-4 4 -6 9 -8 14c-2 8 -3 16 -4 24c-9 -2 -10 16 -12 21c-1 4 -7 24 3 21c-3 5 -4 13 -5 19c-2 13 -2 26 3 39
+c10 26 37 39 64 38c26 -1 51 -16 59 -42c4 -12 3 -26 1 -39c-1 -5 -2 -11 -4 -15c10 3 4 -20 3 -23c-2 -5 -3 -21 -12 -19c-1 -10 -2 -22 -7 -31c-1 -2 -7 -8 -7 -10v-11c0 -5 0 -10 2 -15s10 -7 14 -8c14 -5 27 -5 41 -10zM111 126h2h-1h-1zM111 126c-9 -5 -17 -11 -24 -19
+c-1 -2 -6 -11 -7 -11h-25h-55c0 20 12 34 30 40c6 2 27 4 30 11c2 5 1 11 1 16c-10 -1 -24 1 -32 7c-2 2 3 9 4 12c1 4 2 7 3 11c1 9 1 19 1 28c0 16 -1 35 8 49c8 13 23 18 38 18c24 0 43 -13 47 -37c3 -16 1 -32 2 -48c0 -8 2 -16 5 -24c1 -2 5 -7 3 -9l-6 -3
+c-5 -2 -11 -3 -17 -4c-1 0 -8 0 -9 -1s0 -9 0 -11c0 -4 1 -6 5 -7c6 -2 19 -3 23 -8c2 -3 1 -5 -2 -5c-7 -1 -14 -2 -21 -5c2 1 2 2 -1 0c-8 -4 -4 -2 -1 0zM417 136c18 -6 31 -20 31 -40h-80c-2 8 -10 14 -16 19c-8 6 -18 13 -28 15c-3 1 -16 -1 -13 5c2 4 9 5 13 6
+s15 2 16 7c0 1 1 14 0 14c-6 0 -12 1 -18 2c-4 1 -7 2 -11 4c-6 3 -2 6 0 11c14 32 -10 88 32 105c15 6 34 5 48 -3c15 -9 20 -27 20 -44c0 -20 -4 -44 7 -62c2 -3 4 -4 0 -6c-2 -1 -4 -1 -6 -2l-12 -3s-9 -1 -13 -1c0 -4 -2 -13 1 -17c6 -7 21 -7 29 -10z" />
+    <glyph glyph-name="ion-ios-person-outline" unicode="&#xf47d;" horiz-adv-x="320" 
+d="M106 246v0v0zM267 84c13 -5 53 -20 53 -52h-160h-160c0 32 40 47 53 52s31 6 43 9c7 2 17 5 20 9s1 41 1 41s-6 10 -9 18s-7 32 -7 32s-7 0 -9 12c-2 13 -6 17 -6 27c0 9 5 10 5 10v0s-4 13 -5 42c-1 34 25 68 74 68s75 -34 74 -68c-1 -29 -5 -42 -5 -42v0s5 -1 5 -10
+c0 -10 -3 -15 -6 -28c-2 -12 -9 -12 -9 -12s-4 -23 -7 -31s-9 -18 -9 -18s-2 -37 1 -41s13 -7 20 -9c12 -3 30 -4 43 -9zM160 48v0h137c-2 3 -4 6 -8 8c-7 5 -16 9 -27 13c-7 2 -17 4 -26 5c-6 1 -10 2 -15 3c-3 1 -21 5 -29 15c-4 5 -6 12 -6 32c0 10 1 20 1 20v4l2 4
+c1 2 6 9 8 15c2 5 5 19 6 28c0 0 0 -1 1 4s8 4 9 8s3 7 5 18s-5 12 -5 17c0 4 1 5 1 5v0c0 1 4 14 4 38c0 13 -5 26 -14 35c-11 11 -25 16 -44 16c-18 0 -34 -5 -45 -16c-9 -9 -13 -22 -13 -35c1 -24 4 -37 4 -38v0s1 -3 0 -6c-1 -5 -6 -5 -4 -16s4 -14 5 -18s8 -3 9 -8
+s1 -4 1 -4c1 -9 4 -23 6 -28c2 -6 6 -13 8 -15l2 -4v-4s1 -10 1 -20c0 -20 -2 -27 -6 -32c-8 -10 -26 -14 -29 -15c-5 -1 -10 -2 -16 -3c-9 -1 -18 -3 -25 -5c-11 -4 -20 -8 -27 -13c-4 -2 -6 -5 -8 -8h137z" />
+    <glyph glyph-name="ion-ios-person" unicode="&#xf47e;" horiz-adv-x="320" 
+d="M267 84c13 -5 53 -20 53 -52h-160h-160c0 32 40 47 53 52s31 6 43 9c7 2 17 5 20 9s1 41 1 41s-6 10 -9 18s-7 32 -7 32s-7 0 -9 12c-2 13 -6 17 -6 27c0 9 5 10 5 10v0s-4 13 -5 42c-1 34 25 68 74 68s75 -34 74 -68c-1 -29 -5 -42 -5 -42v0s5 -1 5 -10
+c0 -10 -3 -15 -6 -28c-2 -12 -9 -12 -9 -12s-4 -23 -7 -31s-9 -18 -9 -18s-2 -37 1 -41s13 -7 20 -9c12 -3 30 -4 43 -9z" />
+    <glyph glyph-name="ion-ios-personadd-outline" unicode="&#xf47f;" horiz-adv-x="320" 
+d="M320 295v-14h-25v-25h-14v25h-25v14h25v25h14v-25h25zM106 246v0v0zM267 84c13 -5 53 -20 53 -52h-160h-160c0 32 40 47 53 52s31 6 43 9c7 2 17 5 20 9s1 41 1 41s-6 10 -9 18s-7 32 -7 32s-7 0 -9 12c-2 13 -6 17 -6 27c0 9 5 10 5 10v0s-4 13 -5 42c-1 34 25 68 74 68
+s75 -34 74 -68c-1 -29 -5 -42 -5 -42v0s5 -1 5 -10c0 -10 -3 -15 -6 -28c-2 -12 -9 -12 -9 -12s-4 -23 -7 -31s-9 -18 -9 -18s-2 -37 1 -41s13 -7 20 -9c12 -3 30 -4 43 -9zM160 48v0h137c-2 3 -4 6 -8 8c-7 5 -16 9 -27 13c-7 2 -17 4 -26 5c-6 1 -10 2 -15 3
+c-3 1 -21 5 -29 15c-4 5 -6 12 -6 32c0 10 1 20 1 20v4l2 4c1 2 6 9 8 15c2 5 5 19 6 28c0 0 0 -1 1 4s8 4 9 8s3 7 5 18s-5 12 -5 17c0 4 1 5 1 5v0c0 1 4 14 4 38c0 13 -5 26 -14 35c-11 11 -25 16 -44 16c-18 0 -34 -5 -45 -16c-9 -9 -13 -22 -13 -35c1 -24 4 -37 4 -38
+v0s1 -3 0 -6c-1 -5 -6 -5 -4 -16s4 -14 5 -18s8 -3 9 -8s1 -4 1 -4c1 -9 4 -23 6 -28c2 -6 6 -13 8 -15l2 -4v-4s1 -10 1 -20c0 -20 -2 -27 -6 -32c-8 -10 -26 -14 -29 -15c-5 -1 -10 -2 -16 -3c-9 -1 -18 -3 -25 -5c-11 -4 -20 -8 -27 -13c-4 -2 -6 -5 -8 -8h137z" />
+    <glyph glyph-name="ion-ios-personadd" unicode="&#xf480;" horiz-adv-x="320" 
+d="M320 295v-14h-25v-25h-14v25h-25v14h25v25h14v-25h25zM267 84c13 -5 53 -20 53 -52h-160h-160c0 32 40 47 53 52s31 6 43 9c7 2 17 5 20 9s1 41 1 41s-6 10 -9 18s-7 32 -7 32s-7 0 -9 12c-2 13 -6 17 -6 27c0 9 5 10 5 10v0s-4 13 -5 42c-1 34 25 68 74 68
+s75 -34 74 -68c-1 -29 -5 -42 -5 -42v0s5 -1 5 -10c0 -10 -3 -15 -6 -28c-2 -12 -9 -12 -9 -12s-4 -23 -7 -31s-9 -18 -9 -18s-2 -37 1 -41s13 -7 20 -9c12 -3 30 -4 43 -9z" />
+    <glyph glyph-name="ion-ios-photos-outline" unicode="&#xf481;" 
+d="M64 320h384v-320h-384v320zM432 16v288h-352v-288h352zM0 384h384v-48h-16v32h-352v-288h32v-16h-48v320z" />
+    <glyph glyph-name="ion-ios-photos" unicode="&#xf482;" 
+d="M64 320h384v-320h-384v320zM384 384v-48h-336v-272h-48v320h384z" />
+    <glyph glyph-name="ion-ios-pie-outline" unicode="&#xf483;" 
+d="M256 367v0v-207v-12l-12 -4l-180 -45c6 -13 13 -25 21 -36c12 -16 25 -30 41 -42c33 -24 73 -37 114 -37c26 0 51 5 75 15c23 10 43 23 61 41s31 38 41 61c10 24 15 49 15 75c0 51 -20 100 -56 136c-32 32 -75 51 -120 55zM240 384v0c115 0 208 -93 208 -208
+s-93 -208 -208 -208c-92 0 -171 60 -198 143l198 49v224zM208 400c-31 -1 -60 -7 -85 -18c-24 -11 -44 -26 -61 -46c-29 -34 -46 -80 -46 -127v0v0c0 -13 3 -46 12 -70l180 46v215zM224 416v0v-244l-205 -52c-19 32 -19 89 -19 89c0 91 58 207 218 207h6z" />
+    <glyph glyph-name="ion-ios-pie" unicode="&#xf484;" 
+d="M240 384v0c115 0 208 -93 208 -208s-93 -208 -208 -208c-92 0 -171 60 -198 143l198 49v224zM224 416v0v-244l-205 -52c-19 32 -19 89 -19 89c0 91 58 207 218 207h6z" />
+    <glyph glyph-name="ion-ios-pint-outline" unicode="&#xf485;" horiz-adv-x="224" 
+d="M224 278c0 -98 -32 -101 -32 -181c0 -40 16 -71 16 -99c0 -27 -9 -30 -32 -30h-128c-23 0 -32 2 -32 29c0 28 16 60 16 100c0 80 -32 83 -32 181c0 21 1 89 19 125c4 9 13 13 32 13h122c19 0 28 -4 32 -13c18 -36 19 -104 19 -125zM34 396c-8 -16 -14 -43 -17 -76h190
+c-3 33 -9 60 -17 76c-1 2 -1 1 -2 2c-2 1 -6 2 -15 2h-122c-9 0 -13 -1 -15 -2c-1 -1 -1 0 -2 -2zM191 -15c0 1 1 5 1 13c0 11 -4 23 -7 37c-4 18 -9 39 -9 62c0 41 8 64 16 86c8 23 16 46 16 95c0 9 -1 18 -1 26h-190c0 -8 -1 -17 -1 -26c0 -49 8 -72 16 -95
+c8 -22 16 -45 16 -86c0 -23 -5 -44 -9 -62c-3 -14 -7 -26 -7 -37c0 -8 1 -12 1 -13c2 -1 7 -1 15 -1h128c8 0 13 0 15 1z" />
+    <glyph glyph-name="ion-ios-pint" unicode="&#xf486;" horiz-adv-x="224" 
+d="M224 278c0 -98 -32 -101 -32 -181c0 -40 16 -71 16 -99c0 -27 -9 -30 -32 -30h-128c-23 0 -32 2 -32 29c0 28 16 60 16 100c0 80 -32 83 -32 181c0 21 1 89 19 125c4 9 13 13 32 13h122c19 0 28 -4 32 -13c18 -36 19 -104 19 -125zM34 396c-8 -16 -14 -43 -17 -76h190
+c-3 33 -9 60 -17 76c-1 2 -1 1 -2 2c-2 1 -6 2 -15 2h-122c-9 0 -13 -1 -15 -2c-1 -1 -1 0 -2 -2z" />
+    <glyph glyph-name="ion-ios-play-outline" unicode="&#xf487;" horiz-adv-x="256" 
+d="M16 323v-262l210 131zM0 352v0l256 -160l-256 -160v320z" />
+    <glyph glyph-name="ion-ios-play" unicode="&#xf488;" horiz-adv-x="256" 
+d="M0 352v0l256 -160l-256 -160v320z" />
+    <glyph glyph-name="ion-ios-plus-empty" unicode="&#xf489;" horiz-adv-x="256" 
+d="M256 183h-120v-119h-17v119h-119v17h119v120h17v-120h120v-17z" />
+    <glyph glyph-name="ion-ios-plus-outline" unicode="&#xf48a;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191zM216 320v-120h120v-17h-120v-119h-17v119h-119v17h119v120h17z" />
+    <glyph glyph-name="ion-ios-plus" unicode="&#xf48b;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM336 183v17h-120v120h-17v-120h-119v-17h119v-119h17v119h120z" />
+    <glyph glyph-name="ion-ios-pricetag-outline" unicode="&#xf48c;" horiz-adv-x="416" 
+d="M416 416v-160l-256 -288l-160 160l256 288h160zM400 264v136h-136l-240 -272l136 -136zM320 288c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM320 336c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16z" />
+    <glyph glyph-name="ion-ios-pricetag" unicode="&#xf48d;" horiz-adv-x="416" 
+d="M304 320c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16s-16 5 -16 16zM256 416h160v-160l-256 -288l-160 160zM320 288c9 0 16 4 22 10s10 13 10 22s-4 16 -10 22s-13 10 -22 10s-16 -4 -22 -10s-10 -13 -10 -22s4 -16 10 -22s13 -10 22 -10z" />
+    <glyph glyph-name="ion-ios-pricetags-outline" unicode="&#xf48e;" 
+d="M416 384h32v-144l-240 -272l-25 24l-23 -24l-160 160l256 288h160v-32zM160 -9l12 12l11 12l217 248v105v16v16h-137l-241 -272zM432 247v121h-16v-112l-221 -253l13 -12zM320 288c-18 0 -32 14 -32 32s14 32 32 32s32 -14 32 -32s-14 -32 -32 -32zM320 336
+c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16z" />
+    <glyph glyph-name="ion-ios-pricetags" unicode="&#xf48f;" 
+d="M432 384h16v-144l-240 -272l-13 13l237 266v137zM256 416h160v-32v-16v-112l-221 -253l-12 -11l-23 -24l-160 160zM320 288c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM304 320c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16s-16 5 -16 16z" />
+    <glyph glyph-name="ion-ios-printer-outline" unicode="&#xf490;" horiz-adv-x="416" 
+d="M384 336c18 0 32 -13 32 -31v-159c0 -18 -14 -32 -32 -32h-48v-114h-256v114h-48c-18 0 -32 14 -32 32v159c0 18 14 31 32 31h32v48h288v-48h32zM80 368v-32h256v32h-256zM320 16v192h-224v-192h224zM400 146v159c0 9 -7 15 -16 15v0h-352c-9 0 -16 -6 -16 -15v-159
+c0 -9 7 -16 16 -16h48v94h256v-94h48c9 0 16 7 16 16z" />
+    <glyph glyph-name="ion-ios-printer" unicode="&#xf491;" horiz-adv-x="416" 
+d="M80 0v224h256v-224h-256zM80 -0v224h256v-224h-256zM64 352v32h288v-32h-288zM385 336c18 0 31 -14 31 -31v-158c0 -17 -13 -34 -31 -34h-33v126h-288v-126h-31c-18 0 -33 17 -33 34v158c0 17 15 31 33 31h352z" />
+    <glyph glyph-name="ion-ios-pulse-strong" unicode="&#xf492;" horiz-adv-x="480" 
+d="M432 175c27 0 48 -20 48 -47s-21 -49 -48 -49c-21 0 -38 13 -45 31h-51c-7 0 -13 4 -15 11l-16 47l-50 -173c-2 -7 -8 -11 -15 -11h-1c-7 0 -14 5 -15 12l-51 308l-45 -182c-2 -7 -9 -12 -16 -12h-112v32h99l61 245c2 7 8 13 16 13s15 -7 16 -14l52 -314l45 155
+c2 7 8 11 15 11v0c7 0 13 -4 15 -11l29 -85h38c6 19 25 33 46 33z" />
+    <glyph glyph-name="ion-ios-pulse" unicode="&#xf493;" 
+d="M416 160c18 0 32 -14 32 -32s-14 -32 -32 -32c-15 0 -27 10 -31 23h-65c-3 0 -7 2 -8 5l-23 72l-57 -198c-1 -3 -4 -6 -8 -6v0c-4 0 -7 3 -8 7l-58 346l-54 -220c-1 -4 -4 -6 -8 -6h-96v16h90l62 251c1 4 4 6 8 6s7 -3 8 -7l58 -349l54 190c1 3 4 5 8 5s7 -2 8 -5l30 -91
+h59c3 14 16 25 31 25z" />
+    <glyph glyph-name="ion-ios-rainy-outline" unicode="&#xf494;" horiz-adv-x="288" 
+d="M220 269c38 0 68 -33 68 -71c0 -29 -19 -56 -45 -66l-55 -80c-2 -2 -5 -4 -8 -4c-5 0 -8 3 -8 8c0 2 1 4 2 6l46 66v0h-35l-31 -44c-2 -2 -4 -4 -7 -4c-5 0 -9 3 -9 8c0 2 1 3 2 5l25 35h-37l-53 -76c-2 -2 -4 -4 -7 -4c-5 0 -9 3 -9 8c0 2 2 4 3 6l46 66h-36l-32 -44
+c-2 -2 -4 -4 -7 -4c-5 0 -8 3 -8 8c0 2 1 4 2 6l25 34c-29 2 -52 27 -52 56c0 28 22 58 50 60c0 3 -1 5 -1 8c0 46 31 84 82 84c45 0 73 -31 81 -68c3 0 5 1 8 1zM220 146c28 0 52 24 52 52s-24 54 -52 54h-6l-15 -2l-3 15c-3 14 -11 31 -23 40c-12 10 -26 14 -41 14
+c-36 0 -66 -31 -66 -67v-12v-10c-6 0 -12 -2 -14 -2c-20 -3 -35 -23 -35 -43c0 -10 4 -20 11 -27s16 -12 26 -12h124v0v0h42z" />
+    <glyph glyph-name="ion-ios-rainy" unicode="&#xf495;" horiz-adv-x="288" 
+d="M220 269c38 0 68 -33 68 -71c0 -29 -19 -56 -45 -66l-55 -80c-2 -2 -5 -4 -8 -4c-5 0 -8 3 -8 8c0 2 1 4 2 6l46 66v0h-35l-31 -44c-2 -2 -4 -4 -7 -4c-5 0 -9 3 -9 8c0 2 1 3 2 5l25 35h-37l-53 -76c-2 -2 -4 -4 -7 -4c-5 0 -9 3 -9 8c0 2 2 4 3 6l46 66h-36l-32 -44
+c-2 -2 -4 -4 -7 -4c-5 0 -8 3 -8 8c0 2 1 4 2 6l25 34c-29 2 -52 27 -52 56c0 28 22 58 50 60c0 3 -1 5 -1 8c0 46 31 84 82 84c45 0 73 -31 81 -68c3 0 5 1 8 1z" />
+    <glyph glyph-name="ion-ios-recording-outline" unicode="&#xf496;" horiz-adv-x="480" 
+d="M370 304c61 0 110 -50 110 -112s-49 -112 -110 -112h-260c-61 0 -110 50 -110 112s49 112 110 112s110 -50 110 -112c0 -40 -21 -75 -53 -95h146c-32 20 -53 55 -53 95c0 62 49 112 110 112zM16 192c0 -53 42 -95 94 -95s93 42 93 95s-41 95 -93 95s-94 -42 -94 -95z
+M370 97c52 0 94 42 94 95s-42 95 -94 95s-93 -42 -93 -95s41 -95 93 -95zM368 240c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM368 256v0c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM112 240c-26 0 -48 -22 -48 -48
+s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM112 256v0c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64z" />
+    <glyph glyph-name="ion-ios-recording" unicode="&#xf497;" horiz-adv-x="480" 
+d="M370 304c61 0 110 -50 110 -112s-49 -112 -110 -112h-260c-61 0 -110 50 -110 112s49 112 110 112s110 -50 110 -112c0 -40 -21 -76 -53 -95h146c-32 19 -53 55 -53 95c0 62 49 112 110 112zM112 128c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64z
+M368 128c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64zM368 240c26 0 48 -22 48 -48s-22 -48 -48 -48s-48 22 -48 48s22 48 48 48zM112 240c26 0 48 -22 48 -48s-22 -48 -48 -48s-48 22 -48 48s22 48 48 48z" />
+    <glyph glyph-name="ion-ios-redo-outline" unicode="&#xf498;" horiz-adv-x="384" 
+d="M0 48v32c0 17 -3 83 49 136c35 36 80 53 143 56v80l192 -128l-192 -128v80c-40 -1 -63 -9 -87 -20c-31 -14 -55 -44 -75 -77l-20 -31h-10zM208 256c-201 0 -192 -169 -192 -169c48 81 101 105 192 105v-65l148 97l-148 97v-65z" />
+    <glyph glyph-name="ion-ios-redo" unicode="&#xf499;" horiz-adv-x="384" 
+d="M0 48v32c0 17 -3 83 49 136c35 36 80 53 143 56v80l192 -128l-192 -128v80c-40 -1 -63 -9 -87 -20c-31 -14 -55 -44 -75 -77l-20 -31h-10z" />
+    <glyph glyph-name="ion-ios-refresh-empty" unicode="&#xf49a;" horiz-adv-x="256" 
+d="M128 64c-71 0 -128 57 -128 128s57 128 128 128v44l96 -64l-96 -56v56c-60 0 -108 -48 -108 -108s48 -108 108 -108s108 48 108 108h20c0 -71 -57 -128 -128 -128z" />
+    <glyph glyph-name="ion-ios-refresh-outline" unicode="&#xf49b;" horiz-adv-x="416" 
+d="M316 192v0h20c0 -71 -57 -128 -128 -128s-128 57 -128 128s57 128 128 128v44l96 -64l-96 -56v56c-60 0 -108 -48 -108 -108s48 -108 108 -108s108 48 108 108zM208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 1
+c105 0 191 86 191 191s-86 191 -191 191s-191 -86 -191 -191s86 -191 191 -191z" />
+    <glyph glyph-name="ion-ios-refresh" unicode="&#xf49c;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM208 64c71 0 128 57 128 128h-20c0 -60 -48 -108 -108 -108s-108 48 -108 108s48 108 108 108v-56l96 56l-96 64v-44c-71 0 -128 -57 -128 -128s57 -128 128 -128z" />
+    <glyph glyph-name="ion-ios-reload" unicode="&#xf49d;" 
+d="M192 384c106 0 192 -86 192 -192l55 53l9 -9l-70 -68l-67 68l9 9l51 -52c0 98 -80 178 -179 178s-179 -80 -179 -179s80 -179 179 -179c79 0 146 50 170 121l12 -3c-26 -76 -97 -131 -182 -131c-106 0 -192 86 -192 192s86 192 192 192z" />
+    <glyph glyph-name="ion-ios-reverse-camera-outline" unicode="&#xf49e;" horiz-adv-x="384" 
+d="M238 129l2 2l11 -12l-2 -2c-16 -14 -36 -21 -57 -21c-45 0 -82 36 -87 78h-30l38 50l39 -50h-31c5 -33 35 -62 71 -62c17 0 33 6 46 17zM252 249c16 -14 25 -37 27 -57h30l-38 -51l-39 51h31c-5 35 -35 64 -71 64c-17 0 -33 -6 -46 -17l-2 -2l-11 12l2 2
+c16 14 36 21 57 21c22 0 44 -8 60 -23zM354 288c18 0 30 -14 30 -31v-176c0 -17 -12 -33 -30 -33h-320c-18 0 -34 16 -34 33v176c0 17 16 31 34 31h13v16h34v-16h13c32 36 43 48 55 48h88c12 0 23 -12 55 -48h62zM368 81v176c0 9 -5 15 -14 15h-62h-6s-4 1 -6 3s-6 8 -9 11
+c-12 13 -21 24 -27 30c-5 5 -7 4 -7 4h-88s-1 0 -6 -4c-6 -5 -15 -14 -26 -27c-3 -4 -8 -11 -11 -14s-4 -3 -6 -3h-6h-60c-9 0 -18 -7 -18 -15v-176c0 -9 9 -17 18 -17h320c8 0 14 8 14 17z" />
+    <glyph glyph-name="ion-ios-reverse-camera" unicode="&#xf49f;" horiz-adv-x="384" 
+d="M354 288c18 0 30 -14 30 -31v-176c0 -17 -12 -33 -30 -33h-320c-18 0 -34 16 -34 33v176c0 17 16 31 34 31h13v16h34v-16h13c32 36 43 48 55 48h88c12 0 23 -12 55 -48h62zM249 117l2 2l-11 12l-2 -2c-13 -11 -29 -17 -46 -17c-36 0 -66 29 -71 62h31l-39 50l-38 -50h30
+c5 -42 42 -78 87 -78c21 0 41 7 57 21zM271 141l38 51h-30c-2 20 -11 43 -27 57c-16 15 -38 23 -60 23c-21 0 -41 -7 -57 -21l-2 -2l11 -12l2 2c13 11 29 17 46 17c36 0 66 -29 71 -64h-31z" />
+    <glyph glyph-name="ion-ios-rewind-outline" unicode="&#xf4a0;" 
+d="M432 293l-184 -101l184 -101v202zM208 292v0l-176 -100l176 -100v95v27v78zM224 320v0v-123l224 123v-256l-224 123v-123l-224 128z" />
+    <glyph glyph-name="ion-ios-rewind" unicode="&#xf4a1;" 
+d="M224 320v0v-123l224 123v-256l-224 123v-123l-224 128z" />
+    <glyph glyph-name="ion-ios-rose-outline" unicode="&#xf4a2;" horiz-adv-x="320" 
+d="M284 295c-4 -1 -9 -3 -13 -4c-37 -11 -71 -24 -103 -39c-17 -8 -24 -12 -44 -24l-7 -4c-31 -18 -50 -33 -63 -51c-15 -21 -22 -45 -22 -77c0 -16 3 -30 9 -44c6 -13 14 -26 25 -36c23 -21 55 -32 94 -32s71 11 94 32c11 10 19 23 25 36c6 14 9 28 9 44c0 20 -5 40 -11 60
+c-11 40 -23 83 7 139zM320 320v0c-77 -96 -16 -151 -16 -224s-56 -128 -144 -128s-144 55 -144 128s35 109 93 142c25 14 33 19 52 28c30 14 65 28 105 40c17 5 35 10 54 14zM38 325c14 -28 18 -57 19 -83c9 7 20 13 30 20c7 4 14 9 21 13c5 3 10 6 16 9c-5 4 -11 7 -17 11
+c-22 13 -48 23 -69 30zM0 352v0s66 -15 115 -43c15 -8 28 -18 37 -29c-12 -6 -24 -12 -36 -19c-7 -4 -14 -8 -20 -12c-25 -16 -44 -31 -57 -42c5 41 2 98 -39 145zM249 367c-8 -1 -20 -2 -35 -7c-25 -8 -47 -20 -64 -36c8 -6 15 -12 21 -18c29 12 65 26 95 34
+c-5 10 -12 20 -17 27zM256 384v0s26 -32 32 -55c-33 -8 -84 -25 -121 -42l-3 3c-9 11 -22 22 -39 32c52 60 131 62 131 62zM85 394c-6 -10 -10 -20 -14 -28c12 -4 22 -10 36 -17c4 5 9 10 14 14c-13 15 -27 25 -36 31zM80 416v0s35 -16 64 -56c-12 -9 -23 -20 -33 -31
+c-26 13 -40 21 -61 27c5 15 15 38 30 60z" />
+    <glyph glyph-name="ion-ios-rose" unicode="&#xf4a3;" horiz-adv-x="320" 
+d="M320 320v0c-77 -96 -16 -151 -16 -224s-56 -128 -144 -128s-144 55 -144 128s35 109 93 142c25 14 33 19 52 28c30 14 65 28 105 40c17 5 35 10 54 14zM0 352v0s66 -15 115 -43c15 -8 28 -18 37 -29c-12 -6 -24 -12 -36 -19c-7 -4 -14 -8 -20 -12
+c-25 -16 -44 -31 -57 -42c5 41 2 98 -39 145zM256 384v0s26 -32 32 -55c-33 -8 -84 -25 -121 -42l-3 3c-9 11 -22 22 -39 32c52 60 131 62 131 62zM80 416v0s35 -16 64 -56c-12 -9 -23 -20 -33 -31c-26 13 -40 21 -61 27c5 15 15 38 30 60z" />
+    <glyph glyph-name="ion-ios-search-strong" unicode="&#xf4a4;" horiz-adv-x="384" 
+d="M280 150l-4 -7l108 -109l-34 -34l-108 109l-7 -5c-24 -15 -53 -25 -83 -25c-84 0 -152 69 -152 153s68 152 152 152s152 -68 152 -152c0 -30 -9 -58 -24 -82zM237 317c-23 23 -53 35 -85 35s-62 -12 -85 -35s-35 -53 -35 -85s12 -62 35 -85s53 -35 85 -35s62 12 85 35
+s36 53 36 85s-13 62 -36 85z" />
+    <glyph glyph-name="ion-ios-search" unicode="&#xf4a5;" horiz-adv-x="384" 
+d="M384 23l-23 -23l-113 113c-26 -21 -60 -33 -96 -33c-84 0 -152 68 -152 152s68 152 152 152s152 -68 152 -152c0 -36 -12 -69 -33 -95zM56 135c26 -26 60 -39 96 -39s70 14 96 40s40 60 40 96s-14 70 -40 96s-60 40 -96 40s-70 -14 -96 -40s-40 -60 -40 -96
+s14 -71 40 -97z" />
+    <glyph glyph-name="ion-ios-settings-strong" unicode="&#xf4a6;" 
+d="M0 72h283c6 14 21 24 37 24s31 -10 37 -24h91v-32h-91c-6 -14 -21 -24 -37 -24s-31 10 -37 24h-283zM0 208h91c6 14 21 24 37 24s31 -10 37 -24h283v-32h-283c-6 -14 -21 -24 -37 -24s-31 10 -37 24h-91zM0 344h283c6 14 21 24 37 24s31 -10 37 -24h91v-32h-91
+c-6 -14 -21 -24 -37 -24s-31 10 -37 24h-283z" />
+    <glyph glyph-name="ion-ios-settings" unicode="&#xf4a7;" 
+d="M320 344c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16zM320 360v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM320 72c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16zM320 88v0c18 0 32 -14 32 -32s-14 -32 -32 -32
+s-32 14 -32 32s14 32 32 32zM128 208c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16zM128 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM175 200h273v-16h-273c0 3 1 5 1 8s-1 5 -1 8zM80 192c0 -3 1 -5 1 -8h-81v16h81
+c0 -3 -1 -5 -1 -8zM367 64h81v-16h-81c0 3 1 5 1 8s-1 5 -1 8zM272 56c0 -3 1 -5 1 -8h-273v16h273c0 -3 -1 -5 -1 -8zM367 336h81v-16h-81c0 3 1 5 1 8s-1 5 -1 8zM273 336c0 -3 -1 -5 -1 -8s1 -5 1 -8h-273v16h273z" />
+    <glyph glyph-name="ion-ios-shuffle-strong" unicode="&#xf4a8;" horiz-adv-x="384" 
+d="M301 296c-85 0 -119 -64 -152 -126c-1 -3 -3 -5 -4 -8l-1 -1c-2 -3 -2 -5 -4 -8c-21 -38 -43 -68 -68 -83c-15 -9 -34 -18 -72 -18v32c45 0 76 18 112 84c2 3 2 6 4 9h1c1 2 3 4 4 7c34 64 76 144 180 144h15l-52 43l21 25l99 -84l-99 -82l-21 24l51 42h-14zM285 154
+l99 -82l-99 -84l-21 25l52 43h-15c-78 0 -122 45 -153 95l18 33c29 -51 64 -96 135 -96h14l-51 42zM112 216c-36 66 -67 84 -112 84v32c38 0 57 -9 72 -18c25 -15 47 -44 67 -81c-7 -11 -13 -22 -19 -33c-1 2 -2 5 -3 7h-1c-2 3 -2 6 -4 9z" />
+    <glyph glyph-name="ion-ios-shuffle" unicode="&#xf4a9;" horiz-adv-x="384" 
+d="M298 241l-10 12l62 51h-46c-93 0 -129 -75 -164 -139c-2 -3 -3 -6 -5 -9c-20 -37 -41 -61 -65 -75c-14 -8 -33 -17 -70 -17v16c48 0 83 14 121 84c2 3 3 6 5 9c35 65 75 147 178 147h46l-62 52l10 12l86 -72zM135 228c0 -1 1 -2 1 -3c-3 -5 -6 -11 -9 -16c0 1 -1 1 -1 2
+c-2 3 -3 6 -5 9c-38 70 -73 84 -121 84v16c37 0 56 -9 70 -17c24 -14 45 -38 65 -75zM298 143l86 -71l-86 -72l-10 12l62 52h-46c-76 0 -118 45 -149 95c1 2 2 5 3 7c2 3 4 7 6 10c30 -50 67 -96 140 -96h46l-62 51z" />
+    <glyph glyph-name="ion-ios-skipbackward-outline" unicode="&#xf4aa;" horiz-adv-x="320" 
+d="M0 352h79v-142l241 142v-320l-241 142v-142h-79v320zM80 192l7 -4l217 -128v264v0l-217 -128zM16 336v-288h47v126v8v28v126h-47z" />
+    <glyph glyph-name="ion-ios-skipbackward" unicode="&#xf4ab;" horiz-adv-x="320" 
+d="M0 352h79v-142l241 142v-320l-241 142v-142h-79v320z" />
+    <glyph glyph-name="ion-ios-skipforward-outline" unicode="&#xf4ac;" horiz-adv-x="320" 
+d="M241 352h79v-320h-79v142l-241 -142v320l241 -142v142zM233 188l7 4l-7 4l-217 128v0v-264zM304 48v288h-47v-126v-28v-8v-126h47z" />
+    <glyph glyph-name="ion-ios-skipforward" unicode="&#xf4ad;" horiz-adv-x="320" 
+d="M241 352h79v-320h-79v142l-241 -142v320l241 -142v142z" />
+    <glyph glyph-name="ion-ios-snowy" unicode="&#xf4ae;" horiz-adv-x="256" 
+d="M252 131c4 -2 5 -7 3 -11s-7 -5 -11 -3l-29 17c-2 -8 -2 -16 0 -24c1 -4 -3 -9 -7 -10s-8 2 -9 6c-2 12 -3 24 1 36l-64 36v-73c11 -3 22 -8 31 -16c3 -3 4 -8 1 -11s-8 -4 -11 -1c-6 5 -13 10 -21 12v-33c0 -4 -4 -8 -8 -8s-8 4 -8 8v33c-8 -2 -15 -7 -21 -12
+c-3 -3 -8 -2 -11 1s-3 8 0 11c9 8 20 13 32 16v73l-65 -36c4 -12 4 -23 2 -35c-1 -4 -5 -8 -9 -7s-8 6 -7 10c2 8 2 16 0 24l-29 -17c-4 -2 -9 -1 -11 3s-1 9 3 11l29 16c-6 6 -13 10 -21 13c-4 1 -6 6 -5 10c2 4 6 6 10 5c12 -4 22 -11 30 -19l65 36l-65 37
+c-8 -9 -18 -15 -30 -19c-4 -1 -9 0 -10 4s1 10 5 11c8 3 15 6 21 12l-29 16c-4 2 -5 7 -3 11s7 5 11 3l29 -16c2 8 2 15 0 23c-1 4 3 9 7 10s8 -2 9 -6c2 -12 1 -25 -2 -36l65 -36v73c-12 3 -23 8 -32 16c-3 3 -3 8 0 11s8 4 11 1c6 -5 13 -10 21 -12v33c0 4 4 8 8 8
+s8 -4 8 -8v-33c8 2 15 7 21 12c3 3 8 2 11 -1s2 -8 -1 -11c-9 -8 -20 -13 -31 -16v-73l64 36c-3 11 -4 24 -2 36c1 4 6 7 10 6s7 -6 6 -10c-2 -8 -1 -15 1 -23l29 16c4 2 9 1 11 -3s1 -9 -3 -11l-29 -16c6 -6 13 -10 21 -13c4 -1 6 -6 5 -10s-6 -6 -10 -5
+c-12 4 -23 10 -31 19l-64 -36l64 -36c8 8 19 15 31 19c4 1 9 -1 10 -5s-1 -9 -5 -10c-8 -3 -15 -7 -21 -13z" />
+    <glyph glyph-name="ion-ios-speedometer-outline" unicode="&#xf4af;" 
+d="M224 384c124 0 224 -100 224 -224c0 -57 -21 -108 -56 -148c-4 -4 -7 -8 -11 -12l-10 10l-1 2c-19 18 -41 33 -65 43c-26 11 -53 16 -81 16s-55 -5 -81 -16c-24 -10 -46 -25 -65 -43l-1 -2l-10 -10c-4 4 -7 8 -11 12c-35 40 -56 91 -56 148c0 124 100 224 224 224z
+M416 79c10 23 15 48 16 73h-32v16h32c-1 25 -6 50 -16 73c-9 22 -23 42 -39 60l-27 -27l-6 6l-5 5v0h-1l27 27c-18 17 -38 31 -60 40c-23 10 -48 15 -74 16v-38h-16v38c-25 -1 -49 -6 -72 -16c-22 -10 -43 -23 -61 -40l27 -27v0v0l-6 -6l-5 -5l-27 27
+c-16 -18 -30 -38 -39 -60c-10 -23 -15 -49 -16 -74h32v-16h-32c1 -25 6 -49 16 -72c9 -20 20 -39 35 -56c40 40 96 64 157 64s117 -24 157 -64c15 17 26 36 35 56zM336 273l2 -1l-75 -84c6 -8 9 -18 9 -28c0 -26 -22 -48 -48 -48c-10 0 -19 4 -27 9l-13 -12l-11 11l12 12
+c-6 8 -9 18 -9 28c0 26 22 48 48 48c10 0 19 -3 27 -8zM224 128c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-ios-speedometer" unicode="&#xf4b0;" 
+d="M385 169v-15h30c-1 -22 -6 -44 -15 -65c-8 -18 -19 -35 -32 -50c-39 37 -90 58 -144 58s-105 -21 -144 -58c-13 15 -24 32 -32 50c-9 21 -14 43 -15 65h28h1v16h-29c1 23 6 45 15 66c9 20 20 38 35 54l25 -24l10 10l1 1v0v0l-25 25c16 15 36 26 56 35c21 9 43 14 66 15
+v-34h14h1v34c23 -1 46 -6 67 -15s39 -20 55 -35l-24 -25l11 -11l25 25c15 -16 26 -35 35 -55c9 -21 14 -43 15 -66h-30v-1zM272 160c0 10 -3 20 -9 28l63 76l-2 1l-73 -65c-8 5 -17 8 -27 8c-26 0 -48 -22 -48 -48c0 -10 3 -20 9 -28l-12 -12l11 -11l13 12c8 -5 17 -9 27 -9
+c26 0 48 22 48 48zM224 384c124 0 224 -100 224 -224c0 -57 -21 -108 -56 -148c-4 -4 -7 -8 -11 -12h-23c-32 39 -80 64 -134 64s-102 -25 -134 -64h-23c-4 4 -7 8 -11 12c-35 40 -56 91 -56 148c0 124 100 224 224 224zM379 27c34 37 52 86 52 136c0 55 -22 106 -61 145
+s-91 60 -146 60s-107 -21 -146 -60s-61 -90 -61 -145c0 -50 18 -99 52 -136l10 -10l1 -1v1l9 9l1 1v0c17 17 38 30 60 39c24 10 48 15 74 15s50 -5 74 -15c22 -9 43 -22 60 -39v0l1 -1l9 -9v-1l1 1zM192 160c0 21 11 32 32 32s32 -11 32 -32s-11 -32 -32 -32s-32 11 -32 32z
+" />
+    <glyph glyph-name="ion-ios-star-half" unicode="&#xf4b1;" 
+d="M140 143l-140 98h171l53 159l53 -159h171l-140 -98l54 -159l-138 99l-138 -99zM224 347v-244l107 -76l-43 122l108 75h-131z" />
+    <glyph glyph-name="ion-ios-star-outline" unicode="&#xf4b2;" 
+d="M448 241l-140 -98l54 -159l-138 99l-138 -99l54 159l-140 98h171l53 159l53 -159h171zM331 27l-43 122l108 75h-131l-41 123l-41 -123h-131l108 -75l-43 -122l107 76z" />
+    <glyph glyph-name="ion-ios-star" unicode="&#xf4b3;" 
+d="M448 241l-140 -98l54 -159l-138 99l-138 -99l54 159l-140 98h171l53 159l53 -159h171z" />
+    <glyph glyph-name="ion-ios-stopwatch-outline" unicode="&#xf4b4;" horiz-adv-x="384" 
+d="M334 301c32 -35 50 -80 50 -128c0 -104 -86 -189 -192 -189s-192 85 -192 189c0 48 18 94 51 129l1 1h-18l-8 -8l-23 23l41 40l23 -22l-9 -9v-18c31 30 72 50 116 53h2v38h32v-38c43 -4 82 -21 113 -49l5 -5v19l-9 9l23 22l41 -40l-22 -23l-9 8h-18zM192 2
+c96 0 173 77 173 171s-77 171 -173 171c-95 0 -173 -77 -173 -171s77 -171 173 -171zM200 191c14 -4 24 -17 24 -31c0 -15 -10 -26 -24 -30l-8 -18v0l-8 18c-14 4 -24 15 -24 30c0 14 12 27 24 31v129h16v-129z" />
+    <glyph glyph-name="ion-ios-stopwatch" unicode="&#xf4b5;" horiz-adv-x="384" 
+d="M334 301c32 -35 50 -80 50 -128c0 -104 -86 -189 -192 -189s-192 85 -192 189c0 48 18 94 51 129l1 1h-18l-8 -8l-23 23l41 40l23 -22l-9 -9v-18c31 30 72 50 116 53h2v38h32v-38c43 -4 82 -21 113 -49l5 -5v19l-9 9l23 22l41 -40l-22 -23l-9 8h-18zM200 130
+c14 4 24 15 24 30c0 14 -10 27 -24 31v129h-16v-129c-12 -4 -24 -17 -24 -31c0 -15 10 -26 24 -30l8 -18z" />
+    <glyph glyph-name="ion-ios-sunny-outline" unicode="&#xf4b6;" horiz-adv-x="320" 
+d="M151 296v56h18v-56h-18zM151 32v60h18v-60h-18zM264 183v18h56v-18h-56zM0 183v18h60v-18h-60zM240 130l34 -34l-12 -12l-33 34zM64 306l34 -33l-12 -12l-34 34zM229 272l33 34l12 -12l-34 -33zM52 96l34 34l11 -12l-33 -34zM160 116c-42 0 -76 34 -76 76s34 76 76 76
+s76 -34 76 -76s-34 -76 -76 -76zM160 251c-32 0 -59 -27 -59 -59s27 -59 59 -59s59 27 59 59s-27 59 -59 59z" />
+    <glyph glyph-name="ion-ios-sunny" unicode="&#xf4b7;" horiz-adv-x="320" 
+d="M151 296v56h18v-56h-18zM151 32v60h18v-60h-18zM264 183v18h56v-18h-56zM0 183v18h60v-18h-60zM240 130l34 -34l-12 -12l-33 34zM64 306l34 -33l-12 -12l-34 34zM229 272l33 34l12 -12l-34 -33zM52 96l34 34l11 -12l-33 -34zM160 116c-42 0 -76 34 -76 76s34 76 76 76
+s76 -34 76 -76s-34 -76 -76 -76z" />
+    <glyph glyph-name="ion-ios-telephone-outline" unicode="&#xf4b8;" horiz-adv-x="352" 
+d="M336 112c16 -16 26 -35 0 -66c-25 -30 -42 -30 -64 -30c-24 0 -58 14 -93 40c-32 23 -46 34 -78 67c-34 35 -55 64 -79 107c-27 50 -24 74 -18 92c4 12 14 24 28 33l1 1c6 4 18 12 32 12c13 0 24 -6 34 -18l1 -1c11 -14 24 -31 32 -47c10 -21 10 -38 -1 -53
+c-9 -12 -12 -19 -12 -23s5 -9 13 -18l1 -1c16 -18 20 -23 26 -29c1 -1 3 -2 4 -3l2 -2c7 -7 11 -12 29 -28l1 -1c7 -6 9 -8 12 -8c5 0 16 7 29 15c4 3 11 5 17 5c27 0 68 -29 83 -44zM324 57c19 22 13 31 1 43c-13 14 -50 39 -72 39c-3 0 -6 -1 -8 -2
+c-19 -12 -28 -18 -37 -18s-15 6 -23 13h-1c-19 16 -23 21 -30 29l-2 2c-1 1 -3 2 -4 3c-6 6 -11 12 -27 30v1c-10 11 -17 18 -18 28s5 20 16 34c15 20 -5 48 -31 79l-1 1c-7 8 -14 12 -22 12c-10 0 -18 -6 -23 -9c-1 0 -2 -1 -2 -1c-11 -7 -18 -16 -21 -24
+c-5 -16 -7 -35 17 -79c23 -42 43 -70 76 -104c31 -32 45 -42 76 -64c32 -23 64 -38 84 -38c21 0 32 1 52 25z" />
+    <glyph glyph-name="ion-ios-telephone" unicode="&#xf4b9;" horiz-adv-x="352" 
+d="M336 112c16 -16 26 -35 0 -66c-25 -30 -42 -30 -64 -30c-24 0 -58 14 -93 40c-32 23 -46 34 -78 67c-34 35 -55 64 -79 107c-27 50 -24 74 -18 92c4 12 14 24 28 33l1 1c6 4 18 12 32 12c13 0 24 -6 34 -18l1 -1c11 -14 24 -31 32 -47c10 -21 10 -38 -1 -53
+c-9 -12 -12 -19 -12 -23s5 -9 13 -18l1 -1c16 -18 20 -23 26 -29c1 -1 3 -2 4 -3l2 -2c7 -7 11 -12 29 -28l1 -1c7 -6 9 -8 12 -8c5 0 16 7 29 15c4 3 11 5 17 5c27 0 68 -29 83 -44z" />
+    <glyph glyph-name="ion-ios-tennisball-outline" unicode="&#xf4ba;" horiz-adv-x="416" 
+d="M416 192v-8v0c0 -5 0 -11 -1 -16v0c-11 -97 -90 -174 -187 -183v0h-4h-2s-1 -1 -2 -1h-3h-1h-8c-115 0 -208 93 -208 208s93 208 208 208s208 -93 208 -208zM399 192c0 105 -86 191 -191 191c-3 0 -5 -1 -8 -1c1 -24 6 -46 15 -68c10 -26 26 -49 46 -69s43 -36 69 -46
+c22 -9 44 -14 68 -15c0 3 1 5 1 8zM17 192c0 -105 86 -191 191 -191h4c-1 22 -7 45 -15 66c-10 26 -26 48 -46 68s-42 36 -68 46c-21 8 -44 14 -66 15v-4zM228 2c88 9 158 78 169 166c-54 3 -106 25 -147 66s-63 93 -66 147c-88 -11 -157 -81 -166 -169
+c53 -3 105 -25 145 -65s62 -92 65 -145z" />
+    <glyph glyph-name="ion-ios-tennisball" unicode="&#xf4bb;" horiz-adv-x="416" 
+d="M0 196v0v0v0zM212 -16h1h-1v0zM208 400c115 0 208 -93 208 -208c0 -8 0 -16 -1 -24v0v0c-11 -97 -90 -174 -187 -183v0v0c-6 -1 -13 -1 -20 -1c-115 0 -208 93 -208 208v4v0v0c0 6 0 11 1 16v0v0c9 97 86 176 183 187v0v0c6 1 11 1 16 1v0v0h8zM83 181
+c26 -10 48 -26 68 -46s36 -42 46 -68c8 -21 14 -44 15 -66c5 0 11 0 16 1c-3 53 -25 105 -65 145s-92 62 -145 65c-1 -5 -1 -11 -1 -16c22 -1 45 -7 66 -15zM250 234c41 -41 93 -63 147 -66c1 5 1 11 1 16c-24 1 -46 6 -68 15c-26 10 -49 26 -69 46s-36 43 -46 69
+c-9 22 -14 44 -15 68c-5 0 -11 0 -16 -1c3 -54 25 -106 66 -147z" />
+    <glyph glyph-name="ion-ios-thunderstorm-outline" unicode="&#xf4bc;" horiz-adv-x="274" 
+d="M193 176l-88 -128l29 96h-52l15 80h72l-16 -48h40zM209 275c36 0 65 -29 65 -65s-29 -66 -65 -66h-8v17h8c27 0 49 22 49 49s-22 50 -49 50h-6l-14 -2l-3 14c-3 14 -11 26 -22 35s-25 13 -39 13c-34 0 -63 -27 -63 -62v-12s1 -9 1 -9c-5 0 -12 -2 -14 -2
+c-19 -3 -33 -18 -33 -37c0 -10 3 -19 10 -26s16 -11 26 -11h11v-17h-11c-28 0 -52 24 -52 53c0 27 21 51 47 53v8c0 43 35 78 78 78c37 0 68 -26 76 -61h8z" />
+    <glyph glyph-name="ion-ios-thunderstorm" unicode="&#xf4bd;" horiz-adv-x="274" 
+d="M153 176h40l-22 -32l-66 -96l29 96h-52l15 80h72zM84 240h107l-16 -48h18h30l-33 -48h19c36 0 65 30 65 66s-29 65 -65 65h-8c-8 35 -39 61 -76 61c-43 0 -78 -35 -78 -78v-8c-26 -2 -47 -26 -47 -53c0 -29 24 -53 52 -53h14z" />
+    <glyph glyph-name="ion-ios-time-outline" unicode="&#xf4be;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM371 45c19 19 35 41 45 66c11 26 16 53 16 81s-5 55 -16 81c-10 25 -26 47 -45 66s-41 35 -66 45c-26 11 -53 16 -81 16s-55 -5 -81 -16c-25 -10 -47 -26 -66 -45
+s-35 -41 -45 -66c-11 -26 -16 -53 -16 -81s5 -55 16 -81c10 -25 26 -47 45 -66s41 -35 66 -45c26 -11 53 -16 81 -16s55 5 81 16c25 10 47 26 66 45zM216 368c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM216 16c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM392 192
+c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM40 192c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM128 344c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM304 40c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM368 280c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8
+zM64 104c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM64 280c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM368 104c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM304 344c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM128 40c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8
+s-8 3 -8 8zM238 200c4 -8 2 -18 -6 -22v-122c0 -4 -4 -8 -8 -8s-8 4 -8 8v122c-2 1 -4 4 -6 6c-3 5 -3 11 0 16l-37 63c-2 4 -1 9 3 11s8 1 10 -3l38 -63c5 0 11 -3 14 -8z" />
+    <glyph glyph-name="ion-ios-time" unicode="&#xf4bf;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM224 376c-4 0 -8 -4 -8 -8s4 -8 8 -8s8 4 8 8s-4 8 -8 8zM48 184c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8zM76 97c4 2 4 7 2 11s-6 5 -10 3s-5 -7 -3 -11s7 -5 11 -3z
+M78 276c2 4 2 9 -2 11s-9 1 -11 -3s-1 -9 3 -11s8 -1 10 3zM132 351c-4 -2 -5 -7 -3 -11s7 -4 11 -2s5 6 3 10s-7 5 -11 3zM143 36c2 4 1 8 -3 10s-9 2 -11 -2s-1 -9 3 -11s9 -1 11 3zM224 8c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8zM232 178c8 4 10 14 6 22
+c-3 5 -9 8 -14 8l-38 64c-2 4 -7 4 -11 2s-4 -7 -2 -11l37 -63c-3 -5 -3 -11 0 -16c2 -2 4 -5 6 -6v-122c0 -4 4 -8 8 -8s8 4 8 8v122zM316 33c4 2 5 7 3 11s-7 4 -11 2s-5 -6 -3 -10s7 -5 11 -3zM319 340c2 4 1 9 -3 11s-9 1 -11 -3s-1 -8 3 -10s9 -2 11 2zM383 100
+c2 4 1 9 -3 11s-8 1 -10 -3s-2 -9 2 -11s9 -1 11 3zM380 273c4 2 5 7 3 11s-7 5 -11 3s-4 -7 -2 -11s6 -5 10 -3zM400 184c4 0 8 4 8 8s-4 8 -8 8s-8 -4 -8 -8s4 -8 8 -8z" />
+    <glyph glyph-name="ion-ios-timer-outline" unicode="&#xf4c0;" horiz-adv-x="416" 
+d="M189 176l-1 2s-89 118 -86 120s121 -85 121 -85c1 -1 1 -2 2 -3c5 -5 8 -11 8 -18c0 -14 -11 -25 -25 -25c-8 0 -14 3 -19 9zM208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208c0 57 23 109 61 147l12 -12c-35 -35 -56 -82 -56 -135
+c0 -106 85 -191 191 -191s191 85 191 191c0 100 -77 183 -175 191v-95h-16v112v0v0z" />
+    <glyph glyph-name="ion-ios-timer" unicode="&#xf4c1;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208s-208 93 -208 208s93 208 208 208zM102 298c-2 -2 86 -120 86 -120l1 -1c5 -6 11 -10 19 -10c14 0 25 11 25 25c0 7 -3 13 -8 18l-3 3c0 0 -117 87 -120 85zM208 1c106 0 192 85 192 191s-86 192 -192 192v-96h16v78
+c88 -9 158 -84 158 -174c0 -96 -78 -174 -174 -174s-175 78 -175 174c0 48 19 92 51 124l-11 12c-35 -35 -56 -83 -56 -136c0 -106 85 -191 191 -191z" />
+    <glyph glyph-name="ion-ios-toggle-outline" unicode="&#xf4c2;" 
+d="M96 128c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM96 144v0c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM351 160v0h-255c-44 0 -80 -36 -80 -80s36 -80 80 -80h256c44 0 80 36 80 80s-37 80 -81 80zM352 176v0
+c53 0 96 -43 96 -96s-43 -96 -96 -96h-256c-53 0 -96 43 -96 96s43 96 96 96h256zM352 352c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48s-22 48 -48 48zM352 368v0c35 0 64 -29 64 -64s-29 -64 -64 -64s-64 29 -64 64s29 64 64 64zM97 384v0c-44 0 -81 -36 -81 -80
+s36 -80 80 -80h256c44 0 80 36 80 80s-36 80 -80 80h-255zM96 400v0h256c53 0 96 -43 96 -96s-43 -96 -96 -96h-256c-53 0 -96 43 -96 96s43 96 96 96z" />
+    <glyph glyph-name="ion-ios-toggle" unicode="&#xf4c3;" 
+d="M96 128c26 0 48 -22 48 -48s-22 -48 -48 -48s-48 22 -48 48s22 48 48 48zM352 176c53 0 96 -43 96 -96s-43 -96 -96 -96h-256c-53 0 -96 43 -96 96s43 96 96 96h256zM96 16c35 0 64 29 64 64s-29 64 -64 64s-64 -29 -64 -64s29 -64 64 -64zM352 256c-26 0 -48 22 -48 48
+s22 48 48 48s48 -22 48 -48s-22 -48 -48 -48zM96 208c-53 0 -96 43 -96 96s43 96 96 96h256c53 0 96 -43 96 -96s-43 -96 -96 -96h-256zM352 368c-35 0 -64 -29 -64 -64s29 -64 64 -64s64 29 64 64s-29 64 -64 64z" />
+    <glyph glyph-name="ion-ios-trash-outline" unicode="&#xf4c4;" horiz-adv-x="288" 
+d="M288 335v-15h-20l-24 -291c0 -16 -13 -29 -29 -29h-141c-16 0 -29 13 -29 29l-24 291h-21v15h80v20c0 16 13 29 29 29h70c16 0 29 -13 29 -29v-20h80zM95 355v-20h98v20c0 8 -6 14 -14 14h-70c-8 0 -14 -6 -14 -14zM230 30l23 290h-217l23 -290v0v-1c0 -8 7 -14 15 -14
+h141c8 0 15 6 15 14v1v0zM137 47v241h14v-241h-14zM208 288l-11 -241h-14l10 241h15zM94 288l11 -241h-14l-11 241h14z" />
+    <glyph glyph-name="ion-ios-trash" unicode="&#xf4c5;" horiz-adv-x="288" 
+d="M208 335h80v-15h-20l-24 -291c0 -16 -13 -29 -29 -29h-141c-16 0 -29 13 -29 29l-24 291h-21v15h80v20c0 16 13 29 29 29h70c16 0 29 -13 29 -29v-20zM95 355v0v-20h98v20c0 8 -6 14 -14 14h-70c-8 0 -14 -6 -14 -14zM91 47h14l-11 241h-14zM151 47v241h-14v-241h14z
+M197 47l11 241h-14l-11 -241h14z" />
+    <glyph glyph-name="ion-ios-undo-outline" unicode="&#xf4c6;" horiz-adv-x="384" 
+d="M384 80v-32h-10l-20 31c-20 33 -44 63 -75 77c-24 11 -47 19 -87 20v-80l-192 128l192 128v-80c63 -3 108 -21 143 -56c52 -53 49 -119 49 -136zM368 87c0 0 9 169 -192 169v65l-148 -97l148 -97v65c91 0 144 -24 192 -105z" />
+    <glyph glyph-name="ion-ios-undo" unicode="&#xf4c7;" horiz-adv-x="384" 
+d="M384 80v-32h-10l-20 31c-20 33 -44 63 -75 77c-24 11 -47 19 -87 20v-80l-192 128l192 128v-80c63 -3 108 -21 143 -56c52 -53 49 -119 49 -136z" />
+    <glyph glyph-name="ion-ios-unlocked-outline" unicode="&#xf4c8;" horiz-adv-x="320" 
+d="M160 160c18 0 32 -14 32 -32c0 -15 -10 -27 -24 -31v-33h-16v33c-14 4 -24 16 -24 31c0 18 14 32 32 32zM160 112c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM72 224h248v-240h-320v240h56v72c0 57 47 104 104 104s104 -47 104 -104v-8h-16v8
+c0 49 -39 88 -88 88s-88 -39 -88 -88v-72zM304 0v208h-288v-208h288z" />
+    <glyph glyph-name="ion-ios-unlocked" unicode="&#xf4c9;" horiz-adv-x="320" 
+d="M160 144c9 0 16 -7 16 -16s-7 -16 -16 -16s-16 7 -16 16s7 16 16 16zM72 224h248v-240h-320v240h56v72c0 57 47 104 104 104s104 -47 104 -104v-8h-16v8c0 49 -39 88 -88 88s-88 -39 -88 -88v-72zM168 97c14 4 24 16 24 31c0 18 -14 32 -32 32s-32 -14 -32 -32
+c0 -15 10 -27 24 -31v-33h16v33z" />
+    <glyph glyph-name="ion-ios-upload-outline" unicode="&#xf4ca;" horiz-adv-x="320" 
+d="M192 304h128v-304h-320v304h128v-16h-112v-272h288v272h-112v16zM97 330l-11 12l74 74l74 -74l-11 -12l-55 55v-243h-16v243z" />
+    <glyph glyph-name="ion-ios-upload" unicode="&#xf4cb;" horiz-adv-x="320" 
+d="M168 304h152v-304h-320v304h152v-162h16v162zM168 385v-81h-16v81l-55 -55l-11 12l74 74l74 -74l-11 -12z" />
+    <glyph glyph-name="ion-ios-videocam-outline" unicode="&#xf4cc;" horiz-adv-x="418" 
+d="M257 320c19 0 33 -14 33 -33v-188c0 -19 -14 -35 -33 -35h-221c-19 0 -36 16 -36 35v188c0 19 17 33 36 33h221zM273 99v188c0 9 -8 16 -17 16h-221c-9 0 -18 -7 -18 -16v-188c0 -9 10 -18 19 -18h221c9 0 16 9 16 18zM320 235l98 53v-192l-98 53v86zM401 258v0l-64 -33
+v-66l64 -33v132z" />
+    <glyph glyph-name="ion-ios-videocam" unicode="&#xf4cd;" horiz-adv-x="418" 
+d="M257 320c19 0 33 -14 33 -33v-188c0 -19 -14 -35 -33 -35h-221c-19 0 -36 16 -36 35v188c0 19 17 33 36 33h221zM320 235l98 53v-192l-98 53v86z" />
+    <glyph glyph-name="ion-ios-volume-high" unicode="&#xf4ce;" horiz-adv-x="320" 
+d="M278 320c26 -36 42 -80 42 -128s-16 -92 -42 -128l-14 10c24 33 39 74 39 118s-15 85 -39 118zM224 96l-14 10c18 24 29 54 29 86s-11 62 -29 86l14 10c20 -27 32 -60 32 -96s-12 -69 -32 -96zM177 128l-13 10c12 15 18 34 18 54s-6 39 -18 54l13 10
+c14 -18 22 -40 22 -64s-8 -46 -22 -64zM58 232l70 56v-192l-70 56h-58v80h58z" />
+    <glyph glyph-name="ion-ios-volume-low" unicode="&#xf4cf;" horiz-adv-x="128" 
+d="M58 232l70 56v-192l-70 56h-58v80h58z" />
+    <glyph glyph-name="ion-ios-wineglass-outline" unicode="&#xf4d0;" horiz-adv-x="192" 
+d="M104 139v-155h72v-16h-80h-80v16h72v155c0 22 -20 39 -40 55c-8 6 -16 13 -22 19c-27 28 -26 52 -26 71v4c0 44 31 125 32 128h64h64c1 -3 32 -84 32 -128v-4c0 -19 1 -43 -26 -71c-6 -6 -14 -13 -22 -19c-20 -16 -40 -33 -40 -55zM43 400c-5 -16 -20 -63 -25 -96h156
+c-5 33 -20 80 -25 96h-53h-53zM96 175c3 0 5 0 7 2v0c9 11 20 20 31 29c8 6 15 12 20 18c22 23 22 41 22 60v4h-160v-4c0 -19 0 -37 22 -60c5 -6 12 -12 20 -18c11 -9 22 -18 31 -29v0c2 -2 4 -2 7 -2z" />
+    <glyph glyph-name="ion-ios-wineglass" unicode="&#xf4d1;" horiz-adv-x="192" 
+d="M104 139v-155h72v-16h-80h-80v16h72v155c0 22 -20 39 -40 55c-8 6 -16 13 -22 19c-27 28 -26 52 -26 71v4c0 44 31 125 32 128h64h64c1 -3 32 -84 32 -128v-4c0 -19 1 -43 -26 -71c-6 -6 -14 -13 -22 -19c-20 -16 -40 -33 -40 -55zM43 400c-5 -16 -20 -63 -25 -96h156
+c-5 33 -20 80 -25 96h-53h-53z" />
+    <glyph glyph-name="ion-ios-world-outline" unicode="&#xf4d2;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208v0v0v0c-115 0 -208 93 -208 208s93 208 208 208v0v0v0zM216 276v-76h75c-1 31 -5 60 -11 84c-21 -5 -42 -7 -64 -8zM216 292c20 1 41 3 60 8c-14 46 -38 76 -60 82v-90zM200 382c-23 -6 -45 -36 -60 -82
+c19 -5 39 -7 60 -8v90zM200 276c-22 1 -44 3 -65 8c-6 -24 -10 -53 -11 -84h76v76zM108 200c1 32 4 62 11 88c-21 6 -41 15 -59 25c-26 -31 -41 -70 -43 -113h91zM108 184h-91c2 -43 17 -82 43 -113c19 10 38 19 59 25c-7 26 -10 56 -11 88zM124 184c1 -31 5 -60 11 -84
+c21 5 43 8 65 9v75h-76zM200 92c-21 -1 -41 -3 -60 -8c15 -46 37 -76 60 -82v90zM216 2c22 6 46 36 60 82c-19 5 -40 7 -60 8v-90zM216 109c22 -1 43 -4 64 -9c6 24 10 53 11 84h-75v-75zM308 184c-1 -32 -5 -62 -12 -88c21 -6 41 -15 60 -25c26 31 41 70 43 113h-91z
+M308 200v0h91c-2 43 -17 82 -43 113c-19 -10 -38 -19 -59 -25c7 -26 10 -56 11 -88zM344 326c-25 25 -56 44 -91 52c16 -17 29 -43 39 -74c18 6 35 13 52 22zM163 378c-35 -8 -67 -27 -91 -52c16 -9 34 -15 52 -21c10 31 23 56 39 73zM72 58c25 -25 56 -44 91 -52
+c-16 17 -30 43 -40 74c-18 -6 -35 -13 -51 -22zM253 6c35 8 66 27 91 52c-17 9 -34 16 -52 22c-10 -31 -23 -57 -39 -74z" />
+    <glyph glyph-name="ion-ios-world" unicode="&#xf4d3;" horiz-adv-x="416" 
+d="M208 400c115 0 208 -93 208 -208s-93 -208 -208 -208v0v0v0c-115 0 -208 93 -208 208s93 208 208 208v0v0v0zM208 1c106 0 191 85 191 191s-85 191 -191 191v0v0v0c-106 0 -191 -85 -191 -191s86 -191 191 -191v0v0v0zM274 276c6 -22 9 -48 10 -76h-68v68c20 1 39 4 58 8
+zM216 366c20 -6 41 -34 54 -75c-17 -4 -36 -6 -54 -7v82zM145 291c13 42 35 69 55 75v-82c-19 1 -37 3 -55 7zM333 315c-15 -8 -31 -15 -48 -20c-9 29 -21 52 -36 67c32 -8 61 -24 84 -47zM299 200c-1 29 -4 56 -10 80c19 6 37 14 54 23c23 -28 38 -64 40 -103h-84zM132 200
+c1 28 3 54 9 76c19 -5 39 -7 59 -8v-68h-68zM284 184c-1 -28 -4 -54 -10 -76c-19 5 -38 7 -58 8v68h68zM141 108c-6 22 -8 48 -9 76h68v-68c-20 -1 -40 -3 -59 -8zM200 18c-20 6 -42 33 -55 75c18 4 36 6 55 7v-82zM249 22c15 15 27 38 36 67c17 -5 33 -11 48 -19
+c-23 -23 -52 -40 -84 -48zM167 362c-15 -15 -27 -39 -36 -67c-16 5 -33 11 -48 19c22 23 52 40 84 48zM289 104c6 24 9 51 10 80h84c-2 -39 -17 -75 -40 -103c-17 9 -35 17 -54 23zM216 100c18 -1 37 -3 54 -7c-13 -42 -34 -69 -54 -75v82zM127 280c-6 -24 -11 -51 -11 -80
+h-83c2 39 17 75 40 103c17 -9 35 -17 54 -23zM116 184c1 -29 4 -56 10 -80c-19 -6 -36 -14 -53 -23c-23 28 -38 64 -40 103h83zM83 70c15 8 32 14 48 19c9 -28 21 -52 36 -67c-32 8 -62 25 -84 48z" />
+    <glyph glyph-name="ion-ipad" unicode="&#xf1f9;" horiz-adv-x="288" 
+d="M0 375c0 5 4 9 9 9h270c5 0 9 -4 9 -9v-366c0 -5 -4 -9 -9 -9h-270c-5 0 -9 4 -9 9v366zM144 10c8 0 14 6 14 14s-7 14 -14 14c-8 0 -14 -6 -14 -14s6 -14 14 -14zM32 329v-275c0 -4 3 -6 6 -6h211c3 0 7 2 7 6v275c0 4 -4 7 -7 7h-211c-3 0 -6 -3 -6 -7z" />
+    <glyph glyph-name="ion-iphone" unicode="&#xf1fa;" horiz-adv-x="192" 
+d="M168 384c13 0 24 -11 24 -24v-336c0 -13 -11 -24 -24 -24h-144c-13 0 -24 11 -24 24v336c0 13 11 24 24 24h144zM80 348v0c0 -2 2 -4 4 -4h24c2 0 4 2 4 4v0c0 2 -2 4 -4 4h-24c-2 0 -4 -2 -4 -4zM68 352c-2 0 -4 -2 -4 -4s2 -4 4 -4s4 2 4 4s-2 4 -4 4zM96 16
+c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM176 64v256h-160v-256h160z" />
+    <glyph glyph-name="ion-ipod" unicode="&#xf1fb;" horiz-adv-x="224" 
+d="M112 137c18 0 32 -14 32 -32s-14 -32 -32 -32s-32 14 -32 32s14 32 32 32zM196 384c15 0 28 -12 28 -28v-328c0 -16 -13 -28 -28 -28h-168c-15 0 -28 12 -28 28v328c0 16 13 28 28 28h168zM112 32c40 0 72 32 72 72s-32 72 -72 72s-72 -32 -72 -72s32 -72 72 -72z
+M192 221v118c-1 7 -6 12 -12 13h-136c-7 -1 -12 -7 -12 -15v-114c0 -8 6 -15 14 -15h131c8 0 14 5 15 13z" />
+    <glyph glyph-name="ion-jet" unicode="&#xf295;" horiz-adv-x="326" 
+d="M222 80l-2 -13l53 -58l-18 -27l-74 9l-18 -55l-19 55l-73 -9l-18 27l53 58l-2 13l-104 -35l3 53l114 103s26 173 28 192c5 40 18 55 18 55s13 -15 18 -55c2 -19 28 -192 28 -192l114 -103l3 -53z" />
+    <glyph glyph-name="ion-key" unicode="&#xf296;" horiz-adv-x="192" 
+d="M144 147c28 -17 48 -48 48 -83c0 -53 -43 -96 -96 -96s-96 43 -96 96c0 36 19 67 48 84c0 0 7 16 12 41c0 4 11 6 11 12v20c0 5 -7 9 -7 11v8v8c0 2 0 4 1 6c0 1 1 1 1 2l2 1l4 4v1c2 2 3 4 3 6c0 1 1 8 1 9c0 3 -2 6 -4 8l-1 1l-4 4v0l-1 1v0c-2 2 -3 5 -3 8v7
+c0 3 2 7 4 9v0l5 5v0c2 2 4 3 4 6v24c0 3 -2 6 -4 8v1l-4 4l-1 1c-2 2 -3 5 -3 8v18c0 11 0 19 9 23c3 1 14 3 23 3c20 0 30 -8 32 -36c0 0 7 -81 9 -143s7 -90 7 -90zM96 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-knife" unicode="&#xf297;" horiz-adv-x="64" 
+d="M62 416c2 0 2 -1 2 -6v-412c0 -15 -10 -30 -24 -30v0v0c-14 0 -24 15 -24 30c1 19 14 83 16 130v0c1 30 -32 31 -32 70c0 134 35 191 54 214c2 2 5 4 8 4z" />
+    <glyph glyph-name="ion-laptop" unicode="&#xf1fc;" horiz-adv-x="512" 
+d="M480 342v-262h-448v262c0 6 4 10 10 10h428c6 0 10 -4 10 -10zM448 112v208h-384v-208h384zM0 59v5h512v-5c-70 -20 -116 -27 -256 -27s-186 7 -256 27z" />
+    <glyph glyph-name="ion-leaf" unicode="&#xf1fd;" horiz-adv-x="422" 
+d="M412 69c18 -3 10 -41 -5 -39c0 0 -21 -1 -63 12c0 0 -16 -19 -39 -30c-26 -12 -118 -33 -197 38c-108 97 -120 354 -100 333c86 -90 197 -47 270 -106c55 -44 88 -127 77 -192c0 0 5 -8 57 -16zM316 65c5 5 10 16 10 24c-161 52 -252 160 -252 160s104 -143 242 -184z
+" />
+    <glyph glyph-name="ion-levels" unicode="&#xf298;" horiz-adv-x="350" 
+d="M46 349c11 -5 18 -16 18 -29s-7 -24 -18 -29v-275c0 -9 -7 -16 -16 -16s-16 7 -16 16v278c-8 6 -14 15 -14 26s6 20 14 26v22c0 9 7 16 16 16s16 -7 16 -16v-19zM142 155c9 -6 15 -16 15 -27s-6 -21 -15 -27v-85c0 -9 -7 -16 -16 -16s-16 7 -16 16v84
+c-10 5 -17 16 -17 28s7 23 17 28v212c0 9 7 16 16 16s16 -7 16 -16v-213zM238 285c10 -6 16 -16 16 -28s-6 -22 -16 -28v-213c0 -9 -7 -16 -16 -16s-16 7 -16 16v213c-10 6 -16 16 -16 28s6 22 16 28v83c0 9 7 16 16 16s16 -7 16 -16v-83zM350 65c0 -12 -6 -22 -16 -28v-21
+c0 -9 -7 -16 -16 -16s-16 7 -16 16v21c-10 6 -16 16 -16 28s6 22 16 28v275c0 9 7 16 16 16s16 -7 16 -16v-275c10 -6 16 -16 16 -28z" />
+    <glyph glyph-name="ion-lightbulb" unicode="&#xf299;" horiz-adv-x="256" 
+d="M128 416c71 0 128 -56 128 -124c0 -5 0 -9 -1 -14s-2 -11 -3 -16v-2c-17 -63 -45 -71 -59 -167v-1c-2 -9 -10 -12 -20 -12h-90c-10 0 -18 3 -20 12v1c-14 96 -42 104 -59 167v2c-1 5 -2 11 -3 16s-1 9 -1 14c0 68 57 124 128 124zM190 52v-1c-2 -3 -3 -4 -3 -7s1 -5 3 -8
+v-1c1 -2 2 -3 2 -5s-1 -4 -2 -6v-1c-2 -3 -3 -4 -3 -7s1 -5 3 -8v-1c1 -2 2 -4 2 -6c0 -5 -4 -9 -10 -11h-1c-6 -1 -13 -2 -19 -3h-2c-6 -1 -11 -5 -14 -9v0c-4 -5 -10 -10 -18 -10s-15 6 -19 11v0c-3 4 -7 7 -13 8h-2c-6 1 -13 2 -19 3h-1c-6 2 -10 6 -10 11c0 2 1 4 2 6v1
+c2 2 3 4 3 7s-1 5 -3 8v1c-1 2 -2 4 -2 6s1 3 2 5v1c2 3 3 5 3 8s-1 4 -3 7v1v0c-1 2 -2 4 -2 6c0 4 -1 6 7 6h114c8 0 7 -2 7 -6c0 -2 -1 -4 -2 -6v0z" />
+    <glyph glyph-name="ion-link" unicode="&#xf1fe;" horiz-adv-x="384" 
+d="M192 240v0v0v0zM304 288c44 0 80 -36 80 -80v-32c0 -44 -36 -80 -80 -80h-112c-33 0 -60 20 -73 48c-4 10 -7 20 -7 32v32h48v-32c0 -18 14 -32 32 -32h112c18 0 32 14 32 32v32c0 18 -14 32 -32 32v0h-16c-6 31 -32 48 -32 48h48zM266 240c4 -10 6 -21 6 -32v-32v0h-48
+v0v32c0 18 -14 32 -32 32v0h-112c-18 0 -32 -14 -32 -32v-32c0 -18 14 -32 32 -32h16c6 -31 32 -48 32 -48h-48c-44 0 -80 36 -80 80v32c0 44 36 80 80 80h112c33 0 62 -20 74 -48z" />
+    <glyph glyph-name="ion-load-a" unicode="&#xf29a;" horiz-adv-x="384" 
+d="M144 352c0 43 21 64 64 64s64 -21 64 -64s-21 -64 -64 -64s-64 21 -64 64zM0 192c0 32 16 48 48 48s48 -16 48 -48s-16 -48 -48 -48s-48 16 -48 48zM312 304c0 5 3 8 8 8s8 -3 8 -8s-3 -8 -8 -8s-8 3 -8 8zM132 340c10 -10 15 -22 15 -36s-5 -26 -15 -36s-22 -15 -36 -15
+s-26 5 -36 15s-15 22 -15 36s5 26 15 36s22 15 36 15s26 -5 36 -15zM352 192c0 11 5 16 16 16s16 -5 16 -16s-5 -16 -16 -16s-16 5 -16 16zM297 79c0 16 8 24 24 24s24 -8 24 -24s-8 -24 -24 -24s-24 8 -24 24zM176 32c0 21 11 32 32 32s32 -11 32 -32s-11 -32 -32 -32
+s-32 11 -32 32zM56 80c0 27 13 40 40 40s40 -13 40 -40s-13 -40 -40 -40s-40 13 -40 40z" />
+    <glyph glyph-name="ion-load-b" unicode="&#xf29b;" 
+d="M256 288c0 -18 -14 -32 -32 -32v0c-18 0 -32 14 -32 32v96c0 18 14 32 32 32v0c18 0 32 -14 32 -32v-96zM224 128v0c18 0 32 -14 32 -32v-96c0 -18 -14 -32 -32 -32s-32 14 -32 32v96c0 18 14 32 32 32zM416 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32h-96
+c-18 0 -32 14 -32 32s14 32 32 32h96zM128 224v0c18 0 32 -14 32 -32s-14 -32 -32 -32h-96c-18 0 -32 14 -32 32s14 32 32 32h96zM314 237c-12 -12 -33 -12 -45 0v0c-12 12 -12 34 0 46l68 67c12 12 33 12 45 0v0c12 -12 12 -33 0 -45zM179 147v0c12 -12 12 -33 0 -46
+l-68 -67c-12 -12 -33 -12 -45 0s-12 33 0 45l67 68c12 12 34 12 46 0zM382 79v0c12 -12 12 -33 0 -45s-33 -12 -45 0l-68 68c-12 12 -12 33 0 45s33 12 45 0zM179 282v0c12 -12 12 -33 0 -45s-34 -12 -46 0l-67 68c-12 12 -12 33 0 45s33 12 45 0z" />
+    <glyph glyph-name="ion-load-c" unicode="&#xf29c;" 
+d="M448 222c0 -3 0 -6 -1 -9c-4 -8 -15 -12 -23 -7c-4 2 -6 7 -7 11c-1 5 -1 9 -2 14c-4 20 -12 40 -22 58c-12 21 -28 41 -47 56c-18 15 -40 26 -62 33c-21 6 -42 9 -64 9h-4c-3 0 -6 -1 -9 -1c-6 0 -14 -1 -20 -2c-13 -2 -25 -6 -37 -11c-21 -8 -40 -20 -57 -35
+s-31 -33 -42 -52c-12 -22 -20 -45 -24 -70c-2 -11 -2 -23 -2 -34c0 -6 0 -11 1 -16c1 -6 2 -13 3 -19c5 -24 14 -47 28 -67c13 -20 29 -38 48 -52c20 -15 42 -26 65 -33c25 -7 50 -9 76 -7c25 2 50 9 73 20c11 5 22 12 32 19s19 15 27 24c4 4 8 9 12 14s7 10 10 15
+c6 10 12 20 17 31c4 8 8 16 11 25c2 4 3 9 4 13s1 7 2 11c1 -9 1 -18 -1 -26c-1 -5 -2 -11 -4 -16c-1 -5 -3 -10 -5 -15c-4 -10 -8 -19 -13 -28c-6 -11 -12 -21 -20 -30s-16 -18 -25 -26c-18 -15 -40 -27 -62 -36c-23 -9 -48 -14 -73 -15s-51 3 -75 11c-23 7 -45 19 -65 33
+c-19 14 -36 31 -50 50c-7 10 -13 20 -18 31s-9 21 -13 33c-6 18 -9 37 -10 56c-1 20 1 39 5 58c5 24 15 47 28 68c12 19 26 35 42 50s35 27 55 36c23 11 48 19 74 21c10 1 19 1 29 1c13 0 26 -2 38 -4c24 -5 47 -14 68 -26s41 -29 57 -48c15 -18 27 -37 36 -58
+c4 -10 7 -21 10 -32c2 -8 5 -17 6 -26z" />
+    <glyph glyph-name="ion-load-d" unicode="&#xf29d;" horiz-adv-x="384" 
+d="M368 208c9 0 16 -7 16 -16s-7 -16 -16 -16h-80c-9 0 -16 7 -16 16s7 16 16 16h80zM112 192c0 -9 -7 -16 -16 -16h-80c-9 0 -16 7 -16 16s7 16 16 16h80c9 0 16 -7 16 -16zM192 112c9 0 16 -7 16 -16v-80c0 -9 -7 -16 -16 -16s-16 7 -16 16v80c0 9 7 16 16 16zM192 384
+c9 0 16 -7 16 -16v-80c0 -9 -7 -16 -16 -16s-16 7 -16 16v80c0 9 7 16 16 16zM261 232c-4 8 -2 18 6 22l69 40c8 4 18 2 22 -6s2 -18 -6 -22l-69 -40c-8 -4 -18 -2 -22 6zM123 152c4 -8 2 -18 -6 -22l-69 -40c-8 -4 -18 -2 -22 6s-2 18 6 22l69 40c8 4 18 2 22 -6zM254 117
+l40 -69c4 -8 2 -18 -6 -22s-18 -2 -22 6l-40 69c-4 8 -2 18 6 22s18 2 22 -6zM118 352l40 -69c4 -8 2 -18 -6 -22s-18 -2 -22 6l-40 69c-4 8 -2 18 6 22s18 2 22 -6zM232 261c-8 4 -10 14 -6 22l40 69c4 8 14 10 22 6s10 -14 6 -22l-40 -69c-4 -8 -14 -10 -22 -6zM152 123
+c8 -4 10 -14 6 -22l-40 -69c-4 -8 -14 -10 -22 -6s-10 14 -6 22l40 69c4 8 14 10 22 6zM352 118c8 -4 10 -14 6 -22s-14 -10 -22 -6l-69 40c-8 4 -10 14 -6 22s14 10 22 6zM32 266c-8 4 -10 14 -6 22s14 10 22 6l69 -40c8 -4 10 -14 6 -22s-14 -10 -22 -6z" />
+    <glyph glyph-name="ion-location" unicode="&#xf1ff;" horiz-adv-x="239" 
+d="M119 384c66 0 120 -54 120 -120c0 -115 -120 -264 -120 -264s-119 149 -119 264c0 66 53 120 119 120zM119 206c31 0 57 25 57 56s-26 57 -57 57s-56 -26 -56 -57s25 -56 56 -56z" />
+    <glyph glyph-name="ion-lock-combination" unicode="&#xf4d4;" horiz-adv-x="384" 
+d="M320 271c39 -35 64 -86 64 -143c0 -106 -86 -192 -192 -192s-192 86 -192 192c0 57 25 108 64 143v49c0 71 57 128 128 128s128 -57 128 -128v-49zM96 320v-26c28 16 61 26 96 26s68 -10 96 -26v26c0 53 -43 96 -96 96s-96 -43 -96 -96zM192 -32c88 0 160 72 160 160
+s-72 160 -160 160s-160 -72 -160 -160s72 -160 160 -160zM192 272c80 0 144 -64 144 -144s-64 -144 -144 -144s-144 64 -144 144s64 144 144 144zM315 95c2 9 4 18 4 29h-7v7h8c0 11 -2 20 -5 30l-25 -7l-4 12l25 8c-4 10 -8 18 -14 26l-11 -8l-4 6l11 8c-6 8 -13 16 -21 22
+l-15 -21l-11 8l15 20c-8 6 -17 11 -27 14l-4 -13l-6 2l5 13c-9 3 -20 5 -29 5v-13v-6h-16v6v13c-11 -1 -19 -2 -29 -5l4 -12l-6 -2l-4 12c-10 -3 -19 -8 -27 -14l15 -20l-10 -8l-15 21c-8 -6 -16 -14 -22 -22l11 -8l-4 -5l-10 8c-6 -8 -10 -17 -14 -27l24 -8l-5 -12l-25 7
+c-3 -10 -3 -19 -3 -30h6v-7h-5c0 -11 2 -20 4 -29l24 7l4 -12l-24 -8c4 -10 8 -19 14 -27l9 7l4 -5l-9 -7c6 -8 13 -16 21 -22l15 21l10 -8l-15 -20c8 -5 17 -11 27 -14l3 11l7 -2l-4 -11c10 -3 18 -4 29 -5v13v6h16v-6v-13c9 1 19 2 29 5l-5 12l6 2l4 -12c10 3 19 8 27 14
+l-15 20l11 8l15 -21c8 6 15 14 21 22l-11 7l4 6l10 -8c6 8 11 17 15 27l-25 8l4 12zM111 128c0 54 27 81 81 81s81 -27 81 -81s-27 -81 -81 -81s-81 27 -81 81z" />
+    <glyph glyph-name="ion-locked" unicode="&#xf200;" horiz-adv-x="384" 
+d="M22 -32c-12 0 -22 10 -22 22v212c0 12 10 22 22 22h3h19v31c0 42 17 87 43 115s64 46 105 46v0v0c41 0 79 -18 105 -46s43 -73 43 -115v-31h22c12 0 22 -10 22 -22v-212c0 -12 -10 -22 -22 -22h-340zM97 255v-31h17h155h18v31c0 27 -10 61 -28 80v0v1
+c-18 19 -42 29 -67 29v0v0c-25 0 -49 -10 -67 -29v-1v0c-18 -19 -28 -53 -28 -80z" />
+    <glyph glyph-name="ion-log-in" unicode="&#xf29e;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224c-96 0 -177 60 -209 144h34c9 -20 23 -40 39 -56c36 -36 85 -56 136 -56s100 20 136 56s56 85 56 136s-20 100 -56 136s-85 56 -136 56s-100 -20 -136 -56c-16 -16 -30 -36 -39 -56h-34c32 84 113 144 209 144z
+M175 124l52 52h-227v32h227l-52 52l22 23l91 -91l-91 -91z" />
+    <glyph glyph-name="ion-log-out" unicode="&#xf29f;" 
+d="M335 124l52 52h-227v32h227l-52 52l22 23l91 -91l-91 -91zM359 56c3 3 6 5 8 8h41c-40 -58 -108 -96 -184 -96c-124 0 -224 100 -224 224s100 224 224 224c76 0 144 -38 184 -96h-41c-2 3 -5 5 -8 8c-36 36 -84 56 -135 56s-100 -20 -136 -56s-56 -85 -56 -136
+s20 -100 56 -136s85 -56 136 -56s99 20 135 56z" />
+    <glyph glyph-name="ion-loop" unicode="&#xf201;" horiz-adv-x="334" 
+d="M184 148v-58c49 8 86 50 86 102c0 16 -4 30 -10 44c-3 6 -5 12 -9 17l47 43c1 -1 2 -3 3 -4c21 -28 33 -62 33 -100v-4c-2 -72 -47 -131 -111 -154c-12 -4 -26 -8 -39 -9v-57l-76 67l-26 23l44 39zM0 196c2 72 48 133 113 155c12 4 24 7 37 8v57l76 -67l26 -23l-44 -39
+l-59 -51l1 58c-49 -8 -86 -51 -86 -102c0 -16 4 -31 10 -45c3 -6 5 -11 9 -16l-47 -44c-1 2 -2 3 -3 5c-20 28 -33 63 -33 100v4z" />
+    <glyph glyph-name="ion-magnet" unicode="&#xf2a0;" horiz-adv-x="384" 
+d="M192 416c115 0 192 -78 192 -200c0 -49 -3 -77 -15 -128c-16 -66 -39 -113 -39 -113v-1c-2 -3 -6 -6 -10 -6c-1 0 -3 1 -4 1l-2 1l-50 20l-2 1c-3 2 -5 5 -5 9c0 1 0 3 1 4v1c7 16 27 59 37 101s13 63 13 108c0 71 -52 122 -116 122s-116 -51 -116 -122
+c0 -45 3 -66 13 -108s30 -85 37 -101v-1c1 -1 1 -3 1 -4c0 -4 -2 -7 -5 -9l-2 -1l-50 -20l-2 -1c-1 0 -3 -1 -4 -1c-4 0 -8 3 -10 6v1s-24 47 -40 113c-12 51 -14 79 -14 128c0 122 77 200 192 200zM109 4c-9 19 -27 59 -36 98l-42 -12c13 -53 30 -92 35 -104l43 17v1z
+M317 -14c5 12 23 51 36 104l-43 12c-9 -39 -26 -79 -35 -98v-1z" />
+    <glyph glyph-name="ion-male" unicode="&#xf2a1;" 
+d="M448 256l-63 63l-69 -69c22 -30 36 -66 36 -106c0 -97 -79 -176 -176 -176s-176 79 -176 176s79 176 176 176c40 0 76 -14 106 -36l69 69l-63 63h160v-160zM266 54c24 24 38 56 38 90s-14 66 -38 90s-56 38 -90 38s-66 -14 -90 -38s-38 -56 -38 -90s14 -66 38 -90
+s56 -38 90 -38s66 14 90 38z" />
+    <glyph glyph-name="ion-man" unicode="&#xf202;" horiz-adv-x="168" 
+d="M84 341c-21 0 -37 17 -37 38s16 37 37 37s37 -16 37 -37s-16 -38 -37 -38zM121 333c28 0 47 -24 47 -48v-114c0 -22 -32 -22 -32 0v105h-5v-286c0 -28 -41 -31 -43 0v165h-1h-7v-165c-1 -29 -43 -30 -43 0v286h-6v-105c0 -22 -31 -22 -31 0v114c0 24 19 48 47 48h37h37z
+" />
+    <glyph glyph-name="ion-map" unicode="&#xf203;" 
+d="M441 311c4 -3 7 -8 7 -14v-281c0 -6 -2 -11 -7 -14c-2 -1 -5 -2 -7 -2c-3 0 -6 0 -8 2l-97 66l-97 -66c-5 -3 -10 -3 -15 0l-97 66l-97 -66c-5 -3 -10 -3 -15 0s-8 8 -8 14v281c0 6 3 11 7 14l105 71c5 3 10 3 15 0l97 -66l98 66c5 3 10 3 15 0zM103 95v242l-71 -50v-242
+zM135 95l73 -49v129l-4 -11c-7 2 -13 6 -20 10l8 13c5 -3 11 -6 16 -8v109l-73 49v-101c4 -2 9 -4 13 -7l-10 -13c-1 1 -2 1 -3 2v-123zM240 46l73 49v109c0 -1 -1 -1 -1 -2l-6 -6l-12 11l6 6c3 3 5 7 8 10l5 -5v119l-73 -49v-112h7l3 -15c-3 0 -6 -1 -9 -1h-1v-114zM416 46
+v242l-71 49v-88c3 1 5 1 8 2l4 -16c-4 -1 -8 -1 -12 -3v-137zM97 227c-3 -1 -11 -5 -14 -7l-11 12c4 3 8 6 12 8c3 2 6 3 9 4l5 -15c-2 -1 1 -1 -1 -2zM265 182c5 3 10 5 15 10l11 -12c-6 -6 -12 -10 -19 -13zM67 192v-1l-15 5v1c2 7 4 13 9 20l13 -9c-4 -5 -5 -10 -7 -16z
+M166 210c3 -4 7 -8 11 -11l-11 -12c-4 4 -8 9 -12 13l-3 3l12 11c1 -1 2 -3 3 -4zM376 218l-11 12l10 10l-10 10l11 12l10 -11l11 11l11 -12l-10 -10l10 -10l-11 -12l-11 11z" />
+    <glyph glyph-name="ion-medkit" unicode="&#xf2a2;" 
+d="M440 304c4 0 8 -4 8 -8v-288c0 -4 -4 -8 -8 -8h-432c-4 0 -8 4 -8 8v288c0 4 4 8 8 8h120v31c1 28 22 49 51 49h45h45c30 0 50 -21 51 -49v-31h120zM160 331v-27h128v27v1v1c0 10 -9 19 -19 19h-45h-45c-10 0 -19 -9 -19 -19v-1v-1zM320 128v64h-64v64h-64v-64h-64v-64
+h64v-64h64v64h64z" />
+    <glyph glyph-name="ion-merge" unicode="&#xf33f;" horiz-adv-x="384" 
+d="M320 224c35 0 64 -29 64 -64s-29 -64 -64 -64c-24 0 -44 13 -55 32h-10c-61 0 -115 25 -159 74v-115c19 -11 32 -31 32 -55c0 -35 -29 -64 -64 -64s-64 29 -64 64c0 24 13 44 32 55v210c-19 11 -32 31 -32 55c0 35 29 64 64 64s64 -29 64 -64c0 -19 -8 -37 -22 -49
+c4 -9 17 -35 37 -58c32 -35 70 -53 112 -53h10c11 19 31 32 55 32zM64 384c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM64 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM320 128c18 0 32 14 32 32s-14 32 -32 32
+s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-mic-a" unicode="&#xf204;" horiz-adv-x="288" 
+d="M0 210c0 10 9 19 20 19s19 -9 19 -19v-14c0 -28 12 -53 31 -72s45 -31 74 -31s55 12 74 31s31 44 31 72v14c0 10 8 19 19 19s20 -9 20 -19v-14c0 -66 -46 -120 -108 -136c-1 0 -3 -1 -4 -1c-6 -2 -10 -7 -12 -13v-58c0 -11 -9 -20 -20 -20v0c-11 0 -20 9 -20 20v58
+c-2 6 -6 11 -12 13c-1 0 -3 1 -4 1c-62 16 -108 70 -108 136v14zM67 340c0 42 34 76 77 76s78 -34 78 -76v-144c0 -42 -35 -75 -78 -75s-77 33 -77 75v144z" />
+    <glyph glyph-name="ion-mic-b" unicode="&#xf205;" horiz-adv-x="160" 
+d="M80 416c35 0 65 -23 76 -59c6 -18 4 -45 2 -55s-8 -20 -14 -28c-3 -4 -7 -7 -11 -9c-1 0 -1 -1 -2 -1c-3 -1 -6 -2 -10 -3c-12 -3 -25 -5 -39 -5v0h-1h-1v0c-14 0 -29 2 -41 5c-4 1 -7 2 -10 3c-1 0 -1 1 -2 1c-4 2 -8 5 -11 9c-6 8 -12 18 -14 28s-4 37 2 55
+c11 36 41 59 76 59zM119 247c6 0 12 -5 12 -12v-2c-5 -67 -18 -241 -19 -252c0 0 -3 -13 -32 -13v0c-29 0 -32 13 -32 13c-1 11 -13 185 -18 252v2c0 7 5 12 11 12h1c1 0 1 -1 2 -1c2 0 4 -1 6 -1c9 -2 21 -2 31 -2s20 0 29 2c2 0 4 1 6 1c1 0 1 1 2 1h1zM90 166v33
+c0 6 -4 11 -10 11s-10 -5 -10 -11v-33c0 -6 4 -11 10 -11s10 5 10 11z" />
+    <glyph glyph-name="ion-mic-c" unicode="&#xf206;" horiz-adv-x="256" 
+d="M201 416c30 0 55 -23 55 -52v-28h-59v-37h59v-43h-59v-37h59v-43h-59v-37h59v-42c0 -29 -25 -52 -55 -52h-30v-77h-86v77h-30c-30 0 -55 23 -55 52v42h152v37h-152v43h152v37h-152v43h152v37h-152v28c0 29 25 52 55 52h146z" />
+    <glyph glyph-name="ion-minus-circled" unicode="&#xf207;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM352 176v32h-256v-32h256z" />
+    <glyph glyph-name="ion-minus-round" unicode="&#xf208;" horiz-adv-x="384" 
+d="M353 224c17 0 31 -14 31 -32s-14 -32 -31 -32h-322c-17 0 -31 14 -31 32s14 32 31 32h322z" />
+    <glyph glyph-name="ion-minus" unicode="&#xf209;" horiz-adv-x="384" 
+d="M0 160v64h384v-64h-384z" />
+    <glyph glyph-name="ion-model-s" unicode="&#xf2c1;" horiz-adv-x="512" 
+d="M509 57v-8v0v-1v-3v0c0 -3 -1 -5 -1 -7c-1 -12 -2 -18 -6 -20c-3 -2 -6 -2 -10 -2h-43s-10 1 -11 16v8c20 1 39 1 52 0c10 0 13 0 16 6c2 3 2 7 3 11zM3 57c1 -4 1 -8 3 -11c3 -6 6 -6 16 -6c13 1 32 1 52 0v-8c-1 -15 -8 -16 -11 -16h-43s-7 0 -10 2c-4 2 -6 8 -7 20v7
+v0v3v1v0v8zM512 151c0 -31 -2 -58 -2 -68c0 -4 0 -11 -1 -18c-1 -4 -1 -8 -3 -11c-3 -6 -6 -6 -16 -6c-13 1 -32 1 -52 0c-13 0 -27 -2 -39 -2c-30 -1 -21 4 -34 4s-63 -2 -109 -2s-97 2 -110 2s-4 -5 -34 -4c-12 0 -25 2 -38 2c-20 1 -39 1 -52 0c-10 0 -13 0 -16 6
+c-2 3 -2 7 -3 11c-1 7 -1 14 -1 18c0 10 -2 37 -2 68s4 61 6 64c1 2 8 9 26 21s17 10 20 18c-3 1 -5 3 -7 3c-4 0 -4 -3 -12 -3s-24 1 -28 5c-4 3 -5 5 -5 8s2 9 5 13s19 6 27 7s10 0 12 -1c4 -2 3 -22 3 -22l9 -1c5 13 12 41 24 62c13 23 26 30 32 32s10 2 48 6s69 5 96 5
+s58 -1 96 -5s42 -4 48 -6s19 -9 32 -32c12 -21 19 -49 24 -62l9 1s-1 20 3 22c2 1 4 2 12 1s24 -3 27 -7s5 -10 5 -13s-1 -4 -5 -8s-20 -5 -28 -5s-8 3 -12 3c-2 0 -4 -2 -7 -3c3 -8 2 -6 20 -18s25 -19 26 -21c2 -3 6 -33 6 -64zM86 303c-5 -11 -11 -33 -10 -36
+s-1 -5 15 -4s117 3 165 3s149 -2 165 -3s14 1 15 4s-5 25 -10 36s-17 31 -26 37c-2 1 -17 7 -54 9c-34 2 -72 3 -90 3s-56 -1 -90 -3c-37 -2 -52 -8 -54 -9c-7 -4 -21 -26 -26 -37zM123 178c7 2 11 2 11 2s-17 16 -48 25s-49 11 -66 10c0 0 -3 -16 0 -27s8 -10 16 -12
+s13 -5 16 -4s7 4 12 4s29 -4 38 -4s14 4 21 6zM358 99c15 2 34 19 21 33c-18 19 -15 19 -55 24c-35 4 -61 4 -68 4s-33 0 -68 -4c-40 -5 -37 -5 -55 -24c-13 -14 6 -31 21 -33c14 -2 74 -3 102 -3s88 1 102 3zM492 188c3 11 0 27 0 27c-17 1 -35 -1 -66 -10s-48 -26 -48 -26
+s4 1 11 -1s12 -6 21 -6s33 4 38 4s9 -3 12 -4s8 2 16 4s13 1 16 12z" />
+    <glyph glyph-name="ion-monitor" unicode="&#xf20a;" 
+d="M437 384c6 0 11 -5 11 -11v-266c0 -6 -5 -11 -11 -11h-426c-6 0 -11 5 -11 11v266c0 6 5 11 11 11h426zM416 128v224h-384v-224h384zM270 0h-92c-28 0 -42 3 -30 12s30 16 30 23c0 4 1 45 1 45h45h45s1 -41 1 -45c0 -7 18 -14 30 -23s-2 -12 -30 -12z" />
+    <glyph glyph-name="ion-more" unicode="&#xf20b;" horiz-adv-x="384" 
+d="M50 144c-28 0 -50 21 -50 48c0 26 22 48 50 48s50 -22 50 -48c0 -27 -22 -48 -50 -48zM192 144c-28 0 -50 21 -50 48c0 26 22 48 50 48s50 -22 50 -48c0 -27 -22 -48 -50 -48zM334 144c-28 0 -50 21 -50 48c0 26 22 48 50 48s50 -22 50 -48c0 -27 -22 -48 -50 -48z" />
+    <glyph glyph-name="ion-mouse" unicode="&#xf340;" horiz-adv-x="256" 
+d="M128 416h-1h5h-4zM251 255c2 1 2 1 4 1h1v-176c0 -37 -21 -71 -53 -91c-5 -3 -9 -5 -14 -7v-1v0c-18 -9 -39 -13 -61 -13c-71 0 -128 50 -128 112v176h1c2 0 3 0 5 -1v0c34 -13 76 -23 122 -23s88 10 122 23h1zM189 -18c5 2 10 4 14 7c-5 -3 -9 -5 -14 -7v0v-1v1v0z
+M203 -11c-4 -3 -9 -5 -14 -7c5 2 9 4 14 7zM132 416c69 -2 124 -51 124 -112v-23c-2 -2 -4 -4 -6 -5c-1 -1 -3 0 -4 -1c-23 -10 -50 -16 -82 -19h-1h-2c-11 0 -17 0 -17 10v86c0 9 -7 16 -16 16s-16 -7 -16 -16v-85c0 -11 -6 -11 -17 -11h-2c-32 3 -61 9 -84 19v0
+c-1 0 -1 1 -2 1c-3 1 -5 3 -7 5v23c0 61 57 111 127 112h5z" />
+    <glyph glyph-name="ion-music-note" unicode="&#xf20c;" horiz-adv-x="384" 
+d="M362 416c12 0 22 -9 22 -21v-303s-3 -43 -12 -55v0c-9 -15 -25 -21 -43 -21h-37c-28 0 -52 20 -52 48s24 48 52 48h60v192l-208 -38v-232c0 -8 -3 -27 -13 -41c-1 -2 -2 -3 -3 -5c0 -1 -1 -1 -2 -2v0c-9 -11 -23 -18 -38 -18h-37c-28 0 -51 20 -51 48s23 48 51 48v0h61
+v286c1 14 13 28 27 32l218 33s3 1 5 1z" />
+    <glyph glyph-name="ion-navicon-round" unicode="&#xf20d;" horiz-adv-x="384" 
+d="M353 224c17 0 31 -14 31 -32s-14 -32 -31 -32h-322c-17 0 -31 14 -31 32s14 32 31 32h322zM353 352c17 0 31 -14 31 -32s-14 -32 -31 -32h-322c-17 0 -31 14 -31 32s14 32 31 32h322zM353 96c17 0 31 -14 31 -32s-14 -32 -31 -32h-322c-17 0 -31 14 -31 32s14 32 31 32
+h322z" />
+    <glyph glyph-name="ion-navicon" unicode="&#xf20e;" horiz-adv-x="320" 
+d="M0 175v32h320v-32h-320zM0 271v32h320v-32h-320zM0 79v32h320v-32h-320z" />
+    <glyph glyph-name="ion-navigate" unicode="&#xf2a3;" 
+d="M448 416l-192 -448v256h-256z" />
+    <glyph glyph-name="ion-network" unicode="&#xf341;" horiz-adv-x="384" 
+d="M384 352c0 -24 -13 -44 -32 -55v-93l-128 -64v-53c19 -11 32 -31 32 -55c0 -35 -29 -64 -64 -64s-64 29 -64 64c0 24 13 44 32 55v53l-128 64v93c-19 11 -32 31 -32 55c0 35 29 64 64 64s64 -29 64 -64c0 -24 -13 -44 -32 -55v-53l96 -48l96 48v53c-19 11 -32 31 -32 55
+c0 35 29 64 64 64s64 -29 64 -64zM64 384c-18 0 -32 -14 -32 -32s14 -32 32 -32s32 14 32 32s-14 32 -32 32zM192 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM320 320c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-no-smoking" unicode="&#xf2c2;" 
+d="M328 144v48h16v-48h-16zM80 144v48h90l48 -48h-138zM332 388c69 -38 116 -112 116 -196c0 -124 -100 -224 -224 -224c-24 0 -47 4 -68 11c-2 1 -3 1 -5 2c-12 4 -24 9 -35 15h-1c-69 38 -115 112 -115 196c0 124 100 224 224 224c24 0 47 -4 68 -11c2 -1 3 -1 5 -2
+c12 -4 24 -9 35 -15v0zM224 22c37 0 72 12 100 32l-238 238c-20 -28 -32 -63 -32 -100c0 -65 36 -121 90 -150c6 -3 13 -7 19 -9c2 -1 3 -1 5 -2c9 -3 19 -5 29 -7c9 -2 18 -2 27 -2zM362 93c20 28 32 62 32 99c0 66 -37 123 -91 151c-6 3 -12 6 -18 8c-2 1 -3 1 -5 2
+c-9 3 -19 5 -29 7c-9 2 -18 2 -27 2c-37 0 -71 -12 -99 -32zM320 150l-42 42h42v-42zM352 144v48h16v-48h-16zM328 235c16 -7 16 -27 16 -34v-1h-16v1c0 8 -1 17 -7 20c-4 2 -13 4 -39 4h-3c-13 0 -24 0 -33 13c-5 8 -5 19 -2 29c-4 1 -8 1 -12 3c-17 7 -26 20 -26 38
+c0 33 27 44 39 44v-16c-1 0 -23 -2 -23 -28c0 -11 5 -19 16 -23c9 -4 18 -3 18 -3c3 0 6 -2 7 -5s2 -6 0 -8c-5 -7 -7 -18 -4 -22c4 -6 7 -6 20 -6h3c24 0 37 -2 46 -6zM368 200v0h-16c0 28 -4 41 -7 46c-6 10 -14 14 -25 14h-30c-3 0 -5 2 -6 4s-1 6 0 8c0 0 8 18 6 32
+c-1 8 -6 17 -27 17v16c24 0 40 -11 43 -30c2 -11 0 -23 -3 -31h17c16 0 30 -8 39 -22c6 -10 9 -28 9 -54z" />
+    <glyph glyph-name="ion-nuclear" unicode="&#xf2a4;" 
+d="M176 176c0 32 16 48 48 48s48 -16 48 -48s-16 -48 -48 -48s-48 16 -48 48zM176 176c0 32 16 48 48 48s48 -16 48 -48s-16 -48 -48 -48s-48 16 -48 48zM448 176c0 -27 -5 -53 -15 -78s-23 -47 -40 -66s-36 -35 -59 -48l-79 136c22 12 33 31 33 56h160zM224 240
+c-12 0 -23 -3 -33 -9l-80 138c35 20 73 31 113 31s78 -10 113 -30l-81 -139c-10 6 -21 9 -32 9zM160 176c0 -25 11 -44 33 -56l-79 -136c-35 20 -62 46 -83 80s-31 71 -31 112h160z" />
+    <glyph glyph-name="ion-outlet" unicode="&#xf342;" 
+d="M338 416c61 0 110 -51 110 -113v-222c0 -62 -49 -113 -110 -113h-228c-61 0 -110 51 -110 113v222c0 62 49 113 110 113h228zM143 197v102c0 11 -9 21 -20 21h-23c-11 0 -19 -9 -20 -20v-2v-101v-1c0 -11 9 -20 20 -20h23c11 0 20 9 20 20v1zM265 52v29
+c0 23 -18 42 -41 42s-41 -19 -41 -42v-29v0c0 -11 9 -20 20 -20h21h21c11 0 20 7 20 18v2zM368 197v102c0 11 -9 21 -20 21h-24c-11 0 -19 -9 -20 -20v-2v-101v-1c0 -11 9 -20 20 -20h24c11 0 20 9 20 20v1z" />
+    <glyph glyph-name="ion-paintbrush" unicode="&#xf4d5;" 
+d="M118 165c52 0 102 -41 90 -102c-11 -52 -54 -71 -90 -77c-30 -5 -100 0 -118 35c24 9 34 26 34 49c0 49 32 95 84 95zM436 388c13 -13 17 -30 5 -45l-154 -175c2 -9 1 -17 -3 -23l-50 -58v0v0c-2 -2 -4 -2 -6 0c-1 1 -1 2 -1 3v1c2 53 -41 87 -89 90v0h-2s-2 0 -2 1
+c-2 2 -2 4 0 6l59 49c6 4 14 4 23 2l175 154c15 12 32 8 45 -5zM134 188v0v0v0z" />
+    <glyph glyph-name="ion-paintbucket" unicode="&#xf4d6;" horiz-adv-x="480" 
+d="M112 384l32 32l275 -276l-58 -12l-163 -160l-198 192l152 152zM309 160l-110 110l-110 -110h220zM419 140c0 0 61 -66 61 -99s-27 -60 -61 -60s-60 27 -60 60s60 99 60 99z" />
+    <glyph glyph-name="ion-paper-airplane" unicode="&#xf2c3;" 
+d="M0 176l448 240l-112 -448l-112 112l-80 -112l-16 160zM319 31l80 323l-322 -173l83 -31l192 154l-128 -176z" />
+    <glyph glyph-name="ion-paperclip" unicode="&#xf20f;" horiz-adv-x="160" 
+d="M149 293c6 0 11 -5 11 -12v-195c0 -28 -10 -49 -24 -63c-15 -15 -36 -23 -56 -23c-40 0 -80 31 -80 88v234c0 24 11 44 29 54s39 11 57 0s29 -30 29 -54l-1 -225c0 -13 -3 -24 -9 -32s-16 -12 -25 -12c-17 0 -34 15 -34 44v173c0 6 6 12 12 12s11 -6 11 -12v-173
+c0 -14 5 -21 11 -21c2 0 5 2 7 4c3 4 5 10 5 17v225c0 15 -6 28 -17 34s-24 6 -35 0s-17 -19 -17 -34v-234c0 -44 29 -64 57 -64s57 19 57 63v195c0 6 6 11 12 11z" />
+    <glyph glyph-name="ion-pause" unicode="&#xf210;" horiz-adv-x="256" 
+d="M96 12c0 -7 -5 -12 -12 -12h-72c-7 0 -12 5 -12 12v360c0 7 5 12 12 12h72c7 0 12 -5 12 -12v-360zM244 384c7 0 12 -5 12 -12v-360c0 -7 -5 -12 -12 -12h-72c-7 0 -12 5 -12 12v360c0 7 5 12 12 12h72z" />
+    <glyph glyph-name="ion-person-add" unicode="&#xf211;" 
+d="M397 120h-42v51h-51v42h51v51h42v-51h51v-42h-51v-51zM384 0h-192h-192s0 26 2 40c2 11 17 25 81 49c63 23 60 12 60 55c0 28 -14 11 -23 64c-4 21 -6 7 -14 40c-4 17 3 19 2 27s-2 16 -4 33c-2 21 18 76 88 76s90 -55 88 -76c-2 -17 -3 -25 -4 -33s6 -10 2 -27
+c-8 -33 -10 -19 -14 -40c-9 -53 -23 -36 -23 -64c0 -43 -3 -32 60 -55c64 -24 79 -38 81 -49c2 -14 2 -40 2 -40z" />
+    <glyph glyph-name="ion-person-stalker" unicode="&#xf212;" 
+d="M393 123c42 -16 52 -26 53 -33c2 -9 2 -90 2 -90h-98c0 18 0 71 -1 77c-1 10 -1 29 -55 50c-8 3 -14 5 -19 7c18 8 15 15 15 28c0 19 -9 11 -15 47c-2 14 -4 5 -9 28c-3 12 1 12 1 18s-1 10 -2 22c-1 14 11 52 57 52s59 -38 58 -52c-1 -12 -2 -16 -2 -22
+c-1 -6 4 -6 1 -18c-5 -23 -7 -14 -9 -28c-6 -36 -16 -28 -16 -47c0 -29 -2 -23 39 -39zM325 0h-163h-162s0 65 2 77c2 10 15 22 69 43c54 20 50 17 50 55c0 24 -12 8 -20 54c-3 18 -5 7 -11 36c-3 15 2 16 1 23s-2 14 -3 29c-2 19 15 67 74 67s77 -49 75 -67
+c-1 -15 -2 -22 -3 -29s5 -8 2 -23c-6 -29 -9 -18 -12 -36c-8 -46 -20 -30 -20 -54c0 -32 -2 -36 31 -48c6 -2 11 -4 19 -7c54 -21 67 -33 69 -43c1 -6 2 -28 2 -47v-30z" />
+    <glyph glyph-name="ion-person" unicode="&#xf213;" horiz-adv-x="384" 
+d="M384 0h-192h-192s0 26 2 40c2 11 17 25 81 49c63 23 60 12 60 55c0 28 -14 11 -23 64c-4 21 -6 7 -14 40c-4 17 3 19 2 27s-2 16 -4 33c-2 21 18 76 88 76s90 -55 88 -76c-2 -17 -3 -25 -4 -33s6 -10 2 -27c-8 -33 -10 -19 -14 -40c-9 -53 -23 -36 -23 -64
+c0 -43 -3 -32 60 -55c64 -24 79 -38 81 -49c2 -14 2 -40 2 -40z" />
+    <glyph glyph-name="ion-pie-graph" unicode="&#xf2a5;" 
+d="M1 192c0 5 -1 11 -1 16c0 115 93 208 208 208c5 0 11 -1 16 -1v-32v-191h-191h-32zM78 46c-26 32 -42 71 -45 114h223v223c43 -3 82 -19 114 -45c47 -38 78 -96 78 -162c0 -115 -93 -208 -208 -208c-66 0 -124 31 -162 78z" />
+    <glyph glyph-name="ion-pin" unicode="&#xf2a6;" horiz-adv-x="224" 
+d="M188 220c20 -10 36 -31 36 -55c0 -17 -3 -21 -15 -21h-81l-12 -176h-8l-12 176h-81c-12 0 -15 5 -15 21c0 24 16 45 36 55v0c1 0 3 1 4 2c7 4 12 11 14 19l18 118v5c0 7 -4 10 -10 13v0c-1 0 -1 1 -2 1c-7 3 -12 9 -12 17c0 20 6 21 18 21h92c12 0 18 -1 18 -21
+c0 -8 -5 -14 -12 -17c-1 0 -1 -1 -2 -1v0c-6 -3 -10 -6 -10 -13v-5l18 -118c2 -8 7 -15 14 -19c1 -1 3 -2 4 -2v0z" />
+    <glyph glyph-name="ion-pinpoint" unicode="&#xf2a7;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c32 32 51 75 55 120l-63 8v16l63 8c-4 45 -23 88 -55 120s-75 51 -120 55l-8 -63h-16l-8 63c-45 -4 -88 -23 -120 -55s-51 -75 -55 -120l63 -8v-16l-63 -8
+c4 -45 23 -88 55 -120s75 -51 120 -55l8 63h16l8 -63c45 4 88 23 120 55z" />
+    <glyph glyph-name="ion-pizza" unicode="&#xf2a8;" horiz-adv-x="352" 
+d="M315 318c10 -4 12 -13 9 -20l-148 -330s-143 320 -148 331s2 16 9 19c39 18 90 28 139 28s96 -9 139 -28zM112 256c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM176 109c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM240 224
+c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM342 382c6 -3 10 -6 10 -13c0 -1 0 -3 -1 -5l-8 -19c-3 -5 -8 -9 -14 -9c-1 0 -3 1 -6 2c-41 18 -95 30 -147 30s-102 -11 -147 -30c-3 -1 -4 -2 -6 -2c-6 0 -11 4 -14 9l-8 19s-1 2 -1 5c0 8 6 12 10 14
+c49 21 107 33 166 33s118 -13 166 -34z" />
+    <glyph glyph-name="ion-plane" unicode="&#xf214;" 
+d="M250 136c0 -7 1 -69 -6 -102c-1 -4 3 -4 5 -7l51 -33c2 -2 3 -8 3 -8l1 -18l-68 16l-12 -32l-12 32l-68 -16l1 18s0 6 2 8l52 33c2 3 6 3 5 7c-7 33 -6 95 -6 102s-8 5 -8 5l-62 -13l-128 -49c0 23 2 26 9 31l183 131s5 63 5 113c0 24 12 78 27 78s27 -54 27 -78
+c0 -53 5 -113 5 -113l183 -131c6 -4 9 -7 9 -31l-128 49l-62 13s-8 2 -8 -5z" />
+    <glyph glyph-name="ion-planet" unicode="&#xf343;" horiz-adv-x="512" 
+d="M96 182c39 -24 85 -48 134 -69c44 -19 87 -35 126 -46c-27 -22 -62 -35 -100 -35c-85 0 -155 66 -160 150zM107 251c1 4 3 8 5 11c10 21 26 40 44 55c27 22 62 35 100 35c85 0 155 -66 160 -150v-10c0 -21 -4 -41 -11 -59c-1 -4 -3 -8 -5 -11c-6 1 -13 3 -19 5
+c-39 11 -82 26 -126 45c-56 24 -108 52 -148 79zM430 163c57 -35 87 -62 81 -82c-4 -12 -19 -17 -44 -17c-50 0 -136 23 -231 64c-141 61 -246 140 -235 175c4 12 20 20 44 17c22 -3 47 -9 73 -18c-8 -9 -8 -12 -14 -22c-23 5 -44 8 -59 8h-6c2 -2 5 -6 8 -9
+c11 -11 27 -24 46 -37c41 -29 97 -59 156 -85c44 -19 89 -35 128 -46c36 -10 68 -15 90 -15h6c-2 2 -5 6 -8 9c-10 10 -24 22 -41 34c4 11 5 12 6 24z" />
+    <glyph glyph-name="ion-play" unicode="&#xf215;" horiz-adv-x="320" 
+d="M309 215c7 -6 11 -14 11 -23s-4 -17 -11 -23l-278 -166c-4 -2 -7 -3 -11 -3c-11 0 -20 9 -20 20v0v344v0c0 11 9 20 20 20c4 0 8 -1 11 -3z" />
+    <glyph glyph-name="ion-playstation" unicode="&#xf30a;" horiz-adv-x="512" 
+d="M400 245c0 -11 0 -22 -2 -33c-2 -10 -5 -20 -10 -28c-4 -7 -10 -13 -18 -17c-7 -4 -16 -6 -24 -6c-13 0 -31 4 -42 9v131v2c0 9 -7 17 -15 17h-1c-9 0 -16 -8 -16 -17v-3v-300l-80 26v358s28 -4 75 -18s67 -21 84 -31c8 -5 15 -11 21 -17c7 -7 13 -14 17 -23
+c8 -16 10 -33 11 -50zM87 90c-4 -2 -8 -3 -11 -6c-1 -1 -3 -3 -2 -5s4 -4 6 -5c6 -2 13 -3 19 -3c7 0 15 0 22 2c5 1 9 3 14 5c30 10 41 12 41 12v-42c-14 -2 -36 -4 -50 -4c-30 -1 -60 4 -88 13c-9 3 -19 6 -27 12c-4 3 -8 8 -10 13c-2 4 -1 9 1 13s5 8 9 11
+c9 6 18 10 28 14c8 4 17 7 26 10c35 12 111 37 111 37v-47s-62 -20 -89 -30zM512 102c0 -5 -2 -9 -5 -13c-6 -7 -14 -11 -22 -15s-17 -8 -26 -11c-54 -19 -171 -59 -171 -59v48s92 30 133 44c6 2 11 4 16 8c2 2 4 3 3 6c-1 2 -4 4 -6 5c-6 2 -13 3 -19 3
+c-10 0 -20 -2 -30 -5c-29 -10 -97 -32 -97 -32v49s45 14 67 16c8 1 23 1 31 1c26 0 54 -3 79 -11c5 -2 8 -3 14 -5c9 -3 18 -8 25 -14c4 -4 8 -9 8 -15z" />
+    <glyph glyph-name="ion-plus-circled" unicode="&#xf216;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM352 176v32h-112v112h-32v-112h-112v-32h112v-112h32v112h112z" />
+    <glyph glyph-name="ion-plus-round" unicode="&#xf217;" horiz-adv-x="384" 
+d="M353 224c17 0 31 -14 31 -32s-14 -32 -31 -32h-129v-129c0 -17 -14 -31 -32 -31s-32 14 -32 31v129h-129c-17 0 -31 14 -31 32s14 32 31 32h129v129c0 17 14 31 32 31s32 -14 32 -31v-129h129z" />
+    <glyph glyph-name="ion-plus" unicode="&#xf218;" horiz-adv-x="384" 
+d="M384 224v-64h-160v-160h-64v160h-160v64h160v160h64v-160h160z" />
+    <glyph glyph-name="ion-podium" unicode="&#xf344;" 
+d="M0 0v192h128v-192h-128zM160 0v288h128v-288h-128zM320 0v128h128v-128h-128z" />
+    <glyph glyph-name="ion-pound" unicode="&#xf219;" 
+d="M93 96h-93v54h101l13 84h-99v54h107l22 128h64l-22 -128h106l22 128h63l-22 -128h93v-54h-102l-12 -84h99v-54h-107l-22 -128h-63l22 128h-107l-22 -128h-63zM177 234l-12 -84h106l12 84h-106v0z" />
+    <glyph glyph-name="ion-power" unicode="&#xf2a9;" 
+d="M224 192c-18 0 -32 14 -32 32v160c0 18 14 32 32 32s32 -14 32 -32v-160c0 -18 -14 -32 -32 -32zM347 379c61 -40 101 -109 101 -187c0 -124 -100 -224 -224 -224s-224 100 -224 224c0 78 40 147 101 187v0c5 3 11 5 17 5c18 0 32 -14 32 -32c0 -6 -2 -12 -5 -17
+c-2 -3 -4 -6 -7 -8c-1 -1 -3 -2 -4 -3c-8 -6 -16 -12 -23 -19c-30 -30 -47 -70 -47 -113s17 -83 47 -113s70 -47 113 -47s83 17 113 47s47 70 47 113s-17 83 -47 113c-7 7 -15 13 -23 19c-1 1 -3 2 -4 3c-3 2 -5 5 -7 8c-3 5 -5 11 -5 17c0 18 14 32 32 32c6 0 12 -2 17 -5
+v0z" />
+    <glyph glyph-name="ion-pricetag" unicode="&#xf2aa;" 
+d="M439 187c12 -12 12 -31 0 -43l-165 -167c-11 -11 -30 -11 -42 -1l-3 3l-206 209l-6 5c-6 7 -9 15 -10 24v0v2v0l-7 98v4v0c0 12 4 24 13 33l49 49c8 9 20 13 31 13h4l100 -4v0c12 0 22 -4 30 -12v0l2 -2v0l210 -211v0v0zM112 256c26 0 48 22 48 48s-22 48 -48 48
+s-48 -22 -48 -48s22 -48 48 -48z" />
+    <glyph glyph-name="ion-pricetags" unicode="&#xf2ab;" 
+d="M440 209c10 -11 11 -28 0 -39l-29 -29c11 11 10 28 0 39v0v0l-190 191v0l-1 1h-1c-8 7 -16 12 -27 12v0l-90 3h-4c-9 0 -19 -3 -26 -10l28 27c8 8 17 12 27 12h4l90 -4v0c11 0 19 -4 27 -11h1l1 -1v0l190 -191v0v0zM396 166v0c11 -11 11 -29 0 -40l-108 -109v1l-26 -27
+l-2 -2l-13 -13c-10 -10 -26 -10 -37 -1l-3 3l-186 188l-5 5c-5 6 -9 14 -10 22v0v2v0l-6 88v3v1c0 11 4 21 12 29l44 45l1 1l1 1c7 6 17 9 26 9h4l90 -3v0c11 0 19 -4 27 -11v0l2 -1v0l189 -191v0zM79 308c-12 -8 -21 -21 -21 -37c0 -24 19 -43 43 -43c16 0 29 9 37 21
+c4 7 7 14 7 22c0 24 -20 44 -44 44c-8 0 -15 -3 -22 -7z" />
+    <glyph glyph-name="ion-printer" unicode="&#xf21a;" 
+d="M392 320c28 0 56 -19 56 -55v-131c0 -31 -28 -54 -56 -54h-40v-112h-8h-8h-224h-11h-5v112h-40c-28 0 -56 24 -56 62v123c0 38 28 55 56 55h40v64h256v-64h40zM336 -16v176h-224v-176h224zM336 320v48h-224v-48h224zM384 256v16h-17v-16h17zM128 112v16h192v-16h-192z
+M128 64v16h192v-16h-192zM128 16v16h192v-16h-192z" />
+    <glyph glyph-name="ion-pull-request" unicode="&#xf345;" horiz-adv-x="384" 
+d="M64 384c35 0 64 -29 64 -64c0 -24 -13 -44 -32 -55v-178c19 -11 32 -31 32 -55c0 -35 -29 -64 -64 -64s-64 29 -64 64c0 24 13 44 32 55v178c-19 11 -32 31 -32 55c0 35 29 64 64 64zM64 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM64 288
+c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32zM351 88c20 -11 33 -32 33 -56c0 -35 -29 -64 -64 -64s-64 29 -64 64c0 23 12 44 31 55v156c0 16 -4 26 -11 33c-10 9 -26 12 -52 12v-64l-96 96l96 96v-64c42 1 74 -8 96 -29c21 -19 31 -46 31 -80v-155z
+M320 0c18 0 32 14 32 32s-14 32 -32 32s-32 -14 -32 -32s14 -32 32 -32z" />
+    <glyph glyph-name="ion-qr-scanner" unicode="&#xf346;" horiz-adv-x="416" 
+d="M48 324v-68h-48v68c0 33 28 60 61 60h67v-48h-68c-7 0 -12 -5 -12 -12zM356 384c33 0 60 -27 60 -60v-68h-48v68c0 7 -6 12 -13 12h-67v48h68zM368 61v67h48v-67c0 -33 -27 -61 -60 -61h-68v49h68c7 0 12 5 12 12zM60 49h68v-49h-67c-33 0 -61 28 -61 61v67h48v-67
+c0 -7 5 -12 12 -12z" />
+    <glyph glyph-name="ion-quote" unicode="&#xf347;" horiz-adv-x="384" 
+d="M128 384c-41 0 -73 -11 -95 -33s-33 -54 -33 -95v-256h160v256h-96c0 23 5 39 15 49s26 15 49 15zM352 384c-41 0 -73 -11 -95 -33s-33 -54 -33 -95v-256h160v256h-96c0 23 5 39 15 49s26 15 49 15z" />
+    <glyph glyph-name="ion-radio-waves" unicode="&#xf2ac;" 
+d="M160 192c0 43 21 64 64 64s64 -21 64 -64s-21 -64 -64 -64s-64 21 -64 64zM112 192c0 -18 5 -35 13 -50s19 -28 33 -37l-23 -25c-6 5 -13 10 -18 16c-25 26 -37 59 -37 96s12 70 37 96c5 6 12 11 18 16l23 -25c-14 -9 -25 -22 -33 -37s-13 -32 -13 -50zM336 192
+c0 18 -5 35 -13 50s-19 28 -33 37l23 25c6 -5 13 -10 18 -16c25 -26 37 -59 37 -96s-12 -70 -37 -96c-5 -6 -12 -11 -18 -16l-23 25c14 9 25 22 33 37s13 32 13 50zM32 192c0 -27 6 -53 17 -77s27 -43 47 -59l-23 -24c-6 5 -12 10 -17 16c-18 19 -31 41 -41 65
+c-10 25 -15 51 -15 79s5 54 15 79c10 24 23 46 41 65c5 6 11 11 17 16l23 -24c-10 -8 -18 -17 -26 -27s-14 -21 -20 -32s-10 -24 -13 -37s-5 -26 -5 -40zM416 192c0 27 -6 53 -17 77s-27 43 -47 59l23 24c6 -5 12 -10 17 -16c18 -19 31 -41 41 -65c10 -25 15 -51 15 -79
+s-5 -54 -15 -79c-10 -24 -23 -46 -41 -65c-4 -5 -10 -10 -17 -16l-23 24c20 16 36 35 47 59s17 50 17 77z" />
+    <glyph glyph-name="ion-record" unicode="&#xf21b;" horiz-adv-x="416" 
+d="M208 -16c-115 0 -208 93 -208 208s93 208 208 208s208 -93 208 -208s-93 -208 -208 -208z" />
+    <glyph glyph-name="ion-refresh" unicode="&#xf21c;" 
+d="M352 96l-104 112h74c-7 65 -64 112 -130 112c-71 0 -128 -57 -128 -128s57 -128 128 -128c28 0 53 8 75 24l6 5l43 -46l-7 -6c-34 -26 -74 -41 -117 -41c-91 0 -167 64 -187 149v0c0 1 -1 2 -1 3v1v2s-1 2 -1 3v1c0 1 -1 3 -1 4v0c-1 6 -2 13 -2 19v1v4v5v5v4v1
+c0 6 1 13 2 19v0c0 1 1 3 1 4v1c0 1 1 1 1 2v3v1c0 1 1 2 1 3v0c20 85 96 149 187 149v0v0c11 0 21 -1 31 -3h2h2c57 -10 106 -47 133 -96c13 -23 21 -49 23 -77h65z" />
+    <glyph glyph-name="ion-reply-all" unicode="&#xf21d;" horiz-adv-x="416" 
+d="M257 256c153 0 159 -208 159 -208c-51 93 -91 102 -159 102v-92l-152 134l152 144v-80zM0 192l144 136v-57l-82 -79l82 -68v-58z" />
+    <glyph glyph-name="ion-reply" unicode="&#xf21e;" horiz-adv-x="384" 
+d="M384 48c-53 93 -122 102 -224 102v-92l-160 134l160 144v-80c187 0 224 -208 224 -208z" />
+    <glyph glyph-name="ion-ribbon-a" unicode="&#xf348;" horiz-adv-x="352" 
+d="M272 416l80 -96l-64 -134c-24 30 -59 49 -99 53zM80 416l83 -177c-40 -4 -75 -23 -99 -53l-64 134zM189 416h67l-53 -112h-27h-27l-53 112h80h13zM176 224c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128zM176 0c53 0 96 43 96 96
+s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM176 184c49 0 88 -39 88 -88s-39 -88 -88 -88s-88 39 -88 88s39 88 88 88z" />
+    <glyph glyph-name="ion-ribbon-b" unicode="&#xf349;" horiz-adv-x="384" 
+d="M192 376c49 0 88 -39 88 -88s-39 -88 -88 -88s-88 39 -88 88s39 88 88 88zM192 416c71 0 128 -57 128 -128s-57 -128 -128 -128s-128 57 -128 128s57 128 128 128zM192 192c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM83 194c26 -30 65 -50 109 -50
+c12 0 23 1 34 4l-34 -74l-48 -106l-48 80h-96zM301 194l83 -146h-96l-48 -80l-40 88l45 98c22 9 41 23 56 40z" />
+    <glyph glyph-name="ion-sad-outline" unicode="&#xf4d7;" 
+d="M367 164c3 -9 -2 -17 -11 -19c-3 -1 -7 0 -10 1c-5 2 -9 5 -11 10s-4 12 -13 15s-14 0 -19 -3c-4 -3 -10 -3 -15 -1c-3 1 -7 3 -9 6c-6 8 -3 17 5 22c15 9 29 13 49 6s29 -21 34 -37zM165 195c8 -5 10 -14 4 -22c-2 -3 -6 -5 -9 -6c-5 -2 -11 -2 -15 1c-5 3 -10 6 -19 3
+s-11 -10 -13 -15s-6 -8 -11 -10c-3 -1 -7 -2 -10 -1c-9 2 -14 10 -11 19c5 16 14 30 34 37s35 3 50 -6zM224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56
+s-100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136s85 -56 136 -56s100 20 136 56zM317 89c5 -7 3 -17 -4 -22c-3 -2 -6 -3 -9 -3c-5 0 -10 3 -13 7c0 0 -19 25 -67 25s-67 -25 -67 -25c-3 -4 -8 -7 -13 -7c-3 0 -6 1 -9 3c-7 5 -9 15 -4 22c1 2 28 39 93 39
+s92 -37 93 -39z" />
+    <glyph glyph-name="ion-sad" unicode="&#xf34a;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM113 156c2 5 4 12 13 15s14 0 19 -3c4 -3 10 -3 15 -1c3 1 7 3 9 6c6 8 4 17 -4 22c-15 9 -30 13 -50 6s-29 -21 -34 -37c-3 -9 2 -17 11 -19c3 -1 7 0 10 1c5 2 9 5 11 10z
+M313 67c7 5 9 15 4 22c-1 2 -28 39 -93 39s-92 -37 -93 -39c-5 -7 -3 -17 4 -22c3 -2 6 -3 9 -3c5 0 10 3 13 7c0 0 19 25 67 25s67 -25 67 -25c3 -4 8 -7 13 -7c3 0 6 1 9 3zM356 145c9 2 14 10 11 19c-5 16 -14 30 -34 37s-34 3 -49 -6c-8 -5 -11 -14 -5 -22
+c2 -3 6 -5 9 -6c5 -2 11 -2 15 1c5 3 10 6 19 3s11 -10 13 -15s6 -8 11 -10c3 -1 7 -2 10 -1z" />
+    <glyph glyph-name="ion-scissors" unicode="&#xf34b;" horiz-adv-x="384" 
+d="M341 332c-13 -33 -117 -172 -117 -172l-32 -32s-31 -13 -50 -43s-33 -71 -33 -71v0c-7 -26 -28 -46 -53 -46c-31 0 -56 29 -56 64s25 64 56 64c13 0 25 -5 34 -13c2 -1 3 -3 4 -4v0l2 -2c4 -4 7 -2 14 11c8 15 17 35 27 54s38 59 38 59l17 23l144 192
+c23 -20 18 -51 5 -84zM56 0c15 0 28 14 28 32s-13 32 -28 32s-28 -14 -28 -32s13 -32 28 -32zM192 160c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM143 183c-30 41 -90 125 -100 149c-13 33 -18 64 5 84l134 -178l-3 -4v0v0l-17 -23v-1v0
+c-1 -1 -10 -13 -19 -27zM328 96c31 0 56 -29 56 -64s-25 -64 -56 -64c-25 0 -47 20 -54 46v0s-13 41 -32 71c-11 17 -26 28 -36 35l29 29l1 1h1c1 1 1 2 2 4c3 -4 5 -9 7 -12c10 -19 20 -39 28 -54c7 -13 10 -15 14 -11c1 1 0 1 1 2h1c1 1 2 3 4 4c9 8 21 13 34 13zM328 0
+c15 0 28 14 28 32s-13 32 -28 32s-28 -14 -28 -32s13 -32 28 -32z" />
+    <glyph glyph-name="ion-search" unicode="&#xf21f;" horiz-adv-x="384" 
+d="M381 61c4 -4 4 -10 0 -14l-43 -44c-2 -2 -5 -3 -8 -3s-5 1 -7 3l-84 86c-25 -15 -52 -23 -80 -23c-87 0 -159 71 -159 159s72 159 159 159s158 -71 158 -159c0 -27 -7 -54 -21 -78zM159 322c-53 0 -97 -43 -97 -97s44 -97 97 -97s96 43 96 97s-43 97 -96 97z" />
+    <glyph glyph-name="ion-settings" unicode="&#xf2ad;" horiz-adv-x="416" 
+d="M402 310c10 -6 15 -25 14 -36c-1 -17 -7 -36 -25 -54c-1 -1 -2 -1 -3 -2c-26 -25 -62 -30 -94 -20c-1 1 -2 2 -4 2c-5 1 -10 0 -13 -4l-36 -39c52 -50 107 -96 107 -96c2 -2 2 -5 0 -7l-50 -51c-2 -2 -5 -2 -7 0c0 0 -44 55 -93 107l-92 -98c-14 -16 -40 -15 -55 0
+c-15 16 -15 42 1 56l97 93l-12 12c-2 2 -3 7 -1 10l2 5c-25 26 -36 33 -56 32s-36 -13 -48 -28s-10 -52 -8 -62s-7 -6 -12 0c-9 10 -23 50 -6 93s42 69 48 75s16 15 24 21s21 -1 27 5c4 4 5 11 5 16l-4 4c-2 2 -2 5 0 7l31 31c2 2 5 2 7 0l50 -50c2 -2 2 -6 0 -8l-31 -31
+c-2 -2 -5 -2 -7 0l-8 9c-7 0 -15 -5 -17 -10c-3 -6 -6 -21 -3 -33c3 -11 13 -20 36 -43l5 3c4 2 8 1 10 -1c0 0 1 -2 13 -14l38 37c4 3 5 7 4 13c0 2 0 4 -1 5c-10 33 -6 69 19 96l2 2c18 18 36 25 53 26c10 1 30 -5 35 -15l-48 -48l-2 -3l-1 -1c-1 -1 -1 -2 -1 -4
+s0 -3 1 -5l2 -2l2 -2l41 -42l3 -3l1 -1c1 -1 2 -1 4 -1s3 0 4 1l2 1l2 3z" />
+    <glyph glyph-name="ion-share" unicode="&#xf220;" horiz-adv-x="384" 
+d="M288 70v59l38 31v-109c0 -11 -8 -19 -19 -19h-288c-11 0 -19 9 -19 19v218c0 11 8 19 19 19h120c-29 -18 -43 -38 -43 -38h-58v-180h250zM256 224c-84 0 -116 -24 -160 -96c0 0 5 164 160 164v60l128 -96l-128 -96v64z" />
+    <glyph glyph-name="ion-shuffle" unicode="&#xf221;" 
+d="M338 267c-52 0 -83 -43 -120 -92c-41 -55 -88 -120 -171 -120h-47v63h47c52 0 84 47 121 96c41 55 87 116 170 116h29v54l81 -81l-81 -84v48h-29zM121 230c-21 21 -42 35 -74 36c-34 1 -47 0 -47 0v63h47c48 0 83 -20 113 -48c-10 -12 -19 -24 -28 -36
+c-4 -5 -7 -10 -11 -15zM367 118v47l81 -84l-81 -81v54h-29c-50 0 -87 23 -117 53c12 14 22 28 32 41c2 3 5 6 7 9c22 -24 46 -39 78 -39h29z" />
+    <glyph glyph-name="ion-skip-backward" unicode="&#xf222;" horiz-adv-x="384" 
+d="M12 352h8c7 0 12 -5 12 -12v-113l187 122c2 2 5 3 8 3c8 0 16 -7 16 -17v-63l118 78c2 2 5 2 8 2c8 0 15 -7 15 -17v-286c0 -10 -7 -17 -15 -17c-3 0 -5 1 -8 3l-118 78v-64c0 -10 -8 -17 -16 -17c-3 0 -5 1 -8 3l-187 122v-113c0 -7 -5 -12 -12 -12h-8
+c-7 0 -12 5 -12 12v296c0 7 5 12 12 12z" />
+    <glyph glyph-name="ion-skip-forward" unicode="&#xf223;" horiz-adv-x="384" 
+d="M372 352c7 0 12 -5 12 -12v-296c0 -7 -5 -12 -12 -12h-8c-7 0 -12 5 -12 12v113l-187 -122c-3 -2 -5 -3 -8 -3c-8 0 -15 7 -15 17v64l-119 -78c-3 -2 -5 -3 -8 -3c-8 0 -15 7 -15 17v286c0 10 7 17 15 17c3 0 6 0 8 -2l119 -78v63c0 10 7 17 15 17c3 0 6 -1 8 -3
+l187 -122v113c0 7 5 12 12 12h8z" />
+    <glyph glyph-name="ion-social-android-outline" unicode="&#xf224;" horiz-adv-x="352" 
+d="M272 240h-192v-60v-89h24h16v-15v-52c0 -4 4 -8 8 -8s8 4 8 8v52v15h17h49h15v-15v-52c0 -2 1 -4 3 -6h1v0c1 -1 2 -2 4 -2h1v0v0c4 0 7 4 7 8v52v15h17h22v89v60zM288 256v0v-76v-90c0 -7 -3 -15 -10 -15h-29v-51c0 -13 -10 -24 -23 -24v0h-1c-6 0 -11 2 -15 5
+c-5 4 -9 11 -9 19v51h-49v-51c0 -13 -11 -24 -24 -24s-24 11 -24 24v51h-28c-7 0 -12 8 -12 15v90v76h224zM328 256c-4 0 -8 -4 -8 -8v-96c0 -4 4 -8 8 -8s8 4 8 8v96c0 4 -4 8 -8 8zM328 272v0c13 0 24 -11 24 -24v-96c0 -13 -11 -24 -24 -24s-24 11 -24 24v96
+c0 13 11 24 24 24zM24 256c-4 0 -8 -4 -8 -8v-96c0 -4 4 -8 8 -8s8 4 8 8v96c0 4 -4 8 -8 8zM24 272v0c13 0 24 -11 24 -24v-96c0 -13 -11 -24 -24 -24s-24 11 -24 24v96c0 13 11 24 24 24zM175 354c-14 0 -27 -3 -38 -6l-10 -4c-28 -12 -40 -37 -44 -56h186
+c-4 18 -15 43 -44 56l-10 4c-12 4 -25 6 -39 6v0v0h-1zM105 384v0h1l19 -23c13 5 30 9 50 9h1c20 0 36 -4 50 -9l20 23v0s1 -1 2 -1c1 -1 2 -3 2 -3l-19 -22c48 -21 56 -71 57 -86h-224c1 15 9 66 57 87l-19 22c0 1 1 1 2 2zM127 309c-7 0 -14 6 -14 13s6 14 14 14
+c7 0 13 -7 13 -14s-5 -13 -13 -13zM225 309c-7 0 -13 6 -13 13s5 14 13 14c7 0 13 -7 13 -14s-6 -13 -13 -13z" />
+    <glyph glyph-name="ion-social-android" unicode="&#xf225;" horiz-adv-x="352" 
+d="M64 180v76h224v-76v-90c0 -7 -4 -14 -11 -14h-28v-52c0 -13 -11 -24 -24 -24v0h-1c-6 0 -10 2 -14 5c-5 4 -9 11 -9 19v52h-49v-52c0 -13 -11 -24 -24 -24s-24 11 -24 24v52h-29c-7 0 -11 7 -11 14v90zM328 272c13 0 24 -11 24 -24v-96c0 -13 -11 -24 -24 -24
+s-24 11 -24 24v96c0 13 11 24 24 24zM24 272c13 0 24 -11 24 -24v-96c0 -13 -11 -24 -24 -24s-24 11 -24 24v96c0 13 11 24 24 24zM231 359c48 -21 56 -72 57 -87h-224c1 15 8 66 56 87l-18 22c0 1 0 1 1 2s3 1 3 1l19 -23c14 5 31 9 51 9s36 -4 50 -9l20 23c0 1 1 0 2 -1
+l2 -2zM127 309c8 0 13 6 13 13s-6 14 -13 14c-8 0 -14 -7 -14 -14s7 -13 14 -13zM225 309c7 0 14 6 14 13s-7 14 -14 14c-8 0 -13 -7 -13 -14s6 -13 13 -13z" />
+    <glyph glyph-name="ion-social-angular-outline" unicode="&#xf4d8;" 
+d="M224 384l-188 -69l39 -230l149 -80l149 80l39 230zM224 416v0l224 -80l-46 -272l-178 -96l-178 96l-46 272zM312 96l-27 56h-122l-27 -56h-40l128 280l128 -280h-40zM182 192h84l-42 89z" />
+    <glyph glyph-name="ion-social-angular" unicode="&#xf4d9;" 
+d="M182 192l42 89l42 -89h-84zM224 416l224 -80l-46 -272l-178 -96l-178 96l-46 272zM312 96h40l-128 280l-128 -280h40l27 56h122z" />
+    <glyph glyph-name="ion-social-apple-outline" unicode="&#xf226;" horiz-adv-x="320" 
+d="M238 278c-15 0 -26 -4 -37 -8c-10 -4 -21 -8 -35 -8s-25 4 -37 8c-11 4 -22 8 -34 8c-11 0 -23 -3 -34 -10c-12 -7 -23 -18 -31 -31c-12 -18 -16 -47 -13 -77c3 -34 16 -69 35 -99c13 -21 30 -45 50 -45h1c8 0 13 3 20 6c10 5 23 10 44 10v0c21 0 34 -5 44 -10
+c7 -3 12 -6 19 -6v0c22 0 44 35 52 48c8 12 12 20 17 31c-12 7 -22 16 -30 28c-10 15 -17 33 -18 52c-1 18 2 37 10 53c6 12 14 22 24 30c-14 13 -31 20 -47 20zM238 294v0c25 0 52 -14 71 -39c-63 -36 -53 -128 11 -153c-9 -20 -13 -28 -24 -46c-16 -25 -37 -56 -65 -56h-1
+c-24 0 -31 16 -63 16v0c-33 0 -40 -16 -64 -16h-1c-28 0 -48 28 -64 53c-44 69 -48 150 -21 193c19 30 50 48 78 48c29 0 47 -16 71 -16c23 0 38 16 72 16zM214 364c-11 -5 -21 -13 -28 -22c-4 -5 -9 -13 -13 -23c-1 -3 -2 -6 -2 -9c11 4 21 11 28 21c4 5 12 18 15 33z
+M230 384v0c3 -23 -6 -46 -18 -62c-13 -17 -35 -30 -56 -30h-1c-4 22 6 44 18 60c14 17 37 31 57 32z" />
+    <glyph glyph-name="ion-social-apple" unicode="&#xf227;" horiz-adv-x="320" 
+d="M238 294v0c25 0 52 -14 71 -39c-63 -36 -53 -128 11 -153c-9 -20 -13 -28 -24 -46c-16 -25 -37 -56 -65 -56h-1c-24 0 -31 16 -63 16v0c-33 0 -40 -16 -64 -16h-1c-28 0 -48 28 -64 53c-44 69 -48 150 -21 193c19 30 50 48 78 48c29 0 47 -16 71 -16c23 0 38 16 72 16z
+M230 384v0c3 -23 -6 -46 -18 -62c-13 -17 -35 -30 -56 -30h-1c-4 22 6 44 18 60c14 17 37 31 57 32z" />
+    <glyph glyph-name="ion-social-bitcoin-outline" unicode="&#xf2ae;" horiz-adv-x="320" 
+d="M184 400h-8v-48v-16h-16h-32h-16v16v48h-9v-48v-16h-16h-72v-16h13c11 0 19 0 25 -3s10 -7 13 -13s3 -8 3 -20v-178c0 -11 0 -18 -3 -24v-1c-1 -3 -4 -10 -12 -14h-1c-5 -3 -8 -3 -17 -3h-13l-3 -16h67h16v-16v-48h9v48v16h16h32h16v-16v-48h8v49v16h15c23 1 41 5 55 10
+c16 6 28 15 37 26c8 11 12 29 13 42c1 14 -1 29 -4 36s-8 16 -21 23c-7 4 -14 6 -21 8l-46 11l43 19c4 2 7 4 12 9c6 5 9 12 11 16c2 5 4 13 3 22c-1 17 -4 29 -10 37c-7 9 -17 16 -31 21c-12 5 -24 7 -41 8l-15 1v15v47zM200 416v0v-63c20 -1 32 -4 45 -9
+c16 -6 29 -15 38 -27s12 -28 13 -45c1 -10 0 -20 -3 -28s-8 -16 -16 -23c-6 -6 -11 -9 -16 -11c9 -2 17 -6 25 -10c15 -8 24 -18 29 -30c4 -10 6 -30 5 -44c-1 -16 -6 -37 -16 -51c-11 -14 -26 -24 -45 -31c-15 -6 -33 -10 -59 -11v-65h-40v64h-32v-64h-41v64h-87l8 48h28
+c9 0 8 1 11 2s4 3 5 6s1 9 1 18v178c0 9 0 10 -1 12s-3 4 -6 6s-9 2 -18 2h-28v48h87v64h41v-64h32v64h40zM160 298v-74h-32v74h32zM160 176v0v-90h-32v90h32zM200 294v0c6 -2 10 -7 14 -12c4 -6 6 -13 6 -21s-2 -15 -7 -21c-4 -5 -7 -9 -13 -12v66zM200 174v0
+c5 -1 8 -1 12 -3c8 -3 14 -7 19 -13s8 -15 8 -24c0 -11 -2 -19 -10 -26s-13 -11 -23 -15c-2 -1 -4 0 -6 -1v82z" />
+    <glyph glyph-name="ion-social-bitcoin" unicode="&#xf2af;" horiz-adv-x="320" 
+d="M314 169c4 -10 7 -30 6 -44c-1 -16 -5 -37 -16 -51s-26 -24 -45 -31c-15 -6 -33 -10 -59 -11v-64h-40v64h-32v-64h-41v64h-87l9 48h26c9 0 9 0 12 1s4 4 5 7s2 8 2 17v173c0 9 -1 16 -2 18s-3 4 -6 6s-9 2 -18 2h-28v48h87v64h41v-64h32v64h40v-64c20 -1 33 -4 46 -9
+c16 -6 28 -15 37 -27s12 -28 13 -45c1 -10 0 -20 -3 -28c-2 -8 -8 -16 -16 -23c-6 -6 -11 -9 -16 -11c9 -2 17 -6 25 -10c15 -8 23 -18 28 -30zM128 298v-74h32v74h-32zM128 86h32v90h-32v-90zM200 294v-66c6 3 9 7 13 12c5 6 7 12 7 20s-2 15 -6 21c-4 5 -8 11 -14 13z
+M229 107c8 7 10 15 10 26c0 9 -3 19 -8 25s-12 10 -20 13c-4 2 -6 2 -11 3v-82c2 0 5 1 7 2c10 4 14 6 22 13z" />
+    <glyph glyph-name="ion-social-buffer-outline" unicode="&#xf228;" horiz-adv-x="384" 
+d="M7 284c-9 4 -9 11 0 15l169 82c4 2 10 3 16 3s12 -1 16 -3l169 -82c9 -4 9 -11 0 -15l-169 -82c-4 -2 -10 -3 -16 -3s-12 1 -16 3zM183 366l-156 -75l156 -75c2 -1 5 -1 9 -1s7 0 9 1l156 75l-156 75c-2 1 -5 2 -9 2s-7 -1 -9 -2zM377 200c9 -4 9 -12 0 -16l-169 -81
+c-4 -2 -10 -4 -16 -4s-12 2 -16 4l-169 81c-9 4 -9 12 0 16c0 0 27 13 33 16c5 3 7 3 13 0s123 -60 123 -60c4 -2 10 -3 16 -3s12 1 16 3c0 0 121 59 125 61s5 2 9 0s35 -17 35 -17zM201 117l156 75l-19 9l-123 -59c-6 -3 -15 -5 -23 -5s-17 2 -23 5l-123 59l-19 -9l156 -75
+c2 -1 5 -2 9 -2s7 1 9 2zM377 100c9 -4 9 -11 0 -15l-169 -82c-4 -2 -10 -3 -16 -3s-12 1 -16 3l-169 82c-9 4 -9 11 0 15c0 0 27 14 33 17c5 3 7 2 13 -1s123 -59 123 -59c4 -2 10 -3 16 -3s12 1 16 3c0 0 121 58 125 60s5 2 9 0s35 -17 35 -17zM201 18l156 75l-19 9
+l-123 -60c-6 -3 -15 -4 -23 -4s-17 1 -23 4l-123 60l-19 -9l156 -75c2 -1 5 -2 9 -2s7 1 9 2z" />
+    <glyph glyph-name="ion-social-buffer" unicode="&#xf229;" horiz-adv-x="384" 
+d="M7 284c-9 4 -9 11 0 15l169 82c4 2 10 3 16 3s12 -1 16 -3l169 -82c9 -4 9 -11 0 -15l-169 -82c-4 -2 -10 -3 -16 -3s-12 1 -16 3zM377 200c9 -4 9 -12 0 -16l-169 -81c-4 -2 -10 -4 -16 -4s-12 2 -16 4l-169 81c-9 4 -9 12 0 16c0 0 27 13 33 16c5 3 7 3 13 0
+s123 -60 123 -60c4 -2 10 -3 16 -3s12 1 16 3c0 0 121 59 125 61s5 2 9 0s35 -17 35 -17zM377 100c9 -4 9 -11 0 -15l-169 -82c-4 -2 -10 -3 -16 -3s-12 1 -16 3l-169 82c-9 4 -9 11 0 15c0 0 27 14 33 17c5 3 7 2 13 -1s123 -59 123 -59c4 -2 10 -3 16 -3s12 1 16 3
+c0 0 121 58 125 60s5 2 9 0s35 -17 35 -17z" />
+    <glyph glyph-name="ion-social-chrome-outline" unicode="&#xf4da;" 
+d="M224 416c123 0 224 -101 224 -224s-101 -224 -224 -224s-224 101 -224 224s101 224 224 224zM224 371c-57 0 -109 -27 -141 -68l54 -93c8 40 43 72 87 72h155c-30 54 -89 89 -155 89zM291 192c0 37 -30 67 -67 67s-67 -30 -67 -67s30 -67 67 -67s67 30 67 67zM45 192
+c0 -91 67 -166 154 -177l54 93c-9 -3 -19 -6 -29 -6c-34 0 -61 18 -77 45v0l-78 135c-16 -27 -24 -58 -24 -90zM224 13c99 0 179 80 179 179c0 24 -4 46 -13 67h-108c19 -17 32 -40 32 -67c0 -17 -5 -32 -13 -45v0z" />
+    <glyph glyph-name="ion-social-chrome" unicode="&#xf4db;" 
+d="M157 192c0 37 30 67 67 67s67 -30 67 -67s-30 -67 -67 -67s-67 30 -67 67zM445 230c2 -12 3 -25 3 -38c0 -106 -74 -195 -174 -218c-10 -2 -20 -4 -30 -5c-7 -1 -13 -1 -20 -1c-8 0 -17 0 -25 1v0v0v0v1l102 177c8 13 13 28 13 45c0 27 -13 50 -32 67h156
+c3 -9 5 -19 7 -29v0c-2 10 -4 20 -7 29v0c3 -9 5 -19 7 -29v0zM224 103c10 0 20 2 29 5l-78 -135v0c-42 9 -79 30 -108 59c-42 41 -67 97 -67 160c0 31 6 61 18 88c7 16 16 31 26 45v0l103 -178c16 -27 43 -44 77 -44zM59 343v0v1c24 26 55 47 90 59c23 8 49 13 75 13
+c73 0 138 -36 179 -90h1c10 -14 18 -29 25 -44v0c-7 15 -15 30 -25 44h-1c10 -14 19 -29 26 -44h-205c-44 0 -79 -32 -87 -72z" />
+    <glyph glyph-name="ion-social-codepen-outline" unicode="&#xf4dc;" 
+d="M356 244c5 -3 7 -6 7 -12v-81c0 -6 -3 -10 -8 -13c-41 -27 -82 -55 -123 -82c-6 -4 -11 -4 -17 0c-41 27 -81 55 -122 82c-5 3 -8 7 -8 13v80c0 6 3 11 8 14c41 27 81 54 122 81c6 4 11 4 17 0c41 -27 83 -55 124 -82zM236 296v-54c0 -1 1 -2 2 -3c16 -11 31 -21 47 -32
+c1 -1 3 -1 4 0l40 26zM212 295c0 0 -62 -41 -93 -62c14 -9 27 -17 40 -26c1 -1 3 -1 4 0c15 10 31 21 46 31c1 1 3 4 3 6v51zM109 211v-40l30 20zM212 87v53c0 1 -2 3 -3 4c-15 10 -31 21 -46 31c-2 1 -3 1 -5 0l-39 -26c31 -21 93 -62 93 -62zM227 165l39 26s-34 23 -40 27
+c-1 1 -4 0 -5 -1c-5 -3 -9 -6 -14 -9c-8 -6 -25 -17 -25 -17l39 -26c2 -1 4 -1 6 0zM236 87l93 62l-38 26c-2 2 -5 2 -7 0c-15 -10 -30 -21 -45 -31c-2 -2 -3 -3 -3 -6v-51zM338 171v40l-30 -20zM224 384c-51 0 -100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136
+s85 -56 136 -56s100 20 136 56s56 85 56 136s-20 100 -56 136s-85 56 -136 56zM224 416v0c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224z" />
+    <glyph glyph-name="ion-social-codepen" unicode="&#xf4dd;" 
+d="M209 144c1 -1 3 -3 3 -4v-53s-62 41 -93 62l39 26c2 1 3 1 5 0c15 -10 31 -21 46 -31zM163 207c-1 -1 -3 -1 -4 0c-13 9 -26 17 -40 26c31 21 93 62 93 62v-51c0 -2 -2 -5 -3 -6c-15 -10 -31 -21 -46 -31zM238 239c-1 1 -2 2 -2 3v54l93 -63l-40 -26c-1 -1 -3 -1 -4 0
+c-16 11 -31 21 -47 32zM226 218c6 -4 40 -27 40 -27l-39 -26c-2 -1 -4 -1 -6 0l-39 26s17 11 25 17c5 3 9 6 14 9c1 1 4 2 5 1zM109 211l30 -20l-30 -20v40zM224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM363 151v81
+c0 6 -2 9 -7 12c-41 27 -83 55 -124 82c-6 4 -11 4 -17 0c-41 -27 -81 -54 -122 -81c-5 -3 -8 -8 -8 -14v-80c0 -6 3 -10 8 -13c41 -27 81 -55 122 -82c6 -4 11 -4 17 0c41 27 82 55 123 82c5 3 8 7 8 13zM284 175c2 2 5 2 7 0l38 -26l-93 -62v51c0 3 1 4 3 6
+c15 10 30 21 45 31zM338 171l-30 20l30 20v-40z" />
+    <glyph glyph-name="ion-social-css3-outline" unicode="&#xf4de;" horiz-adv-x="384" 
+d="M291 81l-99 -28l-98 28l-7 78h48l4 -40l53 -15v0v0l54 15l5 64h-112l-4 50h121l4 51h-184l-4 49h241zM0 416h384l-35 -403l-157 -45l-157 45zM319 37l30 347h-314l30 -347l127 -36z" />
+    <glyph glyph-name="ion-social-css3" unicode="&#xf4df;" horiz-adv-x="384" 
+d="M192 109v0zM0 416h384l-35 -403l-157 -45l-157 45zM291 81l22 252h-241l4 -49h184l-4 -51h-121l4 -50h112l-5 -64l-54 -15v0v0l-53 15l-4 40h-48l7 -78l98 -28z" />
+    <glyph glyph-name="ion-social-designernews-outline" unicode="&#xf22a;" 
+d="M259 302v-53l-65 103zM0 188zM297 352l151 -119v-201h-248l-200 156h63c46 0 77 33 77 82c0 20 -5 37 -15 51l-3 3l37 -29v-107h41l-2 98l63 -98h36v84v80zM432 48v178l-119 92v1v-47v-83v-17h-15h-37h-9l-4 8l-33 50l1 -42v-16h-16h-41h-16v16v29c-3 -6 -7 -12 -12 -17
+c-8 -9 -18 -16 -30 -21s-24 -7 -38 -7h-16l159 -124h226zM59 298h-1h-3v-57h4c8 0 13 2 17 6c5 6 6 15 6 22c0 26 -12 29 -23 29zM59 314v0c25 0 39 -16 39 -45c0 -28 -14 -44 -40 -44h-19v89h20z" />
+    <glyph glyph-name="ion-social-designernews" unicode="&#xf22b;" 
+d="M258 303l1 -53l-64 102zM297 352l151 -118v-202h-248l-200 157v0h63c46 0 77 33 77 82c0 20 -5 37 -15 51l-3 3l37 -29v-107h40l-2 99l64 -99h36v83v80zM98 270c0 -28 -14 -44 -40 -44h-19v89h19c26 0 40 -16 40 -45z" />
+    <glyph glyph-name="ion-social-dribbble-outline" unicode="&#xf22c;" horiz-adv-x="384" 
+d="M192 384c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM314 296c-17 -25 -47 -47 -85 -64c5 -10 9 -20 13 -31c33 3 75 4 110 2c-2 35 -16 68 -38 93zM192 352c-14 0 -26 -2 -39 -5c23 -23 43 -53 62 -87c34 14 62 33 79 55
+c-28 23 -63 37 -102 37zM120 334c-41 -21 -71 -58 -83 -103h25c44 0 85 6 121 17c-19 34 -40 63 -63 86zM32 200v-8c0 -40 15 -78 40 -106c24 45 67 83 122 106c4 2 8 3 14 4c-3 8 -6 16 -10 24c-40 -13 -88 -20 -138 -21c-9 0 -19 1 -28 1zM192 32c20 0 39 3 57 10
+c-3 25 -8 53 -15 79c-4 17 -10 33 -16 49c-7 -2 -13 -4 -17 -6c-48 -22 -86 -56 -107 -98c27 -21 61 -34 98 -34zM278 58c40 26 68 67 73 116c-30 2 -68 3 -99 0c4 -12 9 -25 12 -38c7 -27 11 -52 14 -78z" />
+    <glyph glyph-name="ion-social-dribbble" unicode="&#xf22d;" horiz-adv-x="384" 
+d="M192 384c106 0 192 -86 192 -192s-86 -192 -192 -192s-192 86 -192 192s86 192 192 192zM192 32c88 0 160 72 160 160s-72 160 -160 160s-160 -72 -160 -160s72 -160 160 -160zM242 201c-4 11 -8 21 -13 31c25 11 47 24 63 39c15 -19 26 -42 28 -67c-26 0 -55 -1 -78 -3z
+M271 292c-15 -12 -34 -23 -56 -32c-12 22 -24 41 -38 59c5 1 10 1 15 1c30 0 57 -11 79 -28zM142 310c15 -18 28 -39 41 -62c-34 -10 -72 -16 -113 -17c11 36 38 65 72 79zM319 176c-4 -33 -21 -63 -46 -83c-3 14 -5 28 -9 43c-3 13 -8 26 -12 38c21 2 45 3 67 2zM194 192
+c-43 -18 -79 -46 -104 -78c-16 22 -26 49 -26 78v7c49 1 95 8 134 21c4 -8 7 -16 10 -24c-6 -1 -10 -2 -14 -4zM219 170c6 -16 11 -32 15 -49c4 -15 7 -31 10 -46c-16 -7 -34 -11 -52 -11c-31 0 -59 11 -81 29c22 30 53 54 90 71c4 2 11 4 18 6z" />
+    <glyph glyph-name="ion-social-dropbox-outline" unicode="&#xf22e;" horiz-adv-x="384" 
+d="M113 371l79 -66l-114 -71l-78 63zM27 295l52 -42l86 53l-53 46zM306 235l78 -63l-78 -51v-39l-114 -69l-114 68v39l-78 52l78 63l114 -71l-79 -66l-19 12v-20l98 -59l98 59v20l-19 -12l-79 66zM79 217l-52 -44l85 -55l53 44zM219 162l53 -44l85 56l-52 43zM384 297
+l-78 -63l-114 71l79 66zM219 305l86 -52l52 42l-85 56z" />
+    <glyph glyph-name="ion-social-dropbox" unicode="&#xf22f;" horiz-adv-x="384" 
+d="M113 371l79 -66l-114 -71l-78 63zM0 172l78 62l114 -70l-79 -66zM192 164l114 70l78 -62l-113 -74zM384 297l-78 -63l-114 71l79 66zM192 150l80 -66l34 22v-25l-114 -68l-114 68v25l34 -22z" />
+    <glyph glyph-name="ion-social-euro-outline" unicode="&#xf4e0;" horiz-adv-x="320" 
+d="M214 384c-53 0 -91 -9 -115 -27c-22 -16 -33 -40 -33 -74v-11v-17h-16h-34v-16h34h16v-15v-48v-17h-16h-34v-16h34h16v-15v-27c0 -34 11 -58 33 -74c24 -18 62 -27 115 -27c31 0 59 2 88 8l-5 35c-30 -4 -55 -7 -80 -7c-36 0 -59 6 -74 19c-19 16 -21 40 -21 60v13v15h16
+h103l3 16h-106h-16v17v48v15h16h118l2 16h-120h-16v17v2c0 16 2 39 21 55c16 13 39 19 74 19c24 0 51 -3 80 -7l5 35c-29 6 -57 8 -88 8zM214 400v0c35 0 68 -3 106 -12l-9 -65c-37 6 -68 9 -94 9c-64 0 -79 -22 -79 -58v-3h139l-8 -48h-131v-48h124l-7 -48h-117v-12
+c0 -44 15 -63 79 -63c26 0 57 3 94 9l9 -65c-38 -9 -71 -12 -106 -12c-115 0 -164 41 -164 117v26h-50v48h50v48h-50v48h50v12c0 76 49 117 164 117z" />
+    <glyph glyph-name="ion-social-euro" unicode="&#xf4e1;" horiz-adv-x="320" 
+d="M138 176h124l-7 -48h-117v-13c0 -44 15 -63 79 -63c26 0 56 3 93 9l10 -65c-38 -9 -71 -12 -106 -12c-115 0 -164 41 -164 117v27h-50v48h50v48h-50v48h50v11c0 76 49 117 164 117c35 0 68 -3 106 -12l-10 -65c-37 6 -67 9 -93 9c-64 0 -79 -22 -79 -58v-2h138l-7 -48
+h-131v-48z" />
+    <glyph glyph-name="ion-social-facebook-outline" unicode="&#xf230;" horiz-adv-x="192" 
+d="M128 256h64l-8 -64h-56v-192h-83v192h-45v64h45v43c0 54 23 85 91 85h56v-64h-34c-27 0 -30 -9 -30 -26v-38zM170 208l4 32h-45h-17v17v37c0 10 1 21 9 30c10 11 25 12 37 12h18v32h-40c-28 0 -49 -6 -60 -18c-10 -11 -15 -27 -15 -51v-43v-16h-15h-30v-32h30h15v-16
+v-176h51v176v16h17h41z" />
+    <glyph glyph-name="ion-social-facebook" unicode="&#xf231;" horiz-adv-x="192" 
+d="M128 256h64l-8 -64h-56v-192h-83v192h-45v64h45v43c0 54 23 85 91 85h56v-64h-34c-27 0 -30 -9 -30 -26v-38z" />
+    <glyph glyph-name="ion-social-foursquare-outline" unicode="&#xf34c;" horiz-adv-x="320" 
+d="M302 284c-12 -60 -25 -131 -27 -138zM281 416c35 0 45 -20 37 -57c-3 -16 -10 -44 -16 -75l-27 -137c-3 -13 -8 -35 -39 -35h-72c-3 0 -3 0 -6 -3c-2 -2 -115 -133 -115 -133c-9 -10 -23 -8 -28 -6s-15 8 -15 26v380s10 40 43 40h238zM280 352c6 31 6 32 -24 32h-195
+c-29 0 -29 -3 -29 -28v-297c0 -38 1 -38 3 -38s10 8 29 31c0 0 78 89 79 90c2 2 3 2 6 2h62c26 0 28 6 33 31c4 21 36 177 36 177zM302 284c6 31 13 59 16 75zM233 352c5 0 9 -5 8 -11l-8 -44c-1 -4 -6 -9 -11 -9h-75c-8 0 -8 -5 -8 -13v-6c0 -8 0 -13 8 -13h64
+s11 -6 10 -12s-11 -51 -12 -54s-4 -9 -11 -9h-62c-9 0 -11 -1 -17 -8l-54 -63c-1 -1 -1 -1 -1 0v231c0 5 5 11 11 11h158z" />
+    <glyph glyph-name="ion-social-foursquare" unicode="&#xf34d;" horiz-adv-x="320" 
+d="M281 416c35 0 45 -20 37 -57c-10 -49 -40 -202 -43 -213c-3 -13 -8 -34 -39 -34h-72c-3 0 -3 0 -6 -3c-2 -2 -115 -133 -115 -133c-9 -10 -23 -8 -28 -6s-15 8 -15 26v380s10 40 43 40h238zM275 146c3 11 33 164 43 213zM267 351c2 9 -5 16 -12 16h-191
+c-9 0 -15 -8 -15 -15v-296c0 -1 1 -1 2 0c0 0 70 84 78 94s11 11 23 11h64c9 0 14 8 15 12s8 43 10 51s-6 16 -13 16h-82c-10 0 -18 8 -18 18v13c0 10 8 17 18 17h96s14 6 15 12z" />
+    <glyph glyph-name="ion-social-freebsd-devil" unicode="&#xf2c4;" horiz-adv-x="512" 
+d="M503 333c19 -37 8 -81 -20 -108s-60 -33 -60 -33c2 -32 16 -59 -41 -102c-43 -32 2 -90 2 -90c10 -14 23 -19 32 -32h-272s15 14 -7 32c0 0 -20 17 -18 29s6 13 9 15s0 7 0 7l-19 19s-13 -13 -44 -13c-38 0 -65 39 -65 39h46s-6 -8 -7 -13c-1 -4 1 -5 1 -5s11 -6 22 -6
+c17 0 33 12 33 12l-24 22l-15 -4l-16 37l39 -10l-1 -15l28 -18s9 9 7 27s-9 26 -9 26s-4 0 -9 -4s-6 -6 -6 -6l-10 44s43 -19 50 -63c3 -20 -6 -35 -6 -35l17 -10s6 5 17 7s23 2 29 -8s5 -12 4 -19s0 -9 6 -11s6 -6 11 -8s15 -6 21 -2s8 11 8 18v16s-9 8 -32 20
+s-54 22 -66 40s-12 44 0 57c9 10 23 25 26 35c4 14 4 42 4 42s-10 16 -8 40c2 30 22 84 96 114c0 0 -40 -55 -20 -80c0 0 37 11 77 9c31 -2 56 -12 73 -28s25 -23 47 -17s28 17 28 33c0 19 -16 51 -16 51s36 -7 58 -51zM195 245c14 4 21 -11 21 -11c14 25 30 60 22 64
+s-64 -25 -66 -88c0 0 6 31 23 35zM232 230c5 7 34 8 37 -17c4 -35 -24 -57 -24 -57s7 -2 23 2c17 4 43 29 43 70s-21 66 -41 62s-38 -60 -38 -60z" />
+    <glyph glyph-name="ion-social-github-outline" unicode="&#xf232;" 
+d="M224 416c124 0 224 -103 224 -230c0 -101 -64 -188 -153 -218h-4c-8 0 -12 7 -12 12c0 8 1 31 1 62c0 21 -8 36 -16 43c50 6 103 25 103 113c0 25 -9 46 -23 62c2 6 10 29 -2 61h-5c-8 0 -27 -3 -57 -24c-18 5 -37 8 -56 8s-38 -3 -56 -8c-30 21 -49 24 -57 24h-5
+c-12 -32 -4 -55 -2 -61c-14 -16 -23 -37 -23 -62c0 -88 52 -107 102 -113c-6 -6 -12 -16 -14 -31c-6 -3 -16 -6 -26 -6c-13 0 -28 5 -39 25c0 0 -13 22 -35 24v0c-2 0 -21 0 -1 -14c0 0 15 -8 25 -34c0 0 10 -33 53 -33c7 0 14 0 22 2v-39c0 -5 -3 -11 -11 -11h-4
+c-89 30 -153 116 -153 218c0 127 100 230 224 230zM146 -0c-15 0 -28 4 -38 9c14 -10 28 -17 44 -23v6v8h-6zM157 73c-16 4 -35 10 -52 24c6 -6 11 -11 13 -16c7 -12 14 -17 25 -17c4 0 9 1 12 2c1 2 1 5 2 7zM347 14c17 13 32 28 45 46c26 37 40 80 40 126
+c0 29 -5 58 -16 84c-10 25 -26 48 -45 68s-41 34 -66 45c-26 11 -53 17 -81 17s-55 -6 -81 -17c-25 -11 -47 -25 -66 -45s-35 -42 -45 -68c-11 -26 -16 -55 -16 -84c0 -46 14 -89 40 -126c10 -14 22 -27 35 -38c-7 8 -11 16 -13 22c-7 18 -15 24 -17 25h-2v1
+c-5 3 -20 13 -15 28c3 9 12 15 25 15h1v0v0c13 -1 24 -6 32 -13c-21 19 -37 48 -37 98c0 24 7 47 21 66c-3 13 -6 34 5 62l3 8l7 2c2 0 5 1 10 1c12 0 31 -3 60 -22c17 4 35 6 53 6v0v0c18 0 36 -2 53 -6c29 19 48 22 60 22c5 0 8 -1 10 -1l7 -2l3 -7c11 -27 8 -50 5 -63
+c14 -19 21 -41 21 -66c0 -92 -55 -117 -92 -125c3 -8 5 -18 5 -30v-51v-6c18 7 35 16 51 28z" />
+    <glyph glyph-name="ion-social-github" unicode="&#xf233;" 
+d="M224 416c124 0 224 -103 224 -230c0 -101 -64 -188 -153 -218h-4c-8 0 -12 7 -12 12c0 8 1 31 1 62c0 21 -8 36 -16 43c50 6 103 25 103 113c0 25 -9 46 -23 62c2 6 10 29 -2 61h-5c-8 0 -27 -3 -57 -24c-18 5 -37 8 -56 8s-38 -3 -56 -8c-30 21 -49 24 -57 24h-5
+c-12 -32 -4 -55 -2 -61c-14 -16 -23 -37 -23 -62c0 -88 52 -107 102 -113c-6 -6 -12 -16 -14 -31c-6 -3 -16 -6 -26 -6c-13 0 -28 5 -39 25c0 0 -13 22 -35 24v0c-2 0 -21 0 -1 -14c0 0 15 -8 25 -34c0 0 10 -33 53 -33c7 0 14 0 22 2v-39c0 -5 -3 -11 -11 -11h-4
+c-89 30 -153 116 -153 218c0 127 100 230 224 230z" />
+    <glyph glyph-name="ion-social-google-outline" unicode="&#xf34e;" horiz-adv-x="256" 
+d="M191 366c12 -10 37 -30 37 -68c0 -37 -21 -55 -43 -72c-7 -7 -15 -13 -15 -24s8 -17 14 -22l18 -14c23 -19 43 -36 43 -71c0 -47 -47 -95 -135 -95c-74 0 -110 35 -110 72c0 18 10 44 40 62c32 19 75 21 98 23c-7 9 -16 18 -16 34c0 9 2 14 5 20c-6 0 -11 -1 -16 -1
+c-54 0 -85 40 -85 79c0 23 11 48 33 67c29 24 63 28 91 28h106l-33 -18h-32zM155 142c-4 1 -7 1 -12 1s-32 -1 -54 -8c-11 -4 -44 -16 -44 -52s36 -62 91 -62c49 0 75 24 75 55c0 26 -17 39 -56 66zM170 238c12 12 13 28 13 37c0 36 -22 92 -65 92c-13 0 -28 -6 -36 -16
+c-9 -11 -11 -25 -11 -38c0 -34 20 -89 64 -89c13 0 27 6 35 14z" />
+    <glyph glyph-name="ion-social-google" unicode="&#xf34f;" horiz-adv-x="288" 
+d="M210 172c22 -18 45 -36 45 -73c0 -49 -48 -99 -140 -99c-80 0 -115 39 -115 77c0 10 3 42 42 65c27 16 61 20 85 22c-4 7 -8 16 -8 27c0 4 0 7 1 10h-4c-19 0 -46 4 -67 26c-15 15 -24 36 -24 57c0 26 13 53 35 71v0c32 25 70 29 95 29h133l-60 -33h-13
+c11 -13 23 -31 23 -58c0 -40 -25 -59 -45 -74v-1c-6 -6 -11 -10 -11 -17c0 -6 4 -10 10 -15v0zM85 308c0 -13 4 -33 14 -51c7 -12 20 -27 41 -27c10 0 21 4 28 11c10 10 10 25 10 30c0 18 -6 38 -15 54c-7 13 -20 27 -40 27c-11 0 -22 -5 -29 -13c-6 -7 -9 -18 -9 -31z
+M206 80c0 20 -13 31 -50 56c-3 0 -4 1 -8 1c-6 0 -32 -2 -51 -8c-16 -6 -37 -16 -37 -42c0 -31 32 -51 80 -51c41 0 66 17 66 44z" />
+    <glyph glyph-name="ion-social-googleplus-outline" unicode="&#xf234;" 
+d="M192 366c12 -10 36 -30 36 -68c0 -37 -21 -55 -43 -72c-7 -7 -15 -13 -15 -24s8 -18 14 -22l18 -14c23 -19 43 -36 43 -71c0 -47 -47 -95 -135 -95c-74 0 -110 35 -110 72c0 18 10 44 40 62c32 19 75 21 98 23c-7 9 -16 18 -16 34c0 9 3 14 5 20c-6 0 -11 -1 -16 -1
+c-54 0 -85 40 -85 79c0 23 10 48 32 67c29 24 64 28 92 28h106l-33 -18h-31zM155 142c-4 0 -7 1 -12 1s-32 -1 -54 -8c-11 -4 -44 -16 -44 -52s36 -62 91 -62c49 0 75 24 75 55c0 26 -17 39 -56 66zM170 238c12 12 13 28 13 37c0 36 -22 92 -65 92c-13 0 -28 -6 -36 -16
+c-9 -11 -11 -24 -11 -37c0 -34 20 -90 64 -90c13 0 27 6 35 14zM448 306v-18h-78v-81h-18v81h-80v18h80v78h18v-78h78z" />
+    <glyph glyph-name="ion-social-googleplus" unicode="&#xf235;" 
+d="M210 172c22 -18 45 -36 45 -73c0 -49 -47 -99 -139 -99c-80 0 -116 39 -116 77c0 10 3 42 42 65c27 16 61 21 85 23c-4 7 -8 15 -8 26c0 4 0 7 1 10h-4c-19 0 -46 4 -67 26c-15 15 -24 36 -24 57c0 26 13 53 35 71v0c32 25 69 29 94 29h134l-60 -33h-13
+c11 -13 23 -31 23 -58c0 -40 -25 -59 -45 -74v-1c-6 -6 -11 -10 -11 -17c0 -6 4 -10 10 -15v0zM85 308c0 -13 4 -33 14 -51c7 -12 21 -27 41 -27c10 0 21 4 28 11c10 10 10 25 10 30c0 18 -6 37 -15 53c-8 13 -20 28 -40 28c-11 0 -23 -5 -29 -13c-6 -7 -9 -18 -9 -31z
+M206 80c0 20 -13 31 -50 56c-3 0 -4 1 -8 1c-6 0 -31 -2 -50 -8c-16 -6 -38 -16 -38 -42c0 -31 32 -51 80 -51c41 0 66 17 66 44zM370 306h78v-34h-78v-81h-34v81h-80v34h80v78h34v-78z" />
+    <glyph glyph-name="ion-social-hackernews-outline" unicode="&#xf236;" horiz-adv-x="384" 
+d="M352 352h-320v-320h320v320zM384 384v0v-384h-384v384h384zM233 289h45l-64 -120v-72h-40v72l-66 120h47l40 -84z" />
+    <glyph glyph-name="ion-social-hackernews" unicode="&#xf237;" horiz-adv-x="384" 
+d="M0 384h384v-384h-384v384zM214 169l64 120h-45l-38 -84l-40 84h-47l66 -120v-72h40v72z" />
+    <glyph glyph-name="ion-social-html5-outline" unicode="&#xf4e2;" horiz-adv-x="384" 
+d="M0 416h384l-35 -403l-157 -45l-157 45zM319 37l30 347h-314l30 -347l127 -36zM84 184l-13 150h241l-4 -50h-184l4 -51h176l-14 -151l-98 -28l-99 28l-6 77h48l3 -39l54 -15l53 15l6 64h-167z" />
+    <glyph glyph-name="ion-social-html5" unicode="&#xf4e3;" horiz-adv-x="384" 
+d="M0 416h384l-35 -403l-157 -45l-157 45zM308 284l4 50h-241l13 -150h167l-6 -64l-53 -15l-54 15l-3 39h-48l6 -78l99 -27l98 28l14 151h-176l-4 51h184z" />
+    <glyph glyph-name="ion-social-instagram-outline" unicode="&#xf350;" horiz-adv-x="384" 
+d="M384 336v-289c0 -26 -22 -47 -48 -47h-288c-26 0 -48 21 -48 47v289c0 26 22 48 48 48h288c26 0 48 -22 48 -48zM192 272c-44 0 -80 -36 -80 -80s36 -80 80 -80s80 36 80 80s-36 80 -80 80zM352 288v48c0 9 -7 16 -16 16h-48c-9 0 -16 -7 -16 -16v-48c0 -9 7 -16 16 -16
+h48c9 0 16 7 16 16zM337 32c9 0 15 7 15 16v176h-52c3 -10 4 -21 4 -32c0 -30 -11 -58 -32 -79s-50 -33 -80 -33s-58 12 -79 33s-33 49 -33 79c0 11 2 22 5 32h-53v-176c0 -9 8 -16 17 -16h288z" />
+    <glyph glyph-name="ion-social-instagram" unicode="&#xf351;" horiz-adv-x="384" 
+d="M112 192c0 53 27 80 80 80s80 -27 80 -80s-27 -80 -80 -80s-80 27 -80 80zM113 271c-14 -14 -23 -29 -28 -47h-85v112c0 13 4 25 14 34s22 14 35 14h288c13 0 24 -5 33 -14s14 -21 14 -34v-112h-84c-5 18 -14 33 -28 47c-22 22 -49 33 -80 33s-57 -11 -79 -33zM352 300
+v39c0 4 -2 7 -4 9s-5 4 -9 4h-38c-4 0 -7 -2 -9 -4s-4 -5 -4 -9v-39c0 -4 2 -7 4 -9s5 -3 9 -3h38c4 0 7 1 9 3s4 5 4 9zM272 113c22 22 32 48 32 79h80v-144c0 -13 -5 -24 -14 -34s-20 -14 -33 -14h-288c-13 0 -24 4 -34 14s-15 21 -15 34v144h81c0 -31 10 -57 32 -79
+s48 -33 79 -33s58 11 80 33z" />
+    <glyph glyph-name="ion-social-javascript-outline" unicode="&#xf4e4;" 
+d="M160 344h-48v-196c0 -30 -6 -50 -17 -64c-11 -13 -26 -20 -48 -20c-9 0 -18 1 -25 2l-4 -30c11 -2 25 -4 37 -4c34 0 59 8 76 25c19 18 29 48 29 90v197zM176 360v0v-213c0 -97 -49 -131 -121 -131c-18 0 -40 3 -55 8l8 62c10 -4 24 -6 39 -6c31 0 49 15 49 68v212h80z
+M350 352c-34 0 -62 -9 -82 -26c-19 -15 -28 -36 -28 -60c0 -20 7 -36 21 -51c14 -14 34 -26 61 -36c23 -8 38 -15 48 -24c12 -11 18 -23 18 -38c0 -16 -7 -31 -20 -40c-12 -9 -28 -14 -48 -14c-28 0 -52 8 -70 15l-7 -32c18 -8 44 -14 72 -14c38 0 70 9 90 27
+c18 16 27 38 27 63c0 21 -5 36 -17 50s-31 27 -58 37v0v0c-38 15 -72 28 -72 63c0 14 7 27 19 36c11 9 26 13 45 13c24 0 43 -5 57 -11l10 32c-19 6 -42 10 -66 10zM350 368v0c38 0 65 -7 85 -16l-19 -64c-13 7 -35 17 -67 17s-48 -16 -48 -33c0 -22 19 -31 62 -48
+c58 -22 85 -53 85 -102c0 -57 -42 -106 -133 -106c-38 0 -72 10 -91 21l15 63v0c20 -11 49 -21 81 -21c34 0 52 15 52 38c0 21 -15 33 -55 47c-55 20 -93 52 -93 102c0 58 49 102 126 102z" />
+    <glyph glyph-name="ion-social-javascript" unicode="&#xf4e5;" 
+d="M176 360v0v-213c0 -97 -49 -131 -121 -131c-18 0 -40 3 -55 8l8 62c10 -4 24 -6 39 -6c31 0 49 15 49 68v212h80zM350 368v0c38 0 65 -7 85 -16l-19 -64c-13 7 -35 17 -67 17s-48 -16 -48 -33c0 -22 19 -31 62 -48c58 -22 85 -53 85 -102c0 -57 -42 -106 -133 -106
+c-38 0 -72 10 -91 21l15 63v0c20 -11 49 -21 81 -21c34 0 52 15 52 38c0 21 -15 33 -55 47c-55 20 -93 52 -93 102c0 58 49 102 126 102z" />
+    <glyph glyph-name="ion-social-linkedin-outline" unicode="&#xf238;" horiz-adv-x="384" 
+d="M119 64v0h-55v171h55v-171zM93 261v0v0c-18 0 -29 13 -29 29c0 17 12 30 30 30s29 -13 29 -30c0 -16 -12 -29 -30 -29zM257 239c36 0 63 -24 63 -75v-100h-55v94c0 22 -8 37 -28 37c-15 0 -24 -10 -28 -20c-2 -4 -2 -9 -2 -14v-97h-55v171h55v-24c8 11 21 28 50 28z
+M353 384c18 0 31 -13 31 -30v-321c0 -17 -13 -33 -31 -33h-320c-18 0 -33 16 -33 33v321c0 17 15 30 33 30h320zM350 32c1 0 2 1 2 2v316c0 1 -1 2 -2 2h-316s-2 -1 -2 -2v-315s1 -3 3 -3h315z" />
+    <glyph glyph-name="ion-social-linkedin" unicode="&#xf239;" horiz-adv-x="384" 
+d="M353 384c18 0 31 -13 31 -30v-321c0 -17 -13 -33 -31 -33h-320c-18 0 -33 16 -33 33v321c0 17 15 30 33 30h320zM119 64v171h-55v-171h55zM93 261c18 0 30 13 30 29c0 17 -11 30 -29 30s-30 -13 -30 -30c0 -16 11 -29 29 -29v0zM320 64v100c0 51 -27 75 -63 75
+c-29 0 -42 -17 -50 -28v24h-55v-171h55v97c0 5 0 10 2 14c4 10 13 20 28 20c20 0 28 -15 28 -37v-94h55z" />
+    <glyph glyph-name="ion-social-markdown" unicode="&#xf4e6;" 
+d="M416 352c18 0 32 -14 32 -32v-256c0 -18 -14 -32 -32 -32h-384c-18 0 -32 14 -32 32v256c0 18 14 32 32 32h384zM252 96v0v192h-56l-42 -68l-42 68h-56v-192h56v96l42 -54l42 54v-96h56zM336 96v0l70 96h-42v96h-56v-96h-42z" />
+    <glyph glyph-name="ion-social-nodejs" unicode="&#xf4e7;" horiz-adv-x="384" 
+d="M192 -32c-6 0 -12 2 -17 5l-53 32c-8 5 -4 6 -1 7c11 4 14 5 25 12c1 1 3 1 4 0l39 -23c1 -1 4 -1 5 0l156 92c1 1 2 2 2 4v187c0 2 0 4 -2 5l-156 94c-1 1 -3 1 -4 0l-155 -94c-2 -1 -3 -3 -3 -5v-187c0 -2 0 -3 2 -4l40 -24c24 -12 38 1 38 15v183c0 3 2 5 5 5h22
+c3 0 5 -2 5 -5v-183c0 -33 -19 -52 -49 -52c-9 0 -17 1 -37 11l-41 24c-10 6 -17 18 -17 30v190c0 12 7 24 17 30l158 95c10 6 24 6 34 0l158 -95c10 -6 17 -18 17 -30v-190c0 -12 -7 -24 -17 -30l-158 -94c-5 -3 -11 -5 -17 -5v0zM241 96c-65 0 -84 31 -84 59c0 3 1 5 4 5
+h21c2 0 5 -2 5 -4c3 -22 16 -31 54 -31c33 0 47 11 47 29c0 11 -3 18 -55 23c-43 4 -71 15 -71 51c0 33 28 52 73 52c46 0 76 -14 79 -51c0 -1 -1 -2 -2 -3s-2 -2 -3 -2h-20c-2 0 -5 2 -5 4c-4 17 -16 23 -49 23c-36 0 -41 -12 -41 -22c0 -12 5 -16 54 -23s72 -16 72 -51
+c0 -36 -29 -59 -79 -59v0v0z" />
+    <glyph glyph-name="ion-social-octocat" unicode="&#xf4e8;" 
+d="M146 161c9 0 16 -4 22 -13s10 -20 10 -32s-4 -22 -10 -31s-14 -13 -22 -13c-9 0 -17 4 -23 13s-9 19 -9 31s3 24 9 32c6 9 14 13 23 13zM303 161c9 0 16 -4 22 -13s9 -20 9 -32s-3 -22 -9 -31s-13 -13 -22 -13s-18 4 -24 13s-9 19 -9 31s3 24 9 32c6 9 15 13 24 13z
+M414 276c24 -27 34 -66 34 -96c0 -24 -1 -46 -6 -65c-6 -19 -13 -35 -21 -47c-9 -12 -19 -23 -32 -32s-24 -17 -34 -21s-22 -8 -36 -10c-13 -2 -24 -4 -31 -4c0 0 -28 -1 -64 -1s-64 1 -64 1c-7 0 -18 2 -31 4c-14 2 -26 6 -36 10s-22 12 -34 21c-13 9 -23 20 -32 32
+c-8 12 -15 28 -21 47c-5 19 -6 41 -6 65c0 31 10 70 34 96c0 0 -2 14 0 39s7 48 16 69c30 -3 67 -20 112 -51c15 4 36 6 62 6c28 0 48 -2 62 -6c20 14 39 24 58 33c19 8 33 13 41 15s13 3 13 3c9 -21 14 -44 16 -69s0 -39 0 -39v0zM348 42c28 13 42 40 42 81
+c0 24 -8 43 -26 59c-9 9 -20 13 -32 15s-31 1 -56 -1s-40 -4 -52 -4s-25 2 -42 3s-30 3 -39 3c-10 0 -20 1 -31 -2s-21 -7 -28 -14c-17 -15 -25 -35 -25 -59c0 -41 13 -68 41 -81c27 -13 69 -18 123 -18h2c54 0 95 5 123 18z" />
+    <glyph glyph-name="ion-social-pinterest-outline" unicode="&#xf2b0;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224s-224 100 -224 224s100 224 224 224zM360 56c36 36 56 85 56 136s-20 100 -56 136s-85 56 -136 56s-100 -20 -136 -56s-56 -85 -56 -136s20 -100 56 -136c14 -14 31 -25 48 -34c1 6 2 10 3 16c4 18 29 122 29 122
+s-8 15 -8 36c0 33 20 58 44 58c20 0 30 -16 30 -34c0 -20 -13 -51 -20 -79c-6 -24 12 -43 35 -43c42 0 71 54 71 119c0 49 -33 85 -93 85c-68 0 -110 -50 -110 -107c0 -20 6 -33 15 -44c4 -5 5 -6 3 -12c-1 -4 -4 -14 -5 -18c-2 -6 -6 -8 -11 -6c-31 13 -46 48 -46 86
+c0 64 54 140 160 140c86 0 142 -63 142 -129c0 -88 -49 -153 -121 -153c-24 0 -47 13 -55 28c0 0 -12 -52 -15 -62c-2 -6 -4 -13 -7 -19c15 -4 31 -6 47 -6c51 0 100 20 136 56z" />
+    <glyph glyph-name="ion-social-pinterest" unicode="&#xf2b1;" 
+d="M224 416c124 0 224 -100 224 -224s-100 -224 -224 -224c-22 0 -44 3 -64 9c8 14 18 31 23 48c3 10 16 62 16 62c8 -15 30 -28 54 -28c72 0 121 65 121 153c0 66 -56 129 -142 129c-106 0 -160 -76 -160 -140c0 -39 15 -73 46 -86c5 -2 10 0 12 6c1 4 3 14 4 18
+c2 6 1 7 -3 12c-9 11 -15 24 -15 44c0 57 42 107 110 107c60 0 94 -36 94 -85c0 -65 -29 -119 -71 -119c-24 0 -42 19 -36 43c7 28 20 59 20 79c0 18 -10 34 -30 34c-24 0 -43 -25 -43 -58c0 -21 7 -36 7 -36s-25 -104 -29 -122c-4 -17 -5 -35 -4 -51
+c-79 35 -134 113 -134 205c0 124 100 224 224 224z" />
+    <glyph glyph-name="ion-social-python" unicode="&#xf4e9;" horiz-adv-x="384" 
+d="M129 199c-29 -5 -49 -30 -49 -57v-43v-3h-15c-29 0 -54 29 -62 69c-2 9 -3 17 -3 27v1c0 53 29 95 65 95h127v16h-96v29c0 26 7 40 46 47c13 2 29 4 45 4s39 -1 55 -4c25 -4 46 -22 46 -47v-57v-31c0 -21 -14 -38 -33 -43c-4 -1 -8 -2 -13 -2h-104h3c-4 0 -8 0 -12 -1z
+M140 321c10 0 17 7 17 17s-7 18 -17 18s-18 -8 -18 -18s8 -17 18 -17zM380 225c3 -10 4 -21 4 -33c0 -16 -3 -30 -7 -43c-11 -31 -33 -53 -58 -53h-127v-16h96v-26c0 -26 -23 -40 -46 -47c-35 -10 -68 -9 -97 0c-25 7 -49 22 -49 47v54v33c0 21 14 36 33 41c4 1 8 2 13 2
+h104c3 0 6 1 9 1c27 4 49 28 49 62v38v3h15c28 0 52 -26 61 -63zM244 65c-10 0 -18 -7 -18 -17s8 -18 18 -18s17 8 17 18s-7 17 -17 17z" />
+    <glyph glyph-name="ion-social-reddit-outline" unicode="&#xf23a;" horiz-adv-x="449" 
+d="M259 160c0 21 11 31 32 31s32 -10 32 -31s-11 -32 -32 -32s-32 11 -32 32zM127 160c0 21 11 31 32 31s32 -10 32 -31s-11 -32 -32 -32s-32 11 -32 32zM449 197c0 -20 -9 -36 -27 -45c1 -5 1 -9 1 -14c0 -38 -19 -71 -58 -98s-85 -40 -140 -40s-102 13 -141 40
+s-58 59 -58 97c0 5 0 10 1 15c-18 9 -27 24 -27 45c0 14 5 25 15 35s21 15 35 15c13 0 24 -4 33 -13c36 25 79 39 129 41h7l29 98l86 -17c8 19 21 28 41 28c12 0 22 -4 31 -13s13 -20 13 -32s-4 -23 -13 -32s-19 -13 -31 -13s-23 4 -32 13s-13 19 -13 31l-69 14l-24 -77
+c50 -2 94 -16 129 -41c10 9 21 13 34 13c9 0 16 -3 24 -7s14 -10 18 -18s7 -16 7 -25zM375 366c-4 0 -8 -1 -11 -2s-6 -4 -8 -6s-5 -6 -6 -9s-2 -6 -2 -10c0 -8 3 -14 8 -19s12 -8 19 -8c5 0 9 1 13 3s8 6 10 10s4 9 4 14c0 8 -3 14 -8 19s-12 8 -19 8zM18 197
+c0 -11 5 -20 14 -27c7 19 19 37 37 53c-6 4 -12 6 -19 6c-3 0 -7 0 -10 -1s-6 -3 -9 -5s-5 -4 -7 -7s-4 -6 -5 -9s-1 -6 -1 -10zM355 55c34 23 50 51 50 83v9c-1 6 -3 12 -5 18c-6 16 -15 30 -30 43c-5 4 -10 9 -15 12v0c-36 25 -79 37 -130 37s-95 -12 -131 -37v0
+c-5 -3 -10 -8 -15 -12c-15 -13 -24 -27 -30 -43c-2 -6 -4 -12 -5 -18v-9c0 -32 16 -60 50 -83c36 -25 80 -37 131 -37s94 12 130 37zM417 170c9 6 14 16 14 27c0 9 -3 17 -9 23s-13 9 -22 9c-7 0 -14 -2 -20 -6c18 -16 30 -34 37 -53zM289 90l13 -12
+c-20 -20 -45 -30 -77 -30s-58 10 -78 30l13 12c16 -16 38 -24 65 -24s48 8 64 24z" />
+    <glyph glyph-name="ion-social-reddit" unicode="&#xf23b;" horiz-adv-x="449" 
+d="M449 197c0 -20 -11 -37 -27 -45c1 -5 1 -9 1 -14c0 -76 -89 -138 -199 -138s-198 61 -198 137c0 5 0 10 1 15c-16 8 -27 25 -27 45c0 28 23 50 50 50c13 0 24 -5 33 -13c33 23 79 39 129 41h2l31 103l90 -18c8 14 22 24 39 24v0h1c25 0 44 -20 44 -45s-19 -45 -44 -45h-1
+v0c-23 0 -42 17 -44 40l-67 14l-22 -74c49 -3 93 -17 125 -40c9 8 21 13 34 13c27 0 49 -22 49 -50zM34 177c5 15 15 29 29 41c-4 3 -9 5 -15 5c-14 0 -25 -11 -25 -25c0 -9 4 -17 11 -21zM358 339c0 -9 7 -17 16 -17s17 8 17 17s-8 17 -17 17s-16 -8 -16 -17zM127 160
+c0 -18 14 -32 32 -32s32 14 32 32s-14 31 -32 31s-32 -13 -32 -31zM224 48c48 0 77 29 78 30l-13 12s-25 -24 -65 -24c-41 0 -64 24 -64 24l-13 -12c1 -1 29 -30 77 -30zM291 128c18 0 32 14 32 32s-14 31 -32 31s-32 -13 -32 -31s14 -32 32 -32zM415 176c7 5 11 13 11 22
+c0 14 -11 25 -25 25c-6 0 -11 -2 -15 -5c14 -12 24 -27 29 -42z" />
+    <glyph glyph-name="ion-social-rss-outline" unicode="&#xf23c;" horiz-adv-x="384" 
+d="M56 112c31 0 56 -25 56 -56s-25 -56 -56 -56s-56 25 -56 56s25 56 56 56zM56 16c22 0 40 18 40 40s-18 40 -40 40s-40 -18 -40 -40s18 -40 40 -40zM0 256c140 0 256 -116 256 -256h-80c0 48 -14 94 -48 128s-80 48 -128 48v80zM240 16c-2 26 -8 52 -19 77
+c-12 28 -30 54 -52 76s-48 40 -76 52c-25 10 -51 16 -77 18v-47c50 -3 92 -22 123 -53s50 -73 53 -123h48zM0 384c212 0 384 -172 384 -384h-80c0 171 -133 304 -304 304v80zM227 228c56 -56 89 -131 93 -212h48c-8 190 -162 344 -352 352v-48c81 -4 155 -36 211 -92z" />
+    <glyph glyph-name="ion-social-rss" unicode="&#xf23d;" horiz-adv-x="384" 
+d="M56 112c31 0 56 -25 56 -56s-25 -56 -56 -56s-56 25 -56 56s25 56 56 56zM0 256c140 0 256 -116 256 -256h-80c0 48 -14 94 -48 128s-80 48 -128 48v80zM0 384c212 0 384 -172 384 -384h-80c0 171 -133 304 -304 304v80z" />
+    <glyph glyph-name="ion-social-sass" unicode="&#xf4ea;" horiz-adv-x="512" 
+d="M512 119v-8c-1 -9 -7 -17 -15 -22s-12 -4 -13 -3s1 3 4 5c13 8 17 20 10 33c-5 10 -15 16 -26 20c-24 8 -48 7 -72 0c4 -12 7 -23 -2 -34c-10 -12 -23 -19 -39 -22c-7 -2 -14 2 -15 9c-3 19 17 36 30 47c-7 11 -11 24 -14 37c-15 -17 -31 -40 -26 -61
+c3 -14 -1 -27 -14 -36s-30 -14 -46 -11c-4 1 -6 5 -5 8c2 14 25 32 35 43c2 2 3 4 1 7c-6 12 -10 23 -14 36c-13 -29 -30 -80 -57 -98c-9 -6 -17 -4 -21 5c-3 8 -2 20 -1 29c-6 -13 -11 -27 -20 -38c-7 -8 -24 -7 -30 1c-16 21 -13 50 -5 73l-29 -15c7 -16 8 -32 4 -49
+c-5 -19 -17 -35 -35 -46c-19 -12 -64 -24 -77 4c-7 16 -4 30 6 44c17 24 48 37 74 50c-32 23 -80 42 -96 80c-15 35 17 68 43 89c59 48 166 95 244 59c15 -7 36 -24 31 -52c-4 -24 -13 -39 -28 -54c-32 -32 -152 -77 -176 -15c-1 1 -1 4 1 4c2 -1 20 -15 43 -16
+c17 -1 36 3 52 8c33 11 71 33 80 67c4 13 -2 28 -15 34c-49 24 -116 -4 -159 -26c-33 -17 -84 -45 -82 -87c1 -37 56 -60 81 -82c15 7 42 15 52 27c11 13 26 25 44 26c8 0 14 -3 16 -10c2 -6 1 -11 0 -19c5 4 11 4 15 -1c12 -14 -22 -50 -10 -66c14 14 21 42 30 59
+c4 8 17 51 26 53c7 2 18 4 25 0c2 -1 3 -3 2 -5c-7 -19 -7 -33 3 -52c14 20 29 43 34 67c1 2 3 3 5 4c7 2 18 3 25 0c3 -1 3 -2 2 -5c-7 -22 -6 -38 6 -58c31 11 69 15 97 -5c-3 2 -7 5 0 0c5 -4 3 -2 0 0c12 -8 19 -18 21 -32zM113 94v0c1 7 -1 13 -3 20
+c-24 -8 -66 -35 -64 -62c1 -10 8 -13 17 -12s19 7 27 13c14 11 22 24 23 41zM216 166c1 3 -2 5 -5 4c-29 -8 -43 -57 -33 -81c1 -3 4 -3 6 -1c17 16 28 56 32 78zM286 84c8 -3 27 17 26 27c-8 -9 -18 -18 -26 -27zM367 102c11 6 16 19 12 30c-8 -6 -21 -19 -20 -31
+c0 -2 6 0 8 1z" />
+    <glyph glyph-name="ion-social-skype-outline" unicode="&#xf23e;" horiz-adv-x="384" 
+d="M106 352c-41 0 -74 -33 -74 -73c0 -13 4 -25 10 -36l6 -11l-2 -12c-2 -10 -3 -20 -3 -30c0 -40 16 -77 44 -105s67 -44 107 -44c9 0 19 1 28 3l11 2l9 -5c11 -6 24 -9 36 -9c41 0 74 33 74 73c0 11 -3 22 -8 32l-5 10l3 11c2 10 3 21 3 32c0 40 -16 77 -44 105
+s-67 43 -107 43c-9 0 -18 0 -26 -2l-12 -2l-10 7c-12 7 -26 11 -40 11zM106 384v0c21 0 40 -6 56 -16c10 2 21 2 32 2c101 0 183 -80 183 -180c0 -13 -1 -27 -4 -39c7 -14 11 -29 11 -46c0 -58 -47 -105 -106 -105c-18 0 -35 4 -50 12c-11 -2 -22 -3 -34 -3
+c-101 0 -183 81 -183 181c0 12 2 24 4 36c-9 16 -15 34 -15 53c0 58 47 105 106 105zM288 104c-8 -12 -21 -21 -37 -28s-36 -10 -58 -10c-26 0 -48 5 -65 14c-12 7 -22 15 -30 26s-12 22 -12 33c0 7 3 12 8 17s11 7 19 7c6 0 12 -2 16 -6s7 -8 10 -15s7 -13 11 -18
+s8 -9 15 -12s16 -5 27 -5c15 0 28 4 37 10s13 13 13 22c0 7 -2 13 -7 17c-5 5 -11 9 -19 11c-8 3 -20 5 -34 8c-19 4 -35 9 -48 14c-13 6 -24 13 -32 23s-11 22 -11 36s4 25 12 36c8 10 20 19 36 25c15 6 34 8 54 8c16 0 30 -1 42 -5s23 -9 31 -15s14 -13 18 -20
+s5 -14 5 -21c0 -6 -2 -12 -7 -17s-11 -8 -19 -8c-7 0 -12 2 -16 5c-3 3 -7 7 -11 14c-5 8 -10 15 -16 20s-17 8 -31 8c-13 0 -23 -3 -31 -8s-12 -11 -12 -18c0 -4 2 -7 4 -10c3 -3 6 -6 11 -8s10 -5 15 -6s13 -3 25 -6c15 -3 28 -6 40 -10s23 -8 32 -14s15 -13 20 -22
+s8 -20 8 -32c0 -15 -5 -28 -13 -40z" />
+    <glyph glyph-name="ion-social-skype" unicode="&#xf23f;" horiz-adv-x="384" 
+d="M373 151c7 -14 11 -29 11 -46c0 -58 -47 -105 -106 -105c-18 0 -35 4 -50 12c-11 -2 -22 -3 -34 -3c-101 0 -183 81 -183 181c0 12 2 24 4 36c-9 16 -15 34 -15 53c0 58 47 105 106 105c21 0 41 -6 57 -16c10 2 20 2 31 2c101 0 183 -80 183 -180c0 -13 -1 -27 -4 -39z
+M288 104c9 12 12 25 12 40c0 12 -2 23 -7 32s-12 16 -21 22s-19 10 -31 14s-26 7 -41 10c-12 3 -20 5 -25 6s-10 4 -15 6s-7 5 -10 8c-2 3 -4 6 -4 10c0 7 3 13 11 18s19 7 32 7c14 0 25 -2 31 -7s11 -12 16 -20c4 -7 8 -11 11 -14c4 -3 9 -5 16 -5c8 0 13 3 18 8s8 11 8 17
+c0 7 -2 14 -6 21s-10 14 -18 20s-18 11 -30 15s-27 5 -43 5c-20 0 -38 -2 -53 -8c-16 -6 -28 -15 -36 -25c-8 -11 -12 -22 -12 -36s3 -26 11 -36s19 -17 32 -23c13 -5 29 -10 48 -14c14 -3 26 -5 34 -8c8 -2 14 -6 19 -11c5 -4 7 -10 7 -17c0 -9 -4 -17 -13 -23
+s-22 -9 -37 -9c-11 0 -20 2 -27 5s-11 6 -15 11s-8 12 -11 19s-6 11 -10 15s-10 6 -16 6c-8 0 -14 -2 -19 -7s-8 -10 -8 -17c0 -11 4 -22 12 -33s18 -19 30 -26c17 -9 39 -14 65 -14c22 0 42 3 58 10s29 16 37 28z" />
+    <glyph glyph-name="ion-social-snapchat-outline" unicode="&#xf4eb;" horiz-adv-x="480" 
+d="M240 400v0v0c-71 0 -128 -54 -118 -128c2 -15 3 -32 4 -45c0 0 -2 -5 -12 -5c-6 0 -15 2 -28 7c-2 1 -4 1 -6 1c-8 0 -13 -6 -14 -12c0 -5 4 -11 8 -13c14 -7 47 -10 47 -33s-23 -47 -41 -64s-64 -21 -64 -21s0 -21 32 -29s32 -5 33 -13c2 -15 1 -22 11 -22c2 0 4 1 6 1
+c8 1 20 3 32 3c11 0 23 -2 34 -9c23 -15 41 -34 76 -34s53 19 76 34c11 7 24 9 35 9c12 0 23 -2 31 -3c2 0 4 -1 6 -1c10 0 9 7 11 22c1 8 1 5 33 13s32 29 32 29s-46 4 -64 21s-41 41 -41 64s33 26 47 33c4 2 9 8 9 13c-1 6 -6 12 -14 12c-2 0 -5 0 -7 -1
+c-13 -5 -21 -6 -27 -6c-10 0 -13 4 -13 4c1 13 2 30 4 45c10 74 -47 128 -118 128zM240 416v0c41 0 80 -16 105 -45c24 -28 34 -63 29 -101c-1 -11 -2 -22 -3 -31c4 1 10 2 18 5c4 1 8 2 12 2c16 0 29 -12 30 -27c1 -13 -9 -25 -18 -29c-4 -2 -9 -3 -14 -5
+c-7 -2 -14 -5 -19 -8c-4 -3 -5 -4 -5 -5c0 -16 20 -37 36 -52c11 -10 39 -16 54 -17l15 -1v-14c0 -2 0 -11 -6 -21c-5 -8 -16 -19 -38 -24c-6 -1 -11 -3 -15 -4c-2 -1 -5 -1 -7 -1v-1c-1 -7 -1 -13 -4 -18c-2 -5 -9 -12 -22 -12c-2 0 -6 0 -9 1c-2 0 -3 1 -5 1
+c-7 1 -15 2 -23 2c-10 0 -19 -2 -26 -6c-4 -3 -9 -7 -14 -10c-18 -13 -38 -27 -71 -27s-53 14 -71 27c-5 3 -9 7 -14 10c-7 4 -15 6 -25 6c-8 0 -17 -1 -24 -2c-2 0 -3 -1 -5 -1c-3 -1 -7 -1 -9 -1c-13 0 -20 7 -22 12c-3 5 -3 11 -4 18v1c-2 0 -4 0 -6 1c-4 1 -10 3 -16 4
+c-22 5 -33 16 -38 24c-6 10 -6 18 -6 20v15l15 1c16 1 44 7 54 17c29 27 36 43 36 52c0 1 0 2 -4 5c-5 3 -13 6 -20 8c-5 2 -10 3 -14 5c-9 4 -18 16 -17 29c1 15 14 27 30 27c4 0 8 0 12 -2c8 -3 13 -4 17 -5c-1 9 -2 19 -3 30c-5 38 5 74 29 102c25 29 64 45 105 45v0z
+M240 219c-21 0 -41 8 -56 23c-3 3 -3 9 0 12s9 3 12 0c12 -12 27 -19 44 -19c16 0 32 7 44 19c3 3 9 3 12 0s3 -9 0 -12c-15 -15 -35 -23 -56 -23zM176 296c0 16 5 24 16 24s16 -8 16 -24s-5 -24 -16 -24s-16 8 -16 24zM272 296c0 16 5 24 16 24s16 -8 16 -24
+s-5 -24 -16 -24s-16 8 -16 24z" />
+    <glyph glyph-name="ion-social-snapchat" unicode="&#xf4ec;" horiz-adv-x="480" 
+d="M480 88c0 -2 0 -11 -6 -21c-5 -8 -16 -19 -38 -24c-6 -1 -11 -3 -15 -4c-2 -1 -5 -1 -7 -1v-1c-1 -7 -1 -13 -4 -18c-2 -5 -9 -12 -22 -12c-2 0 -6 0 -9 1c-2 0 -3 1 -5 1c-7 1 -15 2 -23 2c-10 0 -19 -2 -26 -6c-4 -3 -9 -7 -14 -10c-18 -13 -38 -27 -71 -27
+s-53 14 -71 27c-5 3 -9 7 -14 10c-7 4 -15 6 -25 6c-8 0 -17 -1 -24 -2c-2 0 -3 -1 -5 -1c-3 -1 -7 -1 -9 -1c-13 0 -20 7 -22 12c-3 5 -3 11 -4 18v1c-2 0 -4 0 -6 1c-4 1 -10 3 -16 4c-22 5 -33 16 -38 24c-6 10 -6 18 -6 20v15l15 1c16 1 44 7 54 17c29 27 36 43 36 52
+c0 1 0 2 -4 5c-5 3 -13 6 -20 8c-5 2 -10 3 -14 5c-9 4 -18 16 -17 29c1 15 14 27 30 27c4 0 8 0 12 -2c8 -3 13 -4 17 -5c-1 9 -2 19 -3 30c-5 38 5 74 29 102c25 29 64 45 105 45v0c41 0 80 -16 105 -45c24 -28 34 -63 29 -101c-1 -11 -2 -22 -3 -31c4 1 10 2 18 5
+c4 1 8 2 12 2c16 0 29 -12 30 -27c1 -13 -9 -25 -18 -29c-4 -2 -9 -3 -14 -5c-7 -2 -14 -5 -19 -8c-4 -3 -5 -4 -5 -5c0 -16 20 -37 36 -52c11 -10 39 -16 54 -17l15 -1v-14zM192 320c-9 0 -16 -11 -16 -24s7 -24 16 -24s16 11 16 24s-7 24 -16 24zM296 242c3 3 3 9 0 12
+s-9 3 -12 0c-12 -12 -28 -19 -44 -19c-17 0 -32 7 -44 19c-3 3 -9 3 -12 0s-3 -9 0 -12c15 -15 35 -23 56 -23s41 8 56 23zM288 272c9 0 16 11 16 24s-7 24 -16 24s-16 -11 -16 -24s7 -24 16 -24z" />
+    <glyph glyph-name="ion-social-tumblr-outline" unicode="&#xf240;" horiz-adv-x="256" 
+d="M193 52c21 0 42 6 63 20v-65c-18 -8 -34 -15 -48 -18s-28 -5 -45 -5c-19 0 -35 2 -50 7c-14 5 -28 12 -38 21s-17 18 -21 28s-6 25 -6 44v140h-48v58c16 5 30 14 42 24s19 21 26 35s11 37 14 59h62v-112h96v-64h-96v-101c0 -24 1 -40 4 -47c2 -7 7 -12 14 -16
+c9 -6 19 -8 31 -8zM240 17v29c-15 -6 -31 -10 -47 -10c-15 0 -28 3 -40 10c-10 6 -17 15 -21 25c-2 6 -4 17 -4 52v117h96v32h-96v112h-32c-2 -16 -7 -36 -14 -50c-8 -16 -17 -29 -30 -40c-11 -9 -23 -17 -36 -23v-31h48v-156c0 -21 2 -32 4 -38c3 -8 10 -15 18 -22
+c9 -8 19 -14 31 -18c13 -4 29 -6 46 -6c16 0 28 2 41 5c11 2 23 6 36 12z" />
+    <glyph glyph-name="ion-social-tumblr" unicode="&#xf241;" horiz-adv-x="256" 
+d="M193 52c21 0 42 6 63 20v-65c-18 -8 -34 -15 -48 -18s-28 -5 -45 -5c-19 0 -35 2 -50 7c-14 5 -28 12 -38 21s-17 18 -21 28s-6 25 -6 44v140h-48v58c16 5 30 14 42 24s19 21 26 35s11 37 14 59h62v-112h96v-64h-96v-101c0 -24 1 -40 4 -47c2 -7 7 -12 14 -16
+c9 -6 19 -8 31 -8z" />
+    <glyph glyph-name="ion-social-tux" unicode="&#xf2c5;" horiz-adv-x="383" 
+d="M189 347c2 2 -1 -1 0 0c2 2 4 4 6 5c-3 -2 -5 -4 -7 -8c0 1 0 2 1 3zM361 52c7 -4 23 -11 21 -22c-2 -10 -17 -15 -24 -19c-15 -8 -28 -14 -41 -25c-9 -8 -17 -15 -29 -17c-11 -2 -25 -1 -33 8c-5 5 -7 11 -15 12c-25 5 -54 4 -79 0c-13 -2 -21 -11 -32 -17
+c-10 -5 -20 -5 -30 -1c-13 5 -27 10 -41 13s-29 5 -43 9c-31 8 -5 30 -11 50c-3 12 -10 29 8 30c9 1 27 -1 31 11c2 7 -2 15 2 22s-1 17 1 25c4 18 19 32 25 49c5 14 8 25 18 37c9 11 22 22 29 34c10 18 9 35 8 55c-1 17 -1 33 -2 50c0 33 20 60 58 60h14
+c38 0 63 -32 64 -69c0 -19 -5 -38 5 -67c15 -27 36 -48 52 -73c10 -16 16 -31 20 -49c3 -14 9 -31 7 -45c-1 -6 -2 -9 -4 -11c3 -1 7 -2 9 -5c3 -4 2 -11 0 -26c-1 -8 5 -15 12 -19zM137 -3c2 20 -15 39 -25 56c-10 16 -21 43 -39 52c-8 4 -19 5 -23 -5c-2 -7 0 -19 -2 -22
+c-4 -9 -14 -10 -23 -11c-6 0 -17 0 -17 -8c1 -10 10 -20 7 -30c-2 -7 -8 -12 -8 -19c0 -14 38 -15 47 -17c19 -4 37 -14 57 -16c12 -1 25 7 26 20zM253 62c-2 10 2 -10 0 0s-5 28 1 35c4 5 10 6 17 5c0 4 1 9 3 12c8 13 29 8 39 0l-1 2c-3 4 -8 9 -13 10c0 0 4 12 2 34
+c-4 40 -33 62 -33 62c27 -30 27 -58 27 -72c0 -6 -1 -18 -4 -24c-4 -1 -7 -2 -11 -4c-10 -5 -8 2 -8 10c0 18 -2 36 -7 54c-3 9 -7 17 -13 24c-4 5 -4 9 -5 15c-3 12 -9 22 -16 32c-7 9 -7 17 -5 28c1 7 2 14 -6 17c-6 2 -26 5 -27 14c-1 6 -1 16 5 20c16 14 30 -11 17 -24
+c-3 -3 7 -4 8 -4c4 1 4 7 5 10c1 4 1 9 1 13c0 17 -18 32 -34 21c-6 -4 -9 -11 -10 -17c0 -2 -1 -20 0 -20c-4 0 -7 5 -11 5c-3 0 -7 0 -10 -1c0 0 2 14 -2 22c-4 9 -18 16 -24 4s-3 -25 0 -31s4 -6 4 -6c2 1 5 4 5 4s-6 3 -7 11c-1 9 3 14 7 15s10 -2 12 -8s0 -13 0 -13
+c-7 -6 -30 -18 -22 -28c14 -18 33 -15 52 -9c8 3 18 5 24 12c3 3 11 2 8 -4c-2 -5 -18 -7 -22 -9c-9 -4 -18 -8 -28 -10c-6 -1 -13 -5 -28 9c7 -6 8 -16 17 -20c13 -6 33 9 44 15c1 1 16 5 14 0c-1 -4 -11 -7 -15 -9c-11 -6 -23 -21 -36 -22c-8 -1 -21 16 -25 22
+c-1 1 -5 9 -6 4c-1 -8 2 -14 -3 -21c-6 -9 -11 -18 -13 -29c-1 -6 0 -11 -3 -16c-11 -15 -17 -33 -19 -51c0 -4 3 -43 -5 -41c-18 5 -17 33 -14 47c-3 -12 -8 -30 2 -44c12 -15 99 -55 53 -80c7 -14 14 -25 12 -41c8 7 2 20 -1 28c0 0 17 -12 38 -10c17 2 32 7 46 16
+c6 4 11 9 16 14c1 2 4 6 6 7l1 -11c2 -17 -12 -27 -10 -34c4 8 11 14 13 24c3 12 0 24 -2 36zM155 323v0v-3c2 0 2 5 1 8c-1 4 -3 6 -4 6h-2c3 -2 5 -6 5 -11zM210 335c3 -2 0 0 0 0c3 -2 5 -5 5 -10v-3c2 0 3 4 2 7s-3 6 -5 6h-2zM347 15c24 11 -24 -10 0 0
+c24 11 35 17 20 26c-17 10 -26 13 -26 29c0 5 4 16 2 22c-1 4 -6 5 -9 5c-10 -10 -17 -25 -34 -25c-14 0 -25 11 -28 24c-4 2 -10 1 -13 -4c-6 -12 1 -29 3 -41c2 -18 -4 -35 -2 -53c2 -21 26 -22 40 -13c16 10 29 22 47 30z" />
+    <glyph glyph-name="ion-social-twitch-outline" unicode="&#xf4ed;" horiz-adv-x="416" 
+d="M32 416h384v-272l-112 -112h-80l-64 -64h-64v64h-96v304zM368 160v208h-304v-272h80v-64l64 64h96zM272 176v129h48v-129h-48zM160 176v129h48v-129h-48z" />
+    <glyph glyph-name="ion-social-twitch" unicode="&#xf4ee;" horiz-adv-x="416" 
+d="M32 416h384v-272l-112 -112h-80l-64 -64h-64v64h-96v304zM208 176v129h-48v-129h48zM320 176v129h-48v-129h48z" />
+    <glyph glyph-name="ion-social-twitter-outline" unicode="&#xf242;" horiz-adv-x="472" 
+d="M472 338c-13 -20 -29 -36 -48 -50v-12c0 -128 -98 -276 -276 -276c-55 0 -105 16 -148 44c8 -1 15 -2 23 -2c45 0 87 16 120 42c-42 1 -78 29 -90 67c6 -1 12 -2 18 -2c9 0 18 2 26 4c-44 9 -78 48 -78 95v1c13 -7 28 -12 44 -12c-26 17 -43 47 -43 81c0 18 5 34 13 48
+c48 -59 119 -97 199 -101c-2 7 -2 14 -2 22c0 54 43 97 97 97c28 0 52 -12 70 -31c22 4 43 13 62 24c-7 -23 -23 -42 -43 -54c20 2 39 7 56 15zM414 301c3 2 8 6 11 8c-2 0 -11 -2 -19 -1s-21 5 -21 5s14 13 18 17l11 11c-4 -1 -10 -2 -14 -3l-8 -2l-6 6
+c-15 16 -37 26 -59 26c-45 0 -81 -37 -81 -81c0 -6 1 -12 2 -18l5 -21l-22 1c-42 2 -81 13 -118 32c-28 14 -53 34 -75 56c-1 -6 -2 -13 -2 -19c0 -27 14 -53 36 -68c0 0 33 -23 46 -29c-24 -2 -56 0 -56 0c-8 0 -16 1 -24 3c8 -28 32 -50 62 -56l61 -10l-61 -21
+c-7 -2 -14 -3 -21 -3c15 -20 38 -34 64 -34l45 -1l-35 -28c-18 -14 -38 -25 -60 -33c-10 -3 -19 -6 -29 -8c27 -9 55 -14 84 -14c40 0 78 8 112 24c31 14 58 34 81 60c22 24 38 53 50 84c11 30 17 62 17 92v12l-1 8z" />
+    <glyph glyph-name="ion-social-twitter" unicode="&#xf243;" horiz-adv-x="472" 
+d="M472 338c-13 -20 -29 -36 -48 -50v-12c0 -128 -98 -276 -276 -276c-55 0 -105 16 -148 44c8 -1 15 -2 23 -2c45 0 87 16 120 42c-42 1 -78 29 -90 67c6 -1 12 -2 18 -2c9 0 18 2 26 4c-44 9 -78 48 -78 95v1c13 -7 28 -12 44 -12c-26 17 -43 47 -43 81c0 18 5 34 13 48
+c48 -59 119 -97 199 -101c-2 7 -2 14 -2 22c0 54 43 97 97 97c28 0 52 -12 70 -31c22 4 43 13 62 24c-7 -23 -23 -42 -43 -54c20 2 39 7 56 15z" />
+    <glyph glyph-name="ion-social-usd-outline" unicode="&#xf352;" horiz-adv-x="320" 
+d="M125 345c11 2 19 3 19 3v-131l-22 6c-15 5 -27 11 -36 19c-12 10 -19 25 -19 43c0 13 4 24 11 33c6 8 13 14 22 19c7 4 17 6 25 8zM128 238v92c-7 -2 -15 -4 -21 -7c-7 -4 -12 -9 -17 -15s-7 -14 -7 -23c0 -13 4 -24 13 -31c8 -7 20 -12 32 -16zM252 151
+c10 -10 15 -24 15 -42c0 -9 -1 -18 -5 -27s-11 -17 -20 -24c-8 -6 -18 -11 -31 -15c-6 -2 -11 -3 -17 -4s-18 -1 -18 -1v145l20 -5c10 -3 19 -6 28 -9c10 -4 20 -10 28 -18zM247 89c3 7 4 13 4 20c0 14 -3 24 -10 31s-15 11 -23 14s-16 5 -26 8v-107c6 1 10 2 14 3
+c11 3 20 8 27 13s11 11 14 18zM315 145c3 -10 5 -19 5 -29c0 -21 -5 -38 -14 -53s-20 -26 -35 -35s-31 -17 -50 -21c-10 -2 -19 -3 -29 -4v-35h-64v35c-9 1 -19 4 -28 6c-20 5 -36 12 -51 23s-26 24 -35 41c-8 16 -13 34 -14 55h69c0 -12 2 -24 7 -33c5 -10 12 -17 21 -23
+s20 -11 31 -14v120c-8 2 -18 4 -27 6c-17 4 -30 9 -41 16s-20 15 -27 23s-11 17 -14 26s-4 18 -4 28c0 18 4 34 12 48s19 25 33 34s29 16 46 20c7 2 15 3 22 4v33h64v-33c9 -1 16 -4 24 -6c18 -5 34 -12 48 -22s25 -22 33 -37c7 -13 11 -28 12 -46h-69c-3 21 -12 37 -26 46
+c-7 4 -13 8 -22 10v-106c9 -2 16 -4 25 -6c12 -3 22 -6 27 -7c13 -4 23 -9 33 -15c10 -7 18 -14 24 -22s11 -17 14 -27zM293 72c7 12 11 27 11 44c0 8 -1 16 -4 24s-7 15 -12 22s-12 13 -20 19c-8 5 -18 10 -29 13c-5 1 -13 3 -24 6h-1l-4 1c-7 2 -13 4 -21 6l-13 3v137
+s9 -1 19 -4s19 -6 28 -12c15 -9 25 -24 30 -43h38c-2 8 -4 15 -8 22c-7 13 -16 24 -28 32c-12 9 -27 16 -43 20c-8 2 -16 4 -23 5l-13 2v31h-32v-31l-14 -2c-7 -1 -14 -2 -20 -4c-15 -4 -29 -10 -41 -18s-21 -16 -28 -28c-7 -11 -10 -24 -10 -40c0 -8 1 -15 3 -23
+c2 -7 6 -14 11 -21s14 -13 23 -19c10 -6 22 -10 37 -14v0v0c4 -1 8 -2 11 -3c5 -1 11 -3 16 -4l12 -3v-151s-8 1 -20 4s-26 8 -36 15c-11 8 -20 18 -26 30c-4 7 -6 16 -8 24h-36c2 -11 5 -23 10 -32c8 -14 17 -26 30 -35c13 -10 28 -16 46 -21c8 -2 17 -4 26 -5l14 -2v-33
+h32v33l15 1c9 1 17 3 26 5c17 4 32 10 45 18s23 19 31 31z" />
+    <glyph glyph-name="ion-social-usd" unicode="&#xf353;" horiz-adv-x="320" 
+d="M315 145c3 -10 5 -19 5 -29c0 -21 -5 -38 -14 -53s-20 -26 -35 -35s-31 -17 -50 -21c-10 -2 -19 -3 -29 -4v-35h-64v35c-9 1 -19 4 -28 6c-20 5 -36 12 -51 23s-26 24 -35 41c-8 16 -13 34 -14 55h69c0 -12 2 -24 7 -33c5 -10 12 -17 21 -23s20 -11 31 -14v120
+c-8 2 -18 4 -27 6c-17 4 -30 9 -41 16s-20 15 -27 23s-11 17 -14 26s-4 18 -4 28c0 18 4 34 12 48s19 25 33 34s29 16 46 20c7 2 15 3 22 4v33h64v-33c9 -1 16 -4 24 -6c18 -5 34 -12 48 -22s25 -22 33 -37c7 -13 11 -28 12 -46h-69c-3 21 -12 37 -26 46c-7 4 -13 8 -22 10
+v-106c9 -2 16 -4 25 -6c12 -3 22 -6 27 -7c13 -4 23 -9 33 -15c10 -7 18 -14 24 -22s11 -17 14 -27zM128 238v92c-7 -2 -15 -4 -21 -7c-7 -4 -12 -9 -17 -15s-7 -14 -7 -23c0 -13 4 -24 13 -31c8 -7 20 -12 32 -16zM247 89c3 7 4 13 4 20c0 14 -3 24 -10 31s-15 11 -23 14
+s-16 5 -26 8v-107c6 1 10 2 14 3c11 3 20 8 27 13s11 11 14 18z" />
+    <glyph glyph-name="ion-social-vimeo-outline" unicode="&#xf244;" 
+d="M445 334c7 -33 1 -66 -13 -97s-31 -59 -51 -87c-26 -36 -52 -71 -85 -101c-19 -18 -41 -35 -66 -44c-10 -4 -19 -5 -27 -5c-17 0 -31 9 -44 27c-14 19 -22 40 -28 63c-12 45 -25 90 -38 134c-4 12 -9 22 -15 33c-3 5 -8 10 -12 14c-2 2 -5 3 -8 3s-6 -1 -9 -3
+c-10 -6 -28 -18 -28 -18l-21 27c26 24 82 71 82 71c11 9 33 25 48 27h8c18 0 32 -7 42 -22c11 -17 15 -37 18 -57c7 -41 12 -82 24 -122c3 -10 7 -20 12 -29c4 -7 9 -10 14 -10c4 0 7 2 11 5s7 6 10 10c20 24 37 52 48 81c3 9 3 17 3 27c0 13 -10 25 -25 26h-7
+c-11 0 -20 -2 -32 -7c6 24 24 62 54 84c20 14 45 20 67 20c10 0 20 -2 27 -4c23 -8 36 -23 41 -46zM418 244c13 30 17 59 11 87c-4 19 -13 28 -30 34c-6 2 -14 3 -22 3c-21 0 -42 -6 -57 -17c-16 -12 -29 -30 -38 -48h6h8c23 -1 39 -19 40 -41c0 -10 0 -22 -4 -34
+c-11 -29 -29 -58 -51 -85c-4 -4 -7 -9 -12 -13c-7 -6 -15 -8 -22 -8c-8 0 -18 3 -27 18c-7 11 -11 22 -14 32c-10 31 -14 64 -19 95c-2 10 -3 19 -5 29c-3 17 -6 36 -16 51c-7 10 -16 15 -28 15h-6c-8 -1 -25 -11 -40 -23c-2 -2 -43 -37 -70 -61l2 -3c5 4 12 7 16 10
+c6 3 12 5 18 5c7 0 13 -3 18 -7c8 -7 13 -12 16 -18c6 -11 12 -24 16 -37c13 -44 26 -88 38 -133c5 -19 13 -41 26 -59s23 -20 31 -20c6 0 13 1 21 4c23 8 43 25 61 41c32 29 57 63 83 99v0c21 28 37 55 50 84z" />
+    <glyph glyph-name="ion-social-vimeo" unicode="&#xf245;" 
+d="M445 334c7 -33 1 -66 -13 -97s-31 -59 -51 -87c-26 -36 -52 -71 -85 -101c-19 -18 -41 -35 -66 -44c-31 -11 -52 -5 -71 22c-14 19 -22 40 -28 63c-12 45 -25 90 -38 134c-4 12 -9 22 -15 33c-3 5 -8 10 -12 14c-5 4 -11 3 -17 0c-10 -6 -28 -18 -28 -18l-21 27
+c26 24 82 71 82 71c11 9 33 25 48 27c21 3 38 -4 50 -22c11 -17 15 -37 18 -57c7 -41 11 -82 23 -122c3 -10 8 -20 13 -29c7 -11 15 -13 25 -5c4 3 7 6 10 10c20 24 37 52 48 81c3 9 3 17 3 27c0 13 -10 25 -25 26s-24 -1 -39 -7c6 24 24 62 54 84c29 21 71 24 94 16
+s36 -23 41 -46z" />
+    <glyph glyph-name="ion-social-whatsapp-outline" unicode="&#xf4ef;" 
+d="M178 294c4 -11 15 -39 16 -42s2 -6 0 -10s-3 -6 -6 -9s-6 -7 -9 -9c-3 -3 -6 -6 -3 -12s14 -24 30 -39c21 -20 38 -27 44 -30s9 -3 12 1s15 16 19 21s8 5 13 3s31 -17 37 -20s10 -5 11 -7s0 -13 -5 -26s-28 -24 -38 -25s-11 -8 -67 16s-90 84 -93 88s-22 31 -21 58
+s17 41 22 46s11 7 15 7h10s9 0 13 -11zM228 384c-50 0 -97 -20 -133 -55c-35 -35 -55 -81 -55 -131c0 -34 9 -67 27 -96l8 -13l-5 -14l-19 -57l61 19l13 4l12 -6c28 -15 59 -23 91 -23c50 0 97 19 133 54c35 35 55 82 55 132s-20 96 -55 131c-36 35 -83 55 -133 55zM228 416
+v0c121 0 220 -97 220 -218s-99 -218 -220 -218c-39 0 -74 10 -106 27l-122 -39l40 117c-20 33 -32 72 -32 113c0 121 99 218 220 218z" />
+    <glyph glyph-name="ion-social-whatsapp" unicode="&#xf4f0;" 
+d="M228 416c121 0 220 -97 220 -218s-99 -218 -220 -218c-39 0 -74 10 -106 27l-122 -39l40 117c-20 33 -32 72 -32 113c0 121 99 218 220 218zM337 115c5 13 6 24 5 26s-5 4 -11 7s-32 18 -37 20s-9 2 -13 -3s-16 -17 -19 -21s-6 -4 -12 -1s-23 10 -44 30
+c-16 15 -27 33 -30 39s0 9 3 12c3 2 6 6 9 9s4 5 6 9s1 7 0 10s-12 31 -16 42s-10 11 -13 11h-10s-10 -2 -15 -7s-21 -19 -22 -46s18 -54 21 -58s37 -64 93 -88s57 -17 67 -16s33 12 38 25z" />
+    <glyph glyph-name="ion-social-windows-outline" unicode="&#xf246;" 
+d="M432 167h-216v-149l216 -32v181zM448 183v0v-215l-248 36v179h248zM168 167h-152v-120l152 -22v142zM184 183v0v-177l-184 27v150h184zM432 398v0l-216 -31v-152h216v183zM448 416v0v-217h-248v182zM168 360v0l-152 -22v-123h152v145zM184 378v0v-179h-184v153z" />
+    <glyph glyph-name="ion-social-windows" unicode="&#xf247;" 
+d="M448 183v0v-215l-248 36v179h248zM184 183v0v-177l-184 27v150h184zM448 416v0v-217h-248v182zM184 378v0v-179h-184v153z" />
+    <glyph glyph-name="ion-social-wordpress-outline" unicode="&#xf248;" horiz-adv-x="384" 
+d="M192 384c106 0 192 -86 192 -192c0 -9 -1 -18 -2 -26c-12 -85 -79 -153 -165 -164c-8 -1 -17 -2 -25 -2c-106 0 -192 86 -192 192s86 192 192 192zM19 192c0 -68 40 -127 98 -155l-83 225c-10 -21 -15 -45 -15 -70zM214 21c12 2 24 4 35 8c0 1 -1 2 -1 3l-53 145l-33 -96
+v0l-19 -55c15 -5 32 -7 49 -7c8 0 15 1 22 2zM216 273l62 -186l17 58c9 22 13 41 13 56c0 21 -7 35 -14 47c-9 14 -17 27 -17 41c0 16 12 30 29 30h2c-31 28 -71 45 -116 45c-60 0 -113 -30 -144 -77c4 0 8 -1 11 -1c18 0 46 3 46 3c9 1 10 -14 1 -15c0 0 -10 -1 -20 -1
+l63 -187l38 113l-27 74c-9 0 -18 1 -18 1c-9 0 -8 16 1 15c0 0 28 -3 45 -3c18 0 46 3 46 3c9 1 11 -14 2 -15c0 0 -10 -1 -20 -1zM279 43c45 26 77 71 84 125c1 8 2 16 2 24c0 30 -8 58 -22 83c1 -6 1 -12 1 -18c0 -18 -3 -37 -13 -62l-39 -113z" />
+    <glyph glyph-name="ion-social-wordpress" unicode="&#xf249;" horiz-adv-x="384" 
+d="M195 177l53 -146c0 -1 6 -13 9 -19c-3 -1 -5 -2 -8 -3v0c-10 -3 -21 -6 -32 -7c-8 -1 -17 -2 -25 -2c-17 0 -34 2 -50 6v0c-2 0 -3 2 -5 2l25 73v0zM17 268c6 0 7 -1 15 -1l93 -255c-3 1 -5 2 -8 3c-63 27 -109 87 -116 158c-1 6 -1 13 -1 19c0 25 7 53 17 76zM366 273
+c11 -24 18 -52 18 -81c0 -9 -1 -18 -2 -26c-9 -65 -50 -120 -107 -147c-2 -1 -3 -1 -5 -2l22 65l39 113c10 25 13 45 13 62v19v0c-1 18 -10 44 -36 43h-2c-17 0 -29 -14 -29 -30c0 -14 8 -27 17 -41c7 -12 14 -26 14 -47c0 -15 -4 -34 -13 -56l-17 -58l-62 186
+c10 0 20 1 20 1c9 1 7 16 -2 15c0 0 -28 -3 -46 -3c-17 0 -45 3 -45 3c-9 1 -10 -15 -1 -15c0 0 9 -1 18 -1l27 -74l-38 -113l-63 187c10 0 20 2 20 2c9 1 8 15 -1 14c0 0 -28 -2 -46 -2h-34c5 9 11 17 17 25c35 44 90 72 150 72c24 0 48 -5 69 -13c34 -13 63 -36 85 -65
+c2 -2 3 -5 5 -7c6 -8 11 -17 15 -26z" />
+    <glyph glyph-name="ion-social-yahoo-outline" unicode="&#xf24a;" horiz-adv-x="320" 
+d="M289 380c11 0 21 1 31 4l-128 -213v-171c-10 4 -21 4 -32 4s-22 0 -32 -4v171l-128 213c10 -4 21 -4 32 -4s22 0 32 4l96 -160l96 160c10 -4 22 -4 33 -4zM178 180l111 184h-1c-7 0 -15 0 -24 2l-90 -150l-14 -23l-14 23l-89 150c-9 -2 -17 -2 -25 -2h-1l111 -184l2 -4
+v-5v-151c6 1 11 0 16 0s11 1 16 0v151v5z" />
+    <glyph glyph-name="ion-social-yahoo" unicode="&#xf24b;" horiz-adv-x="320" 
+d="M289 380c11 0 21 1 31 4l-128 -213v-171c-10 4 -21 4 -32 4s-22 0 -32 -4v171l-128 213c10 -4 21 -4 32 -4s22 0 32 4l96 -160l96 160c10 -4 22 -4 33 -4z" />
+    <glyph glyph-name="ion-social-yen-outline" unicode="&#xf4f1;" horiz-adv-x="384" 
+d="M384 416l-112 -208h48v-48h-73l-15 -31v-17h88v-48h-88v-96h-80v96h-88v48h88v17l-14 31h-74v48h48l-112 208h80l112 -221l112 221h80zM304 192h-59l13 24l99 184v0h-43l-122 -240l-122 240h-43l99 -184l13 -24h-59v-16h68l20 -44v-36h-88v-16h88v-96h48v96h88v16h-88v37
+l21 43h67v16z" />
+    <glyph glyph-name="ion-social-yen" unicode="&#xf4f2;" horiz-adv-x="384" 
+d="M384 416l-112 -208h48v-48h-73l-15 -31v-17h88v-48h-88v-96h-80v96h-88v48h88v17l-14 31h-74v48h48l-112 208h80l112 -221l112 221h80z" />
+    <glyph glyph-name="ion-social-youtube-outline" unicode="&#xf24c;" horiz-adv-x="512" 
+d="M265 352v0h-9h-9c-65 0 -118 -2 -168 -4h-1h-1c-23 0 -42 -22 -42 -49v-1v-1c-2 -34 -3 -70 -3 -105v0v0c0 -35 1 -70 3 -104v-2v-1c0 -14 5 -26 14 -36c8 -9 17 -13 28 -13h1h1c52 -2 108 -4 166 -4h11v0v0h11c58 0 113 2 166 4h1h1c11 0 20 4 28 13c9 10 14 22 14 36v1
+v2c2 34 3 68 3 104v0v0c0 36 -1 71 -3 105v1v2c0 27 -19 49 -42 49h-1h-1c-49 2 -103 3 -168 3zM265 384v0c58 0 115 0 170 -3c41 0 74 -36 74 -81c2 -36 3 -72 3 -108s-1 -71 -3 -107c0 -45 -33 -81 -74 -81c-55 -3 -111 -4 -168 -4h-11h-11c-57 0 -113 1 -168 4
+c-41 0 -74 36 -74 81c-2 36 -3 71 -3 107s2 71 4 107c0 45 32 82 73 82c55 2 112 3 170 3h9h9zM207 94v197l145 -99z" />
+    <glyph glyph-name="ion-social-youtube" unicode="&#xf24d;" horiz-adv-x="512" 
+d="M509 299c2 -36 3 -71 3 -107s-1 -71 -3 -107c0 -45 -33 -81 -74 -81c-58 -3 -118 -4 -179 -4s-121 1 -179 4c-41 0 -74 36 -74 81c-2 36 -3 71 -3 107s2 71 4 107c0 45 32 81 73 81c55 3 112 4 170 4h9h9c58 0 115 -1 170 -4c41 0 74 -36 74 -81zM207 94l145 98l-145 99
+v-197z" />
+    <glyph glyph-name="ion-soup-can-outline" unicode="&#xf4f3;" horiz-adv-x="320" 
+d="M160 304c-88 0 -160 29 -160 64s72 64 160 64s160 -29 160 -64s-72 -64 -160 -64zM160 415c-70 0 -126 -19 -126 -43s56 -43 126 -43s126 19 126 43s-56 43 -126 43zM161 288c88 0 158 29 159 64c0 -5 0 -33 -8 -40v-240c0 -35 -64 -64 -152 -64s-152 29 -152 64v240
+c-8 6 -8 40 -8 40c0 -35 73 -64 161 -64zM280 72v80c-18 -10 -43 -17 -72 -21h-2c-6 -20 -24 -35 -46 -35s-40 15 -46 35h-2c-29 4 -54 11 -72 21v-80c1 -2 9 -10 30 -18c24 -9 55 -14 90 -14s67 5 91 14c21 8 29 16 29 18zM280 184v91c-33 -12 -75 -19 -119 -19
+c-45 0 -87 7 -121 19v-91c18 -10 43 -17 73 -21h3c7 17 24 29 44 29s37 -12 44 -29h3c30 4 55 11 73 21zM178 -16zM160 -16h1h-1v0zM312 32l8 -16c0 -7 -3 -14 -8 -20c-21 -26 -81 -44 -152 -44s-131 18 -152 44c-5 6 -8 13 -8 20l8 16v16c0 -35 63 -64 152 -64
+s152 28 152 64v-16z" />
+    <glyph glyph-name="ion-soup-can" unicode="&#xf4f4;" horiz-adv-x="320" 
+d="M0 368c0 43 53 64 160 64s160 -21 160 -64s-53 -64 -160 -64s-160 21 -160 64zM160 8c-44 0 -80 6 -109 18s-43 28 -43 46v128c0 -9 4 -19 13 -27s21 -15 37 -21s33 -10 54 -13c1 -12 7 -23 16 -31s20 -12 32 -12s23 4 32 12s15 19 16 31c31 4 56 12 75 23s29 24 29 38
+v-128c0 -18 -14 -34 -43 -46s-65 -18 -109 -18zM160 288c44 0 82 6 113 18s47 28 47 46v-8c0 -5 -1 -11 -2 -18s-3 -11 -6 -14v-96c0 -14 -10 -27 -29 -38s-44 -19 -76 -23c-2 11 -8 19 -17 26s-19 11 -30 11s-21 -4 -30 -11s-15 -15 -17 -26c-32 4 -57 12 -76 23
+s-29 24 -29 38v96c-5 5 -8 18 -8 40c0 -18 16 -34 47 -46s69 -18 113 -18zM312 56v-24l8 -16c0 -7 -3 -14 -8 -20c-11 -13 -30 -24 -58 -32s-59 -12 -94 -12s-66 4 -94 12s-47 19 -58 32c-5 6 -8 13 -8 20l8 16v24c0 -18 14 -34 43 -46s65 -18 109 -18s80 6 109 18
+s43 28 43 46z" />
+    <glyph glyph-name="ion-speakerphone" unicode="&#xf2b2;" 
+d="M39 266c0 -37 20 -69 50 -86c-1 0 -2 1 -3 1s-4 1 -5 1v0c-35 3 -62 33 -69 69c-6 0 -12 7 -12 16c0 8 5 15 11 16c6 42 40 75 81 75h8c-36 -15 -61 -51 -61 -92zM433 357c10 -25 15 -56 15 -88s-5 -63 -15 -88l-3 -9c-6 -14 -15 -26 -24 -34c-10 -10 -22 -19 -34 -20h-3
+c-7 0 -15 2 -22 5c-3 2 -10 5 -10 5c-22 10 -84 28 -115 29c-4 -8 -10 -20 -12 -30c-2 -9 -6 -27 -7 -61c-1 -32 1 -59 3 -82c0 -2 1 -5 1 -7c0 -6 -2 -9 -9 -9h-77c-6 0 -9 3 -9 6v7c2 72 25 140 26 145c2 9 5 17 7 30c2 12 -27 13 -40 24c-29 17 -47 49 -47 86
+c0 41 25 77 59 92h42h19c58 3 114 21 163 50c1 1 3 1 4 2v0c8 4 16 6 24 6c13 0 26 -6 37 -16c9 -9 18 -21 24 -35c1 -3 2 -5 3 -8zM410 180c9 22 15 54 15 89s-6 66 -15 88c-8 18 -19 29 -30 29s-21 -11 -29 -29c-9 -22 -15 -53 -15 -88s6 -67 15 -89c8 -19 18 -33 29 -33
+s22 15 30 33z" />
+    <glyph glyph-name="ion-speedometer" unicode="&#xf2b3;" 
+d="M312 192l8 -8l-64 -84v-4c0 -18 -14 -32 -32 -32s-32 14 -32 32s14 32 32 32h4zM224 352c124 0 224 -100 224 -224c0 -34 -8 -67 -22 -96h-36c15 27 25 57 26 88h-32v16h32c-1 29 -9 56 -22 81l-27 -15l-8 13l27 16c-8 12 -16 23 -26 33s-21 18 -33 26l-16 -27l-14 8
+l16 27c-25 13 -52 21 -81 22v-32h-16v32c-29 -1 -56 -9 -81 -22l16 -27l-14 -8l-16 27c-12 -8 -23 -16 -33 -26s-19 -21 -26 -33l28 -16l-8 -13l-28 15c-13 -25 -21 -52 -22 -81h32v-16h-32c1 -31 11 -61 26 -88h-36c-14 29 -22 62 -22 96c0 124 100 224 224 224z" />
+    <glyph glyph-name="ion-spoon" unicode="&#xf2b4;" horiz-adv-x="128" 
+d="M128 288c0 64 -26 128 -64 128s-64 -64 -64 -128v0c1 -25 16 -54 37 -64l1 -1v0c3 -2 10 -6 10 -10c0 0 -16 -199 -16 -210s4 -20 10 -26s14 -9 22 -9v0v0c8 0 16 3 22 9s10 13 10 26s-16 210 -16 210c0 4 7 8 10 10l1 1c22 10 37 38 37 64z" />
+    <glyph glyph-name="ion-star" unicode="&#xf24e;" 
+d="M448 248l-139 -104l55 -176l-140 112l-140 -112l55 176l-139 104h172l52 168l53 -168h171z" />
+    <glyph glyph-name="ion-stats-bars" unicode="&#xf2b5;" horiz-adv-x="352" 
+d="M96 32v320h64v-320h-64zM0 32v96h64v-96h-64zM192 32v160h64v-160h-64zM288 32v224h64v-224h-64z" />
+    <glyph glyph-name="ion-steam" unicode="&#xf30b;" horiz-adv-x="512" 
+d="M480 240c0 -20 -16 -37 -37 -37c-20 0 -37 16 -37 37c0 20 16 37 37 37c20 0 37 -17 37 -37zM443 309c38 0 69 -31 69 -69s-31 -70 -69 -70l-67 -48c-2 -26 -24 -47 -51 -47c-25 0 -46 18 -51 41l-196 78c-8 -5 -16 -7 -26 -7c-28 0 -52 24 -52 52s24 52 52 52
+c25 0 45 -18 50 -41l196 -79c8 5 17 8 27 8c2 0 3 -1 5 -1l43 62c0 38 32 69 70 69zM443 286c-26 0 -47 -20 -47 -46s21 -47 47 -47s46 21 46 47s-20 46 -46 46zM52 277c-21 0 -38 -17 -38 -38s17 -38 38 -38c3 0 5 0 8 1l-16 6v0c-15 7 -22 24 -16 39s24 23 39 17v0l19 -7
+c-6 12 -19 20 -34 20zM325 165c-3 0 -6 -1 -9 -1l16 -6c16 -6 23 -24 17 -40s-23 -23 -39 -17c-6 3 -13 6 -19 8c6 -12 19 -20 34 -20c21 0 38 17 38 38s-17 38 -38 38z" />
+    <glyph glyph-name="ion-stop" unicode="&#xf24f;" horiz-adv-x="384" 
+d="M373 384c6 0 11 -5 11 -11v-362c0 -6 -5 -11 -11 -11h-362c-6 0 -11 5 -11 11v362c0 6 5 11 11 11h362z" />
+    <glyph glyph-name="ion-thermometer" unicode="&#xf2b6;" horiz-adv-x="160" 
+d="M127 112c20 -14 33 -38 33 -64c0 -44 -36 -80 -80 -80s-80 36 -80 80c0 27 13 51 33 65v257c0 26 21 46 47 46s47 -20 47 -46v-258zM65 370v-50h30v50c0 8 -7 14 -15 14s-15 -6 -15 -14zM96 160v16h-16v-16h16zM96 192v64h-16v-64h16z" />
+    <glyph glyph-name="ion-thumbsdown" unicode="&#xf250;" horiz-adv-x="384" 
+d="M24 195c-10 5 -18 17 -18 29c0 14 8 25 20 30c-4 5 -6 12 -6 19c0 14 8 25 20 30c-3 5 -5 11 -5 17c0 18 11 24 35 30s74 12 126 9c23 -1 55 -7 76 -7v32h112v-240h-112v16c-15 -1 -31 -4 -40 -14c-22 -23 -40 -65 -40 -108c0 -19 1 -29 -4 -34c-13 -13 -44 9 -52 37
+c-9 34 -1 62 1 87h-103c-19 0 -34 15 -34 34c0 15 10 29 24 33zM336 352c-9 0 -16 -7 -16 -16s7 -16 16 -16s16 7 16 16s-7 16 -16 16z" />
+    <glyph glyph-name="ion-thumbsup" unicode="&#xf251;" horiz-adv-x="384" 
+d="M360 189c10 -5 18 -17 18 -29c0 -14 -8 -25 -20 -30c4 -5 6 -12 6 -19c0 -14 -8 -25 -20 -30c3 -5 5 -11 5 -17c0 -18 -11 -24 -35 -30s-74 -12 -126 -9c-23 1 -55 7 -76 7v-32h-112v240h112v-16c15 1 31 4 40 14c22 23 40 65 40 108c0 19 -1 29 4 34c13 13 44 -9 52 -37
+c9 -34 1 -62 -1 -87h103c19 0 34 -15 34 -34c0 -15 -10 -29 -24 -33zM48 32c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16z" />
+    <glyph glyph-name="ion-toggle-filled" unicode="&#xf354;" 
+d="M320 240c26 0 48 -22 48 -48s-22 -48 -48 -48s-48 22 -48 48s22 48 48 48zM320 320c71 0 128 -57 128 -128s-57 -128 -128 -128h-192c-71 0 -128 57 -128 128s57 128 128 128h192zM320 112c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80z" />
+    <glyph glyph-name="ion-toggle" unicode="&#xf355;" 
+d="M320 288h-192c-53 0 -96 -43 -96 -96s43 -96 96 -96h192c53 0 96 43 96 96s-43 96 -96 96zM320 320v0c71 0 128 -57 128 -128s-57 -128 -128 -128h-192c-71 0 -128 57 -128 128s57 128 128 128h192zM128 240c-26 0 -48 -22 -48 -48s22 -48 48 -48s48 22 48 48
+s-22 48 -48 48zM128 272v0c44 0 80 -36 80 -80s-36 -80 -80 -80s-80 36 -80 80s36 80 80 80z" />
+    <glyph glyph-name="ion-transgender" unicode="&#xf4f5;" horiz-adv-x="512" 
+d="M368 448h144v-144h-40v76l-101 -100c8 -17 13 -36 13 -56c0 -63 -46 -115 -104 -126v-52h72v-46h-72v-64h-48v64h-72v46h72v52c-59 11 -104 63 -104 126c0 20 5 39 13 56l-22 22l-36 -36l-33 33l36 36l-46 45v-76h-40v144h144v-40h-70l43 -42l36 36l33 -33l-36 -36
+l17 -17c23 22 54 36 89 36c27 0 53 -8 74 -23c0 0 6 -5 15 -13l93 92h-70v40zM256 144c44 0 80 36 80 80s-36 80 -80 80s-80 -36 -80 -80s36 -80 80 -80z" />
+    <glyph glyph-name="ion-trash-a" unicode="&#xf252;" horiz-adv-x="352" 
+d="M261 320v0h91v-32h-9s-5 -1 -8 -4s-4 -9 -4 -9l-19 -241c-2 -29 -2 -34 -36 -34h-200c-34 0 -34 5 -36 34l-19 242s-1 6 -4 9s-8 3 -8 3h-9v32h91v29c0 19 14 35 34 35h101c20 0 35 -16 35 -35v-29zM112 349v-29h128v29c0 10 -9 15 -19 15h-91c-10 0 -18 -5 -18 -15z
+M104 64h20l-10 192h-21zM187 64v192h-22v-192h22zM249 64l10 192h-20l-11 -192h21z" />
+    <glyph glyph-name="ion-trash-b" unicode="&#xf253;" horiz-adv-x="320" 
+d="M318 315c3 -12 4 -11 -7 -11h-302c-11 0 -10 -1 -7 11c2 9 4 13 4 13c3 9 9 9 19 11l53 7c7 1 7 1 10 7c9 20 10 31 20 31h103c10 0 12 -11 21 -31c3 -6 3 -6 10 -7l53 -6c10 -2 16 -2 19 -11c0 0 2 -5 4 -14zM283 272c17 0 18 -2 17 -15l-19 -242c-2 -12 -2 -15 -17 -15
+h-208c-15 0 -15 3 -17 15l-19 242c-1 12 0 15 17 15h246z" />
+    <glyph glyph-name="ion-trophy" unicode="&#xf356;" 
+d="M448 345c0 -25 2 -73 -22 -122c-15 -30 -36 -55 -63 -75c-23 -16 -49 -28 -77 -35c-16 -17 -32 -27 -46 -31v-33s0 -49 99 -49h13v-32h-256v32h13c85 0 97 35 99 46v36c-14 4 -30 14 -46 31c-28 7 -55 19 -77 35c-27 20 -48 45 -63 75c-17 36 -21 71 -22 97v0v11v0v21v0
+h80c-2 35 0 64 0 64h143h1h1h142s2 -29 0 -64h81v-7zM51 237c17 -34 43 -61 77 -78c-22 40 -33 84 -42 135c-1 8 -2 17 -3 26h-51c1 -23 5 -53 19 -83zM397 237c14 30 18 60 19 83h-51c-1 -9 -3 -18 -4 -26c-9 -51 -20 -95 -42 -135c34 17 61 43 78 78z" />
+    <glyph glyph-name="ion-tshirt-outline" unicode="&#xf4f6;" 
+d="M146 362l-104 -31l11 -32l39 4l38 5l-2 -38l-14 -255h220l-14 255l-2 38l38 -5l39 -4l11 32l-104 31c-6 -8 -13 -14 -21 -19c-15 -10 -34 -15 -57 -15v0v0c-34 1 -59 11 -78 34zM288 400v0l160 -48l-32 -88l-64 8l16 -289h-288l16 289l-64 -8l-32 88l160 48
+c14 -27 31 -39 64 -40c33 0 50 13 64 40z" />
+    <glyph glyph-name="ion-tshirt" unicode="&#xf4f7;" 
+d="M448 352l-32 -88l-64 8l16 -288h-288l16 288l-64 -8l-32 88l160 48c14 -27 31 -39 64 -40c33 0 50 13 64 40z" />
+    <glyph glyph-name="ion-umbrella" unicode="&#xf2b7;" 
+d="M344 160v0v0v0zM104 160v0v0v0zM240 399c116 -8 208 -109 208 -227v-12c-4 25 -26 52 -52 52c-29 0 -52 -23 -52 -52v0c0 29 -23 52 -52 52s-49 -12 -52 -45v-135c0 -17 -6 -33 -18 -45s-29 -19 -46 -19c-35 0 -63 29 -63 64c0 9 7 16 16 16s16 -7 16 -16
+c0 -18 14 -32 31 -32c18 0 32 14 32 32v134c-1 24 -26 46 -52 46c-29 0 -52 -23 -52 -52v0c0 29 -23 52 -52 52c-27 0 -49 -26 -52 -52v18c0 118 92 213 208 221v1c0 9 7 16 16 16s16 -7 16 -16v-1z" />
+    <glyph glyph-name="ion-university" unicode="&#xf357;" 
+d="M224 384l224 -111l-92 -60l-132 -85l-160 102v-198l-32 16v203l-32 21zM358 192l10 -82c-16 -12 -112 -78 -144 -110c-32 32 -128 98 -144 110l9 82l135 -88z" />
+    <glyph glyph-name="ion-unlocked" unicode="&#xf254;" horiz-adv-x="384" 
+d="M22 -32c-12 0 -22 10 -22 22v212c0 12 10 22 22 22h3h19v31c0 42 17 87 43 115s64 46 105 46v0v0c41 0 79 -18 105 -46c20 -21 33 -51 39 -82h-53c-5 18 -13 35 -24 47v0v1c-18 19 -42 29 -67 29v0v0c-25 0 -49 -10 -67 -29v-1v0c-18 -19 -28 -53 -28 -80v-31h265
+c12 0 22 -10 22 -22v-212c0 -12 -10 -22 -22 -22h-340z" />
+    <glyph glyph-name="ion-upload" unicode="&#xf255;" 
+d="M366 215c45 0 82 -37 82 -83s-37 -84 -82 -84h-110v80h48l-80 84l-80 -84h48v-80h-102c-49 0 -90 41 -90 91c0 40 26 74 61 86c5 29 29 51 59 51c10 0 18 -3 26 -7c19 40 59 67 105 67c64 0 115 -53 115 -118v-3z" />
+    <glyph glyph-name="ion-usb" unicode="&#xf2b8;" horiz-adv-x="256" 
+d="M16 228v0v0zM256 320c0 -11 -6 -21 -14 -27v0c-2 -1 -3 -5 -3 -7c-1 -20 -3 -36 -9 -50c-7 -19 -20 -33 -39 -46c-17 -12 -29 -21 -36 -34c-7 -12 -11 -28 -11 -53v-24c0 -7 2 -13 10 -18c4 -2 7 -6 10 -9c8 -9 14 -21 14 -34c0 -28 -22 -50 -50 -50s-50 22 -50 50v1v0
+c0 18 10 33 24 42c5 4 9 5 9 18v0c0 14 -3 17 -10 27s-18 17 -32 26c-19 13 -33 27 -40 46c-6 15 -8 31 -9 39s-2 9 -4 11c-10 6 -16 16 -16 28c0 18 14 32 32 32s32 -14 32 -32c0 -10 -4 -20 -12 -26c-3 -2 -4 -11 -4 -14v0v0c0 -9 3 -18 7 -28c10 -21 45 -44 52 -44
+s8 5 8 12v196s-1 2 -3 4h-1v1v0c-9 6 -15 16 -15 27c0 18 14 32 32 32s32 -14 32 -32c0 -11 -5 -21 -14 -27v0c-2 -2 -2 -3 -2 -5v-140c0 -10 2 -12 8 -11c13 3 48 30 52 43c3 10 6 23 7 41v1c0 2 -2 4 -3 6c-10 6 -16 16 -16 28c0 18 14 32 32 32s32 -14 32 -32zM32 240
+c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM128 368c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16zM224 304c9 0 16 7 16 16s-7 16 -16 16s-16 -7 -16 -16s7 -16 16 -16z" />
+    <glyph glyph-name="ion-videocamera" unicode="&#xf256;" 
+d="M335 263v-66l113 35v-89v-88l-113 35v-65c0 -5 -4 -9 -9 -9h-317c-5 0 -9 4 -9 9v12v55v171c0 5 4 9 9 9h208v38c0 4 -6 10 -10 10h-176v48h178c36 0 65 -29 65 -64v-32h52c5 0 9 -4 9 -9zM226 107c20 0 36 16 36 36s-16 35 -36 35s-36 -15 -36 -35c0 -10 4 -19 11 -26
+h-68c7 7 11 16 11 26c0 20 -16 36 -36 36s-36 -16 -36 -36s16 -36 36 -36h12h95h11z" />
+    <glyph glyph-name="ion-volume-high" unicode="&#xf257;" 
+d="M199 40l-95 88h-104v128h104l95 88v-304zM255 92l-20 16c17 24 27 52 27 84s-10 60 -27 84l20 16c20 -28 33 -63 33 -100s-13 -72 -33 -100zM322 46l-21 16c27 36 43 81 43 130s-16 94 -43 130l21 16c30 -41 48 -91 48 -146s-18 -105 -48 -146zM365 369l20 15
+c39 -54 63 -120 63 -192s-24 -138 -63 -192l-20 15c36 49 58 111 58 177s-22 128 -58 177z" />
+    <glyph glyph-name="ion-volume-low" unicode="&#xf258;" horiz-adv-x="288" 
+d="M199 40l-95 88h-104v128h104l95 88v-304zM255 92l-20 16c17 24 28 52 28 84s-11 60 -28 84l20 16c20 -28 33 -63 33 -100s-13 -72 -33 -100z" />
+    <glyph glyph-name="ion-volume-medium" unicode="&#xf259;" horiz-adv-x="370" 
+d="M199 40l-95 88h-104v128h104l95 88v-304zM255 92l-20 16c17 24 28 52 28 84s-11 60 -28 84l20 16c20 -28 33 -63 33 -100s-13 -72 -33 -100zM322 46l-21 16c27 36 43 81 43 130s-16 94 -43 130l21 16c30 -41 48 -91 48 -146s-18 -105 -48 -146z" />
+    <glyph glyph-name="ion-volume-mute" unicode="&#xf25a;" 
+d="M224 231l47 51v-180l-47 51h-65v78h65zM332 388c69 -38 116 -112 116 -196c0 -124 -100 -224 -224 -224c-39 0 -76 10 -108 27l-1 1c-69 38 -115 112 -115 196c0 124 100 224 224 224c39 0 75 -10 107 -28h1zM362 93c20 28 33 62 33 99c0 66 -38 123 -92 151
+c-6 3 -11 6 -17 8c-19 7 -40 11 -62 11c-37 0 -71 -12 -99 -32l73 -74h-76l-36 35c-20 -28 -32 -62 -32 -99c0 -65 36 -121 90 -150c6 -3 13 -7 19 -9c19 -7 39 -11 61 -11c37 0 72 12 100 32l-20 20v77z" />
+    <glyph glyph-name="ion-wand" unicode="&#xf358;" 
+d="M192 208l48 48l48 -48l-48 -48zM0 16l176 176l48 -48l-176 -176zM224 352v64h32v-64h-32zM398 344l-45 -45l-23 22l46 45zM127 299l-45 45l22 22l45 -45zM376 50l-46 45l23 23l45 -46zM384 192v32h64v-32h-64z" />
+    <glyph glyph-name="ion-waterdrop" unicode="&#xf25b;" horiz-adv-x="320" 
+d="M175 409c40 -41 145 -160 145 -288c0 -85 -72 -153 -160 -153c-56 0 -106 27 -134 69c-6 9 -11 19 -15 29c-7 17 -11 35 -11 55v4c1 67 31 131 64 183c20 31 42 57 59 77c9 10 16 18 22 24l1 1v0c4 3 8 6 14 6c5 0 10 -3 14 -6v0zM160 24c55 0 100 45 100 100
+c0 14 -3 28 -8 40c-17 -65 -70 -116 -136 -130c13 -6 28 -10 44 -10z" />
+    <glyph glyph-name="ion-wifi" unicode="&#xf25c;" 
+d="M224 352c80 0 156 -30 214 -84l10 -10l-10 -9l-32 -32l-10 -10l-9 9c-44 41 -103 64 -163 64s-119 -23 -163 -64l-9 -9l-10 10l-32 32l-10 9l10 10c58 54 134 84 214 84v0zM365 192l11 -10l-10 -10l-33 -32l-9 -9l-10 8c-25 22 -57 35 -90 35s-65 -13 -90 -35l-10 -8
+l-9 9l-33 32l-10 10l11 10c37 33 83 52 132 54v0h9v0v0c52 0 102 -19 141 -54zM224 32l-10 10l-52 52l-11 10l12 10c17 11 32 20 61 20s47 -9 62 -20l11 -10l-10 -10l-53 -52z" />
+    <glyph glyph-name="ion-wineglass" unicode="&#xf2b9;" horiz-adv-x="256" 
+d="M167 153c-11 -4 -24 -8 -24 -32v-94c0 -11 4 -19 12 -25c3 -2 7 -4 15 -6c32 -9 48 -16 50 -18c2 -1 4 -3 4 -7c0 0 -14 -3 -96 -3s-96 3 -96 3c0 4 2 6 4 7c2 2 18 9 50 18c8 2 11 4 14 6c8 6 11 14 11 25v94c0 24 -11 28 -22 32s-18 6 -26 11c-12 7 -23 16 -32 26
+c-20 23 -31 52 -31 87c0 50 4 100 8 114s14 25 31 25h178c17 0 27 -11 31 -25s8 -65 8 -115c0 -35 -11 -63 -31 -86c-9 -10 -20 -19 -32 -26c-8 -5 -15 -7 -26 -11zM128 178c26 0 50 11 67 28l6 6c16 18 22 35 23 65s-2 83 -8 107h-177c-7 -35 -8 -80 -7 -108s7 -46 23 -64
+c2 -3 4 -6 7 -8c17 -16 41 -26 66 -26zM208 277c0 -10 -1 -20 -4 -29s-8 -18 -15 -25l-5 -5c-14 -14 -34 -23 -56 -23c-21 0 -41 8 -55 22l-6 6c-7 7 -12 16 -15 25s-3 15 -4 29c-1 9 0 34 1 53c1 10 2 19 3 22h153c1 -6 2 -14 2 -22c1 -21 1 -45 1 -53zM192 269v0v26
+c0 4 -4 8 -8 8s-8 -4 -8 -8v-26c0 -3 1 -6 3 -7c1 -1 3 -1 5 -1c4 0 8 3 8 8zM191 316c1 2 1 4 1 6s-2 4 -4 5s-4 1 -6 1s-4 -1 -5 -3s-1 -4 -1 -6s2 -4 4 -5s4 -1 6 -1s4 1 5 3z" />
+    <glyph glyph-name="ion-woman" unicode="&#xf25d;" horiz-adv-x="192" 
+d="M30 299c3 12 17 33 42 34h48c24 -1 38 -22 42 -34l29 -104c6 -23 -21 -32 -27 -10l-26 96h-9l46 -169h-43v-127c0 -23 -31 -23 -31 0v127h-10v-127c0 -23 -32 -23 -32 0v127h-42l45 169h-7l-27 -96c-7 -21 -33 -13 -27 10zM133 379c0 -21 -17 -37 -37 -37s-37 16 -37 37
+s17 37 37 37s37 -16 37 -37z" />
+    <glyph glyph-name="ion-wrench" unicode="&#xf2ba;" 
+d="M430 333c14 -14 19 -31 18 -44s-6 -39 -32 -65s-77 -42 -113 -24c-5 3 -13 5 -21 -3c-10 -9 -202 -215 -202 -215c-17 -19 -48 -18 -66 0s-19 49 0 66c0 0 207 194 215 202s5 16 3 22c-20 47 2 89 24 112c22 24 51 31 65 32c13 1 31 -5 44 -18l-57 -56l10 -56l55 -10z
+M59 5c6 6 6 17 0 23s-16 6 -22 0s-6 -17 0 -23s16 -6 22 0z" />
+    <glyph glyph-name="ion-xbox" unicode="&#xf30c;" 
+d="M95 200c-49 -72 -50 -139 -50 -143c-28 38 -45 84 -45 135c0 67 30 128 77 169l3 -1c51 -18 93 -68 93 -68s-38 -33 -78 -92zM448 192c0 -51 -17 -97 -45 -135c0 4 -1 71 -50 143c-40 59 -78 92 -78 92s42 50 93 68l3 1c47 -41 77 -102 77 -169zM169 367
+c-37 17 -65 12 -72 10c36 25 80 39 127 39s91 -14 127 -39c-7 2 -35 6 -72 -10c-29 -13 -55 -35 -55 -35s-26 22 -55 35zM327 155c40 -49 54 -85 62 -108l2 -5c-41 -46 -101 -74 -167 -74s-126 28 -167 74l1 5c8 23 23 59 63 108c46 57 103 94 103 94s57 -37 103 -94z" />
+  </font>
+</defs></svg>
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.ttf b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.ttf
new file mode 100644 (file)
index 0000000..c4e4632
Binary files /dev/null and b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.ttf differ
diff --git a/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.woff b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.woff
new file mode 100644 (file)
index 0000000..5f3a14e
Binary files /dev/null and b/ecomp-portal-BE-os/src/main/webapp/app/fusion/external/ds2/css/fonts/ionicons.woff differ
index 2811bb4..2ccd977 100644 (file)
@@ -1,41 +1,41 @@
-<%--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  --%>\r
-<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>\r
-\r
-<%-- Redirected because we can't set the welcome page to a virtual URL. --%>\r
-<%-- <c:redirect url="/login.htm"/>\r
- --%>\r
- <html>\r
- <head>\r
- <title>ecompportal-BE index.jsp</title>\r
- </head>\r
- <body>\r
- <h2>ECOMP Portal Core</h2>\r
- This is the ecompportal-BE application, page index.jsp.\r
\r
- <% \r
\r
- response.sendRedirect("welcome.htm");\r
\r
- %>\r
\r
- </body>\r
- </html>\r
\r
+<%--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  --%>
+<%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
+
+<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
+<%-- <c:redirect url="/login.htm"/>
+ --%>
+ <html>
+ <head>
+ <title>ecompportal-BE index.jsp</title>
+ </head>
+ <body>
+ <h2>ECOMP Portal Core</h2>
+ This is the ecompportal-BE application, page index.jsp.
+ <% 
+ response.sendRedirect("welcome.htm");
+ %>
+ </body>
+ </html>
index 49686c8..c3ca243 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.net.URI;\r
-import java.security.cert.CertificateException;\r
-import java.security.cert.X509Certificate;\r
-\r
-import javax.net.ssl.SSLContext;\r
-import javax.servlet.http.HttpServletResponse;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.apache.http.Consts;\r
-import org.apache.http.HttpEntity;\r
-import org.apache.http.client.methods.CloseableHttpResponse;\r
-import org.apache.http.client.methods.HttpGet;\r
-import org.apache.http.client.methods.HttpPost;\r
-import org.apache.http.client.utils.URIBuilder;\r
-import org.apache.http.conn.ssl.NoopHostnameVerifier;\r
-import org.apache.http.conn.ssl.SSLConnectionSocketFactory;\r
-import org.apache.http.entity.ContentType;\r
-import org.apache.http.entity.StringEntity;\r
-import org.apache.http.impl.client.CloseableHttpClient;\r
-import org.apache.http.impl.client.HttpClientBuilder;\r
-import org.apache.http.impl.client.HttpClients;\r
-import org.apache.http.ssl.SSLContexts;\r
-import org.apache.http.ssl.TrustStrategy;\r
-import org.apache.http.util.EntityUtils;\r
-/**\r
- * Provides reusable features for test cases to get or post from an REST\r
- * endpoint, allowing use of HTTPS connections to servers that use self-signed\r
- * certificates.\r
- */\r
-public class SharedContextRestClient {\r
-\r
-       private static final Log logger = LogFactory.getLog(SharedContextRestClient.class);\r
-\r
-       /**\r
-        * Convenience method that builds and sends a GET request using properties\r
-        * to build the URI and populate header with credentials.\r
-        * \r
-        * @param task\r
-        *            last component(s) of REST endpoint name; e.g., "get".\r
-        * @param contextId\r
-        * @param contextKey\r
-        * @return JSON string fetched\r
-        * @throws Exception\r
-        *             if the HTTP response code is anything other than OK.\r
-        */\r
-       public static String getJson(final SharedContextTestProperties properties, final String task,\r
-                       final String contextId, final String contextKey) throws Exception {\r
-               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //\r
-                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //\r
-                               + '/' + task;\r
-               return getJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PORT, -1), //\r
-                               properties.getProperty(SharedContextTestProperties.SECURE, true), //\r
-                               properties.getProperty(SharedContextTestProperties.UEBKEY), //\r
-                               properties.getProperty(SharedContextTestProperties.USERNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PASSWORD), requestPath, //\r
-                               contextId, //\r
-                               contextKey);\r
-       }\r
-\r
-       /**\r
-        * Constructs and sends a GET request using the specified values.\r
-        * \r
-        * @param hostname\r
-        * @param port\r
-        *            ignored if negative\r
-        * @param secure\r
-        *            If true, uses https; else http.\r
-        * @param headerUebkey\r
-        * @param headerUsername\r
-        * @param headerPassword\r
-        * @param requestPath\r
-        *            full path of the REST endpoint\r
-        * @param contextId\r
-        * @param contextKey\r
-        * Ignored if null\r
-        * @return JSON result\r
-        */\r
-       public static String getJson(final String hostname, final int port, boolean secure, final String headerUebkey,\r
-                       final String headerUsername, final String headerPassword, final String requestPath, final String contextId,\r
-                       final String contextKey) throws Exception {\r
-\r
-               URIBuilder uriBuilder = new URIBuilder();\r
-               if (secure)\r
-                       uriBuilder.setScheme("https");\r
-               else\r
-                       uriBuilder.setScheme("http");\r
-               uriBuilder.setHost(hostname);\r
-               if (port > 0)\r
-                       uriBuilder.setPort(port);\r
-               uriBuilder.setPath(requestPath);\r
-               uriBuilder.addParameter("context_id", contextId);\r
-               if (contextKey != null)\r
-                       uriBuilder.addParameter("ckey", contextKey);\r
-               final URI uri = uriBuilder.build();\r
-\r
-               CloseableHttpClient httpClient;\r
-               if (secure) {\r
-                       // Tell HttpClient to accept any server certificate for HTTPS.\r
-                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error\r
-                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {\r
-                               @Override\r
-                               public boolean isTrusted(final X509Certificate[] chain, final String authType)\r
-                                               throws CertificateException {\r
-                                       return true;\r
-                               }\r
-                       }).build();\r
-                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,\r
-                                       NoopHostnameVerifier.INSTANCE);\r
-                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();\r
-               } else {\r
-                       httpClient = HttpClients.createDefault();\r
-               }\r
-\r
-               HttpGet httpGet = new HttpGet(uri);\r
-               httpGet.setHeader("uebkey", headerUebkey);\r
-               httpGet.setHeader("username", headerUsername);\r
-               httpGet.setHeader("password", headerPassword);\r
-\r
-               String json = null;\r
-               CloseableHttpResponse response = null;\r
-               try {\r
-                       logger.debug("GET from " + uri);\r
-                       response = httpClient.execute(httpGet);\r
-                       logger.info("Status is " + response.getStatusLine());\r
-                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)\r
-                               throw new Exception("Status is " + response.getStatusLine().toString());\r
-                       HttpEntity entity = response.getEntity();\r
-                       if (entity == null) {\r
-                               logger.warn("Entity is null!");\r
-                       } else {\r
-                               // entity content length is never set.\r
-                               // this naively tries to read everything.\r
-                               json = EntityUtils.toString(entity);\r
-                               EntityUtils.consume(entity);\r
-                       }\r
-               } finally {\r
-                       if (response != null)\r
-                               response.close();\r
-               }\r
-               return json;\r
-       }\r
-\r
-       /**\r
-        * Convenience method that builds and sends a POST request using properties\r
-        * to build the URI and populate header with credentials.\r
-        * \r
-        * @param path\r
-        *            last component(s) of REST endpoint name; e.g., "users" or\r
-        *            "user/{userid}/roles".\r
-        * @return JSON string fetched\r
-        * @throws Exception\r
-        *             if the HTTP response code is anything other than OK.\r
-        */\r
-       public static String postJson(final SharedContextTestProperties properties, final String path, final String json)\r
-                       throws Exception {\r
-               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //\r
-                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //\r
-                               + '/' + path;\r
-               return postJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PORT, -1), //\r
-                               properties.getProperty(SharedContextTestProperties.SECURE, true), //\r
-                               properties.getProperty(SharedContextTestProperties.UEBKEY), //\r
-                               properties.getProperty(SharedContextTestProperties.USERNAME), //\r
-                               properties.getProperty(SharedContextTestProperties.PASSWORD), //\r
-                               requestPath, //\r
-                               json);\r
-       }\r
-\r
-       /**\r
-        * Constructs and sends a POST request using the specified values.\r
-        * \r
-        * @param hostname\r
-        * @param port\r
-        * @param secure\r
-        *            If true, uses https; else http.\r
-        * @param requestPath\r
-        *            full path of the REST endpoint\r
-        * @param headerUebkey\r
-        * @param headerUsername\r
-        * @param headerPassword\r
-        * @param json\r
-        *            Content to post\r
-        * @return JSON result\r
-        * @throws Exception\r
-        */\r
-       public static String postJson(final String hostname, final int port, boolean secure, final String headerUebkey,\r
-                       final String headerUsername, final String headerPassword, final String requestPath, final String json)\r
-                       throws Exception {\r
-\r
-               URIBuilder builder = new URIBuilder();\r
-               if (secure)\r
-                       builder.setScheme("https");\r
-               else\r
-                       builder.setScheme("http");\r
-               builder.setHost(hostname);\r
-               if (port > 0)\r
-                       builder.setPort(port);\r
-               builder.setPath(requestPath);\r
-               final URI uri = builder.build();\r
-\r
-               CloseableHttpClient httpClient;\r
-               if (secure) {\r
-                       // Tell HttpClient to accept any server certificate for HTTPS.\r
-                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error\r
-                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {\r
-                               @Override\r
-                               public boolean isTrusted(final X509Certificate[] chain, final String authType)\r
-                                               throws CertificateException {\r
-                                       return true;\r
-                               }\r
-                       }).build();\r
-                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,\r
-                                       NoopHostnameVerifier.INSTANCE);\r
-                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();\r
-               } else {\r
-                       httpClient = HttpClients.createDefault();\r
-               }\r
-               HttpPost httpPost = new HttpPost(uri);\r
-               httpPost.setHeader("uebkey", headerUebkey);\r
-               httpPost.setHeader("username", headerUsername);\r
-               httpPost.setHeader("password", headerPassword);\r
-\r
-               StringEntity postEntity = new StringEntity(json, ContentType.create("application/json", Consts.UTF_8));\r
-               httpPost.setEntity(postEntity);\r
-\r
-               String responseJson = null;\r
-               CloseableHttpResponse response = null;\r
-               try {\r
-                       logger.debug("POST to " + uri);\r
-                       response = httpClient.execute(httpPost);\r
-                       logger.info("Status is " + response.getStatusLine());\r
-                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)\r
-                               throw new Exception("Status is " + response.getStatusLine().toString());\r
-\r
-                       HttpEntity entity = response.getEntity();\r
-                       if (entity == null) {\r
-                               logger.warn("Entity is null!");\r
-                       } else {\r
-                               long len = entity.getContentLength();\r
-                               if (len < 0)\r
-                                       logger.warn("Content length is -1");\r
-                               if (len < 2048) {\r
-                                       responseJson = EntityUtils.toString(entity);\r
-                                       logger.debug(responseJson);\r
-                               } else {\r
-                                       logger.warn("Not implemented - stream content");\r
-                               }\r
-                               EntityUtils.consume(entity);\r
-                       }\r
-               } finally {\r
-                       if (response != null)\r
-                               response.close();\r
-               }\r
-               return responseJson;\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.net.URI;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+import javax.net.ssl.SSLContext;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+/**
+ * Provides reusable features for test cases to get or post from an REST
+ * endpoint, allowing use of HTTPS connections to servers that use self-signed
+ * certificates.
+ */
+public class SharedContextRestClient {
+
+       private static final Log logger = LogFactory.getLog(SharedContextRestClient.class);
+
+       /**
+        * Convenience method that builds and sends a GET request using properties
+        * to build the URI and populate header with credentials.
+        * 
+        * @param task
+        *            last component(s) of REST endpoint name; e.g., "get".
+        * @param contextId
+        * @param contextKey
+        * @return JSON string fetched
+        * @throws Exception
+        *             if the HTTP response code is anything other than OK.
+        */
+       public static String getJson(final SharedContextTestProperties properties, final String task,
+                       final String contextId, final String contextKey) throws Exception {
+               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //
+                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //
+                               + '/' + task;
+               return getJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //
+                               properties.getProperty(SharedContextTestProperties.PORT, -1), //
+                               properties.getProperty(SharedContextTestProperties.SECURE, true), //
+                               properties.getProperty(SharedContextTestProperties.UEBKEY), //
+                               properties.getProperty(SharedContextTestProperties.USERNAME), //
+                               properties.getProperty(SharedContextTestProperties.PASSWORD), requestPath, //
+                               contextId, //
+                               contextKey);
+       }
+
+       /**
+        * Constructs and sends a GET request using the specified values.
+        * 
+        * @param hostname
+        * @param port
+        *            ignored if negative
+        * @param secure
+        *            If true, uses https; else http.
+        * @param headerUebkey
+        * @param headerUsername
+        * @param headerPassword
+        * @param requestPath
+        *            full path of the REST endpoint
+        * @param contextId
+        * @param contextKey
+        * Ignored if null
+        * @return JSON result
+        */
+       public static String getJson(final String hostname, final int port, boolean secure, final String headerUebkey,
+                       final String headerUsername, final String headerPassword, final String requestPath, final String contextId,
+                       final String contextKey) throws Exception {
+
+               URIBuilder uriBuilder = new URIBuilder();
+               if (secure)
+                       uriBuilder.setScheme("https");
+               else
+                       uriBuilder.setScheme("http");
+               uriBuilder.setHost(hostname);
+               if (port > 0)
+                       uriBuilder.setPort(port);
+               uriBuilder.setPath(requestPath);
+               uriBuilder.addParameter("context_id", contextId);
+               if (contextKey != null)
+                       uriBuilder.addParameter("ckey", contextKey);
+               final URI uri = uriBuilder.build();
+
+               CloseableHttpClient httpClient;
+               if (secure) {
+                       // Tell HttpClient to accept any server certificate for HTTPS.
+                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error
+                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+                               @Override
+                               public boolean isTrusted(final X509Certificate[] chain, final String authType)
+                                               throws CertificateException {
+                                       return true;
+                               }
+                       }).build();
+                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,
+                                       NoopHostnameVerifier.INSTANCE);
+                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();
+               } else {
+                       httpClient = HttpClients.createDefault();
+               }
+
+               HttpGet httpGet = new HttpGet(uri);
+               httpGet.setHeader("uebkey", headerUebkey);
+               httpGet.setHeader("username", headerUsername);
+               httpGet.setHeader("password", headerPassword);
+
+               String json = null;
+               CloseableHttpResponse response = null;
+               try {
+                       logger.debug("GET from " + uri);
+                       response = httpClient.execute(httpGet);
+                       logger.info("Status is " + response.getStatusLine());
+                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)
+                               throw new Exception("Status is " + response.getStatusLine().toString());
+                       HttpEntity entity = response.getEntity();
+                       if (entity == null) {
+                               logger.warn("Entity is null!");
+                       } else {
+                               // entity content length is never set.
+                               // this naively tries to read everything.
+                               json = EntityUtils.toString(entity);
+                               EntityUtils.consume(entity);
+                       }
+               } finally {
+                       if (response != null)
+                               response.close();
+               }
+               return json;
+       }
+
+       /**
+        * Convenience method that builds and sends a POST request using properties
+        * to build the URI and populate header with credentials.
+        * 
+        * @param path
+        *            last component(s) of REST endpoint name; e.g., "users" or
+        *            "user/{userid}/roles".
+        * @return JSON string fetched
+        * @throws Exception
+        *             if the HTTP response code is anything other than OK.
+        */
+       public static String postJson(final SharedContextTestProperties properties, final String path, final String json)
+                       throws Exception {
+               String requestPath = '/' + properties.getProperty(SharedContextTestProperties.APPNAME) //
+                               + '/' + properties.getProperty(SharedContextTestProperties.RESTPATH) //
+                               + '/' + path;
+               return postJson(properties.getProperty(SharedContextTestProperties.HOSTNAME), //
+                               properties.getProperty(SharedContextTestProperties.PORT, -1), //
+                               properties.getProperty(SharedContextTestProperties.SECURE, true), //
+                               properties.getProperty(SharedContextTestProperties.UEBKEY), //
+                               properties.getProperty(SharedContextTestProperties.USERNAME), //
+                               properties.getProperty(SharedContextTestProperties.PASSWORD), //
+                               requestPath, //
+                               json);
+       }
+
+       /**
+        * Constructs and sends a POST request using the specified values.
+        * 
+        * @param hostname
+        * @param port
+        * @param secure
+        *            If true, uses https; else http.
+        * @param requestPath
+        *            full path of the REST endpoint
+        * @param headerUebkey
+        * @param headerUsername
+        * @param headerPassword
+        * @param json
+        *            Content to post
+        * @return JSON result
+        * @throws Exception
+        */
+       public static String postJson(final String hostname, final int port, boolean secure, final String headerUebkey,
+                       final String headerUsername, final String headerPassword, final String requestPath, final String json)
+                       throws Exception {
+
+               URIBuilder builder = new URIBuilder();
+               if (secure)
+                       builder.setScheme("https");
+               else
+                       builder.setScheme("http");
+               builder.setHost(hostname);
+               if (port > 0)
+                       builder.setPort(port);
+               builder.setPath(requestPath);
+               final URI uri = builder.build();
+
+               CloseableHttpClient httpClient;
+               if (secure) {
+                       // Tell HttpClient to accept any server certificate for HTTPS.
+                       // http://stackoverflow.com/questions/24720013/apache-http-client-ssl-certificate-error
+                       SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+                               @Override
+                               public boolean isTrusted(final X509Certificate[] chain, final String authType)
+                                               throws CertificateException {
+                                       return true;
+                               }
+                       }).build();
+                       SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,
+                                       NoopHostnameVerifier.INSTANCE);
+                       httpClient = HttpClientBuilder.create().setSSLSocketFactory(sslsf).build();
+               } else {
+                       httpClient = HttpClients.createDefault();
+               }
+               HttpPost httpPost = new HttpPost(uri);
+               httpPost.setHeader("uebkey", headerUebkey);
+               httpPost.setHeader("username", headerUsername);
+               httpPost.setHeader("password", headerPassword);
+
+               StringEntity postEntity = new StringEntity(json, ContentType.create("application/json", Consts.UTF_8));
+               httpPost.setEntity(postEntity);
+
+               String responseJson = null;
+               CloseableHttpResponse response = null;
+               try {
+                       logger.debug("POST to " + uri);
+                       response = httpClient.execute(httpPost);
+                       logger.info("Status is " + response.getStatusLine());
+                       if (response.getStatusLine().getStatusCode() != HttpServletResponse.SC_OK)
+                               throw new Exception("Status is " + response.getStatusLine().toString());
+
+                       HttpEntity entity = response.getEntity();
+                       if (entity == null) {
+                               logger.warn("Entity is null!");
+                       } else {
+                               long len = entity.getContentLength();
+                               if (len < 0)
+                                       logger.warn("Content length is -1");
+                               if (len < 2048) {
+                                       responseJson = EntityUtils.toString(entity);
+                                       logger.debug(responseJson);
+                               } else {
+                                       logger.warn("Not implemented - stream content");
+                               }
+                               EntityUtils.consume(entity);
+                       }
+               } finally {
+                       if (response != null)
+                               response.close();
+               }
+               return responseJson;
+       }
+
+}
index a7a86e8..5bb7a45 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.util.HashMap;\r
-import java.util.Map;\r
-import java.util.UUID;\r
-\r
-import org.apache.commons.logging.Log;\r
-import org.apache.commons.logging.LogFactory;\r
-import org.junit.Assert;\r
-import com.fasterxml.jackson.databind.ObjectMapper;\r
-\r
-/**\r
- * Tests the endpoints exposed by the Shared Context REST controller in Portal\r
- * Core.\r
- * \r
- * @author clott\r
- */\r
-public class SharedContextRestControllerTest {\r
-\r
-       private final Log logger = LogFactory.getLog(getClass());\r
-\r
-       private final SharedContextTestProperties properties;\r
-\r
-       private final String ckey = "ckey";\r
-       private final String cvalue = "cvalue";\r
-       \r
-       // Supposed to be a Portal session ID\r
-       private final String cxid = UUID.randomUUID().toString();\r
-\r
-       private final String key = "key123";\r
-       private final String value1 = "first value";\r
-       private final String value2 = "second value";\r
-\r
-       public SharedContextRestControllerTest() throws IOException {\r
-               properties = new SharedContextTestProperties();\r
-       }\r
-\r
-       @SuppressWarnings("unchecked")\r
-       //@Test\r
-       public void test() throws Exception {\r
-               String response = null, val = null;\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               Map<String, Object> responseMap, jsonMap;\r
-\r
-               logger.info("Get on empty context");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               // Should not exist - just generated the UUID\r
-               Map<String, Object> responseMap1 = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap1.get("response");\r
-               Assert.assertNull(response);\r
-\r
-               logger.info("Set a new context");\r
-               response = setContext(cxid, key, value1);\r
-               Assert.assertNotNull(response);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               String responseValue = (String) responseMap.get("response");\r
-               Assert.assertNotNull(responseValue);\r
-               Assert.assertEquals("added", responseValue);\r
-\r
-               logger.info("Get existing context");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               jsonMap = (Map<String,Object>) responseMap.get("response");\r
-               Assert.assertNotNull(jsonMap);\r
-               val = (String) jsonMap.get(cvalue);\r
-               Assert.assertEquals(val, value1);\r
-\r
-               logger.info("Overwrite exiting context");\r
-               response = setContext(cxid, key, value2);\r
-               Assert.assertNotNull(response);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap.get("response");\r
-               Assert.assertNotNull(responseValue);\r
-               // Assert.assertEquals("replaced", responseValue);\r
-\r
-               logger.info("Get existing context to verify overwrite");\r
-               response = SharedContextRestClient.getJson(properties, "get", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               jsonMap = (Map<String,Object>) responseMap.get("response");\r
-               Assert.assertNotNull(jsonMap);\r
-               val = (String) jsonMap.get(cvalue);\r
-               Assert.assertEquals(val, value2);\r
-\r
-               logger.info("Delete one context");\r
-               response = SharedContextRestClient.getJson(properties, "remove", cxid, key);\r
-               responseMap = mapper.readValue(response, Map.class);\r
-               response = (String) responseMap.get("response");\r
-               Assert.assertEquals(response, "removed");\r
-\r
-               logger.info("Clear the context");\r
-               response = SharedContextRestClient.getJson(properties, "clear", cxid, null);\r
-               Assert.assertEquals("", response);\r
-       }\r
-\r
-       private String setContext(String context, String id, String value) throws Exception {\r
-               ObjectMapper mapper = new ObjectMapper();\r
-               HashMap<String,String> stringMap = new HashMap<String,String>();\r
-               stringMap.put("context_id", cxid);\r
-               stringMap.put(ckey, key);\r
-               stringMap.put(cvalue, value2);\r
-               String json = mapper.writeValueAsString(stringMap);\r
-               String response = SharedContextRestClient.postJson(properties, "set", json);\r
-               return response;\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Assert;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * Tests the endpoints exposed by the Shared Context REST controller in Portal
+ * Core.
+ * 
+ * @author clott
+ */
+public class SharedContextRestControllerTest {
+
+       private final Log logger = LogFactory.getLog(getClass());
+
+       private final SharedContextTestProperties properties;
+
+       private final String ckey = "ckey";
+       private final String cvalue = "cvalue";
+       
+       // Supposed to be a Portal session ID
+       private final String cxid = UUID.randomUUID().toString();
+
+       private final String key = "key123";
+       private final String value1 = "first value";
+       private final String value2 = "second value";
+
+       public SharedContextRestControllerTest() throws IOException {
+               properties = new SharedContextTestProperties();
+       }
+
+       @SuppressWarnings("unchecked")
+       //@Test
+       public void test() throws Exception {
+               String response = null, val = null;
+               ObjectMapper mapper = new ObjectMapper();
+               Map<String, Object> responseMap, jsonMap;
+
+               logger.info("Get on empty context");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               // Should not exist - just generated the UUID
+               Map<String, Object> responseMap1 = mapper.readValue(response, Map.class);
+               response = (String) responseMap1.get("response");
+               Assert.assertNull(response);
+
+               logger.info("Set a new context");
+               response = setContext(cxid, key, value1);
+               Assert.assertNotNull(response);
+               responseMap = mapper.readValue(response, Map.class);
+               String responseValue = (String) responseMap.get("response");
+               Assert.assertNotNull(responseValue);
+               Assert.assertEquals("added", responseValue);
+
+               logger.info("Get existing context");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               jsonMap = (Map<String,Object>) responseMap.get("response");
+               Assert.assertNotNull(jsonMap);
+               val = (String) jsonMap.get(cvalue);
+               Assert.assertEquals(val, value1);
+
+               logger.info("Overwrite exiting context");
+               response = setContext(cxid, key, value2);
+               Assert.assertNotNull(response);
+               responseMap = mapper.readValue(response, Map.class);
+               response = (String) responseMap.get("response");
+               Assert.assertNotNull(responseValue);
+               // Assert.assertEquals("replaced", responseValue);
+
+               logger.info("Get existing context to verify overwrite");
+               response = SharedContextRestClient.getJson(properties, "get", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               jsonMap = (Map<String,Object>) responseMap.get("response");
+               Assert.assertNotNull(jsonMap);
+               val = (String) jsonMap.get(cvalue);
+               Assert.assertEquals(val, value2);
+
+               logger.info("Delete one context");
+               response = SharedContextRestClient.getJson(properties, "remove", cxid, key);
+               responseMap = mapper.readValue(response, Map.class);
+               response = (String) responseMap.get("response");
+               Assert.assertEquals(response, "removed");
+
+               logger.info("Clear the context");
+               response = SharedContextRestClient.getJson(properties, "clear", cxid, null);
+               Assert.assertEquals("", response);
+       }
+
+       private String setContext(String context, String id, String value) throws Exception {
+               ObjectMapper mapper = new ObjectMapper();
+               HashMap<String,String> stringMap = new HashMap<String,String>();
+               stringMap.put("context_id", cxid);
+               stringMap.put(ckey, key);
+               stringMap.put(cvalue, value2);
+               String json = mapper.writeValueAsString(stringMap);
+               String response = SharedContextRestClient.postJson(properties, "set", json);
+               return response;
+       }
+}
index baed554..9344150 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.controller;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.Properties;\r
-\r
-/**\r
- * Trivial extension of Properties that populates itself from a known source.\r
- */\r
-public class SharedContextTestProperties extends Properties {\r
-\r
-       private static final long serialVersionUID = -4064100267979036550L;\r
-\r
-       // property names\r
-       public static final String HOSTNAME = "hostname";\r
-       public static final String PORT = "port";\r
-       public static final String SECURE = "secure";\r
-       public static final String APPNAME = "appname";\r
-       public static final String RESTPATH = "restpath";\r
-       public static final String UEBKEY = "uebkey";\r
-       public static final String USERNAME = "username";\r
-       public static final String PASSWORD = "password";\r
-\r
-       /**\r
-        * Expected on the classpath\r
-        */\r
-       private static final String propertiesFileName = "shared-context-test.properties";\r
-\r
-       /**\r
-        * Constructor populates itself from properties file found in same package.\r
-        * \r
-        * @throws Exception\r
-        */\r
-       public SharedContextTestProperties() throws IOException {\r
-               InputStream inStream = getClass().getResourceAsStream(propertiesFileName);\r
-               if (inStream == null)\r
-                       throw new IOException("Failed to find file on classpath: " + propertiesFileName);\r
-               super.load(inStream);\r
-               inStream.close();\r
-       }\r
-\r
-       public int getProperty(final String name, final int defVal) throws NumberFormatException {\r
-               String prop = getProperty(name);\r
-               if (prop == null)\r
-                       return defVal;\r
-               return Integer.parseInt(prop);\r
-       }\r
-       \r
-       public boolean getProperty(final String name, final boolean defVal) {\r
-               String prop = getProperty(name);\r
-               if (prop == null)\r
-                       return false;\r
-               return Boolean.parseBoolean(prop);\r
-       }\r
-       \r
-       // Test this class\r
-       public static void main(String[] args) throws Exception {\r
-               SharedContextTestProperties p = new SharedContextTestProperties();\r
-               System.out.println("Property " + SharedContextTestProperties.HOSTNAME + " = "\r
-                               + p.getProperty(SharedContextTestProperties.HOSTNAME));\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+/**
+ * Trivial extension of Properties that populates itself from a known source.
+ */
+public class SharedContextTestProperties extends Properties {
+
+       private static final long serialVersionUID = -4064100267979036550L;
+
+       // property names
+       public static final String HOSTNAME = "hostname";
+       public static final String PORT = "port";
+       public static final String SECURE = "secure";
+       public static final String APPNAME = "appname";
+       public static final String RESTPATH = "restpath";
+       public static final String UEBKEY = "uebkey";
+       public static final String USERNAME = "username";
+       public static final String PASSWORD = "password";
+
+       /**
+        * Expected on the classpath
+        */
+       private static final String propertiesFileName = "shared-context-test.properties";
+
+       /**
+        * Constructor populates itself from properties file found in same package.
+        * 
+        * @throws Exception
+        */
+       public SharedContextTestProperties() throws IOException {
+               InputStream inStream = getClass().getResourceAsStream(propertiesFileName);
+               if (inStream == null)
+                       throw new IOException("Failed to find file on classpath: " + propertiesFileName);
+               super.load(inStream);
+               inStream.close();
+       }
+
+       public int getProperty(final String name, final int defVal) throws NumberFormatException {
+               String prop = getProperty(name);
+               if (prop == null)
+                       return defVal;
+               return Integer.parseInt(prop);
+       }
+       
+       public boolean getProperty(final String name, final boolean defVal) {
+               String prop = getProperty(name);
+               if (prop == null)
+                       return false;
+               return Boolean.parseBoolean(prop);
+       }
+       
+       // Test this class
+       public static void main(String[] args) throws Exception {
+               SharedContextTestProperties p = new SharedContextTestProperties();
+               System.out.println("Property " + SharedContextTestProperties.HOSTNAME + " = "
+                               + p.getProperty(SharedContextTestProperties.HOSTNAME));
+       }
+}
index 3e44a78..934779d 100644 (file)
@@ -1,28 +1,28 @@
-###\r
-# ================================================================================\r
-# ECOMP Portal\r
-# ================================================================================\r
-# Copyright (C) 2017 AT&T Intellectual Property\r
-# ================================================================================\r
-# Licensed under the Apache License, Version 2.0 (the "License");\r
-# you may not use this file except in compliance with the License.\r
-# You may obtain a copy of the License at\r
-# \r
-#      http://www.apache.org/licenses/LICENSE-2.0\r
-# \r
-# Unless required by applicable law or agreed to in writing, software\r
-# distributed under the License is distributed on an "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-# See the License for the specific language governing permissions and\r
-# limitations under the License.\r
-# ================================================================================\r
-###\r
-\r
-hostname= localhost\r
-# port = 80\r
-secure = true\r
-appname = ecompportal\r
-restpath = context\r
-uebkey = xgnLrmNmkfCRnIwa\r
-username = Default\r
-password = AppPassword!1\r
+###
+# ================================================================================
+# ECOMP Portal
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ================================================================================
+###
+
+hostname= localhost
+# port = 80
+secure = true
+appname = ecompportal
+restpath = context
+uebkey = xgnLrmNmkfCRnIwa
+username = Default
+password = AppPassword!1
index 6d01f2c..f87f5bd 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.listener;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import org.junit.Test;\r
-\r
-public class HealthMonitorTest {\r
-\r
-       @Test\r
-       public void initialFlagsTest() {\r
-               assertEquals(false, HealthMonitor.isBackEndUp());\r
-               assertEquals(false, HealthMonitor.isFrontEndUp());\r
-               assertEquals(false, HealthMonitor.isDatabaseUp());\r
-               assertEquals(false, HealthMonitor.isUebUp());\r
-       }\r
-       \r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.listener;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class HealthMonitorTest {
+
+       @Test
+       public void initialFlagsTest() {
+               assertEquals(false, HealthMonitor.isBackEndUp());
+               assertEquals(false, HealthMonitor.isFrontEndUp());
+               assertEquals(false, HealthMonitor.isDatabaseUp());
+               assertEquals(false, HealthMonitor.isUebUp());
+       }
+       
+}
index 4df4f76..b1dd853 100644 (file)
@@ -1,33 +1,33 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-package org.openecomp.portalapp.portal.utils;\r
-\r
-import static org.junit.Assert.assertEquals;\r
-\r
-import org.junit.Test;\r
-\r
-public class EcompPortalUtilsTest {\r
-\r
-       \r
-       @Test\r
-       public void legitimateUserIdFailureTest() {\r
-               assertEquals(false, EcompPortalUtils.legitimateUserId("1#@23456"));\r
-       }\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class EcompPortalUtilsTest {
+
+       
+       @Test
+       public void legitimateUserIdFailureTest() {
+               assertEquals(false, EcompPortalUtils.legitimateUserId("1#@23456"));
+       }
+}
diff --git a/ecomp-portal-FE-common/.gitignore b/ecomp-portal-FE-common/.gitignore
new file mode 100644 (file)
index 0000000..a82f945
--- /dev/null
@@ -0,0 +1,3 @@
+.classpath
+.project
+/target/
index 81d9836..c4ac1e8 100644 (file)
@@ -3,15 +3,10 @@
 ## Overview
 
 This project contains the ECOMP Portal Front End common files: CSS, JavaScript, 
-HTML and other static files that are used in the AT&T internal version and the
-open-source versions of the ECOMP Portal web application.  Those specific versions
-are built using separate Maven projects that copy in ("overlay") the contents of
-this project at package time.
-
-## Release Notes
-
-Release notes for all ECOMP Portal *COMMON* files, including front-end files,
-are tracked in file ecomp-portal-BE-common/README.md
+HTML and other static files that are used in the internal and ONAP versions of
+of the ECOMP Portal web application.  Those specific versions are built using
+separate Maven projects that copy in ("overlay") the contents of this project
+at package time.
 
 ## Static files
 
index 7284e4d..b60ffb2 100644 (file)
@@ -1,68 +1,68 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-(function () {\r
-       /*\r
-        * Custom version of b2b-left-navigation directive:\r
-        * 1. Make parent menu a link if no child menus.\r
-        * 2. Add unique IDs to all items.\r
-        * 3. Hide icon if no child menus.\r
-        * 4. Add arrow toggle button.\r
-        * 5. Adjust the page on collapse/expand.\r
-        */\r
-    class B2BLeftMenu {\r
-        constructor($rootScope) {\r
-            this.templateUrl = 'app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html';\r
-            this.restrict = 'EA';\r
-            this.$rootScope = $rootScope;\r
-            this.link = this._link.bind(this);\r
-            this.scope = {\r
-               menuData: '='\r
-            }\r
-        }\r
-        _link(scope) {\r
-               scope.idx = -1;\r
-            scope.itemIdx = -1;\r
-            scope.navIdx = -1;\r
-            scope.toggleNav = function (val,link) {\r
-                if (val === scope.idx) {\r
-                    scope.idx = -1;\r
-                    return;\r
-                }\r
-                scope.idx = val;\r
-            };\r
-            /*New function for ECOMP sdk*/\r
-            scope.toggleDrawer = function(showmenu){\r
-               scope.idx=-1; /*hide the sunmenus*/\r
-               if(showmenu){\r
-                               document.getElementById('page-content').style.paddingLeft = "50px";\r
-                       }\r
-                       else\r
-                               document.getElementById('page-content').style.paddingLeft = "230px";            \r
-            };\r
-            scope.liveLink = function (evt, val1, val2) {\r
-                scope.itemIdx = val1;\r
-                scope.navIdx = val2;\r
-                evt.stopPropagation();\r
-            };\r
-        }\r
-    }\r
-    angular.module('ecompApp').directive('leftMenuEcomp', ($rootScope) => new B2BLeftMenu($rootScope));\r
-})();\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+(function () {
+       /*
+        * Custom version of b2b-left-navigation directive:
+        * 1. Make parent menu a link if no child menus.
+        * 2. Add unique IDs to all items.
+        * 3. Hide icon if no child menus.
+        * 4. Add arrow toggle button.
+        * 5. Adjust the page on collapse/expand.
+        */
+    class B2BLeftMenu {
+        constructor($rootScope) {
+            this.templateUrl = 'app/directives/b2b-leftnav-ext/b2b-leftnav-ext.tpl.html';
+            this.restrict = 'EA';
+            this.$rootScope = $rootScope;
+            this.link = this._link.bind(this);
+            this.scope = {
+               menuData: '='
+            }
+        }
+        _link(scope) {
+               scope.idx = -1;
+            scope.itemIdx = -1;
+            scope.navIdx = -1;
+            scope.toggleNav = function (val,link) {
+                if (val === scope.idx) {
+                    scope.idx = -1;
+                    return;
+                }
+                scope.idx = val;
+            };
+            /*New function for ECOMP sdk*/
+            scope.toggleDrawer = function(showmenu){
+               scope.idx=-1; /*hide the sunmenus*/
+               if(showmenu){
+                               document.getElementById('page-content').style.paddingLeft = "50px";
+                       }
+                       else
+                               document.getElementById('page-content').style.paddingLeft = "230px";            
+            };
+            scope.liveLink = function (evt, val1, val2) {
+                scope.itemIdx = val1;
+                scope.navIdx = val2;
+                evt.stopPropagation();
+            };
+        }
+    }
+    angular.module('ecompApp').directive('leftMenuEcomp', ($rootScope) => new B2BLeftMenu($rootScope));
+})();
+
index 91a10aa..c6e2d6d 100644 (file)
@@ -1,4 +1,4 @@
-.b2b-nav-menu .b2b-subnav-container li{\r
-       background-color:white;\r
-       z-index:10;\r
+.b2b-nav-menu .b2b-subnav-container li{
+       background-color:white;
+       z-index:10;
 }
\ No newline at end of file
index 240c8c9..9fa796c 100644 (file)
@@ -1,62 +1,62 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="b2b-nav-menu" id="left-menu-main-div" ng-init="(showmenu = true)" ng-class="{false: 'left-menu-collapsed'}[showmenu]">\r
-       <div class="b2b-subnav-container" id="left-menu-subnav-container">\r
-               <ul class="b2b-subnav-content" id="left-menu-subnav-content">\r
-                       <li id="left-menu-subnav-content-li">\r
-                               <div ng-class="{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]"     id="left-menu-arrow-toggle-div">\r
-                                       <a ng-click="toggleDrawer(showmenu);(showmenu = !showmenu) " class="text-right" id="left-menu-arrow-toggle-anchor"> \r
-                                               <i ng-class="{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]" id="left-menuf-arrow-toggle-icon">&nbsp;</i>\r
-                                       </a>\r
-                               </div>\r
-                       </li>\r
-                       <li ng-repeat="menu in menuData" ui-sref="{{menu.state}}" id="left-menu-li-{{menu.name.split(' ').join('-')}}">\r
-                               <span ng-class="{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]"     \r
-                                       id="left-menu-span-{{menu.name.split(' ').join('-')}}"> \r
-                                       <span class="{{menu.imageSrc}}" id="icon-image-{{menu.name.split(' ').join('-')}}"></span>\r
-                               </span> \r
-                               <a ng-class="{expand: isOpen($index)}" ng-if="showmenu" title="{{menu.name}}"\r
-                                       aria-label="{{menu.name}}" aria-expanded="{{(idx==$index)?true:false;}}"\r
-                                       href="javascript:void(0);" id="parent-item-{{menu.name.split(' ').join('-')}}">\r
-                                       {{menu.name}} \r
-                                       <i aria-hidden="true" ng-if="(menu.menuItems.length > 0)"\r
-                                               class="b2b-icon-primary-plus-minus"\r
-                                               ng-class="idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'"></i>\r
-                               </a>\r
-                               <div role="region" aria-hidden="{{(isOpen($index))?false:true;}}" \r
-                                       id="left-menu-child-div-{{menu.name.split(' ').join('-')}}">\r
-                                       <ul ng-class="{expand: idx==$index}"\r
-                                               id="left-menu-child-ul-{{menu.name.split(' ').join('-')}}">\r
-                                               <li ng-repeat="menuItem in menu.menuItems"\r
-                                                       ng-click="liveLink($event, $index, $parent.$index)"\r
-                                                       id="left-menu-child-li-{{menuItem.name.split(' ').join('-')}}-{{menu.name.split(' ').join('-')}}">\r
-                                                       <a ng-class="{active: itemIdx==$index && navIdx==$parent.$index}"\r
-                                                               aria-hidden="{{!(idx==$parent.$index)}}" aria-label="{{menuItem.name}}" \r
-                                                               title="{{menuItem.name}}" href="{{menuItem.href}}"\r
-                                                               tabindex="{{(idx==$parent.$index)?0:-1;}}"\r
-                                                               id="child-item-{{menuItem.name.split(' ').join('-')}}">{{menuItem.name}}\r
-                                                       </a>\r
-                                               </li>\r
-                                       </ul>\r
-                               </div>\r
-                       </li>\r
-               </ul>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="b2b-nav-menu" id="left-menu-main-div" ng-init="(showmenu = true)" ng-class="{false: 'left-menu-collapsed'}[showmenu]">
+       <div class="b2b-subnav-container" id="left-menu-subnav-container">
+               <ul class="b2b-subnav-content" id="left-menu-subnav-content">
+                       <li id="left-menu-subnav-content-li">
+                               <div ng-class="{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]"     id="left-menu-arrow-toggle-div">
+                                       <a ng-click="toggleDrawer(showmenu);(showmenu = !showmenu) " class="text-right" id="left-menu-arrow-toggle-anchor"> 
+                                               <i ng-class="{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]" id="left-menuf-arrow-toggle-icon">&nbsp;</i>
+                                       </a>
+                               </div>
+                       </li>
+                       <li ng-repeat="menu in menuData" ui-sref="{{menu.state}}" id="left-menu-li-{{menu.name.split(' ').join('-')}}">
+                               <span ng-class="{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]"     
+                                       id="left-menu-span-{{menu.name.split(' ').join('-')}}"> 
+                                       <span class="{{menu.imageSrc}}" id="icon-image-{{menu.name.split(' ').join('-')}}"></span>
+                               </span> 
+                               <a ng-class="{expand: isOpen($index)}" ng-if="showmenu" title="{{menu.name}}"
+                                       aria-label="{{menu.name}}" aria-expanded="{{(idx==$index)?true:false;}}"
+                                       href="javascript:void(0);" id="parent-item-{{menu.name.split(' ').join('-')}}">
+                                       {{menu.name}} 
+                                       <i aria-hidden="true" ng-if="(menu.menuItems.length > 0)"
+                                               class="b2b-icon-primary-plus-minus"
+                                               ng-class="idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'"></i>
+                               </a>
+                               <div role="region" aria-hidden="{{(isOpen($index))?false:true;}}" 
+                                       id="left-menu-child-div-{{menu.name.split(' ').join('-')}}">
+                                       <ul ng-class="{expand: idx==$index}"
+                                               id="left-menu-child-ul-{{menu.name.split(' ').join('-')}}">
+                                               <li ng-repeat="menuItem in menu.menuItems"
+                                                       ng-click="liveLink($event, $index, $parent.$index)"
+                                                       id="left-menu-child-li-{{menuItem.name.split(' ').join('-')}}-{{menu.name.split(' ').join('-')}}">
+                                                       <a ng-class="{active: itemIdx==$index && navIdx==$parent.$index}"
+                                                               aria-hidden="{{!(idx==$parent.$index)}}" aria-label="{{menuItem.name}}" 
+                                                               title="{{menuItem.name}}" href="{{menuItem.href}}"
+                                                               tabindex="{{(idx==$parent.$index)?0:-1;}}"
+                                                               id="child-item-{{menuItem.name.split(' ').join('-')}}">{{menuItem.name}}
+                                                       </a>
+                                               </li>
+                                       </ul>
+                               </div>
+                       </li>
+               </ul>
+       </div>
+</div>
index bfedcd7..bab1fce 100644 (file)
@@ -1,39 +1,39 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by Rui Lu on 12/12/16.\r
- */\r
-'use strict';\r
-\r
-angular.module('ecompApp').directive('fileModel', [ '$parse', function($parse) {\r
-       return {\r
-               restrict : 'A',\r
-               link : function(scope, element, attrs) {\r
-                       var model = $parse(attrs.fileModel);\r
-                       var modelSetter = model.assign;\r
-\r
-                       element.bind('change', function() {\r
-                               scope.$apply(function() {\r
-                                       modelSetter(scope, element[0].files[0]);\r
-                               });\r
-                       });\r
-               }\r
-       };\r
-} ]);\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by Rui Lu on 12/12/16.
+ */
+'use strict';
+
+angular.module('ecompApp').directive('fileModel', [ '$parse', function($parse) {
+       return {
+               restrict : 'A',
+               link : function(scope, element, attrs) {
+                       var model = $parse(attrs.fileModel);
+                       var modelSetter = model.assign;
+
+                       element.bind('change', function() {
+                               scope.$apply(function() {
+                                       modelSetter(scope, element[0].files[0]);
+                               });
+                       });
+               }
+       };
+} ]);
index 98979e2..e481f4b 100644 (file)
@@ -1,90 +1,90 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 1/28/16.\r
- */\r
-(function () {\r
-    class LeftMenu {\r
-        constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {\r
-            this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';\r
-            this.restrict = 'AE';\r
-            this.$rootScope = $rootScope;\r
-            this.userbarUpdateService = userbarUpdateService;\r
-            this.notificationService = notificationService;\r
-            this.auditLogService= auditLogService;\r
-            this.link = this._link.bind(this);\r
-            this.scope = {\r
-                sidebarModel: '='\r
-            }\r
-        }\r
-        _link(scope) {\r
-            let init = () => {\r
-                scope.isOpen = true;\r
-            };\r
-\r
-            init();\r
-\r
-            scope.refreshOnlineUsers = () => {\r
-               this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);\r
-            };\r
-            \r
-            scope.refreshNotification = () => {\r
-               this.notificationService.setRefreshCount(this.notificationService.maxCount);\r
-            };\r
-\r
-            scope.toggleSidebar = () => {\r
-                scope.isOpen = !scope.isOpen;\r
-                if(scope.isOpen==true)\r
-                       setContentPos(1);\r
-                else\r
-                       setContentPos(0);\r
-            };\r
-            scope.auditLog =(name) => {         \r
-                       this.auditLogService.storeAudit(1,'leftMenu',name);\r
-               };\r
-\r
-\r
-            scope.isBrowserInternetExplorer = false;\r
-            scope.browserName = bowser.name;\r
-\r
-            if (bowser.msie || bowser.msedge) {\r
-                scope.isBrowserInternetExplorer = true;\r
-            } else {\r
-                scope.isBrowserInternetExplorer = false;\r
-            }\r
-\r
-\r
-            this.$rootScope.$on('$stateChangeStart', () => {\r
-                scope.isOpen = true;\r
-            });\r
-        }\r
-    }\r
-    angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));\r
-})();\r
-\r
-function setContentPos(open) {\r
-       // console.log("*******************************************");\r
-       if(open==1){\r
-               $("#page-content" ).css( "padding-left", "210px" );\r
-       }else{\r
-               $("#page-content" ).css( "padding-left", "50px" );\r
-       }\r
-\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 1/28/16.
+ */
+(function () {
+    class LeftMenu {
+        constructor($rootScope, userbarUpdateService,notificationService,auditLogService) {
+            this.templateUrl = 'app/directives/left-menu/left-menu.tpl.html';
+            this.restrict = 'AE';
+            this.$rootScope = $rootScope;
+            this.userbarUpdateService = userbarUpdateService;
+            this.notificationService = notificationService;
+            this.auditLogService= auditLogService;
+            this.link = this._link.bind(this);
+            this.scope = {
+                sidebarModel: '='
+            }
+        }
+        _link(scope) {
+            let init = () => {
+                scope.isOpen = true;
+            };
+
+            init();
+
+            scope.refreshOnlineUsers = () => {
+               this.userbarUpdateService.setRefreshCount(this.userbarUpdateService.maxCount);
+            };
+            
+            scope.refreshNotification = () => {
+               this.notificationService.setRefreshCount(this.notificationService.maxCount);
+            };
+
+            scope.toggleSidebar = () => {
+                scope.isOpen = !scope.isOpen;
+                if(scope.isOpen==true)
+                       setContentPos(1);
+                else
+                       setContentPos(0);
+            };
+            scope.auditLog =(name) => {         
+                       this.auditLogService.storeAudit(1,'leftMenu',name);
+               };
+
+
+            scope.isBrowserInternetExplorer = false;
+            scope.browserName = bowser.name;
+
+            if (bowser.msie || bowser.msedge) {
+                scope.isBrowserInternetExplorer = true;
+            } else {
+                scope.isBrowserInternetExplorer = false;
+            }
+
+
+            this.$rootScope.$on('$stateChangeStart', () => {
+                scope.isOpen = true;
+            });
+        }
+    }
+    angular.module('ecompApp').directive('leftMenu', ($rootScope,userbarUpdateService,notificationService,auditLogService) => new LeftMenu($rootScope,userbarUpdateService,notificationService,auditLogService));
+})();
+
+function setContentPos(open) {
+       // console.log("*******************************************");
+       if(open==1){
+               $("#page-content" ).css( "padding-left", "210px" );
+       }else{
+               $("#page-content" ).css( "padding-left", "50px" );
+       }
+
+}
index 4478bc8..f43f75a 100644 (file)
@@ -1,22 +1,22 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
- <div class="left-menu-div">\r
-       <left-menu-ecomp menu-data="sidebarModel.navItems"></left-menu-ecomp>\r
- </div> \r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+ <div class="left-menu-div">
+       <left-menu-ecomp menu-data="sidebarModel.navItems"></left-menu-ecomp>
+ </div> 
index fb56d43..f73793b 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/21/15.+\r
- */\r
-angular.module('ecompApp')\r
-    .directive('multipleSelect', function ($window) {\r
-        return {\r
-            restrict: 'E',\r
-            templateUrl: 'app/directives/multiple-select/multiple-select.tpl.html',\r
-            scope: {\r
-                onChange: '&',\r
-                nameAttr: '@',\r
-                valueAttr: '@',\r
-                ngModel: '=',\r
-                placeholder: '@',\r
-                uniqueData: '@?',\r
-                onDropdownClose: '&?'\r
-            },\r
-            link: function(scope, elm, attrs){\r
-                scope.isExpanded = false;\r
-\r
-                scope.isDisabled = !scope.ngModel || !scope.ngModel.length;\r
-                scope.$watch('ngModel', function(newVal){\r
-                    scope.isDisabled = !newVal || !newVal.length;\r
-                });\r
-\r
-\r
-                let startListening = () => {\r
-                    console.log('listening on $window!');\r
-                    angular.element($window).on('click', function () {\r
-                        stopListening();\r
-                    });\r
-\r
-                    angular.element('multiple-select').on('click', function(e) {\r
-                        if($(e.target).closest('multiple-select')[0].attributes['unique-data'].value === attrs.uniqueData){\r
-                            console.log('ignored that..:', attrs.uniqueData);\r
-                            e.stopPropagation();\r
-                        }else{\r
-                            console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);\r
-                            scope.isExpanded = false;\r
-                            scope.$applyAsync();\r
-                        }\r
-                    });\r
-                };\r
-\r
-                let stopListening = function() {\r
-                    if(scope.onDropdownClose){\r
-                        scope.onDropdownClose();\r
-                    }\r
-                    scope.isExpanded = false;\r
-                    scope.$applyAsync();\r
-                    console.log('stop listening on $window and multiple-element!');\r
-                    angular.element($window).off('click');\r
-                    angular.element('multiple-select').off('click');\r
-                };\r
-\r
-                scope.showCheckboxes = function(){\r
-                    scope.isExpanded = !scope.isExpanded;\r
-                    if(scope.isExpanded){\r
-                        startListening();\r
-                    }else{\r
-                        stopListening();\r
-                        if(scope.onDropdownClose){\r
-                            scope.onDropdownClose();\r
-                        }\r
-                    }\r
-                };\r
-\r
-                scope.onCheckboxClicked = function() {\r
-                    console.log('checkbox clicked; unique data: ',attrs.uniqueData);\r
-                    if(scope.onChange) {\r
-                        scope.onChange();\r
-                    }\r
-                }\r
-\r
-                scope.getTitle = function(){\r
-                    var disp = '';\r
-                    if(!scope.ngModel || !scope.ngModel.length) {\r
-                        return disp;\r
-                    }\r
-                    scope.ngModel.forEach(function(item){\r
-                        if(item[scope.valueAttr]){\r
-                            disp+=item[scope.nameAttr] + ',';\r
-                        }\r
-                    });\r
-                    if(disp!==''){\r
-                        disp = disp.slice(0,disp.length-1);\r
-                    }else{\r
-                        disp = scope.placeholder;\r
-                    }\r
-                    return disp;\r
-                };\r
-            }\r
-        };\r
-    });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/21/15.+
+ */
+angular.module('ecompApp')
+    .directive('multipleSelect', function ($window) {
+        return {
+            restrict: 'E',
+            templateUrl: 'app/directives/multiple-select/multiple-select.tpl.html',
+            scope: {
+                onChange: '&',
+                nameAttr: '@',
+                valueAttr: '@',
+                ngModel: '=',
+                placeholder: '@',
+                uniqueData: '@?',
+                onDropdownClose: '&?'
+            },
+            link: function(scope, elm, attrs){
+                scope.isExpanded = false;
+
+                scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
+                scope.$watch('ngModel', function(newVal){
+                    scope.isDisabled = !newVal || !newVal.length;
+                });
+
+
+                let startListening = () => {
+                    console.log('listening on $window!');
+                    angular.element($window).on('click', function () {
+                        stopListening();
+                    });
+
+                    angular.element('multiple-select').on('click', function(e) {
+                        if($(e.target).closest('multiple-select')[0].attributes['unique-data'].value === attrs.uniqueData){
+                            console.log('ignored that..:', attrs.uniqueData);
+                            e.stopPropagation();
+                        }else{
+                            console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
+                            scope.isExpanded = false;
+                            scope.$applyAsync();
+                        }
+                    });
+                };
+
+                let stopListening = function() {
+                    if(scope.onDropdownClose){
+                        scope.onDropdownClose();
+                    }
+                    scope.isExpanded = false;
+                    scope.$applyAsync();
+                    console.log('stop listening on $window and multiple-element!');
+                    angular.element($window).off('click');
+                    angular.element('multiple-select').off('click');
+                };
+
+                scope.showCheckboxes = function(){
+                    scope.isExpanded = !scope.isExpanded;
+                    if(scope.isExpanded){
+                        startListening();
+                    }else{
+                        stopListening();
+                        if(scope.onDropdownClose){
+                            scope.onDropdownClose();
+                        }
+                    }
+                };
+
+                scope.onCheckboxClicked = function() {
+                    console.log('checkbox clicked; unique data: ',attrs.uniqueData);
+                    if(scope.onChange) {
+                        scope.onChange();
+                    }
+                }
+
+                scope.getTitle = function(){
+                    var disp = '';
+                    if(!scope.ngModel || !scope.ngModel.length) {
+                        return disp;
+                    }
+                    scope.ngModel.forEach(function(item){
+                        if(item[scope.valueAttr]){
+                            disp+=item[scope.nameAttr] + ',';
+                        }
+                    });
+                    if(disp!==''){
+                        disp = disp.slice(0,disp.length-1);
+                    }else{
+                        disp = scope.placeholder;
+                    }
+                    return disp;
+                };
+            }
+        };
+    });
index 3896bf2..73136fe 100644 (file)
@@ -1,36 +1,36 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div id="app-multilple-select" class="multiple-select">\r
-    <div class="selectBox"\r
-        id="app-select-{{getTitle()}}"\r
-         ng-click="isDisabled || showCheckboxes()"\r
-         title="{{getTitle()}}"\r
-         ng-bind="getTitle()"\r
-         ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>\r
-\r
-    <div class="checkboxes" ng-show="isExpanded">\r
-        <div ng-repeat="item in ngModel" id="{{item[nameAttr]}}-checkbox-div">\r
-            <label id="{{item[nameAttr]}}-checkbox-label">\r
-                <input type="checkbox" id="{{item[nameAttr]}}-checkbox" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">\r
-                {{item[nameAttr]}}\r
-            </label>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div id="app-multilple-select" class="multiple-select">
+    <div class="selectBox"
+        id="app-select-{{getTitle()}}"
+         ng-click="isDisabled || showCheckboxes()"
+         title="{{getTitle()}}"
+         ng-bind="getTitle()"
+         ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
+
+    <div class="checkboxes" ng-show="isExpanded">
+        <div ng-repeat="item in ngModel" id="{{item[nameAttr].split(' ').join('-')}}-checkbox-div">
+            <label id="{{item[nameAttr].split(' ').join('-')}}-checkbox-label">
+                <input type="checkbox" id="{{item[nameAttr].split(' ').join('-')}}-checkbox" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
+                {{item[nameAttr]}}
+            </label>
+        </div>
+    </div>
+</div>
index e047163..f49848c 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/21/15.+\r
- */\r
-angular.module('ecompApp')\r
-    .directive('multipleSelect2', function ($window) {\r
-        return {\r
-            restrict: 'E',\r
-            templateUrl: 'app/directives/multiple-select/multiple-select2.tpl.html',\r
-            scope: {\r
-                onChange: '&',\r
-                nameAttr: '@',\r
-                valueAttr: '@',\r
-                ngModel: '=',\r
-                placeholder: '@',\r
-                uniqueData: '@?',\r
-                onDropdownClose: '&?'\r
-            },\r
-            link: function(scope, elm, attrs){\r
-                scope.isExpanded = false;\r
-\r
-                scope.isDisabled = !scope.ngModel || !scope.ngModel.length;\r
-                scope.$watch('ngModel', function(newVal){\r
-                    scope.isDisabled = !newVal || !newVal.length;\r
-                });\r
-\r
-\r
-                let startListening = () => {\r
-                    console.log('listening on $window!');\r
-                    angular.element($window).on('click', function () {\r
-                        stopListening();\r
-                    });\r
-\r
-                    angular.element('multiple-select2').on('click', function(e) {\r
-                        if($(e.target).closest('multiple-select2')[0].attributes['unique-data'].value === attrs.uniqueData){\r
-                            console.log('ignored that..:', attrs.uniqueData);\r
-                            e.stopPropagation();\r
-                        }else{\r
-                            console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);\r
-                            scope.isExpanded = false;\r
-                            scope.$applyAsync();\r
-                        }\r
-                    });\r
-                };\r
-\r
-                let stopListening = function() {\r
-                    if(scope.onDropdownClose){\r
-                        scope.onDropdownClose();\r
-                    }\r
-                    scope.isExpanded = false;\r
-                    scope.$applyAsync();\r
-                    console.log('stop listening on $window and multiple-element!');\r
-                    angular.element($window).off('click');\r
-                    angular.element('multiple-select2').off('click');\r
-                };\r
-\r
-                scope.showCheckboxes = function(){\r
-                    scope.isExpanded = !scope.isExpanded;\r
-                    if(scope.isExpanded){\r
-                        startListening();\r
-                    }else{\r
-                        stopListening();\r
-                        if(scope.onDropdownClose){\r
-                            scope.onDropdownClose();\r
-                        }\r
-                    }\r
-                };\r
-\r
-                scope.onCheckboxClicked = function() {\r
-                    console.log('checkbox clicked; unique data: ',attrs.uniqueData);\r
-                    if(scope.onChange) {\r
-                        scope.onChange();\r
-                    }\r
-                }\r
-\r
-                scope.getTitle = function(){\r
-                    var disp = '';\r
-                    if(!scope.ngModel || !scope.ngModel.length) {\r
-                        return disp;\r
-                    }\r
-                    scope.ngModel.forEach(function(item){\r
-                        if(item[scope.valueAttr]){\r
-                            disp+=item[scope.nameAttr] + ',';\r
-                        }\r
-                    });\r
-                    if(disp!==''){\r
-                        disp = disp.slice(0,disp.length-1);\r
-                    }else{\r
-                        disp = scope.placeholder;\r
-                    }\r
-                    return disp;\r
-                };\r
-            }\r
-        };\r
-    });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/21/15.+
+ */
+angular.module('ecompApp')
+    .directive('multipleSelect2', function ($window) {
+        return {
+            restrict: 'E',
+            templateUrl: 'app/directives/multiple-select/multiple-select2.tpl.html',
+            scope: {
+                onChange: '&',
+                nameAttr: '@',
+                valueAttr: '@',
+                ngModel: '=',
+                placeholder: '@',
+                uniqueData: '@?',
+                onDropdownClose: '&?'
+            },
+            link: function(scope, elm, attrs){
+                scope.isExpanded = false;
+
+                scope.isDisabled = !scope.ngModel || !scope.ngModel.length;
+                scope.$watch('ngModel', function(newVal){
+                    scope.isDisabled = !newVal || !newVal.length;
+                });
+
+
+                let startListening = () => {
+                    console.log('listening on $window!');
+                    angular.element($window).on('click', function () {
+                        stopListening();
+                    });
+
+                    angular.element('multiple-select2').on('click', function(e) {
+                        if($(e.target).closest('multiple-select2')[0].attributes['unique-data'].value === attrs.uniqueData){
+                            console.log('ignored that..:', attrs.uniqueData);
+                            e.stopPropagation();
+                        }else{
+                            console.log('shouldnt ignore, close expanded!:', attrs.uniqueData);
+                            scope.isExpanded = false;
+                            scope.$applyAsync();
+                        }
+                    });
+                };
+
+                let stopListening = function() {
+                    if(scope.onDropdownClose){
+                        scope.onDropdownClose();
+                    }
+                    scope.isExpanded = false;
+                    scope.$applyAsync();
+                    console.log('stop listening on $window and multiple-element!');
+                    angular.element($window).off('click');
+                    angular.element('multiple-select2').off('click');
+                };
+
+                scope.showCheckboxes = function(){
+                    scope.isExpanded = !scope.isExpanded;
+                    if(scope.isExpanded){
+                        startListening();
+                    }else{
+                        stopListening();
+                        if(scope.onDropdownClose){
+                            scope.onDropdownClose();
+                        }
+                    }
+                };
+
+                scope.onCheckboxClicked = function() {
+                    console.log('checkbox clicked; unique data: ',attrs.uniqueData);
+                    if(scope.onChange) {
+                        scope.onChange();
+                    }
+                }
+
+                scope.getTitle = function(){
+                    var disp = '';
+                    if(!scope.ngModel || !scope.ngModel.length) {
+                        return disp;
+                    }
+                    scope.ngModel.forEach(function(item){
+                        if(item[scope.valueAttr]){
+                            disp+=item[scope.nameAttr] + ',';
+                        }
+                    });
+                    if(disp!==''){
+                        disp = disp.slice(0,disp.length-1);
+                    }else{
+                        disp = scope.placeholder;
+                    }
+                    return disp;
+                };
+            }
+        };
+    });
index 34a6cea..80c03cd 100644 (file)
@@ -1,36 +1,36 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div id="app-multilple-select" class="multiple-select2">\r
-    <div class="selectBox"\r
-        id="app-select-{{getTitle()}}"\r
-         ng-click="isDisabled || showCheckboxes()"\r
-         title="{{getTitle()}}"\r
-         ng-bind="getTitle()"\r
-         ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>\r
-\r
-    <div class="checkboxes" ng-show="isExpanded" >\r
-        <div ng-repeat="item in ngModel" id="{{item[nameAttr]}}-checkbox-div">\r
-            <label id="{{item[nameAttr]}}-checkbox-label">\r
-                <input type="checkbox" id="{{item[nameAttr]}}-checkbox" disabled="disabled" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">\r
-                {{item[nameAttr]}}\r
-            </label>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div id="app-multilple-select" class="multiple-select2">
+    <div class="selectBox"
+        id="app-select-{{getTitle()}}"
+         ng-click="isDisabled || showCheckboxes()"
+         title="{{getTitle()}}"
+         ng-bind="getTitle()"
+         ng-class="{open: isExpanded, closed: !isExpanded, disabled: isDisabled}"></div>
+
+    <div class="checkboxes" ng-show="isExpanded" >
+        <div ng-repeat="item in ngModel" id="{{item[nameAttr].split(' ').join('-')}}-checkbox-div">
+            <label id="{{item[nameAttr].split(' ').join('-')}}-checkbox-label">
+                <input type="checkbox" id="{{item[nameAttr].split(' ').join('-')}}-checkbox" disabled="disabled" ng-model="item[valueAttr]" ng-change="onCheckboxClicked()">
+                {{item[nameAttr]}}
+            </label>
+        </div>
+    </div>
+</div>
index b8af5eb..d6bf3d6 100644 (file)
@@ -1,32 +1,32 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-angular.module('ecompApp').\r
-    directive('ngRightClick', function($parse) {\r
-        return function(scope, element, attrs)\r
-        {\r
-        var fn = $parse(attrs.ngRightClick);\r
-        element.bind('contextmenu', function(event) {\r
-            scope.$apply(function() {\r
-                event.preventDefault();\r
-                fn(scope, {$event:event});\r
-            });\r
-        });\r
-        };\r
-    });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+angular.module('ecompApp').
+    directive('ngRightClick', function($parse) {
+        return function(scope, element, attrs)
+        {
+        var fn = $parse(attrs.ngRightClick);
+        element.bind('contextmenu', function(event) {
+            scope.$apply(function() {
+                event.preventDefault();
+                fn(scope, {$event:event});
+            });
+        });
+        };
+    });
index 9fa71d2..190ed57 100644 (file)
@@ -69,15 +69,6 @@ angular.module('ecompApp')
                     controllerAs: 'catalog'
                 }
             }
-        }).state('root.accountOnboarding', {
-            url: '/accountOnboarding',
-            views: {
-                'content@': {
-                           templateUrl: 'app/views/account-onboarding/account-onboarding.tpl.html',
-                           controller: 'AccountOnboardingCtrl',
-                           controllerAs: 'accountOnboarding'
-                }
-            }
         }).state('root.widgetCatalog', {
             url: '/widgetCatalog',
             views: {
@@ -106,7 +97,10 @@ angular.module('ecompApp')
                 }
             }
         }).state('root.role', {
-            url: '/role/:roleId',
+            url: '/role',
+            params: {
+               roleId: 0,
+            },
             views: {
                 'content@': { 
                     templateUrl: 'app/views/role/role.html',
@@ -141,6 +135,15 @@ angular.module('ecompApp')
                     controllerAs: 'apps'
                 }
             }
+        }).state('root.microserviceOnboarding', {
+            url: '/microserviceOnboarding',
+            views: {
+                'content@': {
+                           templateUrl: 'app/views/microservice-onboarding/microservice-onboarding.tpl.html',
+                           controller: 'MicroserviceOnboardingCtrl',
+                           controllerAs: 'microserviceOnboarding'
+                }
+            }
         }).state('root.widgetOnboarding', {
             url: '/widgetOnboarding',
             views: {
@@ -150,6 +153,15 @@ angular.module('ecompApp')
                        controllerAs: 'widgetOnboarding'
                 }
             }
+        }).state('root.accountOnboarding', {
+            url: '/accountOnboarding',
+            views: {
+                'content@': {
+                           templateUrl: 'app/views/account-onboarding/account-onboarding.tpl.html',
+                           controller: 'AccountOnboardingCtrl',
+                           controllerAs: 'accountOnboarding'
+                }
+            }
         }).state('root.functionalMenu', {
             url: '/functionalMenu',
             views: {
@@ -207,6 +219,24 @@ angular.module('ecompApp')
                     controllerAs: 'portalAdmin'
                 }
             }
+        }).state('root.webAnalytics', {
+            url: '/webAnalytics',
+            views: {
+                'content@': {
+                    templateUrl: 'app/views/webAnalytics/webAnalytics.tpl.html',
+                    controller: 'WebAnalyticsCtrl',
+                    controllerAs: 'webAnalytics'
+                }
+            }
+        }).state('root.webAnlayticsSource', {
+            url: '/addWebAnalyticsSource',
+            views: {
+                'content@': {
+                    templateUrl: 'app/views/webAnalytics/webAnalyticsList.tpl.html',
+                    controller: 'WebAnalyticsCtrl',
+                    controllerAs: 'webAnalytics'
+                }
+            }
         }).state('root.error404', {
             url: '/error404',
             views: {
index 3658052..60a99f5 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 11/22/2015.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class AdminsService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getAccountAdmins() {\r
-            let deferred = this.$q.defer();\r
-            //this.$log.info('AdminsService::get all applications admins list');\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.accountAdmins,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('AdminsService::getAccountAdmins Failed');\r
-                        deferred.reject("AdminsService::getAccountAdmins Failed");\r
-                    } else {\r
-                        // this.$log.info('AdminsService::getAccountAdmins Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('AdminsService::getAccountAdmins Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-\r
-        getAdminAppsRoles(orgUserId) {\r
-            let deferred = this.$q.defer();\r
-            //this.$log.info('AdminsService::getAdminAppsRoles.adminAppsRoles');\r
-\r
-            this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.adminAppsRoles,\r
-                params: {user: orgUserId},\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                        this.$log.error('AdminsService::getAdminAppsRoles.adminAppsRoles Failed');\r
-                        deferred.reject("AdminsService::getAdminAppsRoles.adminAppsRoles Failed");\r
-                    } else {\r
-                       // this.$log.info('AdminsService::getAdminAppsRoles.adminAppsRoles Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('AdminsService::getAdminAppsRoles.adminAppsRoles Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-\r
-            return deferred.promise;\r
-        }\r
-        /*Author: Rui*/\r
-        getRolesByApp(appId) {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('AdminsService::getRolesByApp');\r
-            let url = this.conf.api.adminAppsRoles + '/' + appId;\r
-            this.$http({\r
-                method: "GET",\r
-                url: url,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("AdminsService::getAdminAppsRoles.getRolesByApp Failed");\r
-                    } else {\r
-                        this.$log.info('AdminsService::getAdminAppsRoles.getRolesByApp Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            \r
-            return deferred.promise;\r
-        }\r
-        \r
-        updateAdminAppsRoles(newAdminAppRoles) {\r
-            let deferred = this.$q.defer();\r
-            // this.$log.info('AdminsService::updateAdminAppsRoles');\r
-            this.$http({\r
-                method: "PUT",\r
-                url: this.conf.api.adminAppsRoles,\r
-                data: newAdminAppRoles,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                if (this.utilsService.isValidJSON(res)=== false) {\r
-                    this.$log.error('AdminsService::updateAdminAppsRoles Failed');\r
-                    deferred.reject("AdminsService::updateAdminAppsRoles Failed");\r
-                } else {\r
-                    //this.$log.info('AdminsService::updateAdminAppsRoles success:');\r
-                    deferred.resolve(res.data);\r
-                }\r
-\r
-                })\r
-                .catch( status => {\r
-                    this.$log.error('AdminsService::updateAdminAppsRoles: rejection:' + status);\r
-                    deferred.reject(status);\r
-                });\r
-\r
-            return deferred.promise;\r
-        }\r
-        \r
-        /**\r
-         * Tests the specified password against complexity requirements.\r
-         * Returns an explanation message if the test fails; null if it passes.\r
-         */\r
-        isComplexPassword(str) {\r
-               let minLength = 8;\r
-               let message = 'Password is too simple.  Minimum length is '+ minLength + ', '\r
-                                         + 'and it must use letters, digits and special characters.';\r
-               if (str == null)\r
-                       return message;\r
-\r
-               let hasLetter = false;\r
-               let hasDigit = false;\r
-               let hasSpecial = false;\r
-               var code, i, len;\r
-               for (i = 0, len = str.length; i < len; i++) {\r
-                       code = str.charCodeAt(i);\r
-                       if (code > 47 && code < 58) // numeric (0-9)\r
-                               hasDigit = true;\r
-                       else if ((code > 64 && code < 91) || (code > 96 && code < 123)) // A-Z, a-z\r
-                               hasLetter = true;\r
-                       else\r
-                               hasSpecial = true;\r
-               } // for\r
-\r
-               if (str.length < minLength || !hasLetter || !hasDigit || !hasSpecial)\r
-                       return message;\r
-               \r
-               // All is well.\r
-               return null;\r
-        }\r
-        \r
-        addNewUser(newUser,checkDuplicate) {\r
-               // this.$log.info(newContactUs)\r
-               let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService:: add Contact Us' + JSON.stringify(newContactUs));\r
-            \r
-            var newUserObj={\r
-                       firstName:newUser.firstName,\r
-                       middleInitial:newUser.middleName,\r
-                       lastName:newUser.lastName,\r
-                       email:newUser.emailAddress,\r
-                       loginId:newUser.loginId,\r
-                       loginPwd:newUser.loginPwd,                      \r
-            };\r
-            this.$http({\r
-                url: this.conf.api.saveNewUser + "?isCheck=" + checkDuplicate,\r
-                method: 'POST',\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                },\r
-                data: newUserObj\r
-            }).then(res => {\r
-                // this.$log.info('ContactUsService:: add Contact Us res' ,res);\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {\r
-                    deferred.reject("Add new User failed");\r
-                    this.$log.error('adminService:: add New User failed');\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            }).catch(errRes => {\r
-                   deferred.reject(errRes);\r
-             });\r
-            return deferred.promise;\r
-        }\r
-        \r
-    }\r
-    AdminsService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('adminsService', AdminsService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 11/22/2015.
+ */
+'use strict';
+
+(function () {
+    class AdminsService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+        getAccountAdmins() {
+            let deferred = this.$q.defer();
+            //this.$log.info('AdminsService::get all applications admins list');
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.accountAdmins,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('AdminsService::getAccountAdmins Failed');
+                        deferred.reject("AdminsService::getAccountAdmins Failed");
+                    } else {
+                        // this.$log.info('AdminsService::getAccountAdmins Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('AdminsService::getAccountAdmins Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+
+        getAdminAppsRoles(orgUserId) {
+            let deferred = this.$q.defer();
+            //this.$log.info('AdminsService::getAdminAppsRoles.adminAppsRoles');
+
+            this.$http({
+                method: "GET",
+                url: this.conf.api.adminAppsRoles,
+                params: {user: orgUserId},
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                        this.$log.error('AdminsService::getAdminAppsRoles.adminAppsRoles Failed');
+                        deferred.reject("AdminsService::getAdminAppsRoles.adminAppsRoles Failed");
+                    } else {
+                       // this.$log.info('AdminsService::getAdminAppsRoles.adminAppsRoles Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('AdminsService::getAdminAppsRoles.adminAppsRoles Failed', status);
+                    deferred.reject(status);
+                });
+
+            return deferred.promise;
+        }
+        /*Author: Rui*/
+        getRolesByApp(appId) {
+            let deferred = this.$q.defer();
+            this.$log.info('AdminsService::getRolesByApp');
+            let url = this.conf.api.adminAppsRoles + '/' + appId;
+            this.$http({
+                method: "GET",
+                url: url,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("AdminsService::getAdminAppsRoles.getRolesByApp Failed");
+                    } else {
+                        this.$log.info('AdminsService::getAdminAppsRoles.getRolesByApp Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            
+            return deferred.promise;
+        }
+        
+        updateAdminAppsRoles(newAdminAppRoles) {
+            let deferred = this.$q.defer();
+            // this.$log.info('AdminsService::updateAdminAppsRoles');
+            this.$http({
+                method: "PUT",
+                url: this.conf.api.adminAppsRoles,
+                data: newAdminAppRoles,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                if (this.utilsService.isValidJSON(res)=== false) {
+                    this.$log.error('AdminsService::updateAdminAppsRoles Failed');
+                    deferred.reject("AdminsService::updateAdminAppsRoles Failed");
+                } else {
+                    //this.$log.info('AdminsService::updateAdminAppsRoles success:');
+                    deferred.resolve(res.data);
+                }
+
+                })
+                .catch( status => {
+                    this.$log.error('AdminsService::updateAdminAppsRoles: rejection:' + status);
+                    deferred.reject(status);
+                });
+
+            return deferred.promise;
+        }
+        
+        /**
+         * Tests the specified password against complexity requirements.
+         * Returns an explanation message if the test fails; null if it passes.
+         */
+        isComplexPassword(str) {
+               let minLength = 8;
+               let message = 'Password is too simple.  Minimum length is '+ minLength + ', '
+                                         + 'and it must use letters, digits and special characters.';
+               if (str == null)
+                       return message;
+
+               let hasLetter = false;
+               let hasDigit = false;
+               let hasSpecial = false;
+               var code, i, len;
+               for (i = 0, len = str.length; i < len; i++) {
+                       code = str.charCodeAt(i);
+                       if (code > 47 && code < 58) // numeric (0-9)
+                               hasDigit = true;
+                       else if ((code > 64 && code < 91) || (code > 96 && code < 123)) // A-Z, a-z
+                               hasLetter = true;
+                       else
+                               hasSpecial = true;
+               } // for
+
+               if (str.length < minLength || !hasLetter || !hasDigit || !hasSpecial)
+                       return message;
+               
+               // All is well.
+               return null;
+        }
+        
+        addNewUser(newUser,checkDuplicate) {
+               // this.$log.info(newContactUs)
+               let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService:: add Contact Us' + JSON.stringify(newContactUs));
+            
+            var newUserObj={
+                       firstName:newUser.firstName,
+                       middleInitial:newUser.middleName,
+                       lastName:newUser.lastName,
+                       email:newUser.emailAddress,
+                       loginId:newUser.loginId,
+                       loginPwd:newUser.loginPwd,                      
+            };
+            this.$http({
+                url: this.conf.api.saveNewUser + "?isCheck=" + checkDuplicate,
+                method: 'POST',
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                },
+                data: newUserObj
+            }).then(res => {
+                // this.$log.info('ContactUsService:: add Contact Us res' ,res);
+                // If response comes back as a redirected HTML page which IS NOT a success
+                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {
+                    deferred.reject("Add new User failed");
+                    this.$log.error('adminService:: add New User failed');
+                } else {
+                    deferred.resolve(res.data);
+                }
+            }).catch(errRes => {
+                   deferred.reject(errRes);
+             });
+            return deferred.promise;
+        }
+        
+    }
+    AdminsService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('adminsService', AdminsService)
+})();
index 93a6131..af48fd6 100644 (file)
@@ -1,92 +1,92 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by robertlo on 11/18/2016.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class AuditLogService {\r
-        constructor($q, $log, $http, conf, uuid) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-          \r
-            this.uuid = uuid;\r
-        }\r
-        storeAudit(affectedAppId) {\r
-            // this.$log.error('ecomp::storeAudit storeAudit',affectedAppId);\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                    method: "GET",\r
-                    url: this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId +"&type=''&comment=''",\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-            })\r
-               return deferred.promise;\r
-        }\r
-        \r
-        storeAudit(affectedAppId,type) {\r
-            // this.$log.error('ecomp::storeAudit storeAudit',affectedAppId + " " +type);\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                    method: "GET",\r
-                    url: this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId + '&type='+type+"&comment=''",\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-            })\r
-               return deferred.promise;\r
-        }\r
-        storeAudit(affectedAppId,type,comment) {\r
-               comment = filterDummyValue(comment);\r
-               let deferred = this.$q.defer();\r
-               var url =this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId;\r
-               if(type!=''){\r
-                       url= url+'&type='+type;\r
-               }\r
-               if(comment!=''){\r
-                       url= url+'&comment='+comment;\r
-               }\r
-               this.$http({\r
-                    method: "GET",\r
-                    url: url,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-            })\r
-               return deferred.promise;\r
-        }\r
-    }  \r
-    AuditLogService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];\r
-    angular.module('ecompApp').service('auditLogService', AuditLogService)\r
-})();\r
-\r
-function filterDummyValue(comment){\r
-       var n = comment.indexOf("?dummyVar");\r
-       if(n!=-1)\r
-               comment = comment.substring(0, n);\r
-       return comment;\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by robertlo on 11/18/2016.
+ */
+'use strict';
+
+(function () {
+    class AuditLogService {
+        constructor($q, $log, $http, conf, uuid) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+          
+            this.uuid = uuid;
+        }
+        storeAudit(affectedAppId) {
+            // this.$log.error('ecomp::storeAudit storeAudit',affectedAppId);
+               let deferred = this.$q.defer();
+               this.$http({
+                    method: "GET",
+                    url: this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId +"&type=''&comment=''",
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+            })
+               return deferred.promise;
+        }
+        
+        storeAudit(affectedAppId,type) {
+            // this.$log.error('ecomp::storeAudit storeAudit',affectedAppId + " " +type);
+               let deferred = this.$q.defer();
+               this.$http({
+                    method: "GET",
+                    url: this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId + '&type='+type+"&comment=''",
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+            })
+               return deferred.promise;
+        }
+        storeAudit(affectedAppId,type,comment) {
+               comment = filterDummyValue(comment);
+               let deferred = this.$q.defer();
+               var url =this.conf.api.storeAuditLog+'?affectedAppId=' + affectedAppId;
+               if(type!=''){
+                       url= url+'&type='+type;
+               }
+               if(comment!=''){
+                       url= url+'&comment='+comment;
+               }
+               this.$http({
+                    method: "GET",
+                    url: url,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+            })
+               return deferred.promise;
+        }
+    }  
+    AuditLogService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];
+    angular.module('ecompApp').service('auditLogService', AuditLogService)
+})();
+
+function filterDummyValue(comment){
+       var n = comment.indexOf("?dummyVar");
+       if(n!=-1)
+               comment = comment.substring(0, n);
+       return comment;
+}
index 5a68478..dccc5b2 100644 (file)
@@ -1,69 +1,69 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Author: Rui Lu\r
- * 12/15/2016\r
- */\r
-(function () {\r
-    class Base64Service {\r
-        constructor(){\r
-               \r
-        }\r
-        encode(input) {\r
-                var keyStr = 'ABCDEFGHIJKLMNOP' +\r
-             'QRSTUVWXYZabcdef' +\r
-             'ghijklmnopqrstuv' +\r
-             'wxyz0123456789+/' +\r
-             '=';\r
-                var output = "";\r
-             var chr1, chr2, chr3 = "";\r
-             var enc1, enc2, enc3, enc4 = "";\r
-             var i = 0;\r
-\r
-             do {\r
-                 chr1 = input.charCodeAt(i++);\r
-                 chr2 = input.charCodeAt(i++);\r
-                 chr3 = input.charCodeAt(i++);\r
-\r
-                 enc1 = chr1 >> 2;\r
-                 enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r
-                 enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r
-                 enc4 = chr3 & 63;\r
-\r
-                 if (isNaN(chr2)) {\r
-                     enc3 = enc4 = 64;\r
-                 } else if (isNaN(chr3)) {\r
-                     enc4 = 64;\r
-                 }\r
-\r
-                 output = output +\r
-                         keyStr.charAt(enc1) +\r
-                         keyStr.charAt(enc2) +\r
-                         keyStr.charAt(enc3) +\r
-                         keyStr.charAt(enc4);\r
-                 chr1 = chr2 = chr3 = "";\r
-                 enc1 = enc2 = enc3 = enc4 = "";\r
-             } while (i < input.length);\r
-\r
-             return output;\r
-        }\r
-    }\r
-    angular.module('ecompApp').service('base64Service', Base64Service)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Author: Rui Lu
+ * 12/15/2016
+ */
+(function () {
+    class Base64Service {
+        constructor(){
+               
+        }
+        encode(input) {
+                var keyStr = 'ABCDEFGHIJKLMNOP' +
+             'QRSTUVWXYZabcdef' +
+             'ghijklmnopqrstuv' +
+             'wxyz0123456789+/' +
+             '=';
+                var output = "";
+             var chr1, chr2, chr3 = "";
+             var enc1, enc2, enc3, enc4 = "";
+             var i = 0;
+
+             do {
+                 chr1 = input.charCodeAt(i++);
+                 chr2 = input.charCodeAt(i++);
+                 chr3 = input.charCodeAt(i++);
+
+                 enc1 = chr1 >> 2;
+                 enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+                 enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+                 enc4 = chr3 & 63;
+
+                 if (isNaN(chr2)) {
+                     enc3 = enc4 = 64;
+                 } else if (isNaN(chr3)) {
+                     enc4 = 64;
+                 }
+
+                 output = output +
+                         keyStr.charAt(enc1) +
+                         keyStr.charAt(enc2) +
+                         keyStr.charAt(enc3) +
+                         keyStr.charAt(enc4);
+                 chr1 = chr2 = chr3 = "";
+                 enc1 = enc2 = enc3 = enc4 = "";
+             } while (i < input.length);
+
+             return output;
+        }
+    }
+    angular.module('ecompApp').service('base64Service', Base64Service)
+})();
index b3ad6b3..8e30aa2 100644 (file)
@@ -1,70 +1,70 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 11/22/2015.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class BeReaderService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getProperty(property) {\r
-            let deferred = this.$q.defer();\r
-            //this.$log.info('BeReaderService::get all applications admins list');\r
-            \r
-            let url = this.conf.api.beProperty + "?key=" + property;\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: url,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    //if (this.utilsService.isValidJSON(res)=== false) {\r
-                    // this.$log.error('BeReaderService::getAccountAdmins Failed');\r
-                    //    deferred.reject("BeReaderService::getAccountAdmins Failed");\r
-                    //} else {\r
-                        // this.$log.info('BeReaderService::getAccountAdmins Succeeded');\r
-                    deferred.resolve(res.data);\r
-                    //}\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('BeReaderService::getAccountAdmins Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-\r
-        }\r
-    }\r
-    BeReaderService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('beReaderService', BeReaderService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 11/22/2015.
+ */
+'use strict';
+
+(function () {
+    class BeReaderService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+        getProperty(property) {
+            let deferred = this.$q.defer();
+            //this.$log.info('BeReaderService::get all applications admins list');
+            
+            let url = this.conf.api.beProperty + "?key=" + property;
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: url,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    //if (this.utilsService.isValidJSON(res)=== false) {
+                    // this.$log.error('BeReaderService::getAccountAdmins Failed');
+                    //    deferred.reject("BeReaderService::getAccountAdmins Failed");
+                    //} else {
+                        // this.$log.info('BeReaderService::getAccountAdmins Succeeded');
+                    deferred.resolve(res.data);
+                    //}
+                })
+                .catch( status => {
+                       this.$log.error('BeReaderService::getAccountAdmins Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+
+        }
+    }
+    BeReaderService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('beReaderService', BeReaderService)
+})();
index 63d5b96..6b89341 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class CatalogService {\r
-       \r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.debug = false;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getAppCatalog() {\r
-            let deferred = this.$q.defer();\r
-            this.$http({\r
-                       method: "GET",\r
-                       url: this.conf.api.appCatalog,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                       if (this.debug)\r
-                               this.$log.debug('CatalogService::getAppCatalog: result is ' + JSON.stringify(res));\r
-                    // Res is always JSON, but the data object might be an HTML error page.\r
-                    if (! this.utilsService.isValidJSON(res.data)) {\r
-                       var msg = 'CatalogService::getAppCatalog: result data is not JSON';\r
-                       if (this.debug)\r
-                               this.$log.debug(msg);\r
-                       deferred.reject(msg);\r
-                    } else {\r
-                       if (this.debug)\r
-                               this.$log.debug('CatalogService::getAppCatalog: success');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('CatalogService:getAppCatalog failed: ' + status);\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        // Expects an object with fields matching model class AppCatalogSelection:\r
-        // appId (number), select (boolean), pending (boolean).\r
-        updateAppCatalog(appData) {\r
-            let deferred = this.$q.defer();\r
-            // Validate the request, maybe this is overkill\r
-            if (appData == null || appData.appId == null || appData.select == null) {\r
-               var msg = 'CatalogService::updateAppCatalog: field appId and/or select not found';\r
-                this.$log.error(msg);\r
-                return deferred.reject(msg);\r
-            }\r
-            this.$http({\r
-                method: "PUT",\r
-                url: this.conf.api.appCatalog,\r
-                data: appData,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // Detect missing result\r
-                    if (res == null || res.data == null) {\r
-                        deferred.reject("CatalogService::updateAppCatalog Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('CatalogService:updateAppCatalog failed: ' + status);\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        // Expects an object with fields and used to update records for ep_pers_user_app_man_sort table:\r
-        // appId (number), select (boolean).\r
-        updateManualAppSort(appData) {\r
-            let deferred = this.$q.defer();\r
-            \r
-            // Validate the request, maybe this is overkill\r
-            if (appData == null || appData.appId == null || appData.select == null) {\r
-               var msg = 'CatalogService::updateManualAppSort: field appId and/or select not found';\r
-                this.$log.error(msg);\r
-                return deferred.reject(msg);\r
-            }\r
-            this.$http({\r
-                method: "PUT",\r
-                url: this.conf.api.UpdateUserAppsSortManual,\r
-                data: appData,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // Detect missing result\r
-                    if (res == null || res.data == null) {\r
-                        deferred.reject("CatalogService::updateManualAppSort Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('CatalogService:updateManualAppSort failed: ' + status);\r
-                    deferred.reject(status);\r
-                });\r
-            \r
-            return deferred.promise;\r
-        }\r
-           \r
-        getuserAppRolesCatalog(item) {\r
-            let deferred = this.$q.defer();\r
-            this.$http({\r
-                       method: "GET",\r
-                       url: this.conf.api.appCatalogRoles,\r
-                       params:{appName:item},\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                       if (this.debug)\r
-                               this.$log.debug('CatalogService::getAppCatalog: result is ' + JSON.stringify(res));\r
-                    // Res is always JSON, but the data object might be an HTML error page.\r
-                    if (! this.utilsService.isValidJSON(res.data)) {\r
-                       var msg = 'CatalogService::getAppCatalog: result data is not JSON';\r
-                       if (this.debug)\r
-                               this.$log.debug(msg);\r
-                       deferred.reject(msg);\r
-                    } else {\r
-                       if (this.debug)\r
-                               this.$log.debug('CatalogService::getAppCatalog: success');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('CatalogService:getAppCatalog failed: ' + status);\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        \r
-\r
-    }\r
-    \r
-    CatalogService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('catalogService', CatalogService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class CatalogService {
+       
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.debug = false;
+            this.utilsService = utilsService;
+        }
+
+        getAppCatalog() {
+            let deferred = this.$q.defer();
+            this.$http({
+                       method: "GET",
+                       url: this.conf.api.appCatalog,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppCatalog: result is ' + JSON.stringify(res));
+                    // Res is always JSON, but the data object might be an HTML error page.
+                    if (! this.utilsService.isValidJSON(res.data)) {
+                       var msg = 'CatalogService::getAppCatalog: result data is not JSON';
+                       if (this.debug)
+                               this.$log.debug(msg);
+                       deferred.reject(msg);
+                    } else {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppCatalog: success');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('CatalogService:getAppCatalog failed: ' + status);
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        // Expects an object with fields matching model class AppCatalogSelection:
+        // appId (number), select (boolean), pending (boolean).
+        updateAppCatalog(appData) {
+            let deferred = this.$q.defer();
+            // Validate the request, maybe this is overkill
+            if (appData == null || appData.appId == null || appData.select == null) {
+               var msg = 'CatalogService::updateAppCatalog: field appId and/or select not found';
+                this.$log.error(msg);
+                return deferred.reject(msg);
+            }
+            this.$http({
+                method: "PUT",
+                url: this.conf.api.appCatalog,
+                data: appData,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // Detect missing result
+                    if (res == null || res.data == null) {
+                        deferred.reject("CatalogService::updateAppCatalog Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('CatalogService:updateAppCatalog failed: ' + status);
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        // Expects an object with fields and used to update records for ep_pers_user_app_man_sort table:
+        // appId (number), select (boolean).
+        updateManualAppSort(appData) {
+            let deferred = this.$q.defer();
+            
+            // Validate the request, maybe this is overkill
+            if (appData == null || appData.appId == null || appData.select == null) {
+               var msg = 'CatalogService::updateManualAppSort: field appId and/or select not found';
+                this.$log.error(msg);
+                return deferred.reject(msg);
+            }
+            this.$http({
+                method: "PUT",
+                url: this.conf.api.UpdateUserAppsSortManual,
+                data: appData,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // Detect missing result
+                    if (res == null || res.data == null) {
+                        deferred.reject("CatalogService::updateManualAppSort Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('CatalogService:updateManualAppSort failed: ' + status);
+                    deferred.reject(status);
+                });
+            
+            return deferred.promise;
+        }
+           
+        getuserAppRolesCatalog(item) {
+            let deferred = this.$q.defer();
+            this.$http({
+                       method: "GET",
+                       url: this.conf.api.appCatalogRoles,
+                       params:{appName:item},
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppCatalog: result is ' + JSON.stringify(res));
+                    // Res is always JSON, but the data object might be an HTML error page.
+                    if (! this.utilsService.isValidJSON(res.data)) {
+                       var msg = 'CatalogService::getAppCatalog: result data is not JSON';
+                       if (this.debug)
+                               this.$log.debug(msg);
+                       deferred.reject(msg);
+                    } else {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppCatalog: success');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('CatalogService:getAppCatalog failed: ' + status);
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        getAppsFullList() {
+            let deferred = this.$q.defer();
+            this.$http({
+                       method: "GET",
+                       url: this.conf.api.appsFullList,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppsFullList: result is ' + JSON.stringify(res));
+                    // Res is always JSON, but the data object might be an HTML error page.
+                    if (! this.utilsService.isValidJSON(res.data)) {
+                       var msg = 'CatalogService::getAppsFullList: result data is not JSON';
+                       if (this.debug)
+                               this.$log.error(msg);
+                       deferred.reject(msg);
+                    } else {
+                       if (this.debug)
+                               this.$log.debug('CatalogService::getAppsFullList: success');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('CatalogService:getAppsFullList failed: ' + status);
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+    }
+    
+    CatalogService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('catalogService', CatalogService)
+})();
index 97ebb1e..7379a29 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 1/18/16.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class ConfirmBoxService {\r
-        constructor($q, $log, ngDialog) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.ngDialog = ngDialog;\r
-        }\r
-\r
-        showInformation(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/information-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-        \r
-        editItem(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-       \r
-        \r
-        showDynamicInformation(message, templatePath, controller) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-               templateUrl: templatePath,\r
-                controller: controller,\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-        \r
-        confirm(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-\r
-        deleteItem(item) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    item: item,\r
-                    title: 'Functional Menu - Delete'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-\r
-        moveMenuItem(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/dragdrop-confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message,\r
-                    title:'Functional Menu - Move'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-\r
-        makeAdminChanges(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message,\r
-                    title: 'Admin Update'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-        \r
-        \r
-        makeUserAppRoleCatalogChanges(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message,\r
-                    title: 'UserRoles Update'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-     \r
-        \r
-        webAnalyticsChanges(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message,\r
-                    title: 'Add WebAnalytics Source'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-\r
-        \r
-        updateWebAnalyticsReport(message) {\r
-            let deferred = this.$q.defer();\r
-            this.ngDialog.open({\r
-                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',\r
-                controller: 'ConfirmationBoxCtrl',\r
-                controllerAs: 'confirmBox',\r
-                className: 'confirm-box ngdialog-theme-default',\r
-                showClose: false,\r
-                data: {\r
-                    message: message,\r
-                    title: 'Update WebAnalytics Source'\r
-                }\r
-            }).closePromise.then(confirmed => {\r
-                deferred.resolve(confirmed.value);\r
-            }).catch(err => {\r
-                deferred.reject(err);\r
-            });\r
-            return deferred.promise;\r
-        };\r
-\r
-    }\r
-    ConfirmBoxService.$inject = ['$q', '$log', 'ngDialog'];\r
-    angular.module('ecompApp').service('confirmBoxService', ConfirmBoxService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 1/18/16.
+ */
+'use strict';
+
+(function () {
+    class ConfirmBoxService {
+        constructor($q, $log, ngDialog) {
+            this.$q = $q;
+            this.$log = $log;
+            this.ngDialog = ngDialog;
+        }
+
+        showInformation(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/information-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+        
+        editItem(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+       
+        
+        showDynamicInformation(message, templatePath, controller) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+               templateUrl: templatePath,
+                controller: controller,
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+        
+        confirm(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+
+        deleteItem(item) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    item: item,
+                    title: 'Functional Menu - Delete'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+
+        moveMenuItem(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/dragdrop-confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message,
+                    title:'Functional Menu - Move'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+
+        makeAdminChanges(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message,
+                    title: 'Admin Update'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+        
+        
+        makeUserAppRoleCatalogChanges(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message,
+                    title: 'UserRoles Update'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+     
+        
+        webAnalyticsChanges(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message,
+                    title: 'Add WebAnalytics Source'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+
+        
+        updateWebAnalyticsReport(message) {
+            let deferred = this.$q.defer();
+            this.ngDialog.open({
+                templateUrl: 'app/views/confirmation-box/admin-confirmation-box.tpl.html',
+                controller: 'ConfirmationBoxCtrl',
+                controllerAs: 'confirmBox',
+                className: 'confirm-box ngdialog-theme-default',
+                showClose: false,
+                data: {
+                    message: message,
+                    title: 'Update WebAnalytics Source'
+                }
+            }).closePromise.then(confirmed => {
+                deferred.resolve(confirmed.value);
+            }).catch(err => {
+                deferred.reject(err);
+            });
+            return deferred.promise;
+        };
+
+    }
+    ConfirmBoxService.$inject = ['$q', '$log', 'ngDialog'];
+    angular.module('ecompApp').service('confirmBoxService', ConfirmBoxService)
+})();
index 45c95e9..6158498 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by robertlo on 10/10/2016.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class ContactUsService {\r
-        constructor($q, $log, $http, conf, uuid) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-        }\r
-        getListOfApp() {\r
-            // this.$log.info('ContactUsService::getListOfavailableApps: get all app list');\r
-            let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService::getListOfavailableApps: ', this.conf.api.listOfApp);\r
-            this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.availableApps,           \r
-                cache: false\r
-            }).then( res => {\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-               // this.$log.info('ContactUsService::getListOfavailableApps availableApps response: ', res);\r
-                if (Object.keys(res).length == 0) {\r
-                    deferred.reject("ContactUsService::getListOfavailableApps: Failed"); \r
-                } else {\r
-                    // this.$log.debug('ContactUsService::getListOfavailableApps: Succeeded results: ', res);\r
-                    deferred.resolve(res);\r
-                }\r
-            }).catch( status => {\r
-               this.$log.error('ContactUsService::getListOfavailableApps: query error: ',status);\r
-                deferred.reject(status);\r
-            });\r
-            return deferred.promise;           \r
-        }\r
-        \r
-        getContactUs() {\r
-            let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService::get all Contact Us list');\r
-            this.$http({\r
-                    url: this.conf.api.getContactUS,\r
-                    method: 'GET',\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ContactUsService::getContactUs Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getAppsAndContacts() {\r
-            let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService::getAppsAndContacts');\r
-            this.$http({\r
-                    url: this.conf.api.getAppsAndContacts,\r
-                    method: 'GET',\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ContactUsService::getAppsAndContacts Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        getContactUSPortalDetails(){\r
-               let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService::get all Contact Us Portal Details');\r
-            this.$http({\r
-                    url: this.conf.api.getContactUSPortalDetails,\r
-                    method: 'GET',\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ContactUsService::getContactUSPortalDetails Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        getAppCategoryFunctions(){\r
-               let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService::get all App Category Functions');\r
-            this.$http({\r
-                    url: this.conf.api.getAppCategoryFunctions,\r
-                    method: 'GET',\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ContactUsService::getAppCategoryFunctions Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        addContactUs(newContactUs) {\r
-               // this.$log.info('ContactUsService::add a new Contact Us');\r
-               // this.$log.info(newContactUs)\r
-               let deferred = this.$q.defer();\r
-            // this.$log.info('ContactUsService:: add Contact Us' + JSON.stringify(newContactUs));\r
-            \r
-            var contactUsObj={\r
-                       appId:newContactUs.app.value,\r
-                       appName:newContactUs.app.title,\r
-                       description:newContactUs.desc,\r
-                       contactName:newContactUs.name,\r
-                       contactEmail:newContactUs.email,\r
-                       url:newContactUs.url,                           \r
-            };\r
-            this.$http({\r
-                url: this.conf.api.saveContactUS,\r
-                method: 'POST',\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                },\r
-                data: contactUsObj\r
-            }).then(res => {\r
-                // this.$log.info('ContactUsService:: add Contact Us res' ,res);\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {\r
-                    deferred.reject("Add Contact Us failed");\r
-                    this.$log.error('ContactUsService:: add Contact Us failed');\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            }).catch(errRes => {\r
-                   deferred.reject(errRes);\r
-             });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        modifyContactUs(contactUsObj) {\r
-               // this.$log.info('ContactUsService::edit Contact Us',contactUsObj);            \r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                url: this.conf.api.saveContactUS,\r
-                method: 'POST',\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                },\r
-                data: contactUsObj\r
-            }).then(res => {\r
-                // this.$log.info('ContactUsService:: edit Contact Us res' ,res);\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {\r
-                    deferred.reject("Edit Contact Us failed");\r
-                    this.$log.error('ContactUsService:: edit Contact Us failed');\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            }).catch(errRes => {\r
-                   deferred.reject(errRes);\r
-             });\r
-            return deferred.promise;\r
-        }\r
-\r
-        removeContactUs(id) {\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.deleteContactUS + '/' + id;\r
-            // this.$log.info('ContactUsService:: remove Contact Us');\r
-            this.$http({\r
-                url: url,\r
-                method: 'POST',\r
-                cache: false,\r
-                data: '',\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-               // this.$log.info("ContactUsService::removeContactUs res",res);\r
-               deferred.resolve(res.data);\r
-                if (Object.keys(res.data).length == 0) {\r
-                    deferred.reject("ContactUsService::removeContactUs Failed");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            }).catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-\r
-            return deferred.promise;\r
-        }\r
-    }\r
-    ContactUsService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];\r
-    angular.module('ecompApp').service('contactUsService', ContactUsService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by robertlo on 10/10/2016.
+ */
+'use strict';
+
+(function () {
+    class ContactUsService {
+        constructor($q, $log, $http, conf, uuid) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+        }
+        getListOfApp() {
+            // this.$log.info('ContactUsService::getListOfavailableApps: get all app list');
+            let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService::getListOfavailableApps: ', this.conf.api.listOfApp);
+            this.$http({
+                method: "GET",
+                url: this.conf.api.availableApps,           
+                cache: false
+            }).then( res => {
+                // If response comes back as a redirected HTML page which IS NOT a success
+               // this.$log.info('ContactUsService::getListOfavailableApps availableApps response: ', res);
+                if (Object.keys(res).length == 0) {
+                    deferred.reject("ContactUsService::getListOfavailableApps: Failed"); 
+                } else {
+                    // this.$log.debug('ContactUsService::getListOfavailableApps: Succeeded results: ', res);
+                    deferred.resolve(res);
+                }
+            }).catch( status => {
+               this.$log.error('ContactUsService::getListOfavailableApps: query error: ',status);
+                deferred.reject(status);
+            });
+            return deferred.promise;           
+        }
+        
+        getContactUs() {
+            let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService::get all Contact Us list');
+            this.$http({
+                    url: this.conf.api.getContactUS,
+                    method: 'GET',
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ContactUsService::getContactUs Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        getAppsAndContacts() {
+            let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService::getAppsAndContacts');
+            this.$http({
+                    url: this.conf.api.getAppsAndContacts,
+                    method: 'GET',
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ContactUsService::getAppsAndContacts Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        getContactUSPortalDetails(){
+               let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService::get all Contact Us Portal Details');
+            this.$http({
+                    url: this.conf.api.getContactUSPortalDetails,
+                    method: 'GET',
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ContactUsService::getContactUSPortalDetails Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        getAppCategoryFunctions(){
+               let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService::get all App Category Functions');
+            this.$http({
+                    url: this.conf.api.getAppCategoryFunctions,
+                    method: 'GET',
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ContactUsService::getAppCategoryFunctions Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        addContactUs(newContactUs) {
+               // this.$log.info('ContactUsService::add a new Contact Us');
+               // this.$log.info(newContactUs)
+               let deferred = this.$q.defer();
+            // this.$log.info('ContactUsService:: add Contact Us' + JSON.stringify(newContactUs));
+            
+            var contactUsObj={
+                       appId:newContactUs.app.value,
+                       appName:newContactUs.app.title,
+                       description:newContactUs.desc,
+                       contactName:newContactUs.name,
+                       contactEmail:newContactUs.email,
+                       url:newContactUs.url,                           
+            };
+            this.$http({
+                url: this.conf.api.saveContactUS,
+                method: 'POST',
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                },
+                data: contactUsObj
+            }).then(res => {
+                // this.$log.info('ContactUsService:: add Contact Us res' ,res);
+                // If response comes back as a redirected HTML page which IS NOT a success
+                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {
+                    deferred.reject("Add Contact Us failed");
+                    this.$log.error('ContactUsService:: add Contact Us failed');
+                } else {
+                    deferred.resolve(res.data);
+                }
+            }).catch(errRes => {
+                   deferred.reject(errRes);
+             });
+            return deferred.promise;
+        }
+        
+        modifyContactUs(contactUsObj) {
+               // this.$log.info('ContactUsService::edit Contact Us',contactUsObj);            
+               let deferred = this.$q.defer();
+            this.$http({
+                url: this.conf.api.saveContactUS,
+                method: 'POST',
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                },
+                data: contactUsObj
+            }).then(res => {
+                // this.$log.info('ContactUsService:: edit Contact Us res' ,res);
+                // If response comes back as a redirected HTML page which IS NOT a success
+                if (res==null || Object.keys(res.data).length == 0 || res.data.message == 'failure') {
+                    deferred.reject("Edit Contact Us failed");
+                    this.$log.error('ContactUsService:: edit Contact Us failed');
+                } else {
+                    deferred.resolve(res.data);
+                }
+            }).catch(errRes => {
+                   deferred.reject(errRes);
+             });
+            return deferred.promise;
+        }
+
+        removeContactUs(id) {
+            let deferred = this.$q.defer();
+            let url = this.conf.api.deleteContactUS + '/' + id;
+            // this.$log.info('ContactUsService:: remove Contact Us');
+            this.$http({
+                url: url,
+                method: 'POST',
+                cache: false,
+                data: '',
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                // If response comes back as a redirected HTML page which IS NOT a success
+               // this.$log.info("ContactUsService::removeContactUs res",res);
+               deferred.resolve(res.data);
+                if (Object.keys(res.data).length == 0) {
+                    deferred.reject("ContactUsService::removeContactUs Failed");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            }).catch(errRes => {
+                deferred.reject(errRes);
+            });
+
+            return deferred.promise;
+        }
+    }
+    ContactUsService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];
+    angular.module('ecompApp').service('contactUsService', ContactUsService)
+})();
index c4b2e57..9e5e69b 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by robertlo on 09/26/2016.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class DashboardService {\r
-        constructor($q, $log, $http, conf, uuid) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.dashboardService = null;\r
-            this.uuid = uuid;\r
-        }\r
-\r
-        getCommonWidgetData(widgetType) {\r
-            // this.$log.info('ecomp::dashboard-service::getting news data');\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.commonWidget + '?resourceType=' + widgetType;\r
-                \r
-            this.$http({\r
-                    method: "GET",\r
-                    url: url,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                        // this.$log.info('ecomp::dashboard-service::getting news data',res);\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0 || Object.keys(res.data.response) ==null || Object.keys(res.data.response.items) ==null) {\r
-                        deferred.reject("ecomp::dashboard-service::getNewsData Failed");\r
-                    } else {\r
-                        this.userProfile = res.data;\r
-                        // this.$log.info('ecomp::dashboard-service::getNewsData Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        saveCommonWidgetData(newData){\r
-            let deferred = this.$q.defer();\r
-            //this.$log.info('ecomp::dashboard-service::saveCommonWidgetData');\r
-            //this.$log.debug('ecomp::dashboard-service::saveCommonWidgetData with:', newData);\r
-\r
-            this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.commonWidget,\r
-                data: newData,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       // this.$log.info(res.data);\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ecomp::dashboard-service::saveCommonWidgetData Failed");\r
-                    } else {\r
-                        // this.$log.info('ecomp::dashboard-service::saveCommonWidgetData Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        \r
-        \r
-        removeCommonWidgetData(widgetToRemove){\r
-            let deferred = this.$q.defer();\r
-            // this.$log.info('ecomp::dashboard-service::removeCommonWidgetData');\r
-            // this.$log.debug('ecomp::dashboard-service::removeCommonWidgetData with:', widgetToRemove);\r
-            this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.deleteCommonWidget,\r
-                data: widgetToRemove,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       // this.$log.info(res.data);\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ecomp::dashboard-service::saveCommonWidgetData Failed");\r
-                    } else {\r
-                        // this.$log.info('ecomp::dashboard-service::saveCommonWidgetData Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        getSearchAllByStringResults(searchStr) {\r
-               // this.$log.info('ecomp::getSearchAllByStringResults::getting search by string results');\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.getSearchAllByStringResults;\r
-            \r
-            this.$http({\r
-                    method: "GET",\r
-                    url : url,\r
-                    params : {\r
-                       'searchString' : searchStr\r
-                    },\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ecomp::dashboard-service::getSearchAllByStringResults Failed");\r
-                    } else {\r
-                        //this.searchResults = res.data;\r
-                        // this.$log.info('ecomp::dashboard-service::getSearchAllByStringResults Succeeded');\r
-                        deferred.resolve(res.data.response);\r
-                    }\r
-                }).catch( status => {\r
-                    this.$log.error('ecomp::getSearchAllByStringResults error');\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-               \r
-        }\r
-        \r
-        getOnlineUserUpdateRate() {\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.onlineUserUpdateRate;\r
-            this.$http({\r
-                    method: "GET",\r
-                    url: url,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ecomp::dashboard-service::getOnlineUserUpdateRate Failed");\r
-                    } else {\r
-                       // this.$log.info('ecomp::dashboard-service::getOnlineUserUpdateRate Succeeded',res);\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                }).catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-    \r
-    }\r
-    \r
-    DashboardService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];\r
-    angular.module('ecompApp').service('dashboardService', DashboardService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by robertlo on 09/26/2016.
+ */
+'use strict';
+
+(function () {
+    class DashboardService {
+        constructor($q, $log, $http, conf, uuid) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.dashboardService = null;
+            this.uuid = uuid;
+        }
+
+        getCommonWidgetData(widgetType) {
+            // this.$log.info('ecomp::dashboard-service::getting news data');
+            let deferred = this.$q.defer();
+            let url = this.conf.api.commonWidget + '?resourceType=' + widgetType;
+                
+            this.$http({
+                    method: "GET",
+                    url: url,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                        // this.$log.info('ecomp::dashboard-service::getting news data',res);
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0 || Object.keys(res.data.response) ==null || Object.keys(res.data.response.items) ==null) {
+                        deferred.reject("ecomp::dashboard-service::getNewsData Failed");
+                    } else {
+                        this.userProfile = res.data;
+                        // this.$log.info('ecomp::dashboard-service::getNewsData Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        saveCommonWidgetData(newData){
+            let deferred = this.$q.defer();
+            //this.$log.info('ecomp::dashboard-service::saveCommonWidgetData');
+            //this.$log.debug('ecomp::dashboard-service::saveCommonWidgetData with:', newData);
+
+            this.$http({
+                method: "POST",
+                url: this.conf.api.commonWidget,
+                data: newData,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       // this.$log.info(res.data);
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ecomp::dashboard-service::saveCommonWidgetData Failed");
+                    } else {
+                        // this.$log.info('ecomp::dashboard-service::saveCommonWidgetData Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        
+        
+        removeCommonWidgetData(widgetToRemove){
+            let deferred = this.$q.defer();
+            // this.$log.info('ecomp::dashboard-service::removeCommonWidgetData');
+            // this.$log.debug('ecomp::dashboard-service::removeCommonWidgetData with:', widgetToRemove);
+            this.$http({
+                method: "POST",
+                url: this.conf.api.deleteCommonWidget,
+                data: widgetToRemove,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       // this.$log.info(res.data);
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ecomp::dashboard-service::saveCommonWidgetData Failed");
+                    } else {
+                        // this.$log.info('ecomp::dashboard-service::saveCommonWidgetData Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        getSearchAllByStringResults(searchStr) {
+               // this.$log.info('ecomp::getSearchAllByStringResults::getting search by string results');
+            let deferred = this.$q.defer();
+            let url = this.conf.api.getSearchAllByStringResults;
+            
+            this.$http({
+                    method: "GET",
+                    url : url,
+                    params : {
+                       'searchString' : searchStr
+                    },
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ecomp::dashboard-service::getSearchAllByStringResults Failed");
+                    } else {
+                        //this.searchResults = res.data;
+                        // this.$log.info('ecomp::dashboard-service::getSearchAllByStringResults Succeeded');
+                        deferred.resolve(res.data.response);
+                    }
+                }).catch( status => {
+                    this.$log.error('ecomp::getSearchAllByStringResults error');
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+               
+        }
+        
+        getOnlineUserUpdateRate() {
+            let deferred = this.$q.defer();
+            let url = this.conf.api.onlineUserUpdateRate;
+            this.$http({
+                    method: "GET",
+                    url: url,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ecomp::dashboard-service::getOnlineUserUpdateRate Failed");
+                    } else {
+                       // this.$log.info('ecomp::dashboard-service::getOnlineUserUpdateRate Succeeded',res);
+                        deferred.resolve(res.data);
+                    }
+                }).catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+    
+    }
+    
+    DashboardService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4'];
+    angular.module('ecompApp').service('dashboardService', DashboardService)
+})();
index 0ef930c..3be977b 100644 (file)
@@ -1,63 +1,63 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class ExternalRequestAccessService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getExternalRequestAccessServiceInfo() {\r
-            let deferred = this.$q.defer();\r
-            var _this = this;\r
-            let url = this.conf.api.externalRequestAccessSystem;\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: url,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                       if (res == null || res.data == null || _this.utilsService.isValidJSON(res.data) == false) {\r
-                        deferred.reject("ExternalRequestAccessService::getExternalRequestAccessServiceInfo Failed");\r
-                    }else{\r
-                    deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('ExternalRequestAccessService::getExternalRequestAccessServiceInfo Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-\r
-        }\r
-    }\r
-    ExternalRequestAccessService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('ExternalRequestAccessService', ExternalRequestAccessService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class ExternalRequestAccessService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+        getExternalRequestAccessServiceInfo() {
+            let deferred = this.$q.defer();
+            var _this = this;
+            let url = this.conf.api.externalRequestAccessSystem;
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: url,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                       if (res == null || res.data == null || _this.utilsService.isValidJSON(res.data) == false) {
+                        deferred.reject("ExternalRequestAccessService::getExternalRequestAccessServiceInfo Failed");
+                    }else{
+                    deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('ExternalRequestAccessService::getExternalRequestAccessServiceInfo Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+
+        }
+    }
+    ExternalRequestAccessService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('ExternalRequestAccessService', ExternalRequestAccessService)
+})();
index 3e3e1a5..0bfbe53 100644 (file)
@@ -1,23 +1,23 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 1/21/16.\r
- */\r
-angular.module('ecompApp').value('ECOMP_URL_REGEX', /^((?:https?\:\/\/|ftp?\:\/\/)?(w{3}.)?(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)[^-_.]$/i);\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 1/21/16.
+ */
+angular.module('ecompApp').value('ECOMP_URL_REGEX', /^((?:https?\:\/\/|ftp?\:\/\/)?(w{3}.)?(?:[-a-z0-9]+\.)*[-a-z0-9]+.*)[^-_.]$/i);
index 120cb64..89709a8 100644 (file)
@@ -1,64 +1,64 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by mlittle on 9/9/2016.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class ManifestService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getManifest() {\r
-            let deferred = this.$q.defer();\r
-            this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.getManifest,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                if (this.utilsService.isValidJSON(res)== false) {\r
-                    this.$log.error('ManifestService.getManifest failed: ');\r
-                    deferred.reject('ManifestService.getManifest: response.data null or not object');\r
-                } else {\r
-                    // this.$log.info('ManifestService.getManifest Succeeded');\r
-                    // this.$log.debug('ManifestService.getManifest: ', JSON.stringify(res))\r
-                    deferred.resolve(res.data);\r
-                }\r
-            }).catch( status => {\r
-                this.$log.error('ManifestService.getManifest failed: ' + status.data);\r
-                deferred.reject(status);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-\r
-    }\r
-    ManifestService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('manifestService', ManifestService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by mlittle on 9/9/2016.
+ */
+'use strict';
+
+(function () {
+    class ManifestService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+        getManifest() {
+            let deferred = this.$q.defer();
+            this.$http({
+                method: "GET",
+                url: this.conf.api.getManifest,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                if (this.utilsService.isValidJSON(res)== false) {
+                    this.$log.error('ManifestService.getManifest failed: ');
+                    deferred.reject('ManifestService.getManifest: response.data null or not object');
+                } else {
+                    // this.$log.info('ManifestService.getManifest Succeeded');
+                    // this.$log.debug('ManifestService.getManifest: ', JSON.stringify(res))
+                    deferred.resolve(res.data);
+                }
+            }).catch( status => {
+                this.$log.error('ManifestService.getManifest failed: ' + status.data);
+                deferred.reject(status);
+            });
+            return deferred.promise;
+        }
+
+    }
+    ManifestService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4', 'utilsService'];
+    angular.module('ecompApp').service('manifestService', ManifestService)
+})();
index 6cc0eff..957cb6d 100644 (file)
 
       return deferred.promise;
     }
-      
+
+    getEcompPortalTitle () {
+       let deferred = this.$q.defer();
+       this.$http({
+               method: 'GET',
+               url: this.conf.api.ecompTitle,
+               cache: false,
+               headers: {
+                       'X-ECOMP-RequestID':this.uuid.generate()
+               }
+       }).then( res => {
+               if (res.data==null || !this.utilsService.isValidJSON(res.data)) {                       
+                       deferred.reject('MenusService::getEcompPortalTitle rest call failed');
+               } else {
+                       if(res.data.status!='OK' && res.data.message!=null)
+                               deferred.reject('MenusService::getEcompPortalTitle rest call failed ' + res.data.message);
+                       else
+                               deferred.resolve(res.data);
+               }
+       })
+       .catch( status => {
+               this.$log.error('MenusService::getEcompPortalTitle rejection:' + status);
+               deferred.reject(status);
+       });
+
+       return deferred.promise;
+    }
+
     getFavoriteItems() {
       let deferred = this.$q.defer();
       // this.$log.info('MenusService::getFavoriteItems via REST API');
index cb27cd4..393e7cc 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class MicroserviceService {\r
-        constructor($q, $log, $http, conf,uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;   \r
-        }\r
-        \r
-        createService(newService) {\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.widgetCommon,\r
-                data: newService,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::createService Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::createService Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::createService Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::createService Failed: Invalid JSON format");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        \r
-        updateService(serviceId, newService) {\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "PUT",\r
-                url: this.conf.api.widgetCommon + "/" + serviceId,\r
-                data: newService,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::updateService Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::updateService Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::updateService Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::updateService Failed: Invalid JSON format");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        deleteService(serviceId) {\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "DELETE",\r
-                url: this.conf.api.widgetCommon + "/" + serviceId,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::deleteService Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::deleteService Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::deleteService Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::deleteService Failed: Invalid JSON format");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getServiceList() {\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.widgetCommon,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::getServiceList Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::getServiceList Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::getServiceList Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::getServiceList Failed: Invalid JSON format");\r
-                }  else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getWidgetListByService(serviceId) {\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.widgetCommon + '/' + serviceId,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::getWidgetListByService Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::getWidgetListByService Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::getWidgetListByService Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::getWidgetListByService Failed: Invalid JSON format");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getUserParameterById(paramId){\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "GET",\r
-                url: this.conf.api.widgetCommon + '/services/' +  paramId,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::getUserParameterById Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::getUserParameterById Failed: Result or result.data is null");\r
-                } else if (!this.utilsService.isValidJSON(res.data)) {\r
-                       this.$log.error('MicroserviceService::getUserParameterById Failed: Invalid JSON format');\r
-                    deferred.reject("MicroserviceService::getUserParameterById Failed: Invalid JSON format");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        deleteUserParameterById(paramId){\r
-               let deferred = this.$q.defer();\r
-               this.$http({\r
-                method: "DELETE",\r
-                url: this.conf.api.widgetCommon + '/services/' +  paramId,\r
-                cache: false,\r
-                headers:{\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                               this.$log.error('MicroserviceService::deleteUserParameterById Failed: Result or result.data is null');\r
-                     deferred.reject("MicroserviceService::deleteUserParameterById Failed: Result or result.data is null");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-    }\r
-    \r
-    MicroserviceService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('microserviceService', MicroserviceService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class MicroserviceService {
+        constructor($q, $log, $http, conf,uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;   
+        }
+        
+        createService(newService) {
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "POST",
+                url: this.conf.api.widgetCommon,
+                data: newService,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::createService Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::createService Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::createService Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::createService Failed: Invalid JSON format");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        
+        updateService(serviceId, newService) {
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "PUT",
+                url: this.conf.api.widgetCommon + "/" + serviceId,
+                data: newService,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::updateService Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::updateService Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::updateService Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::updateService Failed: Invalid JSON format");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        deleteService(serviceId) {
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "DELETE",
+                url: this.conf.api.widgetCommon + "/" + serviceId,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::deleteService Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::deleteService Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::deleteService Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::deleteService Failed: Invalid JSON format");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        getServiceList() {
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "GET",
+                url: this.conf.api.widgetCommon,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::getServiceList Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::getServiceList Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::getServiceList Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::getServiceList Failed: Invalid JSON format");
+                }  else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        getWidgetListByService(serviceId) {
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "GET",
+                url: this.conf.api.widgetCommon + '/' + serviceId,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::getWidgetListByService Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::getWidgetListByService Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::getWidgetListByService Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::getWidgetListByService Failed: Invalid JSON format");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        getUserParameterById(paramId){
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "GET",
+                url: this.conf.api.widgetCommon + '/services/' +  paramId,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::getUserParameterById Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::getUserParameterById Failed: Result or result.data is null");
+                } else if (!this.utilsService.isValidJSON(res.data)) {
+                       this.$log.error('MicroserviceService::getUserParameterById Failed: Invalid JSON format');
+                    deferred.reject("MicroserviceService::getUserParameterById Failed: Invalid JSON format");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        deleteUserParameterById(paramId){
+               let deferred = this.$q.defer();
+               this.$http({
+                method: "DELETE",
+                url: this.conf.api.widgetCommon + '/services/' +  paramId,
+                cache: false,
+                headers:{
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                               this.$log.error('MicroserviceService::deleteUserParameterById Failed: Result or result.data is null');
+                     deferred.reject("MicroserviceService::deleteUserParameterById Failed: Result or result.data is null");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+    }
+    
+    MicroserviceService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('microserviceService', MicroserviceService)
+})();
index cf180e8..d7d4607 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by wl849v on 12/14/2016.\r
- */\r
-'use strict';\r
-(function () {\r
-    class NotificationService {\r
-       constructor($q, $log, $http, conf, uuid,utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.notificationCount = {count:0};\r
-            this.refreshCount = 0;\r
-            this.maxCount = 0;\r
-            this.utilsService = utilsService;            \r
-        }      \r
-        getNotificationCount() {\r
-                return this.notificationCount;\r
-        }\r
-        setNotificationCount(count) {\r
-               this.notificationCount.count = count;\r
-        }\r
-        getRefreshCount() {\r
-            return this.refreshCount;\r
-        }\r
-        setRefreshCount(count){\r
-            this.refreshCount = count;\r
-        }\r
-        setMaxRefreshCount(count){\r
-            this.maxCount = count;\r
-        }\r
-        decrementRefreshCount(){\r
-            this.refreshCount = this.refreshCount - 1;\r
-        }\r
-        \r
-        getNotificationRate() {\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.notificationUpdateRate;\r
-            this.$http({\r
-                    method: "GET",\r
-                    url: url,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       if (Object.keys(res.data).length == 0) {\r
-                        deferred.reject("ecomp::NotificationService::getNotificationRate Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                }).catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getNotification(){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.getNotifications,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::getNotification Failed');\r
-                        deferred.reject("NotificationService::getNotification Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getNotification Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-       }\r
-        getNotificationHistory(){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.getNotificationHistory,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::getNotification Failed');\r
-                        deferred.reject("NotificationService::getNotification Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getNotification Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-       }\r
-        \r
-        getAdminNotification(){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.getAdminNotifications,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::getAdminNotification Failed');\r
-                        deferred.reject("NotificationService::getAdminNotification Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getAdminNotification Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-       }\r
-\r
-        \r
-        getMessageRecipients(notificationId){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                   url: this.conf.api.getMessageRecipients+"?notificationId="+notificationId,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res.data)=== false) {\r
-                       this.$log.error('NotificationService::getMessageRecipients Failed');\r
-                        deferred.reject("NotificationService::getMessageRecipients Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getMappedRecipients Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-       }\r
-        \r
-        getAppRoleIds(){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.getAllAppRoleIds,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::getAppRoleIds Failed');\r
-                        deferred.reject("NotificationService::getAppRoleIds Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getAppRoleIds Failed', status);\r
-                    deferred.reject(status);\r
-                });           \r
-            return deferred.promise;\r
-       }\r
-\r
-        getNotificationRoles(notificationId){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.getNotificationRoles + '/'+notificationId+'/roles',\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success                 \r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::getAdminNotification Failed');\r
-                        deferred.reject("NotificationService::getAdminNotification Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::getAdminNotification Failed', status);\r
-                    deferred.reject(status);\r
-                });           \r
-            return deferred.promise;\r
-       }\r
-\r
-        addAdminNotification(newAdminNotif){\r
-            let deferred = this.$q.defer();\r
-            // this.$log.debug('applications-service::addOnboardingApp with:', newApp);\r
-\r
-            this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.saveNotification,\r
-                data: newAdminNotif,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       // But don't declare an empty list to be an error.\r
-                    if (res == null || res.data == null) {\r
-                        deferred.reject("NotificationService::addAdminNotification Failed");\r
-                    } else {\r
-                        // this.$log.info('NotificationService::addAdminNotification Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        updateAdminNotification(adminNotif){\r
-            let deferred = this.$q.defer();\r
-            this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.saveNotification,\r
-                data: adminNotif,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                       // But don't declare an empty list to be an error.\r
-                    if (res == null || res.data == null) {\r
-                        deferred.reject("NotificationService::updateAdminNotification Failed");\r
-                    } else {\r
-                        // this.$log.info('NotificationService::updateAdminNotification Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        setNotificationRead(notificationId){\r
-               let deferred = this.$q.defer();\r
-            this.$http({\r
-                    method: "GET",\r
-                    cache: false,\r
-                    url: this.conf.api.notificationRead+"?notificationId="+notificationId,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                })\r
-                .then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)=== false) {\r
-                       this.$log.error('NotificationService::setNotificationRead Failed');\r
-                        deferred.reject("NotificationService::setNotificationRead Failed");\r
-                    } else {\r
-                        deferred.resolve(res);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('NotificationService::setNotificationRead Failed', status);\r
-                    deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;   \r
-        }\r
-    }\r
-    NotificationService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4','utilsService'];\r
-    angular.module('ecompApp').service('notificationService', NotificationService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by wl849v on 12/14/2016.
+ */
+'use strict';
+(function () {
+    class NotificationService {
+       constructor($q, $log, $http, conf, uuid,utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.notificationCount = {count:0};
+            this.refreshCount = 0;
+            this.maxCount = 0;
+            this.utilsService = utilsService;            
+        }      
+        getNotificationCount() {
+                return this.notificationCount;
+        }
+        setNotificationCount(count) {
+               this.notificationCount.count = count;
+        }
+        getRefreshCount() {
+            return this.refreshCount;
+        }
+        setRefreshCount(count){
+            this.refreshCount = count;
+        }
+        setMaxRefreshCount(count){
+            this.maxCount = count;
+        }
+        decrementRefreshCount(){
+            this.refreshCount = this.refreshCount - 1;
+        }
+        
+        getNotificationRate() {
+            let deferred = this.$q.defer();
+            let url = this.conf.api.notificationUpdateRate;
+            this.$http({
+                    method: "GET",
+                    url: url,
+                    cache: false,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       if (Object.keys(res.data).length == 0) {
+                        deferred.reject("ecomp::NotificationService::getNotificationRate Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                }).catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        getNotification(){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getNotifications,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::getNotification Failed');
+                        deferred.reject("NotificationService::getNotification Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getNotification Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+       }
+        getNotificationHistory(){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getNotificationHistory,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::getNotification Failed');
+                        deferred.reject("NotificationService::getNotification Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getNotification Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+       }
+        
+        getAdminNotification(){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getAdminNotifications,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::getAdminNotification Failed');
+                        deferred.reject("NotificationService::getAdminNotification Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getAdminNotification Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+       }
+
+        
+        getMessageRecipients(notificationId){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                   url: this.conf.api.getMessageRecipients+"?notificationId="+notificationId,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res.data)=== false) {
+                       this.$log.error('NotificationService::getMessageRecipients Failed');
+                        deferred.reject("NotificationService::getMessageRecipients Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getMappedRecipients Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+       }
+        
+        getAppRoleIds(){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getAllAppRoleIds,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::getAppRoleIds Failed');
+                        deferred.reject("NotificationService::getAppRoleIds Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getAppRoleIds Failed', status);
+                    deferred.reject(status);
+                });           
+            return deferred.promise;
+       }
+
+        getNotificationRoles(notificationId){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getNotificationRoles + '/'+notificationId+'/roles',
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::getAdminNotification Failed');
+                        deferred.reject("NotificationService::getAdminNotification Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getAdminNotification Failed', status);
+                    deferred.reject(status);
+                });           
+            return deferred.promise;
+       }
+
+        addAdminNotification(newAdminNotif){
+            let deferred = this.$q.defer();
+            // this.$log.debug('applications-service::addOnboardingApp with:', newApp);
+
+            this.$http({
+                method: "POST",
+                url: this.conf.api.saveNotification,
+                data: newAdminNotif,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       // But don't declare an empty list to be an error.
+                    if (res == null || res.data == null) {
+                        deferred.reject("NotificationService::addAdminNotification Failed");
+                    } else {
+                        // this.$log.info('NotificationService::addAdminNotification Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        updateAdminNotification(adminNotif){
+            let deferred = this.$q.defer();
+            this.$http({
+                method: "POST",
+                url: this.conf.api.saveNotification,
+                data: adminNotif,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                       // But don't declare an empty list to be an error.
+                    if (res == null || res.data == null) {
+                        deferred.reject("NotificationService::updateAdminNotification Failed");
+                    } else {
+                        // this.$log.info('NotificationService::updateAdminNotification Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        setNotificationRead(notificationId){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.notificationRead+"?notificationId="+notificationId,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)=== false) {
+                       this.$log.error('NotificationService::setNotificationRead Failed');
+                        deferred.reject("NotificationService::setNotificationRead Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::setNotificationRead Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;   
+        }
+    }
+    NotificationService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4','utilsService'];
+    angular.module('ecompApp').service('notificationService', NotificationService)
+})();
diff --git a/ecomp-portal-FE-common/client/app/services/recommendation/recommendation.service.js b/ecomp-portal-FE-common/client/app/services/recommendation/recommendation.service.js
new file mode 100644 (file)
index 0000000..aa2a463
--- /dev/null
@@ -0,0 +1,88 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by wl849v on 12/14/2016.
+ */
+'use strict';
+(function () {
+    class RecommendationService {
+       constructor($q, $log, $http, conf, uuid,utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.recommendationCount = {count:0};
+            this.refreshCount = 0;
+            this.maxCount = 0;
+            this.utilsService = utilsService;            
+        }      
+        getRecommendationCount() {
+                return this.recommendationCount;
+         }
+        setRecommendationCount(count) {
+               this.recommendationCount.count = count;
+        }
+        getRefreshCount() {
+            return this.refreshCount;
+        }
+        setRefreshCount(count){
+            this.refreshCount = count;
+        }
+        setMaxRefreshCount(count){
+            this.maxCount = count;
+        }
+        decrementRefreshCount(){
+            this.refreshCount = this.refreshCount - 1;
+        }
+        
+        
+        getRecommendations(){
+               let deferred = this.$q.defer();
+            this.$http({
+                    method: "GET",
+                    cache: false,
+                    url: this.conf.api.getRecommendations,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                })
+                .then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success                 
+                    if (this.utilsService.isValidJSON(res.data)=== false) {
+                       this.$log.error('NotificationService::getRecommendations Failed');
+                        deferred.reject("NotificationService::getRecommendations Failed");
+                    } else {
+                        deferred.resolve(res);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('NotificationService::getRecommendations Failed', status);
+                    deferred.reject(status);
+                });
+           
+            return deferred.promise;
+       }
+        
+       
+    }
+    RecommendationService.$inject = ['$q', '$log', '$http', 'conf', 'uuid4','utilsService'];
+    angular.module('ecompApp').service('recommendationService', RecommendationService)
+})();
index f8fee13..ee2cd53 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-app.factory('RoleService', function ($http, $q, conf,uuid4) {\r
-       return {\r
-               getRoles: function() {\r
-                       return $http.get(conf.api.getRoles,{\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':uuid4.generate()\r
-                }\r
-            })\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-\r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               saveRoleFunction: function() {\r
-                       return $http.post(conf.api.saveRoleFuncion)\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-\r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getRoleFunctionList: function() {\r
-                       return $http.get(conf.api.getRoleFunctions,{\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':uuid4.generate()\r
-                }\r
-            })\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-\r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getFnMenuItems: function(){\r
-                       \r
-                       return $http.get('admin_fn_menu')\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       \r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-\r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });                     \r
-               },\r
-\r
-               getCacheRegions: function() {\r
-                       return $http.get('get_regions')\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getUsageList: function() {\r
-                       return $http.get('get_usage_list')\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getBroadcastList: function() {\r
-                       return $http.get('get_broadcast_list')\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getBroadcast: function(messageLocationId, messageLocation, messageId) {\r
-                       return $http.get('get_broadcast?message_location_id='+messageLocationId + '&message_location=' + messageLocation + ((messageId != null) ? '&message_id=' + messageId : ''))\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getCollaborateList: function() {\r
-                       return $http.get('get_collaborate_list')\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               },\r
-               \r
-               getRole: function(roleId) {\r
-                       \r
-                       return $http.get(conf.api.getRole + '?role_id=' + roleId,{\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':uuid4.generate()\r
-                }\r
-            })\r
-                       .then(function(response) {\r
-                               if (typeof response.data === 'object') {\r
-                                       return response.data;\r
-                               } else {\r
-                                       return $q.reject(response.data);\r
-                               }\r
-       \r
-                       }, function(response) {\r
-                               // something went wrong\r
-                               return $q.reject(response.data);\r
-                       });\r
-               }\r
-       };\r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+app.factory('RoleService', function ($http, $q, conf,uuid4) {
+       return {
+               getRoles: function() {
+                       return $http.get(conf.api.getRoles,{
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':uuid4.generate()
+                }
+            })
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               saveRoleFunction: function() {
+                       return $http.post(conf.api.saveRoleFuncion)
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getRoleFunctionList: function() {
+                       return $http.get(conf.api.getRoleFunctions,{
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':uuid4.generate()
+                }
+            })
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getFnMenuItems: function(){
+                       
+                       return $http.get('admin_fn_menu')
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });                     
+               },
+
+               getCacheRegions: function() {
+                       return $http.get('get_regions')
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getUsageList: function() {
+                       return $http.get('get_usage_list')
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getBroadcastList: function() {
+                       return $http.get('get_broadcast_list')
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getBroadcast: function(messageLocationId, messageLocation, messageId) {
+                       return $http.get('get_broadcast?message_location_id='+messageLocationId + '&message_location=' + messageLocation + ((messageId != null) ? '&message_id=' + messageId : ''))
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getCollaborateList: function() {
+                       return $http.get('get_collaborate_list')
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               },
+               
+               getRole: function(roleId) {
+                       
+                       return $http.get(conf.api.getRole + '?role_id=' + roleId,{
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':uuid4.generate()
+                }
+            })
+                       .then(function(response) {
+                               if (typeof response.data === 'object') {
+                                       return response.data;
+                               } else {
+                                       return $q.reject(response.data);
+                               }
+       
+                       }, function(response) {
+                               // something went wrong
+                               return $q.reject(response.data);
+                       });
+               }
+       };
+});
index 894aac0..808a663 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by doritrieur on 12/8/15.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class UsersService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-\r
-        searchUsers(queryString) {\r
-            let canceller = this.$q.defer();\r
-            let isActive = false;\r
-\r
-            let cancel = () => {\r
-                if(isActive){\r
-                    this.$log.debug('UsersService::searchUsers: canceling the request');\r
-                    canceller.resolve();\r
-                }\r
-            };\r
-\r
-            let promise = () => {\r
-                let deferred = this.$q.defer();\r
-                if(!queryString){\r
-                    return deferred.reject(new Error('query string is mandatory'));\r
-                }\r
-                isActive = true;\r
-                this.$http({\r
-                    method: 'GET',\r
-                    url: this.conf.api.queryUsers,\r
-                    params: {search: queryString},\r
-                    cache: false,\r
-                    timeout: canceller.promise,\r
-                    headers: {\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-                }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('UsersService::queryUsers Failed');\r
-                    } else {\r
-                        //this.$log.info('UsersService::queryUsers Succeeded');\r
-                        isActive = false;\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                }).catch( status => {\r
-                    isActive = false;\r
-                    deferred.reject('UsersService::searchUsers:: API Failed with status: ' + status);\r
-                });\r
-                return deferred.promise;\r
-            };\r
-\r
-            return {\r
-                cancel: cancel,\r
-                promise: promise\r
-            };\r
-\r
-        }\r
-\r
-        getAccountUsers(appId) {\r
-            let deferred = this.$q.defer();\r
-            let log = this.$log;\r
-            // this.$log.debug('UsersService::getAccountUsers for appId: ' + appId);\r
-\r
-            let url = this.conf.api.accountUsers.replace(':appId', appId);\r
-            this.$http({\r
-                method: 'GET',\r
-                url: url,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('UsersService::getAccountUsers for appId Failed');\r
-                    } else {\r
-                        // log.info('UsersService::getAccountUsers(appId) Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                    log.error('getAccountUsers(appId) $http error = ', status);\r
-                    deferred.reject(status);\r
-                });\r
-\r
-            return deferred.promise;\r
-        }\r
-\r
-        getUserAppRoles(appid, orgUserId){\r
-//            let deferred = this.$q.defer();\r
-               let canceller = this.$q.defer();\r
-            let isActive = false;\r
-\r
-            let cancel = () => {\r
-                if(isActive){\r
-                    this.$log.debug('UsersService::getUserAppRoles: canceling the request');\r
-                    canceller.resolve();\r
-                }\r
-            };\r
-\r
-            // this.$log.info('UsersService::getUserAppRoles');\r
-\r
-            let promise = () => {\r
-                let deferred = this.$q.defer();\r
-                isActive = false;\r
-            this.$http({\r
-                method: 'GET',\r
-                url: this.conf.api.userAppRoles,\r
-                params: {user: orgUserId, app: appid},\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    //this.$log.debug('getUserAppRoles response: ', JSON.stringify(res))\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('UsersService::getUserAppRoles: Failed');\r
-                    } else {\r
-                       isActive = false;\r
-                        //this.$log.info('UsersService::getUserAppRoles: Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       isActive = false;\r
-                    deferred.reject(status);\r
-                });\r
-\r
-            return deferred.promise;\r
-            };\r
-            \r
-            return {\r
-                cancel: cancel,\r
-                promise: promise\r
-            };\r
-        }\r
-\r
-        updateUserAppRoles(newUserAppRoles) {\r
-//            let deferred = this.$q.defer();\r
-            let canceller = this.$q.defer();\r
-            let isActive = false;\r
-\r
-            let cancel = () => {\r
-                if(isActive){\r
-                    this.$log.debug('UsersService::updateUserAppRoles: canceling the request');\r
-                    canceller.resolve();\r
-                }\r
-            };\r
-\r
-            // this.$log.info('UsersService::updateUserAppRoles');\r
-            let promise = () => {\r
-                let deferred = this.$q.defer();\r
-            this.$http({\r
-                method: 'PUT',\r
-                url: this.conf.api.userAppRoles,\r
-                data: newUserAppRoles,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                // this.$log.debug('getUserAppRoles response: ', JSON.stringify(res))\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (this.utilsService.isValidJSON(res)== false) {\r
-                    deferred.reject('UsersService::updateUserAppRoles: Failed');\r
-                } else {\r
-                    // this.$log.info('UsersService::updateUserAppRoles: Succeeded');\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch( status => {\r
-                deferred.reject(status);\r
-            });\r
-\r
-            return deferred.promise;\r
-            };\r
-            \r
-            return {\r
-                cancel: cancel,\r
-                promise: promise\r
-            };\r
-\r
-        }\r
-\r
-    }\r
-    UsersService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('usersService', UsersService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by doritrieur on 12/8/15.
+ */
+'use strict';
+
+(function () {
+    class UsersService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+
+        searchUsers(queryString) {
+            let canceller = this.$q.defer();
+            let isActive = false;
+
+            let cancel = () => {
+                if(isActive){
+                    this.$log.debug('UsersService::searchUsers: canceling the request');
+                    canceller.resolve();
+                }
+            };
+
+            let promise = () => {
+                let deferred = this.$q.defer();
+                if(!queryString){
+                    return deferred.reject(new Error('query string is mandatory'));
+                }
+                isActive = true;
+                this.$http({
+                    method: 'GET',
+                    url: this.conf.api.queryUsers,
+                    params: {search: queryString},
+                    cache: false,
+                    timeout: canceller.promise,
+                    headers: {
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+                }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('UsersService::queryUsers Failed');
+                    } else {
+                        //this.$log.info('UsersService::queryUsers Succeeded');
+                        isActive = false;
+                        deferred.resolve(res.data);
+                    }
+                }).catch( status => {
+                    isActive = false;
+                    deferred.reject('UsersService::searchUsers:: API Failed with status: ' + status);
+                });
+                return deferred.promise;
+            };
+
+            return {
+                cancel: cancel,
+                promise: promise
+            };
+
+        }
+
+        getAccountUsers(appId) {
+            let deferred = this.$q.defer();
+            let log = this.$log;
+            // this.$log.debug('UsersService::getAccountUsers for appId: ' + appId);
+
+            let url = this.conf.api.accountUsers.replace(':appId', appId);
+            this.$http({
+                method: 'GET',
+                url: url,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('UsersService::getAccountUsers for appId Failed');
+                    } else {
+                        // log.info('UsersService::getAccountUsers(appId) Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                    log.error('getAccountUsers(appId) $http error = ', status);
+                    deferred.reject(status);
+                });
+
+            return deferred.promise;
+        }
+
+        getUserAppRoles(appid, orgUserId, extRequestValue){
+               let canceller = this.$q.defer();
+            let isActive = false;
+
+            let cancel = () => {
+                if(isActive){
+                    this.$log.debug('UsersService::getUserAppRoles: canceling the request');
+                    canceller.resolve();
+                }
+            };
+
+            let promise = () => {
+                let deferred = this.$q.defer();
+                isActive = false;
+            this.$http({
+                method: 'GET',
+                url: this.conf.api.userAppRoles,
+                params: {user: orgUserId, app: appid, externalRequest: extRequestValue},
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    if (!this.utilsService.isValidJSON(res.data)) {
+                        deferred.reject('UsersService::getUserAppRoles: Failed');
+                    } else {
+                       isActive = false;
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       isActive = false;
+                    deferred.reject(status);
+                });
+
+            return deferred.promise;
+            };
+            
+            return {
+                cancel: cancel,
+                promise: promise
+            };
+        }
+
+        updateUserAppRoles(newUserAppRoles) {
+//            let deferred = this.$q.defer();
+            let canceller = this.$q.defer();
+            let isActive = false;
+
+            let cancel = () => {
+                if(isActive){
+                    this.$log.debug('UsersService::updateUserAppRoles: canceling the request');
+                    canceller.resolve();
+                }
+            };
+
+            // this.$log.info('UsersService::updateUserAppRoles');
+            let promise = () => {
+                let deferred = this.$q.defer();
+            this.$http({
+                method: 'PUT',
+                url: this.conf.api.userAppRoles,
+                data: newUserAppRoles,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                // this.$log.debug('getUserAppRoles response: ', JSON.stringify(res))
+                // If response comes back as a redirected HTML page which IS NOT a success
+                if (this.utilsService.isValidJSON(res)== false) {
+                    deferred.reject('UsersService::updateUserAppRoles: Failed');
+                } else {
+                    // this.$log.info('UsersService::updateUserAppRoles: Succeeded');
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch( status => {
+                deferred.reject(status);
+            });
+
+            return deferred.promise;
+            };
+            
+            return {
+                cancel: cancel,
+                promise: promise
+            };
+
+        }
+        
+        getLoggedInUser () {
+               let deferred = this.$q.defer();
+               this.$http({
+                       method: 'GET',
+                       url: this.conf.api.loggedinUser,
+                       cache: false,
+                       headers: {
+                               'X-ECOMP-RequestID':this.uuid.generate(),
+                               'Content-Type': 'application/json'
+                },
+                data: ''
+               }).then( res => {
+                       if (res.data==null || !this.utilsService.isValidJSON(res.data)) {                       
+                               deferred.reject('MenusService::getLoggedInUser rest call failed');
+                       } else {
+                               if(res.data.status!='OK' && res.data.message!=null)
+                               deferred.reject('MenusService::getLoggedInUser rest call failed ' + res.data.message);
+                               else
+                                       deferred.resolve(res.data);
+                       }
+               })
+               .catch( status => {
+                       this.$log.error('MenusService::getLoggedInUser rejection:' + status);
+                       deferred.reject(status);
+               });
+
+               return deferred.promise;
+        }
+        
+        modifyLoggedInUser (profileDetail) {
+               let deferred = this.$q.defer();
+               this.$http({
+                       method: 'PUT',
+                       url: this.conf.api.modifyLoggedinUser,
+                       cache: false,
+                       headers: {
+                               'X-ECOMP-RequestID':this.uuid.generate(),
+                               'Content-Type': 'application/json'
+                },
+                data: profileDetail
+               }).then( res => {
+                       if (res.data==null || !this.utilsService.isValidJSON(res.data)) {                       
+                               deferred.reject('MenusService::getLoggedInUser rest call failed');
+                       } else {
+                               if(res.data.status!='OK' && res.data.message!=null)
+                               deferred.reject('MenusService::getLoggedInUser rest call failed ' + res.data.message);
+                               else
+                                       deferred.resolve(res.data);
+                       }
+               })
+               .catch( status => {
+                       console.log(status);
+                       this.$log.error('MenusService::getLoggedInUser rejection:' + status);
+                       deferred.reject(status);
+               });
+
+               return deferred.promise;
+        }
+
+    }
+    UsersService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('usersService', UsersService)
+})();
index 99ace1c..c3b57e3 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-       class WidgetsCatalogService {\r
-        constructor($q, $log, $http, conf,uuid,base64Service, beReaderService, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.base64Service = base64Service;\r
-            this.beReaderService = beReaderService;\r
-            this.utilsService = utilsService;\r
-        }\r
-        \r
-        getUserWidgets(loginName) {\r
-                let deferred = this.$q.defer();\r
-                this.$http({\r
-                        method: "GET",\r
-                    url: this.conf.api.widgetCommon + '/widgetCatalog' + '/' + loginName,\r
-                    cache: false,\r
-                    headers: {\r
-                        'X-Widgets-Type': 'all',\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                    }\r
-             }).then(res => {\r
-                       if (res == null || res.data == null) {\r
-                     deferred.reject("WidgetsCatalogService::getUserWidgets Failed");\r
-                 } else {\r
-                     deferred.resolve(res.data);\r
-                 }\r
-             })\r
-             .catch(status => {\r
-                deferred.reject(status);\r
-                });\r
-             return deferred.promise;\r
-        }\r
-\r
-        getManagedWidgets() {                  \r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.widgetCommon + '/widgetCatalog';\r
-            this.$http({\r
-               method: "GET",\r
-               url: url,\r
-               cache: false,\r
-               headers: {\r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-               }\r
-            }).then(res => {\r
-                       if (res == null || res.data == null) {\r
-                     deferred.reject("WidgetsCatalogService::getManagedWidgets Failed");\r
-                 } else {\r
-                     deferred.resolve(res.data);\r
-                 }\r
-             })\r
-             .catch(status => {\r
-                 deferred.reject(status);\r
-             });  \r
-            return deferred.promise;\r
-        }\r
-        \r
-        createWidget(newWidget, file) {\r
-               console.log(newWidget);\r
-               let deferred = this.$q.defer();\r
-               var formData = new FormData();\r
-               formData.append('file', file);\r
-               this.$http({\r
-                method: "POST",\r
-                url: this.conf.api.widgetCommon + '/widgetCatalog',\r
-                transformRequest: angular.identity,  \r
-                data: formData,\r
-                headers:{  \r
-                       'Content-Type': undefined,\r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                },\r
-                params:{\r
-                       'newWidget': newWidget\r
-                }\r
-            }).then(res => {\r
-               if (res == null || res.data == null) {\r
-                    deferred.reject("WidgetsCatalogService::getManagedWidgets Failed");\r
-                } else {\r
-                    deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(errRes => {\r
-                deferred.reject(errRes);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        updateWidgetWithFile(file, widgetId, newWidget){\r
-               console.log(widgetId);\r
-               let deferred = this.$q.defer();\r
-            var formData = new FormData();\r
-               formData.append('file', file);\r
-               let url = this.conf.api.widgetCommon + '/widgetCatalog/' + widgetId;\r
-               this.$http({\r
-                method: 'POST',\r
-                url: url, \r
-                transformRequest: angular.identity,  \r
-                data: formData,\r
-                headers: {        \r
-                       'Content-Type': undefined,\r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                },\r
-                       params:{\r
-                               'newWidget': newWidget\r
-                       }\r
-            })\r
-            .then(res => {\r
-               if (res == null || res.data == null)\r
-                  deferred.reject("WidgetsCatalogService::saveWidgetFile Failed");\r
-               else \r
-                  deferred.resolve(res.data);\r
-            })\r
-            .catch(status => {\r
-                 deferred.reject(status);\r
-             });  \r
-               return deferred.promise;\r
-        }\r
-        \r
-        updateWidget(widgetId, widgetData) {\r
-            let deferred = this.$q.defer();\r
-            let url = this.conf.api.widgetCommon  + '/widgetCatalog' + '/' + widgetId;\r
-            this.$http({\r
-               method: 'PUT',\r
-               url: url,\r
-               cache: false,\r
-               data: widgetData,\r
-               headers: {\r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-               }\r
-            })\r
-            .then(res => {\r
-               deferred.resolve(res.data);\r
-            })\r
-            .catch(errRes => {\r
-               deferred.reject(errRes);\r
-            });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        \r
-        deleteWidgetFile(widgetName) {\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::deleteWidgetCatalog');\r
-            let url = this.conf.api.widgetCommon + '/doUpload' + '/' + widgetName;\r
-            this.$http({\r
-                method: "DELETE",\r
-                url: url,\r
-                cache: false,\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    deferred.resolve(res.data); \r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        deleteWidget(widgetId) {\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::deleteWidgetCatalog');\r
-            let url = this.conf.api.widgetCommon + '/widgetCatalog'  + '/' + widgetId;\r
-            this.$http({\r
-                method: "DELETE",\r
-                url: url,\r
-                cache: false,\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    deferred.resolve(res.data); \r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        downloadWidgetFile(widgetId) {\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::downloadWidgetFile');\r
-            let url = this.conf.api.widgetCommon + '/download/' + widgetId;\r
-            console.log(url);\r
-            this.$http({\r
-                method: "GET",\r
-                url: url,\r
-                cache: false,\r
-                responseType: "arraybuffer",\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    deferred.resolve(res.data); \r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        updateWidgetCatalog(appData){\r
-               let deferred = this.$q.defer();\r
-            // Validate the request, maybe this is overkill\r
-            if (appData == null || appData.widgetId == null || appData.select == null) {\r
-               var msg = 'WidgetCatalogService::updateAppCatalog: field appId and/or select not found';\r
-                this.$log.error(msg);\r
-                return deferred.reject(msg);\r
-            }\r
-            this.$http({\r
-                method: "PUT",\r
-                url: this.conf.api.widgetCatalogSelection,\r
-                data: appData,\r
-                headers: {\r
-                        'X-Widgets-Type': 'all',\r
-                        'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then( res => {\r
-                    // Detect non-JSON\r
-                    if (res == null || res.data == null) {\r
-                        deferred.reject("WidgetCatalogService::updateAppCatalog Failed");\r
-                    } else {\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch( status => {\r
-                       this.$log.error('WidgetCatalogService:updateAppCatalog failed: ' + status);\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-        \r
-        getServiceJSON(serviceId){\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::getServiceJSON');\r
-            let url = this.conf.api.microserviceProxy + "/" + serviceId;\r
-            console.log(url);\r
-            this.$http({\r
-                method: "GET",\r
-                url: url,\r
-                cache: false,\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                       if (res == null || res == null) {\r
-                                       this.$log.error('WidgetCatalogService::getServiceJSON Failed: Result or result.data is null');\r
-                           deferred.reject("WidgetCatalogService::getServiceJSON Failed: Result or result.data is null");\r
-                       } else{\r
-                               deferred.resolve(res.data);\r
-                       }\r
-                       \r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        getWidgetCatalogParameters(widgetId){\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::getWidgetCatalogParameters');\r
-            let url = this.conf.api.widgetCommon + "/parameters/" + widgetId;\r
-            console.log(url);\r
-            this.$http({\r
-                method: "GET",\r
-                url: url,\r
-                cache: false,\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                       if (res == null || res.data == null) {\r
-                                       this.$log.error('WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null');\r
-                           deferred.reject("WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null");\r
-                       } else {\r
-                           deferred.resolve(res.data);\r
-                       }\r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-        \r
-        saveWidgetParameter(widgetParamObject){\r
-               let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsCatalogService::saveWidgetParameter');\r
-            let url = this.conf.api.widgetCommon + "/parameters";\r
-            this.$http({\r
-                method: "POST",\r
-                url: url,\r
-                cache: false,\r
-                data: widgetParamObject,\r
-                headers:{  \r
-                       'X-Widgets-Type': 'all',\r
-                       'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                       if (res == null || res.data == null) {\r
-                                       this.$log.error('WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null');\r
-                           deferred.reject("WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null");\r
-                       } else {\r
-                           deferred.resolve(res.data);\r
-                       }\r
-                })\r
-                .catch(status => {\r
-                       deferred.reject(status);\r
-                });\r
-           \r
-            return deferred.promise;\r
-        }\r
-        \r
-    }\r
-    \r
-    WidgetsCatalogService.$inject = ['$q', '$log', '$http', 'conf','uuid4','base64Service', 'beReaderService', 'utilsService'];\r
-    angular.module('ecompApp').service('widgetsCatalogService', WidgetsCatalogService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+       class WidgetsCatalogService {
+        constructor($q, $log, $http, conf,uuid,base64Service, beReaderService, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.base64Service = base64Service;
+            this.beReaderService = beReaderService;
+            this.utilsService = utilsService;
+        }
+        
+        getUserWidgets(loginName) {
+                let deferred = this.$q.defer();
+                this.$http({
+                        method: "GET",
+                    url: this.conf.api.widgetCommon + '/widgetCatalog' + '/' + loginName,
+                    cache: false,
+                    headers: {
+                        'X-Widgets-Type': 'all',
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                    }
+             }).then(res => {
+                       if (res == null || res.data == null) {
+                     deferred.reject("WidgetsCatalogService::getUserWidgets Failed");
+                 } else {
+                     deferred.resolve(res.data);
+                 }
+             })
+             .catch(status => {
+                deferred.reject(status);
+                });
+             return deferred.promise;
+        }
+
+        getManagedWidgets() {                  
+            let deferred = this.$q.defer();
+            let url = this.conf.api.widgetCommon + '/widgetCatalog';
+            this.$http({
+               method: "GET",
+               url: url,
+               cache: false,
+               headers: {
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+               }
+            }).then(res => {
+                       if (res == null || res.data == null) {
+                     deferred.reject("WidgetsCatalogService::getManagedWidgets Failed");
+                 } else {
+                     deferred.resolve(res.data);
+                 }
+             })
+             .catch(status => {
+                 deferred.reject(status);
+             });  
+            return deferred.promise;
+        }
+        
+        createWidget(newWidget, file) {
+               console.log(newWidget);
+               let deferred = this.$q.defer();
+               var formData = new FormData();
+               formData.append('file', file);
+               this.$http({
+                method: "POST",
+                url: this.conf.api.widgetCommon + '/widgetCatalog',
+                transformRequest: angular.identity,  
+                data: formData,
+                headers:{  
+                       'Content-Type': undefined,
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                },
+                params:{
+                       'newWidget': newWidget
+                }
+            }).then(res => {
+               if (res == null || res.data == null) {
+                    deferred.reject("WidgetsCatalogService::getManagedWidgets Failed");
+                } else {
+                    deferred.resolve(res.data);
+                }
+            })
+            .catch(errRes => {
+                deferred.reject(errRes);
+            });
+            return deferred.promise;
+        }
+        
+        updateWidgetWithFile(file, widgetId, newWidget){
+               console.log(widgetId);
+               let deferred = this.$q.defer();
+            var formData = new FormData();
+               formData.append('file', file);
+               let url = this.conf.api.widgetCommon + '/widgetCatalog/' + widgetId;
+               this.$http({
+                method: 'POST',
+                url: url, 
+                transformRequest: angular.identity,  
+                data: formData,
+                headers: {        
+                       'Content-Type': undefined,
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                },
+                       params:{
+                               'newWidget': newWidget
+                       }
+            })
+            .then(res => {
+               if (res == null || res.data == null)
+                  deferred.reject("WidgetsCatalogService::saveWidgetFile Failed");
+               else 
+                  deferred.resolve(res.data);
+            })
+            .catch(status => {
+                 deferred.reject(status);
+             });  
+               return deferred.promise;
+        }
+        
+        updateWidget(widgetId, widgetData) {
+            let deferred = this.$q.defer();
+            let url = this.conf.api.widgetCommon  + '/widgetCatalog' + '/' + widgetId;
+            this.$http({
+               method: 'PUT',
+               url: url,
+               cache: false,
+               data: widgetData,
+               headers: {
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+               }
+            })
+            .then(res => {
+               deferred.resolve(res.data);
+            })
+            .catch(errRes => {
+               deferred.reject(errRes);
+            });
+           
+            return deferred.promise;
+        }
+        
+        
+        deleteWidgetFile(widgetName) {
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::deleteWidgetCatalog');
+            let url = this.conf.api.widgetCommon + '/doUpload' + '/' + widgetName;
+            this.$http({
+                method: "DELETE",
+                url: url,
+                cache: false,
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    deferred.resolve(res.data); 
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+        deleteWidget(widgetId) {
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::deleteWidgetCatalog');
+            let url = this.conf.api.widgetCommon + '/widgetCatalog'  + '/' + widgetId;
+            this.$http({
+                method: "DELETE",
+                url: url,
+                cache: false,
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    deferred.resolve(res.data); 
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+        downloadWidgetFile(widgetId) {
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::downloadWidgetFile');
+            let url = this.conf.api.widgetCommon + '/download/' + widgetId;
+            console.log(url);
+            this.$http({
+                method: "GET",
+                url: url,
+                cache: false,
+                responseType: "arraybuffer",
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    deferred.resolve(res.data); 
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+        updateWidgetCatalog(appData){
+               let deferred = this.$q.defer();
+            // Validate the request, maybe this is overkill
+            if (appData == null || appData.widgetId == null || appData.select == null) {
+               var msg = 'WidgetCatalogService::updateAppCatalog: field appId and/or select not found';
+                this.$log.error(msg);
+                return deferred.reject(msg);
+            }
+            this.$http({
+                method: "PUT",
+                url: this.conf.api.widgetCatalogSelection,
+                data: appData,
+                headers: {
+                        'X-Widgets-Type': 'all',
+                        'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then( res => {
+                    // Detect non-JSON
+                    if (res == null || res.data == null) {
+                        deferred.reject("WidgetCatalogService::updateAppCatalog Failed");
+                    } else {
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch( status => {
+                       this.$log.error('WidgetCatalogService:updateAppCatalog failed: ' + status);
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+        
+        getServiceJSON(serviceId){
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::getServiceJSON');
+            let url = this.conf.api.microserviceProxy + "/" + serviceId;
+            console.log(url);
+            this.$http({
+                method: "GET",
+                url: url,
+                cache: false,
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                       if (res == null || res == null) {
+                                       this.$log.error('WidgetCatalogService::getServiceJSON Failed: Result or result.data is null');
+                           deferred.reject("WidgetCatalogService::getServiceJSON Failed: Result or result.data is null");
+                       } else{
+                               deferred.resolve(res.data);
+                       }
+                       
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+        getWidgetCatalogParameters(widgetId){
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::getWidgetCatalogParameters');
+            let url = this.conf.api.widgetCommon + "/parameters/" + widgetId;
+            console.log(url);
+            this.$http({
+                method: "GET",
+                url: url,
+                cache: false,
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                       if (res == null || res.data == null) {
+                                       this.$log.error('WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null');
+                           deferred.reject("WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null");
+                       } else {
+                           deferred.resolve(res.data);
+                       }
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+        
+        saveWidgetParameter(widgetParamObject){
+               let deferred = this.$q.defer();
+            this.$log.info('WidgetsCatalogService::saveWidgetParameter');
+            let url = this.conf.api.widgetCommon + "/parameters";
+            this.$http({
+                method: "POST",
+                url: url,
+                cache: false,
+                data: widgetParamObject,
+                headers:{  
+                       'X-Widgets-Type': 'all',
+                       'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                       if (res == null || res.data == null) {
+                                       this.$log.error('WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null');
+                           deferred.reject("WidgetCatalogService::getWidgetCatalogParameters Failed: Result or result.data is null");
+                       } else {
+                           deferred.resolve(res.data);
+                       }
+                })
+                .catch(status => {
+                       deferred.reject(status);
+                });
+           
+            return deferred.promise;
+        }
+        
+    }
+    
+    WidgetsCatalogService.$inject = ['$q', '$log', '$http', 'conf','uuid4','base64Service', 'beReaderService', 'utilsService'];
+    angular.module('ecompApp').service('widgetsCatalogService', WidgetsCatalogService)
+})();
index 735a731..601c9ff 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by doritrieur on 12/3/15.\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class WidgetsService {\r
-        constructor($q, $log, $http, conf, uuid, utilsService) {\r
-            this.$q = $q;\r
-            this.$log = $log;\r
-            this.$http = $http;\r
-            this.conf = conf;\r
-            this.uuid = uuid;\r
-            this.utilsService = utilsService;\r
-        }\r
-\r
-        getUserWidgets() {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::getUserWidgets');\r
-            this.$http({\r
-                method: 'GET',\r
-                url: this.conf.api.widgets,\r
-                cache: false,\r
-                headers: {\r
-                    'X-Widgets-Type': 'all',\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                // If response comes back as a redirected HTML page which IS NOT a success\r
-                if (this.utilsService.isValidJSON(res) == false) {\r
-                       var msg = 'WidgetsService::getUserWidgets Failed';\r
-                       this.$log.error(msg);\r
-                       deferred.reject(msg);\r
-                } else {\r
-                       // this.$log.info('WidgetsService::getUserWidgets Succeeded');\r
-                       deferred.resolve(res.data);\r
-                }\r
-            })\r
-            .catch(status => {\r
-                deferred.reject(status);\r
-            });\r
-            return deferred.promise;\r
-        }\r
-\r
-        getManagedWidgets() {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::getManagedWidgets');\r
-            this.$http({\r
-                method: 'GET',\r
-                url: this.conf.api.widgets,\r
-                cache: false,\r
-                headers: {\r
-                    'X-Widgets-Type': 'managed',\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('WidgetsService::getManagedWidgets Failed');\r
-                    } else if(Object.keys(res).length == 0 && this.utilsService.isValidJSON(res)) {\r
-                        deferred.resolve(null);\r
-                    } else {\r
-                        this.$log.info('WidgetsService::getManagedWidgets Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        createWidget(widgetData) {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::createWidget');\r
-            this.$http({\r
-                method: 'POST',\r
-                url: this.conf.api.widgets,\r
-                cache: false,\r
-                data: widgetData,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('WidgetsService::createWidget Failed');\r
-                    } else {\r
-                        this.$log.info('WidgetsService::createWidget Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(errRes => {\r
-                    deferred.reject(errRes);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        updateWidget(widgetId, widgetData) {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::updateWidget');\r
-            let url = this.conf.api.widgets + '/' + widgetId;\r
-            this.$http({\r
-                method: 'PUT',\r
-                url: url,\r
-                cache: false,\r
-                data: widgetData,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('WidgetsService::updateWidget Failed');\r
-                    } else {\r
-                        this.$log.info('WidgetsService::updateWidget Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(errRes => {\r
-                    deferred.reject(errRes);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        deleteWidget(widgetId) {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::deleteWidget');\r
-            let url = this.conf.api.widgets + '/' + widgetId;\r
-            this.$http({\r
-                method: 'DELETE',\r
-                url: url,\r
-                cache: false,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(res => {\r
-                    // If response comes back as a redirected HTML page which IS NOT a success\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('WidgetsService::deleteWidget Failed');\r
-                    } else {\r
-                        this.$log.info('WidgetsService::deleteWidget Succeeded');\r
-                        deferred.resolve(res.data);\r
-                    }\r
-                })\r
-                .catch(status => {\r
-                    deferred.reject(status);\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-        checkIfWidgetUrlExists(urlToValidate) {\r
-            let deferred = this.$q.defer();\r
-            this.$log.info('WidgetsService::checkIfWidgetUrlExists:' + urlToValidate);\r
-            let reqBody = {\r
-                url: urlToValidate\r
-            };\r
-            this.$http({\r
-                method: 'POST',\r
-                url: this.conf.api.widgetsValidation,\r
-                cache: false,\r
-                data: reqBody,\r
-                headers: {\r
-                    'X-ECOMP-RequestID':this.uuid.generate()\r
-                }\r
-            }).then(() => {\r
-                //if exists return true\r
-                    deferred.resolve(true);\r
-                })\r
-                .catch(response => {\r
-                    if (this.utilsService.isValidJSON(res)== false) {\r
-                        deferred.reject('WidgetsService::checkIfWidgetUrlExists Failed');\r
-                    } else {\r
-                        if (response.data.status === 404) {\r
-                            deferred.resolve(false);\r
-                        } else {\r
-                            deferred.reject(response.data);\r
-                        }\r
-                    }\r
-                });\r
-            return deferred.promise;\r
-        }\r
-\r
-    }\r
-    WidgetsService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];\r
-    angular.module('ecompApp').service('widgetsService', WidgetsService)\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by doritrieur on 12/3/15.
+ */
+'use strict';
+
+(function () {
+    class WidgetsService {
+        constructor($q, $log, $http, conf, uuid, utilsService) {
+            this.$q = $q;
+            this.$log = $log;
+            this.$http = $http;
+            this.conf = conf;
+            this.uuid = uuid;
+            this.utilsService = utilsService;
+        }
+
+        getUserWidgets() {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::getUserWidgets');
+            this.$http({
+                method: 'GET',
+                url: this.conf.api.widgets,
+                cache: false,
+                headers: {
+                    'X-Widgets-Type': 'all',
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                // If response comes back as a redirected HTML page which IS NOT a success
+                if (this.utilsService.isValidJSON(res) == false) {
+                       var msg = 'WidgetsService::getUserWidgets Failed';
+                       this.$log.error(msg);
+                       deferred.reject(msg);
+                } else {
+                       // this.$log.info('WidgetsService::getUserWidgets Succeeded');
+                       deferred.resolve(res.data);
+                }
+            })
+            .catch(status => {
+                deferred.reject(status);
+            });
+            return deferred.promise;
+        }
+
+        getManagedWidgets() {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::getManagedWidgets');
+            this.$http({
+                method: 'GET',
+                url: this.conf.api.widgets,
+                cache: false,
+                headers: {
+                    'X-Widgets-Type': 'managed',
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('WidgetsService::getManagedWidgets Failed');
+                    } else if(Object.keys(res).length == 0 && this.utilsService.isValidJSON(res)) {
+                        deferred.resolve(null);
+                    } else {
+                        this.$log.info('WidgetsService::getManagedWidgets Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        createWidget(widgetData) {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::createWidget');
+            this.$http({
+                method: 'POST',
+                url: this.conf.api.widgets,
+                cache: false,
+                data: widgetData,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('WidgetsService::createWidget Failed');
+                    } else {
+                        this.$log.info('WidgetsService::createWidget Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(errRes => {
+                    deferred.reject(errRes);
+                });
+            return deferred.promise;
+        }
+
+        updateWidget(widgetId, widgetData) {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::updateWidget');
+            let url = this.conf.api.widgets + '/' + widgetId;
+            this.$http({
+                method: 'PUT',
+                url: url,
+                cache: false,
+                data: widgetData,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('WidgetsService::updateWidget Failed');
+                    } else {
+                        this.$log.info('WidgetsService::updateWidget Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(errRes => {
+                    deferred.reject(errRes);
+                });
+            return deferred.promise;
+        }
+
+        deleteWidget(widgetId) {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::deleteWidget');
+            let url = this.conf.api.widgets + '/' + widgetId;
+            this.$http({
+                method: 'DELETE',
+                url: url,
+                cache: false,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(res => {
+                    // If response comes back as a redirected HTML page which IS NOT a success
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('WidgetsService::deleteWidget Failed');
+                    } else {
+                        this.$log.info('WidgetsService::deleteWidget Succeeded');
+                        deferred.resolve(res.data);
+                    }
+                })
+                .catch(status => {
+                    deferred.reject(status);
+                });
+            return deferred.promise;
+        }
+
+        checkIfWidgetUrlExists(urlToValidate) {
+            let deferred = this.$q.defer();
+            this.$log.info('WidgetsService::checkIfWidgetUrlExists:' + urlToValidate);
+            let reqBody = {
+                url: urlToValidate
+            };
+            this.$http({
+                method: 'POST',
+                url: this.conf.api.widgetsValidation,
+                cache: false,
+                data: reqBody,
+                headers: {
+                    'X-ECOMP-RequestID':this.uuid.generate()
+                }
+            }).then(() => {
+                //if exists return true
+                    deferred.resolve(true);
+                })
+                .catch(response => {
+                    if (this.utilsService.isValidJSON(res)== false) {
+                        deferred.reject('WidgetsService::checkIfWidgetUrlExists Failed');
+                    } else {
+                        if (response.data.status === 404) {
+                            deferred.resolve(false);
+                        } else {
+                            deferred.reject(response.data);
+                        }
+                    }
+                });
+            return deferred.promise;
+        }
+
+    }
+    WidgetsService.$inject = ['$q', '$log', '$http', 'conf','uuid4', 'utilsService'];
+    angular.module('ecompApp').service('widgetsService', WidgetsService)
+})();
index ff89dce..2f9afd3 100644 (file)
@@ -1,9 +1,8 @@
 'use strict';
 (function () {
     class AccountAddDetailsCtrl {
-        constructor($scope, $log, $interval, basicAuthAccountSerivce, errorMessageByCode, ECOMP_URL_REGEX, $window, confirmBoxService, $cookies) {
-           
-          
+        constructor($scope, $log, $interval, basicAuthAccountService, errorMessageByCode, ECOMP_URL_REGEX, $window, confirmBoxService, $cookies) {
+         
            this.addEndpoint = () => {
                  this.account.endpointList.push({
                          valid: true
                        var message = "Are you sure you want to change '" + this.account.applicationName + "'?"
                        confirmBoxService.editItem(message).then(isConfirmed => {
                                if(isConfirmed){
-                                       basicAuthAccountSerivce.updateAccount(this.account.id, newAccount).then(() => {
+                                       basicAuthAccountService.updateAccount(this.account.id, newAccount).then(() => {
                                                $scope.closeThisDialog(true);
                                        });
                                        }
                        });
                }else{
-                       basicAuthAccountSerivce.createAccount(newAccount).then(() => {
+                       basicAuthAccountService.createAccount(newAccount).then(() => {
                                $scope.closeThisDialog(true);
                        });
                }
-               
-               
-            
             }
             
-            
             init();
             $scope.$on('$stateChangeStart', e => {
                 e.preventDefault();
             });
         }
     }
-    AccountAddDetailsCtrl.$inject = ['$scope', '$log', '$interval', 'basicAuthAccountSerivce', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window', 'confirmBoxService', '$cookies'];
+    AccountAddDetailsCtrl.$inject = ['$scope', '$log', '$interval', 'basicAuthAccountService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window', 'confirmBoxService', '$cookies'];
     angular.module('ecompApp').controller('AccountAddDetailsCtrl', AccountAddDetailsCtrl);
 })(); 
\ No newline at end of file
index 8d3663c..7c01a5a 100644 (file)
@@ -1,12 +1,14 @@
 .account-onboarding{
-  position: @page-main-position;
-  top: @page-main-top;
-  left: @page-main-left;
-  right: @page-main-right;
-  bottom: @page-main-bottom;
-  padding-top: @padding-top;
-  overflow-y: @page-main-overflow-y;
-  padding-left: @padding-left-side;
+  .bg_portalWhite;//white for 1702
+    //.bg_portalGray;  // gray for 1610
+    position: @page-main-position;
+    top: @page-main-top;
+    left: @page-main-left;
+    right: @page-main-right;
+    bottom: @page-main-bottom;
+    padding-top: @padding-top;
+    overflow-y: @page-main-overflow-y;
+    padding-left: @padding-left-side;
 
     .account-table {
          width: @table-width;
@@ -17,8 +19,4 @@
          }
     }
 
-       .delete-account{
-      .ico_trash_default;
-    }
-
 }
\ No newline at end of file
index 5f46a1c..d5a3c24 100644 (file)
@@ -61,7 +61,7 @@
 
                                                                                <td b2b-table-body>
                                                                                        <div id="account-onboarding-div-delete-{{$index}}"
-                                                                                               class="delete-account"
+                                                                                               class="icon-misc-trash"
                                                                                                ng-click="accountOnboarding.deleteAccount(rowData)"></div>
                                                                                </td>
                                                                        </tr>
index 5a164e1..9aec9b4 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-\r
-'use strict';\r
-(function () {\r
-    class NewAdminModalCtrl {\r
-        constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location) {\r
-\r
-            let init = () => {\r
-                this.isSaving = false;\r
-                this.originalApps = [];\r
-                /* istanbul ignore if */\r
-                if ($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState) {\r
-                    this.selectedUser = $scope.ngDialogData.selectedUser;\r
-                    this.dialogState = $scope.ngDialogData.dialogState;\r
-                    this.isShowBack = false;\r
-                    if (this.dialogState === 2) {\r
-                        this.getAdminAppsRoles();\r
-                    }\r
-                } else {\r
-                    this.isShowBack = true;\r
-                    this.selectedUser = null;\r
-                    this.dialogState = 1;\r
-                }\r
-\r
-                //this.searchUsersInProgress = false;\r
-                //this.showNewAdminAppDropdown = false;\r
-                $log.info('NewAdminModalCtrl::initiated');\r
-                this.appsOrder = [];\r
-            };\r
-\r
-            let orderList = (apps) => {\r
-                this.appsOrder = [];\r
-                for (var i = 0; i < apps.length; i++) {\r
-                    if (apps[i].isAdmin) {\r
-                        this.appsOrder.push(apps[i].id);\r
-                    }\r
-                }\r
-            };\r
-\r
-            this.orderFilter = app => {\r
-                if (!app || !app.id || !this.appsOrder.length) {\r
-                    return;\r
-                }\r
-                return this.appsOrder.indexOf(app.id);\r
-            };\r
-\r
-            /**\r
-             * this function get the selected admin apps roles\r
-             */\r
-            this.getAdminAppsRoles = () => {\r
-                if (!this.selectedUser || !this.selectedUser.orgUserId) {\r
-                    $log.error('No user is selected / searchUsers is InProgress');\r
-                    this.dialogState = 1;\r
-                    return;\r
-                }\r
-                adminsService.getAdminAppsRoles(this.selectedUser.orgUserId).then(roles => {\r
-                    $log.debug('apps roles res: ', JSON.stringify(roles));\r
-                    if (!roles.appsRoles) {\r
-                        return;\r
-                    }\r
-\r
-                    this.adminAppsRoles = [];\r
-                    for (var i = 0; i < roles.appsRoles.length; i++) {\r
-                        if (!roles.appsRoles[i].restrictedApp) {\r
-                            $log.debug('pushing: {id: ', roles.appsRoles[i].id,\r
-                                'name: ', roles.appsRoles[i].appName,\r
-                                'restrictedApp: ', roles.appsRoles[i].restrictedApp,\r
-                                'isAdmin: ', roles.appsRoles[i].isAdmin, '}');\r
-                            this.adminAppsRoles.push({\r
-                                id: roles.appsRoles[i].id,\r
-                                appName: roles.appsRoles[i].appName,\r
-                                isAdmin: roles.appsRoles[i].isAdmin,\r
-                                restrictedApp: roles.appsRoles[i].restrictedApp\r
-                            });\r
-                        }\r
-                    }\r
-                    this.dialogState = 2;\r
-                    this.adminAppsRoles = this.adminAppsRoles.sort(getSortOrder("appName"));\r
-\r
-                    orderList(roles.appsRoles);\r
-                    if (this.appsOrder != null) {\r
-                        for (var j = 0; j < this.appsOrder.length; j++) {\r
-                            this.originalApps.push(this.appsOrder[j]);\r
-                        }\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error(err);\r
-                });\r
-            };\r
-\r
-            // Refactor this into a directive\r
-            let getSortOrder = (prop) => {\r
-                return function (a, b) {\r
-                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {\r
-                        return 1;\r
-                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {\r
-                        return -1;\r
-                    }\r
-                    return 0;\r
-                }\r
-            }\r
-\r
-            /**\r
-             * this function set the selected user\r
-             * @param user: selected user object\r
-             */\r
-            this.setSelectedUser = (user) => {\r
-                $log.debug('selected user: ', user);\r
-                this.selectedUser = user;\r
-            };\r
-\r
-            /**\r
-             * Mark the user as not admin of the selected app\r
-             * @param app: selected app object\r
-             */\r
-            this.unadminApp = (app) => {\r
-                confirmBoxService.deleteItem(app.appName).then(confirmed => {\r
-                    if (confirmed === true) {\r
-                        app.isAdmin = false;\r
-                        this.appsOrder.splice(this.appsOrder.indexOf(app.id), 1);\r
-                    }\r
-                }).catch(err => {\r
-                    $log(err);\r
-                });\r
-            };\r
-\r
-            /**\r
-             * update the selected admin app with the new roles\r
-             */\r
-            this.updateAdminAppsRoles = () => {\r
-                if (!this.selectedUser || !this.selectedUser.orgUserId || !this.adminAppsRoles) {\r
-                    return;\r
-                }\r
-                this.isSaving = true;\r
-                $log.debug('going to update user: ' + this.selectedUser.orgUserId + ' with app roles: ' + JSON.stringify(this.adminAppsRoles));\r
-                confirmBoxService.makeAdminChanges('Are you sure you want to make these admin changes?')\r
-                    .then(confirmed => {\r
-                       if(confirmed === true){\r
-                        adminsService.updateAdminAppsRoles({\r
-                                orgUserId: this.selectedUser.orgUserId,\r
-                                appsRoles: this.adminAppsRoles\r
-                            })\r
-                            .then(res => {\r
-                                $log.debug('Admin apps roles updated successfully!', res);\r
-                                //close and resolve dialog promise with true (to update the table)\r
-                                this.remindToAddUserIfNecessary();\r
-                                $scope.closeThisDialog(true);\r
-                            }).catch(err => {\r
-                            $log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);\r
-                        }).finally(()=> {\r
-                            this.isSaving = false;\r
-                        })\r
-                       }else{\r
-                               this.isSaving = false;\r
-                        }\r
-                    });\r
-            };\r
-\r
-            /**\r
-             * Navigate between dialog screens using step number: 1,2,...\r
-             */\r
-            this.navigateBack = () => {\r
-                if (this.dialogState === 1) {\r
-                    //back from 1st screen?\r
-                }\r
-                if (this.dialogState === 2) {\r
-                    this.dialogState = 1;\r
-                }\r
-            };\r
-\r
-            init();\r
-\r
-            /**\r
-             * each time new app is selected in the drop down,\r
-             * add it to the user administrated apps list\r
-             */\r
-            $scope.$watch('newAdmin.selectedNewApp', (newVal) => {\r
-                if (!newVal || newVal.isAdmin === undefined) {\r
-                    return;\r
-                }\r
-                //newVal.isAdmin = true; - track by ruined this, here is the workaround:\r
-                let app = _.find(this.adminAppsRoles, {id: newVal.id});\r
-                if (app) {\r
-                    app.isAdmin = true;\r
-                    this.appsOrder.push(app.id);\r
-                }\r
-                this.selectedNewApp = null;\r
-                //this.showNewAdminAppDropdown = false;\r
-            });\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                //**Nabil - note: this will cause the history back state to be replaced with current state\r
-                e.preventDefault();\r
-            });\r
-\r
-            /**\r
-             * If an Admin was added for an application remind the portal admin to add the admin as a user\r
-             */\r
-            this.remindToAddUserIfNecessary = () => {\r
-\r
-                var adminAddedToNewApp = false;\r
-                if ((this.originalApps != null) && (this.originalApps.length > 0)) {\r
-                    for (var i = 0; i < this.appsOrder.length; i++) {\r
-                        var foundApp = false;\r
-                        for (var j = 0; j < this.originalApps.length; j++) {\r
-                            if (this.originalApps[j] === this.appsOrder[i]) {\r
-                                foundApp = true;\r
-                            }\r
-                        }\r
-                        if (foundApp === false) {\r
-                            adminAddedToNewApp = true;\r
-                            break;\r
-                        }\r
-                    }\r
-                } else {\r
-                    adminAddedToNewApp = true;\r
-                }\r
-\r
-                if (adminAddedToNewApp === true) {\r
-                    confirmBoxService.confirm('Add this person as an application user? This allows them to access the application from ECOMP Portal. Press OK to go to the Add Users page.')\r
-                        .then(confirmed => {\r
-                            if (confirmed === true) {\r
-                                $location.path('/users');\r
-                            }\r
-                        });\r
-                }\r
-            }\r
-\r
-        }\r
-    }\r
-    NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location'];\r
-    angular.module('ecompApp').controller('NewAdminModalCtrl', NewAdminModalCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+'use strict';
+(function () {
+    class NewAdminModalCtrl {
+        constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location) {
+
+            let init = () => {
+                this.isSaving = false;
+                this.originalApps = [];
+                /* istanbul ignore if */
+                if ($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState) {
+                    this.selectedUser = $scope.ngDialogData.selectedUser;
+                    this.dialogState = $scope.ngDialogData.dialogState;
+                    this.isShowBack = false;
+                    if (this.dialogState === 2) {
+                        this.getAdminAppsRoles();
+                    }
+                } else {
+                    this.isShowBack = true;
+                    this.selectedUser = null;
+                    this.dialogState = 1;
+                }
+
+                //this.searchUsersInProgress = false;
+                //this.showNewAdminAppDropdown = false;
+                $log.info('NewAdminModalCtrl::initiated');
+                this.appsOrder = [];
+            };
+
+            let orderList = (apps) => {
+                this.appsOrder = [];
+                for (var i = 0; i < apps.length; i++) {
+                    if (apps[i].isAdmin) {
+                        this.appsOrder.push(apps[i].id);
+                    }
+                }
+            };
+
+            this.orderFilter = app => {
+                if (!app || !app.id || !this.appsOrder.length) {
+                    return;
+                }
+                return this.appsOrder.indexOf(app.id);
+            };
+
+            /**
+             * this function get the selected admin apps roles
+             */
+            this.getAdminAppsRoles = () => {
+                if (!this.selectedUser || !this.selectedUser.orgUserId) {
+                    $log.error('No user is selected / searchUsers is InProgress');
+                    this.dialogState = 1;
+                    return;
+                }
+                adminsService.getAdminAppsRoles(this.selectedUser.orgUserId).then(roles => {
+                    $log.debug('apps roles res: ', JSON.stringify(roles));
+                    if (!roles.appsRoles) {
+                        return;
+                    }
+
+                    this.adminAppsRoles = [];
+                    for (var i = 0; i < roles.appsRoles.length; i++) {
+                        if (!roles.appsRoles[i].restrictedApp) {
+                            $log.debug('pushing: {id: ', roles.appsRoles[i].id,
+                                'name: ', roles.appsRoles[i].appName,
+                                'restrictedApp: ', roles.appsRoles[i].restrictedApp,
+                                'isAdmin: ', roles.appsRoles[i].isAdmin, '}');
+                            this.adminAppsRoles.push({
+                                id: roles.appsRoles[i].id,
+                                appName: roles.appsRoles[i].appName,
+                                isAdmin: roles.appsRoles[i].isAdmin,
+                                restrictedApp: roles.appsRoles[i].restrictedApp
+                            });
+                        }
+                    }
+                    this.dialogState = 2;
+                    this.adminAppsRoles = this.adminAppsRoles.sort(getSortOrder("appName"));
+
+                    orderList(roles.appsRoles);
+                    if (this.appsOrder != null) {
+                        for (var j = 0; j < this.appsOrder.length; j++) {
+                            this.originalApps.push(this.appsOrder[j]);
+                        }
+                    }
+                }).catch(err => {
+                    $log.error(err);
+                });
+            };
+
+            // Refactor this into a directive
+            let getSortOrder = (prop) => {
+                return function (a, b) {
+                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {
+                        return 1;
+                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {
+                        return -1;
+                    }
+                    return 0;
+                }
+            }
+
+            /**
+             * this function set the selected user
+             * @param user: selected user object
+             */
+            this.setSelectedUser = (user) => {
+                $log.debug('selected user: ', user);
+                this.selectedUser = user;
+            };
+
+            /**
+             * Mark the user as not admin of the selected app
+             * @param app: selected app object
+             */
+            this.unadminApp = (app) => {
+                confirmBoxService.deleteItem(app.appName).then(confirmed => {
+                    if (confirmed === true) {
+                        app.isAdmin = false;
+                        this.appsOrder.splice(this.appsOrder.indexOf(app.id), 1);
+                    }
+                }).catch(err => {
+                    $log(err);
+                });
+            };
+
+            /**
+             * update the selected admin app with the new roles
+             */
+            this.updateAdminAppsRoles = () => {
+                if (!this.selectedUser || !this.selectedUser.orgUserId || !this.adminAppsRoles) {
+                    return;
+                }
+                this.isSaving = true;
+                $log.debug('going to update user: ' + this.selectedUser.orgUserId + ' with app roles: ' + JSON.stringify(this.adminAppsRoles));
+                confirmBoxService.makeAdminChanges('Are you sure you want to make these admin changes?')
+                    .then(confirmed => {
+                       if(confirmed === true){
+                        adminsService.updateAdminAppsRoles({
+                                orgUserId: this.selectedUser.orgUserId,
+                                appsRoles: this.adminAppsRoles
+                            })
+                            .then(res => {
+                                $log.debug('Admin apps roles updated successfully!', res);
+                                //close and resolve dialog promise with true (to update the table)
+                                this.remindToAddUserIfNecessary();
+                                $scope.closeThisDialog(true);
+                            }).catch(err => {
+                            $log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);
+                        }).finally(()=> {
+                            this.isSaving = false;
+                        })
+                       }else{
+                               this.isSaving = false;
+                        }
+                    });
+            };
+
+            /**
+             * Navigate between dialog screens using step number: 1,2,...
+             */
+            this.navigateBack = () => {
+                if (this.dialogState === 1) {
+                    //back from 1st screen?
+                }
+                if (this.dialogState === 2) {
+                    this.dialogState = 1;
+                }
+            };
+
+            init();
+
+            /**
+             * each time new app is selected in the drop down,
+             * add it to the user administrated apps list
+             */
+            $scope.$watch('newAdmin.selectedNewApp.value', (newVal) => {
+                var newVal= JSON.parse(newVal);
+                if (!newVal || newVal.isAdmin === undefined) {
+                    return;
+                }
+                //newVal.isAdmin = true; - track by ruined this, here is the workaround:
+                let app = _.find(this.adminAppsRoles, {id: newVal.id});
+                if (app) {
+                    app.isAdmin = true;
+                    this.appsOrder.push(app.id);
+                }
+                this.selectedNewApp = null;
+                //this.showNewAdminAppDropdown = false;
+            });
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                //**Nabil - note: this will cause the history back state to be replaced with current state
+                e.preventDefault();
+            });
+
+            /**
+             * If an Admin was added for an application remind the portal admin to add the admin as a user
+             */
+            this.remindToAddUserIfNecessary = () => {
+
+                var adminAddedToNewApp = false;
+                if ((this.originalApps != null) && (this.originalApps.length > 0)) {
+                    for (var i = 0; i < this.appsOrder.length; i++) {
+                        var foundApp = false;
+                        for (var j = 0; j < this.originalApps.length; j++) {
+                            if (this.originalApps[j] === this.appsOrder[i]) {
+                                foundApp = true;
+                            }
+                        }
+                        if (foundApp === false) {
+                            adminAddedToNewApp = true;
+                            break;
+                        }
+                    }
+                } else {
+                    adminAddedToNewApp = true;
+                }
+
+                if (adminAddedToNewApp === true) {
+                    confirmBoxService.confirm('Add this person as an application user? This allows them to access the application from ECOMP Portal. Press OK to go to the Add Users page.')
+                        .then(confirmed => {
+                            if (confirmed === true) {
+                                $location.path('/users');
+                            }
+                        });
+                }
+            }
+
+        }
+    }
+    NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location'];
+    angular.module('ecompApp').controller('NewAdminModalCtrl', NewAdminModalCtrl);
+})();
index 540459e..c6011d1 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/8/15.\r
- */\r
-'use strict';\r
-\r
-describe('Controller: NewAdminCtrl ', () => {\r
-    beforeEach(module('ecompApp'));\r
-\r
-    //destroy $http default cache before starting to prevent the error 'default cache already exists'\r
-    beforeEach(inject((_CacheFactory_)=> {\r
-        _CacheFactory_.destroyAll();\r
-    }));\r
-\r
-\r
-    let newCtrl, $controller, $q, $rootScope, $log;\r
-\r
-    beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {\r
-        [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];\r
-    }));\r
-\r
-    let deferredAdminAppsRoles, deferredUpdateRolesRes;\r
-    let adminsServiceMock;\r
-    beforeEach(()=> {\r
-        [deferredAdminAppsRoles, deferredUpdateRolesRes] = [$q.defer(), $q.defer()];\r
-\r
-        adminsServiceMock = jasmine.createSpyObj('adminsServiceMock', ['getAdminAppsRoles', 'updateAdminAppsRoles']);\r
-\r
-        adminsServiceMock.getAdminAppsRoles.and.returnValue(deferredAdminAppsRoles.promise);\r
-        adminsServiceMock.updateAdminAppsRoles.and.returnValue(deferredUpdateRolesRes.promise);\r
-\r
-        newCtrl = $controller('NewAdminModalCtrl', {\r
-            $log: $log,\r
-            adminsService: adminsServiceMock,\r
-            $scope: $rootScope\r
-        });\r
-    });\r
-\r
-    it('should init default values when loading the controller', ()=> {\r
-        expect(newCtrl.dialogState).toBe(1);\r
-        expect(newCtrl.selectedUser).toBe(null);\r
-    });\r
-\r
-    it('should populate admin apps roles and move to the next screen when adminsService.getAdminAppsRoles succeeded', ()=> {\r
-        let userApps = {appsRoles: [{id: 1, isAdmin: false}, {id: 2, isAdmin: true}]};\r
-        deferredAdminAppsRoles.resolve(userApps);\r
-\r
-        newCtrl.selectedUser = {orgUserId: 'orgUserId'};\r
-\r
-        newCtrl.getAdminAppsRoles();\r
-        $rootScope.$apply();\r
-\r
-        expect(adminsServiceMock.getAdminAppsRoles).toHaveBeenCalledWith(newCtrl.selectedUser.orgUserId);\r
-        expect(newCtrl.adminAppsRoles).toEqual(userApps.appsRoles);\r
-        expect(newCtrl.dialogState).toBe(2);\r
-    });\r
-\r
-    it('should  log the error when adminsService.getAdminAppsRoles fails', ()=> {\r
-        spyOn($log, 'error');\r
-        deferredAdminAppsRoles.reject('some error');\r
-\r
-        newCtrl.searchUsersInProgress = false;\r
-        newCtrl.selectedUser = {orgUserId: 'orgUserId'};\r
-\r
-        newCtrl.getAdminAppsRoles();\r
-        $rootScope.$apply();\r
-\r
-        expect($log.error).toHaveBeenCalled();\r
-    });\r
-    it('should  log the error when trying to getAdminAppsRoles without selecting user ', ()=> {\r
-        spyOn($log, 'error');\r
-\r
-        newCtrl.searchUsersInProgress = false;\r
-        newCtrl.selectedUser = null;\r
-\r
-        newCtrl.getAdminAppsRoles();\r
-        $rootScope.$apply();\r
-\r
-        expect($log.error).toHaveBeenCalled();\r
-    });\r
-\r
-    it('should set isAdmin as true when adding app via the dropdown menu', ()=> {\r
-        newCtrl.adminAppsRoles = [{id: 1, isAdmin: false},{id: 2, isAdmin: true}];\r
-        //simulate UI change\r
-        $rootScope.$apply('newAdmin.selectedNewApp = null');\r
-        $rootScope.$apply('newAdmin.selectedNewApp = {id: 1, isAdmin: true}');\r
-\r
-        expect(newCtrl.adminAppsRoles[0].isAdmin).toBe(true);\r
-        expect(newCtrl.selectedNewApp).toBe(null);\r
-    });\r
-\r
-    it('should close the modal when updating apps roles succeeded', ()=> {\r
-        $rootScope.closeThisDialog = () => {};\r
-        spyOn($rootScope,'closeThisDialog');\r
-\r
-        newCtrl.selectedUser = {orgUserId: 'orgUserId'};\r
-        newCtrl.adminAppsRoles = [{id: 1}];\r
-\r
-        deferredUpdateRolesRes.resolve();\r
-        newCtrl.updateAdminAppsRoles();\r
-        $rootScope.$apply();\r
-\r
-        expect(adminsServiceMock.updateAdminAppsRoles).toHaveBeenCalledWith({orgUserId: newCtrl.selectedUser.orgUserId, appsRoles: newCtrl.adminAppsRoles});\r
-        expect($rootScope.closeThisDialog).toHaveBeenCalled();\r
-    });\r
-    it('should log the error when updating apps roles fails', ()=> {\r
-        newCtrl.selectedUser = {orgUserId: 'orgUserId'};\r
-        newCtrl.adminAppsRoles = [{id: 1}];\r
-\r
-        spyOn($log,'error');\r
-        deferredUpdateRolesRes.reject();\r
-        newCtrl.updateAdminAppsRoles();\r
-        $rootScope.$apply();\r
-        expect($log.error).toHaveBeenCalled();\r
-    });\r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/8/15.
+ */
+'use strict';
+
+describe('Controller: NewAdminCtrl ', () => {
+    beforeEach(module('ecompApp'));
+
+    //destroy $http default cache before starting to prevent the error 'default cache already exists'
+    beforeEach(inject((_CacheFactory_)=> {
+        _CacheFactory_.destroyAll();
+    }));
+
+
+    let newCtrl, $controller, $q, $rootScope, $log;
+
+    beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {
+        [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];
+    }));
+
+    let deferredAdminAppsRoles, deferredUpdateRolesRes;
+    let adminsServiceMock;
+    beforeEach(()=> {
+        [deferredAdminAppsRoles, deferredUpdateRolesRes] = [$q.defer(), $q.defer()];
+
+        adminsServiceMock = jasmine.createSpyObj('adminsServiceMock', ['getAdminAppsRoles', 'updateAdminAppsRoles']);
+
+        adminsServiceMock.getAdminAppsRoles.and.returnValue(deferredAdminAppsRoles.promise);
+        adminsServiceMock.updateAdminAppsRoles.and.returnValue(deferredUpdateRolesRes.promise);
+
+        newCtrl = $controller('NewAdminModalCtrl', {
+            $log: $log,
+            adminsService: adminsServiceMock,
+            $scope: $rootScope
+        });
+    });
+
+    it('should init default values when loading the controller', ()=> {
+        expect(newCtrl.dialogState).toBe(1);
+        expect(newCtrl.selectedUser).toBe(null);
+    });
+
+    it('should populate admin apps roles and move to the next screen when adminsService.getAdminAppsRoles succeeded', ()=> {
+        let userApps = {appsRoles: [{id: 1, isAdmin: false}, {id: 2, isAdmin: true}]};
+        deferredAdminAppsRoles.resolve(userApps);
+
+        newCtrl.selectedUser = {orgUserId: 'orgUserId'};
+
+        newCtrl.getAdminAppsRoles();
+        $rootScope.$apply();
+
+        expect(adminsServiceMock.getAdminAppsRoles).toHaveBeenCalledWith(newCtrl.selectedUser.orgUserId);
+        expect(newCtrl.adminAppsRoles).toEqual(userApps.appsRoles);
+        expect(newCtrl.dialogState).toBe(2);
+    });
+
+    it('should  log the error when adminsService.getAdminAppsRoles fails', ()=> {
+        spyOn($log, 'error');
+        deferredAdminAppsRoles.reject('some error');
+
+        newCtrl.searchUsersInProgress = false;
+        newCtrl.selectedUser = {orgUserId: 'orgUserId'};
+
+        newCtrl.getAdminAppsRoles();
+        $rootScope.$apply();
+
+        expect($log.error).toHaveBeenCalled();
+    });
+    it('should  log the error when trying to getAdminAppsRoles without selecting user ', ()=> {
+        spyOn($log, 'error');
+
+        newCtrl.searchUsersInProgress = false;
+        newCtrl.selectedUser = null;
+
+        newCtrl.getAdminAppsRoles();
+        $rootScope.$apply();
+
+        expect($log.error).toHaveBeenCalled();
+    });
+
+    it('should set isAdmin as true when adding app via the dropdown menu', ()=> {
+        newCtrl.adminAppsRoles = [{id: 1, isAdmin: false},{id: 2, isAdmin: true}];
+        //simulate UI change
+        $rootScope.$apply('newAdmin.selectedNewApp = null');
+        $rootScope.$apply('newAdmin.selectedNewApp = {id: 1, isAdmin: true}');
+
+        expect(newCtrl.adminAppsRoles[0].isAdmin).toBe(true);
+        expect(newCtrl.selectedNewApp).toBe(null);
+    });
+
+    it('should close the modal when updating apps roles succeeded', ()=> {
+        $rootScope.closeThisDialog = () => {};
+        spyOn($rootScope,'closeThisDialog');
+
+        newCtrl.selectedUser = {orgUserId: 'orgUserId'};
+        newCtrl.adminAppsRoles = [{id: 1}];
+
+        deferredUpdateRolesRes.resolve();
+        newCtrl.updateAdminAppsRoles();
+        $rootScope.$apply();
+
+        expect(adminsServiceMock.updateAdminAppsRoles).toHaveBeenCalledWith({orgUserId: newCtrl.selectedUser.orgUserId, appsRoles: newCtrl.adminAppsRoles});
+        expect($rootScope.closeThisDialog).toHaveBeenCalled();
+    });
+    it('should log the error when updating apps roles fails', ()=> {
+        newCtrl.selectedUser = {orgUserId: 'orgUserId'};
+        newCtrl.adminAppsRoles = [{id: 1}];
+
+        spyOn($log,'error');
+        deferredUpdateRolesRes.reject();
+        newCtrl.updateAdminAppsRoles();
+        $rootScope.$apply();
+        expect($log.error).toHaveBeenCalled();
+    });
+});
index 1b1b9de..a18b8f6 100644 (file)
@@ -31,8 +31,7 @@
             <button id="search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
         </div>
     </div>
-
-
+ <br>
     <div id="div-admin-app-roles" class="admin-app-roles" ng-show="newAdmin.dialogState===2">
         <div class="title" id="title"
              ng-bind="newAdmin.selectedUser.firstName + ' ' + newAdmin.selectedUser.lastName + ' (' + newAdmin.selectedUser.orgUserId + ')'"></div>
             </div>
 
 
-            <div class="select-input custom-select-wrap">
-                <select class="new-administrated-app" id="dropdown-select-app"
-                        ui-select2 ng-model="newAdmin.selectedNewApp"
-                        data-placeholder="Select application"
-                        ng-options="app as app.appName for app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id "
-                        ng-disabled="!filteredApps.length">
-                    <option id="option-select-app" value="" disabled style="display: none;">Select application</option>
-                </select>
+            <div class="adminAppsRoles_dropdown">
+                 <select id="dropdown1" name="dropdown1" b2b-dropdown
+                                                                       placeholder-text="Select application"
+                                                                       ng-model="newAdmin.selectedNewApp.value">
+                                                       <option b2b-dropdown-list option-repeat="app in (filteredApps = (newAdmin.adminAppsRoles | filter:{isAdmin:'false'})) track by app.id " ng-disabled="!filteredApps.length"  value="{{app}}">{{app.appName}}</option>
+                                        </select>
             </div>
-
+               <br>
 
             <div class="admin-roles-list">
                 <div ng-repeat="app in (newAdmin.adminAppsRoles | orderBy:newAdmin.orderFilter) track by app.id" ng-show="app.isAdmin">
@@ -75,3 +72,9 @@
     </div>
 
 </div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 8b304b4..f7c1111 100644 (file)
@@ -47,7 +47,7 @@
       }
 
       .admin-roles-list {
-        height: 240px;
+        height: 185px;
         overflow-y: auto;
       }
 
         color: transparent;
         margin-left: 8px;
       }
+      
+      .awd-select-list {
+               max-height: 205px;
+               }
 
     }
 
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 729ef69..38760ca 100644 (file)
@@ -1,6 +1,7 @@
 .w-ecomp-admins-page-main {
+
     .bg_portalWhite;//white for 1702
-      position: @page-main-position;
+    position: @page-main-position;
     top: @page-main-top;
     left: @page-main-left;
     right: @page-main-right;
@@ -8,38 +9,42 @@
     padding-top: @padding-top;
     overflow-y: @page-main-overflow-y;
     padding-left: @padding-left-side;
-#input-table-search::-webkit-input-placeholder,
-{
-font-style: italic;
-  color:   #D7D7D7;
-
-}
+       #input-table-search::-webkit-input-placeholder,
+       {
+       font-style: italic;
+        color:   #D7D7D7;
+       
+       }
        .ecomp-spinner{
        top: 255px;
        }
 
+       .table-admins-div{
+       width:15px;
+       font-size:23px;
+       cursor: pointer;
+       }
     .admins-home-container {
-        position: relative;
-        padding-right: 0;
-        padding-left: 0;
-        padding-bottom: @container-bottom;
+    position: relative;
+    padding-right: 0;
+    padding-left: 0;
+    padding-bottom: @container-bottom;
 
-        .admins-table {
-            width: @table-width;
-            //margin-left: @table-margin-left;
-            margin: 0 auto;
+    .admins-table {
+    width: @table-width;
+    //margin-left: @table-margin-left;
+    margin: 0 auto;
 
-            .table-control {
-                .table-dropdown-filter {
-                    width: @table-dropdown-filter-width;
-                    display: @table-dropdown-filter-display;
-                }
-            }
+    .table-control {
+    .table-dropdown-filter {
+    width: @table-dropdown-filter-width;
+    display: @table-dropdown-filter-display;
+    }
+    }
 
-            .table-body {
-                cursor: pointer;
-            }
-        }
+    .table-body {
+       cursor: pointer;
+    }
+       }
     }
 }
-
index 907bf32..f9ea3ff 100644 (file)
@@ -1,66 +1,66 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-admins-page-main">\r
-    <div class="admins-home-container" id="page-content">\r
-            <div id="title" class="w-ecomp-main-view-title">\r
-                               <h1 class="heading-page" >Admins</h1>\r
-                       </div>\r
-            <div class="admins-table">\r
-                <div class="table-control">\r
-                        <div class="table-control-fields">             \r
-                                               <div class="table-dropdown">\r
-                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="All application" ng-model="admins.filterByApp.value">\r
-                                               <option b2b-dropdown-list option-repeat="d in admins.availableApps" value="{{d.value}}">{{d.title}}</option>\r
-                                           </select>\r
-                                               </div>\r
-                                               <div >\r
-                                                       <input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="admins.searchString">\r
-                                               </div>\r
-                                               <button class="btn btn-alt btn-small" ng-click="admins.openAddNewAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Admin</button> \r
-                                       </div>                  \r
-               </div>\r
-                <span class="ecomp-spinner" ng-show="admins.isLoadingTable"></span>\r
-                <div b2b-table table-data="admins.adminsTableData"  ng-hide="admins.isLoadingTable"    search-string="admins.searchString" class="b2b-table-div">\r
-                                       <table>\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr >\r
-                                                               <th b2b-table-header key="firstName" sortable="true" id="col1">First Name</th>\r
-                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>\r
-                                                               <th b2b-table-header key="orgUserId" sortable="true" id="col3">User ID</th>\r
-                                                               <th b2b-table-header key="" sortable="falses" id="col4">Applications</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <tbody b2b-table-row type="body"        row-repeat="rowData in admins.adminsTableData | filter: admins.portalsRowFilter">\r
-                                                       <tr ng-click="admins.openAddNewAdminModal(rowData)">\r
-                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.orgUserId"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">\r
-                                                                       <div class="ecomp-table-repeat" ng-repeat="app in rowData.apps" ng-bind="app.appName"></div>\r
-                                                               </td>                                                   \r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>\r
-            </div>\r
-        </div>\r
-    </div>\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-admins-page-main">
+    <div class="admins-home-container" id="page-content">
+            <div id="title" class="w-ecomp-main-view-title">
+                               <h1 class="heading-page" >Admins</h1>
+                       </div>
+            <div class="admins-table">
+                <div class="table-control">
+                        <div class="table-control-fields">             
+                                               <div class="table-dropdown">
+                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="All application" ng-model="admins.filterByApp.value">
+                                               <option b2b-dropdown-list option-repeat="d in admins.availableApps" value="{{d.value}}">{{d.title}}</option>
+                                           </select>
+                                               </div>
+                                               <div >
+                                                       <input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="admins.searchString">
+                                               </div>
+                                               <button class="btn btn-alt btn-small" ng-click="admins.openAddNewAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Admin</button> 
+                                       </div>                  
+               </div>
+                <span class="ecomp-spinner" ng-show="admins.isLoadingTable"></span>
+                <div b2b-table table-data="admins.adminsTableData"  ng-hide="admins.isLoadingTable"    search-string="admins.searchString" class="b2b-table-div">
+                                       <table>
+                                               <thead b2b-table-row type="header">
+                                                       <tr >
+                                                               <th b2b-table-header key="firstName" sortable="true" id="col1" default-sort="a">First Name</th>
+                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>
+                                                               <th b2b-table-header key="orgUserId" sortable="true" id="col3">User ID</th>
+                                                               <th b2b-table-header key="" sortable="falses" id="col4">Applications</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody b2b-table-row type="body"        row-repeat="rowData in admins.adminsTableData | filter: admins.portalsRowFilter" class="table-admins-div">
+                                                       <tr ng-click="admins.openAddNewAdminModal(rowData)"  >
+                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.orgUserId"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
+                                                                       <div class="ecomp-table-repeat" ng-repeat="app in rowData.apps" ng-bind="app.appName"></div>
+                                                               </td>                                                   
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>
+            </div>
+        </div>
+    </div>
+
+</div>
index b98289e..5568ca8 100644 (file)
-.new-catalog-modal {\r
-  height: 430px;\r
-\r
-  .user-catalog-roles{\r
-    .title{\r
-      //.n18r;\r
-      .dGray18r;  //AT&T Dark Gray\r
-      border-bottom: @portalDBlue 3px solid;\r
-    }\r
-    \r
-       input:not([type="button"]) {\r
-    height: 13px;\r
-} \r
-    .display-userApp-Catalog-Roles\r
-    {\r
-    padding-left: 16px;\r
-    padding-top: 10px;\r
-    font-family: Omnes-ECOMP-W02,Arial;\r
-    font-size: 18px;\r
-    color: #5a5a5a;\r
-    }\r
-       \r
-       #pending-checkbox{      \r
-       font-family: Omnes-ECOMP-W02,Arial;\r
-       font-size: 15px; \r
-       color: #5a5a5a;\r
-       }\r
-    .app-catalog-roles-list{\r
-      height: 286px;\r
-      \r
-      \r
-      .app-catalog-item{\r
-        border: 1px solid @portalLGray;\r
-        border-radius: 2px;\r
-        background-color: @funcBkgGray;\r
-\r
-        padding: 10px;\r
-        margin-top: 8px;\r
-        //margin-right: 6px;\r
-        //margin-left: 6px;\r
-\r
-        .app-catalog-item-left{\r
-          padding-top: 0;\r
-          line-height: 30px;\r
-          height: 30px;\r
-          vertical-align: middle;\r
-          display:inline-block;\r
-          width: 45%;\r
-          border-radius: 2px;\r
-          border: 1px solid @portalLGray;\r
-          margin-right: 10px;\r
-          padding-left: 4px;\r
-          background: @portalWhite;\r
-          white-space: nowrap;\r
-\r
-        }\r
-        .app-catalog-item-right{\r
-          display:inline-block;\r
-          width: 45%;\r
-          border-radius: 2px;\r
-          border: 1px solid @portalLGray;\r
-          background: @portalWhite;\r
-          vertical-align: middle;\r
-        }\r
-\r
-        .app-catalog-item-right-error{\r
-          .portalRed;\r
-          padding: 7px 7px 7px 7px;\r
-          display:inline-block;\r
-          width: 45%;\r
-          border-radius: 2px;\r
-          border: 1px solid @portalLGray;\r
-          background: @portalWhite;\r
-          vertical-align: middle;\r
-        }\r
-\r
-        .app-catalog-item-right-contacting{\r
-          .portalGreen;\r
-          padding: 7px 7px 7px 7px;\r
-          display:inline-block;\r
-          width: 45%;\r
-          border-radius: 2px;\r
-          border: 1px solid @portalLGray;\r
-          background: @portalWhite;\r
-          vertical-align: middle;\r
-        }\r
-\r
-        .app-select-left{\r
-          width: 45%;\r
-          margin-right: 10px;\r
-          vertical-align: middle;\r
-\r
-\r
-          .select-field{\r
-            padding-top: 0;\r
-            line-height: 30px;\r
-            height: 30px;\r
-            vertical-align: middle;\r
-            border-radius: 2px;\r
-            border: 1px solid @portalLGray;\r
-            margin-right: 10px;\r
-            padding-left: 4px;\r
-            background: @portalWhite;\r
-            display:inline-block;\r
-          }\r
-        }\r
-\r
-\r
-        .app-item-delete{\r
-          .ico_trash_default;\r
-          display: inline-block;\r
-          vertical-align: 2px;\r
-          cursor: pointer;\r
-          position: relative;\r
-          top: 6px;\r
-          color: transparent;\r
-          margin-left: 8px;\r
-\r
-        }\r
-\r
-      }\r
-    }\r
-\r
-  }\r
-}\r
+.new-catalog-modal {
+  height: 430px;
+
+  .user-catalog-roles{
+    .title{
+      //.n18r;
+      .dGray18r;  //AT&T Dark Gray
+      border-bottom: @portalDBlue 3px solid;
+    }
+    
+       input:not([type="button"]) {
+    height: 13px;
+} 
+    .display-userApp-Catalog-Roles
+    {
+    padding-left: 16px;
+    padding-top: 10px;
+    font-family: Omnes-ECOMP-W02,Arial;
+    font-size: 18px;
+    color: #5a5a5a;
+    }
+       
+       #pending-checkbox{      
+       font-family: Omnes-ECOMP-W02,Arial;
+       font-size: 15px; 
+       color: #5a5a5a;
+       }
+    .app-catalog-roles-list{
+      height: 286px;
+      
+      
+      .app-catalog-item{
+        border: 1px solid @portalLGray;
+        border-radius: 2px;
+        background-color: @funcBkgGray;
+
+        padding: 10px;
+        margin-top: 8px;
+        //margin-right: 6px;
+        //margin-left: 6px;
+
+        .app-catalog-item-left{
+          padding-top: 0;
+          line-height: 30px;
+          height: 30px;
+          vertical-align: middle;
+          display:inline-block;
+          width: 45%;
+          border-radius: 2px;
+          border: 1px solid @portalLGray;
+          margin-right: 10px;
+          padding-left: 4px;
+          background: @portalWhite;
+          white-space: nowrap;
+
+        }
+        .app-catalog-item-right{
+          display:inline-block;
+          width: 45%;
+          border-radius: 2px;
+          border: 1px solid @portalLGray;
+          background: @portalWhite;
+          vertical-align: middle;
+        }
+
+        .app-catalog-item-right-error{
+          .portalRed;
+          padding: 7px 7px 7px 7px;
+          display:inline-block;
+          width: 45%;
+          border-radius: 2px;
+          border: 1px solid @portalLGray;
+          background: @portalWhite;
+          vertical-align: middle;
+        }
+
+        .app-catalog-item-right-contacting{
+          .portalGreen;
+          padding: 7px 7px 7px 7px;
+          display:inline-block;
+          width: 45%;
+          border-radius: 2px;
+          border: 1px solid @portalLGray;
+          background: @portalWhite;
+          vertical-align: middle;
+        }
+
+        .app-select-left{
+          width: 45%;
+          margin-right: 10px;
+          vertical-align: middle;
+
+
+          .select-field{
+            padding-top: 0;
+            line-height: 30px;
+            height: 30px;
+            vertical-align: middle;
+            border-radius: 2px;
+            border: 1px solid @portalLGray;
+            margin-right: 10px;
+            padding-left: 4px;
+            background: @portalWhite;
+            display:inline-block;
+          }
+        }
+
+
+        .app-item-delete{
+          .ico_trash_default;
+          display: inline-block;
+          vertical-align: 2px;
+          cursor: pointer;
+          position: relative;
+          top: 6px;
+          color: transparent;
+          margin-left: 8px;
+
+        }
+
+      }
+    }
+
+  }
+}
index ad34b08..150a305 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-function _classCallCheck(instance, Constructor) {\r
-       if (!(instance instanceof Constructor)) {\r
-               throw new TypeError('Cannot call a class as a function');\r
-       }\r
-}\r
-\r
-(function() {\r
-       var HTTP_PROTOCOL_RGX = /https?:\/\//;\r
-\r
-       var CatalogCtrl = function CatalogCtrl(conf, catalogService, confirmBoxService, ExternalRequestAccessService,\r
-                       $log, $window, userProfileService, applicationsService, $scope, $state, \r
-                       $timeout, $interval, $modal, ngDialog) {\r
-\r
-               this.conf = conf;       \r
-               var _this = this;\r
-               _classCallCheck(this, CatalogCtrl);\r
-\r
-               // activate spinner\r
-               this.isLoading = true;\r
-               $scope.getAppCatalogIsDone = false;\r
-               $scope.radioValue = 'All';\r
-               $scope.$watch('radioValue', function(newValue, oldValue) {\r
-                       var appCatalog = $scope.appCatalog;\r
-                       $scope.appCatalog = [];\r
-                       $scope.appCatalog = appCatalog;\r
-\r
-                       \r
-               });\r
-               \r
-               this.catalogService = catalogService;\r
-               this.userProfileService = userProfileService;\r
-               this.applicationsService = applicationsService;\r
-               var resultAccessValue = null;\r
-               $scope.demoNum = 1;\r
-               $scope.appRoles = [];\r
-               \r
-        let init = () => {\r
-            getExternalAccess();\r
-        };\r
-        \r
-        var getExternalAccess = () => {\r
-               ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then(\r
-                               function(property) {\r
-               resultAccessValue = property.accessValue;\r
-                                       // $log.info(res);\r
-                               }).catch(err => {\r
-                        $log.error('CatalogCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.stringify(err));\r
-                    });    \r
-        };\r
-        \r
-\r
-       \r
-               $scope.applyPresentationDetailsToAppsCatalog = function(res, value) {\r
-                       \r
-                       _this.apps = res;\r
-                       var rowNo = 0;\r
-\r
-                       // defend against error string result -\r
-                       // a huge list that should never happen.\r
-                       var maxItems = 333;\r
-                       if (_this.apps.length < maxItems)\r
-                               maxItems = _this.apps.length;\r
-                       for (var i = 0; i < maxItems; i++) {                                                                                            \r
-                               let imgLnk = '';\r
-                               if (_this.apps[i].imageUrl)\r
-                                       imgLnk = conf.api.appThumbnail.replace(':appId', _this.apps[i].id);\r
-                               //$log.debug('CatalogCtlr::applyPresn: imgLink = ' + imgLnk);\r
-                               $scope.appCatalog[i] = {\r
-                                       sizeX : 2,\r
-                                       sizeY : 2,\r
-                                       id : _this.apps[i].id,\r
-                                       headerText : _this.apps[i].name,\r
-                                       imageLink : imgLnk,\r
-                                       restricted : _this.apps[i].restricted,  \r
-                                       select : _this.apps[i].select,\r
-                                       access : _this.apps[i].access,\r
-                                       pending: _this.apps[i].pending,\r
-                                       mlproperty: value\r
-                               };\r
-                       }\r
-                       //$log.debug('CatalogCtrl: getAppCatalog count : '\r
-                       //                              + $scope.appCatalog.length);\r
-                       _this.isLoading = false;\r
-                       $scope.getAppCatalogIsDone = true;\r
-               }\r
-               \r
-        let getAppsCatalog = () => {\r
-            catalogService.getAppCatalog()\r
-                .then(appsList => {\r
-                       $scope.applyPresentationDetailsToAppsCatalog(appsList);\r
-                }).catch(err => {\r
-                    confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +\r
-                        'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});\r
-                    $log.error('CatalogCtrl:openAddRoleModal: Error: ', err);\r
-                });\r
-        };\r
-        \r
-        this.openAddRoleModal = (item) => { \r
-               let data = null;\r
-\r
-            if((!item.restricted) && (item.mlproperty)){\r
-                data = {\r
-                    dialogState: 2,\r
-                    selectedUser:{\r
-                        attuid: $scope.attuid,\r
-                        firstName: $scope.firstName,\r
-                        lastName: $scope.lastName,\r
-                        headerText: item.headerText,\r
-                       item: item\r
-                        \r
-                    }\r
-                }\r
-            ngDialog.open({\r
-                templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html',\r
-                controller: 'NewCatalogModalCtrl',\r
-                controllerAs: 'userInfo',\r
-                data: data\r
-            }).closePromise.then(needUpdate => {\r
-                if(needUpdate.value === true){\r
-                       getAppsCatalog();\r
-                }\r
-               \r
-            });\r
-          }\r
-        };\r
-\r
-               // Run this function when user clicks on checkbox.\r
-               this.storeSelection = function(item) {\r
-                       // $log.debug('CatalogCtrl:storeSelection: item.id is ' + item.id + ', select is ' + item.select);\r
-                       var pendingFlag = false;\r
-                       \r
-                       if(item.access) \r
-                               pendingFlag = false;\r
-                       else\r
-                               pendingFlag =  item.pending;\r
-                                                       \r
-                       var appData = { \r
-                                       appId   : item.id,\r
-                                       select  : item.select,\r
-                                       pending : pendingFlag   // TODO\r
-                       };\r
-                       \r
-                       catalogService.updateManualAppSort(appData).then(\r
-                                       function(result) {\r
-                                               // $log.debug('CatalogCtrl:storeSelection result is ', result);\r
-                                       })['catch'](function(err) {\r
-                                               $log.error('CatalogCtrl:storeSelection: exception: ', err);\r
-                                       });\r
-                       catalogService.updateAppCatalog(appData).then(\r
-                               function(result) {\r
-                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);\r
-                               })['catch'](function(err) {\r
-                                       $log.error('CatalogCtrl:storeSelection: exception: ', err);\r
-                               });\r
-               };\r
-               \r
-               userProfileService\r
-                               .getUserProfile()\r
-                               .then(\r
-                                               function(profile) {\r
-                                                       $scope.attuid = profile.orgUserId;\r
-                                                       $scope.firstName = profile.firstName;\r
-                                                       $scope.lastName = profile.lastName;\r
-                                                       $scope.appCatalog = [];\r
-                                                       \r
-                                                       catalogService.getAppCatalog().then(\r
-                                                                                       function(res) { \r
-                                                                       $scope.applyPresentationDetailsToAppsCatalog(res, resultAccessValue);\r
-                                                                                       })['catch'](function(err) {\r
-                                                                       $log.error('CatalogCtrl: failed getAppCatalog: ', JSON.stringify(err));\r
-                                                                       _this.isLoading = false;\r
-                                                                       $scope.getAppCatalogIsDone = true;\r
-                                                 });\r
-                                               });\r
-\r
-                                                       // applicationsService.getUserApps()\r
-\r
-\r
-               this.gridsterOpts = {\r
-                       columns : 12,\r
-                       colWidth : 95,\r
-                       rowHeight : 95,\r
-                       margins : [ 20, 20 ],\r
-                       outerMargin : true,\r
-                       pushing : true,\r
-                       floating : true,\r
-                       swapping : true,\r
-               };\r
-\r
-               if (getParameterByName('noUserError') != null) {\r
-                       if (getParameterByName('noUserError') == "Show") {\r
-                               $("#errorInfo").show();\r
-                       }\r
-\r
-               }\r
-               \r
-               init();\r
-       };\r
-\r
-       CatalogCtrl.$inject = [ 'conf', 'catalogService', 'confirmBoxService', 'ExternalRequestAccessService', '$log',\r
-                       '$window', 'userProfileService', 'applicationsService', '$scope', \r
-                       '$state', '$timeout', '$interval', '$modal', 'ngDialog' ];\r
-       angular.module('ecompApp').controller('CatalogCtrl', CatalogCtrl);\r
-})();\r
-\r
-function getParameterByName(name, url) {\r
-       if (!url)\r
-               url = window.location.href;\r
-       name = name.replace(/[\[\]]/g, "\\$&");\r
-       var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex\r
-                       .exec(url);\r
-       if (!results)\r
-               return '';\r
-       if (!results[2])\r
-               return '';\r
-       return results[2].replace(/\+/g, " ");\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+function _classCallCheck(instance, Constructor) {
+       if (!(instance instanceof Constructor)) {
+               throw new TypeError('Cannot call a class as a function');
+       }
+}
+
+(function() {
+       var HTTP_PROTOCOL_RGX = /https?:\/\//;
+
+       var CatalogCtrl = function CatalogCtrl(conf, catalogService, confirmBoxService, ExternalRequestAccessService,
+                       $log, $window, userProfileService, applicationsService, $scope, $state, 
+                       $timeout, $interval, $modal, ngDialog) {
+
+               this.conf = conf;       
+               var _this = this;
+               var externalRequest = true;
+               _classCallCheck(this, CatalogCtrl);
+
+               // activate spinner
+               this.isLoading = true;
+               $scope.getAppCatalogIsDone = false;
+               $scope.radioValue = 'All';
+               $scope.$watch('radioValue', function(newValue, oldValue) {
+                       var appCatalog = $scope.appCatalog;
+                       $scope.appCatalog = [];
+                       $scope.appCatalog = appCatalog;
+
+                       
+               });
+               
+               this.catalogService = catalogService;
+               this.userProfileService = userProfileService;
+               this.applicationsService = applicationsService;
+               var resultAccessValue = null;
+               $scope.demoNum = 1;
+               $scope.appRoles = [];
+               
+        let init = () => {
+            getExternalAccess();
+        };
+        
+        var getExternalAccess = () => {
+               ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then(
+                               function(property) {
+               resultAccessValue = property.accessValue;
+                                       // $log.info(res);
+                               }).catch(err => {
+                        $log.error('CatalogCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.stringify(err));
+                    });    
+        };
+        
+
+       
+               $scope.applyPresentationDetailsToAppsCatalog = function(res, value) {
+                       
+                       _this.apps = res;
+                       var rowNo = 0;
+
+                       // defend against error string result -
+                       // a huge list that should never happen.
+                       var maxItems = 333;
+                       if (_this.apps.length < maxItems)
+                               maxItems = _this.apps.length;
+                       for (var i = 0; i < maxItems; i++) {                                                                                            
+                               let imgLnk = '';
+                               if (_this.apps[i].imageUrl)
+                                       imgLnk = conf.api.appThumbnail.replace(':appId', _this.apps[i].id);
+                               //$log.debug('CatalogCtlr::applyPresn: imgLink = ' + imgLnk);
+                               $scope.appCatalog[i] = {
+                                       sizeX : 2,
+                                       sizeY : 2,
+                                       id : _this.apps[i].id,
+                                       headerText : _this.apps[i].name,
+                                       mlAppName: _this.apps[i].mlAppName,
+                                       imageLink : imgLnk,
+                                       restricted : _this.apps[i].restricted,  
+                                       select : _this.apps[i].select,
+                                       access : _this.apps[i].access,
+                                       pending: _this.apps[i].pending,
+                                       mlproperty: value
+                               };
+                       }
+                       //$log.debug('CatalogCtrl: getAppCatalog count : '
+                       //                              + $scope.appCatalog.length);
+                       _this.isLoading = false;
+                       $scope.getAppCatalogIsDone = true;
+               }
+               
+        let getAppsCatalog = () => {
+            catalogService.getAppCatalog()
+                .then(appsList => {
+                       $scope.applyPresentationDetailsToAppsCatalog(appsList);
+                }).catch(err => {
+                    confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
+                        'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                    $log.error('CatalogCtrl:openAddRoleModal: Error: ', err);
+                });
+        };
+        
+        this.openAddRoleModal = (item) => { 
+               let data = null;
+
+            if((!item.restricted) && (item.mlproperty)){
+                data = {
+                    dialogState: 2,
+                    selectedUser:{
+                        attuid: $scope.attuid,
+                        firstName: $scope.firstName,
+                        lastName: $scope.lastName,
+                        headerText: item.headerText,
+                        haloAppName : item.mlAppName,
+                       item: item,
+                       extReqValue : externalRequest
+                        
+                    }
+                }
+            ngDialog.open({
+                templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html',
+                controller: 'NewCatalogModalCtrl',
+                controllerAs: 'userInfo',
+                data: data
+            }).closePromise.then(needUpdate => {
+                if(needUpdate.value === true){
+                       getAppsCatalog();
+                }
+               
+            });
+          }
+        };
+
+               // Run this function when user clicks on checkbox.
+               this.storeSelection = function(item) {
+                       // $log.debug('CatalogCtrl:storeSelection: item.id is ' + item.id + ', select is ' + item.select);
+                       var pendingFlag = false;
+                       
+                       if(item.access) 
+                               pendingFlag = false;
+                       else
+                               pendingFlag =  item.pending;
+                                                       
+                       var appData = { 
+                                       appId   : item.id,
+                                       select  : item.select,
+                                       pending : pendingFlag   // TODO
+                       };
+                       
+                       catalogService.updateManualAppSort(appData).then(
+                                       function(result) {
+                                               // $log.debug('CatalogCtrl:storeSelection result is ', result);
+                                       })['catch'](function(err) {
+                                               $log.error('CatalogCtrl:storeSelection: exception: ', err);
+                                       });
+                       catalogService.updateAppCatalog(appData).then(
+                               function(result) {
+                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);
+                               })['catch'](function(err) {
+                                       $log.error('CatalogCtrl:storeSelection: exception: ', err);
+                               });
+               };
+               
+               userProfileService
+                               .getUserProfile()
+                               .then(
+                                               function(profile) {
+                                                       $scope.attuid = profile.orgUserId;
+                                                       $scope.firstName = profile.firstName;
+                                                       $scope.lastName = profile.lastName;
+                                                       $scope.appCatalog = [];
+                                                       
+                                                       catalogService.getAppCatalog().then(
+                                                                                       function(res) { 
+                                                                       $scope.applyPresentationDetailsToAppsCatalog(res, resultAccessValue);
+                                                                                       })['catch'](function(err) {
+                                                                       $log.error('CatalogCtrl: failed getAppCatalog: ', JSON.stringify(err));
+                                                                       _this.isLoading = false;
+                                                                       $scope.getAppCatalogIsDone = true;
+                                                 });
+                                               });
+
+                                                       // applicationsService.getUserApps()
+
+
+               this.gridsterOpts = {
+                       columns : 12,
+                       colWidth : 95,
+                       rowHeight : 95,
+                       margins : [ 20, 20 ],
+                       outerMargin : true,
+                       pushing : true,
+                       floating : true,
+                       swapping : true,
+                       resizable: {
+                               enabled: false,
+                       },
+               };
+
+               if (getParameterByName('noUserError') != null) {
+                       if (getParameterByName('noUserError') == "Show") {
+                               $("#errorInfo").show();
+                       }
+
+               }
+               
+               init();
+       };
+
+       CatalogCtrl.$inject = [ 'conf', 'catalogService', 'confirmBoxService', 'ExternalRequestAccessService', '$log',
+                       '$window', 'userProfileService', 'applicationsService', '$scope', 
+                       '$state', '$timeout', '$interval', '$modal', 'ngDialog' ];
+       angular.module('ecompApp').controller('CatalogCtrl', CatalogCtrl);
+})();
+
+function getParameterByName(name, url) {
+       if (!url)
+               url = window.location.href;
+       name = name.replace(/[\[\]]/g, "\\$&");
+       var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex
+                       .exec(url);
+       if (!results)
+               return '';
+       if (!results[2])
+               return '';
+       return results[2].replace(/\+/g, " ");
+}
index 68bf9ef..b4063ad 100644 (file)
@@ -1,90 +1,90 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-app-catalog">\r
-       <div class="app-catalog-container" id="page-content">\r
-               <div id="title" class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page">Application Catalog</h1>\r
-               </div>\r
-               <div class="app-catalog-list">\r
-                       <div class="simulateCatGridHeader">\r
-                               <span class="simulateCatGridHeaderDetails"> Click the check\r
-                                       boxes below to choose which applications are shown on the <a\r
-                                       href="applicationsHome">home page</a>.\r
-                               </span> <br> <br> <label id="label-all"\r
-                                       class="simulateCatGridHeaderRadio"> Filter: <input\r
-                                       id="radio-button-all" type="radio" ng-model="radioValue"\r
-                                       value="All"> All\r
-                               </label> <label id="label-accessible" class="simulateCatGridHeaderRadio">\r
-                                       <input id="radio-button-accessible" type="radio"\r
-                                       ng-model="radioValue" value="Accessible"> Accessible\r
-                               </label> <label id="label-homepage" class="simulateCatGridHeaderRadio">\r
-                                       <input id="radio-button-homepage" type="radio"\r
-                                       ng-model="radioValue" value="Selected"> On Home Page\r
-                               </label>\r
-\r
-                       </div>\r
-                       <div class="appCatalogue-boarder" >\r
-                               <div gridster="catalog.gridsterOpts">   \r
-                                       <ul>    \r
-                                               <li gridster-item="item" ng-repeat="item in appCatalog"\r
-                                                       ng-if="(item.select && radioValue=='Selected') || (item.access && radioValue=='Accessible') || (radioValue == 'All')">\r
-                                                       <div class="gridster-box" style="{{!item.access?' color:lightgray !important':''}}">\r
-                                                               <div class="gridster-box-header"\r
-                                                                       ng-show="(item.select && radioValue=='Selected') || (item.access && radioValue=='Accessible') || (radioValue == 'All')">\r
-                                                                       <i class="icon-content-gridguide"></i>\r
-                                                                       <h3 style="cursor: context-menu">{{item.headerText |\r
-                                                                               elipsis: 13}}</h3>\r
-                                                                           <div class="form-row" ng-show="item.access || isAdminPortalAdmin">\r
-                                                                               <label class="checkbox">\r
-                                                                                   <input type="checkbox" ng-model="item.select" ng-change="catalog.storeSelection(item)">\r
-                                                                                   <i class="skin"></i> \r
-                                                                               </label> \r
-                                                                               <i ng-show="item.pending" class="icon-tickets-contested"></i>                                                                                                                                                   \r
-                                                                       </div>\r
-                                                               </div>\r
-                                                               <div class="gridster-box-content"\r
-                                                                       ng-style="{'cursor':'pointer',\r
-                                                                               'background-image': 'url('+(item.imageLink)+')',\r
-                                                                               'order': item.order, \r
-                                                                               'background-color':'white',\r
-                                                                               'background-repeat': 'no-repeat',\r
-                                                                               'background-size': '170px 130px'}"\r
-                                                                       ng-click="catalog.openAddRoleModal(item)"\r
-                                                                       ng-hide="users.isLoadingTable && !users.getAppCatalogIsDone"\r
-                                                                       >\r
-                                                               </div>\r
-                                                       </div>\r
-                                               </li>\r
-                                       </ul>\r
-                               </div>\r
-                       </div>\r
-                       \r
-                       <br>\r
-\r
-                       <div style="text-align: right;">\r
-                               To request access to an application, please visit the <a\r
-                                       ng-href="getAccess">Get Access</a> page.\r
-                       </div>\r
-\r
-                       <br>\r
-               </div>\r
-\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-app-catalog">
+       <div class="app-catalog-container" id="page-content">
+               <div id="title" class="w-ecomp-main-view-title">
+                       <h1 class="heading-page">Application Catalog</h1>
+               </div>
+               <div class="app-catalog-list">
+                       <div class="simulateCatGridHeader">
+                               <span class="simulateCatGridHeaderDetails"> Click the check
+                                       boxes below to choose which applications are shown on the <a
+                                       href="applicationsHome">home page</a>.
+                               </span> <br> <br> <label id="label-all"
+                                       class="simulateCatGridHeaderRadio"> Filter: <input
+                                       id="radio-button-all" type="radio" ng-model="radioValue"
+                                       value="All"> All
+                               </label> <label id="label-accessible" class="simulateCatGridHeaderRadio">
+                                       <input id="radio-button-accessible" type="radio"
+                                       ng-model="radioValue" value="Accessible"> Accessible
+                               </label> <label id="label-homepage" class="simulateCatGridHeaderRadio">
+                                       <input id="radio-button-homepage" type="radio"
+                                       ng-model="radioValue" value="Selected"> On Home Page
+                               </label>
+
+                       </div>
+                       <div class="appCatalogue-boarder" >
+                               <div gridster="catalog.gridsterOpts">   
+                                       <ul>    
+                                               <li gridster-item="item" ng-repeat="item in appCatalog"
+                                                       ng-if="(item.select && radioValue=='Selected') || (item.access && radioValue=='Accessible') || (radioValue == 'All')">
+                                                       <div class="gridster-box" style="{{!item.access?' color:lightgray !important':''}}">
+                                                               <div class="gridster-box-header"
+                                                                       ng-show="(item.select && radioValue=='Selected') || (item.access && radioValue=='Accessible') || (radioValue == 'All')">
+                                                                       <i id="gridster-{{item.headerText.split(' ').join('-')}}-icon" class="icon-content-gridguide"></i>
+                                                                       <h3 style="cursor: context-menu">{{item.headerText |
+                                                                               elipsis: 13}}</h3>
+                                                                           <div class="form-row" ng-show="item.access || isAdminPortalAdmin">
+                                                                               <label class="checkbox">
+                                                                                   <input id="gridster-{{item.headerText.split(' ').join('-')}}-icon-checkbox" type="checkbox" ng-model="item.select" ng-change="catalog.storeSelection(item)">
+                                                                                   <i class="skin"></i> 
+                                                                               </label> 
+                                                                               <i ng-show="item.pending" class="icon-tickets-contested"></i>                                                                                                                                                   
+                                                                       </div>
+                                                               </div>
+                                                               <div class="gridster-box-content"
+                                                                       ng-style="{'cursor':'pointer',
+                                                                               'background-image': 'url('+(item.imageLink)+')',
+                                                                               'order': item.order, 
+                                                                               'background-color':'white',
+                                                                               'background-repeat': 'no-repeat',
+                                                                               'background-size': '170px 130px'}"
+                                                                       ng-click="catalog.openAddRoleModal(item)"
+                                                                       ng-hide="users.isLoadingTable && !users.getAppCatalogIsDone"
+                                                                       >
+                                                               </div>
+                                                       </div>
+                                               </li>
+                                       </ul>
+                               </div>
+                       </div>
+                       
+                       <br>
+
+                       <div style="text-align: right;">
+                               To request access to an application, please visit the <a
+                               id="get-access-page-link" ng-href="getAccess">Get Access</a> page.
+                       </div>
+
+                       <br>
+               </div>
+
+       </div>
+</div>
index a5b754f..8a84854 100644 (file)
@@ -1,42 +1,42 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="confirmation-box-container">\r
-    <div class="confirmation-message-wrap">\r
-        <div class="confirmation-message" >\r
-                       <div>\r
-                               You do not have access to this application.  \r
-                               See the \r
-                               <a href="" ng-click="confirmBox.goTo('root.getAccess', {appName: confirmBox.message.headerText})">\r
-                                       Get Access page</a> and request access at MyLogins.\r
-                                       <br><br>\r
-                                       You may check this box if access is pending: \r
-                               <input type="checkbox" \r
-                                       att-checkbox \r
-                                       ng-model="confirmBox.message.pending"\r
-                                       ng-change="confirmBox.storeSelection(confirmBox.message)"\r
-                               >\r
-                       </div>\r
-\r
-               </div>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div class="cancel-button" ng-click="confirmBox.closeBox(false)">Close</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="confirmation-box-container">
+    <div class="confirmation-message-wrap">
+        <div class="confirmation-message" >
+                       <div>
+                               You do not have access to this application.  
+                               See the 
+                               <a href="" ng-click="confirmBox.goTo('root.getAccess', {appName: confirmBox.message.headerText})">
+                                       Get Access page</a> and request access at MyLogins.
+                                       <br><br>
+                                       You may check this box if access is pending: 
+                               <input type="checkbox" 
+                                       att-checkbox 
+                                       ng-model="confirmBox.message.pending"
+                                       ng-change="confirmBox.storeSelection(confirmBox.message)"
+                               >
+                       </div>
+
+               </div>
+    </div>
+    <div class="dialog-control">
+        <div class="cancel-button" ng-click="confirmBox.closeBox(false)">Close</div>
+    </div>
+</div>
index 01b48de..69f9af8 100644 (file)
@@ -1,31 +1,31 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="confirmation-box-container">\r
-    <div class="confirmation-title-wrap">\r
-        <div class="confirmation-title" ng-bind="confirmBox.title"></div>\r
-    </div>\r
-    <div class="confirmation-message-wrap">\r
-        <div class="confirmation-message" ng-bind="confirmBox.message"></div>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div id="confirm-admin-update" class="btn btn-alt btn-small"  ng-click="confirmBox.closeBox(true)">Confirm</div>\r
-        <div id="cancel-admin-update" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Cancel</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="confirmation-box-container">
+    <div class="confirmation-title-wrap">
+        <div class="confirmation-title" ng-bind="confirmBox.title"></div>
+    </div>
+    <div class="confirmation-message-wrap">
+        <div class="confirmation-message" ng-bind="confirmBox.message"></div>
+    </div>
+    <div class="dialog-control">
+        <div id="confirm-admin-update" class="btn btn-alt btn-small"  ng-click="confirmBox.closeBox(true)">Confirm</div>
+        <div id="cancel-admin-update" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Cancel</div>
+    </div>
+</div>
index 26d39a7..36eb04a 100644 (file)
@@ -1,49 +1,49 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 1/18/16.\r
- */\r
-'use strict';\r
-(function () {\r
-    class ConfirmationBoxCtrl {\r
-        constructor($scope,$state) {\r
-\r
-            let init = () => {\r
-                let item = ($scope.ngDialogData && $scope.ngDialogData.item) || 'this';\r
-                this.message = $scope.ngDialogData.message ? $scope.ngDialogData.message : `Are you sure you want to delete "${item}"?`;\r
-                this.title = $scope.ngDialogData.title ? $scope.ngDialogData.title : '';\r
-            };\r
-\r
-            this.closeBox = isConfirmed => {\r
-                $scope.closeThisDialog(isConfirmed);\r
-            };\r
-            \r
-            this.goTo = (state, params) => {\r
-               $scope.closeThisDialog(false);\r
-               $state.go(state,params);\r
-               \r
-            };\r
-\r
-            init();\r
-        }\r
-    }\r
-    ConfirmationBoxCtrl.$inject = ['$scope','$state'];\r
-    angular.module('ecompApp').controller('ConfirmationBoxCtrl', ConfirmationBoxCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 1/18/16.
+ */
+'use strict';
+(function () {
+    class ConfirmationBoxCtrl {
+        constructor($scope,$state) {
+
+            let init = () => {
+                let item = ($scope.ngDialogData && $scope.ngDialogData.item) || 'this';
+                this.message = $scope.ngDialogData.message ? $scope.ngDialogData.message : `Are you sure you want to delete "${item}"?`;
+                this.title = $scope.ngDialogData.title ? $scope.ngDialogData.title : '';
+            };
+
+            this.closeBox = isConfirmed => {
+                $scope.closeThisDialog(isConfirmed);
+            };
+            
+            this.goTo = (state, params) => {
+               $scope.closeThisDialog(false);
+               $state.go(state,params);
+               
+            };
+
+            init();
+        }
+    }
+    ConfirmationBoxCtrl.$inject = ['$scope','$state'];
+    angular.module('ecompApp').controller('ConfirmationBoxCtrl', ConfirmationBoxCtrl);
+})();
index 0131307..8f880ef 100644 (file)
@@ -1,28 +1,28 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="confirmation-box-container">\r
-    <div class="confirmation-message-wrap">\r
-        <div id="confirmation-message" class="confirmation-message" ng-bind="confirmBox.message"></div>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div id="confirmation-button-next" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(true)">OK</div>\r
-        <div id="confirmation-button-cancel" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Cancel</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="confirmation-box-container">
+    <div class="confirmation-message-wrap">
+        <div id="confirmation-message" class="confirmation-message" ng-bind="confirmBox.message"></div>
+    </div>
+    <div class="dialog-control">
+        <div id="confirmation-button-next" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(true)">OK</div>
+        <div id="confirmation-button-cancel" class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Cancel</div>
+    </div>
+</div>
index a7a3fd4..f6a1a29 100644 (file)
@@ -1,31 +1,31 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="confirmation-box-container">\r
-    <div class="confirmation-title-wrap">\r
-        <div class="confirmation-title" ng-bind="confirmBox.title"></div>\r
-    </div>\r
-    <div class="confirmation-message-wrap">\r
-        <div class="confirmation-message" ng-bind="confirmBox.message"></div>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div class="next-button" ng-click="confirmBox.closeBox(true)">Confirm</div>\r
-        <div class="cancel-button" ng-click="confirmBox.closeBox(false)">Cancel</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="confirmation-box-container">
+    <div class="confirmation-title-wrap">
+        <div class="confirmation-title" ng-bind="confirmBox.title"></div>
+    </div>
+    <div class="confirmation-message-wrap">
+        <div class="confirmation-message" ng-bind="confirmBox.message"></div>
+    </div>
+    <div class="dialog-control">
+        <div class="next-button" ng-click="confirmBox.closeBox(true)">Confirm</div>
+        <div class="cancel-button" ng-click="confirmBox.closeBox(false)">Cancel</div>
+    </div>
+</div>
index 912b971..1eaa281 100644 (file)
@@ -1,27 +1,27 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="confirmation-box-container">\r
-    <div class="confirmation-message-wrap">\r
-        <div class="confirmation-message" >{{confirmBox.message}}</div>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Close</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="confirmation-box-container">
+    <div class="confirmation-message-wrap">
+        <div class="confirmation-message" >{{confirmBox.message}}</div>
+    </div>
+    <div class="dialog-control" id="dialog-close">
+        <div id="close-button"  class="btn btn-alt btn-small" ng-click="confirmBox.closeBox(false)">Close</div>
+    </div>
+</div>
index 9883bd1..f47e17c 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div style="margin-top: 10px; margin-bottom: 10psx;">\r
-       <h1 class="heading1"></h1>\r
-</div>\r
-<br />\r
-\r
-<div style="margin-top: 25px;">\r
-       <div id="title" class="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</div>\r
-               <div class="widgets-popup-margin">         \r
-            <div class="get-access-table">\r
-                <div class="table-control" style="margin:30px;">\r
-                                       <div class="c-ecomp-portal-abs-table" style="height:300px"">\r
-                    <table b2b-table id="table-main" \r
-                       table-data="ignoredTableData"\r
-                        current-page="ignoredCurrentPage">\r
-                        <thead b2b-table-row type="header">\r
-                               <tr>\r
-                                   <th id="th-users-1" b2b-table-header key="title" sortable="true" >Title</th>\r
-                                   <th id="th-users-2" b2b-table-header key="href" sortable="true" >URL</th>\r
-                                   <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" b2b-table-header key="event_date" sortable="true" >Date</th>\r
-                                   <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" b2b-table-header key="content" sortable="true" >Content</th>\r
-                                   <th id="th-users-5" b2b-table-header key="sortOrder" sortable="true" >Order</th>\r
-                                   <th id="th-users-6" b2b-table-header key="edit" sortable="false" >Edit</th>\r
-                                    <th id="th-users-7" b2b-table-header key="delete" sortable="false" >Delete</th>\r
-                               </tr>\r
-                        </thead>\r
-                        <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->\r
-                        <tbody b2b-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">\r
-                               <tr id="tr-rowData" ng-click="">\r
-                                   <td b2b-table-body>\r
-                                       <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>\r
-                                      <input id="widget-input-title"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>\r
-                                   </td>\r
-                                   <td b2b-table-body>\r
-                                       <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>\r
-                                       <input id="widget-input-href" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>\r
-                                   </td>\r
-                                   <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>\r
-                                       <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>\r
-                                       <input id="widget-input-date" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>\r
-                                   </td>\r
-                                   <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>\r
-                                       <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>\r
-                                       <input id="widget-input-content"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>\r
-                                   </td>\r
-                                   <td b2b-table-body>\r
-                                       <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>\r
-                                       <input id="widget-input-order"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>      \r
-                                   </td>                            \r
-                                   <td b2b-table-body>\r
-                                       <div class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">\r
-                                               <span class="icon-edit"></span>\r
-                                       </div>\r
-                                       <span ng-show="rowData.showEdit">\r
-                                               <a att-button btn-type="primary" ng-click="modify($index);" class="button button--primary" size="small" >Save</a>\r
-                                               </span>\r
-                                   </td>\r
-                                   <td b2b-table-body>\r
-                                       <div class="delete-contact-us" ng-click="remove($index);">\r
-                                               <span class="icon-misc-trash"></span>\r
-                                       </div>\r
-                                   </td>\r
-                               </tr>\r
-                        </tbody>\r
-                    </table>\r
-                </div>\r
-                \r
-                <div att-divider-lines></div>\r
-                                       <div style="margin-top: 15px; margin-left: -80px;" >\r
-                                       <form name = "widgetForm" novalidate>                           \r
-                                               <div id="addWidgetHeader" class="contact-us-margin">                            \r
-                                                       <h1 style="font-size:18px;">Add</h1>\r
-                                                       <div class="errMsg">{{errMsg}}</div>\r
-                                                       <div class="sucessMsg" ng-bind="successMsg"></div>\r
-                                               </div>                                                            \r
-                                               <div id="addWidget" class="contact-us-margin">\r
-                                                       <div>\r
-                                                               <div>\r
-                                                                       <div class="add-widget-field">\r
-                                                                  <div id="mots-property-label" class="property-label">Title</div>\r
-                                                                   <input id="widget-input-add-title" class="input-text-area" type="text"  ng-model="newWidgetObject.title" name="title" ng-required="true"/>                                                            \r
-                                                               </div>\r
-                                                               <div class="add-widget-field">\r
-                                                                   <div  class="property-label">URL</div>\r
-                                                                   <input id="widget-input-add-url" class="input-text-area" type="text"  ng-model="newWidgetObject.href" type="url" size="3" name = "url"  ng-required = "true"/>\r
-                                                               </div>\r
-                                                               <div class="add-widget-field" >\r
-                                                                   <div class="property-label">Sort Order</div>\r
-                                                                   <input id="widget-input-add-order" class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>\r
-                                                               </div>\r
-                                                       </div>\r
-                                                        <div  class="add-widget-field"  ng-controller="DatePickerController" ng-show="{{widgetType=='EVENTS'}}">\r
-                                                                   <h4>Event Date</h4>\r
-                                                                   <div>\r
-                                                                     <div>\r
-                                                                       <p class="input-group">\r
-                                                                         <input id="widget-input-add-date" type="text" name = "eventDate" datetime="yyyy-MM-dd" class="input-text-area" uib-datepicker-popup="{{format}}" \r
-                                                                                       ng-model="newWidgetObject.eventDate" is-open="popup1.opened" datepicker-options="dateOptions" close-text="Close" alt-input-formats="altInputFormats" \r
-                                                                          ng-focus="open1()"\r
-                                                                          ng-required = "widgetType =='EVENTS'" />\r
-                                                                       </p>\r
-                                                                     </div>\r
-                                                                       </div>\r
-                                                               </div>  \r
-                                                               \r
-                                                       <div class="add-contact-us-field-des"  ng-show="{{widgetType=='EVENTS'}}">\r
-                                                           <div  class="property-label">Content</div>\r
-                                                           <textarea style="margin-top: 0px; margin-bottom: 0px; height: 150px" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">\r
-                                                           </textarea>                                                     \r
-                                                       </div>\r
-                                               </div>\r
-                                                       <div style="height:50px;">\r
-                                                                       <a style="float:right; margin-top:20px;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="saveNew()">Add New</a>\r
-                                       \r
-                                                       </div>\r
-                                                       \r
-                                                       <div att-divider-lines></div>\r
-                                       \r
-                                               </div>\r
-                                       </form>\r
-                                       </div>\r
-                                   <div style="height:50px;">\r
-                                               <a style="float:right;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="closeDialog()">Close</a>\r
-                                       </div>           \r
-            </div>\r
-        </div>\r
-    </div>\r
-</div>\r
-       \r
-<script type="application/javascript">\r
-    $(document).ready(function(){\r
-        $(".ngdialog-content").css("width","85%")\r
-    });\r
-</script>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div style="margin-top: 10px; margin-bottom: 10psx;">
+       <h1 class="heading1"></h1>
+</div>
+<br />
+
+<div style="margin-top: 25px;">
+       <div id="title" class="manage-contactUs-home-manageWidgets-title">Manage {{widgetTypeDisplay}} Widgets</div>
+               <div class="widgets-popup-margin">         
+            <div class="get-access-table">
+                <div class="table-control" style="margin:30px;">
+                                       <div class="c-ecomp-portal-abs-table" style="height:300px"">
+                    <table b2b-table id="table-main" 
+                       table-data="ignoredTableData"
+                        current-page="ignoredCurrentPage">
+                        <thead b2b-table-row type="header">
+                               <tr>
+                                   <th id="th-users-1" b2b-table-header key="title" sortable="true" >Title</th>
+                                   <th id="th-users-2" b2b-table-header key="href" sortable="true" >URL</th>
+                                   <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-3" b2b-table-header key="event_date" sortable="true" >Date</th>
+                                   <th ng-show="{{widgetType=='EVENTS'}}" id="th-users-4" b2b-table-header key="content" sortable="true" >Content</th>
+                                   <th id="th-users-5" b2b-table-header key="sortOrder" sortable="true" >Order</th>
+                                   <th id="th-users-6" b2b-table-header key="edit" sortable="false" >Edit</th>
+                                    <th id="th-users-7" b2b-table-header key="delete" sortable="false" >Delete</th>
+                               </tr>
+                        </thead>
+                        <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
+                        <tbody b2b-table-row type="body" class="table-body" track-by="$index" row-repeat="rowData in widgetData">
+                               <tr id="tr-rowData" ng-click="">
+                                   <td b2b-table-body>
+                                       <div id="widget-td-title" ng-hide="rowData.showEdit" ng-bind="rowData.title"></div>
+                                      <input id="widget-input-title-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].title"/>
+                                   </td>
+                                   <td b2b-table-body>
+                                       <div id="widget-td-href" ng-hide="rowData.showEdit" ng-bind="rowData.href"></div>
+                                       <input id="widget-input-href-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].href"/>
+                                   </td>
+                                   <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
+                                       <div id="widget-td-date" ng-hide="rowData.showEdit" ng-bind="rowData.eventDate"></div>
+                                       <input id="widget-input-date-{{$index}}" type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].eventDate"/>
+                                   </td>
+                                   <td  ng-show="{{widgetType=='EVENTS'}}" b2b-table-body>
+                                       <div id="widget-td-content" ng-hide="rowData.showEdit">{{rowData.content | cut:true:20:' ...'}}</div>
+                                       <input id="widget-input-content-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].content"/>
+                                   </td>
+                                   <td b2b-table-body>
+                                       <div id="widget-td-order" ng-hide="rowData.showEdit" ng-bind="rowData.sortOrder"></div>
+                                       <input id="widget-input-order-{{$index}}"  type="text" ng-show="rowData.showEdit" ng-model="widgetData[$index].sortOrder"/>      
+                                   </td>                            
+                                   <td b2b-table-body>
+                                       <div id="edit-contact-us-button" class="delete-contact-us" ng-hide="rowData.showEdit" ng-click="setEdit($index);">
+                                               <span class="icon-edit"></span>
+                                       </div>
+                                       <span ng-show="rowData.showEdit">
+                                               <a id="save-button" att-button btn-type="primary" ng-click="modify($index);" class="button button--primary" size="small" >Save</a>
+                                               </span>
+                                   </td>
+                                   <td b2b-table-body>
+                                       <div id="remove-contact-us" class="delete-contact-us" ng-click="remove($index);">
+                                               <span class="icon-misc-trash"></span>
+                                       </div>
+                                   </td>
+                               </tr>
+                        </tbody>
+                    </table>
+                </div>
+                
+                <div att-divider-lines></div>
+                                       <div style="margin-top: 15px; margin-left: -80px;" >
+                                       <form name = "widgetForm" novalidate>                           
+                                               <div id="addWidgetHeader" class="contact-us-margin">                            
+                                                       <h1 style="font-size:18px;">Add</h1>
+                                                       <div class="errMsg">{{errMsg}}</div>
+                                                       <div class="sucessMsg" ng-bind="successMsg"></div>
+                                               </div>                                                            
+                                               <div id="addWidget" class="contact-us-margin">
+                                                       <div>
+                                                               <div>
+                                                                       <div class="add-widget-field">
+                                                                  <div id="mots-property-label" class="property-label">Title</div>
+                                                                   <input id="widget-input-add-title" class="input-text-area" type="text"  ng-model="newWidgetObject.title" name="title" ng-required="true"/>                                                            
+                                                               </div>
+                                                               <div class="add-widget-field">
+                                                                   <div  class="property-label">URL</div>
+                                                                   <input id="widget-input-add-url" class="input-text-area" type="text"  ng-model="newWidgetObject.href" type="url" size="3" name = "url"  ng-required = "true"/>
+                                                               </div>
+                                                               <div class="add-widget-field" >
+                                                                   <div class="property-label">Sort Order</div>
+                                                                   <input id="widget-input-add-order" class="input-text-area" type="text" ng-model="newWidgetObject.sortOrder"/>
+                                                               </div>
+                                                       </div>
+                                                        <div  class="add-widget-field"  ng-controller="DatePickerController" ng-show="{{widgetType=='EVENTS'}}">
+                                                                   <h4>Event Date</h4>
+                                                                   <div>
+                                                                     <div>
+                                                                       <p class="input-group">
+                                                                         <input id="widget-input-add-date" type="text" name = "eventDate" datetime="yyyy-MM-dd" class="input-text-area" uib-datepicker-popup="{{format}}" 
+                                                                                       ng-model="newWidgetObject.eventDate" is-open="popup1.opened" datepicker-options="dateOptions" close-text="Close" alt-input-formats="altInputFormats" 
+                                                                          ng-focus="open1()"
+                                                                          ng-required = "widgetType =='EVENTS'" />
+                                                                       </p>
+                                                                     </div>
+                                                                       </div>
+                                                               </div>  
+                                                               
+                                                       <div class="add-contact-us-field-des"  ng-show="{{widgetType=='EVENTS'}}">
+                                                           <div  class="property-label">Content</div>
+                                                           <textarea style="margin-top: 0px; margin-bottom: 0px; height: 150px" ng-model="newWidgetObject.content" name="content" ng-required = "widgetType =='EVENTS'">
+                                                           </textarea>                                                     
+                                                       </div>
+                                               </div>
+                                                       <div style="height:50px;">
+                                                                       <a id="add-button" style="float:right; margin-top:20px;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="saveNew()">Add New</a>
+                                       
+                                                       </div>
+                                                       
+                                                       <div att-divider-lines></div>
+                                       
+                                               </div>
+                                       </form>
+                                       </div>
+                                   <div style="height:50px;">
+                                               <a id="close-button" style="float:right;" att-button btn-type="primary" class="button button--primary" size="small" ng-click="closeDialog()">Close</a>
+                                       </div>           
+            </div>
+        </div>
+    </div>
+</div>
+       
+<script type="application/javascript">
+    $(document).ready(function(){
+        $(".ngdialog-content").css("width","85%");
+        $(".ngdialog-close").attr('id','dialog-close');
+    });
+</script>
index 59e6f4f..1f958b7 100644 (file)
@@ -1,86 +1,92 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="manage-widget-parameters-header"></div>\r
-<div id="title" class="manage-widget-parameters-title">Manage\r
-       Widgets Parameters Page</div>\r
-<div class="widgets-popup-margin">\r
-       <div class="get-access-table">\r
-               <div class="table-control manage-widget-parameters-table">\r
-                       <div class="c-ecomp-att-abs-table manage-widget-parameters-table-details">\r
-                               <table b2b-table id="table-main" table-data="ignoredTableData"\r
-                                       current-page="ignoredCurrentPage"  ng-show="isLoadingTable">\r
-                                       <thead b2b-table-row type="header">\r
-                                               <tr>\r
-                                                       <th id="th-users-2" b2b-table-header key="href" sortable="true">Parameter\r
-                                                               Key</th>\r
-                                                       <th id="th-users-3" b2b-table-header key="event_date"\r
-                                                               sortable="true">My Value</th>\r
-                                                       <th id="th-users-4" b2b-table-header key="content"\r
-                                                               sortable="true">Default Value</th>\r
-                                                       <th id="th-users-5" b2b-table-header key="edit" sortable="false">Edit</th>\r
-                                                       <th id="th-users-5" b2b-table-header key="edit" sortable="false">Reset to Default</th>\r
-                                               </tr>\r
-                                       </thead>\r
-                                       <tbody b2b-table-row type="body" class="table-body"\r
-                                               track-by="$index" row-repeat="rowData in widgetParam">\r
-                                               <tr id="tr-rowData">\r
-                                                       <td b2b-table-body>\r
-                                                               <div id="widget-parameter-td-parameter-key"\r
-                                                                       ng-bind="rowData.param_key"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body>\r
-                                                               <div id="widget-parameter-td-parameter-user-value"\r
-                                                                       ng-hide="rowData.showEdit" ng-bind="rowData.user_value"></div>\r
-                                                               <input id="widget-input-user-value" type="text"\r
-                                                               ng-show="rowData.showEdit"\r
-                                                               ng-model="widgetParam[$index].user_value" />\r
-                                                       </td>\r
-\r
-                                                       <td b2b-table-body>\r
-                                                               <div id="widget-parameter-td-parameter-default-value"\r
-                                                                       ng-bind="rowData.default_value"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body>\r
-                                                               <div ng-hide="rowData.showEdit" ng-click="setEdit($index);">\r
-                                                                       <span class="icon-edit"></span>\r
-                                                               </div> <span ng-show="rowData.showEdit"> <a att-button\r
-                                                                       btn-type="primary" ng-click="modify($index);"\r
-                                                                       class="button button--primary" size="small">Save</a>\r
-                                                       </span>\r
-                                                       </td>\r
-                                                       <td b2b-table-body>\r
-                                                               <div ng-click="resetDefault($index);">\r
-                                                                       <span class="icon-edit"></span>\r
-                                                               </div> \r
-                                                       </span>\r
-                                                       </td>\r
-                                               </tr>\r
-                                       </tbody>\r
-\r
-                               </table>\r
-                               <div ng-show = "messageInfo">\r
-                                       There is no parameter assoicated with this widget!\r
-                               </div>\r
-                               \r
-                       </div>\r
-\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="manage-widget-parameters-header"></div>
+<div id="title" class="manage-widget-parameters-title">Manage
+       Widgets Parameters Page</div>
+<div class="widgets-popup-margin">
+       <div class="get-access-table">
+               <div class="table-control manage-widget-parameters-table">
+                       <div class="c-ecomp-att-abs-table manage-widget-parameters-table-details">
+                               <table b2b-table id="table-main" table-data="ignoredTableData"
+                                       current-page="ignoredCurrentPage"  ng-show="isLoadingTable">
+                                       <thead b2b-table-row type="header">
+                                               <tr>
+                                                       <th id="th-users-2" b2b-table-header key="href" sortable="true">Parameter
+                                                               Key</th>
+                                                       <th id="th-users-3" b2b-table-header key="event_date"
+                                                               sortable="true">My Value</th>
+                                                       <th id="th-users-4" b2b-table-header key="content"
+                                                               sortable="true">Default Value</th>
+                                                       <th id="th-users-5" b2b-table-header key="edit" sortable="false">Edit</th>
+                                                       <th id="th-users-5" b2b-table-header key="edit" sortable="false">Reset to Default</th>
+                                               </tr>
+                                       </thead>
+                                       <tbody b2b-table-row type="body" class="table-body"
+                                               track-by="$index" row-repeat="rowData in widgetParam">
+                                               <tr id="tr-rowData">
+                                                       <td b2b-table-body>
+                                                               <div id="widget-parameter-td-parameter-key"
+                                                                       ng-bind="rowData.param_key"></div>
+                                                       </td>
+                                                       <td b2b-table-body>
+                                                               <div id="widget-parameter-td-parameter-user-value"
+                                                                       ng-hide="rowData.showEdit" ng-bind="rowData.user_value"></div>
+                                                               <input id="widget-input-user-value" type="text"
+                                                               ng-show="rowData.showEdit"
+                                                               ng-model="widgetParam[$index].user_value" />
+                                                       </td>
+
+                                                       <td b2b-table-body>
+                                                               <div id="widget-parameter-td-parameter-default-value"
+                                                                       ng-bind="rowData.default_value"></div>
+                                                       </td>
+                                                       <td b2b-table-body>
+                                                               <div ng-hide="rowData.showEdit" ng-click="setEdit($index);">
+                                                                       <span class="icon-edit"></span>
+                                                               </div> <span ng-show="rowData.showEdit"> <a att-button
+                                                                       btn-type="primary" ng-click="modify($index);"
+                                                                       class="button button--primary" size="small">Save</a>
+                                                       </span>
+                                                       </td>
+                                                       <td b2b-table-body>
+                                                               <div ng-click="resetDefault($index);">
+                                                                       <span class="icon-edit"></span>
+                                                               </div> 
+                                                       </span>
+                                                       </td>
+                                               </tr>
+                                       </tbody>
+
+                               </table>
+                               <div ng-show = "messageInfo">
+                                       There is no parameter assoicated with this widget!
+                               </div>
+                               
+                       </div>
+
+               </div>
+       </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 460618e..fb9a254 100644 (file)
@@ -1,81 +1,81 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class WidgetParameterController {\r
-        constructor($scope, widgetsCatalogService, userProfileService) {\r
-               let widgetId = $scope.ngDialogData.widgetId;\r
-               $scope.modflag = false;\r
-               $scope.isLoadingTable = false;\r
-               $scope.messageInfo = false;\r
-               \r
-               widgetsCatalogService.getWidgetCatalogParameters(widgetId).then(res => {\r
-                       if(res.status == 'OK'){\r
-                               $scope.isLoadingTable = true;\r
-                               $scope.widgetParam = res.response;\r
-                       }else if(res.status == 'WARN'){\r
-                               $scope.messageInfo = true;\r
-                       }\r
-             }).catch(err => {\r
-                 $log.error('WidgetParameterController::init error: ' + err);\r
-             })\r
-               \r
-                $scope.setEdit = function(index) {\r
-                       if($scope.modflag === false){\r
-                               $scope.widgetParam[index].showEdit = true;\r
-                               $scope.modflag = true;\r
-                       }\r
-                }              \r
-               \r
-                $scope.resetDefault = function(index) {\r
-                       var widgetParamObject = {};\r
-               widgetParamObject.user_value = $scope.widgetParam[parseInt(index)].default_value;\r
-               widgetParamObject.paramId = $scope.widgetParam[parseInt(index)].param_id;\r
-               widgetParamObject.widgetId = widgetId;\r
-                       widgetsCatalogService.saveWidgetParameter(widgetParamObject)\r
-                       .then(function(res){\r
-                               if(res.status == 'OK'){\r
-                                       $scope.widgetParam[index].user_value = $scope.widgetParam[index].default_value;\r
-                               }\r
-                       });\r
-                }           \r
-               \r
-                $scope.modify = function(index) {\r
-                       \r
-                       var widgetParamObject = {};\r
-                       widgetParamObject.user_value = $scope.widgetParam[parseInt(index)].user_value;\r
-                       widgetParamObject.paramId = $scope.widgetParam[parseInt(index)].param_id;\r
-                       widgetParamObject.widgetId = widgetId;\r
-                       \r
-                       widgetsCatalogService.saveWidgetParameter(widgetParamObject)\r
-                       .then(function(res){\r
-                               if(res.status == 'OK'){\r
-                                       $scope.modflag = false;\r
-                                       $scope.widgetParam[index].showEdit = false;\r
-                               }\r
-                       });\r
-                       \r
-               };      \r
-        }           \r
-    }\r
-    WidgetParameterController.$inject = ['$scope', 'widgetsCatalogService', 'userProfileService'];\r
-    angular.module('ecompApp').controller('WidgetParameterController', WidgetParameterController); \r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class WidgetParameterController {
+        constructor($scope, widgetsCatalogService, userProfileService) {
+               let widgetId = $scope.ngDialogData.widgetId;
+               $scope.modflag = false;
+               $scope.isLoadingTable = false;
+               $scope.messageInfo = false;
+               
+               widgetsCatalogService.getWidgetCatalogParameters(widgetId).then(res => {
+                       if(res.status == 'OK'){
+                               $scope.isLoadingTable = true;
+                               $scope.widgetParam = res.response;
+                       }else if(res.status == 'WARN'){
+                               $scope.messageInfo = true;
+                       }
+             }).catch(err => {
+                 $log.error('WidgetParameterController::init error: ' + err);
+             })
+               
+                $scope.setEdit = function(index) {
+                       if($scope.modflag === false){
+                               $scope.widgetParam[index].showEdit = true;
+                               $scope.modflag = true;
+                       }
+                }              
+               
+                $scope.resetDefault = function(index) {
+                       var widgetParamObject = {};
+               widgetParamObject.user_value = $scope.widgetParam[parseInt(index)].default_value;
+               widgetParamObject.paramId = $scope.widgetParam[parseInt(index)].param_id;
+               widgetParamObject.widgetId = widgetId;
+                       widgetsCatalogService.saveWidgetParameter(widgetParamObject)
+                       .then(function(res){
+                               if(res.status == 'OK'){
+                                       $scope.widgetParam[index].user_value = $scope.widgetParam[index].default_value;
+                               }
+                       });
+                }           
+               
+                $scope.modify = function(index) {
+                       
+                       var widgetParamObject = {};
+                       widgetParamObject.user_value = $scope.widgetParam[parseInt(index)].user_value;
+                       widgetParamObject.paramId = $scope.widgetParam[parseInt(index)].param_id;
+                       widgetParamObject.widgetId = widgetId;
+                       
+                       widgetsCatalogService.saveWidgetParameter(widgetParamObject)
+                       .then(function(res){
+                               if(res.status == 'OK'){
+                                       $scope.modflag = false;
+                                       $scope.widgetParam[index].showEdit = false;
+                               }
+                       });
+                       
+               };      
+        }           
+    }
+    WidgetParameterController.$inject = ['$scope', 'widgetsCatalogService', 'userProfileService'];
+    angular.module('ecompApp').controller('WidgetParameterController', WidgetParameterController); 
+})();
index ce63acd..76521f9 100644 (file)
@@ -1,28 +1,28 @@
-.manage-widget-parameters-title{\r
-       color: #067ab4;\r
-    font-family: "Omnes-ECOMP-W02", Arial;;\r
-    font-size: 24px;\r
-    margin-left: 30px;\r
-    width: 1170px;\r
-    margin-top: 20px; \r
-    margin-bottom: 10px;\r
-}\r
-\r
-.manage-widget-parameters-table{\r
-       margin: 30px;\r
-}\r
-\r
-.manage-widget-parameters-table-details{\r
-       height: 300px;\r
-       background-color: #ffffff;\r
-}\r
-\r
-.manage-widget-parameters-header{\r
-       margin-top: 20px;\r
-       margin-bottom: 20px;\r
-       height:20px;\r
-}\r
-\r
-.ngdialog-content{\r
-       width: 40%;\r
+.manage-widget-parameters-title{
+       color: #067ab4;
+    font-family: "Omnes-ECOMP-W02", Arial;;
+    font-size: 24px;
+    margin-left: 30px;
+    width: 1170px;
+    margin-top: 20px; 
+    margin-bottom: 10px;
+}
+
+.manage-widget-parameters-table{
+       margin: 30px;
+}
+
+.manage-widget-parameters-table-details{
+       height: 300px;
+       background-color: #ffffff;
+}
+
+.manage-widget-parameters-header{
+       margin-top: 20px;
+       margin-bottom: 20px;
+       height:20px;
+}
+
+.ngdialog-content{
+       width: 40%;
 }
\ No newline at end of file
index fe0bf45..aff4e0c 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class CommonWidgetController {\r
-        constructor(dashboardService, $scope, message, $q, $http, conf, $filter,confirmBoxService,$log) {\r
-               $scope.widgetType = message.type;\r
-               $scope.widgetTypeDisplay = message.type;\r
-               $scope.modflag = false;\r
-               \r
-               switch (message.type) {\r
-            case 'EVENTS':\r
-               $scope.widgetTypeDisplay = 'Events'\r
-                break;\r
-            case 'NEWS':\r
-               $scope.widgetTypeDisplay = 'News'\r
-                break;\r
-            case 'IMPORTANTRESOURCES':\r
-               $scope.widgetTypeDisplay = 'Resources'\r
-                break;\r
-               }\r
\r
-               $scope.widgetData = [];\r
-               dashboardService.getCommonWidgetData(message.type)\r
-               .then(function (res) {\r
-                        // console.log('CommonWidgetController: result is ' + res);\r
-                        $scope.widgetData = res.response.items;\r
-                });\r
-                 \r
-                \r
-                \r
-               $scope.setEdit = function(index) {\r
-                       \r
-                       //for(var i=0; i<$scope.widgetData )\r
-                       \r
-                       if($scope.modflag === false){\r
-                               $scope.widgetData[index].showEdit = true;\r
-                               $scope.modflag = true;\r
-                       }\r
-                }               \r
-               \r
-                $scope.modify = function(index) {\r
-                       \r
-                       $scope.widgetObject = {};\r
-                       $scope.widgetObject.id = $scope.widgetData[parseInt(index)].id;\r
-                       $scope.widgetObject.category = $scope.widgetData[parseInt(index)].category;\r
-                       $scope.widgetObject.title = $scope.widgetData[parseInt(index)].title;\r
-                       $scope.widgetObject.href = $scope.widgetData[parseInt(index)].href;\r
-                       $scope.widgetObject.eventDate = $scope.widgetData[parseInt(index)].eventDate;\r
-                       $scope.widgetObject.content = $scope.widgetData[parseInt(index)].content;\r
-                       $scope.widgetObject.sortOrder = $scope.widgetData[parseInt(index)].sortOrder;\r
-                       \r
-                       var validateMsg = $scope.validateWidgetObject($scope.widgetObject);\r
-                       if (validateMsg) {\r
-                               confirmBoxService.showInformation(validateMsg).then(isConfirmed => {return;});\r
-                               return;\r
-                       }\r
-                       \r
-                       dashboardService.saveCommonWidgetData($scope.widgetObject)\r
-                       .then(function(res){\r
-                               if (res.status == 'OK') {\r
-                               dashboardService.getCommonWidgetData(message.type)\r
-                               .then(function(res){\r
-                                       $scope.widgetData = res.response.items;\r
-                               $scope.modflag = false;\r
-                                       $scope.cancelEdit(index);\r
-                                       });\r
-                               }\r
-                               else {\r
-                                       // Save failed\r
-                                       confirmBoxService.showInformation("Save failed").then(isConfirmed => {return;});\r
-                                       return;\r
-                               }\r
-                       });   \r
-\r
-               };      \r
-               \r
-               $scope.newWidgetObject = {};\r
-               \r
-               // Answers string error if validation fails; \r
-               // answers null if all is well.\r
-               $scope.validateWidgetObject = function(wo) {\r
-                       if (wo.title == null || wo.title == '')\r
-                               return "Please enter a title.";\r
-                       if (wo.href == null || wo.href == '' || !validateUrl(wo.href))\r
-                               return "Please enter a valid URL that starts with http.";\r
-                       if (wo.sortOrder == null || wo.sortOrder == '' || isNaN(parseInt(wo.sortOrder)))\r
-                               return "Please enter a number for the sort order.";\r
-                       if (wo.category=='EVENTS') {\r
-                               if (wo.eventDate == null || wo.eventDate == '')\r
-                                       return "Please enter a date for the event.";\r
-                               // Parses and normalizes the date with rollover.\r
-                               var filteredDate = $filter('date')(wo.eventDate, "yyyy-MM-dd");\r
-                               // $log.debug('dashboard-widget-controller: date filter yields ' + filteredDate);\r
-                               // The date picker shows mm/dd/yy.\r
-                               if (filteredDate == null || filteredDate.length != 10)\r
-                                       return "Please enter a valid date as YYYY-MM-DD";\r
-                               if (wo.content==null || wo.content=='')\r
-                                       return "Please enter content for the event.";\r
-                       }\r
-                       return null;\r
-               };\r
-               \r
-               $scope.saveNew = function() {\r
-                       $scope.newWidgetObject.category = message.type;\r
-                       // $log.info($scope.newWidgetObject);\r
-                       var validateMsg = $scope.validateWidgetObject($scope.newWidgetObject);\r
-                       if (validateMsg) {\r
-                               confirmBoxService.showInformation(validateMsg).then(isConfirmed => {return;});\r
-                               return;\r
-                       }\r
-                       // Transform date into expected storage format\r
-                       $scope.newWidgetObject.eventDate = $filter('date')($scope.newWidgetObject.eventDate, "yyyy-MM-dd");\r
-\r
-                       dashboardService.saveCommonWidgetData($scope.newWidgetObject)\r
-                       .then(function(res){\r
-                               if (res.status == 'OK') {\r
-                                       $scope.widgetForm.$setPristine();  \r
-                                       confirmBoxService.showInformation('You have added a new item').then(isConfirmed => {\r
-                                       });\r
-                                       dashboardService.getCommonWidgetData(message.type)\r
-                                       .then(function(res){\r
-                                               $scope.widgetData = res.response.items;\r
-                                               $scope.newWidgetObject = {};\r
-                               });  \r
-                               }\r
-                               else {\r
-                                       confirmBoxService.showInformation("Save failed").then(isConfirmed => {return;});\r
-                                       return;\r
-                               }                               \r
-                       });                     \r
-               };\r
-               \r
-               $scope.remove = function(index) {\r
-                       var confirmMsg = 'Are you sure you want to delete this item from the list?' + ' Press OK to delete.';\r
-                       confirmBoxService.confirm(confirmMsg).then(function (confirmed) {\r
-                    if (confirmed == true) { \r
-                       $scope.widgetObject = {};\r
-                               $scope.widgetObject.id = $scope.widgetData[parseInt(index)].id;\r
-                               $scope.widgetObject.category = $scope.widgetData[parseInt(index)].category;\r
-                               $scope.widgetObject.title = $scope.widgetData[parseInt(index)].title;\r
-                               $scope.widgetObject.href = $scope.widgetData[parseInt(index)].href;\r
-                               $scope.widgetObject.sortOrder = $scope.widgetData[parseInt(index)].sortOrder;\r
-                               \r
-                               \r
-                               dashboardService.removeCommonWidgetData($scope.widgetObject)\r
-                               .then(function(res){\r
-                                       dashboardService.getCommonWidgetData(message.type)\r
-                                       .then(function(res){\r
-                                               $scope.widgetData = res.response.items;\r
-                                               $scope.cancelEdit(index);\r
-                                       });                             \r
-                               });                             \r
-                    }\r
-                });\r
-                                       \r
-               };      \r
-               $scope.closeDialog = function(){\r
-                       $scope.closeThisDialog( $scope.widgetData);\r
-               }\r
-               $scope.deleteSpeedDial = function(widget){\r
-                       \r
-                }\r
-                \r
-                $scope.manage = function(index) {\r
-                               $scope.modflag = true;\r
-                               \r
-                               var thisdata = $scope.widgetData[index];\r
-                       $scope.editMode=true;\r
-                       var category = "#category"+index;\r
-                       var categoryEdit = "#categoryEdit"+index;\r
-                       \r
-                       var title = "#title"+index;\r
-                       var titleEdit = "#titleEdit"+index;\r
-\r
-                       var url = "#href"+index;\r
-                       var urlEdit = "#hrefEdit"+index;\r
-                       \r
-                       var order = "#order"+index;\r
-                       var orderEdit = "#orderEdit"+index;\r
-                 \r
-                       var eventDate = "#eventDate"+index;\r
-                       var eventDateEdit = "#eventDateEdit"+index;\r
-                 \r
-                       \r
-                       var dsavebutton  ="#savebutton"+index;\r
-                       var dremovebutton="#removebutton"+index;\r
-                       var dmanagebutton="#managebutton"+index;\r
-                       var deditRbutton="#editRbutton"+index;\r
-                       \r
-                       $(title).css('display', 'none');\r
-                       $(titleEdit).css('display', 'inherit'); \r
-                       $(url).css('display', 'none');\r
-                       $(urlEdit).css('display', 'inherit'); \r
-                       $(order).css('display', 'none');\r
-                       $(orderEdit).css('display', 'inherit');\r
-                       $(eventDate).css('display', 'none');\r
-                       $(eventDateEdit).css('display', 'inherit');\r
-                       \r
-                       $(dsavebutton).css('display', 'inherit');\r
-                       $(dremovebutton).css('display', 'inherit');\r
-                       $(dmanagebutton).css('display', 'none');\r
-                       $(deditRbutton).css('display', 'inherit');\r
-                       \r
-                     };\r
-                     \r
-                  $scope.cancelEdit = function(index) {\r
-                       \r
-                       $scope.editMode=false;\r
-                       var category = "#category"+index;\r
-                       var categoryEdit = "#categoryEdit"+index;\r
-                       \r
-                       var title = "#title"+index;\r
-                       var titleEdit = "#titleEdit"+index;\r
-       \r
-                       var url = "#href"+index;\r
-                       var urlEdit = "#hrefEdit"+index;\r
-                       \r
-                       var order = "#order"+index;\r
-                       var orderEdit = "#orderEdit"+index;\r
-\r
-                       var eventDate = "#eventDate"+index;\r
-                       var eventDateEdit = "#eventDateEdit"+index;\r
-\r
-                       var dsavebutton  ="#savebutton"+index;\r
-                       var dremovebutton  ="#removebutton"+index;\r
-                       var dmanagebutton="#managebutton"+index;\r
-                       var deditRbutton="#editRbutton"+index;\r
-               \r
-                       $(title).css('display', 'inherit');\r
-                       $(titleEdit).css('display', 'none'); \r
-                       \r
-                       $(url).css('display', 'inherit');\r
-                       $(urlEdit).css('display', 'none'); \r
-                       \r
-                       $(order).css('display', 'inherit');\r
-                       $(orderEdit).css('display', 'none');\r
-\r
-                       $(eventDate).css('display', 'inherit');\r
-                       $(eventDateEdit).css('display', 'none');\r
-\r
-                       $(dsavebutton).css('display', 'none');\r
-                       $(dremovebutton).css('display', 'none');\r
-                       $(dmanagebutton).css('display', 'inherit');\r
-                       $(deditRbutton).css('display', 'none');\r
-                       \r
-                    };\r
-               \r
-               $scope.popupConfirmWin = function(title, msgBody, callback){\r
-               modalService.popupConfirmWin.apply(null, arguments);\r
-            };\r
-        }           \r
-    }\r
-    CommonWidgetController.$inject = ['dashboardService', '$scope', 'message', '$q', '$http', 'conf', '$filter','confirmBoxService','$log'];\r
-    angular.module('ecompApp').controller('CommonWidgetController', CommonWidgetController); \r
-})();\r
-\r
-angular.module('ecompApp').filter('cut', function () {\r
-    return function (value, wordwise, max, tail) {\r
-        if (!value) return '';\r
-\r
-        max = parseInt(max, 10);\r
-        if (!max) return value;\r
-        if (value.length <= max) return value;\r
-\r
-        value = value.substr(0, max);\r
-        if (wordwise) {\r
-            var lastspace = value.lastIndexOf(' ');\r
-            if (lastspace != -1) {\r
-              //Also remove . and , so its gives a cleaner result.\r
-              if (value.charAt(lastspace-1) == '.' || value.charAt(lastspace-1) == ',') {\r
-                lastspace = lastspace - 1;\r
-              }\r
-              value = value.substr(0, lastspace);\r
-            }\r
-        }\r
-\r
-        return value + (tail || ' â€¦');\r
-    };\r
-});\r
-\r
-angular.module('ecompApp').controller('DatePickerController', function ($scope, uibDateParser) {\r
-                 $scope.today = function() {\r
-                   $scope.dt = new Date();\r
-                 };\r
-                 $scope.today();\r
-\r
-                 $scope.clear = function() {\r
-                   $scope.dt = null;\r
-                 };\r
-\r
-                 $scope.inlineOptions = {\r
-                   customClass: getDayClass,\r
-                   minDate: new Date(),\r
-                   showWeeks: true\r
-                 };\r
-\r
-                 $scope.dateOptions = {\r
-                   dateDisabled: disabled,\r
-                   formatYear: 'yy',\r
-                   minDate: new Date(),\r
-                   startingDay: 1\r
-                 };\r
-\r
-                 // Disable weekend selection\r
-                 function disabled(data) {\r
-                   var date = data.date,\r
-                     mode = data.mode;\r
-                   return mode === 'day' && (date.getDay() === 0 || date.getDay() === 6);\r
-                 }\r
-\r
-                 $scope.toggleMin = function() {\r
-                   $scope.inlineOptions.minDate = $scope.inlineOptions.minDate ? null : new Date();\r
-                   $scope.dateOptions.minDate = $scope.inlineOptions.minDate;\r
-                 };\r
-\r
-                 $scope.toggleMin();\r
-\r
-                 $scope.open1 = function() {\r
-                       // console.log('In open1');\r
-                   $scope.popup1.opened = true;\r
-                 };\r
-\r
-                 $scope.open2 = function() {\r
-                       // console.log('In open2');\r
-                       $scope.popup2.opened = true;\r
-                 };\r
-\r
-                 \r
-                 $scope.setDate = function(year, month, day) {\r
-                   $scope.dt = new Date(year, month, day);\r
-                 };\r
-\r
-                 $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];\r
-                 $scope.format = $scope.formats[3];\r
-                 $scope.altInputFormats = ['M!/d!/yyyy'];\r
-\r
-                 $scope.popup1 = {\r
-                   opened: false\r
-                 };\r
-\r
-                 $scope.popup2 = {\r
-                   opened: false\r
-                 };\r
-\r
-                 var tomorrow = new Date();\r
-                 tomorrow.setDate(tomorrow.getDate() + 1);\r
-                 var afterTomorrow = new Date();\r
-                 afterTomorrow.setDate(tomorrow.getDate() + 1);\r
-                 $scope.events = [\r
-                   {\r
-                     date: tomorrow,\r
-                     status: 'full'\r
-                   },\r
-                   {\r
-                     date: afterTomorrow,\r
-                     status: 'partially'\r
-                   }\r
-                 ];\r
-\r
-                 function getDayClass(data) {\r
-                   var date = data.date,\r
-                     mode = data.mode;\r
-                   if (mode === 'day') {\r
-                     var dayToCheck = new Date(date).setHours(0,0,0,0);\r
-\r
-                     for (var i = 0; i < $scope.events.length; i++) {\r
-                       var currentDay = new Date($scope.events[i].date).setHours(0,0,0,0);\r
-\r
-                       if (dayToCheck === currentDay) {\r
-                         return $scope.events[i].status;\r
-                       }\r
-                     }\r
-                   }\r
-\r
-                   return '';\r
-                 }\r
-});\r
-\r
-\r
-\r
-function toggleCollapsible(id, clickedIconId, subtitutingIconId){\r
-       $("#"+id).toggle();\r
-       $("#"+clickedIconId).toggle();\r
-       $("#"+subtitutingIconId).toggle();\r
-       setTimeout(function(){focusFirstEle(id);}, 1000);\r
-}\r
-\r
-function focusFirstEle(id){\r
-       var focusItems = $("#"+id).find(":focusable");\r
-       for(var i=0; i<focusItems.length; i++){\r
-               if(!isHidden(focusItems[i])){\r
-                       var targetClassName = focusItems[i].className;\r
-                       if(targetClassName!='collapsibleArrow'){\r
-                               focusItems[i].focus();\r
-                               return;\r
-                       }\r
-               }\r
-       }\r
-}     \r
-\r
-function validateUrl(value){\r
-    return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);\r
-  }\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class CommonWidgetController {
+        constructor(dashboardService, $scope, message, $q, $http, conf, $filter,confirmBoxService,$log) {
+               $scope.widgetType = message.type;
+               $scope.widgetTypeDisplay = message.type;
+               $scope.modflag = false;
+               
+               switch (message.type) {
+            case 'EVENTS':
+               $scope.widgetTypeDisplay = 'Events'
+                break;
+            case 'NEWS':
+               $scope.widgetTypeDisplay = 'News'
+                break;
+            case 'IMPORTANTRESOURCES':
+               $scope.widgetTypeDisplay = 'Resources'
+                break;
+               }
+               $scope.widgetData = [];
+               dashboardService.getCommonWidgetData(message.type)
+               .then(function (res) {
+                        // console.log('CommonWidgetController: result is ' + res);
+                        $scope.widgetData = res.response.items;
+                });
+                 
+                
+                
+               $scope.setEdit = function(index) {
+                       
+                       //for(var i=0; i<$scope.widgetData )
+                       
+                       if($scope.modflag === false){
+                               $scope.widgetData[index].showEdit = true;
+                               $scope.modflag = true;
+                       }
+                }               
+               
+                $scope.modify = function(index) {
+                       
+                       $scope.widgetObject = {};
+                       $scope.widgetObject.id = $scope.widgetData[parseInt(index)].id;
+                       $scope.widgetObject.category = $scope.widgetData[parseInt(index)].category;
+                       $scope.widgetObject.title = $scope.widgetData[parseInt(index)].title;
+                       $scope.widgetObject.href = $scope.widgetData[parseInt(index)].href;
+                       $scope.widgetObject.eventDate = $scope.widgetData[parseInt(index)].eventDate;
+                       $scope.widgetObject.content = $scope.widgetData[parseInt(index)].content;
+                       $scope.widgetObject.sortOrder = $scope.widgetData[parseInt(index)].sortOrder;
+                       
+                       var validateMsg = $scope.validateWidgetObject($scope.widgetObject);
+                       if (validateMsg) {
+                               confirmBoxService.showInformation(validateMsg).then(isConfirmed => {return;});
+                               return;
+                       }
+                       
+                       dashboardService.saveCommonWidgetData($scope.widgetObject)
+                       .then(function(res){
+                               if (res.status == 'OK') {
+                               dashboardService.getCommonWidgetData(message.type)
+                               .then(function(res){
+                                       $scope.widgetData = res.response.items;
+                               $scope.modflag = false;
+                                       $scope.cancelEdit(index);
+                                       });
+                               }
+                               else {
+                                       // Save failed
+                                       confirmBoxService.showInformation("Save failed").then(isConfirmed => {return;});
+                                       return;
+                               }
+                       });   
+
+               };      
+               
+               $scope.newWidgetObject = {};
+               
+               // Answers string error if validation fails; 
+               // answers null if all is well.
+               $scope.validateWidgetObject = function(wo) {
+                       if (wo.title == null || wo.title == '')
+                               return "Please enter a title.";
+                       if (wo.href == null || wo.href == '' || !validateUrl(wo.href))
+                               return "Please enter a valid URL that starts with http.";
+                       if (wo.sortOrder == null || wo.sortOrder == '' || isNaN(parseInt(wo.sortOrder)))
+                               return "Please enter a number for the sort order.";
+                       if (wo.category=='EVENTS') {
+                               if (wo.eventDate == null || wo.eventDate == '')
+                                       return "Please enter a date for the event.";
+                               // Parses and normalizes the date with rollover.
+                               var filteredDate = $filter('date')(wo.eventDate, "yyyy-MM-dd");
+                               // $log.debug('dashboard-widget-controller: date filter yields ' + filteredDate);
+                               // The date picker shows mm/dd/yy.
+                               if (filteredDate == null || filteredDate.length != 10)
+                                       return "Please enter a valid date as YYYY-MM-DD";
+                               if (wo.content==null || wo.content=='')
+                                       return "Please enter content for the event.";
+                       }
+                       return null;
+               };
+               
+               $scope.saveNew = function() {
+                       $scope.newWidgetObject.category = message.type;
+                       // $log.info($scope.newWidgetObject);
+                       var validateMsg = $scope.validateWidgetObject($scope.newWidgetObject);
+                       if (validateMsg) {
+                               confirmBoxService.showInformation(validateMsg).then(isConfirmed => {return;});
+                               return;
+                       }
+                       // Transform date into expected storage format
+                       $scope.newWidgetObject.eventDate = $filter('date')($scope.newWidgetObject.eventDate, "yyyy-MM-dd");
+
+                       dashboardService.saveCommonWidgetData($scope.newWidgetObject)
+                       .then(function(res){
+                               if (res.status == 'OK') {
+                                       $scope.widgetForm.$setPristine();  
+                                       confirmBoxService.showInformation('You have added a new item').then(isConfirmed => {
+                                       });
+                                       dashboardService.getCommonWidgetData(message.type)
+                                       .then(function(res){
+                                               $scope.widgetData = res.response.items;
+                                               $scope.newWidgetObject = {};
+                               });  
+                               }
+                               else {
+                                       confirmBoxService.showInformation("Save failed").then(isConfirmed => {return;});
+                                       return;
+                               }                               
+                       });                     
+               };
+               
+               $scope.remove = function(index) {
+                       var confirmMsg = 'Are you sure you want to delete this item from the list?' + ' Press OK to delete.';
+                       confirmBoxService.confirm(confirmMsg).then(function (confirmed) {
+                    if (confirmed == true) { 
+                       $scope.widgetObject = {};
+                               $scope.widgetObject.id = $scope.widgetData[parseInt(index)].id;
+                               $scope.widgetObject.category = $scope.widgetData[parseInt(index)].category;
+                               $scope.widgetObject.title = $scope.widgetData[parseInt(index)].title;
+                               $scope.widgetObject.href = $scope.widgetData[parseInt(index)].href;
+                               $scope.widgetObject.sortOrder = $scope.widgetData[parseInt(index)].sortOrder;
+                               
+                               
+                               dashboardService.removeCommonWidgetData($scope.widgetObject)
+                               .then(function(res){
+                                       dashboardService.getCommonWidgetData(message.type)
+                                       .then(function(res){
+                                               $scope.widgetData = res.response.items;
+                                               $scope.cancelEdit(index);
+                                       });                             
+                               });                             
+                    }
+                });
+                                       
+               };      
+               $scope.closeDialog = function(){
+                       $scope.closeThisDialog( $scope.widgetData);
+               }
+               $scope.deleteSpeedDial = function(widget){
+                       
+                }
+                
+                $scope.manage = function(index) {
+                               $scope.modflag = true;
+                               
+                               var thisdata = $scope.widgetData[index];
+                       $scope.editMode=true;
+                       var category = "#category"+index;
+                       var categoryEdit = "#categoryEdit"+index;
+                       
+                       var title = "#title"+index;
+                       var titleEdit = "#titleEdit"+index;
+
+                       var url = "#href"+index;
+                       var urlEdit = "#hrefEdit"+index;
+                       
+                       var order = "#order"+index;
+                       var orderEdit = "#orderEdit"+index;
+                 
+                       var eventDate = "#eventDate"+index;
+                       var eventDateEdit = "#eventDateEdit"+index;
+                 
+                       
+                       var dsavebutton  ="#savebutton"+index;
+                       var dremovebutton="#removebutton"+index;
+                       var dmanagebutton="#managebutton"+index;
+                       var deditRbutton="#editRbutton"+index;
+                       
+                       $(title).css('display', 'none');
+                       $(titleEdit).css('display', 'inherit'); 
+                       $(url).css('display', 'none');
+                       $(urlEdit).css('display', 'inherit'); 
+                       $(order).css('display', 'none');
+                       $(orderEdit).css('display', 'inherit');
+                       $(eventDate).css('display', 'none');
+                       $(eventDateEdit).css('display', 'inherit');
+                       
+                       $(dsavebutton).css('display', 'inherit');
+                       $(dremovebutton).css('display', 'inherit');
+                       $(dmanagebutton).css('display', 'none');
+                       $(deditRbutton).css('display', 'inherit');
+                       
+                     };
+                     
+                  $scope.cancelEdit = function(index) {
+                       
+                       $scope.editMode=false;
+                       var category = "#category"+index;
+                       var categoryEdit = "#categoryEdit"+index;
+                       
+                       var title = "#title"+index;
+                       var titleEdit = "#titleEdit"+index;
+       
+                       var url = "#href"+index;
+                       var urlEdit = "#hrefEdit"+index;
+                       
+                       var order = "#order"+index;
+                       var orderEdit = "#orderEdit"+index;
+
+                       var eventDate = "#eventDate"+index;
+                       var eventDateEdit = "#eventDateEdit"+index;
+
+                       var dsavebutton  ="#savebutton"+index;
+                       var dremovebutton  ="#removebutton"+index;
+                       var dmanagebutton="#managebutton"+index;
+                       var deditRbutton="#editRbutton"+index;
+               
+                       $(title).css('display', 'inherit');
+                       $(titleEdit).css('display', 'none'); 
+                       
+                       $(url).css('display', 'inherit');
+                       $(urlEdit).css('display', 'none'); 
+                       
+                       $(order).css('display', 'inherit');
+                       $(orderEdit).css('display', 'none');
+
+                       $(eventDate).css('display', 'inherit');
+                       $(eventDateEdit).css('display', 'none');
+
+                       $(dsavebutton).css('display', 'none');
+                       $(dremovebutton).css('display', 'none');
+                       $(dmanagebutton).css('display', 'inherit');
+                       $(deditRbutton).css('display', 'none');
+                       
+                    };
+               
+               $scope.popupConfirmWin = function(title, msgBody, callback){
+               modalService.popupConfirmWin.apply(null, arguments);
+            };
+        }           
+    }
+    CommonWidgetController.$inject = ['dashboardService', '$scope', 'message', '$q', '$http', 'conf', '$filter','confirmBoxService','$log'];
+    angular.module('ecompApp').controller('CommonWidgetController', CommonWidgetController); 
+})();
+
+angular.module('ecompApp').filter('cut', function () {
+    return function (value, wordwise, max, tail) {
+        if (!value) return '';
+
+        max = parseInt(max, 10);
+        if (!max) return value;
+        if (value.length <= max) return value;
+
+        value = value.substr(0, max);
+        if (wordwise) {
+            var lastspace = value.lastIndexOf(' ');
+            if (lastspace != -1) {
+              //Also remove . and , so its gives a cleaner result.
+              if (value.charAt(lastspace-1) == '.' || value.charAt(lastspace-1) == ',') {
+                lastspace = lastspace - 1;
+              }
+              value = value.substr(0, lastspace);
+            }
+        }
+
+        return value + (tail || ' â€¦');
+    };
+});
+
+angular.module('ecompApp').controller('DatePickerController', function ($scope, uibDateParser) {
+                 $scope.today = function() {
+                   $scope.dt = new Date();
+                 };
+                 $scope.today();
+
+                 $scope.clear = function() {
+                   $scope.dt = null;
+                 };
+
+                 $scope.inlineOptions = {
+                   customClass: getDayClass,
+                   minDate: new Date(),
+                   showWeeks: true
+                 };
+
+                 $scope.dateOptions = {
+                   dateDisabled: disabled,
+                   formatYear: 'yy',
+                   minDate: new Date(),
+                   startingDay: 1
+                 };
+
+                 // Disable weekend selection
+                 function disabled(data) {
+                   var date = data.date,
+                     mode = data.mode;
+                   return mode === 'day' && (date.getDay() === 0 || date.getDay() === 6);
+                 }
+
+                 $scope.toggleMin = function() {
+                   $scope.inlineOptions.minDate = $scope.inlineOptions.minDate ? null : new Date();
+                   $scope.dateOptions.minDate = $scope.inlineOptions.minDate;
+                 };
+
+                 $scope.toggleMin();
+
+                 $scope.open1 = function() {
+                       // console.log('In open1');
+                   $scope.popup1.opened = true;
+                 };
+
+                 $scope.open2 = function() {
+                       // console.log('In open2');
+                       $scope.popup2.opened = true;
+                 };
+
+                 
+                 $scope.setDate = function(year, month, day) {
+                   $scope.dt = new Date(year, month, day);
+                 };
+
+                 $scope.formats = ['dd-MMMM-yyyy', 'yyyy/MM/dd', 'dd.MM.yyyy', 'shortDate'];
+                 $scope.format = $scope.formats[3];
+                 $scope.altInputFormats = ['M!/d!/yyyy'];
+
+                 $scope.popup1 = {
+                   opened: false
+                 };
+
+                 $scope.popup2 = {
+                   opened: false
+                 };
+
+                 var tomorrow = new Date();
+                 tomorrow.setDate(tomorrow.getDate() + 1);
+                 var afterTomorrow = new Date();
+                 afterTomorrow.setDate(tomorrow.getDate() + 1);
+                 $scope.events = [
+                   {
+                     date: tomorrow,
+                     status: 'full'
+                   },
+                   {
+                     date: afterTomorrow,
+                     status: 'partially'
+                   }
+                 ];
+
+                 function getDayClass(data) {
+                   var date = data.date,
+                     mode = data.mode;
+                   if (mode === 'day') {
+                     var dayToCheck = new Date(date).setHours(0,0,0,0);
+
+                     for (var i = 0; i < $scope.events.length; i++) {
+                       var currentDay = new Date($scope.events[i].date).setHours(0,0,0,0);
+
+                       if (dayToCheck === currentDay) {
+                         return $scope.events[i].status;
+                       }
+                     }
+                   }
+
+                   return '';
+                 }
+});
+
+
+
+function toggleCollapsible(id, clickedIconId, subtitutingIconId){
+       $("#"+id).toggle();
+       $("#"+clickedIconId).toggle();
+       $("#"+subtitutingIconId).toggle();
+       setTimeout(function(){focusFirstEle(id);}, 1000);
+}
+
+function focusFirstEle(id){
+       var focusItems = $("#"+id).find(":focusable");
+       for(var i=0; i<focusItems.length; i++){
+               if(!isHidden(focusItems[i])){
+                       var targetClassName = focusItems[i].className;
+                       if(targetClassName!='collapsibleArrow'){
+                               focusItems[i].focus();
+                               return;
+                       }
+               }
+       }
+}     
+
+function validateUrl(value){
+    return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+  }
index 5a763e2..87558fa 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-function _classCallCheck(instance, Constructor) {\r
-       if (!(instance instanceof Constructor)) {\r
-               throw new TypeError('Cannot call a class as a function');\r
-       }\r
-}\r
-\r
-(function() {\r
-       var HTTP_PROTOCOL_RGX = /https?:\/\//;\r
-\r
-       var DashboardCtrl = function DashboardCtrl(conf, applicationsService, $log,\r
-                       $window, userProfileService, $scope, $cookies, $timeout, $interval, \r
-                       $modal, $state, beReaderService, dashboardService, confirmBoxService, \r
-                       auditLogService,ngDialog, $compile, widgetsCatalogService) {\r
-\r
-               this.conf = conf;       \r
-               var _this = this;\r
-\r
-               _classCallCheck(this, DashboardCtrl);\r
-\r
-               // activate spinner\r
-               this.isLoading = true;\r
-               this.isCommError = false;\r
-               $scope.getUserAppsIsDone = false;\r
-               this.userProfileService = userProfileService;\r
-               $scope.demoNum = 1;\r
-               $scope.event_content_show = false;\r
-               $scope.widgetData = [];\r
-               $scope.activateThis = function(ele){\r
-                        $compile(ele.contents())($scope);\r
-                        $scope.$apply();\r
-               };\r
-\r
-               $scope.editWidgetModalPopup = function(availableData, resourceType) {\r
-                       $scope.editData = JSON.stringify(availableData);\r
-                       $scope.availableDataTemp = $scope.availableData;\r
-                       ngDialog.open({\r
-                                       templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',\r
-                                       controller : 'CommonWidgetController',\r
-                                       resolve : {\r
-                                               message : function message() {\r
-                                                       var message = {\r
-                                                               type : resourceType,\r
-                                                               availableData : $scope.editData\r
-                                                       };\r
-                                                       return message;\r
-                                               }\r
-                                       }\r
-                               }).closePromise.then(needUpdate => {    \r
-                                       if(resourceType=='NEWS'){\r
-                                               $scope.updateNews();\r
-                                       }else if(resourceType=='EVENTS'){\r
-                                               $scope.updateEvents();\r
-                                       }else if(resourceType=='IMPORTANTRESOURCES'){\r
-                                               $scope.updateImportRes();\r
-                                       }\r
-                 });           \r
-               };\r
-               \r
-               $scope.editWidgetParameters = function(widgetId) {\r
-                       let data = {\r
-               widgetId: widgetId\r
-            }\r
-                       ngDialog.open({\r
-                                       templateUrl : 'app/views/dashboard/dashboard-widget-parameter-manage.html',\r
-                                       controller : 'WidgetParameterController',\r
-                                       data: data\r
-                               }).closePromise.then(needUpdate => {    \r
-                                               \r
-                 });           \r
-               };\r
-               \r
-               $scope.sort_options = [        \r
-                                      {index: 0, value: 'N', title: 'Name'},\r
-                                      {index: 1, value: 'L', title: 'Last used'},\r
-                                      {index: 2, value: 'F', title: 'Most used'},\r
-                                      {index: 3, value: 'M', title: 'Manual'}                                 \r
-                                  ]; \r
-               \r
-               $scope.selectedSortTypeChanged = function(userAppSortTypePref) {\r
-                       $scope.appsViewData = [];\r
-                       $scope.appsView = [];\r
-                       \r
-                       $scope.sort_type = userAppSortTypePref;\r
-                       \r
-                       applicationsService\r
-                       .getAppsOrderBySortPref(userAppSortTypePref)\r
-                               .then(function(res) {\r
-                                       _this.apps = res;                       \r
-                                       $scope.applyPresentationDetailsToApps(_this.apps);                              \r
-                       })      \r
-                       applicationsService\r
-                       .saveAppsSortTypePreference($scope.selectedSortType)\r
-                               .then(function(res) {\r
-                                       // Nothing to do\r
-                               })\r
-               \r
-               }\r
-               $scope.$watch('selectedSortType.value', (newVal, oldVal) => {\r
-                       for(var i=0;i<$scope.sort_options.length;i++){\r
-                       if($scope.sort_options[i].value==newVal){\r
-                       $scope.selectedSortType=angular.copy($scope.sort_options[i]);;\r
-                       }\r
-                       }\r
-                       });\r
-               \r
-               $scope.restoreSortSelected = function(){\r
-                       confirmBoxService.confirm("Restore the default size and position of all widgets?").then(\r
-                               function(confirmed){\r
-                                       var checkConfirm = confirmed;\r
-                                       if(checkConfirm === true){\r
-                                       applicationsService\r
-                                       .delWidgetsSortPref($scope.widgetsViewData).then(function(){\r
-                                               $state.reload();\r
-                                       });\r
-                                       }\r
-                               });\r
-               /*      if(confirm('Restore the default size and position of all widgets?') == true)\r
-                               {\r
-                       applicationsService\r
-                       .delWidgetsSortPref($scope.widgetsViewData).then(function(){\r
-                               $state.reload();\r
-                       })\r
-                               }*/\r
-                               \r
-               }\r
-               \r
-               $scope.applyPresentationDetailsToApps = function(appsReturned) {\r
-                       var rowNo = 0;\r
-                       for (var i = 0; i < _this.apps.length; i++) {\r
-                               $scope.appsView[i] = {\r
-                                       sizeX : 1,\r
-                                       sizeY : 1,\r
-                                       headerText : '',\r
-                                       subHeaderText : '',\r
-                                       imageLink : '',\r
-                                       order : '',\r
-                                       url : '',\r
-                                       appid: '',\r
-                               };\r
-                               $scope.appsView[i].headerText = appsReturned[i].name;\r
-                               $scope.appsView[i].subHeaderText = appsReturned[i].notes;\r
-                               let imgLnk = '';\r
-                               if (appsReturned[i].imageUrl)\r
-                                       imgLnk = conf.api.appThumbnail.replace(':appId', appsReturned[i].id);\r
-                               //$log.debug('DashboardCtlr::applyPresn: imgLink = ' + imgLnk);\r
-                               $scope.appsView[i].imageLink = imgLnk;\r
-                               $scope.appsView[i].order = appsReturned[i].order;\r
-                               $scope.appsView[i].url = appsReturned[i].url;\r
-                               $scope.appsView[i].restrictedApp = appsReturned[i].restrictedApp;\r
-                               $scope.appsView[i].appid = appsReturned[i].id;\r
-                       }\r
-                       $scope.appsView[_this.apps.length] = {\r
-                                       addRemoveApps : true,\r
-                                       sizeX : 1,\r
-                                       sizeY : 1,\r
-                                       headerText : 'Add/Remove Applications',\r
-                                       subHeaderText : '',\r
-                                       imageLink : 'assets/images/cloud.png',\r
-                                       order : '',\r
-                                       restrictedApp : false,\r
-                                       url : '',\r
-                       };\r
-                       if($scope.appsView.length>6){                                                                                                   \r
-                               $(".dashboard-boarder").css({\r
-                                       "height" : "400px"\r
-                               });\r
-                       }else{\r
-                               $(".dashboard-boarder").css({\r
-                                       "height" : "210px"\r
-                               });\r
-                       }\r
-                       \r
-                       if ($scope.appsView != undefined\r
-                                       && $scope.appsView != null\r
-                                       && $scope.appsView.length > 0) {\r
-                               $scope.appsViewData = $scope.appsView;\r
-                       }\r
-               }\r
-               \r
-$scope.widgetsView = [];\r
-               \r
-               $scope.applyPresentationDetailsToWidgets = function(widgetsReturned){\r
-                var rowNo = 0;\r
-                for (var i = 0; i < widgetsReturned.length; i++) {\r
-                               $scope.widgetsView[i] = {\r
-                                       sizeX : '',\r
-                                       sizeY :'',\r
-                                       headerText:'',\r
-                                       widgetText:'',\r
-                                       widgetIdentifier : '',\r
-                                       url : '',\r
-                                       widgetid: '',\r
-                                       attrb:'',\r
-                                       row:'',\r
-                                       col:'',\r
-                               };\r
-                               $scope.widgetsView[i].widgetid = widgetsReturned[i].id;\r
-                               $scope.widgetsView[i].headerText = widgetsReturned[i].headerName;\r
-                               $scope.widgetsView[i].widgetText = widgetsReturned[i].name;\r
-                               \r
-                               if(widgetsReturned[i].headerName.toLowerCase() === 'news'){\r
-                                       $scope.widgetsView[i].widgetIdentifier = 'NEWS';\r
-                               }\r
-                               else\r
-                               if(widgetsReturned[i].headerName.toLowerCase() === 'resources'){\r
-                                       $scope.widgetsView[i].widgetIdentifier = 'IMPORTANTRESOURCES';\r
-                               }\r
-                               else\r
-                               if(widgetsReturned[i].headerName.toLowerCase() === 'events'){\r
-                                       $scope.widgetsView[i].widgetIdentifier = 'EVENTS';\r
-                               }\r
-\r
-                               $scope.widgetsView[i].url = widgetsReturned[i].url;\r
-                               $scope.widgetsView[i].attrb = widgetsReturned[i].attrs;\r
-                               if(widgetsReturned[i].width === null){\r
-                                       $scope.widgetsView[i].sizeX = 2;\r
-                               }else{\r
-                                       $scope.widgetsView[i].sizeX = widgetsReturned[i].width;\r
-                               }\r
-                               if(widgetsReturned[i].height === null){\r
-                                       $scope.widgetsView[i].sizeY = 2;\r
-                               }else{\r
-                                       $scope.widgetsView[i].sizeY = widgetsReturned[i].height;\r
-                               }\r
-                               $scope.widgetsView[i].row = widgetsReturned[i].x;\r
-                               $scope.widgetsView[i].col = widgetsReturned[i].y;\r
-                       }\r
-               if ($scope.widgetsView != undefined\r
-                               && $scope.widgetsView != null\r
-                               && $scope.widgetsView.length > 0) {\r
-                       $scope.widgetsViewData = $scope.widgetsView;\r
-               }\r
-               }\r
-\r
-       applicationsService\r
-       .getUserAppsSortTypePreference().then(function(res) {\r
-                       var resJson = {};\r
-                   resJson.value = res;\r
-                       if (resJson.value==="N" || resJson.value==="") {\r
-                               resJson.index = 0;\r
-                               resJson.title = 'Name';\r
-                       }else if (resJson.value==="L") {\r
-                               resJson.index = 1;\r
-                               resJson.title = 'Last used';\r
-                       }else if(resJson.value==="F"){\r
-                               resJson.index = 2;\r
-                               resJson.title = 'Most used';\r
-                       }else {\r
-                               resJson.index = 3;\r
-                               resJson.title = 'Manual';\r
-                       }       \r
-                       $scope.selectedSortType = resJson;\r
-                       $scope.selectedSortTypeChanged(res);\r
-\r
-               \r
-               });\r
-               \r
-       $scope.widgetsList = [];\r
-       \r
-       let getUserWidgets = (loginName) => {\r
-        var conf = this.conf;\r
-                widgetsCatalogService.getUserWidgets(loginName).then(res => {\r
-                        if(!(res instanceof Array)){\r
-                                this.isCommError = true;\r
-                                return;\r
-                        }\r
-                        for(var i = 0; i < res.length; i++){    \r
-                                var widget_id = res[i][0];\r
-                                var widget_name = res[i][1];\r
-                                let url = this.conf.api.widgetCommon + "/" + widget_id + "/framework.js";\r
-                                var header_name = widget_name;\r
-                                if(res[i][7] == 1){\r
-                                       header_name = (widget_name.length > 9) ?widget_name.substring(0, 8) + '...' : widget_name;\r
-                                }\r
-                                if(res[i][4] === "S" || res[i][4] === null ){\r
-                                $scope.widgetsList.push({\r
-                                          id: widget_id,\r
-                                          headerName: header_name,\r
-                                  name: widget_name,\r
-                                  url: url,\r
-                                  attrs: [{attr: 'data-' + res[i][0], value: ''}],\r
-                                  x: res[i][3], \r
-                                  y: res[i][5],\r
-                                  height: res[i][6],\r
-                                  width: res[i][7]\r
-                                });\r
-                                }\r
-                                var script = document\r
-                                        .createElement('script');\r
-                                        script.src = url;\r
-                                        script.async = false;\r
-                                        var entry = document\r
-                                               .getElementsByTagName('script')[0];\r
-                                        entry.parentNode\r
-                                               .insertBefore(script, entry);\r
-                        } \r
-               $scope.applyPresentationDetailsToWidgets($scope.widgetsList);\r
-        }).catch(err => {\r
-            $log.error('WidgetsHomeCtrl::getUserWidgets error: ' + err);\r
-        }).finally(()=> {\r
-                \r
-        });\r
-   };\r
-\r
-      userProfileService.getUserProfile().then(\r
-                       function(profile) {\r
-                               $scope.orgUserId = profile.orgUserId;\r
-                               getUserWidgets($scope.orgUserId);\r
-         });\r
-               \r
-               /* Widget Gridster Section */\r
-               $scope.newsGridsterItem = {\r
-                       sizeX : 1,\r
-                       sizeY : 1,\r
-                       headerText : 'News',\r
-                       subHeaderText : '',\r
-                       imageLink : '',\r
-                       order : '',\r
-                       url : ''\r
-               };\r
-\r
-               $scope.eventsGridsterItem = {\r
-                       sizeX : 1,\r
-                       sizeY : 1,\r
-                       headerText : 'Events',\r
-                       subHeaderText : '',\r
-                       imageLink : '',\r
-                       order : '',\r
-                       url : ''\r
-               };\r
-\r
-               $scope.impoResGridsterItem = {\r
-                       sizeX : 1,\r
-                       sizeY : 1,\r
-                       headerText : 'Resources',\r
-                       subHeaderText : '',\r
-                       imageLink : '',\r
-                       order : '',\r
-                       url : ''\r
-               };\r
-               \r
-               this.gridsterAppOpts = {\r
-                               columns : 6,\r
-                               colWidth : 190,\r
-                               rowHeight : 190,\r
-                               margins : [ 20, 20 ],\r
-                               outerMargin : true,\r
-                               pushing : true,\r
-                               floating : true,\r
-                               swapping : true,\r
-                               resizable: {\r
-                                       enabled: false,\r
-                               },\r
-                               draggable : {\r
-                                       handle:'.icon-content-gridguide',\r
-                                       stop: function stop() { \r
-                                               $scope.defaultSortBy = function() {\r
-                                                       var resJson = {};\r
-                                                       resJson.value = 'M';\r
-                                                       resJson.index = 3;\r
-                                                       resJson.title = 'Manual';\r
-                                                       $scope.selectedSortType = resJson;\r
-                                                       applicationsService.saveAppsSortTypeManual($scope.appsViewData) \r
-                                                       applicationsService.saveAppsSortTypePreference($scope.selectedSortType)\r
-                                               }\r
-                                               $scope.defaultSortBy();                 \r
-                                       }\r
-                               }\r
-                       };\r
-                       \r
-                       this.gridsterWidgetOpts = {\r
-                                       columns : 6,\r
-                                       colWidth : 190,\r
-                                       rowHeight : 190,\r
-                                       margins : [ 20, 20 ],\r
-                                       outerMargin : true,\r
-                                       pushing : true,\r
-                                       floating : true,\r
-                                       swapping : true,\r
-                                       resizable: {\r
-                                               enabled: true,\r
-                                               stop: function stop(event, uiWidget, $element){\r
-                                                       if($element.sizeX == 1)\r
-                                                               $element.headerText = ($element.widgetText.length > 9) ? $element.widgetText.substring(0, 8) + '...' : $element.widgetText;\r
-                                                       if($element.sizeX >= 2)\r
-                                                               $element.headerText = $element.widgetText;\r
-                                                       \r
-                                                       applicationsService\r
-                                                       .saveWidgetsSortManual($scope.widgetsViewData)\r
-                                       \r
-                                               }\r
-                                       },\r
-                                       draggable : {\r
-                                               handle:'.icon-content-gridguide',\r
-                                               stop: function stop(){\r
-                                                       applicationsService\r
-                                                       .saveWidgetsSortManual($scope.widgetsViewData)\r
-                                       \r
-                                               }\r
-                                       }\r
-                       };\r
-               \r
-               this.goToCatalog = function(item) {\r
-                       $state.go('root.appCatalog');\r
-               } \r
-               \r
-               this.goToWidgetCatLog = function(item) {\r
-                       $state.go('root.widgetCatalog');\r
-               } \r
-               \r
-               // navigate to application url in new tab\r
-               this.goToPortal = function(item) {\r
-                       if (!item.url) {\r
-                               $log.error('No URL found for this application, doing nothing!');\r
-                               return;\r
-                       }\r
-                       if (item.restrictedApp) {\r
-                               // Link-based apps open in their own browser tab\r
-                               $window.open(item.url, '_blank');\r
-                       } else {\r
-                               // cache control so browsers load app page every time\r
-                               var ccParam = 'cc=' + new Date().getTime();\r
-                               var urlParts = item.url.split('#');\r
-                               var appUrl = null;\r
-                               if (urlParts.length < 2) {\r
-                                       // no #\r
-                                       let urlLastChar = item.url.charAt(item.url.length - 1);\r
-                                       if (item.url.includes("?"))\r
-                                               appUrl = (urlLastChar === '&' ? item.url + ccParam : item.url + '&' + ccParam);\r
-                                       else \r
-                                               appUrl = item.url + '?' + ccParam;\r
-                               } else {\r
-                                       // has #\r
-                                       let urlLastChar = urlParts[0].charAt(urlParts[0].length - 1);\r
-                                       if (item.url.includes("?"))\r
-                                               appUrl = (urlLastChar === '&' ? urlParts[0] + ccParam + '#' + urlParts[1]  :  urlParts[0] + '&' + ccParam + '#' + urlParts[1]);\r
-                                       else\r
-                                               appUrl = urlParts[0] + '?' + ccParam + "#" + urlParts[1];\r
-                               }\r
-                               // $log.debug('DashboardCtrlr::goToPortal: opening tab with URL\r
-                               // ' + appUrl);\r
-                               var tabContent = {\r
-                                       id: new Date(),\r
-                                       title: item.headerText,\r
-                                       url: appUrl,\r
-                                       appId: item.appId\r
-                               };\r
-                               $cookies.putObject('addTab', tabContent);\r
-                       }\r
-\r
-               };\r
-               \r
-               this.auditLog = function(app) {\r
-                       console.log(app);\r
-                       auditLogService.storeAudit(app.appid,'app',app.url);\r
-               };\r
-               \r
-               if (getParameterByName('noUserError') != null) {\r
-                       if (getParameterByName('noUserError') == "Show") {\r
-                               $("#errorInfo").show();\r
-                       }\r
-               }               \r
-       };\r
-\r
-       DashboardCtrl.$inject = [ 'conf', 'applicationsService', '$log', '$window',\r
-                       'userProfileService', '$scope', '$cookies', '$timeout', '$interval', \r
-                       '$modal',  '$state', 'beReaderService', 'dashboardService', 'confirmBoxService', \r
-                       'auditLogService', 'ngDialog', '$compile', 'widgetsCatalogService' ];\r
-       angular.module('ecompApp').controller('DashboardCtrl', DashboardCtrl);\r
-})();\r
-\r
-function getParameterByName(name, url) {\r
-       if (!url)\r
-               url = window.location.href;\r
-       name = name.replace(/[\[\]]/g, "\\$&");\r
-       var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex\r
-                       .exec(url);\r
-       if (!results)\r
-               return '';\r
-       if (!results[2])\r
-               return '';\r
-       return results[2].replace(/\+/g, " ");\r
-}\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+function _classCallCheck(instance, Constructor) {
+       if (!(instance instanceof Constructor)) {
+               throw new TypeError('Cannot call a class as a function');
+       }
+}
+
+(function() {
+       var HTTP_PROTOCOL_RGX = /https?:\/\//;
+
+       var DashboardCtrl = function DashboardCtrl(conf, applicationsService, $log,
+                       $window, userProfileService, $scope, $cookies, $timeout, $interval, 
+                       $modal, $state, beReaderService, dashboardService, confirmBoxService, 
+                       auditLogService,ngDialog, $compile, widgetsCatalogService) {
+
+               this.conf = conf;       
+               var _this = this;
+
+               _classCallCheck(this, DashboardCtrl);
+
+               // activate spinner
+               this.isLoading = true;
+               this.isCommError = false;
+               $scope.getUserAppsIsDone = false;
+               this.userProfileService = userProfileService;
+               $scope.demoNum = 1;
+               $scope.event_content_show = false;
+               $scope.widgetData = [];
+               $scope.activateThis = function(ele){
+                        $compile(ele.contents())($scope);
+                        $scope.$apply();
+               };
+
+               $scope.editWidgetModalPopup = function(availableData, resourceType) {
+                       $scope.editData = JSON.stringify(availableData);
+                       $scope.availableDataTemp = $scope.availableData;
+                       ngDialog.open({
+                                       templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',
+                                       controller : 'CommonWidgetController',
+                                       resolve : {
+                                               message : function message() {
+                                                       var message = {
+                                                               type : resourceType,
+                                                               availableData : $scope.editData
+                                                       };
+                                                       return message;
+                                               }
+                                       }
+                               }).closePromise.then(needUpdate => {    
+                                       if(resourceType=='NEWS'){
+                                               $scope.updateNews();
+                                       }else if(resourceType=='EVENTS'){
+                                               $scope.updateEvents();
+                                       }else if(resourceType=='IMPORTANTRESOURCES'){
+                                               $scope.updateImportRes();
+                                       }
+                 });           
+               };
+               
+               $scope.editWidgetParameters = function(widgetId) {
+                       let data = {
+               widgetId: widgetId
+            }
+                       ngDialog.open({
+                                       templateUrl : 'app/views/dashboard/dashboard-widget-parameter-manage.html',
+                                       controller : 'WidgetParameterController',
+                                       data: data
+                               }).closePromise.then(needUpdate => {    
+                                               
+                 });           
+               };
+               
+               $scope.sort_options = [        
+                                      {index: 0, value: 'N', title: 'Name'},
+                                      {index: 1, value: 'L', title: 'Last used'},
+                                      {index: 2, value: 'F', title: 'Most used'},
+                                      {index: 3, value: 'M', title: 'Manual'}                                 
+                                  ]; 
+               
+               $scope.selectedSortTypeChanged = function(userAppSortTypePref) {
+                       $scope.appsViewData = [];
+                       $scope.appsView = [];
+                       
+                       $scope.sort_type = userAppSortTypePref;
+                       
+                       applicationsService
+                       .getAppsOrderBySortPref(userAppSortTypePref)
+                               .then(function(res) {
+                                       _this.apps = res;                       
+                                       $scope.applyPresentationDetailsToApps(_this.apps);                              
+                       })      
+                       applicationsService
+                       .saveAppsSortTypePreference($scope.selectedSortType)
+                               .then(function(res) {
+                                       // Nothing to do
+                               })
+               
+               }
+               $scope.$watch('selectedSortType.value', (newVal, oldVal) => {
+                       for(var i=0;i<$scope.sort_options.length;i++){
+                       if($scope.sort_options[i].value==newVal){
+                       $scope.selectedSortType=angular.copy($scope.sort_options[i]);;
+                       }
+                       }
+                       });
+               
+               $scope.restoreSortSelected = function(){
+                       confirmBoxService.confirm("Restore the default size and position of all widgets?").then(
+                               function(confirmed){
+                                       var checkConfirm = confirmed;
+                                       if(checkConfirm === true){
+                                       applicationsService
+                                       .delWidgetsSortPref($scope.widgetsViewData).then(function(){
+                                               $state.reload();
+                                       });
+                                       }
+                               });
+               /*      if(confirm('Restore the default size and position of all widgets?') == true)
+                               {
+                       applicationsService
+                       .delWidgetsSortPref($scope.widgetsViewData).then(function(){
+                               $state.reload();
+                       })
+                               }*/
+                               
+               }
+               
+               $scope.applyPresentationDetailsToApps = function(appsReturned) {
+                       var rowNo = 0;
+                       for (var i = 0; i < _this.apps.length; i++) {
+                               $scope.appsView[i] = {
+                                       sizeX : 1,
+                                       sizeY : 1,
+                                       headerText : '',
+                                       subHeaderText : '',
+                                       imageLink : '',
+                                       order : '',
+                                       url : '',
+                                       appid: '',
+                               };
+                               $scope.appsView[i].headerText = appsReturned[i].name;
+                               $scope.appsView[i].subHeaderText = appsReturned[i].notes;
+                               let imgLnk = '';
+                               if (appsReturned[i].imageUrl)
+                                       imgLnk = conf.api.appThumbnail.replace(':appId', appsReturned[i].id);
+                               //$log.debug('DashboardCtlr::applyPresn: imgLink = ' + imgLnk);
+                               $scope.appsView[i].imageLink = imgLnk;
+                               $scope.appsView[i].order = appsReturned[i].order;
+                               $scope.appsView[i].url = appsReturned[i].url;
+                               $scope.appsView[i].restrictedApp = appsReturned[i].restrictedApp;
+                               $scope.appsView[i].appid = appsReturned[i].id;
+                       }
+                       $scope.appsView[_this.apps.length] = {
+                                       addRemoveApps : true,
+                                       sizeX : 1,
+                                       sizeY : 1,
+                                       headerText : 'Add/Remove Applications',
+                                       subHeaderText : '',
+                                       imageLink : 'assets/images/cloud.png',
+                                       order : '',
+                                       restrictedApp : false,
+                                       url : '',
+                       };
+                       if($scope.appsView.length>6){                                                                                                   
+                               $(".dashboard-boarder").css({
+                                       "height" : "400px"
+                               });
+                       }else{
+                               $(".dashboard-boarder").css({
+                                       "height" : "210px"
+                               });
+                       }
+                       
+                       if ($scope.appsView != undefined
+                                       && $scope.appsView != null
+                                       && $scope.appsView.length > 0) {
+                               $scope.appsViewData = $scope.appsView;
+                       }
+               }
+               
+$scope.widgetsView = [];
+               
+               $scope.applyPresentationDetailsToWidgets = function(widgetsReturned){
+                var rowNo = 0;
+                for (var i = 0; i < widgetsReturned.length; i++) {
+                               $scope.widgetsView[i] = {
+                                       sizeX : '',
+                                       sizeY :'',
+                                       headerText:'',
+                                       widgetText:'',
+                                       widgetIdentifier : '',
+                                       url : '',
+                                       widgetid: '',
+                                       attrb:'',
+                                       row:'',
+                                       col:'',
+                               };
+                               $scope.widgetsView[i].widgetid = widgetsReturned[i].id;
+                               $scope.widgetsView[i].headerText = widgetsReturned[i].headerName;
+                               $scope.widgetsView[i].widgetText = widgetsReturned[i].name;
+                               
+                               if(widgetsReturned[i].headerName.toLowerCase() === 'news'){
+                                       $scope.widgetsView[i].widgetIdentifier = 'NEWS';
+                               }
+                               else
+                               if(widgetsReturned[i].headerName.toLowerCase() === 'resources'){
+                                       $scope.widgetsView[i].widgetIdentifier = 'IMPORTANTRESOURCES';
+                               }
+                               else
+                               if(widgetsReturned[i].headerName.toLowerCase() === 'events'){
+                                       $scope.widgetsView[i].widgetIdentifier = 'EVENTS';
+                               }
+
+                               $scope.widgetsView[i].url = widgetsReturned[i].url;
+                               $scope.widgetsView[i].attrb = widgetsReturned[i].attrs;
+                               if(widgetsReturned[i].width === null){
+                                       $scope.widgetsView[i].sizeX = 2;
+                               }else{
+                                       $scope.widgetsView[i].sizeX = widgetsReturned[i].width;
+                               }
+                               if(widgetsReturned[i].height === null){
+                                       $scope.widgetsView[i].sizeY = 2;
+                               }else{
+                                       $scope.widgetsView[i].sizeY = widgetsReturned[i].height;
+                               }
+                               $scope.widgetsView[i].row = widgetsReturned[i].x;
+                               $scope.widgetsView[i].col = widgetsReturned[i].y;
+                       }
+               if ($scope.widgetsView != undefined
+                               && $scope.widgetsView != null
+                               && $scope.widgetsView.length > 0) {
+                       $scope.widgetsViewData = $scope.widgetsView;
+               }
+               }
+
+       applicationsService
+       .getUserAppsSortTypePreference().then(function(res) {
+                       var resJson = {};
+                   resJson.value = res;
+                       if (resJson.value==="N" || resJson.value==="") {
+                               resJson.index = 0;
+                               resJson.title = 'Name';
+                       }else if (resJson.value==="L") {
+                               resJson.index = 1;
+                               resJson.title = 'Last used';
+                       }else if(resJson.value==="F"){
+                               resJson.index = 2;
+                               resJson.title = 'Most used';
+                       }else {
+                               resJson.index = 3;
+                               resJson.title = 'Manual';
+                       }       
+                       $scope.selectedSortType = resJson;
+                       $scope.selectedSortTypeChanged(res);
+
+               
+               });
+               
+       $scope.widgetsList = [];
+       
+       let getUserWidgets = (loginName) => {
+        var conf = this.conf;
+                widgetsCatalogService.getUserWidgets(loginName).then(res => {
+                        if(!(res instanceof Array)){
+                                this.isCommError = true;
+                                return;
+                        }
+                        for(var i = 0; i < res.length; i++){    
+                                var widget_id = res[i][0];
+                                var widget_name = res[i][1];
+                                let url = this.conf.api.widgetCommon + "/" + widget_id + "/framework.js";
+                                var header_name = widget_name;
+                                if(res[i][7] == 1){
+                                       header_name = (widget_name.length > 9) ?widget_name.substring(0, 8) + '...' : widget_name;
+                                }
+                                if(res[i][4] === "S" || res[i][4] === null ){
+                                $scope.widgetsList.push({
+                                          id: widget_id,
+                                          headerName: header_name,
+                                  name: widget_name,
+                                  url: url,
+                                  attrs: [{attr: 'data-' + res[i][0], value: ''}],
+                                  x: res[i][3], 
+                                  y: res[i][5],
+                                  height: res[i][6],
+                                  width: res[i][7]
+                                });
+                                }
+                                var script = document
+                                        .createElement('script');
+                                        script.src = url;
+                                        script.async = false;
+                                        var entry = document
+                                               .getElementsByTagName('script')[0];
+                                        entry.parentNode
+                                               .insertBefore(script, entry);
+                        } 
+               $scope.applyPresentationDetailsToWidgets($scope.widgetsList);
+        }).catch(err => {
+            $log.error('WidgetsHomeCtrl::getUserWidgets error: ' + err);
+        }).finally(()=> {
+                
+        });
+   };
+
+      userProfileService.getUserProfile().then(
+                       function(profile) {
+                               $scope.orgUserId = profile.orgUserId;
+                               getUserWidgets($scope.orgUserId);
+         });
+               
+               /* Widget Gridster Section */
+               $scope.newsGridsterItem = {
+                       sizeX : 1,
+                       sizeY : 1,
+                       headerText : 'News',
+                       subHeaderText : '',
+                       imageLink : '',
+                       order : '',
+                       url : ''
+               };
+
+               $scope.eventsGridsterItem = {
+                       sizeX : 1,
+                       sizeY : 1,
+                       headerText : 'Events',
+                       subHeaderText : '',
+                       imageLink : '',
+                       order : '',
+                       url : ''
+               };
+
+               $scope.impoResGridsterItem = {
+                       sizeX : 1,
+                       sizeY : 1,
+                       headerText : 'Resources',
+                       subHeaderText : '',
+                       imageLink : '',
+                       order : '',
+                       url : ''
+               };
+               
+               this.gridsterAppOpts = {
+                               columns : 6,
+                               colWidth : 190,
+                               rowHeight : 190,
+                               margins : [ 20, 20 ],
+                               outerMargin : true,
+                               pushing : true,
+                               floating : true,
+                               swapping : true,
+                               resizable: {
+                                       enabled: false,
+                               },
+                               draggable : {
+                                       handle:'.icon-content-gridguide',
+                                       stop: function stop() { 
+                                               $scope.defaultSortBy = function() {
+                                                       var resJson = {};
+                                                       resJson.value = 'M';
+                                                       resJson.index = 3;
+                                                       resJson.title = 'Manual';
+                                                       $scope.selectedSortType = resJson;
+                                                       applicationsService.saveAppsSortTypeManual($scope.appsViewData) 
+                                                       applicationsService.saveAppsSortTypePreference($scope.selectedSortType)
+                                               }
+                                               $scope.defaultSortBy();                 
+                                       }
+                               }
+                       };
+                       
+                       this.gridsterWidgetOpts = {
+                                       columns : 6,
+                                       colWidth : 190,
+                                       rowHeight : 190,
+                                       margins : [ 20, 20 ],
+                                       outerMargin : true,
+                                       pushing : true,
+                                       floating : true,
+                                       swapping : true,
+                                       resizable: {
+                                               enabled: true,
+                                               stop: function stop(event, uiWidget, $element){
+                                                       if($element.sizeX == 1)
+                                                               $element.headerText = ($element.widgetText.length > 9) ? $element.widgetText.substring(0, 8) + '...' : $element.widgetText;
+                                                       if($element.sizeX >= 2)
+                                                               $element.headerText = $element.widgetText;
+                                                       
+                                                       applicationsService
+                                                       .saveWidgetsSortManual($scope.widgetsViewData)
+                                       
+                                               }
+                                       },
+                                       draggable : {
+                                               handle:'.icon-content-gridguide',
+                                               stop: function stop(){
+                                                       applicationsService
+                                                       .saveWidgetsSortManual($scope.widgetsViewData)
+                                       
+                                               }
+                                       }
+                       };
+               
+               this.goToCatalog = function(item) {
+                       $state.go('root.appCatalog');
+               } 
+               
+               this.goToWidgetCatLog = function(item) {
+                       $state.go('root.widgetCatalog');
+               } 
+               
+               // navigate to application url in new tab
+               this.goToPortal = function(item) {
+                       userProfileService.getUserRolesForApplication($scope.orgUserId,item.appid)
+                 .then(res=>{
+                         var count = 0;
+                         for(var i=0;i<res.length;i++){
+                                if(!res[i].isApplied)
+                                        {
+                                        count++;
+                                        }
+                                  }
+                         if((count>0 && res.length == count)||res.length==0)
+                                 {
+                               confirmBoxService.showInformation('You have no roles assigned to this application to access.').then(isConfirmed => {});
+
+                                 }
+                         else{
+                                       if (!item.url) {
+                                               $log.error('No URL found for this application, doing nothing!');
+                                               return;
+                                       }
+                                       if (item.restrictedApp) {
+                                               // Link-based apps open in their own browser tab
+                                               $window.open(item.url, '_blank');
+                                       } else {
+                                               // cache control so browsers load app page every time
+                                               var ccParam = 'cc=' + new Date().getTime();
+                                               var urlParts = item.url.split('#');
+                                               var appUrl = null;
+                                               if (urlParts.length < 2) {
+                                                       // no #
+                                                       let urlLastChar = item.url.charAt(item.url.length - 1);
+                                                       if (item.url.includes("?"))
+                                                               appUrl = (urlLastChar === '&' ? item.url + ccParam : item.url + '&' + ccParam);
+                                                       else 
+                                                               appUrl = item.url + '?' + ccParam;
+                                               } else {
+                                                       // has #
+                                                       let urlLastChar = urlParts[0].charAt(urlParts[0].length - 1);
+                                                       if (item.url.includes("?"))
+                                                               appUrl = (urlLastChar === '&' ? urlParts[0] + ccParam + '#' + urlParts[1]  :  urlParts[0] + '&' + ccParam + '#' + urlParts[1]);
+                                                       else
+                                                               appUrl = urlParts[0] + '?' + ccParam + "#" + urlParts[1];
+                                               }
+                                               // $log.debug('DashboardCtrlr::goToPortal: opening tab with URL
+                                               // ' + appUrl);
+                                               var tabContent = {
+                                                       id: new Date(),
+                                                       title: item.headerText,
+                                                       url: appUrl,
+                                                       appId: item.appId
+                                               };
+                                               $cookies.putObject('addTab', tabContent);
+                                       }
+                                 
+                         }
+                });
+               
+                       
+               
+
+               };
+               
+               this.auditLog = function(app) {
+                       console.log(app);
+                       auditLogService.storeAudit(app.appid,'app',app.url);
+               };
+               
+               if (getParameterByName('noUserError') != null) {
+                       if (getParameterByName('noUserError') == "Show") {
+                               $("#errorInfo").show();
+                       }
+               }               
+       };
+
+       DashboardCtrl.$inject = [ 'conf', 'applicationsService', '$log', '$window',
+                       'userProfileService', '$scope', '$cookies', '$timeout', '$interval', 
+                       '$modal',  '$state', 'beReaderService', 'dashboardService', 'confirmBoxService', 
+                       'auditLogService', 'ngDialog', '$compile', 'widgetsCatalogService' ];
+       angular.module('ecompApp').controller('DashboardCtrl', DashboardCtrl);
+})();
+
+function getParameterByName(name, url) {
+       if (!url)
+               url = window.location.href;
+       name = name.replace(/[\[\]]/g, "\\$&");
+       var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex
+                       .exec(url);
+       if (!results)
+               return '';
+       if (!results[2])
+               return '';
+       return results[2].replace(/\+/g, " ");
+}
index bf6530b..ac2a3cb 100644 (file)
-.w-ecomp-dashboard-home {\r
- .bg_portalWhite;//white for 1702\r
-   position: @page-main-position;\r
-  top: @page-main-top;\r
-  left: @page-main-left;\r
-  right: @page-main-right;\r
-  bottom: @page-main-bottom;\r
-  padding-top: @padding-top;\r
-  overflow-y: @page-main-overflow-y;\r
-  padding-left: @padding-left-side;\r
-\r
-  .gridster-item-container .gridster-item-body {\r
-    overflow-y:auto;\r
-    overflow-x:hidden;\r
-  }\r
-\r
-  .dashboard-home-container {\r
-      position: relative;\r
-      padding-right: 0;\r
-      padding-left: 0;\r
-      padding-bottom: @container-bottom;\r
-\r
-    .dashboard-home-title {\r
-      .blackText24m;\r
-      margin: auto;\r
-      .content_justify;\r
-    }\r
-    \r
-    .portals-list {\r
-      min-height: 70vh;\r
-      //display: flex;\r
-      justify-content: center;\r
-      flex-flow: row wrap;\r
-      width: @table-width;\r
-      //margin-left: 230px;\r
-      margin-bottom: 63px;\r
-         margin:auto;\r
-      .app-gridster-header {\r
-        background-color: @u;\r
-        font-size:12px;\r
-        overflow:hidden\r
-      }\r
-\r
-      .app-gridster-footer {\r
-        background-color: @u;\r
-      }\r
-\r
-      .portals-list-item {\r
-        background-color: @u;\r
-        border-radius: 2px;\r
-        box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.1);\r
-        display: inline-block;\r
-        width: 360px;\r
-        height: 300px;\r
-        background-size: cover;\r
-        cursor: pointer;\r
-        margin: 15px;\r
-        overflow: hidden;\r
-\r
-        .portals-item-info {\r
-          background-color: @u;\r
-          height: 120px;\r
-          top: 180px;\r
-          position: relative;\r
-          box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.1);\r
-          padding: 16px;\r
-\r
-          .info-title {\r
-            .blackText24m;\r
-            margin-bottom: 4px;\r
-            \r
-            text-overflow: ellipsis;\r
-            overflow: hidden;\r
-          }\r
-          .info-description {\r
-            .portalDBlue16r;\r
-            text-overflow: ellipsis;\r
-            white-space: nowrap;\r
-            overflow: hidden;\r
-          }\r
-          .info-button {\r
-            .btn-green;\r
-            width: 96px;\r
-            position: absolute;\r
-            bottom: 16px;\r
-            left: 16px;\r
-          }\r
-\r
-          &:hover {\r
-            opacity: .93;\r
-            z-index: 3;\r
-          }\r
-        }\r
-      }\r
-    }\r
-  }\r
-}\r
-.w-ecomp-main-error{     \r
-  .portalRed;\r
-  position: absolute;\r
-  width: 100%;\r
-  line-height: 1.5em;  \r
-}\r
-.w-ecomp-main-disclaimer {\r
-  text-align: center;\r
-  .dGray14r;\r
-  //position: absolute;\r
-  bottom: -75px;\r
-  line-height: 1.5em;\r
-  margin: 0 auto;\r
-  width:1170px;\r
-  position: relative;\r
-\r
-}\r
-\r
-@keyframes fadein {\r
-  from {\r
-    opacity: 0;\r
-  }\r
-  to {\r
-    opacity: 1;\r
-  }\r
-}\r
-\r
-.slide.ng-hide-add, \r
-.slide.ng-hide-remove,\r
-.slide.ng-enter,\r
-.slide.ng-leave {\r
-  transition: all 0.5s ease;\r
-}\r
-.slide.ng-hide,\r
-.slide.ng-enter {\r
-  transform: translate(-100%, 0);\r
-}\r
-.slide.ng-enter-active {\r
-  transform: translate(0, 0);\r
-}\r
-.slide.ng-leave {\r
-  transform: translate(0, 0);\r
-}\r
-.slide.ng-leave-active {\r
-  transform: translate(+100%, 0);\r
-}\r
-.dashboard-boarder{\r
-       // border: 2px solid #ccc!important;    \r
-       // border-radius: 16px!important; \r
-         height: 210px;\r
-    overflow: auto;\r
-}\r
-.dashboard-information-boarder{\r
-       border: 2px solid #ccc!important; \r
-       border-radius: 16px!important;    \r
-}\r
-\r
-#information-section {\r
-   margin-top:50px;\r
-}\r
-\r
-.information-section-title{\r
-    color: #0574ac;\r
-    font-family: Omnes-ECOMP-W02-Bold,Arial;\r
-    font-size: 25px;\r
-    margin: 20px;\r
-    width: 1170px;\r
-}\r
-#left {\r
-    float: left;\r
-    width: 33%;\r
-    height:300px;\r
-    background-color: white;\r
-}\r
-\r
-#center {\r
-    float: right;\r
-    width: 33%;\r
-    height:300px;\r
-        background: white;\r
-} \r
-#right {\r
-    margin-left:34%;\r
-       margin-right:34%;\r
-       height:300px;\r
-       background:white;\r
-}  \r
-\r
-\r
-/*hover*/\r
-\r
-\r
-.dock ul{\r
-display: inline-block;\r
-\r
-width: auto;\r
-margin: 0px;\r
-padding: 0px;\r
-list-style: none;\r
-\r
-}\r
-.dock ul li {\r
-width: auto;\r
-height: auto;\r
-display: inline-block;\r
-bottom: 0;\r
-vertical-align: bottom;\r
-margin-top: -43px;\r
-}\r
-.dock ul li a {\r
-display: block;\r
-height: 150px;\r
-width: 150px;\r
-position: relative;\r
--webkit-transition-property: width, height,margin-top;\r
--webkit-transition-duration: 0.5s;\r
--o-transition-property: width, height,margin-top;\r
--o-transition-duration: 0.5s;\r
--moz-transition-property: width, height,margin-top;\r
--moz-transition-duration: 0.5s;\r
-}\r
-.dock ul li a:hover {\r
-width: 200px;\r
-height: 200px;\r
-margin-top: -50px;\r
-}\r
-.dock ul li a img {\r
-width: 100%;\r
-position: absolute;\r
-bottom: 0;\r
-left: 0;\r
-border: none;\r
-padding: 0px 0px 0px 30px;\r
-}\r
-.dock_left{\r
-width: 31px;\r
--webkit-transform: rotate(33deg);\r
--moz-transform: rotate(33deg);\r
--o-transform: rotate(33deg);\r
-position: relative;\r
-background: #EEE;\r
-overflow: hidden;\r
-float: left;\r
-height: 100px;\r
-z-index: 2;\r
-margin: -18px;\r
-}\r
-.dock_right{\r
-width: 36px;\r
--webkit-transform: rotate(-33deg);\r
--moz-transform: rotate(-33deg);\r
--o-transform: rotate(-33deg);\r
-position: relative;\r
-background: #EEE;\r
-overflow: hidden;\r
-float: left;\r
-height: 100px;\r
-z-index: 2;\r
-margin: -18px;\r
-}\r
-\r
-\r
-\r
-\r
-/*Time for the CSS*/\r
-* {margin: 0; padding: 0;}\r
-body {background: #ccc;}\r
-\r
-.slider{\r
-       width: 640px; /*Same as width of the large image*/\r
-       position: relative;\r
-       /*Instead of height we will use padding*/\r
-       padding-top: 320px; /*That helps bring the labels down*/\r
-       \r
-       margin: 50px auto;\r
-       \r
-       /*Lets add a shadow*/\r
-       box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);\r
-}\r
-\r
-\r
-/*Last thing remaining is to add transitions*/\r
-.slider>img{\r
-       position: absolute;\r
-       left: 0; top: 0;\r
-       transition: all 0.5s;\r
-}\r
-\r
-.slider input[name='slide_switch'] {\r
-       display: none;\r
-}\r
-\r
-.slider label {\r
-       /*Lets add some spacing for the thumbnails*/\r
-       margin: 18px 0 0 18px;\r
-       border: 3px solid #999;\r
-       \r
-       float: left;\r
-       cursor: pointer;\r
-       transition: all 0.5s;\r
-       \r
-       /*Default style = low opacity*/\r
-       opacity: 0.6;\r
-}\r
-\r
-.slider label img{\r
-       display: block;\r
-}\r
-\r
-/*Time to add the click effects*/\r
-.slider input[name='slide_switch']:checked+label {\r
-       border-color: #666;\r
-       opacity: 1;\r
-}\r
-/*Clicking any thumbnail now should change its opacity(style)*/\r
-/*Time to work on the main images*/\r
-.slider input[name='slide_switch'] ~ img {\r
-       opacity: 0;\r
-       transform: scale(1.1);\r
-}\r
-/*That hides all main images at a 110% size\r
-On click the images will be displayed at normal size to complete the effect\r
-*/\r
-.slider input[name='slide_switch']:checked+label+img {\r
-       opacity: 1;\r
-       transform: scale(1);\r
-}\r
-/*Clicking on any thumbnail now should activate the image related to it*/\r
-\r
-/*We are done :)*/\r
-\r
-\r
-\r
-.accordion {\r
-       width: 895px; height: 320px;\r
-       overflow: hidden;\r
-  box-shadow: 0 10px 6px -6px #111;\r
-  margin: 20px auto\r
-}\r
-.accordion ul { width: 200% }\r
-\r
-.accordion li {\r
-       position: relative;\r
-       display: block;\r
-       width: 160px;\r
-       float: left;\r
-  box-shadow: 0 0 30px 8px #222;\r
-       transition: all 0.4s ease .300ms;\r
-}\r
-\r
-.accordion ul:hover li {width: 40px }\r
-.accordion ul li:hover {width: 640px }\r
-\r
-.caption {\r
-       background: rgba(0, 0, 0, 0.5);\r
-       position: absolute;\r
-  bottom: 0;   \r
-       width: 640px\r
-}\r
-\r
-.caption a {\r
-       display: block;\r
-       color: #fff;\r
-       text-decoration: none;\r
-  font: normal 16px 'Lato', Helvetica, Arial, sans-serif;\r
-  -webkit-font-smoothing: antialiased;\r
-       padding: 15px;\r
-}\r
-\r
-\r
-/*events*/\r
-.events-date{\r
-       margin-left: 10px; \r
-       float:left; \r
-       white-space: normal; \r
-       display: inline-block; \r
-       vertical-align: middle;\r
-    width: 55px;\r
-}\r
-.event-title-div{\r
-       float: left;\r
-       width: 235px;\r
-       line-height: 20px;\r
-    padding: 5px;\r
-       font-size: 14px; \r
-       margin-left: 4px;\r
-}\r
-.events-date{\r
-       height: 20px;\r
-       margin-left: 4px; \r
-       font-size: 14px; \r
-}\r
-.events-content{\r
-       font-size: 14px; \r
-       color: #444;\r
-    margin-right: 10px;\r
-}\r
-.events-content-body{\r
-       margin-top:5px;\r
-       color:#444;\r
-       margin-left:12px;\r
-       line-height:1.5;\r
-}\r
-.events {\r
-       border-radius: 4px;\r
-       padding: 3px;\r
-       -webkit-user-select: none;   \r
-}\r
-.events ul {\r
-       float: left;\r
-       width:100%;\r
-       -webkit-user-select: none\r
-}\r
-.events ul li {\r
-       line-height: 30px; \r
-       list-style: none;\r
-    border-bottom: 2px solid grey;\r
-    height: 100%;\r
-    min-height: 42px;\r
-}\r
-.events ul li:hover {\r
-    background: #ddd;\r
-    cursor: pointer;\r
-}\r
-.events ul li a {\r
-       color: black;\r
-       text-decoration: none;\r
-       font: 14px Helvetica, Arial, sans-serif;\r
-       -webkit-font-smoothing: antialiased;\r
-       -webkit-user-select: none;\r
-       font-family: "Omnes-ECOMP-W02", Arial;\r
-}\r
-.events-link{\r
-       color: #067ab4 !important; \r
-}\r
-\r
-\r
-/*widgets*/\r
-\r
-.handle-e{\r
-    width: 5px;\r
-}\r
-\r
-.singleBtnBorder {\r
-    border-radius: 6px 6px 6px 6px;  \r
-}\r
-\r
-.widgetHeaderBtn{\r
-    \r
-    height: 30px;\r
-    background-color: #FFFFFF;\r
-    position: relative;\r
-    display: inline-block;\r
-    -moz-background-clip: padding-box;\r
-    -webkit-background-clip: padding-box;\r
-    background-clip: padding-box;\r
-    -webkit-box-sizing: border-box;\r
-    -moz-box-sizing: border-box;\r
-    box-sizing: border-box;\r
-    padding: 8px 20px;\r
-    font-size: 14px;\r
-    line-height: 14px;\r
-    min-width: 60px;\r
-    border: none;\r
-    border-radius: 6px;\r
-    background-color: #ffffff;\r
-    background-image: none;\r
-    color: #ffffff;\r
-    vertical-align: middle;\r
-    text-align: center;\r
-    text-decoration: none;\r
-    text-transform: capitalize;\r
-    text-shadow: none !important;\r
-    white-space: nowrap;\r
-    cursor: pointer;\r
-    -webkit-user-select: none;\r
-    -moz-user-select: none;\r
-    -ms-user-select: none;\r
-    -o-user-select: none;\r
-    user-select: none;\r
-    -webkit-transition: background-color 0.3s ease-out;\r
-    -moz-transition: background-color 0.3s ease-out;\r
-    transition: background-color 0.3s ease-out;\r
-    }\r
-  \r
-.widgetHeaderBtnPosition {\r
-       width: 30px;\r
-    min-width: 0px;\r
-    border: 1px solid #AAAAAA;\r
-    padding-left: 3px;\r
-    padding-right: 5px;\r
-    }\r
-    \r
-.icon-anchor {\r
-    color: #888;\r
-}\r
-   \r
-.widgetHeaderBtn:hover, .widgetHeaderBtn:focus {\r
-    background: rgba(0, 0, 0, 0);\r
-    color: #3a7999;\r
-    box-shadow: inset 0 0 0 2px #3a7999;\r
-}\r
-/*news*/\r
-\r
-@keyframes ticker {\r
-       0%   {margin-top: 0}\r
-       25%  {margin-top: -55px}\r
-       50%  {margin-top: -110px}\r
-       75%  {margin-top: -165px}\r
-       100% {margin-top: 0}\r
-}\r
-\r
-body { background: #333; width: 100%; height: 100% }\r
-\r
-.news {\r
\r
-  width: 350px;\r
-  height: 250px;\r
-  margin: 0px auto;\r
-  // overflow: auto;\r
-  border-radius: 4px;\r
-  padding: 3px;\r
-  -webkit-user-select: none;\r
-     \r
-} \r
-\r
-\r
-\r
-.news ul {\r
-  float: left;\r
-  width:100%;\r
-  // animation: ticker 25s cubic-bezier(1, 0, .5, 0) infinite;\r
-  -webkit-user-select: none\r
-}\r
-\r
-.news ul li {line-height: 30px; list-style: none;\r
-    border-bottom: 2px solid grey;\r
-    min-height: 42px;\r
- }\r
\r
-.news ul li:hover {\r
-    background: #ddd;\r
-    cursor: pointer;\r
-}\r
-\r
-.news ul li a {\r
-  color: black;\r
-  text-decoration: none;\r
-  font-size: 14px;\r
-  line-height: 1.5;\r
-  display: inline-block;\r
-  width:100%;\r
-  min-height:40px;\r
-  padding-top: 5px;\r
-  padding-bottom: 5px;\r
-  -webkit-font-smoothing: antialiased;\r
-  -webkit-user-select: none;\r
-}\r
-\r
-.news ul:hover { animation-play-state: paused }\r
-.news span:hover+ul { animation-play-state: paused }\r
-/*resources*/\r
-.resources {\r
\r
-  width: 100%;\r
-  height: 200px;\r
-  margin-left: 5px;\r
-  border-radius: 4px;\r
-  padding: 3px;\r
-  -webkit-user-select: none;\r
-     \r
-} \r
-\r
-\r
-\r
-.resources ul {\r
-  float: left;\r
-  width:100%;\r
\r
-  -webkit-user-select: none\r
-}\r
-\r
-.resources ul li {line-height: 30px; list-style: none;\r
-    border-bottom: 2px solid grey;\r
-    min-height: 42px;\r
- }\r
\r
-.resources ul li:hover {\r
-    background: #ddd;\r
-    cursor: pointer;\r
-}\r
-\r
-.resources ul li a {\r
-  color: black;\r
-  text-decoration: none;\r
-  font-size: 14px;\r
-  line-height: 1.5;\r
-  width:100%;\r
-  min-height:40px;\r
-  display: inline-block;\r
-  padding-top: 5px;\r
-  padding-bottom: 5px;\r
-  -webkit-font-smoothing: antialiased;\r
-  -webkit-user-select: none;\r
-}\r
-\r
-\r
-/* OTHER COLORS */\r
-.blue { background: #347fd0 }\r
-.blue span { background: #2c66be }\r
-.red { background: #d23435 }\r
-.red span { background: #c22b2c }\r
-.green { background: #699B67 }\r
-.green span { background: #547d52 }\r
-.magenta { background: #b63ace }\r
-.magenta span { background: #842696 }\r
-\r
-\r
-/*broadcast*/\r
-\r
-.box-one {\r
-  -webkit-transition:all linear 0.4s;\r
-  transition:all linear 0.4s;\r
-  height:100px; width:200px; background:white;    border: 2px solid #ccc!important;\r
-    border-radius: 16px!important;\r
-}\r
-.box-one.ng-hide {\r
-display: block!important;\r
-  opacity:0;\r
-}\r
-\r
-.gridsterContent{\r
-       height:120px;\r
-}\r
-\r
-.gridster-item{\r
-    z-index:0 !important;\r
-}\r
-.gridsterAppContent{\r
-       height:120px;\r
-       \r
-}\r
-\r
- .gridsterImage{\r
-       height:84px; \r
-       width:168px;\r
- }\r
- .grider-content-ecomp{\r
-       transition: transform 0.5s ease-out;\r
- }\r
-  .grider-content-ecomp:hover{\r
-    transform: scale(1.1);\r
-}\r
-\r
-\r
-/*information section*/\r
-\r
-.information-section{\r
-       /*margin-top:25px;*/\r
-}\r
-.information-section-gridsterContent{\r
-       /*height:300px;*/\r
-}\r
-.information-sections-gridster-header{\r
-       color: #0574ac;\r
-    font-family: Omnes-ECOMP-W02-Bold,Arial;\r
-    font-size: 25px;\r
-   \r
-}\r
-/*application empty div*/\r
-.app-error-block {\r
-    padding-top: 10px;\r
-   \r
-}\r
-/*news empty div*/\r
-.activity-error-block {\r
-    padding-top: 60px;\r
-   \r
-}\r
-\r
-.activity-error-msg1{\r
-       text-align: center;\r
-    margin-top: 20px;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    color: #444;\r
-    font-size: 20px;\r
-    \r
-}\r
-\r
-.newstape {\r
-  background: white;\r
-  color: black;\r
-  height: 400px;\r
-  overflow: hidden;\r
-}\r
-\r
-.newstape-content {\r
-  position: relative;\r
-  padding: 15px;\r
-}\r
-\r
-.newstape-drag { cursor: ns-resize; }\r
-\r
-.text-center { text-align: center; }\r
-\r
-.text-right { text-align: right; }\r
-\r
-.text-justify { text-align: justify; }\r
-\r
-// #newsContainer{\r
-//   overflow:auto;\r
-//   height: 100%;\r
-// }\r
-\r
-/*widget header*/\r
-.optionsMenu{\r
-           position: absolute;\r
-    list-style: none;\r
-    top: 25px;\r
-    right: 10px;\r
-    border: 1px solid #067ab4;\r
-    display: none;\r
-    z-index: 2;\r
-    border-radius: 6px 0px 6px 6px;\r
-    background: #fff;\r
-    width: 130px;\r
-}\r
-\r
-.optionsMenuLink {\r
-    position: relative;\r
-    padding-left: 8px;\r
-    padding-right: 2px;\r
-    font-size: 12px;\r
-    line-height: 30px;\r
-    color: #444444;\r
-}\r
-.optionsMenu > li:hover a {\r
-    color: #ffffff !important;\r
-}\r
-.optionsMenu > li {\r
-    width: 100%;\r
-    text-align: left;\r
-}\r
-.optionsMenu > li:hover {\r
-    background-color: #0faaf7;\r
-    border-color: none !important;\r
-    cursor: pointer;\r
-}\r
-\r
-.dashboardSortHeader{\r
-    margin-left: 756px;\r
-}\r
-\r
-#dashboardAddWidgetPreference{\r
-    display: inline-block; \r
-    font-size: 14px; \r
-    color: #3e3e3e; \r
-    width: 69%; \r
-    text-align: center; \r
-    padding: 15px 0px 15px 0px;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-}\r
-\r
-#dashboardAddWidgetPreference:hover{\r
-    background-color: #0568ae;\r
-    color:white !important; \r
-}\r
-\r
-#dashboardDefaultPreference{\r
-    display: inline-block; \r
-    font-size: 14px; \r
-    color: #3e3e3e; \r
-    width: 30%; \r
-    text-align: center; \r
-    padding: 15px 0px 15px 0px; \r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-}\r
-\r
-#dashboardDefaultPreference:hover{\r
-    background-color: #0568ae;\r
-    color:white !important;    \r
-}\r
-\r
-.simulateGridHeader{\r
-       position: relative;\r
-    height: 50px !important;\r
-    border: 1px solid #d3d3d3;\r
-    border-bottom: 0;\r
-    background-color: #E5E5E5;\r
-    white-space: nowrap;\r
-    text-overflow: ellipsis;\r
-    z-index: 1;\r
-}\r
-\r
-.simulateGridHeaderTitle{\r
-       line-height: 44px;\r
-    margin-left: 26px;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    font-size: 18px; \r
-    color: #444444;\r
-    float: left;\r
-}\r
-\r
-.simulateGridHeaderHandle{\r
-       cursor: move;\r
-    margin: 12px;\r
-    position: absolute;\r
-    top: 0;\r
-    left: 0;\r
-    border: 0;\r
-    vertical-align: middle;\r
-    -ms-interpolation-mode: bicubic;\r
-    display: block;\r
-}\r
-\r
-/* apps gridsters */\r
-ul {\r
-    list-style: none;\r
-}\r
-.gridster-box {\r
-    height: 100%;\r
-    border: 1px solid #ccc;\r
-    background-color: #fff;\r
-       transition: transform 0.5s ease-out;\r
-}\r
-.gridster-box-header {\r
-    background-color: #fff;\r
-    padding: 0 0px 0 10px;\r
-    border-bottom: 1px solid #ccc;\r
-    position: relative;\r
-    height: 50px !important;\r
-}\r
-.gridster-box-header h3 {\r
-    margin-top: 15px;\r
-    display: inline-block;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-}\r
-\r
-.gridster-box-header i {\r
-font-size: 22px; \r
-}\r
-\r
-.gridster-box-content {\r
-    padding: 59px;\r
-}\r
-.gridster-box:hover{\r
-    transform: scale(1.1);\r
-}\r
-.gridster-box-header-btns {\r
-    top: 15px;\r
-    right: 10px;\r
-    position: absolute;\r
-}\r
-\r
-/*** widgets ***/\r
-ul {\r
-    list-style: none;\r
-}\r
-.box {\r
-    height: 100%;\r
-    border: 1px solid #ccc;\r
-    background-color: #fff;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-}\r
-.box-header {\r
-       height : 50px;\r
-    background-color: #fff;\r
-    padding: 0 30px 0 10px;\r
-    border-bottom: 1px solid #ccc;\r
-    position: relative;\r
-}\r
-.box-header h3 {\r
-    margin-top: 15px;\r
-    display: inline-block;\r
-    font-size: 16px;\r
-}\r
-.box-content {\r
-    position: absolute;\r
-    width: 100%;\r
-    top: 50px;\r
-    left: 0;\r
-    right: 0;\r
-    bottom: 29px;\r
-    border: 1px solid #d3d3d3;\r
-    box-sizing: border-box;\r
-    overflow-y: auto;\r
-    overflow-x: hidden;\r
-    color: #444444;\r
-    bottom: 0px;\r
-}\r
-.box-header-btns {\r
-    top: 10px;\r
-    right: 10px;\r
-    cursor: pointer;\r
-    position: absolute;\r
-}\r
-\r
-#widget-boarder{\r
-  background-color: #eee;\r
-  border: 1px dashed white;\r
-}\r
-.icon-content-gridguide{\r
-cursor:move;\r
+.w-ecomp-dashboard-home {
+ .bg_portalWhite;//white for 1702
+   position: @page-main-position;
+  top: @page-main-top;
+  left: @page-main-left;
+  right: @page-main-right;
+  bottom: @page-main-bottom;
+  padding-top: @padding-top;
+  overflow-y: @page-main-overflow-y;
+  padding-left: @padding-left-side;
+
+  .gridster-item-container .gridster-item-body {
+    overflow-y:auto;
+    overflow-x:hidden;
+  }
+
+  .dashboard-home-container {
+      position: relative;
+      padding-right: 0;
+      padding-left: 0;
+      padding-bottom: @container-bottom;
+
+    .dashboard-home-title {
+      .blackText24m;
+      margin: auto;
+      .content_justify;
+    }
+    
+    .portals-list {
+      min-height: 70vh;
+      //display: flex;
+      justify-content: center;
+      flex-flow: row wrap;
+      width: @table-width;
+      //margin-left: 230px;
+      margin-bottom: 63px;
+         margin:auto;
+      .app-gridster-header {
+        background-color: @u;
+        font-size:12px;
+        overflow:hidden
+      }
+
+      .app-gridster-footer {
+        background-color: @u;
+      }
+
+      .portals-list-item {
+        background-color: @u;
+        border-radius: 2px;
+        box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.1);
+        display: inline-block;
+        width: 360px;
+        height: 300px;
+        background-size: cover;
+        cursor: pointer;
+        margin: 15px;
+        overflow: hidden;
+
+        .portals-item-info {
+          background-color: @u;
+          height: 120px;
+          top: 180px;
+          position: relative;
+          box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.1);
+          padding: 16px;
+
+          .info-title {
+            .blackText24m;
+            margin-bottom: 4px;
+            
+            text-overflow: ellipsis;
+            overflow: hidden;
+          }
+          .info-description {
+            .portalDBlue16r;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+            overflow: hidden;
+          }
+          .info-button {
+            .btn-green;
+            width: 96px;
+            position: absolute;
+            bottom: 16px;
+            left: 16px;
+          }
+
+          &:hover {
+            opacity: .93;
+            z-index: 3;
+          }
+        }
+      }
+    }
+  }
+}
+.w-ecomp-main-error{     
+  .portalRed;
+  position: absolute;
+  width: 100%;
+  line-height: 1.5em;  
+}
+.w-ecomp-main-disclaimer {
+  text-align: center;
+  .dGray14r;
+  //position: absolute;
+  bottom: -75px;
+  line-height: 1.5em;
+  margin: 0 auto;
+  width:1170px;
+  position: relative;
+
+}
+
+@keyframes fadein {
+  from {
+    opacity: 0;
+  }
+  to {
+    opacity: 1;
+  }
+}
+
+.slide.ng-hide-add, 
+.slide.ng-hide-remove,
+.slide.ng-enter,
+.slide.ng-leave {
+  transition: all 0.5s ease;
+}
+.slide.ng-hide,
+.slide.ng-enter {
+  transform: translate(-100%, 0);
+}
+.slide.ng-enter-active {
+  transform: translate(0, 0);
+}
+.slide.ng-leave {
+  transform: translate(0, 0);
+}
+.slide.ng-leave-active {
+  transform: translate(+100%, 0);
+}
+.dashboard-boarder{
+       // border: 2px solid #ccc!important;    
+       // border-radius: 16px!important; 
+         height: 210px;
+    overflow: auto;
+}
+.dashboard-information-boarder{
+       border: 2px solid #ccc!important; 
+       border-radius: 16px!important;    
+}
+
+#information-section {
+   margin-top:50px;
+}
+
+.information-section-title{
+    color: #0574ac;
+    font-family: Omnes-ECOMP-W02-Bold,Arial;
+    font-size: 25px;
+    margin: 20px;
+    width: 1170px;
+}
+#left {
+    float: left;
+    width: 33%;
+    height:300px;
+    background-color: white;
+}
+
+#center {
+    float: right;
+    width: 33%;
+    height:300px;
+        background: white;
+} 
+#right {
+    margin-left:34%;
+       margin-right:34%;
+       height:300px;
+       background:white;
+}  
+
+
+/*hover*/
+
+
+.dock ul{
+display: inline-block;
+
+width: auto;
+margin: 0px;
+padding: 0px;
+list-style: none;
+
+}
+.dock ul li {
+width: auto;
+height: auto;
+display: inline-block;
+bottom: 0;
+vertical-align: bottom;
+margin-top: -43px;
+}
+.dock ul li a {
+display: block;
+height: 150px;
+width: 150px;
+position: relative;
+-webkit-transition-property: width, height,margin-top;
+-webkit-transition-duration: 0.5s;
+-o-transition-property: width, height,margin-top;
+-o-transition-duration: 0.5s;
+-moz-transition-property: width, height,margin-top;
+-moz-transition-duration: 0.5s;
+}
+.dock ul li a:hover {
+width: 200px;
+height: 200px;
+margin-top: -50px;
+}
+.dock ul li a img {
+width: 100%;
+position: absolute;
+bottom: 0;
+left: 0;
+border: none;
+padding: 0px 0px 0px 30px;
+}
+.dock_left{
+width: 31px;
+-webkit-transform: rotate(33deg);
+-moz-transform: rotate(33deg);
+-o-transform: rotate(33deg);
+position: relative;
+background: #EEE;
+overflow: hidden;
+float: left;
+height: 100px;
+z-index: 2;
+margin: -18px;
+}
+.dock_right{
+width: 36px;
+-webkit-transform: rotate(-33deg);
+-moz-transform: rotate(-33deg);
+-o-transform: rotate(-33deg);
+position: relative;
+background: #EEE;
+overflow: hidden;
+float: left;
+height: 100px;
+z-index: 2;
+margin: -18px;
+}
+
+
+
+
+/*Time for the CSS*/
+* {margin: 0; padding: 0;}
+body {background: #ccc;}
+
+.slider{
+       width: 640px; /*Same as width of the large image*/
+       position: relative;
+       /*Instead of height we will use padding*/
+       padding-top: 320px; /*That helps bring the labels down*/
+       
+       margin: 50px auto;
+       
+       /*Lets add a shadow*/
+       box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75);
+}
+
+
+/*Last thing remaining is to add transitions*/
+.slider>img{
+       position: absolute;
+       left: 0; top: 0;
+       transition: all 0.5s;
+}
+
+.slider input[name='slide_switch'] {
+       display: none;
+}
+
+.slider label {
+       /*Lets add some spacing for the thumbnails*/
+       margin: 18px 0 0 18px;
+       border: 3px solid #999;
+       
+       float: left;
+       cursor: pointer;
+       transition: all 0.5s;
+       
+       /*Default style = low opacity*/
+       opacity: 0.6;
+}
+
+.slider label img{
+       display: block;
+}
+
+/*Time to add the click effects*/
+.slider input[name='slide_switch']:checked+label {
+       border-color: #666;
+       opacity: 1;
+}
+/*Clicking any thumbnail now should change its opacity(style)*/
+/*Time to work on the main images*/
+.slider input[name='slide_switch'] ~ img {
+       opacity: 0;
+       transform: scale(1.1);
+}
+/*That hides all main images at a 110% size
+On click the images will be displayed at normal size to complete the effect
+*/
+.slider input[name='slide_switch']:checked+label+img {
+       opacity: 1;
+       transform: scale(1);
+}
+/*Clicking on any thumbnail now should activate the image related to it*/
+
+/*We are done :)*/
+
+
+
+.accordion {
+       width: 895px; height: 320px;
+       overflow: hidden;
+  box-shadow: 0 10px 6px -6px #111;
+  margin: 20px auto
+}
+.accordion ul { width: 200% }
+
+.accordion li {
+       position: relative;
+       display: block;
+       width: 160px;
+       float: left;
+  box-shadow: 0 0 30px 8px #222;
+       transition: all 0.4s ease .300ms;
+}
+
+.accordion ul:hover li {width: 40px }
+.accordion ul li:hover {width: 640px }
+
+.caption {
+       background: rgba(0, 0, 0, 0.5);
+       position: absolute;
+  bottom: 0;   
+       width: 640px
+}
+
+.caption a {
+       display: block;
+       color: #fff;
+       text-decoration: none;
+  font: normal 16px 'Lato', Helvetica, Arial, sans-serif;
+  -webkit-font-smoothing: antialiased;
+       padding: 15px;
+}
+
+
+/*events*/
+.events-date{
+       margin-left: 10px; 
+       float:left; 
+       white-space: normal; 
+       display: inline-block; 
+       vertical-align: middle;
+    width: 55px;
+}
+.event-title-div{
+       float: left;
+       width: 235px;
+       line-height: 20px;
+    padding: 5px;
+       font-size: 14px; 
+       margin-left: 4px;
+}
+.events-date{
+       height: 20px;
+       margin-left: 4px; 
+       font-size: 14px; 
+}
+.events-content{
+       font-size: 14px; 
+       color: #444;
+    margin-right: 10px;
+}
+.events-content-body{
+       margin-top:5px;
+       color:#444;
+       margin-left:12px;
+       line-height:1.5;
+}
+.events {
+       border-radius: 4px;
+       padding: 3px;
+       -webkit-user-select: none;   
+}
+.events ul {
+       float: left;
+       width:100%;
+       -webkit-user-select: none
+}
+.events ul li {
+       line-height: 30px; 
+       list-style: none;
+    border-bottom: 2px solid grey;
+    height: 100%;
+    min-height: 42px;
+}
+.events ul li:hover {
+    background: #ddd;
+    cursor: pointer;
+}
+.events ul li a {
+       color: black;
+       text-decoration: none;
+       font: 14px Helvetica, Arial, sans-serif;
+       -webkit-font-smoothing: antialiased;
+       -webkit-user-select: none;
+       font-family: "Omnes-ECOMP-W02", Arial;
+}
+.events-link{
+       color: #067ab4 !important; 
+}
+
+
+/*widgets*/
+
+.handle-e{
+    width: 5px;
+}
+
+.singleBtnBorder {
+    border-radius: 6px 6px 6px 6px;  
+}
+
+.widgetHeaderBtn{
+    
+    height: 30px;
+    background-color: #FFFFFF;
+    position: relative;
+    display: inline-block;
+    -moz-background-clip: padding-box;
+    -webkit-background-clip: padding-box;
+    background-clip: padding-box;
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    padding: 8px 20px;
+    font-size: 14px;
+    line-height: 14px;
+    min-width: 60px;
+    border: none;
+    border-radius: 6px;
+    background-color: #ffffff;
+    background-image: none;
+    color: #ffffff;
+    vertical-align: middle;
+    text-align: center;
+    text-decoration: none;
+    text-transform: capitalize;
+    text-shadow: none !important;
+    white-space: nowrap;
+    cursor: pointer;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    -o-user-select: none;
+    user-select: none;
+    -webkit-transition: background-color 0.3s ease-out;
+    -moz-transition: background-color 0.3s ease-out;
+    transition: background-color 0.3s ease-out;
+    }
+  
+.widgetHeaderBtnPosition {
+       width: 30px;
+    min-width: 0px;
+    border: 1px solid #AAAAAA;
+    padding-left: 3px;
+    padding-right: 5px;
+    }
+    
+.icon-anchor {
+    color: #888;
+}
+   
+.widgetHeaderBtn:hover, .widgetHeaderBtn:focus {
+    background: rgba(0, 0, 0, 0);
+    color: #3a7999;
+    box-shadow: inset 0 0 0 2px #3a7999;
+}
+/*news*/
+
+@keyframes ticker {
+       0%   {margin-top: 0}
+       25%  {margin-top: -55px}
+       50%  {margin-top: -110px}
+       75%  {margin-top: -165px}
+       100% {margin-top: 0}
+}
+
+body { background: #333; width: 100%; height: 100% }
+
+.news {
+  width: 350px;
+  height: 250px;
+  margin: 0px auto;
+  // overflow: auto;
+  border-radius: 4px;
+  padding: 3px;
+  -webkit-user-select: none;
+     
+} 
+
+
+
+.news ul {
+  float: left;
+  width:100%;
+  // animation: ticker 25s cubic-bezier(1, 0, .5, 0) infinite;
+  -webkit-user-select: none
+}
+
+.news ul li {line-height: 30px; list-style: none;
+    border-bottom: 2px solid grey;
+    min-height: 42px;
+ }
+.news ul li:hover {
+    background: #ddd;
+    cursor: pointer;
+}
+
+.news ul li a {
+  color: black;
+  text-decoration: none;
+  font-size: 14px;
+  line-height: 1.5;
+  display: inline-block;
+  width:100%;
+  min-height:40px;
+  padding-top: 5px;
+  padding-bottom: 5px;
+  -webkit-font-smoothing: antialiased;
+  -webkit-user-select: none;
+}
+
+.news ul:hover { animation-play-state: paused }
+.news span:hover+ul { animation-play-state: paused }
+/*resources*/
+.resources {
+  width: 100%;
+  height: 200px;
+  margin-left: 5px;
+  border-radius: 4px;
+  padding: 3px;
+  -webkit-user-select: none;
+     
+} 
+
+
+
+.resources ul {
+  float: left;
+  width:100%;
+  -webkit-user-select: none
+}
+
+.resources ul li {line-height: 30px; list-style: none;
+    border-bottom: 2px solid grey;
+    min-height: 42px;
+ }
+.resources ul li:hover {
+    background: #ddd;
+    cursor: pointer;
+}
+
+.resources ul li a {
+  color: black;
+  text-decoration: none;
+  font-size: 14px;
+  line-height: 1.5;
+  width:100%;
+  min-height:40px;
+  display: inline-block;
+  padding-top: 5px;
+  padding-bottom: 5px;
+  -webkit-font-smoothing: antialiased;
+  -webkit-user-select: none;
+}
+
+
+/* OTHER COLORS */
+.blue { background: #347fd0 }
+.blue span { background: #2c66be }
+.red { background: #d23435 }
+.red span { background: #c22b2c }
+.green { background: #699B67 }
+.green span { background: #547d52 }
+.magenta { background: #b63ace }
+.magenta span { background: #842696 }
+
+
+/*broadcast*/
+
+.box-one {
+  -webkit-transition:all linear 0.4s;
+  transition:all linear 0.4s;
+  height:100px; width:200px; background:white;    border: 2px solid #ccc!important;
+    border-radius: 16px!important;
+}
+.box-one.ng-hide {
+display: block!important;
+  opacity:0;
+}
+
+.gridsterContent{
+       height:120px;
+}
+
+.gridster-item{
+    z-index:0 !important;
+}
+.gridsterAppContent{
+       height:120px;
+       
+}
+
+ .gridsterImage{
+       height:84px; 
+       width:168px;
+ }
+ .grider-content-ecomp{
+       transition: transform 0.5s ease-out;
+ }
+  .grider-content-ecomp:hover{
+    transform: scale(1.1);
+}
+
+
+/*information section*/
+
+.information-section{
+       /*margin-top:25px;*/
+}
+.information-section-gridsterContent{
+       /*height:300px;*/
+}
+.information-sections-gridster-header{
+       color: #0574ac;
+    font-family: Omnes-ECOMP-W02-Bold,Arial;
+    font-size: 25px;
+   
+}
+/*application empty div*/
+.app-error-block {
+    padding-top: 10px;
+   
+}
+/*news empty div*/
+.activity-error-block {
+    padding-top: 60px;
+   
+}
+
+.activity-error-msg1{
+       text-align: center;
+    margin-top: 20px;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    color: #444;
+    font-size: 20px;
+    
+}
+
+.newstape {
+  background: white;
+  color: black;
+  height: 400px;
+  overflow: hidden;
+}
+
+.newstape-content {
+  position: relative;
+  padding: 15px;
+}
+
+.newstape-drag { cursor: ns-resize; }
+
+.text-center { text-align: center; }
+
+.text-right { text-align: right; }
+
+.text-justify { text-align: justify; }
+
+// #newsContainer{
+//   overflow:auto;
+//   height: 100%;
+// }
+
+/*widget header*/
+.optionsMenu{
+           position: absolute;
+    list-style: none;
+    top: 25px;
+    right: 10px;
+    border: 1px solid #067ab4;
+    display: none;
+    z-index: 2;
+    border-radius: 6px 0px 6px 6px;
+    background: #fff;
+    width: 130px;
+}
+
+.optionsMenuLink {
+    position: relative;
+    padding-left: 8px;
+    padding-right: 2px;
+    font-size: 12px;
+    line-height: 30px;
+    color: #444444;
+}
+.optionsMenu > li:hover a {
+    color: #ffffff !important;
+}
+.optionsMenu > li {
+    width: 100%;
+    text-align: left;
+}
+.optionsMenu > li:hover {
+    background-color: #0faaf7;
+    border-color: none !important;
+    cursor: pointer;
+}
+
+.dashboardSortHeader{
+   margin-top: -44px;
+margin-left: 735px;
+}
+
+#dashboard-dropdown
+{
+position: absolute;
+margin-top: -37px;
+left: 80%;
+top: 42px;
+}
+
+#dashboardAddWidgetPreference{
+    display: inline-block; 
+    font-size: 14px; 
+    color: #3e3e3e; 
+    width: 69%; 
+    text-align: center; 
+    padding: 15px 0px 15px 0px;
+    font-family: "Omnes-ECOMP-W02", Arial;
+}
+
+#dashboardAddWidgetPreference:hover{
+    background-color: #0568ae;
+    color:white !important; 
+}
+
+#dashboardDefaultPreference{
+    display: inline-block; 
+    font-size: 14px; 
+    color: #3e3e3e; 
+    width: 30%; 
+    text-align: center; 
+    padding: 15px 0px 15px 0px; 
+    font-family: "Omnes-ECOMP-W02", Arial;
+}
+
+#dashboardDefaultPreference:hover{
+    background-color: #0568ae;
+    color:white !important;    
+}
+
+.simulateGridHeader{
+       position: relative;
+    height: 50px !important;
+    border: 1px solid #d3d3d3;
+    border-bottom: 0;
+    background-color: #E5E5E5;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    z-index: 1;
+}
+
+.simulateGridHeaderTitle{
+       line-height: 44px;
+    margin-left: 26px;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    font-size: 18px; 
+    color: #444444;
+    float: left;
+}
+
+.simulateGridHeaderHandle{
+       cursor: move;
+    margin: 12px;
+    position: absolute;
+    top: 0;
+    left: 0;
+    border: 0;
+    vertical-align: middle;
+    -ms-interpolation-mode: bicubic;
+    display: block;
+}
+
+/* apps gridsters */
+ul {
+    list-style: none;
+}
+.gridster-box {
+    height: 100%;
+    border: 1px solid #ccc;
+    background-color: #fff;
+       transition: transform 0.5s ease-out;
+}
+.gridster-box-header {
+    background-color: #fff;
+    padding: 0 0px 0 10px;
+    border-bottom: 1px solid #ccc;
+    position: relative;
+    height: 50px !important;
+}
+.gridster-box-header h3 {
+    margin-top: 15px;
+    display: inline-block;
+    font-family: "Omnes-ECOMP-W02", Arial;
+}
+
+.gridster-box-header i {
+font-size: 22px; 
+}
+
+.gridster-box-content {
+    padding: 59px;
+}
+.gridster-box:hover{
+    transform: scale(1.1);
+}
+.gridster-box-header-btns {
+    top: 15px;
+    right: 10px;
+    position: absolute;
+}
+
+/*** widgets ***/
+ul {
+    list-style: none;
+}
+.box {
+    height: 100%;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    font-family: "Omnes-ECOMP-W02", Arial;
+}
+.box-header {
+       height : 50px;
+    background-color: #fff;
+    padding: 0 30px 0 10px;
+    border-bottom: 1px solid #ccc;
+    position: relative;
+}
+.box-header h3 {
+    margin-top: 15px;
+    display: inline-block;
+    font-size: 16px;
+}
+.box-content {
+    position: absolute;
+    width: 100%;
+    top: 50px;
+    left: 0;
+    right: 0;
+    bottom: 29px;
+    border: 1px solid #d3d3d3;
+    box-sizing: border-box;
+    overflow-y: auto;
+    overflow-x: hidden;
+    color: #444444;
+    bottom: 0px;
+}
+.box-header-btns {
+    top: 10px;
+    right: 10px;
+    cursor: pointer;
+    position: absolute;
+}
+
+#widget-boarder{
+  background-color: #eee;
+  border: 1px dashed white;
+}
+.icon-content-gridguide{
+cursor:move;
 }
\ No newline at end of file
index 5e67526..9a87c0b 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-dashboard-home" id="widgets">\r
-       <div class="dashboard-home-container" id="page-content">\r
-               <div align="center" id="errorInfo"\r
-                       style="display: none; font-size: 12px; margin-left: 5px">\r
-                       <span style="color: red">You don't have a user account in that\r
-                               application. Please ask the system administrator. </span>\r
-               </div>\r
-               <div class="portals-list" style="margin-bottom: 0px;">\r
-                       <div>\r
-                               <div class="simulateGridHeader">\r
-                                       <span class="simulateGridHeaderTitle">Applications <span\r
-                                               class="dashboardSortHeader">Sort by:</span></span>\r
-                                       <div style="float: right; margin: 7px 7px 7px 0px;"\r
-                                               class="form-field" att-select="sort_options"\r
-                                               ng-model="selectedSortType"\r
-                                               id="sort-by-{{selectedSortType.value}}"\r
-                                               ng-change="selectedSortTypeChanged(selectedSortType.value)"></div>\r
-                               </div>\r
-                               <div class="dashboard-boarder">\r
-                                       <div class="gridster-container override_background">\r
-                                               <div ng-if="appsViewData.length==0">\r
-                                                       <div class="app-error-block">\r
-                                                               <i class="icon-information full-linear-icon-information"\r
-                                                                       style="margin-left: 50%; font-size: 90px; color: black"></i> <br>\r
-                                                               <div class="activity-error-msg1">\r
-                                                                       You do not have access to any application or function in ECOMP\r
-                                                                       Portal. <br> Please request access via <a\r
-                                                                               href="https://mylogins.cso.att.com/index.cfm"\r
-                                                                               target="_mylogins">MyLogins</a>.\r
-                                                               </div>\r
-                                                       </div>\r
-                                               </div>\r
-\r
-                                               <div ng-if="appsViewData.length>0" id="page-content"\r
-                                                       class="content" gridster="dashboard.gridsterAppOpts">\r
-                                                       <ul>\r
-                                                               <li gridster-item="item" ng-repeat="item in appsViewData">\r
-                                                                       <div class="gridster-box" ng-if="item.addRemoveApps == null">\r
-                                                                               <div class="gridster-box-header">\r
-                                                                                       <i class="icon-content-gridguide"></i>\r
-                                                                                       <h3 style="cursor: context-menu">{{item.headerText |\r
-                                                                                               elipsis: 14}}</h3>\r
-                                                                               </div>\r
-                                                                               <div class="gridster-box-content"\r
-                                                                                       ng-style="{'cursor':'pointer',\r
-                                                                                       'background-image': 'url('+(item.imageLink)+')',\r
-                                                                                       'background-color':'white',\r
-                                                                                       'background-repeat': 'no-repeat',\r
-                                                                                       'background-size': '170px 130px'}"\r
-                                                                                       ng-click="dashboard.goToPortal(item);dashboard.auditLog(item)"\r
-                                                                                       ng-hide="users.isLoadingTable && !users.getUserAppsIsDone">\r
-                                                                               </div>\r
-                                                                       </div>\r
-                                                                       <div class="gridster-box" ng-if="item.addRemoveApps">\r
-                                                                               <div class="gridster-box-header" style="cursor: pointer;"\r
-                                                                                       ng-click="dashboard.goToCatalog()">\r
-                                                                                       <i class="icon-content-gridguide"></i>\r
-                                                                                       <h3>Select applications...</h3>\r
-\r
-                                                                               </div>\r
-                                                                               <div class="gridster-box-content"\r
-                                                                                       ng-style="{'cursor':'pointer',\r
-                                                                               'order': item.order, \r
-                                                                               'text-align': 'center',\r
-                                                                               'background-color':'white',\r
-                                                                               'background-repeat': 'no-repeat',\r
-                                                                               'background-size': '170px 130px',\r
-                                                                               'padding': '4px',\r
-                                                                               'opacity': '1'}"\r
-                                                                                       ng-click="dashboard.goToCatalog()" class="gridsterContent">\r
-                                                                                       <label style="font-size: 12px;">Click\r
-                                                                                               here to personalize <br> this applications page\r
-                                                                                       </label> <i class="icon-controls-add-maximize"\r
-                                                                                               style="font-size: 80px; color: #067ab4"></i>\r
-                                                                               </div>\r
-                                                                       </div>\r
-                                                               </li>\r
-                                                       </ul>\r
-                                               </div>\r
-\r
-                                       </div>\r
-\r
-                               </div>\r
-                       </div>\r
-\r
-                       <br> <br>\r
-\r
-\r
-                       <div style="font-family: Omnes-ECOMP-W02;"\r
-                               ng-show=dashboard.isCommError>Failed to communicate with the\r
-                               widget microservice.</div>\r
-                       \r
-                       <div id="widget-boarder" class="content" gridster="dashboard.gridsterWidgetOpts">\r
-                               <ul>\r
-                                       <li gridster-item="widget" ng-repeat="widget in widgetsViewData">\r
-                                               <div class="box">\r
-                                                       <div class="box-header">\r
-                                                       <i style="cursor:move;" class="icon-content-gridguide"></i>\r
-                                                               <h3>{{ widget.headerText}}</h3>\r
-                                                               <div class="box-header-btns pull-right"\r
-                                                                       ng-if="isAdminPortalAdmin == true" class="ng-scope">\r
-                                                                               <a id="widgetHeaderBtns"\r
-                                                                                       class="widgetHeaderBtn widgetHeaderBtnPosition singleBtnBorder"\r
-                                                                                       ng-class="singleBtnBorder" alt="Settings"\r
-                                                                                       ng-mousedown="showImpResOption=!showImpResOption"\r
-                                                                                       ng-mouseleave="showImpResOption=false" title="Settings"\r
-                                                                                       ddh-accessibility-click="13,32" tabindex="0"><span\r
-                                                                                       style="color: #888;"><img\r
-                                                                                       ng-src="assets/images/generic.png"\r
-                                                                                       style="margin-bottom: 3px; margin-left: 3px;" alt="..."\r
-                                                                                       aria-label="Tap or Click to move"\r
-                                                                                       src="assets/images/generic.png"></span></a>\r
-\r
-                                                                               <ul class="optionsMenu"\r
-                                                                                       style="display: block"\r
-                                                                                       ng-show="showImpResOption"\r
-                                                                                       ng-mouseenter="showImpResOption=true"\r
-                                                                                       ng-mouseleave="showImpResOption=false">\r
-                                                                                       <!-- ngIf: widget.duplicateAllowed -->\r
-                                                                                       <li ng-show="widget.widgetIdentifier != ''"\r
-                                                                                               ng-click="editWidgetModalPopup(importResData, widget.widgetIdentifier);">\r
-                                                                                               <a class="optionsMenuLink" href="javascript:void(0)"\r
-                                                                                               ddh-accessibility-click="13,32">Edit</a>\r
-                                                                                       </li>\r
-                                                                                       \r
-                                                                                       <li\r
-                                                                                               ng-click="editWidgetParameters(widget.widgetid);">\r
-                                                                                               <a class="optionsMenuLink" href="javascript:void(0)"\r
-                                                                                               ddh-accessibility-click="13,32">Parameters</a>\r
-                                                                                       </li>\r
-                                                                                       \r
-                                                                                       <!-- end ngIf: widget.duplicateAllowed  -->\r
-                                                                               </ul>\r
-\r
-                                                               </div>\r
-                                                       </div>\r
-                                                       <div class="box-content">\r
-                                                       <div  dyn-attr="widget.attrb"></div>\r
-                                                       </div>\r
-                                               </div>\r
-                                       </li>\r
-                               </ul>\r
-                       </div>\r
-                       <div></div>\r
-                       <div class="gridster-container override_background">\r
-                               <div id="dashboardAddWidgetPreference"\r
-                                       ng-style="{'cursor':'pointer'}"\r
-                                       ng-click="dashboard.goToWidgetCatLog()">\r
-                                       <i class="icon-controls-add-maximize"></i> Add Widget\r
-                               </div>\r
-                               &nbsp;\r
-                               <div id="dashboardDefaultPreference" ng-style="{'cursor':'pointer'}"\r
-                                       ng-click="restoreSortSelected()">\r
-                                       <i class="icon-arrows-replay-restart"></i> Reset Widget Layout\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-dashboard-home" id="widgets">
+       <div class="dashboard-home-container" id="page-content">
+               <div align="center" id="errorInfo"
+                       style="display: none; font-size: 12px; margin-left: 5px">
+                       <span style="color: red">You don't have a user account in that
+                               application. Please ask the system administrator. </span>
+               </div>
+               <div class="portals-list" style="margin-bottom: 0px;">
+                       <div>
+                               <div class="simulateGridHeader">
+                                       <span class="simulateGridHeaderTitle">Applications <span
+                                               class="dashboardSortHeader">Sort by:</span>
+                                               
+                                               <div id="dashboard-dropdown">
+                                               <select id="sort-by-{{selectedSortType.value}}" name="dropdown1" b2b-dropdown  ng-model="selectedSortType.value" ng-change="selectedSortTypeChanged(selectedSortType.value)">  
+                                       <option b2b-dropdown-list option-repeat="d in sort_options" value="{{d.value}}">{{d.title}}</option>
+                                               </select>
+                                               </div>
+                                               </span>
+                                               
+                               </div>
+                               <div class="dashboard-boarder">
+                                       <div class="gridster-container override_background">
+                                               <div ng-if="appsViewData.length==0">
+                                                       <div class="app-error-block">
+                                                               <i class="icon-information full-linear-icon-information"
+                                                                       style="margin-left: 50%; font-size: 90px; color: black"></i> <br>
+                                                               <div class="activity-error-msg1">
+                                                                       You do not have access to any application or function in ECOMP
+                                                                       Portal.
+                                                                       <div ng-include src="'app/views/dashboard/dashboard-extension.tpl.html'"></div>
+                                                               </div>
+                                                       </div>
+                                               </div>
+
+                                               <div ng-if="appsViewData.length>0" id="page-content"
+                                                       class="content" gridster="dashboard.gridsterAppOpts">
+                                                       <ul>
+                                                               <li gridster-item="item" ng-repeat="item in appsViewData">
+                                                                       <div class="gridster-box" ng-if="item.addRemoveApps == null">
+                                                                               <div class="gridster-box-header">
+                                                                                       <i id="gridster-{{item.headerText.split(' ').join('-')}}-icon" class="icon-content-gridguide"></i>
+                                                                                       <h3 style="cursor: context-menu">{{item.headerText |
+                                                                                               elipsis: 14}}</h3>
+                                                                               </div>
+                                                                               <div class="gridster-box-content"
+                                                                               id="gridster-{{item.headerText.split(' ').join('-')}}-icon-link"
+                                                                                       ng-style="{'cursor':'pointer',
+                                                                                       'background-image': 'url('+(item.imageLink)+')',
+                                                                                       'background-color':'white',
+                                                                                       'background-repeat': 'no-repeat',
+                                                                                       'background-size': '170px 130px'}"
+                                                                                       ng-click="dashboard.goToPortal(item);dashboard.auditLog(item)"
+                                                                                       ng-hide="users.isLoadingTable && !users.getUserAppsIsDone">
+                                                                               </div>
+                                                                       </div>
+                                                                       <div class="gridster-box" ng-if="item.addRemoveApps">
+                                                                               <div class="gridster-box-header" style="cursor: pointer;"
+                                                                                       ng-click="dashboard.goToCatalog()">
+                                                                                       <i class="icon-content-gridguide"></i>
+                                                                                       <h3>Select applications...</h3>
+
+                                                                               </div>
+                                                                               <div class="gridster-box-content"
+                                                                               id="gridster-personalize"
+                                                                                       ng-style="{'cursor':'pointer',
+                                                                               'order': item.order, 
+                                                                               'text-align': 'center',
+                                                                               'background-color':'white',
+                                                                               'background-repeat': 'no-repeat',
+                                                                               'background-size': '170px 130px',
+                                                                               'padding': '4px',
+                                                                               'opacity': '1'}"
+                                                                                       ng-click="dashboard.goToCatalog()" class="gridsterContent">
+                                                                                       <label id="add-icon-label"  style="font-size: 12px;">Click
+                                                                                               here to personalize <br> this applications page
+                                                                                       </label> <i  id="add-icon" class="icon-controls-add-maximize"
+                                                                                               style="font-size: 80px; color: #067ab4"></i>
+                                                                               </div>
+                                                                       </div>
+                                                               </li>
+                                                       </ul>
+                                               </div>
+
+                                       </div>
+
+                               </div>
+                       </div>
+
+                       <br> <br>
+
+
+                       <div 
+                               ng-show=dashboard.isCommError>Failed to communicate with the
+                               widget microservice.</div>
+                       
+                       <div id="widget-boarder" class="content" gridster="dashboard.gridsterWidgetOpts">
+                               <ul>
+                                       <li gridster-item="widget" ng-repeat="widget in widgetsViewData">
+                                               <div class="box">
+                                                       <div class="box-header">
+                                                       <i id="widget-gridster-{{widget.headerText.split(' ').join('-')}}-icon" style="cursor:move;" class="icon-content-gridguide"></i>
+                                                               <h3>{{ widget.headerText}}</h3>
+                                                               <div class="box-header-btns pull-right"
+                                                                       ng-if="isAdminPortalAdmin == true" class="ng-scope">
+                                                                               <a id="widgetHeaderBtns"
+                                                                                       class="widgetHeaderBtn widgetHeaderBtnPosition singleBtnBorder"
+                                                                                       ng-class="singleBtnBorder" alt="Settings"
+                                                                                       ng-mousedown="showImpResOption=!showImpResOption"
+                                                                                       ng-mouseleave="showImpResOption=false" title="Settings"
+                                                                                       ddh-accessibility-click="13,32" tabindex="0"><span
+                                                                                       style="color: #888;"><img
+                                                                                       ng-src="assets/images/generic.png"
+                                                                                       style="margin-bottom: 3px; margin-left: 3px;" alt="..."
+                                                                                       aria-label="Tap or Click to move"
+                                                                                       src="assets/images/generic.png"></span></a>
+
+                                                                               <ul class="optionsMenu"
+                                                                                       style="display: block"
+                                                                                       ng-show="showImpResOption"
+                                                                                       ng-mouseenter="showImpResOption=true"
+                                                                                       ng-mouseleave="showImpResOption=false">
+                                                                                       <!-- ngIf: widget.duplicateAllowed -->
+                                                                                       <li ng-show="widget.widgetIdentifier != ''"
+                                                                                               ng-click="editWidgetModalPopup(importResData, widget.widgetIdentifier);">
+                                                                                               <a id="edit-widget-popup" class="optionsMenuLink" href="javascript:void(0)"
+                                                                                               ddh-accessibility-click="13,32">Edit</a>
+                                                                                       </li>
+                                                                                       
+                                                                                       <li
+                                                                                               ng-click="editWidgetParameters(widget.widgetid);">
+                                                                                               <a id="parameters-widget-popup" class="optionsMenuLink" href="javascript:void(0)"
+                                                                                               ddh-accessibility-click="13,32">Parameters</a>
+                                                                                       </li>
+                                                                                       
+                                                                                       <!-- end ngIf: widget.duplicateAllowed  -->
+                                                                               </ul>
+
+                                                               </div>
+                                                       </div>
+                                                       <div class="box-content">
+                                                       <div  dyn-attr="widget.attrb"></div>
+                                                       </div>
+                                               </div>
+                                       </li>
+                               </ul>
+                       </div>
+                       <div></div>
+                       <div class="gridster-container override_background">
+                               <div id="dashboardAddWidgetPreference"
+                                       ng-style="{'cursor':'pointer'}"
+                                       ng-click="dashboard.goToWidgetCatLog()">
+                                       <i class="icon-controls-add-maximize"></i> Add Widget
+                               </div>
+                               &nbsp;
+                               <div id="dashboardDefaultPreference" ng-style="{'cursor':'pointer'}"
+                                       ng-click="restoreSortSelected()">
+                                       <i class="icon-arrows-replay-restart"></i> Reset Widget Layout
+                               </div>
+                       </div>
+               </div>
+
+       </div>
+</div>
diff --git a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js
new file mode 100644 (file)
index 0000000..69fe6e4
--- /dev/null
@@ -0,0 +1,400 @@
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+(function () {
+    class MenuDetailsModalCtrl {
+        constructor($scope, $log, functionalMenuService, errorMessageByCode, ECOMP_URL_REGEX,$rootScope,confirmBoxService) {
+
+               $scope.isAllApplications = false;
+            let newMenuModel = {
+                name: null,
+                menuId: null,
+                parentMenuId: null,
+                url: null
+            };
+
+            let getAvailableRoles = (appid) => {
+                this.isSaving = true;
+                if (appid != null) {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: About to call getManagedRolesMenu");
+                    functionalMenuService.getManagedRolesMenu(appid).then(rolesObj => {
+                        $log.debug("MenuDetailsModalCtrl::getAvailableRoles: Roles returned = " + JSON.stringify(rolesObj))
+                        this.availableRoles = rolesObj;
+                        this.preSelectedRoles = {roles:[]};
+
+                        if(($scope.ngDialogData.source==='edit') && this.isMidLevelMenuItem()){
+                            // in Edit flow , for Midlevel menu item no need to preSelect.
+                            this.preSelectedRoles = {roles:[]};
+                        }else if(!angular.isUndefined(this.menuItem.menuDetails) &&
+                            $scope.ngDialogData.source==='edit' && this.isLeafMenuItem() &&
+                            this.menuItem.menuDetails.appid!=appid) {
+                            // in Edit flow , for LeafMenuItem, if appid changed then no need to preSelect.
+                            this.preSelectedRoles = {roles:[]};
+                        }else{
+                            if((!angular.isUndefined(this.menuItem.menuDetails)) &&
+                                (!angular.isUndefined(this.menuItem.menuDetails.roles))){
+                                    $log.debug('menuDetails.roles: ' + this.menuItem.menuDetails.roles);
+                                    for(var i=0; i<this.menuItem.menuDetails.roles.length; i++){
+                                        var role = {"roleId":this.menuItem.menuDetails.roles[i]};
+                                        $log.debug('MenuDetailsModalCtrl::getAvailableRoles: adding role to preselected: ' + i + ': ' + JSON.stringify(role));
+                                        this.preSelectedRoles.roles.push(role);
+                                    }
+                            }
+                        }
+                        $rootScope.$broadcast('availableRolesReady');
+                        this.isSaving = false;
+                    }).catch(err => {
+                        $log.error("MenuDetailsModalCtrl::getAvailableRoles: error: " + err);
+                    });
+                } else {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: appid was null");
+                }
+            };
+
+            let getAvailableApps = () => {
+               $scope.isAllApplications = true;
+                functionalMenuService.getAvailableApplications().then(apps => {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableApps: Apps returned = " + JSON.stringify(apps))
+                    this.availableApps = apps;
+                    // Keep track of whether or not the selected app is disabled
+                    if (angular.isDefined(this.selectedApp) && angular.isDefined(this.selectedApp.index)) {
+                        for (var i = 0; i < apps.length; i++) {
+                            if (apps[i].index === this.selectedApp.index) {
+                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: found app with index: " + this.selectedApp.index);
+                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: setting isDisabled to: " + !apps[i].enabled);
+                                this.selectedApp.isDisabled = !apps[i].enabled;
+                                break;
+                            }
+                        }
+                        $log.debug("didn't find index: " + this.selectedApp.index);
+                    }
+                })['catch'](function (err) {
+                    confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
+                        'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                    $log.error("MenuDetailsModalCtrl::getAvailableApps: getAvailableApps error: " + err);
+                    $scope.isAllApplications = false;
+                }).finally(()=>{
+                    this.isSaving = false;
+                    $scope.isAllApplications = false;
+                });
+            };
+
+            let init = () => {
+               $scope.isAllApplications = false;
+                $log.info('MenuDetailsModalCtrl::init');
+                this.saveOrContinueBtnText = "Save";
+                this.isSaving = false;
+                this.displayRoles = $scope.ngDialogData.source==='view' ? true : false;
+                this.formEditable = $scope.ngDialogData.source==='view' ? false : true;
+                this.selectedRole = [];
+                this.availableRoles = [];
+                this.menuItem = _.clone($scope.ngDialogData.menuItem);
+                $log.info('MenuDetailsModalCtrl::getAvailableApps: Within init, about to check menuDetails for defined');
+                if(!angular.isUndefined(this.menuItem.menuDetails) &&
+                    ($scope.ngDialogData.source==='view' ||
+                    ($scope.ngDialogData.source==='edit') && this.isLeafMenuItem() )){
+
+                    $log.debug("MenuDetailsModalCtrl::init: menuItem: ");
+                    $log.debug('MenuDetailsModalCtrl::init: ',this.menuItem);
+                    this.menuItem.menu.url = this.menuItem.menuDetails.url;
+                    this.selectedApp={};
+                    this.selectedApp.index = this.menuItem.menuDetails.appid;
+                    getAvailableRoles(this.selectedApp.index);
+
+                }
+
+                if($scope.ngDialogData.source==='view' || $scope.ngDialogData.source==='edit'){
+                    this.menutitle = this.menuItem.menu.name;
+                    this.menuLocation = this.isParentMenuItem() ? this.menuItem.menu.name : this.menuItem.menu.parent.name;
+                }else{
+                    this.menutitle = '';
+                    this.menuLocation = this.menuItem.menu.name;
+                }
+                // Temporarily passing 0 as dummy for getAvailableRoles incase of this.selectedApp is not there i.e., in Add flow
+                //  getAvailableRoles(angular.isUndefined(this.selectedApp) ? 0: this.selectedApp.index );
+                getAvailableApps();
+                $log.debug("MenuDetailsModalCtrl::init: Menu details: " +  JSON.stringify(this.menuItem.menuDetails));
+            };
+
+
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+
+            //This part handles conflict errors (409)
+            this.conflictMessages = {};
+            this.scrollApi = {};
+            let handleConflictErrors = err => {
+                if(!err.data){
+                    return;
+                }
+                if(!err.data.length){ //support objects
+                    err.data = [err.data]
+                }
+                $log.debug('MenuDetailsModalCtrl::handleConflictErrors: err.data = ' + JSON.stringify(err.data));
+                _.forEach(err.data, item => {
+                    _.forEach(item.fields, field => {
+                        //set conflict message
+                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];
+                        //set field as invalid
+                        $log.debug('MenuDetailsModalCtrl::handleConflictErrors: fieldName = ' + field.name);
+                        $scope.functionalMenuForm[field.name].$setValidity('conflict', false);
+                        //set watch once to clear error after user correction
+                        watchOnce[field.name]();
+                    });
+                });
+                this.scrollApi.scrollTop();
+            };
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                $log.debug('MenuDetailsModalCtrl::resetConflict: $setValidity(true) = ' + fieldName);
+                if($scope.functionalMenuForm[fieldName]){
+                    $scope.functionalMenuForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+
+            let watchOnce = {
+                text: () => {
+                    let unregisterName = $scope.$watch('functionalMenuDetails.menutitle', (newVal, oldVal) => {
+                        // $log.debug('title:: newVal, oldVal = ' + newVal.toLowerCase() + " | " + oldVal.toLowerCase());
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){
+                            resetConflict('text');
+                            unregisterName();
+                        }
+                    });
+                },
+                url: () => {
+                    let unregisterUrl = $scope.$watch('functionalMenuDetails.menuItem.menu.url', (newVal, oldVal) => {
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){
+                            resetConflict('url');
+                            unregisterUrl();
+                        }
+                    });
+                }
+            };
+
+            //***************************
+
+            this.isLeafMenuItem = () => {
+                return this.menuItem.menu.children.length>0 ? false : true;
+            };
+
+            this.isMidLevelMenuItem = () => {
+                return this.menuItem.menu.parentMenuId!=null && this.menuItem.menu.children.length>0 ? true : false;
+            };
+
+            this.isParentMenuItem = () => {
+                return this.menuItem.menu.parentMenuId!=null ? false : true;
+            };
+
+            this.updateSelectedApp = (appItem) => {
+                if (!appItem) {
+                    return;
+                }
+                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: drop down app item = ' + JSON.stringify(appItem.index));
+                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: appItem in updateSelectedApp: ");
+                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: ',appItem);
+                this.selectedApp.isDisabled = ! appItem.enabled;
+                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: isDisabled: "+this.selectedApp.isDisabled);
+                getAvailableRoles(appItem.index);
+            };
+
+            this.continue = () => {
+                this.displayRoles = true;
+                this.formEditable = false;
+            };
+
+            this.saveChanges = () => {
+
+                //todo : form validation was commented as dialog message is kept for error validations
+                /*if($scope.functionalMenuForm.$invalid){
+                 return;
+                 }*/
+
+                if(!!this.menuItem.menu.url && (angular.isUndefined(this.selectedApp) || !this.selectedApp.index>0)) {
+                    confirmBoxService.showInformation('Please select the appropriate app, or remove the url').then(isConfirmed => {});
+                    return;
+                }else if(!this.menuItem.menu.url && !angular.isUndefined(this.selectedApp) && this.selectedApp.index>0){
+                    confirmBoxService.showInformation('Please enter url, or select "No Application"').then(isConfirmed => {});
+                    return;
+                }else if(!this.menutitle){
+                    confirmBoxService.showInformation('Please enter the Menu title').then(isConfirmed => {});
+                    return;
+                }
+
+                this.isSaving = true;
+                var activeMenuItem = {};
+
+                if ($scope.ngDialogData.source === 'edit') {     // Edit Menu Item
+                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving an edit menu item');
+                    activeMenuItem = {
+                        menuId:this.menuItem.menu.menuId,
+                        column:this.menuItem.menu.column,
+                        text:this.menutitle,
+                        parentMenuId:this.menuItem.menu.parentMenuId,
+                        url:this.menuItem.menu.url,
+                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,
+                        roles:this.selectedRole
+                    };
+                    // If we have removed the url and appid, we must remove the roles
+                    if (!activeMenuItem.appid && !activeMenuItem.url) {
+                        activeMenuItem.roles = null;
+                    }
+                    functionalMenuService.saveEditedMenuItem(activeMenuItem)
+                        .then(() => {
+                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');
+                            $scope.closeThisDialog(true);
+                        }).catch(err => {
+                        if(err.status === 409){//Conflict
+                            handleConflictErrors(err);
+                        } else {
+                            confirmBoxService.showInformation('There was a problem saving your change. ' +
+                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                        }
+                        $log.error('MenuDetailsModalCtrl::saveChanges: error - ',err);
+                    }).finally(()=>{
+                        this.isSaving = false;
+                    });
+
+                    $log.debug("MenuDetailsModalCtrl::saveChanges: Edit Menu output will be: " + JSON.stringify(activeMenuItem));
+                } else {   // New Menu Item
+                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving a New menu item');
+                    var newMenuItem = {
+                        menuId:null, // this is a new menu item
+                        column:this.menuItem.menu.column,
+                        text:this.menutitle,
+                        // We are creating this new menu item under the menu item that was clicked on.
+                        parentMenuId:this.menuItem.menu.menuId,
+                        url:this.menuItem.menu.url,
+                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,
+                        roles:this.selectedRole
+                    };
+
+                    $log.debug("MenuDetailsModalCtrl::saveChanges:  New Menu output will be: " + JSON.stringify(newMenuItem));
+                    functionalMenuService.saveMenuItem(newMenuItem)
+                        .then(() => {
+                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');
+                            $scope.closeThisDialog(true);
+                        }).catch(err => {
+                        if(err.status === 409){//Conflict
+                            handleConflictErrors(err);
+                        } else {
+                            confirmBoxService.showInformation('There was a problem saving your menu. ' +
+                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                        }
+                        $log.error('MenuDetailsModalCtrl::saveChanges error: ', err);
+                    }).finally(()=>{
+                        this.isSaving = false;
+                    });
+
+                }
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                e.preventDefault();
+            });
+        }
+    }
+    MenuDetailsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'errorMessageByCode', 'ECOMP_URL_REGEX','$rootScope','confirmBoxService'];
+    angular.module('ecompApp').controller('MenuDetailsModalCtrl', MenuDetailsModalCtrl);
+
+    angular.module('ecompApp').directive('dropdownMultiselect', ['functionalMenuService',function(){
+        return {
+            restrict: 'E',
+            scope: {
+                model: '=',
+                options: '=',
+                populated_roles: '=preSelected',
+                dropdownTitle: '@',
+                source: '='
+            },
+            template: "<div class='btn-group' data-ng-class='{open: open}'>" +
+            "<button class='btn btn-medium'>{{dropdownTitle}}</button>" +
+            "<button class='btn dropdown-toggle' data-ng-click='open=!open;openDropDown()'><span class='caret'></span></button>" +
+            "<ul class='dropdown-menu dropdown-menu-medium' aria-labelledby='dropdownMenu'>" +
+            "<li data-ng-repeat='option in options'> <input ng-disabled='setDisable(source)'  type='checkbox' data-ng-change='setSelectedItem(option.roleId)' ng-model='selectedItems[option.roleId]'>{{option.rolename}}</li>" +
+            "</ul>" +
+            "</div>",
+            controller: function ($scope) {
+                $scope.selectedItems = {};
+                $scope.checkAll = false;
+                $scope.$on('availableRolesReady', function() {
+                    init();
+                });
+
+                function init() {
+                    console.log('dropdownMultiselect init');
+                    $scope.dropdownTitle = $scope.source ==='view' ? 'View Roles' : 'Select Roles';
+                    console.log('$scope.populated_roles = ' + $scope.populated_roles);
+                }
+
+                $scope.$watch('populated_roles', function(){
+                    if ($scope.populated_roles && $scope.populated_roles.length>0) {
+                        for (var i = 0; i < $scope.populated_roles.length; i++) {
+                            $scope.model.push($scope.populated_roles[i].roleId);
+                            $scope.selectedItems[$scope.populated_roles[i].roleId] = true;
+                        }
+                        if ($scope.populated_roles.length === $scope.options.length) {
+                            $scope.checkAll = true;
+                        }
+                    }else{
+                        deselectAll();
+                    }
+                });
+
+                $scope.openDropDown = function () {
+
+                };
+
+                $scope.checkAllClicked = function () {
+                    if ($scope.checkAll) {
+                        selectAll();
+                    } else {
+                        deselectAll();
+                    }
+                };
+
+                function selectAll() {
+                    $scope.model = [];
+                    $scope.selectedItems = {};
+                    angular.forEach($scope.options, function (option) {
+                        $scope.model.push(option.roleId);
+                    });
+                    angular.forEach($scope.model, function (id) {
+                        $scope.selectedItems[id] = true;
+                    });
+                    console.log($scope.model);
+                };
+
+                function deselectAll() {
+                    $scope.model = [];
+                    $scope.selectedItems = {};
+                    console.log($scope.model);
+                };
+
+                $scope.setSelectedItem = function (id) {
+                    var filteredArray = [];
+                    if ($scope.selectedItems[id] === true) {
+                        $scope.model.push(id);
+                    } else {
+                        filteredArray = $scope.model.filter(function (value) {
+                            return value != id;
+                        });
+                        $scope.model = filteredArray;
+                        $scope.checkAll = false;
+                    }
+                    console.log(filteredArray);
+                    return false;
+                };
+
+                $scope.setDisable = function(source){
+                    return source ==='view' ? true : false;
+                }
+            }
+        }
+    }]);
+
+})();
\ No newline at end of file
diff --git a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.delete.modal.html b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.delete.modal.html
new file mode 100644 (file)
index 0000000..e80a026
--- /dev/null
@@ -0,0 +1,18 @@
+<div class="functionalMenu-details-modal">
+    <div id="title" class="title">Delete Menu Item</div>
+
+    <div id="functionalMenu-main" class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">
+        <form name="functionalMenuForm" novalidate>
+
+            <div class="confirmation-message-wrap">
+                <div class="confirmation-message" ng-bind="confirmBox.message"></div>
+            </div>
+        </form>
+    </div>
+    <div class="dialog-control">
+        <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>
+        <div id='menu-details-next-button' class="next-button"
+             ng-class="{disabled: functionalMenuForm.$invalid}" ng-click="functionalMenuDetails.saveChanges()">Delete</div>
+        <div id='menu-details-cancel-button' class="cancel-button" ng-click="closeThisDialog()">Cancel</div>
+    </div>
+</div>
\ No newline at end of file
diff --git a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html
new file mode 100644 (file)
index 0000000..7ba444e
--- /dev/null
@@ -0,0 +1,97 @@
+<div class="functionalMenu-details-modal">
+    <div class="title">{{ngDialogData.title}}</div>
+
+
+    <div class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">
+        <form name="functionalMenuForm">
+
+            <div class="span6" >
+                                       <div class="item-label">Parent</div>
+                                       <input id="input-parent" ddh-reset class="functionalMenu-height"
+                                                ng-model="functionalMenuDetails.menuLocation"
+                                               type="text"     name="menuItem"  readonly="readonly"  />
+                       </div>
+                               
+            <div class="span6" >
+                <div class="item-label">Title</div>
+                <input id="input-title" ddh-reset ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="Enter text"class="functionalMenu-height" ng-model="functionalMenuDetails.menutitle" type="text" name="text"/>
+                <div id="div-error-conflict" class="error-container" ng-show="functionalMenuDetails.conflictMessages.text">
+                    <small id="msg-error-conflict" id="functionalMenuDetails-input-title-conflict" class="err-message" ng-bind="functionalMenuDetails.conflictMessages.text"></small>
+                </div>
+            </div>
+            
+            
+              <div class="span6">
+                <div class="left-item">
+                   <div class="item-label">URL</div>
+                    <input id="input-url" ddh-reset ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " class="functionalMenu-height" placeholder="http://" class="input-field" ng-model="functionalMenuDetails.menuItem.menu.url" type="url" name="url"/>
+                                       <div id="error-url-conflict" ng-show="functionalMenuForm.url.$error.url">
+                                       <small class="err-message"      style="color: Red; font-size: 11px;">Not valid URL!</small>
+                               </div>                
+                               </div>
+                </div>
+                 <div class="right-item">
+                    <div class="item-label">App</div>
+                    <div class="custom-select-wraps" ng-readonly="checked">
+                                               <div id='ecomp-small-spinner' class="ecomp-small-spinner"
+                                                                                       ng-if="isAllApplications"></div>
+                                               <div ng-if="!isAllApplications">
+                                            <select id="select-app" class="select-field"
+                                ng-model="functionalMenuDetails.selectedApp"
+                                ng-change="functionalMenuDetails.updateSelectedApp(functionalMenuDetails.selectedApp);"
+                                ng-options="app.title for app in functionalMenuDetails.availableApps track by app.index"
+                               
+                                required>
+                            <option value="" >No Application</option>
+                        </select>
+                    </div>
+                    </div>
+                    <!--<span class="err-message" ng-show="functionalMenuForm.app.$dirty && functionalMenuForm.app.$error.required"> Please select App!</span>-->
+                 <!--   <pre>{{functionalMenuDetails.menuItem | json}}</pre> -->
+                </div>
+           
+                    
+            <div class="item" ng-show="functionalMenuDetails.displayRoles==true">
+                <div class="item-label">Roles</div>
+                    <dropdown-multiselect id="dropdown-roles" dropdown-title="Select Roles" pre-selected="functionalMenuDetails.preSelectedRoles.roles"
+                                          model="functionalMenuDetails.selectedRole"
+                                          options="functionalMenuDetails.availableRoles" source="ngDialogData.source" >
+                    </dropdown-multiselect>
+            </div>
+            <div ng-show="functionalMenuDetails.selectedApp && functionalMenuDetails.selectedApp.isDisabled" class="err-message">Application is disabled</div>
+             </div>
+        </form>
+    </div>
+    <div class="dialog-control">
+        <div ng-if="ngDialogData.source!='view'">
+            <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>
+            <span ng-if="ngDialogData.source=='edit' && functionalMenuDetails.isLeafMenuItem()">
+                <button class="btn btn-alt btn-small" id="add-menu-button-save"
+                        ng-show="!functionalMenuDetails.menuItem.menu.url ||
+                        !(functionalMenuDetails.selectedApp.index>0) ||
+                        functionalMenuDetails.displayRoles"
+                        ng-disabled="!functionalMenuForm.text.$valid"
+                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
+                <button class="btn btn-alt btn-small" id="add-menu-button-continue"
+                        ng-show="!!functionalMenuDetails.menuItem.menu.url &&
+                        functionalMenuDetails.selectedApp.index>0 &&
+                        functionalMenuDetails.menutitle &&
+                        !functionalMenuDetails.displayRoles"
+                        ng-disabled="!functionalMenuForm.url.$valid" ng-click="functionalMenuDetails.continue()">Continue</button>
+            </span>
+            <span ng-if="ngDialogData.source=='add' || (ngDialogData.source=='edit' && !functionalMenuDetails.isLeafMenuItem())">
+                <button id="button-save-add"
+                        class="btn btn-alt btn-small" ng-show="!functionalMenuDetails.menuItem.menu.url || !(functionalMenuDetails.selectedApp.index>0)
+                || functionalMenuDetails.selectedRole.length>0 || !functionalMenuDetails.menutitle" ng-disabled="!functionalMenuForm.text.$valid || !functionalMenuDetails.menutitle"
+                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
+                <button id="button-save-continue" class="save-button" ng-show="!!functionalMenuDetails.menuItem.menu.url && functionalMenuDetails.selectedApp.index>0 && functionalMenuDetails.menutitle
+                && !functionalMenuDetails.selectedRole.length>0" ng-disabled="!functionalMenuForm.url.$valid"
+                        ng-click="functionalMenuDetails.continue()">Continue</button>
+            </span>
+            <button id="button-cancel-close-dialog" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
+        </div>
+        <div ng-if="ngDialogData.source=='view'">
+            <div  id="div-close-dialog"  class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</div>
+        </div>
+    </div>
+</div>
\ No newline at end of file
index 0d5e98f..ce434b4 100644 (file)
 .functionalMenu-details-modal {
-  height: 430px;
+  height: 520px;
   
-  input:not([type="button"]) {
-    height: 13px;
-       } 
-
   .title {
     //.n18r;
-    .dGray18r;  //AT&T Dark Gray
+    .dGray18r;  //ECOMP Dark Gray
     border-bottom: @blue-active 3px solid;
+ }
 
-  }
+ .span6{
+padding-top: 10px;
+ }
+ .right-item{
+ padding-top: 10px;
+ }
+ .item{
+  padding-top: 10px;
+ }
+.functionalMenu-height{
+height:35px;
+width:140%;
+
+}
+
+ select {
+    max-width: 150%;
+    width: 380px;
+               }
+.btn{
+font-family: clearview_att_regular;
+    font-size: 14px !important;
+}
+.btn-group.open .dropdown-toggle {
+    -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.125);
+    box-shadow: inset 0 0px 0px rgba(0,0,0,.125);
+}
 .btn-group {
-    display: table-cell;
-    max-width: 250px;
-  min-width: 290px;
-   background-color: #f2f2f2;
-  }
+    cursor: pointer;
+    position: relative;
+    border: 1px solid #5a5a5a;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    line-height: 30px;
+       height: 40px;
+    padding-left: 10px;
+    padding-right: 10px;
+    width: 70%;
+    min-width:50%;
+    background-color: #f2f2f2;
+    }
+    
+    .btn-group>.btn+.dropdown-toggle{
+       
+    margin-left: 80px;
+    padding-top: 10px;
+    }
   .btn-medium{
     width:168px;
+    margin-right: 86px;
   }
-  
-
+   .caret {
+    margin-left: 75px;
+}
+.custom-select-wrap {
+    width: 86%;
+   }
+   .custom-select-wrap::after {
+       right: 101px;
+   }
     
   .dropdown-menu-medium{
-    width:236px;
-    max-height: 200px;
+    max-height: 123px;
     overflow-y: auto;
+    z-index: 99999;
+    padding-left: 8px;
+    padding-right: 8px;
+    position: absolute;
+    top: 39px;
+    width: 100%;
+    background: #fff;
+    border: 1px #d2d2d2 solid;
+    left: 0px;
   }
 
   .functionalMenu-properties-main {
     padding: 16px;
     height: 306px;
     overflow-y: visible;
+    input[type=checkbox][disabled]{
+    height:13px;
+    }
+       input[type=checkbox] {
+           height: 13px !important;
+       }
 
     .item{
       position: relative;
index 961362a..33cb845 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-       class HeaderCtrl {\r
-        constructor($log, $window, userProfileService, menusService, $scope, ECOMP_URL_REGEX, $cookies, $state,auditLogService,notificationService) {\r
-            this.firstName = '';\r
-            this.lastName = '';\r
-            this.$log = $log;\r
-            this.menusService = menusService;\r
-            this.$scope = $scope;\r
-            this.favoritesMenuItems = '';\r
-            $scope.favoriteItemsCount = 0;\r
-            $scope.favoritesMenuItems = '';\r
-            $scope.showFavorites = false;\r
-            $scope.emptyFavorites = false;\r
-            $scope.favoritesWindow = false;\r
-            $scope.notificationCount=0;\r
-            $scope.showNotification = true;\r
-\r
-            $scope.hideMenus = false;\r
-\r
-            $scope.menuItems = [];\r
-            $scope.activeClickSubMenu = {\r
-                x: ''\r
-            }; \r
-            $scope.activeClickMenu = {\r
-                x: ''\r
-            };\r
-            $scope.megaMenuDataObject =[];\r
-            $scope.notificationCount= notificationService.notificationCount;\r
-            this.isLoading = true;\r
-            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;\r
-            \r
-            var unflatten = function( array, parent, tree ){\r
-            \r
-                tree = typeof tree !== 'undefined' ? tree : [];\r
-                parent = typeof parent !== 'undefined' ? parent : { menuId: null };\r
-                var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });\r
-                \r
-                if( !_.isEmpty( children )  ){\r
-                  if( parent.menuId === null ){\r
-                    tree = children;\r
-                  }else{\r
-                    parent['children'] = children\r
-                  }\r
-                  _.each( children, function( child ){ unflatten( array, child ) } );\r
-                }\r
-            \r
-                return tree;\r
-            }\r
-            \r
-            userProfileService.getFunctionalMenuStaticInfo()\r
-            .then(res=> {\r
-               // $log.debug('HeaderCtrl::getFunctionalMenuStaticInfo: getting Functional Menu Static Info init');\r
-               if(res==null || res.firstName==null || res.firstName=='' || res.lastName==null || res.lastName=='' ){\r
-                       // $log.info('HeaderCtrl::getFunctionalMenuStaticInfo: failed getting userinfo from shared context.. ');\r
-                       $log.info('HeaderCtrl: failed to get all required data, trying user profile');\r
-                       userProfileService.getUserProfile()\r
-                    .then(profile=> {\r
-                       // $log.debug('HeaderCtrl:: getting userinfo from session success');\r
-                        this.firstName = profile.firstName;\r
-                        this.lastName = profile.lastName;                     \r
-                        // $log.debug('HeaderCtrl::getFunctionalMenuStaticInfo: user has the following roles: ' + profile.roles);\r
-                    }).catch(err=> {\r
-                        $log.error('Header Controller:: getUserProfile() failed: ' + err);\r
-                    });\r
-               } else {\r
-                       // $log.debug('HeaderCtrl: fetched Functional Menu Static Info successfully',res);\r
-                       this.firstName = res.firstName;\r
-                       this.lastName = res.lastName;                                     \r
-               }\r
-\r
-               menusService.GetFunctionalMenuForUser()\r
-               .then(jsonHeaderMenu=> {\r
-                       $scope.menuItems = unflatten( jsonHeaderMenu );\r
-                       $scope.megaMenuDataObject = $scope.menuItems;\r
-               }).catch(err=> {\r
-                       $log.error('HeaderCtrl::GetFunctionalMenuForUser: HeaderCtrl json returned: ' + err);\r
-               });      \r
-               \r
-            }).catch(err=> {\r
-               $log.error('HeaderCtrl::getFunctionalMenuStaticInfo failed: ' + err);\r
-            });\r
-            \r
-          //store audit log\r
-            $scope.auditLog = function(app,type) {\r
-               var comment = 'type: '+type+ ',title: '+app.text+",url: "+app.url;\r
-                       auditLogService.storeAudit(app.appid,'functional',comment);\r
-               };\r
-\r
-            $scope.loadFavorites = function () {\r
-                $scope.hideMenus = false;\r
-                // $log.debug('HeaderCtrl::loadFavorites: loadFavorites has happened.');\r
-                if ($scope.favoritesMenuItems == '') {\r
-                    generateFavoriteItems();\r
-                    // $log.debug('HeaderCtrl::loadFavorites: loadFavorites is calling generateFavoriteItems()');\r
-                } else {\r
-                    // $log.debug('HeaderCtrl::loadFavorites: loadFavorites is NOT calling generateFavoriteItems()');\r
-                }\r
-            }\r
-\r
-            $scope.goToUrl = (item) =>  {\r
-               //  $log.error('HeaderCtrl::goToUrl has started',item);\r
-                let url = item.url;\r
-                let restrictedApp = item.restrictedApp;\r
-                if (!url) {\r
-                    $log.warn('HeaderCtrl::goToUrl: No url found for this application, doing nothing..');\r
-                    return;\r
-                }\r
-                if (restrictedApp) {\r
-                    $window.open(url, '_blank');\r
-                } else {\r
-                       if(item.url=="getAccess" || item.url=="contactUs"){\r
-                           // if (url = window.location.href)\r
-                               $state.go("root."+url);\r
-                       } else {\r
-                       var tabContent = { id: new Date(), title: item.text, url: item.url,appId:item.appid };\r
-                       $cookies.putObject('addTab', tabContent );\r
-                    }\r
-                    // $log.debug('HeaderCtrl::goToUrl: url = ', url);\r
-                }\r
-                $scope.hideMenus = true;\r
-            }\r
-            \r
-            \r
-            \r
-            $scope.submenuLevelAction = function(index, column) {\r
-                if ($scope.favoritesMenuItems == '') {\r
-                    generateFavoriteItems();\r
-                    // $log.debug('HeaderCtrl::submenuLevelAction: submenuLevelAction is calling generateFavoriteItems()');\r
-                } else {\r
-                    // $log.debug('submenuLevelAction is NOT calling generateFavoriteItems()');\r
-                }\r
-                // $log.debug('item hovered: ' + index + '; column = ' + column);\r
-                // if (column == 2) {  // 2 is Design\r
-                //     // This is an admitted hack. See aw3218 for reasons why\r
-                //     $log.debug('submenuLevelAction column == 2');\r
-                //     $scope.favoritesWindow = false;\r
-                //     $scope.showFavorites = false;\r
-                //     $scope.emptyFavorites = false;\r
-                // }\r
-                if (index=='Favorites' && $scope.favoriteItemsCount != 0) {\r
-                    // $log.debug('HeaderCtrl::submenuLevelAction: Showing Favorites window');\r
-                    // generateFavoriteItems();\r
-                    $scope.favoritesWindow = true;\r
-                    $scope.showFavorites = true;\r
-                    $scope.emptyFavorites = false;\r
-                }\r
-                if (index=='Favorites' && $scope.favoriteItemsCount == 0) {\r
-                    // $log.debug('HeaderCtrl::submenuLevelAction: Hiding Favorites window in favor of No Favorites Window');\r
-                    // generateFavoriteItems();\r
-                    $scope.favoritesWindow = true;\r
-                    $scope.showFavorites = false;\r
-                    $scope.emptyFavorites = true;\r
-                }\r
-                if (index!='Favorites' ) {\r
-                    $scope.favoritesWindow = false;\r
-                    $scope.showFavorites = false;\r
-                    $scope.emptyFavorites = false;\r
-                }\r
-\r
-            };\r
-            \r
-            $scope.hideFavoritesWindow = function() {\r
-                $scope.showFavorites = false;\r
-                $scope.emptyFavorites = false;\r
-                // $scope.thirdFourthMenus = true;\r
-            }\r
-            \r
-            $scope.isUrlFavorite = function (menuId) {\r
-                // $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);\r
-                var jsonMenu =  JSON.stringify($scope.favoritesMenuItems);\r
-                var isMenuFavorite =  jsonMenu.indexOf('menuId\":' + menuId);\r
-                // $log.debug('jsonMenu.indexOf(menuId:' + jsonMenu.indexOf('menuId\":'+menuId));\r
-                // $log.debug('isMenuFavorite= ' + isMenuFavorite);\r
-                if (isMenuFavorite==-1) {\r
-                    return false;\r
-                } else {\r
-                    return true;\r
-                }\r
-\r
-            }\r
-            \r
-            let generateFavoriteItems  = () => {\r
-                menusService.getFavoriteItems()\r
-                    .then(favorites=> {\r
-                        // $log.debug('HeaderCtrl.getFavoriteItems:: ' + JSON.stringify(favorites));\r
-                        $scope.favoritesMenuItems = favorites;\r
-                        $scope.favoriteItemsCount = Object.keys(favorites).length;\r
-                        // $log.info('HeaderCtrl.getFavoriteItems:: number of favorite menus: ' + $scope.favoriteItemsCount);\r
-                    }).catch(err=> {\r
-                        $log.error('HeaderCtrl.getFavoriteItems:: Error retrieving Favorites menus: ' + err);\r
-                });\r
-            }\r
-\r
-           $scope.setAsFavoriteItem =  function(event, menuId){\r
-               var jsonMenuID = angular.toJson({'menuId': + menuId });\r
-               // $log.debug('HeaderCtrl::setFavoriteItems: ' + jsonMenuID  + " - " +  event.target.id);\r
-\r
-               menusService.setFavoriteItem(jsonMenuID)\r
-               .then(() => {\r
-                   // var elementId = '#'+ event.currentTarget.id;\r
-                   angular.element('#' + event.target.id).css('color', '#fbb313');\r
-                   generateFavoriteItems();\r
-               }).catch(err=> {\r
-                   $log.error('HeaderCtrl::setFavoriteItems:: API setFavoriteItem error: ' + err);\r
-               });\r
-           };\r
-\r
-            $scope.removeAsFavoriteItem =  function(event, menuId){\r
-                // $log.debug('-----------------------------removeAsFavoriteItem: ' + menuId + " - " +  event.target.id);\r
-                menusService.removeFavoriteItem(menuId)\r
-                .then(() => {\r
-                    angular.element('#' + event.target.id).css('color', '#666666');\r
-                    generateFavoriteItems();\r
-                }).catch(err=> {\r
-                    $log.error('HeaderCtrl::removeAsFavoriteItem: API removeFavoriteItem error: ' + err);\r
-                });\r
-            };\r
-\r
-            $scope.goToPortal = (headerText, url) => {\r
-                if (!url) {\r
-                    $log.warn('HeaderCtrl::goToPortal: No url found for this application, doing nothing..');\r
-                    return;\r
-                }\r
-                if (!ECOMP_URL_REGEX.test(url)) {\r
-                    url = 'http://' + url;\r
-                }\r
-\r
-                if(headerText.startsWith("vUSP")) {\r
-                       window.open(url, '_blank');//, '_self'\r
-                }\r
-                else {\r
-                       var tabContent = { id: new Date(), title: headerText, url: url };\r
-                       $cookies.putObject('addTab', tabContent );\r
-                }\r
-            };\r
-\r
-        }\r
-    }\r
-    class LoginSnippetCtrl {\r
-        constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService) {\r
-            $scope.firstName="";\r
-            $scope.lastName="";\r
-            $scope.displayUserAppRoles=false; \r
-            $scope.allAppsLogout = function(){\r
-               \r
-               var cookieTabs = $cookies.getObject('visInVisCookieTabs');\r
-               if(cookieTabs!=null){\r
-                       for(var t in cookieTabs){\r
-                       \r
-                               var url = cookieTabs[t].content;\r
-                               if(url != "") {\r
-                                       sessionService.logout(url);\r
-                       }\r
-                       }\r
-               }\r
-               // wait for individual applications to log out before the portal logout\r
-               $timeout(function() {\r
-                       window.location = "logout.htm";\r
-               }, 2000);\r
-            }\r
-            \r
-            \r
-            try {\r
-               userProfileService.getFunctionalMenuStaticInfo()\r
-                .then(res=> {\r
-                 // $log.info('HeaderCtrl::LoginSnippetCtrl: Login information: ' + JSON.stringify(res));\r
-                 $scope.firstName = res.firstName;\r
-                 $scope.lastName = res.lastName;\r
-                 $scope.loginSnippetEmail = res.email;\r
-                 $scope.loginSnippetUserid = res.userId;\r
-                 $scope.lastLogin = res.last_login;\r
-                }).catch(err=> {\r
-                 $log.error('HeaderCtrl::LoginSnippetCtrl: failed in getFunctionalMenuStaticInfo: ' + err);\r
-                });\r
-            } catch (err) {\r
-                $log.error('HeaderCtrl::LoginSnippetCtrl caught exception: ' + err);\r
-            }\r
-            \r
-            $scope.getUserApplicationRoles= function(){\r
-                 $scope.userapproles = [];\r
-                 if($scope.displayUserAppRoles)\r
-                               $scope.displayUserAppRoles = false;\r
-                                else\r
-                                       $scope.displayUserAppRoles = true;\r
-                 \r
-                       userProfileService.getUserAppRoles($scope.loginSnippetUserid)\r
-                         .then(res=>{\r
-                               \r
-                        for(var i=0;i<res.length;i++){                                 \r
-                       var userapprole ={\r
-                               App:res[i].appName,\r
-                               Roles:res[i].roleNames, \r
-                       };\r
-                       \r
-                       $scope.userapproles.push(userapprole); \r
-                       }\r
-                        \r
-               });\r
-               \r
-          }\r
-        }        \r
-    }\r
-    class NotificationCtrl{\r
-       constructor($log, $scope, $cookies, $timeout, sessionService,notificationService,$interval,ngDialog) {\r
-                $scope.notifications=[];   \r
-                var intervalPromise = null;\r
-             $scope.notificationCount= notificationService.notificationCount;\r
-             \r
-             $scope.getNotification = function(){               \r
-                notificationService.getNotification()\r
-                 .then(res=> {\r
-                       notificationService.decrementRefreshCount();\r
-                       var count = notificationService.getRefreshCount();\r
-                       if (res==null || res.data==null || res.data.message!='success') {\r
-                               $log.error('NotificationCtrl::updateNotifications: failed to get notifications');\r
-                               if (intervalPromise != null)\r
-                                       $interval.cancel(intervalPromise);\r
-                       } else if(count<=0){\r
-                               if (intervalPromise != null)\r
-                                       $interval.cancel(intervalPromise);\r
-                       } else {\r
-                               $scope.notifications = [];\r
-                               notificationService.setNotificationCount(res.data.response.length);\r
-                               for(var i=0;i<res.data.response.length;i++){\r
-                                       var data = res.data.response[i];                                        \r
-                                       var notification ={\r
-                                               id:data.notificationId,\r
-                                               title:data.msgHeader,\r
-                                               message:data.msgDescription,\r
-                                               source:data.msgSource,\r
-                                               time:data.createdDate,\r
-                                               priority:data.priority\r
-                                       };\r
-                                       $scope.notifications.push(notification);       \r
-                                    }  \r
-                       }       \r
-                 }).catch(err=> {\r
-                       $log.error('NotificationCtrl::getNotification: caught exception: ' + err);\r
-                       if (intervalPromise != null)\r
-                               $interval.cancel(intervalPromise);\r
-                 });      \r
-             }\r
-             $scope.getNotification();\r
-             function updateNotifications() {\r
-                $scope.getNotification();\r
-             }\r
-             $scope.start = function(rate) {\r
-                               // stops any running interval to avoid two intervals running at the same time\r
-                               $scope.stop();  \r
-                               // store the interval promise\r
-                               intervalPromise = $interval(updateNotifications, rate);\r
-                        };\r
-\r
-                        $scope.stop = function() {\r
-                               $interval.cancel(intervalPromise);\r
-                        };\r
-                        \r
-                       \r
-                        $scope.showDetailedJsonMessage=function (selectedAdminNotification) {\r
-                               if (selectedAdminNotification.source!=='EP'){\r
-                                var messageObject=JSON.parse(selectedAdminNotification.message);\r
-                                var html="";\r
-                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.source+'</p>';\r
-                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.title+'</p>';\r
-                                for(var field in  messageObject){\r
-                                        if(field=='eventDate'||field=='lastModifiedDate'){\r
-                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';\r
-                                                 \r
-                                        }else{\r
-                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';\r
-                                        \r
-                                        }\r
-                                }\r
-                       \r
-                    var modalInstance = ngDialog.open({\r
-                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',\r
-                                   controller: 'userNotificationCtrl',\r
-                                   resolve: {\r
-                                       message: function () {\r
-                                               var message = {\r
-                                                          title:    '',\r
-                                               text:    html\r
-                                               \r
-                                               };\r
-                                         return message;\r
-                                       },\r
-                                    \r
-                                     }\r
-                                 }); \r
-                       \r
-                               } \r
-                        };\r
-                        \r
-                       notificationService.getNotificationRate().then(res=> {\r
-               if (res == null || res.response == null) {\r
-                       $log.error('NotificationCtrl: failed to notification update rate or duration, check system.properties file.');\r
-               } else {\r
-                       var rate = parseInt(res.response.updateRate);\r
-                                       var duration = parseInt(res.response.updateDuration);\r
-                                       notificationService.setMaxRefreshCount(parseInt(duration/rate)+1);\r
-                                       notificationService.setRefreshCount(notificationService.maxCount);\r
-                               if (rate != NaN && duration != NaN) {\r
-                                               $scope.updateRate=rate;\r
-                                               $scope.start($scope.updateRate);\r
-                               }                               \r
-               }\r
-            }).catch(err=> {\r
-               $log.error('NotificationCtrl: getNotificationRate() failed: ' + err);\r
-            });\r
-             \r
-             $scope.deleteNotification = function(index){\r
-                if ($scope.notifications[index].id == null || $scope.notifications[index].id == '') {\r
-                       $log.error('NotificationCtrl: failed to delete Notification.');\r
-                       return;\r
-                }\r
-                notificationService.setNotificationRead($scope.notifications[index].id);\r
-                $scope.notifications.splice(index,1);\r
-                notificationService.setNotificationCount($scope.notifications.length);          \r
-             }\r
-       }\r
-    }\r
-    NotificationCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout', 'sessionService','notificationService','$interval','ngDialog'];\r
-    LoginSnippetCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService'];\r
-    HeaderCtrl.$inject = ['$log', '$window', 'userProfileService', 'menusService', '$scope', 'ECOMP_URL_REGEX','$cookies','$state','auditLogService','notificationService'];\r
-    angular.module('ecompApp').controller('HeaderCtrl', HeaderCtrl);\r
-    angular.module('ecompApp').controller('loginSnippetCtrl', LoginSnippetCtrl);\r
-    angular.module('ecompApp').controller('notificationCtrl', NotificationCtrl);\r
-\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+       class HeaderCtrl {
+        constructor($log, $window, userProfileService, menusService, $scope, ECOMP_URL_REGEX, $cookies, $state,auditLogService,notificationService,recommendationService,ngDialog) {
+            this.firstName = '';
+            this.lastName = '';
+            this.$log = $log;
+            this.menusService = menusService;
+            this.$scope = $scope;
+            this.favoritesMenuItems = '';
+            $scope.favoriteItemsCount = 0;
+            $scope.favoritesMenuItems = '';
+            $scope.showFavorites = false;
+            $scope.emptyFavorites = false;
+            $scope.favoritesWindow = false;
+            $scope.notificationCount=0;
+            $scope.recommendationCount=0;
+            $scope.showNotification = true;
+
+            $scope.hideMenus = false;
+
+            $scope.menuItems = [];
+            $scope.activeClickSubMenu = {
+                x: ''
+            }; 
+            $scope.activeClickMenu = {
+                x: ''
+            };
+            $scope.megaMenuDataObject =[];
+            $scope.notificationCount= notificationService.notificationCount;
+            $scope.recommendationCount= recommendationService.recommendationCount;
+            this.isLoading = true;
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+            
+            var unflatten = function( array, parent, tree ){
+            
+                tree = typeof tree !== 'undefined' ? tree : [];
+                parent = typeof parent !== 'undefined' ? parent : { menuId: null };
+                var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
+                
+                if( !_.isEmpty( children )  ){
+                  if( parent.menuId === null ){
+                    tree = children;
+                  }else{
+                    parent['children'] = children
+                  }
+                  _.each( children, function( child ){ unflatten( array, child ) } );
+                }
+            
+                return tree;
+            }
+            
+            userProfileService.getFunctionalMenuStaticInfo()
+            .then(res=> {
+               // $log.debug('HeaderCtrl::getFunctionalMenuStaticInfo: getting Functional Menu Static Info init');
+               if(res==null || res.firstName==null || res.firstName=='' || res.lastName==null || res.lastName=='' ){
+                       // $log.info('HeaderCtrl::getFunctionalMenuStaticInfo: failed getting userinfo from shared context.. ');
+                       $log.info('HeaderCtrl: failed to get all required data, trying user profile');
+                       userProfileService.getUserProfile()
+                    .then(profile=> {
+                       // $log.debug('HeaderCtrl:: getting userinfo from session success');
+                        this.firstName = profile.firstName;
+                        this.lastName = profile.lastName;                     
+                        // $log.debug('HeaderCtrl::getFunctionalMenuStaticInfo: user has the following roles: ' + profile.roles);
+                    }).catch(err=> {
+                        $log.error('Header Controller:: getUserProfile() failed: ' + err);
+                    });
+               } else {
+                       // $log.debug('HeaderCtrl: fetched Functional Menu Static Info successfully',res);
+                       this.firstName = res.firstName;
+                       this.lastName = res.lastName;                                     
+               }
+
+               menusService.GetFunctionalMenuForUser()
+               .then(jsonHeaderMenu=> {
+                       $scope.menuItems = unflatten( jsonHeaderMenu );
+                       $scope.megaMenuDataObject = $scope.menuItems;
+               }).catch(err=> {
+                       $log.error('HeaderCtrl::GetFunctionalMenuForUser: HeaderCtrl json returned: ' + err);
+               });      
+               
+            }).catch(err=> {
+               $log.error('HeaderCtrl::getFunctionalMenuStaticInfo failed: ' + err);
+            });
+            
+          //store audit log
+            $scope.auditLog = function(app,type) {
+               var comment = 'type: '+type+ ',title: '+app.text+",url: "+app.url;
+                       auditLogService.storeAudit(app.appid,'functional',comment);
+               };
+
+            $scope.loadFavorites = function () {
+                $scope.hideMenus = false;
+                // $log.debug('HeaderCtrl::loadFavorites: loadFavorites has happened.');
+                if ($scope.favoritesMenuItems == '') {
+                    generateFavoriteItems();
+                    // $log.debug('HeaderCtrl::loadFavorites: loadFavorites is calling generateFavoriteItems()');
+                } else {
+                    // $log.debug('HeaderCtrl::loadFavorites: loadFavorites is NOT calling generateFavoriteItems()');
+                }
+            }
+
+            $scope.goToUrl = (item) =>  {
+               //  $log.error('HeaderCtrl::goToUrl has started',item);
+                let url = item.url;
+                let restrictedApp = item.restrictedApp;
+                if (!url) {
+                    $log.warn('HeaderCtrl::goToUrl: No url found for this application, doing nothing..');
+                    return;
+                }
+                if (restrictedApp) {
+                    $window.open(url, '_blank');
+                } else {
+                       if(item.url=="getAccess" || item.url=="contactUs"){
+                           // if (url = window.location.href)
+                               $state.go("root."+url);
+                       } else {
+                       var tabContent = { id: new Date(), title: item.text, url: item.url,appId:item.appid };
+                       $cookies.putObject('addTab', tabContent );
+                    }
+                    // $log.debug('HeaderCtrl::goToUrl: url = ', url);
+                }
+                $scope.hideMenus = true;
+            }
+            
+            
+            
+            $scope.submenuLevelAction = function(index, column) {
+                if ($scope.favoritesMenuItems == '') {
+                    generateFavoriteItems();
+                    // $log.debug('HeaderCtrl::submenuLevelAction: submenuLevelAction is calling generateFavoriteItems()');
+                } else {
+                    // $log.debug('submenuLevelAction is NOT calling generateFavoriteItems()');
+                }
+                // $log.debug('item hovered: ' + index + '; column = ' + column);
+                // if (column == 2) {  // 2 is Design
+                //     // This is an admitted hack. See aw3218 for reasons why
+                //     $log.debug('submenuLevelAction column == 2');
+                //     $scope.favoritesWindow = false;
+                //     $scope.showFavorites = false;
+                //     $scope.emptyFavorites = false;
+                // }
+                if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
+                    // $log.debug('HeaderCtrl::submenuLevelAction: Showing Favorites window');
+                    // generateFavoriteItems();
+                    $scope.favoritesWindow = true;
+                    $scope.showFavorites = true;
+                    $scope.emptyFavorites = false;
+                }
+                if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
+                    // $log.debug('HeaderCtrl::submenuLevelAction: Hiding Favorites window in favor of No Favorites Window');
+                    // generateFavoriteItems();
+                    $scope.favoritesWindow = true;
+                    $scope.showFavorites = false;
+                    $scope.emptyFavorites = true;
+                }
+                if (index!='Favorites' ) {
+                    $scope.favoritesWindow = false;
+                    $scope.showFavorites = false;
+                    $scope.emptyFavorites = false;
+                }
+
+            };
+            
+            $scope.hideFavoritesWindow = function() {
+                $scope.showFavorites = false;
+                $scope.emptyFavorites = false;
+                // $scope.thirdFourthMenus = true;
+            }
+            
+            $scope.isUrlFavorite = function (menuId) {
+                // $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
+                var jsonMenu =  JSON.stringify($scope.favoritesMenuItems);
+                var isMenuFavorite =  jsonMenu.indexOf('menuId\":' + menuId);
+                // $log.debug('jsonMenu.indexOf(menuId:' + jsonMenu.indexOf('menuId\":'+menuId));
+                // $log.debug('isMenuFavorite= ' + isMenuFavorite);
+                if (isMenuFavorite==-1) {
+                    return false;
+                } else {
+                    return true;
+                }
+
+            }
+            
+            /*Getting Ecomp portal Title*/
+
+            let getEcompPortalTitle  = () => {
+               menusService.getEcompPortalTitle()
+               .then(title=> {
+                       $scope.ecompTitle = title.response;
+               }).catch(err=> {
+                       $log.error('HeaderCtrl.getEcompPortalTitle:: Error retrieving ECMOP portal title: ' + err);
+               });
+            }
+            getEcompPortalTitle();
+            
+            let generateFavoriteItems  = () => {
+                menusService.getFavoriteItems()
+                    .then(favorites=> {
+                        // $log.debug('HeaderCtrl.getFavoriteItems:: ' + JSON.stringify(favorites));
+                        $scope.favoritesMenuItems = favorites;
+                        $scope.favoriteItemsCount = Object.keys(favorites).length;
+                        // $log.info('HeaderCtrl.getFavoriteItems:: number of favorite menus: ' + $scope.favoriteItemsCount);
+                    }).catch(err=> {
+                        $log.error('HeaderCtrl.getFavoriteItems:: Error retrieving Favorites menus: ' + err);
+                });
+            }
+
+           $scope.setAsFavoriteItem =  function(event, menuId){
+               var jsonMenuID = angular.toJson({'menuId': + menuId });
+               // $log.debug('HeaderCtrl::setFavoriteItems: ' + jsonMenuID  + " - " +  event.target.id);
+
+               menusService.setFavoriteItem(jsonMenuID)
+               .then(() => {
+                   // var elementId = '#'+ event.currentTarget.id;
+                   angular.element('#' + event.target.id).css('color', '#fbb313');
+                   generateFavoriteItems();
+               }).catch(err=> {
+                   $log.error('HeaderCtrl::setFavoriteItems:: API setFavoriteItem error: ' + err);
+               });
+           };
+
+            $scope.removeAsFavoriteItem =  function(event, menuId){
+                // $log.debug('-----------------------------removeAsFavoriteItem: ' + menuId + " - " +  event.target.id);
+                menusService.removeFavoriteItem(menuId)
+                .then(() => {
+                    angular.element('#' + event.target.id).css('color', '#666666');
+                    generateFavoriteItems();
+                }).catch(err=> {
+                    $log.error('HeaderCtrl::removeAsFavoriteItem: API removeFavoriteItem error: ' + err);
+                });
+            };
+
+            $scope.goToPortal = (headerText, url) => {
+                if (!url) {
+                    $log.warn('HeaderCtrl::goToPortal: No url found for this application, doing nothing..');
+                    return;
+                }
+                if (!ECOMP_URL_REGEX.test(url)) {
+                    url = 'http://' + url;
+                }
+
+                if(headerText.startsWith("vUSP")) {
+                       window.open(url, '_blank');//, '_self'
+                }
+                else {
+                       var tabContent = { id: new Date(), title: headerText, url: url };
+                       $cookies.putObject('addTab', tabContent );
+                }
+            };
+            
+            $scope.editProfile = () => {
+                let data = null;
+               
+                ngDialog.open({
+                    templateUrl: 'app/views/header/profile-edit-dialogs/profile-edit.modal.html',
+                    controller: 'EditProfileModalCtrl',
+                    controllerAs: 'profileDetail',
+                    data: ''
+                }).closePromise.then(needUpdate => {
+                    if(needUpdate.value === true){
+                        // $log.debug('AdminsCtrl:openAddNewAdminModal:: updating table data...');
+                        updateTableData();
+                    }
+                });
+            };
+        }
+    }
+    class LoginSnippetCtrl {
+        constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService) {
+            $scope.firstName="";
+            $scope.lastName="";
+            $scope.displayUserAppRoles=false; 
+            $scope.allAppsLogout = function(){
+               
+               var cookieTabs = $cookies.getObject('visInVisCookieTabs');
+               if(cookieTabs!=null){
+                       for(var t in cookieTabs){
+                       
+                               var url = cookieTabs[t].content;
+                               if(url != "") {
+                                       sessionService.logout(url);
+                       }
+                       }
+               }
+               // wait for individual applications to log out before the portal logout
+               $timeout(function() {
+                       window.location = "logout.htm";
+               }, 2000);
+            }
+            
+            
+            try {
+               userProfileService.getFunctionalMenuStaticInfo()
+                .then(res=> {
+                 // $log.info('HeaderCtrl::LoginSnippetCtrl: Login information: ' + JSON.stringify(res));
+                 $scope.firstName = res.firstName;
+                 $scope.lastName = res.lastName;
+                 $scope.loginSnippetEmail = res.email;
+                 $scope.loginSnippetUserid = res.userId;
+                 $scope.lastLogin = res.last_login;
+                }).catch(err=> {
+                 $log.error('HeaderCtrl::LoginSnippetCtrl: failed in getFunctionalMenuStaticInfo: ' + err);
+                });
+            } catch (err) {
+                $log.error('HeaderCtrl::LoginSnippetCtrl caught exception: ' + err);
+            }
+            
+            $scope.getUserApplicationRoles= function(){
+                 $scope.userapproles = [];
+                 if($scope.displayUserAppRoles)
+                               $scope.displayUserAppRoles = false;
+                                else
+                                       $scope.displayUserAppRoles = true;
+                 
+                       userProfileService.getUserAppRoles($scope.loginSnippetUserid)
+                         .then(res=>{
+                               
+                        for(var i=0;i<res.length;i++){                                 
+                       var userapprole ={
+                               App:res[i].appName,
+                               Roles:res[i].roleNames, 
+                       };
+                       
+                       $scope.userapproles.push(userapprole); 
+                       }
+                        
+               });
+               
+          }
+        }        
+    }
+    class NotificationCtrl{
+       constructor($log, $scope, $cookies, $timeout, sessionService,notificationService,$interval,ngDialog) {
+                $scope.notifications=[];   
+                var intervalPromise = null;
+             $scope.notificationCount= notificationService.notificationCount;
+             
+             $scope.getNotification = function(){               
+                notificationService.getNotification()
+                 .then(res=> {
+                       notificationService.decrementRefreshCount();
+                       var count = notificationService.getRefreshCount();
+                       if (res==null || res.data==null || res.data.message!='success') {
+                               $log.error('NotificationCtrl::updateNotifications: failed to get notifications');
+                               if (intervalPromise != null)
+                                       $interval.cancel(intervalPromise);
+                       } else if(count<=0){
+                               if (intervalPromise != null)
+                                       $interval.cancel(intervalPromise);
+                       } else {
+                               $scope.notifications = [];
+                               notificationService.setNotificationCount(res.data.response.length);
+                               for(var i=0;i<res.data.response.length;i++){
+                                       var data = res.data.response[i];                                        
+                                       var notification ={
+                                               id:data.notificationId,
+                                               title:data.msgHeader,
+                                               message:data.msgDescription,
+                                               source:data.msgSource,
+                                               time:data.createdDate,
+                                               priority:data.priority
+                                       };
+                                       $scope.notifications.push(notification);       
+                                    }  
+                       }       
+                 }).catch(err=> {
+                       $log.error('NotificationCtrl::getNotification: caught exception: ' + err);
+                       if (intervalPromise != null)
+                               $interval.cancel(intervalPromise);
+                 });      
+             }
+             $scope.getNotification();
+             function updateNotifications() {
+                $scope.getNotification();
+             }
+             $scope.start = function(rate) {
+                               // stops any running interval to avoid two intervals running at the same time
+                               $scope.stop();  
+                               // store the interval promise
+                               intervalPromise = $interval(updateNotifications, rate);
+                        };
+
+                        $scope.stop = function() {
+                               $interval.cancel(intervalPromise);
+                        };
+                        
+                        $scope.showDetailedJsonMessage=function (selectedAdminNotification) {
+                        notificationService.getMessageRecipients(selectedAdminNotification.id).then(res =>{
+                     $scope.messageRecipients = res;
+                                var messageObject=JSON.parse(selectedAdminNotification.message);
+                                var html="";
+                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.source+'</p>';
+                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.title+'</p>';
+                                html+='<p>'+'Message Recipient'+' : '+$scope.messageRecipients+'</p>';
+
+                                for(var field in  messageObject){
+                                        if(field=='eventDate'||field=='lastModifiedDate'){
+                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';
+                                                 
+                                        }else{
+                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';
+                                        
+                                        }
+                                }
+
+                                var modalInstance = ngDialog.open({
+                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',
+                                   controller: 'userNotificationCtrl',
+                                   resolve: {
+                                       message: function () {
+                                               var message = {
+                                                          title:    '',
+                                               text:    html
+                                               
+                                               };
+                                         return message;
+                                       },
+                                    
+                                     }
+                                 }); 
+                    
+                }).catch(err => {
+                 $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err);
+                 $scope.isLoadingTable = false;
+             });
+                };
+                        
+                       notificationService.getNotificationRate().then(res=> {
+               if (res == null || res.response == null) {
+                       $log.error('NotificationCtrl: failed to notification update rate or duration, check system.properties file.');
+               } else {
+                       var rate = parseInt(res.response.updateRate);
+                                       var duration = parseInt(res.response.updateDuration);
+                                       notificationService.setMaxRefreshCount(parseInt(duration/rate)+1);
+                                       notificationService.setRefreshCount(notificationService.maxCount);
+                               if (rate != NaN && duration != NaN) {
+                                               $scope.updateRate=rate;
+                                               $scope.start($scope.updateRate);
+                               }                               
+               }
+            }).catch(err=> {
+               $log.error('NotificationCtrl: getNotificationRate() failed: ' + err);
+            });
+             
+             $scope.deleteNotification = function(index){
+                if ($scope.notifications[index].id == null || $scope.notifications[index].id == '') {
+                       $log.error('NotificationCtrl: failed to delete Notification.');
+                       return;
+                }
+                notificationService.setNotificationRead($scope.notifications[index].id);
+                $scope.notifications.splice(index,1);
+                notificationService.setNotificationCount($scope.notifications.length);          
+             }
+       }
+    }
+    
+    class RecommendationCtrl{
+       constructor($log, $scope, $cookies, $timeout, sessionService,recommendationService,notificationService,$interval,ngDialog) {
+                $scope.recommendations=[];   
+                var intervalPromise = null;
+             $scope.recommendationCount=  recommendationService.recommendationCount;
+             console.log("$",$);
+            $scope.getRecommendations = function(){ 
+               $("#recommendation-bulb").removeClass('icon-misc-bulbL').addClass('icon-misc-bulb')
+                recommendationService.getRecommendations()
+                
+                 .then(res=> {
+                               $("#recommendation-bulb").removeClass('icon-misc-bulb').addClass('icon-misc-bulbL')
+                       recommendationService.decrementRefreshCount();
+                       var count = recommendationService.getRefreshCount();
+                       if ( res.data==null) {
+                               $log.error('RecommendationCtrl::update Recommendation: failed to get recommendation');
+                               if (intervalPromise != null)
+                                       $interval.cancel(intervalPromise);
+                       } else if(count>=0){
+                               if (intervalPromise != null)
+                                       $interval.cancel(intervalPromise);
+                       } else {
+                               $scope.recommendations = [];
+                               recommendationService.setRecommendationCount(res.data.recommendations.length);
+                               for(var i=0;i<res.data.recommendations.length;i++){
+                                       var data = res.data.recommendations[i];                                 
+                                       var recommendations ={
+                                                                                               
+                                                       recommendation:data
+                                       };
+                                       $scope.recommendations.push(recommendations);       
+                                    }  
+                       }       
+                 }).catch(err=> {
+                       $log.error('RecommendationCtrl::gatRecommendations: caught exception: ' + err);
+                       if (intervalPromise != null)
+                               $interval.cancel(intervalPromise);
+                 });      
+             }
+             $scope.getRecommendations();
+             
+             function updateRecommendations() {
+                $scope.getRecommendations();
+             }
+             
+             notificationService.getNotificationRate().then(res=> {
+               if (res == null || res.response == null) {
+                       $log.error('NotificationCtrl: failed to notification update rate or duration, check system.properties file.');
+               } else {
+                       var rate = parseInt(res.response.updateRate);
+                                       var duration = parseInt(res.response.updateDuration);
+                                       notificationService.setMaxRefreshCount(parseInt(duration/rate)+1);
+                                       notificationService.setRefreshCount(notificationService.maxCount);
+                               if (rate != NaN && duration != NaN) {
+                                               $scope.updateRate=rate;
+                                   setInterval(function(){$scope.getRecommendations();},rate);
+
+                               }                               
+               }
+              }).catch(err=> {
+               $log.error('NotificationCtrl: getNotificationRate() failed: ' + err);
+              });             
+             $scope.deleteRecommendation = function(index){
+                if ($scope.recommendations[index] == null || $scope.recommendations[index] == '') {
+                       $log.error('RecommendationCtrl: failed to delete Recommendation.');
+                       return;
+                }
+                $scope.recommendations.splice(index,1);
+                recommendationService.setRecommendationCount($scope.recommendations.length);            
+             }
+       }
+    }
+    NotificationCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout', 'sessionService','notificationService','$interval','ngDialog'];
+    RecommendationCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout', 'sessionService','recommendationService','notificationService','$interval','ngDialog'];
+    LoginSnippetCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService'];
+    HeaderCtrl.$inject = ['$log', '$window', 'userProfileService', 'menusService', '$scope', 'ECOMP_URL_REGEX','$cookies','$state','auditLogService','notificationService','recommendationService','ngDialog'];
+    angular.module('ecompApp').controller('HeaderCtrl', HeaderCtrl);
+    angular.module('ecompApp').controller('loginSnippetCtrl', LoginSnippetCtrl);
+    angular.module('ecompApp').controller('notificationCtrl', NotificationCtrl);
+    angular.module('ecompApp').controller('recommendationCtrl', RecommendationCtrl);
+
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index ec57812..b553ceb 100644 (file)
     width: 16px;
   }
   
+  .recommendations-count
+  {
+    .border-radius(50%);
+    background:#db3434;
+    color: @colorWhite;
+    font-size: 10px;
+    padding-top: 2px;
+    height: 16px;   
+    position: absolute;
+    right: -7px;
+    text-align: center;
+    top: -8px;
+    width: 16px;
+  }
+  
   .notification-header{
     border-bottom: 1px solid #b4b4b4;
     padding: 10px 40px 0px 40px;
        .normal
        {
                .border-radius(50%);
-               background: @colorPeterRiver;
+               background: steelblue;
                content: '';
                height: 8px;
                width: 8px;
       
       .button-dismiss
       {
-        color: @colorSilver;
+        color: black;
         font-size: 15px;
         
         &:hover,
 }
 
 .b2b-header-tabs .header__items{
-       width:90%;
+       width:98%;
 }
 
 .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary{
        
 }
 
+.b2b-header-tabs .header__item.profile{
+       margin-right:70px;
+       float:right;
+       position: static;
+}
+
 .third-level-menu{
 column-count: 4;
     line-height: 12px;
@@ -426,10 +447,11 @@ column-count: 4;
 
 .b2b-header-tabs .third-level-menu li a {
     color: #333;
-    display: inline-grid;
+    display: inline-flex;
     padding: 7px 15px;
-    max-width: 228px;
     font-family:"Omnes-ECOMP-W02", Arial;
+    margin-top:5px;
+       margin-bottom:5px;
 }
 
 .b2b-header-tabs .third-level-menu li{
@@ -491,6 +513,24 @@ column-count: 4;
        width:100%;
 }
 
-.display-userAppRoles-label span{
+.display-userAppRoles-label{
        font-family:"Omnes-ECOMP-W02", Arial;
-}
\ No newline at end of file
+       white-space:nowrap;
+}
+
+.profile-detail-extension{
+       display:inline-block;
+}
+
+.logout-btn-div{
+       display:inline-block;
+       padding-top: 8px;
+       
+}
+
+.onap-title-logo{
+    position: relative;
+    top: 7px;
+       width: 126.8px;
+    height: 28px;
+}
index 65a34ed..3d1d330 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div style="position:fixed;width: 100%;top: 0px;left: 0;background-color: #222;z-index:9999">\r
-    <header class="b2b-header-tabs" b2b-header-responsive>\r
-        <ul class="header__items" role="navigation">\r
-<!-- Menu Icon and name -->\r
-            <li class="header__item icon__item" onclick="window.location = 'applicationsHome'">\r
-                <span id="logo-image"  class="icon-primary-att-globe"></span>\r
-                <span id="portal-title" class="portal-title" >OpenECOMP Portal</span>                  \r
-            </li>\r
-<!-- First Level menu -->\r
-            <li b2b-header-menu \r
-               id="megaMenu-{{item.text.split(' ').join('-')}}" \r
-               class="header__item b2b-headermenu" \r
-               ng-repeat="item in megaMenuDataObject" \r
-               ng-mousedown="loadFavorites(item.text)"  \r
-               role="presentation">\r
-               \r
-                <a href="javascript:void(0);" \r
-                id="parentmenu-tabs"\r
-                class="menu__item" \r
-                role="menuitem">{{item.text}}</a>\r
-                \r
-                <div class="header-secondary-wrapper" ng-if="item.active_yn=='Y'">\r
-                    <ul class="header-secondary" role="menu">\r
-<!-- Second Level menu -->\r
-                        <li class="header-subitem" \r
-                        id="subItem-{{subItem.text.split(' ').join('-')}}"\r
-                        b2b-header-submenu \r
-                        ng-repeat="i in item.children | orderBy : 'column'" \r
-                        ng-mousemove="submenuLevelAction(i.text,i.column)" \r
-                        role="presentation">\r
-           <!-- Favorites -->\r
-                               <div ng-if="i.text=='Favorites'" >                                      \r
-                                       <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text}}</a>                \r
-                                       <i id="favorite-star" data-size="large"  class="icon-star favorites-icon-active"></i>                   \r
-                                       <div class="header-columns-div" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()" >\r
-                                               <div class="header-tertiary-wrapper" id="header-favorites">\r
-                                                   <ul class="header-tertiary" role="menu">\r
-                                                       <li role="presentation">\r
-                                                               <div                                                   \r
-                                                     ng-repeat="subItem in favoritesMenuItems"\r
-                                                     ng-show="showFavorites"\r
-                                                     ng-hide="hideMenus"\r
-                                                     id="favoritesMenuItems-{{subItem.text.split(' ').join('-')}}">\r
-                                                    <div class="fav-links">\r
-                                                        <i id="favorite-selector-favorites-list"\r
-                                                           class="icon-star favorites-icon-active"                                                       \r
-                                                           data-ng-click="removeAsFavoriteItem($event, subItem.menuId)"\r
-                                                           ng-mousedown="removeAsFavoriteItem($event, subItem.menuId)">\r
-                                                        </i>\r
-                                                        <a id="favorites-list" aria-label="{{subItem.text}}" ng-click="goToUrl(subItem)">{{subItem.text}}</a>\r
-                                                    </div>\r
-                                                </div> \r
-                                                                                               \r
-                                                           <div id="favorites-empty"  class="favorites-window-empty"   ng-show="emptyFavorites">\r
-                                                               <p id="p-no-favs-icon" class="no-fav-icon">\r
-                                                                       <span class="icon-star" ></span>\r
-                                                               </p>\r
-                                                               <p id="p-no-favs" class="largeText">No Favorites</p>\r
-                                                               <p id="p-no-favs-desc"  class="normal">Add your favorite items for quick access.</p>\r
-                                                               </div>\r
-                                                       </li>\r
-                                                   </ul>\r
-                                           </div>\r
-                                       </div>                  \r
-                               </div>\r
-            <!-- Support or Help -->\r
-                               <div ng-if="item.text=='Support' || item.text=='Help'" id="second-level-menus-help">                            \r
-                                       <a href="javascript:void(0);" ng-click="goToUrl(i);auditLog(i,'Support')" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>                \r
-                               </div>\r
-                       <!-- Others -->\r
-                               <div ng-if="i.text!='Favorites' && (item.text!='Support' && item.text!='Help')" >\r
-                                       <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>\r
-                                   <div class="header-tertiary-wrapper" >\r
-                                           <ul class="third-level-menu"  role="menu" id="third-level-menus">\r
-<!-- Third Level menu -->                       \r
-                                                                               \r
-                                                       <li b2b-header-tertiarymenu ng-repeat="link in i.children | orderBy : 'column'" role="presentation" >\r
-                                                           <i id="level3-star-inactive-{{link.menuId}}" ng-cloak\r
-                                                    class="icon-star favorites-icon-inactive"  data-size="large"\r
-                                                    data-ng-click="setAsFavoriteItem($event, link.menuId)"\r
-                                                    ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)==false">\r
-                                                </i>\r
-                                                <i id="level3-star-active-{{link.menuId}}" ng-cloak\r
-                                                   ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)"\r
-                                                   class="icon-star favorites-icon-active ng-cloak"  data-size="large"\r
-                                                   data-ng-click="removeAsFavoriteItem($event, link.menuId)">\r
-                                                </i>                                              \r
-                                                \r
-                                                           <a class="third-level-title"\r
-                                                          aria-label="{{link.text | elipsis: 50}}"\r
-                                                          ng-click="goToUrl(link);auditLog(link,'application')">{{link.text| elipsis: 50}}</a>\r
-<!-- Fourth Level menu -->\r
-                                                           <div b2b-tertiary-link ng-repeat="title in link.children"  >\r
-                                                               <i id="level4-star-inactive-{{title.menuId}}" ng-cloak\r
-                                                              class="icon-star favorites-icon-inactive"\r
-                                                              data-ng-click="setAsFavoriteItem($event, title.menuId)"\r
-                                                              ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)==false">\r
-                                                           </i>\r
-                                                           <i id="level4-star-active-{{title.menuId}}" ng-cloak\r
-                                                              class="icon-star favorites-icon-active"\r
-                                                              data-ng-click="removeAsFavoriteItem($event, title.menuId)"\r
-                                                              ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)">\r
-                                                           </i>\r
-                                                               <a href="javascript:void(0);" class="header-tertiaryitem"  ng-class="{'disabled': title.disabled}" role="menuitem" ng-click="goToUrl(title);auditLog(title,'functional')">{{title.text | elipsis: 50}}</a>                                      \r
-                                                           </div>\r
-                                                       </li>   \r
-                                                       \r
-                                                          \r
-                                             \r
-                                                                \r
-                                           </ul>\r
-                                   </div>\r
-                               </div>\r
-           \r
-                        </li>                        \r
-                    </ul>\r
-                </div>\r
-            </li>\r
-<!-- Right side of the Menu - User Icon and Notification flag -->\r
-            <div class="login-section">\r
-     <!-- User Icon -->\r
-            <li class="header__item profile" aria-haspopup="true">\r
-                               <b2b-flyout>\r
-                                       <div b2b-flyout-toggler >\r
-                                               <div class="icon-people-oneperson" id="header-user-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>\r
-                                       <div id="login-snippet-text" class="login-snippet-text">{{header.isGuest ? 'Guest' : header.firstName}}</div>                  \r
-                                       </div>                                  \r
-                           <b2b-flyout-content horizontal-placement="center" vertical-placement="below">\r
-                                               <div  ng-controller="loginSnippetCtrl" >\r
-                                                       <div id="reg-header-snippet">\r
-                                                               <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">\r
-                                                                       <ul class="reg-Details-table">\r
-                                                                               <li>\r
-                                                               <div class="reg-userName-table">\r
-                                                                   <div id="reg-userName-table-row">\r
-                                                                       <div id="reg-userName-table-cell">\r
-                                                                           <h3 >\r
-                                                                           {{firstName}} {{lastName}}&nbsp;</h3>\r
-                                                                           <span>&nbsp;</span>\r
-                                                                       </div>\r
-                                                                   </div>\r
-                                                               </div>\r
-                                                           </li>\r
-                                                                               <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn" style=font-weight:bold>Email<span class="visuallyhidden">:\r
-                                                           </span></span></div></li>\r
-                                                                               <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">\r
-                                                               {{loginSnippetEmail}}</span></div></li>\r
-                                                           <li>&nbsp;</li>\r
-                                                                               <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn" style=font-weight:bold>\r
-                                                               User Id<span class="visuallyhidden">:</span></span></div></li>\r
-                                                                               <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn">\r
-                                                               {{loginSnippetUserid}}<span class="visuallyhidden"></span></span></div></li>\r
-                                                           <li>&nbsp;</li>\r
-                                                                               <li><div class="reg-userLastLogin-label"><span class="reg-userLastLogin-label-spn" style=font-weight:bold>\r
-                                                               Last login<span class="visuallyhidden">:</span></span></div></li>\r
-                                                                               <li><div class="reg-userLastLogin-value"><span class="reg-userLastLogin-value-spn">\r
-                                                               {{lastLogin}}<span class="visuallyhidden"></span></span></div></li>\r
-                                                               <li>&nbsp;</li>\r
-                                                                               <li>\r
-                                                                       <div class="display-userAppRoles-label">\r
-                                                                               <a href="javascript:void(0);"  ng-click="getUserApplicationRoles()"  class="icon-controls-add-maximize" ><span>Applications and Roles</span></a>\r
-                                                                       </div>\r
-                                                               \r
-                                                               <div class="display-userAppRoles-label" ng-show="displayUserAppRoles" style="height:200px; overflow-y:auto;">\r
-                                                                    <div ng-repeat="ua in userapproles track by  $index">\r
-                                                                   <div class="reg-userApp-value">\r
-                                                                       <span class="reg-userApp-value-spn" style=font-weight:bold>{{ua.App}}<span class="visuallyhidden">:</span></span>\r
-                                                                                                       </div>                                                             \r
-                                                                       <div ng-repeat="role in ua.Roles track by  $index" class="reg-userAppRoles-value" >\r
-                                                                               <span class="reg-userAppRoles-value-spn">{{role}}</span>\r
-                                                                       </div>\r
-                                                                       </div>\r
-                                                               </div>\r
-                                                               </li>\r
-                                                                       </ul>\r
-                                                       <div id="reg-logout-div" style="padding-top: 8px">\r
-                                                             <button href="javascript:void(0)" id="allLogout" ng-click="allAppsLogout()" class="btn btn-alt btn-small">\r
-                                                                                       Log out\r
-                                                                               </button>\r
-                                                       </div>\r
-                                                       </div>\r
-                                                       </div>\r
-                                               </div>          \r
-                           </b2b-flyout-content>\r
-                       </b2b-flyout>\r
-            </li> \r
-    <!-- Notification flag -->\r
-            <li class="header__item notification" aria-haspopup="true" class="notification-li">\r
-               <b2b-flyout>\r
-                       <div b2b-flyout-toggler class="notification-div">\r
-                               <div class="notifications-count" ng-hide="notificationCount.count==0" ng-bind="notificationCount.count"></div>          \r
-                                               <div  class="icon-content-flag megamenu-notification-overrides" class="b2b-flyout-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>\r
-                           </div>\r
-                           <b2b-flyout-content horizontal-placement="center" vertical-placement="below">\r
-                                               <div class="notification-content" ng-controller="notificationCtrl" >\r
-                                                       <div class="ng-scope">\r
-                                                               <div id="notification" class="notificationBox ">\r
-                                                                       <div align ="right">\r
-                                                                                <a ui-sref="root.notificationHistory" style="font-size: 14px"> View All Recent Notifications </a>\r
-                                                                       </div>\r
-                                                                       <div class="notification-header">\r
-                                                                               <div style="float:left;">\r
-                                                                                       <p class="notification-heading">Notifications</p>\r
-                                                                               </div>\r
-                                                                               <div style="clear:both;"></div>\r
-                                                                       </div>\r
-                                                                       <div ng-show="notifications.length==0">\r
-                                                                               <div class="notification-main">\r
-                                                                                       <div style="height:113px;">\r
-                                                                                               <div align="center" class="icon-information notification-info-icon"></div>\r
-                                                                                       </div>\r
-                                                                               <div>\r
-                                                                               <p class="notification-text">No New Notifications.</p>\r
-                                                                       </div>\r
-                                                                       \r
-                                                               </div>\r
-                                                       </div>\r
-                                                       <div class="notification-main" ng-show="notifications.length>0">\r
-                                                               <ul class="notifications-list">\r
-                                                                       <li class="item" data-id="5" ng-repeat="item in notifications">\r
-                                                                               <div class="icon">\r
-                                                                                       <span class="important" ng-show="item.priority==2"/>\r
-                                                                                       <span class="normal" ng-show="item.priority==1"/>\r
-                                                                               </div>\r
-                                                                               <div class="details">\r
-                                                                                       <span class="title" ng-bind="item.title"></span>\r
-                                                                                       <span class="message-body" ng-bind="item.message"></span>\r
-                                                                                       <!-- <span class="date" ng-bind="item.time" ></span> -->\r
-                                                                                       <mydate>{{item.time | date:'MM/dd/yyyy hh:mm:ss a Z'}}</mydate>                 \r
-                                                                               </div>\r
-                                                                               <button type="button" ng-click="deleteNotification($index)" class="button-default button-dismiss js-dismiss">x</button>\r
-                                                                       </li>\r
-                                                               </ul>\r
-                                                       </div>\r
-                                                       <div class="notification-footer">\r
-                                                               <div class="notification-links">\r
-                                                                       <div style="clear:both;"></div>\r
-                                                               </div>\r
-                                                       </div>\r
-                                               </div>                                  \r
-                           </b2b-flyout-content>\r
-                       </b2b-flyout>\r
-            </li>\r
-            </div>\r
-        </ul>\r
-       </header>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div style="position:fixed;width: 100%;top: 0px;left: 0;background-color: #222;z-index:9999">
+    <header class="b2b-header-tabs" b2b-header-responsive>
+        <ul class="header__items" role="navigation">
+<!-- Menu Icon and name -->
+            <li class="header__item icon__item" onclick="window.location = 'applicationsHome'">
+                <div ng-include class="profile-detail-extension" src="'app/views/header/header-logo.html'"></div>             
+                <span id="portal-title" class="portal-title" ng-bind="ecompTitle"></span>              
+            </li>
+<!-- First Level menu -->
+            <li b2b-header-menu 
+               id="megaMenu-{{item.text.split(' ').join('-')}}" 
+               class="header__item b2b-headermenu" 
+               ng-repeat="item in megaMenuDataObject" 
+               ng-mousedown="loadFavorites(item.text)"  
+               role="presentation">
+               
+                <a href="javascript:void(0);" 
+                id="parentmenu-{{item.text.split(' ').join('-')}}-tabs"
+                class="menu__item" 
+                role="menuitem">{{item.text}}</a>
+                
+                <div class="header-secondary-wrapper" ng-if="item.active_yn=='Y'" ng-hide="hideMenus">
+                    <ul class="header-secondary" role="menu">
+<!-- Second Level menu -->
+                        <li class="header-subitem" 
+                        id="subItem-{{subItem.text.split(' ').join('-')}}"
+                        b2b-header-submenu 
+                        ng-repeat="i in item.children | orderBy : 'column'" 
+                        ng-mousemove="submenuLevelAction(i.text,i.column)" 
+                        role="presentation">
+           <!-- Favorites -->
+                               <div ng-if="i.text=='Favorites'" >                                      
+                                       <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text}}</a>                
+                                       <i id="favorite-star" data-size="large"  class="icon-star favorites-icon-active"></i>                   
+                                       <div class="header-columns-div" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()" >
+                                               <div class="header-tertiary-wrapper" id="header-favorites">
+                                                   <ul class="header-tertiary" role="menu">
+                                                       <li role="presentation">
+                                                               <div                                                   
+                                                     ng-repeat="subItem in favoritesMenuItems"
+                                                     ng-show="showFavorites"
+                                                     
+                                                     id="favoritesMenuItems-{{subItem.text.split(' ').join('-')}}">
+                                                    <div class="fav-links">
+                                                        <i id="favorite-selector-favorites-list"
+                                                           class="icon-star favorites-icon-active"                                                       
+                                                           data-ng-click="removeAsFavoriteItem($event, subItem.menuId)"
+                                                           ng-mousedown="removeAsFavoriteItem($event, subItem.menuId)">
+                                                        </i>
+                                                        <a id="favorites-list" aria-label="{{subItem.text}}" ng-click="goToUrl(subItem)">{{subItem.text}}</a>
+                                                    </div>
+                                                </div> 
+                                                                                               
+                                                           <div id="favorites-empty"  class="favorites-window-empty"   ng-show="emptyFavorites">
+                                                               <p id="p-no-favs-icon" class="no-fav-icon">
+                                                                       <span class="icon-star" ></span>
+                                                               </p>
+                                                               <p id="p-no-favs" class="largeText">No Favorites</p>
+                                                               <p id="p-no-favs-desc"  class="normal">Add your favorite items for quick access.</p>
+                                                               </div>
+                                                       </li>
+                                                   </ul>
+                                           </div>
+                                       </div>                  
+                               </div>
+            <!-- Support or Help -->
+                               <div ng-if="item.text=='Support' || item.text=='Help'" id="second-level-menus-help">                            
+                                       <a id="second-level-menus-{{i.text.split(' ').join('-')}}-help" href="javascript:void(0);" ng-click="goToUrl(i);auditLog(i,'Support')" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>           
+                               </div>
+                       <!-- Others -->
+                               <div ng-if="i.text!='Favorites' && (item.text!='Support' && item.text!='Help')" >
+                                       <a href="javascript:void(0);" class="menu__item" role="menuitem">{{i.text| elipsis: 50}}</a>
+                                   <div class="header-tertiary-wrapper" >
+                                           <ul class="third-level-menu"  role="menu" id="third-level-menus">
+<!-- Third Level menu -->                       
+                                                                               
+                                                       <li b2b-header-tertiarymenu ng-repeat="link in i.children | orderBy : 'column'" role="presentation" >
+                                                           <i id="level3-star-inactive-{{link.menuId}}" ng-cloak
+                                                    class="icon-star favorites-icon-inactive"  data-size="large"
+                                                    data-ng-click="setAsFavoriteItem($event, link.menuId)"
+                                                    ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)==false">
+                                                </i>
+                                                <i id="level3-star-active-{{link.menuId}}" ng-cloak
+                                                   ng-if="link.url.length > 1 && isUrlFavorite(link.menuId)"
+                                                   class="icon-star favorites-icon-active ng-cloak"  data-size="large"
+                                                   data-ng-click="removeAsFavoriteItem($event, link.menuId)">
+                                                </i>                                              
+                                                
+                                                           <a class="third-level-title"
+                                                          aria-label="{{link.text | elipsis: 50}}"
+                                                          ng-click="goToUrl(link);auditLog(link,'application')">{{link.text| elipsis: 50}}</a>
+<!-- Fourth Level menu -->
+                                                           <div b2b-tertiary-link ng-repeat="title in link.children"  >
+                                                               <i id="level4-star-inactive-{{title.menuId}}" ng-cloak
+                                                              class="icon-star favorites-icon-inactive"
+                                                              data-ng-click="setAsFavoriteItem($event, title.menuId)"
+                                                              ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)==false">
+                                                           </i>
+                                                           <i id="level4-star-active-{{title.menuId}}" ng-cloak
+                                                              class="icon-star favorites-icon-active"
+                                                              data-ng-click="removeAsFavoriteItem($event, title.menuId)"
+                                                              ng-if="title.url.length > 1 && isUrlFavorite(title.menuId)">
+                                                           </i>
+                                                               <a href="javascript:void(0);" class="header-tertiaryitem"  ng-class="{'disabled': title.disabled}" role="menuitem" ng-click="goToUrl(title);auditLog(title,'functional')">{{title.text | elipsis: 50}}</a>                                      
+                                                           </div>
+                                                       </li>   
+                                                       
+                                                          
+                                             
+                                                                
+                                           </ul>
+                                   </div>
+                               </div>
+           
+                        </li>                        
+                    </ul>
+                </div>
+            </li>
+<!-- Right side of the Menu - User Icon and Notification flag -->
+            <div class="login-section">
+     <!-- User Icon -->
+            <li class="header__item profile" aria-haspopup="true">
+                               <b2b-flyout>
+                                       <div b2b-flyout-toggler >
+                                               <div class="icon-people-oneperson" id="header-user-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>
+                                       <div id="login-snippet-text" class="login-snippet-text">{{header.isGuest ? 'Guest' : header.firstName}}</div>                  
+                                       </div>                                  
+                           <b2b-flyout-content horizontal-placement="center" vertical-placement="below">
+                                               <div  ng-controller="loginSnippetCtrl" >
+                                                       <div id="reg-header-snippet">
+                                                               <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">
+                                                                       <ul class="reg-Details-table">
+                                                                               <li>
+                                                               <div class="reg-userName-table">
+                                                                   <div id="reg-userName-table-row">
+                                                                       <div id="reg-userName-table-cell">
+                                                                           <h3 >
+                                                                           {{firstName}} {{lastName}}&nbsp;</h3>
+                                                                           <span>&nbsp;</span>
+                                                                       </div>
+                                                                   </div>
+                                                               </div>
+                                                           </li>
+                                                                               <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn" style=font-weight:bold>Email<span class="visuallyhidden">:
+                                                           </span></span></div></li>
+                                                                               <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">
+                                                               {{loginSnippetEmail}}</span></div></li>
+                                                           <li>&nbsp;</li>
+                                                                               <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn" style=font-weight:bold>
+                                                               User Id<span class="visuallyhidden">:</span></span></div></li>
+                                                                               <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn">
+                                                               {{loginSnippetUserid}}<span class="visuallyhidden"></span></span></div></li>
+                                                           <li>&nbsp;</li>
+                                                                               <li><div class="reg-userLastLogin-label"><span class="reg-userLastLogin-label-spn" style=font-weight:bold>
+                                                               Last login<span class="visuallyhidden">:</span></span></div></li>
+                                                                               <li><div class="reg-userLastLogin-value"><span class="reg-userLastLogin-value-spn">
+                                                               {{lastLogin}}<span class="visuallyhidden"></span></span></div></li>
+                                                               <li>&nbsp;</li>
+                                                                               <li>
+                                                                       <div class="display-userAppRoles-label">
+                                                                               <a href="javascript:void(0);"  ng-click="getUserApplicationRoles()"  class="icon-primary-accordion-plus" ng-class="{true: 'icon-primary-accordion-plus', false: 'icon-primary-accordion-minus'}[ !displayUserAppRoles]" >Applications and Roles</a>
+                                                                       </div>
+                                                                       <br>
+                                                               <div class="display-userAppRoles-label" ng-show="displayUserAppRoles" style="height:200px; overflow-y:auto;">
+                                                                    <div ng-repeat="ua in userapproles track by  $index">
+                                                                   <div class="reg-userApp-value">
+                                                                       <span class="reg-userApp-value-spn" style=font-weight:bold>{{ua.App}}<span class="visuallyhidden">:</span></span>
+                                                                                                       </div>                                                             
+                                                                       <div ng-repeat="role in ua.Roles track by  $index" class="reg-userAppRoles-value" >
+                                                                               <span class="reg-userAppRoles-value-spn">{{role}}</span>
+                                                                       </div>
+                                                                       <br>
+                                                                       </div>
+                                                               </div>
+                                                               </li>
+                                                                       </ul>
+                                                       <div ng-include class="profile-detail-extension" src="'app/views/header/header-extension.tpl.html'"></div>                                                                                                      
+                                                       <div id="reg-logout-div" class="logout-btn-div">
+                                                            <button href="javascript:void(0)" id="allLogout" ng-click="allAppsLogout()" class="btn btn-alt btn-small">
+                                                                                       Log out
+                                                                               </button>
+                                                       </div>
+                                                       </div>
+                                                       </div>
+                                               </div>          
+                           </b2b-flyout-content>
+                       </b2b-flyout>
+            </li> 
+    <!-- Notification flag -->
+            <li class="header__item notification" aria-haspopup="true" class="notification-li">
+               <b2b-flyout>
+                       <div b2b-flyout-toggler class="notification-div">
+                               <div class="notifications-count" ng-hide="notificationCount.count==0" ng-bind="notificationCount.count"></div>          
+                                               <div id="megamenu-notification-button" class="icon-content-flag megamenu-notification-overrides" class="b2b-flyout-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>
+                           </div>
+                           <b2b-flyout-content horizontal-placement="center" vertical-placement="below">
+                                               <div class="notification-content" ng-controller="notificationCtrl" >
+                                                       <div class="ng-scope">
+                                                               <div id="notification" class="notificationBox ">
+                                                                       <div align ="right">
+                                                                                <a id="notification-history-link" ui-sref="root.notificationHistory" style="font-size: 14px"> View All Recent Notifications </a>
+                                                                       </div>
+                                                                       <div class="notification-header">
+                                                                               <div style="float:left;">
+                                                                                       <p class="notification-heading">Notifications</p>
+                                                                               </div>
+                                                                               <div style="clear:both;"></div>
+                                                                       </div>
+                                                                       <div ng-show="notifications.length==0">
+                                                                               <div class="notification-main">
+                                                                                       <div style="height:113px;">
+                                                                                               <div align="center" class="icon-information notification-info-icon"></div>
+                                                                                       </div>
+                                                                               <div>
+                                                                               <p class="notification-text">No New Notifications.</p>
+                                                                       </div>
+                                                                       
+                                                               </div>
+                                                       </div>
+                                                       <div class="notification-main" ng-show="notifications.length>0">
+                                                               <ul class="notifications-list">
+                                                                       <li class="item" data-id="5" ng-repeat="item in notifications">
+                                                                               <div class="icon">
+                                                                                       <span class="important" ng-show="item.priority==2"/>
+                                                                                       <span class="normal" ng-show="item.priority==1"/>
+                                                                               </div>
+                                                                               <div class="details" ng-click="showDetailedJsonMessage(item)">
+                                                                                               <span class="title" ng-bind="item.source"></span> <span
+                                                                                                       class="title" ng-bind="item.title"></span> <span
+                                                                                                       class="message-body" ng-if="item.source==='EP'"
+                                                                                                       ng-bind="item.message"></span> <span class="message-body"
+                                                                                                       ng-if="item.source!=='EP'"
+                                                                                                       ng-bind="item.message| elipsis: 27"> </span>
+                                                                                               <!-- <span class="date" ng-bind="item.time" ></span> -->
+                                                                                               <mydate>{{item.time | date:'MM/dd/yyyy hh:mm:ss a Z'}}</mydate>
+
+                                                                                       </div>
+                                                                               <button type="button" ng-click="deleteNotification($index)" class="button-default button-dismiss js-dismiss">x</button>
+                                                                       </li>
+                                                               </ul>
+                                                       </div>
+                                                       <div class="notification-footer">
+                                                               <div class="notification-links">
+                                                                       <div style="clear:both;"></div>
+                                                               </div>
+                                                       </div>
+                                               </div>                                  
+                           </b2b-flyout-content>
+                       </b2b-flyout>
+            </li>
+            
+                             <!-- Recommendation Bulb -->
+            
+               <li class="header__item recommendation" aria-haspopup="true" class="recommendation-li">
+               <b2b-flyout>
+                       <div b2b-flyout-toggler class="recommendation-div">
+                               <div class="recommendations-count" ng-hide="recommendationCount.count==0" ng-bind="recommendationCount.count"></div>            
+<div  class="icon-misc-bulbL megamenu-recommendation-overrides" id="recommendation-bulb" tabindex="0" b2b-accessibility-click="13,32" aria-label="recommendation" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" style="font-size: 22px;"role="button"></div>                       </div>
+                           <b2b-flyout-content horizontal-placement="center" vertical-placement="below">
+                                               <div class="recommendation-content" ng-controller="recommendationCtrl" >
+                                                       <div class="ng-scope">
+                                                               <div id="recommendation" class="notificationBox ">
+                                                                       <!-- <div align ="right">
+                                                                                <a ui-sref="root.recommendationsHistory" style="font-size: 14px"> View All Recent Notifications </a>
+                                                                       </div> -->
+                                                                       <div class="notification-header">
+                                                                               <div style="float:left;">
+                                                                                       <p class="notification-heading">Recommendations</p>
+                                                                               </div>
+                                                                               <div style="clear:both;"></div>
+                                                                       </div>
+                                                                       <div ng-show="recommendations.length==0">
+                                                                               <div class="notification-main">
+                                                                                       <div style="height:113px;">
+                                                                                               <div align="center" class="icon-information notification-info-icon"></div>
+                                                                                       </div>
+                                                                               <div>
+                                                                               <p class="notification-text">No New Recommendations</p>
+                                                                       </div>
+                                                                       
+                                                               </div>
+                                                       </div>
+                                                       <div class="notification-main" ng-show="recommendations.length>0">
+                                                               <ul class="notifications-list">
+                                                                       <li class="item" data-id="5" ng-repeat="item in recommendations">
+                                                                       <div class="icon">
+                                                                                       <span class="normal" ng-show="item.recommendation"/>
+                                                                               </div>
+                                                                               <div class="details">
+                                                                                                                                                       
+                                                                               <span class="message-body" ng-bind="item.recommendation"></span>
+                                                                                       
+                                                                                       
+                                                                               </div>
+                                                                               <button type="button" ng-click="deleteRecommendation($index)" class="button-default button-dismiss js-dismiss">x</button>
+                                                                       </li>
+                                                               </ul>
+                                                       </div>
+                                                       <div class="notification-footer">
+                                                               <div class="notification-links">
+                                                                       <div style="clear:both;"></div>
+                                                               </div>
+                                                       </div>
+                                               </div>                                  
+                           </b2b-flyout-content>
+                       </b2b-flyout>
+            </li>
+            </div>
+        </ul>
+       </header>
+</div>
index a8b2073..40b6fb3 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="microservice-add-details-model">\r
-       <div id="microservice-add-details-title" class="title">microservice Details</div>\r
-\r
-       <div id="microservices" class="microservice-scrolling-table">\r
-               <div class="microservice-properties-main"\r
-                       scroll-top="microserviceAddDetails.scrollApi">\r
-                       <form id="microservices-details-form" name="serviceForm" novalidate\r
-                               autocomplete="off">\r
-                               <div class="item required">\r
-                                       <div class="item-label">microservice Name</div>\r
-                                       <input id="microservice-details-input-name" class="table-search-field"\r
-                                               type="text" name="name" ng-pattern="/^[\w -]*$/" maxlength="100"\r
-                                               ng-model="microserviceAddDetails.service.name"\r
-                                               ng-change="microserviceAddDetails.updateServiceName()"\r
-                                               ng-disabled="microserviceAddDetails.isEditMode" required />\r
-\r
-                                       <div class="error-container"\r
-                                               ng-show="(microserviceAddDetails.emptyServiceName || serviceForm.name.$dirty)">\r
-                                               <div ng-messages="serviceForm.name.$error" class="error-container">\r
-                                                       <small id="microservices-details-input-name-required"\r
-                                                               class="err-message" ng-message="required">Microservice\r
-                                                               Name is required</small> <small\r
-                                                               id="microservices-details-input-name-pattern"\r
-                                                               class="err-message" ng-message="pattern">Microservice\r
-                                                               Name must be letters, numbers, or underscore</small>\r
-                                               </div>\r
-                                       </div>\r
-\r
-                                       <div class="error-container"\r
-                                               ng-show="microserviceAddDetails.isEditMode == false && microserviceAddDetails.dupliateName == true">\r
-                                               <small id="microservices-details-input-name-dupliated"\r
-                                                       class="err-message">Name not available - choose different\r
-                                                       name </small>\r
-                                       </div>\r
-                               </div>\r
-\r
-                               <div class="item required">\r
-                                       <div class="item-label">microservice Description</div>\r
-                                       <textarea b2b-reset b2b-reset-textarea id="widgets-details-input-desc"\r
-                                               name="desc" ng-model="microserviceAddDetails.service.desc"\r
-                                               ng-change="microserviceAddDetails.updateDesc()"></textarea>\r
-                                       <div class="error-container"\r
-                                               ng-show="(microserviceAddDetails.emptyServiceDesc \r
-                                       || (serviceForm.desc.$dirty && microserviceAddDetails.service.desc == ''))">\r
-                                               <small id="microservices-details-input-desc-required"\r
-                                                       class="err-message">Microservice Description is required</small>\r
-                                       </div>\r
-                               </div>\r
-\r
-\r
-\r
-                               <div class="item"\r
-                                       ng-show="microserviceAddDetails.isEditMode && microserviceAddDetails.availableWidgets.length > 0">\r
-                                       <div class="item-label">Client Widgets</div>\r
-                                       <div ng-repeat="widget in microserviceAddDetails.availableWidgets">{{widget.name}}</div>\r
-                               </div>\r
-\r
-                               <div class="item required">\r
-                                       <div class="item-label">Application Name</div>\r
-                                       <div class="service-select">                                    \r
-                                               <div class="table-dropdown">\r
-                                                       <select id="microservice-details-input-app" name="app" b2b-dropdown placeholder-text="Select Application" ng-model="microserviceAddDetails.service.application.name" ng-change="microserviceAddDetails.updateApp()">\r
-                                               <option b2b-dropdown-list option-repeat="d in microserviceAddDetails.availableApps" value="{{d.name}}">{{d.name}}</option>\r
-                                           </select>\r
-                                               </div>\r
-                                       </div>\r
-\r
-                                       <div class="error-container"\r
-                                               ng-show="(microserviceAddDetails.emptyServiceApp \r
-                                       || (serviceForm.app.$dirty && microserviceAddDetails.service.application == null))">\r
-                                               <small id="microservices-details-input-url-required"\r
-                                                       class="err-message">Please select microservice\r
-                                                       Application</small>\r
-                                       </div>\r
-                               </div>\r
-\r
-                               <div class="item required">\r
-                                       <div class="item-label">microservice Endpoint URL</div>\r
-                                       <input id="microservice-details-input-endpoint-url"\r
-                                               class="table-search-field" ng-model="microserviceAddDetails.service.url"\r
-                                               ng-change="microserviceAddDetails.updateURL()" type="text"\r
-                                               name="url" maxlength="200" />\r
-\r
-                                       <div class="error-container"\r
-                                               ng-show="(microserviceAddDetails.emptyServiceURL \r
-                                       || (serviceForm.url.$dirty && microserviceAddDetails.service.url == ''))">\r
-                                               <small id="microservices-details-input-url-required"\r
-                                                       class="err-message">Microservice Endpoint URL is required</small>\r
-                                       </div>\r
-                               </div>\r
-\r
-                               <div class="item required">\r
-                                       <div class="item-label">Security Type</div>\r
-                                       <div class="service-select">                                    \r
-                                               <div class="table-dropdown">\r
-                                                       <select id="microservice-details-input-security-type" name="microservice-details-input-security-type" b2b-dropdown placeholder-text="Select Application" ng-model="microserviceAddDetails.service.security.name" ng-change="microserviceAddDetails.updateApp()">\r
-                                               <option b2b-dropdown-list option-repeat="d in microserviceAddDetails.availableSecurityTypes" value="{{d.name}}">{{d.name}}</option>                                             \r
-                                           </select>\r
-                                               </div>\r
-                                       </div>                          \r
-                               </div>\r
-\r
-                               <div class="item"\r
-                                       ng-show="microserviceAddDetails.service.security.id == 1">\r
-                                       <div class="item-label">Username</div>\r
-                                       <input id="microservice-details-input-username" class="table-search-field"\r
-                                               type="text" name="username" maxlength="100"\r
-                                               ng-model="microserviceAddDetails.service.username" />\r
-                               </div>\r
-\r
-                               <div class="item"\r
-                                       ng-show="microserviceAddDetails.service.security.id == 1">\r
-                                       <div class="item-label">Password</div>\r
-                                       <input id="microservice-details-input-password" class="table-search-field"\r
-                                               type="password" name="password" maxlength="100"\r
-                                               ng-model="microserviceAddDetails.service.password" />\r
-                               </div>\r
-\r
-\r
-                               <div class="item" ng-show="microserviceAddDetails.isEditMode">\r
-                                       <div class="left-test-item">\r
-                                               <div class="item-label">Test Microservice</div>\r
-                                       </div>\r
-                                       <div class="right-test-item">\r
-                                               <div id="microservice-details-test-button" class="test-button"\r
-                                                       ng-click="microserviceAddDetails.testServiceURL()">Test</div>\r
-                                       </div>\r
-                               </div>\r
-\r
-                               <div class="item" ng-show="microserviceAddDetails.isEditMode">\r
-                                       <div class="item-label">JSON output</div>\r
-                                       <textarea id="microservice-details-input-json" class="json-field"\r
-                                               name="json"></textarea>\r
-                               </div>\r
-\r
-                               <div class="add-para-item">\r
-                                       <div class="item-label add-label-left">Add User Parameter</div>\r
-                                       <div class="icon-primary-accordion-plus"\r
-                                               ng-click="microserviceAddDetails.addParameter()"></div>\r
-                               </div>\r
-                               <div class="item">\r
-                                       <div class="para-label-item-left"\r
-                                               ng-show="microserviceAddDetails.service.parameterList.length > 0">\r
-                                               Parameter Key</div>\r
-                                       <div class="para-label-item-right"\r
-                                               ng-show="microserviceAddDetails.service.parameterList.length > 0">\r
-                                               Parameter Default Value</div>\r
-\r
-                                       <div id="microservice-details-user-paramters"\r
-                                               ng-repeat="parameter in microserviceAddDetails.service.parameterList">\r
-\r
-                                               <div class="para-item-left">\r
-                                                       <input id="microservice-details-input-user-parameter-key"\r
-                                                               class="table-search-field" type="text" name="param-key" maxlength="200"\r
-                                                               ng-model="parameter.para_key" />\r
-                                               </div>\r
-                                               <div class="para-item-middle">\r
-                                                       <input id="microservice-details-input-user-parameter-value"\r
-                                                               class="table-search-field" type="text" name="param-value"\r
-                                                               maxlength="200" ng-model="parameter.para_value" />\r
-                                               </div>\r
-\r
-                                               <div class="icon-primary-accordion-minus para-item-right"\r
-                                                       ng-click="microserviceAddDetails.removeParamItem(parameter)"></div>\r
-                                       </div>\r
-\r
-                                       <div class="microservice-property">\r
-                                               <input id="microservices-checkbox-app-is-enabled" type="checkbox"\r
-                                                       class="checkbox-field"\r
-                                                       ng-model="microserviceAddDetails.service.active" />\r
-                                               <div class="property-label checkbox-label">Active</div>\r
-                                       </div>\r
-                                       \r
-                               </div>\r
-                                       \r
-                               <div id="microservice-scroll-end"></div>\r
-                               <div class="dialog-control">\r
-                                       <button class="btn btn-alt btn-small" id="microservice-details-save-button" ng-click="microserviceAddDetails.saveChanges()">Save</button>                               \r
-                                       <button class="btn btn-alt btn-small" id="microservice-details-close-button" ng-click="microserviceAddDetails.closeThisDialog()">Close</button> \r
-                               </div>\r
-                       </form>\r
-               </div>\r
-\r
-\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="microservice-add-details-model">
+       <div id="microservice-add-details-title" class="title">Microservice Details</div>
+
+       <div id="microservices" class="microservice-scrolling-table">
+               <div class="microservice-properties-main"
+                       scroll-top="microserviceAddDetails.scrollApi">
+                       <form id="microservices-details-form" name="serviceForm" novalidate
+                               autocomplete="off">
+                               <div class="item required">
+                                       <div class="item-label">Microservice Name</div>
+                                       <input id="microservice-details-input-name" class="table-search-field"
+                                               type="text" name="name" ng-pattern="/^[\w -]*$/" maxlength="100"
+                                               ng-model="microserviceAddDetails.service.name"
+                                               ng-change="microserviceAddDetails.updateServiceName()"
+                                               required />
+
+                                       <div class="error-container"
+                                               ng-show="(microserviceAddDetails.emptyServiceName || serviceForm.name.$dirty)">
+                                               <div ng-messages="serviceForm.name.$error" class="error-container">
+                                                       <small id="microservices-details-input-name-required"
+                                                               class="err-message" ng-message="required">Microservice
+                                                               Name is required</small> <small
+                                                               id="microservices-details-input-name-pattern"
+                                                               class="err-message" ng-message="pattern">Microservice
+                                                               Name must be letters, numbers, or underscore</small>
+                                               </div>
+                                       </div>
+
+                                       <div class="error-container"
+                                               ng-show="microserviceAddDetails.dupliateName == true">
+                                               <small id="microservices-details-input-name-dupliated"
+                                                       class="err-message">Name not available - choose different
+                                                       name </small>
+                                       </div>
+                               </div>
+
+                               <div class="item required">
+                                       <div class="item-label">Microservice Description</div>
+                                       <textarea b2b-reset b2b-reset-textarea id="widgets-details-input-desc"
+                                               name="desc" ng-model="microserviceAddDetails.service.desc"
+                                               ng-change="microserviceAddDetails.updateDesc()"></textarea>
+                                       <div class="error-container"
+                                               ng-show="(microserviceAddDetails.emptyServiceDesc 
+                                       || (serviceForm.desc.$dirty && microserviceAddDetails.service.desc == ''))">
+                                               <small id="microservices-details-input-desc-required"
+                                                       class="err-message">Microservice Description is required</small>
+                                       </div>
+                               </div>
+
+
+
+                               <div class="item"
+                                       ng-show="microserviceAddDetails.isEditMode && microserviceAddDetails.availableWidgets.length > 0">
+                                       <div class="item-label">Client Widgets</div>
+                                       <div ng-repeat="widget in microserviceAddDetails.availableWidgets">{{widget.name}}</div>
+                               </div>
+
+                               <div class="item required">
+                                       <div class="item-label">Application Name</div>
+                                       <div class="service-select">                                    
+                                               <div class="table-dropdown">
+                                                       <select id="microservice-details-input-app" name="app" b2b-dropdown placeholder-text="Select Application" ng-model="microserviceAddDetails.service.application.name" ng-change="microserviceAddDetails.updateApp()">
+                                               <option b2b-dropdown-list option-repeat="d in microserviceAddDetails.availableApps" value="{{d.name}}">{{d.name}}</option>
+                                           </select>
+                                               </div>
+                                       </div>
+
+                                       <div class="error-container"
+                                               ng-show="(microserviceAddDetails.emptyServiceApp 
+                                       || (serviceForm.app.$dirty && microserviceAddDetails.service.application == null))">
+                                               <small id="microservices-details-input-url-required"
+                                                       class="err-message">Please select microservice
+                                                       Application</small>
+                                       </div>
+                               </div>
+
+                               <div class="item required">
+                                       <div class="item-label">Microservice Endpoint URL</div>
+                                       <input id="microservice-details-input-endpoint-url"
+                                               class="table-search-field" ng-model="microserviceAddDetails.service.url"
+                                               ng-change="microserviceAddDetails.updateURL()" type="text"
+                                               name="url" maxlength="200" />
+
+                                       <div class="error-container"
+                                               ng-show="(microserviceAddDetails.emptyServiceURL 
+                                       || (serviceForm.url.$dirty && microserviceAddDetails.service.url == ''))">
+                                               <small id="microservices-details-input-url-required"
+                                                       class="err-message">Microservice Endpoint URL is required</small>
+                                       </div>
+                               </div>
+
+                               <div class="item required">
+                                       <div class="item-label">Security Type</div>
+                                       <div class="service-select">                                    
+                                               <div class="table-dropdown">
+                                                       <select id="microservice-details-input-security-type" name="microservice-details-input-security-type" b2b-dropdown placeholder-text="Select Application" ng-model="microserviceAddDetails.service.security.name" ng-change="microserviceAddDetails.updateApp()">
+                                               <option b2b-dropdown-list option-repeat="d in microserviceAddDetails.availableSecurityTypes" value="{{d.name}}">{{d.name}}</option>                                             
+                                           </select>
+                                               </div>
+                                       </div>                          
+                               </div>
+
+                               <div class="item"
+                                       ng-show="microserviceAddDetails.service.security.id == 1">
+                                       <div class="item-label">Username</div>
+                                       <input id="microservice-details-input-username" class="table-search-field"
+                                               type="text" name="username" maxlength="100"
+                                               ng-model="microserviceAddDetails.service.username" />
+                               </div>
+
+                               <div class="item"
+                                       ng-show="microserviceAddDetails.service.security.id == 1">
+                                       <div class="item-label">Password</div>
+                                       <input id="microservice-details-input-password" class="table-search-field"
+                                               type="password" name="password" maxlength="100"
+                                               ng-model="microserviceAddDetails.service.password" />
+                               </div>
+
+
+                               <div class="item" ng-show="microserviceAddDetails.isEditMode">
+                                       <div class="left-test-item">
+                                               <div class="item-label">Test Microservice</div>
+                                       </div>
+                                       <div class="right-test-item">
+                                               <div id="microservice-details-test-button" class="test-button"
+                                                       ng-click="microserviceAddDetails.testServiceURL()">Test</div>
+                                       </div>
+                               </div>
+
+                               <div class="item" ng-show="microserviceAddDetails.isEditMode">
+                                       <div class="item-label">JSON output</div>
+                                       <textarea id="microservice-details-input-json" class="json-field"
+                                               name="json"></textarea>
+                               </div>
+
+                               <div class="add-para-item">
+                                       <div class="item-label add-label-left">Add User Parameter</div>
+                                       <div class="icon-primary-accordion-plus"
+                                               ng-click="microserviceAddDetails.addParameter()"></div>
+                               </div>
+                               <div class="item">
+                                       <div class="para-label-item-left"
+                                               ng-show="microserviceAddDetails.service.parameterList.length > 0">
+                                               Parameter Key</div>
+                                       <div class="para-label-item-right"
+                                               ng-show="microserviceAddDetails.service.parameterList.length > 0">
+                                               Parameter Default Value</div>
+
+                                       <div id="microservice-details-user-paramters"
+                                               ng-repeat="parameter in microserviceAddDetails.service.parameterList">
+
+                                               <div class="para-item-left">
+                                                       <input id="microservice-details-input-user-parameter-key"
+                                                               class="table-search-field" type="text" name="param-key" maxlength="200"
+                                                               ng-model="parameter.para_key" />
+                                               </div>
+                                               <div class="para-item-middle">
+                                                       <input id="microservice-details-input-user-parameter-value"
+                                                               class="table-search-field" type="text" name="param-value"
+                                                               maxlength="200" ng-model="parameter.para_value" />
+                                               </div>
+
+                                               <div class="icon-primary-accordion-minus para-item-right"
+                                                       ng-click="microserviceAddDetails.removeParamItem(parameter)"></div>
+                                       </div>
+
+                                       <div class="microservice-property">
+                                               <input id="microservices-checkbox-app-is-enabled" type="checkbox"
+                                                       class="checkbox-field"
+                                                       ng-model="microserviceAddDetails.service.active" />
+                                               <div class="property-label checkbox-label">Active</div>
+                                       </div>
+                                       
+                               </div>
+                                       
+                               <div id="microservice-scroll-end"></div>
+                               <div class="dialog-control">
+                                       <button class="btn btn-alt btn-small" id="microservice-details-save-button" ng-click="microserviceAddDetails.saveChanges()">Save</button>                               
+                                       <button class="btn btn-alt btn-small" id="microservice-details-close-button" ng-click="microserviceAddDetails.closeThisDialog()">Close</button> 
+                               </div>
+                       </form>
+               </div>
+
+
+       </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index f612334..8ce9be6 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class MicroserviceAddDetailsCtrl {\r
-        constructor($scope, $log, $interval, widgetsCatalogService, applicationsService, adminsService, microserviceService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies) {\r
-           \r
-          \r
-            let getAvailableApps = () => {       \r
-               applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {\r
-                       this.availableApps=[];\r
-                       apps.unshift({\r
-                        id: 1,\r
-                        name: "ECOMP Portal"\r
-                    });\r
-                       for(var i = 0; i < apps.length; i++) {\r
-                        this.availableApps.push({\r
-                            id: apps[i].id,\r
-                            name: apps[i].name\r
-                        });\r
-                        if(this.isEditMode == true && this.service.appId == apps[i].id){\r
-                               this.service.application = this.availableApps[i];\r
-                        }\r
-                    }\r
-               }).catch(err => {\r
-                    $log.error(err);\r
-                });\r
-            };\r
-            \r
-            let getAvailableWidgets = () => {       \r
-               microserviceService.getWidgetListByService(this.service.id).then(widgets =>{\r
-                       this.availableWidgets = [];\r
-                       for(var i = 0; i < widgets.length; i++){\r
-                               this.availableWidgets.push({\r
-                                       name: widgets[i]\r
-                               })\r
-                       }\r
-               }).catch(err => {\r
-                    $log.error(err);\r
-                });\r
-            };\r
-            \r
-            \r
-            let getAvailableSecurityTypes = () => {   \r
-               this.availableSecurityTypes = [];\r
-               this.availableSecurityTypes.push({\r
-                       id: 0,\r
-                       name: 'No Authentication'\r
-               });\r
-               this.availableSecurityTypes.push({\r
-                       id: 1,\r
-                       name: 'Basic Authentication'\r
-               });\r
-               this.availableSecurityTypes.push({\r
-                       id: 2,\r
-                       name: 'Cookie based Authentication'\r
-               });\r
-            }\r
-\r
-            let init = () => {\r
-               $log.info('MicroserviceAddDetailsCtrl::init');\r
-                this.service = [];\r
-                this.service.parameterList = [];\r
-                this.service.active = true;\r
-                this.emptyServiceName = false;\r
-                this.emptyServiceDesc = false;\r
-                this.emptyServiceURL = false;\r
-                this.emptyServiceApp = false;\r
-                this.dupliateName = false;\r
-                this.serviceList = $scope.ngDialogData.list;\r
-                \r
-                if ($scope.ngDialogData && $scope.ngDialogData.service) {\r
-                       \r
-                    this.isEditMode = true;\r
-                    this.service = _.clone($scope.ngDialogData.service);\r
-                    \r
-                    console.log(this.service);\r
-                    if(this.service.active == 'Y')\r
-                       this.service.active = true;\r
-                    else\r
-                       this.service.active = false;\r
-                } else {\r
-                    this.isEditMode = false;\r
-                } \r
-                getAvailableApps();\r
-                getAvailableSecurityTypes();\r
-                //getAvailableWidgets();\r
-                \r
-                /**\r
-                                * 0: Basic Authentication\r
-                                * \r
-                                * TODO: change the structure\r
-                                */\r
-                if(this.service.securityType == "No Authentication"){\r
-                       this.service.security = this.availableSecurityTypes[0];\r
-                }else if(this.service.securityType == "Basic Authentication"){\r
-                       this.service.security = this.availableSecurityTypes[1];\r
-                }else if(this.service.securityType == "Cookie based Authentication"){\r
-                       this.service.security = this.availableSecurityTypes[2];\r
-                }\r
-            };\r
-             \r
-            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;\r
-            this.conflictMessages = {};\r
-            this.scrollApi = {};\r
-\r
-            let resetConflict = fieldName => {\r
-                delete this.conflictMessages[fieldName];\r
-                if($scope.widgetForm[fieldName]){\r
-                    $scope.widgetForm[fieldName].$setValidity('conflict', true);\r
-                }\r
-            };\r
-\r
-            this.addParameter = () => {\r
-               document.getElementById('microservice-scroll-end').scrollIntoView();\r
-               this.service.parameterList.push({}); \r
-            }\r
-            \r
-            this.closeThisDialog = () => {\r
-               $scope.closeThisDialog(true);\r
-            }\r
-            \r
-            this.removeParamItem = (parameter) => {\r
-               microserviceService.getUserParameterById(parameter.id).then((res) => {\r
-                       if(res.length > 0){\r
-                               var message = res.length + " users have their own widget parameters. Are you sure you want to delete?";\r
-                               confirmBoxService.editItem(message).then(isConfirmed => {\r
-                                       if(isConfirmed){\r
-                                               microserviceService.deleteUserParameterById(parameter.id).then((res) => {\r
-                                                       for(var i = 0; i < this.service.parameterList.length; i++){\r
-                                               if(this.service.parameterList[i].para_key == parameter.para_key\r
-                                               && this.service.parameterList[i].para_value == parameter.para_value){\r
-                                                       this.service.parameterList.splice(i, 1);\r
-                                                       return;\r
-                                               }\r
-                                       }\r
-                                               });\r
-                                       }\r
-                               });\r
-                       }\r
-                       else{\r
-                               for(var i = 0; i < this.service.parameterList.length; i++){\r
-                               if(this.service.parameterList[i].para_key == parameter.para_key\r
-                               && this.service.parameterList[i].para_value == parameter.para_value){\r
-                                       this.service.parameterList.splice(i, 1);\r
-                                       return;\r
-                               }\r
-                       }\r
-                       }\r
-               });\r
-               \r
-               \r
-            }\r
-            \r
-            this.updateServiceName = () => {\r
-               this.dupliateName = false;\r
-               for(var i = 0; i < this.serviceList.length; i++){\r
-                       if(this.serviceList[i].name == this.service.name){\r
-                               this.dupliateName = true;\r
-                               return;\r
-                       }\r
-               }\r
-            }\r
-            \r
-            this.updateDesc = () => {\r
-               this.emptyServiceDesc = false;\r
-            }\r
-            \r
-            this.updateURL = () => {\r
-               this.emptyServiceURL  = false;\r
-            }\r
-            \r
-            this.updateApp = () => {\r
-               this.emptyServiceApp = false;\r
-            }\r
-            \r
-          //This is a fix for dropdown selection, due to b2b dropdown only update value field\r
-               $scope.$watch('microserviceAddDetails.service.application.name', (newVal, oldVal) => {\r
-                       for(var i=0;i<$scope.microserviceAddDetails.availableApps.length;i++){                  \r
-                               if($scope.microserviceAddDetails.availableApps[i].name==newVal){\r
-                                       $scope.microserviceAddDetails.service.application=angular.copy($scope.microserviceAddDetails.availableApps[i]);\r
-                               }\r
-                       }\r
-               });\r
-               $scope.$watch('microserviceAddDetails.service.security.name', (newVal, oldVal) => {\r
-                       for(var i=0;i<$scope.microserviceAddDetails.availableSecurityTypes.length;i++){                         \r
-                               if($scope.microserviceAddDetails.availableSecurityTypes[i].name==newVal){\r
-                                       $scope.microserviceAddDetails.service.security=angular.copy($scope.microserviceAddDetails.availableSecurityTypes[i]);\r
-                               }\r
-                       }\r
-               });\r
-            \r
-            let emptyCookies = () => {\r
-                userProfileService.getUserProfile()\r
-                .then(profile=> {\r
-                    $log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile);\r
-                    $scope.attuid = profile.attuid;\r
-                    $log.info('user has the following attuid: ' + profile.attuid);\r
-                    if ($cookies.getObject($scope.attuid + '_widget') != undefined && $cookies.getObject($scope.attuid + '_widget') != null) {\r
-                        $cookies.remove($scope.attuid + '_widget');\r
-                    }\r
-                });\r
-            };\r
-            \r
-            this.testServiceURL = () =>{\r
-               //console.log(this.service.id);\r
-               widgetsCatalogService.getServiceJSON(this.service.id).then(res => {\r
-                       document.getElementById("microservice-details-input-json").innerHTML = (JSON.stringify(res));\r
-                               });\r
-            }\r
-            \r
-            this.saveChanges = () => {     \r
-               /* TODO: add form validation */\r
-               \r
-               var isValid = true;\r
-               this.updateServiceName();\r
-               \r
-               if(this.service.name == ''\r
-                || this.service.name == undefined){\r
-                       this.emptyServiceName = true;\r
-                       isValid = false;\r
-               }\r
-               \r
-               if(this.dupliateName == true\r
-               && this.isEditMode == false){\r
-                       isValid = false;\r
-               }\r
-                       \r
-               \r
-               if(this.service.desc == ''\r
-               || this.service.desc == undefined){\r
-                       this.emptyServiceDesc = true;\r
-                       isValid = false;\r
-               }\r
-               \r
-               if(this.service.url == ''\r
-                       || this.service.url == undefined){\r
-                       this.emptyServiceURL = true;\r
-                               isValid = false;\r
-                       }\r
-                       \r
-               if(this.service.application == undefined\r
-               || this.service.application == null){\r
-                       this.emptyServiceApp = true;\r
-                       isValid = false;\r
-               }\r
-               \r
-               if(!isValid)\r
-                       return;\r
-               \r
-               /*\r
-                                * Check the parameter list, delete those parameters that don't\r
-                                * have key\r
-                                */\r
-               for(var i = 0; i < this.service.parameterList.length; i++){\r
-                       if(this.service.parameterList[i].para_key == undefined\r
-                       || this.service.parameterList[i].para_key == null\r
-                       || this.service.parameterList[i].para_key == ""){\r
-                               this.service.parameterList.splice(i, 1);\r
-                               i--;\r
-                       }\r
-               }\r
-      \r
-               var securityType;\r
-               var username;\r
-               var password;\r
-               if(this.service.security == undefined ||\r
-               this.service.security == null)\r
-                       securityType = "No Authentication";\r
-               else{\r
-                       securityType = this.service.security.name;\r
-                       username = this.service.username;\r
-                       password = this.service.password;\r
-               }\r
-               \r
-               var active = 'N';\r
-               if(this.service.active == true)\r
-                       active = 'Y';\r
-               \r
-               var newService = {\r
-                               name: this.service.name,\r
-                               desc: this.service.desc,\r
-                               appId: this.service.application.id,\r
-                               url: this.service.url,\r
-                               securityType: securityType,\r
-                               username: username,\r
-                               password: password,\r
-                               active: active,\r
-                               parameterList: this.service.parameterList\r
-               };\r
-               \r
-               if(this.isEditMode){\r
-                       // console.log(this.service.parameterList);\r
-                       var message = "Are you sure you want to change '" + this.service.name + "'?"\r
-                       confirmBoxService.editItem(message).then(isConfirmed => {\r
-                               if(isConfirmed){\r
-                                       microserviceService.updateService(this.service.id, newService).then(() => {\r
-                                               // TODO: result validation check\r
-                                               this.closeThisDialog(); \r
-                                       });\r
-                               }\r
-                       });\r
-               }else{\r
-                       microserviceService.createService(newService).then(() => {\r
-                               // TODO: result validation check\r
-                               $scope.closeThisDialog(true);\r
-                       });\r
-               }\r
-               \r
-            };\r
-            init();\r
-            $scope.$on('$stateChangeStart', e => {\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    MicroserviceAddDetailsCtrl.$inject = ['$scope', '$log', '$interval', 'widgetsCatalogService', 'applicationsService', 'adminsService', 'microserviceService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies'];\r
-    angular.module('ecompApp').controller('MicroserviceAddDetailsCtrl', MicroserviceAddDetailsCtrl);\r
-})(); \r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class MicroserviceAddDetailsCtrl {
+        constructor($scope, $log, $interval, widgetsCatalogService, applicationsService, adminsService, microserviceService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies) {
+           
+          
+            let getAvailableApps = () => {       
+               applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {
+                       this.availableApps=[];
+                       apps.unshift({
+                        id: 1,
+                        name: "ECOMP Portal"
+                    });
+                       for(var i = 0; i < apps.length; i++) {
+                        this.availableApps.push({
+                            id: apps[i].id,
+                            name: apps[i].name
+                        });
+                        if(this.isEditMode == true && this.service.appId == apps[i].id){
+                               this.service.application = this.availableApps[i];
+                        }
+                    }
+               }).catch(err => {
+                    $log.error(err);
+                });
+            };
+            
+            let getAvailableWidgets = () => {       
+               microserviceService.getWidgetListByService(this.service.id).then(widgets =>{
+                       this.availableWidgets = [];
+                       for(var i = 0; i < widgets.length; i++){
+                               this.availableWidgets.push({
+                                       name: widgets[i]
+                               })
+                       }
+               }).catch(err => {
+                    $log.error(err);
+                });
+            };
+            
+            
+            let getAvailableSecurityTypes = () => {   
+               this.availableSecurityTypes = [];
+               this.availableSecurityTypes.push({
+                       id: 0,
+                       name: 'No Authentication'
+               });
+               this.availableSecurityTypes.push({
+                       id: 1,
+                       name: 'Basic Authentication'
+               });
+               this.availableSecurityTypes.push({
+                       id: 2,
+                       name: 'Cookie based Authentication'
+               });
+            }
+
+            let init = () => {
+               $log.info('MicroserviceAddDetailsCtrl::init');
+                this.service = [];
+                this.availableApps=[];
+                this.service.parameterList = [];
+                this.service.active = true;
+                this.emptyServiceName = false;
+                this.emptyServiceDesc = false;
+                this.emptyServiceURL = false;
+                this.emptyServiceApp = false;
+                this.dupliateName = false;
+                this.serviceList = $scope.ngDialogData.list;
+                
+                if ($scope.ngDialogData && $scope.ngDialogData.service) {
+                       
+                    this.isEditMode = true;
+                    this.service = _.clone($scope.ngDialogData.service);
+                    
+                    this.originalName  = this.service.name;
+                    if(this.service.active == 'Y')
+                       this.service.active = true;
+                    else
+                       this.service.active = false;
+                } else {
+                    this.isEditMode = false;
+                } 
+                getAvailableApps();
+                getAvailableSecurityTypes();
+                //getAvailableWidgets();
+                
+                /**
+                                * 0: Basic Authentication
+                                * 
+                                * TODO: change the structure
+                                */
+                if(this.service.securityType == "No Authentication"){
+                       this.service.security = this.availableSecurityTypes[0];
+                }else if(this.service.securityType == "Basic Authentication"){
+                       this.service.security = this.availableSecurityTypes[1];
+                }else if(this.service.securityType == "Cookie based Authentication"){
+                       this.service.security = this.availableSecurityTypes[2];
+                }
+            };
+             
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+            this.conflictMessages = {};
+            this.scrollApi = {};
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                if($scope.widgetForm[fieldName]){
+                    $scope.widgetForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+
+            this.addParameter = () => {
+               document.getElementById('microservice-scroll-end').scrollIntoView();
+               this.service.parameterList.push({}); 
+            }
+            
+            this.closeThisDialog = () => {
+               $scope.closeThisDialog(true);
+            }
+            
+            this.removeParamItem = (parameter) => {
+               microserviceService.getUserParameterById(parameter.id).then((res) => {
+                       if(res.length > 0){
+                               var message = res.length + " users have their own widget parameters. Are you sure you want to delete?";
+                               confirmBoxService.editItem(message).then(isConfirmed => {
+                                       if(isConfirmed){
+                                               microserviceService.deleteUserParameterById(parameter.id).then((res) => {
+                                                       for(var i = 0; i < this.service.parameterList.length; i++){
+                                               if(this.service.parameterList[i].para_key == parameter.para_key
+                                               && this.service.parameterList[i].para_value == parameter.para_value){
+                                                       this.service.parameterList.splice(i, 1);
+                                                       return;
+                                               }
+                                       }
+                                               });
+                                       }
+                               });
+                       }
+                       else{
+                               for(var i = 0; i < this.service.parameterList.length; i++){
+                               if(this.service.parameterList[i].para_key == parameter.para_key
+                               && this.service.parameterList[i].para_value == parameter.para_value){
+                                       this.service.parameterList.splice(i, 1);
+                                       return;
+                               }
+                       }
+                       }
+               });
+               
+               
+            }
+            
+            this.updateServiceName = () => {
+               this.dupliateName = false;
+               for(var i = 0; i < this.serviceList.length; i++){
+                       if(this.serviceList[i].name == this.service.name){
+                               if(this.isEditMode && this.service.name == this.originalName)
+                                       continue;
+                               this.dupliateName = true;
+                               return;
+                       }
+               }
+            }
+            
+            this.updateDesc = () => {
+               this.emptyServiceDesc = false;
+            }
+            
+            this.updateURL = () => {
+               this.emptyServiceURL  = false;
+            }
+            
+            this.updateApp = () => {
+               this.emptyServiceApp = false;
+            }
+            
+          //This is a fix for dropdown selection, due to b2b dropdown only update value field
+               $scope.$watch('microserviceAddDetails.service.application.name', (newVal, oldVal) => {
+                       for(var i=0;i<$scope.microserviceAddDetails.availableApps.length;i++){                  
+                               if($scope.microserviceAddDetails.availableApps[i].name==newVal){
+                                       $scope.microserviceAddDetails.service.application=angular.copy($scope.microserviceAddDetails.availableApps[i]);
+                               }
+                       }
+               });
+               $scope.$watch('microserviceAddDetails.service.security.name', (newVal, oldVal) => {
+                       for(var i=0;i<$scope.microserviceAddDetails.availableSecurityTypes.length;i++){                         
+                               if($scope.microserviceAddDetails.availableSecurityTypes[i].name==newVal){
+                                       $scope.microserviceAddDetails.service.security=angular.copy($scope.microserviceAddDetails.availableSecurityTypes[i]);
+                               }
+                       }
+               });
+            
+            let emptyCookies = () => {
+                userProfileService.getUserProfile()
+                .then(profile=> {
+                    $log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile);
+                    $scope.attuid = profile.attuid;
+                    $log.info('user has the following attuid: ' + profile.attuid);
+                    if ($cookies.getObject($scope.attuid + '_widget') != undefined && $cookies.getObject($scope.attuid + '_widget') != null) {
+                        $cookies.remove($scope.attuid + '_widget');
+                    }
+                });
+            };
+            
+            this.testServiceURL = () =>{
+               widgetsCatalogService.getServiceJSON(this.service.id).then(res => {
+                       document.getElementById("microservice-details-input-json").innerHTML = (JSON.stringify(res));
+                               });
+            }
+            
+            this.saveChanges = () => {     
+               /* TODO: add form validation */
+               
+               var isValid = true;
+               this.updateServiceName();
+               
+               if(this.service.name == ''
+                || this.service.name == undefined){
+                       this.emptyServiceName = true;
+                       isValid = false;
+               }
+               
+               if(this.dupliateName == true){
+                       isValid = false;
+               }
+                       
+               
+               if(this.service.desc == ''
+               || this.service.desc == undefined){
+                       this.emptyServiceDesc = true;
+                       isValid = false;
+               }
+               
+               if(this.service.url == ''
+                       || this.service.url == undefined){
+                       this.emptyServiceURL = true;
+                               isValid = false;
+                       }
+                       
+               if(this.service.application == undefined
+               || this.service.application == null){
+                       this.emptyServiceApp = true;
+                       isValid = false;
+               }
+               
+               if(!isValid)
+                       return;
+               
+               /*
+                                * Check the parameter list, delete those parameters that don't
+                                * have key
+                                */
+               for(var i = 0; i < this.service.parameterList.length; i++){
+                       if(this.service.parameterList[i].para_key == undefined
+                       || this.service.parameterList[i].para_key == null
+                       || this.service.parameterList[i].para_key == ""){
+                               this.service.parameterList.splice(i, 1);
+                               i--;
+                       }
+               }
+      
+               var securityType;
+               var username;
+               var password;
+               if(this.service.security == undefined ||
+               this.service.security == null)
+                       securityType = "No Authentication";
+               else{
+                       securityType = this.service.security.name;
+                       username = this.service.username;
+                       password = this.service.password;
+               }
+               
+               var active = 'N';
+               if(this.service.active == true)
+                       active = 'Y';
+               
+               var newService = {
+                               name: this.service.name,
+                               desc: this.service.desc,
+                               appId: this.service.application.id,
+                               url: this.service.url,
+                               securityType: securityType,
+                               username: username,
+                               password: password,
+                               active: active,
+                               parameterList: this.service.parameterList
+               };
+               
+               if(this.isEditMode){
+                       // console.log(this.service.parameterList);
+                       var message = "Are you sure you want to change '" + this.service.name + "'?"
+                       confirmBoxService.editItem(message).then(isConfirmed => {
+                               if(isConfirmed){
+                                       microserviceService.updateService(this.service.id, newService).then(() => {
+                                               // TODO: result validation check
+                                               this.closeThisDialog(); 
+                                       });
+                               }
+                       });
+               }else{
+                       microserviceService.createService(newService).then(() => {
+                               // TODO: result validation check
+                               $scope.closeThisDialog(true);
+                       });
+               }
+               
+            };
+            init();
+            $scope.$on('$stateChangeStart', e => {
+                e.preventDefault();
+            });
+        }
+    }
+    MicroserviceAddDetailsCtrl.$inject = ['$scope', '$log', '$interval', 'widgetsCatalogService', 'applicationsService', 'adminsService', 'microserviceService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies'];
+    angular.module('ecompApp').controller('MicroserviceAddDetailsCtrl', MicroserviceAddDetailsCtrl);
+})(); 
index 7565b43..74b1b6a 100644 (file)
@@ -1,14 +1,14 @@
 .microservice-onboarding{
-  //.bg_portalWhite;//white for 1702
-  .bg_portalGray;  // gray for 1610
-  position: @page-main-position;
-  top: @page-main-top;
-  left: @page-main-left;
-  right: @page-main-right;
-  bottom: @page-main-bottom;
-  padding-top: @padding-top;
-  overflow-y: @page-main-overflow-y;
-  padding-left: @padding-left-side;
+   .bg_portalWhite;//white for 1702
+    //.bg_portalGray;  // gray for 1610
+    position: @page-main-position;
+    top: @page-main-top;
+    left: @page-main-left;
+    right: @page-main-right;
+    bottom: @page-main-bottom;
+    padding-top: @padding-top;
+    overflow-y: @page-main-overflow-y;
+    padding-left: @padding-left-side;
 
     .microservices-table {
          width: @table-width;
index e3b3128..ecda542 100644 (file)
@@ -1,75 +1,75 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-       <div class="w-ecomp-main-container">\r
-               <div class="microservice-onboarding" id="page-content">\r
-                       <div id="microservice-onboarding-title"\r
-                               class="w-ecomp-main-view-title">Microservice Onboarding</div>\r
-                       <div class="microservices-table">\r
-                               <div class="table-control">\r
-                       <div class="table-control-buttons">\r
-                                               <button class="btn btn-alt btn-small"  id="microservice-onboarding-button-add" ng-click="microserviceOnboarding.openAddNewMicroserviceModal()">\r
-                                       <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Microservice\r
-                               </button> \r
-                                       </div>\r
-                                       <div>\r
-                                               <div class="c-ecomp-b2b-abs-table default">\r
-                                                       <table b2b-table table-data="serviceList"\r
-                                                               search-string="microserviceOnboarding.searchString"\r
-                                                               view-per-page="microserviceOnboarding.viewPerPageIgnored"\r
-                                                               current-page="microserviceOnboarding.currentPageIgnored"\r
-                                                               total-page="microserviceOnboarding.totalPageIgnored">\r
-                                                               <thead b2b-table-row type="header">\r
-                                                                       <tr>\r
-                                                                               <th id="microservice-catalog-th-header-name"\r
-                                                                                       ng-repeat="header in microserviceOnboarding.serviceTableHeaders"\r
-                                                                                       b2b-table-header key="{{header.value}}"\r
-                                                                                       sortable="{{header.isSortable}}">{{header.name}}</th>\r
-                                                                               <th id="microservices-catalog-th-header-delete"\r
-                                                                                       b2b-table-header sortable="false">Delete</th>\r
-                                                                       </tr>\r
-                                                               </thead>\r
-                                                               <tbody b2b-table-row type="body" class="table-body"\r
-                                                                       row-repeat="rowData in serviceList">\r
-\r
-                                                                       <tr>\r
-                                                                               <td b2b-table-body\r
-                                                                                       ng-repeat="header in microserviceOnboarding.serviceTableHeaders"\r
-                                                                                       ng-click="microserviceOnboarding.openAddNewMicroserviceModal(rowData)">\r
-                                                                                       <div\r
-                                                                                               id="microservices-catalog-microservice-name-{{rowData.id}}"\r
-                                                                                               ng-bind="rowData[header.value]"></div>\r
-                                                                               </td>\r
-\r
-                                                                               <td b2b-table-body>\r
-                                                                                       <div id="microservice-onboarding-div-delete-{{$index}}"\r
-                                                                                               class="icon-misc-trash"\r
-                                                                                               ng-click="microserviceOnboarding.deleteService(rowData)"></div>\r
-                                                                               </td>\r
-                                                                       </tr>\r
-                                                               </tbody>\r
-                                                       </table>\r
-                                               </div>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+       <div class="w-ecomp-main-container">
+               <div class="microservice-onboarding" id="page-content">
+                       <div id="microservice-onboarding-title"
+                               class="w-ecomp-main-view-title">Microservice Onboarding</div>
+                       <div class="microservices-table">
+                               <div class="table-control">
+                       <div class="table-control-buttons">
+                                               <button class="btn btn-alt btn-small"  id="microservice-onboarding-button-add" ng-click="microserviceOnboarding.openAddNewMicroserviceModal()">
+                                       <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Microservice
+                               </button> 
+                                       </div>
+                                       <div>
+                                               <div class="c-ecomp-b2b-abs-table default">
+                                                       <table b2b-table table-data="serviceList"
+                                                               search-string="microserviceOnboarding.searchString"
+                                                               view-per-page="microserviceOnboarding.viewPerPageIgnored"
+                                                               current-page="microserviceOnboarding.currentPageIgnored"
+                                                               total-page="microserviceOnboarding.totalPageIgnored">
+                                                               <thead b2b-table-row type="header">
+                                                                       <tr>
+                                                                               <th id="microservice-catalog-th-header-name"
+                                                                                       ng-repeat="header in microserviceOnboarding.serviceTableHeaders"
+                                                                                       b2b-table-header key="{{header.value}}"
+                                                                                       sortable="{{header.isSortable}}">{{header.name}}</th>
+                                                                               <th id="microservices-catalog-th-header-delete"
+                                                                                       b2b-table-header sortable="false">Delete</th>
+                                                                       </tr>
+                                                               </thead>
+                                                               <tbody b2b-table-row type="body" class="table-body"
+                                                                       row-repeat="rowData in serviceList">
+
+                                                                       <tr>
+                                                                               <td b2b-table-body
+                                                                                       ng-repeat="header in microserviceOnboarding.serviceTableHeaders"
+                                                                                       ng-click="microserviceOnboarding.openAddNewMicroserviceModal(rowData)">
+                                                                                       <div
+                                                                                               id="microservices-catalog-microservice-name-{{rowData.id}}"
+                                                                                               ng-bind="rowData[header.value]"></div>
+                                                                               </td>
+
+                                                                               <td b2b-table-body>
+                                                                                       <div id="microservice-onboarding-div-delete-{{$index}}"
+                                                                                               class="icon-misc-trash"
+                                                                                               ng-click="microserviceOnboarding.deleteService(rowData)"></div>
+                                                                               </td>
+                                                                       </tr>
+                                                               </tbody>
+                                                       </table>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </div>
+</div>
index 609dba3..a5ea904 100644 (file)
@@ -1,83 +1,91 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-\r
-    class notificationHistoryCtrl {\r
-        constructor( $scope, $log,notificationService, confirmBoxService, $modal, ngDialog, $state) {\r
-               \r
-               var priorityItems={"1":"Normal","2":"Important"};\r
-               $scope.priorityItems=priorityItems;\r
-            $scope.externalNotification="External System";\r
-               $scope.isLoadingTable = false;\r
-            $scope.searchString = '';\r
-            $scope.notificationHistory = [];\r
-            let getNotificationHistory = () => {\r
-               $scope.isLoadingTable = true;\r
-                notificationService.getNotificationHistory().then(res => {\r
-                    $scope.notificationHistory = res.data;\r
-                    $scope.isLoadingTable = false;\r
-                }).catch(err => {\r
-                    $log.error('notificationHistoryCtlr:notifSvc.getNotifHist failed: ', err);\r
-                    $scope.isLoadingTable = false;\r
-                });\r
-            }\r
-\r
-            getNotificationHistory();           \r
-               \r
-            $scope.showDetailedJsonMessage=function (selectedAdminNotification) {\r
-                                var messageObject=JSON.parse(selectedAdminNotification.msgDescription);\r
-                                var html="";\r
-                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.msgSource+'</p>';\r
-                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.msgHeader+'</p>';\r
-                                 for(var field in  messageObject){\r
-                                        if(field=='eventDate'||field=='lastModifiedDate'){\r
-                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';\r
-                                                 \r
-                                        }else{\r
-                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';\r
-                                        \r
-                                        }\r
-                                }\r
-                       \r
-                    var modalInstance = ngDialog.open({\r
-                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',\r
-                                   controller: 'userNotificationCtrl',\r
-                                   resolve: {\r
-                                       message: function () {\r
-                                               var message = {\r
-                                                          title:    '',\r
-                                               text:    html\r
-                                               \r
-                                               };\r
-                                         return message;\r
-                                       },\r
-                                    \r
-                                     }\r
-                                 }); \r
-                       \r
-                                \r
-                        };\r
-         }\r
-    }\r
-    notificationHistoryCtrl.$inject = ['$scope', '$log', 'notificationService', 'confirmBoxService', '$modal', 'ngDialog', '$state'];\r
-    angular.module('ecompApp').controller('notificationHistoryCtrl', notificationHistoryCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+
+    class notificationHistoryCtrl {
+        constructor( $scope, $log,notificationService, confirmBoxService, $modal, ngDialog, $state) {
+               
+               var priorityItems={"1":"Normal","2":"Important"};
+               $scope.priorityItems=priorityItems;
+            $scope.externalNotification="External System";
+               $scope.isLoadingTable = false;
+            $scope.searchString = '';
+            $scope.notificationHistory = [];
+            let getNotificationHistory = () => {
+               $scope.isLoadingTable = true;
+                notificationService.getNotificationHistory().then(res => {
+                    $scope.notificationHistory = res.data;
+                    $scope.isLoadingTable = false;
+                }).catch(err => {
+                    $log.error('notificationHistoryCtlr:notifSvc.getNotifHist failed: ', err);
+                    $scope.isLoadingTable = false;
+                });
+            }
+
+            getNotificationHistory();           
+               
+            $scope.showDetailedJsonMessage=function (selectedAdminNotification) {
+                        notificationService.getMessageRecipients(selectedAdminNotification.notificationId).then(res =>{
+                    $scope.messageRecipients = res;
+                                var messageObject=JSON.parse(selectedAdminNotification.msgDescription);
+                                var html="";
+                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.msgSource+'</p>';
+                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.msgHeader+'</p>';
+                                html+='<p>'+'Message Recipient'+' : '+$scope.messageRecipients+'</p>';
+
+                                for(var field in  messageObject){
+                                        if(field=='eventDate'||field=='lastModifiedDate'){
+                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';
+                                                 
+                                        }else{
+                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';
+                                        
+                                        }
+                                }
+
+                    var modalInstance = ngDialog.open({
+                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',
+                                   controller: 'userNotificationCtrl',
+                                   resolve: {
+                                       message: function () {
+                                               var message = {
+                                                          title:    '',
+                                               text:    html
+                                               
+                                               };
+                                         return message;
+                                       },
+                                    
+                                     }
+                                 }); 
+                    
+                }).catch(err => {
+                $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err);
+                $scope.isLoadingTable = false;
+            });
+
+                        };
+         }
+    }
+    notificationHistoryCtrl.$inject = ['$scope', '$log', 'notificationService', 'confirmBoxService', '$modal', 'ngDialog', '$state'];
+    angular.module('ecompApp').controller('notificationHistoryCtrl', notificationHistoryCtrl);
+})();
index 5cd56e9..f5d0b29 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-user-notification-history"\r
-       ng-style="{bottom: tabBottom}">\r
-       <div class="user-notification-history" id="page-content">\r
-               <div id='app-title' class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page" >Recent Notifications</h1>\r
-               </div>\r
-               <div class="notifHistTable">\r
-\r
-                       <div class="table-control">\r
-                               <div class="simulateCatGridHeaderDetails">This table shows\r
-                                       notifications published in the last 30 days.</div>\r
-                               <div align="right">\r
-                                       <input class="table-search" type="text" id="input-search"\r
-                                               placeholder="Search in entire table" ng-model="searchString" />\r
-                               </div>\r
-                       </div>\r
-\r
-            <span class="ecomp-spinner" ng-show="isLoadingTable"></span>\r
-\r
-                       <div id="table-main" class="b2b-table-div" ng-hide="isLoadingTable">\r
-                               <table b2b-table id="notification-history-table"\r
-                                       table-data="notificationHistory"\r
-                                       search-string="searchString"\r
-                                       view-per-page="viewPerPagerIgnored"\r
-                                       current-page="ignoredCurrentPage"\r
-                                       total-page="totalPageIgnored">\r
-                                       <thead b2b-table-row type="header">\r
-                                               <tr>\r
-                                                       <th id="th-notif-0" b2b-table-header key="msgSource"\r
-                                                               sortable="true" style=" width: 10px;">Message Source</th>\r
-                                                       <th id="th-notif-1" b2b-table-header key="msgHeader"\r
-                                                               sortable="true">Message</th>\r
-                                                       <th id="th-notif-2" b2b-table-header key="startTime"\r
-                                                               sortable="true">Start Date (Local Time)</th>\r
-                                                       <th id="th-notif-3" b2b-table-header key="endTime"\r
-                                                               sortable="true">End Date  (Local Time)</th>\r
-                                                       <th id="th-notif-4" b2b-table-header key="priority"\r
-                                                               sortable="true">Priority</th>\r
-                                                       <th id="th-notif-5" b2b-table-header key="loginId"\r
-                                                               sortable="true">Created By</th>\r
-                                                       <th id="th-notif-6" b2b-table-header key="createdDate"\r
-                                                               sortable="true">Created Time</th>\r
-                                               </tr>\r
-                                       </thead>\r
-\r
-                                       <tbody b2b-table-row \r
-                                               type="body"\r
-                                               class="table-body"\r
-                                               track-by="$index"\r
-                                               row-repeat="rowData in notificationHistory">\r
-                                               <tr id="row-{{$index}}">\r
-                                                               <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-msgSource">{{rowData.msgSource}}</div>\r
-                                                       </td>\r
-                                                               <td class="td-first" b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}"  ng-click="rowData.msgSource=='EP'||showDetailedJsonMessage(rowData)">\r
-                                                               <div id="{{$index}}-title" style="font-weight: bold;" ng-bind="rowData.msgHeader"></div>\r
-                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource==='EP'"  style="width:500px" ng-bind="rowData.msgDescription"></div>\r
-                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource!=='EP'"  ng-bind="rowData.msgDescription| elipsis: 27"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-startTime" ng-bind="rowData.startTime |     date:'medium'"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-endTime" ng-bind="rowData.endTime | date:'medium'"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-priority" ng-bind="priorityItems[rowData.priority]"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-loginId" ng-bind="!rowData.loginId ? externalNotification : rowData.loginId"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-createdDate" ng-bind="rowData.createdDate | date:'medium'"></div>\r
-                                                       </td>\r
-                                               </tr>\r
-                                       </tbody>\r
-                               </table>\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-user-notification-history"
+       ng-style="{bottom: tabBottom}">
+       <div class="user-notification-history" id="page-content">
+               <div id='app-title' class="w-ecomp-main-view-title">
+                       <h1 class="heading-page" >Recent Notifications</h1>
+               </div>
+               <div class="notifHistTable">
+
+                       <div class="table-control">
+                               <div class="simulateCatGridHeaderDetails">This table shows
+                                       notifications published in the last 30 days.</div>
+                               <div align="right">
+                                       <input class="table-search" type="text" id="input-search"
+                                               placeholder="Search in entire table" ng-model="searchString" />
+                               </div>
+                       </div>
+
+            <span class="ecomp-spinner" ng-show="isLoadingTable"></span>
+
+                       <div id="table-main" class="b2b-table-div" ng-hide="isLoadingTable">
+                               <table b2b-table id="notification-history-table"
+                                       table-data="notificationHistory"
+                                       search-string="searchString"
+                                       view-per-page="viewPerPagerIgnored"
+                                       current-page="ignoredCurrentPage"
+                                       total-page="totalPageIgnored">
+                                       <thead b2b-table-row type="header">
+                                               <tr>
+                                                       <th id="th-notif-0" b2b-table-header key="msgSource"
+                                                               sortable="true" style=" width: 10px;">Message Source</th>
+                                                       <th id="th-notif-1" b2b-table-header key="msgHeader"
+                                                               sortable="true">Message</th>
+                                                       <th id="th-notif-2" b2b-table-header key="startTime"
+                                                               sortable="true">Start Date (Local Time)</th>
+                                                       <th id="th-notif-3" b2b-table-header key="endTime"
+                                                               sortable="true">End Date  (Local Time)</th>
+                                                       <th id="th-notif-4" b2b-table-header key="priority"
+                                                               sortable="true">Priority</th>
+                                                       <th id="th-notif-5" b2b-table-header key="loginId"
+                                                               sortable="true">Created By</th>
+                                                       <th id="th-notif-6" b2b-table-header key="createdDate"
+                                                               sortable="true">Created Time</th>
+                                               </tr>
+                                       </thead>
+
+                                       <tbody b2b-table-row 
+                                               type="body"
+                                               class="table-body"
+                                               track-by="$index"
+                                               row-repeat="rowData in notificationHistory">
+                                               <tr id="row-{{$index}}">
+                                                               <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-msgSource">{{rowData.msgSource}}</div>
+                                                       </td>
+                                                               <td class="td-first" b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}"  ng-click="rowData.msgSource=='EP'||showDetailedJsonMessage(rowData)">
+                                                               <div id="{{$index}}-title" style="font-weight: bold;" ng-bind="rowData.msgHeader"></div>
+                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource==='EP'"  style="width:500px" ng-bind="rowData.msgDescription"></div>
+                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource!=='EP'"  ng-bind="rowData.msgDescription| elipsis: 27"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-startTime" ng-bind="rowData.startTime |     date:'medium'"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-endTime" ng-bind="rowData.endTime | date:'medium'"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-priority" ng-bind="priorityItems[rowData.priority]"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-loginId" ng-bind="!rowData.loginId ? externalNotification : rowData.loginId"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-createdDate" ng-bind="rowData.createdDate | date:'medium'"></div>
+                                                       </td>
+                                               </tr>
+                                       </tbody>
+                               </table>
+                       </div>
+               </div>
+       </div>
+</div>
index 54575d3..466998a 100644 (file)
@@ -1,95 +1,95 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/8/15.\r
- */\r
-'use strict';\r
-(function () {\r
-    class NewPortalAdminModalCtrl {\r
-        constructor($log, portalAdminsService, $scope, confirmBoxService) {\r
-\r
-            let init = () => {\r
-                this.isSaving = false;\r
-                /* istanbul ignore if */\r
-                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){\r
-                    this.selectedUser = $scope.ngDialogData.selectedUser;\r
-                    this.dialogState = $scope.ngDialogData.dialogState;\r
-                }else{\r
-                    this.selectedUser = null;\r
-                    this.dialogState = 1;\r
-                }\r
-                //this.searchUsersInProgress = false;\r
-                //this.showNewAdminAppDropdown = false;\r
-                $log.info('NewPortalAdminModalCtrl:: initiated');\r
-            };\r
-\r
-            this.addNewPortalAdmin = () => {\r
-                confirmBoxService.makeAdminChanges('Are you sure you want to add "' + this.selectedUser.firstName + ' ' + this.selectedUser.lastName + '" as a Portal Admin?')\r
-                    .then(isConfirmed => {\r
-                        if(isConfirmed) {\r
-                            if (!this.selectedUser || !this.selectedUser.orgUserId) {\r
-                                $log.error('NewPortalAdminModalCtrl::makeAdminChanges: No portal admin or ID... cannot add');\r
-                                return;\r
-                            }\r
-                            portalAdminsService.addPortalAdmin(this.selectedUser.orgUserId)\r
-                                .then(() => {\r
-                                    $log.debug("NewPortalAdminModalCtrl::addNewPortalAdmin: portal admin added successfully");\r
-                                    $scope.closeThisDialog(true);\r
-                                }).catch(err => {\r
-                                    if(err.status === 409) {    //Conflict\r
-                                        confirmBoxService.showInformation('This user already exists as a portal admin!').then(function (isConfirmed) {\r
-                                            $scope.closeThisDialog(true);\r
-                                        });\r
-                                    } else {\r
-                                        confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed)  {\r
-                                            $scope.closeThisDialog(true);\r
-                                        });\r
-                                    }\r
-                            });\r
-                        }\r
-                    }).catch(err => {\r
-                        confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed)  {\r
-                            $scope.closeThisDialog(true);\r
-                        });\r
-                        $log.error('portalAdminsService.addPortalAdmin error status: '+ err.status);\r
-                });\r
-            };\r
-\r
-            /**\r
-             * this function set the selected user\r
-             * @param user: selected user object\r
-             */\r
-            this.setSelectedUser = (user) => {\r
-                $log.debug('NewPortalAdminModalCtrl::setSelectedUser: selected user: ', user);\r
-                this.selectedUser = user;\r
-            };\r
-\r
-            init();\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                //**Nabil - note: this will cause the history back state to be replaced with current state\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    NewPortalAdminModalCtrl.$inject = ['$log', 'portalAdminsService', '$scope', 'confirmBoxService'];\r
-    angular.module('ecompApp').controller('NewPortalAdminModalCtrl', NewPortalAdminModalCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/8/15.
+ */
+'use strict';
+(function () {
+    class NewPortalAdminModalCtrl {
+        constructor($log, portalAdminsService, $scope, confirmBoxService) {
+
+            let init = () => {
+                this.isSaving = false;
+                /* istanbul ignore if */
+                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){
+                    this.selectedUser = $scope.ngDialogData.selectedUser;
+                    this.dialogState = $scope.ngDialogData.dialogState;
+                }else{
+                    this.selectedUser = null;
+                    this.dialogState = 1;
+                }
+                //this.searchUsersInProgress = false;
+                //this.showNewAdminAppDropdown = false;
+                $log.info('NewPortalAdminModalCtrl:: initiated');
+            };
+
+            this.addNewPortalAdmin = () => {
+                confirmBoxService.makeAdminChanges('Are you sure you want to add "' + this.selectedUser.firstName + ' ' + this.selectedUser.lastName + '" as a Portal Admin?')
+                    .then(isConfirmed => {
+                        if(isConfirmed) {
+                            if (!this.selectedUser || !this.selectedUser.orgUserId) {
+                                $log.error('NewPortalAdminModalCtrl::makeAdminChanges: No portal admin or ID... cannot add');
+                                return;
+                            }
+                            portalAdminsService.addPortalAdmin(this.selectedUser.orgUserId)
+                                .then(() => {
+                                    $log.debug("NewPortalAdminModalCtrl::addNewPortalAdmin: portal admin added successfully");
+                                    $scope.closeThisDialog(true);
+                                }).catch(err => {
+                                    if(err.status === 409) {    //Conflict
+                                        confirmBoxService.showInformation('This user already exists as a portal admin!').then(function (isConfirmed) {
+                                            $scope.closeThisDialog(true);
+                                        });
+                                    } else {
+                                        confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed)  {
+                                            $scope.closeThisDialog(true);
+                                        });
+                                    }
+                            });
+                        }
+                    }).catch(err => {
+                        confirmBoxService.showInformation('There was a unknown problem adding the portal admin. ' + 'Please try again later. Error Status: '+ err.status).then(function (isConfirmed)  {
+                            $scope.closeThisDialog(true);
+                        });
+                        $log.error('portalAdminsService.addPortalAdmin error status: '+ err.status);
+                });
+            };
+
+            /**
+             * this function set the selected user
+             * @param user: selected user object
+             */
+            this.setSelectedUser = (user) => {
+                $log.debug('NewPortalAdminModalCtrl::setSelectedUser: selected user: ', user);
+                this.selectedUser = user;
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                //**Nabil - note: this will cause the history back state to be replaced with current state
+                e.preventDefault();
+            });
+        }
+    }
+    NewPortalAdminModalCtrl.$inject = ['$log', 'portalAdminsService', '$scope', 'confirmBoxService'];
+    angular.module('ecompApp').controller('NewPortalAdminModalCtrl', NewPortalAdminModalCtrl);
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index d328db8..206dc16 100644 (file)
@@ -1,36 +1,42 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="new-admin-modal">\r
-\r
-    <div class="search-users">\r
-\r
-        <search-users search-title="Add New Portal Admin"\r
-                      selected-user="newPortalAdmin.selectedUser"></search-users>\r
-\r
-        <div class="dialog-control">\r
-            \r
-               <button id="pa-search-users-button-save" class="btn btn-alt btn-small"\r
-                 ng-click="newPortalAdmin.selectedUser && newPortalAdmin.addNewPortalAdmin()"\r
-                 ng-class="{disabled: !newPortalAdmin.selectedUser}">Save\r
-            </button>\r
-            <button id="pa-search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="new-admin-modal">
+
+    <div class="search-users">
+
+        <search-users search-title="Add New Portal Admin"
+                      selected-user="newPortalAdmin.selectedUser"></search-users>
+
+        <div class="dialog-control">
+            
+               <button id="pa-search-users-button-save" class="btn btn-alt btn-small"
+                 ng-click="newPortalAdmin.selectedUser && newPortalAdmin.addNewPortalAdmin()"
+                 ng-class="{disabled: !newPortalAdmin.selectedUser}">Save
+            </button>
+            <button id="pa-search-users-button-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
+        </div>
+    </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 0051e70..89f6d0a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class PortalAdminsCtrl {\r
-        constructor($log, portalAdminsService, ngDialog, confirmBoxService) {\r
-\r
-            let updateTableData = () => {\r
-                this.isLoadingTable = true;\r
-                portalAdminsService.getPortalAdmins().then(result=> {\r
-                    $log.debug('PortalAdminsCtrl::updateTableData: result: ' + JSON.stringify(result));\r
-                    if (!result || !result.length) {\r
-                        $log.info('PortalAdminsCtrl::updateTableData: no Portal Admins err handling');\r
-                        this.portalAdminsTableData = [];\r
-                        return;\r
-                    }\r
-                    this.portalAdminsTableData = result;\r
-                }).catch(err=> {\r
-                    $log.error('PortalAdminsCtrl::updateTableData error :',err);\r
-                    confirmBoxService.showInformation('There was a problem retrieving the portal admins. ' +\r
-                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});\r
-\r
-                }).finally(() => {\r
-                    this.isLoadingTable = false;\r
-                });\r
-            };\r
-\r
-            let init = () => {\r
-                $log.info('portalAdminsService.getPortalAdmins::initializing...');\r
-                this.isLoadingTable = false;\r
-\r
-                /*Table general configuration params*/\r
-                this.searchString= '';\r
-                /*Table data*/\r
-                this.portalAdminsTableHeaders = ['First Name', 'Last Name', 'User ID', 'Delete'];\r
-                this.portalAdminsTableData = [];\r
-                updateTableData();\r
-            };\r
-\r
-            init();\r
-\r
-            this.removePortalAdmin = pAdmin => {\r
-                $log.debug('PortalAdminsCtrl::removePortalAdmin: pAdmin = ' + JSON.stringify(pAdmin));\r
-                confirmBoxService.deleteItem(pAdmin.firstName + ' ' + pAdmin.lastName )\r
-                    .then(isConfirmed => {\r
-                    if(isConfirmed){\r
-                        if(!pAdmin || !pAdmin.userId){\r
-                            $log.error('PortalAdminsCtrl::removePortalAdmin No portal admin or ID... cannot delete');\r
-                            return;\r
-                        }\r
-                        portalAdminsService.removePortalAdmin(pAdmin.userId,pAdmin.loginId).then(() => {\r
-                            $log.info("PortalAdminsCtrl::removePortalAdmin removed admin");\r
-                            init();\r
-                        }).catch(err => {\r
-                            $log.error('PortalAdminsCtrl::removePortalAdmin.deleteItem error: '+ err);\r
-                            confirmBoxService.showInformation('There was a problem deleting this portal admins. ' +\r
-                                'Please try again later. Error: ' + err.status).then(isConfirmed => {});\r
-                        });\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('PortalAdminsCtrl::removePortalAdmin.deleteItem error: '+ err);\r
-                });\r
-            };\r
-            \r
-            this.openAddNewPortalAdminModal = (user) => {\r
-                let data = null;\r
-                if(user){\r
-                    data = {\r
-                        dialogState: 2,\r
-                        selectedUser:{\r
-                            orgUserId: user.orgUserId,\r
-                            firstName: user.firstName,\r
-                            lastName: user.lastName\r
-                        }\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html',\r
-                    controller: 'NewPortalAdminModalCtrl',\r
-                    controllerAs: 'newPortalAdmin',\r
-                    data: data\r
-                }).closePromise.then(needUpdate => {\r
-                    if(needUpdate.value === true){\r
-                        $log.debug('PortalAdminsCtrl::openAddNewPortalAdminModal: updating Portal Admin table data...');\r
-                        updateTableData();\r
-                    }\r
-                });\r
-            };\r
-        }\r
-    }\r
-    PortalAdminsCtrl.$inject = ['$log', 'portalAdminsService', 'ngDialog', 'confirmBoxService'];\r
-    angular.module('ecompApp').controller('PortalAdminsCtrl', PortalAdminsCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class PortalAdminsCtrl {
+        constructor($log, portalAdminsService, ngDialog, confirmBoxService) {
+
+            let updateTableData = () => {
+                this.isLoadingTable = true;
+                portalAdminsService.getPortalAdmins().then(result=> {
+                    $log.debug('PortalAdminsCtrl::updateTableData: result: ' + JSON.stringify(result));
+                    if (!result || !result.length) {
+                        $log.info('PortalAdminsCtrl::updateTableData: no Portal Admins err handling');
+                        this.portalAdminsTableData = [];
+                        return;
+                    }
+                    this.portalAdminsTableData = result;
+                }).catch(err=> {
+                    $log.error('PortalAdminsCtrl::updateTableData error :',err);
+                    confirmBoxService.showInformation('There was a problem retrieving the portal admins. ' +
+                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});
+
+                }).finally(() => {
+                    this.isLoadingTable = false;
+                });
+            };
+
+            let init = () => {
+                $log.info('portalAdminsService.getPortalAdmins::initializing...');
+                this.isLoadingTable = false;
+
+                /*Table general configuration params*/
+                this.searchString= '';
+                /*Table data*/
+                this.portalAdminsTableHeaders = ['First Name', 'Last Name', 'User ID', 'Delete'];
+                this.portalAdminsTableData = [];
+                updateTableData();
+            };
+
+            init();
+
+            this.removePortalAdmin = pAdmin => {
+                $log.debug('PortalAdminsCtrl::removePortalAdmin: pAdmin = ' + JSON.stringify(pAdmin));
+                confirmBoxService.deleteItem(pAdmin.firstName + ' ' + pAdmin.lastName )
+                    .then(isConfirmed => {
+                    if(isConfirmed){
+                        if(!pAdmin || !pAdmin.userId){
+                            $log.error('PortalAdminsCtrl::removePortalAdmin No portal admin or ID... cannot delete');
+                            return;
+                        }
+                        portalAdminsService.removePortalAdmin(pAdmin.userId,pAdmin.loginId).then(() => {
+                            $log.info("PortalAdminsCtrl::removePortalAdmin removed admin");
+                            init();
+                        }).catch(err => {
+                            $log.error('PortalAdminsCtrl::removePortalAdmin.deleteItem error: '+ err);
+                            confirmBoxService.showInformation('There was a problem deleting this portal admins. ' +
+                                'Please try again later. Error: ' + err.status).then(isConfirmed => {});
+                        });
+                    }
+                }).catch(err => {
+                    $log.error('PortalAdminsCtrl::removePortalAdmin.deleteItem error: '+ err);
+                });
+            };
+            
+            this.openAddNewPortalAdminModal = (user) => {
+                let data = null;
+                if(user){
+                    data = {
+                        dialogState: 2,
+                        selectedUser:{
+                            orgUserId: user.orgUserId,
+                            firstName: user.firstName,
+                            lastName: user.lastName
+                        }
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/portal-admin/new-portal-admin/new-portal-admin.modal.html',
+                    controller: 'NewPortalAdminModalCtrl',
+                    controllerAs: 'newPortalAdmin',
+                    data: data
+                }).closePromise.then(needUpdate => {
+                    if(needUpdate.value === true){
+                        $log.debug('PortalAdminsCtrl::openAddNewPortalAdminModal: updating Portal Admin table data...');
+                        updateTableData();
+                    }
+                });
+            };
+        }
+    }
+    PortalAdminsCtrl.$inject = ['$log', 'portalAdminsService', 'ngDialog', 'confirmBoxService'];
+    angular.module('ecompApp').controller('PortalAdminsCtrl', PortalAdminsCtrl);
+})();
index 43f830c..33268ef 100644 (file)
@@ -1,64 +1,64 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-    <div class="w-ecomp-main-container" >\r
-        <div class="portal-admins-page-main" id="page-content" >\r
-            <div id="title" class="w-ecomp-main-view-title">\r
-                <h1 class="heading-page" >Portal Admins</h1>\r
-            </div>\r
-            <div class="portal-admins-table">\r
-                <div class="table-control">\r
-                       <div class="table-control-fields">\r
-                                               <input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="portalAdmin.searchString">\r
-                                       </div>\r
-                                       <div class="table-control-buttons">\r
-                                               <button class="btn btn-alt btn-small" ng-click="portalAdmin.openAddNewPortalAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Portal Admin</button>            \r
-                                       </div>      \r
-                </div>\r
-\r
-                <span class="ecomp-spinner" ng-show="portalAdmin.isLoadingTable"></span>\r
-                \r
-                <div b2b-table table-data="portalAdmin.portalAdminsTableData"  ng-hide="portalAdmin.isLoadingTable"    search-string="portalAdmin.searchString" class="b2b-table-div">\r
-                                       <table>\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr >\r
-                                                               <th b2b-table-header key="firstName" sortable="true" id="col1">First Name</th>\r
-                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>\r
-                                                               <th b2b-table-header key="loginId" sortable="true" id="col3">User ID</th>\r
-                                                               <th b2b-table-header key="" sortable="falses" id="col4">Delete</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <tbody b2b-table-row type="body"        row-repeat="rowData in portalAdmin.portalAdminsTableData">\r
-                                                       <tr>\r
-                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.loginId"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">\r
-                                                                       <span class="icon-misc-trash" ng-click="portalAdmin.removePortalAdmin(rowData)"></span>\r
-                                                               </td>                                                   \r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>\r
-            </div>\r
-        </div>\r
-    </div>\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+    <div class="w-ecomp-main-container" >
+        <div class="portal-admins-page-main" id="page-content" >
+            <div id="title" class="w-ecomp-main-view-title">
+                <h1 class="heading-page" >Portal Admins</h1>
+            </div>
+            <div class="portal-admins-table">
+                <div class="table-control">
+                       <div class="table-control-fields">
+                                               <input id="input-table-search" placeholder="Search in entire table" class="table-search-field" type="text" data-ng-model="portalAdmin.searchString">
+                                       </div>
+                                       <div class="table-control-buttons">
+                                               <button class="btn btn-alt btn-small" ng-click="portalAdmin.openAddNewPortalAdminModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Portal Admin</button>            
+                                       </div>      
+                </div>
+
+                <span class="ecomp-spinner" ng-show="portalAdmin.isLoadingTable"></span>
+                
+                <div b2b-table table-data="portalAdmin.portalAdminsTableData"  ng-hide="portalAdmin.isLoadingTable"    search-string="portalAdmin.searchString" class="b2b-table-div">
+                                       <table>
+                                               <thead b2b-table-row type="header">
+                                                       <tr >
+                                                               <th b2b-table-header key="firstName" sortable="true" id="col1" default-sort="a">First Name</th>
+                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>
+                                                               <th b2b-table-header key="loginId" sortable="true" id="col3">User ID</th>
+                                                               <th b2b-table-header key="" sortable="falses" id="col4">Delete</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody b2b-table-row type="body"        row-repeat="rowData in portalAdmin.portalAdminsTableData">
+                                                       <tr>
+                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.loginId"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
+                                                                       <span class="icon-misc-trash" ng-click="portalAdmin.removePortalAdmin(rowData)"></span>
+                                                               </td>                                                   
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>
+            </div>
+        </div>
+    </div>
+
+</div>
index 3970960..c5673da 100644 (file)
@@ -1,55 +1,59 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-\r
-<div class="new-admin-modal" style="height: 350px;">\r
-       <form name="adminForm" novalidate>\r
-               <div class="title" ng-bind="label" style="color: #5a5a5a;font-size: 18px;border-bottom: #067ab4 3px solid;margin-left:0px"></div>\r
-\r
-               <div id="name-property-title" class="property required">\r
-                       <div id="name-property-label" class="property-label" style="margin-bottom: 5px;    color: #5a5a5a;       font-size: 14px;    font-weight: bold;    padding-top: 20px;">\r
-                               <sup><b style="color: Red;">*</b></sup>Name:</div>\r
-                       <input id="name-property-input" type="text" class="input-field" style=" display: inline-block; width: 396px; height: 40px;"ng-model="editRoleFunction.name" maxlength="30" />\r
-                       <div id="name-property-required" ng-show="!editRoleFunction.name||editRoleFunction.name.length==0" style="color: #cf2a2a; font-size: 10px;"><small style="position: absolute;">Name is Required</small>\r
-                               </div>\r
-               </div>\r
-               <br />\r
-               <div id="code-property-title" class="property required">\r
-                       <div id="code-property-label" class="property-label" style="    margin-bottom: 5px;    color: #5a5a5a;       font-size: 14px;    font-weight: bold;    padding-top: 20px;">\r
-                               <sup><b style="color: Red;">*</b></sup>Code:\r
-                       </div>\r
-                  <input id="code-property-input" type="text" class="input-field" style=" display: inline-block; width: 396px; height: 40px;"\r
-                               ng-model="editRoleFunction.code" ng-disabled="disableCd"\r
-                               maxlength="30" />\r
-                               <div id="code-property-required" ng-show="!editRoleFunction.code||editRoleFunction.code.length==0" style="color: #cf2a2a; font-size: 10px;"><small style="position: absolute;">Code is Required</small>\r
-                               </div>\r
-               </div>\r
-               \r
-\r
-\r
-       <div class="dialog-control">\r
-                               \r
-                                       <button id="button-app-save" class="save-button" size="small" ng-disabled="(!editRoleFunction.name||editRoleFunction.name.length==0)||(!editRoleFunction.code||editRoleFunction.code.length==0 )" ng-click="!saveRoleFunction(editRoleFunction)";herf="javascript:void(0)">Save</button>\r
-                                               \r
-                                               <div id="button-app-cancel" class="cancel-button" ng-click="closeThisDialog()" role="button" tabindex="0" herf="javascript:void(0)">Cancel</div>\r
-               </div>\r
-       </form>\r
-</div>\r
-\r
-\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+
+<div class="new-admin-modal" style="height: 350px;">
+       <form name="adminForm" novalidate>
+               <div class="title" ng-bind="label" style="color: #5a5a5a;font-size: 18px;border-bottom: #067ab4 3px solid;margin-left:0px"></div>
+
+               <div id="name-property-title" class="property required">
+                       <div id="name-property-label" class="property-label" style="margin-bottom: 5px;    color: #5a5a5a;       font-size: 14px;    font-weight: bold;    padding-top: 20px;">
+                               <sup><b style="color: Red;">*</b></sup>Name:</div>
+                       <input id="name-property-input" type="text" class="input-field" style=" display: inline-block; width: 396px; height: 40px;"ng-model="editRoleFunction.name" maxlength="30" />
+                       <div id="name-property-required" ng-show="!editRoleFunction.name||editRoleFunction.name.length==0" style="color: #cf2a2a; font-size: 10px;"><small style="position: absolute;">Name is Required</small>
+                               </div>
+               </div>
+               <br />
+               <div id="code-property-title" class="property required">
+                       <div id="code-property-label" class="property-label" style="    margin-bottom: 5px;    color: #5a5a5a;       font-size: 14px;    font-weight: bold;    padding-top: 20px;">
+                               <sup><b style="color: Red;">*</b></sup>Code:
+                       </div>
+                  <input id="code-property-input" type="text" class="input-field" style=" display: inline-block; width: 396px; height: 40px;"
+                               ng-model="editRoleFunction.code" ng-disabled="disableCd"
+                               maxlength="30" />
+                               <div id="code-property-required" ng-show="!editRoleFunction.code||editRoleFunction.code.length==0" style="color: #cf2a2a; font-size: 10px;"><small style="position: absolute;">Code is Required</small>
+                               </div>
+               </div>
+               
+
+
+       <div class="dialog-control">
+                               
+                                       <button id="button-app-save" class="save-button" size="small" ng-disabled="(!editRoleFunction.name||editRoleFunction.name.length==0)||(!editRoleFunction.code||editRoleFunction.code.length==0 )" ng-click="!saveRoleFunction(editRoleFunction)";herf="javascript:void(0)">Save</button>
+                                               
+                                               <div id="button-app-cancel" class="cancel-button" ng-click="closeThisDialog()" role="button" tabindex="0" herf="javascript:void(0)">Cancel</div>
+               </div>
+       </form>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index c5c7c97..2bd522a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-\r
-app.controller('roleController', function ($scope, $http, confirmBoxService, ngDialog, RoleService, conf, $stateParams){\r
-       //$scope.role=${role};\r
-               \r
-       $( "#dialogRoleFunction" ).hide();\r
-       $( "#dialogChildRole" ).hide();\r
-       \r
-       //$scope.ociavailableRoleFunctions=${availableRoleFunctions};\r
-       $scope.fetchRoles = function() {\r
-       \r
-       RoleService.getRole($stateParams.roleId).then(function(data){\r
-               \r
-               var j = data;\r
-               $scope.data = JSON.parse(j.data);\r
-               \r
-               $scope.role =JSON.parse($scope.data.role);\r
-               \r
-               $scope.ociavailableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);\r
-               $scope.availableRoleFunctions=[];\r
-               \r
-               if($scope.ociavailableRoleFunctions)\r
-                       $.each($scope.ociavailableRoleFunctions, function(i, a){ \r
-                               var availableRoleFunction = a;\r
-                               availableRoleFunction.selected = false;\r
-                           $.each($scope.role.roleFunctions, function(j, b){ \r
-                               if(a.code === b.code) {\r
-                                       availableRoleFunction.selected = true;\r
-                               }\r
-                           });\r
-                           $scope.availableRoleFunctions.push(availableRoleFunction);      \r
-               });     \r
-               \r
-\r
-               $scope.ociavailableRoles=JSON.parse($scope.data.availableRoles);\r
-               $scope.availableRoles=[];\r
-               \r
-               if($scope.ociavailableRoles)\r
-                       $.each($scope.ociavailableRoles, function(i, a){ \r
-                               var availableRole = a;\r
-                               availableRole.selected = false;\r
-                               if($scope.role.childRoles){\r
-                           $.each($scope.role.childRoles, function(j, b){ \r
-                               if(a.id === b.id) {\r
-                                       availableRole.selected = true;\r
-                               }\r
-                           });\r
-                               };\r
-                           $scope.availableRoles.push(availableRole);      \r
-               });\r
-                       \r
-       \r
-       },function(error){\r
-               console.log("RoleService.getRole failed", error);\r
-               //reloadPageOnce();\r
-       });\r
-       }\r
-       \r
-       $scope.fetchRoles();\r
-\r
-       $scope.saveRole = function() {\r
-                               var exists = false,x;   \r
-                               for(x in $scope.availableRoles){\r
-                                       if($scope.availableRoles[x].name==$scope.role.name){\r
-                                               exists = true;\r
-                                               //$modalInstance.close({availableRoleFunctions:message.availableRoleFunctions});\r
-                                       }\r
-                               }\r
-                               if (exists) {\r
-                                       confirmBoxService.showInformation( "Role already exists.");\r
-                               }\r
-                               else {\r
-                                       var uuu = conf.api.saveRole + "?role_id="+$stateParams.roleId;\r
-                                       var postData = {\r
-                                                       role: $scope.role, \r
-                                                       childRoles: $scope.role.childRoles,\r
-                                                       roleFunctions : $scope.role.roleFunctions\r
-                                       };\r
-                                       $http.post(uuu, JSON.stringify(postData)).then(function(res) {\r
-                                               // console.log('roleController::saveRole: ' + JSON.stringify(res));\r
-                                               if (res && res.data && res.data.role)\r
-                                                       confirmBoxService.showInformation("Update Successful.");\r
-                                               else\r
-                                                       confirmBoxService.showInformation('Failed to create role: ' + res.data.error)\r
-                                       },\r
-                                       function(res){\r
-                                               console.log('post failed', res.data);\r
-                                               confirmBoxService.showInformation("Error while saving.");\r
-                                       }\r
-                                       );\r
-                               }\r
-                       };\r
-               \r
-       $scope.addNewRoleFunctionModalPopup = function() {\r
-                       var modalInstance = ngDialog.open({\r
-                           templateUrl: 'app/views/role/role_functions_popup.html',\r
-                           controller: 'rolepopupController',\r
-                           \r
-                           resolve: {\r
-                               roleId: function () {\r
-                                         return $stateParams.roleId;\r
-                                       },\r
-                               role: function () {\r
-                                 return $scope.role;\r
-                               },\r
-                               availableRoles: function () {\r
-                                         return $scope.ociavailableRoles;\r
-                                   },\r
-                                   availableRoleFunctions: function () {\r
-                                         return $scope.ociavailableRoleFunctions;\r
-                                   },\r
-                             }\r
-                         });\r
-                        modalInstance.closePromise.then(response => {\r
-                                       if($stateParams.roleId === '0'){\r
-                                               return $scope.role;\r
-                                       }else{\r
-                                               $scope.fetchRoles();\r
-                                       }\r
-                  // $scope.role=response.role;\r
-               });\r
-       };\r
-               \r
-        $scope.addNewChildRoleModalPopup = function() {\r
-                       var modalInstance = ngDialog.open({\r
-                           templateUrl: 'app/views/role/role_childrole_popup.html',\r
-                           controller: 'rolepopupController',\r
-                         \r
-                           resolve: {\r
-                               roleId: function () {\r
-                                         return $stateParams.roleId;\r
-                                       },\r
-                               role: function () {\r
-                                 return $scope.role;\r
-                               },\r
-                               availableRoles: function () {\r
-                                         return $scope.ociavailableRoles;\r
-                                   },\r
-                                   availableRoleFunctions: function () {\r
-                                         return $scope.ociavailableRoleFunctions;\r
-                                   },\r
-                             }\r
-                         }).closePromise.then(function(response){\r
-                                       if($stateParams.roleId === '0'){\r
-                                                return $scope.role;\r
-                                       }else{\r
-                                   $scope.fetchRoles();\r
-                                       }\r
-                   //$scope.role=response.role;\r
-               });\r
-               };\r
-               \r
-               $scope.removeRoleFunction = function(roleFunction) {\r
-                       confirmBoxService.confirm("You are about to remove the role function "+roleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                               var uuu = conf.api.toggleRoleRoleFunction + "?role_id=" + $stateParams.roleId;\r
-                                                 var postData={roleFunction:roleFunction};\r
-                                                       if(confirmed) { \r
-                                                               $http.post(uuu, postData).then(\r
-                                                                               function(response) {\r
-                                                                                       $scope.role= response.data.role;\r
-                                                                                       $.each($scope.availableRoleFunctions, function(k, c){ \r
-                                                                                       if(c.code === roleFunction.code) {\r
-                                                                                               c.selected = false;\r
-                                                                                       }\r
-                                                                                   });\r
-                                                                               }, \r
-                                                                               function(response) {\r
-                                                                                       confirmBoxService.showInformation("Error while saving.");\r
-                                                                               }\r
-                                                               );                                                                      \r
-                                                               }\r
-                               \r
-               });\r
-               \r
-               };\r
-               \r
-               $scope.removeChildRole = function(childRole) {\r
-                       confirmBoxService.confirm("You are about to remove the child role "+childRole.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                       var uuu = conf.api.toggleRoleChildRole + "?role_id=" + $stateParams.roleId;\r
-                                         var postData={childRole:childRole};\r
-                                         if(confirmed) {\r
-                                                         $http.post(uuu,postData).then( function(response) {\r
-                                                                 $scope.role=response.data.role;\r
-                                                                 $.each($scope.availableRoles, function(k, c){ \r
-                                                                       if(c.id === childRole.id) {\r
-                                                                               c.selected = false;\r
-                                                                       }\r
-                                                                   });\r
-                                                                 },\r
-                                                                 \r
-                                                                 function(data) {\r
-                                                                         confirmBoxService.showInformation("Error while saving.");\r
-                                                                 });\r
-                                               }                               \r
-               });\r
-                       \r
-               };\r
-               \r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+app.controller('roleController', function ($scope, $http, confirmBoxService, ngDialog, RoleService, conf, $stateParams){
+       //$scope.role=${role};
+               
+       $( "#dialogRoleFunction" ).hide();
+       $( "#dialogChildRole" ).hide();
+       
+       //$scope.ociavailableRoleFunctions=${availableRoleFunctions};
+       $scope.fetchRoles = function() {
+       
+       RoleService.getRole($stateParams.roleId).then(function(data){
+               
+               var j = data;
+               $scope.data = JSON.parse(j.data);
+               
+               $scope.role =JSON.parse($scope.data.role);
+               
+               $scope.ociavailableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);
+               $scope.availableRoleFunctions=[];
+               
+               if($scope.ociavailableRoleFunctions)
+                       $.each($scope.ociavailableRoleFunctions, function(i, a){ 
+                               var availableRoleFunction = a;
+                               availableRoleFunction.selected = false;
+                           $.each($scope.role.roleFunctions, function(j, b){ 
+                               if(a.code === b.code) {
+                                       availableRoleFunction.selected = true;
+                               }
+                           });
+                           $scope.availableRoleFunctions.push(availableRoleFunction);      
+               });     
+               
+
+               $scope.ociavailableRoles=JSON.parse($scope.data.availableRoles);
+               $scope.availableRoles=[];
+               
+               if($scope.ociavailableRoles)
+                       $.each($scope.ociavailableRoles, function(i, a){ 
+                               var availableRole = a;
+                               availableRole.selected = false;
+                               if($scope.role.childRoles){
+                           $.each($scope.role.childRoles, function(j, b){ 
+                               if(a.id === b.id) {
+                                       availableRole.selected = true;
+                               }
+                           });
+                               };
+                           $scope.availableRoles.push(availableRole);      
+               });
+                       
+       
+       },function(error){
+               console.log("RoleService.getRole failed", error);
+               //reloadPageOnce();
+       });
+       }
+       
+       $scope.fetchRoles();
+
+       $scope.saveRole = function() {
+                               var exists = false,x;   
+                               for(x in $scope.availableRoles){
+                                       if($scope.availableRoles[x].name==$scope.role.name){
+                                               exists = true;
+                                               //$modalInstance.close({availableRoleFunctions:message.availableRoleFunctions});
+                                       }
+                               }
+                               if (exists) {
+                                       confirmBoxService.showInformation( "Role already exists.");
+                               }
+                               else {
+                                       var uuu = conf.api.saveRole + "?role_id="+$stateParams.roleId;
+                                       var postData = {
+                                                       role: $scope.role, 
+                                                       childRoles: $scope.role.childRoles,
+                                                       roleFunctions : $scope.role.roleFunctions
+                                       };
+                                       $http.post(uuu, JSON.stringify(postData)).then(function(res) {
+                                               // console.log('roleController::saveRole: ' + JSON.stringify(res));
+                                               if (res && res.data && res.data.role)
+                                                       confirmBoxService.showInformation("Update Successful.");
+                                               else
+                                                       confirmBoxService.showInformation('Failed to create role: ' + res.data.error)
+                                       },
+                                       function(res){
+                                               console.log('post failed', res.data);
+                                               confirmBoxService.showInformation("Error while saving.");
+                                       }
+                                       );
+                               }
+                       };
+               
+       $scope.addNewRoleFunctionModalPopup = function() {
+                       var modalInstance = ngDialog.open({
+                           templateUrl: 'app/views/role/role_functions_popup.html',
+                           controller: 'rolepopupController',
+                           
+                           resolve: {
+                               roleId: function () {
+                                         return $stateParams.roleId;
+                                       },
+                               role: function () {
+                                 return $scope.role;
+                               },
+                               availableRoles: function () {
+                                         return $scope.ociavailableRoles;
+                                   },
+                                   availableRoleFunctions: function () {
+                                         return $scope.ociavailableRoleFunctions;
+                                   },
+                             }
+                         });
+                        modalInstance.closePromise.then(response => {
+                                       if($stateParams.roleId === '0'){
+                                               return $scope.role;
+                                       }else{
+                                               $scope.fetchRoles();
+                                       }
+                  // $scope.role=response.role;
+               });
+       };
+               
+        $scope.addNewChildRoleModalPopup = function() {
+                       var modalInstance = ngDialog.open({
+                           templateUrl: 'app/views/role/role_childrole_popup.html',
+                           controller: 'rolepopupController',
+                         
+                           resolve: {
+                               roleId: function () {
+                                         return $stateParams.roleId;
+                                       },
+                               role: function () {
+                                 return $scope.role;
+                               },
+                               availableRoles: function () {
+                                         return $scope.ociavailableRoles;
+                                   },
+                                   availableRoleFunctions: function () {
+                                         return $scope.ociavailableRoleFunctions;
+                                   },
+                             }
+                         }).closePromise.then(function(response){
+                                       if($stateParams.roleId === '0'){
+                                                return $scope.role;
+                                       }else{
+                                   $scope.fetchRoles();
+                                       }
+                   //$scope.role=response.role;
+               });
+               };
+               
+               $scope.removeRoleFunction = function(roleFunction) {
+                       confirmBoxService.confirm("You are about to remove the role function "+roleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                               var uuu = conf.api.toggleRoleRoleFunction + "?role_id=" + $stateParams.roleId;
+                                                 var postData={roleFunction:roleFunction};
+                                                       if(confirmed) { 
+                                                               $http.post(uuu, postData).then(
+                                                                               function(response) {
+                                                                                       $scope.role= response.data.role;
+                                                                                       $.each($scope.availableRoleFunctions, function(k, c){ 
+                                                                                       if(c.code === roleFunction.code) {
+                                                                                               c.selected = false;
+                                                                                       }
+                                                                                   });
+                                                                               }, 
+                                                                               function(response) {
+                                                                                       confirmBoxService.showInformation("Error while saving.");
+                                                                               }
+                                                               );                                                                      
+                                                               }
+                               
+               });
+               
+               };
+               
+               $scope.removeChildRole = function(childRole) {
+                       confirmBoxService.confirm("You are about to remove the child role "+childRole.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                       var uuu = conf.api.toggleRoleChildRole + "?role_id=" + $stateParams.roleId;
+                                         var postData={childRole:childRole};
+                                         if(confirmed) {
+                                                         $http.post(uuu,postData).then( function(response) {
+                                                                 $scope.role=response.data.role;
+                                                                 $.each($scope.availableRoles, function(k, c){ 
+                                                                       if(c.id === childRole.id) {
+                                                                               c.selected = false;
+                                                                       }
+                                                                   });
+                                                                 },
+                                                                 
+                                                                 function(data) {
+                                                                         confirmBoxService.showInformation("Error while saving.");
+                                                                 });
+                                               }                               
+               });
+                       
+               };
+               
+});
index c7a1bfd..e719599 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-app.controller('roleFunctionListController', function ($scope,RoleService,$http,$state,conf,confirmBoxService, ngDialog){\r
-       $( "#dialog" ).hide();\r
-       \r
-       RoleService.getRoleFunctionList().then(function(data){\r
-               \r
-               var j = data;\r
-               $scope.data = JSON.parse(j.data);\r
-               $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);\r
-               \r
-               //$scope.resetMenu();\r
-       \r
-       },function(error){\r
-               console.log("failed");\r
-               //reloadPageOnce();\r
-       });\r
-       \r
-       $scope.editRoleFunction = null;\r
-       var dialog = null;\r
-       $scope.editRoleFunctionPopup = function(availableRoleFunction) {\r
-               $scope.editRoleFunction = availableRoleFunction;\r
-               $( "#dialog" ).dialog({\r
-                     modal: true\r
-           });\r
-       };\r
-       \r
-       $scope.editRoleFunctionModalPopup = function(availableRoleFunction) {\r
-               $scope.editRoleFunction = availableRoleFunction;\r
-               $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;\r
-               //$scope.availableRoleFunctions={};\r
-               var modalInstance = ngDialog.open({\r
-                   templateUrl: 'app/views/role/popup_modal_rolefunction.html',\r
-                   controller: 'rolefunctionpopupController',\r
-                   resolve: {\r
-                       message: function () {\r
-                               var message = {\r
-                                               availableRoleFunction:  $scope.editRoleFunction,\r
-                                               availableRoleFunctions: $scope.availableRoleFunctionsTemp\r
-                               };\r
-                         return message;\r
-                       },\r
-                       isEditing: function () {\r
-                               return true;\r
-                       }\r
-                     }\r
-                 }); \r
-               modalInstance.closePromise.then(response =>{\r
-                       if(response.value!=null){\r
-               if(response.value.result){\r
-                       $scope.availableRoleFunctions=response.value.availableRoleFunctions;    \r
-               }\r
-            }                  \r
-            /*else\r
-               $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;\r
-            */\r
-        });\r
-       };\r
-       \r
-       $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) {\r
-               \r
-               $scope.editRoleFunction = null;\r
-               $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;\r
-               //$scope.availableRoleFunctions={};\r
-               var modalInstance = ngDialog.open({\r
-                   templateUrl: 'app/views/role/popup_modal_rolefunction.html',\r
-                   controller: 'rolefunctionpopupController',\r
-                   resolve: {\r
-                       message: function () {\r
-                               var message = {\r
-                                               availableRoleFunction: $scope.editRoleFunction,\r
-                                               availableRoleFunctions: $scope.availableRoleFunctionsTemp\r
-                               };\r
-                         return message;\r
-                       },\r
-                       isEditing: function () {\r
-                               return false;\r
-                       }\r
-                     }\r
-                 });\r
-               modalInstance.closePromise.then(response => {\r
-            if(response.value!=null){\r
-               if(response.value.result){\r
-                       $scope.availableRoleFunctions=response.value.availableRoleFunctions;    \r
-               }\r
-            }\r
-           /* if(response.availableRoleFunctions != undefined)\r
-               $scope.availableRoleFunctions=response.availableRoleFunctions;\r
-            else\r
-               $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;\r
-               */\r
-        });\r
-       };\r
-       \r
-       $scope.addNewRoleFunctionPopup = function() {\r
-               $scope.editRoleFunction = null;\r
-               $( "#dialog" ).dialog({\r
-                     modal: true\r
-           });\r
-       };\r
-       \r
-       $scope.saveRoleFunction = function(availableRoleFunction) {\r
-                 var uuu = conf.api.saveRoleFuncion;\r
-                 var postData={availableRoleFunction: availableRoleFunction};\r
-                 $http.post(uuu,postData).then(function(response) {\r
-                         var data = response.data;\r
-                       $scope.availableRoleFunctions=data.availableRoleFunctions; \r
-                       $scope.editRoleFunction = null;\r
-                 },              \r
-               function() {\r
-                       \r
-                       confirmBoxService.showInformation("Error while saving");\r
-                 }\r
-                 );\r
-               };\r
-       \r
-               \r
-               $scope.removeRole = function(availableRoleFunction) {\r
-                       confirmBoxService.confirm("You are about to delete the role function "+availableRoleFunction.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                       if(confirmed){\r
-                                                       $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;\r
-                                                       //$scope.availableRoleFunctions={};\r
-                                                 var uuu = conf.api.removeRoleFunction;\r
-                                                 var postData={availableRoleFunction: availableRoleFunction};\r
-                                                 $http.post(uuu,postData).then(function(response) {\r
-                                                         var data = response.data;\r
-                                                         if(data.availableRoleFunctions == undefined)\r
-                                                               confirmBoxService.showInformation("Error while deleting: "+ data);\r
-                                                         else \r
-                                                                 $scope.availableRoleFunctions=data.availableRoleFunctions; \r
-                                                 },\r
-                                               function() {\r
-                                                       $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;\r
-                                                       confirmBoxService.showInformation("Error while deleting: "+ data.responseText);\r
-                                                 }\r
-                                                 );\r
-                                       }                       \r
-                               });\r
-                       \r
-               };\r
-\r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+app.controller('roleFunctionListController', function ($scope,RoleService,$http,$state,conf,confirmBoxService, ngDialog){
+       $( "#dialog" ).hide();
+       
+       RoleService.getRoleFunctionList().then(function(data){
+               
+               var j = data;
+               $scope.data = JSON.parse(j.data);
+               $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);
+               
+               //$scope.resetMenu();
+       
+       },function(error){
+               console.log("failed");
+               //reloadPageOnce();
+       });
+       
+       $scope.editRoleFunction = null;
+       var dialog = null;
+       $scope.editRoleFunctionPopup = function(availableRoleFunction) {
+               $scope.editRoleFunction = availableRoleFunction;
+               $( "#dialog" ).dialog({
+                     modal: true
+           });
+       };
+       
+       $scope.editRoleFunctionModalPopup = function(availableRoleFunction) {
+               $scope.editRoleFunction = availableRoleFunction;
+               $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;
+               //$scope.availableRoleFunctions={};
+               var modalInstance = ngDialog.open({
+                   templateUrl: 'app/views/role/popup_modal_rolefunction.html',
+                   controller: 'rolefunctionpopupController',
+                   resolve: {
+                       message: function () {
+                               var message = {
+                                               availableRoleFunction:  $scope.editRoleFunction,
+                                               availableRoleFunctions: $scope.availableRoleFunctionsTemp
+                               };
+                         return message;
+                       },
+                       isEditing: function () {
+                               return true;
+                       }
+                     }
+                 }); 
+               modalInstance.closePromise.then(response =>{
+                       if(response.value!=null){
+               if(response.value.result){
+                       $scope.availableRoleFunctions=response.value.availableRoleFunctions;    
+               }
+            }                  
+            /*else
+               $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;
+            */
+        });
+       };
+       
+       $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) {
+               
+               $scope.editRoleFunction = null;
+               $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;
+               //$scope.availableRoleFunctions={};
+               var modalInstance = ngDialog.open({
+                   templateUrl: 'app/views/role/popup_modal_rolefunction.html',
+                   controller: 'rolefunctionpopupController',
+                   resolve: {
+                       message: function () {
+                               var message = {
+                                               availableRoleFunction: $scope.editRoleFunction,
+                                               availableRoleFunctions: $scope.availableRoleFunctionsTemp
+                               };
+                         return message;
+                       },
+                       isEditing: function () {
+                               return false;
+                       }
+                     }
+                 });
+               modalInstance.closePromise.then(response => {
+            if(response.value!=null){
+               if(response.value.result){
+                       $scope.availableRoleFunctions=response.value.availableRoleFunctions;    
+               }
+            }
+           /* if(response.availableRoleFunctions != undefined)
+               $scope.availableRoleFunctions=response.availableRoleFunctions;
+            else
+               $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;
+               */
+        });
+       };
+       
+       $scope.addNewRoleFunctionPopup = function() {
+               $scope.editRoleFunction = null;
+               $( "#dialog" ).dialog({
+                     modal: true
+           });
+       };
+       
+       $scope.saveRoleFunction = function(availableRoleFunction) {
+                 var uuu = conf.api.saveRoleFuncion;
+                 var postData={availableRoleFunction: availableRoleFunction};
+                 $http.post(uuu,postData).then(function(response) {
+                         var data = response.data;
+                       $scope.availableRoleFunctions=data.availableRoleFunctions; 
+                       $scope.editRoleFunction = null;
+                 },              
+               function() {
+                       
+                       confirmBoxService.showInformation("Error while saving");
+                 }
+                 );
+               };
+       
+               
+               $scope.removeRole = function(availableRoleFunction) {
+                       confirmBoxService.confirm("You are about to delete the role function "+availableRoleFunction.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                       if(confirmed){
+                                                       $scope.availableRoleFunctionsTemp=$scope.availableRoleFunctions;
+                                                       //$scope.availableRoleFunctions={};
+                                                 var uuu = conf.api.removeRoleFunction;
+                                                 var postData={availableRoleFunction: availableRoleFunction};
+                                                 $http.post(uuu,postData).then(function(response) {
+                                                         var data = response.data;
+                                                         if(data.availableRoleFunctions == undefined)
+                                                               confirmBoxService.showInformation("Error while deleting: "+ data);
+                                                         else 
+                                                                 $scope.availableRoleFunctions=data.availableRoleFunctions; 
+                                                 },
+                                               function() {
+                                                       $scope.availableRoleFunctions=$scope.availableRoleFunctionsTemp;
+                                                       confirmBoxService.showInformation("Error while deleting: "+ data.responseText);
+                                                 }
+                                                 );
+                                       }                       
+                               });
+                       
+               };
+
+});
index 5ef3716..2e1acf3 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-app.controller('roleListController', function ($scope,RoleService,confirmBoxService,conf,$state,$http){\r
-       $scope.showSpinner = true;\r
-       \r
-       RoleService.getRoles().then(function(data){\r
-               $scope.showSpinner = true;\r
-               var j = data;\r
-               $scope.data = JSON.parse(j.data);\r
-               $scope.availableRoles =JSON.parse($scope.data.availableRoles);\r
-               $scope.showSpinner = false;\r
-               //$scope.resetMenu();\r
-       \r
-       },function(error){\r
-               console.log("failed");\r
-               //reloadPageOnce();\r
-       });\r
-       \r
-       \r
-               $scope.goToUrl = function(roleIdVal) {\r
-                       $state.go("root.role", {"roleId":roleIdVal});\r
-               }       \r
-       //console.log($scope.availableRoles);\r
-               $scope.toggleRole = function(selected,availableRole) {\r
-                               //alert('toggleRole: '+selected);\r
-                               var toggleType = null;\r
-                               if(selected) {\r
-                                       toggleType = "activate";\r
-                               } else {\r
-                                       toggleType = "inactivate";\r
-                               }\r
-                               \r
-                               confirmBoxService.confirm("You are about to "+toggleType+" the role "+availableRole.name+". Do you want to continue?").then(\r
-                                       function(confirmed){\r
-                                               \r
-                                                if(confirmed) {\r
-                                           var uuu = conf.api.toggleRole;\r
-                                                               \r
-                                                               var postData={role:availableRole};\r
-                                                               $http.post(uuu, postData).then(function(response) {\r
-                                                                       var data = response.data;\r
-                                                                       if (typeof data === 'object') {\r
-                                                                               console.log(data);\r
-                                                                               $scope.availableRoles=data.availableRoles; \r
-                                                                               console.log($scope.availableRoles);\r
-                                                                       } else {\r
-                                                                               //\r
-                                                                       }\r
-\r
-                                                               }, function(response) {\r
-                                                                       console.log(response.data);\r
-                                                                       availableRole.active=!availableRole.active;\r
-                                                                       confirmBoxService.showInformation("Error while saving.");\r
-                                                               });\r
-                                                               \r
-                                                               /*\r
-                                                                 $.ajax({\r
-                                                                        type : 'POST',\r
-                                                                        url : uuu,\r
-                                                                        dataType: 'json',\r
-                                                                        contentType: 'application/json',\r
-                                                                        data: JSON.stringify(postData),\r
-                                                                        success : function(data){\r
-                                                                               console.log(data);\r
-                                                                               $scope.$apply(function(){$scope.availableRoles=data.availableRoles;}); \r
-                                                                               console.log($scope.availableRoles);\r
-                                                                        },\r
-                                                                        error : function(data){\r
-                                                                                console.log(data);\r
-                                                                                availableRole.active=!availableRole.active;\r
-                                                                                confirmBoxService.showInformation("Error while saving.");\r
-                                                                        }\r
-                                                                 });\r
-                                                                 */\r
-                                                }\r
-                                                else {\r
-                                                        availableRole.active=!availableRole.active;\r
-                                                }\r
-                                       \r
-                       });\r
-                       //,\r
-                       //function(){\r
-                   //          availableRole.active=!availableRole.active;\r
-                       //})\r
-                               \r
-                                 \r
-               };\r
-\r
-               $scope.removeRole = function(role) {\r
-                       \r
-                       confirmBoxService.confirm("You are about to delete the role "+role.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                                       var uuu = conf.api.removeRole;\r
-                                                         var postData={role:role};\r
-                                                 /*      $.ajax({\r
-                                                                type : 'POST',\r
-                                                                url : uuu,\r
-                                                                dataType: 'json',\r
-                                                                contentType: 'application/json',\r
-                                                                data: JSON.stringify(postData),\r
-                                                                success : function(data){\r
-                                                                       $scope.$apply(function(){$scope.availableRoles=data.availableRoles;});  \r
-                                                                },\r
-                                                                error : function(data){\r
-                                                                        console.log(data);\r
-                                                                        confirmBoxService.showInformation("Error while deleting: "+ data.responseText);\r
-                                                                }\r
-                                                         }); */\r
-                                                         \r
-                                                         \r
-                                                         $http.post(uuu, postData).then(function(response) {\r
-                                                                       var data = response.data;\r
-                                                                       if (typeof data === 'object') {\r
-                                                                               $scope.availableRoles=data.availableRoles; \r
-                                                                       } else {\r
-                                                                               //\r
-                                                                       }\r
-\r
-                                                               }, function(response) {\r
-                                                                       console.log(response.data);\r
-                                                                       confirmBoxService.showInformation("Error while deleting: "+ data.responseText);\r
-                                                               });\r
-                               \r
-               });\r
-               \r
-                       \r
-               };\r
-               \r
-\r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+app.controller('roleListController', function ($scope,RoleService,confirmBoxService,conf,$state,$http){
+       $scope.showSpinner = true;
+       
+       RoleService.getRoles().then(function(data){
+               $scope.showSpinner = true;
+               var j = data;
+               $scope.data = JSON.parse(j.data);
+               $scope.availableRoles =JSON.parse($scope.data.availableRoles);
+               $scope.showSpinner = false;
+               //$scope.resetMenu();
+       
+       },function(error){
+               console.log("failed");
+               //reloadPageOnce();
+       });
+       
+       
+               $scope.goToUrl = function(roleIdVal) {
+                       $state.go("root.role", {"roleId":roleIdVal});
+               }       
+       //console.log($scope.availableRoles);
+               $scope.toggleRole = function(selected,availableRole) {
+                               //alert('toggleRole: '+selected);
+                               var toggleType = null;
+                               if(selected) {
+                                       toggleType = "activate";
+                               } else {
+                                       toggleType = "inactivate";
+                               }
+                               
+                               confirmBoxService.confirm("You are about to "+toggleType+" the role "+availableRole.name+". Do you want to continue?").then(
+                                       function(confirmed){
+                                               
+                                                if(confirmed) {
+                                           var uuu = conf.api.toggleRole;
+                                                               
+                                                               var postData={role:availableRole};
+                                                               $http.post(uuu, postData).then(function(response) {
+                                                                       var data = response.data;
+                                                                       if (typeof data === 'object') {
+                                                                               console.log(data);
+                                                                               $scope.availableRoles=data.availableRoles; 
+                                                                               console.log($scope.availableRoles);
+                                                                       } else {
+                                                                               //
+                                                                       }
+
+                                                               }, function(response) {
+                                                                       console.log(response.data);
+                                                                       availableRole.active=!availableRole.active;
+                                                                       confirmBoxService.showInformation("Error while saving.");
+                                                               });
+                                                               
+                                                               /*
+                                                                 $.ajax({
+                                                                        type : 'POST',
+                                                                        url : uuu,
+                                                                        dataType: 'json',
+                                                                        contentType: 'application/json',
+                                                                        data: JSON.stringify(postData),
+                                                                        success : function(data){
+                                                                               console.log(data);
+                                                                               $scope.$apply(function(){$scope.availableRoles=data.availableRoles;}); 
+                                                                               console.log($scope.availableRoles);
+                                                                        },
+                                                                        error : function(data){
+                                                                                console.log(data);
+                                                                                availableRole.active=!availableRole.active;
+                                                                                confirmBoxService.showInformation("Error while saving.");
+                                                                        }
+                                                                 });
+                                                                 */
+                                                }
+                                                else {
+                                                        availableRole.active=!availableRole.active;
+                                                }
+                                       
+                       });
+                       //,
+                       //function(){
+                   //          availableRole.active=!availableRole.active;
+                       //})
+                               
+                                 
+               };
+
+               $scope.removeRole = function(role) {
+                       
+                       confirmBoxService.confirm("You are about to delete the role "+role.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                                       var uuu = conf.api.removeRole;
+                                                         var postData={role:role};
+                                                 /*      $.ajax({
+                                                                type : 'POST',
+                                                                url : uuu,
+                                                                dataType: 'json',
+                                                                contentType: 'application/json',
+                                                                data: JSON.stringify(postData),
+                                                                success : function(data){
+                                                                       $scope.$apply(function(){$scope.availableRoles=data.availableRoles;});  
+                                                                },
+                                                                error : function(data){
+                                                                        console.log(data);
+                                                                        confirmBoxService.showInformation("Error while deleting: "+ data.responseText);
+                                                                }
+                                                         }); */
+                                                         
+                                                         
+                                                         $http.post(uuu, postData).then(function(response) {
+                                                                       var data = response.data;
+                                                                       if (typeof data === 'object') {
+                                                                               $scope.availableRoles=data.availableRoles; 
+                                                                       } else {
+                                                                               //
+                                                                       }
+
+                                                               }, function(response) {
+                                                                       console.log(response.data);
+                                                                       confirmBoxService.showInformation("Error while deleting: "+ data.responseText);
+                                                               });
+                               
+               });
+               
+                       
+               };
+               
+
+});
index 42793ee..2356058 100644 (file)
@@ -1,96 +1,96 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-admins-page-main">\r
-       <div class="admins-home-container" id="page-content">\r
-               <div id="title" class="w-ecomp-main-view-title">\r
-               <h3 class="heading-page" >Role</h3>\r
-           </div>      \r
-           <div  class="admins-table" >\r
-                       <div>\r
-                               <br>\r
-                           <p class="p-info">Please edit the role details below:&nbsp;</p><br>\r
-                            \r
-                               <div id="role-text" >\r
-                                       <label id="role-text-name-label" >*Name:</label>\r
-                                       <input id="input-name"  class="input-field" maxlength="30"  type="text" data-ng-model="role.name">                                       \r
-                                       <br>\r
-                                       <label id="role-text-priority-label">Priority:</label>\r
-                                       <input id="input-priority" class="input-field" maxlength="30"  type="text" data-ng-model="role.priority">                                               \r
-                               </div>\r
-                               <br>\r
-                               <div align="left" >\r
-                                               <button id="button-role-save" type="submit" ng-click="saveRole();" class="btn btn-alt btn-small">Save</button>\r
-                               </div>\r
-                               \r
-                               <br>\r
-                               <div id="page-title"  class="pageTitle">\r
-                                       <label>Role Functions</label>\r
-                                       <a id="add-new-role" ng-click="addNewRoleFunctionModalPopup();" ng-style="{'cursor':'pointer'}" class="icon-primary-accordion-plus" size="small"></a>\r
-                               </div>\r
-                       \r
-                               <div b2b-table table-data="role.roleFunctions"  ng-hide="users.isLoadingTable"  search-string="users.searchString" class="b2b-table-div">\r
-                                       <table>\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr >\r
-                                                               <th id="table-header-name" b2b-table-header key="name" sortable="true" >Name</th>\r
-                                                               <th id="table-header-remove" b2b-table-header sortable="false" >Remove</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <tbody b2b-table-row type="body"        row-repeat="roleFunction in role.roleFunctions">\r
-                                                       <tr >\r
-                                                               <td id="role-function-{{roleFunction.name}}" b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="roleFunction.name"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">\r
-                                                               <div ng-click="removeRoleFunction(roleFunction);" ><a href="javascript:void(0)" class="icon-misc-trash"></a></div>\r
-                                                               </td>                                                   \r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>          \r
-                               \r
-                               <a id="manage-role"  href="roleFunctions">Manage Role Functions</a><br><br>\r
-                               \r
-                               <div id="page-title-child" class="pageTitle">\r
-                                       <label>Child Roles</label>\r
-                                       <a id="add-child-role"  ng-click="addNewChildRoleModalPopup();" ng-style="{'cursor':'pointer'}" class="icon-primary-accordion-plus" size="small"></a>\r
-                               </div>\r
-                               \r
-                               <div b2b-table table-data="role.childRoles"  ng-hide="users.isLoadingTable"     search-string="users.searchString" class="b2b-table-div">\r
-                                       <table>\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr >\r
-                                                               <th id="table-header-name" b2b-table-header key="firstName" sortable="true" >Name</th>\r
-                                                               <th id="table-header-remove" b2b-table-header key="lastName" sortable="true" >Remove</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <tbody b2b-table-row type="body"        row-repeat="role in role.childRoles">\r
-                                                       <tr >\r
-                                                               <td id="role-function-{{role.name}}" b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="role.name"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">\r
-                                                               <div ng-click="removeChildRole(role);" ><a href="javascript:void(0)" class="icon-misc-trash"></a></div>\r
-                                                               </td>                                                   \r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>                                  \r
-                       </div>\r
-       \r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-admins-page-main">
+       <div class="admins-home-container" id="page-content">
+               <div id="title" class="w-ecomp-main-view-title">
+               <h3 class="heading-page" >Role</h3>
+           </div>      
+           <div  class="admins-table" >
+                       <div>
+                               <br>
+                           <p class="p-info">Please edit the role details below:&nbsp;</p><br>
+                            
+                               <div id="role-text" >
+                                       <label id="role-text-name-label" >*Name:</label>
+                                       <input id="input-name"  class="input-field" maxlength="30"  type="text" data-ng-model="role.name">                                       
+                                       <br>
+                                       <label id="role-text-priority-label">Priority:</label>
+                                       <input id="input-priority" class="input-field" maxlength="30"  type="text" data-ng-model="role.priority">                                               
+                               </div>
+                               <br>
+                               <div align="left" >
+                                               <button id="button-role-save" type="submit" ng-click="saveRole();" class="btn btn-alt btn-small">Save</button>
+                               </div>
+                               
+                               <br>
+                               <div id="page-title"  class="pageTitle">
+                                       <label>Role Functions</label>
+                                       <a id="add-new-role" ng-click="addNewRoleFunctionModalPopup();" ng-style="{'cursor':'pointer'}" class="icon-primary-accordion-plus" size="small"></a>
+                               </div>
+                       
+                               <div b2b-table table-data="role.roleFunctions"  ng-hide="users.isLoadingTable"  search-string="users.searchString" class="b2b-table-div">
+                                       <table>
+                                               <thead b2b-table-row type="header">
+                                                       <tr >
+                                                               <th id="table-header-name" b2b-table-header key="name" sortable="true" >Name</th>
+                                                               <th id="table-header-remove" b2b-table-header sortable="false" >Remove</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody b2b-table-row type="body"        row-repeat="roleFunction in role.roleFunctions">
+                                                       <tr >
+                                                               <td id="role-function-{{roleFunction.name}}" b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="roleFunction.name"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
+                                                               <div ng-click="removeRoleFunction(roleFunction);" ><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
+                                                               </td>                                                   
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>          
+                               
+                               <a id="manage-role"  href="roleFunctions">Manage Role Functions</a><br><br>
+                               
+                               <div id="page-title-child" class="pageTitle">
+                                       <label>Child Roles</label>
+                                       <a id="add-child-role"  ng-click="addNewChildRoleModalPopup();" ng-style="{'cursor':'pointer'}" class="icon-primary-accordion-plus" size="small"></a>
+                               </div>
+                               
+                               <div b2b-table table-data="role.childRoles"  ng-hide="users.isLoadingTable"     search-string="users.searchString" class="b2b-table-div">
+                                       <table>
+                                               <thead b2b-table-row type="header">
+                                                       <tr >
+                                                               <th id="table-header-name" b2b-table-header key="firstName" sortable="true" >Name</th>
+                                                               <th id="table-header-remove" b2b-table-header key="lastName" sortable="true" >Remove</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody b2b-table-row type="body"        row-repeat="role in role.childRoles">
+                                                       <tr >
+                                                               <td id="role-function-{{role.name}}" b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="role.name"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
+                                                               <div ng-click="removeChildRole(role);" ><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
+                                                               </td>                                                   
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>                                  
+                       </div>
+       
+               </div>
+       </div>
+</div>
index 42311e6..71d240d 100644 (file)
@@ -1,50 +1,50 @@
-.p-info {\r
-       font-size: 18px;\r
-}\r
-\r
-.input-field {\r
-       width: 250px !important;\r
-}\r
-\r
-.scrolling-table {\r
-       width: 548px;\r
-       margin-left: 16px;\r
-       height:575px;\r
-       overflow:auto;\r
-}\r
-\r
-.scrolling-table .scroll-viewport {\r
-       height: 200px !important;\r
-       width: 99.5% !important;\r
-       background-color: white;\r
-}\r
-\r
-.scrolling-table .scroll-overview {\r
-       margin-top: -14px !important;\r
-}\r
-\r
-.scrolling-table .scroll-viewport:hover {\r
-       background-color: white;\r
-}\r
-\r
-.scrolling-table #portal-scroll-table-content {\r
-       height: 200px;\r
-       position: absolute !important;\r
-       width: 548px;\r
-       padding-left: 0px;\r
-       padding-top: 0px;\r
-       padding-bottom: 0px;\r
-       padding-right: 5px;\r
-}\r
-\r
-.vertical .scroll-thumb {\r
-       width: 13px !important;\r
-}\r
-\r
-.vertical .scroll-bar {\r
-       width: 15px !important;\r
-}\r
-\r
-.scroll-bar {\r
-       border-radius: 0px !important;\r
+.p-info {
+       font-size: 18px;
+}
+
+.input-field {
+       width: 250px !important;
+}
+
+.scrolling-table {
+       width: 548px;
+       margin-left: 16px;
+       height:575px;
+       overflow:auto;
+}
+
+.scrolling-table .scroll-viewport {
+       height: 200px !important;
+       width: 99.5% !important;
+       background-color: white;
+}
+
+.scrolling-table .scroll-overview {
+       margin-top: -14px !important;
+}
+
+.scrolling-table .scroll-viewport:hover {
+       background-color: white;
+}
+
+.scrolling-table #portal-scroll-table-content {
+       height: 200px;
+       position: absolute !important;
+       width: 548px;
+       padding-left: 0px;
+       padding-top: 0px;
+       padding-bottom: 0px;
+       padding-right: 5px;
+}
+
+.vertical .scroll-thumb {
+       width: 13px !important;
+}
+
+.vertical .scroll-bar {
+       width: 15px !important;
+}
+
+.scroll-bar {
+       border-radius: 0px !important;
 }
\ No newline at end of file
index 278ef2c..e96fb06 100644 (file)
@@ -1,51 +1,55 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<link rel="stylesheet" href="role.css">\r
-<div class="application-details-modal">\r
-    <div id="title" class="title">Select Role Functions</div>\r
-<div class="scrolling-table">\r
-\r
-       <div b2b-table table-data="availableRoles"   class="b2b-table-div">\r
-               <table>\r
-                       <thead b2b-table-row type="header">\r
-                               <tr >\r
-                                       <th b2b-table-header key="firstName" sortable="true" id="col1"></th>\r
-                                       <th b2b-table-header key="name" sortable="true" id="col2">Name</th>\r
-                               </tr>\r
-                       </thead>\r
-                       <tbody b2b-table-row type="body"        row-repeat="rowData in availableRoles">\r
-                               <tr>\r
-                                       <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1">\r
-                                               <label class="btn-switch-label" tabindex="0" role="option">\r
-                                                       <input type="checkbox" b2b-switches ng-model="rowData.selected" ng-click="toggleChildRole(rowData.selected,rowData);">\r
-                                           </label> \r
-                                       </td>\r
-                                       <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.name"></td>\r
-                                                                                       \r
-                               </tr>\r
-                       </tbody>\r
-               </table>\r
-       </div>\r
-</div>\r
-    <div class="dialog-control">\r
-        <button id="button-app-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>      \r
-    </div>\r
-</div>\r
-\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<link rel="stylesheet" href="role.css">
+<div class="application-details-modal">
+    <div id="title" class="title">Select Role Functions</div>
+<div class="scrolling-table">
+
+       <div b2b-table table-data="availableRoles"   class="b2b-table-div">
+               <table>
+                       <thead b2b-table-row type="header">
+                               <tr >
+                                       <th b2b-table-header key="firstName" sortable="true" id="col1"></th>
+                                       <th b2b-table-header key="name" sortable="true" id="col2">Name</th>
+                               </tr>
+                       </thead>
+                       <tbody b2b-table-row type="body"        row-repeat="rowData in availableRoles">
+                               <tr>
+                                       <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1">
+                                               <label class="btn-switch-label" tabindex="0" role="option">
+                                                       <input id="row-input-{{$index}}" type="checkbox" b2b-switches ng-model="rowData.selected" ng-click="toggleChildRole(rowData.selected,rowData);">
+                                           </label> 
+                                       </td>
+                                       <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.name"></td>
+                                                                                       
+                               </tr>
+                       </tbody>
+               </table>
+       </div>
+</div>
+    <div class="dialog-control">
+        <button id="button-app-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>      
+    </div>
+</div>
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index c015ee5..7c50a5a 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<style>\r
-.c-ecomp-abs-table .tablesorter-default tbody tr td div {\r
-  line-height: 20px;\r
-}\r
-\r
-.c-ecomp-abs-table{\r
-    width: 100%;\r
-    height: 600px;\r
-    overflow-x: auto;\r
-    overflow-y: auto;\r
-       background-color: white;\r
-}\r
-</style>\r
-<div class="w-ecomp-admins-page-main">\r
-       <div class="admins-home-container" id="page-content">   \r
-    <div id="title" class="w-ecomp-main-view-title">\r
-    <h3 class="heading-page" >Role Functions</h3>\r
-    </div>\r
-               \r
-       \r
-       <br>\r
-       \r
-       <div class="admins-table">\r
-       \r
-        <!-- <a ng-click="addNewRoleFunctionModalPopup();" class="icon-add" size="small" ></a> -->\r
-               <div id="create-new-admin" align="left" style="marin-bottom: 50px;">\r
-                               <button id="button-admin-create" type="submit" ng-click="addNewRoleFunctionModalPopup();" \r
-                                        class="btn btn-alt btn-small">Create</button>\r
-                       </div>\r
-                       \r
-                       <div style="text-align: justify;text-align-last:auto;">\r
-                       <!--    Click on the edit icon to update a role function, the plus icon to add additional role functions, or the delete icon to remove them.  -->\r
-                       </div>\r
-       \r
-       <div id="rolesTable" class="c-ecomp-abs-table default"  title="Role Functions">\r
-         <table b2b-table table-data="availableRoleFunctions" current-page="1">\r
-               <thead b2b-table-row type="header">\r
-                       <tr>\r
-                               <th id="table-header-name" b2b-table-header width="70%" key="name" sortable="true">Name</th>\r
-                               <th id="table-header-code" b2b-table-header width="10%" key="code" sortable="true">Code</th>\r
-                               <th id="table-header-edit" b2b-table-header width="10%" sortable="false">Edit?</th>\r
-                               <th id="table-header-delete" b2b-table-header width="10%" sortable="false">Delete?</th>\r
-                       </tr>\r
-               </thead>\r
-               <tbody b2b-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->\r
-                 <tr>\r
-                   <td id="table-body-role-{{availableRoleFunction['name'].split(' ').join('-')}}" b2b-table-body width="70%" ng-bind="availableRoleFunction['name']"></td>\r
-                   <td id="table-body-role-{{availableRoleFunction['code']}}" b2b-table-body width="10%" ng-bind="availableRoleFunction['code']"></td>\r
-                   <td id="table-body" b2b-table-body width="10%">\r
-                   <!-- <a ng-click="editRoleFunctionPopup(availableRoleFunction);" >\r
-                   <img src="static/fusion/images/editicon.gif">\r
-                   </a> -->\r
-                   <div ng-click="editRoleFunctionModalPopup(availableRoleFunction);" style="font-size:20px;"><a id="role-{{availableRoleFunction['name'].split(' ').join('-')}}-edit" href="javascript:void(0)" class="icon-edit"></a></div>\r
-                   </td>\r
-                    <td b2b-table-body width="10%">\r
-                       <!-- <a ng-click="removeRole(availableRoleFunction);" ><img src="static/fusion/images/deleteicon.gif"></a> -->\r
-                       <div ng-click="removeRole(availableRoleFunction);" style="font-size:20px;"><a id="role-{{availableRoleFunction['name'].split(' ').join('-')}}-trash" href="javascript:void(0)" class="icon-misc-trash"></a></div>\r
-                    </td>\r
-                 </tr>\r
-               </tbody>\r
-               </table>\r
-       </div>\r
-       \r
-                  \r
-       \r
-       </div>\r
-       \r
-       \r
-       <div id="dialog" title="Add Role Function">\r
-               \r
-               <div id="fn-ebz-container-name" class="fn-ebz-container" >\r
-               <label id="fn-ebz-label-name" class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>\r
-               <input id="fn-ebz-input-{{editRoleFunction.name}}" type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"\r
-                       maxlength="30" /> \r
-               </div>\r
-               <br/>\r
-               <div id="fn-ebz-container-code" class="fn-ebz-container" >\r
-               <label id="fn-ebz-label-code" class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>\r
-               <input id="fn-ebz-input-{{editRoleFunction.code}}" type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="editRoleFunction.code!=null"\r
-                       maxlength="30" /> \r
-               </div>\r
-               <br/>\r
-               <button id="button-admin-save" type="submit" ng-click="saveRoleFunction(editRoleFunction);"  class="btn btn-alt btn-small">Save</button>\r
-               \r
-       </div>\r
-       \r
-</div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<style>
+.c-ecomp-abs-table .tablesorter-default tbody tr td div {
+  line-height: 20px;
+}
+
+.c-ecomp-abs-table{
+    width: 100%;
+    height: 600px;
+    overflow-x: auto;
+    overflow-y: auto;
+       background-color: white;
+}
+</style>
+<div class="w-ecomp-admins-page-main">
+       <div class="admins-home-container" id="page-content">   
+    <div id="title" class="w-ecomp-main-view-title">
+    <h3 class="heading-page" >Role Functions</h3>
+    </div>
+               
+       
+       <br>
+       
+       <div class="admins-table">
+       
+        <!-- <a ng-click="addNewRoleFunctionModalPopup();" class="icon-add" size="small" ></a> -->
+               <div id="create-new-admin" align="left" style="marin-bottom: 50px;">
+                               <button id="button-admin-create" type="submit" ng-click="addNewRoleFunctionModalPopup();" 
+                                        class="btn btn-alt btn-small">Create</button>
+                       </div>
+                       
+                       <div style="text-align: justify;text-align-last:auto;">
+                       <!--    Click on the edit icon to update a role function, the plus icon to add additional role functions, or the delete icon to remove them.  -->
+                       </div>
+       
+       <div id="rolesTable" class="c-ecomp-abs-table default"  title="Role Functions">
+         <table b2b-table table-data="availableRoleFunctions" current-page="1">
+               <thead b2b-table-row type="header">
+                       <tr>
+                               <th id="table-header-name" b2b-table-header width="70%" key="name" sortable="true">Name</th>
+                               <th id="table-header-code" b2b-table-header width="10%" key="code" sortable="true">Code</th>
+                               <th id="table-header-edit" b2b-table-header width="10%" sortable="false">Edit?</th>
+                               <th id="table-header-delete" b2b-table-header width="10%" sortable="false">Delete?</th>
+                       </tr>
+               </thead>
+               <tbody b2b-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
+                 <tr>
+                   <td id="table-body-role-{{availableRoleFunction['name'].split(' ').join('-')}}" b2b-table-body width="70%" ng-bind="availableRoleFunction['name']"></td>
+                   <td id="table-body-role-{{availableRoleFunction['code']}}" b2b-table-body width="10%" ng-bind="availableRoleFunction['code']"></td>
+                   <td id="table-body" b2b-table-body width="10%">
+                   <!-- <a ng-click="editRoleFunctionPopup(availableRoleFunction);" >
+                   <img src="static/fusion/images/editicon.gif">
+                   </a> -->
+                   <div ng-click="editRoleFunctionModalPopup(availableRoleFunction);" style="font-size:20px;"><a id="role-{{availableRoleFunction['name'].split(' ').join('-')}}-edit" href="javascript:void(0)" class="icon-edit"></a></div>
+                   </td>
+                    <td b2b-table-body width="10%">
+                       <!-- <a ng-click="removeRole(availableRoleFunction);" ><img src="static/fusion/images/deleteicon.gif"></a> -->
+                       <div ng-click="removeRole(availableRoleFunction);" style="font-size:20px;"><a id="role-{{availableRoleFunction['name'].split(' ').join('-')}}-trash" href="javascript:void(0)" class="icon-misc-trash"></a></div>
+                    </td>
+                 </tr>
+               </tbody>
+               </table>
+       </div>
+       
+                  
+       
+       </div>
+       
+       
+       <div id="dialog" title="Add Role Function">
+               
+               <div id="fn-ebz-container-name" class="fn-ebz-container" >
+               <label id="fn-ebz-label-name" class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>
+               <input id="fn-ebz-input-{{editRoleFunction.name}}" type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"
+                       maxlength="30" /> 
+               </div>
+               <br/>
+               <div id="fn-ebz-container-code" class="fn-ebz-container" >
+               <label id="fn-ebz-label-code" class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>
+               <input id="fn-ebz-input-{{editRoleFunction.code}}" type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="editRoleFunction.code!=null"
+                       maxlength="30" /> 
+               </div>
+               <br/>
+               <button id="button-admin-save" type="submit" ng-click="saveRoleFunction(editRoleFunction);"  class="btn btn-alt btn-small">Save</button>
+               
+       </div>
+       
+</div>
+</div>
index 7d80d81..52c4cb3 100644 (file)
@@ -1,49 +1,55 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<link rel="stylesheet" href="role.css">\r
-<div class="application-details-modal">\r
-    <div id="title" class="title">Select Role Functions</div>\r
-<div class="scrolling-table">\r
-       <div b2b-table table-data="availableRoleFunctions"   class="b2b-table-div">\r
-               <table>\r
-                       <thead b2b-table-row type="header">\r
-                               <tr >\r
-                                       <th b2b-table-header key="firstName" sortable="true" id="col1"></th>\r
-                                       <th b2b-table-header key="name" sortable="true" id="col2">Name</th>\r
-                               </tr>\r
-                       </thead>\r
-                       <tbody b2b-table-row type="body"        row-repeat="rowData in availableRoleFunctions">\r
-                               <tr>\r
-                                       <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1">\r
-                                               <label class="btn-switch-label" tabindex="0" role="option">\r
-                                                       <input type="checkbox" b2b-switches ng-model="rowData.selected" ng-click="toggleRoleFunction(rowData.selected,rowData);">\r
-                                           </label> \r
-                                       </td>\r
-                                       <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.name"></td>\r
-                                                                                       \r
-                               </tr>\r
-                       </tbody>\r
-               </table>\r
-       </div>\r
-</div>\r
-    <div class="dialog-control">\r
-        <button id="button-app-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<link rel="stylesheet" href="role.css">
+<div class="application-details-modal">
+    <div id="title" class="title">Select Role Functions</div>
+<div class="scrolling-table">
+       <div b2b-table table-data="availableRoleFunctions"   class="b2b-table-div">
+               <table>
+                       <thead b2b-table-row type="header">
+                               <tr >
+                                       <th b2b-table-header key="firstName" sortable="true" id="col1"></th>
+                                       <th b2b-table-header key="name" sortable="true" id="col2">Name</th>
+                               </tr>
+                       </thead>
+                       <tbody b2b-table-row type="body"        row-repeat="rowData in availableRoleFunctions">
+                               <tr>
+                                       <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1">
+                                               <label class="btn-switch-label" tabindex="0" role="option">
+                                                       <input id="row-input-{{$index}}" type="checkbox" b2b-switches ng-model="rowData.selected" ng-click="toggleRoleFunction(rowData.selected,rowData);">
+                                           </label> 
+                                       </td>
+                                       <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.name"></td>
+                                                                                       
+                               </tr>
+                       </tbody>
+               </table>
+       </div>
+</div>
+    <div class="dialog-control">
+        <button id="button-app-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>
+    </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index e8d56ca..74de7c2 100644 (file)
@@ -1,55 +1,57 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-admins-page-main">\r
-       <div class="admins-home-container" id="page-content">\r
-               <div id="title" class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page" >Roles</h1>\r
-               </div>\r
-               <div class="admins-table">\r
-                       <div id="button-create-role" align="left" style="marin-bottom: 50px;" >\r
-                               <button ng-click="goToUrl(0)" class = "btn btn-alt btn-small">Create</button>\r
-                       </div>\r
-                       <div b2b-table table-data="availableRoles"  search-string="searchString" class="b2b-table-div">\r
-                       <table>\r
-                           <thead b2b-table-row type="header">\r
-                               <tr>\r
-                                   <th b2b-table-header key="name" sortable="true" default-sort="a" id="col1">Name</th>\r
-                                   <th b2b-table-header key="priority" sortable="true" id="col2">Priority</th>\r
-                                   <th b2b-table-header id="col3" sortable="false">Active</th>\r
-                               </tr>\r
-                           </thead>\r
-                           <tbody b2b-table-row type="body" row-repeat="rowData in availableRoles">\r
-                               <tr>\r
-                                   <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData['name']"></td>\r
-                                   <td b2b-table-body ng-bind="rowData['priority']"></td>\r
-                                   <td b2b-table-body headers="rowheader_t1_{{$index}} col3" >\r
-                                       <div >\r
-                                                               <label class="btn-switch-label" tabindex="0" role="option">\r
-                                                                               <input type="checkbox" b2b-switches ng-model="rowData.active" ng-click="toggleRole(rowData.active,rowData);">\r
-                                                                   </label> \r
-                                                       </div>\r
-                                   </td>\r
-                               </tr>\r
-                           </tbody>\r
-                       </table>\r
-                   </div>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-admins-page-main">
+       <div class="admins-home-container" id="page-content">
+               <div id="title" class="w-ecomp-main-view-title">
+                       <h1 class="heading-page" >Roles</h1>
+               </div>
+               <div class="admins-table">
+                       <div id="button-create-role" align="left" style="marin-bottom: 50px;" >
+                               <button ng-click="goToUrl(0)" class = "btn btn-alt btn-small">Create</button>
+                       </div>
+                       <div b2b-table table-data="availableRoles"  search-string="searchString" class="b2b-table-div">
+                       <table>
+                           <thead b2b-table-row type="header">
+                               <tr>
+                                   <th b2b-table-header key="name" sortable="true" default-sort="a" id="col1">Name</th>
+                                   <th b2b-table-header key="priority" sortable="true" id="col2">Priority</th>
+                                   <th b2b-table-header id="col3" sortable="false">Active</th>
+                                   <th b2b-table-header id="col4" sortable="false">Edit</th>
+                               </tr>
+                           </thead>
+                           <tbody b2b-table-row type="body" row-repeat="rowData in availableRoles">
+                               <tr>
+                                   <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData['name']"></td>
+                                   <td b2b-table-body ng-bind="rowData['priority']"></td>
+                                   <td b2b-table-body headers="rowheader_t1_{{$index}} col3" >
+                                       <div >
+                                                               <label class="btn-switch-label" tabindex="0" role="option">
+                                                                               <input type="checkbox" b2b-switches ng-model="rowData.active" ng-click="toggleRole(rowData.active,rowData);">
+                                                                   </label> 
+                                                       </div>
+                                   </td>
+                                   <td b2b-table-body class="icon-misc-pen" ng-click="goToUrl(rowData.id)"></td>    
+                               </tr>
+                           </tbody>
+                       </table>
+                   </div>
+               </div>
+       </div>
+</div>
index 6275c76..db5bb1b 100644 (file)
@@ -1,95 +1,95 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-app.controller('rolefunctionpopupController', function ($scope, confirmBoxService, message, $http,RoleService, conf, isEditing){\r
-                               if(message.availableRoleFunction==null) {\r
-                                       $scope.label='Add Role Function';\r
-                                       var tempText = "";\r
-                               }\r
-                               else{\r
-                                       $scope.label='Edit Role Function'\r
-                                       $scope.disableCd=true;\r
-                                       var tempText = new String(message.availableRoleFunction.name);\r
-                                       $scope.editRoleFunction = angular.copy(message.availableRoleFunction);\r
-                               }\r
-                               \r
-                               $scope.tempText = tempText;\r
-                               $scope.isEditing = isEditing;\r
-                               \r
-                               $scope.saveRoleFunction = function(availableRoleFunction) {\r
-                                         var uuu = conf.api.saveRoleFunction;\r
-                                         var postData={availableRoleFunction: availableRoleFunction};\r
-\r
-                                         if(availableRoleFunction==null){\r
-                                                 confirmBoxService.showInformation("Please enter valid role function details.");\r
-                                         }\r
-                                         var exists = false,x;\r
-                                         for(x in message.availableRoleFunctions){\r
-                                                 console.log(message.availableRoleFunctions[x].name);\r
-                                                       if(message.availableRoleFunctions[x].name==availableRoleFunction.name){\r
-                                                               confirmBoxService.showInformation("Role Function already exists.");\r
-                                                               exists = true;\r
-                                                               availableRoleFunction.name = $scope.tempText;\r
-                                                               break;\r
-                                                       } \r
-                                                       if(!isEditing){\r
-                                                               if (message.availableRoleFunctions[x].code == availableRoleFunction.code) {\r
-                                                                       confirmBoxService.showInformation("Code already exists. Please create a role function with a different code to proceed.");\r
-                                                                       exists = true;\r
-                                                                       availableRoleFunction.name = $scope.tempText;\r
-                                                                       break;\r
-                                                               }\r
-                                                       }\r
-                                         }\r
-                                         \r
-                                         if(!exists && availableRoleFunction.name.trim() != '' && availableRoleFunction.code.trim() != ''){\r
-                                     $http.post(uuu, JSON.stringify(postData)).then(function(res){\r
-                                         console.log("data");\r
-//                                       console.log(res.data);\r
-//                                       $scope.availableRoleFunctionsTemp = res.data.availableRoleFunctions;\r
-                                         RoleService.getRoleFunctionList().then(function(data){\r
-                                                       \r
-                                                       var j = data;\r
-                                                       $scope.data = JSON.parse(j.data);\r
-                                                       $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);\r
-                                                       \r
-                                                       //$scope.resetMenu();\r
-                                                       $scope.closeThisDialog({result: true, availableRoleFunctions: $scope.availableRoleFunctions });\r
-                                               },function(error){\r
-                                                       console.log("failed");\r
-                                                       //reloadPageOnce();\r
-                                                       $scope.closeThisDialog(true);                                           \r
-                                               });\r
-                                         \r
-                                         \r
-                                     });                                                 \r
-                                                 \r
-                                                 \r
-                                                 \r
-                                                 \r
-                                               }\r
-                               };\r
-                                         \r
-                                         \r
-                                       \r
-                               $scope.close = function() { \r
-                                       this.closeThisDialog(true);\r
-                               };\r
-}\r
-);\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+app.controller('rolefunctionpopupController', function ($scope, confirmBoxService, message, $http,RoleService, conf, isEditing){
+                               if(message.availableRoleFunction==null) {
+                                       $scope.label='Add Role Function';
+                                       var tempText = "";
+                               }
+                               else{
+                                       $scope.label='Edit Role Function'
+                                       $scope.disableCd=true;
+                                       var tempText = new String(message.availableRoleFunction.name);
+                                       $scope.editRoleFunction = angular.copy(message.availableRoleFunction);
+                               }
+                               
+                               $scope.tempText = tempText;
+                               $scope.isEditing = isEditing;
+                               
+                               $scope.saveRoleFunction = function(availableRoleFunction) {
+                                         var uuu = conf.api.saveRoleFunction;
+                                         var postData={availableRoleFunction: availableRoleFunction};
+
+                                         if(availableRoleFunction==null){
+                                                 confirmBoxService.showInformation("Please enter valid role function details.");
+                                         }
+                                         var exists = false,x;
+                                         for(x in message.availableRoleFunctions){
+                                                 console.log(message.availableRoleFunctions[x].name);
+                                                       if(message.availableRoleFunctions[x].name==availableRoleFunction.name){
+                                                               confirmBoxService.showInformation("Role Function already exists.");
+                                                               exists = true;
+                                                               availableRoleFunction.name = $scope.tempText;
+                                                               break;
+                                                       } 
+                                                       if(!isEditing){
+                                                               if (message.availableRoleFunctions[x].code == availableRoleFunction.code) {
+                                                                       confirmBoxService.showInformation("Code already exists. Please create a role function with a different code to proceed.");
+                                                                       exists = true;
+                                                                       availableRoleFunction.name = $scope.tempText;
+                                                                       break;
+                                                               }
+                                                       }
+                                         }
+                                         
+                                         if(!exists && availableRoleFunction.name.trim() != '' && availableRoleFunction.code.trim() != ''){
+                                     $http.post(uuu, JSON.stringify(postData)).then(function(res){
+                                         console.log("data");
+//                                       console.log(res.data);
+//                                       $scope.availableRoleFunctionsTemp = res.data.availableRoleFunctions;
+                                         RoleService.getRoleFunctionList().then(function(data){
+                                                       
+                                                       var j = data;
+                                                       $scope.data = JSON.parse(j.data);
+                                                       $scope.availableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);
+                                                       
+                                                       //$scope.resetMenu();
+                                                       $scope.closeThisDialog({result: true, availableRoleFunctions: $scope.availableRoleFunctions });
+                                               },function(error){
+                                                       console.log("failed");
+                                                       //reloadPageOnce();
+                                                       $scope.closeThisDialog(true);                                           
+                                               });
+                                         
+                                         
+                                     });                                                 
+                                                 
+                                                 
+                                                 
+                                                 
+                                               }
+                               };
+                                         
+                                         
+                                       
+                               $scope.close = function() { 
+                                       this.closeThisDialog(true);
+                               };
+}
+);
index 7feb7f2..1176e50 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-app.controller('rolepopupController',  function ($scope, role, roleId, confirmBoxService, $http, $state, availableRoles, conf, availableRoleFunctions,ngDialog){\r
-       \r
-                       $scope.role = role;\r
-                       console.log($scope.role);\r
-                       if($scope.role.childRoles==null){\r
-                               $scope.role.childRoles=[];\r
-                       }\r
-                       \r
-                       $scope.ociavailableRoles=availableRoles;\r
-                       console.log($scope.ociavailableRoles);\r
-                       \r
-                       $scope.availableRoles=[];\r
-                       if($scope.ociavailableRoles)\r
-                               $.each($scope.ociavailableRoles, function(i, a){ \r
-                                       var availableRole = a;\r
-                                       availableRole.selected = false;\r
-                                       if($scope.role.childRoles){\r
-                                   $.each($scope.role.childRoles, function(j, b){ \r
-                                       if(a.id === b.id) {\r
-                                               availableRole.selected = true;\r
-                                       }\r
-                                   });\r
-                                       };\r
-                                   $scope.availableRoles.push(availableRole);      \r
-                               });     \r
-                               \r
-                       $scope.ociavailableRoleFunctions = availableRoleFunctions; \r
-                       console.log($scope.ociavailableRoleFunctions);\r
-                       $scope.availableRoleFunctions = []; \r
-                       if($scope.ociavailableRoleFunctions)\r
-                               $.each($scope.ociavailableRoleFunctions, function(i, a){ \r
-                                       var availableRoleFunction = a;\r
-                                       availableRoleFunction.selected = false;\r
-                                   $.each($scope.role.roleFunctions, function(j, b){ \r
-                                       if(a.code === b.code) {\r
-                                               availableRoleFunction.selected = true;\r
-                                       }\r
-                                   });\r
-                                   $scope.availableRoleFunctions.push(availableRoleFunction);      \r
-                       });\r
-                       //$scope.resetMenu();\r
-               \r
-               $scope.toggleRoleFunction = function(selected,availableRoleFunction) {\r
-                       //alert('toggleRole: '+selected);\r
-                        \r
-                       if(!selected) {\r
-                               //remove role function\r
-                               if(role.id==null){\r
-                                       var index = $scope.role.roleFunctions.indexOf(availableRoleFunction);\r
-                                       if(index>=0)\r
-                                               $scope.role.roleFunctions.splice(index, 1);\r
-                                       return;\r
-                               }\r
-                               var uuu = conf.api.toggleRoleRoleFunction + "?role_id=" + roleId;\r
-                               confirmBoxService.confirm("You are about to remove the role function "+availableRoleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                                       function(confirmed){\r
-                                                       if(confirmed) { \r
-                                                               var postData={roleFunction:availableRoleFunction};\r
-                                                               $http.post(uuu, postData).then(\r
-                                                                               function(response) {\r
-                                                                                       $scope.role= response.data.role;\r
-                                                                               }, \r
-                                                                               function(response) {\r
-                                                                                       confirmBoxService.showInformation("Error while saving.");\r
-                                                                               }\r
-                                                               );\r
-                                                                       \r
-                                                                       \r
-                                                                       \r
-                                                                       \r
-                                                               }\r
-                                                        else {\r
-                                                                availableRoleFunction.selected=!availableRoleFunction.selected;\r
-                                                        }\r
-                                                               /*\r
-                                                                 $.ajax({\r
-                                                                        type : 'POST',\r
-                                                                        url : uuu,\r
-                                                                        dataType: 'json',\r
-                                                                        contentType: 'application/json',\r
-                                                                        data: JSON.stringify(postData),\r
-                                                                        success : function(data){\r
-                                                                               $scope.$apply(function(){$scope.role=data.role;}); \r
-                                                                        },\r
-                                                                        error : function(data){\r
-                                                                                modalService.showFailure("Fail","Error while saving.");\r
-                                                                        }\r
-                                                                 });\r
-                                                                 */\r
-                                       });\r
-       \r
-                       } else {\r
-                               //add role function\r
-                               if(role.id==null){\r
-                                       $scope.role.roleFunctions.push(availableRoleFunction);\r
-                                       return;\r
-                               }\r
-                               var uuu = conf.api.addRoleRoleFunction + "?role_id=" + roleId;\r
-                               \r
-                               confirmBoxService.confirm("You are about to add the role function "+availableRoleFunction.name+" to the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                                       function(confirmed){\r
-                                               if(confirmed) {\r
-                                                                 var postData={roleFunction:availableRoleFunction};\r
-                                                                 $http.post(uuu,postData).then( function(response) {\r
-                                                                         $scope.role=response.data.role;\r
-                                                                         },\r
-                                                                         \r
-                                                                         function(data) {\r
-                                                                                 confirmBoxService.showInformation("Error while saving.");\r
-                                                                         });\r
-                                                       } else {\r
-                                                                         availableRoleFunction.selected=!availableRoleFunction.selected;\r
-                                                       }\r
-                                                                       /*                \r
-                                                                         $.ajax({\r
-                                                                                type : 'POST',\r
-                                                                                url : uuu,\r
-                                                                                dataType: 'json',\r
-                                                                                contentType: 'application/json',\r
-                                                                                data: JSON.stringify(postData),\r
-                                                                                success : function(data){\r
-                                                                                       $scope.$apply(function(){$scope.role=data.role;}); \r
-                                                                                },\r
-                                                                                error : function(data){\r
-                                                                                        modalService.showFailure("Fail","Error while saving.");\r
-                                                                                }\r
-                                                                         });\r
-                                                                         \r
-                                                                       \r
-                                                       },\r
-                                                       function(){\r
-                                                               availableRoleFunction.selected=!availableRoleFunction.selected;\r
-                                                       })*/\r
-                       });\r
-                       \r
-                         \r
-       }\r
-               };\r
-       \r
-       $scope.toggleChildRole = function(selected,availableRole) {\r
-               //alert('toggleRole: '+selected);\r
-\r
-               if(!selected) {\r
-                       //remove role\r
-                       if(role.id==null){\r
-                               var index = $scope.role.childRoles.indexOf(availableRole);\r
-                               if(index>=0)\r
-                                       $scope.role.childRoles.splice(index, 1);\r
-                               return;\r
-                       }\r
-                       var uuu = conf.api.toggleRoleChildRole +"?role_id=" + roleId;\r
-                       \r
-                       confirmBoxService.confirm("You are about to remove the child role "+availableRole.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                       if(confirmed) {\r
-                               \r
-                                               var postData={childRole:availableRole};\r
-                                                $http.post(uuu,postData).then(function(response) {\r
-                                                         $scope.role=response.data.role;\r
-                                                         },\r
-                                                         function(data) {\r
-                                                                 confirmBoxService.showInformation("Error while saving.");\r
-                                                         });\r
-                                                 } else {\r
-                                                         availableRole.selected=false;\r
-                                                 }\r
-                               });\r
-                                                /* $.ajax({\r
-                                                        type : 'POST',\r
-                                                        url : uuu,\r
-                                                        dataType: 'json',\r
-                                                        contentType: 'application/json',\r
-                                                        data: JSON.stringify(postData),\r
-                                                        success : function(data){\r
-                                                                console.log('role',data.role);\r
-                                                                $scope.$apply(function(){$scope.role=data.role;}); \r
-                                                        },\r
-                                                        error : function(data){\r
-                                                                modalService.showFailure("Fail","Error while saving.");\r
-                                                        }\r
-                                                 });\r
-                                                 */\r
-                               \r
-               \r
-               } else {\r
-                       //add role\r
-                       if(role.id==null){\r
-                               $scope.role.childRoles.push(availableRole);\r
-                               return;\r
-                       }\r
-                       var uuu = conf.api.addRoleChildRole +"?role_id=" + roleId;\r
-                       \r
-                       confirmBoxService.confirm("You are about to add the child role "+availableRole.name+" to the role for "+$scope.role.name+". Do you want to continue?").then(\r
-                               function(confirmed){\r
-                                       if(confirmed) {\r
-                                                 var postData={childRole:availableRole};\r
-                                                 $http.post(uuu,postData).then(function(response) {\r
-                                                         $scope.role=response.data.role;\r
-                                                         },\r
-                                                         function(data) {\r
-                                                                 confirmBoxService.showInformation("Error while saving.");\r
-                                                         });\r
-                                                 } else {\r
-                                                         availableRole.selected=false;\r
-                                                 }\r
-                                /* $.ajax({\r
-                                        type : 'POST',\r
-                                        url : uuu,\r
-                                        dataType: 'json',\r
-                                        contentType: 'application/json',\r
-                                        data: JSON.stringify(postData),\r
-                                        success : function(data){\r
-                                               $scope.$apply(function(){$scope.role=data.role;}); \r
-                                        },\r
-                                        error : function(data){\r
-                                                modalService.showFailure("Fail","Error while saving.");\r
-                                        }\r
-                               });*/\r
-                               \r
-               });\r
-               \r
-                 \r
-       }\r
-       };\r
-       \r
-       $scope.close = function() {\r
-               console.log('role', $scope.role);\r
-               //$modalInstance.close({role:$scope.role});\r
-               this.closeThisDialog(true);\r
-       };\r
-       \r
-});\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+app.controller('rolepopupController',  function ($scope, role, roleId, confirmBoxService, $http, $state, availableRoles, conf, availableRoleFunctions,ngDialog){
+       
+                       $scope.role = role;
+                       console.log($scope.role);
+                       if($scope.role.childRoles==null){
+                               $scope.role.childRoles=[];
+                       }
+                       
+                       $scope.ociavailableRoles=availableRoles;
+                       console.log($scope.ociavailableRoles);
+                       
+                       $scope.availableRoles=[];
+                       if($scope.ociavailableRoles)
+                               $.each($scope.ociavailableRoles, function(i, a){ 
+                                       var availableRole = a;
+                                       availableRole.selected = false;
+                                       if($scope.role.childRoles){
+                                   $.each($scope.role.childRoles, function(j, b){ 
+                                       if(a.id === b.id) {
+                                               availableRole.selected = true;
+                                       }
+                                   });
+                                       };
+                                   $scope.availableRoles.push(availableRole);      
+                               });     
+                               
+                       $scope.ociavailableRoleFunctions = availableRoleFunctions; 
+                       console.log($scope.ociavailableRoleFunctions);
+                       $scope.availableRoleFunctions = []; 
+                       if($scope.ociavailableRoleFunctions)
+                               $.each($scope.ociavailableRoleFunctions, function(i, a){ 
+                                       var availableRoleFunction = a;
+                                       availableRoleFunction.selected = false;
+                                   $.each($scope.role.roleFunctions, function(j, b){ 
+                                       if(a.code === b.code) {
+                                               availableRoleFunction.selected = true;
+                                       }
+                                   });
+                                   $scope.availableRoleFunctions.push(availableRoleFunction);      
+                       });
+                       //$scope.resetMenu();
+               
+               $scope.toggleRoleFunction = function(selected,availableRoleFunction) {
+                       //alert('toggleRole: '+selected);
+                        
+                       if(!selected) {
+                               //remove role function
+                               if(role.id==null){
+                                       var index = $scope.role.roleFunctions.indexOf(availableRoleFunction);
+                                       if(index>=0)
+                                               $scope.role.roleFunctions.splice(index, 1);
+                                       return;
+                               }
+                               var uuu = conf.api.toggleRoleRoleFunction + "?role_id=" + roleId;
+                               confirmBoxService.confirm("You are about to remove the role function "+availableRoleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(
+                                       function(confirmed){
+                                                       if(confirmed) { 
+                                                               var postData={roleFunction:availableRoleFunction};
+                                                               $http.post(uuu, postData).then(
+                                                                               function(response) {
+                                                                                       $scope.role= response.data.role;
+                                                                               }, 
+                                                                               function(response) {
+                                                                                       confirmBoxService.showInformation("Error while saving.");
+                                                                               }
+                                                               );
+                                                                       
+                                                                       
+                                                                       
+                                                                       
+                                                               }
+                                                        else {
+                                                                availableRoleFunction.selected=!availableRoleFunction.selected;
+                                                        }
+                                                               /*
+                                                                 $.ajax({
+                                                                        type : 'POST',
+                                                                        url : uuu,
+                                                                        dataType: 'json',
+                                                                        contentType: 'application/json',
+                                                                        data: JSON.stringify(postData),
+                                                                        success : function(data){
+                                                                               $scope.$apply(function(){$scope.role=data.role;}); 
+                                                                        },
+                                                                        error : function(data){
+                                                                                modalService.showFailure("Fail","Error while saving.");
+                                                                        }
+                                                                 });
+                                                                 */
+                                       });
+       
+                       } else {
+                               //add role function
+                               if(role.id==null){
+                                       $scope.role.roleFunctions.push(availableRoleFunction);
+                                       return;
+                               }
+                               var uuu = conf.api.addRoleRoleFunction + "?role_id=" + roleId;
+                               
+                               confirmBoxService.confirm("You are about to add the role function "+availableRoleFunction.name+" to the role for "+$scope.role.name+". Do you want to continue?").then(
+                                       function(confirmed){
+                                               if(confirmed) {
+                                                                 var postData={roleFunction:availableRoleFunction};
+                                                                 $http.post(uuu,postData).then( function(response) {
+                                                                         $scope.role=response.data.role;
+                                                                         },
+                                                                         
+                                                                         function(data) {
+                                                                                 confirmBoxService.showInformation("Error while saving.");
+                                                                         });
+                                                       } else {
+                                                                         availableRoleFunction.selected=!availableRoleFunction.selected;
+                                                       }
+                                                                       /*                
+                                                                         $.ajax({
+                                                                                type : 'POST',
+                                                                                url : uuu,
+                                                                                dataType: 'json',
+                                                                                contentType: 'application/json',
+                                                                                data: JSON.stringify(postData),
+                                                                                success : function(data){
+                                                                                       $scope.$apply(function(){$scope.role=data.role;}); 
+                                                                                },
+                                                                                error : function(data){
+                                                                                        modalService.showFailure("Fail","Error while saving.");
+                                                                                }
+                                                                         });
+                                                                         
+                                                                       
+                                                       },
+                                                       function(){
+                                                               availableRoleFunction.selected=!availableRoleFunction.selected;
+                                                       })*/
+                       });
+                       
+                         
+       }
+               };
+       
+       $scope.toggleChildRole = function(selected,availableRole) {
+               //alert('toggleRole: '+selected);
+
+               if(!selected) {
+                       //remove role
+                       if(role.id==null){
+                               var index = $scope.role.childRoles.indexOf(availableRole);
+                               if(index>=0)
+                                       $scope.role.childRoles.splice(index, 1);
+                               return;
+                       }
+                       var uuu = conf.api.toggleRoleChildRole +"?role_id=" + roleId;
+                       
+                       confirmBoxService.confirm("You are about to remove the child role "+availableRole.name+" from the role for "+$scope.role.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                       if(confirmed) {
+                               
+                                               var postData={childRole:availableRole};
+                                                $http.post(uuu,postData).then(function(response) {
+                                                         $scope.role=response.data.role;
+                                                         },
+                                                         function(data) {
+                                                                 confirmBoxService.showInformation("Error while saving.");
+                                                         });
+                                                 } else {
+                                                         availableRole.selected=false;
+                                                 }
+                               });
+                                                /* $.ajax({
+                                                        type : 'POST',
+                                                        url : uuu,
+                                                        dataType: 'json',
+                                                        contentType: 'application/json',
+                                                        data: JSON.stringify(postData),
+                                                        success : function(data){
+                                                                console.log('role',data.role);
+                                                                $scope.$apply(function(){$scope.role=data.role;}); 
+                                                        },
+                                                        error : function(data){
+                                                                modalService.showFailure("Fail","Error while saving.");
+                                                        }
+                                                 });
+                                                 */
+                               
+               
+               } else {
+                       //add role
+                       if(role.id==null){
+                               $scope.role.childRoles.push(availableRole);
+                               return;
+                       }
+                       var uuu = conf.api.addRoleChildRole +"?role_id=" + roleId;
+                       
+                       confirmBoxService.confirm("You are about to add the child role "+availableRole.name+" to the role for "+$scope.role.name+". Do you want to continue?").then(
+                               function(confirmed){
+                                       if(confirmed) {
+                                                 var postData={childRole:availableRole};
+                                                 $http.post(uuu,postData).then(function(response) {
+                                                         $scope.role=response.data.role;
+                                                         },
+                                                         function(data) {
+                                                                 confirmBoxService.showInformation("Error while saving.");
+                                                         });
+                                                 } else {
+                                                         availableRole.selected=false;
+                                                 }
+                                /* $.ajax({
+                                        type : 'POST',
+                                        url : uuu,
+                                        dataType: 'json',
+                                        contentType: 'application/json',
+                                        data: JSON.stringify(postData),
+                                        success : function(data){
+                                               $scope.$apply(function(){$scope.role=data.role;}); 
+                                        },
+                                        error : function(data){
+                                                modalService.showFailure("Fail","Error while saving.");
+                                        }
+                               });*/
+                               
+               });
+               
+                 
+       }
+       };
+       
+       $scope.close = function() {
+               console.log('role', $scope.role);
+               //$modalInstance.close({role:$scope.role});
+               this.closeThisDialog(true);
+       };
+       
+});
index 6d0f2d1..63a3abb 100644 (file)
@@ -1,63 +1,63 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class SidebarCtrl {\r
-        constructor(applicationsService,userProfileService, $log, $rootScope) {\r
-            this.$log = $log;\r
-            this.userProfileService = userProfileService;\r
-            this.$rootScope = $rootScope;\r
-            $rootScope.isAdminPortalAdmin = false;\r
-\r
-\r
-            //if (bowser.msie || bowser.msedge)\r
-            //    $log.debug('SidebarCtrl::init: Browser is: Internet Explorer or Edge');\r
-            // else\r
-            //    $log.debug('SidebarCtrl::init: Browser is: ' + bowser.name + ': ' + bowser.version);\r
-\r
-            //note: this model should be retrieved from BE via sidebar specific service\r
-               userProfileService.getUserProfile()\r
-                .then(profile=> {\r
-                       \r
-                       if (profile.roles.indexOf('System Administrator') > -1) {\r
-                        $rootScope.isAdminPortalAdmin = true;\r
-                       } else {\r
-                                this.$log.debug('SidebarCtrl::getUserProfile: user is not superAdmin nor admin');\r
-                       }\r
-                });\r
-                // $log.debug('SidebarCtrl::getUserProfile: profile.roles.indexOf(superAdmin) = ' + profile.roles.indexOf('superAdmin'));\r
-                // $log.debug('SidebarCtrl::getUserProfile: profile.roles.indexOf(admin) = ' + profile.roles.indexOf('admin'));\r
-               applicationsService\r
-                       .getLeftMenuItems()\r
-                       .then(res=>\r
-                                {\r
-                                               //console.log("Menu items is "+JSON.stringify(res));\r
-                                               this.sidebarModel = res;         \r
-                                }).catch(err => {\r
-                       //confirmBoxService.showInformation('There was a problem creating the menu. ' +\r
-                    // 'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});\r
-                       $log.error('SidebarCtrl::getUserProfile: User Profile error occurred: ' + err);\r
-                               });\r
-    \r
-        }\r
-    }\r
-    SidebarCtrl.$inject = ['applicationsService','userProfileService', '$log', '$rootScope'];\r
-    angular.module('ecompApp').controller('SidebarCtrl', SidebarCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class SidebarCtrl {
+        constructor(applicationsService,userProfileService, $log, $rootScope) {
+            this.$log = $log;
+            this.userProfileService = userProfileService;
+            this.$rootScope = $rootScope;
+            $rootScope.isAdminPortalAdmin = false;
+
+
+            //if (bowser.msie || bowser.msedge)
+            //    $log.debug('SidebarCtrl::init: Browser is: Internet Explorer or Edge');
+            // else
+            //    $log.debug('SidebarCtrl::init: Browser is: ' + bowser.name + ': ' + bowser.version);
+
+            //note: this model should be retrieved from BE via sidebar specific service
+               userProfileService.getUserProfile()
+                .then(profile=> {
+                       
+                       if (profile.roles.indexOf('System Administrator') > -1) {
+                        $rootScope.isAdminPortalAdmin = true;
+                       } else {
+                                this.$log.debug('SidebarCtrl::getUserProfile: user is not superAdmin nor admin');
+                       }
+                });
+                // $log.debug('SidebarCtrl::getUserProfile: profile.roles.indexOf(superAdmin) = ' + profile.roles.indexOf('superAdmin'));
+                // $log.debug('SidebarCtrl::getUserProfile: profile.roles.indexOf(admin) = ' + profile.roles.indexOf('admin'));
+               applicationsService
+                       .getLeftMenuItems()
+                       .then(res=>
+                                {
+                                               //console.log("Menu items is "+JSON.stringify(res));
+                                               this.sidebarModel = res;         
+                                }).catch(err => {
+                       //confirmBoxService.showInformation('There was a problem creating the menu. ' +
+                    // 'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                       $log.error('SidebarCtrl::getUserProfile: User Profile error occurred: ' + err);
+                               });
+    
+        }
+    }
+    SidebarCtrl.$inject = ['applicationsService','userProfileService', '$log', '$rootScope'];
+    angular.module('ecompApp').controller('SidebarCtrl', SidebarCtrl);
+})();
index f86b5af..97650fe 100644 (file)
@@ -1,37 +1,37 @@
-/*-\r
- * ================================================================================\r
- * eCOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
- .w-ecomp-sidebar {\r
-    position: relative;\r
-    left: 0;\r
-    right: 0;\r
-    top: 5px;\r
-    padding-left: 0;\r
-}\r
-  \r
-  @media screen and (-webkit-min-device-pixel-ratio:0)\r
-{ \r
-    .w-ecomp-sidebar {\r
-         position: relative;\r
-         left: 0;\r
-         right: 0;\r
-         top: -5px;\r
-         padding-left: 0;\r
-    }\r
+/*-
+ * ================================================================================
+ * eCOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+ .w-ecomp-sidebar {
+    position: relative;
+    left: 0;
+    right: 0;
+    top: 5px;
+    padding-left: 0;
+}
+  
+  @media screen and (-webkit-min-device-pixel-ratio:0)
+{ 
+    .w-ecomp-sidebar {
+         position: relative;
+         left: 0;
+         right: 0;
+         top: -5px;
+         padding-left: 0;
+    }
 }
\ No newline at end of file
index 95492ed..a5cbf8f 100644 (file)
@@ -1,20 +1,20 @@
-<!--\r
-  ================================================================================\r
-  eCOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<left-menu id="sidebar.sidebarModel" sidebar-model="sidebar.sidebarModel" class="w-ecomp-sidebar"></left-menu>\r
+<!--
+  ================================================================================
+  eCOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<left-menu id="sidebar.sidebarModel" sidebar-model="sidebar.sidebarModel" class="w-ecomp-sidebar"></left-menu>
index 8413382..8c76abc 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-    class ContactUsManageController {\r
-        constructor($scope,$log, message, $q, $http, conf,contactUsService,confirmBoxService) {\r
-               $scope.contactUsList=[];\r
-               $scope.contactUsAllAppList=[];\r
-               $scope.errMsg='';\r
-               $scope.newContactUs ={\r
-                               app:'',\r
-                               name:'',\r
-                               email:'',\r
-                               url:'',\r
-                               desc:''                         \r
-               };\r
-               /*Get the existing contact us first, then based on the existing, filter from all apps*/\r
-               $scope.getContactUsList = function(){\r
-                       contactUsService.getContactUs().then(res=> {\r
-                       // $log.info('getting getContactUs',res.response);\r
-                       if(res!=null && res.response!=null){\r
-                               for(var i=0; i<res.response.length;i++){\r
-                                       if(res.response[i].appId!=1)\r
-                                               $scope.contactUsList.push(res.response[i]);\r
-                               }\r
-                       }\r
-                       /*get all the apps*/\r
-                       contactUsService.getListOfApp().then(res=> {\r
-                       var tableData=[];\r
-                       $scope.contactUsAllAppListTemp=[];\r
-                       // $log.info('contactUsService::getListOfApp: getting res');\r
-                       var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;\r
-                       // $log.info('contactUsService::getListOfApp: result',result);          \r
-                       var res1 = result;\r
-                        var realAppIndex = 0;\r
-                        $scope.contactUsAllAppList.length=0;\r
-                        for (var i = 1; i <= res1.length; i++) {\r
-                            if (!res1[i - 1].restrictedApp) {\r
-                               var okToAdd = true;\r
-                               for(var j =0; j<$scope.contactUsList.length;j++){\r
-                                       if(res1[i - 1].title==$scope.contactUsList[j].appName)\r
-                                               okToAdd=false;\r
-                               }\r
-                               // not allowed to add(duplicate) another entry if the app is already available in the table\r
-                               if(okToAdd){\r
-                                       if(res1[i - 1].title){\r
-                                               $scope.contactUsAllAppList.push({\r
-                                            index: realAppIndex,\r
-                                            title: res1[i - 1].title,\r
-                                            value: res1[i - 1].index\r
-                                        });\r
-                                       }       \r
-                                       realAppIndex = realAppIndex + 1;\r
-                               }         \r
-                            } else {\r
-                                // $log.debug('contactUsService:getAvailableApps:: Restricted/URL only App will not be used = ' + res1[i - 1].title);\r
-                            }\r
-                        }       \r
-                    }).catch(err=> {\r
-                        $log.error('contactUsService:error:: ', err);\r
-                        \r
-                       \r
-                    }).finally(() => {\r
-                        //this.isLoadingTable = false;\r
-                    });\r
-               });\r
-               }\r
-               \r
-               $scope.getContactUsList();\r
-               \r
-               $scope.closeDialog = function(){\r
-                       $scope.closeThisDialog( $scope.widgetData);\r
-               }\r
-               \r
-               /*Add new Contact Us*/\r
-               $scope.newContactUsFun = function(){ \r
-                       if($scope.newContactUs.app.title==null || $scope.newContactUs.app.title=='' ){\r
-                               confirmBoxService.showInformation('Please select an App to add').then(isConfirmed => {\r
-                                       return;\r
-                               });     \r
-                       }\r
-                                               \r
-                       if($scope.newContactUs.url !=null && $scope.newContactUs.url != '' && !validateUrl($scope.newContactUs.url)){\r
-                               var warningMsg = "Please enter a valid URL";\r
-                               confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});\r
-                               return;\r
-                       }\r
-                       \r
-                       contactUsService.addContactUs($scope.newContactUs).then(res=> {\r
-                               // $log.info('contactUsService: add ContactUs successfully');\r
-                               $scope.contactUsList.length=0;\r
-                               // $log.info('contactUsService: refreshing the Contact US table');\r
-                               $scope.getContactUsList();\r
-                               $scope.errMsg='';\r
-                               /*      confirmBoxService.showInformation('You have added a new Contact Us item').then(isConfirmed => { });*/\r
-                               var defaultSel={\r
-                                               index: 0,\r
-                            title: '',\r
-                            value: ''\r
-                               }\r
-                               $scope.newContactUs ={\r
-                                       app:defaultSel,                         \r
-                                       name:'',\r
-                                       email:'',\r
-                                       url:'',\r
-                                       desc:''                         \r
-                       };\r
-\r
-                }).catch(err=> {\r
-                    $log.error('contactUsService: addContactUs error:: ', err);\r
-                   // $scope.errMsg=err;\r
-                    confirmBoxService.showInformation('Add Contact Us list failed: ' + err);\r
-                   \r
-                }).finally(() => {\r
-                    //this.isLoadingTable = false;\r
-                });\r
-               }\r
-               /* Edit Contact Us*/\r
-               $scope.editContactUsFun = function(contactObj){\r
-                       // $log.info('contactUsService: edit ContactUs save successfully', contactObj);                         \r
-                       var contactUsObj={\r
-                               appId:contactObj.appId,\r
-                               appName:contactObj.appName,\r
-                               description:contactObj.description,\r
-                               contactName:contactObj.contactName,\r
-                               contactEmail:contactObj.contactEmail,\r
-                               url:contactObj.url,                     \r
-                };\r
-                       \r
-                       contactUsService.modifyContactUs(contactUsObj).then(res=> {\r
-                               // $log.info('contactUsService: edit ContactUs successfully');\r
-                               //      confirmBoxService.showInformation('You have saved the changes').then(isConfirmed => {});\r
-                               $scope.errMsg='';\r
-                               \r
-                }).catch(err=> {\r
-                    $log.error('contactUsService: editContactUs error:: ', err);\r
-                    confirmBoxService.showInformation('Edit Contact Us list failed: ' + err);\r
-                   // $scope.errMsg=err;\r
-                }).finally(() => {\r
-                    //this.isLoadingTable = false;\r
-                });\r
-                       \r
-               }\r
-               \r
-               $scope.$watch('newContactUs.app.value', (newVal, oldVal) => {\r
-                       for(var i=0;i<$scope.contactUsAllAppList.length;i++){\r
-                       if($scope.contactUsAllAppList[i].value==newVal){\r
-                       $scope.newContactUs.app=angular.copy($scope.contactUsAllAppList[i]);;\r
-                       }\r
-                       }\r
-                       });\r
-               /*del Contact Us*/\r
-               $scope.delContactUsFun = function(appObj){\r
-                       var confirmMsg = 'Are you sure you want to delete '+appObj.appName +' from the list?' + ' Press OK to delete.';\r
-                       confirmBoxService.confirm(confirmMsg).then(function (confirmed) {\r
-                    if (confirmed == true) {                           \r
-                       contactUsService.removeContactUs(appObj.appId).then(res=> {   \r
-                               // $log.info('delContactUsFun: delete ContactUs successfully',res);\r
-                                       $scope.errMsg='';\r
-                                       $scope.contactUsList.length=0;\r
-                                       $scope.getContactUsList();\r
-                                       confirmBoxService.showInformation('Item has been deleted').then(isConfirmed => {});\r
-                        }).catch(err=> {\r
-                            $log.error('contactUsService: addContactUs error:: ', err);\r
-                            confirmBoxService.showInformation('Deletion failed: ' + err);\r
-                           // $scope.errMsg=err;\r
-                        }).finally(() => {\r
-                            //this.isLoadingTable = false;\r
-                        });\r
-                    }\r
-                });\r
-                       \r
-               }       \r
-               \r
-        }        \r
-    }\r
-    ContactUsManageController.$inject = ['$scope','$log',  'message', '$q', '$http', 'conf','contactUsService','confirmBoxService'];\r
-    angular.module('ecompApp').controller('ContactUsManageController', ContactUsManageController);\r
-\r
\r
-})();\r
-function validateUrl(value){\r
-    return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);\r
-  }\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+    class ContactUsManageController {
+        constructor($scope,$log, message, $q, $http, conf,contactUsService,confirmBoxService) {
+               $scope.contactUsList=[];
+               $scope.contactUsAllAppList=[];
+               $scope.errMsg='';
+               $scope.newContactUs ={
+                               app:'',
+                               name:'',
+                               email:'',
+                               url:'',
+                               desc:''                         
+               };
+               /*Get the existing contact us first, then based on the existing, filter from all apps*/
+               $scope.getContactUsList = function(){
+                       contactUsService.getContactUs().then(res=> {
+                       // $log.info('getting getContactUs',res.response);
+                       if(res!=null && res.response!=null){
+                               for(var i=0; i<res.response.length;i++){
+                                       if(res.response[i].appId!=1)
+                                               $scope.contactUsList.push(res.response[i]);
+                               }
+                       }
+                       /*get all the apps*/
+                       contactUsService.getListOfApp().then(res=> {
+                       var tableData=[];
+                       $scope.contactUsAllAppListTemp=[];
+                       // $log.info('contactUsService::getListOfApp: getting res');
+                       var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;
+                       // $log.info('contactUsService::getListOfApp: result',result);          
+                       var res1 = result;
+                        var realAppIndex = 0;
+                        $scope.contactUsAllAppList.length=0;
+                        for (var i = 1; i <= res1.length; i++) {
+                            if (!res1[i - 1].restrictedApp) {
+                               var okToAdd = true;
+                               for(var j =0; j<$scope.contactUsList.length;j++){
+                                       if(res1[i - 1].title==$scope.contactUsList[j].appName)
+                                               okToAdd=false;
+                               }
+                               // not allowed to add(duplicate) another entry if the app is already available in the table
+                               if(okToAdd){
+                                       if(res1[i - 1].title){
+                                               $scope.contactUsAllAppList.push({
+                                            index: realAppIndex,
+                                            title: res1[i - 1].title,
+                                            value: res1[i - 1].index
+                                        });
+                                       }       
+                                       realAppIndex = realAppIndex + 1;
+                               }         
+                            } else {
+                                // $log.debug('contactUsService:getAvailableApps:: Restricted/URL only App will not be used = ' + res1[i - 1].title);
+                            }
+                        }       
+                    }).catch(err=> {
+                        $log.error('contactUsService:error:: ', err);
+                        
+                       
+                    }).finally(() => {
+                        //this.isLoadingTable = false;
+                    });
+               });
+               }
+               
+               $scope.getContactUsList();
+               
+               $scope.closeDialog = function(){
+                       $scope.closeThisDialog( $scope.widgetData);
+               }
+               
+               /*Add new Contact Us*/
+               $scope.newContactUsFun = function(){ 
+                       if($scope.newContactUs.app.title==null || $scope.newContactUs.app.title=='' ){
+                               confirmBoxService.showInformation('Please select an App to add').then(isConfirmed => {
+                                       return;
+                               });     
+                       }
+                                               
+                       if($scope.newContactUs.url !=null && $scope.newContactUs.url != '' && !validateUrl($scope.newContactUs.url)){
+                               var warningMsg = "Please enter a valid URL";
+                               confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});
+                               return;
+                       }
+                       
+                       contactUsService.addContactUs($scope.newContactUs).then(res=> {
+                               // $log.info('contactUsService: add ContactUs successfully');
+                               $scope.contactUsList.length=0;
+                               // $log.info('contactUsService: refreshing the Contact US table');
+                               $scope.getContactUsList();
+                               $scope.errMsg='';
+                               /*      confirmBoxService.showInformation('You have added a new Contact Us item').then(isConfirmed => { });*/
+                               var defaultSel={
+                                               index: 0,
+                            title: '',
+                            value: ''
+                               }
+                               $scope.newContactUs ={
+                                       app:defaultSel,                         
+                                       name:'',
+                                       email:'',
+                                       url:'',
+                                       desc:''                         
+                       };
+
+                }).catch(err=> {
+                    $log.error('contactUsService: addContactUs error:: ', err);
+                   // $scope.errMsg=err;
+                    confirmBoxService.showInformation('Add Contact Us list failed: ' + err);
+                   
+                }).finally(() => {
+                    //this.isLoadingTable = false;
+                });
+               }
+               /* Edit Contact Us*/
+               $scope.editContactUsFun = function(contactObj){
+                       // $log.info('contactUsService: edit ContactUs save successfully', contactObj);                         
+                       var contactUsObj={
+                               appId:contactObj.appId,
+                               appName:contactObj.appName,
+                               description:contactObj.description,
+                               contactName:contactObj.contactName,
+                               contactEmail:contactObj.contactEmail,
+                               url:contactObj.url,                     
+                };
+                       
+                       contactUsService.modifyContactUs(contactUsObj).then(res=> {
+                               // $log.info('contactUsService: edit ContactUs successfully');
+                               //      confirmBoxService.showInformation('You have saved the changes').then(isConfirmed => {});
+                               $scope.errMsg='';
+                               
+                }).catch(err=> {
+                    $log.error('contactUsService: editContactUs error:: ', err);
+                    confirmBoxService.showInformation('Edit Contact Us list failed: ' + err);
+                   // $scope.errMsg=err;
+                }).finally(() => {
+                    //this.isLoadingTable = false;
+                });
+                       
+               }
+               
+               $scope.$watch('newContactUs.app.value', (newVal, oldVal) => {
+                       for(var i=0;i<$scope.contactUsAllAppList.length;i++){
+                       if($scope.contactUsAllAppList[i].value==newVal){
+                       $scope.newContactUs.app=angular.copy($scope.contactUsAllAppList[i]);;
+                       }
+                       }
+                       });
+               /*del Contact Us*/
+               $scope.delContactUsFun = function(appObj){
+                       var confirmMsg = 'Are you sure you want to delete '+appObj.appName +' from the list?' + ' Press OK to delete.';
+                       confirmBoxService.confirm(confirmMsg).then(function (confirmed) {
+                    if (confirmed == true) {                           
+                       contactUsService.removeContactUs(appObj.appId).then(res=> {   
+                               // $log.info('delContactUsFun: delete ContactUs successfully',res);
+                                       $scope.errMsg='';
+                                       $scope.contactUsList.length=0;
+                                       $scope.getContactUsList();
+                                       confirmBoxService.showInformation('Item has been deleted').then(isConfirmed => {});
+                        }).catch(err=> {
+                            $log.error('contactUsService: addContactUs error:: ', err);
+                            confirmBoxService.showInformation('Deletion failed: ' + err);
+                           // $scope.errMsg=err;
+                        }).finally(() => {
+                            //this.isLoadingTable = false;
+                        });
+                    }
+                });
+                       
+               }       
+               
+        }        
+    }
+    ContactUsManageController.$inject = ['$scope','$log',  'message', '$q', '$http', 'conf','contactUsService','confirmBoxService'];
+    angular.module('ecompApp').controller('ContactUsManageController', ContactUsManageController);
+
+})();
+function validateUrl(value){
+    return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);
+  }
index 905f9fa..2625f32 100644 (file)
@@ -138,6 +138,24 @@ background-color: transparent;
          border-color: slategrey !important;
          width:100%;
   }
+    .mandatory-categories{
+       color: #cf2a2a;
+       font-size: 11px;
+       position:absolute;
+       
+       }
+   .error-container{
+    position: absolute;
+    width: 220px;
+    display: block;
+    height: 12px;
+    line-height: 12px;
+
+    .err-message{
+      color: @funcRed;
+      font-size: 10px;
+    }
+    } 
 .glyphicon {
       position: relative !important;
       line-height: 0 !important;
index c619a18..4c8f6de 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div style="margin-top: 10px; margin-bottom: 10px;"></div>\r
-<br />\r
-\r
-<div style="margin-top: 25px;">\r
-       <div id="title" class="manage-contactUs-home-title">Manage\r
-               Contact Us</div>\r
-       <div class="contact-us-margin">\r
-               <div class="get-access-table">\r
-                       <div class="table-control">\r
-                               <div class="c-ecomp-portal-abs-table" style="height: 300px">\r
-                                       <table b2b-table id="table-main" table-data="contactUsList"\r
-                                               current-page="ignoredCurrentPage">\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr>\r
-                                                               <th id="th-users-0" b2b-table-header key="ecomp_function"\r
-                                                                       default-sort="a">App Name</th>\r
-                                                               <th id="th-users-1" b2b-table-header key="app_name"\r
-                                                                       sortable="true">Contact Name</th>\r
-                                                               <th id="th-users-2" b2b-table-header key="app_name"\r
-                                                                       sortable="true">Contact Email</th>\r
-                                                               <th id="th-users-3" b2b-table-header key="role_name"\r
-                                                                       sortable="true">Contact URL</th>\r
-                                                               <th id="th-users-4" b2b-table-header key="role_name"\r
-                                                                       sortable="true">Description</th>\r
-                                                               <th id="th-users-5" b2b-table-header key="role_name"\r
-                                                                       sortable="true">Edit</th>\r
-                                                               <th id="th-users-6" b2b-table-header key="role_name"\r
-                                                                       sortable="true">Delete</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->\r
-                                               <tbody b2b-table-row type="body" class="table-body"\r
-                                                       track-by="$index" row-repeat="rowData in contactUsList">\r
-                                                       <tr id="tr-rowData" ng-click="">\r
-                                                               <td b2b-table-body>\r
-                                                                       <div id="users-page-td-appName" ng-bind="rowData.appName"></div>\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div id="users-page-td-name" ng-hide="rowData.showEdit"\r
-                                                                               ng-bind="rowData.contactName"></div> <input\r
-                                                                       class="input-inline-edit-text" type="text"\r
-                                                                       ng-show="rowData.showEdit"\r
-                                                                       ng-model="contactUsList[$index].contactName" />\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div id="users-page-td-email" ng-hide="rowData.showEdit"\r
-                                                                               ng-bind="rowData.contactEmail"></div> <input\r
-                                                                       class="input-inline-edit-text" type="text"\r
-                                                                       ng-show="rowData.showEdit"\r
-                                                                       ng-model="contactUsList[$index].contactEmail" />\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div id="users-page-td-url" ng-hide="rowData.showEdit"\r
-                                                                               ng-bind="rowData.url"></div> <input\r
-                                                                       class="input-inline-edit-text" type="text"\r
-                                                                       ng-show="rowData.showEdit" ng-model="contactUsList[$index].url" />\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div id="users-page-td-descr" ng-hide="rowData.showEdit"\r
-                                                                               ng-bind=" rowData.description"></div> <input\r
-                                                                       class="input-inline-edit-text" type="text"\r
-                                                                       ng-show="rowData.showEdit"\r
-                                                                       ng-model="contactUsList[$index].description" />\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div class="delete-contact-us" ng-hide="rowData.showEdit"\r
-                                                                               ng-click="rowData.showEdit=true">\r
-                                                                               <span class="icon-edit"></span>\r
-                                                                       </div> <span ng-show="rowData.showEdit"> <a\r
-                                                                               btn-type="primary"\r
-                                                                               ng-click="editContactUsFun(rowData); rowData.showEdit=false"\r
-                                                                               class="btn btn-alt btn-small" size="small">Save</a>\r
-                                                               </span>\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div class="delete-contact-us"\r
-                                                                               ng-click="delContactUsFun(rowData)">\r
-                                                                               <span class="icon-misc-trash"></span>\r
-                                                                       </div>\r
-                                                               </td>\r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>\r
-\r
-                               <div id="divider-line"></div>\r
-                               <div style="margin-top: 15px; margin-left: -78px;">\r
-                                       <div id="addWidgetHeader" class="contact-us-margin">\r
-                                               <h1 style="font-size: 18px;">Add Application Contact\r
-                                                       Information</h1>\r
-                                               <!-- <div class="errMsg">{{errMsg}}</div> -->\r
-                                       </div>\r
-                                       <div id="addWidget" class="contact-us-margin">\r
-                                               <div>\r
-                                                       <div id="add-contact-us-field-appname"\r
-                                                               class="add-contact-us-field">\r
-                                                               <div id="mots-property-label" class="property-label">App\r
-                                                                       Name</div>\r
-                                                               <select id="dropdown1" name="dropdown1" b2b-dropdown\r
-                                                                       placeholder-text="Select an App"\r
-                                                                       ng-model="newContactUs.app.value">\r
-                                                                       <option b2b-dropdown-list\r
-                                                                               option-repeat="d in contactUsAllAppList" value="{{d.value}}">{{d.title}}</option>\r
-                                                               </select>\r
-                                                       </div>\r
-                                                       <br>\r
-                                                       <div id="add-contact-us-field-contactname"\r
-                                                               class="add-contact-us-field">\r
-                                                               <div id="property-label-name" class="property-label">Contact\r
-                                                                       Name</div>\r
-                                                               <input id="property-input-name" class="input-text-area"\r
-                                                                       type="text" ng-model="newContactUs.name" />\r
-                                                       </div>\r
-                                                       <div id="add-contact-us-field-email" class="add-contact-us-field">\r
-                                                               <div id="property-label-email" class="property-label">Contact\r
-                                                                       Email</div>\r
-                                                               <input id="property-input-email" class="input-text-area"\r
-                                                                       type="text" ng-model="newContactUs.email" />\r
-                                                       </div>\r
-                                                       <div id="add-contact-us-field-url" class="add-contact-us-field">\r
-                                                               <div id="property-label-url" class="property-label">Contact\r
-                                                                       URL</div>\r
-                                                               <input id="property-input-url" class="input-text-area"\r
-                                                                       type="text" ng-model="newContactUs.url" />\r
-                                                       </div>\r
-                                                       <div id="add-contact-us-field-desc"\r
-                                                               class="add-contact-us-field-des">\r
-                                                               <div id="property-label-desc" class="property-label">Description</div>\r
-                                                               <textarea id="property-input-desc"\r
-                                                                       style="margin-top: 0px; margin-bottom: 0px; height: 100px"\r
-                                                                       ng-model="newContactUs.desc"></textarea>\r
-                                                       </div>\r
-                                               </div>\r
-                                               <div style="height: 50px;">\r
-                                                       <a style="float: right; margin-top: 20px"\r
-                                                               class="btn btn-alt btn-small" ng-click="newContactUsFun()">Add\r
-                                                               New</a>\r
-                                               </div>\r
-                                               <div id="divider-line-bottom"></div>\r
-\r
-                                               <div style="height: 50px;">\r
-                                                       <a style="float: right; margin-right: -230px !important;"\r
-                                                               class="btn btn-alt btn-small" ng-click="closeDialog()">Close</a>\r
-                                               </div>\r
-\r
-                                       </div>\r
-\r
-                               </div>\r
-\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
-\r
-<script type="application/javascript">\r
-       \r
-    $(document).ready(function(){\r
-        $(".ngdialog-content").css("width","85%")\r
-    });\r
-\r
-</script>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div style="margin-top: 10px; margin-bottom: 10px;"></div>
+<br />
+
+<div style="margin-top: 25px;">
+       <div id="title" class="manage-contactUs-home-title">Manage
+               Contact Us</div>
+       <div class="contact-us-margin">
+               <div class="get-access-table">
+                       <div class="table-control">
+                               <div class="c-ecomp-portal-abs-table" style="height: 300px">
+                                       <table b2b-table id="table-main" table-data="contactUsList"
+                                               current-page="ignoredCurrentPage">
+                                               <thead b2b-table-row type="header">
+                                                       <tr>
+                                                               <th id="th-users-0" b2b-table-header key="ecomp_function"
+                                                                       default-sort="a">App Name</th>
+                                                               <th id="th-users-1" b2b-table-header key="app_name"
+                                                                       sortable="true">Contact Name</th>
+                                                               <th id="th-users-2" b2b-table-header key="app_name"
+                                                                       sortable="true">Contact Email</th>
+                                                               <th id="th-users-3" b2b-table-header key="role_name"
+                                                                       sortable="true">Contact URL</th>
+                                                               <th id="th-users-4" b2b-table-header key="role_name"
+                                                                       sortable="true">Description</th>
+                                                               <th id="th-users-5" b2b-table-header key="role_name"
+                                                                       sortable="true">Edit</th>
+                                                               <th id="th-users-6" b2b-table-header key="role_name"
+                                                                       sortable="true">Delete</th>
+                                                       </tr>
+                                               </thead>
+                                               <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
+                                               <tbody b2b-table-row type="body" class="table-body"
+                                                       track-by="$index" row-repeat="rowData in contactUsList">
+                                                       <tr id="tr-rowData" ng-click="">
+                                                               <td b2b-table-body>
+                                                                       <div id="users-page-td-appName" ng-bind="rowData.appName"></div>
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div id="users-page-td-name" ng-hide="rowData.showEdit"
+                                                                               ng-bind="rowData.contactName"></div> <input
+                                                                       class="input-inline-edit-text" type="text"
+                                                                       ng-show="rowData.showEdit"
+                                                                       ng-model="contactUsList[$index].contactName" />
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div id="users-page-td-email" ng-hide="rowData.showEdit"
+                                                                               ng-bind="rowData.contactEmail"></div> <input
+                                                                       class="input-inline-edit-text" type="text"
+                                                                       ng-show="rowData.showEdit"
+                                                                       ng-model="contactUsList[$index].contactEmail" />
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div id="users-page-td-url" ng-hide="rowData.showEdit"
+                                                                               ng-bind="rowData.url"></div> <input
+                                                                       class="input-inline-edit-text" type="text"
+                                                                       ng-show="rowData.showEdit" ng-model="contactUsList[$index].url" />
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div id="users-page-td-descr" ng-hide="rowData.showEdit"
+                                                                               ng-bind=" rowData.description"></div> <input
+                                                                       class="input-inline-edit-text" type="text"
+                                                                       ng-show="rowData.showEdit"
+                                                                       ng-model="contactUsList[$index].description" />
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div class="delete-contact-us" ng-hide="rowData.showEdit"
+                                                                               ng-click="rowData.showEdit=true">
+                                                                               <span class="icon-edit"></span>
+                                                                       </div> <span ng-show="rowData.showEdit"> <a
+                                                                               btn-type="primary"
+                                                                               ng-click="editContactUsFun(rowData); rowData.showEdit=false"
+                                                                               class="btn btn-alt btn-small" size="small">Save</a>
+                                                               </span>
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div class="delete-contact-us"
+                                                                               ng-click="delContactUsFun(rowData)">
+                                                                               <span class="icon-misc-trash"></span>
+                                                                       </div>
+                                                               </td>
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>
+
+                               <div id="divider-line"></div>
+                               <div style="margin-top: 15px; margin-left: -78px;">
+                                       <div id="addWidgetHeader" class="contact-us-margin">
+                                               <h1 style="font-size: 18px;">Add Application Contact
+                                                       Information</h1>
+                                               <!-- <div class="errMsg">{{errMsg}}</div> -->
+                                       </div>
+                                       <div id="addWidget" class="contact-us-margin">
+                                               <div>
+                                                       <div id="add-contact-us-field-appname"
+                                                               class="add-contact-us-field">
+                                                               <div id="mots-property-label" class="property-label"><span ID="required" style="color: Red;"visible="false"> *</span>App        Name</div>
+                                                               <select id="dropdown1" name="dropdown1" b2b-dropdown
+                                                                       placeholder-text="Select an App"
+                                                                       ng-model="newContactUs.app.value">
+                                                                       <option b2b-dropdown-list
+                                                                               option-repeat="d in contactUsAllAppList" value="{{d.value}}">{{d.title}}</option>
+                                                               </select>
+                                                               <div id="mots-property-label-required" ng-show="newContactUs.app.title==null || newContactUs.app.title=='' ">
+                                                       <small class="mandatory-categories">App Name is Required</small>
+                                                       </div>
+                                                       </div>
+                                                       <br>
+                                                       <div id="add-contact-us-field-contactname"
+                                                               class="add-contact-us-field">
+                                                               <div id="property-label-name" class="property-label">Contact
+                                                                       Name</div>
+                                                               <input id="property-input-name" class="input-text-area"
+                                                                       type="text" ng-model="newContactUs.name" />
+                                                       </div>
+                                                       <div id="add-contact-us-field-email" class="add-contact-us-field">
+                                                               <div id="property-label-email" class="property-label">Contact
+                                                                       Email</div>
+                                                               <input id="property-input-email" class="input-text-area"
+                                                                       type="text" ng-model="newContactUs.email" />
+                                                       </div>
+                                                       <div id="add-contact-us-field-url" class="add-contact-us-field">
+                                                               <div id="property-label-url" class="property-label">Contact
+                                                                       URL</div>
+                                                               <input id="property-input-url" class="input-text-area"
+                                                                       type="text" ng-model="newContactUs.url" />
+                                                       </div>
+                                                       <div id="add-contact-us-field-desc"
+                                                               class="add-contact-us-field-des">
+                                                               <div id="property-label-desc" class="property-label">Description</div>
+                                                               <textarea id="property-input-desc"
+                                                                       style="margin-top: 0px; margin-bottom: 0px; height: 100px"
+                                                                       ng-model="newContactUs.desc"></textarea>
+                                                       </div>
+                                               </div>
+                                               <div style="height: 50px;">
+                                                       <a style="float: right; margin-top: 20px"
+                                                               class="btn btn-alt btn-small" ng-click="newContactUsFun()" ng-disabled="newContactUs.app.title==null || newContactUs.app.title=='' ">Add
+                                                               New</a>
+                                               </div>
+                                               <div id="divider-line-bottom"></div>
+
+                                               <div style="height: 50px;">
+                                                       <a style="float: right; margin-right: -230px !important;"
+                                                               class="btn btn-alt btn-small" ng-click="closeDialog()">Close</a>
+                                               </div>
+
+                                       </div>
+
+                               </div>
+
+                       </div>
+               </div>
+       </div>
+</div>
+
+<script type="application/javascript">
+    $(document).ready(function(){
+        $(".ngdialog-content").css("width","85%");
+        $(".ngdialog-close").attr('id','dialog-close');
+    });
+</script>
index 0d39a65..eddde0d 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () { \r
-               \r
-    class ContactUsCtrl {\r
-       constructor($log, contactUsService, applicationsService, $modal, ngDialog, $state,$anchorScroll,$location) {  \r
-               \r
-               contactUsService.getContactUSPortalDetails().then(res => {\r
-                       // $log.info('ContactUsCtrl:: contactUsService getContactUSPortalDetails res',res);\r
-                // $log.info('getting res',res);\r
-                var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;\r
-                //     $log.info('result',result);\r
-                //     $log.info('done');\r
-                var source = JSON.parse(result);\r
-                //     $log.info(source); \r
-                this.ush_TicketInfoUrl = source.ush_ticket_url; \r
-                this.portalInfo_Address = source.feedback_email_address; \r
-                this.feedback_Url = source.portal_info_url;                    \r
-               }).catch(err=> {\r
-                       $log.error('ContactUsCtrl:error:: ', err);\r
-            }).finally(() => {\r
-           });\r
-               \r
-               let init = () => {\r
-                // $log.info('ecomp app::contact-us-controller::initializing...');\r
-                this.appTable=[];\r
-                this.functionalTableData=[];\r
-            };\r
-            init();     \r
-            \r
-            let updateContactUsTable = () => {\r
-               contactUsService.getAppsAndContacts().then(res=> {\r
-                               // $log.info('ContactUsCtrl:: contactUsService getAppsAndContacts res',res);\r
-                       var tableData=[];\r
-                       // $log.info('getting res',res);\r
-                       var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;\r
-                       // $log.info('result',result);\r
-                       // $log.info('done');\r
-                       var source = result;\r
-                       // $log.info(source);\r
-                       // Drop Portal app, empty name entries\r
-                       for(var i=0;i<source.length; i++) {\r
-                               var dataArr = source[i];\r
-                               if ( !dataArr.appName  || dataArr.appId == 1) {\r
-                                       continue;\r
-                               }\r
-                       var dataTemp={\r
-                               app_name: dataArr.appName,\r
-                               contact_name: dataArr.contactName,\r
-                               contact_email: dataArr.contactEmail,\r
-                               desc: dataArr.description,\r
-                               url_Info: dataArr.url,\r
-                               app_Id: dataArr.appId,\r
-                       }\r
-                       tableData.push(dataTemp);\r
-                       }               \r
-                       this.appTable=tableData;\r
-                 }).catch(err=> {\r
-                                $log.error('ContactUsCtrl.updateContactUsTable:error:: ', err);\r
-                        })\r
-            };\r
-            \r
-            contactUsService.getAppCategoryFunctions().then(res=> {\r
-                       // $log.info('ContactUsCtrl:: contactUsService getAppCategoryFunctionsthen res',res);\r
-               var tablefunctionalData=[];\r
-               // $log.info('getting res',res);\r
-               var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;\r
-               // $log.info('result',result);\r
-               // $log.info('done');\r
-               var source = result;\r
-               // $log.info(source);                   \r
-               for(var i=0;i<source.length; i++) {\r
-                       var datafunctionalArr = source[i];\r
-                       var datafuntionalTemp={\r
-                               category: datafunctionalArr.category,\r
-                               app_Name: datafunctionalArr.application,\r
-                               functions: datafunctionalArr.functions,\r
-                               app_Id: datafunctionalArr.appId,\r
-                       }\r
-                       tablefunctionalData.push(datafuntionalTemp);\r
-               }               \r
-               this.functionalTableData=tablefunctionalData;\r
-             }).catch(err=> {\r
-                        $log.error('ContactUsCtrl:error:: ', err);\r
-                })\r
-            \r
-            updateContactUsTable();\r
-            this.editContactUsModalPopup = () => {\r
-                 // $log.debug('ContactUsCtrl::editContactUsModalPopup updating table data...');               \r
-                 var modalInstance = ngDialog.open({\r
-                     templateUrl: 'app/views/support/contact-us/contact-us-manage/contact-us-manage.html',\r
-                     controller: 'ContactUsManageController',\r
-                     resolve: {\r
-                         message: function message() {\r
-                             var message = {\r
-                                 type: 'Contact',\r
-                             };\r
-                             return message;\r
-                         }\r
-                     }\r
-                 }).closePromise.then(needUpdate => {                   \r
-                        updateContactUsTable();\r
-                    });       \r
-             };\r
-             \r
-             this.goToSection = (id) => {\r
-               \r
-                var targetDiv = document.getElementById(id);  \r
-                \r
-                var offSetHeight = 0;\r
-                for(var i=0;i<this.appTable.length;i++){  \r
-                        if(this.appTable[i].app_Id==id)\r
-                                break;\r
-                        if(this.appTable[i].showFlag==true){\r
-                                offSetHeight+=document.getElementById('collapse'+i).clientHeight;                              \r
-                        }\r
-                }\r
-                console.log(offSetHeight);\r
-                this.appTable.forEach(d => d.showFlag = false);\r
-               // let index = this.appTable.findIndex(a => a.app_Id == id);\r
-                var index =-1;\r
-                for(var i=0; i<this.appTable.length;i++){\r
-                        if(this.appTable[i].app_Id==id){\r
-                                index = i;\r
-                                break;\r
-                        }\r
-                }\r
-                console.log(index);\r
-                if (index > -1) {\r
-                        // setting the showFlag to true based on index comparing with the app_Id \r
-                        this.appTable[index].showFlag = true;\r
-                        $location.hash('appId'+index);\r
-                     $anchorScroll();\r
-               /*       $('#contentId').animate({\r
-                           scrollTop: targetDiv.offsetTop-offSetHeight\r
-                       }, 'fast');*/\r
-                }                               \r
-                \r
-             };\r
-             \r
-             // Take the user to the application on the get access page.\r
-             this.goGetAccess = (appName) => {\r
-                // $log.debug('ContactUsCtrl::goGetAccess received name ' + appName);\r
-                applicationsService.goGetAccessAppName = appName;\r
-                $state.go('root.getAccess');\r
-             };\r
-             \r
-        }\r
-    }\r
-    ContactUsCtrl.$inject = ['$log','contactUsService', 'applicationsService', '$modal', 'ngDialog', '$state','$anchorScroll','$location'];\r
-    angular.module('ecompApp').controller('ContactUsCtrl', ContactUsCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () { 
+               
+    class ContactUsCtrl {
+       constructor($log, contactUsService, applicationsService, $modal, ngDialog, $state,$anchorScroll,$location) {  
+               
+               contactUsService.getContactUSPortalDetails().then(res => {
+                       // $log.info('ContactUsCtrl:: contactUsService getContactUSPortalDetails res',res);
+                // $log.info('getting res',res);
+                var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
+                //     $log.info('result',result);
+                //     $log.info('done');
+                var source = JSON.parse(result);
+                //     $log.info(source); 
+                this.ush_TicketInfoUrl = source.ush_ticket_url; 
+                this.portalInfo_Address = source.feedback_email_address; 
+                this.feedback_Url = source.portal_info_url;                    
+               }).catch(err=> {
+                       $log.error('ContactUsCtrl:error:: ', err);
+            }).finally(() => {
+           });
+               
+               let init = () => {
+                // $log.info('ecomp app::contact-us-controller::initializing...');
+                this.appTable=[];
+                this.functionalTableData=[];
+            };
+            init();     
+            
+            let updateContactUsTable = () => {
+               contactUsService.getAppsAndContacts().then(res=> {
+                               // $log.info('ContactUsCtrl:: contactUsService getAppsAndContacts res',res);
+                       var tableData=[];
+                       // $log.info('getting res',res);
+                       var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
+                       // $log.info('result',result);
+                       // $log.info('done');
+                       var source = result;
+                       // $log.info(source);
+                       // Drop Portal app, empty name entries
+                       for(var i=0;i<source.length; i++) {
+                               var dataArr = source[i];
+                               if ( !dataArr.appName  || dataArr.appId == 1) {
+                                       continue;
+                               }
+                       var dataTemp={
+                               app_name: dataArr.appName,
+                               contact_name: dataArr.contactName,
+                               contact_email: dataArr.contactEmail,
+                               desc: dataArr.description,
+                               url_Info: dataArr.url,
+                               app_Id: dataArr.appId,
+                       }
+                       tableData.push(dataTemp);
+                       }               
+                       this.appTable=tableData;
+                 }).catch(err=> {
+                                $log.error('ContactUsCtrl.updateContactUsTable:error:: ', err);
+                        })
+            };
+            
+            contactUsService.getAppCategoryFunctions().then(res=> {
+                       // $log.info('ContactUsCtrl:: contactUsService getAppCategoryFunctionsthen res',res);
+               var tablefunctionalData=[];
+               // $log.info('getting res',res);
+               var result = (typeof(res.response) != "undefined" && res.response!=null)?res.response:null;
+               // $log.info('result',result);
+               // $log.info('done');
+               var source = result;
+               // $log.info(source);                   
+               for(var i=0;i<source.length; i++) {
+                       var datafunctionalArr = source[i];
+                       var datafuntionalTemp={
+                               category: datafunctionalArr.category,
+                               app_Name: datafunctionalArr.application,
+                               functions: datafunctionalArr.functions,
+                               app_Id: datafunctionalArr.appId,
+                       }
+                       tablefunctionalData.push(datafuntionalTemp);
+               }               
+               this.functionalTableData=tablefunctionalData;
+             }).catch(err=> {
+                        $log.error('ContactUsCtrl:error:: ', err);
+                })
+            
+            updateContactUsTable();
+            this.editContactUsModalPopup = () => {
+                 // $log.debug('ContactUsCtrl::editContactUsModalPopup updating table data...');               
+                 var modalInstance = ngDialog.open({
+                     templateUrl: 'app/views/support/contact-us/contact-us-manage/contact-us-manage.html',
+                     controller: 'ContactUsManageController',
+                     resolve: {
+                         message: function message() {
+                             var message = {
+                                 type: 'Contact',
+                             };
+                             return message;
+                         }
+                     }
+                 }).closePromise.then(needUpdate => {                   
+                        updateContactUsTable();
+                    });       
+             };
+             
+             this.goToSection = (id) => {
+               
+                var targetDiv = document.getElementById(id);  
+                
+                var offSetHeight = 0;
+                for(var i=0;i<this.appTable.length;i++){  
+                        if(this.appTable[i].app_Id==id)
+                                break;
+                        if(this.appTable[i].showFlag==true){
+                                offSetHeight+=document.getElementById('collapse'+i).clientHeight;                              
+                        }
+                }
+                console.log(offSetHeight);
+                this.appTable.forEach(d => d.showFlag = false);
+               // let index = this.appTable.findIndex(a => a.app_Id == id);
+                var index =-1;
+                for(var i=0; i<this.appTable.length;i++){
+                        if(this.appTable[i].app_Id==id){
+                                index = i;
+                                break;
+                        }
+                }
+                console.log(index);
+                if (index > -1) {
+                        // setting the showFlag to true based on index comparing with the app_Id 
+                        this.appTable[index].showFlag = true;
+                        $location.hash('appId'+index);
+                     $anchorScroll();
+               /*       $('#contentId').animate({
+                           scrollTop: targetDiv.offsetTop-offSetHeight
+                       }, 'fast');*/
+                }                               
+                
+             };
+             
+             // Take the user to the application on the get access page.
+             this.goGetAccess = (appName) => {
+                // $log.debug('ContactUsCtrl::goGetAccess received name ' + appName);
+                applicationsService.goGetAccessAppName = appName;
+                $state.go('root.getAccess');
+             };
+             
+        }
+    }
+    ContactUsCtrl.$inject = ['$log','contactUsService', 'applicationsService', '$modal', 'ngDialog', '$state','$anchorScroll','$location'];
+    angular.module('ecompApp').controller('ContactUsCtrl', ContactUsCtrl);
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 9e96b44..444a982 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-contactUs-home" style=" overflow:auto;''">\r
-       <div class="contactUs-home-container" id="page-content">\r
-               <div class="admins-page-main">\r
-                       <div id="title" class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page">Contact Us</h1>\r
-                       <button id="edit-button-contact-us" ng-if="isAdminPortalAdmin == true" class="btn btn-alt btn-small" ng-click="contact.editContactUsModalPopup()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Edit Contact Us</button>\r
-                       \r
-                       <div ng-include src="'app/views/support/contact-us/contact-us.aux.html'"></div>\r
-                       \r
-               <br/> \r
-               <!-- Function Categories -->            \r
-               <div id="appFunctionInfo" style="font-size: 20px;" class="w-ecomp-main-view-title"> Application Functions\r
-                               <div b2b-table table-data="contact.functionalTableData" class="b2b-table-div">\r
-                                               <table>\r
-                                                       <thead b2b-table-row type="header">\r
-                                                               <tr>\r
-                                                                 <th id="th-functionalItem-0" b2b-table-header sortable="false">Category</th>                       \r
-                                             <th id="th-functionalItem-1" b2b-table-header sortable="false">ECOMP Functions</th>\r
-                                             <th id="th-functionalItem-2" b2b-table-header sortable="false">ECOMP Application</th>\r
-                                                 <!-- <th id="th-functionalItem-3" b2b-table-header >Contact</th> --> \r
-                                                         </tr>\r
-                                                       </thead>\r
-                                                       <!--  Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data  -->\r
-                                                       <tbody b2b-table-row type="body"\r
-                                                       type="body"  \r
-                                       class="table-body" \r
-                                       track-by="$index"\r
-                                       row-repeat="rowData in contact.functionalTableData">\r
-                                                       <tr id="tr-rowData" ng-click="">\r
-                                        <td b2b-table-body>\r
-                                           <div id="functional-item-td-category" \r
-                                       ng-show="$index == 0 || contact.functionalTableData[$index-1].category != rowData.category"\r
-                                               ng-bind="rowData.category">\r
-                                           </div>\r
-                                        </td>\r
-                                        <td b2b-table-body>\r
-                                           <div id="functional-item-td-functions"  ng-bind="rowData.functions"></div>\r
-                                        </td>                           \r
-                                        <td b2b-table-body>\r
-                                          <a ng-click="contact.goToSection(rowData.app_Id, $index);">{{rowData.app_Name}}</a>  \r
-                                        </td>                                   \r
-                                      </tr>\r
-                                                       </tbody>\r
-                                               </table>\r
-                                       </div>\r
-       </div>\r
-               <br/>\r
-               <!-- Display applicationInfo panels -->\r
-               <div id="allAppInfo">\r
-                       <div style="font-size: 20px;" class="w-ecomp-main-view-title"> All Applications         \r
-                       </div>          \r
-                       <div class="contactUs-general-div">\r
-                               <div class="contact-us-table">\r
-                               <div style="height:auto;" class="c-ecomp-portal-abs-table default">\r
-                                       <div ng-repeat="rowData in contact.appTable"\r
-                                               class="contactUs-collapsible-panel">\r
-                                               <div id="{{rowData.app_Id}}" style="height:60px; " class="contactUs-panel-header" ng-click="rowData.showFlag = !rowData.showFlag" >\r
-                                                       <span id="appId{{$index}}" ng-bind="rowData.app_name" style="position:relative; top:20px"></span>\r
-                                                       \r
-                                                       <span style="float: right; margin-right: 30px; margin-top:20px;">\r
-                                                               <img ng-hide="rowData.showFlag" src="assets/images/chevron_down.png"\r
-                                                                       alt="Expand app contact section"        title="Expand app contact section" /> \r
-                                                               <img ng-show="rowData.showFlag" src="assets/images/chevron_up.png"\r
-                                                                       alt="App contact section" title="Collapse app contact section" />\r
-                                                       </span>\r
-                                               </div>\r
-                               \r
-                                               <div id="collapse{{$index}}" ng-show="rowData.showFlag"\r
-                                                       class="contactUs-collapsible-panel">\r
-                                                       <div class="contactUs-txt" ng-hide="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> \r
-                                                               <span style="margin-bottom: 20px;"> No application information is available. Please use the links above to contact the ECOMP Portal team. </span>\r
-                                                       </div>\r
-                                                       <div class="contactUs-txt" ng-show="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> \r
-                                                         <table style="border-spacing: 10px 5px; max-width:950px; margin:10px;">\r
-                                                               <tr>\r
-                                                                       <td class="contactUs-panel-labels" style="width: 120px;">Contact:</td>\r
-                                                                       <td class="contactUs-panel-labels" style="width: 830px;">{{rowData.contact_name}}</td>\r
-                                                               </tr>\r
-                                                               <tr>\r
-                                                                       <td class="contactUs-panel-labels">Email:</td>\r
-                                                                       <td class="contactUs-panel-labels"><a ng-href="mailto:{{rowData.contact_email}}" target="_top">{{rowData.contact_email}}</a></td>\r
-                                                               </tr>\r
-                                                               <tr>\r
-                                                                       <td class="contactUs-panel-labels">Info URL:</td>\r
-                                                                       <td class="contactUs-panel-labels"><a ng-href="{{rowData.url_Info}}" target="_blank">{{rowData.url_Info}}</a></td>\r
-                                                               </tr>\r
-                                                               <tr>\r
-                                                                       <td class="contactUs-panel-labels">Description:</td>\r
-                                                                       <td class="contactUs-panel-labels">{{rowData.desc}}</td>\r
-                                                               </tr>\r
-                                                               <tr>\r
-                                                                       <td class="contactUs-panel-labels">Get access:</td>\r
-                                                                       <td class="contactUs-panel-labels"><a href="" ng-click="contact.goGetAccess(rowData.app_name);">Click for application and role information</a></td>\r
-                                                               </tr>\r
-                                                         </table>\r
-                                                       </div>                          \r
-                                               </div>\r
-                               \r
-                                       </div>\r
-                               </div>\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-\r
-       </div>\r
-</div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-contactUs-home" style=" overflow:auto;''">
+       <div class="contactUs-home-container" id="page-content">
+               <div class="admins-page-main">
+                       <div id="title" class="w-ecomp-main-view-title">
+                       <h1 class="heading-page">Contact Us</h1>
+                       <button id="edit-button-contact-us" ng-if="isAdminPortalAdmin == true" class="btn btn-alt btn-small" ng-click="contact.editContactUsModalPopup()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Edit Contact Us</button>
+                       
+                       <div ng-include src="'app/views/support/contact-us/contact-us.aux.html'"></div>
+                       
+               <br/> 
+               <!-- Function Categories -->            
+               <div id="appFunctionInfo" style="font-size: 20px;" class="w-ecomp-main-view-title"> Application Functions
+                               <div b2b-table table-data="contact.functionalTableData" class="b2b-table-div">
+                                               <table>
+                                                       <thead b2b-table-row type="header">
+                                                               <tr>
+                                                                 <th id="th-functionalItem-0" b2b-table-header sortable="false">Category</th>                       
+                                             <th id="th-functionalItem-1" b2b-table-header sortable="false">ECOMP Functions</th>
+                                             <th id="th-functionalItem-2" b2b-table-header sortable="false">ECOMP Application</th>
+                                                 <!-- <th id="th-functionalItem-3" b2b-table-header >Contact</th> --> 
+                                                         </tr>
+                                                       </thead>
+                                                       <!--  Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data  -->
+                                                       <tbody b2b-table-row type="body"
+                                                       type="body"  
+                                       class="table-body" 
+                                       track-by="$index"
+                                       row-repeat="rowData in contact.functionalTableData">
+                                                       <tr id="tr-rowData" ng-click="">
+                                        <td b2b-table-body>
+                                           <div id="functional-item-td-category" 
+                                       ng-show="$index == 0 || contact.functionalTableData[$index-1].category != rowData.category"
+                                               ng-bind="rowData.category">
+                                           </div>
+                                        </td>
+                                        <td b2b-table-body>
+                                           <div id="functional-item-td-functions"  ng-bind="rowData.functions"></div>
+                                        </td>                           
+                                        <td b2b-table-body>
+                                          <a ng-click="contact.goToSection(rowData.app_Id, $index);">{{rowData.app_Name}}</a>  
+                                        </td>                                   
+                                      </tr>
+                                                       </tbody>
+                                               </table>
+                                       </div>
+       </div>
+               <br/>
+               <!-- Display applicationInfo panels -->
+               <div id="allAppInfo">
+                       <div style="font-size: 20px;" class="w-ecomp-main-view-title"> All Applications         
+                       </div>          
+                       <div class="contactUs-general-div">
+                               <div class="contact-us-table">
+                               <div style="height:auto;" class="c-ecomp-portal-abs-table default">
+                                       <div ng-repeat="rowData in contact.appTable"
+                                               class="contactUs-collapsible-panel">
+                                               <div id="{{rowData.app_Id}}" style="height:60px; " class="contactUs-panel-header" ng-click="rowData.showFlag = !rowData.showFlag" >
+                                                       <span id="appId{{$index}}" ng-bind="rowData.app_name" style="position:relative; top:20px"></span>
+                                                       
+                                                       <span style="float: right; margin-right: 30px; margin-top:20px;">
+                                                               <span ng-show="rowData.showFlag" title="Collapse app contact section" class="icon-controls-upPRIMARY"></span>
+                                                               <span ng-hide="rowData.showFlag" title="Expand app contact section" class="icon-controls-down"></span>
+                                                       </span>
+                                               </div>
+                               
+                                               <div id="collapse{{$index}}" ng-show="rowData.showFlag"
+                                                       class="contactUs-collapsible-panel">
+                                                       <div class="contactUs-txt" ng-hide="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> 
+                                                               <span style="margin-bottom: 20px;"> No application information is available. Please use the links above to contact the ECOMP Portal team. </span>
+                                                       </div>
+                                                       <div class="contactUs-txt" ng-show="rowData.contact_name || rowData.contact_email || rowData.url_Info || rowData.desc"> 
+                                                         <table style="border-spacing: 10px 5px; max-width:950px; margin:10px;">
+                                                               <tr>
+                                                                       <td class="contactUs-panel-labels" style="width: 120px;">Contact:</td>
+                                                                       <td class="contactUs-panel-labels" style="width: 830px;">{{rowData.contact_name}}</td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td class="contactUs-panel-labels">Email:</td>
+                                                                       <td class="contactUs-panel-labels"><a ng-href="mailto:{{rowData.contact_email}}" target="_top">{{rowData.contact_email}}</a></td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td class="contactUs-panel-labels">Info URL:</td>
+                                                                       <td class="contactUs-panel-labels"><a ng-href="{{rowData.url_Info}}" target="_blank">{{rowData.url_Info}}</a></td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td class="contactUs-panel-labels">Description:</td>
+                                                                       <td class="contactUs-panel-labels">{{rowData.desc}}</td>
+                                                               </tr>
+                                                               <tr>
+                                                                       <td class="contactUs-panel-labels">Get access:</td>
+                                                                       <td class="contactUs-panel-labels"><a href="" ng-click="contact.goGetAccess(rowData.app_name);">Click for application and role information</a></td>
+                                                               </tr>
+                                                         </table>
+                                                       </div>                          
+                                               </div>
+                               
+                                       </div>
+                               </div>
+                               </div>
+                       </div>
+               </div>
+
+       </div>
+</div>
+</div>
index 74b5ba4..c93d864 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class GetAccessCtrl {\r
-        constructor($log, $scope,  $stateParams, getAccessService, userProfileService, ExternalRequestAccessService, applicationsService, ngDialog) {\r
-               // $log.debug('GetAccessCtrl: appService param is: ' + applicationsService.goGetAccessAppName);\r
-               var resultAccessValue = null;\r
-               \r
-               $scope.openAppRoleModal = (itemData) => {       \r
-                       if(resultAccessValue){\r
-                       let data = null;\r
-                    data = {\r
-                        dialogState: 2,\r
-                        selectedUser:{\r
-                            attuid: $scope.attuid,\r
-                            firstName: $scope.firstName,\r
-                            lastName: $scope.lastName,\r
-                            headerText: itemData.app_name\r
-                        }\r
-                    }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html',\r
-                    controller: 'NewCatalogModalCtrl',\r
-                    controllerAs: 'userInfo',\r
-                    data: data\r
-                });\r
-                       }\r
-            }\r
-               \r
-            userProfileService.getUserProfile().then(\r
-                               function(profile) {\r
-                                       $scope.attuid = profile.orgUserId;\r
-                                       $scope.firstName = profile.firstName;\r
-                                       $scope.lastName = profile.lastName;\r
-                 });\r
-            \r
-               this.updateAppsList = () => {\r
-                       ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then(\r
-                                               function(property) {\r
-                                                       resultAccessValue = property.accessValue;\r
-                               }).catch(err => {\r
-                    $log.error('GetAccessCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.Stringify(err));\r
-                });\r
-                getAccessService.getListOfApp().then(res=> {\r
-                       var tableData=[];\r
-                       // $log.info('GetAccessCtrl::updateAppsList: getting res');\r
-                       var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;\r
-                       // $log.info('GetAccessCtrl::updateAppsList: result',result);\r
-                       // $log.info('GetAccessCtrl::updateAppsList: done');\r
-                       var source = result;\r
-                       // $log.info('GetAccessCtrl::updateAppsList source: ', source);\r
-                       for(var i=0;i<source.length; i++){\r
-                               var dataArr = source[i];\r
-                               var checkEcompFuncAvail = 'Ecomp Function Not Available' ; \r
-                               var reqStatus = 'Pending'; \r
-                               dataArr.ecompFunction = (dataArr.ecompFunction === null) ? checkEcompFuncAvail : dataArr.ecompFunction;\r
-                               dataArr.reqType = (dataArr.reqType === 'P') ? reqStatus : dataArr.reqType;\r
-                       var dataTemp={\r
-                               ecomp_function: dataArr.ecompFunction,\r
-                               app_name:dataArr.appName,\r
-                               role_name:dataArr.roleName,\r
-                               current_role:dataArr.roleActive,\r
-                               request_type:dataArr.reqType\r
-                       }\r
-                       tableData.push(dataTemp);\r
-                       } \r
-                       this.appTable=tableData;\r
-                       if(tableData!=null){\r
-                               var len = tableData.length;\r
-                               this.totalPage =  Math.ceil(len/this.viewPerPage);     \r
-                       }\r
-                       if( $stateParams.appName != null)\r
-                               this.searchString = $stateParams.appName;\r
-                       else\r
-                               this.searchString = applicationsService.goGetAccessAppName;\r
-                       // the parameter has been used; clear the value.\r
-                       applicationsService.goGetAccessAppName = '';\r
-                }).catch(err=> {\r
-                    $log.error('GetAccessCtrl:error:: ', err);\r
-                }).finally(() => {\r
-                    this.isLoadingTable = false;\r
-                });\r
-            };\r
-            \r
-            this.updateTable = (num) => {\r
-                this.startIndex=this.viewPerPage*(num-1);\r
-                this.currentPage = num;\r
-            };\r
-               let init = () => {\r
-                // $log.info('GetAccessCtrl:: initializing...');\r
-                this.searchString = '';\r
-                this.getAccessTableHeaders = ['ECOMP Function', 'Application Name', 'Role Name', 'Current Role', 'Request Status'];\r
-                this.appTable=[];\r
-                this.updateAppsList();             \r
-                this.viewPerPage=20;\r
-                this.startIndex=0;\r
-                this.currentPage = 1;\r
-                this.totalPage=0;\r
-            };\r
-            init();\r
-        }\r
-    }\r
-    GetAccessCtrl.$inject = ['$log', '$scope', '$stateParams', 'getAccessService', 'userProfileService', 'ExternalRequestAccessService','applicationsService', 'ngDialog'];\r
-    angular.module('ecompApp').controller('GetAccessCtrl', GetAccessCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class GetAccessCtrl {
+        constructor($log, $scope,  $stateParams, getAccessService, userProfileService, ExternalRequestAccessService, applicationsService, ngDialog) {
+               // $log.debug('GetAccessCtrl: appService param is: ' + applicationsService.goGetAccessAppName);
+               var resultAccessValue = null;
+               var externalRequest = true;
+               
+               $scope.openAppRoleModal = (itemData) => {       
+                       if(resultAccessValue){
+                       let data = null;
+                    data = {
+                        dialogState: 2,
+                        selectedUser:{
+                            attuid: $scope.attuid,
+                            firstName: $scope.firstName,
+                            lastName: $scope.lastName,
+                            headerText: itemData.app_name,
+                            extReqValue : externalRequest
+                        }
+                    }
+                ngDialog.open({
+                    templateUrl: 'app/views/catalog/add-catalog-dialogs/new-catalog.modal.html',
+                    controller: 'NewCatalogModalCtrl',
+                    controllerAs: 'userInfo',
+                    data: data
+                });
+                       }
+            }
+               
+            userProfileService.getUserProfile().then(
+                               function(profile) {
+                                       $scope.attuid = profile.orgUserId;
+                                       $scope.firstName = profile.firstName;
+                                       $scope.lastName = profile.lastName;
+                 });
+            
+               this.updateAppsList = () => {
+                       ExternalRequestAccessService.getExternalRequestAccessServiceInfo().then(
+                                               function(property) {
+                                                       resultAccessValue = property.accessValue;
+                               }).catch(err => {
+                    $log.error('GetAccessCtrl: failed getExternalRequestAccessServiceInfo: ' + JSON.Stringify(err));
+                });
+                getAccessService.getListOfApp().then(res=> {
+                       var tableData=[];
+                       // $log.info('GetAccessCtrl::updateAppsList: getting res');
+                       var result = (typeof(res.data) != "undefined" && res.data!=null)?res.data:null;
+                       // $log.info('GetAccessCtrl::updateAppsList: result',result);
+                       // $log.info('GetAccessCtrl::updateAppsList: done');
+                       var source = result;
+                       // $log.info('GetAccessCtrl::updateAppsList source: ', source);
+                       for(var i=0;i<source.length; i++){
+                               var dataArr = source[i];
+                               var checkEcompFuncAvail = 'Ecomp Function Not Available' ; 
+                               var reqStatus = 'Pending'; 
+                               dataArr.ecompFunction = (dataArr.ecompFunction === null) ? checkEcompFuncAvail : dataArr.ecompFunction;
+                               dataArr.reqType = (dataArr.reqType === 'P') ? reqStatus : dataArr.reqType;
+                       var dataTemp={
+                               ecomp_function: dataArr.ecompFunction,
+                               app_name:dataArr.appName,
+                               role_name:dataArr.roleName,
+                               current_role:dataArr.roleActive,
+                               request_type:dataArr.reqType
+                       }
+                       tableData.push(dataTemp);
+                       } 
+                       this.appTable=tableData;
+                       if(tableData!=null){
+                               var len = tableData.length;
+                               this.totalPage =  Math.ceil(len/this.viewPerPage);     
+                       }
+                       if( $stateParams.appName != null)
+                               this.searchString = $stateParams.appName;
+                       else
+                               this.searchString = applicationsService.goGetAccessAppName;
+                       // the parameter has been used; clear the value.
+                       applicationsService.goGetAccessAppName = '';
+                }).catch(err=> {
+                    $log.error('GetAccessCtrl:error:: ', err);
+                }).finally(() => {
+                    this.isLoadingTable = false;
+                });
+            };
+            
+            this.updateTable = (num) => {
+                this.startIndex=this.viewPerPage*(num-1);
+                this.currentPage = num;
+            };
+               let init = () => {
+                // $log.info('GetAccessCtrl:: initializing...');
+                this.searchString = '';
+                this.getAccessTableHeaders = ['ECOMP Function', 'Application Name', 'Role Name', 'Current Role', 'Request Status'];
+                this.appTable=[];
+                this.updateAppsList();             
+                this.viewPerPage=20;
+                this.startIndex=0;
+                this.currentPage = 1;
+                this.totalPage=0;
+            };
+            init();
+        }
+    }
+    GetAccessCtrl.$inject = ['$log', '$scope', '$stateParams', 'getAccessService', 'userProfileService', 'ExternalRequestAccessService','applicationsService', 'ngDialog'];
+    angular.module('ecompApp').controller('GetAccessCtrl', GetAccessCtrl);
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 7f6770e..08ccbf4 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-get-access-home">\r
-       <div class="get-access-home-container" id="page-content">\r
-               <div class="admins-page-main">\r
-                       <div id="title" class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page">Get Access</h1>\r
-                       </div>\r
-                       <div ng-include\r
-                               src="'app/views/support/get-access/get-accessinfo.html'"></div>\r
-                       <div class="get-access-table">\r
-                               <div class="table-control">\r
-                                       <input id="input-table-search" class="table-search" type="text"\r
-                                               placeholder="Search" ng-model="access.searchString" /> <span\r
-                                               class="ecomp-spinner" ng-show="access.isLoadingTable"></span>\r
-                                       <div b2b-table table-data="access.appTable"\r
-                                               ng-hide="access.isLoadingTable"\r
-                                               search-string="access.searchString"\r
-                                               class="b2b-table-div">\r
-                                               <table>\r
-                                                       <thead b2b-table-row type="header">\r
-                                                               <tr>\r
-                                                                       <th id="th-access-0" b2b-table-header key="ecomp_function"\r
-                                                                               sortable="false" >{{access.getAccessTableHeaders[0]}}</th>\r
-                                                                       <th id="th-access-1" b2b-table-header key="app_name"\r
-                                                                               sortable="false">{{access.getAccessTableHeaders[1]}}</th>\r
-                                                                       <th id="th-access-2" b2b-table-header key="role_name"\r
-                                                                               sortable="false">{{access.getAccessTableHeaders[2]}}</th>\r
-                                                                       <th id="th-access-3" b2b-table-header key="current_role"\r
-                                                                               sortable="false">{{access.getAccessTableHeaders[3]}}</th>\r
-                                                                       <th id="th-access-4" b2b-table-header key="request_access"\r
-                                                                               sortable="false">{{access.getAccessTableHeaders[4]}}</th>\r
-                                                               </tr>\r
-                                                       </thead>\r
-                                                       <tbody b2b-table-row type="body"\r
-                                                               row-repeat="rowData in access.appTable | limitTo:access.viewPerPage:access.startIndex | orderBy:'ecomp_function'"  track-by="$index">\r
-                                                               <tr id="tr-rowData" ng-click="openAppRoleModal(rowData)">\r
-                                                                       <td b2b-table-body>\r
-                                                                               <div id="access-page-function"\r
-                                                                                       ng-if="rowData.ecomp_function !== 'Ecomp Function Not Available'"\r
-                                                                                       ng-show="$index == 0 || access.appTable[$index-1].ecomp_function != rowData.ecomp_function"\r
-                                                                                       ng-bind="rowData.ecomp_function"></div>\r
-                                                                               <div id="access-page-function"\r
-                                                                                       ng-if="rowData.ecomp_function === 'Ecomp Function Not Available'"\r
-                                                                                       ng-bind="rowData.ecomp_function"></div>\r
-                                                                       </td>\r
-                                                                       <td b2b-table-body>\r
-                                                                               <div id="access-page-appName"\r
-                                                                                       ng-show="$index == 0 || access.appTable[$index-1].app_name != rowData.app_name"\r
-                                                                                       ng-bind="rowData.app_name"></div>\r
-                                                                       </td>\r
-                                                                       <td b2b-table-body>\r
-                                                                               <div id="access-page-roleName" ng-bind="rowData.role_name"></div>\r
-                                                                       </td>\r
-                                                                       <td b2b-table-body>\r
-                                                                               <div id="access-page-currentRole"\r
-                                                                                       ng-if="rowData.current_role === 'Y'">\r
-                                                                                       <i class="icon-included-checkmark"></i>\r
-                                                                               </div>\r
-                                                                       </td>\r
-                                                                       <td b2b-table-body>\r
-                                                                               <div id="access-page-RequestAccess"\r
-                                                                                       ng-if="rowData.request_type !== null"\r
-                                                                                       ng-bind="rowData.request_type"></div>\r
-                                                                       </td>\r
-                                                               </tr>\r
-                                                       </tbody>\r
-                                               </table>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-                       <div b2b-pagination="" input-id="goto-page-1" total-pages="access.totalPage" current-page="access.currentPage" click-handler="access.updateTable" role="navigation" aria-label="Customer Data Pages"></div>     \r
-               </div>\r
-       </div>\r
-</div>\r
-\r
-<style>\r
-.tablesorter-default {\r
-       cursor: default;\r
-}\r
-\r
-.admins-page-main .admins-table .table-body {\r
-       cursor: default;\r
-}\r
-</style>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-get-access-home">
+       <div class="get-access-home-container" id="page-content">
+               <div class="admins-page-main">
+                       <div id="title" class="w-ecomp-main-view-title">
+                       <h1 class="heading-page">Get Access</h1>
+                       </div>
+                       <div ng-include
+                               src="'app/views/support/get-access/get-accessinfo.html'"></div>
+                       <div class="get-access-table">
+                               <div class="table-control">
+                                       <input id="input-table-search" class="table-search" type="text"
+                                               placeholder="Search" ng-model="access.searchString" /> <span
+                                               class="ecomp-spinner" ng-show="access.isLoadingTable"></span>
+                                       <div b2b-table table-data="access.appTable"
+                                               ng-hide="access.isLoadingTable"
+                                               search-string="access.searchString"
+                                               class="b2b-table-div">
+                                               <table>
+                                                       <thead b2b-table-row type="header">
+                                                               <tr>
+                                                                       <th id="th-access-0" b2b-table-header key="ecomp_function"
+                                                                               sortable="false" >{{access.getAccessTableHeaders[0]}}</th>
+                                                                       <th id="th-access-1" b2b-table-header key="app_name"
+                                                                               sortable="false">{{access.getAccessTableHeaders[1]}}</th>
+                                                                       <th id="th-access-2" b2b-table-header key="role_name"
+                                                                               sortable="false">{{access.getAccessTableHeaders[2]}}</th>
+                                                                       <th id="th-access-3" b2b-table-header key="current_role"
+                                                                               sortable="false">{{access.getAccessTableHeaders[3]}}</th>
+                                                                       <th id="th-access-4" b2b-table-header key="request_access"
+                                                                               sortable="false">{{access.getAccessTableHeaders[4]}}</th>
+                                                               </tr>
+                                                       </thead>
+                                                       <tbody b2b-table-row type="body"
+                                                               row-repeat="rowData in access.appTable | filter:access.searchString | limitTo:access.viewPerPage:access.startIndex | orderBy:'ecomp_function'"  track-by="$index">
+                                                               <tr id="tr-rowData" ng-click="openAppRoleModal(rowData)">
+                                                                       <td b2b-table-body>
+                                                                               <div id="access-page-function"
+                                                                                       ng-if="rowData.ecomp_function !== 'Ecomp Function Not Available'"
+                                                                                       ng-show="$index == 0 || access.appTable[$index-1].ecomp_function != rowData.ecomp_function"
+                                                                                       ng-bind="rowData.ecomp_function"></div>
+                                                                               <div id="access-page-function"
+                                                                                       ng-if="rowData.ecomp_function === 'Ecomp Function Not Available'"
+                                                                                       ng-bind="rowData.ecomp_function"></div>
+                                                                       </td>
+                                                                       <td b2b-table-body>
+                                                                               <div id="access-page-appName"
+                                                                                       ng-show="$index == 0 || access.appTable[$index-1].app_name != rowData.app_name"
+                                                                                       ng-bind="rowData.app_name"></div>
+                                                                       </td>
+                                                                       <td b2b-table-body>
+                                                                               <div id="access-page-roleName" ng-bind="rowData.role_name"></div>
+                                                                       </td>
+                                                                       <td b2b-table-body>
+                                                                               <div id="access-page-currentRole"
+                                                                                       ng-if="rowData.current_role === 'Y'">
+                                                                                       <i class="icon-controls-check"></i>
+                                                                               </div>
+                                                                       </td>
+                                                                       <td b2b-table-body>
+                                                                               <div id="access-page-RequestAccess"
+                                                                                       ng-if="rowData.request_type !== null"
+                                                                                       ng-bind="rowData.request_type"></div>
+                                                                       </td>
+                                                               </tr>
+                                                       </tbody>
+                                               </table>
+                                       </div>
+                               </div>
+                       </div>
+                       <div b2b-pagination="" input-id="goto-page-1" total-pages="access.totalPage" current-page="access.currentPage" click-handler="access.updateTable" role="navigation" aria-label="Customer Data Pages"></div>     
+               </div>
+       </div>
+</div>
+
+<style>
+.tablesorter-default {
+       cursor: default;
+}
+
+.admins-page-main .admins-table .table-body {
+       cursor: default;
+}
+</style>
index 5a5b7e4..bab9ba5 100644 (file)
             $rootScope.showFooter = "";
             $cookies.putObject('show_app_header', false,{domain: cookieDomain, path : '/'});
 
+            let  getCookieDomain = function() {
+                  return window.location.hostname;
+               }
+          let getContextPath=function() {
+                  return  window.location.pathname.substring( 0, window.location.pathname.lastIndexOf( '/' ) + 1 );
+               }
 
             let noRefresh = function () {
                     window.onbeforeunload = function(e) {
@@ -72,8 +78,9 @@
                     if ($scope.tabs.length > 1) {
                         noRefresh();
                     }
-                    $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
-                    $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+                    $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+                    $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+                   
                }
             };
             
@@ -92,8 +99,8 @@
                     if ($scope.tabs.length > 1) {
                         noRefresh();
                     }
-                    $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
-                    $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+                    $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+                    $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
                }
             };
             
               event.preventDefault();
               event.stopPropagation();
               $scope.tabs.splice(index, 1);
-              $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+              $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
             };
             
           //adjust height of the tab due to the search popup being hidden 
index dd11c60..5fc2d89 100644 (file)
@@ -1,36 +1,36 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-\r
-    class userNotificationCtrl {\r
-        constructor($scope,   message,  ngDialog) {\r
-               $scope.messageData=message.text;\r
-                       //alert("message.text" + $scope.messageData);\r
-         }\r
-    }\r
-    userNotificationCtrl.$inject = ['$scope',  'message', 'ngDialog'];\r
-    angular.module('ecompApp').controller('userNotificationCtrl', userNotificationCtrl);\r
-})();\r
-\r
-\r
-\r
\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+
+    class userNotificationCtrl {
+        constructor($scope,   message,  ngDialog) {
+               $scope.messageData=message.text;
+                       //alert("message.text" + $scope.messageData);
+         }
+    }
+    userNotificationCtrl.$inject = ['$scope',  'message', 'ngDialog'];
+    angular.module('ecompApp').controller('userNotificationCtrl', userNotificationCtrl);
+})();
+
+
+
index 2c22751..5e5c55d 100644 (file)
@@ -1,48 +1,48 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-user-json-notification-details-admin"\r
-       ng-style="{bottom: tabBottom}">\r
-        <div class="w-ecomp-main-container" >\r
-       <div class="user-notification" >\r
-               <div id="'widgets-details-title" class="w-ecomp-main-json-view-title"> Message Notification Details </div>\r
-       \r
-       \r
-<div class="notifications-properties-main">\r
-               \r
-               <div ng-bind-html="messageData"></div>\r
-               </div>\r
-               \r
-            <div class="dialog-control-close">\r
-               \r
-                <button id="div-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>\r
-            </div>\r
-               \r
-                       </div>\r
-\r
-</div>\r
-</div>\r
-\r
-<script type="application/javascript">\r
-    $(document).ready(function(){\r
-        $(".ngdialog-content").css("width","40%")\r
-        $(".ngdialog-content").css("height","450px")\r
-\r
-    });\r
-</script>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-user-json-notification-details-admin"
+       ng-style="{bottom: tabBottom}">
+        <div class="w-ecomp-main-container" >
+       <div class="user-notification" >
+               <div id="'widgets-details-title" class="w-ecomp-main-json-view-title"> Message Notification Details </div>
+       
+       
+<div class="notifications-properties-main">
+               
+               <div ng-bind-html="messageData"></div>
+               </div>
+               
+            <div class="dialog-control-close">
+               
+                <button id="div-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Close</button>
+            </div>
+               
+                       </div>
+
+</div>
+</div>
+
+<script type="application/javascript">
+    $(document).ready(function(){
+        $(".ngdialog-content").css("width","40%")
+        $(".ngdialog-content").css("height","450px")
+
+    });
+</script>
index 51c7bb7..4207bc6 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-\r
-    class userNotificationsCtrl {\r
-        constructor($scope, $log, notificationService, confirmBoxService, $modal, ngDialog, $state) {\r
-\r
-               var priorityItems={"1":"Normal","2":"Important"};\r
-               $scope.priorityItems=priorityItems;\r
-               $scope.searchString='';\r
-            $scope.externalNotification="External System";\r
-               $scope.itemExpired={"background-color":"silver "};\r
-               $scope.showInput = true;\r
-               $scope.totalPages1 = 0;\r
-               $scope.viewPerPage1 = 15;\r
-               $scope.currentPage1 = 1;\r
-               $scope.showLoader = false;\r
-               $scope.firstPlay = true;\r
-               // Start with empty list to silence error in console\r
-               $scope.tableData = [];\r
-               $scope.tableAdminNotifItems = [];\r
-                let getAdminNotifications = () => {\r
-               $scope.isLoadingTable = true;\r
-               notificationService.getAdminNotification().then(res => {\r
-                $scope.adminNotifications = res.data;\r
-                $scope.isLoadingTable = false;\r
-                $scope.tableData = res.data;\r
-                       var totalItems = $scope.tableData.length;\r
-                       $scope.totalPages1  = Math.ceil(totalItems / $scope.viewPerPage1);\r
-                       $scope.showLoader = false;\r
-                       $scope.currentPage1=1;\r
-                       var endIndex = 1 * $scope.viewPerPage1;\r
-                       var startIndex = endIndex - $scope.viewPerPage1;\r
-                       $scope.tableAdminNotifItems = $scope.tableData.slice(startIndex, endIndex); \r
-               }).catch(err => {\r
-                $log.error('userNotificationsCtrl:getAdminNotifications:: error ', err);\r
-                $scope.isLoadingTable = false;\r
-            });\r
-             }\r
-                \r
-          getAdminNotifications();           \r
-\r
-               $scope.customPageHandler = function(num) {\r
-                       $scope.currentPage1=num;\r
-                       var endIndex = num * $scope.viewPerPage1;\r
-                       var startIndex = endIndex - $scope.viewPerPage1;\r
-                       $scope.tableAdminNotifItems = $scope.tableData.slice(startIndex, endIndex);\r
-               };\r
-                 \r
-\r
-          \r
-\r
-               \r
-           $scope.removeUserNotification = function (selectedAdminNotification) {\r
-                selectedAdminNotification.activeYn = 'N';\r
-                confirmBoxService.deleteItem(selectedAdminNotification.msgHeader)\r
-                    .then(isConfirmed => {\r
-                        if (isConfirmed) {\r
-                            notificationService.updateAdminNotification(selectedAdminNotification)\r
-                                .then(() => {\r
-                                    getAdminNotifications();\r
-                                }).catch(err => {\r
-                                    switch (err.status) {\r
-                                        case '409':         // Conflict\r
-                                            // handleConflictErrors(err);\r
-                                            break;\r
-                                        case '500':         // Internal Server\r
-                                                                                                                       // Error\r
-                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                                'Please try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                            break;\r
-                                        case '403':         // Forbidden...\r
-                                                                                                                       // possible\r
-                                                                                                                       // webjunction error\r
-                                                                                                                       // to try again\r
-                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                                'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                            break;\r
-                                        default:\r
-                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                                'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                    }\r
-                                    $log.error('UserNotifCtlr::updateAdminNOtif failed: ' + JSON.stringify(err));\r
-                                }).finally(() => {\r
-                                    var objOffsetVersion = objAgent.indexOf("MSIE");\r
-                                    if (objOffsetVersion != -1) {\r
-                                        $window.location.reload();       \r
-                                    }\r
-                                });\r
-                        }\r
-                    }).catch(err => {\r
-                        $log.error('UserNotifCtlr::deleteItem error: ' + err);\r
-                    });\r
-            }\r
-           \r
-\r
-          \r
-                $scope.showDetailedJsonMessage=function (selectedAdminNotification) {\r
-                        notificationService.getMessageRecipients(selectedAdminNotification.notificationId).then(res =>{\r
-                     $scope.messageRecipients = res;\r
-                                var messageObject=JSON.parse(selectedAdminNotification.msgDescription);\r
-                                var html="";\r
-                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.msgSource+'</p>';\r
-                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.msgHeader+'</p>';\r
-                                html+='<p>'+'Message Recipient'+' : '+$scope.messageRecipients+'</p>';\r
-\r
-                                for(var field in  messageObject){\r
-                                        if(field=='eventDate'||field=='lastModifiedDate'){\r
-                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';\r
-                                                 \r
-                                        }else{\r
-                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';\r
-                                        \r
-                                        }\r
-                                }\r
-\r
-                    var modalInstance = ngDialog.open({\r
-                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',\r
-                                   controller: 'userNotificationCtrl',\r
-                                   resolve: {\r
-                                       message: function () {\r
-                                               var message = {\r
-                                                          title:    '',\r
-                                               text:    html\r
-                                               \r
-                                               };\r
-                                         return message;\r
-                                       },\r
-                                    \r
-                                     }\r
-                                 }); \r
-                    \r
-                }).catch(err => {\r
-                 $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err);\r
-                 $scope.isLoadingTable = false;\r
-             });\r
-\r
-                        };\r
-    \r
-                        \r
-            $scope.editUserNotificationModal = function (selectedAdminNotification) {\r
-\r
-                // retrieve roleIds here\r
-                selectedAdminNotification.roleIds = null;\r
-                notificationService.getNotificationRoles(selectedAdminNotification.notificationId)\r
-                    .then(res => {\r
-                        selectedAdminNotification.roleIds = res.data;\r
-\r
-                        $scope.openUserNotificationModal(selectedAdminNotification);\r
-                    }).catch(err => {\r
-                        $log.error('UserNotifCtlr:getNotificationRoles:: error ', err);\r
-\r
-                    });\r
-            }\r
-\r
-            $scope.openUserNotificationModal = function (selectedAdminNotification) {\r
-                let data = null;\r
-                if (selectedAdminNotification) {\r
-                    data = {\r
-                        notif: selectedAdminNotification\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/user-notifications-admin/user.notifications.modal.page.html',\r
-                    controller: 'userNotificationsModalCtrl',\r
-                    controllerAs: 'userNotifModal',\r
-                    data: data\r
-                }).closePromise.then(function (needUpdate) {\r
-                    getAdminNotifications();\r
-                });\r
-            }\r
-\r
-        }\r
-    }\r
-    userNotificationsCtrl.$inject = ['$scope', '$log', 'notificationService', 'confirmBoxService', '$modal', 'ngDialog', '$state'];\r
-    angular.module('ecompApp').controller('userNotificationsCtrl', userNotificationsCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+
+    class userNotificationsCtrl {
+        constructor($scope, $log, notificationService, confirmBoxService, $modal, ngDialog, $state) {
+
+               var priorityItems={"1":"Normal","2":"Important"};
+               $scope.priorityItems=priorityItems;
+               $scope.searchString='';
+            $scope.externalNotification="External System";
+               $scope.itemExpired={"background-color":"silver "};
+               $scope.showInput = true;
+               $scope.totalPages1 = 0;
+               $scope.viewPerPage1 = 15;
+               $scope.currentPage1 = 1;
+               $scope.showLoader = false;
+               $scope.firstPlay = true;
+               // Start with empty list to silence error in console
+               $scope.tableData = [];
+               $scope.tableAdminNotifItems = [];
+                let getAdminNotifications = () => {
+               $scope.isLoadingTable = true;
+               notificationService.getAdminNotification().then(res => {
+                $scope.adminNotifications = res.data;
+                $scope.isLoadingTable = false;
+                $scope.tableData = res.data;
+                       var totalItems = $scope.tableData.length;
+                       $scope.totalPages1  = Math.ceil(totalItems / $scope.viewPerPage1);
+                       $scope.showLoader = false;
+                       $scope.currentPage1=1;
+                       var endIndex = 1 * $scope.viewPerPage1;
+                       var startIndex = endIndex - $scope.viewPerPage1;
+                       $scope.tableAdminNotifItems = $scope.tableData.slice(startIndex, endIndex); 
+               }).catch(err => {
+                $log.error('userNotificationsCtrl:getAdminNotifications:: error ', err);
+                $scope.isLoadingTable = false;
+            });
+             }
+                
+          getAdminNotifications();           
+
+               $scope.customPageHandler = function(num) {
+                       $scope.currentPage1=num;
+                       var endIndex = num * $scope.viewPerPage1;
+                       var startIndex = endIndex - $scope.viewPerPage1;
+                       $scope.tableAdminNotifItems = $scope.tableData.slice(startIndex, endIndex);
+               };
+                 
+
+          
+
+               
+           $scope.removeUserNotification = function (selectedAdminNotification) {
+                selectedAdminNotification.activeYn = 'N';
+                confirmBoxService.deleteItem(selectedAdminNotification.msgHeader)
+                    .then(isConfirmed => {
+                        if (isConfirmed) {
+                            notificationService.updateAdminNotification(selectedAdminNotification)
+                                .then(() => {
+                                    getAdminNotifications();
+                                }).catch(err => {
+                                    switch (err.status) {
+                                        case '409':         // Conflict
+                                            // handleConflictErrors(err);
+                                            break;
+                                        case '500':         // Internal Server
+                                                                                                                       // Error
+                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                                'Please try again later. Error: ' + err.status).then(isConfirmed => { });
+                                            break;
+                                        case '403':         // Forbidden...
+                                                                                                                       // possible
+                                                                                                                       // webjunction error
+                                                                                                                       // to try again
+                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                                'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });
+                                            break;
+                                        default:
+                                            confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                                'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });
+                                    }
+                                    $log.error('UserNotifCtlr::updateAdminNOtif failed: ' + JSON.stringify(err));
+                                }).finally(() => {
+                                    var objOffsetVersion = objAgent.indexOf("MSIE");
+                                    if (objOffsetVersion != -1) {
+                                        $window.location.reload();       
+                                    }
+                                });
+                        }
+                    }).catch(err => {
+                        $log.error('UserNotifCtlr::deleteItem error: ' + err);
+                    });
+            }
+           
+
+          
+                $scope.showDetailedJsonMessage=function (selectedAdminNotification) {
+                        notificationService.getMessageRecipients(selectedAdminNotification.notificationId).then(res =>{
+                     $scope.messageRecipients = res;
+                                var messageObject=JSON.parse(selectedAdminNotification.msgDescription);
+                                var html="";
+                                html+='<p>'+'Message Source'+' : '+selectedAdminNotification.msgSource+'</p>';
+                                html+='<p>'+'Message Title'+' : '+selectedAdminNotification.msgHeader+'</p>';
+                                html+='<p>'+'Message Recipient'+' : '+$scope.messageRecipients+'</p>';
+
+                                for(var field in  messageObject){
+                                        if(field=='eventDate'||field=='lastModifiedDate'){
+                                                html+='<p>'+field+' : '+new Date(+messageObject[field])+'</p>';
+                                                 
+                                        }else{
+                                        html+='<p>'+field+' : '+messageObject[field]+'</p>';
+                                        
+                                        }
+                                }
+
+                    var modalInstance = ngDialog.open({
+                                   templateUrl: 'app/views/user-notifications-admin/user.notifications.Json.details.modal.page.html',
+                                   controller: 'userNotificationCtrl',
+                                   resolve: {
+                                       message: function () {
+                                               var message = {
+                                                          title:    '',
+                                               text:    html
+                                               
+                                               };
+                                         return message;
+                                       },
+                                    
+                                     }
+                                 }); 
+                    
+                }).catch(err => {
+                 $log.error('userNotificationsCtrl:getMessageRecipients:: error ', err);
+                 $scope.isLoadingTable = false;
+             });
+
+                        };
+    
+                        
+            $scope.editUserNotificationModal = function (selectedAdminNotification) {
+
+                // retrieve roleIds here
+                selectedAdminNotification.roleIds = null;
+                notificationService.getNotificationRoles(selectedAdminNotification.notificationId)
+                    .then(res => {
+                        selectedAdminNotification.roleIds = res.data;
+
+                        $scope.openUserNotificationModal(selectedAdminNotification);
+                    }).catch(err => {
+                        $log.error('UserNotifCtlr:getNotificationRoles:: error ', err);
+
+                    });
+            }
+
+            $scope.openUserNotificationModal = function (selectedAdminNotification) {
+                let data = null;
+                if (selectedAdminNotification) {
+                    data = {
+                        notif: selectedAdminNotification
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/user-notifications-admin/user.notifications.modal.page.html',
+                    controller: 'userNotificationsModalCtrl',
+                    controllerAs: 'userNotifModal',
+                    data: data
+                }).closePromise.then(function (needUpdate) {
+                    getAdminNotifications();
+                });
+            }
+
+        }
+    }
+    userNotificationsCtrl.$inject = ['$scope', '$log', 'notificationService', 'confirmBoxService', '$modal', 'ngDialog', '$state'];
+    angular.module('ecompApp').controller('userNotificationsCtrl', userNotificationsCtrl);
+})();
index ebf4807..e17ec46 100644 (file)
@@ -1,48 +1,48 @@
-\r
-.w-ecomp-user-json-notification-details-admin {\r
- .bg_portalWhite;//white for 1702\r
-    //.bg_portalGray;  // gray for 1610\r
-    position: relative;\r
-    top: 20px;\r
-    left: -200px;\r
-    right: @page-main-right;\r
-    bottom: @page-main-bottom;\r
-    padding-top: @padding-top;\r
-    padding-left: @padding-left-side;\r
-    height: 345px;\r
-    width: 96%;\r
-    margin-left: 220px;\r
-  .w-ecomp-main-json-view-title {\r
-    //.n18r;\r
-    .dGray18r;  //AT&T Dark Gray\r
-    border-bottom: @portalDBlue 3px solid;\r
-    width:100%;\r
-  }\r
-  \r
-  .notifications-properties-main{\r
-     padding-top: 16px;\r
-    font-size: 14px;\r
-    overflow-y: scroll;\r
-    max-height: 285px;\r
-      \r
-  }\r
-input:not([type="button"]) {\r
-  height: 22px; }\r
-  .widget-properties-main {\r
-    padding: 16px;\r
-    height: 460px;\r
-    overflow-y: auto;\r
-\r
-\r
-    \r
-\r
-  }\r
-\r
-.dialog-control-close {\r
-    position: absolute;\r
-    bottom: -60px;\r
-    right: 16px;\r
-}\r
-\r
-\r
+
+.w-ecomp-user-json-notification-details-admin {
+ .bg_portalWhite;//white for 1702
+    //.bg_portalGray;  // gray for 1610
+    position: relative;
+    top: 20px;
+    left: -200px;
+    right: @page-main-right;
+    bottom: @page-main-bottom;
+    padding-top: @padding-top;
+    padding-left: @padding-left-side;
+    height: 345px;
+    width: 96%;
+    margin-left: 220px;
+  .w-ecomp-main-json-view-title {
+    //.n18r;
+    .dGray18r;  //AT&T Dark Gray
+    border-bottom: @portalDBlue 3px solid;
+    width:100%;
+  }
+  
+  .notifications-properties-main{
+     padding-top: 16px;
+    font-size: 14px;
+    overflow-y: scroll;
+    max-height: 285px;
+      
+  }
+input:not([type="button"]) {
+  height: 22px; }
+  .widget-properties-main {
+    padding: 16px;
+    height: 460px;
+    overflow-y: auto;
+
+
+    
+
+  }
+
+.dialog-control-close {
+    position: absolute;
+    bottom: -60px;
+    right: 16px;
+}
+
+
 }
\ No newline at end of file
index ebd2f93..7821e07 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-\r
-(function () {\r
-\r
-    class userNotificationsModalCtrl {\r
-        constructor($scope, $log, functionalMenuService, confirmBoxService, notificationService, $modal, ngDialog, $state, $filter) {\r
-\r
-            let newNotifModel = {\r
-                'isOnlineUsersOnly': null,\r
-                'isForAllRolesOptions': null,\r
-                'selectedPriority': null,\r
-                'isActive': null,\r
-                'startTime': null,\r
-                'endTime': null,\r
-                'msgHeader': null,\r
-                'msgDescription': null,\r
-                'roleIds': null,\r
-                'roleObj': {notificationRoleIds:null}\r
-            };\r
-            \r
-            $scope.notificationId = null;\r
-            $scope.selectedCat = null;\r
-            $scope.selectedEcompFunc = null;\r
-            this.YN_index_mapping = {\r
-                "Y": 0,\r
-                "N": 1\r
-            }\r
-            \r
-            $scope.onlineAllUsersOptions = [\r
-                { "index": 0, "value": "Y", "title": "Online Users Only" },\r
-                { "index": 1, "value": "N", "title": "Online & Offline Users" }\r
-                \r
-            ];\r
-\r
-            $scope.isForAllRolesOptions = [\r
-                { "index": 0, "value": "Y", "title": "Yes" },\r
-                { "index": 1, "value": "N", "title": "No" }\r
-            ];\r
-\r
-            $scope.priorityOptions  = [\r
-                { "index": 0, "value": 1, "title": "Normal" },\r
-                { "index": 1, "value": 2, "title": "Important" }\r
-            ];\r
-\r
-            $scope.isActiveOptions = [\r
-                { "index": 0, "value": "Y", "title": "Yes" },\r
-                { "index": 1, "value": "N", "title": "No" }\r
-            ];\r
-            $scope.isActive = $scope.isActiveOptions[0];\r
-            $scope.selectPriority = $scope.priorityOptions[0];\r
-            $scope.isOnlineUsersOnly = $scope.onlineAllUsersOptions[1];\r
-          $scope.isForAllRoles=$scope.isForAllRolesOptions[0].value;\r
-          $scope.isFunctionalMenu ="Y";\r
-\r
-          $scope.selectedPriority=$scope.priorityOptions[0].value;\r
-\r
-            // $scope.notificationRoleIds = [];\r
-            $scope.msgHeader = '';\r
-            $scope.msgDescription = '';\r
-            $scope.treeTitle="Functional Menu";\r
-            $scope.notifObj= {isCategoriesFunctionalMenu:true};\r
-\r
-            let init = () => {\r
-                // $log.info('userNotificationsModalCtrl::init');\r
-                this.isSaving = false;\r
-                var today = new Date();\r
-                $scope.minDate = today.toISOString().substring(0, 10);\r
-                var threeMonthsFromNow = new Date();\r
-                threeMonthsFromNow.setMonth(threeMonthsFromNow.getMonth() + 3);\r
-                $scope.maxDate = threeMonthsFromNow.toISOString().substring(0, 10);\r
-                if ($scope.ngDialogData && $scope.ngDialogData.notif) {\r
-                    // $log.debug('userNotificationsModalCtrl:init:: Edit\r
-                                       // notification mode for', $scope.ngDialogData.notif);\r
-                    $scope.isEditMode = true;\r
-                    $scope.editModeObj = {isEditMode: true};\r
-                    this.notif = _.clone($scope.ngDialogData.notif);\r
-                    $scope.modalPgTitle = 'View Notification'\r
-                    $scope.isOnlineUsersOnly = $scope.onlineAllUsersOptions[this.YN_index_mapping[this.notif.isForOnlineUsers]];\r
-                    $scope.isForAllRoles = $scope.isForAllRolesOptions[this.YN_index_mapping[this.notif.isForAllRoles]].value;\r
-                    $scope.isActive = $scope.isActiveOptions[this.YN_index_mapping[this.notif.activeYn]];\r
-                    $scope.selectedPriority = $scope.priorityOptions[this.notif.priority - 1].value;\r
-                    $scope.startTime = new Date(this.notif.startTime);\r
-                    $scope.endTime = new Date(this.notif.endTime);\r
-                    $scope.msgHeader = this.notif.msgHeader;\r
-                    $scope.msgDescription = this.notif.msgDescription;\r
-                    $scope.notificationId = this.notif.notificationId;\r
-                    $scope.notificationRoleIds = this.notif.roleIds;\r
-                    $scope.roleObj = {notificationRoleIds:this.notif.roleIds};\r
-                } else {\r
-                       // $log.debug('AppDetailsModalCtrl:init:: New app mode');\r
-                    $scope.isEditMode = false;\r
-                    $scope.editModeObj = {isEditMode: false};\r
-                    $scope.modalPgTitle = 'Add a New Notification'\r
-                    this.notif = _.clone(newNotifModel);\r
-                    $scope.roleObj = {notificationRoleIds:null};\r
-                }\r
-            };\r
-            this.conflictMessages = {};\r
-            this.scrollApi = {};\r
-            let handleConflictErrors = err => {\r
-                if(!err.data){\r
-                    return;\r
-                }\r
-                if(!err.data.length){ // support objects\r
-                    err.data = [err.data]\r
-                }\r
-                _.forEach(err.data, item => {\r
-                    _.forEach(item.fields, field => {\r
-                        // set conflict message\r
-                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];\r
-                        // set field as invalid\r
-                        $scope.appForm[field.name].$setValidity('conflict', false);\r
-                        // set watch once to clear error after user correction\r
-                        watchOnce[field.name]();\r
-                    });\r
-                });\r
-                this.scrollApi.scrollTop();\r
-            };\r
-\r
-            let resetConflict = fieldName => {\r
-                delete this.conflictMessages[fieldName];\r
-                if($scope.appForm[fieldName]){\r
-                    $scope.appForm[fieldName].$setValidity('conflict', true);\r
-                }\r
-            };\r
-            $scope.addUserNotificationValidation = function () {\r
-                // // pre-processing\r
-                if (!($scope.isEditMode)) {                    \r
-                    var validation=false;\r
-\r
-               if($scope.startTime && $scope.endTime && $scope.msgHeader != '' && $scope.msgDescription != '' && ($scope.startTime<$scope.endTime)){\r
-                  validation=true;\r
-                  if( $scope.isForAllRoles=='N'){\r
-                       validation =  $scope.checkBoxObj.isAnyRoleSelected;\r
-                   }\r
-               }\r
-               else{\r
-                  validation=false;\r
-                  }\r
-                    \r
-                       \r
-                   return !validation; \r
-                }\r
-            }\r
-            \r
-            /* format the value for viewing a notification */\r
-            $scope.formatStartDate = function () {\r
-               if ($scope.startTime) {\r
-                       $scope.startTime = $filter('date')($scope.startTime, 'medium'); \r
-               }               \r
-            }\r
-            \r
-            /* format the value for viewing a notification */\r
-            $scope.formatEndDate = function () {\r
-               if($scope.endTime){\r
-                       $scope.endTime = $filter('date')($scope.endTime, 'medium');\r
-               }\r
-            }\r
-            \r
-            $scope.addUserNotification = function () {\r
-                $scope.notificationRoleIds = [];\r
-                // pre-processing\r
-                for (var key in $scope.checkboxIdDict) {\r
-                    if ($scope.checkboxIdDict[key].is_box_checked && ($scope.checkboxIdDict[key].role_id != null)) {\r
-                        var role_ids = $scope.checkboxIdDict[key].role_id;\r
-                        for (var i in role_ids) {\r
-                            if (!($scope.notificationRoleIds.indexOf(role_ids[i]) > -1)) {\r
-                                $scope.notificationRoleIds.push(role_ids[i]);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-\r
-                $scope.notificationRoleIds.sort();\r
-                if (($scope.isOnlineUsersOnly) && ($scope.isForAllRoles) && ($scope.selectedPriority) && ($scope.isActive)\r
-                    && ($scope.startTime) && ($scope.endTime) && ($scope.msgHeader != '') && ($scope.msgDescription != '')) {\r
-                    this.newUserNotification =\r
-                        {\r
-                            'notificationId':$scope.notificationId,\r
-                            'isForOnlineUsers': $scope.isOnlineUsersOnly.value,\r
-                            'isForAllRoles': $scope.isForAllRoles,\r
-                            'priority': $scope.selectedPriority,\r
-                            'activeYn': $scope.isActive.value,\r
-                            'startTime': $scope.startTime,\r
-                            'endTime': $scope.endTime,\r
-                            'msgHeader': $scope.msgHeader,\r
-                            'msgDescription': $scope.msgDescription,\r
-                            'roleIds': $scope.notificationRoleIds,\r
-                            'createdDate': new Date()\r
-                        };\r
-\r
-                    // POST ajax call here;\r
-                    if ($scope.isEditMode) {\r
-                        notificationService.updateAdminNotification(this.newUserNotification)\r
-                            .then(() => {\r
-                                //$log.debug('NotificationService:updateAdminNotification:: Admin notification update succeeded!');\r
-                                $scope.closeThisDialog(true);\r
-                                // emptyCookies();\r
-                            }).catch(err => {\r
-                                $log.error('notificationService.updateAdminNotfication failed: ' + JSON.stringify(err));\r
-                                switch (err.status) {\r
-                                    case '409':         // Conflict\r
-                                        // handleConflictErrors(err);\r
-                                        break;\r
-                                    case '500':         // Internal Server Error\r
-                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                            'Please try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                        break;\r
-                                    case '403':         // Forbidden... possible\r
-                                                                                                               // webjunction error to\r
-                                                                                                               // try again\r
-                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                            'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                        break;\r
-                                    default:\r
-                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +\r
-                                            'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                }\r
-                            }).finally(() => {\r
-                                // for bug in IE 11\r
-                                var objOffsetVersion = objAgent.indexOf("MSIE");\r
-                                if (objOffsetVersion != -1) {\r
-                                    $log.debug('AppDetailsModalCtrl:updateOnboardingApp:: Browser is IE, forcing Refresh');\r
-                                    $window.location.reload();   \r
-                                }\r
-                                // for bug in IE 11\r
-                            });\r
-\r
-                    } else {\r
-                        notificationService.addAdminNotification(this.newUserNotification)\r
-                            .then((res) => {\r
-                                $log.debug('notificationService:addAdminNotification:: Admin notification creation succeeded!,',res);\r
-                                if(res.status=='ERROR'){\r
-                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +\r
-                                             ' Error: ' + res.response).then(isConfirmed => { });\r
-\r
-                                       \r
-                                }\r
-                                else{\r
-                                        $scope.closeThisDialog(true);\r
-                                }\r
-                               \r
-                                // emptyCookies();\r
-                            }).catch(err => {\r
-                                switch (err.status) {\r
-                                    case '409':         // Conflict\r
-                                        // handleConflictErrors(err);\r
-                                        break;\r
-                                    case '500':         // Internal Server Error\r
-                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +\r
-                                            'Please try again later. Error: ' + err.status).then(isConfirmed => { });\r
-                                        break;\r
-                                    default:\r
-                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +\r
-                                            'Please try again. If the problem persists, then try again later. Error: ' +\r
-                                            err.status).then(isConfirmed => { });\r
-                                }\r
-                                $log.error('notificationService:addAdminNotification error:: ' + JSON.stringify(err));\r
-                            })\r
-                    }\r
-\r
-                   \r
-                } else {\r
-                    $log.warn('please fill in all required fields');\r
-                       confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => { });\r
-                }\r
-            }\r
-            // Populate the category list for category dropdown list\r
-            let getFunctionalMenu = () => {\r
-                this.isLoadingTable = true;\r
-                $scope.notifObj= {isCategoriesFunctionalMenu:true};\r
-                functionalMenuService.getFunctionalMenuRole().then(role_res => {\r
-                    var menu_role_dict = {};\r
-                    for (var i in role_res) {\r
-                        // if first time appear in menu_role_dict\r
-                        if (!(role_res[i].menuId in menu_role_dict)) {\r
-                            menu_role_dict[role_res[i].menuId] = [role_res[i].roleId];\r
-                        } else {\r
-                            menu_role_dict[role_res[i].menuId].push(role_res[i].roleId);\r
-                        }\r
-                    }\r
-                    functionalMenuService.getManagedFunctionalMenuForNotificationTree().then(res => {\r
-                        let actualData = [];\r
-                        var exclude_list = ['Favorites']\r
-                        // Adding children and label attribute to all objects in\r
-                        $scope.checkboxIdDict = {};\r
-                        $scope.checkBoxObj = {isAnyRoleSelected:false};\r
-                        for (let i = 0; i < res.length; i++) {\r
-                            res[i].children = [];\r
-                            res[i].label = res[i].text;\r
-                            res[i].id = res[i].text;\r
-                            // res[i].is_box_checked = false;\r
-                            res[i].can_check = true;\r
-                            res[i].roleId = menu_role_dict[res[i].menuId];\r
-                            $scope.checkboxIdDict[res[i].id] = { 'is_box_checked': false, 'role_id': res[i].roleId };\r
-                        }\r
-\r
-                        // Adding actual child items to children array in res\r
-                                               // objects\r
-                        $scope.parentChildDict ={};\r
-                        $scope.parentChildRoleIdDict ={};\r
-                        for (let i = 0; i < res.length; i++) {\r
-                            let parentId = res[i].menuId;\r
-                            $scope.parentChildDict[parentId] = [];\r
-                            $scope.parentChildRoleIdDict[parentId]=[];\r
-                            for (let j = 0; j < res.length; j++) {\r
-                                let childId = res[j].parentMenuId;\r
-                                if (parentId === childId) {\r
-                                    res[i].children.push(res[j]);\r
-                                    $scope.parentChildDict[parentId].push(res[j].menuId);\r
-                                    //if res[j].roleId is defined\r
-                                    if (res[j].roleId) {\r
-                                       for (let k in res[j].roleId) {\r
-                                            $scope.parentChildRoleIdDict[parentId].push(res[j].roleId[k]);\r
-                                       }\r
-                                       \r
-                                    }\r
-                                }\r
-                            }\r
-                        }\r
-                        \r
-                        //check if grand children exist\r
-                            for (var key in $scope.parentChildDict){\r
-                               var children = $scope.parentChildDict[key];\r
-                               var isGrandParent = false;\r
-                               if (children.length>0) {\r
-                                       for (var i in children) {\r
-                                               if ($scope.parentChildDict[children[i]].length>0){\r
-                                                       isGrandParent = true;\r
-                                                       break;\r
-                                               }\r
-                                       }\r
-                               }\r
-                               if (isGrandParent) {\r
-                                       for (var i in children) {\r
-                                               // if the child has children\r
-                                               if ($scope.parentChildDict[children[i]].length>0) {\r
-                                                       for (var j in $scope.parentChildRoleIdDict[children[i]]) {\r
-                                                               \r
-                                                               if ($scope.parentChildRoleIdDict[key].indexOf($scope.parentChildRoleIdDict[children[i]][j]) === -1) {\r
-                                                                       $scope.parentChildRoleIdDict[key].push($scope.parentChildRoleIdDict[children[i]][j]);\r
-                                                               }\r
-                                                       }\r
-                                               } else {\r
-                                                        \r
-                                               }\r
-                                       }\r
-                               }\r
-\r
-                            };                            \r
-                                                        \r
-\r
-                                var ListMenuIdToRemove = [];\r
-                        //$scope.parentObj = {ListMenuIdToRemove : []};\r
-                        //get the list of menuId that needs to be removed \r
-                        for (let i = 0; i < res.length; i++) {\r
-                            if ((res[i].children.length==0)&&(!res[i].roleId)) {\r
-                                var menuIdToRemove = res[i].menuId;\r
-                                if (ListMenuIdToRemove.indexOf(menuIdToRemove) === -1){\r
-                                    ListMenuIdToRemove.push(menuIdToRemove);\r
-                                }\r
-                            }\r
-                        }\r
-\r
-                        // a scope variable that marks whether each functional menu item should be displayed.\r
-                        $scope.toShowItemDict = {};                        \r
-                        for (let i = 0; i < res.length; i++) {\r
-                            if (res[i].roleId==null) {\r
-                                if (res[i].children.length==0) {\r
-                                    $scope.toShowItemDict[res[i].menuId]=false;                                \r
-                                } else if(res[i].children.length>0){\r
-                                    if($scope.parentChildDict[res[i].menuId].length === _.intersection($scope.parentChildDict[res[i].menuId], ListMenuIdToRemove).length){\r
-                                        $scope.toShowItemDict[res[i].menuId]=false;                                \r
-                                    } else {\r
-                                        $scope.toShowItemDict[res[i].menuId]=true;                                \r
-                                    }\r
-                                }\r
-                            } else {\r
-                                $scope.toShowItemDict[res[i].menuId]=true;\r
-                            }\r
-                        }\r
\r
-                        // Sort the top-level menu items in order based on the\r
-                                               // column\r
-                        res.sort(function (a, b) {\r
-                            return a.column - b.column;\r
-                        });\r
-\r
-                        // Sort all the children in order based on the column\r
-                        for (let i = 0; i < res.length; i++) {\r
-                            res[i].children.sort(function (a, b) {\r
-                                return a.column - b.column;\r
-                            });\r
-                        }\r
-\r
-                        // Forming actual parent items\r
-                        for (let i = 0; i < res.length; i++) {\r
-                            let parentId = res[i].parentMenuId;\r
-                            if (parentId === null) {\r
-                                actualData.push(res[i]);\r
-                            }\r
-                        }\r
-\r
-                        // $scope.treedata = actualData;\r
-                        var treedata = actualData[0].children;\r
-                        $scope.treedata = [];\r
-                        for (var i in treedata) {\r
-                            if (!(treedata[i].label.indexOf(exclude_list) > -1)) {\r
-                                $scope.treedata.push(treedata[i])\r
-                            }\r
-                        }\r
-\r
-                    }).catch(err => {\r
-                        $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);\r
-                    }).finally(() => {\r
-                        this.isLoadingTable = false;\r
-                    })\r
-\r
-                }).catch(err => {\r
-                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);\r
-                })\r
-                    ;\r
-            }\r
-     \r
-            \r
-            let getAppRoleIds = () => {\r
-                $scope.notifObj= {isCategoriesFunctionalMenu:false};\r
-                notificationService.getAppRoleIds().then(res => {\r
-                       \r
-                    res = res.data;\r
-                    let actualData = [];\r
-                    // var exclude_list = ['Favorites']\r
-                    var app_id_name_list = {};\r
-                        $scope.checkboxIdDict = {};\r
-                        $scope.checkBoxObj = {isAnyRoleSelected:false};\r
-\r
-                    for (let i = 0; i < res.length; i++) {\r
-                        if (!(res[i].appId in app_id_name_list)) {\r
-                            app_id_name_list[res[i].appId] = res[i].appName;\r
-                        }\r
-\r
-                        res[i].children = [];\r
-                        res[i].label = res[i].roleName;\r
-                        res[i].id = res[i].roleId;\r
-                        res[i].menuId = res[i].roleId;\r
-                        res[i].parentMenuId = res[i].appId;\r
-                        res[i].can_check = true;\r
-                        res[i].roleId = [res[i].roleId];\r
-                        $scope.checkboxIdDict[res[i].id] = { 'is_box_checked': false, 'role_id': res[i].roleId};   \r
-                    }\r
-                    \r
-                    for (var app_id in app_id_name_list) {\r
-                        var new_res = {};\r
-                        new_res.children = [];\r
-                        new_res.label = app_id_name_list[app_id];\r
-                        new_res.id = app_id;\r
-                        new_res.menuId = app_id;\r
-                        new_res.parentMenuId = null;\r
-                        new_res.appId = null;\r
-                        new_res.can_check = true;\r
-                        new_res.roleId = null;\r
-                        $scope.checkboxIdDict[new_res.id]= { 'is_box_checked': false, 'role_id': new_res.roleId };\r
-                        res.push(new_res);\r
-                    }\r
-                    $scope.parentChildRoleIdDict ={};\r
-                    //Adding actual child items to children array in res objects\r
-                    for (let i = 0; i < res.length; i++) {\r
-                        let parentId = res[i].menuId;\r
-                        $scope.parentChildRoleIdDict[parentId]=[];\r
-                        for (let j = 0; j < res.length; j++) {\r
-                            let childId = res[j].parentMenuId;\r
-                            if (parentId == childId) {\r
-                                res[i].children.push(res[j]);\r
-                                if (res[j].roleId) {\r
-                                       for (let k in res[j].roleId) {\r
-                                        $scope.parentChildRoleIdDict[parentId].push(res[j].roleId[k]);\r
-                                       }\r
-                                       \r
-                                }\r
-                            }\r
-                        }\r
-                    }\r
-                    //Forming actual parent items\r
-                    for (let i = 0; i < res.length; i++) {\r
-                        let parentId = res[i].parentMenuId;\r
-                        if (parentId === null) {\r
-                            actualData.push(res[i]);\r
-                        }\r
-                    }\r
-\r
-                    $scope.treedata = actualData;\r
-                }).catch(err => {\r
-                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);\r
-                }).finally(() => {\r
-                    this.isLoadingTable = false;\r
-                })\r
-            }\r
-            $scope.getFunctionalMenu= function() {\r
-            $scope.treeTitle="Functional Menu";\r
-            getFunctionalMenu();\r
-            }\r
-            $scope.getAppRoleIds = function() {\r
-            $scope.treeTitle="Applications/Roles";\r
-                getAppRoleIds();\r
-            }\r
-             \r
-            init();\r
-            getFunctionalMenu();\r
-\r
-        }\r
-        \r
-    }\r
-    \r
-    userNotificationsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'confirmBoxService', 'notificationService', '$modal', 'ngDialog', '$state', '$filter'];\r
-    angular.module('ecompApp').controller('userNotificationsModalCtrl', userNotificationsModalCtrl);\r
-    \r
-    angular.module('ecompApp').directive('attDatepickerCustom', ['$log', function($log) {\r
-        return {\r
-            restrict: 'A',\r
-          require: 'ngModel',\r
-            scope: {},\r
-            \r
-            controller: ['$scope', '$element', '$attrs', '$compile', 'datepickerConfig', 'datepickerService', function($scope, $element, $attrs, $compile, datepickerConfig, datepickerService) {\r
-               var dateFormatString = angular.isDefined($attrs.dateFormat) ? $scope.$parent.$eval($attrs.dateFormat) : datepickerConfig.dateFormat;\r
-               var selectedDateMessage = '<div class="sr-focus hidden-spoken" tabindex="-1">the date you selected is {{$parent.current | date : \'' + dateFormatString + '\'}}</div>';\r
-               $element.removeAttr('att-datepicker-custom');\r
-                $element.removeAttr('ng-model');\r
-                $element.attr('ng-value', '$parent.current |  date:"EEEE, MMMM d, y"');\r
-                $element.attr('aria-describedby', 'datepicker');\r
-               \r
-                $element.attr('maxlength', 10);\r
-\r
-                var wrapperElement = angular.element('<div></div>');\r
-                wrapperElement.attr('datepicker-popup', '');\r
-                wrapperElement.attr('current', 'current');\r
-\r
-                datepickerService.setAttributes($attrs, wrapperElement);\r
-                datepickerService.bindScope($attrs, $scope);\r
-\r
-                wrapperElement.html('');\r
-                wrapperElement.append($element.prop('outerHTML'));\r
-                if (navigator.userAgent.match(/MSIE 8/) === null) {\r
-                    wrapperElement.append(selectedDateMessage);\r
-                }\r
-                var elm = wrapperElement.prop('outerHTML');\r
-                elm = $compile(elm)($scope);\r
-                $element.replaceWith(elm);\r
-            }],\r
-            link: function(scope, elem, attr, ctrl) {\r
-                if (!ctrl) {\r
-                    // do nothing if no ng-model\r
-                    $log.error("ng-model is required.");\r
-                    return;\r
-                }\r
-\r
-                scope.$watch('current', function(value) {\r
-                    ctrl.$setViewValue(value);\r
-                });\r
-                ctrl.$render = function() {\r
-                    scope.current = ctrl.$viewValue;\r
-                };\r
-              \r
-            }\r
-        };\r
-    }]);\r
-\r
-    angular.module('ecompApp').directive('jqTreeUserNotif', ['functionalMenuService', '$log', 'confirmBoxService', '$compile', function (functionalMenuService, $log, confirmBoxService, $compile) {\r
-        return {\r
-            scope: true,\r
-            templateUrl: 'jq-tree-tmpl-user-notif.html',\r
-            link: function (scope, el, attrs) {\r
-\r
-                var $jqTree = el.find('#jqTreeUserNotif').tree({\r
-                    data: scope.treedata,\r
-                    autoOpen: scope.editModeObj.isEditMode,\r
-                    dragAndDrop: false,\r
-                    onCreateLi: function (node, $li) {\r
-                        node.is_checked = false;\r
-                        if (node.roleId&&scope.roleObj.notificationRoleIds) {\r
-                            node.is_checked = (node.roleId.length === _.intersection(node.roleId, scope.roleObj.notificationRoleIds).length);\r
-                        }                        \r
-                        if (typeof node.id =="string"){\r
-                            $li.attr('id', node.id.replace(/\s+/g, '_'));\r
-                        }\r
-                        var isChecked = '';\r
-                        if (node.is_checked) {\r
-                            isChecked = 'checked="checked"';\r
-                        }\r
-                        if (node.can_check) {\r
-                            var toShow = true;\r
-                            if (scope.notifObj.isCategoriesFunctionalMenu) {\r
-                                toShow = scope.toShowItemDict[node.menuId];\r
-                            }\r
-                            var isDisabled = "";\r
-                            if (scope.editModeObj.isEditMode) {\r
-                                isDisabled = " disabled"\r
-                                       \r
-                                       //if node is a parent/grandparent node\r
-                                    if (node.children.length>0){\r
-                                               //whether to show node first\r
-                                       if (_.intersection(scope.parentChildRoleIdDict[node.menuId], scope.roleObj.notificationRoleIds).length) {\r
-                                               toShow=true;\r
-                                               if (scope.parentChildRoleIdDict[node.menuId].length==_.intersection(scope.parentChildRoleIdDict[node.menuId], scope.roleObj.notificationRoleIds).length) {\r
-                                                isChecked = 'checked="checked"';                                                       \r
-                                               }\r
-                                       } else {\r
-                                               toShow=false;\r
-                                       }\r
-                                    } \r
-                                    //if node is a child node\r
-                                    else {\r
-                                       if (node.is_checked) {\r
-                                               toShow=true;                                    \r
-                                       } else {\r
-                                               toShow=false;\r
-                                       }\r
-                                    }\r
-\r
-                              }\r
-\r
-                            \r
-\r
-                            var template = '<input ng-click="thisCheckboxClicked($event)" type="checkbox" class="edit js-node-check" data-node-menu-id="' + node.menuId + '"  data-node-id="' + node.id + '" ' + isChecked + ' ng-show="' + toShow + '"' + isDisabled+ '/>'\r
-\r
-                            var templateEl = angular.element(template);\r
-                            var $jqCheckbox = $compile(templateEl)(scope);\r
-                                                       if (toShow){\r
-                                                                       $li.find('.jqtree-element').prepend($jqCheckbox);\r
-                                                               } else {\r
-                                                                       $li.find('.jqtree-element').remove();\r
-                                                                       }\r
-                        }\r
-                    }\r
-                });\r
-\r
-                scope.thisCheckboxClicked = function (e) {\r
-                \r
-                       var nodeId = e.target.attributes[4].value;\r
-                       \r
-             \r
-               \r
-                       var sBrowser, sUsrAg = window.navigator.userAgent;\r
-                       //if (sUsrAg.indexOf("Firefox") > -1) {\r
-                       \r
-                       if (sUsrAg.indexOf("Trident") > -1) {\r
-                               nodeId = e.target.attributes[5].value;\r
-                       }\r
-                    \r
-//                     if (sUsrAg.indexOf("MSIE") > 1) {\r
-//                             alert("hELLO tHIS IS IE10");\r
-//                             nodeId = e.target.attributes[3].value;\r
-//                             alert('nodeId 26 of IE 45 : '+nodeId);\r
-//                     }\r
-//                     \r
-                       var version = navigator.userAgent.match(/Firefox\/(.*)$/);\r
-                       \r
-                       if(version && version.length > 1){\r
-                       if(parseInt(version[1]) >= 50){\r
-                               nodeId = e.target.attributes[3].value;\r
-                       } else if(parseInt(version[1]) >= 45){\r
-                               \r
-                               nodeId = e.target.attributes[2].value;\r
-                       }\r
-                }\r
-                       var thisNode = el.find('#jqTreeUserNotif').tree('getNodeById', nodeId);\r
-                    var isChecked = e.target.checked;\r
-                    scope.checkboxIdDict[nodeId]['is_box_checked'] = isChecked;\r
-\r
-                    thisNode = angular.element(thisNode);\r
-                    if (thisNode[0].hasOwnProperty('children') && thisNode[0].children.length > 0) {\r
-                        var jsNodeCheckList = angular.element(e.target).parent().next().find('.js-node-check')\r
-                        // check/uncheck children items\r
-                        jsNodeCheckList.prop('checked', isChecked);\r
-\r
-                        for (var i in jsNodeCheckList) {\r
-                            var singlediv = jsNodeCheckList[i];\r
-                            if (typeof singlediv == 'object' & (!singlediv.length)) {\r
-                               \r
-                               var tempNodeId = angular.element(singlediv)[0].attributes[4].value;\r
-                            \r
-                                \r
-                                \r
-                                if (sUsrAg.indexOf("Trident") > -1) {\r
-                                       \r
-                                       var tempNodeId = angular.element(singlediv)[0].attributes[5].value;\r
-                                       \r
-                               \r
-                                }\r
-                                \r
-//                                if (sUsrAg.indexOf("MSIE") > 0) {\r
-//                                    var tempNodeId = angular.element(singlediv)[0].attributes[3].value;\r
-//                                    alert('tempNodeId 2 FF 45 : '+tempNodeId);\r
-//                                    }\r
-                                if(version && version.length > 1){\r
-                                       if(parseInt(version[1]) >= 50){\r
-                                               tempNodeId = angular.element(singlediv)[0].attributes[3].value;\r
-                                       } \r
-                                       else if(parseInt(version[1]) >= 45){\r
-                                               tempNodeId = angular.element(singlediv)[0].attributes[2].value;\r
-                                       }\r
-                                }\r
-                                scope.checkboxIdDict[tempNodeId]['is_box_checked'] = isChecked;\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    scope.checkBoxObj.isAnyRoleSelected = false;\r
-                    for (var key in scope.checkboxIdDict) {\r
-                        if (scope.checkboxIdDict[key]['is_box_checked']&&scope.checkboxIdDict[key]['role_id']) {\r
-                            scope.checkBoxObj.isAnyRoleSelected = true;\r
-                            break;\r
-                        }\r
-                    }\r
-                }\r
-\r
-\r
-\r
-                scope.$watch('treedata', function (oldValue, newValue) {\r
-                    if (oldValue !== newValue) {\r
-                        $jqTree.tree('loadData', scope.treedata);\r
-                        $jqTree.tree('reload', function () {\r
-                        });\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+
+(function () {
+
+    class userNotificationsModalCtrl {
+        constructor($scope, $log, functionalMenuService, confirmBoxService, notificationService, $modal, ngDialog, $state, $filter) {
+
+            let newNotifModel = {
+                'isOnlineUsersOnly': null,
+                'isForAllRolesOptions': null,
+                'selectedPriority': null,
+                'isActive': null,
+                'startTime': null,
+                'endTime': null,
+                'msgHeader': null,
+                'msgDescription': null,
+                'roleIds': null,
+                'roleObj': {notificationRoleIds:null}
+            };
+            
+            $scope.notificationId = null;
+            $scope.selectedCat = null;
+            $scope.selectedEcompFunc = null;
+            this.YN_index_mapping = {
+                "Y": 0,
+                "N": 1
+            }
+            
+            $scope.onlineAllUsersOptions = [
+                { "index": 0, "value": "Y", "title": "Online Users Only" },
+                { "index": 1, "value": "N", "title": "Online & Offline Users" }
+                
+            ];
+
+            $scope.isForAllRolesOptions = [
+                { "index": 0, "value": "Y", "title": "Yes" },
+                { "index": 1, "value": "N", "title": "No" }
+            ];
+
+            $scope.priorityOptions  = [
+                { "index": 0, "value": 1, "title": "Normal" },
+                { "index": 1, "value": 2, "title": "Important" }
+            ];
+
+            $scope.isActiveOptions = [
+                { "index": 0, "value": "Y", "title": "Yes" },
+                { "index": 1, "value": "N", "title": "No" }
+            ];
+            $scope.isActive = $scope.isActiveOptions[0];
+            $scope.selectPriority = $scope.priorityOptions[0];
+            $scope.isOnlineUsersOnly = $scope.onlineAllUsersOptions[1];
+          $scope.isForAllRoles=$scope.isForAllRolesOptions[0].value;
+          $scope.isFunctionalMenu ="Y";
+
+          $scope.selectedPriority=$scope.priorityOptions[0].value;
+
+            // $scope.notificationRoleIds = [];
+            $scope.msgHeader = '';
+            $scope.msgDescription = '';
+            $scope.treeTitle="Functional Menu";
+            $scope.notifObj= {isCategoriesFunctionalMenu:true};
+
+            let init = () => {
+                // $log.info('userNotificationsModalCtrl::init');
+                this.isSaving = false;
+                var today = new Date();
+                $scope.minDate = today.toISOString().substring(0, 10);
+                var threeMonthsFromNow = new Date();
+                threeMonthsFromNow.setMonth(threeMonthsFromNow.getMonth() + 3);
+                $scope.maxDate = threeMonthsFromNow.toISOString().substring(0, 10);
+                if ($scope.ngDialogData && $scope.ngDialogData.notif) {
+                    // $log.debug('userNotificationsModalCtrl:init:: Edit
+                                       // notification mode for', $scope.ngDialogData.notif);
+                    $scope.isEditMode = true;
+                    $scope.editModeObj = {isEditMode: true};
+                    this.notif = _.clone($scope.ngDialogData.notif);
+                    $scope.modalPgTitle = 'View Notification'
+                    $scope.isOnlineUsersOnly = $scope.onlineAllUsersOptions[this.YN_index_mapping[this.notif.isForOnlineUsers]];
+                    $scope.isForAllRoles = $scope.isForAllRolesOptions[this.YN_index_mapping[this.notif.isForAllRoles]].value;
+                    $scope.isActive = $scope.isActiveOptions[this.YN_index_mapping[this.notif.activeYn]];
+                    $scope.selectedPriority = $scope.priorityOptions[this.notif.priority - 1].value;
+                    $scope.startTime = new Date(this.notif.startTime);
+                    $scope.endTime = new Date(this.notif.endTime);
+                    $scope.msgHeader = this.notif.msgHeader;
+                    $scope.msgDescription = this.notif.msgDescription;
+                    $scope.notificationId = this.notif.notificationId;
+                    $scope.notificationRoleIds = this.notif.roleIds;
+                    $scope.roleObj = {notificationRoleIds:this.notif.roleIds};
+                } else {
+                       // $log.debug('AppDetailsModalCtrl:init:: New app mode');
+                    $scope.isEditMode = false;
+                    $scope.editModeObj = {isEditMode: false};
+                    $scope.modalPgTitle = 'Add a New Notification'
+                    this.notif = _.clone(newNotifModel);
+                    $scope.roleObj = {notificationRoleIds:null};
+                }
+            };
+            this.conflictMessages = {};
+            this.scrollApi = {};
+            let handleConflictErrors = err => {
+                if(!err.data){
+                    return;
+                }
+                if(!err.data.length){ // support objects
+                    err.data = [err.data]
+                }
+                _.forEach(err.data, item => {
+                    _.forEach(item.fields, field => {
+                        // set conflict message
+                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];
+                        // set field as invalid
+                        $scope.appForm[field.name].$setValidity('conflict', false);
+                        // set watch once to clear error after user correction
+                        watchOnce[field.name]();
+                    });
+                });
+                this.scrollApi.scrollTop();
+            };
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                if($scope.appForm[fieldName]){
+                    $scope.appForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+            $scope.addUserNotificationValidation = function () {
+                // // pre-processing
+                if (!($scope.isEditMode)) {                    
+                    var validation=false;
+
+               if($scope.startTime && $scope.endTime && $scope.msgHeader != '' && $scope.msgDescription != '' && ($scope.startTime<$scope.endTime)){
+                  validation=true;
+                  if( $scope.isForAllRoles=='N'){
+                       validation =  $scope.checkBoxObj.isAnyRoleSelected;
+                   }
+               }
+               else{
+                  validation=false;
+                  }
+                    
+                       
+                   return !validation; 
+                }
+            }
+            
+            /* format the value for viewing a notification */
+            $scope.formatStartDate = function () {
+               if ($scope.startTime) {
+                       $scope.startTime = $filter('date')($scope.startTime, 'medium'); 
+               }               
+            }
+            
+            /* format the value for viewing a notification */
+            $scope.formatEndDate = function () {
+               if($scope.endTime){
+                       $scope.endTime = $filter('date')($scope.endTime, 'medium');
+               }
+            }
+            
+            $scope.addUserNotification = function () {
+                $scope.notificationRoleIds = [];
+                // pre-processing
+                for (var key in $scope.checkboxIdDict) {
+                    if ($scope.checkboxIdDict[key].is_box_checked && ($scope.checkboxIdDict[key].role_id != null)) {
+                        var role_ids = $scope.checkboxIdDict[key].role_id;
+                        for (var i in role_ids) {
+                            if (!($scope.notificationRoleIds.indexOf(role_ids[i]) > -1)) {
+                                $scope.notificationRoleIds.push(role_ids[i]);
+                            }
+                        }
+                    }
+                }
+
+                $scope.notificationRoleIds.sort();
+                if (($scope.isOnlineUsersOnly) && ($scope.isForAllRoles) && ($scope.selectedPriority) && ($scope.isActive)
+                    && ($scope.startTime) && ($scope.endTime) && ($scope.msgHeader != '') && ($scope.msgDescription != '')) {
+                    this.newUserNotification =
+                        {
+                            'notificationId':$scope.notificationId,
+                            'isForOnlineUsers': $scope.isOnlineUsersOnly.value,
+                            'isForAllRoles': $scope.isForAllRoles,
+                            'priority': $scope.selectedPriority,
+                            'activeYn': $scope.isActive.value,
+                            'startTime': $scope.startTime,
+                            'endTime': $scope.endTime,
+                            'msgHeader': $scope.msgHeader,
+                            'msgDescription': $scope.msgDescription,
+                            'roleIds': $scope.notificationRoleIds,
+                            'createdDate': new Date()
+                        };
+
+                    // POST ajax call here;
+                    if ($scope.isEditMode) {
+                        notificationService.updateAdminNotification(this.newUserNotification)
+                            .then(() => {
+                                //$log.debug('NotificationService:updateAdminNotification:: Admin notification update succeeded!');
+                                $scope.closeThisDialog(true);
+                                // emptyCookies();
+                            }).catch(err => {
+                                $log.error('notificationService.updateAdminNotfication failed: ' + JSON.stringify(err));
+                                switch (err.status) {
+                                    case '409':         // Conflict
+                                        // handleConflictErrors(err);
+                                        break;
+                                    case '500':         // Internal Server Error
+                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                            'Please try again later. Error: ' + err.status).then(isConfirmed => { });
+                                        break;
+                                    case '403':         // Forbidden... possible
+                                                                                                               // webjunction error to
+                                                                                                               // try again
+                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                            'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });
+                                        break;
+                                    default:
+                                        confirmBoxService.showInformation('There was a problem updating the notification. ' +
+                                            'Please try again. If the problem persists, then try again later. Error: ' + err.status).then(isConfirmed => { });
+                                }
+                            }).finally(() => {
+                                // for bug in IE 11
+                                var objOffsetVersion = objAgent.indexOf("MSIE");
+                                if (objOffsetVersion != -1) {
+                                    $log.debug('AppDetailsModalCtrl:updateOnboardingApp:: Browser is IE, forcing Refresh');
+                                    $window.location.reload();   
+                                }
+                                // for bug in IE 11
+                            });
+
+                    } else {
+                        notificationService.addAdminNotification(this.newUserNotification)
+                            .then((res) => {
+                                $log.debug('notificationService:addAdminNotification:: Admin notification creation succeeded!,',res);
+                                if(res.status=='ERROR'){
+                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +
+                                             ' Error: ' + res.response).then(isConfirmed => { });
+
+                                       
+                                }
+                                else{
+                                        $scope.closeThisDialog(true);
+                                }
+                               
+                                // emptyCookies();
+                            }).catch(err => {
+                                switch (err.status) {
+                                    case '409':         // Conflict
+                                        // handleConflictErrors(err);
+                                        break;
+                                    case '500':         // Internal Server Error
+                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +
+                                            'Please try again later. Error: ' + err.status).then(isConfirmed => { });
+                                        break;
+                                    default:
+                                        confirmBoxService.showInformation('There was a problem adding the notification. ' +
+                                            'Please try again. If the problem persists, then try again later. Error: ' +
+                                            err.status).then(isConfirmed => { });
+                                }
+                                $log.error('notificationService:addAdminNotification error:: ' + JSON.stringify(err));
+                            })
+                    }
+
+                   
+                } else {
+                    $log.warn('please fill in all required fields');
+                       confirmBoxService.showInformation('Please fill in all required fields').then(isConfirmed => { });
+                }
+            }
+            // Populate the category list for category dropdown list
+            let getFunctionalMenu = () => {
+                this.isLoadingTable = true;
+                $scope.notifObj= {isCategoriesFunctionalMenu:true};
+                functionalMenuService.getFunctionalMenuRole().then(role_res => {
+                    var menu_role_dict = {};
+                    for (var i in role_res) {
+                        // if first time appear in menu_role_dict
+                        if (!(role_res[i].menuId in menu_role_dict)) {
+                            menu_role_dict[role_res[i].menuId] = [role_res[i].roleId];
+                        } else {
+                            menu_role_dict[role_res[i].menuId].push(role_res[i].roleId);
+                        }
+                    }
+                    functionalMenuService.getManagedFunctionalMenuForNotificationTree().then(res => {
+                        let actualData = [];
+                        var exclude_list = ['Favorites']
+                        // Adding children and label attribute to all objects in
+                        $scope.checkboxIdDict = {};
+                        $scope.checkBoxObj = {isAnyRoleSelected:false};
+                        for (let i = 0; i < res.length; i++) {
+                            res[i].children = [];
+                            res[i].label = res[i].text;
+                            res[i].id = res[i].text;
+                            // res[i].is_box_checked = false;
+                            res[i].can_check = true;
+                            res[i].roleId = menu_role_dict[res[i].menuId];
+                            $scope.checkboxIdDict[res[i].id] = { 'is_box_checked': false, 'role_id': res[i].roleId };
+                        }
+
+                        // Adding actual child items to children array in res
+                                               // objects
+                        $scope.parentChildDict ={};
+                        $scope.parentChildRoleIdDict ={};
+                        for (let i = 0; i < res.length; i++) {
+                            let parentId = res[i].menuId;
+                            $scope.parentChildDict[parentId] = [];
+                            $scope.parentChildRoleIdDict[parentId]=[];
+                            for (let j = 0; j < res.length; j++) {
+                                let childId = res[j].parentMenuId;
+                                if (parentId === childId) {
+                                    res[i].children.push(res[j]);
+                                    $scope.parentChildDict[parentId].push(res[j].menuId);
+                                    //if res[j].roleId is defined
+                                    if (res[j].roleId) {
+                                       for (let k in res[j].roleId) {
+                                            $scope.parentChildRoleIdDict[parentId].push(res[j].roleId[k]);
+                                       }
+                                       
+                                    }
+                                }
+                            }
+                        }
+                        
+                        //check if grand children exist
+                            for (var key in $scope.parentChildDict){
+                               var children = $scope.parentChildDict[key];
+                               var isGrandParent = false;
+                               if (children.length>0) {
+                                       for (var i in children) {
+                                               if ($scope.parentChildDict[children[i]].length>0){
+                                                       isGrandParent = true;
+                                                       break;
+                                               }
+                                       }
+                               }
+                               if (isGrandParent) {
+                                       for (var i in children) {
+                                               // if the child has children
+                                               if ($scope.parentChildDict[children[i]].length>0) {
+                                                       for (var j in $scope.parentChildRoleIdDict[children[i]]) {
+                                                               
+                                                               if ($scope.parentChildRoleIdDict[key].indexOf($scope.parentChildRoleIdDict[children[i]][j]) === -1) {
+                                                                       $scope.parentChildRoleIdDict[key].push($scope.parentChildRoleIdDict[children[i]][j]);
+                                                               }
+                                                       }
+                                               } else {
+                                                        
+                                               }
+                                       }
+                               }
+
+                            };                            
+                                                        
+
+                                var ListMenuIdToRemove = [];
+                        //$scope.parentObj = {ListMenuIdToRemove : []};
+                        //get the list of menuId that needs to be removed 
+                        for (let i = 0; i < res.length; i++) {
+                            if ((res[i].children.length==0)&&(!res[i].roleId)) {
+                                var menuIdToRemove = res[i].menuId;
+                                if (ListMenuIdToRemove.indexOf(menuIdToRemove) === -1){
+                                    ListMenuIdToRemove.push(menuIdToRemove);
+                                }
+                            }
+                        }
+
+                        // a scope variable that marks whether each functional menu item should be displayed.
+                        $scope.toShowItemDict = {};                        
+                        for (let i = 0; i < res.length; i++) {
+                            if (res[i].roleId==null) {
+                                if (res[i].children.length==0) {
+                                    $scope.toShowItemDict[res[i].menuId]=false;                                
+                                } else if(res[i].children.length>0){
+                                    if($scope.parentChildDict[res[i].menuId].length === _.intersection($scope.parentChildDict[res[i].menuId], ListMenuIdToRemove).length){
+                                        $scope.toShowItemDict[res[i].menuId]=false;                                
+                                    } else {
+                                        $scope.toShowItemDict[res[i].menuId]=true;                                
+                                    }
+                                }
+                            } else {
+                                $scope.toShowItemDict[res[i].menuId]=true;
+                            }
+                        }
+                        // Sort the top-level menu items in order based on the
+                                               // column
+                        res.sort(function (a, b) {
+                            return a.column - b.column;
+                        });
+
+                        // Sort all the children in order based on the column
+                        for (let i = 0; i < res.length; i++) {
+                            res[i].children.sort(function (a, b) {
+                                return a.column - b.column;
+                            });
+                        }
+
+                        // Forming actual parent items
+                        for (let i = 0; i < res.length; i++) {
+                            let parentId = res[i].parentMenuId;
+                            if (parentId === null) {
+                                actualData.push(res[i]);
+                            }
+                        }
+
+                        // $scope.treedata = actualData;
+                        var treedata = actualData[0].children;
+                        $scope.treedata = [];
+                        for (var i in treedata) {
+                            if (!(treedata[i].label.indexOf(exclude_list) > -1)) {
+                                $scope.treedata.push(treedata[i])
+                            }
+                        }
+
+                    }).catch(err => {
+                        $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);
+                    }).finally(() => {
+                        this.isLoadingTable = false;
+                    })
+
+                }).catch(err => {
+                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);
+                })
+                    ;
+            }
+     
+            
+            let getAppRoleIds = () => {
+                $scope.notifObj= {isCategoriesFunctionalMenu:false};
+                notificationService.getAppRoleIds().then(res => {
+                       
+                    res = res.data;
+                    let actualData = [];
+                    // var exclude_list = ['Favorites']
+                    var app_id_name_list = {};
+                        $scope.checkboxIdDict = {};
+                        $scope.checkBoxObj = {isAnyRoleSelected:false};
+
+                    for (let i = 0; i < res.length; i++) {
+                        if (!(res[i].appId in app_id_name_list)) {
+                            app_id_name_list[res[i].appId] = res[i].appName;
+                        }
+
+                        res[i].children = [];
+                        res[i].label = res[i].roleName;
+                        res[i].id = res[i].roleId;
+                        res[i].menuId = res[i].roleId;
+                        res[i].parentMenuId = res[i].appId;
+                        res[i].can_check = true;
+                        res[i].roleId = [res[i].roleId];
+                        $scope.checkboxIdDict[res[i].id] = { 'is_box_checked': false, 'role_id': res[i].roleId};   
+                    }
+                    
+                    for (var app_id in app_id_name_list) {
+                        var new_res = {};
+                        new_res.children = [];
+                        new_res.label = app_id_name_list[app_id];
+                        new_res.id = app_id;
+                        new_res.menuId = app_id;
+                        new_res.parentMenuId = null;
+                        new_res.appId = null;
+                        new_res.can_check = true;
+                        new_res.roleId = null;
+                        $scope.checkboxIdDict[new_res.id]= { 'is_box_checked': false, 'role_id': new_res.roleId };
+                        res.push(new_res);
+                    }
+                    $scope.parentChildRoleIdDict ={};
+                    //Adding actual child items to children array in res objects
+                    for (let i = 0; i < res.length; i++) {
+                        let parentId = res[i].menuId;
+                        $scope.parentChildRoleIdDict[parentId]=[];
+                        for (let j = 0; j < res.length; j++) {
+                            let childId = res[j].parentMenuId;
+                            if (parentId == childId) {
+                                res[i].children.push(res[j]);
+                                if (res[j].roleId) {
+                                       for (let k in res[j].roleId) {
+                                        $scope.parentChildRoleIdDict[parentId].push(res[j].roleId[k]);
+                                       }
+                                       
+                                }
+                            }
+                        }
+                    }
+                    //Forming actual parent items
+                    for (let i = 0; i < res.length; i++) {
+                        let parentId = res[i].parentMenuId;
+                        if (parentId === null) {
+                            actualData.push(res[i]);
+                        }
+                    }
+
+                    $scope.treedata = actualData;
+                }).catch(err => {
+                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ', err);
+                }).finally(() => {
+                    this.isLoadingTable = false;
+                })
+            }
+            $scope.getFunctionalMenu= function() {
+            $scope.treeTitle="Functional Menu";
+            getFunctionalMenu();
+            }
+            $scope.getAppRoleIds = function() {
+            $scope.treeTitle="Applications/Roles";
+                getAppRoleIds();
+            }
+             
+            init();
+            getFunctionalMenu();
+
+        }
+        
+    }
+    
+    userNotificationsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'confirmBoxService', 'notificationService', '$modal', 'ngDialog', '$state', '$filter'];
+    angular.module('ecompApp').controller('userNotificationsModalCtrl', userNotificationsModalCtrl);
+    
+    angular.module('ecompApp').directive('attDatepickerCustom', ['$log', function($log) {
+        return {
+            restrict: 'A',
+          require: 'ngModel',
+            scope: {},
+            
+            controller: ['$scope', '$element', '$attrs', '$compile', 'datepickerConfig', 'datepickerService', function($scope, $element, $attrs, $compile, datepickerConfig, datepickerService) {
+               var dateFormatString = angular.isDefined($attrs.dateFormat) ? $scope.$parent.$eval($attrs.dateFormat) : datepickerConfig.dateFormat;
+               var selectedDateMessage = '<div class="sr-focus hidden-spoken" tabindex="-1">the date you selected is {{$parent.current | date : \'' + dateFormatString + '\'}}</div>';
+               $element.removeAttr('att-datepicker-custom');
+                $element.removeAttr('ng-model');
+                $element.attr('ng-value', '$parent.current |  date:"EEEE, MMMM d, y"');
+                $element.attr('aria-describedby', 'datepicker');
+               
+                $element.attr('maxlength', 10);
+
+                var wrapperElement = angular.element('<div></div>');
+                wrapperElement.attr('datepicker-popup', '');
+                wrapperElement.attr('current', 'current');
+
+                datepickerService.setAttributes($attrs, wrapperElement);
+                datepickerService.bindScope($attrs, $scope);
+
+                wrapperElement.html('');
+                wrapperElement.append($element.prop('outerHTML'));
+                if (navigator.userAgent.match(/MSIE 8/) === null) {
+                    wrapperElement.append(selectedDateMessage);
+                }
+                var elm = wrapperElement.prop('outerHTML');
+                elm = $compile(elm)($scope);
+                $element.replaceWith(elm);
+            }],
+            link: function(scope, elem, attr, ctrl) {
+                if (!ctrl) {
+                    // do nothing if no ng-model
+                    $log.error("ng-model is required.");
+                    return;
+                }
+
+                scope.$watch('current', function(value) {
+                    ctrl.$setViewValue(value);
+                });
+                ctrl.$render = function() {
+                    scope.current = ctrl.$viewValue;
+                };
+              
+            }
+        };
+    }]);
+
+    angular.module('ecompApp').directive('jqTreeUserNotif', ['functionalMenuService', '$log', 'confirmBoxService', '$compile', function (functionalMenuService, $log, confirmBoxService, $compile) {
+        return {
+            scope: true,
+            templateUrl: 'jq-tree-tmpl-user-notif.html',
+            link: function (scope, el, attrs) {
+
+                var $jqTree = el.find('#jqTreeUserNotif').tree({
+                    data: scope.treedata,
+                    autoOpen: scope.editModeObj.isEditMode,
+                    dragAndDrop: false,
+                    onCreateLi: function (node, $li) {
+                        node.is_checked = false;
+                        if (node.roleId&&scope.roleObj.notificationRoleIds) {
+                            node.is_checked = (node.roleId.length === _.intersection(node.roleId, scope.roleObj.notificationRoleIds).length);
+                        }                        
+                        if (typeof node.id =="string"){
+                            $li.attr('id', node.id.replace(/\s+/g, '_'));
+                        }
+                        var isChecked = '';
+                        if (node.is_checked) {
+                            isChecked = 'checked="checked"';
+                        }
+                        if (node.can_check) {
+                            var toShow = true;
+                            if (scope.notifObj.isCategoriesFunctionalMenu) {
+                                toShow = scope.toShowItemDict[node.menuId];
+                            }
+                            var isDisabled = "";
+                            if (scope.editModeObj.isEditMode) {
+                                isDisabled = " disabled"
+                                       
+                                       //if node is a parent/grandparent node
+                                    if (node.children.length>0){
+                                               //whether to show node first
+                                       if (_.intersection(scope.parentChildRoleIdDict[node.menuId], scope.roleObj.notificationRoleIds).length) {
+                                               toShow=true;
+                                               if (scope.parentChildRoleIdDict[node.menuId].length==_.intersection(scope.parentChildRoleIdDict[node.menuId], scope.roleObj.notificationRoleIds).length) {
+                                                isChecked = 'checked="checked"';                                                       
+                                               }
+                                       } else {
+                                               toShow=false;
+                                       }
+                                    } 
+                                    //if node is a child node
+                                    else {
+                                       if (node.is_checked) {
+                                               toShow=true;                                    
+                                       } else {
+                                               toShow=false;
+                                       }
+                                    }
+
+                              }
+
+                            
+
+                            var template = '<input ng-click="thisCheckboxClicked($event)" type="checkbox" class="edit js-node-check" data-node-menu-id="' + node.menuId + '"  data-node-id="' + node.id + '" ' + isChecked + ' ng-show="' + toShow + '"' + isDisabled+ '/>'
+
+                            var templateEl = angular.element(template);
+                            var $jqCheckbox = $compile(templateEl)(scope);
+                                                       if (toShow){
+                                                                       $li.find('.jqtree-element').prepend($jqCheckbox);
+                                                               } else {
+                                                                       $li.find('.jqtree-element').remove();
+                                                                       }
+                        }
+                    }
+                });
+
+                scope.thisCheckboxClicked = function (e) {
+                
+                       var nodeId = e.target.attributes[4].value;
+                       
+             
+               
+                       var sBrowser, sUsrAg = window.navigator.userAgent;
+                       //if (sUsrAg.indexOf("Firefox") > -1) {
+                       
+                       if (sUsrAg.indexOf("Trident") > -1) {
+                               nodeId = e.target.attributes[5].value;
+                       }
+                    
+//                     if (sUsrAg.indexOf("MSIE") > 1) {
+//                             alert("hELLO tHIS IS IE10");
+//                             nodeId = e.target.attributes[3].value;
+//                             alert('nodeId 26 of IE 45 : '+nodeId);
+//                     }
+//                     
+                       var version = navigator.userAgent.match(/Firefox\/(.*)$/);
+                       
+                       if(version && version.length > 1){
+                       if(parseInt(version[1]) >= 50){
+                               nodeId = e.target.attributes[3].value;
+                       } else if(parseInt(version[1]) >= 45){
+                               
+                               nodeId = e.target.attributes[2].value;
+                       }
+                }
+                       var thisNode = el.find('#jqTreeUserNotif').tree('getNodeById', nodeId);
+                    var isChecked = e.target.checked;
+                    scope.checkboxIdDict[nodeId]['is_box_checked'] = isChecked;
+
+                    thisNode = angular.element(thisNode);
+                    if (thisNode[0].hasOwnProperty('children') && thisNode[0].children.length > 0) {
+                        var jsNodeCheckList = angular.element(e.target).parent().next().find('.js-node-check')
+                        // check/uncheck children items
+                        jsNodeCheckList.prop('checked', isChecked);
+
+                        for (var i in jsNodeCheckList) {
+                            var singlediv = jsNodeCheckList[i];
+                            if (typeof singlediv == 'object' & (!singlediv.length)) {
+                               
+                               var tempNodeId = angular.element(singlediv)[0].attributes[4].value;
+                            
+                                
+                                
+                                if (sUsrAg.indexOf("Trident") > -1) {
+                                       
+                                       var tempNodeId = angular.element(singlediv)[0].attributes[5].value;
+                                       
+                               
+                                }
+                                
+//                                if (sUsrAg.indexOf("MSIE") > 0) {
+//                                    var tempNodeId = angular.element(singlediv)[0].attributes[3].value;
+//                                    alert('tempNodeId 2 FF 45 : '+tempNodeId);
+//                                    }
+                                if(version && version.length > 1){
+                                       if(parseInt(version[1]) >= 50){
+                                               tempNodeId = angular.element(singlediv)[0].attributes[3].value;
+                                       } 
+                                       else if(parseInt(version[1]) >= 45){
+                                               tempNodeId = angular.element(singlediv)[0].attributes[2].value;
+                                       }
+                                }
+                                scope.checkboxIdDict[tempNodeId]['is_box_checked'] = isChecked;
+                            }
+                        }
+                    }
+
+                    scope.checkBoxObj.isAnyRoleSelected = false;
+                    for (var key in scope.checkboxIdDict) {
+                        if (scope.checkboxIdDict[key]['is_box_checked']&&scope.checkboxIdDict[key]['role_id']) {
+                            scope.checkBoxObj.isAnyRoleSelected = true;
+                            break;
+                        }
+                    }
+                }
+
+
+
+                scope.$watch('treedata', function (oldValue, newValue) {
+                    if (oldValue !== newValue) {
+                        $jqTree.tree('loadData', scope.treedata);
+                        $jqTree.tree('reload', function () {
+                        });
+                    }
+                });
+            }
+        };
+    }]);
+})();
index e342692..ac7f489 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="user-notification-details-modal">\r
-       <!--<div class="functional-menu-container">-->\r
-       <div id="app-title" class="title">{{modalPgTitle}}</div>\r
-       <div class="user-notification-details-contents">\r
-               <div class="left-container">\r
-                       <div class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">\r
-                               <div class="user-notif-label">Broadcast to All Categories</div>\r
-                               <label id="label-yes" class="simulateCatGridHeaderRadioButton"> <input\r
-                                       id="radio-button-yes" type="radio" ng-model="isForAllRoles" value="Y"> Yes\r
-                               </label> <label id="label-no" class="simulateCatGridHeaderRadioButton"> <input\r
-                                       id="radio-button-no" type="radio" ng-model="isForAllRoles" value="N"> No\r
-                               </label>\r
-                       </div>\r
-                       <div \r
-                               style="padding-left: 10px; {{(! isForAllRoles ||isForAllRoles=='Y')? 'opacity : 0.6; pointer-events: none;':' '}} {{isEditMode? 'opacity : 0.6;':' '}} "\r
-                               class="user-notif-label">\r
-                               <div id="notifcation-label-user" class="user-notif-label">\r
-                                       <span ng-show="isForAllRoles=='N'" runat="server" ID="required" style="color: Red;">*</span>\r
-                                       Categories\r
-                               </div>\r
-                               <div>\r
-\r
-                               <div id="notifcation-label-user-div" class="user-notif-label"></div>\r
-                               <label id="funcMenu-label-yes" > <input id="radio-button-funcMenu"\r
-                               type="radio" ng-model="isFunctionalMenu" ng-click="getFunctionalMenu()" value="Y"> Functional Menu\r
-                               <br/>\r
-                               </label> <label id="approles-label-no" > <input id="radio-button-approles"\r
-                               type="radio" ng-model="isFunctionalMenu" ng-click="getAppRoleIds()" value="N"> Application Roles\r
-                               </label>\r
-\r
-                               <div id="approles-checkbox" ng-show="!checkBoxObj.isAnyRoleSelected&&(isForAllRoles=='N')&&(!isEditMode)">\r
-                                       \r
-                                       <div id="approles-checkbox-required" ng-show="!checkBoxObj.isAnyRoleSelected" >\r
-                                               \r
-\r
-                                               <small class="checkbox-categories">At least\r
-                                                       one category is required</small>\r
-\r
-                                       </div>\r
-                               </div>\r
-                               \r
-                               </div>\r
-                               \r
-                               <div  id="tree1">\r
-                                       <div id="Service_Creation"></div>\r
-                               </div>\r
-                               <div \r
-                                       \r
-                                       id="jq-tree-div" jq-tree-user-notif ></div>\r
-\r
-                                       \r
-\r
-                               <script type="text/ng-template" id="jq-tree-tmpl-user-notif.html">\r
-               <div  id="jqTreeUserNotif" class="tree"></div>\r
-               </script>\r
-                       </div>\r
-                       <div>\r
-\r
-                               <div id="add-user-notif-priority" class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">\r
-                                       <div id="user-notification-priority-label" class="user-notif-label">Priority</div>\r
-                                       <label id="label-important" class="simulateCatGridHeaderRadioButton"> <input\r
-                                               id="radio-button-normal" type="radio" ng-model="selectedPriority" value="1"> Normal\r
-                                       </label> <label id="label-normal" class="simulateCatGridHeaderRadioButton"> <input\r
-                                               id="radio-button-important" type="radio" ng-model="selectedPriority" value="2">\r
-                                               Important\r
-                                       </label>\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-               <div id="app-conatiner-right" class="right-container">\r
-\r
-                       <div id="add-user-notif-startdate" class="add-widget-field"\r
-                               style="padding-bottom: 12px; width: 301px !important;{{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">\r
-                               <div id="user-notification-startdate-label" class="user-notif-label">\r
-                                       <div class="user-notif-label">\r
-                                               <span runat="server" ID="required" style="color: Red;">*</span>\r
-                                               Start Date (Local Time)\r
-                                       </div>\r
-                                       <input class="notif-input-calendar" id="datepicker-start" type="text" \r
-                                               ng-model="startTime" b2b-datepicker min="minDate" max="maxDate" \r
-                                               required />\r
-                                       <div id="user-startdate-required" ng-show="!startTime">\r
-                                               <small class="mandatory-categories">Start Date is Required</small>\r
-                                       </div>\r
-                               </div>\r
-                               <div ng-show="!isEditMode" ng-init="formatStartDate()"></div> \r
-                       </div>                  \r
-\r
-                       <div id="add-user-notif-enddate" class="add-widget-field"\r
-                               style="padding-bottom: 12px;     width: 301px !important; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">\r
-                               <div id="user-notification-enddate-label" class="user-notif-label">\r
-                                       <span runat="server" ID="required" style="color: Red;">*</span> End     Date (Local Time)\r
-                               </div>\r
-                               <input class="notif-input-calendar" type="text" id="datepicker-end" \r
-                                       ng-model="endTime" b2b-datepicker min="minDate" max="maxDate" \r
-                                       required />\r
-                               <div id="user-enddate-required" ng-show="!endTime" >\r
-                                       <small class="mandatory-categories">End Date is Required</small>\r
-                               </div>\r
-                               <div id="user-enddate-error" ng-show="endTime&&startTime&&startTime.getTime()>=endTime.getTime()" style="color: #cf2a2a; font-size: 10px;">\r
-                                       <small style="position: absolute;">End Date must be greater than start Date</small>\r
-                               </div>\r
-                               <div ng-show="!isEditMode" ng-init="formatEndDate()" ></div> \r
-                       </div>\r
-\r
-                       <div id="add-user-notif-title" class="add-widget-field"\r
-                               style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">\r
-                               <div id="user-notification-title-label" class="user-notif-label">\r
-                                       <span runat="server" ID="required" style="color: Red;"\r
-                                               visible="false"> *</span> Title\r
-                               </div>\r
-                               <textarea id="add-notification-input-title" class="notif-input" ng-model="msgHeader" name="content" style="height: 50px;">\r
-                </textarea>\r
-                               <div id="user-title-required" ng-show="msgHeader.length == 0">\r
-                                       <small class="mandatory-categories">Title is Required</small>\r
-                               </div>\r
-                       </div>\r
-                       \r
-                       <div id="add-user-notif-message" class="add-widget-field"\r
-                               style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">\r
-                               <div id="user-notif-message-label" class="user-notif-label">\r
-                                       <span runat="server" ID="required" style="color: Red;"\r
-                                               visible="false"> *</span> Message\r
-                               </div>\r
-                               <textarea id="user-notif-input-message" class="notif-input" style="height: 150px"\r
-                                       ng-model="msgDescription" name="content">\r
-                               </textarea>\r
-                               <div id="user-notif-message-required" ng-show="msgDescription.length ==0 ">\r
-                               <small class="mandatory-categories">Message is Required</small>\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div class="dialog-control">\r
-                               <a ng-show="!isEditMode">\r
-                               <button id="button-notification-save" class="btn btn-alt btn-small" size="small" ng-disabled="addUserNotificationValidation()"\r
-                                       ng-click="addUserNotification()">Save</button></a>                                              \r
-                               <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()" role="button" tabindex="0">Cancel</button>\r
-                       </div>\r
-                       \r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="user-notification-details-modal">
+       <!--<div class="functional-menu-container">-->
+       <div id="app-title" class="title">{{modalPgTitle}}</div>
+       <div class="user-notification-details-contents">
+               <div class="left-container">
+                       <div class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
+                               <div class="user-notif-label">Broadcast to All Categories</div>
+                               <label id="label-yes" class="simulateCatGridHeaderRadioButton"> <input
+                                       id="radio-button-yes" type="radio" ng-model="isForAllRoles" value="Y"> Yes
+                               </label> <label id="label-no" class="simulateCatGridHeaderRadioButton"> <input
+                                       id="radio-button-no" type="radio" ng-model="isForAllRoles" value="N"> No
+                               </label>
+                       </div>
+                       <div 
+                               style="padding-left: 10px; {{(! isForAllRoles ||isForAllRoles=='Y')? 'opacity : 0.6; pointer-events: none;':' '}} {{isEditMode? 'opacity : 0.6;':' '}} "
+                               class="user-notif-label">
+                               <div id="notifcation-label-user" class="user-notif-label">
+                                       <span ng-show="isForAllRoles=='N'" runat="server" ID="required" style="color: Red;">*</span>
+                                       Categories
+                               </div>
+                               <div>
+
+                               <div id="notifcation-label-user-div" class="user-notif-label"></div>
+                               <label id="funcMenu-label-yes" > <input id="radio-button-funcMenu"
+                               type="radio" ng-model="isFunctionalMenu" ng-click="getFunctionalMenu()" value="Y"> Functional Menu
+                               <br/>
+                               </label> <label id="approles-label-no" > <input id="radio-button-approles"
+                               type="radio" ng-model="isFunctionalMenu" ng-click="getAppRoleIds()" value="N"> Application Roles
+                               </label>
+
+                               <div id="approles-checkbox" ng-show="!checkBoxObj.isAnyRoleSelected&&(isForAllRoles=='N')&&(!isEditMode)">
+                                       
+                                       <div id="approles-checkbox-required" ng-show="!checkBoxObj.isAnyRoleSelected" >
+                                               
+
+                                               <small class="checkbox-categories">At least
+                                                       one category is required</small>
+
+                                       </div>
+                               </div>
+                               
+                               </div>
+                               
+                               <div  id="tree1">
+                                       <div id="Service_Creation"></div>
+                               </div>
+                               <div 
+                                       
+                                       id="jq-tree-div" jq-tree-user-notif ></div>
+
+                                       
+
+                               <script type="text/ng-template" id="jq-tree-tmpl-user-notif.html">
+               <div  id="jqTreeUserNotif" class="tree"></div>
+               </script>
+                       </div>
+                       <div>
+
+                               <div id="add-user-notif-priority" class="add-widget-field" style="{{isEditMode? 'opacity : 0.6; pointer-events: none;':' '}} ">
+                                       <div id="user-notification-priority-label" class="user-notif-label">Priority</div>
+                                       <label id="label-important" class="simulateCatGridHeaderRadioButton"> <input
+                                               id="radio-button-normal" type="radio" ng-model="selectedPriority" value="1"> Normal
+                                       </label> <label id="label-normal" class="simulateCatGridHeaderRadioButton"> <input
+                                               id="radio-button-important" type="radio" ng-model="selectedPriority" value="2">
+                                               Important
+                                       </label>
+                               </div>
+                       </div>
+               </div>
+               <div id="app-conatiner-right" class="right-container">
+
+                       <div id="add-user-notif-startdate" class="add-widget-field"
+                               style="padding-bottom: 12px; width: 301px !important;{{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
+                               <div id="user-notification-startdate-label" class="user-notif-label">
+                                       <div class="user-notif-label">
+                                               <span runat="server" ID="required" style="color: Red;">*</span>
+                                               Start Date (Local Time)
+                                       </div>
+                                       <input class="notif-input-calendar" id="datepicker-start" type="text" 
+                                               ng-model="startTime" b2b-datepicker min="minDate" max="maxDate" 
+                                               required />
+                                       <div id="user-startdate-required" ng-show="!startTime">
+                                               <small class="mandatory-categories">Start Date is Required</small>
+                                       </div>
+                               </div>
+                               <div ng-show="!isEditMode" ng-init="formatStartDate()"></div> 
+                       </div>                  
+
+                       <div id="add-user-notif-enddate" class="add-widget-field"
+                               style="padding-bottom: 12px;     width: 301px !important; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
+                               <div id="user-notification-enddate-label" class="user-notif-label">
+                                       <span runat="server" ID="required" style="color: Red;">*</span> End     Date (Local Time)
+                               </div>
+                               <input class="notif-input-calendar" type="text" id="datepicker-end" 
+                                       ng-model="endTime" b2b-datepicker min="minDate" max="maxDate" 
+                                       required />
+                               <div id="user-enddate-required" ng-show="!endTime" >
+                                       <small class="mandatory-categories">End Date is Required</small>
+                               </div>
+                               <div id="user-enddate-error" ng-show="endTime&&startTime&&startTime.getTime()>=endTime.getTime()" style="color: #cf2a2a; font-size: 10px;">
+                                       <small style="position: absolute;">End Date must be greater than start Date</small>
+                               </div>
+                               <div ng-show="!isEditMode" ng-init="formatEndDate()" ></div> 
+                       </div>
+
+                       <div id="add-user-notif-title" class="add-widget-field"
+                               style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
+                               <div id="user-notification-title-label" class="user-notif-label">
+                                       <span runat="server" ID="required" style="color: Red;"
+                                               visible="false"> *</span> Title
+                               </div>
+                               <textarea id="add-notification-input-title" class="notif-input" ng-model="msgHeader" name="content" style="height: 50px;">
+                </textarea>
+                               <div id="user-title-required" ng-show="msgHeader.length == 0">
+                                       <small class="mandatory-categories">Title is Required</small>
+                               </div>
+                       </div>
+                       
+                       <div id="add-user-notif-message" class="add-widget-field"
+                               style="padding-bottom: 12px; {{( isEditMode )? 'opacity : 0.6; pointer-events: none;':' '}}">
+                               <div id="user-notif-message-label" class="user-notif-label">
+                                       <span runat="server" ID="required" style="color: Red;"
+                                               visible="false"> *</span> Message
+                               </div>
+                               <textarea id="user-notif-input-message" class="notif-input" style="height: 150px"
+                                       ng-model="msgDescription" name="content">
+                               </textarea>
+                               <div id="user-notif-message-required" ng-show="msgDescription.length ==0 ">
+                               <small class="mandatory-categories">Message is Required</small>
+                               </div>
+                       </div>
+
+                       <div class="dialog-control">
+                               <a ng-show="!isEditMode">
+                               <button id="button-notification-save" class="btn btn-alt btn-small" size="small" ng-disabled="addUserNotificationValidation()"
+                                       ng-click="addUserNotification()">Save</button></a>                                              
+                               <button id="button-notification-cancel" class="btn btn-alt btn-small" ng-click="closeThisDialog()" role="button" tabindex="0">Cancel</button>
+                       </div>
+                       
+               </div>
+       </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 742946f..72c92c2 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-user-notification-admin"\r
-       ng-style="{bottom: tabBottom}">\r
-        <div class="w-ecomp-main-container" >\r
-       <div class="user-notification" id="page-content">\r
-               <div id="title" class="w-ecomp-main-view-title">\r
-                       <h1 class="heading-page" >User Notifications</h1>\r
-               </div>\r
-               <div class="userNotifTable">\r
-               \r
-                  <div class="table-control-fields">\r
-                  <input class="input-table-search" type="text" id="table-search-field"\r
-                                               placeholder="Search in entire table" ng-model="searchString" />\r
-                                       </div>\r
-                         <div class="table-control-buttons" ng-controller="userNotificationsCtrl">\r
-                                               <button class="btn btn-alt btn-small"id="button-openAddNewApp"   ng-click="openUserNotificationModal()" >\r
-                                       <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Notification\r
-                               </button> \r
-                                       </div>\r
-               \r
-                       <span class="ecomp-spinner" ng-show="isLoadingTable"></span>\r
-                       <div class="b2b-table-div"\r
-                               ng-hide="isLoadingTable" id="table-main">\r
-                               <table b2b-table id="table-main" table-data="adminNotifications" search-string="searchString"\r
-                                       current-page="ignoredCurrentPage">\r
-                                       <thead b2b-table-row type="header">\r
-                                               <tr>\r
-                                                       <th id="th-notif-0" b2b-table-header key="msgSource"\r
-                                                               sortable="true" style=" width: 10px;">Message Source</th>\r
-                                                       <th id="th-notif-1" b2b-table-header key="msgHeader"\r
-                                                               sortable="true" style=" width: 10px;">Message</th>\r
-                                                       <th id="th-notif-2"  b2b-table-header key="startTime"\r
-                                                               sortable="true">Start Date (Local Time)</th>\r
-                                                       <th id="th-notif-3" b2b-table-header key="endTime"\r
-                                                               sortable="true">End Date  (Local Time)</th>\r
-                                                       <th id="th-notif-4" b2b-table-header key="priority"\r
-                                                               sortable="true">Priority</th>\r
-                                                       <th id="th-notif-5" b2b-table-header key="loginId"\r
-                                                               sortable="true">Created By</th>\r
-                                                       <th id="th-notif-6" b2b-table-header key="createdDate"\r
-                                                               sortable="true">Created Time</th>\r
-                                                       <th id="th-notif-7" b2b-table-header key="isForAllRoles"\r
-                                                               sortable="true">All Users (Roles)?</th>\r
-                                                       <th id="th-notif-8" b2b-table-header key="edit" sortable="false">View/Delete</th>\r
-                                               </tr>\r
-                                       </thead>\r
-                                       <tbody b2b-table-row type="body" class="table-body"\r
-                                               row-repeat="rowData in tableAdminNotifItems">\r
-                                               <tr>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div  id="{{$index}}-msgSource">{{rowData.msgSource}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?' color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-msgHeader" style="font-weight: bold;">{{rowData.msgHeader}}</div>\r
-                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource==='EP'" style="width:500px"  ng-bind="rowData.msgDescription"></div>\r
-                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource!=='EP'"  ng-bind="rowData.msgDescription| elipsis: 27"></div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-startTime">{{rowData.startTime |\r
-                                                                       date:'medium'}}</div>\r
-                                                       </td >\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-endTime">{{rowData.endTime |\r
-                                                                       date:'medium'}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-priority">{{priorityItems[rowData.priority]}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-loginId">{{!rowData.loginId ?externalNotification: rowData.loginId}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-createdDate">{{rowData.createdDate |\r
-                                                                       date:'medium'}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">\r
-                                                               <div id="{{$index}}-isForAllRoles">{{rowData.isForAllRoles}}</div>\r
-                                                       </td>\r
-                                                       <td b2b-table-body style="{{rowData.expired?' color:lightgray !important':''}}">\r
-                                                       \r
-                                                       <p id="{{$index}}-notification-edit" ng-if="rowData.msgSource==='EP'" ng-click="editUserNotificationModal(rowData)"class="icon-overview"  >  /</p> \r
-                                                       <p id="{{$index}}-notification-edit" ng-if="rowData.msgSource!=='EP'" ng-click="showDetailedJsonMessage(rowData)"class="icon-overview"  >/ </p> \r
-                                                       <p id="{{$index}}-notification-delete" ng-click="removeUserNotification(rowData)" class="icon-misc-trash"></p> \r
-                                                       \r
-                                               \r
-                                                       </td>\r
-                                               </tr>\r
-                                       </tbody>\r
-                               </table>\r
-                               \r
-                       </div>\r
-                                       <div b2b-pagination="" total-pages="totalPages1"\r
-                                               current-page="currentPage1" click-handler="customPageHandler"\r
-                                               role="navigation" aria-label="Customer Data Pages"></div>\r
-                               \r
-                                               \r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-user-notification-admin"
+       ng-style="{bottom: tabBottom}">
+        <div class="w-ecomp-main-container" >
+       <div class="user-notification" id="page-content">
+               <div id="title" class="w-ecomp-main-view-title">
+                       <h1 class="heading-page" >User Notifications</h1>
+               </div>
+               <div class="userNotifTable">
+               
+                  <div class="table-control-fields">
+                  <input class="input-table-search" type="text" id="table-search-field"
+                                               placeholder="Search in entire table" ng-model="searchString" />
+                                       </div>
+                         <div class="table-control-buttons" ng-controller="userNotificationsCtrl">
+                                               <button class="btn btn-alt btn-small"id="button-openAddNewApp"   ng-click="openUserNotificationModal()" >
+                                       <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add Notification
+                               </button> 
+                                       </div>
+               
+                       <span class="ecomp-spinner" ng-show="isLoadingTable"></span>
+                       <div class="b2b-table-div"
+                               ng-hide="isLoadingTable" id="table-main">
+                               <table b2b-table id="table-main" table-data="adminNotifications" search-string="searchString"
+                                       current-page="ignoredCurrentPage">
+                                       <thead b2b-table-row type="header">
+                                               <tr>
+                                                       <th id="th-notif-0" b2b-table-header key="msgSource"
+                                                               sortable="true" style=" width: 10px;">Message Source</th>
+                                                       <th id="th-notif-1" b2b-table-header key="msgHeader"
+                                                               sortable="true" style=" width: 10px;">Message</th>
+                                                       <th id="th-notif-2"  b2b-table-header key="startTime"
+                                                               sortable="true">Start Date (Local Time)</th>
+                                                       <th id="th-notif-3" b2b-table-header key="endTime"
+                                                               sortable="true">End Date  (Local Time)</th>
+                                                       <th id="th-notif-4" b2b-table-header key="priority"
+                                                               sortable="true">Priority</th>
+                                                       <th id="th-notif-5" b2b-table-header key="loginId"
+                                                               sortable="true">Created By</th>
+                                                       <th id="th-notif-6" b2b-table-header key="createdDate"
+                                                               sortable="true">Created Time</th>
+                                                       <th id="th-notif-7" b2b-table-header key="isForAllRoles"
+                                                               sortable="true">All Users (Roles)?</th>
+                                                       <th id="th-notif-8" b2b-table-header key="edit" sortable="false">View/Delete</th>
+                                               </tr>
+                                       </thead>
+                                       <tbody b2b-table-row type="body" class="table-body"
+                                               row-repeat="rowData in tableAdminNotifItems">
+                                               <tr>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div  id="{{$index}}-msgSource">{{rowData.msgSource}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?' color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-msgHeader" style="font-weight: bold;">{{rowData.msgHeader}}</div>
+                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource==='EP'" style="width:500px"  ng-bind="rowData.msgDescription"></div>
+                                                               <div id="{{$index}}-message" ng-if="rowData.msgSource!=='EP'"  ng-bind="rowData.msgDescription| elipsis: 27"></div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-startTime">{{rowData.startTime |
+                                                                       date:'medium'}}</div>
+                                                       </td >
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-endTime">{{rowData.endTime |
+                                                                       date:'medium'}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-priority">{{priorityItems[rowData.priority]}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-loginId">{{!rowData.loginId ?externalNotification: rowData.loginId}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-createdDate">{{rowData.createdDate |
+                                                                       date:'medium'}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?'color:lightgray !important':''}}">
+                                                               <div id="{{$index}}-isForAllRoles">{{rowData.isForAllRoles}}</div>
+                                                       </td>
+                                                       <td b2b-table-body style="{{rowData.expired?' color:lightgray !important':''}}">
+                                                       
+                                                       <p id="{{$index}}-notification-edit" ng-if="rowData.msgSource==='EP'" ng-click="editUserNotificationModal(rowData)"class="icon-overview"  >  /</p> 
+                                                       <p id="{{$index}}-notification-edit" ng-if="rowData.msgSource!=='EP'" ng-click="showDetailedJsonMessage(rowData)"class="icon-overview"  >/ </p> 
+                                                       <p id="{{$index}}-notification-delete" ng-click="removeUserNotification(rowData)" class="icon-misc-trash"></p> 
+                                                       
+                                               
+                                                       </td>
+                                               </tr>
+                                       </tbody>
+                               </table>
+                               
+                       </div>
+                                       <div b2b-pagination="" total-pages="totalPages1"
+                                               current-page="currentPage1" click-handler="customPageHandler"
+                                               role="navigation" aria-label="Customer Data Pages"></div>
+                               
+                                               
+               </div>
+       </div>
+</div>
index 9527c75..e3bcf0a 100644 (file)
@@ -1,32 +1,32 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="new-user-modal">\r
-       <div class="search-users-directive">\r
-               <div class="title">Bulk User Upload Acknowledgement</div>\r
-               <div class="main">\r
-                       <h1>The valid entries have been uploaded.</h1>\r
-\r
-                       <div class="dialog-control">\r
-                               <div id="search-user-cancel-button" class="cancel-button"\r
-                                       ng-click="closeDialog()">OK</div>\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="new-user-modal">
+       <div class="search-users-directive">
+               <div class="title">Bulk User Upload Acknowledgement</div>
+               <div class="main">
+                       <h1>The valid entries have been uploaded.</h1>
+
+                       <div class="dialog-control">
+                               <div id="search-user-cancel-button" class="cancel-button"
+                                       ng-click="closeDialog()">OK</div>
+                       </div>
+               </div>
+       </div>
+</div>
index a3c0b53..6df7d24 100644 (file)
@@ -1,83 +1,83 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="bulk-user-modal">\r
-       <div class="title">Bulk User Upload Confirmation</div>\r
-               <div class="main">\r
-\r
-                       <!-- progress indicator -->\r
-                       <div class="upload-instructions"\r
-                               ng-show="isProcessing">\r
-                               {{progressMsg}}\r
-                               <br>\r
-                               <br>\r
-                               <span class="ecomp-spinner"></span>\r
-                       </div>\r
-\r
-                       <div ng-hide="isProcessing">\r
-                               <div class="upload-instructions">\r
-                               Click OK to upload the valid requests. \r
-                               Invalid requests will be ignored.</div>\r
-                               <div class="c-ecomp-portal-abs-table default"\r
-                                       style="height: 250px !important">\r
-                                       <table b2b-table table-data="uploadFile"\r
-                                               search-string="bulkUser.searchString"\r
-                                               view-per-page="bulkUser.viewPerPageIgnored"\r
-                                               current-page="bulkUser.currentPageIgnored"\r
-                                               total-page="bulkUser.totalPageIgnored">\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr>\r
-                                                               <th id="th-line" b2b-table-header sortable="false">Line</th>\r
-                                                               <th id="th-orgUserId" b2b-table-header sortable="false">Org User ID\r
-                                                                       </th>\r
-                                                               <th id="th-approle" b2b-table-header sortable="false">App\r
-                                                                       Role</th>\r
-                                                               <th id="th-status" b2b-table-header sortable="false">Status</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->\r
-                                               <tbody b2b-table-row type="body" class="table-body"\r
-                                                       row-repeat="rowData in uploadFile">\r
-                                                       <tr id="tr-rowData">\r
-                                                               <td class="td-first" b2b-table-body>\r
-                                                                       <div ng-bind="rowData.line"></div>\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div ng-bind="rowData.orgUserId"></div>\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div ng-bind="rowData.role"></div>\r
-                                                               </td>\r
-                                                               <td b2b-table-body>\r
-                                                                       <div ng-bind="rowData.status"></div>\r
-                                                               </td>\r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>\r
-\r
-                       </div>\r
-                       <div class="dialog-control">            \r
-                                       <button id="bulk-user-ok-button" class="btn btn-alt btn-small" ng-class="{disabled: isValidating}"\r
-                                       ng-click="updateDB()">Ok</button>\r
-                                       <button id="bulk-user-cancel-button" class="btn btn-alt btn-small" ng-click="cancelUpload()">Cancel</button>\r
-                                       \r
-                       </div>\r
-               </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="bulk-user-modal">
+       <div class="title">Bulk User Upload Confirmation</div>
+               <div class="main">
+
+                       <!-- progress indicator -->
+                       <div class="upload-instructions"
+                               ng-show="isProcessing">
+                               {{progressMsg}}
+                               <br>
+                               <br>
+                               <span class="ecomp-spinner"></span>
+                       </div>
+
+                       <div ng-hide="isProcessing">
+                               <div class="upload-instructions">
+                               Click OK to upload the valid requests. 
+                               Invalid requests will be ignored.</div>
+                               <div class="c-ecomp-portal-abs-table default"
+                                       style="height: 250px !important">
+                                       <table b2b-table table-data="uploadFile"
+                                               search-string="bulkUser.searchString"
+                                               view-per-page="bulkUser.viewPerPageIgnored"
+                                               current-page="bulkUser.currentPageIgnored"
+                                               total-page="bulkUser.totalPageIgnored">
+                                               <thead b2b-table-row type="header">
+                                                       <tr>
+                                                               <th id="th-line" b2b-table-header sortable="false">Line</th>
+                                                               <th id="th-orgUserId" b2b-table-header sortable="false">Org User ID
+                                                                       </th>
+                                                               <th id="th-approle" b2b-table-header sortable="false">App
+                                                                       Role</th>
+                                                               <th id="th-status" b2b-table-header sortable="false">Status</th>
+                                                       </tr>
+                                               </thead>
+                                               <!-- Use track-by="UNIQUE KEY HERE" or leave out if no unique keys in data -->
+                                               <tbody b2b-table-row type="body" class="table-body"
+                                                       row-repeat="rowData in uploadFile">
+                                                       <tr id="tr-rowData">
+                                                               <td class="td-first" b2b-table-body>
+                                                                       <div ng-bind="rowData.line"></div>
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div ng-bind="rowData.orgUserId"></div>
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div ng-bind="rowData.role"></div>
+                                                               </td>
+                                                               <td b2b-table-body>
+                                                                       <div ng-bind="rowData.status"></div>
+                                                               </td>
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>
+
+                       </div>
+                       <div class="dialog-control">            
+                                       <button id="bulk-user-ok-button" class="btn btn-alt btn-small" ng-class="{disabled: isValidating}"
+                                       ng-click="updateDB()">Ok</button>
+                                       <button id="bulk-user-cancel-button" class="btn btn-alt btn-small" ng-click="cancelUpload()">Cancel</button>
+                                       
+                       </div>
+               </div>
+</div>
index e3046b8..e73fe29 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * bulk user upload controller\r
- */\r
-'use strict';\r
-(function () {\r
-    class BulkUserModalCtrl {\r
-       constructor($scope, $log, $filter, $q, usersService, applicationsService, confirmBoxService, functionalMenuService, ngDialog) {\r
-               \r
-               // Set to true for copious console output\r
-               var debug = false;\r
-               // Roles fetched from app service\r
-               var appRolesResult = [];\r
-               // Users fetched from user service\r
-               var     userCheckResult = [];\r
-               // Requests for user-role assignment built by validator\r
-               var appUserRolesRequest = [];\r
-               \r
-               let init = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::init');\r
-                       // Angular insists on this.\r
-                       $scope.fileModel = {};\r
-                       // Model for drop-down\r
-                       $scope.adminApps = [];\r
-                       // Enable modal controls\r
-                       this.step1 = true;\r
-                       this.fileSelected = false;\r
-\r
-                       // Flag that indicates background work is proceeding\r
-                       $scope.isProcessing = true;\r
-\r
-                       // Load user's admin applications\r
-                       applicationsService.getAdminApps().promise().then(apps => {\r
-                               if (debug)\r
-                                       $log.debug('BulkUserModalCtrl::init: getAdminApps returned' + JSON.stringify(apps));\r
-                    if (!apps || typeof(apps) != 'object') {\r
-                        $log.error('BulkUserModalCtrl::init: getAdminApps returned unexpected data');\r
-                    }\r
-                    else {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::init:  admin apps length is ', apps.length);\r
-                       \r
-                       // Sort app names and populate the drop-down model\r
-                        let sortedApps = apps.sort(getSortOrder('name', true));\r
-                        for (let i = 0; i < sortedApps.length; ++i) {\r
-                            $scope.adminApps.push({\r
-                                index: i,\r
-                                id: sortedApps[i].id,\r
-                                value: sortedApps[i].name,\r
-                                title: sortedApps[i].name\r
-                            });\r
-                        }\r
-                        // Pick the first one in the list\r
-                        $scope.selectedApplication = $scope.adminApps[0];\r
-                    }\r
-                               $scope.isProcessing = false;\r
-                }).catch(err => {\r
-                    $log.error('BulkUserModalCtrl::init: getAdminApps threw', err);\r
-                       $scope.isProcessing = false;\r
-                });\r
-                       \r
-               }; // init\r
-               \r
-               // Answers a function that compares properties with the specified name.\r
-               let getSortOrder = (prop, foldCase) => {\r
-                return function(a, b) {\r
-                       let aProp = foldCase ? a[prop].toLowerCase() : a[prop];\r
-                       let bProp = foldCase ? b[prop].toLowerCase() : b[prop];\r
-                    if (aProp > bProp)\r
-                        return 1;\r
-                    else if (aProp < bProp) \r
-                        return -1;\r
-                    else\r
-                       return 0;\r
-                }\r
-            }\r
-               \r
-               //This is a fix for dropdown selection, due to b2b dropdown only update value field\r
-               $scope.$watch('selectedApplication.value', (newVal, oldVal) => {\r
-                       for(var i=0;i<$scope.adminApps.length;i++){                     \r
-                               if($scope.adminApps[i].value==newVal){\r
-                                       $scope.selectedApplication=angular.copy($scope.adminApps[i]);;\r
-                               }\r
-                       }\r
-               });\r
-\r
-               // Invoked when user picks an app on the drop-down.\r
-               $scope.appSelected = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::appSelected: selectedApplication.id is ' + $scope.selectedApplication.id);\r
-                       this.appSelected = true;\r
-               }\r
-               \r
-               // Caches the file name supplied by the event handler.\r
-               $scope.fileChangeHandler = (event, files) => {\r
-                       this.fileSelected = true;\r
-                       this.fileToRead = files[0];\r
-                       if (debug)\r
-                               $log.debug("BulkUserModalCtrl::fileChangeHandler: file is ", this.fileToRead);\r
-               }; // file change handler\r
-               \r
-               /**\r
-                * Reads the contents of the file, calls portal endpoints\r
-                * to validate roles, userIds and existing role assignments;\r
-                * ultimately builds array of requests to be sent.\r
-                * Creates scope variable with input file contents for\r
-                * communication with functions.\r
-                * \r
-                * This function performs a synchronous step-by-step process\r
-                * using asynchronous promises. The code could all be inline\r
-                * here but the nesting becomes unwieldy.\r
-                */\r
-               $scope.readValidateFile = () => {\r
-                       $scope.isProcessing = true;\r
-                       $scope.progressMsg = 'Reading upload file..';\r
-                       var reader = new FileReader();\r
-                       reader.onload = function(event) {\r
-                               $scope.uploadFile = $filter('csvToObj')(reader.result);\r
-                               if (debug)\r
-                                       $log.debug('BulkUserModalCtrl::readValidateFile onload: data length is ' + $scope.uploadFile.length);\r
-                               // sort input by orgUserId\r
-                               $scope.uploadFile.sort(getSortOrder('orgUserId', true));\r
-                               \r
-                               let appid = $scope.selectedApplication.id;\r
-                               $scope.progressMsg = 'Fetching application roles..';\r
-                    functionalMenuService.getManagedRolesMenu(appid).then(function (rolesObj) {\r
-                       if (debug)\r
-                               $log.debug("BulkUserModalCtrl::readValidateFile: managedRolesMenu returned " + JSON.stringify(rolesObj));\r
-                                       appRolesResult = rolesObj;\r
-                                       $scope.progressMsg = 'Validating application roles..';\r
-                       $scope.verifyRoles();\r
-                               \r
-                       let userPromises = $scope.buildUserChecks();\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::readValidateFile: userPromises length is ' + userPromises.length);\r
-                       $scope.progressMsg = 'Validating Org Users..';\r
-                       $q.all(userPromises).then(function() {\r
-                               if (debug)\r
-                                       $log.debug('BulkUserModalCtrl::readValidateFile: userCheckResult length is ' + userCheckResult.length);\r
-                               $scope.evalUserCheckResults();\r
-                                       \r
-                               let appPromises = $scope.buildAppRoleChecks();\r
-                               if (debug)\r
-                                       $log.debug('BulkUserModalCtrl::readValidateFile: appPromises length is ' + appPromises.length);\r
-                               $scope.progressMsg = 'Querying application for user roles..';\r
-                               $q.all(appPromises).then( function() {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::readValidateFile: appUserRolesRequest length is ' + appUserRolesRequest.length);\r
-                                       $scope.evalAppRoleCheckResults();\r
-                                       \r
-                                                       // Re sort by line for the confirmation dialog\r
-                                                       $scope.uploadFile.sort(getSortOrder('line', false));\r
-                                                       // We're done, confirm box may show the table\r
-                                                       if (debug)\r
-                                                               $log.debug('BulkUserModalCtrl::readValidateFile inner-then ends');\r
-                                                       $scope.progressMsg = 'Done.';\r
-                                                       $scope.isProcessing = false;\r
-                               },\r
-                               function(error) {\r
-                                       $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving user-app roles');\r
-                                                       $scope.isProcessing = false;\r
-                               }\r
-                               ); // then of app promises\r
-                       },\r
-                       function(error) {\r
-                               $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving user info');\r
-                               $scope.isProcessing = false;\r
-                       }\r
-                       ); // then of user promises\r
-                    },\r
-                    function(error) {\r
-                       $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving app role info');\r
-                       $scope.isProcessing = false;\r
-                    }\r
-                    ); // then of role promise\r
-           \r
-                       } // onload\r
-                       \r
-                       // Invoke the reader on the selected file\r
-                       reader.readAsText(this.fileToRead);\r
-               }; \r
-               \r
-               /**\r
-                * Evaluates the result set returned by the app role service.\r
-                * Sets an uploadFile array element status if a role is not defined.\r
-                * Reads and writes scope variable uploadFile.\r
-                * Reads closure variable appRolesResult.\r
-                */\r
-               $scope.verifyRoles = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::verifyRoles: appRoles is ' + JSON.stringify(appRolesResult));\r
-                       // check roles in upload file against defined app roles\r
-                       $scope.uploadFile.forEach( function (uploadRow) {\r
-                               // skip rows that already have a defined status: headers etc.\r
-                               if (uploadRow.status) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::verifyRoles: skip row ' + uploadRow.line);\r
-                                       return;\r
-                               }\r
-                               uploadRow.role = uploadRow.role.trim();\r
-                               var foundRole=false;\r
-                               for (var i=0; i < appRolesResult.length; i++) {\r
-                                       if (uploadRow.role.toUpperCase() === appRolesResult[i].rolename.trim().toUpperCase()) {\r
-                                               if (debug)\r
-                                                       $log.debug('BulkUserModalCtrl::verifyRoles: match on role ' + uploadRow.role);\r
-                                               foundRole=true;\r
-                                               break;\r
-                                       }\r
-                               };\r
-                               if (!foundRole) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::verifyRoles: NO match on role ' + uploadRow.role);\r
-                                       uploadRow.status = 'Invalid role';\r
-                               };\r
-                       }); // foreach\r
-               }; // verifyRoles\r
-               \r
-               /**\r
-                * Builds and returns an array of promises to invoke the \r
-                * searchUsers service for each unique Org User UID in the input.\r
-                * Reads and writes scope variable uploadFile, which must be sorted by Org User UID.\r
-                * The promise function writes to closure variable userCheckResult\r
-                */\r
-               $scope.buildUserChecks = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::buildUserChecks: uploadFile length is ' + $scope.uploadFile.length);\r
-                       userCheckResult = [];\r
-                       let promises = [];\r
-                       let prevRow = null;\r
-                       $scope.uploadFile.forEach(function (uploadRow) {\r
-                               if (uploadRow.status) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::buildUserChecks: skip row ' + uploadRow.line);\r
-                                       return;\r
-                               };\r
-                               // detect repeated UIDs\r
-                               if (prevRow == null || prevRow.orgUserId.toLowerCase() !== uploadRow.orgUserId.toLowerCase()) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::buildUserChecks: create request for orgUserId ' + uploadRow.orgUserId);\r
-                                       let userPromise = usersService.searchUsers(uploadRow.orgUserId).promise().then( (usersList) => {\r
-                                               if (typeof usersList[0] !== "undefined") {\r
-                                                       userCheckResult.push({ \r
-                                                               orgUserId:    usersList[0].orgUserId,\r
-                                                               firstName: usersList[0].firstName,\r
-                                                               lastName:  usersList[0].lastName,\r
-                                                               jobTitle:  usersList[0].jobTitle\r
-                                                       });\r
-                                               }\r
-                                               else {\r
-                                                       // User not found.\r
-                                                       if (debug)\r
-                                                               $log.debug('BulkUserModalCtrl::buildUserChecks: searchUsers returned null');\r
-                                               }\r
-                                       }, function(error){\r
-                                               $log.error('BulkUserModalCtrl::buildUserChecks: searchUsers failed ' + JSON.stringify(error));\r
-                                       }); \r
-                                       promises.push(userPromise);\r
-                               }\r
-                               else {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::buildUserChecks: skip repeated orgUserId ' + uploadRow.orgUserId);                                       \r
-                               }\r
-                               prevRow = uploadRow;\r
-                       }); // foreach\r
-                       return promises;\r
-               }; // buildUserChecks\r
-               \r
-               /**\r
-                * Evaluates the result set returned by the user service to set\r
-                * the uploadFile array element status if the user was not found.\r
-                * Reads and writes scope variable uploadFile.\r
-                * Reads closure variable userCheckResult.\r
-                */\r
-               $scope.evalUserCheckResults = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::evalUserCheckResult: uploadFile length is ' + $scope.uploadFile.length);\r
-                       $scope.uploadFile.forEach(function (uploadRow) {\r
-                               if (uploadRow.status) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::evalUserCheckResults: skip row ' + uploadRow.line);\r
-                                       return;\r
-                               };\r
-                               let foundorgUserId = false;\r
-                               userCheckResult.forEach(function(userItem) {\r
-                                       if (uploadRow.orgUserId.toLowerCase() === userItem.orgUserId.toLowerCase()) {\r
-                                               if (debug)\r
-                                                       $log.debug('BulkUserModalCtrl::evalUserCheckResults: found orgUserId ' + uploadRow.orgUserId);\r
-                                               foundorgUserId=true;\r
-                                       };\r
-                               });\r
-                               if (!foundorgUserId) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::evalUserCheckResults: NO match on orgUserId ' + uploadRow.orgUserId);\r
-                                       uploadRow.status = 'Invalid orgUserId';\r
-                               }\r
-                       }); // foreach\r
-               }; // evalUserCheckResults\r
-\r
-            /**\r
-                * Builds and returns an array of promises to invoke the getUserAppRoles\r
-                * service for each unique Org User in the input file.\r
-                * Each promise creates an update to be sent to the remote application\r
-                * with all role names.\r
-                * Reads scope variable uploadFile, which must be sorted by Org User.\r
-                * The promise function writes to closure variable appUserRolesRequest\r
-                */\r
-               $scope.buildAppRoleChecks = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::buildAppRoleChecks: uploadFile length is ' + $scope.uploadFile.length); \r
-                       appUserRolesRequest = [];\r
-                       let appId = $scope.selectedApplication.id;\r
-                       let promises = [];\r
-                       let prevRow = null;\r
-                       $scope.uploadFile.forEach( function (uploadRow) {\r
-                               if (uploadRow.status) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::buildAppRoleChecks: skip row ' + uploadRow.line);\r
-                                       return;\r
-                               }\r
-                               // Because the input is sorted, generate only one request for each Org User\r
-                               if (prevRow == null || prevRow.orgUserId.toLowerCase() !== uploadRow.orgUserId.toLowerCase()) {\r
-                                if (debug)\r
-                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: create request for orgUserId ' + uploadRow.orgUserId);\r
-                                let appPromise = usersService.getUserAppRoles(appId, uploadRow.orgUserId).promise().then( (userAppRolesResult) => {\r
-                                        // Reply for unknown user has all defined roles with isApplied=false on each.  \r
-                                        if (typeof userAppRolesResult[0] !== "undefined") {\r
-                                                if (debug)\r
-                                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: adding result ' \r
-                                                                        + JSON.stringify(userAppRolesResult));\r
-                                                appUserRolesRequest.push({\r
-                                                        orgUserId: uploadRow.orgUserId,\r
-                                                        userAppRoles: userAppRolesResult                                                        \r
-                                                });\r
-                                        } else {\r
-                                                $log.error('BulkUserModalCtrl::buildAppRoleChecks: getUserAppRoles returned ' + JSON.stringify(userAppRolesResult));\r
-                                        };\r
-                                }, function(error){\r
-                                        $log.error('BulkUserModalCtrl::buildAppRoleChecks: getUserAppRoles failed ', error);\r
-                                });\r
-                                promises.push(appPromise);\r
-                               } else {\r
-                                if (debug)\r
-                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: duplicate orgUserId, skip: '+ uploadRow.orgUserId);\r
-                        }\r
-                        prevRow = uploadRow;\r
-                }); // foreach\r
-                       return promises;\r
-               }; // buildAppRoleChecks\r
-               \r
-               /**\r
-                * Evaluates the result set returned by the app service and adjusts \r
-                * the list of updates to be sent to the remote application by setting\r
-                * isApplied=true for each role name found in the upload file.\r
-                * Reads and writes scope variable uploadFile.\r
-                * Reads closure variable appUserRolesRequest.\r
-                */\r
-               $scope.evalAppRoleCheckResults = () => {\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: uploadFile length is ' + $scope.uploadFile.length);\r
-                       $scope.uploadFile.forEach(function (uploadRow) {\r
-                               if (uploadRow.status) {\r
-                                       if (debug)\r
-                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: skip row ' + uploadRow.line);\r
-                                       return;\r
-                               }\r
-                               // Search for the match in the app-user-roles array\r
-                               appUserRolesRequest.forEach( function (appUserRoleObj) {\r
-                                       if (uploadRow.orgUserId.toLowerCase() === appUserRoleObj.orgUserId.toLowerCase()) {\r
-                                               if (debug)\r
-                                                       $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: match on orgUserId ' + uploadRow.orgUserId);\r
-                                               let roles = appUserRoleObj.userAppRoles;\r
-                                               roles.forEach(function (appRoleItem) {\r
-                                                       //if (debug)\r
-                                                       //      $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: checking uploadRow.role='\r
-                                                       //                      + uploadRow.role + ', appRoleItem.roleName= ' + appRoleItem.roleName);\r
-                                                       if (uploadRow.role === appRoleItem.roleName) {\r
-                                                               if (appRoleItem.isApplied) {\r
-                                                                       if (debug)\r
-                                                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: existing role ' \r
-                                                                                       + appRoleItem.roleName);\r
-                                                                       uploadRow.status = 'Role exists';\r
-                                                               }\r
-                                                               else {\r
-                                                                       if (debug)\r
-                                                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: new role ' \r
-                                                                                       + appRoleItem.roleName);\r
-                                                                       // After much back-and-forth I decided a clear indicator\r
-                                                                       // is better than blank in the table status column.\r
-                                                                       uploadRow.status = 'OK';\r
-                                                                       appRoleItem.isApplied = true;\r
-                                                               }\r
-                                                               // This count is not especially interesting.\r
-                                                               // numberUserRolesSucceeded++;\r
-                                                       }\r
-                                               }); // for each role\r
-                                       }\r
-                               }); // for each result          \r
-                       }); // for each row\r
-               }; // evalAppRoleCheckResults\r
-             \r
-               /**\r
-                * Sends requests to Portal requesting user role assignment.\r
-                * That endpoint handles creation of the user at the remote app if necessary.\r
-                * Reads closure variable appUserRolesRequest.\r
-                * Invoked by the Next button on the confirmation dialog.\r
-                */\r
-               $scope.updateDB = () => {\r
-                       $scope.isProcessing = true;\r
-                       $scope.progressMsg = 'Sending requests to application..';\r
-                       if (debug)\r
-                               $log.debug('BulkUserModalCtrl::updateDB: request length is ' + appUserRolesRequest.length);\r
-                       var numberUsersSucceeded = 0;\r
-                       let promises = [];\r
-                       appUserRolesRequest.forEach(function(appUserRoleObj) {\r
-                               if (debug) \r
-                                       $log.debug('BulkUserModalCtrl::updateDB: appUserRoleObj is ' + JSON.stringify(appUserRoleObj));\r
-                     let updateRequest = {\r
-                                orgUserId: appUserRoleObj.orgUserId, \r
-                                appId: $scope.selectedApplication.id, \r
-                                appRoles: appUserRoleObj.userAppRoles\r
-                     };\r
-                     if (debug)\r
-                        $log.debug('BulkUserModalCtrl::updateDB: updateRequest is ' + JSON.stringify(updateRequest));\r
-                     let updatePromise = usersService.updateUserAppRoles(updateRequest).promise().then(res => {\r
-                        if (debug)\r
-                                $log.debug('BulkUserModalCtrl::updateDB: updated successfully: ' + JSON.stringify(res));\r
-                        numberUsersSucceeded++;\r
-                     }).catch(err => {\r
-                        // What to do if one of many fails??\r
-                        $log.error('BulkUserModalCtrl::updateDB failed: ', err);\r
-                        confirmBoxService.showInformation(\r
-                                        'Failed to update the user application roles. ' +\r
-                                        'Error: ' + err.status).then(isConfirmed => { });\r
-                     }).finally( () => {\r
-                        // $log.debug('BulkUserModalCtrl::updateDB: finally()');\r
-                     });\r
-                     promises.push(updatePromise);\r
-                }); // for each\r
-                       \r
-                // Run all the promises\r
-                $q.all(promises).then(function(){\r
-                        $scope.isProcessing = false;\r
-                        confirmBoxService.showInformation('Processed ' + numberUsersSucceeded + ' users.').then(isConfirmed => {\r
-                                // Close the upload-confirm dialog\r
-                                ngDialog.close();\r
-                        });\r
-                });\r
-             }; // updateDb\r
-             \r
-               // Sets the variable that hides/reveals the user controls\r
-               $scope.step2 = () => {\r
-                       this.fileSelected = false;\r
-                       $scope.selectedFile = null;\r
-                       $scope.fileModel = null;\r
-                       this.step1 = false;                     \r
-               }\r
-               \r
-             // Navigate between dialog screens using step number: 1,2,...\r
-             $scope.navigateBack = () => {\r
-                this.step1 = true;\r
-                 this.fileSelected = false;\r
-             };\r
-             \r
-             // Opens a dialog to show the data to be uploaded.\r
-             // Invoked by the upload button on the bulk user dialog.\r
-             $scope.confirmUpload = () => {\r
-               // Start the process\r
-               $scope.readValidateFile();\r
-               // Dialog shows progress\r
-               ngDialog.open({\r
-                       templateUrl: 'app/views/users/new-user-dialogs/bulk-user.confirm.html',\r
-                       scope: $scope\r
-               });\r
-             };\r
-\r
-             // Invoked by the Cancel button on the confirmation dialog.\r
-             $scope.cancelUpload = () => {\r
-                ngDialog.close();\r
-             };\r
-             \r
-             init();\r
-       } // constructor\r
-    } // class\r
-    BulkUserModalCtrl.$inject = ['$scope', '$log', '$filter', '$q', 'usersService', 'applicationsService', 'confirmBoxService', 'functionalMenuService', 'ngDialog'];    \r
-    angular.module('ecompApp').controller('BulkUserModalCtrl', BulkUserModalCtrl);\r
-\r
-    angular.module('ecompApp').directive('fileChange', ['$parse', function($parse){\r
-       return {\r
-               require: 'ngModel',\r
-           restrict: 'A',\r
-           link : function($scope, element, attrs, ngModel) {\r
-               var attrHandler = $parse(attrs['fileChange']);\r
-               var handler=function(e) {\r
-                       $scope.$apply(function() {\r
-                               attrHandler($scope, { $event:e, files:e.target.files } );\r
-                               $scope.selectedFile = e.target.files[0].name;\r
-                       });\r
-               };\r
-               element[0].addEventListener('change',handler,false);\r
-          }\r
-       }\r
-    }]);\r
-\r
-    angular.module('ecompApp').filter('csvToObj',function() {\r
-       return function(input) {\r
-           var result = [];\r
-           var len, i, line, o;\r
-               var lines = input.split('\n');\r
-           // Need 1-based index below\r
-           for (len = lines.length, i = 1; i <= len; ++i) {\r
-               // Use 0-based index for array\r
-               line = lines[i - 1].trim();\r
-                       if (line.length == 0) {\r
-                               // console.log("Skipping blank line");\r
-                               result.push({\r
-                                       line: i,\r
-                                       orgUserId: '',\r
-                                       role: '',\r
-                                       status: 'Blank line'\r
-                               });\r
-                               continue;\r
-                       }\r
-                       o = line.split(',');\r
-                       if (o.length !== 2) {\r
-                               // other lengths not valid for upload\r
-                               result.push({\r
-                                       line: i,\r
-                                       orgUserId: line,   \r
-                                       role: '',\r
-                                       status: 'Failed to find 2 comma-separated values'\r
-                               });\r
-                       }\r
-                       else {\r
-                               // console.log("Valid line: ", val);\r
-                               let entry = {\r
-                                               line: i,\r
-                                               orgUserId: o[0],\r
-                                               role: o[1]\r
-                                               // leave status undefined, this could be valid.\r
-                               };\r
-                               if (o[0].toLowerCase() === 'orgUserId') {\r
-                                       // not valid for upload, so set status\r
-                                       entry.status = 'Header';\r
-                               }\r
-                               else if (o[0].trim() == '' || o[1].trim() == '') {\r
-                                       // defend against line with only a single comma etc.\r
-                                       entry.status = 'Failed to find 2 non-empty values';                                     \r
-                               }\r
-                               result.push(entry);\r
-                       } // len 2\r
-           } // for\r
-           return result;\r
-       };\r
-    });\r
-    \r
-  \r
-        \r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * bulk user upload controller
+ */
+'use strict';
+(function () {
+    class BulkUserModalCtrl {
+       constructor($scope, $log, $filter, $q, usersService, applicationsService, confirmBoxService, functionalMenuService, ngDialog) {
+               
+               // Set to true for copious console output
+               var debug = false;
+               // Roles fetched from app service
+               var appRolesResult = [];
+               // Users fetched from user service
+               var     userCheckResult = [];
+               // Requests for user-role assignment built by validator
+               var appUserRolesRequest = [];
+               
+               let init = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::init');
+                       // Angular insists on this.
+                       $scope.fileModel = {};
+                       // Model for drop-down
+                       $scope.adminApps = [];
+                       // Enable modal controls
+                       this.step1 = true;
+                       this.fileSelected = false;
+
+                       // Flag that indicates background work is proceeding
+                       $scope.isProcessing = true;
+
+                       // Load user's admin applications
+                       applicationsService.getAdminApps().promise().then(apps => {
+                               if (debug)
+                                       $log.debug('BulkUserModalCtrl::init: getAdminApps returned' + JSON.stringify(apps));
+                    if (!apps || typeof(apps) != 'object') {
+                        $log.error('BulkUserModalCtrl::init: getAdminApps returned unexpected data');
+                    }
+                    else {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::init:  admin apps length is ', apps.length);
+                       
+                       // Sort app names and populate the drop-down model
+                        let sortedApps = apps.sort(getSortOrder('name', true));
+                        for (let i = 0; i < sortedApps.length; ++i) {
+                            $scope.adminApps.push({
+                                index: i,
+                                id: sortedApps[i].id,
+                                value: sortedApps[i].name,
+                                title: sortedApps[i].name
+                            });
+                        }
+                        // Pick the first one in the list
+                        $scope.selectedApplication = $scope.adminApps[0];
+                    }
+                               $scope.isProcessing = false;
+                }).catch(err => {
+                    $log.error('BulkUserModalCtrl::init: getAdminApps threw', err);
+                       $scope.isProcessing = false;
+                });
+                       
+               }; // init
+               
+               // Answers a function that compares properties with the specified name.
+               let getSortOrder = (prop, foldCase) => {
+                return function(a, b) {
+                       let aProp = foldCase ? a[prop].toLowerCase() : a[prop];
+                       let bProp = foldCase ? b[prop].toLowerCase() : b[prop];
+                    if (aProp > bProp)
+                        return 1;
+                    else if (aProp < bProp) 
+                        return -1;
+                    else
+                       return 0;
+                }
+            }
+               
+               //This is a fix for dropdown selection, due to b2b dropdown only update value field
+               $scope.$watch('selectedApplication.value', (newVal, oldVal) => {
+                       for(var i=0;i<$scope.adminApps.length;i++){                     
+                               if($scope.adminApps[i].value==newVal){
+                                       $scope.selectedApplication=angular.copy($scope.adminApps[i]);;
+                               }
+                       }
+               });
+
+               // Invoked when user picks an app on the drop-down.
+               $scope.appSelected = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::appSelected: selectedApplication.id is ' + $scope.selectedApplication.id);
+                       this.appSelected = true;
+               }
+               
+               // Caches the file name supplied by the event handler.
+               $scope.fileChangeHandler = (event, files) => {
+                       this.fileSelected = true;
+                       this.fileToRead = files[0];
+                       if (debug)
+                               $log.debug("BulkUserModalCtrl::fileChangeHandler: file is ", this.fileToRead);
+               }; // file change handler
+               
+               /**
+                * Reads the contents of the file, calls portal endpoints
+                * to validate roles, userIds and existing role assignments;
+                * ultimately builds array of requests to be sent.
+                * Creates scope variable with input file contents for
+                * communication with functions.
+                * 
+                * This function performs a synchronous step-by-step process
+                * using asynchronous promises. The code could all be inline
+                * here but the nesting becomes unwieldy.
+                */
+               $scope.readValidateFile = () => {
+                       $scope.isProcessing = true;
+                       $scope.progressMsg = 'Reading upload file..';
+                       var reader = new FileReader();
+                       reader.onload = function(event) {
+                               $scope.uploadFile = $filter('csvToObj')(reader.result);
+                               if (debug)
+                                       $log.debug('BulkUserModalCtrl::readValidateFile onload: data length is ' + $scope.uploadFile.length);
+                               // sort input by orgUserId
+                               $scope.uploadFile.sort(getSortOrder('orgUserId', true));
+                               
+                               let appid = $scope.selectedApplication.id;
+                               $scope.progressMsg = 'Fetching application roles..';
+                    functionalMenuService.getManagedRolesMenu(appid).then(function (rolesObj) {
+                       if (debug)
+                               $log.debug("BulkUserModalCtrl::readValidateFile: managedRolesMenu returned " + JSON.stringify(rolesObj));
+                                       appRolesResult = rolesObj;
+                                       $scope.progressMsg = 'Validating application roles..';
+                       $scope.verifyRoles();
+                               
+                       let userPromises = $scope.buildUserChecks();
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::readValidateFile: userPromises length is ' + userPromises.length);
+                       $scope.progressMsg = 'Validating Org Users..';
+                       $q.all(userPromises).then(function() {
+                               if (debug)
+                                       $log.debug('BulkUserModalCtrl::readValidateFile: userCheckResult length is ' + userCheckResult.length);
+                               $scope.evalUserCheckResults();
+                                       
+                               let appPromises = $scope.buildAppRoleChecks();
+                               if (debug)
+                                       $log.debug('BulkUserModalCtrl::readValidateFile: appPromises length is ' + appPromises.length);
+                               $scope.progressMsg = 'Querying application for user roles..';
+                               $q.all(appPromises).then( function() {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::readValidateFile: appUserRolesRequest length is ' + appUserRolesRequest.length);
+                                       $scope.evalAppRoleCheckResults();
+                                       
+                                                       // Re sort by line for the confirmation dialog
+                                                       $scope.uploadFile.sort(getSortOrder('line', false));
+                                                       // We're done, confirm box may show the table
+                                                       if (debug)
+                                                               $log.debug('BulkUserModalCtrl::readValidateFile inner-then ends');
+                                                       $scope.progressMsg = 'Done.';
+                                                       $scope.isProcessing = false;
+                               },
+                               function(error) {
+                                       $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving user-app roles');
+                                                       $scope.isProcessing = false;
+                               }
+                               ); // then of app promises
+                       },
+                       function(error) {
+                               $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving user info');
+                               $scope.isProcessing = false;
+                       }
+                       ); // then of user promises
+                    },
+                    function(error) {
+                       $log.error('BulkUserModalCtrl::readValidateFile: failed retrieving app role info');
+                       $scope.isProcessing = false;
+                    }
+                    ); // then of role promise
+           
+                       } // onload
+                       
+                       // Invoke the reader on the selected file
+                       reader.readAsText(this.fileToRead);
+               }; 
+               
+               /**
+                * Evaluates the result set returned by the app role service.
+                * Sets an uploadFile array element status if a role is not defined.
+                * Reads and writes scope variable uploadFile.
+                * Reads closure variable appRolesResult.
+                */
+               $scope.verifyRoles = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::verifyRoles: appRoles is ' + JSON.stringify(appRolesResult));
+                       // check roles in upload file against defined app roles
+                       $scope.uploadFile.forEach( function (uploadRow) {
+                               // skip rows that already have a defined status: headers etc.
+                               if (uploadRow.status) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::verifyRoles: skip row ' + uploadRow.line);
+                                       return;
+                               }
+                               uploadRow.role = uploadRow.role.trim();
+                               var foundRole=false;
+                               for (var i=0; i < appRolesResult.length; i++) {
+                                       if (uploadRow.role.toUpperCase() === appRolesResult[i].rolename.trim().toUpperCase()) {
+                                               if (debug)
+                                                       $log.debug('BulkUserModalCtrl::verifyRoles: match on role ' + uploadRow.role);
+                                               foundRole=true;
+                                               break;
+                                       }
+                               };
+                               if (!foundRole) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::verifyRoles: NO match on role ' + uploadRow.role);
+                                       uploadRow.status = 'Invalid role';
+                               };
+                       }); // foreach
+               }; // verifyRoles
+               
+               /**
+                * Builds and returns an array of promises to invoke the 
+                * searchUsers service for each unique Org User UID in the input.
+                * Reads and writes scope variable uploadFile, which must be sorted by Org User UID.
+                * The promise function writes to closure variable userCheckResult
+                */
+               $scope.buildUserChecks = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::buildUserChecks: uploadFile length is ' + $scope.uploadFile.length);
+                       userCheckResult = [];
+                       let promises = [];
+                       let prevRow = null;
+                       $scope.uploadFile.forEach(function (uploadRow) {
+                               if (uploadRow.status) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::buildUserChecks: skip row ' + uploadRow.line);
+                                       return;
+                               };
+                               // detect repeated UIDs
+                               if (prevRow == null || prevRow.orgUserId.toLowerCase() !== uploadRow.orgUserId.toLowerCase()) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::buildUserChecks: create request for orgUserId ' + uploadRow.orgUserId);
+                                       let userPromise = usersService.searchUsers(uploadRow.orgUserId).promise().then( (usersList) => {
+                                               if (typeof usersList[0] !== "undefined") {
+                                                       userCheckResult.push({ 
+                                                               orgUserId:    usersList[0].orgUserId,
+                                                               firstName: usersList[0].firstName,
+                                                               lastName:  usersList[0].lastName,
+                                                               jobTitle:  usersList[0].jobTitle
+                                                       });
+                                               }
+                                               else {
+                                                       // User not found.
+                                                       if (debug)
+                                                               $log.debug('BulkUserModalCtrl::buildUserChecks: searchUsers returned null');
+                                               }
+                                       }, function(error){
+                                               $log.error('BulkUserModalCtrl::buildUserChecks: searchUsers failed ' + JSON.stringify(error));
+                                       }); 
+                                       promises.push(userPromise);
+                               }
+                               else {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::buildUserChecks: skip repeated orgUserId ' + uploadRow.orgUserId);                                       
+                               }
+                               prevRow = uploadRow;
+                       }); // foreach
+                       return promises;
+               }; // buildUserChecks
+               
+               /**
+                * Evaluates the result set returned by the user service to set
+                * the uploadFile array element status if the user was not found.
+                * Reads and writes scope variable uploadFile.
+                * Reads closure variable userCheckResult.
+                */
+               $scope.evalUserCheckResults = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::evalUserCheckResult: uploadFile length is ' + $scope.uploadFile.length);
+                       $scope.uploadFile.forEach(function (uploadRow) {
+                               if (uploadRow.status) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::evalUserCheckResults: skip row ' + uploadRow.line);
+                                       return;
+                               };
+                               let foundorgUserId = false;
+                               userCheckResult.forEach(function(userItem) {
+                                       if (uploadRow.orgUserId.toLowerCase() === userItem.orgUserId.toLowerCase()) {
+                                               if (debug)
+                                                       $log.debug('BulkUserModalCtrl::evalUserCheckResults: found orgUserId ' + uploadRow.orgUserId);
+                                               foundorgUserId=true;
+                                       };
+                               });
+                               if (!foundorgUserId) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::evalUserCheckResults: NO match on orgUserId ' + uploadRow.orgUserId);
+                                       uploadRow.status = 'Invalid orgUserId';
+                               }
+                       }); // foreach
+               }; // evalUserCheckResults
+
+            /**
+                * Builds and returns an array of promises to invoke the getUserAppRoles
+                * service for each unique Org User in the input file.
+                * Each promise creates an update to be sent to the remote application
+                * with all role names.
+                * Reads scope variable uploadFile, which must be sorted by Org User.
+                * The promise function writes to closure variable appUserRolesRequest
+                */
+               $scope.buildAppRoleChecks = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::buildAppRoleChecks: uploadFile length is ' + $scope.uploadFile.length); 
+                       appUserRolesRequest = [];
+                       let appId = $scope.selectedApplication.id;
+                       let promises = [];
+                       let prevRow = null;
+                       $scope.uploadFile.forEach( function (uploadRow) {
+                               if (uploadRow.status) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::buildAppRoleChecks: skip row ' + uploadRow.line);
+                                       return;
+                               }
+                               // Because the input is sorted, generate only one request for each Org User
+                               if (prevRow == null || prevRow.orgUserId.toLowerCase() !== uploadRow.orgUserId.toLowerCase()) {
+                                if (debug)
+                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: create request for orgUserId ' + uploadRow.orgUserId);
+                                let appPromise = usersService.getUserAppRoles(appId, uploadRow.orgUserId).promise().then( (userAppRolesResult) => {
+                                        // Reply for unknown user has all defined roles with isApplied=false on each.  
+                                        if (typeof userAppRolesResult[0] !== "undefined") {
+                                                if (debug)
+                                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: adding result ' 
+                                                                        + JSON.stringify(userAppRolesResult));
+                                                appUserRolesRequest.push({
+                                                        orgUserId: uploadRow.orgUserId,
+                                                        userAppRoles: userAppRolesResult                                                        
+                                                });
+                                        } else {
+                                                $log.error('BulkUserModalCtrl::buildAppRoleChecks: getUserAppRoles returned ' + JSON.stringify(userAppRolesResult));
+                                        };
+                                }, function(error){
+                                        $log.error('BulkUserModalCtrl::buildAppRoleChecks: getUserAppRoles failed ', error);
+                                });
+                                promises.push(appPromise);
+                               } else {
+                                if (debug)
+                                        $log.debug('BulkUserModalCtrl::buildAppRoleChecks: duplicate orgUserId, skip: '+ uploadRow.orgUserId);
+                        }
+                        prevRow = uploadRow;
+                }); // foreach
+                       return promises;
+               }; // buildAppRoleChecks
+               
+               /**
+                * Evaluates the result set returned by the app service and adjusts 
+                * the list of updates to be sent to the remote application by setting
+                * isApplied=true for each role name found in the upload file.
+                * Reads and writes scope variable uploadFile.
+                * Reads closure variable appUserRolesRequest.
+                */
+               $scope.evalAppRoleCheckResults = () => {
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: uploadFile length is ' + $scope.uploadFile.length);
+                       $scope.uploadFile.forEach(function (uploadRow) {
+                               if (uploadRow.status) {
+                                       if (debug)
+                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: skip row ' + uploadRow.line);
+                                       return;
+                               }
+                               // Search for the match in the app-user-roles array
+                               appUserRolesRequest.forEach( function (appUserRoleObj) {
+                                       if (uploadRow.orgUserId.toLowerCase() === appUserRoleObj.orgUserId.toLowerCase()) {
+                                               if (debug)
+                                                       $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: match on orgUserId ' + uploadRow.orgUserId);
+                                               let roles = appUserRoleObj.userAppRoles;
+                                               roles.forEach(function (appRoleItem) {
+                                                       //if (debug)
+                                                       //      $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: checking uploadRow.role='
+                                                       //                      + uploadRow.role + ', appRoleItem.roleName= ' + appRoleItem.roleName);
+                                                       if (uploadRow.role === appRoleItem.roleName) {
+                                                               if (appRoleItem.isApplied) {
+                                                                       if (debug)
+                                                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: existing role ' 
+                                                                                       + appRoleItem.roleName);
+                                                                       uploadRow.status = 'Role exists';
+                                                               }
+                                                               else {
+                                                                       if (debug)
+                                                                               $log.debug('BulkUserModalCtrl::evalAppRoleCheckResults: new role ' 
+                                                                                       + appRoleItem.roleName);
+                                                                       // After much back-and-forth I decided a clear indicator
+                                                                       // is better than blank in the table status column.
+                                                                       uploadRow.status = 'OK';
+                                                                       appRoleItem.isApplied = true;
+                                                               }
+                                                               // This count is not especially interesting.
+                                                               // numberUserRolesSucceeded++;
+                                                       }
+                                               }); // for each role
+                                       }
+                               }); // for each result          
+                       }); // for each row
+               }; // evalAppRoleCheckResults
+             
+               /**
+                * Sends requests to Portal requesting user role assignment.
+                * That endpoint handles creation of the user at the remote app if necessary.
+                * Reads closure variable appUserRolesRequest.
+                * Invoked by the Next button on the confirmation dialog.
+                */
+               $scope.updateDB = () => {
+                       $scope.isProcessing = true;
+                       $scope.progressMsg = 'Sending requests to application..';
+                       if (debug)
+                               $log.debug('BulkUserModalCtrl::updateDB: request length is ' + appUserRolesRequest.length);
+                       var numberUsersSucceeded = 0;
+                       let promises = [];
+                       appUserRolesRequest.forEach(function(appUserRoleObj) {
+                               if (debug) 
+                                       $log.debug('BulkUserModalCtrl::updateDB: appUserRoleObj is ' + JSON.stringify(appUserRoleObj));
+                     let updateRequest = {
+                                orgUserId: appUserRoleObj.orgUserId, 
+                                appId: $scope.selectedApplication.id, 
+                                appRoles: appUserRoleObj.userAppRoles
+                     };
+                     if (debug)
+                        $log.debug('BulkUserModalCtrl::updateDB: updateRequest is ' + JSON.stringify(updateRequest));
+                     let updatePromise = usersService.updateUserAppRoles(updateRequest).promise().then(res => {
+                        if (debug)
+                                $log.debug('BulkUserModalCtrl::updateDB: updated successfully: ' + JSON.stringify(res));
+                        numberUsersSucceeded++;
+                     }).catch(err => {
+                        // What to do if one of many fails??
+                        $log.error('BulkUserModalCtrl::updateDB failed: ', err);
+                        confirmBoxService.showInformation(
+                                        'Failed to update the user application roles. ' +
+                                        'Error: ' + err.status).then(isConfirmed => { });
+                     }).finally( () => {
+                        // $log.debug('BulkUserModalCtrl::updateDB: finally()');
+                     });
+                     promises.push(updatePromise);
+                }); // for each
+                       
+                // Run all the promises
+                $q.all(promises).then(function(){
+                        $scope.isProcessing = false;
+                        confirmBoxService.showInformation('Processed ' + numberUsersSucceeded + ' users.').then(isConfirmed => {
+                                // Close the upload-confirm dialog
+                                ngDialog.close();
+                        });
+                });
+             }; // updateDb
+             
+               // Sets the variable that hides/reveals the user controls
+               $scope.step2 = () => {
+                       this.fileSelected = false;
+                       $scope.selectedFile = null;
+                       $scope.fileModel = null;
+                       this.step1 = false;                     
+               }
+               
+             // Navigate between dialog screens using step number: 1,2,...
+             $scope.navigateBack = () => {
+                this.step1 = true;
+                 this.fileSelected = false;
+             };
+             
+             // Opens a dialog to show the data to be uploaded.
+             // Invoked by the upload button on the bulk user dialog.
+             $scope.confirmUpload = () => {
+               // Start the process
+               $scope.readValidateFile();
+               // Dialog shows progress
+               ngDialog.open({
+                       templateUrl: 'app/views/users/new-user-dialogs/bulk-user.confirm.html',
+                       scope: $scope
+               });
+             };
+
+             // Invoked by the Cancel button on the confirmation dialog.
+             $scope.cancelUpload = () => {
+                ngDialog.close();
+             };
+             
+             init();
+       } // constructor
+    } // class
+    BulkUserModalCtrl.$inject = ['$scope', '$log', '$filter', '$q', 'usersService', 'applicationsService', 'confirmBoxService', 'functionalMenuService', 'ngDialog'];    
+    angular.module('ecompApp').controller('BulkUserModalCtrl', BulkUserModalCtrl);
+
+    angular.module('ecompApp').directive('fileChange', ['$parse', function($parse){
+       return {
+               require: 'ngModel',
+           restrict: 'A',
+           link : function($scope, element, attrs, ngModel) {
+               var attrHandler = $parse(attrs['fileChange']);
+               var handler=function(e) {
+                       $scope.$apply(function() {
+                               attrHandler($scope, { $event:e, files:e.target.files } );
+                               $scope.selectedFile = e.target.files[0].name;
+                       });
+               };
+               element[0].addEventListener('change',handler,false);
+          }
+       }
+    }]);
+
+    angular.module('ecompApp').filter('csvToObj',function() {
+       return function(input) {
+           var result = [];
+           var len, i, line, o;
+               var lines = input.split('\n');
+           // Need 1-based index below
+           for (len = lines.length, i = 1; i <= len; ++i) {
+               // Use 0-based index for array
+               line = lines[i - 1].trim();
+                       if (line.length == 0) {
+                               // console.log("Skipping blank line");
+                               result.push({
+                                       line: i,
+                                       orgUserId: '',
+                                       role: '',
+                                       status: 'Blank line'
+                               });
+                               continue;
+                       }
+                       o = line.split(',');
+                       if (o.length !== 2) {
+                               // other lengths not valid for upload
+                               result.push({
+                                       line: i,
+                                       orgUserId: line,   
+                                       role: '',
+                                       status: 'Failed to find 2 comma-separated values'
+                               });
+                       }
+                       else {
+                               // console.log("Valid line: ", val);
+                               let entry = {
+                                               line: i,
+                                               orgUserId: o[0],
+                                               role: o[1]
+                                               // leave status undefined, this could be valid.
+                               };
+                               if (o[0].toLowerCase() === 'orgUserId') {
+                                       // not valid for upload, so set status
+                                       entry.status = 'Header';
+                               }
+                               else if (o[0].trim() == '' || o[1].trim() == '') {
+                                       // defend against line with only a single comma etc.
+                                       entry.status = 'Failed to find 2 non-empty values';                                     
+                               }
+                               result.push(entry);
+                       } // len 2
+           } // for
+           return result;
+       };
+    });
+    
+  
+        
+})();
index 3d479cb..7945e54 100644 (file)
@@ -1,70 +1,76 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="bulk-user-modal">\r
-       <div class="title">Bulk User Upload</div>\r
-       <div class="main">\r
-               <div ng-show="bulkUser.step1">\r
-                       <div class="upload-instructions">Select Application:</div>\r
-                       <div class="c-ecomp-portal-abs-select default">\r
-\r
-                             <select id="bulk-user-dropdown-apps" name="dropdown1" b2b-dropdown  ng-model="selectedApplication.value" ng-disabled="isProcessing" ng-class="{disabled: isProcessing}">  \r
-                                       <option b2b-dropdown-list option-repeat="d in adminApps" value="{{d.value}}">{{d.title}}</option>\r
-                                               </select>\r
-\r
-                       </div>\r
-               </div>\r
-\r
-               <div ng-hide="bulkUser.step1">\r
-                       <div class="upload-instructions">Select Upload File:</div>\r
-\r
-                       <!-- input type=file is difficult to style.\r
-                                Instead use a label styled as a button. -->\r
-                       <label class="file-label"> \r
-                               <input type="file"\r
-                                       file-change="fileChangeHandler($event,files)" \r
-                                       ng-model="fileModel" />\r
-                                       <span>Browse...</span>\r
-                       </label>{{selectedFile}}\r
-                       <div class="upload-instructions">File must have one entry per line with this format:\r
-                       <pre>orgUserId, role name</pre>\r
-                       </div>\r
-               </div>\r
-\r
-               <!-- progress indicator in middle -->\r
-               <div ng-show="isProcessing">\r
-                       <span class="ecomp-spinner"></span>\r
-               </div>\r
-\r
-               <div class="dialog-control">\r
-                               \r
-                               <button id="bulk-user-back-button" class="btn btn-alt btn-small"\r
-                               ng-hide="bulkUser.step1" ng-click="navigateBack()">Back</button>\r
-                       <button id="bulk-user-next-button" class="btn btn-alt btn-small"\r
-                               ng-hide="!bulkUser.step1" ng-click="!isProcessing && step2()"\r
-                               ng-class="{disabled: isProcessing}">Next</button>\r
-                       <button id="bulk-user-upload-button" class="btn btn-alt btn-small"\r
-                               ng-hide="bulkUser.step1"\r
-                               ng-click="bulkUser.fileSelected && confirmUpload()"\r
-                               ng-class="{disabled: !bulkUser.fileSelected}">Upload</button>\r
-                       <button id="bulk-user-cancel-button" class="btn btn-alt btn-small"\r
-                               ng-click="closeThisDialog()">Cancel</button>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="bulk-user-modal">
+       <div class="title">Bulk User Upload</div>
+       <div class="main">
+               <div ng-show="bulkUser.step1">
+                       <div class="upload-instructions">Select Application:</div>
+                       <div class="c-ecomp-portal-abs-select default">
+
+                             <select id="bulk-user-dropdown-apps" name="dropdown1" b2b-dropdown  ng-model="selectedApplication.value" ng-disabled="isProcessing" ng-class="{disabled: isProcessing}">  
+                                       <option b2b-dropdown-list option-repeat="d in adminApps" value="{{d.value}}">{{d.title}}</option>
+                                               </select>
+
+                       </div>
+               </div>
+
+               <div ng-hide="bulkUser.step1">
+                       <div class="upload-instructions">Select Upload File:</div>
+
+                       <!-- input type=file is difficult to style.
+                                Instead use a label styled as a button. -->
+                       <label class="file-label"> 
+                               <input type="file"
+                                       file-change="fileChangeHandler($event,files)" 
+                                       ng-model="fileModel" />
+                                       <span>Browse...</span>
+                       </label>{{selectedFile}}
+                       <div class="upload-instructions">File must have one entry per line with this format:
+                       <pre>orgUserId, role name</pre>
+                       </div>
+               </div>
+
+               <!-- progress indicator in middle -->
+               <div ng-show="isProcessing">
+                       <span class="ecomp-spinner"></span>
+               </div>
+
+               <div class="dialog-control">
+                               
+                               <button id="bulk-user-back-button" class="btn btn-alt btn-small"
+                               ng-hide="bulkUser.step1" ng-click="navigateBack()">Back</button>
+                       <button id="bulk-user-next-button" class="btn btn-alt btn-small"
+                               ng-hide="!bulkUser.step1" ng-click="!isProcessing && step2()"
+                               ng-class="{disabled: isProcessing}">Next</button>
+                       <button id="bulk-user-upload-button" class="btn btn-alt btn-small"
+                               ng-hide="bulkUser.step1"
+                               ng-click="bulkUser.fileSelected && confirmUpload()"
+                               ng-class="{disabled: !bulkUser.fileSelected}">Upload</button>
+                       <button id="bulk-user-cancel-button" class="btn btn-alt btn-small"
+                               ng-click="closeThisDialog()">Cancel</button>
+               </div>
+       </div>
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 882f1e8..6550a1e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/20/15.\r
- */\r
-'use strict';\r
-(function () {\r
-    class NewUserModalCtrl {\r
-        constructor($scope, $log, usersService, applicationsService, confirmBoxService) {\r
-            let init = () => {\r
-                //$log.info('NewUserModalCtrl::init');\r
-                this.isSaving = false;\r
-                this.anyChanges = false;\r
-                this.adminApps = [];\r
-                this.isGettingAdminApps = false;\r
-                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){\r
-                    this.selectedUser = $scope.ngDialogData.selectedUser;\r
-                    this.dialogState = $scope.ngDialogData.dialogState;\r
-                    this.isShowBack = false;\r
-                    if(this.dialogState === 3){\r
-                        this.getUserAppsRoles();\r
-                    }\r
-                }else{\r
-                    this.isShowBack = true;\r
-                    this.selectedUser = null;\r
-                    this.dialogState = 1;\r
-                }\r
-            };\r
-\r
-            this.appChanged = (index) => {\r
-                let myApp = this.adminApps[index];\r
-                //$log.debug('NewUserModalCtrl::appChanged: index: ', index, '; app id: ', myApp.id, 'app name: ',myApp.name);\r
-                myApp.isChanged = true;\r
-                this.anyChanges = true;\r
-            }\r
-\r
-            this.deleteApp = (app) => {\r
-                let appMessage = this.selectedUser.firstName + ' ' + this.selectedUser.lastName;\r
-                confirmBoxService.deleteItem(appMessage).then(isConfirmed => {\r
-                    if(isConfirmed){\r
-                        this.anyChanges = true;\r
-                        app.isChanged = true;\r
-                        app.isDeleted = true; // use this to hide the app in the display\r
-                        app.appRoles.forEach(function(role){\r
-                            role.isApplied = false;\r
-                        });\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('NewUserModalCtrl::deleteApp error: ',err);\r
-                    confirmBoxService.showInformation('There was a problem deleting the the applications. ' +\r
-                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});\r
-                });\r
-            };\r
-\r
-            this.getUserAppsRoles = () => {\r
-                if (!this.selectedUser || !this.selectedUser.orgUserId) {\r
-                    $log.error('NewUserModalCtrl::getUserAppsRoles error: No user is selected');\r
-                    this.dialogState = 1;\r
-                    return;\r
-                }\r
-                //$log.debug('NewUserModalCtrl::getUserAppsRoles: about to call getAdminAppsSimpler');\r
-                this.isGettingAdminApps = true;\r
-                applicationsService.getAdminAppsSimpler().then((apps) => {\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: beginning of then for getAdminAppsSimpler');\r
-                    this.isGettingAdminApps = false;\r
-                    if (!apps || !apps.length) {\r
-                        $log.error('NewUserModalCtrl::getUserAppsRoles error: no admin apps found');\r
-                        return null;\r
-                    }\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: then for getAdminAppsSimpler: step 2');\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: admin apps: ', apps);\r
-                    this.adminApps = apps;\r
-                    this.dialogState = 3;\r
-                    this.userAppRoles = {};\r
-                    this.numberAppsProcessed = 0;\r
-                    this.isLoading = true;\r
-                    apps.forEach(app => {\r
-                        //$log.debug('NewUserModalCtrl::getUserAppsRoles: app: id: ', app.id, 'name: ',app.name);\r
-                        // Keep track of which app has changed, so we know which apps to update using a BE API\r
-                        app.isChanged = false;\r
-                        // Each of these specifies a state, which corresponds to a different message and style that gets displayed\r
-                        app.isLoading = true;\r
-                        app.isError = false;\r
-                        app.isDeleted = false;\r
-                        app.printNoChanges = false;\r
-                        app.isUpdating = false;\r
-                        app.isErrorUpdating = false;\r
-                        app.isDoneUpdating = false;\r
-                        app.errorMessage = "";\r
-                        usersService.getUserAppRoles(app.id, this.selectedUser.orgUserId).promise().then((userAppRolesResult) => {\r
-                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: got a result for app: ',app.id,': ',app.name,': ',userAppRolesResult);\r
-                            app.appRoles = userAppRolesResult;\r
-                            app.isLoading = false;\r
-\r
-                        }).catch(err => {\r
-                            $log.error(err);\r
-                            app.isError = true;\r
-                            app.isLoading = false;\r
-                            app.errorMessage = err.headers('FEErrorString');\r
-                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: in new-user.controller: response header: '+err.headers('FEErrorString'));\r
-                        }).finally(()=>{\r
-                            this.numberAppsProcessed++;\r
-                            if (this.numberAppsProcessed === this.adminApps.length) {\r
-                                this.isLoading = false;\r
-                            }\r
-                        });\r
-                    })\r
-                    return;\r
-                }).catch(err => {\r
-                    $log.error(err);\r
-                })\r
-\r
-            }\r
-\r
-            /**\r
-             * Update the selected user apps with the new roles.\r
-             * If no roles remain, set the user to inactive.\r
-             */\r
-            this.updateUserAppsRoles = () => {\r
-                // $log.debug('NewUserModalCtrl::updateUserAppsRoles: entering updateUserAppsRoles');\r
-                if(!this.selectedUser || !this.selectedUser.orgUserId || !this.adminApps){\r
-                    $log.error('NewUserModalCtrl::updateUserAppsRoles: mmissing arguments');\r
-                    return;\r
-                }\r
-                this.isSaving = true;\r
-                //$log.debug('NewUserModalCtrl::updateUserAppsRoles: going to update user: ' + this.selectedUser.orgUserId);\r
-                this.numberAppsProcessed = 0;\r
-                this.numberAppsSucceeded = 0;\r
-                this.adminApps.forEach(app => {\r
-                    if (app.isChanged) {\r
-                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have changed; going to update: id: ', app.id, '; name: ', app.name);\r
-                        app.isUpdating = true;\r
-                        var newUserAppRoles = {\r
-                               orgUserId: this.selectedUser.orgUserId,\r
-                               appId: app.id, \r
-                               appRoles: app.appRoles,\r
-                               appName: app.name\r
-                        }; \r
-                        usersService.updateUserAppRoles(newUserAppRoles).promise()\r
-                        .then(res => {\r
-                            //$log.debug('NewUserModalCtrl::updateUserAppsRoles: User app roles updated successfully on app: ',app.id);\r
-                            app.isUpdating = false;\r
-                            app.isDoneUpdating = true;\r
-                            this.numberAppsSucceeded++;\r
-                        }).catch(err => {\r
-                            $log.error(err);\r
-                            app.isErrorUpdating = true;\r
-                            confirmBoxService.showInformation(\r
-                                       'Failed to update the user application roles: ' + err.status)\r
-                                       .then(isConfirmed => {});\r
-                        }).finally(()=>{\r
-                            this.numberAppsProcessed++;\r
-                            if (this.numberAppsProcessed === this.adminApps.length) {\r
-                                this.isSaving = false; // hide the spinner\r
-                            }\r
-                            if (this.numberAppsSucceeded === this.adminApps.length) {\r
-                                $scope.closeThisDialog(true);//close and resolve dialog promise with true (to update the table)\r
-                            }\r
-                        })\r
-                    } else {\r
-                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have NOT changed; NOT going to update: id: ', app.id, '; name: ', app.name);\r
-                        app.noChanges = true;\r
-                        app.isError = false; //remove the error message; just show the No Changes messages\r
-                        this.numberAppsProcessed++;\r
-                        this.numberAppsSucceeded++;\r
-                        if (this.numberAppsProcessed === this.adminApps.length) {\r
-                            this.isSaving = false; // hide the spinner\r
-                        }\r
-                        if (this.numberAppsSucceeded === this.adminApps.length) {\r
-                            $scope.closeThisDialog(true);//close and resolve dialog promise with true (to update the table)\r
-                        }\r
-                    }\r
-                });\r
-            };\r
-\r
-            /**\r
-             * Navigate between dialog screens using step number: 1,2,...\r
-             */\r
-            this.navigateBack = () => {\r
-                if (this.dialogState === 1) {\r
-                    //back from 1st screen?\r
-                }\r
-                if (this.dialogState === 3) {\r
-                    this.dialogState = 1;\r
-                }\r
-            };\r
-\r
-            init();\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                //**Nabil - note: this will cause the history back state to be replaced with current state\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    NewUserModalCtrl.$inject = ['$scope', '$log', 'usersService', 'applicationsService', 'confirmBoxService'];\r
-    angular.module('ecompApp').controller('NewUserModalCtrl', NewUserModalCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+(function () {
+    class NewUserModalCtrl {
+        constructor($scope, $log, usersService, applicationsService, confirmBoxService) {
+            var extRequestValue = false;
+            let init = () => {
+                //$log.info('NewUserModalCtrl::init');
+                this.isSaving = false;
+                this.anyChanges = false;
+                this.adminApps = [];
+                this.isGettingAdminApps = false;
+                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){
+                    this.selectedUser = $scope.ngDialogData.selectedUser;
+                    this.dialogState = $scope.ngDialogData.dialogState;
+                    this.isShowBack = false;
+                    if(this.dialogState === 3){
+                        this.getUserAppsRoles();
+                    }
+                }else{
+                    this.isShowBack = true;
+                    this.selectedUser = null;
+                    this.dialogState = 1;
+                }
+            };
+
+            this.appChanged = (index) => {
+                let myApp = this.adminApps[index];
+                //$log.debug('NewUserModalCtrl::appChanged: index: ', index, '; app id: ', myApp.id, 'app name: ',myApp.name);
+                myApp.isChanged = true;
+                this.anyChanges = true;
+            }
+
+            this.deleteApp = (app) => {
+                let appMessage = this.selectedUser.firstName + ' ' + this.selectedUser.lastName;
+                confirmBoxService.deleteItem(appMessage).then(isConfirmed => {
+                    if(isConfirmed){
+                        this.anyChanges = true;
+                        app.isChanged = true;
+                        app.isDeleted = true; // use this to hide the app in the display
+                        app.appRoles.forEach(function(role){
+                            role.isApplied = false;
+                        });
+                    }
+                }).catch(err => {
+                    $log.error('NewUserModalCtrl::deleteApp error: ',err);
+                    confirmBoxService.showInformation('There was a problem deleting the the applications. ' +
+                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});
+                });
+            };
+
+            this.getUserAppsRoles = () => {
+                if (!this.selectedUser || !this.selectedUser.orgUserId) {
+                    $log.error('NewUserModalCtrl::getUserAppsRoles error: No user is selected');
+                    this.dialogState = 1;
+                    return;
+                }
+                //$log.debug('NewUserModalCtrl::getUserAppsRoles: about to call getAdminAppsSimpler');
+                this.isGettingAdminApps = true;
+                applicationsService.getAdminAppsSimpler().then((apps) => {
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: beginning of then for getAdminAppsSimpler');
+                    this.isGettingAdminApps = false;
+                    if (!apps || !apps.length) {
+                        $log.error('NewUserModalCtrl::getUserAppsRoles error: no admin apps found');
+                        return null;
+                    }
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: then for getAdminAppsSimpler: step 2');
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: admin apps: ', apps);
+                    this.adminApps = apps;
+                    this.dialogState = 3;
+                    this.userAppRoles = {};
+                    this.numberAppsProcessed = 0;
+                    this.isLoading = true;
+                    apps.forEach(app => {
+                        //$log.debug('NewUserModalCtrl::getUserAppsRoles: app: id: ', app.id, 'name: ',app.name);
+                        // Keep track of which app has changed, so we know which apps to update using a BE API
+                        app.isChanged = false;
+                        // Each of these specifies a state, which corresponds to a different message and style that gets displayed
+                        app.isLoading = true;
+                        app.isError = false;
+                        app.isDeleted = false;
+                        app.printNoChanges = false;
+                        app.isUpdating = false;
+                        app.isErrorUpdating = false;
+                        app.isDoneUpdating = false;
+                        app.errorMessage = "";
+                        usersService.getUserAppRoles(app.id, this.selectedUser.orgUserId, extRequestValue).promise().then((userAppRolesResult) => {
+                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: got a result for app: ',app.id,': ',app.name,': ',userAppRolesResult);
+                            app.appRoles = userAppRolesResult;
+                            app.isLoading = false;
+
+                        }).catch(err => {
+                            $log.error(err);
+                            app.isError = true;
+                            app.isLoading = false;
+                            app.errorMessage = err.headers('FEErrorString');
+                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: in new-user.controller: response header: '+err.headers('FEErrorString'));
+                        }).finally(()=>{
+                            this.numberAppsProcessed++;
+                            if (this.numberAppsProcessed === this.adminApps.length) {
+                                this.isLoading = false;
+                            }
+                        });
+                    })
+                    return;
+                }).catch(err => {
+                    $log.error(err);
+                })
+
+            }
+
+            /**
+             * Update the selected user apps with the new roles.
+             * If no roles remain, set the user to inactive.
+             */
+            this.updateUserAppsRoles = () => {
+                // $log.debug('NewUserModalCtrl::updateUserAppsRoles: entering updateUserAppsRoles');
+                if(!this.selectedUser || !this.selectedUser.orgUserId || !this.adminApps){
+                    $log.error('NewUserModalCtrl::updateUserAppsRoles: mmissing arguments');
+                    return;
+                }
+                this.isSaving = true;
+                //$log.debug('NewUserModalCtrl::updateUserAppsRoles: going to update user: ' + this.selectedUser.orgUserId);
+                this.numberAppsProcessed = 0;
+                this.numberAppsSucceeded = 0;
+                this.adminApps.forEach(app => {
+                    if (app.isChanged) {
+                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have changed; going to update: id: ', app.id, '; name: ', app.name);
+                        app.isUpdating = true;
+                        var newUserAppRoles = {
+                               orgUserId: this.selectedUser.orgUserId,
+                               appId: app.id, 
+                               appRoles: app.appRoles,
+                               appName: app.name
+                        }; 
+                        usersService.updateUserAppRoles(newUserAppRoles).promise()
+                        .then(res => {
+                            //$log.debug('NewUserModalCtrl::updateUserAppsRoles: User app roles updated successfully on app: ',app.id);
+                            app.isUpdating = false;
+                            app.isDoneUpdating = true;
+                            this.numberAppsSucceeded++;
+                        }).catch(err => {
+                            $log.error(err);
+                            app.isErrorUpdating = true;
+                            confirmBoxService.showInformation(
+                                       'Failed to update the user application roles: ' + err.status)
+                                       .then(isConfirmed => {});
+                        }).finally(()=>{
+                            this.numberAppsProcessed++;
+                            if (this.numberAppsProcessed === this.adminApps.length) {
+                                this.isSaving = false; // hide the spinner
+                            }
+                            if (this.numberAppsSucceeded === this.adminApps.length) {
+                                $scope.closeThisDialog(true);//close and resolve dialog promise with true (to update the table)
+                            }
+                        })
+                    } else {
+                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have NOT changed; NOT going to update: id: ', app.id, '; name: ', app.name);
+                        app.noChanges = true;
+                        app.isError = false; //remove the error message; just show the No Changes messages
+                        this.numberAppsProcessed++;
+                        this.numberAppsSucceeded++;
+                        if (this.numberAppsProcessed === this.adminApps.length) {
+                            this.isSaving = false; // hide the spinner
+                        }
+                        if (this.numberAppsSucceeded === this.adminApps.length) {
+                            $scope.closeThisDialog(true);//close and resolve dialog promise with true (to update the table)
+                        }
+                    }
+                });
+            };
+
+            /**
+             * Navigate between dialog screens using step number: 1,2,...
+             */
+            this.navigateBack = () => {
+                if (this.dialogState === 1) {
+                    //back from 1st screen?
+                }
+                if (this.dialogState === 3) {
+                    this.dialogState = 1;
+                }
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                //**Nabil - note: this will cause the history back state to be replaced with current state
+                e.preventDefault();
+            });
+        }
+    }
+    NewUserModalCtrl.$inject = ['$scope', '$log', 'usersService', 'applicationsService', 'confirmBoxService'];
+    angular.module('ecompApp').controller('NewUserModalCtrl', NewUserModalCtrl);
+})();
index 8d5ac74..bdc2958 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/20/15.\r
- */\r
-'use strict';\r
-\r
-describe('Controller: NewUserModalCtrl ', () => {\r
-    beforeEach(module('testUtils'));\r
-    beforeEach(module('ecompApp'));\r
-\r
-        let promisesTestUtils;\r
-        //destroy $http default cache before starting to prevent the error 'default cache already exists'\r
-        //_promisesTestUtils_ comes from testUtils for promises resolve/reject\r
-        beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {\r
-            _CacheFactory_.destroyAll();\r
-            promisesTestUtils = _promisesTestUtils_;\r
-        }));\r
-\r
-        let newUser, $controller, $q, $rootScope, $log, $scope;\r
-\r
-        let applicationsServiceMock, usersServiceMock, confirmBoxServiceMock;\r
-        let deferredAdminApps, deferredUsersAccounts, deferredUsersAppRoles, deferredUsersAppRoleUpdate;\r
-\r
-        beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {\r
-            $rootScope = _$rootScope_;\r
-            $q = _$q_;\r
-            $controller = _$controller_;\r
-            $log = _$log_;\r
-        }));\r
-\r
-    beforeEach(()=> {\r
-            [deferredAdminApps, deferredUsersAccounts, deferredUsersAppRoles, deferredUsersAppRoleUpdate] = [$q.defer(),$q.defer(), $q.defer(), $q.defer()];\r
-\r
-            /*applicationsServiceMock = {\r
-                getAdminApps: () => {\r
-                    var promise = () => {return deferredAdminApps.promise};\r
-                    var cancel = jasmine.createSpy();\r
-                    return {\r
-                        promise: promise,\r
-                        cancel: cancel\r
-                    }\r
-                }\r
-            };*/\r
-\r
-            confirmBoxServiceMock = {\r
-                deleteItem: () => {\r
-                    var promise = () => {return deferredAdminApps.promise};\r
-                    var cancel = jasmine.createSpy();\r
-                    return {\r
-                        promise: promise,\r
-                        cancel: cancel\r
-                    }\r
-                }\r
-            };\r
-\r
-            applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock', ['getAdminAppsSimpler']);\r
-            applicationsServiceMock.getAdminAppsSimpler.and.returnValue(deferredAdminApps.promise);\r
-\r
-            usersServiceMock = jasmine.createSpyObj('usersServiceMock', ['getAccountUsers','getUserAppRoles','updateUserAppsRoles']);\r
-\r
-            //applicationsServiceMock.getAdminApps().promise().and.returnValue(deferredAdminApps.promise);\r
-            usersServiceMock.getAccountUsers.and.returnValue(deferredUsersAccounts.promise);\r
-            usersServiceMock.getUserAppRoles.and.returnValue(deferredUsersAppRoles.promise);\r
-            usersServiceMock.updateUserAppsRoles.and.returnValue(deferredUsersAppRoleUpdate.promise);\r
-\r
-            $scope = $rootScope.$new();\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-            //$scope.users = users;\r
-        });\r
-\r
-        /*beforeEach(()=> {\r
-            scope = $rootScope.$new();\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: scope,\r
-                $log: $log,\r
-                usersService: usersService,\r
-                applicationsService: applicationsService,\r
-                confirmBoxService: confirmBoxService\r
-            });\r
-        });*/\r
-\r
-\r
-        it('should open modal window without user when no user is selected', ()=> {\r
-            expect(newUser.selectedUser).toBe(null);\r
-        });\r
-\r
-        it('should open modal window with selectedUser apps roles when user is selected', ()=> {\r
-            let roles = {apps: [{id: 1, appRoles: [{id: 3, isApplied: true}]}]};\r
-            let someUser = {orgUserId: 'asdfjl'};\r
-\r
-           deferredUsersAppRoles.resolve(roles);\r
-           deferredAdminApps.resolve(roles.apps);\r
-\r
-            $scope.ngDialogData = {\r
-                selectedUser: someUser,\r
-                dialogState: 2\r
-            };\r
-\r
-            //inject ngDialogData to the scope controller\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-\r
-            newUser.getUserAppsRoles();\r
-            $scope.$apply();\r
-\r
-            expect(newUser.selectedUser).toBe(someUser);\r
-            expect(newUser.adminApps).toEqual(roles.apps);\r
-        });\r
-\r
-        it('should push to apps order list only apps that has applied roles when initializing', () => {\r
-            let roles = {apps: [{appId: 13, appRoles: [{id: 3, isApplied: true}]},{appId: 20, appRoles: [{id: 3, isApplied: false}]}]};\r
-            let someUser = {orgUserId: 'asdfjl'};\r
-\r
-            deferredUsersAppRoles.resolve(roles);\r
-            //deferredAdminApps.resolve(roles.apps);\r
-\r
-            $scope.ngDialogData = {\r
-                selectedUser: someUser,\r
-                dialogState: 2\r
-            };\r
-\r
-            //inject ngDialogData to the scope controller\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-\r
-            $scope.$apply();\r
-\r
-           // expect(newUser.appsOrder).toEqual([13]);\r
-        });\r
-\r
-        it('should push app to apps order list when applying at least one role to user from app', () => {\r
-            let roles = {apps: [{appId: 13, appRoles: [{id: 3, isApplied: true}]},{appId: 20, appRoles: [{id: 3, isApplied: false}]}]};\r
-            let someUser = {orgUserId: 'asdfjl'};\r
-\r
-            // promisesTestUtils.resolvePromise(usersService, 'getUserAppsRoles', roles);\r
-            deferredUsersAppRoles.resolve(roles);\r
-\r
-            $scope.ngDialogData = {\r
-                selectedUser: someUser,\r
-                dialogState: 2\r
-            };\r
-\r
-            //inject ngDialogData to the scope controller\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-\r
-            //$scope.$apply();\r
-            //newUser.updateAppsOrder({appId: 39, appRoles: [{id: 13, isApplied: true}]});\r
-            $scope.$apply();\r
-\r
-          //  expect(newUser.appsOrder).toEqual([13, 39]);\r
-        });\r
-\r
-\r
-        it('should remove app from list when removing all user roles in it', () => {\r
-            let roles = {apps: [{appName: 'aaa', appId: 13, appRoles: [{id: 3, isApplied: true}]},{appName: 'vvv', appId: 20, appRoles: [{id: 3, isApplied: true}]}]};\r
-            let someUser = {orgUserId: 'asdfjl'};\r
-\r
-           // promisesTestUtils.resolvePromise(usersService, 'getUserAppsRoles', roles);\r
-            promisesTestUtils.resolvePromise(confirmBoxServiceMock, 'deleteItem', true);\r
-\r
-            deferredUsersAppRoles.resolve(roles);\r
-\r
-            $scope.ngDialogData = {\r
-                selectedUser: someUser,\r
-                dialogState: 2\r
-            };\r
-\r
-            //inject ngDialogData to the scope controller\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-\r
-            $scope.$apply();\r
-            newUser.deleteApp(roles.apps[0]);\r
-            $scope.$apply();\r
-\r
-           // expect(newUser.appsOrder).toEqual([20]);\r
-        });\r
-\r
-        it('should close the modal when update changes succeeded', () => {\r
-            let roles = {apps: [{appName: 'aaa', appId: 13, appRoles: [{id: 3, isApplied: true}]},{appName: 'vvv', appId: 20, appRoles: [{id: 3, isApplied: true}]}]};\r
-            let someUser = {orgUserId: 'asdfjl'};\r
-            //promisesTestUtils.resolvePromise(usersServiceMock, 'getUserAppsRoles', roles);\r
-            //promisesTestUtils.resolvePromise(usersServiceMock, 'updateUserAppsRoles');\r
-            deferredUsersAppRoles.resolve(roles);\r
-            deferredUsersAppRoleUpdate.resolve();\r
-            deferredAdminApps.resolve(roles.apps);\r
-\r
-            $scope.ngDialogData = {\r
-                selectedUser: someUser,\r
-                dialogState: 2\r
-            };\r
-\r
-            //inject ngDialogData to the scope controller\r
-            newUser = $controller('NewUserModalCtrl', {\r
-                $scope: $scope,\r
-                $log: $log,\r
-                usersService: usersServiceMock,\r
-                applicationsService: applicationsServiceMock,\r
-                confirmBoxService: confirmBoxServiceMock\r
-            });\r
-            $scope.closeThisDialog = function(){};\r
-            spyOn($scope, 'closeThisDialog');\r
-\r
-            newUser.getUserAppsRoles();\r
-            $scope.$apply();\r
-            newUser.updateUserAppsRoles();\r
-            $scope.$apply();\r
-            expect($scope.closeThisDialog).toHaveBeenCalledWith(true);\r
-        });\r
-    });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+
+describe('Controller: NewUserModalCtrl ', () => {
+    beforeEach(module('testUtils'));
+    beforeEach(module('ecompApp'));
+
+        let promisesTestUtils;
+        //destroy $http default cache before starting to prevent the error 'default cache already exists'
+        //_promisesTestUtils_ comes from testUtils for promises resolve/reject
+        beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {
+            _CacheFactory_.destroyAll();
+            promisesTestUtils = _promisesTestUtils_;
+        }));
+
+        let newUser, $controller, $q, $rootScope, $log, $scope;
+
+        let applicationsServiceMock, usersServiceMock, confirmBoxServiceMock;
+        let deferredAdminApps, deferredUsersAccounts, deferredUsersAppRoles, deferredUsersAppRoleUpdate;
+
+        beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {
+            $rootScope = _$rootScope_;
+            $q = _$q_;
+            $controller = _$controller_;
+            $log = _$log_;
+        }));
+
+    beforeEach(()=> {
+            [deferredAdminApps, deferredUsersAccounts, deferredUsersAppRoles, deferredUsersAppRoleUpdate] = [$q.defer(),$q.defer(), $q.defer(), $q.defer()];
+
+            /*applicationsServiceMock = {
+                getAdminApps: () => {
+                    var promise = () => {return deferredAdminApps.promise};
+                    var cancel = jasmine.createSpy();
+                    return {
+                        promise: promise,
+                        cancel: cancel
+                    }
+                }
+            };*/
+
+            confirmBoxServiceMock = {
+                deleteItem: () => {
+                    var promise = () => {return deferredAdminApps.promise};
+                    var cancel = jasmine.createSpy();
+                    return {
+                        promise: promise,
+                        cancel: cancel
+                    }
+                }
+            };
+
+            applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock', ['getAdminAppsSimpler']);
+            applicationsServiceMock.getAdminAppsSimpler.and.returnValue(deferredAdminApps.promise);
+
+            usersServiceMock = jasmine.createSpyObj('usersServiceMock', ['getAccountUsers','getUserAppRoles','updateUserAppsRoles']);
+
+            //applicationsServiceMock.getAdminApps().promise().and.returnValue(deferredAdminApps.promise);
+            usersServiceMock.getAccountUsers.and.returnValue(deferredUsersAccounts.promise);
+            usersServiceMock.getUserAppRoles.and.returnValue(deferredUsersAppRoles.promise);
+            usersServiceMock.updateUserAppsRoles.and.returnValue(deferredUsersAppRoleUpdate.promise);
+
+            $scope = $rootScope.$new();
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+            //$scope.users = users;
+        });
+
+        /*beforeEach(()=> {
+            scope = $rootScope.$new();
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: scope,
+                $log: $log,
+                usersService: usersService,
+                applicationsService: applicationsService,
+                confirmBoxService: confirmBoxService
+            });
+        });*/
+
+
+        it('should open modal window without user when no user is selected', ()=> {
+            expect(newUser.selectedUser).toBe(null);
+        });
+
+        it('should open modal window with selectedUser apps roles when user is selected', ()=> {
+            let roles = {apps: [{id: 1, appRoles: [{id: 3, isApplied: true}]}]};
+            let someUser = {orgUserId: 'asdfjl'};
+
+           deferredUsersAppRoles.resolve(roles);
+           deferredAdminApps.resolve(roles.apps);
+
+            $scope.ngDialogData = {
+                selectedUser: someUser,
+                dialogState: 2
+            };
+
+            //inject ngDialogData to the scope controller
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+
+            newUser.getUserAppsRoles();
+            $scope.$apply();
+
+            expect(newUser.selectedUser).toBe(someUser);
+            expect(newUser.adminApps).toEqual(roles.apps);
+        });
+
+        it('should push to apps order list only apps that has applied roles when initializing', () => {
+            let roles = {apps: [{appId: 13, appRoles: [{id: 3, isApplied: true}]},{appId: 20, appRoles: [{id: 3, isApplied: false}]}]};
+            let someUser = {orgUserId: 'asdfjl'};
+
+            deferredUsersAppRoles.resolve(roles);
+            //deferredAdminApps.resolve(roles.apps);
+
+            $scope.ngDialogData = {
+                selectedUser: someUser,
+                dialogState: 2
+            };
+
+            //inject ngDialogData to the scope controller
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+
+            $scope.$apply();
+
+           // expect(newUser.appsOrder).toEqual([13]);
+        });
+
+        it('should push app to apps order list when applying at least one role to user from app', () => {
+            let roles = {apps: [{appId: 13, appRoles: [{id: 3, isApplied: true}]},{appId: 20, appRoles: [{id: 3, isApplied: false}]}]};
+            let someUser = {orgUserId: 'asdfjl'};
+
+            // promisesTestUtils.resolvePromise(usersService, 'getUserAppsRoles', roles);
+            deferredUsersAppRoles.resolve(roles);
+
+            $scope.ngDialogData = {
+                selectedUser: someUser,
+                dialogState: 2
+            };
+
+            //inject ngDialogData to the scope controller
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+
+            //$scope.$apply();
+            //newUser.updateAppsOrder({appId: 39, appRoles: [{id: 13, isApplied: true}]});
+            $scope.$apply();
+
+          //  expect(newUser.appsOrder).toEqual([13, 39]);
+        });
+
+
+        it('should remove app from list when removing all user roles in it', () => {
+            let roles = {apps: [{appName: 'aaa', appId: 13, appRoles: [{id: 3, isApplied: true}]},{appName: 'vvv', appId: 20, appRoles: [{id: 3, isApplied: true}]}]};
+            let someUser = {orgUserId: 'asdfjl'};
+
+           // promisesTestUtils.resolvePromise(usersService, 'getUserAppsRoles', roles);
+            promisesTestUtils.resolvePromise(confirmBoxServiceMock, 'deleteItem', true);
+
+            deferredUsersAppRoles.resolve(roles);
+
+            $scope.ngDialogData = {
+                selectedUser: someUser,
+                dialogState: 2
+            };
+
+            //inject ngDialogData to the scope controller
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+
+            $scope.$apply();
+            newUser.deleteApp(roles.apps[0]);
+            $scope.$apply();
+
+           // expect(newUser.appsOrder).toEqual([20]);
+        });
+
+        it('should close the modal when update changes succeeded', () => {
+            let roles = {apps: [{appName: 'aaa', appId: 13, appRoles: [{id: 3, isApplied: true}]},{appName: 'vvv', appId: 20, appRoles: [{id: 3, isApplied: true}]}]};
+            let someUser = {orgUserId: 'asdfjl'};
+            //promisesTestUtils.resolvePromise(usersServiceMock, 'getUserAppsRoles', roles);
+            //promisesTestUtils.resolvePromise(usersServiceMock, 'updateUserAppsRoles');
+            deferredUsersAppRoles.resolve(roles);
+            deferredUsersAppRoleUpdate.resolve();
+            deferredAdminApps.resolve(roles.apps);
+
+            $scope.ngDialogData = {
+                selectedUser: someUser,
+                dialogState: 2
+            };
+
+            //inject ngDialogData to the scope controller
+            newUser = $controller('NewUserModalCtrl', {
+                $scope: $scope,
+                $log: $log,
+                usersService: usersServiceMock,
+                applicationsService: applicationsServiceMock,
+                confirmBoxService: confirmBoxServiceMock
+            });
+            $scope.closeThisDialog = function(){};
+            spyOn($scope, 'closeThisDialog');
+
+            newUser.getUserAppsRoles();
+            $scope.$apply();
+            newUser.updateUserAppsRoles();
+            $scope.$apply();
+            expect($scope.closeThisDialog).toHaveBeenCalledWith(true);
+        });
+    });
index 5f26152..5fec021 100644 (file)
@@ -1,84 +1,90 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="new-user-modal">\r
-\r
-    <div class="search-users" ng-show="newUser.dialogState===1">\r
-\r
-        <search-users search-title="New User"\r
-                      selected-user="newUser.selectedUser"></search-users>\r
-\r
-        <div class="dialog-control">   \r
-            <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"\r
-                 ng-class="{disabled: !newUser.selectedUser}">Next\r
-            </button>\r
-             <button class="btn btn-alt btn-small" id="cancel-button" ng-click="closeThisDialog()">Cancel</button>\r
-            \r
-        </div>\r
-    </div>\r
-\r
-    <div class="user-apps-roles" ng-show="newUser.dialogState===3">\r
-        <div class="title"\r
-             ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>\r
-\r
-\r
-        <div class="app-roles-main">\r
-            <div class="app-roles-main-title">\r
-                <span class="left">Access and roles:</span>\r
-            </div>\r
-\r
-            <div class="app-roles-list">\r
-                <div class="app-item" ng-repeat="app in (newUser.adminApps) track by app.id"  id="app-name-{{app.name.split(' ').join('-')}}" ng-show="!app.isDeleted">\r
-                    <div class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</div>\r
-                    <div class="app-item-right" id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}" ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating">\r
-                        <multiple-select id="app-roles"\r
-                                         unique-data="{{$index}}"\r
-                                         placeholder="Select roles"\r
-                                         ng-model="app.appRoles"\r
-                                         on-change="newUser.appChanged($index)"\r
-                                         name-attr="roleName"\r
-                                         value-attr="isApplied"></multiple-select>\r
-                    </div>\r
-                    <div id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</div>\r
-                    <div id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</div>\r
-                    <div id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</div>\r
-                    <div id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</div>\r
-                    <div id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</div>\r
-                    <div id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</div>\r
-                    <div id="app-item-delete" class="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError"></div>\r
-                    <div id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></div>\r
-                </div>\r
-            </div>\r
-            \r
-             <div class="dialog-control">\r
-                <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>\r
-                <button id="new-user-back-button" class="btn btn-alt btn-small"  ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>\r
-                <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"\r
-                      ng-disabled="(newUser.anyChanges == false)">Save\r
-                </button>\r
-                <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>\r
-            </div>\r
-\r
-        </div>\r
-\r
-    </div>\r
-\r
-\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="new-user-modal">
+
+    <div class="search-users" ng-show="newUser.dialogState===1">
+
+        <search-users search-title="New User"
+                      selected-user="newUser.selectedUser"></search-users>
+
+        <div class="dialog-control">   
+            <button class="btn btn-alt btn-small" id="next-button"  ng-click="newUser.selectedUser && newUser.getUserAppsRoles()"
+                 ng-class="{disabled: !newUser.selectedUser}">Next
+            </button>
+             <button class="btn btn-alt btn-small" id="cancel-button" ng-click="closeThisDialog()">Cancel</button>
+            
+        </div>
+    </div>
+
+    <div class="user-apps-roles" ng-show="newUser.dialogState===3">
+        <div class="title"
+             ng-bind="newUser.selectedUser.firstName + ' ' + newUser.selectedUser.lastName + ' (' + newUser.selectedUser.orgUserId + ')'"></div>
+
+
+        <div class="app-roles-main">
+            <div class="app-roles-main-title">
+                <span class="left">Access and roles:</span>
+            </div>
+
+            <div class="app-roles-list">
+                <div class="app-item" ng-repeat="app in (newUser.adminApps) track by app.id"  id="app-name-{{app.name.split(' ').join('-')}}" ng-show="!app.isDeleted">
+                    <div class="app-item-left" id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name | elipsis: 27}}</div>
+                    <div class="app-item-right" id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}" ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating">
+                        <multiple-select id="app-roles"
+                                         unique-data="{{$index}}"
+                                         placeholder="Select roles"
+                                         ng-model="app.appRoles"
+                                         on-change="newUser.appChanged($index)"
+                                         name-attr="roleName"
+                                         value-attr="isApplied"></multiple-select>
+                    </div>
+                    <div id="app-item-no-contact" class="app-item-right-error" ng-show="app.isError">{{app.errorMessage}}</div>
+                    <div id="app-item-contacting" class="app-item-right-contacting" ng-show="app.isLoading">Contacting application...</div>
+                    <div id="app-item-no-changes" class="app-item-right-contacting" ng-show="app.noChanges">No changes</div>
+                    <div id="app-item-no-updating" class="app-item-right-contacting" ng-show="app.isUpdating">Updating application...</div>
+                    <div id="app-item-done-updating" class="app-item-right-contacting" ng-show="app.isDoneUpdating">Finished updating application</div>
+                    <div id="app-item-cannot-update" class="app-item-right-error" ng-show="app.isErrorUpdating">Could not update application...</div>
+                    <div id="app-item-delete" class="app-item-delete" ng-click="newUser.deleteApp(app)" ng-show="!app.isLoading && !app.isError"></div>
+                    <div id='ecomp-small-spinner' class="ecomp-small-spinner" ng-show="app.isLoading"></div>
+                </div>
+            </div>
+            
+             <div class="dialog-control">
+                <span id="ecomp-save-spinner" class="ecomp-save-spinner" ng-show="newUser.isSaving || newUser.isGettingAdminApps"></span>
+                <button id="new-user-back-button" class="btn btn-alt btn-small"  ng-show="newUser.isShowBack" ng-click="newUser.navigateBack()">Back</button>
+                <button id="new-user-save-button" class="btn btn-alt btn-small" ng-click="newUser.updateUserAppsRoles()"
+                      ng-disabled="(newUser.anyChanges == false)">Save
+                </button>
+                <button id="new-user-cancel-button" class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
+            </div>
+
+        </div>
+
+    </div>
+
+
+
+</div>
+
+<script>
+$(document).ready(function(){
+    $(".ngdialog-close").attr('id','dialog-close');
+});
+</script>
index 1aa6760..ac223ed 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class UsersCtrl {\r
-        constructor($log, applicationsService, usersService, confirmBoxService, $scope, ngDialog) {\r
-            this.$log = $log;\r
-            $scope.adminAppsIsNull = false;\r
-            $scope.appsIsDown = false;\r
-            $scope.noUsersInApp = false;\r
-            $scope.multiAppAdmin = false;\r
-\r
-            $log.info('UsersCtrl:: initializing...');\r
-            /**\r
-             * Handle all active HTTP requests\r
-             * activeRequests @type {Array[requests with cancel option]}\r
-             */\r
-            let activeRequests = [];\r
-            let clearReq = (req) => {\r
-                activeRequests.splice(activeRequests.indexOf(req), 1);\r
-            };\r
-\r
-            let init = () => {\r
-                this.isLoadingTable = false;\r
-                this.selectedApp = null;\r
-                this.isAppSelectDisabled = false;\r
-                this.selectApp = 'Select application';\r
-                this.adminApps = [{index: 0, id: 0, value: this.selectApp, title: this.selectApp}];\r
-                getAdminApps();\r
-\r
-                /*Table general configuration params*/\r
-                this.searchString = '';\r
-                /*Table data*/\r
-                this.usersTableHeaders = ['First Name', 'Last Name', 'User ID', 'Roles'];\r
-                this.accountUsers = [];\r
-            };\r
-\r
-            let getAdminApps = () => {\r
-                $log.debug('UsersCtrl::getAdminApps: - Starting getAdminApps');\r
-                try {\r
-                    this.isLoadingTable = true;\r
-                    let adminAppsReq = applicationsService.getAdminApps();\r
-                    adminAppsReq.promise().then(apps => {\r
-                        if (!apps || !apps.length) {\r
-                            $log.error('UsersCtrl::getAdminApps:  - no apps found');\r
-                            return null;\r
-                        }\r
-                        $log.debug('UsersCtrl::getAdminApps: Apps for this user are: ' + JSON.stringify(apps));\r
-                        if (apps.length >= 2) {\r
-                            $log.info('UsersCtrl::getAdminApps:  - more than one app for this admin:', apps.length, ' apps');\r
-                            $scope.multiAppAdmin = true;\r
-                        } else {\r
-                            this.adminApps = [] ;\r
-                        }\r
-                        let sortedApps = apps.sort(getSortOrder("name"));\r
-                        let realAppIndex = 1;\r
-                        for(let i=1; i<=sortedApps.length; i++){\r
-                            this.adminApps.push({\r
-                                index: realAppIndex,\r
-                                id: sortedApps[i - 1].id,\r
-                                value: sortedApps[i - 1].name,\r
-                                title: sortedApps[i - 1].name\r
-                            });\r
-                            realAppIndex = realAppIndex + 1;\r
-                        }\r
-\r
-                        $log.debug('UsersCtrl::getAdminApps: Apps for this user are: ' + JSON.stringify(this.adminApps));\r
-\r
-                        this.selectedApp = this.adminApps[0];\r
-                        clearReq(adminAppsReq);\r
-                        $scope.adminAppsIsNull = false;\r
-                        }).catch(e => {\r
-                            $scope.adminAppsIsNull = true;\r
-                            $log.error('UsersCtrl::getAdminApps:  - getAdminApps() failed = '+ e.message);\r
-                            clearReq(adminAppsReq);\r
-                            confirmBoxService.showInformation('There was a problem retrieving the applications. ' +\r
-                                'Please try again later.').then(isConfirmed => {});\r
-\r
-                    }).finally(() => {\r
-                            this.isLoadingTable = false;\r
-                        });\r
-                    } catch (e) {\r
-                        $scope.adminAppsIsNull = true;\r
-                        $log.error('UsersCtrl::getAdminApps:  - getAdminApps() failed!');\r
-                        this.isLoadingTable = false;\r
-                    }\r
-            };\r
-\r
-            let getSortOrder = (prop) => {\r
-                return function(a, b) {\r
-                    if (a[prop] > b[prop]) {\r
-                        return 1;\r
-                    } else if (a[prop] < b[prop]) {\r
-                        return -1;\r
-                    }\r
-                    return 0;\r
-                }\r
-            }\r
-\r
-            this.updateUsersList = () => {\r
-                $scope.appsIsDown = false;\r
-                $scope.noUsersInApp = false;\r
-                // $log.debug('UsersCtrl::updateUsersList: Starting updateUsersList');\r
-                //reset search string\r
-                this.searchString = '';\r
-                //should i disable this too in case of moving between tabs?\r
-                this.isAppSelectDisabled = true;\r
-                //activate spinner\r
-                this.isLoadingTable = true;\r
-                \r
-                if(this.adminApps!=null && this.selectedApp!=null){\r
-                        var tempSelected = null;\r
-                        for(let i=0; i<=this.adminApps.length; i++){\r
-                       if(typeof this.adminApps[i] != 'undefined' && this.selectedApp.value==this.adminApps[i].value){\r
-                               tempSelected=_.clone(this.adminApps[i]);\r
-                       }\r
-                     }\r
-                     if(tempSelected!=null){\r
-                       this.selectedApp= tempSelected;\r
-                     }\r
-                }\r
-               \r
-                if (this.selectedApp.title != this.selectApp) { // 'Select Application'\r
-                    usersService.getAccountUsers(this.selectedApp.id)\r
-                        .then(accountUsers => {\r
-                            $log.debug('UsersCtrl::updateUsersList accountUsers: '+ accountUsers);\r
-                            if (angular.isObject(accountUsers)===false) {\r
-                                $log.error('UsersCtrl::updateUsersList accountUsers: App is down!');\r
-                                $scope.appsIsDown = true;\r
-                            }\r
-                            $log.debug('UsersCtrl::updateUsersList length: '+ Object.keys(accountUsers).length);\r
-                            this.isAppSelectDisabled = false;\r
-                            this.accountUsers = accountUsers;\r
-                            if (angular.isObject(accountUsers) && Object.keys(accountUsers).length === 0) {\r
-                                $log.debug('UsersCtrl::updateUsersList accountUsers: App has no users.');\r
-                                $scope.noUsersInApp = true;\r
-                            }\r
-                        }).catch(err => {\r
-                            this.isAppSelectDisabled = false;\r
-                            $log.error('UsersCtrl::updateUsersList error: ' + err);\r
-                            confirmBoxService.showInformation('There was a problem updating the users List. ' +\r
-                                'Please try again later.').then(isConfirmed => {});\r
-                            $scope.appsIsDown = true;\r
-                        }).finally(() => {\r
-                            this.isLoadingTable = false;\r
-                            $scope.noAppSelected = false;\r
-                    });\r
-                } else {\r
-                    // this.selectedApp = this.adminApps[0];\r
-                    this.isAppSelectDisabled = false;\r
-                    this.isLoadingTable = false;\r
-                    $scope.noUsersInApp = false;\r
-                    $scope.noAppSelected = true;\r
-                }\r
-            };\r
-\r
-\r
-            this.openAddNewUserModal = (user) => {\r
-                let data = null;\r
-                if (user) {\r
-                    data = {\r
-                        dialogState: 3,\r
-                        selectedUser: {\r
-                            orgUserId: user.orgUserId,\r
-                            firstName: user.firstName,\r
-                            lastName: user.lastName\r
-                        }\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/users/new-user-dialogs/new-user.modal.html',\r
-                    controller: 'NewUserModalCtrl',\r
-                    controllerAs: 'newUser',\r
-                    data: data\r
-                }).closePromise.then(needUpdate => {\r
-                    if (needUpdate.value === true) {\r
-                        $log.debug('UsersCtrl::openAddNewUserModal updating table data...');\r
-                        this.updateUsersList();\r
-                    }\r
-                });\r
-            };\r
-            \r
-            this.openBulkUserUploadModal = (adminApps) => {\r
-                let data = null;\r
-                if (adminApps) {\r
-                    data = {\r
-                        dialogState: 3,\r
-                        selectedApplication: {\r
-                            appid: adminApps[0].appid,\r
-                            appName: adminApps[0].appName\r
-                        }\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/users/new-user-dialogs/bulk-user.modal.html',\r
-                    controller: 'BulkUserModalCtrl',\r
-                    controllerAs: 'bulkUser',\r
-                    data: data\r
-                }).closePromise.then(needUpdate => {\r
-                       this.updateUsersList();\r
-                });\r
-            };\r
-\r
-\r
-            $scope.$watch('users.selectedApp.value', (newVal, oldVal) => {\r
-                if (!newVal || _.isEqual(newVal, oldVal)) {\r
-                    return;\r
-                }\r
-                $log.debug('UsersCtrl::openAddNewUserModal:$watch selectedApp -> Fire with: ', newVal);\r
-                this.accountUsers = []; //reset table and show swirl here\r
-                this.updateUsersList();\r
-            });\r
-\r
-            $scope.$on('$destroy', () => {\r
-                //cancel all active requests when closing the modal\r
-                activeRequests.forEach(req => {\r
-                    req.cancel();\r
-                });\r
-            });\r
-\r
-            init();\r
-        }\r
-    }\r
-    UsersCtrl.$inject = ['$log', 'applicationsService', 'usersService', 'confirmBoxService', '$scope', 'ngDialog'];\r
-    angular.module('ecompApp').controller('UsersCtrl', UsersCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class UsersCtrl {
+        constructor($log, applicationsService, usersService, confirmBoxService, $scope, ngDialog) {
+            this.$log = $log;
+            $scope.adminAppsIsNull = false;
+            $scope.appsIsDown = false;
+            $scope.noUsersInApp = false;
+            $scope.multiAppAdmin = false;
+
+            $log.info('UsersCtrl:: initializing...');
+            /**
+             * Handle all active HTTP requests
+             * activeRequests @type {Array[requests with cancel option]}
+             */
+            let activeRequests = [];
+            let clearReq = (req) => {
+                activeRequests.splice(activeRequests.indexOf(req), 1);
+            };
+
+            let init = () => {
+                this.isLoadingTable = false;
+                this.selectedApp = null;
+                this.isAppSelectDisabled = false;
+                this.selectApp = 'Select application';
+                this.adminApps = [{index: 0, id: 0, value: this.selectApp, title: this.selectApp}];
+                getAdminApps();
+
+                /*Table general configuration params*/
+                this.searchString = '';
+                /*Table data*/
+                this.usersTableHeaders = ['First Name', 'Last Name', 'User ID', 'Roles'];
+                this.accountUsers = [];
+            };
+
+            let getAdminApps = () => {
+                $log.debug('UsersCtrl::getAdminApps: - Starting getAdminApps');
+                try {
+                    this.isLoadingTable = true;
+                    let adminAppsReq = applicationsService.getAdminApps();
+                    adminAppsReq.promise().then(apps => {
+                        if (!apps || !apps.length) {
+                            $log.error('UsersCtrl::getAdminApps:  - no apps found');
+                            return null;
+                        }
+                        $log.debug('UsersCtrl::getAdminApps: Apps for this user are: ' + JSON.stringify(apps));
+                        if (apps.length >= 2) {
+                            $log.info('UsersCtrl::getAdminApps:  - more than one app for this admin:', apps.length, ' apps');
+                            $scope.multiAppAdmin = true;
+                        } else {
+                            this.adminApps = [] ;
+                        }
+                        let sortedApps = apps.sort(getSortOrder("name"));
+                        let realAppIndex = 1;
+                        for(let i=1; i<=sortedApps.length; i++){
+                            this.adminApps.push({
+                                index: realAppIndex,
+                                id: sortedApps[i - 1].id,
+                                value: sortedApps[i - 1].name,
+                                title: sortedApps[i - 1].name
+                            });
+                            realAppIndex = realAppIndex + 1;
+                        }
+
+                        $log.debug('UsersCtrl::getAdminApps: Apps for this user are: ' + JSON.stringify(this.adminApps));
+
+                        this.selectedApp = this.adminApps[0];
+                        clearReq(adminAppsReq);
+                        $scope.adminAppsIsNull = false;
+                        }).catch(e => {
+                            $scope.adminAppsIsNull = true;
+                            $log.error('UsersCtrl::getAdminApps:  - getAdminApps() failed = '+ e.message);
+                            clearReq(adminAppsReq);
+                            confirmBoxService.showInformation('There was a problem retrieving the applications. ' +
+                                'Please try again later.').then(isConfirmed => {});
+
+                    }).finally(() => {
+                            this.isLoadingTable = false;
+                        });
+                    } catch (e) {
+                        $scope.adminAppsIsNull = true;
+                        $log.error('UsersCtrl::getAdminApps:  - getAdminApps() failed!');
+                        this.isLoadingTable = false;
+                    }
+            };
+
+            let getSortOrder = (prop) => {
+                return function(a, b) {
+                    if (a[prop] > b[prop]) {
+                        return 1;
+                    } else if (a[prop] < b[prop]) {
+                        return -1;
+                    }
+                    return 0;
+                }
+            }
+
+            this.updateUsersList = () => {
+                $scope.appsIsDown = false;
+                $scope.noUsersInApp = false;
+                // $log.debug('UsersCtrl::updateUsersList: Starting updateUsersList');
+                //reset search string
+                this.searchString = '';
+                //should i disable this too in case of moving between tabs?
+                this.isAppSelectDisabled = true;
+                //activate spinner
+                this.isLoadingTable = true;
+                
+                if(this.adminApps!=null && this.selectedApp!=null){
+                        var tempSelected = null;
+                        for(let i=0; i<=this.adminApps.length; i++){
+                       if(typeof this.adminApps[i] != 'undefined' && this.selectedApp.value==this.adminApps[i].value){
+                               tempSelected=_.clone(this.adminApps[i]);
+                       }
+                     }
+                     if(tempSelected!=null){
+                       this.selectedApp= tempSelected;
+                     }
+                }
+               
+                if (this.selectedApp.title != this.selectApp) { // 'Select Application'
+                    usersService.getAccountUsers(this.selectedApp.id)
+                        .then(accountUsers => {
+                            $log.debug('UsersCtrl::updateUsersList accountUsers: '+ accountUsers);
+                            if (angular.isObject(accountUsers)===false) {
+                                $log.error('UsersCtrl::updateUsersList accountUsers: App is down!');
+                                $scope.appsIsDown = true;
+                            }
+                            $log.debug('UsersCtrl::updateUsersList length: '+ Object.keys(accountUsers).length);
+                            this.isAppSelectDisabled = false;
+                            this.accountUsers = accountUsers;
+                            if (angular.isObject(accountUsers) && Object.keys(accountUsers).length === 0) {
+                                $log.debug('UsersCtrl::updateUsersList accountUsers: App has no users.');
+                                $scope.noUsersInApp = true;
+                            }
+                        }).catch(err => {
+                            this.isAppSelectDisabled = false;
+                            $log.error('UsersCtrl::updateUsersList error: ' + err);
+                            confirmBoxService.showInformation('There was a problem updating the users List. ' +
+                                'Please try again later.').then(isConfirmed => {});
+                            $scope.appsIsDown = true;
+                        }).finally(() => {
+                            this.isLoadingTable = false;
+                            $scope.noAppSelected = false;
+                    });
+                } else {
+                    // this.selectedApp = this.adminApps[0];
+                    this.isAppSelectDisabled = false;
+                    this.isLoadingTable = false;
+                    $scope.noUsersInApp = false;
+                    $scope.noAppSelected = true;
+                }
+            };
+
+
+            this.openAddNewUserModal = (user) => {
+                let data = null;
+                if (user) {
+                    data = {
+                        dialogState: 3,
+                        selectedUser: {
+                            orgUserId: user.orgUserId,
+                            firstName: user.firstName,
+                            lastName: user.lastName,
+
+                        }
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/users/new-user-dialogs/new-user.modal.html',
+                    controller: 'NewUserModalCtrl',
+                    controllerAs: 'newUser',
+                    data: data
+                }).closePromise.then(needUpdate => {
+                    if (needUpdate.value === true) {
+                        $log.debug('UsersCtrl::openAddNewUserModal updating table data...');
+                        this.updateUsersList();
+                    }
+                });
+            };
+            
+            this.openBulkUserUploadModal = (adminApps) => {
+                let data = null;
+                if (adminApps) {
+                    data = {
+                        dialogState: 3,
+                        selectedApplication: {
+                            appid: adminApps[0].appid,
+                            appName: adminApps[0].appName
+                        }
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/users/new-user-dialogs/bulk-user.modal.html',
+                    controller: 'BulkUserModalCtrl',
+                    controllerAs: 'bulkUser',
+                    data: data
+                }).closePromise.then(needUpdate => {
+                       this.updateUsersList();
+                });
+            };
+
+
+            $scope.$watch('users.selectedApp.value', (newVal, oldVal) => {
+                if (!newVal || _.isEqual(newVal, oldVal)) {
+                    return;
+                }
+                $log.debug('UsersCtrl::openAddNewUserModal:$watch selectedApp -> Fire with: ', newVal);
+                this.accountUsers = []; //reset table and show swirl here
+                this.updateUsersList();
+            });
+
+            $scope.$on('$destroy', () => {
+                //cancel all active requests when closing the modal
+                activeRequests.forEach(req => {
+                    req.cancel();
+                });
+            });
+
+            init();
+        }
+    }
+    UsersCtrl.$inject = ['$log', 'applicationsService', 'usersService', 'confirmBoxService', '$scope', 'ngDialog'];
+    angular.module('ecompApp').controller('UsersCtrl', UsersCtrl);
+})();
index 9623116..0b3c011 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-// /**\r
-//  * Created by nnaffar on 12/17/15.\r
-//  */\r
-// 'use strict';\r
-//\r
-// describe('Controller: UsersCtrl ', () => {\r
-//     beforeEach(module('ecompApp'));\r
-//\r
-//     //destroy $http default cache before starting to prevent the error 'default cache already exists'\r
-//     beforeEach(inject((_CacheFactory_)=> {\r
-//         _CacheFactory_.destroyAll();\r
-//     }));\r
-//\r
-//     let users, $controller, $q, $rootScope, $log, $scope;\r
-//\r
-//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {\r
-//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];\r
-//     }));\r
-//\r
-//     let applicationsServiceMock, usersServiceMock;\r
-//     let deferredAdminApps, deferredUsersAccounts;\r
-//     beforeEach(()=> {\r
-//         [deferredAdminApps, deferredUsersAccounts] = [$q.defer(), $q.defer()];\r
-//\r
-//         applicationsServiceMock = {\r
-//             getAdminApps: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             }\r
-//         };\r
-//\r
-//         usersServiceMock = jasmine.createSpyObj('usersServiceMock', ['getAccountUsers']);\r
-//\r
-//         //applicationsServiceMock.getAdminApps().promise().and.returnValue(deferredAdminApps.promise);\r
-//         usersServiceMock.getAccountUsers.and.returnValue(deferredUsersAccounts.promise);\r
-//\r
-//         $scope = $rootScope.$new();\r
-//         users = $controller('UsersCtrl', {\r
-//             $log: $log,\r
-//             applicationsService: applicationsServiceMock,\r
-//             usersService: usersServiceMock,\r
-//             $scope: $scope\r
-//         });\r
-//         $scope.users = users;\r
-//     });\r
-//\r
-//     //MOCKS\r
-//     let appsListMock = [\r
-//         {value: 'SSP', title: 'SSP', id: 3},\r
-//         {value: 'ASDC', title: 'ASDC', id: 23},\r
-//         {value: 'Formation', title: 'Formation', id: 223}\r
-//     ];\r
-//\r
-//     let usersListMock = [\r
-//         {\r
-//             "orgUserId": "nn605g",\r
-//             "firstName": "Nabil",\r
-//             "lastName": "Naffar",\r
-//             "roles": [\r
-//                 {\r
-//                     "roleId": 1,\r
-//                     "roleName": "Standard user"\r
-//                 },\r
-//                 {\r
-//                     "roleId": 9,\r
-//                     "roleName": "Super standard user"\r
-//                 },\r
-//                 {\r
-//                     "roleId": 2,\r
-//                     "roleName": "Super duper standard user"\r
-//                 }\r
-//             ]\r
-//         }];\r
-//     let secondUsersListMock = [\r
-//         {\r
-//             "orgUserId": "sadf7",\r
-//             "firstName": "John",\r
-//             "lastName": "Hall",\r
-//             "roles": [\r
-//                 {\r
-//                     "roleId": 1,\r
-//                     "roleName": "Standard user"\r
-//                 },\r
-//                 {\r
-//                     "roleId": 2,\r
-//                     "roleName": "Super duper standard user"\r
-//                 }\r
-//             ]\r
-//         }];\r
-//\r
-//     it('should get all user\'s administrated applications when initializing the view', ()=> {\r
-//         deferredAdminApps.resolve(appsListMock);\r
-//         deferredUsersAccounts.resolve(usersListMock);\r
-//         $scope.$apply();\r
-//         expect(users.adminApps).toEqual(appsListMock);\r
-//         expect(users.selectedApp).toEqual(appsListMock[0]);\r
-//     });\r
-//\r
-//     it('should get first application users by default when initializing the view', () => {\r
-//         $scope.$apply();\r
-//         deferredAdminApps.resolve(appsListMock);\r
-//         deferredUsersAccounts.resolve(usersListMock);\r
-//         $scope.$apply();\r
-//         expect(users.accountUsers).toEqual(usersListMock);\r
-//     });\r
-//\r
-//     it('should get application users when changing application', () => {\r
-//         $scope.$apply();\r
-//         deferredAdminApps.resolve(appsListMock);\r
-//         $scope.$apply();\r
-//\r
-//         users.selectedApp = appsListMock[1];\r
-//         deferredUsersAccounts.resolve(secondUsersListMock);\r
-//         $scope.$apply('users');//change app\r
-//\r
-//         expect(users.accountUsers).toEqual(secondUsersListMock);\r
-//     });\r
-// });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+// /**
+//  * Created by nnaffar on 12/17/15.
+//  */
+// 'use strict';
+//
+// describe('Controller: UsersCtrl ', () => {
+//     beforeEach(module('ecompApp'));
+//
+//     //destroy $http default cache before starting to prevent the error 'default cache already exists'
+//     beforeEach(inject((_CacheFactory_)=> {
+//         _CacheFactory_.destroyAll();
+//     }));
+//
+//     let users, $controller, $q, $rootScope, $log, $scope;
+//
+//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {
+//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];
+//     }));
+//
+//     let applicationsServiceMock, usersServiceMock;
+//     let deferredAdminApps, deferredUsersAccounts;
+//     beforeEach(()=> {
+//         [deferredAdminApps, deferredUsersAccounts] = [$q.defer(), $q.defer()];
+//
+//         applicationsServiceMock = {
+//             getAdminApps: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             }
+//         };
+//
+//         usersServiceMock = jasmine.createSpyObj('usersServiceMock', ['getAccountUsers']);
+//
+//         //applicationsServiceMock.getAdminApps().promise().and.returnValue(deferredAdminApps.promise);
+//         usersServiceMock.getAccountUsers.and.returnValue(deferredUsersAccounts.promise);
+//
+//         $scope = $rootScope.$new();
+//         users = $controller('UsersCtrl', {
+//             $log: $log,
+//             applicationsService: applicationsServiceMock,
+//             usersService: usersServiceMock,
+//             $scope: $scope
+//         });
+//         $scope.users = users;
+//     });
+//
+//     //MOCKS
+//     let appsListMock = [
+//         {value: 'SSP', title: 'SSP', id: 3},
+//         {value: 'ASDC', title: 'ASDC', id: 23},
+//         {value: 'Formation', title: 'Formation', id: 223}
+//     ];
+//
+//     let usersListMock = [
+//         {
+//             "orgUserId": "nn605g",
+//             "firstName": "Nabil",
+//             "lastName": "Naffar",
+//             "roles": [
+//                 {
+//                     "roleId": 1,
+//                     "roleName": "Standard user"
+//                 },
+//                 {
+//                     "roleId": 9,
+//                     "roleName": "Super standard user"
+//                 },
+//                 {
+//                     "roleId": 2,
+//                     "roleName": "Super duper standard user"
+//                 }
+//             ]
+//         }];
+//     let secondUsersListMock = [
+//         {
+//             "orgUserId": "sadf7",
+//             "firstName": "John",
+//             "lastName": "Hall",
+//             "roles": [
+//                 {
+//                     "roleId": 1,
+//                     "roleName": "Standard user"
+//                 },
+//                 {
+//                     "roleId": 2,
+//                     "roleName": "Super duper standard user"
+//                 }
+//             ]
+//         }];
+//
+//     it('should get all user\'s administrated applications when initializing the view', ()=> {
+//         deferredAdminApps.resolve(appsListMock);
+//         deferredUsersAccounts.resolve(usersListMock);
+//         $scope.$apply();
+//         expect(users.adminApps).toEqual(appsListMock);
+//         expect(users.selectedApp).toEqual(appsListMock[0]);
+//     });
+//
+//     it('should get first application users by default when initializing the view', () => {
+//         $scope.$apply();
+//         deferredAdminApps.resolve(appsListMock);
+//         deferredUsersAccounts.resolve(usersListMock);
+//         $scope.$apply();
+//         expect(users.accountUsers).toEqual(usersListMock);
+//     });
+//
+//     it('should get application users when changing application', () => {
+//         $scope.$apply();
+//         deferredAdminApps.resolve(appsListMock);
+//         $scope.$apply();
+//
+//         users.selectedApp = appsListMock[1];
+//         deferredUsersAccounts.resolve(secondUsersListMock);
+//         $scope.$apply('users');//change app
+//
+//         expect(users.accountUsers).toEqual(secondUsersListMock);
+//     });
+// });
index 7a0e9eb..4c38b33 100644 (file)
@@ -1,25 +1,30 @@
 .users-page-main{
-  .bg_portalWhite;//white for 1702
- //.bg_portalGray;  // gray for 1610
-  position: @page-main-position;
-  top: @page-main-top;
-  left: @page-main-left;
-  right: @page-main-right;
-  bottom: @page-main-bottom;
-  padding-top: @padding-top;
-  overflow-y: @page-main-overflow-y;
-  padding-left: @padding-left-side;
-#input-table-search::-webkit-input-placeholder,
-{
-font-style: italic;
-  color:    #D7D7D7;
-}
+         .bg_portalWhite;//white for 1702
       //.bg_portalGray;  // gray for 1610
+         position: @page-main-position;
+         top: @page-main-top;
+         left: @page-main-left;
+         right: @page-main-right;
+         bottom: @page-main-bottom;
+         padding-top: @padding-top;
+         overflow-y: @page-main-overflow-y;
+         padding-left: @padding-left-side;
+       #input-table-search::-webkit-input-placeholder,
+       {
+       font-style: italic;
+         color:    #D7D7D7;
+       }
     .users-table {
-      width: @table-width;
-      //margin-left: @table-margin-left;
-      margin: 0 auto;
-
+         width: @table-width;
+         //margin-left: @table-margin-left;
+         margin: 0 auto;
     }
+    
+    .table-users-div{
+       width:15px;
+       font-size:23px;
+       cursor: pointer;
+       }
 
   .error-text {
     width: 1170px;
index ff3edde..606ced6 100644 (file)
@@ -1,98 +1,98 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-    <div class="w-ecomp-main-container" >\r
-        <div class="users-page-main" id="page-content">\r
-            <div id="users-page-title" class="w-ecomp-main-view-title">\r
-                <h1 class="heading-page" >Users</h1>\r
-            </div>\r
-            <div class="users-table">\r
-                <div class="table-control">\r
-                    <div class="table-control-fields">         \r
-                                               <div class="table-dropdown">\r
-                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="Select Application" ng-model="users.selectedApp.value">\r
-                                               <option b2b-dropdown-list option-repeat="d in users.adminApps" value="{{d.value}}">{{d.title}}</option>\r
-                                           </select>\r
-                                               </div>\r
-                                               <div>\r
-                                                       <input id="input-table-search" placeholder="Search" class="table-search-field" type="text" data-ng-model="users.searchString">\r
-                                               </div>\r
-                                               <button class="btn btn-alt btn-small" ng-click="users.openAddNewUserModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add User</button> \r
-                               <button class="btn btn-alt btn-small" ng-click="users.openBulkUserUploadModal()"><i class="icon-arrows-upload" aria-hidden="true"></i>&nbsp;Bulk Upload</button>\r
-                                       </div>\r
-                </div>\r
-                <div ng-hide="users.isLoadingTable">\r
-                    <div class="error-text" id="div-select-app" ng-show="noAppSelected">\r
-                        <p class="error-help">Use the 'Select application' dropdown to see users.</p>\r
-                    </div>\r
-                    <div class="error-text"\r
-                         id="div-error-no-users"\r
-                         ng-show="noUsersInApp">\r
-                        <p>&nbsp;</p>\r
-                        <p class="error-help">\r
-                               No users found. Select "Add User" to add a User to the application.\r
-                        </p>\r
-                    </div>\r
-                    <div class="error-text"\r
-                         id="div-error-app-down"\r
-                         ng-show="appsIsDown" >\r
-                        <p>&nbsp;</p>\r
-                        <p class="error-help">\r
-                               Failed to communicate with the application.\r
-                            Please try again later or contact a system administrator.\r
-                        </p>\r
-                    </div>\r
-                </div>\r
-                <span class="ecomp-spinner" ng-show="users.isLoadingTable"></span>\r
-                <div b2b-table table-data="users.accountUsers"  ng-hide="users.isLoadingTable" search-string="users.searchString" class="b2b-table-div">\r
-                                       <table>\r
-                                               <thead b2b-table-row type="header">\r
-                                                       <tr >\r
-                                                               <th b2b-table-header key="firstName" sortable="true" id="col1">First Name</th>\r
-                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>\r
-                                                               <th b2b-table-header key="orgUserId" sortable="true" id="col3">User ID</th>\r
-                                                               <th b2b-table-header key="" sortable="falses" id="col4">Roles</th>\r
-                                                       </tr>\r
-                                               </thead>\r
-                                               <tbody b2b-table-row type="body"        row-repeat="rowData in users.accountUsers">\r
-                                                       <tr ng-click="users.openAddNewUserModal(rowData)">\r
-                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.orgUserId"></td>\r
-                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">\r
-                                                                       <div class="ecomp-table-repeat" ng-repeat="role in rowData.roles" ng-bind="role.name"></div>\r
-                                                               </td>                                                   \r
-                                                       </tr>\r
-                                               </tbody>\r
-                                       </table>\r
-                               </div>\r
-            </div>\r
-            <div class="error-text"  id="div-error-403" ng-show="adminAppsIsNull==true">\r
-                <h1>Attention:</h1>\r
-                <p>&nbsp;</p>\r
-                <p class="error-help">It appears that you have not been added as an admin yet to an application.</p>\r
-                <p>&nbsp;</p>\r
-                <p class="error-help">Click on the Admins link to the left and check and see if you are listed as an admin for an application.\r
-                    If not, you can add yourself to the appropriate application.</p>\r
-            </div>\r
-        </div>\r
-    </div>\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+    <div class="w-ecomp-main-container" >
+        <div class="users-page-main" id="page-content">
+            <div id="users-page-title" class="w-ecomp-main-view-title">
+                <h1 class="heading-page" >Users</h1>
+            </div>
+            <div class="users-table">
+                <div class="table-control">
+                    <div class="table-control-fields">         
+                                               <div class="table-dropdown">
+                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="Select Application" ng-model="users.selectedApp.value">
+                                               <option b2b-dropdown-list option-repeat="d in users.adminApps" value="{{d.value}}">{{d.title}}</option>
+                                           </select>
+                                               </div>
+                                               <div>
+                                                       <input id="input-table-search" placeholder="Search" class="table-search-field" type="text" data-ng-model="users.searchString">
+                                               </div>
+                                               <button class="btn btn-alt btn-small" ng-click="users.openAddNewUserModal()"><i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add User</button> 
+                               <button class="btn btn-alt btn-small" ng-click="users.openBulkUserUploadModal()"><i class="icon-arrows-upload" aria-hidden="true"></i>&nbsp;Bulk Upload</button>
+                                       </div>
+                </div>
+                <div ng-hide="users.isLoadingTable">
+                    <div class="error-text" id="div-select-app" ng-show="noAppSelected">
+                        <p class="error-help">Use the 'Select application' dropdown to see users.</p>
+                    </div>
+                    <div class="error-text"
+                         id="div-error-no-users"
+                         ng-show="noUsersInApp">
+                        <p>&nbsp;</p>
+                        <p class="error-help">
+                               No users found. Select "Add User" to add a User to the application.
+                        </p>
+                    </div>
+                    <div class="error-text"
+                         id="div-error-app-down"
+                         ng-show="appsIsDown" >
+                        <p>&nbsp;</p>
+                        <p class="error-help">
+                               Failed to communicate with the application.
+                            Please try again later or contact a system administrator.
+                        </p>
+                    </div>
+                </div>
+                <span class="ecomp-spinner" ng-show="users.isLoadingTable"></span>
+                <div b2b-table table-data="users.accountUsers"  ng-hide="users.isLoadingTable" search-string="users.searchString" class="b2b-table-div">
+                                       <table>
+                                               <thead b2b-table-row type="header">
+                                                       <tr >
+                                                               <th b2b-table-header key="firstName" sortable="true" id="col1" default-sort="a">First Name</th>
+                                                               <th b2b-table-header key="lastName" sortable="true" id="col2">Last Name</th>
+                                                               <th b2b-table-header key="orgUserId" sortable="true" id="col3">User ID</th>
+                                                               <th b2b-table-header key="" sortable="falses" id="col4">Roles</th>
+                                                       </tr>
+                                               </thead>
+                                               <tbody b2b-table-row type="body"        row-repeat="rowData in users.accountUsers" class="table-users-div">
+                                                       <tr ng-click="users.openAddNewUserModal(rowData)">
+                                                               <td b2b-table-body id="rowheader_t1_{{$index}}" headers="col1" ng-bind="rowData.firstName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col2" ng-bind="rowData.lastName"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col3" ng-bind="rowData.orgUserId"></td>
+                                                               <td b2b-table-body headers="rowheader_t1_{{$index}} col4">
+                                                                       <div class="ecomp-table-repeat" ng-repeat="role in rowData.roles" ng-bind="role.name"></div>
+                                                               </td>                                                   
+                                                       </tr>
+                                               </tbody>
+                                       </table>
+                               </div>
+            </div>
+            <div class="error-text"  id="div-error-403" ng-show="adminAppsIsNull==true">
+                <h1>Attention:</h1>
+                <p>&nbsp;</p>
+                <p class="error-help">It appears that you have not been added as an admin yet to an application.</p>
+                <p>&nbsp;</p>
+                <p class="error-help">Click on the Admins link to the left and check and see if you are listed as an admin for an application.
+                    If not, you can add yourself to the appropriate application.</p>
+            </div>
+        </div>
+    </div>
+
+</div>
index 2b0cc5c..859b9a8 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-\r
-    class WidgetCatalogCtrl {\r
-        constructor(widgetsService, $log, $cookies, $scope, conf, beReaderService, widgetsCatalogService, userProfileService,dashboardService,$compile, ngDialog) {\r
-            \r
-               $scope.editWidgetModalPopup = function(availableData, resourceType) {\r
-                       $scope.editData = JSON.stringify(availableData);\r
-                       $scope.availableDataTemp = $scope.availableData;\r
-                       ngDialog.open({\r
-                                       templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',\r
-                                       controller : 'CommonWidgetController',\r
-                                       resolve : {\r
-                                               message : function message() {\r
-                                                       var message = {\r
-                                                               type : resourceType,\r
-                                                               availableData : $scope.editData\r
-                                                       };\r
-                                                       return message;\r
-                                               }\r
-                                       }\r
-                               }).closePromise.then(needUpdate => {    \r
-                                       if(resourceType=='NEWS'){\r
-                                               $scope.updateNews();\r
-                                       }else if(resourceType=='EVENTS'){\r
-                                               $scope.updateEvents();\r
-                                       }else if(resourceType=='IMPORTANTRESOURCES'){\r
-                                               $scope.updateImportRes();\r
-                                       }\r
-                 });           \r
-               };\r
-               \r
-               $scope.WidgetCatView = [];  \r
-               $scope.applyPresentationDetailsToWidgetsCatalog = function(widgetsReturned){\r
-                       var rowNo = 0;\r
-                       for (var i = 0; i < widgetsReturned.length; i++) {\r
-                       $scope.WidgetCatView[i] = {\r
-                       sizeX : 2,\r
-                       sizeY : 2,\r
-                       headerText:'',\r
-                       widgetIdentifier : '',\r
-                       url : '',\r
-                       widgetid: '',\r
-                       attrb:'',\r
-                       select: false,\r
-                       };\r
-                       $scope.WidgetCatView[i].widgetid = widgetsReturned[i].id;\r
-                       $scope.WidgetCatView[i].headerText = widgetsReturned[i].headerName;\r
-\r
-                       if(widgetsReturned[i].headerName === 'widget-news'){\r
-                       $scope.WidgetCatView[i].widgetIdentifier = 'NEWS';\r
-                       }\r
-                       else\r
-                       if(widgetsReturned[i].headerName === 'widget-resources'){\r
-                       $scope.WidgetCatView[i].widgetIdentifier = 'IMPORTANTRESOURCES';\r
-                       }\r
-                       else\r
-                       if(widgetsReturned[i].headerName === 'widget-events'){\r
-                       $scope.WidgetCatView[i].widgetIdentifier = 'EVENTS';\r
-                       }\r
-\r
-                       $scope.WidgetCatView[i].url = widgetsReturned[i].url;\r
-                       $scope.WidgetCatView[i].attrb = widgetsReturned[i].attrs;\r
-                       $scope.WidgetCatView[i].select = widgetsReturned[i].select;                     \r
-                       }\r
-\r
-                       $scope.widgetViewData = $scope.WidgetCatView;\r
-                       \r
-                       }\r
-               \r
-               /** Widget code starts */\r
-            let getUserWidgets = (loginName) => {\r
-                \r
-                this.isCommError = false;\r
-                var conf = this.conf;\r
-                        widgetsCatalogService.getUserWidgets(loginName).then(res => {\r
-                                \r
-                                if(!(res instanceof Array)){\r
-                                       this.isCommError = true;\r
-                                       return;\r
-                                }\r
-                        for(var i = 0; i < res.length; i++){   \r
-                                var widget_id = res[i][0];\r
-                                var widget_name = res[i][1];\r
-                                let url = this.conf.api.widgetCommon + "/" + widget_id + "/framework.js";\r
-                                $scope.widgetsList.push({\r
-                                                  id: widget_id,\r
-                                          name: widget_name,\r
-                                          headerName: widget_name,\r
-                                          url: url,\r
-                                          attrs: [{attr: 'data-' + widget_id, value: ''}],\r
-                                          status: res[i][4],\r
-                                          select: (res[i][4] == 'S' || res[i][4] === null) ? true : false\r
-                                        }); \r
-                                var script = document\r
-                                        .createElement('script');\r
-                                        script.src = url;\r
-                                        script.async = true;\r
-                                        var entry = document\r
-                                               .getElementsByTagName('script')[0];\r
-                                        entry.parentNode\r
-                                               .insertBefore(script, entry);\r
-                        }\r
-                        $scope.applyPresentationDetailsToWidgetsCatalog($scope.widgetsList);\r
-                 }).catch(err => {\r
-                     $log.error('WidgetCatalogCtrl::getUserWidgets caught error', err);\r
-                 }).finally(()=> {\r
-                        \r
-                 });\r
-            };\r
-            \r
-            let init = () => {\r
-               userProfileService.getUserProfile()\r
-                .then(profile=> {\r
-                    // $log.info('WidgetCatalogCtrl::getUserProfile: ',\r
-                                       // profile);\r
-                    $scope.orgUserId = profile.orgUserId;\r
-                    $scope.widgetsViewData = [];\r
-                    $scope.widgetsView = [];    \r
-                       getUserWidgets($scope.orgUserId);  \r
-                });\r
-                this.conf = conf;\r
-                $scope.widgetsList = [];\r
-            };\r
-            \r
-            /** Widget code ends */\r
-          \r
-            $scope.activateThis = function(ele){\r
-                               $compile(ele.contents())($scope);\r
-                               $scope.$apply();\r
-            };\r
-            $scope.setCommonWidget = function() {\r
-               /* News Events Resources */\r
-                var widgetLength = ($scope.widgetsViewData==null || $scope.widgetsViewData.length==0) ? 0:$scope.widgetsViewData.length;\r
-                $scope.widgetsViewData[widgetLength] = {\r
-                        sizeX: 2,\r
-                        sizeY: 2,\r
-                        headerText: 'News',\r
-                        width: '',\r
-                        height: '',\r
-                        url: '',\r
-                        selected:true\r
-                    };\r
-                $scope.widgetsViewData[widgetLength+1] = {\r
-                        sizeX: 2,\r
-                        sizeY: 2,\r
-                        headerText: 'Calendar Events',\r
-                        width: '',\r
-                        height: '',\r
-                        url: '',\r
-                        selected:true\r
-                    };\r
-                $scope.widgetsViewData[widgetLength+2] = {\r
-                        sizeX: 2,\r
-                        sizeY: 2,\r
-                        headerText: 'Resources',\r
-                        width: '',\r
-                        height: '',\r
-                        url: '',\r
-                        selected:true\r
-                    };\r
-                \r
-                /* Setting News data */\r
-                       $scope.newsData = [];\r
-                       $scope.updateNews = function() {\r
-                               $scope.newsData.length=0;\r
-                               dashboardService.getCommonWidgetData('NEWS').then(function(res) {\r
-                                       // $log.info(res.message);\r
-                                       var newsDataJsonArray = res.response.items;\r
-                                       for (var i = 0; i < newsDataJsonArray.length; i++) {\r
-                                               $scope.newsData.push(newsDataJsonArray[i]);\r
-                                       }\r
-                               })['catch'](function(err) {\r
-                                       $log.error('dashboard controller: failed to get news list', err);                                       \r
-                               });\r
-                       }\r
-                       $scope.updateNews();\r
-                       /* Setting Events data */\r
-\r
-                       $scope.eventData = [];\r
-                       \r
-                       $scope.updateEvents = function() {\r
-                               $scope.eventData.length=0;\r
-                               dashboardService.getCommonWidgetData('EVENTS').then(function(res) {\r
-                                       var eventDataJsonArray = res.response.items;    \r
-                                       for (var i = 0; i < eventDataJsonArray.length; i++) {\r
-                                               if(eventDataJsonArray[i].eventDate !=null) {\r
-                                                       // yyyy-mm-dd\r
-                                                       eventDataJsonArray[i].year = eventDataJsonArray[i].eventDate.substring(2,4);\r
-                                                       eventDataJsonArray[i].mon  = eventDataJsonArray[i].eventDate.substring(5,7);\r
-                                                       eventDataJsonArray[i].day  = eventDataJsonArray[i].eventDate.substring(8,10);\r
-                                               }\r
-                                               $scope.eventData.push(eventDataJsonArray[i]);\r
-                                       }\r
-                               })['catch'](function(err) {\r
-                                       $log.error('dashboard controller: failed to get Events list', err);     \r
-                               });\r
-                       }\r
-                       $scope.updateEvents();\r
-                       /* Setting Important Resources data */\r
-\r
-                       $scope.importResData = [];\r
-                       $scope.updateImportRes = function() {\r
-                               $scope.importResData.length=0;\r
-                               dashboardService.getCommonWidgetData('IMPORTANTRESOURCES').then(\r
-                                               function(res) {\r
-                                                       // $log.info(res);\r
-                                                       var importResDataJSONArray = res.response.items;\r
-                                                       for (var i = 0; i < importResDataJSONArray.length; i++) {\r
-                                                               $scope.importResData.push(importResDataJSONArray[i]);\r
-                                                       }\r
-                                               })['catch'](function(err) {\r
-                                       $log.error('dashboard controller: failed to get resources list...', err);\r
-                               });\r
-                       }\r
-                       $scope.updateImportRes();\r
-                \r
-                /** ******End hardcoded news events and resources*************** */\r
-                       \r
-            }\r
-            \r
-               $scope.newsGridsterItem = {\r
-                               headerText : 'Test',\r
-                               subHeaderText : ''\r
-               };\r
-               \r
-               $scope.newsGridsterItem = {\r
-                       headerText : 'News',\r
-                       subHeaderText : ''\r
-               };\r
-            \r
-            $scope.eventsGridsterItem = {\r
-               headerText : 'Events',\r
-                       subHeaderText : ''\r
-               };\r
-\r
-               $scope.impoResGridsterItem = {\r
-                       headerText : 'Resources',\r
-                       subHeaderText : ''\r
-               };\r
-               \r
-            this.gridsterOpts = {\r
-                columns: 6,\r
-                colWidth: 190,\r
-                rowHeight: 190,\r
-                margins: [20, 20],\r
-                outerMargin: true,\r
-                pushing: true,\r
-                floating: true,\r
-                swapping: true,\r
-                draggable: {\r
-                       handle: '.icon-content-gridguide'\r
-                }\r
-            };\r
-            \r
-            // Run this function when user clicks on checkbox.\r
-               $scope.storeSelection = function(widget) {\r
-                       \r
-                       // not needed as only 'SHOW' and 'HIDE' status_cd is expected from the micro service now\r
-                       /*var pendingFlag = false;                      \r
-                       if(widget.access) \r
-                               pendingFlag = false;\r
-                       else\r
-                               pendingFlag =  widget.pending;  */      \r
-                       \r
-                       var appData = { \r
-                                       widgetId: widget.widgetid,\r
-                                       select  : widget.select,\r
-                               //      pending : pendingFlag   \r
-                       };\r
-\r
-                       widgetsCatalogService.updateWidgetCatalog(appData).then(\r
-                               function(result) {\r
-                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);\r
-                               })['catch'](function(err) {\r
-                                       $log.error('CatalogCtrl:storeSelection: exception: ', err);\r
-                               });\r
-               };\r
-\r
-            init();\r
-        }\r
-    }\r
-    \r
-    \r
-    \r
-    WidgetCatalogCtrl.$inject = ['widgetsService', '$log', '$cookies', '$scope', 'conf', 'beReaderService', 'widgetsCatalogService', 'userProfileService','dashboardService','$compile','ngDialog'];\r
-    angular.module('ecompApp').controller('WidgetCatalogCtrl', WidgetCatalogCtrl);\r
-\r
-    angular.module('ecompApp').constant('refreshInterval', '30000');\r
-\r
-    angular.module('ecompApp').directive('refreshIframe', ['$interval', 'refreshInterval', function ($interval, refreshInterval) {\r
-\r
-        function link(scope, element, attrs) {\r
-            var timeoutId;\r
-\r
-            function updateIframe() {\r
-                if(attrs.isEnlarged == "false")\r
-                {\r
-                    element.attr('src', element.attr('src'));\r
-                }\r
-            }\r
-\r
-            element.on('$destroy', function () {\r
-                $interval.cancel(timeoutId);\r
-            });\r
-\r
-            // start the UI update process; save the timeoutId for cancelling\r
-            /*\r
-                        * timeoutId = $interval(function () { updateIframe(); // update DOM },\r
-                        * refreshInterval);\r
-                        */\r
-        }\r
-\r
-        return {\r
-            link: link\r
-        };\r
-    } ]);\r
-\r
-})();\r
-\r
-\r
-app.directive('dynAttr', function() {\r
-    return {\r
-        scope: { list: '=dynAttr' },\r
-        link: function(scope, elem, attrs){\r
-            for(var attr in scope.list){\r
-                elem.attr(scope.list[attr].attr, scope.list[attr].value);   \r
-            }\r
-        }\r
-    };\r
-});     \r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+
+    class WidgetCatalogCtrl {
+        constructor(widgetsService, $log, $cookies, $scope, conf, beReaderService, widgetsCatalogService, userProfileService,dashboardService,$compile, ngDialog) {
+            
+               $scope.editWidgetModalPopup = function(availableData, resourceType) {
+                       $scope.editData = JSON.stringify(availableData);
+                       $scope.availableDataTemp = $scope.availableData;
+                       ngDialog.open({
+                                       templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',
+                                       controller : 'CommonWidgetController',
+                                       resolve : {
+                                               message : function message() {
+                                                       var message = {
+                                                               type : resourceType,
+                                                               availableData : $scope.editData
+                                                       };
+                                                       return message;
+                                               }
+                                       }
+                               }).closePromise.then(needUpdate => {    
+                                       if(resourceType=='NEWS'){
+                                               $scope.updateNews();
+                                       }else if(resourceType=='EVENTS'){
+                                               $scope.updateEvents();
+                                       }else if(resourceType=='IMPORTANTRESOURCES'){
+                                               $scope.updateImportRes();
+                                       }
+                 });           
+               };
+               
+               $scope.WidgetCatView = [];  
+               $scope.applyPresentationDetailsToWidgetsCatalog = function(widgetsReturned){
+                       var rowNo = 0;
+                       for (var i = 0; i < widgetsReturned.length; i++) {
+                       $scope.WidgetCatView[i] = {
+                       sizeX : 2,
+                       sizeY : 2,
+                       headerText:'',
+                       widgetIdentifier : '',
+                       url : '',
+                       widgetid: '',
+                       attrb:'',
+                       select: false,
+                       };
+                       $scope.WidgetCatView[i].widgetid = widgetsReturned[i].id;
+                       $scope.WidgetCatView[i].headerText = widgetsReturned[i].headerName;
+
+                       if(widgetsReturned[i].headerName === 'widget-news'){
+                       $scope.WidgetCatView[i].widgetIdentifier = 'NEWS';
+                       }
+                       else
+                       if(widgetsReturned[i].headerName === 'widget-resources'){
+                       $scope.WidgetCatView[i].widgetIdentifier = 'IMPORTANTRESOURCES';
+                       }
+                       else
+                       if(widgetsReturned[i].headerName === 'widget-events'){
+                       $scope.WidgetCatView[i].widgetIdentifier = 'EVENTS';
+                       }
+
+                       $scope.WidgetCatView[i].url = widgetsReturned[i].url;
+                       $scope.WidgetCatView[i].attrb = widgetsReturned[i].attrs;
+                       $scope.WidgetCatView[i].select = widgetsReturned[i].select;                     
+                       }
+
+                       $scope.widgetViewData = $scope.WidgetCatView;
+                       
+                       }
+               
+               /** Widget code starts */
+            let getUserWidgets = (loginName) => {
+                
+                this.isCommError = false;
+                var conf = this.conf;
+                        widgetsCatalogService.getUserWidgets(loginName).then(res => {
+                                
+                                if(!(res instanceof Array)){
+                                       this.isCommError = true;
+                                       return;
+                                }
+                        for(var i = 0; i < res.length; i++){   
+                                var widget_id = res[i][0];
+                                var widget_name = res[i][1];
+                                let url = this.conf.api.widgetCommon + "/" + widget_id + "/framework.js";
+                                $scope.widgetsList.push({
+                                                  id: widget_id,
+                                          name: widget_name,
+                                          headerName: widget_name,
+                                          url: url,
+                                          attrs: [{attr: 'data-' + widget_id, value: ''}],
+                                          status: res[i][4],
+                                          select: (res[i][4] == 'S' || res[i][4] === null) ? true : false
+                                        }); 
+                                var script = document
+                                        .createElement('script');
+                                        script.src = url;
+                                        script.async = true;
+                                        var entry = document
+                                               .getElementsByTagName('script')[0];
+                                        entry.parentNode
+                                               .insertBefore(script, entry);
+                        }
+                        $scope.applyPresentationDetailsToWidgetsCatalog($scope.widgetsList);
+                 }).catch(err => {
+                     $log.error('WidgetCatalogCtrl::getUserWidgets caught error', err);
+                 }).finally(()=> {
+                        
+                 });
+            };
+            
+            let init = () => {
+               userProfileService.getUserProfile()
+                .then(profile=> {
+                    // $log.info('WidgetCatalogCtrl::getUserProfile: ',
+                                       // profile);
+                    $scope.orgUserId = profile.orgUserId;
+                    $scope.widgetsViewData = [];
+                    $scope.widgetsView = [];    
+                       getUserWidgets($scope.orgUserId);  
+                });
+                this.conf = conf;
+                $scope.widgetsList = [];
+            };
+            
+            /** Widget code ends */
+          
+            $scope.activateThis = function(ele){
+                               $compile(ele.contents())($scope);
+                               $scope.$apply();
+            };
+            $scope.setCommonWidget = function() {
+               /* News Events Resources */
+                var widgetLength = ($scope.widgetsViewData==null || $scope.widgetsViewData.length==0) ? 0:$scope.widgetsViewData.length;
+                $scope.widgetsViewData[widgetLength] = {
+                        sizeX: 2,
+                        sizeY: 2,
+                        headerText: 'News',
+                        width: '',
+                        height: '',
+                        url: '',
+                        selected:true
+                    };
+                $scope.widgetsViewData[widgetLength+1] = {
+                        sizeX: 2,
+                        sizeY: 2,
+                        headerText: 'Calendar Events',
+                        width: '',
+                        height: '',
+                        url: '',
+                        selected:true
+                    };
+                $scope.widgetsViewData[widgetLength+2] = {
+                        sizeX: 2,
+                        sizeY: 2,
+                        headerText: 'Resources',
+                        width: '',
+                        height: '',
+                        url: '',
+                        selected:true
+                    };
+                
+                /* Setting News data */
+                       $scope.newsData = [];
+                       $scope.updateNews = function() {
+                               $scope.newsData.length=0;
+                               dashboardService.getCommonWidgetData('NEWS').then(function(res) {
+                                       // $log.info(res.message);
+                                       var newsDataJsonArray = res.response.items;
+                                       for (var i = 0; i < newsDataJsonArray.length; i++) {
+                                               $scope.newsData.push(newsDataJsonArray[i]);
+                                       }
+                               })['catch'](function(err) {
+                                       $log.error('dashboard controller: failed to get news list', err);                                       
+                               });
+                       }
+                       $scope.updateNews();
+                       /* Setting Events data */
+
+                       $scope.eventData = [];
+                       
+                       $scope.updateEvents = function() {
+                               $scope.eventData.length=0;
+                               dashboardService.getCommonWidgetData('EVENTS').then(function(res) {
+                                       var eventDataJsonArray = res.response.items;    
+                                       for (var i = 0; i < eventDataJsonArray.length; i++) {
+                                               if(eventDataJsonArray[i].eventDate !=null) {
+                                                       // yyyy-mm-dd
+                                                       eventDataJsonArray[i].year = eventDataJsonArray[i].eventDate.substring(2,4);
+                                                       eventDataJsonArray[i].mon  = eventDataJsonArray[i].eventDate.substring(5,7);
+                                                       eventDataJsonArray[i].day  = eventDataJsonArray[i].eventDate.substring(8,10);
+                                               }
+                                               $scope.eventData.push(eventDataJsonArray[i]);
+                                       }
+                               })['catch'](function(err) {
+                                       $log.error('dashboard controller: failed to get Events list', err);     
+                               });
+                       }
+                       $scope.updateEvents();
+                       /* Setting Important Resources data */
+
+                       $scope.importResData = [];
+                       $scope.updateImportRes = function() {
+                               $scope.importResData.length=0;
+                               dashboardService.getCommonWidgetData('IMPORTANTRESOURCES').then(
+                                               function(res) {
+                                                       // $log.info(res);
+                                                       var importResDataJSONArray = res.response.items;
+                                                       for (var i = 0; i < importResDataJSONArray.length; i++) {
+                                                               $scope.importResData.push(importResDataJSONArray[i]);
+                                                       }
+                                               })['catch'](function(err) {
+                                       $log.error('dashboard controller: failed to get resources list...', err);
+                               });
+                       }
+                       $scope.updateImportRes();
+                
+                /** ******End hardcoded news events and resources*************** */
+                       
+            }
+            
+               $scope.newsGridsterItem = {
+                               headerText : 'Test',
+                               subHeaderText : ''
+               };
+               
+               $scope.newsGridsterItem = {
+                       headerText : 'News',
+                       subHeaderText : ''
+               };
+            
+            $scope.eventsGridsterItem = {
+               headerText : 'Events',
+                       subHeaderText : ''
+               };
+
+               $scope.impoResGridsterItem = {
+                       headerText : 'Resources',
+                       subHeaderText : ''
+               };
+               
+            this.gridsterOpts = {
+                columns: 6,
+                colWidth: 190,
+                rowHeight: 190,
+                margins: [20, 20],
+                outerMargin: true,
+                pushing: true,
+                floating: true,
+                swapping: true,
+                draggable: {
+                       handle: '.icon-content-gridguide'
+                }
+            };
+            
+            // Run this function when user clicks on checkbox.
+               $scope.storeSelection = function(widget) {
+                       
+                       // not needed as only 'SHOW' and 'HIDE' status_cd is expected from the micro service now
+                       /*var pendingFlag = false;                      
+                       if(widget.access) 
+                               pendingFlag = false;
+                       else
+                               pendingFlag =  widget.pending;  */      
+                       
+                       var appData = { 
+                                       widgetId: widget.widgetid,
+                                       select  : widget.select,
+                               //      pending : pendingFlag   
+                       };
+
+                       widgetsCatalogService.updateWidgetCatalog(appData).then(
+                               function(result) {
+                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);
+                               })['catch'](function(err) {
+                                       $log.error('CatalogCtrl:storeSelection: exception: ', err);
+                               });
+               };
+
+            init();
+        }
+    }
+    
+    
+    
+    WidgetCatalogCtrl.$inject = ['widgetsService', '$log', '$cookies', '$scope', 'conf', 'beReaderService', 'widgetsCatalogService', 'userProfileService','dashboardService','$compile','ngDialog'];
+    angular.module('ecompApp').controller('WidgetCatalogCtrl', WidgetCatalogCtrl);
+
+    angular.module('ecompApp').constant('refreshInterval', '30000');
+
+    angular.module('ecompApp').directive('refreshIframe', ['$interval', 'refreshInterval', function ($interval, refreshInterval) {
+
+        function link(scope, element, attrs) {
+            var timeoutId;
+
+            function updateIframe() {
+                if(attrs.isEnlarged == "false")
+                {
+                    element.attr('src', element.attr('src'));
+                }
+            }
+
+            element.on('$destroy', function () {
+                $interval.cancel(timeoutId);
+            });
+
+            // start the UI update process; save the timeoutId for cancelling
+            /*
+                        * timeoutId = $interval(function () { updateIframe(); // update DOM },
+                        * refreshInterval);
+                        */
+        }
+
+        return {
+            link: link
+        };
+    } ]);
+
+})();
+
+
+app.directive('dynAttr', function() {
+    return {
+        scope: { list: '=dynAttr' },
+        link: function(scope, elem, attrs){
+            for(var attr in scope.list){
+                elem.attr(scope.list[attr].attr, scope.list[attr].value);   
+            }
+        }
+    };
+});     
index 77659d9..5c42f4c 100644 (file)
@@ -1,20 +1,20 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
index 1b77a28..84bf0f5 100644 (file)
@@ -1,76 +1,76 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-       <div class="w-ecomp-main-container">\r
-               <div class="widget-catalog" id="widget-page-content">\r
-                       <div id="title" class="w-ecomp-main-view-title">\r
-                               <h1 class="heading-page">Widget Catalog</h1>\r
-                       </div>\r
-                       <div class="widget-centerAlignment">\r
-                               <div class="portals-list">\r
-                                       <div ng-show="widgetCatalog.isCommError">Failed to\r
-                                               communicate with the widget microservice.</div>\r
-                                       <div id="widgets" class="information-section"\r
-                                               ng-hide="widgetCatalog.isCommError">\r
-                                               <div id="news-gridster-container"\r
-                                                       class="gridster-container override_background">\r
-                                                       <div class="content" gridster="widgetCatalog.gridsterOpts">\r
-                                                               <ul>\r
-                                                                       <li gridster-item="widget" ng-repeat="widget in widgetViewData">\r
-                                                                               <div class="box">\r
-                                                                                       <div class="box-header">\r
-                                                                                               <i style="cursor: move;" class="icon-content-gridguide"></i>\r
-                                                                                               <h3>{{ widget.headerText}}</h3>\r
-                                                                                               <div class="form-row">\r
-                                                                                                       <label id="widget-checkbox-label" class="checkbox"> <input type="checkbox"\r
-                                                                                                               id="{{widget.headerText.split(' ').join('-')}}-checkbox"\r
-                                                                                                               ng-model="widget.select"\r
-                                                                                                               ng-change="storeSelection(widget)"> <i\r
-                                                                                                               class="skin"></i>\r
-                                                                                                       </label>\r
-                                                                                               </div>\r
-                                                                                       </div>\r
-                                                                                       <div class="box-content">\r
-                                                                                               <div dyn-attr="widget.attrb"></div>\r
-                                                                                       </div>\r
-                                                                               </div>\r
-                                                                       </li>\r
-                                                               </ul>\r
-                                                       </div>\r
-                                               </div>\r
-                                       </div>\r
-                                       <div ng-show="widgetCatalog.isEnlarged">\r
-                                               <div id="widgets-button-enlarge-close"\r
-                                                       class="enlarge-close-button"\r
-                                                       ng-click="widgetCatalog.isEnlarged=false">X</div>\r
-                                               <iframe id="iframe-widget-enlarge-close"\r
-                                                       ng-src="{{widgetCatalog.enlargeURL | trusted}}"\r
-                                                       class="enlarge-content"> </iframe>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div id="widgets-disclaimer" class="w-ecomp-main-disclaimer">\r
-                               To request access to an application widget, please visit the <a\r
-                                       ng-href="getAccess">Get Access</a> page.\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+       <div class="w-ecomp-main-container">
+               <div class="widget-catalog" id="widget-page-content">
+                       <div id="title" class="w-ecomp-main-view-title">
+                               <h1 class="heading-page">Widget Catalog</h1>
+                       </div>
+                       <div class="widget-centerAlignment">
+                               <div class="portals-list">
+                                       <div ng-show="widgetCatalog.isCommError">Failed to
+                                               communicate with the widget microservice.</div>
+                                       <div id="widgets" class="information-section"
+                                               ng-hide="widgetCatalog.isCommError">
+                                               <div id="news-gridster-container"
+                                                       class="gridster-container override_background">
+                                                       <div class="content" gridster="widgetCatalog.gridsterOpts">
+                                                               <ul>
+                                                                       <li gridster-item="widget" ng-repeat="widget in widgetViewData">
+                                                                               <div class="box">
+                                                                                       <div class="box-header">
+                                                                                               <i style="cursor: move;" class="icon-content-gridguide"></i>
+                                                                                               <h3>{{ widget.headerText}}</h3>
+                                                                                               <div class="form-row">
+                                                                                                       <label id="widget-checkbox-label" class="checkbox"> <input type="checkbox"
+                                                                                                               id="{{widget.headerText.split(' ').join('-')}}-checkbox"
+                                                                                                               ng-model="widget.select"
+                                                                                                               ng-change="storeSelection(widget)"> <i
+                                                                                                               class="skin"></i>
+                                                                                                       </label>
+                                                                                               </div>
+                                                                                       </div>
+                                                                                       <div class="box-content">
+                                                                                               <div dyn-attr="widget.attrb"></div>
+                                                                                       </div>
+                                                                               </div>
+                                                                       </li>
+                                                               </ul>
+                                                       </div>
+                                               </div>
+                                       </div>
+                                       <div ng-show="widgetCatalog.isEnlarged">
+                                               <div id="widgets-button-enlarge-close"
+                                                       class="enlarge-close-button"
+                                                       ng-click="widgetCatalog.isEnlarged=false">X</div>
+                                               <iframe id="iframe-widget-enlarge-close"
+                                                       ng-src="{{widgetCatalog.enlargeURL | trusted}}"
+                                                       class="enlarge-content"> </iframe>
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div id="widgets-disclaimer" class="w-ecomp-main-disclaimer">
+                               To request access to an application widget, please visit the <a
+                                       ng-href="getAccess">Get Access</a> page.
+                       </div>
+               </div>
+       </div>
+</div>
index 0a9dd12..ad88c02 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class WidgetOnboardingDetailsModalCtrl {\r
-        constructor($scope, $log, $interval, applicationsService, adminsService, microserviceService, widgetsCatalogService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies) {\r
-           \r
-           this.appUpdate = function(){\r
-               this.hasSelectedApp = false;\r
-               this.appCounter = 0;\r
-               for(var i = 0; i < this.availableApps.length; i++){\r
-                       if(this.availableApps[i].isSelected){\r
-                               this.appCounter++;\r
-                               if(!this.hasSelectedApp)\r
-                                       this.hasSelectedApp = true;\r
-                       }\r
-                       if(this.availableApps[i].isSelected\r
-                       && this.availableApps[i].roles.length == 0){\r
-                               var index = i;\r
-                               this.availableRoles = [];    \r
-                               adminsService.getRolesByApp(this.availableApps[i].id).then(roles => {\r
-                                          for(var i = 0; i < roles.length; i++){\r
-                                                  this.availableRoles.push({\r
-                                                          id: roles[i].id,\r
-                                                  name: roles[i].name,\r
-                                                  isSelected: false,\r
-                                                  }); \r
-                                          }\r
-                                          this.availableApps[index].roles = this.availableRoles;\r
-                               });\r
-                       }\r
-                           }\r
-               this.allRoleSelected = true;\r
-               this.checkRoleSelected();\r
-           }\r
-           \r
-           this.roleUpdate = function(app){\r
-                       this.allRoleSelected = true;\r
-               for(var i = 0; i < app.roles.length; i++){\r
-                       if(app.roles[i].isSelected){\r
-                               app.roleSelected = true;\r
-                               this.checkRoleSelected();\r
-                               return;\r
-                       }\r
-               }\r
-                       app.roleSelected = false;\r
-                       this.checkRoleSelected();\r
-           }\r
-           \r
-           this.checkRoleSelected = function(){\r
-               for(var i = 0; i < this.availableApps.length; i++){\r
-                       if(this.availableApps[i].isSelected\r
-                       && !this.availableApps[i].roleSelected){\r
-                               this.allRoleSelected = false;\r
-                               return;\r
-                       }\r
-               }\r
-           }\r
-                  \r
-           this.getAppName = function(appId){\r
-                for(var i = 0; i < this.availableApps.length; i++){\r
-                        if(this.availableApps[i].id == appId){\r
-                                return this.availableApps[i].name;\r
-                        }\r
-                }\r
-           }\r
-           \r
-            let newWidgetModel = {\r
-                name: null,\r
-                roleId: null,\r
-                roleName: null,\r
-                appId: null,\r
-                appName: null,\r
-                url: null,\r
-                showAppOptions: false,\r
-                showRoleOptions: false,\r
-                hasSelectedApp: false\r
-            };\r
-          \r
-            let getAvailableApps = () => {             \r
-               \r
-               if(this.isEditMode == false){   \r
-                       applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {\r
-                               this.availableApps=[];\r
-                               for(var i=0;i<apps.length;i++) {\r
-                               if (!apps[i].restrictedApp) {\r
-                            this.availableApps.push({\r
-                                id: apps[i].id,\r
-                                name: apps[i].name,\r
-                                roles: [],\r
-                                roleSelected: false,\r
-                                isSelected: false,\r
-                            });\r
-                               }\r
-                           }\r
-                       }).catch(err => {\r
-                           $log.error(err);\r
-                       });\r
-               }\r
-               else if(this.isEditMode == true){\r
-                       if(this.widget.allowAllUser == "Y")\r
-                               this.widget.allUser = true;\r
-                       applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {\r
-                               this.availableApps=[];\r
-                               let selectedApps = {};\r
-                               var availableApps = this.availableApps;  \r
-                               this.allRoleSelected = true;\r
-                               for(var i=0; i < this.widget.widgetRoles.length; i++){\r
-                                       if(selectedApps[this.widget.widgetRoles[i].app.appId] != undefined)\r
-                                               selectedApps[this.widget.widgetRoles[i].app.appId] += this.widget.widgetRoles[i].roleId + ";" + this.widget.widgetRoles[i].roleName + ";"; \r
-                                       else{\r
-                                               selectedApps[this.widget.widgetRoles[i].app.appId] = this.widget.widgetRoles[i].roleId + ";" + this.widget.widgetRoles[i].roleName + ";";                       \r
-                                               this.appCounter++;\r
-                                       }\r
-                               }                       \r
-                               apps.forEach(function(app, index){\r
-                                               availableApps.push({\r
-                                      id: app.id,\r
-                                      name: app.name,\r
-                                      roles: [],\r
-                                      roleSelected: false,\r
-                                      isSelected: false,\r
-                                               });\r
-                                               if(selectedApps[app.id] != undefined){\r
-                                                       adminsService.getRolesByApp(app.id).then(roles => {\r
-                                                       var role = selectedApps[app.id].split(';');\r
-                                               var selectedRoles = [];\r
-                                               var n = 0;\r
-                                               while((n+1) < role.length){\r
-                                                       selectedRoles.push({\r
-                                                                          id: role[n++],\r
-                                                                  name: role[n++],\r
-                                                                  isSelected: true,\r
-                                                               });\r
-                                               }                                       \r
-                                                       for(var m = 0; m < roles.length; m++){\r
-                                                               var hasSelected = true;\r
-                                                               for(var n = 0; n < selectedRoles.length; n++){\r
-                                                                       if(selectedRoles[n].id == roles[m].id){\r
-                                                                               hasSelected = false;\r
-                                                                               break;\r
-                                                                       }\r
-                                                               }\r
-                                                               if(hasSelected){\r
-                                                                  selectedRoles.push({\r
-                                                                          id: roles[m].id,\r
-                                                                  name: roles[m].name,\r
-                                                                  isSelected: false,\r
-                                                                  }); \r
-                                                               }          \r
-                                                       }  \r
-                                                       availableApps[index].roleSelected = true;\r
-                                                       availableApps[index].isSelected = true;\r
-                                                       availableApps[index].roles = selectedRoles;\r
-                                                       });\r
-                                               }\r
-                               })\r
-                       })\r
-               }\r
-            };\r
-            \r
-            let getAvailableServices = () =>{\r
-               microserviceService.getServiceList().then(services => {\r
-                       this.availableServices = [];\r
-                       for(var i = 0; i < services.length; i++){\r
-                               this.availableServices.push({\r
-                                       id: services[i].id,\r
-                                       name: services[i].name,\r
-                                       option: services[i].name + ": " + services[i].url\r
-                               });\r
-                               \r
-                               if(this.widget.service != null && this.widget.service.id == services[i].id){\r
-                                       this.widget.serviceURL = this.availableServices[i];\r
-                               }\r
-                       }\r
-                }).catch(err => {\r
-                   $log.error(err);\r
-                });\r
-            }\r
-            \r
-\r
-            let init = () => {\r
-               $log.info('WidgetOnboardingDetailsModalCtrl::init');\r
-                this.widgetsList = [];\r
-                this.duplicatedName = true;\r
-                this.allRoleSelected = false;\r
-                this.appCounter = 0;\r
-               this.isSaving = false;\r
-               this.allUser = false;\r
-               this.emptyWidgetName = false;\r
-               \r
-                if ($scope.ngDialogData && $scope.ngDialogData.widget) {\r
-                    this.isEditMode = true;\r
-                       this.allRoleSelected = true;\r
-                    this.widget = _.clone($scope.ngDialogData.widget);\r
-                } else {\r
-                    this.isEditMode = false;\r
-                    this.widget = _.clone(newWidgetModel);\r
-                }\r
-                \r
-                widgetsCatalogService.getManagedWidgets().then(res => {\r
-                       for(var i = 0; i < res.length; i++){\r
-                               this.widgetsList.push(res[i].name);\r
-                       }\r
-                 }).catch(err => {\r
-                     $log.error('WidgetOnboardingDetailsModalCtrl::init error: ' + err);\r
-                 }).finally(()=> {\r
-                     this.isLoadingTable = false;\r
-                 });\r
-                 getAvailableApps();\r
-                 getAvailableServices();\r
-            };\r
-            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;\r
-            this.conflictMessages = {};\r
-            this.scrollApi = {};\r
-\r
-            let resetConflict = fieldName => {\r
-                delete this.conflictMessages[fieldName];\r
-                if($scope.widgetForm[fieldName]){\r
-                    $scope.widgetForm[fieldName].$setValidity('conflict', true);\r
-                }\r
-            };\r
-            \r
-            this.updateSelectedRole = () => {\r
-                if (!this.selectedRole) {\r
-                    return;\r
-                }\r
-                this.widget.RoleId = this.selectedRole.id;\r
-                this.widget.RoleName = this.selectedRole.name;\r
-            };\r
-            \r
-            let emptyCookies = () => {\r
-                userProfileService.getUserProfile()\r
-                .then(profile=> {\r
-                    $log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile);\r
-                    $scope.orgUserId = profile.orgUserId;\r
-                    $log.info('user has the following orgUserId: ' + profile.orgUserId);\r
-                    if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) {\r
-                        $cookies.remove($scope.orgUserId + '_widget');\r
-                    }\r
-                });\r
-            };\r
-              \r
-            this.updateWidgetName = () => {\r
-               for(var i = 0; i < this.widgetsList.length; i++){\r
-                       if(this.widget.name.toUpperCase() == this.widgetsList[i].toUpperCase()){\r
-                               this.duplicatedName = false;\r
-                               return;\r
-                       }\r
-               }\r
-               this.duplicatedName = true;\r
-            };\r
-            \r
-            this.saveChanges = () => {     \r
-               \r
-               if(!this.isEditMode)\r
-                       this.updateWidgetName();\r
-               \r
-               if(this.duplicatedName == false \r
-                  || this.widget.name == ''\r
-                  || this.widget.name == undefined){\r
-                       this.emptyWidgetName = true;\r
-                       return;\r
-                }\r
-               \r
-               if((this.widget.file == undefined && !this.isEditMode) ||\r
-               (!this.widget.allUser && this.appCounter == 0) ||\r
-               this.widget.name == null ||\r
-               (!this.widget.allUser && !this.allRoleSelected) ||\r
-               this.widget.saving == true)\r
-                       return; \r
-               \r
-               \r
-                       this.widget.saving = true;\r
-               var selectedRoles = [];\r
-               if(!this.widget.allUser){\r
-                       for(var i = 0; i < this.availableApps.length; i++){\r
-                               if(this.availableApps[i].isSelected){\r
-                                               for(var n = 0; n < this.availableApps[i].roles.length; n++) {\r
-                                                       if(this.availableApps[i].roles[n].isSelected){\r
-                                                       var role = {\r
-                                                               app: {\r
-                                                                       appId: this.availableApps[i].id\r
-                                                               },\r
-                                                               roleId: this.availableApps[i].roles[n].id,\r
-                                                               roleName: this.availableApps[i].roles[n].name,\r
-                                                               };\r
-                                                       selectedRoles.push(role);\r
-                                                       }\r
-                                       }\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               var allowAllUser = 0;\r
-               if(this.widget.allUser)\r
-                       allowAllUser = 1;       \r
-               \r
-               var serviceId = null;\r
-               if(this.widget.serviceURL != null &&\r
-               this.widget.serviceURL != undefined){\r
-                       serviceId = this.widget.serviceURL.id;\r
-               }\r
-               \r
-               \r
-               var file_loc = this.widget.name + ".zip";\r
-               var newWidget = {\r
-                               name: this.widget.name,\r
-                               desc: this.widget.desc,\r
-                               widgetRoles: selectedRoles,\r
-                               fileLocation: file_loc,\r
-                               allowAllUser: allowAllUser,\r
-                               serviceId: serviceId\r
-               };\r
-               \r
-               if(this.isEditMode){\r
-                       \r
-                       if(this.widget.file != undefined){\r
-                               widgetsCatalogService.updateWidgetWithFile(this.widget.file, this.widget.id, newWidget).then(res => {\r
-                                       if(!res.valid){\r
-                                               if(!res.error){\r
-                                                       confirmBoxService.showInformation("Could not save. Please retry.");\r
-                                                       this.widget.saving = false;\r
-                                                       return;\r
-                                               }\r
-                                               confirmBoxService.showInformation(res.error);\r
-                                               this.widget.saving = false;\r
-                                               return;\r
-                                       }\r
-                                       $scope.closeThisDialog(true);\r
-                               this.widget.saving = false;\r
-                               });     \r
-                       }\r
-                       else{\r
-                               widgetsCatalogService.updateWidget(this.widget.id, newWidget)\r
-                               .then(() => {\r
-                                       $scope.closeThisDialog(true); \r
-                           });\r
-                       }\r
-               }\r
-               else{\r
-                       widgetsCatalogService.createWidget(newWidget, this.widget.file).then(res => {\r
-                               if(!res.valid){\r
-                                               if(!res.error)\r
-                                                       confirmBoxService.showInformation("Could not save. Please retry.");\r
-                                               else\r
-                                                       confirmBoxService.showInformation(res.error);\r
-                                               this.widget.saving = false;\r
-                                               return;\r
-                                       }\r
-                               $scope.closeThisDialog(true);\r
-                               this.widget.saving = false;\r
-                       });\r
-               }\r
-            };\r
-            init();\r
-            $scope.$on('$stateChangeStart', e => {\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    WidgetOnboardingDetailsModalCtrl.$inject = ['$scope', '$log', '$interval', 'applicationsService', 'adminsService', 'microserviceService', 'widgetsCatalogService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies'];\r
-    angular.module('ecompApp').controller('WidgetOnboardingDetailsModalCtrl', WidgetOnboardingDetailsModalCtrl);\r
-})(); \r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class WidgetOnboardingDetailsModalCtrl {
+        constructor($scope, $log, $interval, applicationsService, adminsService, microserviceService, widgetsCatalogService, errorMessageByCode, ECOMP_URL_REGEX, $window,userProfileService, confirmBoxService, $cookies) {
+           
+           this.appUpdate = function(){
+               this.hasSelectedApp = false;
+               this.appCounter = 0;
+               for(var i = 0; i < this.availableApps.length; i++){
+                       if(this.availableApps[i].isSelected){
+                               this.appCounter++;
+                               if(!this.hasSelectedApp)
+                                       this.hasSelectedApp = true;
+                       }
+                       if(this.availableApps[i].isSelected
+                       && this.availableApps[i].roles.length == 0){
+                               var index = i;
+                               this.availableRoles = [];    
+                               adminsService.getRolesByApp(this.availableApps[i].id).then(roles => {
+                                          for(var i = 0; i < roles.length; i++){
+                                                  this.availableRoles.push({
+                                                          id: roles[i].id,
+                                                  name: roles[i].name,
+                                                  isSelected: false,
+                                                  }); 
+                                          }
+                                          this.availableApps[index].roles = this.availableRoles;
+                               });
+                       }
+                           }
+               this.allRoleSelected = true;
+               this.checkRoleSelected();
+           }
+           
+           this.roleUpdate = function(app){
+                       this.allRoleSelected = true;
+               for(var i = 0; i < app.roles.length; i++){
+                       if(app.roles[i].isSelected){
+                               app.roleSelected = true;
+                               this.checkRoleSelected();
+                               return;
+                       }
+               }
+                       app.roleSelected = false;
+                       this.checkRoleSelected();
+           }
+           
+           this.checkRoleSelected = function(){
+               for(var i = 0; i < this.availableApps.length; i++){
+                       if(this.availableApps[i].isSelected
+                       && !this.availableApps[i].roleSelected){
+                               this.allRoleSelected = false;
+                               return;
+                       }
+               }
+           }
+                  
+           this.getAppName = function(appId){
+                for(var i = 0; i < this.availableApps.length; i++){
+                        if(this.availableApps[i].id == appId){
+                                return this.availableApps[i].name;
+                        }
+                }
+           }
+           
+            let newWidgetModel = {
+                name: null,
+                roleId: null,
+                roleName: null,
+                appId: null,
+                appName: null,
+                url: null,
+                showAppOptions: false,
+                showRoleOptions: false,
+                hasSelectedApp: false
+            };
+          
+            let getAvailableApps = () => {             
+               
+               if(this.isEditMode == false){   
+                       applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {
+                               this.availableApps=[];
+                               for(var i=0;i<apps.length;i++) {
+                               if (!apps[i].restrictedApp) {
+                            this.availableApps.push({
+                                id: apps[i].id,
+                                name: apps[i].name,
+                                roles: [],
+                                roleSelected: false,
+                                isSelected: false,
+                            });
+                               }
+                           }
+                       }).catch(err => {
+                           $log.error(err);
+                       });
+               }
+               else if(this.isEditMode == true){
+                       if(this.widget.allowAllUser == "Y")
+                               this.widget.allUser = true;
+                       applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {
+                               this.availableApps=[];
+                               let selectedApps = {};
+                               var availableApps = this.availableApps;  
+                               this.allRoleSelected = true;
+                               for(var i=0; i < this.widget.widgetRoles.length; i++){
+                                       if(selectedApps[this.widget.widgetRoles[i].app.appId] != undefined)
+                                               selectedApps[this.widget.widgetRoles[i].app.appId] += this.widget.widgetRoles[i].roleId + ";" + this.widget.widgetRoles[i].roleName + ";"; 
+                                       else{
+                                               selectedApps[this.widget.widgetRoles[i].app.appId] = this.widget.widgetRoles[i].roleId + ";" + this.widget.widgetRoles[i].roleName + ";";                       
+                                               this.appCounter++;
+                                       }
+                               }                       
+                               apps.forEach(function(app, index){
+                                               availableApps.push({
+                                      id: app.id,
+                                      name: app.name,
+                                      roles: [],
+                                      roleSelected: false,
+                                      isSelected: false,
+                                               });
+                                               if(selectedApps[app.id] != undefined){
+                                                       adminsService.getRolesByApp(app.id).then(roles => {
+                                                       var role = selectedApps[app.id].split(';');
+                                               var selectedRoles = [];
+                                               var n = 0;
+                                               while((n+1) < role.length){
+                                                       selectedRoles.push({
+                                                                          id: role[n++],
+                                                                  name: role[n++],
+                                                                  isSelected: true,
+                                                               });
+                                               }                                       
+                                                       for(var m = 0; m < roles.length; m++){
+                                                               var hasSelected = true;
+                                                               for(var n = 0; n < selectedRoles.length; n++){
+                                                                       if(selectedRoles[n].id == roles[m].id){
+                                                                               hasSelected = false;
+                                                                               break;
+                                                                       }
+                                                               }
+                                                               if(hasSelected){
+                                                                  selectedRoles.push({
+                                                                          id: roles[m].id,
+                                                                  name: roles[m].name,
+                                                                  isSelected: false,
+                                                                  }); 
+                                                               }          
+                                                       }  
+                                                       availableApps[index].roleSelected = true;
+                                                       availableApps[index].isSelected = true;
+                                                       availableApps[index].roles = selectedRoles;
+                                                       });
+                                               }
+                               })
+                       })
+               }
+            };
+            
+            let getAvailableServices = () =>{
+               microserviceService.getServiceList().then(services => {
+                       this.availableServices = [];
+                       for(var i = 0; i < services.length; i++){
+                               this.availableServices.push({
+                                       id: services[i].id,
+                                       name: services[i].name,
+                                       option: services[i].name + ": " + services[i].url
+                               });
+                               
+                               if(this.widget.serviceId != null && this.widget.serviceId == services[i].id){
+                                       this.widget.serviceURL = this.availableServices[i];
+                               }
+                       }
+                }).catch(err => {
+                   $log.error(err);
+                });
+            }
+            
+
+            let init = () => {
+               $log.info('WidgetOnboardingDetailsModalCtrl::init');
+                this.widgetsList = [];
+                this.duplicatedName = true;
+                this.allRoleSelected = false;
+                this.appCounter = 0;
+               this.isSaving = false;
+               this.allUser = false;
+               this.emptyWidgetName = false;
+               
+                if ($scope.ngDialogData && $scope.ngDialogData.widget) {
+                    this.isEditMode = true;
+                       this.allRoleSelected = true;
+                    this.widget = _.clone($scope.ngDialogData.widget);
+                } else {
+                    this.isEditMode = false;
+                    this.widget = _.clone(newWidgetModel);
+                }
+                
+                widgetsCatalogService.getManagedWidgets().then(res => {
+                       for(var i = 0; i < res.length; i++){
+                               this.widgetsList.push(res[i].name);
+                       }
+                 }).catch(err => {
+                     $log.error('WidgetOnboardingDetailsModalCtrl::init error: ' + err);
+                 }).finally(()=> {
+                     this.isLoadingTable = false;
+                 });
+                 getAvailableApps();
+                 getAvailableServices();
+            };
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+            this.conflictMessages = {};
+            this.scrollApi = {};
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                if($scope.widgetForm[fieldName]){
+                    $scope.widgetForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+            
+            this.updateSelectedRole = () => {
+                if (!this.selectedRole) {
+                    return;
+                }
+                this.widget.RoleId = this.selectedRole.id;
+                this.widget.RoleName = this.selectedRole.name;
+            };
+            
+            let emptyCookies = () => {
+                userProfileService.getUserProfile()
+                .then(profile=> {
+                    $log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile);
+                    $scope.orgUserId = profile.orgUserId;
+                    $log.info('user has the following orgUserId: ' + profile.orgUserId);
+                    if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) {
+                        $cookies.remove($scope.orgUserId + '_widget');
+                    }
+                });
+            };
+              
+            this.updateWidgetName = () => {
+               for(var i = 0; i < this.widgetsList.length; i++){
+                       if(this.widget.name.toUpperCase() == this.widgetsList[i].toUpperCase()){
+                               this.duplicatedName = false;
+                               return;
+                       }
+               }
+               this.duplicatedName = true;
+            };
+            
+            this.saveChanges = () => {     
+               
+               if(!this.isEditMode)
+                       this.updateWidgetName();
+               
+               if(this.duplicatedName == false 
+                  || this.widget.name == ''
+                  || this.widget.name == undefined){
+                       this.emptyWidgetName = true;
+                       return;
+                }
+               
+               if((this.widget.file == undefined && !this.isEditMode) ||
+               (!this.widget.allUser && this.appCounter == 0) ||
+               this.widget.name == null ||
+               (!this.widget.allUser && !this.allRoleSelected) ||
+               this.widget.saving == true)
+                       return; 
+               
+               
+                       this.widget.saving = true;
+               var selectedRoles = [];
+               if(!this.widget.allUser){
+                       for(var i = 0; i < this.availableApps.length; i++){
+                               if(this.availableApps[i].isSelected){
+                                               for(var n = 0; n < this.availableApps[i].roles.length; n++) {
+                                                       if(this.availableApps[i].roles[n].isSelected){
+                                                       var role = {
+                                                               app: {
+                                                                       appId: this.availableApps[i].id
+                                                               },
+                                                               roleId: this.availableApps[i].roles[n].id,
+                                                               roleName: this.availableApps[i].roles[n].name,
+                                                               };
+                                                       selectedRoles.push(role);
+                                                       }
+                                       }
+                               }
+                       }
+               }
+               
+               var allowAllUser = 0;
+               if(this.widget.allUser)
+                       allowAllUser = 1;       
+               
+               var serviceId = null;
+               if(this.widget.serviceURL != null &&
+               this.widget.serviceURL != undefined){
+                       serviceId = this.widget.serviceURL.id;
+               }
+               
+               
+               var file_loc = this.widget.name + ".zip";
+               var newWidget = {
+                               name: this.widget.name,
+                               desc: this.widget.desc,
+                               widgetRoles: selectedRoles,
+                               fileLocation: file_loc,
+                               allowAllUser: allowAllUser,
+                               serviceId: serviceId
+               };
+               
+               if(this.isEditMode){
+                       
+                       if(this.widget.file != undefined){
+                               widgetsCatalogService.updateWidgetWithFile(this.widget.file, this.widget.id, newWidget).then(res => {
+                                       if(!res.valid){
+                                               if(!res.error){
+                                                       confirmBoxService.showInformation("Could not save. Please retry.");
+                                                       this.widget.saving = false;
+                                                       return;
+                                               }
+                                               confirmBoxService.showInformation(res.error);
+                                               this.widget.saving = false;
+                                               return;
+                                       }
+                                       $scope.closeThisDialog(true);
+                               this.widget.saving = false;
+                               });     
+                       }
+                       else{
+                               widgetsCatalogService.updateWidget(this.widget.id, newWidget)
+                               .then(() => {
+                                       $scope.closeThisDialog(true); 
+                           });
+                       }
+               }
+               else{
+                       widgetsCatalogService.createWidget(newWidget, this.widget.file).then(res => {
+                               if(!res.valid){
+                                               if(!res.error)
+                                                       confirmBoxService.showInformation("Could not save. Please retry.");
+                                               else
+                                                       confirmBoxService.showInformation(res.error);
+                                               this.widget.saving = false;
+                                               return;
+                                       }
+                               $scope.closeThisDialog(true);
+                               this.widget.saving = false;
+                       });
+               }
+            };
+            init();
+            $scope.$on('$stateChangeStart', e => {
+                e.preventDefault();
+            });
+        }
+    }
+    WidgetOnboardingDetailsModalCtrl.$inject = ['$scope', '$log', '$interval', 'applicationsService', 'adminsService', 'microserviceService', 'widgetsCatalogService', 'errorMessageByCode', 'ECOMP_URL_REGEX', '$window','userProfileService', 'confirmBoxService', '$cookies'];
+    angular.module('ecompApp').controller('WidgetOnboardingDetailsModalCtrl', WidgetOnboardingDetailsModalCtrl);
+})(); 
index 1762fad..927836a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-// 'use strict';\r
-// describe('Controller: WidgetDetailsModalCtrl', ()=> {\r
-//     /**\r
-//      * INITIALIZATION\r
-//      */\r
-//     beforeEach(module('testUtils'));\r
-//     beforeEach(module('ecompApp'));\r
-//\r
-//     let promisesTestUtils;\r
-//     //destroy $http default cache before starting to prevent the error 'default cache already exists'\r
-//     //_promisesTestUtils_ comes from testUtils for promises resolve/reject\r
-//     beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {\r
-//         _CacheFactory_.destroyAll();\r
-//         promisesTestUtils = _promisesTestUtils_;\r
-//     }));\r
-//\r
-//     let widgetDetails, scope, $controller, $q, $rootScope, $log, widgetsService, errorMessageByCode, ECOMP_URL_REGEX;\r
-//     let deferredAdminApps, deferredUserProfile;\r
-//     let applicationsServiceMock, widgetsServiceMock, userProfileServiceMock;\r
-//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {\r
-//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];\r
-//\r
-//         deferredAdminApps = $q.defer();\r
-//         deferredUserProfile = $q.defer();\r
-//         /*applicationsServiceMock = {\r
-//             getAppsForSuperAdminAndAccountAdmin: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             }\r
-//         };*/\r
-//\r
-//         widgetsServiceMock = {\r
-//             updateWidget: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             },\r
-//             createWidget: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             }\r
-//         };\r
-//\r
-//         userProfileServiceMock = jasmine.createSpyObj('userProfileServiceMock',['getUserProfile']);\r
-//         userProfileServiceMock.getUserProfile.and.returnValue(deferredUserProfile.promise);\r
-//\r
-//         applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock',['getAppsForSuperAdminAndAccountAdmin']);\r
-//         applicationsServiceMock.getAppsForSuperAdminAndAccountAdmin.and.returnValue(deferredAdminApps.promise);\r
-//\r
-//     }));\r
-//\r
-//     beforeEach(()=> {\r
-//         errorMessageByCode = [];\r
-//         ECOMP_URL_REGEX = "";\r
-//         scope = $rootScope.$new();\r
-//         createController(scope);\r
-//     });\r
-//\r
-//     let createController = scopeObj => {\r
-//         widgetDetails = $controller('WidgetDetailsModalCtrl', {\r
-//             $scope: scope,\r
-//             $log: $log,\r
-//             applicationsService: applicationsServiceMock,\r
-//             widgetsService: widgetsServiceMock,\r
-//             errorMessageByCode: errorMessageByCode,\r
-//             ECOMP_URL_REGEX: ECOMP_URL_REGEX,\r
-//             userProfileService: userProfileServiceMock\r
-//         });\r
-//     };\r
-//\r
-//     /**\r
-//      * MOCK DATA\r
-//      */\r
-//     let newWidgetModel = {\r
-//         name: null,\r
-//         appId: null,\r
-//         appName: null,\r
-//         width: 360,\r
-//         height: 300,\r
-//         url: null\r
-//     };\r
-//     let exsistingWidget = {\r
-//         name: 'some widget',\r
-//         appId: 1,\r
-//         appName: 'APP NAME',\r
-//         width: 360,\r
-//         height: 300,\r
-//         url: 'http://a.com'\r
-//     };\r
-//     let adminApps = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];\r
-//\r
-//     /**\r
-//      * TEST CASES\r
-//      */\r
-//     it('should initialize controller with new widget mode when opening the modal without selected widget', ()=> {\r
-//         expect(widgetDetails.widget).toEqual(newWidgetModel);\r
-//     });\r
-//\r
-//     it('should initialize controller with exsisting widget details when opening the modal with selected widget', ()=> {\r
-//         scope.ngDialogData = {\r
-//             widget: exsistingWidget\r
-//         };\r
-//         createController(scope);\r
-//         expect(widgetDetails.widget).toEqual(exsistingWidget);\r
-//     });\r
-//\r
-//     it('should populate widget selected app name and id when initializing controller with widget', () =>{\r
-//         deferredAdminApps.resolve(adminApps);\r
-//         scope.ngDialogData = {\r
-//             widget: exsistingWidget\r
-//         };\r
-//         createController(scope);\r
-//         scope.$apply();\r
-//         expect(widgetDetails.widget.appId).toEqual(adminApps[0].id);\r
-//         expect(widgetDetails.widget.appName).toEqual(adminApps[0].name);\r
-//     });\r
-//\r
-//     //TODO:\r
-//     //save changes fail - conflict handling\r
-//     //save changes success\r
-//\r
-//\r
-//\r
-// });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+// 'use strict';
+// describe('Controller: WidgetDetailsModalCtrl', ()=> {
+//     /**
+//      * INITIALIZATION
+//      */
+//     beforeEach(module('testUtils'));
+//     beforeEach(module('ecompApp'));
+//
+//     let promisesTestUtils;
+//     //destroy $http default cache before starting to prevent the error 'default cache already exists'
+//     //_promisesTestUtils_ comes from testUtils for promises resolve/reject
+//     beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {
+//         _CacheFactory_.destroyAll();
+//         promisesTestUtils = _promisesTestUtils_;
+//     }));
+//
+//     let widgetDetails, scope, $controller, $q, $rootScope, $log, widgetsService, errorMessageByCode, ECOMP_URL_REGEX;
+//     let deferredAdminApps, deferredUserProfile;
+//     let applicationsServiceMock, widgetsServiceMock, userProfileServiceMock;
+//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {
+//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];
+//
+//         deferredAdminApps = $q.defer();
+//         deferredUserProfile = $q.defer();
+//         /*applicationsServiceMock = {
+//             getAppsForSuperAdminAndAccountAdmin: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             }
+//         };*/
+//
+//         widgetsServiceMock = {
+//             updateWidget: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             },
+//             createWidget: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             }
+//         };
+//
+//         userProfileServiceMock = jasmine.createSpyObj('userProfileServiceMock',['getUserProfile']);
+//         userProfileServiceMock.getUserProfile.and.returnValue(deferredUserProfile.promise);
+//
+//         applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock',['getAppsForSuperAdminAndAccountAdmin']);
+//         applicationsServiceMock.getAppsForSuperAdminAndAccountAdmin.and.returnValue(deferredAdminApps.promise);
+//
+//     }));
+//
+//     beforeEach(()=> {
+//         errorMessageByCode = [];
+//         ECOMP_URL_REGEX = "";
+//         scope = $rootScope.$new();
+//         createController(scope);
+//     });
+//
+//     let createController = scopeObj => {
+//         widgetDetails = $controller('WidgetDetailsModalCtrl', {
+//             $scope: scope,
+//             $log: $log,
+//             applicationsService: applicationsServiceMock,
+//             widgetsService: widgetsServiceMock,
+//             errorMessageByCode: errorMessageByCode,
+//             ECOMP_URL_REGEX: ECOMP_URL_REGEX,
+//             userProfileService: userProfileServiceMock
+//         });
+//     };
+//
+//     /**
+//      * MOCK DATA
+//      */
+//     let newWidgetModel = {
+//         name: null,
+//         appId: null,
+//         appName: null,
+//         width: 360,
+//         height: 300,
+//         url: null
+//     };
+//     let exsistingWidget = {
+//         name: 'some widget',
+//         appId: 1,
+//         appName: 'APP NAME',
+//         width: 360,
+//         height: 300,
+//         url: 'http://a.com'
+//     };
+//     let adminApps = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];
+//
+//     /**
+//      * TEST CASES
+//      */
+//     it('should initialize controller with new widget mode when opening the modal without selected widget', ()=> {
+//         expect(widgetDetails.widget).toEqual(newWidgetModel);
+//     });
+//
+//     it('should initialize controller with exsisting widget details when opening the modal with selected widget', ()=> {
+//         scope.ngDialogData = {
+//             widget: exsistingWidget
+//         };
+//         createController(scope);
+//         expect(widgetDetails.widget).toEqual(exsistingWidget);
+//     });
+//
+//     it('should populate widget selected app name and id when initializing controller with widget', () =>{
+//         deferredAdminApps.resolve(adminApps);
+//         scope.ngDialogData = {
+//             widget: exsistingWidget
+//         };
+//         createController(scope);
+//         scope.$apply();
+//         expect(widgetDetails.widget.appId).toEqual(adminApps[0].id);
+//         expect(widgetDetails.widget.appName).toEqual(adminApps[0].name);
+//     });
+//
+//     //TODO:
+//     //save changes fail - conflict handling
+//     //save changes success
+//
+//
+//
+// });
index 2fa5644..9e1c169 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="widget-details-modal">\r
-       <div id="'widgets-details-title" class="title">Widget Details</div>\r
-\r
-       <div class="widget-properties-main"\r
-               scroll-top="widgetOnboardingDetails.scrollApi">\r
-               <form id="widgets-details-form" name="widgetForm" novalidate\r
-                       autocomplete="off">\r
-\r
-                       <div class="item required">\r
-                               <div class="item-label">Widget Name</div>\r
-                               <input id="widgets-details-input-name" class="input-field"\r
-                                       type="text" ng-model="widgetOnboardingDetails.widget.name"\r
-                                       ng-change="widgetOnboardingDetails.updateWidgetName()" name="name"\r
-                                       ng-pattern="/^[\w -]*$/" maxlength="100"\r
-                                       ng-disabled="widgetOnboardingDetails.isEditMode" required />\r
-\r
-                               <div class="error-container"\r
-                                       ng-show="(widgetOnboardingDetails.emptyWidgetName || widgetForm.name.$dirty) && !widgetOnboardingDetails.duplicatedName">\r
-                                       <div id="widgets-details-input-name-conflict" class="err-message">Name\r
-                                               not available - choose different name</div>\r
-                               </div>\r
-\r
-                               <div class="error-container"\r
-                                       ng-show="(widgetOnboardingDetails.emptyWidgetName || widgetForm.name.$dirty) && widgetOnboardingDetails.duplicatedName">\r
-                                       <div ng-messages="widgetForm.name.$error" class="error-container">\r
-                                               <small id="widgets-details-input-name-required"\r
-                                                       class="err-message" ng-message="required">Widget Name is\r
-                                                       required</small> <small id="widgets-details-input-name-pattern"\r
-                                                       class="err-message" ng-message="pattern">Widget Name must\r
-                                                       be letters, numbers, or underscore</small>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-\r
-\r
-                       <div class="item">\r
-                               <div class="item-label">Widget Description</div>\r
-                               <input id="widgets-details-input-name" class="input-field"\r
-                                       type="text" ng-model="widgetOnboardingDetails.widget.desc"\r
-                                       name="desc" maxlength="200" />\r
-                       </div>\r
-\r
-                       <div class="widget-property">\r
-                               <input id="widgets-checkbox-app-is-enabled" type="checkbox"\r
-                                       class="checkbox-field"\r
-                                       ng-model="widgetOnboardingDetails.widget.allUser" />\r
-                               <div class="property-label checkbox-label">Allow all user\r
-                                       access</div>\r
-                       </div>\r
-\r
-\r
-                       <div class="item" ng-show="!widgetOnboardingDetails.isEditMode">\r
-                               <div class="item-label">Service Endpoint</div>\r
-                               <div>\r
-                                       <select id="widgets-details-input-endpoint-url" name="url"\r
-                                               class="input-field"\r
-                                               ng-model="widgetOnboardingDetails.widget.serviceURL"\r
-                                               ng-options="service as service.option\r
-                                                 for service in widgetOnboardingDetails.availableServices">\r
-                                               <option value="" selected="selected">Select Microservice\r
-                                                       Endpoint</option>\r
-                                       </select>\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div class="item required"\r
-                               ng-show="!widgetOnboardingDetails.widget.allUser">\r
-                               <div class="item-label">Application Name</div>\r
-                               <div>\r
-                                       <multiple-select id="widget-applications" unique-data="{{$index}}"\r
-                                               placeholder="Select Applications"\r
-                                               ng-model="widgetOnboardingDetails.availableApps"\r
-                                               on-change="widgetOnboardingDetails.appUpdate()" name-attr="name"\r
-                                               value-attr="isSelected"> </multiple-select>\r
-                               </div>\r
-                               <div class="error-container"\r
-                                       ng-show="widgetOnboardingDetails.appCounter == 0">\r
-                                       <div id="widgets-details-input-name-conflict" class="err-message">Please\r
-                                               select at least one Application</div>\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div class="item" ng-show="!widgetOnboardingDetails.widget.allUser">\r
-                               <div ng-show="widgetOnboardingDetails.hasSelectedApp"\r
-                                       class="item-label">User Role Name</div>\r
-                               <div ng-repeat="appRoles in widgetOnboardingDetails.availableApps"\r
-                                       id="roles-{{appRoles.roles.split(' ').join('-')}}">\r
-                                       <div class="item required">\r
-                                               <div class="app-item-left" ng-show="appRoles.isSelected">{{appRoles.name}}</div>\r
-                                               <div class="app-item-right" ng-show="appRoles.isSelected">\r
-                                                       <multiple-select id="widget-roles-by-application"\r
-                                                               unique-data="{{$index}}" placeholder="Select Roles"\r
-                                                               ng-model="appRoles.roles" name-attr="name"\r
-                                                               on-change="widgetOnboardingDetails.roleUpdate(appRoles)"\r
-                                                               value-attr="isSelected"></multiple-select>\r
-                                                       <div class="error-container" ng-show="!appRoles.roleSelected">\r
-                                                               <div id="widgets-details-input-name-conflict"\r
-                                                                       class="err-message">Please select at least one role</div>\r
-                                                       </div>\r
-                                               </div>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div class="item required">\r
-                               <div class="item-label">Upload Widget</div>\r
-                               <div>\r
-                                       <input id="widget-onboarding-details-upload-file"\r
-                                               file-model="widgetOnboardingDetails.widget.file" type="file"\r
-                                               style="height: 24px;" />\r
-\r
-\r
-                                       <div class="error-container"\r
-                                               ng-show="widgetOnboardingDetails.widget.file == undefined && !widgetOnboardingDetails.isEditMode">\r
-                                               <div class="err-message">Please upload your widget (.zip)</div>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-               </form>\r
-       </div>\r
-\r
-       <div class="dialog-control">\r
-               <span class="ecomp-save-spinner"\r
-                       ng-show="widgetOnboardingDetails.isSaving"></span>\r
-               <button id="widgets-details-save-button" class="btn btn-alt btn-small"\r
-                       ng-class="{disabled: widgetOnboardingDetails.widget.name == undefined || !widgetOnboardingDetails.duplicatedName \r
-                       || (!widgetOnboardingDetails.widget.allUser && widgetOnboardingDetails.appCounter == 0) || (widgetOnboardingDetails.widget.file == undefined && !widgetOnboardingDetails.isEditMode)\r
-                       || (!widgetOnboardingDetails.widget.allUser && !widgetOnboardingDetails.allRoleSelected) || (widgetOnboardingDetails.widget.saving)}"\r
-                       ng-click="widgetOnboardingDetails.saveChanges()">Save</button>\r
-               <button id="widgets-details-cancel-button"\r
-                       class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>\r
-\r
-       </div>\r
-\r
-\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="widget-details-modal">
+       <div id="'widgets-details-title" class="title">Widget Details</div>
+
+       <div class="widget-properties-main"
+               scroll-top="widgetOnboardingDetails.scrollApi">
+               <form id="widgets-details-form" name="widgetForm" novalidate
+                       autocomplete="off">
+
+                       <div class="item required">
+                               <div class="item-label">Widget Name</div>
+                               <input id="widgets-details-input-name" class="input-field"
+                                       type="text" ng-model="widgetOnboardingDetails.widget.name"
+                                       ng-change="widgetOnboardingDetails.updateWidgetName()" name="name"
+                                       ng-pattern="/^[\w -]*$/" maxlength="100"
+                                       ng-disabled="widgetOnboardingDetails.isEditMode" required />
+
+                               <div class="error-container"
+                                       ng-show="(widgetOnboardingDetails.emptyWidgetName || widgetForm.name.$dirty) && !widgetOnboardingDetails.duplicatedName">
+                                       <div id="widgets-details-input-name-conflict" class="err-message">Name
+                                               not available - choose different name</div>
+                               </div>
+
+                               <div class="error-container"
+                                       ng-show="(widgetOnboardingDetails.emptyWidgetName || widgetForm.name.$dirty) && widgetOnboardingDetails.duplicatedName">
+                                       <div ng-messages="widgetForm.name.$error" class="error-container">
+                                               <small id="widgets-details-input-name-required"
+                                                       class="err-message" ng-message="required">Widget Name is
+                                                       required</small> <small id="widgets-details-input-name-pattern"
+                                                       class="err-message" ng-message="pattern">Widget Name must
+                                                       be letters, numbers, space, dash or underscore</small>
+                                       </div>
+                               </div>
+                       </div>
+
+
+                       <div class="item">
+                               <div class="item-label">Widget Description</div>
+                               <input id="widgets-details-input-name" class="input-field"
+                                       type="text" ng-model="widgetOnboardingDetails.widget.desc"
+                                       name="desc" maxlength="200" />
+                       </div>
+
+                       <div class="item">
+                               <div class="item-label">Service Endpoint</div>
+                               <div>
+                                       <select id="widgets-details-input-endpoint-url" name="url"
+                                               class="input-field"
+                                               ng-model="widgetOnboardingDetails.widget.serviceURL"
+                                               ng-options="service as service.option
+                                                 for service in widgetOnboardingDetails.availableServices"
+                                                 ng-disabled="widgetOnboardingDetails.isEditMode">
+                                               <option value="" selected="selected">Select Microservice
+                                                       Endpoint</option>
+                                       </select>
+                               </div>
+                       </div>
+
+                       <div class="widget-property">
+                               <input id="widgets-checkbox-app-is-enabled" type="checkbox"
+                                       class="checkbox-field"
+                                       ng-model="widgetOnboardingDetails.widget.allUser" />
+                               <div class="property-label checkbox-label">Allow all user
+                                       access</div>
+                       </div>
+
+                       <div class="item required"
+                               ng-show="!widgetOnboardingDetails.widget.allUser">
+                               <div class="item-label">Application Name</div>
+                               <div>
+                                       <multiple-select id="widget-applications" unique-data="{{$index}}"
+                                               placeholder="Select Applications"
+                                               ng-model="widgetOnboardingDetails.availableApps"
+                                               on-change="widgetOnboardingDetails.appUpdate()" name-attr="name"
+                                               value-attr="isSelected"> </multiple-select>
+                               </div>
+                               <div class="error-container"
+                                       ng-show="widgetOnboardingDetails.appCounter == 0">
+                                       <div id="widgets-details-input-name-conflict" class="err-message">Please
+                                               select at least one Application</div>
+                               </div>
+                       </div>
+
+                       <div class="item" ng-show="!widgetOnboardingDetails.widget.allUser">
+                               <div ng-show="widgetOnboardingDetails.hasSelectedApp"
+                                       class="item-label">User Role Name</div>
+                               <div ng-repeat="appRoles in widgetOnboardingDetails.availableApps"
+                                       id="roles-{{appRoles.roles.split(' ').join('-')}}">
+                                       <div class="item required">
+                                               <div class="app-item-left" ng-show="appRoles.isSelected">{{appRoles.name}}</div>
+                                               <div class="app-item-right" ng-show="appRoles.isSelected">
+                                                       <multiple-select id="widget-roles-by-application"
+                                                               unique-data="{{$index}}" placeholder="Select Roles"
+                                                               ng-model="appRoles.roles" name-attr="name"
+                                                               on-change="widgetOnboardingDetails.roleUpdate(appRoles)"
+                                                               value-attr="isSelected"></multiple-select>
+                                                       <div class="error-container" ng-show="!appRoles.roleSelected">
+                                                               <div id="widgets-details-input-name-conflict"
+                                                                       class="err-message">Please select at least one role</div>
+                                                       </div>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+
+                       <div class="item required">
+                               <div class="item-label">Upload Widget</div>
+                               <div>
+                                       <input id="widget-onboarding-details-upload-file"
+                                               file-model="widgetOnboardingDetails.widget.file" type="file"
+                                               style="height: 24px;" />
+
+
+                                       <div class="error-container"
+                                               ng-show="widgetOnboardingDetails.widget.file == undefined && !widgetOnboardingDetails.isEditMode">
+                                               <div class="err-message">Please upload your widget (.zip)</div>
+                                       </div>
+                               </div>
+                       </div>
+               </form>
+       </div>
+
+       <div class="dialog-control">
+               <span class="ecomp-save-spinner"
+                       ng-show="widgetOnboardingDetails.isSaving"></span>
+               <button id="widgets-details-save-button" class="btn btn-alt btn-small"
+                       ng-class="{disabled: widgetOnboardingDetails.widget.name == undefined || !widgetOnboardingDetails.duplicatedName 
+                       || (!widgetOnboardingDetails.widget.allUser && widgetOnboardingDetails.appCounter == 0) || (widgetOnboardingDetails.widget.file == undefined && !widgetOnboardingDetails.isEditMode)
+                       || (!widgetOnboardingDetails.widget.allUser && !widgetOnboardingDetails.allRoleSelected) || (widgetOnboardingDetails.widget.saving)}"
+                       ng-click="widgetOnboardingDetails.saveChanges()">Save</button>
+               <button id="widgets-details-cancel-button"
+                       class="btn btn-alt btn-small" ng-click="closeThisDialog()">Cancel</button>
+
+       </div>
+
+
+
+</div>
index a9e5c41..661c63a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class WidgetOnboardingCtrl {\r
-        constructor($log, applicationsService, widgetsCatalogService, ngDialog, confirmBoxService,\r
-                    userProfileService, $cookies, $scope) {\r
-            $scope.infoMessage = true;\r
-\r
-            let populateAvailableApps = widgets => {\r
-               let allPortalsFilterObject = {index: 0, title: 'All applications', value: ''};\r
-                this.availableApps = [allPortalsFilterObject];\r
-                this.filterByApp = this.availableApps[0];\r
-                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(myApps => {\r
-                       var reSortedApp = myApps.sort(getSortOrder("name"));\r
-                    var realAppIndex = 1;\r
-                    for (let i = 1; i <= reSortedApp.length; i++) {\r
-                        if (!reSortedApp[i-1].restrictedApp) {\r
-                            this.availableApps.push({\r
-                                index: realAppIndex,\r
-                                title: reSortedApp[i - 1].name,\r
-                                value: reSortedApp[i - 1].name\r
-                            })\r
-                            realAppIndex = realAppIndex + 1;\r
-                        }\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('WidgetOnboardingCtrl:getAppsForSuperAdmin failed', err);\r
-                });\r
-            };\r
-                 \r
-            let getOnboardingWidgets = () => {\r
-                this.isLoadingTable = true;\r
-                this.isCommError = false;\r
-                widgetsCatalogService.getManagedWidgets().then(res => {\r
-                       if(!(res instanceof Array)){\r
-                                       this.isCommError = true;\r
-                                       return;\r
-                                }\r
-                       \r
-                    var reSortedWidget = res.sort(getSortOrder("name"));\r
-                    $scope.widgetsList = reSortedWidget;\r
-                    for(var i = 0; i < $scope.widgetsList.length; i++){\r
-                       let set = new Set();\r
-                       var info = "";\r
-                       var appContent = [];\r
-                       var appName = [];       \r
-                       for(var n = 0; n < $scope.widgetsList[i].widgetRoles.length; n++){\r
-                               set.add($scope.widgetsList[i].widgetRoles[n].app.appName);\r
-                       }\r
-                       if($scope.widgetsList[i].allowAllUser == "Y"){\r
-                               info = "All Applications";\r
-                               appContent.push("All Applications");\r
-                               appName.push("All Applications");\r
-                       }\r
-                       \r
-                       set.forEach(function (item) {\r
-                               info = item.toString() + " - ";\r
-                               for(var n = 0; n < $scope.widgetsList[i].widgetRoles.length; n++){\r
-                                       if(item.toString() == $scope.widgetsList[i].widgetRoles[n].app.appName){\r
-                                               info += $scope.widgetsList[i].widgetRoles[n].roleName + "; ";\r
-                                       }\r
-                               }\r
-                               appContent.push(info);\r
-                               appName.push(item.toString());\r
-                       });\r
-                       $scope.widgetsList[i].appContent = appContent;\r
-                       $scope.widgetsList[i].appName = appName;\r
-                       }\r
-                    populateAvailableApps(reSortedWidget);\r
-                }).catch(err => {\r
-                       // Land here when the micro service is down\r
-                    $log.error('WidgetOnboardingCtrl::getOnboardingWidgets caught error', err);\r
-                }).finally(()=> {\r
-                    this.isLoadingTable = false;\r
-                });\r
-             \r
-            };\r
-            \r
-            \r
-            // Refactor this into a directive\r
-            let getSortOrder = (prop) => {\r
-                return function(a, b) {\r
-                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {\r
-                        return 1;\r
-                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {\r
-                        return -1;\r
-                    }\r
-                    return 0;\r
-                }\r
-            }\r
-\r
-            $scope.hideMe = function () {\r
-                $scope.infoMessage = false;\r
-            }\r
-\r
-            let init = () => {\r
-               this.isLoadingTable = false;\r
-                getOnboardingWidgets();\r
-                this.searchString = '';\r
-                this.widgetsTableHeaders = [\r
-                    {name: 'Widget Name', value: 'name', isSortable: false}\r
-                ];\r
-                $scope.widgetsList = [];\r
-            };\r
-           \r
-            this.filterByDropdownValue = item => {             \r
-                if(this.filterByApp.value === '')\r
-                    return true;\r
-                \r
-               for(var i = 0; i < item.appName.length; i++){\r
-                       if(item.appName[i] == this.filterByApp.value\r
-                       || item.appName[i] == 'All Applications'){\r
-                               return true;\r
-                       }\r
-               }\r
-                return false;\r
-            };\r
-\r
-            this.openWidgetCatalogDetailsModal = (selectedWidget) => {\r
-               let data = null;\r
-                if(selectedWidget){\r
-                    if(!selectedWidget.id){\r
-                        $log.error('WidgetOnboardingCtrl:openWidgetCatalogDetailModal: widget id not found');\r
-                        return;\r
-                    }\r
-                    data = {\r
-                        widget: selectedWidget\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html',\r
-                    controller: 'WidgetOnboardingDetailsModalCtrl',\r
-                    controllerAs: 'widgetOnboardingDetails',\r
-                    data: data\r
-                }).closePromise.then(needUpdate => {\r
-                       if(needUpdate.value === true){\r
-                        getOnboardingWidgets();\r
-                    }\r
-                });\r
-            };\r
-\r
-            this.deleteWidget = widget => { \r
-               \r
-               confirmBoxService.deleteItem(widget.name).then(isConfirmed => {\r
-                       if(isConfirmed){\r
-                        if(!widget || !widget.id){\r
-                            $log.error('WidgetOnboardingCtrl::deleteWidget: No widget or ID... cannot delete');\r
-                            return;\r
-                        }\r
-                        widgetsCatalogService.deleteWidget(widget.id).then(() => {\r
-                               $scope.widgetsList.splice($scope.widgetsList.indexOf(widget), 1);\r
-                        }).catch(err => {\r
-                            $log.error('WidgetOnboardingCtrl::deleteWidget error:',err);\r
-                        });\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('WidgetOnboardingCtrl::deleteWidget error:',err);\r
-                });\r
-                \r
-            };\r
-            \r
-            \r
-            this.downloadWidget = widget => {\r
-                       widgetsCatalogService.downloadWidgetFile(widget.id).then(res => {\r
-                               var data = res;\r
-                               var filename = widget.name + ".zip";\r
-                               \r
-                               if (data == undefined || data == null){\r
-                                       confirmBoxService.showInformation("Could not download. Please retry.");\r
-                                       return;                 \r
-                               }\r
-                               var a = document.createElement('a');\r
-                               var blob = new Blob([data], {type: 'application/octet-stream'});\r
-                               a.href = URL.createObjectURL(blob);\r
-                               a.download = filename;\r
-                               a.click();\r
-                       });\r
-            };\r
-            \r
-            init();\r
-        }\r
-    }\r
-    WidgetOnboardingCtrl.$inject = ['$log', 'applicationsService', 'widgetsCatalogService', 'ngDialog', 'confirmBoxService',\r
-        'userProfileService','$cookies', '$scope'];\r
-    angular.module('ecompApp').controller('WidgetOnboardingCtrl', WidgetOnboardingCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class WidgetOnboardingCtrl {
+        constructor($log, applicationsService, widgetsCatalogService, ngDialog, confirmBoxService,
+                    userProfileService, $cookies, $scope) {
+            $scope.infoMessage = true;
+
+            let populateAvailableApps = widgets => {
+               let allPortalsFilterObject = {index: 0, title: 'All applications', value: ''};
+                this.availableApps = [allPortalsFilterObject];
+                this.filterByApp = this.availableApps[0];
+                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(myApps => {
+                       var reSortedApp = myApps.sort(getSortOrder("name"));
+                    var realAppIndex = 1;
+                    for (let i = 1; i <= reSortedApp.length; i++) {
+                        if (!reSortedApp[i-1].restrictedApp) {
+                            this.availableApps.push({
+                                index: realAppIndex,
+                                title: reSortedApp[i - 1].name,
+                                value: reSortedApp[i - 1].name
+                            })
+                            realAppIndex = realAppIndex + 1;
+                        }
+                    }
+                }).catch(err => {
+                    $log.error('WidgetOnboardingCtrl:getAppsForSuperAdmin failed', err);
+                });
+            };
+                 
+            let getOnboardingWidgets = () => {
+                this.isLoadingTable = true;
+                this.isCommError = false;
+                widgetsCatalogService.getManagedWidgets().then(res => {
+                       if(!(res instanceof Array)){
+                                       this.isCommError = true;
+                                       return;
+                                }
+                       
+                    var reSortedWidget = res.sort(getSortOrder("name"));
+                    $scope.widgetsList = reSortedWidget;
+                    for(var i = 0; i < $scope.widgetsList.length; i++){
+                       let set = new Set();
+                       var info = "";
+                       var appContent = [];
+                       var appName = [];       
+                       for(var n = 0; n < $scope.widgetsList[i].widgetRoles.length; n++){
+                               set.add($scope.widgetsList[i].widgetRoles[n].app.appName);
+                       }
+                       if($scope.widgetsList[i].allowAllUser == "Y"){
+                               info = "All Applications";
+                               appContent.push("All Applications");
+                               appName.push("All Applications");
+                       }
+                       
+                       set.forEach(function (item) {
+                               info = item.toString() + " - ";
+                               for(var n = 0; n < $scope.widgetsList[i].widgetRoles.length; n++){
+                                       if(item.toString() == $scope.widgetsList[i].widgetRoles[n].app.appName){
+                                               info += $scope.widgetsList[i].widgetRoles[n].roleName + "; ";
+                                       }
+                               }
+                               appContent.push(info);
+                               appName.push(item.toString());
+                       });
+                       $scope.widgetsList[i].appContent = appContent;
+                       $scope.widgetsList[i].appName = appName;
+                       }
+                    populateAvailableApps(reSortedWidget);
+                }).catch(err => {
+                       // Land here when the micro service is down
+                    $log.error('WidgetOnboardingCtrl::getOnboardingWidgets caught error', err);
+                }).finally(()=> {
+                    this.isLoadingTable = false;
+                });
+             
+            };
+            
+            
+            // Refactor this into a directive
+            let getSortOrder = (prop) => {
+                return function(a, b) {
+                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {
+                        return 1;
+                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {
+                        return -1;
+                    }
+                    return 0;
+                }
+            }
+
+            $scope.hideMe = function () {
+                $scope.infoMessage = false;
+            }
+
+            let init = () => {
+               this.isLoadingTable = false;
+                getOnboardingWidgets();
+                this.searchString = '';
+                this.widgetsTableHeaders = [
+                    {name: 'Widget Name', value: 'name', isSortable: false}
+                ];
+                $scope.widgetsList = [];
+            };
+           
+            this.filterByDropdownValue = item => {             
+                if(this.filterByApp.value === '')
+                    return true;
+                
+               for(var i = 0; i < item.appName.length; i++){
+                       if(item.appName[i] == this.filterByApp.value
+                       || item.appName[i] == 'All Applications'){
+                               return true;
+                       }
+               }
+                return false;
+            };
+
+            this.openWidgetCatalogDetailsModal = (selectedWidget) => {
+               let data = null;
+                if(selectedWidget){
+                    if(!selectedWidget.id){
+                        $log.error('WidgetOnboardingCtrl:openWidgetCatalogDetailModal: widget id not found');
+                        return;
+                    }
+                    data = {
+                        widget: selectedWidget
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/widget-onboarding/widget-details-dialog/widget-details.modal.html',
+                    controller: 'WidgetOnboardingDetailsModalCtrl',
+                    controllerAs: 'widgetOnboardingDetails',
+                    data: data
+                }).closePromise.then(needUpdate => {
+                       if(needUpdate.value === true){
+                        getOnboardingWidgets();
+                    }
+                });
+            };
+
+            this.deleteWidget = widget => { 
+               
+               confirmBoxService.deleteItem(widget.name).then(isConfirmed => {
+                       if(isConfirmed){
+                        if(!widget || !widget.id){
+                            $log.error('WidgetOnboardingCtrl::deleteWidget: No widget or ID... cannot delete');
+                            return;
+                        }
+                        widgetsCatalogService.deleteWidget(widget.id).then(() => {
+                               $scope.widgetsList.splice($scope.widgetsList.indexOf(widget), 1);
+                        }).catch(err => {
+                            $log.error('WidgetOnboardingCtrl::deleteWidget error:',err);
+                        });
+                    }
+                }).catch(err => {
+                    $log.error('WidgetOnboardingCtrl::deleteWidget error:',err);
+                });
+                
+            };
+            
+            
+            this.downloadWidget = widget => {
+                       widgetsCatalogService.downloadWidgetFile(widget.id).then(res => {
+                               var data = res;
+                               var filename = widget.name + ".zip";
+                               
+                               if (data == undefined || data == null){
+                                       confirmBoxService.showInformation("Could not download. Please retry.");
+                                       return;                 
+                               }
+                               var a = document.createElement('a');
+                               var blob = new Blob([data], {type: 'application/octet-stream'});
+                               a.href = URL.createObjectURL(blob);
+                               a.download = filename;
+                               a.click();
+                       });
+            };
+            
+            init();
+        }
+    }
+    WidgetOnboardingCtrl.$inject = ['$log', 'applicationsService', 'widgetsCatalogService', 'ngDialog', 'confirmBoxService',
+        'userProfileService','$cookies', '$scope'];
+    angular.module('ecompApp').controller('WidgetOnboardingCtrl', WidgetOnboardingCtrl);
+})();
index 77659d9..5c42f4c 100644 (file)
@@ -1,20 +1,20 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
index f832b8f..6085a90 100644 (file)
@@ -24,9 +24,15 @@ font-style: italic;
       .ico_trash_default;
     }
     .c-ecomp-abs-select{
+    height: 25px;
     width: 440px;
     display: inline-block;
     margin-right: 10px;
     }
 
+#widget-onboarding-button-add
+{
+margin-bottom: 8px;
+}
+
 }
index 808deb8..aae0fd7 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-       <div class="w-ecomp-main-container">\r
-               <div class="widget-onboarding" id="page-content">\r
-                       <div id="title" class="w-ecomp-main-view-title">\r
-                               <h1 class="heading-page">Widget Onboarding</h1>\r
-                       </div>\r
-                       <div class="widgets-table">\r
-                               <div class="table-control">\r
-                                       <div class="c-ecomp-abs-select default">\r
-                                               <div class="table-dropdown">\r
-                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown\r
-                                                               placeholder-text="All application"\r
-                                                               ng-model="widgetOnboarding.filterByApp.value">\r
-                                                               <option b2b-dropdown-list\r
-                                                                       option-repeat="d in widgetOnboarding.availableApps"\r
-                                                                       value="{{d.value}}">{{d.title}}</option>\r
-                                                       </select>\r
-                                               </div>\r
-                                       </div>\r
-                                       <input class="table-search" type="text"\r
-                                               id="widget-onboarding-table-search"\r
-                                               placeholder="Search in entire table"\r
-                                               ng-model="widgetOnboarding.searchString" />\r
-\r
-                                       <button id="widget-onboarding-button-add"\r
-                                               class="btn btn-alt btn-small"\r
-                                               ng-click="widgetOnboarding.openWidgetCatalogDetailsModal()">\r
-                                               <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add\r
-                                               Widget\r
-                                       </button>\r
-\r
-                                       <div id="widget-onboarding-communcation-message"\r
-                                               ng-show="widgetOnboarding.isCommError">Failed to communicate\r
-                                               with the widget microservice.</div>\r
-\r
-                                       <div ng-hide="widgetOnboarding.isCommError">\r
-                                               <div b2b-table table-data="portalAdmin.portalAdminsTableData"\r
-                                                       ng-hide="widgetOnboarding.isLoadingTable"\r
-                                                       search-string="portalAdmin.searchString" class="b2b-table-div">\r
-                                                       <table>\r
-                                                               <thead b2b-table-row type="header">\r
-                                                                       <tr>\r
-                                                                               <th id="widgets-catalog-th-header-name"\r
-                                                                                       ng-repeat="header in widgetOnboarding.widgetsTableHeaders"\r
-                                                                                       b2b-table-header key="{{header.value}}"\r
-                                                                                       sortable="{{header.isSortable}}">{{header.name}}</th>\r
-                                                                               <th id="widgets-catalog-th-header-url" b2b-table-header\r
-                                                                                       key="appName" sortable="false">Application</th>\r
-\r
-                                                                               <th id="widgets-catalog-th-header-download" b2b-table-header\r
-                                                                                       sortable="false">Download</th>\r
-\r
-                                                                               <th id="widgets-catalog-th-header-delete" b2b-table-header\r
-                                                                                       sortable="false">Delete</th>\r
-                                                                       </tr>\r
-                                                               </thead>\r
-                                                               <tbody b2b-table-row type="body" class="table-body"\r
-                                                                       row-repeat="rowData in widgetsList | filter:widgetOnboarding.filterByDropdownValue">\r
-                                                                       <tr>\r
-                                                                               <td b2b-table-body\r
-                                                                                       ng-repeat="header in widgetOnboarding.widgetsTableHeaders"\r
-                                                                                       ng-click="widgetOnboarding.openWidgetCatalogDetailsModal(rowData)">\r
-                                                                                       <div id="widgets-catalog-widget-name-{{rowData.id}}"\r
-                                                                                               ng-bind="rowData[header.value]"></div>\r
-                                                                               </td>\r
-\r
-                                                                               <td b2b-table-body\r
-                                                                                       ng-click="widgetOnboarding.openWidgetCatalogDetailsModal(rowData)">\r
-                                                                                       <div ng-repeat="row in rowData.appContent">\r
-                                                                                               <div id="widget-catalog-widget-application-{{rowData.id}}"\r
-                                                                                                       ng-bind="row"></div>\r
-                                                                                       </div>\r
-                                                                               </td>\r
-\r
-                                                                               <td b2b-table-body>\r
-                                                                                       <div class="icon-download"\r
-                                                                                               ng-click="widgetOnboarding.downloadWidget(rowData)"></div>\r
-                                                                               </td>\r
-\r
-                                                                               <td b2b-table-body>\r
-                                                                                       <div id="widget-onboarding-div-delete-widget-{{$index}}" class="delete-widget"\r
-                                                                                               ng-click="widgetOnboarding.deleteWidget(rowData)"></div>\r
-                                                                               </td>\r
-                                                                       </tr>\r
-                                                               </tbody>\r
-                                                       </table>\r
-                                               </div>\r
-                                       </div>\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-       </div>\r
-</div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+       <div class="w-ecomp-main-container">
+               <div class="widget-onboarding" id="page-content">
+                       <div id="title" class="w-ecomp-main-view-title">
+                               <h1 class="heading-page">Widget Onboarding</h1>
+                       </div>
+                       <div class="widgets-table">
+                               <div class="table-control">
+                                       <div class="c-ecomp-abs-select default">
+                                               <div class="table-dropdown">
+                                                       <select id="dropdown1" name="dropdown1" b2b-dropdown
+                                                               placeholder-text="All application"
+                                                               ng-model="widgetOnboarding.filterByApp.value">
+                                                               <option b2b-dropdown-list
+                                                                       option-repeat="d in widgetOnboarding.availableApps"
+                                                                       value="{{d.value}}">{{d.title}}</option>
+                                                       </select>
+                                               </div>
+                                       </div>
+                                       <input class="table-search" type="text"
+                                               id="widget-onboarding-table-search"
+                                               placeholder="Search in entire table"
+                                               ng-model="widgetOnboarding.searchString" />
+
+                                       <button id="widget-onboarding-button-add"
+                                               class="btn btn-alt btn-small"
+                                               ng-click="widgetOnboarding.openWidgetCatalogDetailsModal()">
+                                               <i class="icon-people-userbookmark" aria-hidden="true"></i>&nbsp;Add
+                                               Widget
+                                       </button>
+
+                                       <div id="widget-onboarding-communcation-message"
+                                               ng-show="widgetOnboarding.isCommError">Failed to communicate
+                                               with the widget microservice.</div>
+
+                                       <div ng-hide="widgetOnboarding.isCommError">
+                                               <div b2b-table table-data="portalAdmin.portalAdminsTableData"
+                                                       ng-hide="widgetOnboarding.isLoadingTable"
+                                                       search-string="portalAdmin.searchString" class="b2b-table-div">
+                                                       <table>
+                                                               <thead b2b-table-row type="header">
+                                                                       <tr>
+                                                                               <th id="widgets-catalog-th-header-name"
+                                                                                       ng-repeat="header in widgetOnboarding.widgetsTableHeaders"
+                                                                                       b2b-table-header key="{{header.value}}"
+                                                                                       sortable="{{header.isSortable}}">{{header.name}}</th>
+                                                                               <th id="widgets-catalog-th-header-url" b2b-table-header
+                                                                                       key="appName" sortable="false">Application</th>
+
+                                                                               <th id="widgets-catalog-th-header-download" b2b-table-header
+                                                                                       sortable="false">Download</th>
+
+                                                                               <th id="widgets-catalog-th-header-delete" b2b-table-header
+                                                                                       sortable="false">Delete</th>
+                                                                       </tr>
+                                                               </thead>
+                                                               <tbody b2b-table-row type="body" class="table-body"
+                                                                       row-repeat="rowData in widgetsList | filter:widgetOnboarding.filterByDropdownValue">
+                                                                       <tr>
+                                                                               <td b2b-table-body
+                                                                                       ng-repeat="header in widgetOnboarding.widgetsTableHeaders"
+                                                                                       id="widgets-catalog-widget-name-{{rowData.id}}-body"
+                                                                                       ng-click="widgetOnboarding.openWidgetCatalogDetailsModal(rowData)">
+                                                                                       <div id="widgets-catalog-widget-name-{{rowData.id}}"
+                                                                                               ng-bind="rowData[header.value]"></div>
+                                                                               </td>
+
+                                                                               <td b2b-table-body
+                                                                                       id="widget-catalog-widget-application-{{rowData.id}}-body"
+                                                                                       ng-click="widgetOnboarding.openWidgetCatalogDetailsModal(rowData)">
+                                                                                       <div ng-repeat="row in rowData.appContent">
+                                                                                               <div id="widget-catalog-widget-application-{{rowData.id}}"
+                                                                                                       ng-bind="row"></div>
+                                                                                       </div>
+                                                                               </td>
+
+                                                                               <td b2b-table-body>
+                                                                                       <div id="widget-onboarding-div-download-widget-{{$index}}" class="icon-arrows-download"
+                                                                                               ng-click="widgetOnboarding.downloadWidget(rowData)"></div>
+                                                                               </td>
+
+                                                                               <td b2b-table-body>
+                                                                                       <div id="widget-onboarding-div-delete-widget-{{$index}}" class="icon-misc-trash"
+                                                                                               ng-click="widgetOnboarding.deleteWidget(rowData)"></div>
+                                                                               </td>
+                                                                       </tr>
+                                                               </tbody>
+                                                       </table>
+                                               </div>
+                                       </div>
+                               </div>
+                       </div>
+               </div>
+       </div>
+</div>
+</div>
index eb628b4..a7c2904 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/20/15.\r
- */\r
-'use strict';\r
-(function () {\r
-    class WidgetDetailsModalCtrl {\r
-        constructor($scope, $log, applicationsService, widgetsService, errorMessageByCode,\r
-                    ECOMP_URL_REGEX, $window, userProfileService, $cookies, $rootScope) {\r
-\r
-            let newWidgetModel = {\r
-                name: null,\r
-                appId: null,\r
-                appName: null,\r
-                width: 360,\r
-                height: 300,\r
-                url: null\r
-            };\r
-\r
-            let getAvailableApps = () => {\r
-                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {\r
-                    this.availableApps=[];\r
-                    for(var i=0;i<apps.length;i++) {\r
-                        if (!apps[i].restrictedApp) {\r
-                            $log.debug('WidgetDetailsModalCtrl::getAvailableApps: pushing {id: ', apps[i].id, 'name: ', apps[i].name,\r
-                                            'restrictedApp: ', apps[i].restrictedApp, '}');\r
-                            this.availableApps.push({\r
-                                id: apps[i].id,\r
-                                name: apps[i].name,\r
-                                restrictedApp: apps[i].restrictedApp\r
-                            });\r
-                        }\r
-                    }\r
-                    \r
-                    if (this.isEditMode) {\r
-                        this.selectedApp = _.find(apps, {id: this.widget.appId});\r
-                        if(!this.selectedApp){\r
-                            //workaround to display validation errors for apps dropdown in case selectedApp isn't valid\r
-                            $scope.widgetForm.app.$dirty = true;\r
-                        }\r
-                    } else {\r
-                        this.selectedApp = null;\r
-                    }\r
-                    //init appId & appName with selectedApp\r
-                    this.updateSelectedApp();\r
-                }).catch(err => {\r
-                    confirmBoxService.showInformation('There was a problem retrieving the Widgets. ' +\r
-                        'Please try again later.').then(isConfirmed => {});\r
-                    $log.error('WidgetDetailsModalCtrl::getAvailableApps error: '+ err);\r
-                });\r
-            };\r
-            /**/\r
-\r
-            let init = () => {\r
-                this.isSaving = false;\r
-                if ($scope.ngDialogData && $scope.ngDialogData.widget) {\r
-                    $log.debug('WidgetDetailsModalCtrl::getAvailableApps: Edit widget mode for', $scope.ngDialogData.widget);\r
-                    this.isEditMode = true;\r
-                    this.widget = _.clone($scope.ngDialogData.widget);\r
-                } else {\r
-                    $log.debug('WidgetDetailsModalCtrl::init: New app mode');\r
-                    this.isEditMode = false;\r
-                    this.widget = _.clone(newWidgetModel);\r
-                }\r
-                getAvailableApps();\r
-            };\r
-\r
-            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;\r
-\r
-            //This part handles conflict errors (409)\r
-            this.conflictMessages = {};\r
-            this.scrollApi = {};\r
-            let handleConflictErrors = err => {\r
-                if(!err.data){\r
-                    return;\r
-                }\r
-                if(!err.data.length){ //support objects\r
-                    err.data = [err.data]\r
-                }\r
-                _.forEach(err.data, item => {\r
-                    _.forEach(item.fields, field => {\r
-                        //set conflict message\r
-                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];\r
-                        //set field as invalid\r
-                        $scope.widgetForm[field.name].$setValidity('conflict', false);\r
-                        //set watch once to clear error after user correction\r
-                        watchOnce[field.name]();\r
-                    });\r
-                });\r
-                this.scrollApi.scrollTop();\r
-            };\r
-\r
-            let resetConflict = fieldName => {\r
-                delete this.conflictMessages[fieldName];\r
-                if($scope.widgetForm[fieldName]){\r
-                    $scope.widgetForm[fieldName].$setValidity('conflict', true);\r
-                }\r
-            };\r
-\r
-            let watchOnce = {\r
-                name: () => {\r
-                    let unregisterName = $scope.$watchGroup(['widgetDetails.selectedApp','widgetDetails.widget.name'], (newVal, oldVal) => {\r
-                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){\r
-                            resetConflict('name');\r
-                            unregisterName();\r
-                        }\r
-                    });\r
-                },\r
-                url: () => {\r
-                    let unregisterUrl = $scope.$watch('widgetDetails.widget.url', (newVal, oldVal) => {\r
-                        if(newVal.toLowerCase() !== oldVal.toLowerCase()) {\r
-                            resetConflict('url');\r
-                            unregisterUrl();\r
-                        }\r
-                    });\r
-                }\r
-            };\r
-            //***************************\r
-\r
-            this.updateSelectedApp = () => {\r
-                if (!this.selectedApp) {\r
-                    return;\r
-                }\r
-                this.widget.appId = this.selectedApp.id;\r
-                this.widget.appName = this.selectedApp.name;\r
-            };\r
-\r
-            let emptyCookies = () => {\r
-                userProfileService.getUserProfile()\r
-                    .then(profile=> {\r
-                        $scope.orgUserId = profile.orgUserId;\r
-                        if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) {\r
-                            $cookies.remove($scope.orgUserId + '_widget');\r
-                        }\r
-                    }).catch(err => {\r
-                        $log.error('WidgetDetailsModalCtrl::emptyCookies: There was a problem emptying the cookies! No user error presented though.');\r
-                    });\r
-            };\r
-\r
-            this.saveChanges = () => {\r
-                if($scope.widgetForm.$invalid){\r
-                    return;\r
-                }\r
-                this.isSaving = true;\r
-                if(this.isEditMode){\r
-                    widgetsService.updateWidget(this.widget.id, this.widget)\r
-                        .then(() => {\r
-                            $log.debug('WidgetDetailsModalCtrl::saveChanges: Widget update succeeded!');\r
-                            $scope.closeThisDialog(true);\r
-                            emptyCookies();\r
-                        }).catch(err => {\r
-                            if(err.status === 409){//Conflict\r
-                                handleConflictErrors(err);\r
-                            } else {\r
-                                confirmBoxService.showInformation('There was a problem saving the Widget. ' +\r
-                                    'Please try again later. Error Status: ' + err.status).then(isConfirmed => {});\r
-                            }\r
-                            $log.error('WidgetDetailsModalCtrl::saveChanges error: ', err);\r
-                        }).finally(()=>{\r
-                            this.isSaving = false;\r
-                            // for bug in IE 11\r
-                            var objOffsetVersion = objAgent.indexOf("MSIE");\r
-                            if (objOffsetVersion != -1) {\r
-                                $log.debug('WidgetDetailsModalCtrl::saveChanges: Browser is IE, forcing Refresh');\r
-                                $window.location.reload();            // for bug in IE 11\r
-                            }\r
-                            // for bug in IE 11\r
-                        });\r
-                } else {\r
-                    widgetsService.createWidget(this.widget)\r
-                        .then(() => {\r
-                            $log.debug('WidgetDetailsModalCtrl::createWidget: Widget creation succeeded!');\r
-                            $scope.closeThisDialog(true);\r
-                            emptyCookies();\r
-                            $rootScope.noWidgets = false;\r
-                        }).catch(err => {\r
-                        if(err.status === 409){//Conflict\r
-                            handleConflictErrors(err);\r
-                        } else {\r
-                            confirmBoxService.showInformation('There was a problem creating the Widget. ' +\r
-                                'Please try again later. Error Status: ' + err.status).then(isConfirmed => {});\r
-                        }\r
-                        $log.error('WidgetDetailsModalCtrl::createWidget error: ',err);\r
-                    }).finally(()=>{\r
-                        this.isSaving = false;\r
-                        // for bug in IE 11\r
-                        var objOffsetVersion = objAgent.indexOf("MSIE");\r
-                        if (objOffsetVersion != -1) {\r
-                            $log.debug('WidgetDetailsModalCtrl::createWidget: Browser is IE, forcing Refresh');\r
-                            $window.location.reload();            // for bug in IE 11\r
-                        }\r
-                        // for bug in IE 11\r
-                    });\r
-                }\r
-            };\r
-\r
-            init();\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    WidgetDetailsModalCtrl.$inject = ['$scope', '$log', 'applicationsService', 'widgetsService', 'errorMessageByCode',\r
-        'ECOMP_URL_REGEX', '$window','userProfileService','$cookies', '$rootScope'];\r
-    angular.module('ecompApp').controller('WidgetDetailsModalCtrl', WidgetDetailsModalCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+(function () {
+    class WidgetDetailsModalCtrl {
+        constructor($scope, $log, applicationsService, widgetsService, errorMessageByCode,
+                    ECOMP_URL_REGEX, $window, userProfileService, $cookies, $rootScope) {
+
+            let newWidgetModel = {
+                name: null,
+                appId: null,
+                appName: null,
+                width: 360,
+                height: 300,
+                url: null
+            };
+
+            let getAvailableApps = () => {
+                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(apps => {
+                    this.availableApps=[];
+                    for(var i=0;i<apps.length;i++) {
+                        if (!apps[i].restrictedApp) {
+                            $log.debug('WidgetDetailsModalCtrl::getAvailableApps: pushing {id: ', apps[i].id, 'name: ', apps[i].name,
+                                            'restrictedApp: ', apps[i].restrictedApp, '}');
+                            this.availableApps.push({
+                                id: apps[i].id,
+                                name: apps[i].name,
+                                restrictedApp: apps[i].restrictedApp
+                            });
+                        }
+                    }
+                    
+                    if (this.isEditMode) {
+                        this.selectedApp = _.find(apps, {id: this.widget.appId});
+                        if(!this.selectedApp){
+                            //workaround to display validation errors for apps dropdown in case selectedApp isn't valid
+                            $scope.widgetForm.app.$dirty = true;
+                        }
+                    } else {
+                        this.selectedApp = null;
+                    }
+                    //init appId & appName with selectedApp
+                    this.updateSelectedApp();
+                }).catch(err => {
+                    confirmBoxService.showInformation('There was a problem retrieving the Widgets. ' +
+                        'Please try again later.').then(isConfirmed => {});
+                    $log.error('WidgetDetailsModalCtrl::getAvailableApps error: '+ err);
+                });
+            };
+            /**/
+
+            let init = () => {
+                this.isSaving = false;
+                if ($scope.ngDialogData && $scope.ngDialogData.widget) {
+                    $log.debug('WidgetDetailsModalCtrl::getAvailableApps: Edit widget mode for', $scope.ngDialogData.widget);
+                    this.isEditMode = true;
+                    this.widget = _.clone($scope.ngDialogData.widget);
+                } else {
+                    $log.debug('WidgetDetailsModalCtrl::init: New app mode');
+                    this.isEditMode = false;
+                    this.widget = _.clone(newWidgetModel);
+                }
+                getAvailableApps();
+            };
+
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+
+            //This part handles conflict errors (409)
+            this.conflictMessages = {};
+            this.scrollApi = {};
+            let handleConflictErrors = err => {
+                if(!err.data){
+                    return;
+                }
+                if(!err.data.length){ //support objects
+                    err.data = [err.data]
+                }
+                _.forEach(err.data, item => {
+                    _.forEach(item.fields, field => {
+                        //set conflict message
+                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];
+                        //set field as invalid
+                        $scope.widgetForm[field.name].$setValidity('conflict', false);
+                        //set watch once to clear error after user correction
+                        watchOnce[field.name]();
+                    });
+                });
+                this.scrollApi.scrollTop();
+            };
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                if($scope.widgetForm[fieldName]){
+                    $scope.widgetForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+
+            let watchOnce = {
+                name: () => {
+                    let unregisterName = $scope.$watchGroup(['widgetDetails.selectedApp','widgetDetails.widget.name'], (newVal, oldVal) => {
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){
+                            resetConflict('name');
+                            unregisterName();
+                        }
+                    });
+                },
+                url: () => {
+                    let unregisterUrl = $scope.$watch('widgetDetails.widget.url', (newVal, oldVal) => {
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()) {
+                            resetConflict('url');
+                            unregisterUrl();
+                        }
+                    });
+                }
+            };
+            //***************************
+
+            this.updateSelectedApp = () => {
+                if (!this.selectedApp) {
+                    return;
+                }
+                this.widget.appId = this.selectedApp.id;
+                this.widget.appName = this.selectedApp.name;
+            };
+
+            let emptyCookies = () => {
+                userProfileService.getUserProfile()
+                    .then(profile=> {
+                        $scope.orgUserId = profile.orgUserId;
+                        if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) {
+                            $cookies.remove($scope.orgUserId + '_widget');
+                        }
+                    }).catch(err => {
+                        $log.error('WidgetDetailsModalCtrl::emptyCookies: There was a problem emptying the cookies! No user error presented though.');
+                    });
+            };
+
+            this.saveChanges = () => {
+                if($scope.widgetForm.$invalid){
+                    return;
+                }
+                this.isSaving = true;
+                if(this.isEditMode){
+                    widgetsService.updateWidget(this.widget.id, this.widget)
+                        .then(() => {
+                            $log.debug('WidgetDetailsModalCtrl::saveChanges: Widget update succeeded!');
+                            $scope.closeThisDialog(true);
+                            emptyCookies();
+                        }).catch(err => {
+                            if(err.status === 409){//Conflict
+                                handleConflictErrors(err);
+                            } else {
+                                confirmBoxService.showInformation('There was a problem saving the Widget. ' +
+                                    'Please try again later. Error Status: ' + err.status).then(isConfirmed => {});
+                            }
+                            $log.error('WidgetDetailsModalCtrl::saveChanges error: ', err);
+                        }).finally(()=>{
+                            this.isSaving = false;
+                            // for bug in IE 11
+                            var objOffsetVersion = objAgent.indexOf("MSIE");
+                            if (objOffsetVersion != -1) {
+                                $log.debug('WidgetDetailsModalCtrl::saveChanges: Browser is IE, forcing Refresh');
+                                $window.location.reload();            // for bug in IE 11
+                            }
+                            // for bug in IE 11
+                        });
+                } else {
+                    widgetsService.createWidget(this.widget)
+                        .then(() => {
+                            $log.debug('WidgetDetailsModalCtrl::createWidget: Widget creation succeeded!');
+                            $scope.closeThisDialog(true);
+                            emptyCookies();
+                            $rootScope.noWidgets = false;
+                        }).catch(err => {
+                        if(err.status === 409){//Conflict
+                            handleConflictErrors(err);
+                        } else {
+                            confirmBoxService.showInformation('There was a problem creating the Widget. ' +
+                                'Please try again later. Error Status: ' + err.status).then(isConfirmed => {});
+                        }
+                        $log.error('WidgetDetailsModalCtrl::createWidget error: ',err);
+                    }).finally(()=>{
+                        this.isSaving = false;
+                        // for bug in IE 11
+                        var objOffsetVersion = objAgent.indexOf("MSIE");
+                        if (objOffsetVersion != -1) {
+                            $log.debug('WidgetDetailsModalCtrl::createWidget: Browser is IE, forcing Refresh');
+                            $window.location.reload();            // for bug in IE 11
+                        }
+                        // for bug in IE 11
+                    });
+                }
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                e.preventDefault();
+            });
+        }
+    }
+    WidgetDetailsModalCtrl.$inject = ['$scope', '$log', 'applicationsService', 'widgetsService', 'errorMessageByCode',
+        'ECOMP_URL_REGEX', '$window','userProfileService','$cookies', '$rootScope'];
+    angular.module('ecompApp').controller('WidgetDetailsModalCtrl', WidgetDetailsModalCtrl);
+})();
index 1762fad..927836a 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-// 'use strict';\r
-// describe('Controller: WidgetDetailsModalCtrl', ()=> {\r
-//     /**\r
-//      * INITIALIZATION\r
-//      */\r
-//     beforeEach(module('testUtils'));\r
-//     beforeEach(module('ecompApp'));\r
-//\r
-//     let promisesTestUtils;\r
-//     //destroy $http default cache before starting to prevent the error 'default cache already exists'\r
-//     //_promisesTestUtils_ comes from testUtils for promises resolve/reject\r
-//     beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {\r
-//         _CacheFactory_.destroyAll();\r
-//         promisesTestUtils = _promisesTestUtils_;\r
-//     }));\r
-//\r
-//     let widgetDetails, scope, $controller, $q, $rootScope, $log, widgetsService, errorMessageByCode, ECOMP_URL_REGEX;\r
-//     let deferredAdminApps, deferredUserProfile;\r
-//     let applicationsServiceMock, widgetsServiceMock, userProfileServiceMock;\r
-//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {\r
-//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];\r
-//\r
-//         deferredAdminApps = $q.defer();\r
-//         deferredUserProfile = $q.defer();\r
-//         /*applicationsServiceMock = {\r
-//             getAppsForSuperAdminAndAccountAdmin: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             }\r
-//         };*/\r
-//\r
-//         widgetsServiceMock = {\r
-//             updateWidget: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             },\r
-//             createWidget: () => {\r
-//                 var promise = () => {return deferredAdminApps.promise};\r
-//                 var cancel = jasmine.createSpy();\r
-//                 return {\r
-//                     promise: promise,\r
-//                     cancel: cancel\r
-//                 }\r
-//             }\r
-//         };\r
-//\r
-//         userProfileServiceMock = jasmine.createSpyObj('userProfileServiceMock',['getUserProfile']);\r
-//         userProfileServiceMock.getUserProfile.and.returnValue(deferredUserProfile.promise);\r
-//\r
-//         applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock',['getAppsForSuperAdminAndAccountAdmin']);\r
-//         applicationsServiceMock.getAppsForSuperAdminAndAccountAdmin.and.returnValue(deferredAdminApps.promise);\r
-//\r
-//     }));\r
-//\r
-//     beforeEach(()=> {\r
-//         errorMessageByCode = [];\r
-//         ECOMP_URL_REGEX = "";\r
-//         scope = $rootScope.$new();\r
-//         createController(scope);\r
-//     });\r
-//\r
-//     let createController = scopeObj => {\r
-//         widgetDetails = $controller('WidgetDetailsModalCtrl', {\r
-//             $scope: scope,\r
-//             $log: $log,\r
-//             applicationsService: applicationsServiceMock,\r
-//             widgetsService: widgetsServiceMock,\r
-//             errorMessageByCode: errorMessageByCode,\r
-//             ECOMP_URL_REGEX: ECOMP_URL_REGEX,\r
-//             userProfileService: userProfileServiceMock\r
-//         });\r
-//     };\r
-//\r
-//     /**\r
-//      * MOCK DATA\r
-//      */\r
-//     let newWidgetModel = {\r
-//         name: null,\r
-//         appId: null,\r
-//         appName: null,\r
-//         width: 360,\r
-//         height: 300,\r
-//         url: null\r
-//     };\r
-//     let exsistingWidget = {\r
-//         name: 'some widget',\r
-//         appId: 1,\r
-//         appName: 'APP NAME',\r
-//         width: 360,\r
-//         height: 300,\r
-//         url: 'http://a.com'\r
-//     };\r
-//     let adminApps = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];\r
-//\r
-//     /**\r
-//      * TEST CASES\r
-//      */\r
-//     it('should initialize controller with new widget mode when opening the modal without selected widget', ()=> {\r
-//         expect(widgetDetails.widget).toEqual(newWidgetModel);\r
-//     });\r
-//\r
-//     it('should initialize controller with exsisting widget details when opening the modal with selected widget', ()=> {\r
-//         scope.ngDialogData = {\r
-//             widget: exsistingWidget\r
-//         };\r
-//         createController(scope);\r
-//         expect(widgetDetails.widget).toEqual(exsistingWidget);\r
-//     });\r
-//\r
-//     it('should populate widget selected app name and id when initializing controller with widget', () =>{\r
-//         deferredAdminApps.resolve(adminApps);\r
-//         scope.ngDialogData = {\r
-//             widget: exsistingWidget\r
-//         };\r
-//         createController(scope);\r
-//         scope.$apply();\r
-//         expect(widgetDetails.widget.appId).toEqual(adminApps[0].id);\r
-//         expect(widgetDetails.widget.appName).toEqual(adminApps[0].name);\r
-//     });\r
-//\r
-//     //TODO:\r
-//     //save changes fail - conflict handling\r
-//     //save changes success\r
-//\r
-//\r
-//\r
-// });\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+// 'use strict';
+// describe('Controller: WidgetDetailsModalCtrl', ()=> {
+//     /**
+//      * INITIALIZATION
+//      */
+//     beforeEach(module('testUtils'));
+//     beforeEach(module('ecompApp'));
+//
+//     let promisesTestUtils;
+//     //destroy $http default cache before starting to prevent the error 'default cache already exists'
+//     //_promisesTestUtils_ comes from testUtils for promises resolve/reject
+//     beforeEach(inject((_CacheFactory_, _promisesTestUtils_)=> {
+//         _CacheFactory_.destroyAll();
+//         promisesTestUtils = _promisesTestUtils_;
+//     }));
+//
+//     let widgetDetails, scope, $controller, $q, $rootScope, $log, widgetsService, errorMessageByCode, ECOMP_URL_REGEX;
+//     let deferredAdminApps, deferredUserProfile;
+//     let applicationsServiceMock, widgetsServiceMock, userProfileServiceMock;
+//     beforeEach(inject((_$controller_, _$q_, _$rootScope_, _$log_)=> {
+//         [$controller, $q, $rootScope, $log] = [_$controller_, _$q_, _$rootScope_, _$log_];
+//
+//         deferredAdminApps = $q.defer();
+//         deferredUserProfile = $q.defer();
+//         /*applicationsServiceMock = {
+//             getAppsForSuperAdminAndAccountAdmin: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             }
+//         };*/
+//
+//         widgetsServiceMock = {
+//             updateWidget: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             },
+//             createWidget: () => {
+//                 var promise = () => {return deferredAdminApps.promise};
+//                 var cancel = jasmine.createSpy();
+//                 return {
+//                     promise: promise,
+//                     cancel: cancel
+//                 }
+//             }
+//         };
+//
+//         userProfileServiceMock = jasmine.createSpyObj('userProfileServiceMock',['getUserProfile']);
+//         userProfileServiceMock.getUserProfile.and.returnValue(deferredUserProfile.promise);
+//
+//         applicationsServiceMock = jasmine.createSpyObj('applicationsServiceMock',['getAppsForSuperAdminAndAccountAdmin']);
+//         applicationsServiceMock.getAppsForSuperAdminAndAccountAdmin.and.returnValue(deferredAdminApps.promise);
+//
+//     }));
+//
+//     beforeEach(()=> {
+//         errorMessageByCode = [];
+//         ECOMP_URL_REGEX = "";
+//         scope = $rootScope.$new();
+//         createController(scope);
+//     });
+//
+//     let createController = scopeObj => {
+//         widgetDetails = $controller('WidgetDetailsModalCtrl', {
+//             $scope: scope,
+//             $log: $log,
+//             applicationsService: applicationsServiceMock,
+//             widgetsService: widgetsServiceMock,
+//             errorMessageByCode: errorMessageByCode,
+//             ECOMP_URL_REGEX: ECOMP_URL_REGEX,
+//             userProfileService: userProfileServiceMock
+//         });
+//     };
+//
+//     /**
+//      * MOCK DATA
+//      */
+//     let newWidgetModel = {
+//         name: null,
+//         appId: null,
+//         appName: null,
+//         width: 360,
+//         height: 300,
+//         url: null
+//     };
+//     let exsistingWidget = {
+//         name: 'some widget',
+//         appId: 1,
+//         appName: 'APP NAME',
+//         width: 360,
+//         height: 300,
+//         url: 'http://a.com'
+//     };
+//     let adminApps = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];
+//
+//     /**
+//      * TEST CASES
+//      */
+//     it('should initialize controller with new widget mode when opening the modal without selected widget', ()=> {
+//         expect(widgetDetails.widget).toEqual(newWidgetModel);
+//     });
+//
+//     it('should initialize controller with exsisting widget details when opening the modal with selected widget', ()=> {
+//         scope.ngDialogData = {
+//             widget: exsistingWidget
+//         };
+//         createController(scope);
+//         expect(widgetDetails.widget).toEqual(exsistingWidget);
+//     });
+//
+//     it('should populate widget selected app name and id when initializing controller with widget', () =>{
+//         deferredAdminApps.resolve(adminApps);
+//         scope.ngDialogData = {
+//             widget: exsistingWidget
+//         };
+//         createController(scope);
+//         scope.$apply();
+//         expect(widgetDetails.widget.appId).toEqual(adminApps[0].id);
+//         expect(widgetDetails.widget.appName).toEqual(adminApps[0].name);
+//     });
+//
+//     //TODO:
+//     //save changes fail - conflict handling
+//     //save changes success
+//
+//
+//
+// });
index 46a5b1c..0f77ef6 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="widget-details-modal">\r
-    <div id="'widgets-details-title" class="title">Widget Details</div>\r
-\r
-    <div class="widget-properties-main" scroll-top="widgetDetails.scrollApi">\r
-        <form id="widgets-details-form" name="widgetForm" novalidate autocomplete="off">\r
-            <!-- We can remove this script once we get to AT&T Corporate Firefox version 47\r
-                 autocomplete="off" won't work until v47 -->\r
-            <script type="text/javascript">\r
-                document.getElementById("appForm").reset();\r
-            </script>\r
-            <div class="item required">\r
-                <div class="item-label">Application Name</div>\r
-                <div class="custom-select-wrap">\r
-                    <select id="widgets-details-select-app"\r
-                            class="select-field"\r
-                            ng-model="widgetDetails.selectedApp"\r
-                            ng-change="widgetDetails.updateSelectedApp();"\r
-                            ng-options="app.name for app in widgetDetails.availableApps track by app.id"\r
-                            ng-disabled="!widgetDetails.availableApps || !widgetDetails.availableApps.length"\r
-                            name="app"\r
-                            required>\r
-                        <option id="widgets-details-select-app-disabled" value="" disabled style="display: none;">Select application</option>\r
-                    </select>\r
-                </div>\r
-                <div class="error-container" ng-show="widgetForm.app.$dirty">\r
-                    <div ng-messages="widgetForm.app.$error" class="error-container">\r
-                        <small id="widgets-details-select-app-error-required" class="err-message" ng-message="required">Application is required</small>\r
-                    </div>\r
-                </div>\r
-            </div>\r
-            <div class="item required">\r
-                <div class="item-label">Widget Name</div>\r
-                <input id="widgets-details-input-name"\r
-                       class="input-field"\r
-                       type="text"\r
-                       ng-model="widgetDetails.widget.name"\r
-                       name="name"\r
-                       maxlength="100"\r
-                       ng-pattern="/^[a-zA-Z0-9_\s\&]*$/"\r
-                       required/>\r
-\r
-                <div class="error-container" ng-show="widgetDetails.conflictMessages.name">\r
-                    <small id="widgets-details-input-name-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.name"></small>\r
-                </div>\r
-                <div class="error-container" ng-show="widgetForm.name.$dirty || widgetDetails.isEditMode">\r
-                    <div ng-messages="widgetForm.name.$error" class="error-container">\r
-                        <small id="widgets-details-input-name-required" class="err-message" ng-message="required">Widget Name is required</small>\r
-                        <small id="widgets-details-input-name-pattern" class="err-message" ng-message="pattern">Widget Name must be letters, numbers, or underscore</small>\r
-                    </div>\r
-                </div>\r
-            </div>\r
-            <div class="item required">\r
-                <div class="left-item">\r
-                    <div class="item-label">Width</div>\r
-                    <input id="widgets-details-input-width"\r
-                           class="input-field"\r
-                           type="number"\r
-                           ng-model="widgetDetails.widget.width"\r
-                           name="width"\r
-                           min="300"\r
-                           required\r
-                           disabled/>\r
-\r
-                    <div class="error-container" ng-show="widgetForm.width.$dirty || widgetDetails.isEditMode">\r
-                        <div ng-messages="widgetForm.width.$error" class="error-container">\r
-                            <small id="widgets-details-input-width-required" class="err-message" ng-message="required">Widget width is required</small>\r
-                            <small id="widgets-details-input-min-width" class="err-message" ng-message="min">Minimum width is 300</small>\r
-                        </div>\r
-                    </div>\r
-                </div>\r
-                <div class="right-item required">\r
-                    <div class="item-label">Height</div>\r
-                    <input id="widgets-details-input-height"\r
-                           class="input-field"\r
-                           type="number"\r
-                           ng-model="widgetDetails.widget.height"\r
-                           name="height"\r
-                           min="200"\r
-                           required\r
-                           disabled/>\r
-\r
-                    <div class="error-container" ng-show="widgetForm.height.$dirty || widgetDetails.isEditMode">\r
-                        <div ng-messages="widgetForm.height.$error" class="error-container">\r
-                            <small id="widgets-details-input-height-required" class="err-message" ng-message="required">Widget height is required</small>\r
-                            <small id="widgets-details-input-height-minimum" class="err-message" ng-message="min">Minimum height is 200</small>\r
-                        </div>\r
-                    </div>\r
-                </div>\r
-            </div>\r
-            <div class="item required">\r
-                <div class="item-label">URL</div>\r
-                <input id="widgets-details-input-URL"\r
-                       class="input-field"\r
-                       type="url"\r
-                       ng-model="widgetDetails.widget.url"\r
-                       name="url"\r
-                       maxlength="256"\r
-                       ng-pattern="widgetDetails.ECOMP_URL_REGEX"\r
-                       required/>\r
-\r
-                <!--\r
-                <div class="url-validation-button"\r
-                     ng-class="{'disabled': widgetForm.url.$invalid}"\r
-                     ng-click="(widgetForm.url.$invalid) || widgetDetails.validateUrl()">Validate URL\r
-                </div>\r
-                -->\r
-\r
-                <div class="error-container" ng-show="widgetDetails.conflictMessages.url">\r
-                    <small id="widgets-details-input-URL-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.url"></small>\r
-                </div>\r
-                <div class="error-container" ng-show="widgetForm.url.$dirty || widgetDetails.isEditMode">\r
-                    <div ng-messages="widgetForm.url.$error" class="error-container">\r
-                        <small id="widgets-details-input-URL-required" class="err-message" ng-message="required">Widget URL is required</small>\r
-                        <small id="widgets-details-input-URL-pattern" class="err-message" ng-message="pattern">Incorrect URL pattern</small>\r
-                    </div>\r
-                    <!--\r
-                    <div class="error-container" ng-show="widgetForm.url.$valid && !widgetDetails.conflictMessages.url">\r
-                        <small class="err-message" ng-hide="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>\r
-                        <small class="valid-message" ng-show="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>\r
-                    </div>\r
-                    -->\r
-                </div>\r
-\r
-            </div>\r
-        </form>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <span class="ecomp-save-spinner" ng-show="widgetDetails.isSaving"></span>\r
-        <div id="widgets-details-next-button" class="next-button"\r
-             ng-class="{disabled: widgetForm.$invalid}" ng-click="widgetDetails.saveChanges()">Save</div>\r
-        <div id="widgets-details-cancel-button" class="cancel-button" ng-click="closeThisDialog()">Cancel</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="widget-details-modal">
+    <div id="'widgets-details-title" class="title">Widget Details</div>
+
+    <div class="widget-properties-main" scroll-top="widgetDetails.scrollApi">
+        <form id="widgets-details-form" name="widgetForm" novalidate autocomplete="off">
+            <!-- We can remove this script once we get to AT&T Corporate Firefox version 47
+                 autocomplete="off" won't work until v47 -->
+            <script type="text/javascript">
+                document.getElementById("appForm").reset();
+            </script>
+            <div class="item required">
+                <div class="item-label">Application Name</div>
+                <div class="custom-select-wrap">
+                    <select id="widgets-details-select-app"
+                            class="select-field"
+                            ng-model="widgetDetails.selectedApp"
+                            ng-change="widgetDetails.updateSelectedApp();"
+                            ng-options="app.name for app in widgetDetails.availableApps track by app.id"
+                            ng-disabled="!widgetDetails.availableApps || !widgetDetails.availableApps.length"
+                            name="app"
+                            required>
+                        <option id="widgets-details-select-app-disabled" value="" disabled style="display: none;">Select application</option>
+                    </select>
+                </div>
+                <div class="error-container" ng-show="widgetForm.app.$dirty">
+                    <div ng-messages="widgetForm.app.$error" class="error-container">
+                        <small id="widgets-details-select-app-error-required" class="err-message" ng-message="required">Application is required</small>
+                    </div>
+                </div>
+            </div>
+            <div class="item required">
+                <div class="item-label">Widget Name</div>
+                <input id="widgets-details-input-name"
+                       class="input-field"
+                       type="text"
+                       ng-model="widgetDetails.widget.name"
+                       name="name"
+                       maxlength="100"
+                       ng-pattern="/^[a-zA-Z0-9_\s\&]*$/"
+                       required/>
+
+                <div class="error-container" ng-show="widgetDetails.conflictMessages.name">
+                    <small id="widgets-details-input-name-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.name"></small>
+                </div>
+                <div class="error-container" ng-show="widgetForm.name.$dirty || widgetDetails.isEditMode">
+                    <div ng-messages="widgetForm.name.$error" class="error-container">
+                        <small id="widgets-details-input-name-required" class="err-message" ng-message="required">Widget Name is required</small>
+                        <small id="widgets-details-input-name-pattern" class="err-message" ng-message="pattern">Widget Name must be letters, numbers, or underscore</small>
+                    </div>
+                </div>
+            </div>
+            <div class="item required">
+                <div class="left-item">
+                    <div class="item-label">Width</div>
+                    <input id="widgets-details-input-width"
+                           class="input-field"
+                           type="number"
+                           ng-model="widgetDetails.widget.width"
+                           name="width"
+                           min="300"
+                           required
+                           disabled/>
+
+                    <div class="error-container" ng-show="widgetForm.width.$dirty || widgetDetails.isEditMode">
+                        <div ng-messages="widgetForm.width.$error" class="error-container">
+                            <small id="widgets-details-input-width-required" class="err-message" ng-message="required">Widget width is required</small>
+                            <small id="widgets-details-input-min-width" class="err-message" ng-message="min">Minimum width is 300</small>
+                        </div>
+                    </div>
+                </div>
+                <div class="right-item required">
+                    <div class="item-label">Height</div>
+                    <input id="widgets-details-input-height"
+                           class="input-field"
+                           type="number"
+                           ng-model="widgetDetails.widget.height"
+                           name="height"
+                           min="200"
+                           required
+                           disabled/>
+
+                    <div class="error-container" ng-show="widgetForm.height.$dirty || widgetDetails.isEditMode">
+                        <div ng-messages="widgetForm.height.$error" class="error-container">
+                            <small id="widgets-details-input-height-required" class="err-message" ng-message="required">Widget height is required</small>
+                            <small id="widgets-details-input-height-minimum" class="err-message" ng-message="min">Minimum height is 200</small>
+                        </div>
+                    </div>
+                </div>
+            </div>
+            <div class="item required">
+                <div class="item-label">URL</div>
+                <input id="widgets-details-input-URL"
+                       class="input-field"
+                       type="url"
+                       ng-model="widgetDetails.widget.url"
+                       name="url"
+                       maxlength="256"
+                       ng-pattern="widgetDetails.ECOMP_URL_REGEX"
+                       required/>
+
+                <!--
+                <div class="url-validation-button"
+                     ng-class="{'disabled': widgetForm.url.$invalid}"
+                     ng-click="(widgetForm.url.$invalid) || widgetDetails.validateUrl()">Validate URL
+                </div>
+                -->
+
+                <div class="error-container" ng-show="widgetDetails.conflictMessages.url">
+                    <small id="widgets-details-input-URL-conflict" class="err-message" ng-bind="widgetDetails.conflictMessages.url"></small>
+                </div>
+                <div class="error-container" ng-show="widgetForm.url.$dirty || widgetDetails.isEditMode">
+                    <div ng-messages="widgetForm.url.$error" class="error-container">
+                        <small id="widgets-details-input-URL-required" class="err-message" ng-message="required">Widget URL is required</small>
+                        <small id="widgets-details-input-URL-pattern" class="err-message" ng-message="pattern">Incorrect URL pattern</small>
+                    </div>
+                    <!--
+                    <div class="error-container" ng-show="widgetForm.url.$valid && !widgetDetails.conflictMessages.url">
+                        <small class="err-message" ng-hide="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>
+                        <small class="valid-message" ng-show="widgetDetails.urlValidity.isValid" ng-bind="widgetDetails.urlValidity.message"></small>
+                    </div>
+                    -->
+                </div>
+
+            </div>
+        </form>
+    </div>
+    <div class="dialog-control">
+        <span class="ecomp-save-spinner" ng-show="widgetDetails.isSaving"></span>
+        <div id="widgets-details-next-button" class="next-button"
+             ng-class="{disabled: widgetForm.$invalid}" ng-click="widgetDetails.saveChanges()">Save</div>
+        <div id="widgets-details-cancel-button" class="cancel-button" ng-click="closeThisDialog()">Cancel</div>
+    </div>
+</div>
index e46f1ce..1998d6d 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class WidgetsCtrl {\r
-        constructor($log, applicationsService, widgetsService, ngDialog, confirmBoxService,\r
-                    userProfileService, $cookies, $scope, $rootScope) {\r
-            //$log.info('WidgetsCtrl::init: Starting Up');\r
-            $scope.infoMessage = true;\r
-            $rootScope.noWidgets = false;\r
-\r
-            let populateAvailableApps = widgets => {\r
-                let allPortalsFilterObject = {index: 0, title: 'All applications', value: ''};\r
-                this.availableApps = [allPortalsFilterObject];\r
-                this.filterByApp = this.availableApps[0];\r
-                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(myApps => {\r
-                    var reSortedApp = myApps.sort(getSortOrder("name"));\r
-                    var realAppIndex = 1;\r
-                    for (let i = 1; i <= reSortedApp.length; i++) {\r
-                        if (!reSortedApp[i-1].restrictedApp) {\r
-                            $log.debug('WidgetsCtrl::populateAvailableApps: pushing {index: ', realAppIndex, 'title: ', reSortedApp[i - 1].name,\r
-                                'value: ', reSortedApp[i - 1].name, '}');\r
-                            this.availableApps.push({\r
-                                index: realAppIndex,\r
-                                title: reSortedApp[i - 1].name,\r
-                                value: reSortedApp[i - 1].name\r
-                            })\r
-                            realAppIndex = realAppIndex + 1;\r
-                        }\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error(err);\r
-                });\r
-            };\r
-\r
-            let getOnboardingWidgets = () => {\r
-                this.isLoadingTable = true;\r
-                widgetsService.getManagedWidgets().then(res => {\r
-                    $log.debug('WidgetsCtrl.getOnboardingWidgets:: ' + JSON.stringify(res));\r
-                    // if (JSON.stringify(res) === '[]') {\r
-                    //     confirmBoxService.showInformation('There are currently no Widgets. ').then(isConfirmed => {});\r
-                    // }\r
-                    var reSortedWidget = res.sort(getSortOrder("name"));\r
-                    this.widgetsList = reSortedWidget;\r
-                    populateAvailableApps(reSortedWidget);\r
-                    // $log.info('WidgetsHomeCtrl::getUserWidgets count : ' + $scope.widgetsList.length);\r
-                    if (Object.keys(res).length === 0 ) {\r
-                        $rootScope.noWidgets = true;\r
-                        $scope.isLoadingTable = false;\r
-                        $log.info('WidgetsHomeCtrl::getUserWidgets: There are no available Widgets');\r
-                    }\r
-                }).catch(err => {\r
-                    confirmBoxService.showInformation('There was a problem retrieving the Widgets. ' +\r
-                        'Please try again later.').then(isConfirmed => {});\r
-                    $log.error('WidgetsCtrl::getOnboardingWidgets error: ' + err);\r
-                }).finally(()=> {\r
-                    this.isLoadingTable = false;\r
-                });\r
-            };\r
-\r
-            // Refactor this into a directive\r
-            let getSortOrder = (prop) => {\r
-                return function(a, b) {\r
-                    // $log.debug('a = ' + JSON.stringify(a) + "| b = " + JSON.stringify(b));\r
-                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {\r
-                        return 1;\r
-                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {\r
-                        return -1;\r
-                    }\r
-                    return 0;\r
-                }\r
-            }\r
-\r
-            $scope.hideMe = function () {\r
-                $scope.infoMessage = false;\r
-            }\r
-\r
-            let init = () => {\r
-                this.isLoadingTable = false;\r
-                getOnboardingWidgets();\r
-\r
-                /*Table general configuration params*/\r
-                this.searchString = '';\r
-                /*Table data*/\r
-                this.widgetsTableHeaders = [\r
-                    {name: 'Widget Name', value: 'name', isSortable: false},\r
-                    {name: 'Application', value: 'appName', isSortable: true},\r
-                    {name: 'Width', value: 'width', isSortable: false},\r
-                    {name: 'Height', value: 'height', isSortable: false}\r
-                ];\r
-                this.widgetsList = [];\r
-            };\r
-\r
-            this.filterByDropdownValue = item => {\r
-                if(this.filterByApp.value === ''){\r
-                    return true;\r
-                }\r
-                return item.appName === this.filterByApp.value;\r
-            };\r
-\r
-            this.openWidgetDetailsModal = (selectedWidget) => {\r
-                let data = null;\r
-                if(selectedWidget){\r
-                    if(!selectedWidget.id){\r
-                        $log.error('Widget id not found');\r
-                        return;\r
-                    }\r
-                    data = {\r
-                        widget: selectedWidget\r
-                    }\r
-                }\r
-                ngDialog.open({\r
-                    templateUrl: 'app/views/widgets/widget-details-dialog/widget-details.modal.html',\r
-                    controller: 'WidgetDetailsModalCtrl',\r
-                    controllerAs: 'widgetDetails',\r
-                    data: data\r
-                }).closePromise.then(needUpdate => {\r
-                    if(needUpdate.value === true){\r
-                        $log.debug('WidgetsCtrl::openWidgetDetailsModal: updating table data...');\r
-                        getOnboardingWidgets();\r
-                    }\r
-                });\r
-            };\r
-\r
-            this.deleteWidget = widget => {\r
-                confirmBoxService.deleteItem(widget.name).then(isConfirmed => {\r
-                    if(isConfirmed){\r
-                        if(!widget || !widget.id){\r
-                            $log.error('WidgetsCtrl::deleteWidget: No widget or ID... cannot delete');\r
-                            return;\r
-                        }\r
-                        widgetsService.deleteWidget(widget.id).then(() => {\r
-                            this.widgetsList.splice(this.widgetsList.indexOf(widget), 1);\r
-                        }).catch(err => {\r
-                            $log.error('WidgetsCtrl::deleteWidget error:',err);\r
-                            confirmBoxService.showInformation('There was a problem deleting the Widget. ' +\r
-                                'Please try again later.').then(isConfirmed => {});\r
-                        });\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('WidgetsCtrl::deleteWidget error:',err);\r
-                });\r
-            };\r
-\r
-            init();\r
-        }\r
-    }\r
-    WidgetsCtrl.$inject = ['$log', 'applicationsService', 'widgetsService', 'ngDialog', 'confirmBoxService',\r
-        'userProfileService','$cookies', '$scope', '$rootScope'];\r
-    angular.module('ecompApp').controller('WidgetsCtrl', WidgetsCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class WidgetsCtrl {
+        constructor($log, applicationsService, widgetsService, ngDialog, confirmBoxService,
+                    userProfileService, $cookies, $scope, $rootScope) {
+            //$log.info('WidgetsCtrl::init: Starting Up');
+            $scope.infoMessage = true;
+            $rootScope.noWidgets = false;
+
+            let populateAvailableApps = widgets => {
+                let allPortalsFilterObject = {index: 0, title: 'All applications', value: ''};
+                this.availableApps = [allPortalsFilterObject];
+                this.filterByApp = this.availableApps[0];
+                applicationsService.getAppsForSuperAdminAndAccountAdmin().then(myApps => {
+                    var reSortedApp = myApps.sort(getSortOrder("name"));
+                    var realAppIndex = 1;
+                    for (let i = 1; i <= reSortedApp.length; i++) {
+                        if (!reSortedApp[i-1].restrictedApp) {
+                            $log.debug('WidgetsCtrl::populateAvailableApps: pushing {index: ', realAppIndex, 'title: ', reSortedApp[i - 1].name,
+                                'value: ', reSortedApp[i - 1].name, '}');
+                            this.availableApps.push({
+                                index: realAppIndex,
+                                title: reSortedApp[i - 1].name,
+                                value: reSortedApp[i - 1].name
+                            })
+                            realAppIndex = realAppIndex + 1;
+                        }
+                    }
+                }).catch(err => {
+                    $log.error(err);
+                });
+            };
+
+            let getOnboardingWidgets = () => {
+                this.isLoadingTable = true;
+                widgetsService.getManagedWidgets().then(res => {
+                    $log.debug('WidgetsCtrl.getOnboardingWidgets:: ' + JSON.stringify(res));
+                    // if (JSON.stringify(res) === '[]') {
+                    //     confirmBoxService.showInformation('There are currently no Widgets. ').then(isConfirmed => {});
+                    // }
+                    var reSortedWidget = res.sort(getSortOrder("name"));
+                    this.widgetsList = reSortedWidget;
+                    populateAvailableApps(reSortedWidget);
+                    // $log.info('WidgetsHomeCtrl::getUserWidgets count : ' + $scope.widgetsList.length);
+                    if (Object.keys(res).length === 0 ) {
+                        $rootScope.noWidgets = true;
+                        $scope.isLoadingTable = false;
+                        $log.info('WidgetsHomeCtrl::getUserWidgets: There are no available Widgets');
+                    }
+                }).catch(err => {
+                    confirmBoxService.showInformation('There was a problem retrieving the Widgets. ' +
+                        'Please try again later.').then(isConfirmed => {});
+                    $log.error('WidgetsCtrl::getOnboardingWidgets error: ' + err);
+                }).finally(()=> {
+                    this.isLoadingTable = false;
+                });
+            };
+
+            // Refactor this into a directive
+            let getSortOrder = (prop) => {
+                return function(a, b) {
+                    // $log.debug('a = ' + JSON.stringify(a) + "| b = " + JSON.stringify(b));
+                    if (a[prop].toLowerCase() > b[prop].toLowerCase()) {
+                        return 1;
+                    } else if (a[prop].toLowerCase() < b[prop].toLowerCase()) {
+                        return -1;
+                    }
+                    return 0;
+                }
+            }
+
+            $scope.hideMe = function () {
+                $scope.infoMessage = false;
+            }
+
+            let init = () => {
+                this.isLoadingTable = false;
+                getOnboardingWidgets();
+
+                /*Table general configuration params*/
+                this.searchString = '';
+                /*Table data*/
+                this.widgetsTableHeaders = [
+                    {name: 'Widget Name', value: 'name', isSortable: false},
+                    {name: 'Application', value: 'appName', isSortable: true},
+                    {name: 'Width', value: 'width', isSortable: false},
+                    {name: 'Height', value: 'height', isSortable: false}
+                ];
+                this.widgetsList = [];
+            };
+
+            this.filterByDropdownValue = item => {
+                if(this.filterByApp.value === ''){
+                    return true;
+                }
+                return item.appName === this.filterByApp.value;
+            };
+
+            this.openWidgetDetailsModal = (selectedWidget) => {
+                let data = null;
+                if(selectedWidget){
+                    if(!selectedWidget.id){
+                        $log.error('Widget id not found');
+                        return;
+                    }
+                    data = {
+                        widget: selectedWidget
+                    }
+                }
+                ngDialog.open({
+                    templateUrl: 'app/views/widgets/widget-details-dialog/widget-details.modal.html',
+                    controller: 'WidgetDetailsModalCtrl',
+                    controllerAs: 'widgetDetails',
+                    data: data
+                }).closePromise.then(needUpdate => {
+                    if(needUpdate.value === true){
+                        $log.debug('WidgetsCtrl::openWidgetDetailsModal: updating table data...');
+                        getOnboardingWidgets();
+                    }
+                });
+            };
+
+            this.deleteWidget = widget => {
+                confirmBoxService.deleteItem(widget.name).then(isConfirmed => {
+                    if(isConfirmed){
+                        if(!widget || !widget.id){
+                            $log.error('WidgetsCtrl::deleteWidget: No widget or ID... cannot delete');
+                            return;
+                        }
+                        widgetsService.deleteWidget(widget.id).then(() => {
+                            this.widgetsList.splice(this.widgetsList.indexOf(widget), 1);
+                        }).catch(err => {
+                            $log.error('WidgetsCtrl::deleteWidget error:',err);
+                            confirmBoxService.showInformation('There was a problem deleting the Widget. ' +
+                                'Please try again later.').then(isConfirmed => {});
+                        });
+                    }
+                }).catch(err => {
+                    $log.error('WidgetsCtrl::deleteWidget error:',err);
+                });
+            };
+
+            init();
+        }
+    }
+    WidgetsCtrl.$inject = ['$log', 'applicationsService', 'widgetsService', 'ngDialog', 'confirmBoxService',
+        'userProfileService','$cookies', '$scope', '$rootScope'];
+    angular.module('ecompApp').controller('WidgetsCtrl', WidgetsCtrl);
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 8afb826..9d6f66f 100644 (file)
@@ -1,81 +1,81 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-main">\r
-    <div class="w-ecomp-main-container">\r
-        <div class="widgets-page-main" id="page-content">\r
-            <div id="widget-onboarding-title" class="w-ecomp-main-view-title">Widget Onboarding</div>\r
-            <div class="widgets-table">\r
-                <div class="table-control">\r
-                        <div class="c-ecomp-portal-abs-select default">\r
-                            <div class="form-field" id="widegets-available-apps"\r
-                                 att-select="widgets.availableApps"\r
-                                 ng-model="widgets.filterByApp"></div>\r
-                        </div>\r
-                    <input class="table-search" type="text" id="widget-onboarding-table-search"\r
-                           placeholder="Search in entire table"\r
-                           ng-model="widgets.searchString"/>\r
-\r
-                    <div id="widget-onboarding-button-add" class="add-button" ng-click="widgets.openWidgetDetailsModal()">Add Widget</div>\r
-                </div>\r
-                <div class="error-text" ng-show="infoMessage">\r
-                    <span class="error-help">Only widgets for active applications are displayed.</span>\r
-                    <button type="button" class="close" ng-click="hideMe()">&times;</button>\r
-                </div>\r
-                <div class="error-text" ng-show="noWidgets">\r
-                    <span class="informational">There are currently no widgets available.</span>\r
-                </div>\r
-\r
-                <span class="ecomp-spinner" ng-show="widgets.isLoadingTable"></span>\r
-                <div class="c-ecomp-portal-abs-table default" ng-hide="widgets.isLoadingTable">\r
-                    <table b2b-table\r
-                           table-data="widgets.widgetsList"\r
-                           search-string="widgets.searchString"\r
-                           view-per-page="widgets.viewPerPageIgnored"\r
-                           current-page="widgets.currentPageIgnored"\r
-                           total-page="widgets.totalPageIgnored">\r
-                        <thead b2b-table-row type="header">\r
-                        <tr>\r
-                            <th id="widget-onboarding-th-header-name" ng-repeat="header in widgets.widgetsTableHeaders" b2b-table-header key="{{header.value}}" sortable="{{header.isSortable}}">{{header.name}}</th>\r
-                            <th id="widget-onboarding-th-header-url" b2b-table-header  key="url" sortable="{{false}}">URL</th>\r
-                            <th id="widget-onboarding-th-header-delete" b2b-table-header  sortable="{{false}}">Delete</th>\r
-                        </tr>\r
-                        </thead>\r
-                        <tbody b2b-table-row type="body"\r
-                               class="table-body"\r
-                               row-repeat="rowData in widgets.widgetsList | filter:widgets.filterByDropdownValue">\r
-                        <tr >\r
-                            <td b2b-table-body ng-repeat="header in widgets.widgetsTableHeaders" ng-click="widgets.openWidgetDetailsModal(rowData)">\r
-                                <div id="widget-onboarding-div-{{rowData[header.value].split(' ').join('-')}}" ng-bind="rowData[header.value]"></div>\r
-                            </td>\r
-                            <td b2b-table-body ng-click="widgets.openWidgetDetailsModal(rowData)">\r
-                                <div id="widget-onboarding-div-url-{{rowData[header.value].split(' ').join('-')}}" ng-bind="rowData.url | trusted"></div>\r
-                            </td>\r
-                            <td b2b-table-body>\r
-                                <div id="widget-onboarding-div-delete-widget-{{$index}}" class="delete-widget" ng-click="widgets.deleteWidget(rowData)"></div>\r
-                            </td>\r
-                        </tr>\r
-                        </tbody>\r
-                    </table>\r
-                </div>\r
-            </div>\r
-        </div>\r
-    </div>\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-main">
+    <div class="w-ecomp-main-container">
+        <div class="widgets-page-main" id="page-content">
+            <div id="widget-onboarding-title" class="w-ecomp-main-view-title">Widget Onboarding</div>
+            <div class="widgets-table">
+                <div class="table-control">
+                        <div class="c-ecomp-portal-abs-select default">
+                            <div class="form-field" id="widegets-available-apps"
+                                 att-select="widgets.availableApps"
+                                 ng-model="widgets.filterByApp"></div>
+                        </div>
+                    <input class="table-search" type="text" id="widget-onboarding-table-search"
+                           placeholder="Search in entire table"
+                           ng-model="widgets.searchString"/>
+
+                    <div id="widget-onboarding-button-add" class="add-button" ng-click="widgets.openWidgetDetailsModal()">Add Widget</div>
+                </div>
+                <div class="error-text" ng-show="infoMessage">
+                    <span class="error-help">Only widgets for active applications are displayed.</span>
+                    <button type="button" class="close" ng-click="hideMe()">&times;</button>
+                </div>
+                <div class="error-text" ng-show="noWidgets">
+                    <span class="informational">There are currently no widgets available.</span>
+                </div>
+
+                <span class="ecomp-spinner" ng-show="widgets.isLoadingTable"></span>
+                <div class="c-ecomp-portal-abs-table default" ng-hide="widgets.isLoadingTable">
+                    <table b2b-table
+                           table-data="widgets.widgetsList"
+                           search-string="widgets.searchString"
+                           view-per-page="widgets.viewPerPageIgnored"
+                           current-page="widgets.currentPageIgnored"
+                           total-page="widgets.totalPageIgnored">
+                        <thead b2b-table-row type="header">
+                        <tr>
+                            <th id="widget-onboarding-th-header-name" ng-repeat="header in widgets.widgetsTableHeaders" b2b-table-header key="{{header.value}}" sortable="{{header.isSortable}}">{{header.name}}</th>
+                            <th id="widget-onboarding-th-header-url" b2b-table-header  key="url" sortable="{{false}}">URL</th>
+                            <th id="widget-onboarding-th-header-delete" b2b-table-header  sortable="{{false}}">Delete</th>
+                        </tr>
+                        </thead>
+                        <tbody b2b-table-row type="body"
+                               class="table-body"
+                               row-repeat="rowData in widgets.widgetsList | filter:widgets.filterByDropdownValue">
+                        <tr >
+                            <td b2b-table-body ng-repeat="header in widgets.widgetsTableHeaders" ng-click="widgets.openWidgetDetailsModal(rowData)">
+                                <div id="widget-onboarding-div-{{rowData[header.value].split(' ').join('-')}}" ng-bind="rowData[header.value]"></div>
+                            </td>
+                            <td b2b-table-body ng-click="widgets.openWidgetDetailsModal(rowData)">
+                                <div id="widget-onboarding-div-url-{{rowData[header.value].split(' ').join('-')}}" ng-bind="rowData.url | trusted"></div>
+                            </td>
+                            <td b2b-table-body>
+                                <div id="widget-onboarding-div-delete-widget-{{$index}}" class="delete-widget" ng-click="widgets.deleteWidget(rowData)"></div>
+                            </td>
+                        </tr>
+                        </tbody>
+                    </table>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
index 32774d6..47181f8 100644 (file)
-/*! b2b-angular-library - v1.0.1 - Last updated: 2017-03-02. Copyright (c) 2016 AT&T Services, Inc. */ \r
-.b2b-horizontal-table {\r
-  border: 1px solid;\r
-  width: 651px; }\r
-  .b2b-horizontal-table ::-webkit-scrollbar {\r
-    height: 10px; }\r
-  .b2b-horizontal-table ::-webkit-scrollbar-thumb {\r
-    background: #666666;\r
-    border-radius: 5px; }\r
-  .b2b-horizontal-table .b2b-horizontal-table-inner-container {\r
-    width: 650px;\r
-    padding-left: 150px;\r
-    overflow-x: scroll; }\r
-  .b2b-horizontal-table th:first-child {\r
-    background-color: #FFFFFF; }\r
-  .b2b-horizontal-table td:first-child {\r
-    background-color: #FFFFFF;\r
-    border-top: 1px solid #cccccc;\r
-    border-right: 1px solid #cccccc;\r
-    margin-top: -0.5px; }\r
-  .b2b-horizontal-table tr th:nth-child(2), .b2b-horizontal-table tr td:nth-child(2) {\r
-    border-left: none; }\r
-  .b2b-horizontal-table .b2b-horizontal-table-column-info {\r
-    padding-top: 16px;\r
-    text-align: center; }\r
-  .b2b-horizontal-table .b2b-horizontal-table-arrows .btn-arrow:hover, .b2b-horizontal-table .b2b-horizontal-table-arrows .btn-arrow:focus {\r
-    text-decoration: none; }\r
-  .b2b-horizontal-table .b2b-horizontal-table-arrows .left {\r
-    float: left;\r
-    margin: 10px;\r
-    color: #0568ae; }\r
-    .b2b-horizontal-table .b2b-horizontal-table-arrows .left[disabled] {\r
-      color: #767676;\r
-      cursor: not-allowed; }\r
-  .b2b-horizontal-table .b2b-horizontal-table-arrows .right {\r
-    float: right;\r
-    clear: right;\r
-    margin: 10px;\r
-    color: #0568ae; }\r
-    .b2b-horizontal-table .b2b-horizontal-table-arrows .right[disabled] {\r
-      color: #767676;\r
-      cursor: not-allowed; }\r
-    .b2b-horizontal-table .b2b-horizontal-table-arrows .right.btn-arrow .btn {\r
-      margin-right: 0;\r
-      margin-left: 10px; }\r
-\r
-@-moz-document url-prefix() {\r
-  .b2b-horizontal-table td:first-child {\r
-    border-top: none; } }\r
-* {\r
-  box-sizing: border-box; }\r
-\r
-:root {\r
-  -ms-overflow-style: -ms-autohiding-scrollbar;\r
-  overflow-y: scroll;\r
-  -ms-text-size-adjust: 100%;\r
-  -webkit-text-size-adjust: 100%;\r
-  box-sizing: border-box;\r
-  font: 0.625pc/1.5 sans-serif;\r
-  text-rendering: optimizeLegibility; }\r
-\r
-html {\r
-  overflow-y: scroll;\r
-  -webkit-overflow-scrolling: touch;\r
-  height: 100%;\r
-  position: relative; }\r
-\r
-h1,\r
-h2,\r
-h3,\r
-h4,\r
-h5,\r
-p,\r
-blockquote,\r
-figure,\r
-ol,\r
-ul {\r
-  margin: 0;\r
-  padding: 0; }\r
-\r
-/* a:focus {\r
-  outline: thin dotted #191919;\r
-} */\r
-sub,\r
-sup {\r
-  font-size: 75%;\r
-  line-height: 0;\r
-  position: relative;\r
-  vertical-align: top; }\r
-\r
-sup {\r
-  top: .75em;\r
-  display: inline-block; }\r
-\r
-sub {\r
-  bottom: -0.25em; }\r
-\r
-img {\r
-  max-width: 100%;\r
-  height: auto;\r
-  vertical-align: middle;\r
-  border: 0;\r
-  -ms-interpolation-mode: bicubic; }\r
-\r
-.img-no-rwd {\r
-  max-width: inherit !important; }\r
-\r
-svg {\r
-  display: inline-block; }\r
-\r
-.responsive-img {\r
-  width: 100%;\r
-  height: auto; }\r
-\r
-button,\r
-input,\r
-select,\r
-textarea {\r
-  margin: 0;\r
-  font-size: 100%;\r
-  vertical-align: middle; }\r
-\r
-::-moz-focus-inner {\r
-  padding: 0;\r
-  border: 0; }\r
-\r
-button,\r
-html input[type="button"],\r
-input[type="reset"],\r
-input[type="submit"] {\r
-  appearance: button;\r
-  cursor: pointer; }\r
-\r
-label,\r
-select,\r
-button,\r
-input[type="button"],\r
-input[type="reset"],\r
-input[type="submit"],\r
-input[type="radio"],\r
-input[type="checkbox"] {\r
-  cursor: pointer; }\r
-\r
-input[type=search] {\r
-  -webkit-appearance: textfield; }\r
-\r
-input[type=search]:-webkit-search-cancel-button,\r
-input[type=search]:-webkit-search-decoration {\r
-  -webkit-appearance: none; }\r
-\r
-textarea {\r
-  overflow: auto;\r
-  vertical-align: top;\r
-  resize: none; }\r
-\r
-select {\r
-  -moz-appearance: none;\r
-  -webkit-appearance: none; }\r
-\r
-[aria-busy=true] {\r
-  cursor: progress; }\r
-\r
-[aria-controls] {\r
-  cursor: pointer; }\r
-\r
-body {\r
-  background-color: #ffffff;\r
-  color: #191919;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-/*  font-size: 1.6rem;\r
-  line-height: 2rem;*/\r
-  margin: 0;\r
-  position: relative;\r
-  width: 100%;\r
-  -moz-osx-font-smoothing: grayscale;\r
-  -webkit-font-smoothing: antialiased; }\r
-\r
-small {\r
-  font-size: 1.6rem; }\r
-\r
-.container {\r
-  margin: 0 auto;\r
-  padding: 0; }\r
-\r
-.tooltip {\r
-  display: inline-block;\r
-  height: 20px;\r
-  margin: 1px 0 0 7px;\r
-  vertical-align: middle; }\r
-\r
-.tooltip-wrapper {\r
-  display: none; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02";\r
-  src: url("fonts/Omnes_ATTW02.eot");\r
-  src: url("fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02.woff") format("woff"), url("fonts/Omnes_ATTW02.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Medium";\r
-  src: url("fonts/Omnes_ATTW02Medium.eot");\r
-  src: url("fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Medium.woff") format("woff"), url("fonts/Omnes_ATTW02Medium.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Italic";\r
-  src: url("fonts/Omnes_ATTW02Italic.eot");\r
-  src: url("fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Italic.woff") format("woff"), url("fonts/Omnes_ATTW02Italic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Light";\r
-  src: url("fonts/Omnes_ATTW02Light.eot");\r
-  src: url("fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Light.woff") format("woff"), url("fonts/Omnes_ATTW02Light.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Bold";\r
-  src: url("fonts/Omnes_ATTW02Bold.eot");\r
-  src: url("fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Bold.woff") format("woff"), url("fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("fonts/Omnes_ATTW02Bold.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Light-Italic";\r
-  src: url("fonts/Omnes_ATTW02LightItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Medium-Italic";\r
-  src: url("fonts/Omnes_ATTW02MediumItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Bold-Italic";\r
-  src: url("fonts/Omnes_ATTW02BoldItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-/* TODO: Build a reference page for these classes */\r
-.font-regular {\r
-  font-family: "Omnes-ECOMP-W02", Arial !important; }\r
-\r
-.font-light {\r
-  font-family: "Omnes-ECOMP-W02-Light", Arial !important; }\r
-\r
-.font-italic {\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }\r
-\r
-.font-light-italic {\r
-  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }\r
-\r
-.font-medium {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }\r
-\r
-.font-medium-italic {\r
-  font-family: "Omnes-ECOMP-W02-Medium-Italic", Arial !important; }\r
-\r
-.font-reset {\r
-  font-style: normal;\r
-  font-variant: normal;\r
-  font-weight: normal;\r
-  text-transform: none; }\r
-\r
-.visible-phone {\r
-  display: none !important; }\r
-\r
-.visible-tablet {\r
-  display: none !important; }\r
-\r
-.hidden-desktop {\r
-  display: none !important; }\r
-\r
-.visible-desktop {\r
-  display: inherit !important; }\r
-\r
-.row,\r
-.row-nowrap {\r
-  margin-left: 0; }\r
-\r
-.row:before,\r
-.row-nowrap:before,\r
-.row:after,\r
-.row-nowrap:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.row:after,\r
-.row-nowrap:after {\r
-  clear: both; }\r
-\r
-.row:before,\r
-.row-nowrap:before,\r
-.row:after,\r
-.row-nowrap:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.row:after,\r
-.row-nowrap:after {\r
-  clear: both; }\r
-\r
-.row,\r
-.row-nowrap {\r
-  display: flex; }\r
-\r
-.row > [class*="span"],\r
-.row-nowrap > [class*="span"] {\r
-  float: left;\r
-  margin-right: 14px;\r
-  margin-right: 1.40845%\9; }\r
-\r
-.row > [class*="span"]:last-child,\r
-.row-nowrap > [class*="span"]:last-child {\r
-  margin-right: 0; }\r
-\r
-.row > [class*="span"].centered,\r
-.row-nowrap > [class*="span"].centered {\r
-  margin-left: auto !important;\r
-  margin-right: auto !important; }\r
-\r
-.row.no-flex,\r
-.row-nowrap.no-flex {\r
-  display: block; }\r
-\r
-.row.no-flex > [class*="span"],\r
-.row-nowrap.no-flex > [class*="span"] {\r
-  margin-right: 1.408450704225352%; }\r
-\r
-.row.no-flex > [class*="span"]:last-child,\r
-.row-nowrap.no-flex > [class*="span"]:last-child {\r
-  margin-right: 0; }\r
-\r
-.row.flex-justify,\r
-.row-nowrap.flex-justify {\r
-  justify-content: space-between; }\r
-\r
-.row.flex-justify > [class*="span"],\r
-.row-nowrap.flex-justify > [class*="span"] {\r
-  flex: 1 1 0; }\r
-\r
-.row.flex-justify > .flex-col,\r
-.row-nowrap.flex-justify > .flex-col {\r
-  margin-right: 14px;\r
-  margin-right: 1.40845%\9; }\r
-\r
-.row.flex-wrap,\r
-.row-nowrap.flex-wrap {\r
-  flex-wrap: wrap; }\r
-\r
-.align-items-top {\r
-  align-items: flex-start; }\r
-\r
-.align-items-center {\r
-  align-items: center; }\r
-\r
-.align-items-bottom {\r
-  align-items: flex-end; }\r
-\r
-.align-self-top {\r
-  align-self: flex-start; }\r
-\r
-.align-self-center {\r
-  align-self: center; }\r
-\r
-.align-self-bottom {\r
-  align-self: flex-end; }\r
-\r
-.row .fixed-230 {\r
-  flex: 0;\r
-  display: block;\r
-  width: 230px;\r
-  vertical-align: top;\r
-  min-width: 230px;\r
-  background-color: #efefef; }\r
-\r
-.row .fluid-space {\r
-  flex: 1 1 0;\r
-  display: block;\r
-  vertical-align: top;\r
-  padding-left: 0;\r
-  padding-right: 20px;\r
-  width: 100%; }\r
-\r
-.row .fixed-230 + .fluid-space {\r
-  padding-left: 20px;\r
-  padding-right: 20px; }\r
-\r
-.row .fluid-space:last-child {\r
-  padding-right: 0; }\r
-\r
-.span1 {\r
-  width: 7.042253521126761%; }\r
-\r
-.span2 {\r
-  width: 15.49295774647887%; }\r
-\r
-.span3 {\r
-  width: 23.94366197183099%; }\r
-\r
-.span4 {\r
-  width: 32.3943661971831%; }\r
-\r
-.span5 {\r
-  width: 40.84507042253521%; }\r
-\r
-.span6 {\r
-  width: 49.29577464788733%; }\r
-\r
-.span7 {\r
-  width: 57.74647887323944%; }\r
-\r
-.span8 {\r
-  width: 66.19718309859155%; }\r
-\r
-.span9 {\r
-  width: 74.64788732394367%; }\r
-\r
-.span10 {\r
-  width: 83.09859154929578%; }\r
-\r
-.span11 {\r
-  width: 91.54929577464789%; }\r
-\r
-.span12 {\r
-  width: 100%; }\r
-\r
-.offset1 {\r
-  margin-left: 8.450704225352113%; }\r
-\r
-.offset2 {\r
-  margin-left: 16.90140845070423%; }\r
-\r
-.offset3 {\r
-  margin-left: 25.35211267605634%; }\r
-\r
-.offset4 {\r
-  margin-left: 33.8028169%; }\r
-\r
-.offset5 {\r
-  margin-left: 42.25352113%; }\r
-\r
-.offset6 {\r
-  margin-left: 50.70422535%; }\r
-\r
-.offset7 {\r
-  margin-left: 59.15492958%; }\r
-\r
-.offset8 {\r
-  margin-left: 67.6056338%; }\r
-\r
-.offset9 {\r
-  margin-left: 76.05633803%; }\r
-\r
-.offset10 {\r
-  margin-left: 84.50704225%; }\r
-\r
-.offset11 {\r
-  margin-left: 92.95774648%; }\r
-\r
-.align-center {\r
-  margin: 0 auto;\r
-  text-align: center; }\r
-\r
-[class*="span"].align-center {\r
-  margin: 0 auto !important;\r
-  float: none; }\r
-\r
-.align-left .container {\r
-  padding-left: 0 !important;\r
-  margin: 0 !important; }\r
-\r
-/* BEGIN RESPONSIVE-4.LESS ************** */\r
-@media (min-width: 1025px) {\r
-  .row > [class*="span"],\r
-  .row-nowrap > [class*="span"] {\r
-    margin-right: 20px;\r
-    margin-right: 1.487301587301587%\9; }\r
-  .container {\r
-    padding-left: 20px;\r
-    padding-right: 20px;\r
-    max-width: 1260px; }\r
-  /* 1col = 6.878306878306879 */\r
-  /* 1colgutter = 1.587301587301587 */\r
-  .span0 {\r
-    display: none; }\r
-  .span1 {\r
-    width: 6.878306878306879%; }\r
-  .span2 {\r
-    width: 15.34391534391534%; }\r
-  .span3 {\r
-    width: 23.80952380952381%; }\r
-  .span4 {\r
-    width: 32.27513227513228%; }\r
-  .span5 {\r
-    width: 40.74074074074074%; }\r
-  .span6 {\r
-    width: 49.20634920634921%; }\r
-  .span7 {\r
-    width: 57.67195767195767%; }\r
-  .span8 {\r
-    width: 66.13756613756614%; }\r
-  .span9 {\r
-    width: 74.60317460317461%; }\r
-  .span10 {\r
-    width: 83.06878306878308%; }\r
-  .span11 {\r
-    width: 91.53439153439154%; }\r
-  .span12 {\r
-    width: 100%; }\r
-  .offset1 {\r
-    margin-left: 8.465608465608466%; }\r
-  .offset2 {\r
-    margin-left: 16.93121693121693%; }\r
-  .offset3 {\r
-    margin-left: 25.3968253968254%; }\r
-  .offset4 {\r
-    margin-left: 33.86243386%; }\r
-  .offset5 {\r
-    margin-left: 42.32804233%; }\r
-  .offset6 {\r
-    margin-left: 50.79365079%; }\r
-  .offset7 {\r
-    margin-left: 59.25925926%; }\r
-  .offset8 {\r
-    margin-left: 67.72486772%; }\r
-  .offset9 {\r
-    margin-left: 76.19047619%; }\r
-  .offset10 {\r
-    margin-left: 84.65608466%; }\r
-  .offset11 {\r
-    margin-left: 93.12169312%; }\r
-  .tooltip-size-control {\r
-    position: relative;\r
-    width: 400px; }\r
-  .thumbnails > li {\r
-    margin-left: 1.40845070422535%; }\r
-  .row .thumbnails {\r
-    margin-left: 0; } }\r
-\r
-/* END RESPONSIVE-4.LESS ****************** */\r
-/* BEGIN RESPONSIVE-3.LESS ******************* */\r
-@media (min-width: 768px) and (max-width: 1024px) {\r
-  .hidden-desktop {\r
-    display: inherit !important; }\r
-  .visible-desktop {\r
-    display: none !important; }\r
-  .visible-tablet {\r
-    display: inherit !important; }\r
-  .hidden-tablet {\r
-    display: none !important; }\r
-  .container {\r
-    width: 100%;\r
-    margin: 0 auto;\r
-    padding-left: 20px;\r
-    padding-right: 20px; }\r
-  .span0-md {\r
-    display: none; }\r
-  .span1-md {\r
-    width: 7.042253521126761%; }\r
-  .span2-md {\r
-    width: 15.49295774647887%; }\r
-  .span3-md {\r
-    width: 23.94366197183099%; }\r
-  .span4-md {\r
-    width: 32.3943661971831%; }\r
-  .span5-md {\r
-    width: 40.84507042253521%; }\r
-  .span6-md {\r
-    width: 49.29577464788733%; }\r
-  .span7-md {\r
-    width: 57.74647887323944%; }\r
-  .span8-md {\r
-    width: 66.19718309859155%; }\r
-  .span9-md {\r
-    width: 74.64788732394367%; }\r
-  .span10-md {\r
-    width: 83.09859154929578%; }\r
-  .span11-md {\r
-    width: 91.54929577464789%; }\r
-  .span12-md {\r
-    width: 100%; }\r
-  .offset1-md {\r
-    margin-left: 8.450704225352113%; }\r
-  .offset2-md {\r
-    margin-left: 16.90140845070423%; }\r
-  .offset3-md {\r
-    margin-left: 25.35211267605634%; }\r
-  .offset4-md {\r
-    margin-left: 33.8028169%; }\r
-  .offset5-md {\r
-    margin-left: 42.25352113%; }\r
-  .offset6-md {\r
-    margin-left: 50.70422535%; }\r
-  .offset7-md {\r
-    margin-left: 59.15492958%; }\r
-  .offset8-md {\r
-    margin-left: 67.6056338%; }\r
-  .offset9-md {\r
-    margin-left: 76.05633803%; }\r
-  .offset10-md {\r
-    margin-left: 84.50704225%; }\r
-  .offset11-md {\r
-    margin-left: 92.95774648%; }\r
-  .tooltip-size-control {\r
-    position: relative;\r
-    width: 300px; } }\r
-\r
-/* END RESPONSIVE-3.LESS ******************* */\r
-/* BEGIN RESPONSIVE-2.LESS *************** */\r
-@media (max-width: 767px) {\r
-  .hidden-desktop {\r
-    display: inherit !important; }\r
-  .visible-desktop {\r
-    display: none !important; }\r
-  .visible-phone {\r
-    display: inherit !important; }\r
-  .visible-tablet {\r
-    display: inherit !important; }\r
-  .hidden-phone {\r
-    display: none !important; }\r
-  .hidden-tablet {\r
-    display: none !important; }\r
-  .container {\r
-    width: auto;\r
-    padding-left: 15px;\r
-    padding-right: 15px; }\r
-  /*.row{ display:block; }*/\r
-  .row > [class*="span"] {\r
-    float: none;\r
-    margin-left: 0;\r
-    margin-right: 0;\r
-    width: 100%; }\r
-  .row {\r
-    display: block; }\r
-  .row.flex > .flex-col,\r
-  .row-nowrap.flex > .flex-col {\r
-    margin-right: 0; }\r
-  .row .fixed-230 {\r
-    display: block;\r
-    width: 100%; }\r
-  .row .fluid-space {\r
-    display: block;\r
-    padding-left: 0;\r
-    padding-right: 0;\r
-    width: auto; }\r
-  .row .fluid-space + .fixed-230 {\r
-    padding-left: 0; }\r
-  .row .fluid-space:last-child {\r
-    padding-right: 0; }\r
-  .span0-sm {\r
-    display: none; }\r
-  .span1-sm {\r
-    width: 7.042253521126761%; }\r
-  .span2-sm {\r
-    width: 15.49295774647887%; }\r
-  .span3-sm {\r
-    width: 23.94366197183099%; }\r
-  .span4-sm {\r
-    width: 32.3943661971831%; }\r
-  .span5-sm {\r
-    width: 40.84507042253521%; }\r
-  .span6-sm {\r
-    width: 49.29577464788733%; }\r
-  .span7-sm {\r
-    width: 57.74647887323944%; }\r
-  .span8-sm {\r
-    width: 66.19718309859155%; }\r
-  .span9-sm {\r
-    width: 74.64788732394367%; }\r
-  .span10-sm {\r
-    width: 83.09859154929578%; }\r
-  .span11-sm {\r
-    width: 91.54929577464789%; }\r
-  .span12-sm {\r
-    width: 100%; }\r
-  .offset1-sm {\r
-    margin-left: 8.450704225352113%; }\r
-  .offset2-sm {\r
-    margin-left: 16.90140845070423%; }\r
-  .offset3-sm {\r
-    margin-left: 25.35211267605634%; }\r
-  .offset4-sm {\r
-    margin-left: 33.8028169%; }\r
-  .offset5-sm {\r
-    margin-left: 42.25352113%; }\r
-  .offset6-sm {\r
-    margin-left: 50.70422535%; }\r
-  .offset7-sm {\r
-    margin-left: 59.15492958%; }\r
-  .offset8-sm {\r
-    margin-left: 67.6056338%; }\r
-  .offset9-sm {\r
-    margin-left: 76.05633803%; }\r
-  .offset10-sm {\r
-    margin-left: 84.50704225%; }\r
-  .offset11-sm {\r
-    margin-left: 92.95774648%; }\r
-  input {\r
-    padding: 8px 15px 8px 15px; }\r
-  .field-group input.input-emphasized[type="search"] + .reset-field:after {\r
-    top: 14px; }\r
-  .field-group input.input-emphasized[type="search"] + .reset-field {\r
-    height: 46px;\r
-    top: 1px; }\r
-  .marquee {\r
-    margin-bottom: 30px; }\r
-  .marquee .blur-overlay {\r
-    border-radius: 0;\r
-    position: absolute;\r
-    bottom: 0;\r
-    left: 0;\r
-    width: 100%;\r
-    margin: 0;\r
-    padding: 34px 15px 30px; }\r
-  .marquee + div {\r
-    margin-top: 30px; }\r
-  .marquee h1 {\r
-    font-size: 1.8rem;\r
-    letter-spacing: -0.035px; }\r
-  .marquee .lead {\r
-    font-size: 3.0rem;\r
-    line-height: 3.6rem;\r
-    margin-bottom: 0; }\r
-  .marquee p:not(.lead) {\r
-    font-family: "Omnes-ECOMP-W02-Light" , Arial;\r
-    font-size: 1.8rem;\r
-    margin-bottom: 0; }\r
-  .marquee .btn-fullwidth {\r
-    margin-top: 10px;\r
-    width: 100%;\r
-    float: none; }\r
-  .tooltip-size-control {\r
-    width: 100%; }\r
-  .table-wrapper,\r
-  .accordion-table-layout {\r
-    margin-left: -15px;\r
-    margin-right: -15px; }\r
-  .table-wrapper caption {\r
-    padding-left: 15px; } }\r
-\r
-@media (max-width: 480px) {\r
-  .span1-xsm {\r
-    width: 7.042253521126761%; }\r
-  .span2-xsm {\r
-    width: 15.49295774647887%; }\r
-  .span3-xsm {\r
-    width: 23.94366197183099%; }\r
-  .span4-xsm {\r
-    width: 32.3943661971831%; }\r
-  .span5-xsm {\r
-    width: 40.84507042253521%; }\r
-  .span6-xsm {\r
-    width: 49.29577464788733%; }\r
-  .span7-xsm {\r
-    width: 57.74647887323944%; }\r
-  .span8-xsm {\r
-    width: 66.19718309859155%; }\r
-  .span9-xsm {\r
-    width: 74.64788732394367%; }\r
-  .span10-xsm {\r
-    width: 83.09859154929578%; }\r
-  .span11-xsm {\r
-    width: 91.54929577464789%; }\r
-  .span12-xsm {\r
-    width: 100%; }\r
-  .offset1-xsm {\r
-    margin-left: 8.450704225352113%; }\r
-  .offset2-xsm {\r
-    margin-left: 16.90140845070423%; }\r
-  .offset3-xsm {\r
-    margin-left: 25.35211267605634%; }\r
-  .offset4-xsm {\r
-    margin-left: 33.8028169%; }\r
-  .offset5-xsm {\r
-    margin-left: 42.25352113%; }\r
-  .offset6-xsm {\r
-    margin-left: 50.70422535%; }\r
-  .offset7-xsm {\r
-    margin-left: 59.15492958%; }\r
-  .offset8-xsm {\r
-    margin-left: 67.6056338%; }\r
-  .offset9-xsm {\r
-    margin-left: 76.05633803%; }\r
-  .offset10-xsm {\r
-    margin-left: 84.50704225%; }\r
-  .offset11-xsm {\r
-    margin-left: 92.95774648%; } }\r
-\r
-/* END RESPONSIVE-2.LESS ******************* */\r
-/* BEGIN RESPONSIVE-1.LESS ************** */\r
-.xxxxxxxx-begin-responsive-480px.less {\r
-  /* placeholder */ }\r
-\r
-@media (max-width: 480px) {\r
-  .hidden-desktop {\r
-    display: inherit !important; }\r
-  .hidden-tablet {\r
-    display: inherit !important; }\r
-  .hidden-phone {\r
-    display: none !important; }\r
-  .visible-desktop {\r
-    display: none !important; }\r
-  .visible-tablet {\r
-    display: none !important; }\r
-  .visible-phone {\r
-    display: inherit !important; }\r
-  .container {\r
-    width: auto;\r
-    padding-left: 15px;\r
-    padding-right: 15px; } }\r
-\r
-@font-face {\r
-  font-family: 'icoPrimary';\r
-  src: url("fonts/icons/icoPrimary.eot?timestamp=@@timestamp");\r
-  src: url("fonts/icons/icoPrimary.eot?timestamp=@@timestamp#iefix") format("embedded-opentype"), url("data:font/woff2; charset=utf-8;base64,d09GMgABAAAAABD0AAsAAAAAIegAABClAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAfBEICroMr2IBNgIkA4EgC1IABCAFgyoHIBupG1GUj1aB7Gdh7HA7jbPiOgkYNpcuoRGZ37q6G3w0QpLZI9q02bs97HSRw5ogEesTAjElSqy0FGpCCRWzJBXR9DXJiydPX7T+Ip7vq3Pv2mcm2W+ShSugqkVXWVfbquUDpNKMTezCAYKwBVR91VU1+/0yazd3Lg9/AVmoSmRNKGStQEmoXKfLdLXNNyxbs5Yfwc8kTV8FeDfk73Xq+p9zCqBT5NCYYSvusE3/f1mxnmQFWA6RnaJdkoqgAvFKLJdQbnlDXMbO3TvsHZa1ZsvFBqhZqAl6879jOe2lIjbiiEUU6HPz354AaHoI7QMGgDpOXQeAvZtjQTfBi9SwGR2SIFAN8E15bK7/byAvdR15B0eq3dPoY80wQNCRBpSOYaquB+mFOI/OPmQdcg6lDWUMzf2mPPFfIgEMIB8Vhmz3g8Q/IzYiOSH/Lz9muMlr/jtGiCJVD2IyIRDYAKCZgxRuYmymuEdFrlK6KIorkyoV0Jgn91QkTcVrHlnDg0jnUvGnTA92OqstI80g6PVEEm6BJ58mg+OFFJIiZSQJRK/PEoSkZFHIMFiIwSg5iVar1xtzjZI/tyLTWigIQa1DY08zd4EUSVJK8Gz82QyGgCCkMyoZr7IHBBsvEoBwgxx6h+4EV3YeZwzc4W52q6lXGM9evr6oy1gTMmP79l5RTsJBClIq7jrFUaLH1BlHKTeOKPwhzFfAQqrZ2mdSzISbZTdbdQl5bjevMrg6SgcDfJsLwZ/gjUAu7PiWjAuyegyQbSvIRz8KdZreQMHJY91AKf2ArQnUq2M6QdzlV0h1cKvJFCQVXWrjZUR+mfsPuqrSKAw7vXHdA4jIfVYLo4QrFyzwSOWFzqWWIKXKCEE+n6FtUFH2YbuLsSii68GKBu9o6y0RSZVJ6FRPGxY6Wb2FSJub7hiVhvKqc+F2ZtFE3vy1GtWhiilfD6YouogRzzUU9QRuchi1FjSJJgeylOAoWaCMiX6CWJbjEw6CqMHl0OrKXnIfH7FAFHoZV2FPGgcTV4VSp4ELLxaGwcusuFYdvr5GheLQpKy5GMVLTbBdzuKpytLgd8xSTL08wGmaatJUkkztzRHn2w1Xct5RnWGYyhc+auWs9aErust7X2pNknPQ2B2xIlkrnvHaZA1jFaxXrNVb3cXM+hsVaV1EXdc/huV7XRgkZtxMJhCI4mMuecG0QWlOcxNicqGmtL5Yl1MtLdMuJZAYGFr+/P8+gr7e06WKrICOPml5b5Sf7tmW1JdFGrwGUEwBf/ugoV77AoqJkjXmTRyNQO+F45oBx8CweKoOWwPZj+aomITyzIUd5nHykU3h0LJjuvrUF2MQTKJTKF3omb9SMBepKzcOhZBoAWkP8+mKQRI+dD7mrTs3znGe6gr/mwGLt422RgkZnEDSK3zTEJuKNuypY3YIlACmD/E9UiDiW2pRpQFoIgY7UcwtdgFPmOI1KptGbgcZMkRPIREEQT6lN2dwYWs3U1lqLIorlivL7I4rN2oukpq/qu/QZiikJ5jZH+SjMMi4EXhLg9b7QhPFhFjkFki1i1pl8SNzSoZkDACAalthJVIMPBQdXQdiqtHyZrzsHFI1T5Gb6wPe+qNx+crLqRAFgeKxDOFLaukLuRIbl/ourN1HPnsxaSqUSLpJAXWIYs5UHlzOXzuteVtoQ9hau02jSTcwSs6UMVxp7dI8ung189KKGvmmpMtZF8G85uXCLcWOprejUii+ko1h/AYKs28W8lVRxlHzLI3XJYBelGiLoBBX01ilMCJwScYKsWmLVkmq3hLYezFPsXpoGkVE5aRiCpXBlhyDAsMTY/jqTSxhSLVsMwKRptxYOTg30SKjXESn43ch5IpJaBAUozLiiL05h3Fv0VN2IQVOPehaVXcThJXuuUP07jSi5YgkX2ndValmfTYCjkkCWR8V63ctCjduimfsyJwyXMMi0V6sJBKjXkPZ56wEKGZTEvPG49iM57DV0TwzvaYbajGyUZv0NuTSsnNYBdvKsVZ80SobcaqLo+xtycdXWB+FcsLCVjAcE0eYu6bcbIAxp3N1M+GWLWpksrCjNS5NMpa365lnKZz9bAw3TUuws386w6Zoq20INqiI5w/boj3XHG9/C3MNubDPWsPY/O5u09KaHVOf+vbCgu3+6z5//jc2vXnoO896lqr8R6+f2/+3/Id9t16NzQwm4gf+PncKN87cnnbF+sZXu3+sH5hdu8N1wRwqX6mdkxYu6pw+sW2997RlbPcH0/ZmTC8raJhvqPKYLvXHRhWudJ1Liu64Nz1W8PzkrZp6Z9LWpSP6fa/kdETO32qo9piy5EebyrZ4nnduD+7TLUhvKr613OaZIfbAshG9RfHkhuZOayS3tCbN4lZQQOUt7CEYG95Y7LrV1nEsHErjtvc7U3FsAU4PVnTl3GUMT+i0jMk+bNV9k3a984q/YP+GVL9/c+pBVZ7Gvrd4a81CErT+ojV89xV8dPwpYSkhdeQFsbU/BImq2YOBHTsCg7NnF7Smp9Vs1IHiwstT7vCvX+e/c8oU/x3r1t/pJwZ5vcwDM5Q4XaliSPRz3lVO0/posZkkb11CSuJ1weOcUyd/YPjR8IEMNpzXWqe+plZfVyty0Ta+hbOS+4Pf5+eQB1TkesscVVylVfWpwqpeIo+ZoNBXpr+m7+D83+FFaR3pYBNKfmNFtoNLqD+VsMNrGbzE/1kJMbia6E+rDmfQxMiOnos7MBPGczniMTmEC0RIN5G5tSsIWTFMdU1VqI6Xpri6VYdDOJypzNwIhQfQq/IHhgEY5LaybdyPNqvkJkJV6tvK2iyFAwbOgV9Wx9VnSraqrlGptkLhKMtVKSz+URWSxvuO4w5c+ZoW+nHfeEuEP8SwJA1THlNe7bQ/rsYFBzQfaIpwlKlCcBEi6ADB/HoNDjMowhoPzicj9C72LEWiQtTTeZbsSH8kbccSNEkpuNMeSQ9V0ZlhnvATXeK1XMiOLlVcNbkokdXLjVbLbcF2Y2BnWSxWtjMQKN8Jesoj7q5ySmoZhELhgawx451aHRErl0sOS5WjK7SR/70L9DPSJxQFHJCod5eSp4TGVrqNha981GKj7l0W2QAYb4DIgf7MRzL6D3oWg0RR8Hob0w/2ZzyS2Y+CrO0HbWQjILQRItofbI/YPtamLAOeQjAgH0d4IjtMVhCykoSZ7YHKsCquropUYZpZHT90yiY4+ECT4RefbRyPNykYkPewzh5K73tqrO/kkiUnfWPHCirpaTkWfa3vxypHHMydVDyqsTnYNtppK0W+fwozn7eXbcxSxhQIuIX6Wr1GH9Sr9SEi9YvM8YU/+8jIKk8QNbnTIquTCzti6ZyeS491FCYtiZvjFpYTzJp41vJp4J6lULO3NnWBM700r7aqrZmaIBZaBzeGbWVzV84YVf1EU853ybe8b7QojW6d5HDbeafdSdEgB2+32+D3NRpj54fZLwvC99mVzccCu8LEiqxx2YNZWEaH0/677E86jRpT8it4PjlV+Mu6J0Vh144nfrg77dq1wLWe/Y6994T//mvZWSjZN5H8ePVdv36Wwf/u1Y8JAkAIsBKbl47Ll9++2wzmu9/e9HFLzbIYIO41PbOPPMdEOCU/3Sg9a3bX57+hFtVv1NVXWUINujqdSpevU+q862up1UEROWGr63KbvtWcZYFjgd1WQeQIQKfv/fRKVdLxpCkCVlC7aAVO2p58udqwMfsljBIv7tt1UNKjATlYVfE1pmhKf10H3qktgGC/kYk6imEfAALQvGuq/BZoxCaUw2EsjWDQX9RTmMJJxqqDJLXLkXA4UU8z1DHto99cmRs9NvfsBpBnVCcfwc3xBfAZHKQp6yrHAetqau7Y/3qvEfPOzguH15gjv45zhAYoTAEAlYrW3iuxRcuBeAgAUCkE0ttVJq/ZnGKiMV2qMXtN5OxaIKljlsAszEVLJyYof/m8/L/cdcydFqyuDKfkeZiudqlBdxIAGK4b9JUNAEBS0cjW0hKqLzrGGiOnh3KQ/zP+avzv3uyVqkr6jqEERzETpZddeWYZuMFzMCckS8bWU8OdbYMBh8s10jG433q4j128fIas0f1p8rkb6jweLnX7OtuL+kpGBcrKgoESn9SsUvR4Pc0KX6atPtKUnJ3lTw6Sw8xTjUZQsArReKdhKA8Z9axQK95JCQIbf6d4dVoFXum8/L+RPeZOzU+iJ4+kzV/xyvj1IhSXlObJifEYeN2dxp+mD3oyxtTWTEjLz2e60vNVeAbz3vOiChblVxi/NFbko0rPy+6g473UEa6BhoHqSRNqfVRa3Zz9L9FcPLKtpDTQVjywaMCVMuJm0JFLXsOki3ypXQ70cBq6yXYAgEmkm0C6ZmZzjMlyCROr6iq6K1Zs7MovYVA47f9pWVit40j6vHVwGk/4uay9spjYHWVCzCIMeS7ceBFT4sNoRzwPXw8b/4KIjNR2D+hitbmpNR9o86D4fgvE4DgMWLpa1aARLEtHarsBwkeHS20xkbBYWCwsnsd7PCixPw2A8gwfyq3D5A8Mhu/kYWNu5IP+rfKHhvF4EcYMAOT+kX3gyOjgct+RvgW99/bc+9z5vp4+wyP3Htnx8PupRCcPPCfxIznC8Yh7PMBL3FtWTrcBOMK32gxsKw22MVvMd9ga1ZzZ3+N2thOtW3R/Z88Do5MDPzmEW/zAvoN37evbJ++7d9+F3fLaiznEQ/7Gp5K2Jw8OmgJasSIPEpK3UzRDYiWL8KxtIc2veoLtVb+vYS8K+/MXt7erb7Bu9U2WvS5eavPNPl/Fq+ol0Tlzoxnq1WS5trnU5LReMjlMTxQvdmm411KfpVyhbFzALMcLnn7llvEH1e+z6sfZCer3QJ4ozNngqVQ8oPAiWV332kDBUz0DlqjlkpUniltC1ktm3OZRj7ZDe4nEtHFtjFw6J46fLsQdzCbqh5kOvOkqu3czy/E2vJzB8xBjE47hSeAQUDQ+NIIJJHcgc33JO5go3T5nbvdKNih/LyMcY/AKjIRcPkhVk/UiuI5Kobe/Wfmb29tOdK4Y3xGNAZo99oRLIycsxqF/53E//4rOrZ7IcyUrz1zamdx7l22wa9VPbTt/+3RpwS7XGPXTfznuQ4seHl/I1Bfh7v704h7DbJ1YrZ9fk1Cjh89vud1+e6Dn9oLND1k2nyGb15Py4uQHm/bPPjd6TvWE86Nnb7oWF5eHKmfisSDQBo638MeOe4u9vwwNv3pLvPs/SCLXK3U61/uidPwYDwAaoAEAXk1sFTnoJryR2CFc6H1YnqgROygXnEj8QI9B6wABAAJ4aV5G3xSx/DcViwEA4HX9bwcnNv8/hYF6CgBUCoBj8/ctSgEwLfAaYK1MjKj3JKNalv6Np+hn6IVTECHLyhCO9gGOC0EIQwCL8Cq+AZgJs8mkBPDCFHwJcAOWw3x4DAZhFkRgrBZK8p8ApGFPeAVEoOa7qxHgnjy5EWikZwYFSliTQYMGqgAL+zIYYCE5QwEamBTUgAXu+SEdYXWNHjSQQYEAm5G2CX7EEE5kMCBDFiogxGbRQD5cnhVZ8IcXEWAWRGABBGDxrs+DaZm26jMzoXkuN4Qh+sQlDhpwMeaDHfLABW7SRUiQ/qzjCjAKohCDZTA3bBHS848Uz/MxDNlf8H9qtgQaVMKluR6D6M4VxWl3PQozoE+HVbPq54ZtzPEO3AU0bAAAAAA=") format("woff2"), url("data:application/font-woff; charset=utf-8;base64,d09GRgABAAAAACJAAAsAAAAAIfQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgEAQFaGNtYXAAAAFoAAAAfAAAAHy9F7zuZ2FzcAAAAeQAAAAIAAAACAAAABBnbHlmAAAB7AAAHRgAAB0Yg9YlNWhlYWQAAB8EAAAANgAAADYLSS2jaGhlYQAAHzwAAAAkAAAAJAbOAvZobXR4AAAfYAAAAKAAAACglK4SEGxvY2EAACAAAAAAUgAAAFKIhIEEbWF4cAAAIFQAAAAgAAAAIAA4ANNuYW1lAAAgdAAAAaoAAAGq0IdVx3Bvc3QAACIgAAAAIAAAACAAAwAAAAMD6QGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6jwCzP7NATMCzAEzAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAGAAAAAUABAAAwAEAAEAIOkb6SLpJekn6WzqPP/9//8AAAAAACDpAOkf6SXpJ+ls6jz//f//AAH/4xcEFwEW/xb+FroV6wADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAYACf7JA/0CtwASAC0ATABzAJgArQAAFx4DMzI+AjcOAyMiJicFMj4CNz4BNz4BNw4DIyIuAiceAzMnIi4CJxQWFx4BFx4DMzI+Ajc+AT0BDgMjAQ4BBwYWFx4DMzI+Ajc2NCcuAScWDgIjIi4CNT4BNTIwIyUeARUUDgIjIiY1NDY3DgEHDgEVFB4CMzI+AjU0JicuAScnLgEjIgYHDgEVFBYzMj4CNTYmJ8ogSE5ULDBbVE0hDzlUbkN1mSgBWC9gWk8dEh4PCRAGHGuLpFU8eWxXGRddf55YiGGQYzYHBAQCDQsXU3mhZYqwaC0GCQsJda3SZv6cCxYEAgMCDEmExolTkXBJCwQEBxELAXarvEZKhmQ7AgQCAgMXAgE+c6VmmFcJCxMjEQcHVIeqVluGWCoPEw0ZDUo6gElJgzoRFJCEQXFUMAIPD84ZJxsOESEuHQodGxQqGBoNGiYaDCYYDiEPKUQvGhMmOCYzTjQb3ig8Rx8VMBMJGA0YNy8eJzY2DxVGIh0lUEMsAaIVQRMJCgcYPDMjFCc5JQ0fExUwEzFQOB8cMEIlCxEGogIFBBU2LyBWJQwaDRMlFQgQBCY+LBgbKzYbExsWDRYKNiIlJSQJEgogORIcJBIGDggAAAEA+gCaAw0A5gANAAAlISImNTQ2MyEyFhUUBgLg/kAOGBURAcYPGBqaFRERFRURERUAAAACAAD+wAQAAsAAEwAnAAABIi4CNTQ+AjMyHgIVFA4CAyIOAhUUHgIzMj4CNTQuAgIAarqLUVGLumpquotRUYu6al+of0pKfqlfX6h/Skp+qf7AUYu6amq6i1FRi7pqarqLUQPQSn6pX1+of0pKf6hfX6h/SgAAAAADAEn/UgO3Ai4AEAAgADAAAAEhIgYdARQWMyEyNj0BNCYjESEiBh0BFBYzITI2PQE0JgMhIgYdARQWMyEyNj0BNCYDkvzcDxYWDwMkDxYWD/zcDxYWDwMkDxYWD/zcDxYWDwMkDxYWAi4WD0kPFhYPSQ8W/tsVD0oPFRUPSg8V/twWD0kPFhYPSQ8WAAQAqv8VA1YCawAPAB0AKgA7AAABISIGFREUFjMhMjY1ETQmAyMiJjU0NjsBMhYVFAY3DgEHBiY3PgE3NhYHNxQGIyEiJjURNDYzITIWFREDIv28Fh4eFgJEFh4ew0QJDQ0JRAkMDIQCEgwWHwQDEgwWHwUbDAj97ggLCwgCEggMAmseFf0QFR4eFQLwFR785QwJCQ0NCQkMDQwSAgQfFQwSAwQfFmwIDAwIAlYICwsI/aoAAAYAnP8VA2QCawAQACEASABUAGEAbwAAATQmIyEiBhURFBYzITI2NREDISImNQM0NjMhMhYVERQGIwMRFAYjISImNTQ2MyEyNjURNCYjISIGFREUBiMiJjURNDYzITIWFQMiBhUUFjMyNjU0JgciJjU0NjMyFhUUBiMnFAYrASImNTQ2OwEyFgNkHRT9mhQdHRQCZhQdMf2aCxABEQsCZgwQEAwYEg3+CAUGBgUB+AQFBQT+CAQFBwQFBhINAfgNElERGRkREhgYEggNDQgJDAwJTQYEVgQGBgRWBAYCOxQcHBT9ChQcHBQC9vzvEAsC9gsQEAv9CgsQAtT92Q0RBgUEBgUEAicDBQUD/pQEBwcEAWwMEhIM/ZwYEREYGBERGD0MCAgMDAgIDBQEBgYEBQYGAAAAAgBj/24DnQIBACIAMwAAASEiBhURFBYzIRUjIgYVFBYzITI2NTQmKwE1ITI2NRE0JiMDFAYjISImNRE0NjMhMhYVEQNp/S4WHh4WAU2IDBAQDAFIDBAQDIgBTRYeHhYFDAn9YgkMDAkCngkMAgEeFf5IFh47EQwLERELDBE7HhYBuBUe/i8JDAwJAYQIDAwI/nwAAAMAdf9/A4sCGgAiADIAWQAAASEiBhURFBYzIRUjIgYVFBYzITI2NTQmKwE1ITI2NRE0JiMTFAYjISImNRE0NjMhMhYVBxEUBiMhIiY1NDYzITI2NRE0JiMhIgYVERQGIyImNRE0NjMhMhYVA2X9NhAWFhABWpkEBwcEAUgEBwcEmQFaEBYWEBEKB/02BwoKBwLKBwonDgr9yQQHBwQCNwECAgH9kgECBgUEBg4KAm4KDgIaFw/+CRAWQgcEBAcHBAQHQhYQAfcPF/3jBwkJBwH3BwkJBzD+bgoOBgUEBgIBAZIBAgIB/vYEBwcEAQoKDg4KAAADAQT/DwL8AngAHAAqADsAAAEuASsBIgYHDgEVERQWFx4BOwEyNjc+ATURNCYnAyMiJjU0NjsBMhYVFAY3FAYjISImNRE0NjMhMhYVEQKrJHUPBg91JCgpKSgkdQ8HDnUkKCkpKIBWDRISDVYNEhKLDAj+oggMDAgBXggMAnMDAgIDBCsm/UolKwQDAgIDBCslArYmKwT82BINDRITDA0ShwgMDAgCFgkMDAn96gAAAAIAAP7ABAACwAATACcAAAEiLgI1ND4CMzIeAhUUDgIDIg4CFRQeAjMyPgI1NC4CAgBquotRUYu6amq6i1FRi7pqUIxoPD1ojE9QjGg8PGiM/sBRi7pqarqLUVGLumpquotRA4A8aIxQUIxoPD1ojE9QjGg8AAAAAAEAAP7ABAACwAAoAAABBx4BFRQOAiMiLgI1ND4CMzUiDgIVFB4CMzI+AjU0LgInA2lYMzw9aIxPT4xoPT1ojE9quotRUYu6amq6i1EVJzgjAilbM4xPT4xoPT1ojE9PjGg9gFGLumpquotRUYu6ajVlXFEiAAAAAAIA+v+6Aw0BxgANABsAAAUiJjURNDYzMhYVERQGNyEiJjU0NjMhMhYVFAYCAA4YFRERFRjS/kAOGBURAcYPGBpGFREBwA4YFRH+Og8R4BURERUVEREVAAAFAQD/DAMAAnsAHAA6AEkAVwB+AAABLgEjIgYHDgEVERQWFx4BMzoBMTI2Nz4BNRE0JhMUBgcOASMiJicuATURNDY3PgEzOgExMhYXHgEVEScjIgYVFBY7ATI2NTQmIxUjIiY1NDY7ATIWFRQGExEUBiMhIiY1NDYzITI2NRE0JiMhIgYVERQGIyImNRE0NjMhMhYVAqsngAQEgCcqKysqJHMQAgIEgCcqKysVHyIngQEBgSciHx8iI3YNAgEBgSciH79WERgYEVYRGBgRVggMDAhWCAwMlRMN/rAFBgYFAVAFBgYF/rAFBgYEBQYTDQFQDRMCdgQBAQQDLSj9SictBAMBAQMELScCtigt/PUfIAMEAQEEAyAfArYfIQMEAQEEAyEf/UorGBERGRkRERg+DAkIDAwICQwCnf3hDhIGBQQGBgUCHwQGBgT+fwQGBgQBgQ0SEg0AAAMAVf8VA6sCawAUAC4APwAAJRQOAiMiLgI1ND4CMzIeAhUFMzQ2NTQmIyIGFRQWNz4BMzIWFRQGBwYWMQcUFjsBMjY9ATQmKwEiBh0BA6tDdJxYWJx0Q0N0nFhYnHRD/iM+lFNKU040AQUwNigtgQgBAQ0VFAoUFhYUChQVwFicdENDdJxYWJx0Q0N0nFhoTzBdOEhVIh8LAiM8JiA7KmgHAnEUFBQUCRQWFhQJAAAAAwBV/xUDqwJrABQAKwA7AAAlFA4CIyIuAjU0PgIzMh4CFSUTHgE7ATI2NxM2JicuASsBIgYHDgEXEzQmKwEiBh0BFBY7ATI2NQOrQ3ScWFicdENDdJxYWJx0Q/4cGAEKEQkRCwIXAgQHBxMMFAwTBwcEAnQcGgsZHBwZCxocwFicdENDdJxYWJx0Q0N0nFjg/vQIGxkLAQoPFwcIBwcIBxcO/kQZHBwZChkcHBkAAAACARr/YQLmAh8AIQAyAAAlPgM1NCYjIgYHBiY1ND4CMzIWFRQOAgcOASMiJjcTMzI2PQE0JisBIgYdARQWMwGvATlENzQxQ0AFAVwcOVc7bHk8ST8CAx4XGiECMRAhJCMiECEhIx91QkAlICImK04rAxA2GzoxIGVSQD8sLi8ODRgY/uwhIA0iISIhDSAhAAACANL/hAMrAesAEQAjAAAXIiYnJjQ3ATYyFxYUBwEOASMhIiYnASY0NzYyFwEWFAcOASP3ChIJDg4CDw8qEQ8P/fEIEgsCDwsSCP3xDg4PKhECDw8PCRIKfAgGDyoRAg8PDw8qEf30CAkIBgIPDyoRDw/98Q4qEgYIAAAAAgAA/sAEAALAABMAJwAAASIuAjU0PgIzMh4CFRQOAgMiDgIVFB4CMzI+AjU0LgICAGq6i1FRi7pqarqLUVGLumpfqH9KSn6pX1+of0pKfqn+wFGLumpquotRUYu6amq6i1ED0Ep+qV9fqH9KSn+oX1+of0oAAAAAAQDV/4oDLgHcABYAAAkBDgEjIiYvASY2Nz4BHwEBPgEXHgEHAy7+yQgcDw4ZCb8LAw0NJg2jASILJhAQCAoBnP4MDhANC/AOJgwMAQySAZAPBwsKJhAAAAMAaP9SA5kCLgAuAEUAVQAABRQGBw4BIyEiJicuATU0MDE8ATE0NjU+ATcBPgEzMTIWFwEeARcUFhUwFhU4ARUBFx4BOwEyNj8BNiYnLgErASIGBw4BFxM0JisBIgYdARQWOwEyNjUDmRANDiUU/ZcVJQ4NDwECCAYBNQ4rGRkrDgE1BggCAQH+PRIBBwwHDQcCEQIEBQQOCQ8JDgUFBAJWFRMIExQUEwgTFVwRIQsLCgoLCyERAQEBBAgEChUKAhcZHh4Z/ekKFQoECAQBAQEBkcUGFBMIxAoRBgUGBgUGEAv+uRMVFRMHExQUEwAAAAEAav+DA6EB/QBIAAABIS4BJy4BKwEiBhUUFjsBEhY5AR4BFw4BFRQWMzI2NTQmJzMUBhUUFjMyNjU0JicmIisBIiYnITgBMzgBMTI2PwI0NjU0JiMDcf3hBQkEAg8KnwsREQuIPhcJJR4DBCodHSoBAYwBKR4dKiYaAgQB/zQsCQGTAREaBD4BAR0TAZoVJxEJDREMCxH+7mQmMw0HDwgdKiodBAcDAwcEHSoqHRwoAgEhHRQQ6QUCBAIUHQAAAAQAXf9zA6QB5wAuAGsAkwCuAAAlMCIxISImNTQ2MzEFMDI5ATI2PwEwNDU0JiMhIiY1NDYzMSEyFhUcARUPAQ4BIxcUBiMiJjU8ATcjHAEVFAYjIiY1NDY3LgEnMCYDIyImNTQ2OwEyFhcUHgIVHgEXPgEzMhYXMz4BMzIWFSUxLgEnOAExLgEnLgEjIgYHMQ4BBzgBMQ4BBzEOARUUFjMyNjU0JjUFNCYjIgYHMQ4BBzgBMQ4BBzEUBhUUFjMyNjUDNgH+bwQHBwQBkQEKDgI/EAv96wQGBgQCFRQcAT4EGhElMCEiMAGYMCEiMAYGExoIF0GWBAYGBJ4EBgEcIhwHFhALHREZKQmjCigZIjD+sAEBAQEDAQgbEAsUCAIEAgEDAgMFJBkZIwEBOyQYERoIAgMBAQEBASQZGCRLBwQFBgELCe0DAQsQBwQEBx0UAgQCBekQFIchMDAhAwUDAwUDITAwIQwVCRAwIGUBHwYFBAYEBAJ6k3sCHSkOCwwcFhYcMCILAwUDAwUCDRAIBwIDAgMEAgcPCBgkJBgDBQMLGSQQDQIFAwMFAwMFAxgkJBgAAAABADP/MQPNAlUANQAAJTQmIyE1NC4CIyIOAh0BOAExFBYzMjY1OAE5ATU0NjMyFh0BIyIGFTERMRQWMyEyNjUxEQPNIBb+eiZBVzEyV0ElHRUUHVI6OVILFyAgFwH0FyChFh+YMFQ/JCQ/VDAdFR0dFR03TU03mB8W/sQWHh4WATwAAAAEAF//SgOhAjYADQAbAG4AgAAABSEiJjU0NjMhMhYVFAYnISImNTQ2MyEyFhUUBjc0JiMhNTQuAiMiDgIdARQWFx4BMzI2PQE0NjMyFh0BFBYzMjY9ATQmIyIGHQEUBiMiJicuAT0BND4CMzIeAh0BIyIGBxEeATMhMjY3MxEDFAYjISImNRE0NjMhMhYVERUDMf7HBQYGBQE5BAcHBP7HBQYGBQE5BAcHbCIX/rQjPFEuLlI8IwgIBxIKEyBHMjJHBgQFBlM7O1QVCAYLBAQFIDdJKilKNiBHFyEBASEXAagVHwQBFRUP/lgOFRUOAagPFT8GBQQGBgQFBnYHBAQHBwQEB1YWIZwsTjoiIjpOLEILEwcFBxkYQjBFRTBCBAYGBEI5UVE5QhALAwQDCwZCKEY0Hx80RiicIRf+9RcgGhIBF/70DhQUDgELDhQUDv79CAAAAgDP/zEDMQJVACAAKgAAJTQmKwE1NC4CIyIOAh0BIyIGFTERMRQWMyEyNjUxESU0NjMyFh0BITUDMSAXCyVBVzIxV0EmCxcgIBcB9Bcg/kRSOTpS/umhFh+YMFQ/JCQ/VDCYHxb+xBYeHhYBPM03TU03mJgAAAAABQDN/xQDMwJsAB8ARABdAGsAeQAAJTQmJzU0LgIjIg4CHQEOAQcjERUzHgEzITI2NzMRATIeAh0BIzU0JiMiBh0BFBYzMjY9ATQ2MzIWHQEhNTQ+AjMBFAYjISImJzURNT4BMyE4ATkBMzIWFRMHJyEiJjU0NjMhMhYVFAYnISImNTQ2MyEyFhUUBgMzIBcoRFw0NFxEKBQeBAEBBCQXAeYXJAQB/s0wVD4lRl5DQl4GBQQGUjk6Uf6PJD9ULwEdGRH+GhIYAQEZEQGJXREZAQFp/pkFBgYFAWcEBgYE/pkFBgYFAWcEBgaFFyIDuTJYQiYmQlgyuQIcFP7DCxUeHhUBPgHRIjxQLri4QFxcQEoFBgYFSjhOTji4uC5QPCL8/BEXFxEDASwDERgYEf7ZC0sGBAUGBgUEBocHBAQHBwQEBwAADQB2/1QDhQJQACIAMgBCAEkAWQBpAHkAiQCZAKAAsADAANAAAAEjNTQmIw4BHQEhNTQmIw4BHQEjIgYVERQWMyEyNjURNCYjARQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhUnLgE1MxQGExQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhUTFAYrASImPQE0NjsBMhYVNRQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhU3MxQGJy4BExQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhU1FAYrASImPQE0NjsBMhYVA2ZhGRERFv6TGRERFmENEhINAtENEhIN/c8GBXEEBgYEcQUGBgVxBAYGBHEFBhgRFlEZuQYEcQUGBgVxBAYGBHEFBgYFcQQGsgYEcQQGBgRxBAYGBHEEBgYEcQQGBgRxBAYGBHEEBhtRGRERFpgGBHIEBgYEcgQGBgRyBAYGBHIEBgYEcgQGBgRyBAYB/ikRGAEaESYpERgBGhEmEg39lA0SEg0CbA0S/ZoFBgYFbAUGBgVCBAYGBG0EBgYE+gEXERIY/ewFBgYFbAUGBgVCBAYGBG0EBgYE/uUFBgYFbAUGBgVCBAYGBG0EBgYEQQQGBgRtBAYGBHUSGAEBF/3TBQYGBWwFBgYFQgQGBgRtBAYGBEEEBgYEbQQGBgQAAA8Abv9mA5ICdwApAC4AMgA2ADoAPgBCAFAAXgCEAIkAkQCVAJkAoQAAJTgBNRE0JisBNTQmIyIGHQEhNTQmIyIGHQEjIgYVERQWMyEyNjUROAE1BTMVIzU7ARUjJSM1MwcjNTMXMxUjNzMVIwM0NjMyFh0BFAYjIiY1JTQ2MzIWHQEUBiMiJjUnNDY7ARUUFjMyNj0BIRUUFjMyNj0BMzIWFREjNTMyNjU0JiMhNRcVIzUzAyImPQEzFSMzNTMVMzUzFTMjNTMVFAYjA5IeFkweFRUf/qkeFRUeTBYeHhYCvBYe/PGyssirqwFwr6/Fq6sWr6/Fq6sQEQ0MEhIMDRH+QhIMDBISDAwSgBINTB4VFR4BVx8VFR5MDRGsMAQHBwT9g7KyspMNErKTqasWr6ONqxENwQEBMRUfHBYeHhYcHBYeHhYcHxX9phUeHhUBJwELlpaWq6KioreWlpYCIw0REQ1RDBISDFENERENUQwSEgwBDBIfFR4eFR8fFR4eFR8SDP7YogYFBAZxhqKi/g4SDHKQkJCQkJByDBIAAAAAAQC6/3kDSAIHAB8AACUUBisBFRQGIyImPQEjIiY1NDY7ATU0NjMyFh0BMzIWA0gpHrkpHh0quR0qKh25Kh0eKbkeKcAdKrkdKioduSodHSq5HSoqHbkqAAEAuQB5A0cBBwANAAAlISImNTQ2MyEyFhUUBgMA/gAdKiodAgAdKip5Kh0dKiodHSoAAAAGAGn/ZAOdAhYADQAbADoARwBWAGcAAAE0JisBIgYVFBY7AT4BFzQmIyEiBhUUFjMhPgEXIzU0Ji8BLgEjISIGFREjIgYdARQWMyEyNj0BLgEjATQ2MyEVFBY7ARUhEQMiJjU0NjsBMhYVFAYrAQUUBiMhIiY9ATQ2MyEyFh0BAiYMC6oJDgwLqgsMig0L/tAJDw0LATAJD6w9CAdsBxMJ/oYRGDoYIyMYAr4YIwMkGv26CAcBRwgEb/4vWwkODAtbCQ4MC1sCLAgG/k4GCAgGAa8GCAFKCA8NCgsNAg1PCQ4MCwsNAwxD0gkUBm0GCBcS/rYjG8cYIiIYxx0kASoHCG8FB8EBLf5sDQsJDgwLCQ+ABwgIBxEHCAgHEQAAAAAIAGP/XgOfAh8AEAAhAC8APQBLAFkAhACHAAAFISImPQE0NjMhMhYdAQ4BIwEiBh0BFBYzITI2PQE0JiMhFzQmKwEiBhUUFjsBMjYFNCYjISIGFRQWMyEyNgM0JiMhIgYVFBYzITI2JzQmKwEiBhUUFjsBMjYlJy4BIyEiBhURFBYzMjY1ETQ2MyEyFhcVFBY7ARQWHQEUFjMyNj0BLgEnJxcjA1z9SBonJxoCuxomAica/UgSFxcSArsSFxcS/UWeBwWBBAcHBIEFBwGOCAT+eAQICAQBiAQIGAcE/qMEBwcEAV0GBbUHBacEBwcEpwUHAQRsCRgL/q0WHwcFBAgTDQFTAgUCBwV9AwgEBAgFCgl4Z2eiJhrHGyYmG8caJgEzFxLHERgYEccSFzcEBwcEBQcHjgUHBwUEBwcBSQQICAQECAhQBQcHBQQIBk9tCAkfFv7/BAgIBAEBDhABAn4ECAIEA4kECAgEiQ4bBltmAAIAWP8VA60CawAUACsAAAEiDgIVFB4CMzI+AjU0LgIjFwEOASMiJi8BJjY3NjIfARM+ARceAQcCAlibdENDdJtYWZt0Q0N0m1nz/v4IFg0MFAifCQILCx8Mh/IJIA0NBwkCa0N0nFhYnHRDQ3ScWFicdEP1/l8LDQoJyAwfCwoKegFODAYJCCANAAAAAwBV/xUDqwJrABQAIQAuAAAlFA4CIyIuAjU0PgIzMh4CFQUyNiMuATcTIwMGFjMTMjY1NCYjIgYVFBYzA6tDdJxYWJx0Q0N0nFhYnHRD/j4hDAEYDAY3RTgJGyY5FRcVFBUXFRTAWJx0Q0N0nFhYnHRDQ3ScWPohAhYbAQb++ygtAaMbEw8RGxMOEgABAHb/QQOKAi4AKAAAATYyHwEeAR8BHgEPAQ4BHwEWBi8BJiIPAQYmPwE2Ji8BJjY/AT4BPwEB5QsgC1ELNBm1GQoSgxIUBB8FGhehF0AWohcZBB8EFBKDEgoZtRk0C1ECLhcXoxcmAxsDHxJ/Ej0ZtBkSC1UMDFULEhm0GT0SfxIfAxsDJhejAAAAAAEAmv/vA1cBfQAZAAATNDY3NjIfATc2MhcWFAcBDgEjIiYnAS4BNZoKChQ4FPT0FDkUFBT+7w0kExMjDv7wCgoBTA0ZChQU9PUUFBQ4FP7uDQ8PDQERChkNAAAAAQAAAAEAAJw5MTFfDzz1AAsEAAAAAADUFPWTAAAAANQU9ZMAAP7ABAACwAAAAAgAAgAAAAAAAAABAAACzP7NAAAEAAAAAAAEAAABAAAAAAAAAAAAAAAAAAAAKAQAAAAAAAAAAAAAAACuAAAEAAAJBAAA+gQAAAAEAABJBAAAqgQAAJwEAABjBAAAdQQAAQQEAAAABAAAAAQAAPoEAAEABAAAVQQAAFUEAAEaBAAA0gQAAAAEAADVBAAAaAQAAGoEAABdBAAAMwQAAF8EAADPBAAAzQQAAHYEAABuBAAAugQAALkEAABpBAAAYwQAAFgEAABVBAAAdgQAAJoAAAAAAAoAFAAeAQ4BKAFkAaoCBAKeAugDYgO6A/YEMgReBQoFYgW6BgIGQAZ8BqgHIAeACFoInAlGCYIKJAsuC/4MKgxEDNQNjA3SDhgOXg6MAAAAAQAAACgA0QAPAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAoAAAABAAAAAAACAAcAewABAAAAAAADAAoAPwABAAAAAAAEAAoAkAABAAAAAAAFAAsAHgABAAAAAAAGAAoAXQABAAAAAAAKABoArgADAAEECQABABQACgADAAEECQACAA4AggADAAEECQADABQASQADAAEECQAEABQAmgADAAEECQAFABYAKQADAAEECQAGABQAZwADAAEECQAKADQAyGljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeVZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeWljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeVJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeUZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("woff"), url("fonts/icons/icoPrimary.ttf?timestamp=@@timestamp") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-[class*="icon-primary-"],\r
-.nav-links a:after,\r
-.bellyband-link a:after,\r
-.breadcrumb > li:after,\r
-.checkbox input:checked + .skin:after,\r
-.checkbox input.indeterminate + .skin:after,\r
-.checkbox input:indeterminate + .skin:after,\r
-.selectWrap.large:before,\r
-.form-row.error .error-msg:before,\r
-.close:before,\r
-.reset-field:before,\r
-.cssIcon-globe:before,\r
-.selectWrap:after {\r
-  color: #0568ae;\r
-  display: inline-block;\r
-  font-family: 'icoPrimary' !important;\r
-  font-style: normal;\r
-  font-size: 20px;\r
-  font-weight: normal;\r
-  font-variant: normal;\r
-  height: 1em;\r
-  margin-right: 7px;\r
-  text-transform: none;\r
-  line-height: 1;\r
-  -webkit-font-smoothing: antialiased;\r
-  -moz-osx-font-smoothing: grayscale;\r
-  position: relative;\r
-  speak: none;\r
-  -webkit-user-select: none;\r
-  -moz-user-select: none;\r
-  -ms-user-select: none;\r
-  user-select: none;\r
-  vertical-align: middle;\r
-  width: 1em; }\r
-\r
-[class*="icon-primary-"]:before,\r
-[class*="icon-primary-"]:after {\r
-  box-sizing: border-box;\r
-  display: inline-block;\r
-  font-size: 1em;\r
-  height: 1em;\r
-  position: relative;\r
-  top: 0;\r
-  left: 0;\r
-  vertical-align: middle;\r
-  width: 1em; }\r
-\r
-.icon-primary-att-globe:before,\r
-.cssIcon-globe:before {\r
-  content: "\e900";\r
-  color: #44c7f5; }\r
-\r
-.icon-primary-hamburger:before {\r
-  content: "\e903"; }\r
-\r
-.icon-primary-secure:before {\r
-  content: "\e918"; }\r
-\r
-.icon-primary-secureL:before {\r
-  content: "\e919"; }\r
-\r
-.icon-primary-padlockopen:before {\r
-  content: "\e916"; }\r
-\r
-.icon-primary-padlockopenL:before {\r
-  content: "\e917"; }\r
-\r
-.icon-primary-shoppingcart:before {\r
-  content: "\e914"; }\r
-\r
-.icon-primary-shoppingcartL:before {\r
-  content: "\e915"; }\r
-\r
-.icon-primary-print:before {\r
-  content: "\e921"; }\r
-\r
-.icon-primary-printL:before {\r
-  content: "\e922"; }\r
-\r
-.icon-primary-mobilesmartphone:before {\r
-  content: "\e908"; }\r
-\r
-.icon-primary-mobilesmartphoneL:before {\r
-  content: "\e90c"; }\r
-\r
-.icon-primary-tablet:before {\r
-  content: "\e904"; }\r
-\r
-.icon-primary-tabletL:before {\r
-  content: "\e905"; }\r
-\r
-.icon-primary-tv:before {\r
-  content: "\e906"; }\r
-\r
-.icon-primary-tvL:before {\r
-  content: "\e907"; }\r
-\r
-.icon-primary-calendar {\r
-  width: 100% !important; }\r
-\r
-.icon-primary-calendar:before {\r
-  content: "\e91a";\r
-  z-index: 1; }\r
-\r
-.icon-primary-calendarL:before {\r
-  content: "\e91b"; }\r
-\r
-.icon-primary-star:before {\r
-  content: "\e96c"; }\r
-\r
-.icon-primary-close:before,\r
-.close:before,\r
-.reset-field:before {\r
-  content: "\e910"; }\r
-\r
-.icon-primary-down:before {\r
-  content: "\ea3c"; }\r
-\r
-.checkbox input.indeterminate + .skin:after,\r
-.icon-primary-subtractminimize:before {\r
-  content: "\e920"; }\r
-\r
-.icon-primary-add-maximize:before {\r
-  content: "\e91f"; }\r
-\r
-.icon-primary-check:before,\r
-.checkbox input:checked + .skin:after {\r
-  content: "\e912"; }\r
-\r
-.icon-primary-questionmark:before {\r
-  content: "\e90f"; }\r
-\r
-.icon-primary-badgealert:before,\r
-.form-row.error .error-msg:before {\r
-  content: "\e90e"; }\r
-\r
-.icon-primary-approval:before {\r
-  content: "\e925"; }\r
-\r
-.icon-primary-flat-info:before {\r
-  content: "\e927"; }\r
-\r
-.icon-primary-alert:before {\r
-  content: "\e913"; }\r
-\r
-.icon-primary-tooltip:before,\r
-.icon-primary-flat-faq:before {\r
-  content: "\e90d"; }\r
-\r
-.icon-primary-tooltip {\r
-  font-size: 20px; }\r
-\r
-.nav-links a:after,\r
-.bellyband-link a:after,\r
-.breadcrumb > li:after,\r
-.icon-primary-right:before {\r
-  content: "\ea3c";\r
-  transform: rotate(-90deg); }\r
-\r
-.icon-primary-left:before {\r
-  content: "\ea3c";\r
-  transform: rotate(90deg); }\r
-\r
-.icon-primary-accordion-plus:after,\r
-.icon-primary-collapsed:after,\r
-.icon-primary-accordion-minus:after,\r
-.icon-primary-expanded:after {\r
-  content: "";\r
-  position: absolute;\r
-  top: 0;\r
-  z-index: 1; }\r
-\r
-.icon-primary-accordion-minus,\r
-.icon-primary-expanded,\r
-.icon-primary-accordion-plus,\r
-.icon-primary-collapsed {\r
-  font-size: 20px !important; }\r
-\r
-:not(.ds2-no-colors) .icon-primary-accordion-minus:before,\r
-:not(.ds2-no-colors) .icon-primary-expanded:before {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");\r
-  content: ""; }\r
-\r
-:not(.ds2-no-colors) .icon-primary-accordion-plus:before,\r
-:not(.ds2-no-colors) .icon-primary-collapsed:before {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M10.5%2015.9c-.4%200-.8-.3-.8-.8V5.9c0-.4.3-.8.8-.8s.8.3.8.8v9.3c0%20.4-.4.7-.8.7z%22%2F%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");\r
-  content: ""; }\r
-\r
-.ds2-no-colors .icon-primary-accordion-minus:before,\r
-.ds2-no-colors .icon-primary-expanded:before {\r
-  background-image: none;\r
-  content: "\e901"; }\r
-\r
-.ds2-no-colors .icon-primary-accordion-minus:after,\r
-.ds2-no-colors .icon-primary-expanded:after {\r
-  content: "\e902"; }\r
-\r
-.ds2-no-colors .icon-primary-accordion-plus:before,\r
-.ds2-no-colors .icon-primary-collapsed:before {\r
-  background-image: none;\r
-  content: "\e90b"; }\r
-\r
-.ds2-no-colors .icon-primary-accordion-plus:after,\r
-.ds2-no-colors .icon-primary-collapsed:after {\r
-  content: "\e911"; }\r
-\r
-.icon-primary-circle-arrow {\r
-  outline: 1px solid transparent;\r
-  border-radius: 50%;\r
-  font-size: 20px !important;\r
-  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);\r
-  margin-right: 7px; }\r
-\r
-.icon-primary-circle-arrow:after {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2036%2036%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20baseProfile%3D%22tiny%22%3E%3Ccircle%20r%3D%2217%22%20cy%3D%2218%22%20cx%3D%2218%22%20stroke-width%3D%221%22%20fill%3D%22transparent%22%20stroke%3D%22%23ccc%22%2F%3E%3C%2Fsvg%3E");\r
-  content: "";\r
-  position: absolute;\r
-  top: 0;\r
-  z-index: 2; }\r
-\r
-.icon-primary-circle-arrow:before {\r
-  border-radius: 50%;\r
-  content: "\ea3c";\r
-  font-size: 12px;\r
-  top: 0;\r
-  position: absolute;\r
-  transform: rotate(-90deg);\r
-  width: 20px;\r
-  z-index: 1; }\r
-\r
-[class*="icon-primary-"] [class*="icon-primary-"] {\r
-  display: inline-block;\r
-  float: left;\r
-  font-size: 1em;\r
-  margin-left: -1em;\r
-  position: absolute; }\r
-\r
-[class*="icon-primary-"].white {\r
-  color: #fff; }\r
-\r
-[class*="icon-primary-"].black {\r
-  color: #000; }\r
-\r
-[class*="icon-primary-"].blue {\r
-  color: #0568ae; }\r
-\r
-[class*="icon-primary-"].green {\r
-  color: #007a3e; }\r
-\r
-@-webkit-viewport {\r
-  width: device-width; }\r
-\r
-@-moz-viewport {\r
-  width: device-width; }\r
-\r
-@-ms-viewport {\r
-  width: device-width; }\r
-\r
-@-o-viewport {\r
-  width: device-width; }\r
-\r
-@viewport {\r
-  width: device-width; }\r
-\r
-.clearfix:before,\r
-.clearfix:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.clearfix:after {\r
-  clear: both; }\r
-\r
-.pull-right {\r
-  float: right !important; }\r
-\r
-.pull-left {\r
-  float: left !important; }\r
-\r
-.float-children-left:before,\r
-.float-children-left:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.float-children-left:after {\r
-  clear: both; }\r
-\r
-.float-children-left > div {\r
-  float: left;\r
-  white-space: nowrap; }\r
-\r
-.block {\r
-  display: block !important; }\r
-\r
-.inline {\r
-  display: inline !important; }\r
-\r
-.inline-block {\r
-  display: inline-block !important; }\r
-\r
-.table-cell {\r
-  display: table-cell !important;\r
-  width: 1%;\r
-  vertical-align: middle; }\r
-\r
-@media (max-width: 767px) {\r
-  .full-bleed {\r
-    width: auto;\r
-    margin-left: -15px;\r
-    margin-right: -15px;\r
-    padding: 15px; } }\r
-\r
-@media (min-width: 768px) {\r
-  .full-bleed {\r
-    width: auto;\r
-    margin-left: -20px;\r
-    margin-right: -20px;\r
-    padding: 20px; } }\r
-\r
-@media (max-width: 480px) {\r
-  .full-bleed {\r
-    width: auto;\r
-    margin-left: -15px;\r
-    margin-right: -15px;\r
-    padding: 0 15px; } }\r
-\r
-.fade {\r
-  opacity: 0;\r
-  filter: alpha(opacity=0);\r
-  transition: opacity .15s linear; }\r
-\r
-.fade.in {\r
-  opacity: 1;\r
-  filter: alpha(opacity=100); }\r
-\r
-.b2bCollapse {\r
-  display: none; }\r
-\r
-.collapse.in {\r
-  height: auto; }\r
-\r
-.nowrap {\r
-  white-space: nowrap; }\r
-\r
-.pre {\r
-  white-space: pre; }\r
-\r
-.hidden-spoken {\r
-  border: 0 none !important;\r
-  clip: rect(0px, 0px, 0px, 0px) !important;\r
-  height: 1px !important;\r
-  letter-spacing: 0;\r
-  line-height: 0;\r
-  overflow: hidden !important;\r
-  margin-top: -1px;\r
-  padding: 0 !important;\r
-  position: absolute !important;\r
-  width: 1px !important; }\r
-\r
-[data-sr-text].hidden-spoken:before {\r
-  border: 0 none !important;\r
-  content: attr(data-sr-text);\r
-  clip: rect(0px, 0px, 0px, 0px) !important;\r
-  height: 1px !important;\r
-  letter-spacing: 0;\r
-  line-height: 0;\r
-  overflow: hidden !important;\r
-  padding: 0 !important;\r
-  position: absolute !important;\r
-  width: 100% !important;\r
-  z-index: -1; }\r
-\r
-[data-sr-text].hidden-spoken {\r
-  position: relative !important;\r
-  width: auto !important; }\r
-\r
-[data-show-between] {\r
-  display: none;\r
-  visibility: hidden; }\r
-\r
-.noscroll-y {\r
-  overflow-y: hidden !important; }\r
-\r
-.invisible {\r
-  visibility: hidden !important;\r
-  opacity: 0 !important; }\r
-\r
-.transparent {\r
-  background-color: rgba(255, 255, 255, 0) !important; }\r
-\r
-.hide {\r
-  display: none !important; }\r
-\r
-.show {\r
-  display: block !important; }\r
-\r
-.rel {\r
-  position: relative !important; }\r
-\r
-.legend-pad {\r
-  padding: 0 15px; }\r
-\r
-.border-top {\r
-  border-top-width: 1px !important; }\r
-\r
-.border-left {\r
-  border-left-width: 1px !important; }\r
-\r
-.border-right {\r
-  border-right-width: 1px !important; }\r
-\r
-.border-bottom {\r
-  border-bottom-width: 1px !important; }\r
-\r
-.border-dark {\r
-  border-color: #000; }\r
-\r
-.border-light {\r
-  border-color: #fff; }\r
-\r
-.no-border-top {\r
-  border-top-width: 0 !important; }\r
-\r
-.no-border-left {\r
-  border-left-width: 0 !important; }\r
-\r
-.no-border-right {\r
-  border-right-width: 0 !important; }\r
-\r
-.no-border-bottom {\r
-  border-bottom-width: 0 !important; }\r
-\r
-.align-middle {\r
-  margin: 0 auto !important; }\r
-\r
-.align-top {\r
-  position: absolute;\r
-  top: 0; }\r
-\r
-.align-bottom {\r
-  position: absolute;\r
-  bottom: 0; }\r
-\r
-.valign-top {\r
-  vertical-align: top !important; }\r
-\r
-.valign-middle {\r
-  vertical-align: middle !important; }\r
-\r
-.valign-bottom {\r
-  vertical-align: bottom !important; }\r
-\r
-.align-children-middle > * {\r
-  margin: 0 auto; }\r
-\r
-[class*="valign-children-"] {\r
-  display: table; }\r
-\r
-[class*="valign-children-"] > * {\r
-  display: table-cell; }\r
-\r
-.valign-children-top > * {\r
-  vertical-align: top; }\r
-\r
-.valign-children-middle > * {\r
-  vertical-align: middle; }\r
-\r
-.valign-children-bottom > * {\r
-  vertical-align: bottom; }\r
-\r
-.no-pad {\r
-  padding: 0 !important; }\r
-\r
-.top-space {\r
-  margin-top: 60px !important; }\r
-\r
-.bottom-space {\r
-  margin-bottom: 60px !important; }\r
-\r
-.top-pad {\r
-  padding-top: 60px !important; }\r
-\r
-.bottom-pad {\r
-  padding-bottom: 60px !important; }\r
-\r
-@media (max-width: 767px) {\r
-  .top-space {\r
-    margin-top: 30px !important; }\r
-  .bottom-space {\r
-    margin-bottom: 30px !important; }\r
-  .top-pad {\r
-    padding-top: 30px !important; }\r
-  .bottom-pad {\r
-    padding-bottom: 30px !important; } }\r
-\r
-.affix {\r
-  position: fixed; }\r
-\r
-.img-landscape,\r
-.img-portrait {\r
-  position: relative; }\r
-\r
-@media (orientation: landscape) {\r
-  .img-landscape {\r
-    display: block; }\r
-  .img-portrait {\r
-    display: none !important; } }\r
-\r
-@media (orientation: portrait) {\r
-  .img-landscape {\r
-    display: none !important; }\r
-  .img-portrait {\r
-    display: block; } }\r
-\r
-.dark-bg {\r
-  background-color: #222222; }\r
-\r
-/* ... JAVASCRIPT HOOKS .................\r
-   ... used by javascript ............... */\r
-.autoSize,\r
-.autoSize-this {\r
-  position: relative; }\r
-\r
-.truncate {\r
-  white-space: nowrap;\r
-  overflow: hidden;\r
-  text-overflow: ellipsis; }\r
-\r
-.placeholdersjs {\r
-  color: #5a5a5a !important; }\r
-\r
-.jshook-return-focus-here {\r
-  display: block; }\r
-\r
-.visible-print {\r
-  display: none !important; }\r
-\r
-.hidden-print {\r
-  display: inherit !important; }\r
-\r
-@media print {\r
-  .visible-print {\r
-    display: inherit !important; }\r
-  .hidden-print {\r
-    display: none !important; }\r
-  * {\r
-    color: #000 !important;\r
-    background: transparent !important;\r
-    box-shadow: none !important; }\r
-  a,\r
-  a:visited {\r
-    text-decoration: underline; }\r
-  pre,\r
-  blockquote {\r
-    border: 1px solid #000;\r
-    page-break-inside: avoid; }\r
-  thead {\r
-    display: table-header-group; }\r
-  tr,\r
-  img {\r
-    page-break-inside: avoid; }\r
-  img {\r
-    max-width: 100% !important; }\r
-  @page {\r
-    margin: 0.5cm; }\r
-  p,\r
-  h2,\r
-  h3 {\r
-    orphans: 3;\r
-    widows: 3; }\r
-  h2,\r
-  h3 {\r
-    page-break-after: avoid; } }\r
-\r
-.mar-top-0 {\r
-  margin-top: 0px; }\r
-\r
-.mar-top-30 {\r
-  margin-top: 30px; }\r
-\r
-a:focus {\r
-  outline: thin dotted #191919; }\r
-\r
-h1,\r
-h2,\r
-h3,\r
-h4,\r
-h5,\r
-h6 {\r
-  font-weight: normal;\r
-  text-rendering: optimizeLegibility;\r
-  margin: 0;\r
-  line-height: 1; }\r
-\r
-.heading-page {\r
-  font-size: 3.8rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Light", Arial;\r
-  margin-bottom: 40px; }\r
-\r
-.heading-major-section {\r
-  font-size: 3rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Light" , Arial;\r
-  margin-bottom: 40px !important; }\r
-\r
-.heading-sub-section {\r
-  font-size: 2.4rem !important;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  margin-bottom: 40px; }\r
-\r
-.heading-group {\r
-  font-size: 2rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #ea7400;\r
-  margin-bottom: 20px !important; }\r
-\r
-.heading-medium {\r
-  font-size: 2rem !important;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  margin-bottom: 20px; }\r
-\r
-.heading-medium-emphasis {\r
-  font-size: 2rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  margin-bottom: 20px; }\r
-\r
-.heading-small {\r
-  font-size: 1.8rem !important;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  margin-bottom: 20px; }\r
-\r
-.heading-small-emphasis {\r
-  font-size: 1.8rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  margin-bottom: 20px; }\r
-\r
-.heading-micro {\r
-  font-size: 1.3rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  text-transform: uppercase;\r
-  color: #da0081;\r
-  margin-bottom: 10px; }\r
-\r
-* + .heading-major-section {\r
-  margin-top: 60px; }\r
-\r
-* + .heading-sub-section {\r
-  margin-top: 60px; }\r
-\r
-* + .heading-group {\r
-  margin-top: 40px !important; }\r
-\r
-* + .heading-medium {\r
-  margin-top: 40px; }\r
-\r
-* + .heading-medium-emphasis {\r
-  margin-top: 40px; }\r
-\r
-* + .heading-small {\r
-  margin-top: 40px; }\r
-\r
-* + .heading-small-emphasis {\r
-  margin-top: 40px; }\r
-\r
-* + .heading-micro {\r
-  margin-top: 20px; }\r
-\r
-.lead {\r
-  color: #666;\r
-  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial;\r
-  font-size: 2.4rem;\r
-  line-height: 2.8rem;\r
-  margin-top: 10px;\r
-  letter-spacing: -0.024rem; }\r
-\r
-.eyebrow {\r
-  text-transform: uppercase;\r
-  line-height: .65 !important; }\r
-\r
-.eyebrow,\r
-.subheading {\r
-  font-size: 1.4rem !important;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #666; }\r
-\r
-.eyebrow + .heading-major-section,\r
-.eyebrow + .heading-sub-section {\r
-  margin-top: 4px; }\r
-\r
-.subheading {\r
-  margin-top: 10px; }\r
-\r
-@media (max-width: 767px) {\r
-  h1,\r
-  h2,\r
-  h3,\r
-  h4,\r
-  h5,\r
-  h6,\r
-  .heading-page {\r
-    font-size: 2rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 30px; }\r
-  .heading-major-section {\r
-    font-size: 2rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 30px; }\r
-  .heading-sub-section {\r
-    font-size: 2rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 20px; }\r
-  .heading-medium {\r
-    font-size: 2rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 20px; }\r
-  .heading-medium-emphasis {\r
-    font-size: 2rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 20px; }\r
-  .heading-small {\r
-    font-size: 1.6rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 10px; }\r
-  .heading-small-emphasis {\r
-    font-size: 1.6rem;\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    margin-bottom: 5px; }\r
-  * + .heading-major-section {\r
-    margin-top: 30px; }\r
-  * + .heading-sub-section {\r
-    margin-top: 30px; }\r
-  * + .heading-group {\r
-    margin-top: 20px; }\r
-  * + .heading-medium {\r
-    margin-top: 20px; }\r
-  * + .heading-medium-emphasis {\r
-    margin-top: 20px; }\r
-  * + .heading-small {\r
-    margin-top: 20px; }\r
-  * + .heading-small-emphasis {\r
-    margin-top: 20px; }\r
-  * + .heading-micro {\r
-    margin-top: 10px; } }\r
-\r
-/* Standard Type styles */\r
-.zeromargin {\r
-  margin: 0 !important; }\r
-\r
-a {\r
-  color: #0568ae;\r
-  text-decoration: none; }\r
-\r
-a:hover,\r
-a:focus {\r
-  text-decoration: underline; }\r
-\r
-a:active {\r
-  color: #0568ae; }\r
-\r
-.a-min {\r
-  font-size: 12px; }\r
-\r
-.a-small {\r
-  font-size: 14px; }\r
-\r
-.a-max {\r
-  font-size: 18px; }\r
-\r
-a.show-qualifier {\r
-  margin-right: 25px;\r
-  position: relative; }\r
-\r
-a.show-qualifier:after {\r
-  color: #333333;\r
-  display: inline-block;\r
-  white-space: pre !important; }\r
-\r
-a[href$="pdf"].show-qualifier:after,\r
-a.show-qualifier.pdf:after {\r
-  content: " (PDF)"; }\r
-\r
-a[href$="psd"].show-qualifier:after,\r
-a.show-qualifier.psd:after {\r
-  content: " (PSD)"; }\r
-\r
-.standalone-link {\r
-  display: flex; }\r
-\r
-/* 20px for the icon, 10px left of icon */\r
-.standalone-link.small {\r
-  font-size: 1.4rem; }\r
-\r
-.standalone-link.small i[class*="icon-primary-"] {\r
-  font-size: 16px;\r
-  top: 2px; }\r
-\r
-.standalone-link.large {\r
-  font-size: 1.8rem; }\r
-\r
-.standalone-link.large i[class*="icon-primary-"] {\r
-  font-size: 24px;\r
-  top: -1px; }\r
-\r
-p {\r
-  margin: 0 0 12px 0;\r
-  line-height: 2rem; }\r
-\r
-.p-small {\r
-  font-size: 1.4rem;\r
-  line-height: 1.8rem; }\r
-\r
-p + .p-small {\r
-  margin: 10px 0 0; }\r
-\r
-.p-micro {\r
-  font-size: 1.2rem;\r
-  line-height: 1.5rem; }\r
-\r
-p + .p-micro {\r
-  margin: 10px 0 0; }\r
-\r
-.p-max {\r
-  font-size: 1.8rem; }\r
-\r
-p + .p-max {\r
-  margin: 10px 0 0; }\r
-\r
-b,\r
-strong {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-weight: normal; }\r
-\r
-i,\r
-em {\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  font-style: normal; }\r
-\r
-.strike {\r
-  text-decoration: line-through; }\r
-\r
-sup {\r
-  display: inline-block;\r
-  font-style: normal;\r
-  height: 1em;\r
-  position: relative;\r
-  vertical-align: text-top;\r
-  width: auto; }\r
-\r
-.text-legal {\r
-  color: #5a5a5a;\r
-  font-size: 1.1rem;\r
-  line-height: 1.5rem;\r
-  margin: 0 0 10px; }\r
-\r
-.text-legal.legal-module {\r
-  line-height: 1.3rem;\r
-  margin: 0 0 12px; }\r
-\r
-.text-legal b,\r
-.text-legal strong {\r
-  font-weight: bold; }\r
-\r
-.text-legal a {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.text-left {\r
-  text-align: left !important; }\r
-\r
-.text-right {\r
-  text-align: right !important; }\r
-\r
-.text-center {\r
-  text-align: center !important; }\r
-\r
-.text-justified {\r
-  text-align: justify !important; }\r
-\r
-ul {\r
-  padding: 0;\r
-  margin: 0;\r
-  list-style: none; }\r
-\r
-ul.bullet,\r
-ul.no-bullet,\r
-ul.lower-alpha,\r
-ul.lower-roman,\r
-ol {\r
-  padding: 0;\r
-  margin: 12px 0 0 20px; }\r
-\r
-ul.bullet li,\r
-ul.no-bullet li,\r
-ul.lower-alpha li,\r
-ul.lower-roman li,\r
-ol li {\r
-  padding-left: 15px;\r
-  line-height: 20px;\r
-  position: relative; }\r
-\r
-ul.bullet li + li,\r
-ul.no-bullet li + li,\r
-ul.lower-alpha li + li,\r
-ul.lower-roman li + li,\r
-ol li + li {\r
-  margin-top: 12px; }\r
-\r
-ul.bullet > li:before,\r
-ul.no-bullet > li:before,\r
-ul.lower-alpha > li:before,\r
-ul.lower-roman > li:before,\r
-ol > li:before {\r
-  background-color: #333333;\r
-  border: 2px solid #333333;\r
-  border-radius: 100%;\r
-  content: " ";\r
-  display: block;\r
-  height: 1px;\r
-  left: 0;\r
-  position: absolute;\r
-  top: 8px;\r
-  width: 1px; }\r
-\r
-ul.bullet ul,\r
-ul.no-bullet ul,\r
-ul.lower-alpha ul,\r
-ul.lower-roman ul,\r
-ol ul,\r
-ul.bullet ol,\r
-ul.no-bullet ol,\r
-ul.lower-alpha ol,\r
-ul.lower-roman ol,\r
-ol ol {\r
-  margin-top: 12px; }\r
-\r
-ul + *,\r
-ol + * {\r
-  margin-top: 20px; }\r
-\r
-ul.no-bullet,\r
-ul.lower-alpha,\r
-ul.lower-roman {\r
-  margin: 0; }\r
-\r
-ul.no-bullet > li,\r
-ul.lower-alpha > li,\r
-ul.lower-roman > li {\r
-  padding-left: 0; }\r
-\r
-ul.no-bullet > li:before,\r
-ul.lower-alpha > li:before,\r
-ul.lower-roman > li:before {\r
-  display: none !important; }\r
-\r
-ol {\r
-  margin: 20px 0 0 32px; }\r
-\r
-ol li {\r
-  padding-left: 3px; }\r
-\r
-ol li:before {\r
-  display: none; }\r
-\r
-ol ol {\r
-  margin-left: 25px; }\r
-\r
-ol ul {\r
-  margin-left: -5px; }\r
-\r
-ul ul,\r
-ul ol,\r
-ol ol,\r
-ol ul {\r
-  margin-top: 0; }\r
-\r
-ul.lower-roman {\r
-  list-style-type: lower-roman;\r
-  margin-top: 12px;\r
-  margin-left: 35px;\r
-  margin-bottom: 0; }\r
-\r
-ul.lower-alpha {\r
-  list-style-type: lower-alpha;\r
-  margin-top: 12px;\r
-  margin-left: 35px;\r
-  margin-bottom: 0; }\r
-\r
-dl {\r
-  display: table;\r
-  margin: 0 0 20px;\r
-  width: 100%; }\r
-\r
-dt,\r
-dd {\r
-  display: table-cell; }\r
-\r
-.btn {\r
-  background-color: transparent;\r
-  background-clip: padding-box;\r
-  border: 1px solid transparent;\r
-  border-radius: 8px;\r
-  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);\r
-  cursor: pointer;\r
-  display: inline-block;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 1.9rem;\r
-  font-weight: normal;\r
-  line-height: 1;\r
-  margin: 0 7px 10px 0;\r
-  max-width: 470px;\r
-  min-width: 70px;\r
-  padding: 14px 19px 11px 18px;\r
-  position: relative;\r
-  text-align: center;\r
-  vertical-align: middle;\r
-  white-space: nowrap;\r
-  overflow: hidden; }\r
-  .btn:focus {\r
-    outline: 1px dotted #000;\r
-    outline-offset: -5px; }\r
-  .btn:last-child {\r
-    margin-right: 0; }\r
-  .btn::-moz-focus-inner {\r
-    padding: 0;\r
-    border: 0; }\r
-  .btn i[class*="icon-primary-"].icon-primary-small {\r
-    font-size: 24px;\r
-    top: -2px; }\r
-  .btn i[class*="icon-primary-"].icon-primary-medium {\r
-    font-size: 30px;\r
-    top: -2px; }\r
-  .btn i[class*="icon-primary-"].icon-primary-large {\r
-    font-size: 36px;\r
-    top: -2px; }\r
-\r
-a.btn {\r
-  vertical-align: middle; }\r
-  a.btn:hover {\r
-    text-decoration: none; }\r
-\r
-.field-group + .btn {\r
-  margin-left: 20px; }\r
-\r
-.btn-primary {\r
-  border-color: #ea7400 transparent #d16500;\r
-  background-color: #ea7400 transparent #d16500;\r
-  background: linear-gradient(to bottom, #ea7400 0%, #d16500 100%);\r
-  color: #ffffff;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-weight: bold; }\r
-  .btn-primary:hover {\r
-    text-decoration: none;\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-  .btn-primary:focus {\r
-    text-decoration: none;\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-  .btn-primary:active {\r
-    text-decoration: none;\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-\r
-.btn-arrow {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.6rem;\r
-  font-weight: normal;\r
-  background-color: transparent;\r
-  border: none;\r
-  padding: 5px 0 0;\r
-  top: -4px;\r
-  color: #333333;\r
-  position: relative; }\r
-  .btn-arrow:hover {\r
-    text-decoration: underline; }\r
-    .btn-arrow:hover .btn-primary {\r
-      text-decoration: none;\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-    .btn-arrow:hover .btn-secondary {\r
-      color: #0568ae;\r
-      outline-color: #000000 !important;\r
-      background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-    .btn-arrow:hover .btn-alt {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }\r
-    .btn-arrow:hover .btn-specialty {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-  .btn-arrow:focus {\r
-    text-decoration: underline;\r
-    outline: 1px dotted #666; }\r
-    .btn-arrow:focus .btn-primary {\r
-      text-decoration: none;\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-    .btn-arrow:focus .btn-secondary {\r
-      color: #0568ae;\r
-      outline-color: #000000 !important;\r
-      background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-    .btn-arrow:focus .btn-alt {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }\r
-    .btn-arrow:focus .btn-specialty {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-  .btn-arrow:active .btn-primary {\r
-    text-decoration: none;\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }\r
-  .btn-arrow:active .btn-secondary {\r
-    color: #0568ae;\r
-    outline-color: #000000 !important;\r
-    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-  .btn-arrow:active .btn-alt {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }\r
-  .btn-arrow:active .btn-specialty {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-  .btn-arrow .btn-alt {\r
-    border-color: #087ac2 transparent #0568ae;\r
-    background-color: #0568ae;\r
-    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);\r
-    color: #ffffff; }\r
-    .btn-arrow .btn-alt:hover {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-    .btn-arrow .btn-alt:focus {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-    .btn-arrow .btn-alt:active {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-  .btn-arrow::-moz-focus-inner {\r
-    padding: 0;\r
-    border: 0; }\r
-  .btn-arrow .btn {\r
-    border: 1px solid transparent;\r
-    border-radius: 100%;\r
-    height: 36px;\r
-    margin-bottom: 0;\r
-    margin-right: 7px;\r
-    max-width: 36px;\r
-    min-width: 20px;\r
-    padding: 0;\r
-    margin-top: -4px;\r
-    vertical-align: middle;\r
-    width: 36px; }\r
-    .btn-arrow .btn .icon-primary-left {\r
-      bottom: 0;\r
-      display: block;\r
-      height: 100%;\r
-      left: 0;\r
-      line-height: 0;\r
-      position: absolute;\r
-      right: 0;\r
-      text-indent: 0;\r
-      top: 0; }\r
-      .btn-arrow .btn .icon-primary-left:before {\r
-        position: absolute;\r
-        font-size: 1.6rem;\r
-        left: 1px;\r
-        top: 9px; }\r
-    .btn-arrow .btn .icon-primary-right {\r
-      bottom: 0;\r
-      display: block;\r
-      height: 100%;\r
-      left: 0;\r
-      line-height: 0;\r
-      position: absolute;\r
-      right: 0;\r
-      text-indent: 0;\r
-      top: 0;\r
-      color: #ffffff; }\r
-      .btn-arrow .btn .icon-primary-right:before {\r
-        position: absolute;\r
-        font-size: 1.6rem;\r
-        left: 17px;\r
-        top: 9px; }\r
-  .btn-arrow .btn.btn-primary .icon-primary-left {\r
-    color: #fff; }\r
-  .btn-arrow .btn.btn-primary .icon-primary-right {\r
-    color: #fff; }\r
-  .btn-arrow .btn.btn-alt .icon-primary-left {\r
-    color: #fff; }\r
-  .btn-arrow .btn.btn-alt .icon-primary-right {\r
-    color: #fff; }\r
-  .btn-arrow .btn.btn-secondary {\r
-    border: 1px solid #d2d2d2; }\r
-    .btn-arrow .btn.btn-secondary .icon-primary-left {\r
-      color: #0568ae; }\r
-    .btn-arrow .btn.btn-secondary .icon-primary-right {\r
-      color: #0568ae; }\r
-  .btn-arrow .btn.btn-small {\r
-    height: 20px;\r
-    max-width: 20px;\r
-    min-width: 20px;\r
-    width: 20px;\r
-    top: -1px; }\r
-    .btn-arrow .btn.btn-small .icon-primary-left:before {\r
-      font-size: 10px;\r
-      top: 4px;\r
-      left: 0; }\r
-    .btn-arrow .btn.btn-small .icon-primary-right:before {\r
-      font-size: 10px;\r
-      top: 4px;\r
-      left: 10px; }\r
-  .btn-arrow .btn.btn-large .icon-primary-left:before {\r
-    font-size: 112%;\r
-    top: 12px;\r
-    left: 23px; }\r
-  .btn-arrow .btn.btn-large .icon-primary-right:before {\r
-    font-size: 112%;\r
-    top: 12px;\r
-    left: 23px; }\r
-\r
-.btn-secondary {\r
-  border: 1px solid #d2d2d2;\r
-  background-color: #f2f2f2;\r
-  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-  color: #0568ae;\r
-  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);\r
-  padding: 14px 18px 11px 17px; }\r
-  .btn-secondary:hover {\r
-    color: #0568ae;\r
-    outline-color: #000000 !important;\r
-    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-  .btn-secondary:focus {\r
-    color: #0568ae;\r
-    outline-color: #000000 !important;\r
-    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-  .btn-secondary:active {\r
-    color: #0568ae;\r
-    outline-color: #000000 !important;\r
-    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }\r
-\r
-.btn-alt {\r
-  border-color: #087ac2 transparent #0568ae;\r
-  background-color: #0568ae;\r
-  background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);\r
-  color: #ffffff; }\r
-  .btn-alt:hover {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-  .btn-alt:focus {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-  .btn-alt:active {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }\r
-\r
-.btn-specialty {\r
-  border-color: #008744 transparent #007a3e;\r
-  background-color: #007a3e;\r
-  background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);\r
-  color: #ffffff; }\r
-  .btn-specialty:hover {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-  .btn-specialty:focus {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-  .btn-specialty:active {\r
-    color: #ffffff;\r
-    outline-color: #ffffff !important;\r
-    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }\r
-\r
-.btn-clear {\r
-  background: transparent !important;\r
-  border-color: transparent !important;\r
-  font-weight: normal;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  box-shadow: none;\r
-  text-decoration: none;\r
-  color: #0568ae; }\r
-  .btn-clear:focus {\r
-    text-decoration: underline; }\r
-  .btn-clear:hover {\r
-    text-decoration: underline; }\r
-\r
-.isIE .btn:focus {\r
-  outline: none !important;\r
-  text-decoration: none !important; }\r
-  .isIE .btn:focus:after {\r
-    display: block;\r
-    content: "";\r
-    position: absolute;\r
-    top: 4px;\r
-    left: 4px;\r
-    right: 4px;\r
-    bottom: 4px;\r
-    border: 1px dotted #000; }\r
-\r
-.isIE .btn:active {\r
-  outline: none !important;\r
-  text-decoration: none !important; }\r
-  .isIE .btn:active:after {\r
-    display: block;\r
-    content: "";\r
-    position: absolute;\r
-    top: 4px;\r
-    left: 4px;\r
-    right: 4px;\r
-    bottom: 4px;\r
-    border: 1px dotted #000; }\r
-\r
-.isIE .btn.active {\r
-  outline: none !important;\r
-  text-decoration: none !important; }\r
-  .isIE .btn.active:not(:focus):after {\r
-    border: 1px solid #000; }\r
-  .isIE .btn.active:after {\r
-    display: block;\r
-    content: "";\r
-    position: absolute;\r
-    top: 4px;\r
-    left: 4px;\r
-    right: 4px;\r
-    bottom: 4px;\r
-    border: 1px dotted #000; }\r
-\r
-.isIE .btn.btn-primary:focus:after {\r
-  border: 2px dashed #fff; }\r
-\r
-.isIE .btn.btn-specialty:focus:after {\r
-  border: 2px dashed #fff; }\r
-\r
-.isIE .btn.btn-alt:focus:after {\r
-  border: 2px dashed #fff; }\r
-\r
-.btn.disabled {\r
-  background-image: none;\r
-  background-color: #767676;\r
-  box-shadow: none;\r
-  cursor: not-allowed;\r
-  color: #ffffff;\r
-  border-color: transparent;\r
-  outline: 0 !important; }\r
-  .btn.disabled:hover {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-  .btn.disabled:focus {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-\r
-.btn[disabled] {\r
-  background-image: none;\r
-  background-color: #767676;\r
-  box-shadow: none;\r
-  cursor: not-allowed;\r
-  color: #ffffff;\r
-  border-color: transparent;\r
-  outline: 0 !important; }\r
-  .btn[disabled]:hover {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-  .btn[disabled]:focus {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-\r
-.btn[disabled="disabled"] {\r
-  background-image: none;\r
-  background-color: #767676;\r
-  box-shadow: none;\r
-  cursor: not-allowed;\r
-  color: #ffffff;\r
-  border-color: transparent;\r
-  outline: 0 !important; }\r
-  .btn[disabled="disabled"]:hover {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-  .btn[disabled="disabled"]:focus {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-\r
-.btn-arrow[disabled] .btn {\r
-  background-image: none;\r
-  background-color: #767676;\r
-  box-shadow: none;\r
-  cursor: not-allowed;\r
-  color: #ffffff;\r
-  border-color: transparent;\r
-  outline: 0 !important; }\r
-  .btn-arrow[disabled] .btn:hover {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-  .btn-arrow[disabled] .btn:focus {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-\r
-.btn-arrow[disabled] .icon-primary-left {\r
-  color: #fff !important; }\r
-\r
-.btn-arrow[disabled] .icon-primary-right {\r
-  color: #fff !important; }\r
-\r
-.btn-arrow.disabled .btn {\r
-  background-image: none;\r
-  background-color: #767676;\r
-  box-shadow: none;\r
-  cursor: not-allowed;\r
-  color: #ffffff;\r
-  border-color: transparent;\r
-  outline: 0 !important; }\r
-  .btn-arrow.disabled .btn:hover {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-  .btn-arrow.disabled .btn:focus {\r
-    color: #f2f2f2;\r
-    outline: none !important; }\r
-\r
-.btn-arrow.disabled .icon-primary-left {\r
-  color: #fff !important; }\r
-\r
-.btn-arrow.disabled .icon-primary-right {\r
-  color: #fff !important; }\r
-\r
-.btn-medium {\r
-  padding: 12px 19px 11px 18px;\r
-  font-size: 1.7rem; }\r
-\r
-.btn-small {\r
-  padding: 10px 19px 9px 18px;\r
-  font-size: 1.5rem;\r
-  border-radius: 8px; }\r
-\r
-.btn-fullwidth {\r
-  width: 100%; }\r
-\r
-*:not(.btn-arrow) > .btn > i[class*="icon-primary-"] {\r
-  margin-top: -20px;\r
-  margin-bottom: -20px; }\r
-\r
-.enhanced-cta-group {\r
-  display: -ms-flexbox;\r
-  display: flex;\r
-  -ms-flex-direction: row-reverse;\r
-  flex-direction: row-reverse;\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3A%23959595%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;\r
-  background-position: 0 -1px;\r
-  background-repeat: repeat-x; }\r
-  .enhanced-cta-group > .cta-button-group {\r
-    border-top: 0;\r
-    background-image: none !important; }\r
-    .enhanced-cta-group > .cta-button-group + .cta-button-group a {\r
-      font-size: 1.4rem;\r
-      line-height: 1em; }\r
-      .enhanced-cta-group > .cta-button-group + .cta-button-group a a {\r
-        margin-right: 0; }\r
-    .enhanced-cta-group > .cta-button-group hr {\r
-      min-height: 14px; }\r
-    .enhanced-cta-group > .cta-button-group + .cta-button-group {\r
-      -ms-flex-align: center;\r
-      -ms-grid-row-align: center;\r
-      align-items: center;\r
-      -ms-flex-direction: row;\r
-      flex-direction: row;\r
-      padding: 10px 0; }\r
-\r
-.cta-button-group {\r
-  text-align: right;\r
-  -ms-flex-align: baseline;\r
-  align-items: baseline;\r
-  padding: 20px 0 10px;\r
-  width: 100%; }\r
-  .cta-button-group.nodots {\r
-    background-image: none !important; }\r
-  .cta-button-group .hidden-phone {\r
-    margin-right: 14px; }\r
-  .cta-button-group .btn + .btn {\r
-    margin-right: 20px !important; }\r
-  .cta-button-group .btn:not(.hidden-phone):not(.visible-phone) {\r
-    margin-right: 0; }\r
-\r
-.isMobile .btn-arrow .btn.btn-small .icon-primary-left:before {\r
-  left: -1px; }\r
-\r
-.isMobile .btn-arrow .btn.btn-large .icon-primary-left:before {\r
-  left: 24px; }\r
-\r
-.isMobile .btn-arrow .btn.btn-large .icon-primary-right:before {\r
-  left: 24px; }\r
-\r
-@media (max-width: 1024px) {\r
-  .field-group + .btn {\r
-    margin-left: 15px; } }\r
-\r
-@media (max-width: 767px) {\r
-  .cta-button-group {\r
-    text-align: center; }\r
-    .cta-button-group > .btn {\r
-      display: block;\r
-      float: none;\r
-      width: 100%;\r
-      margin-left: auto !important;\r
-      margin-right: auto !important; } }\r
-\r
-.btn-group {\r
-  border-radius: 8px;\r
-  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);\r
-  display: -ms-flexbox;\r
-  display: flex;\r
-  -ms-flex-pack: justify;\r
-  justify-content: space-between;\r
-  margin-bottom: 10px;\r
-  max-width: 470px;\r
-  min-width: 290px;\r
-  position: relative;\r
-  vertical-align: middle;\r
-  width: 100%; }\r
-  .btn-group > .btn {\r
-    box-shadow: none;\r
-    -ms-flex: 1;\r
-    flex: 1;\r
-    position: relative;\r
-    float: left;\r
-    margin-right: -1px;\r
-    margin-bottom: 0;\r
-    padding-left: 0;\r
-    padding-right: 0;\r
-    text-align: center; }\r
-  .btn-group:not([data-select-color]) .btn.active:not(:first-child) {\r
-    margin-right: -1px;\r
-    border-left: 1px solid #d2d2d2 !important; }\r
-  .btn-group:not([data-select-color]) .btn[disabled]:not(:first-child) {\r
-    border-left: 1px solid #d2d2d2 !important; }\r
-  .btn-group:not([data-select-color]) .btn[disabled] + .btn[disabled] {\r
-    border-left: 1px solid #ebebeb !important; }\r
-  .btn-group:not([data-select-color]) > .btn.active {\r
-    border-color: #087ac2 transparent #0568ae;\r
-    background-color: #0568ae;\r
-    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);\r
-    color: #ffffff; }\r
-    .btn-group:not([data-select-color]) > .btn.active:hover {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: #0563a6;\r
-      border-color: #0563a6; }\r
-    .btn-group:not([data-select-color]) > .btn.active:focus {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: #0563a6;\r
-      border-color: #0563a6; }\r
-    .btn-group:not([data-select-color]) > .btn.active:active {\r
-      color: #ffffff;\r
-      outline-color: #ffffff !important;\r
-      background: #0563a6;\r
-      border-color: #0563a6; }\r
-  .btn-group:not([data-select-color]) > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\r
-    border-radius: 0; }\r
-  .btn-group:not([data-select-color]) > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\r
-    border-top-right-radius: 0;\r
-    border-bottom-right-radius: 0; }\r
-  .btn-group:not([data-select-color]) > .btn:last-child:not(:first-child) {\r
-    border-top-left-radius: 0;\r
-    border-bottom-left-radius: 0; }\r
-  .btn-group:not([data-select-color]) > .dropdown-toggle:not(:first-child) {\r
-    border-top-left-radius: 0;\r
-    border-bottom-left-radius: 0; }\r
-  .btn-group > .active {\r
-    text-decoration: none;\r
-    outline: 1px dotted transparent; }\r
-    .btn-group > .active:focus {\r
-      outline: 1px dotted #ffffff; }\r
-\r
-.btn-group.btn-fullwidth > .btn {\r
-  -ms-flex: 1;\r
-  flex: 1; }\r
-\r
-.btn-group[data-select-color] {\r
-  margin-top: 5px;\r
-  box-shadow: none;\r
-  -ms-flex-pack: start;\r
-  justify-content: flex-start;\r
-  -ms-flex-wrap: wrap;\r
-  flex-wrap: wrap; }\r
-  .btn-group[data-select-color] .btn {\r
-    border: 1px solid #959595;\r
-    border-radius: 4px;\r
-    box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);\r
-    margin-right: 10px;\r
-    margin-bottom: 10px;\r
-    height: 40px;\r
-    font-size: 16px;\r
-    color: #333333;\r
-    max-width: 60px;\r
-    min-width: 60px;\r
-    -ms-flex: 0;\r
-    flex: 0; }\r
-  .btn-group[data-select-color] > .btn.active:focus {\r
-    outline: 1px dotted #191919;\r
-    outline-offset: 4px; }\r
-\r
-button .btn-fill {\r
-  background-clip: padding-box;\r
-  border: 0;\r
-  border-radius: 4px;\r
-  bottom: 0;\r
-  display: block;\r
-  height: auto;\r
-  left: 0;\r
-  margin: 5px;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 0;\r
-  width: auto; }\r
-\r
-button .btn-fill[style*="#fff"] {\r
-  border: 1px solid #d2d2d2; }\r
-\r
-[data-select-color] .btn.active {\r
-  background: none !important;\r
-  outline: 0;\r
-  margin-right: 10px;\r
-  border-width: 3px;\r
-  color: #333333;\r
-  line-height: 12px; }\r
-  [data-select-color] .btn.active > .btn-fill {\r
-    margin: 3px; }\r
-  [data-select-color] .btn.active:hover {\r
-    color: #333333; }\r
-\r
-[data-select-color] .btn:active {\r
-  background: none !important;\r
-  outline: 0;\r
-  margin-right: 10px;\r
-  border-width: 3px;\r
-  color: #333333;\r
-  line-height: 12px; }\r
-  [data-select-color] .btn:active > .btn-fill {\r
-    margin: 3px; }\r
-  [data-select-color] .btn:active:hover {\r
-    color: #333333; }\r
-\r
-.btn-group[data-select-color="orange"] > .btn.active {\r
-  border-color: #ea7400; }\r
-\r
-.btn-group[data-select-color="blue"] > .btn.active {\r
-  border-color: #0568ae; }\r
-\r
-.btn-group[data-select-color="green"] > .btn.active {\r
-  border-color: #007a3e; }\r
-\r
-.btn-spinbutton-toggle.btn-group {\r
-  display: block !important;\r
-  height: 40px !important;\r
-  margin-top: 5px;\r
-  max-width: 138px;\r
-  min-width: 138px;\r
-  white-space: nowrap; }\r
-\r
-.btn-spinbutton-toggle .btn {\r
-  border-radius: 6px;\r
-  font-weight: normal;\r
-  -ms-flex: unset;\r
-  flex: unset;\r
-  height: 40px;\r
-  letter-spacing: normal;\r
-  min-width: auto;\r
-  padding: 3px 0 0;\r
-  text-align: center;\r
-  min-width: 46px;\r
-  width: 46px; }\r
-\r
-.btn-spinbutton-toggle .btn[data-max-value] {\r
-  border-bottom: 1px solid #d2d2d2;\r
-  border-top: 1px solid #d2d2d2;\r
-  box-shadow: 0 3px 2px -2px rgba(0, 0, 0, 0.08) inset;\r
-  background-color: #fff;\r
-  cursor: text;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 2rem;\r
-  font-weight: normal;\r
-  padding: 4px 0 0;\r
-  text-align: center;\r
-  min-width: 46px !important;\r
-  width: 46px; }\r
-  .btn-spinbutton-toggle .btn[data-max-value]:focus {\r
-    border-color: #0568ae;\r
-    outline: none; }\r
-    .btn-spinbutton-toggle .btn[data-max-value]:focus + .btn {\r
-      border-left: 1px solid #0568ae;\r
-      transition: border 0.3s linear 0s; }\r
-\r
-.btn-spinbutton-toggle .icon-primary-subtractminimize {\r
-  font-size: 30px !important;\r
-  color: #0568ae !important; }\r
-\r
-.btn-spinbutton-toggle .icon-primary-add-maximize {\r
-  font-size: 30px !important;\r
-  color: #0568ae !important; }\r
-\r
-.btn-spinbutton-toggle .btn[disabled].icon-primary-subtractminimize {\r
-  background-color: #d2d2d2;\r
-  color: #767676 !important; }\r
-\r
-.btn-spinbutton-toggle .btn[disabled].icon-primary-add-maximize {\r
-  background-color: #d2d2d2;\r
-  color: #767676 !important; }\r
-\r
-.btn-spinbutton-toggle input.btn[disabled] {\r
-  background-color: #d2d2d2;\r
-  color: #5a5a5a;\r
-  cursor: not-allowed; }\r
-\r
-.btn-group.btn-spinbutton-toggle .btn[disabled] + .btn[disabled] {\r
-  border-left: 1px solid #f0f0f0 !important; }\r
-\r
-.btn-group.btn-spinbutton-toggle .btn[data-max-value]:focus + .btn:not(:first-child) {\r
-  border-left: 1px solid #0568ae !important; }\r
-\r
-@media (max-width: 480px) {\r
-  .btn-group:not([data-select-color]) > .btn {\r
-    font-size: 1.3rem;\r
-    min-width: auto; } }\r
-\r
-.reset-field,\r
-.close {\r
-  float: right;\r
-  background: none;\r
-  width: 34px;\r
-  height: 34px;\r
-  padding: 0;\r
-  overflow: hidden;\r
-  display: inline-block; }\r
-\r
-.reset-field {\r
-  display: none; }\r
-\r
-.reset-field:before {\r
-  font-size: 22px;\r
-  color: #5a5a5a; }\r
-\r
-.input-emphasized + .reset-field:before {\r
-  font-size: 29px;\r
-  color: #5a5a5a; }\r
-\r
-.reset-field:active,\r
-.reset-field:hover,\r
-.reset-field:focus {\r
-  display: block !important; }\r
-\r
-button.close {\r
-  border: 0;\r
-  appearance: none; }\r
-\r
-.corner-button {\r
-  box-shadow: 0 -50px 0 0 #f2f2f2 inset;\r
-  height: 69px;\r
-  /*overflow: hidden;*/\r
-  position: absolute;\r
-  right: -35px;\r
-  top: -35px;\r
-  transform: rotate(45deg);\r
-  width: 69px; }\r
-\r
-.corner-button .close:before {\r
-  bottom: -7px;\r
-  color: #0568ae;\r
-  display: block;\r
-  font-size: 20px;\r
-  height: 50px;\r
-  left: -11px;\r
-  position: absolute;\r
-  width: 50px; }\r
-\r
-.corner-button .close {\r
-  float: none;\r
-  height: 45px;\r
-  margin: 0;\r
-  position: absolute;\r
-  right: 12px;\r
-  top: 45px;\r
-  transform: rotate(45deg);\r
-  width: 45px; }\r
-\r
-.corner-button .close:focus {\r
-  outline: 1px dotted black; }\r
-\r
-.ds2-no-colors .corner-button .close {\r
-  border: 1px solid black; }\r
-\r
-.field-group input + .reset-field {\r
-  background: none;\r
-  height: 36px;\r
-  width: 45px;\r
-  display: none;\r
-  padding: 0;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 0;\r
-  box-shadow: none;\r
-  border: none;\r
-  content: " "; }\r
-\r
-.field-group input[type="search"] + .reset-field,\r
-.field-group input[type="search"] + .btn-search + .reset-field,\r
-.tooltip-onclick input + .reset-field,\r
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field,\r
-.tooltip-onclick textarea + .reset-field,\r
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {\r
-  right: 45px; }\r
-\r
-.field-group input[type="search"] + .reset-field:after,\r
-.field-group input[type="search"] + .btn-search + .reset-field:after,\r
-.tooltip-onclick input + .reset-field:after,\r
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field:after,\r
-.tooltip-onclick textarea + .reset-field:after,\r
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field:after {\r
-  background-color: #d2d2d2;\r
-  content: "";\r
-  display: block;\r
-  height: 20px;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 8px;\r
-  width: 1px; }\r
-\r
-.tooltip-onclick input + .reset-field,\r
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field {\r
-  right: 50px !important; }\r
-\r
-.tooltip-onclick textarea + .reset-field,\r
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {\r
-  right: 45px !important;\r
-  width: 40px; }\r
-\r
-.field-group input.input-emphasized + .reset-field {\r
-  width: 45px;\r
-  height: 46px;\r
-  right: 6px; }\r
-\r
-.field-group input.input-emphasized + .reset-field:after {\r
-  top: 14px; }\r
-\r
-.field-group [disabled] + .reset-field {\r
-  display: none; }\r
-\r
-.ds2_touchevents .field-group input + .reset-field:focus,\r
-.ds2_touchevents .field-group input:focus + .reset-field,\r
-.ds2_touchevents textarea:focus + .reset-field,\r
-.ds2_touchevents textarea + .reset-field:focus {\r
-  display: block;\r
-  position: absolute;\r
-  right: 0px;\r
-  top: 0;\r
-  border: none; }\r
-\r
-.ds2_touchevents .field-group input {\r
-  padding: 8px 55px 8px 15px;\r
-  -webkit-appearance: none; }\r
-\r
-.ds2_touchevents textarea:focus {\r
-  padding: 15px 55px 15px 15px; }\r
-\r
-.ds2_touchevents textarea:focus + .reset-field {\r
-  border: none;\r
-  position: absolute;\r
-  right: 6px;\r
-  top: 5px; }\r
-\r
-.ds2_touchevents textarea.hasScrollbar:focus {\r
-  padding: 15px 35px 15px 15px; }\r
-\r
-.ds2_touchevents textarea.hasScrollbar:focus + .reset-field {\r
-  right: 22px; }\r
-\r
-.form-row.error .error-msg {\r
-  display: block;\r
-  font-size: 14px;\r
-  line-height: 14px;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  position: relative;\r
-  padding-left: 18px; }\r
-\r
-.form-row.error .error-msg:before {\r
-  color: #cf2a2a;\r
-  font-size: 14px;\r
-  left: 0;\r
-  line-height: 14px;\r
-  position: absolute;\r
-  vertical-align: middle; }\r
-\r
-.form-row.error label,\r
-.form-row.error .error-msg,\r
-.form-row.error button.awd-select,\r
-.form-row.error select.awd-select + span,\r
-.form-row.error .checkbox,\r
-.form-row.error .radio,\r
-.form-row.error legend.error,\r
-.form-row.error input {\r
-  color: #cf2a2a; }\r
-\r
-.form-row.error .btn-group > .btn,\r
-.form-row.error button.awd-select,\r
-.form-row.error .awd-select-list,\r
-.form-row.error select.awd-select + span,\r
-.form-row.error textarea,\r
-.form-row.error input,\r
-.form-row.error .checkbox .skin,\r
-.form-row.error .radio .skin {\r
-  border-color: #cf2a2a !important; }\r
-\r
-.form-row.error .checkbox input:checked:not(:disabled) + .skin {\r
-  background-color: #cf2a2a; }\r
-\r
-.form-row.error .radio input:checked + .skin:after {\r
-  background-color: #cf2a2a; }\r
-\r
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg {\r
-  margin-top: -11px;\r
-  border-bottom-left-radius: 0;\r
-  border-bottom-right-radius: 0; }\r
-\r
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext {\r
-  margin: 0 0 10px; }\r
-\r
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:before,\r
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:after {\r
-  display: none; }\r
-\r
-.error .helpertext {\r
-  border-color: #cf2a2a;\r
-  /*border-radius:0;*/ }\r
-\r
-.error .helpertext:before {\r
-  border-top-color: #cf2a2a; }\r
-\r
-.error .tooltip-onfocus .helpertext {\r
-  margin: 14px 0 10px 0; }\r
-\r
-.error [class*="price"],\r
-.error [class*="pricing-"] {\r
-  color: #cf2a2a; }\r
-\r
-input:-ms-clear {\r
-  display: none; }\r
-\r
-input[type]::-webkit-inner-spin-button,\r
-input[type]::-webkit-outer-spin-button {\r
-  -webkit-appearance: none; }\r
-\r
-/*  input[type] {\r
-  -moz-appearance: textfield; } \r
- */\r
-form {\r
-  margin: 0; }\r
-\r
-fieldset {\r
-  padding: 0;\r
-  margin: 0;\r
-  border: 0; }\r
-\r
-label,\r
-legend {\r
-  display: inline-block;\r
-  font-size: 1.4rem;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-legend {\r
-  display: block; }\r
-\r
-.error-msg {\r
-  display: none; }\r
-\r
-select,\r
-textarea,\r
-input {\r
-  border-radius: 6px;\r
-  color: #5a5a5a;\r
-  display: inline-block;\r
-  font-size: 1.6rem;\r
-  margin: 0px;\r
-  padding: 0 15px 0 15px;\r
-  vertical-align: middle;\r
-  line-height: normal; }\r
-\r
-select::-webkit-input-placeholder,\r
-textarea::-webkit-input-placeholder,\r
-input::-webkit-input-placeholder {\r
-  color: #5a5a5a;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  font-style: normal;\r
-  opacity: 1; }\r
-\r
-select:-moz-placeholder,\r
-textarea:-moz-placeholder,\r
-input:-moz-placeholder {\r
-  color: #5a5a5a;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  font-style: normal;\r
-  opacity: 1; }\r
-\r
-select::-moz-placeholder,\r
-textarea::-moz-placeholder,\r
-input::-moz-placeholder {\r
-  color: #5a5a5a;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  font-style: normal;\r
-  opacity: 1; }\r
-\r
-select:-ms-input-placeholder,\r
-textarea:-ms-input-placeholder,\r
-input:-ms-input-placeholder {\r
-  color: #5a5a5a;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  transition: none;\r
-  opacity: 1; }\r
-\r
-select:placeholder,\r
-textarea:placeholder,\r
-input:placeholder {\r
-  color: #5a5a5a;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial;\r
-  font-style: normal;\r
-  opacity: 1; }\r
-\r
-select:last-child,\r
-textarea:last-child,\r
-input:last-child {\r
-  margin-right: 0; }\r
-\r
-input:not([type="button"]) {\r
-  height: 36px; }\r
-\r
-input.input-emphasized {\r
-  font-size: 1.8rem;\r
-  height: 48px;\r
-  padding: 13px 20px 13px; }\r
-\r
-input[type="search"]:focus {\r
-  padding-right: 88px; }\r
-\r
-input[type="search"] {\r
-  padding-right: 40px;\r
-  -webkit-appearance: none !important; }\r
-\r
-input[type="search"].input-emphasized {\r
-  padding-right: 45px; }\r
-\r
-.btn-search[class*="btn"] {\r
-  background-color: transparent;\r
-  background-position: 50% 50%;\r
-  background-size: 20px;\r
-  background-repeat: no-repeat;\r
-  border: none;\r
-  height: 100%;\r
-  margin-left: 0;\r
-  margin-top: 0;\r
-  min-width: 45px !important;\r
-  outline-offset: 0;\r
-  padding: 0 !important;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 0;\r
-  border-radius: 0 5px 5px 0;\r
-  min-width: 44px;\r
-  width: 44px; }\r
-\r
-.input-emphasized + .btn-search[class*="btn"],\r
-.input-emphasized + .reset-field + .btn-search[class*="btn"] {\r
-  background-size: 26px;\r
-  height: 46px;\r
-  top: 1px;\r
-  outline-offset: -3px;\r
-  margin-bottom: 0;\r
-  border-radius: 0 5px 5px 0; }\r
-\r
-input[type="search"].input-emphasized + .reset-field {\r
-  right: 45px !important; }\r
-\r
-.search-suggestion-wrapper {\r
-  position: relative;\r
-  margin-bottom: 15px; }\r
-\r
-/*styles from dropdown*/\r
-.search-suggestion-list {\r
-  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);\r
-  border-radius: 0 0 6px 6px;\r
-  position: relative;\r
-  border: 1px solid #0568ae;\r
-  border-top: 0;\r
-  padding: 15px 0;\r
-  background-color: #f2f2f2;\r
-  z-index: 1000;\r
-  width: 100%;\r
-  max-height: 400px;\r
-  overflow-y: auto; }\r
-\r
-.search-suggestion-list:empty {\r
-  display: none; }\r
-\r
-.search-suggestion-item {\r
-  position: relative;\r
-  z-index: -1;\r
-  padding: 0 15px;\r
-  line-height: 4.0rem;\r
-  color: #5a5a5a; }\r
-\r
-.search-suggestion-item a {\r
-  text-decoration: none;\r
-  color: #5a5a5a; }\r
-\r
-.search-suggestion-item:hover,\r
-.search-suggestion-item:focus {\r
-  cursor: pointer;\r
-  background-color: #d2d2d2; }\r
-\r
-input[data-provide="datepicker"],\r
-[data-provide="datepicker"]:-moz-placeholder,\r
-[data-provide="datepicker"]:-ms-input-placeholder,\r
-[data-provide="datepicker"]:-webkit-input-placeholder {\r
-  color: #0568ae !important;\r
-  opacity: 1;\r
-  filter: alpha(opacity=100); }\r
-\r
-input[disabled],\r
-input[readonly],\r
-select[disabled],\r
-select[readonly],\r
-textarea[disabled],\r
-textarea[readonly],\r
-span.icon-primary-calendar.disabled,\r
-span.icon-primary-calendar.readonly {\r
-  cursor: not-allowed;\r
-  background-color: #f2f2f2;\r
-  box-shadow: none; }\r
-\r
-span.icon-primary-calendar.disabled input,\r
-span.icon-primary-calendar.readonly input {\r
-  color: #959595 !important; }\r
-\r
-textarea {\r
-  display: block;\r
-  width: 100%;\r
-  max-width: 100%;\r
-  padding: 15px; }\r
-\r
-textarea.small {\r
-  line-height: 20px; }\r
-\r
-textarea + .reset-field {\r
-  display: none; }\r
-\r
-textarea::-webkit-input-placeholder {\r
-  line-height: .99; }\r
-\r
-textarea:-moz-placeholder {\r
-  line-height: .99; }\r
-\r
-textarea::-moz-placeholder {\r
-  line-height: .99; }\r
-\r
-textarea:-ms-input-placeholder {\r
-  line-height: .99; }\r
-\r
-textarea:placeholder {\r
-  line-height: .99; }\r
-\r
-textarea,\r
-input {\r
-  background-color: #ffffff;\r
-  border: 1px solid #d2d2d2; \r
-/* -webkit-appearance: none; */\r
-  box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;\r
-  transition: border .3s linear 0s;\r
-  font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-textarea:focus,\r
-input:focus {\r
-  outline: 0;\r
-  border-color: #0568ae; }\r
-\r
-.input-append {\r
-  display: table; }\r
-\r
-.input-append > div {\r
-  display: table-cell;\r
-  width: 1%; }\r
-\r
-.input-append > .field-group {\r
-  width: 100%; }\r
-\r
-.row .field-group input[class*="span"] {\r
-  float: none; }\r
-\r
-.field-group {\r
-  position: relative;\r
-  display: inline-block; }\r
-\r
-label + .field-group,\r
-label + .input-append,\r
-label + .row,\r
-label + .row-nowrap,\r
-label + .form-row {\r
-  margin-top: 5px; }\r
-\r
-.field-group {\r
-  position: relative;\r
-  display: block; }\r
-\r
-.field-group input:not([type="button"])[disabled] {\r
-  padding-right: 15px; }\r
-\r
-input:invalid,\r
-textarea:invalid,\r
-select:invalid {\r
-  outline: none !important; }\r
-\r
-.form-row {\r
-  margin-top: 20px; }\r
-\r
-.form-row.nomar {\r
-  margin: 0; }\r
-\r
-.row-nowrap.no-flex.form-row > label + br {\r
-  margin-bottom: 5px; }\r
-\r
-span.form-row {\r
-  display: inline-block; }\r
-\r
-legend + .form-row {\r
-  margin-top: 20px; }\r
-\r
-.tooltip-onclick input {\r
-  padding-right: 45px; }\r
-\r
-.ds2_touchevents .tooltip-onclick input:focus {\r
-  padding-right: 95px; }\r
-\r
-span.icon-primary-calendar {\r
-  display: block;\r
-  position: relative;\r
-  background-color: #fff;\r
-  border-radius: 4px;\r
-  overflow: hidden;\r
-  height: 36px; }\r
-\r
-span.icon-primary-calendar:before {\r
-  position: absolute;\r
-  top: 7px;\r
-  left: 13px;\r
-  color: #0568ae; }\r
-\r
-span.icon-primary-calendar.disabled {\r
-  background-color: #f2f2f2; }\r
-\r
-span.icon-primary-calendar.disabled:before {\r
-  color: #959595; }\r
-\r
-span.icon-primary-calendar input {\r
-  padding-left: 35px;\r
-  color: #0568ae;\r
-  transition: border-color 0.3s linear 0s;\r
-  box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;\r
-  position: absolute;\r
-  top: 0;\r
-  left: 0; }\r
-\r
-.faux-input + input.datepicker-input:not([disabled]) {\r
-  cursor: pointer;\r
-  margin-left: 0;\r
-  background-color: #fff;\r
-  position: absolute;\r
-  left: 0;\r
-  top: 0;\r
-  z-index: 0; }\r
-\r
-.faux-input {\r
-  background-color: transparent !important;\r
-  border: 1px solid transparent;\r
-  border-radius: 4px;\r
-  font-size: 1.6rem;\r
-  height: 35px;\r
-  left: 0;\r
-  line-height: 35px;\r
-  margin-bottom: 10px;\r
-  margin-right: 6px;\r
-  padding: 0 0 0 35px;\r
-  position: relative;\r
-  text-align: left;\r
-  top: 0;\r
-  vertical-align: middle;\r
-  width: 100%;\r
-  z-index: 1; }\r
-\r
-.faux-input:disabled {\r
-  cursor: not-allowed; }\r
-\r
-.faux-input:focus + .datepicker-input,\r
-[data-calendar-state="opened"] + .datepicker-input {\r
-  border-color: #0568ae;\r
-  box-shadow: 2px 3px 2px -2px rgba(5, 116, 172, 0.35) inset;\r
-  outline: 0 none; }\r
-\r
-.form-row.error .error-msg {\r
-  display: block;\r
-  font-size: 14px;\r
-  line-height: 14px;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  position: relative;\r
-  padding-left: 18px;\r
-  margin-top: 10px; }\r
-\r
-.form-row.error .error-msg > .icon-primary-badgealert {\r
-  height: 14px;\r
-  width: 14px;\r
-  position: absolute;\r
-  left: 0;\r
-  margin-right: 0; }\r
-\r
-.form-row.error .error-msg > .icon-primary-badgealert:before {\r
-  color: #cf2a2a;\r
-  font-size: 14px;\r
-  left: 0;\r
-  line-height: 14px;\r
-  position: absolute;\r
-  vertical-align: middle; }\r
-\r
-.form-row.error label,\r
-.form-row.error .error-msg,\r
-.form-row.error button.awd-select,\r
-.form-row.error select.awd-select + span,\r
-.form-row.error .checkbox,\r
-.form-row.error .radio,\r
-.form-row.error legend.error,\r
-.form-row.error input,\r
-.form-row.error textarea {\r
-  color: #cf2a2a; }\r
-\r
-.form-row.error .btn-group > .btn,\r
-.form-row.error button.awd-select,\r
-.form-row.error .awd-select-list,\r
-.form-row.error select.awd-select + span,\r
-.form-row.error textarea,\r
-.form-row.error input,\r
-.form-row.error .checkbox .skin,\r
-.form-row.error .radio .skin {\r
-  border-color: #cf2a2a !important; }\r
-\r
-.form-row.error .checkbox input:checked:not(:disabled) + .skin {\r
-  background-color: #cf2a2a; }\r
-\r
-.form-row.error .radio input:checked + .skin:after {\r
-  background-color: #cf2a2a; }\r
-\r
-.error [class*="price"],\r
-.error [class*="pricing-"] {\r
-  color: #cf2a2a; }\r
-\r
-hr,\r
-.hr-or {\r
-  display: block;\r
-  height: 1px;\r
-  margin: 15px 0;\r
-  border: none;\r
-  background-repeat: repeat-x;\r
-  background-color: #959595;\r
-  position: relative; }\r
-\r
-hr.dark {\r
-  background-color: #959595; }\r
-\r
-hr.lite {\r
-  background-color: #d2d2d2; }\r
-\r
-.hr-or:before {\r
-  background-color: #fff;\r
-  color: #666;\r
-  content: " OR ";\r
-  display: block;\r
-  font-size: 1.4rem;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  height: 16px;\r
-  left: 50%;\r
-  line-height: 1.6rem;\r
-  margin-left: -15px;\r
-  margin-top: -8px;\r
-  position: absolute;\r
-  text-align: center;\r
-  top: 50%;\r
-  width: 30px;\r
-  z-index: 1111; }\r
-\r
-hr.hr-dotted.dark {\r
-  background-color: transparent;\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E");\r
-  background-position: bottom;\r
-  background-repeat: repeat-x;\r
-  background-size: 4px 1px;\r
-  width: 100%; }\r
-\r
-hr.hr-dotted.lite {\r
-  background-color: transparent;\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }\r
-\r
-hr.is-vertical.dark,\r
-hr.hr-or.dark,\r
-hr.is-vertical.lite,\r
-hr.hr-or.lite {\r
-  display: inline-block;\r
-  height: auto;\r
-  margin: 0 15px;\r
-  min-height: 20px;\r
-  width: 1px; }\r
-\r
-hr.is-vertical.dark,\r
-hr.hr-or.dark {\r
-  background-color: #959595; }\r
-\r
-hr.is-vertical.lite,\r
-hr.hr-or.lite {\r
-  background-color: #d2d2d2; }\r
-\r
-.hr-dotted.is-vertical.dark,\r
-.hr-dotted.is-vertical.lite {\r
-  background-color: transparent;\r
-  background-repeat: repeat-y;\r
-  background-size: 1px 4px;\r
-  height: auto;\r
-  min-height: 20px;\r
-  width: 1px; }\r
-\r
-.hr-dotted.is-vertical.dark {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }\r
-\r
-.hr-dotted.is-vertical.lite {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }\r
-\r
-.row-nowrap > .span + hr.is-vertical,\r
-.row > .span + hr.is-vertical {\r
-  margin: 0 0 0 -20px; }\r
-\r
-@media (max-width: 767px) {\r
-  hr,\r
-  .hr-or {\r
-    margin: 30px 0; }\r
-  hr.full {\r
-    margin-left: -15px;\r
-    margin-right: -15px; }\r
-  .hr-or.is-vertical {\r
-    min-height: 1px;\r
-    height: 1px;\r
-    width: 100%; }\r
-  .row-nowrap > .span + hr.is-vertical {\r
-    margin: 0 0 0 -15px; }\r
-  .row > .span + hr.is-vertical {\r
-    min-height: 1px;\r
-    height: 1px;\r
-    width: 100%;\r
-    margin: 0;\r
-    display: block; }\r
-  .row > .span + hr.is-vertical.lite {\r
-    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;\r
-    background-size: 4px 1px;\r
-    background-repeat: repeat-x; }\r
-  .row > .span + hr.is-vertical.dark {\r
-    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;\r
-    background-size: 4px 1px;\r
-    background-repeat: repeat-x; } }\r
-\r
-hr.bottom-space-only {\r
-  margin-top: 0; }\r
-\r
-.hr-nomargin {\r
-  margin: 0; }\r
-\r
-.radio {\r
-  position: relative;\r
-  min-height: 24px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.6rem;\r
-  margin-bottom: 5px; }\r
-  .radio input {\r
-    -webkit-tap-highlight-color: transparent;\r
-    height: 10px;\r
-    margin: 6px;\r
-    opacity: 0;\r
-    outline: none;\r
-    position: absolute;\r
-    left: 1px;\r
-    top: 1px;\r
-    width: 10px; }\r
-    .radio input:focus + .skin {\r
-      border-color: #0568ae; }\r
-      .radio input:focus + .skin:before {\r
-        content: "";\r
-        height: 34px;\r
-        left: -6px;\r
-        top: -6px;\r
-        outline: 1px dotted #000000;\r
-        position: absolute;\r
-        width: 34px; }\r
-    .radio input + .skin {\r
-      border-radius: 100%; }\r
-    .radio input:checked + .skin:after {\r
-      background-color: #0568ae;\r
-      border-radius: 100%;\r
-      border: 3px solid #FFFFFF;\r
-      content: "";\r
-      display: block;\r
-      height: 16px;\r
-      position: absolute;\r
-      width: 16px; }\r
-    .radio input:disabled + .skin {\r
-      cursor: not-allowed;\r
-      background-color: #d2d2d2;\r
-      border-color: #d2d2d2;\r
-      color: #666666; }\r
-      .radio input:disabled + .skin + span {\r
-        cursor: not-allowed;\r
-        color: #666666; }\r
-    .radio input:disabled:checked + .skin:after {\r
-      background-color: #666666; }\r
-    .radio input:invalid + .skin {\r
-      border: solid 1px #cf2a2a; }\r
-  .radio .skin {\r
-    background-color: #FFFFFF;\r
-    border: 1px solid #d2d2d2;\r
-    border-radius: 3px;\r
-    display: inline-block;\r
-    height: 24px;\r
-    left: 0;\r
-    position: absolute;\r
-    top: 0;\r
-    width: 24px; }\r
-  .radio span {\r
-    display: inline-block;\r
-    margin-left: 34px;\r
-    margin-top: 0;\r
-    position: relative;\r
-    top: 3px; }\r
-  .radio label {\r
-    font-size: 1.6rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-.radio.inline {\r
-  display: inline-block;\r
-  margin-bottom: 10px;\r
-  vertical-align: middle;\r
-  margin-right: 10px; }\r
-  .radio.inline:last-child {\r
-    margin-right: 0; }\r
-\r
-.radio-box {\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 8px; }\r
-  .radio-box > [role="radio"] label {\r
-    padding: 15px 15px 20px 15px;\r
-    display: block;\r
-    width: 100%; }\r
-    .radio-box > [role="radio"] label .skin + span {\r
-      top: 2px; }\r
-  .radio-box > [role="radio"] + div {\r
-    padding: 0 15px 15px 47px; }\r
-  .radio-box > [aria-checked="false"] label > input {\r
-    top: 15px;\r
-    left: 15px; }\r
-  .radio-box > [aria-checked="false"] label .skin {\r
-    top: 15px;\r
-    left: 15px; }\r
-  .radio-box > [aria-checked="true"] label > input {\r
-    top: 13px;\r
-    left: 13px; }\r
-  .radio-box > [aria-checked="true"] label .skin {\r
-    top: 13px;\r
-    left: 13px; }\r
-\r
-.radio-box.active {\r
-  border: 3px solid #0568ae; }\r
-  .radio-box.active > [role="radio"] label {\r
-    padding: 13px 14px 19px 13px; }\r
-\r
-.checkbox {\r
-  position: relative;\r
-  min-height: 24px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.6rem;\r
-  margin-bottom: 5px; }\r
-  .checkbox input {\r
-    -webkit-tap-highlight-color: transparent;\r
-    height: 10px;\r
-    margin: 6px;\r
-    opacity: 0;\r
-    outline: none;\r
-    position: absolute;\r
-    left: 1px;\r
-    top: 1px;\r
-    width: 10px; }\r
-    .checkbox input:focus + .skin {\r
-      border-color: #0568ae; }\r
-      .checkbox input:focus + .skin:before {\r
-        content: "";\r
-        height: 34px;\r
-        left: -6px;\r
-        top: -6px;\r
-        outline: 1px dotted #000000;\r
-        position: absolute;\r
-        width: 34px; }\r
-    .checkbox input:checked:not(:disabled) + .skin {\r
-      background-color: #0568ae;\r
-      border-color: #0568ae; }\r
-    .checkbox input:checked:disabled + .skin:after {\r
-      color: #5A5A5A; }\r
-    .checkbox input:checked + .skin:after {\r
-      height: 24px;\r
-      width: 24px;\r
-      background-color: transparent;\r
-      font-size: 23.4px;\r
-      color: #FFFFFF;\r
-      line-height: 21px; }\r
-    .checkbox input:disabled + .skin {\r
-      cursor: not-allowed;\r
-      background-color: #d2d2d2;\r
-      border-color: #d2d2d2;\r
-      color: #666666; }\r
-      .checkbox input:disabled + .skin + span {\r
-        cursor: not-allowed;\r
-        color: #666666; }\r
-    .checkbox input:invalid + .skin {\r
-      border: solid 1px #cf2a2a; }\r
-    .checkbox input:indeterminate + .skin:after {\r
-      background-color: transparent;\r
-      font-size: 25px;\r
-      color: #0574ac;\r
-      content: "\e920"; }\r
-  .checkbox .skin {\r
-    background-color: #fff;\r
-    border: 1px solid #d2d2d2;\r
-    border-radius: 3px;\r
-    display: inline-block;\r
-    height: 24px;\r
-    width: 24px;\r
-    position: absolute;\r
-    left: 0;\r
-    top: 0; }\r
-  .checkbox span {\r
-    display: inline-block;\r
-    margin-left: 34px;\r
-    margin-top: 0;\r
-    position: relative;\r
-    top: 3px; }\r
-  .checkbox label {\r
-    font-size: 1.6rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial; }\r
-  .checkbox input {\r
-    z-index: 9999; }\r
-  .checkbox input.indeterminate + .skin:after {\r
-    font-size: 22px;\r
-    color: #0568ae; }\r
-\r
-.checkbox.inline {\r
-  display: inline-block;\r
-  margin-bottom: 10px;\r
-  vertical-align: middle;\r
-  margin-right: 10px; }\r
-  .checkbox.inline:last-child {\r
-    margin-right: 0; }\r
-\r
-.checkbox.checkbox-selectall {\r
-  margin: 20px 0 0 24px; }\r
-\r
-.terms-after-checkbox {\r
-  margin-top: 15px; }\r
-\r
-.indeterminate-margin {\r
-  padding-left: 24px; }\r
-\r
-.tiny-accordion {\r
-  border-bottom: 1px solid #d2d2d2; }\r
-\r
-.toggle-header,\r
-.inactive-toggle-header {\r
-  border-color: #fff;\r
-  color: #0568ae;\r
-  cursor: pointer;\r
-  display: block;\r
-  font-size: 2.0rem;\r
-  line-height: 2.2rem;\r
-  min-height: 41px;\r
-  position: relative;\r
-  padding: 16px 55px 16px 15px; }\r
-\r
-.toggle-header.opened {\r
-  color: #333333; }\r
-\r
-.tiny-accordion .toggle-header,\r
-.tiny-accordion .inactive-toggle-header {\r
-  padding: 16px 55px 16px 15px;\r
-  border-top: 1px solid #d2d2d2; }\r
-\r
-.tiny-accordion .toggle-header:focus {\r
-  text-decoration: underline; }\r
-\r
-.tiny-accordion.iconleft .toggle-header,\r
-.tiny-accordion.iconleft .inactive-toggle-header {\r
-  padding: 15px 15px 15px 50px; }\r
-\r
-.accordion-content {\r
-  font-size: 1.4rem; }\r
-\r
-.accordion-content .toggle-header:first-child {\r
-  margin-top: 16px; }\r
-\r
-.tiny-accordion .toggle-header + .accordion-content {\r
-  padding: 0 50px 15px 15px; }\r
-\r
-.tiny-accordion.iconleft .toggle-header + .accordion-content {\r
-  padding: 0 15px 15px 50px; }\r
-\r
-.toggle-header .icon-primary-accordion-plus,\r
-.toggle-header .icon-primary-accordion-minus {\r
-  display: inline-block;\r
-  font-size: 20px;\r
-  margin: 0;\r
-  padding: 0;\r
-  position: absolute;\r
-  right: 15px;\r
-  vertical-align: middle;\r
-  top: 16px;\r
-  font-weight: bold; }\r
-\r
-.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-plus,\r
-.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-minus {\r
-  left: 15px; }\r
-\r
-.inactive-toggle-header:hover {\r
-  cursor: inherit; }\r
-\r
-.tiny-accordion-to-tabs,\r
-.tiny-tabs {\r
-  position: relative;\r
-  width: 100%;\r
-  margin: 0px;\r
-  padding: 0px; }\r
-\r
-.tiny-tabs [class*="icon-primary-accordion-"] {\r
-  display: none !important; }\r
-\r
-.tiny-accordion-to-tabs:before,\r
-.tiny-accordion-to-tabs:after,\r
-.tiny-tabs:before,\r
-.tiny-tabs:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.tiny-accordion-to-tabs:after,\r
-.tiny-tabs:after {\r
-  clear: both; }\r
-\r
-.tiny-accordion-to-tabs:before,\r
-.tiny-accordion-to-tabs:after,\r
-.tiny-tabs:before,\r
-.tiny-tabs:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.tiny-accordion-to-tabs:after,\r
-.tiny-tabs:after {\r
-  clear: both; }\r
-\r
-.tiny-tabs > .toggle-header {\r
-  display: inline-block;\r
-  float: left;\r
-  border-top: none;\r
-  overflow: hidden;\r
-  height: 70px;\r
-  text-align: center;\r
-  background-color: #fff;\r
-  border-radius: 0px;\r
-  padding: 26px 20px 25px 20px !important;\r
-  border-top: 1px solid #fff;\r
-  -webkit-filter: none;\r
-  filter: none;\r
-  background-clip: padding-box;\r
-  border-bottom: 1px solid #d2d2d2;\r
-  font-weight: normal;\r
-  border-right: 1px solid #d2d2d2;\r
-  white-space: nowrap; }\r
-\r
-.tiny-tabs .toggle-header + div {\r
-  left: 0px;\r
-  position: absolute;\r
-  top: 69px;\r
-  border-top: 1px solid #d2d2d2;\r
-  padding: 0;\r
-  display: block;\r
-  border-bottom: none;\r
-  width: 100%; }\r
-\r
-.accordion-pad {\r
-  padding-top: 30px;\r
-  padding-bottom: 30px; }\r
-\r
-.tiny-tabs .opened {\r
-  color: #333333;\r
-  border-top: 5px solid #0568ae !important;\r
-  padding-top: 22px !important;\r
-  border-bottom: none;\r
-  background-color: #fff;\r
-  -webkit-filter: none;\r
-  filter: none;\r
-  cursor: default;\r
-  z-index: 999; }\r
-\r
-.tiny-tabs .toggle-header:focus {\r
-  text-decoration: underline;\r
-  outline: thin dotted #666;\r
-  outline-offset: 0; }\r
-\r
-.tiny-tabs .toggle-header:first-child {\r
-  border-left: none;\r
-  margin-left: 0; }\r
-\r
-.tiny-tabs .toggle-header:first-child {\r
-  border-left: 1px solid #fff; }\r
-\r
-.tiny-tabs .opened:first-child {\r
-  border-left: 1px solid #d2d2d2; }\r
-\r
-.tiny-tabs .toggle-header:nth-last-of-type(2) {\r
-  border-right-color: #fff; }\r
-\r
-.tiny-tabs .opened:nth-last-of-type(2) {\r
-  border-right: 1px solid #d2d2d2; }\r
-\r
-@media (max-width: 767px) {\r
-  .tiny-accordion,\r
-  .tiny-accordion-to-tabs {\r
-    margin-left: -15px;\r
-    margin-right: -15px;\r
-    width: auto; }\r
-  .tiny-accordion-to-tabs {\r
-    display: block;\r
-    border-bottom: 1px solid #d2d2d2; }\r
-  .tiny-accordion-to-tabs .toggle-header {\r
-    display: block;\r
-    min-height: 41px;\r
-    padding: 16px 50px 16px 15px;\r
-    border-top: 1px solid #d2d2d2; }\r
-  .tiny-accordion-to-tabs .toggle-header:focus {\r
-    text-decoration: underline; }\r
-  .tiny-accordion-to-tabs .toggle-header + .accordion-content {\r
-    padding: 0 50px 15px 15px; } }\r
-\r
-@media (min-width: 768px) {\r
-  .tiny-accordion-to-tabs [class*="icon-primary-accordion-"] {\r
-    display: none !important; }\r
-  .tiny-accordion-to-tabs > .toggle-header {\r
-    display: inline-block;\r
-    float: left;\r
-    border-top: none;\r
-    /*overflow: hidden;*/\r
-    height: 70px;\r
-    text-align: center;\r
-    background-color: #fff;\r
-    border-radius: 0px;\r
-    padding: 26px 20px 25px 20px !important;\r
-    border-top: 1px solid #fff;\r
-    -webkit-filter: none;\r
-    filter: none;\r
-    background-clip: padding-box;\r
-    border-bottom: 1px solid #d2d2d2;\r
-    font-weight: normal;\r
-    border-right: 1px solid #d2d2d2;\r
-    white-space: nowrap; }\r
-  .tiny-accordion-to-tabs .toggle-header + div {\r
-    left: 0px;\r
-    position: absolute;\r
-    top: 69px;\r
-    border-top: 1px solid #d2d2d2;\r
-    padding-top: 30px;\r
-    padding-left: 20px;\r
-    display: block;\r
-    border-bottom: none;\r
-    width: 100%; }\r
-  .tiny-accordion-to-tabs .opened {\r
-    color: #333333;\r
-    border-top: 5px solid #0568ae !important;\r
-    padding-top: 22px !important;\r
-    border-bottom: none;\r
-    background-color: #fff;\r
-    -webkit-filter: none;\r
-    filter: none;\r
-    cursor: default;\r
-    text-decoration: none;\r
-    z-index: 999; }\r
-  .tiny-accordion-to-tabs .toggle-header:focus {\r
-    text-decoration: underline;\r
-    outline: thin dotted #666;\r
-    outline-offset: 0px; }\r
-  .tiny-accordion-to-tabs .toggle-header:nth-last-of-type(2) {\r
-    border-right: none; }\r
-  .tiny-accordion-to-tabs .toggle-header:first-child {\r
-    border-left: none;\r
-    margin-left: 0; }\r
-  .tiny-accordion-to-tabs .toggle-header:first-child {\r
-    border-left: 1px solid #fff; }\r
-  .tiny-accordion-to-tabs .opened:first-child {\r
-    border-left: 1px solid #d2d2d2; }\r
-  .tiny-accordion-to-tabs .opened:nth-last-of-type(2) {\r
-    border-right: 1px solid #d2d2d2; } }\r
-\r
-.toggle-header .tooltip .icon-primary-tooltip {\r
-  margin-top: -5px; }\r
-\r
-.accordion-content {\r
-  transition: all 0.8s linear; }\r
-\r
-.opaque-content {\r
-  opacity: 0; }\r
-\r
-.tiny-tabs .toggle-header {\r
-  display: inline-block;\r
-  float: left;\r
-  border-top: none;\r
-  overflow: hidden;\r
-  height: 70px;\r
-  text-align: center;\r
-  background-color: #fff;\r
-  border-radius: 0px;\r
-  padding: 22px 20px 25px 20px !important;\r
-  border-top: 5px solid #fff;\r
-  -webkit-filter: none;\r
-  filter: none;\r
-  background-clip: padding-box;\r
-  border-bottom: 1px solid #ccc;\r
-  font-weight: normal;\r
-  border-right: 1px solid #ccc;\r
-  white-space: nowrap; }\r
-\r
-.tiny-tabs .toggle-header:first-child {\r
-  margin-left: 0; }\r
-\r
-.tiny-tabs div:first-child .toggle-header {\r
-  margin-left: 30px; }\r
-\r
-.tiny-tabs > div .toggle-header.opened {\r
-  border-bottom: 0 !important; }\r
-\r
-.tiny-accordion-to-tabs > div > div.toggle-header {\r
-  background-clip: padding-box;\r
-  background-color: #fff;\r
-  border-bottom: 1px solid #ccc;\r
-  border-radius: 0;\r
-  border-top: 5px solid #fff;\r
-  display: inline-block;\r
-  filter: none;\r
-  float: left;\r
-  font-weight: normal;\r
-  overflow: hidden;\r
-  padding: 22px 20px 21px !important;\r
-  text-align: center;\r
-  white-space: nowrap; }\r
-\r
-.tiny-accordion-to-tabs .toggle-header:first-child {\r
-  margin-left: 0; }\r
-\r
-.tiny-accordion-to-tabs div:first-child .toggle-header {\r
-  margin-left: 30px;\r
-  border-bottom: 0 !important; }\r
-\r
-.tiny-accordion-to-tabs > div .toggle-header.opened {\r
-  border-bottom: 0 !important; }\r
-\r
-@media (max-width: 767px) {\r
-  .tiny-accordion-to-tabs {\r
-    display: block !important;\r
-    border-bottom: 1px solid #ccc !important; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header {\r
-    display: block !important;\r
-    float: none;\r
-    text-align: left;\r
-    min-height: 41px !important;\r
-    padding: 15px 50px 15px 15px !important;\r
-    border-top: 1px solid #ccc; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header:first-child {\r
-    margin-left: 0 !important; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header + .accordion-content {\r
-    padding: 0 50px 15px 15px; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus {\r
-    background-position: 0 0;\r
-    background-size: 20px 40px; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {\r
-    background-position: 0 -20px;\r
-    background-size: 20px 40px; }\r
-  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus,\r
-  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {\r
-    display: inline-block;\r
-    height: 20px;\r
-    margin: 0;\r
-    padding: 0;\r
-    position: absolute;\r
-    right: 15px;\r
-    vertical-align: middle;\r
-    width: 20px; } }\r
-\r
-.alert {\r
-  background-color: #5a5a5a;\r
-  border-radius: 8px;\r
-  color: #fff;\r
-  margin-top: 15px;\r
-  padding: 0;\r
-  position: relative;\r
-  border: 0; }\r
-\r
-.alert h3,\r
-.alert h4 {\r
-  color: #fff;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 1.6rem;\r
-  margin: 0 20px 5px 0; }\r
-\r
-.alert div {\r
-  padding: 15px 20px; }\r
-\r
-.alert div:first-child {\r
-  border-radius: 8px 0 0 8px;\r
-  width: 1%; }\r
-\r
-.alert div:first-child + div {\r
-  border: 1px solid transparent;\r
-  border-left: none;\r
-  border-radius: 0 8px 8px 0; }\r
-\r
-.alert-error {\r
-  background-color: #cf2a2a;\r
-  border: 1px solid #cf2a2a; }\r
-\r
-.alert-info {\r
-  background-color: #44c8f5;\r
-  border: 1px solid #44c8f5; }\r
-\r
-.alert-success {\r
-  background-color: #c5d63d;\r
-  border: 1px solid #c5d63d; }\r
-\r
-.alert [class*="icon-primary-"] {\r
-  color: #fff;\r
-  font-size: 30px;\r
-  margin-right: 0; }\r
-\r
-.alert .close {\r
-  height: 30px;\r
-  position: absolute;\r
-  right: 1px;\r
-  top: 1px;\r
-  width: 30px; }\r
-\r
-.alert .close:before {\r
-  color: #fff;\r
-  margin-right: 0;\r
-  position: absolute;\r
-  right: 9px;\r
-  top: 9px; }\r
-\r
-.alert a {\r
-  color: #fff;\r
-  text-decoration: underline; }\r
-\r
-.alert .close:focus {\r
-  outline: 1px dotted #666; }\r
-\r
-.alert p {\r
-  font-size: 1.4rem; }\r
-\r
-.alert p:last-child {\r
-  margin-bottom: 0; }\r
-\r
-.alert .standalone-link i[class*="icon-primary-"] {\r
-  font-size: 20px;\r
-  margin-right: 5px; }\r
-\r
-@media (max-width: 767px) {\r
-  .alert {\r
-    border-radius: 0;\r
-    margin: 0 -15px; }\r
-  .alert + .alert {\r
-    margin-top: 4px; }\r
-  .alert div {\r
-    padding: 15px 10px; }\r
-  .alert div:first-child {\r
-    border-radius: 0;\r
-    padding: 15px; }\r
-  .alert h3,\r
-  .alert h4 {\r
-    font-size: 1.4rem; }\r
-  .alert p {\r
-    font-size: 1.2rem; }\r
-  .alert .close {\r
-    right: 5px;\r
-    top: 5px; }\r
-  .alert .standalone-link i[class*="icon-primary-"] {\r
-    font-size: 16px; } }\r
-\r
-.alert h3 {\r
-  margin: 0;\r
-  font-size: 16px; }\r
-\r
-.alert p {\r
-  font-size: 14px; }\r
-\r
-.alert p a {\r
-  color: #FFFFFF;\r
-  text-decoration: underline; }\r
-\r
-.alert div:first-child + div {\r
-  padding-right: 25px; }\r
-\r
-.alert div:last-child {\r
-  padding-right: 20px !important; }\r
-\r
-.alert p [class*="icon-primary-"] {\r
-  color: #fff;\r
-  font-size: 20px;\r
-  margin-right: 0; }\r
-\r
-@media (max-width: 767px) {\r
-  .alert h3 {\r
-    font-size: 14px; }\r
-  .alert div:first-child + div {\r
-    padding-right: 20px; }\r
-  .alert div:last-child {\r
-    padding-right: 15px !important; }\r
-  .alert div:first-child {\r
-    padding: 15px; }\r
-  .alert p {\r
-    font-size: 12px; }\r
-  .alert p [class*="icon-primary-"] {\r
-    font-size: 16px; } }\r
-\r
-.b2b-audio {\r
-  width: auto;\r
-  margin: 10px auto;\r
-  height: 35px; }\r
-  .b2b-audio .controls-wrapper {\r
-    display: inline-block;\r
-    font-size: 25px;\r
-    cursor: pointer; }\r
-    .b2b-audio .controls-wrapper i {\r
-      font-size: 25px;\r
-      margin-right: 0px;\r
-      color: #444; }\r
-      .b2b-audio .controls-wrapper i:hover {\r
-        color: #0574AC; }\r
-  .b2b-audio .seek-bar-container-wrapper {\r
-    display: inline-block;\r
-    outline: 0;\r
-    min-width: 180px;\r
-    margin-right: 10px;\r
-    margin-left: 10px;\r
-    height: 14px;\r
-    padding-top: 5px; }\r
-    .b2b-audio .seek-bar-container-wrapper .timing-container {\r
-      padding-top: 13px;\r
-      color: #333;\r
-      font-size: 12px; }\r
-      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-left {\r
-        float: left;\r
-        line-height: 100%; }\r
-      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-right {\r
-        float: right;\r
-        line-height: 100%; }\r
-      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-spacer {\r
-        clear: both; }\r
-  .b2b-audio .seek-bar-tooltip {\r
-    text-align: center;\r
-    min-width: 76px; }\r
-\r
-.b2b-audio-popover {\r
-  width: 22px; }\r
-  .b2b-audio-popover .volume-popover {\r
-    height: 100px !important;\r
-    width: 6px !important;\r
-    margin: 7px auto; }\r
-  .b2b-audio-popover .min-label {\r
-    margin-top: 5px; }\r
-\r
-.b2b-audio-native {\r
-  width: auto;\r
-  height: auto; }\r
-\r
-.b2b-audio-recorder {\r
-  border: 1px solid #ccc;\r
-  box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.15);\r
-  height: 63px;\r
-  min-height: 63px;\r
-  min-width: 347px; }\r
-  .b2b-audio-recorder .b2b-elapsed-time {\r
-    margin: 23px 0 24px 15px;\r
-    font-size: 16px;\r
-    font-style: italic;\r
-    color: #767676; }\r
-  .b2b-audio-recorder .b2b-controls {\r
-    width: 68px;\r
-    cursor: pointer; }\r
-    .b2b-audio-recorder .b2b-controls i.icoControls-record {\r
-      font-size: 64px;\r
-      color: black;\r
-      float: right;\r
-      margin-right: 10px; }\r
-      .b2b-audio-recorder .b2b-controls i.icoControls-record:focus, .b2b-audio-recorder .b2b-controls i.icoControls-record:hover {\r
-        color: #0568ae; }\r
-    .b2b-audio-recorder .b2b-controls i.icoControls-stop {\r
-      font-size: 36px;\r
-      color: black;\r
-      float: right;\r
-      margin-right: 20px;\r
-      margin-top: 12px; }\r
-      .b2b-audio-recorder .b2b-controls i.icoControls-stop:focus, .b2b-audio-recorder .b2b-controls i.icoControls-stop:hover {\r
-        color: #0568ae; }\r
-\r
-.b2b-top-btn {\r
-  height: 36px;\r
-  width: 36px;\r
-  border-radius: 7px; }\r
-\r
-.b2b-top-btn > i {\r
-  position: absolute;\r
-  top: 13px;\r
-  left: 9px;\r
-  width: 11px;\r
-  height: 18px; }\r
-\r
-.b2b-badge {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  background-color: #5A5A5A;\r
-  border-radius: 12px;\r
-  color: #FFFFFF;\r
-  display: inline-block;\r
-  font-size: 1.5rem;\r
-  font-weight: normal;\r
-  height: 20px;\r
-  line-height: 0;\r
-  margin-top: 0;\r
-  min-width: 20px;\r
-  padding: 0 5px;\r
-  text-align: center;\r
-  vertical-align: baseline; }\r
-  .b2b-badge:empty {\r
-    display: none; }\r
-\r
-* + .b2b-heading-micro {\r
-  margin-top: 20px !important; }\r
-\r
-.b2b-heading-micro {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-weight: normal;\r
-  text-rendering: optimizeLegibility;\r
-  font-size: 1.2rem !important;\r
-  text-transform: uppercase !important;\r
-  margin-bottom: 20px !important;\r
-  line-height: 1.2 !important; }\r
-\r
-.b2b-no-colors .b2b-badge {\r
-  border: 1px solid transparent; }\r
-\r
-.btn > .b2b-badge {\r
-  margin-right: 5px; }\r
-\r
-a > .b2b-badge {\r
-  margin-right: 6px;\r
-  padding-top: 10px; }\r
-\r
-.b2b-badge-urgent {\r
-  background-color: #cf2a2a; }\r
-\r
-.bellyband-container {\r
-  margin: 0 -15px; }\r
-\r
-.bellyband-group {\r
-  width: auto; }\r
-\r
-.bellyband-link {\r
-  border-top: 1px solid #d2d2d2; }\r
-\r
-.bellyband-link a {\r
-  display: block;\r
-  height: 40px;\r
-  line-height: 40px;\r
-  padding: 0 15px;\r
-  position: relative;\r
-  text-decoration: none; }\r
-\r
-.bellyband-link a:hover > div span,\r
-.bellyband-link a:focus > div span {\r
-  text-decoration: underline; }\r
-\r
-.bellyband-link a:after {\r
-  color: #666;\r
-  font-size: 2.3rem;\r
-  height: 20px;\r
-  position: absolute;\r
-  right: 5px;\r
-  top: 12px;\r
-  width: 18px; }\r
-\r
-.dark-bg .bellyband-link a:after {\r
-  color: white; }\r
-\r
-.bellyband-link img[src$="svg"].hidden-desktop,\r
-.bellyband-link [class*="icon-primary-"].hidden-desktop {\r
-  display: inline-block !important;\r
-  float: left;\r
-  font-size: 24px;\r
-  height: 24px;\r
-  margin-right: 5px;\r
-  margin-top: 8px;\r
-  width: 24px; }\r
-\r
-.dark-bg .bellyband-link [class*="icon-primary-"].hidden-desktop,\r
-.dark-bg .bellyband-link [class*="icon-primary-"].visible-desktop {\r
-  color: #fff; }\r
-\r
-.bellyband-link img[src$="svg"].visible-desktop {\r
-  display: none !important; }\r
-\r
-.bellyband-link p {\r
-  margin-top: -10px;\r
-  margin-left: 29px;\r
-  font-size: 1.4rem;\r
-  color: #666; }\r
-\r
-@media (min-width: 481px) and (max-width: 767px) {\r
-  .bellyband-container {\r
-    display: flex;\r
-    margin: 0; }\r
-  .bellyband-group {\r
-    align-content: flex-start;\r
-    align-items: stretch;\r
-    display: inline-flex;\r
-    flex-direction: column;\r
-    flex-wrap: wrap;\r
-    margin-top: 1px;\r
-    width: 100%; }\r
-  .bellyband-group .row {\r
-    display: flex !important; }\r
-  .bellyband-link {\r
-    padding-top: 0;\r
-    position: relative;\r
-    border-top: none;\r
-    margin-bottom: 20px;\r
-    width: 50%; }\r
-  .bellyband-link a {\r
-    height: inherit;\r
-    line-height: inherit;\r
-    display: flex;\r
-    padding: 0; }\r
-  .bellyband-link a:after {\r
-    display: none; }\r
-  .bellyband-link a span {\r
-    display: block;\r
-    padding-top: 10px; }\r
-  .bellyband-link p {\r
-    display: block;\r
-    padding: 0 15px 0 0;\r
-    margin-bottom: 0;\r
-    margin-left: 0;\r
-    margin-top: 0; }\r
-  .bellyband-link a:focus p {\r
-    text-decoration: none; } }\r
-\r
-@media (min-width: 768px) {\r
-  .bellyband-group {\r
-    margin: 0;\r
-    max-width: 100%;\r
-    display: flex;\r
-    flex-wrap: wrap;\r
-    justify-content: center; }\r
-  .bellyband-group .row {\r
-    display: block; }\r
-  .bellyband-group .row .span {\r
-    float: none;\r
-    margin-right: 0;\r
-    margin-bottom: 30px;\r
-    display: flex;\r
-    justify-content: space-between; }\r
-  .bellyband-link {\r
-    border-top: none;\r
-    flex: 0 0 auto;\r
-    margin-right: 0;\r
-    margin-bottom: 30px; }\r
-  .bellyband-link:last-child {\r
-    margin-right: 0; }\r
-  .bellyband-link a {\r
-    height: auto;\r
-    line-height: 1;\r
-    text-align: center; }\r
-  .bellyband-link a:after {\r
-    display: none; }\r
-  .bellyband-link img[src$="svg"].hidden-desktop,\r
-  .bellyband-link [class*="icon-primary-"].hidden-desktop {\r
-    display: none !important; }\r
-  .bellyband-link img[src$="svg"].visible-desktop,\r
-  .bellyband-link [class*="icon-primary-"].visible-desktop {\r
-    display: block !important;\r
-    font-size: 50px;\r
-    height: 50px;\r
-    margin-right: 0;\r
-    margin-top: 0;\r
-    margin-left: auto;\r
-    margin-right: auto;\r
-    width: auto; }\r
-  .bellyband-link a span {\r
-    display: block;\r
-    margin-top: 12px;\r
-    line-height: 2rem; }\r
-  .bellyband-link p {\r
-    display: block;\r
-    text-align: center;\r
-    margin-top: 6px;\r
-    margin-left: 0;\r
-    padding-left: 0 !important;\r
-    color: #666;\r
-    line-height: 1.8rem; } }\r
-\r
-@media (max-width: 480px) {\r
-  .bellyband-link-tall a {\r
-    height: auto;\r
-    padding: 0 40px 10px 15px; }\r
-  .bellyband-link-tall p {\r
-    line-height: 1.8rem;\r
-    margin-bottom: 0; }\r
-  .bellyband-link-tall > a:after {\r
-    margin-top: -8px;\r
-    top: 50%; } }\r
-\r
-.b2b-boardstrip {\r
-  display: inline-block;\r
-  width: 100%;\r
-  border-bottom: 1px solid #9d9d9d;\r
-  position: relative;\r
-  padding-top: 15px; }\r
-  .b2b-boardstrip .boardstrip-reel {\r
-    margin-bottom: 15px; }\r
-  .b2b-boardstrip .boardstrip-item--add {\r
-    border: 1px dashed #ccc;\r
-    background: #FFFFFF;\r
-    color: #0574ac;\r
-    width: 140px;\r
-    height: 80px;\r
-    font-size: 14px;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    -webkit-border-radius: 3px;\r
-    -moz-border-radius: 3px;\r
-    border-radius: 3px;\r
-    position: absolute;\r
-    left: 29px;\r
-    top: 15px; }\r
-    .b2b-boardstrip .boardstrip-item--add:hover, .b2b-boardstrip .boardstrip-item--add:focus {\r
-      border: 2px solid #007A3E;\r
-      cursor: pointer; }\r
-    .b2b-boardstrip .boardstrip-item--add i {\r
-      font-size: 14px;\r
-      margin-left: auto;\r
-      margin-right: auto;\r
-      text-align: initial; }\r
-    .b2b-boardstrip .boardstrip-item--add .centered {\r
-      margin-left: auto;\r
-      margin-right: auto;\r
-      margin-top: 27px;\r
-      margin-bottom: 35px;\r
-      display: block; }\r
-  .b2b-boardstrip .board-viewport {\r
-    float: left;\r
-    margin-left: 210px;\r
-    max-height: 95px;\r
-    position: relative;\r
-    height: 95px;\r
-    overflow: hidden;\r
-    width: 0px; }\r
-    .b2b-boardstrip .board-viewport .boardstrip-container {\r
-      width: 0px;\r
-      margin-left: 0;\r
-      left: 0px;\r
-      position: absolute;\r
-      list-style: none;\r
-      -webkit-transition: left 1000ms;\r
-      transition: left 1000ms; }\r
-    .b2b-boardstrip .board-viewport .board-item {\r
-      width: 140px;\r
-      height: 80px;\r
-      border: 1px solid #ccc;\r
-      margin: 0 15px 15px 0;\r
-      background-color: #FFFFFF;\r
-      border-radius: 3px;\r
-      float: left;\r
-      overflow: hidden; }\r
-      .b2b-boardstrip .board-viewport .board-item:hover, .b2b-boardstrip .board-viewport .board-item:focus {\r
-        border: 2px solid #007A3E;\r
-        background-color: white;\r
-        cursor: pointer; }\r
-      .b2b-boardstrip .board-viewport .board-item .board-img {\r
-        width: 61px;\r
-        height: 40px;\r
-        margin: 0 auto; }\r
-        .b2b-boardstrip .board-viewport .board-item .board-img img {\r
-          max-width: 100%; }\r
-      .b2b-boardstrip .board-viewport .board-item .title {\r
-        text-align: center;\r
-        line-height: 16px;\r
-        color: #666;\r
-        font-size: 14px;\r
-        font-family: "Omnes-ECOMP-W02", Arial;\r
-        padding: 10px 0; }\r
-      .b2b-boardstrip .board-viewport .board-item.selected {\r
-        background-color: #FFFFFF;\r
-        border: 2px solid #0574ac; }\r
-      .b2b-boardstrip .board-viewport .board-item .board-caret {\r
-        cursor: default;\r
-        outline: 0;\r
-        position: absolute;\r
-        bottom: 7px; }\r
-        .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-indicator {\r
-          border-left: 8px solid transparent;\r
-          border-right: 8px solid transparent;\r
-          border-bottom: 8px solid #999;\r
-          width: 0px;\r
-          height: 0px;\r
-          position: absolute;\r
-          left: 61px;\r
-          bottom: -7px; }\r
-        .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-arrow-up {\r
-          width: 0px;\r
-          height: 0px;\r
-          border-style: solid;\r
-          border-width: 0 8px 8px 8px;\r
-          border-color: transparent transparent #FFFFFF transparent;\r
-          left: 61px;\r
-          position: absolute; }\r
-  .b2b-boardstrip .arrow {\r
-    font-size: 14px;\r
-    cursor: pointer;\r
-    color: #0574ac; }\r
-    .b2b-boardstrip .arrow:hover {\r
-      color: #0574ac; }\r
-    .b2b-boardstrip .arrow.disabled {\r
-      color: #767676 !important;\r
-      cursor: not-allowed; }\r
-  .b2b-boardstrip .prev-items {\r
-    display: inline-block;\r
-    margin-top: auto;\r
-    margin-bottom: auto;\r
-    margin-right: 15px;\r
-    position: absolute;\r
-    left: 0;\r
-    top: 45px;\r
-    -webkit-user-select: none;\r
-    -moz-user-select: none;\r
-    -ms-user-select: none;\r
-    -o-user-select: none;\r
-    user-select: none; }\r
-  .b2b-boardstrip .next-items {\r
-    display: inline-block;\r
-    margin-top: 30px;\r
-    margin-bottom: auto;\r
-    margin-left: 10px;\r
-    -webkit-user-select: none;\r
-    -moz-user-select: none;\r
-    -ms-user-select: none;\r
-    -o-user-select: none;\r
-    user-select: none; }\r
-  .b2b-boardstrip .centered {\r
-    display: table-cell;\r
-    text-align: center;\r
-    vertical-align: middle; }\r
-\r
-.breadcrumb {\r
-  padding: 10px 15px;\r
-  height: 40px;\r
-  list-style: none;\r
-  border-bottom: 1px solid #d2d2d2;\r
-  font-size: 1.2rem;\r
-  width: 100%;\r
-  z-index: 1000; }\r
-\r
-.breadcrumb > li {\r
-  position: relative;\r
-  display: inline-block;\r
-  margin-right: 15px; }\r
-\r
-.breadcrumb > li:after {\r
-  font-size: 8px;\r
-  margin-right: 0;\r
-  right: -8px;\r
-  color: #333333; }\r
-\r
-.breadcrumb > li:last-child {\r
-  color: #333333; }\r
-\r
-.breadcrumb > li:last-child:after {\r
-  content: ""; }\r
-\r
-.breadcrumb li > * {\r
-  float: none !important;\r
-  margin: 0; }\r
-\r
-.breadcrumb {\r
-  padding: 10px 15px !important; }\r
-\r
-/* ARROW */\r
-/* spanish */\r
-.datepicker {\r
-  background-color: #FFFFFF;\r
-  padding: 0;\r
-  border-radius: 5px;\r
-  direction: ltr; }\r
-  .datepicker > div {\r
-    display: none; }\r
-  .datepicker table {\r
-    -webkit-touch-callout: none;\r
-    -webkit-user-select: none;\r
-    -moz-user-select: none;\r
-    -ms-user-select: none;\r
-    user-select: none;\r
-    margin: 0 0 0 0; }\r
-  .datepicker td {\r
-    text-align: center;\r
-    display: block;\r
-    width: 30px;\r
-    height: 30px;\r
-    border: none; }\r
-    .datepicker td span {\r
-      display: block;\r
-      width: 23%;\r
-      height: 54px;\r
-      line-height: 54px;\r
-      float: left;\r
-      margin: 1%;\r
-      cursor: pointer;\r
-      border-radius: 4px; }\r
-      .datepicker td span:hover {\r
-        background: #eeeeee; }\r
-    .datepicker td span.disabled {\r
-      background: none;\r
-      color: #5A5A5A;\r
-      cursor: default; }\r
-      .datepicker td span.disabled:hover {\r
-        background: none;\r
-        color: #5A5A5A;\r
-        cursor: default; }\r
-    .datepicker td span.active {\r
-      color: #FFFFFF;\r
-      background-color: #0568ae;\r
-      border-color: #357ebd; }\r
-      .datepicker td span.active:hover {\r
-        color: #FFFFFF;\r
-        background-color: #0568ae;\r
-        border-color: #357ebd; }\r
-    .datepicker td span.active.disabled {\r
-      color: #FFFFFF;\r
-      background-color: #0568ae;\r
-      border-color: #357ebd; }\r
-  .datepicker th {\r
-    text-align: center;\r
-    display: block;\r
-    width: 30px;\r
-    height: 30px;\r
-    border: none; }\r
-  .datepicker tbody:focus {\r
-    outline: none; }\r
-  .datepicker td.day {\r
-    background-color: transparent;\r
-    color: #0568ae;\r
-    cursor: pointer;\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    font-size: 16px;\r
-    height: 34px;\r
-    line-height: 30rem;\r
-    margin: -2px -1px 0 0;\r
-    overflow: hidden;\r
-    text-align: center;\r
-    width: 42px; }\r
-  .datepicker:focus {\r
-    outline: 1px dotted #191919;\r
-    outline-offset: -2px; }\r
-  .datepicker th[tabindex]:focus {\r
-    outline-offset: -15px; }\r
-  .datepicker td.day.focused {\r
-    background: #ededed;\r
-    cursor: pointer; }\r
-  .datepicker td.day.focused.active {\r
-    background-color: #ededed;\r
-    color: #0568ae; }\r
-  .datepicker td.disabled {\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    color: #5A5A5A;\r
-    cursor: default; }\r
-    .datepicker td.disabled:hover {\r
-      font-family: "Omnes-ECOMP-W02", Arial;\r
-      color: #5A5A5A;\r
-      cursor: default; }\r
-      .datepicker td.disabled:hover .show-date {\r
-        font-family: "Omnes-ECOMP-W02", Arial;\r
-        color: #5A5A5A; }\r
-    .datepicker td.disabled .show-date {\r
-      font-family: "Omnes-ECOMP-W02", Arial;\r
-      color: #5A5A5A; }\r
-  .datepicker td.today {\r
-    color: #FFFFFF;\r
-    background-color: #0568ae; }\r
-    .datepicker td.today:hover {\r
-      color: #FFFFFF;\r
-      background-color: #0568ae;\r
-      color: #FFFFFF;\r
-      background-color: #0568ae; }\r
-    .datepicker td.today:active {\r
-      color: #FFFFFF;\r
-      background-color: #0568ae; }\r
-    .datepicker td.today:focus {\r
-      color: #FFFFFF;\r
-      background-color: #0568ae; }\r
-  .datepicker td.today.disabled {\r
-    color: #FFFFFF;\r
-    background-color: #0568ae; }\r
-  .datepicker td.today.active {\r
-    color: #FFFFFF;\r
-    background-color: #0568ae; }\r
-    .datepicker td.today.active:hover {\r
-      color: #FFFFFF; }\r
-  .datepicker td.selected {\r
-    color: #FFFFFF;\r
-    background-color: #959595; }\r
-    .datepicker td.selected:hover {\r
-      color: #FFFFFF;\r
-      background-color: #959595; }\r
-  .datepicker td.selected.disabled {\r
-    color: #FFFFFF;\r
-    background-color: #959595; }\r
-  .datepicker td.active:not(.new) {\r
-    color: #FFFFFF;\r
-    border-color: #357ebd; }\r
-    .datepicker td.active:not(.new) .show-date {\r
-      color: #0568ae;\r
-      font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-  .datepicker td.active:hover:not(.new) {\r
-    color: #FFFFFF;\r
-    border-color: #357ebd; }\r
-    .datepicker td.active:hover:not(.new) .show-date {\r
-      color: #0568ae;\r
-      font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-  .datepicker .start-date .show-date {\r
-    background-color: #0568ae;\r
-    color: #FFFFFF !important;\r
-    border-radius: 5px 0 0 5px;\r
-    z-index: 1; }\r
-    .datepicker .start-date .show-date:before {\r
-      background-color: #0568ae;\r
-      content: "";\r
-      display: block;\r
-      height: 26px;\r
-      left: 20px;\r
-      position: absolute;\r
-      width: 100%;\r
-      z-index: -1; }\r
-  .datepicker .between-date .show-date {\r
-    background-color: #0568ae;\r
-    color: #FFFFFF !important; }\r
-    .datepicker .between-date .show-date:before {\r
-      background-color: #0568ae;\r
-      content: "";\r
-      display: block;\r
-      height: 26px;\r
-      left: 0;\r
-      position: absolute;\r
-      width: 100%;\r
-      z-index: -1; }\r
-  .datepicker .between-date:first-child .show-date:before {\r
-    background-color: #FFFFFF;\r
-    content: "";\r
-    height: 26px;\r
-    position: absolute;\r
-    left: 0;\r
-    width: 8px; }\r
-  .datepicker .end-date .show-date {\r
-    background-color: #0568ae;\r
-    color: #FFFFFF !important;\r
-    border-radius: 0 5px 5px 0; }\r
-    .datepicker .end-date .show-date:before {\r
-      background-color: #0568ae;\r
-      content: "";\r
-      display: block;\r
-      height: 26px;\r
-      left: -20px;\r
-      position: absolute;\r
-      width: 100%;\r
-      z-index: -1; }\r
-  .datepicker .end-date:first-child .show-date:after {\r
-    background-color: #FFFFFF;\r
-    content: "";\r
-    height: 26px;\r
-    position: absolute;\r
-    left: 0;\r
-    width: 8px; }\r
-  .datepicker .end-date:first-child .show-date::before {\r
-    background-color: #FFFFFF; }\r
-  .datepicker tr td.start-date:last-child .show-date:after {\r
-    background-color: #FFFFFF;\r
-    content: "";\r
-    height: 26px;\r
-    position: absolute;\r
-    right: 0;\r
-    width: 8px; }\r
-  .datepicker tr td.start-date:last-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker tr td.start-date:first-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker tr td.between-date:last-child .show-date:after {\r
-    background-color: #FFFFFF;\r
-    content: "";\r
-    height: 26px;\r
-    position: absolute;\r
-    right: 0;\r
-    width: 8px; }\r
-  .datepicker tr td.between-date:last-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker tr td.between-date:first-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker tr td.end-date:last-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker tr td.end-date:first-child:focus .show-date:after {\r
-    height: 30px;\r
-    width: 30px;\r
-    background-color: transparent; }\r
-  .datepicker th.datepicker-switch {\r
-    width: 198px;\r
-    font-size: 20px;\r
-    font-weight: normal;\r
-    cursor: default !important; }\r
-  .datepicker thead tr:first-child th {\r
-    cursor: pointer;\r
-    height: 60px;\r
-    line-height: 60px; }\r
-  .datepicker thead tr:first-child th.cw {\r
-    cursor: default;\r
-    background-color: transparent; }\r
-  .datepicker tfoot tr th {\r
-    cursor: pointer;\r
-    height: 60px;\r
-    line-height: 60px;\r
-    height: auto;\r
-    line-height: normal; }\r
-    .datepicker tfoot tr th li {\r
-      margin-bottom: 5px; }\r
-  .datepicker .prev {\r
-    color: transparent;\r
-    font-size: 0;\r
-    margin: 0 -1px -1px 0;\r
-    width: 46px; }\r
-    .datepicker .prev i {\r
-      color: #0568ae;\r
-      position: absolute;\r
-      font-size: 27px;\r
-      margin: 0;\r
-      top: 15px;\r
-      left: 8px; }\r
-  .datepicker .next {\r
-    color: transparent;\r
-    font-size: 0;\r
-    margin: 0 -1px -1px 0;\r
-    width: 46px; }\r
-    .datepicker .next i {\r
-      color: #0568ae;\r
-      position: absolute;\r
-      font-size: 27px;\r
-      margin: 0;\r
-      top: 15px;\r
-      right: 8px; }\r
-  .datepicker .cw {\r
-    font-size: 10px;\r
-    width: 12px;\r
-    padding: 0 2px 0 5px;\r
-    vertical-align: middle; }\r
-  .datepicker .due-date .show-date {\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    background-color: #cf2a2a;\r
-    border-radius: 5px;\r
-    color: #FFFFFF !important; }\r
-  .datepicker .day.active .show-date:after {\r
-    border: 2px solid #0568ae;\r
-    border-radius: 7px;\r
-    content: "";\r
-    display: block;\r
-    height: 30px;\r
-    left: 4px;\r
-    position: absolute;\r
-    top: 0;\r
-    width: 30px; }\r
-  .datepicker .day:focus .show-date:after {\r
-    border: 2px solid #0568ae;\r
-    border-radius: 7px;\r
-    content: "";\r
-    display: block;\r
-    height: 30px;\r
-    left: 4px;\r
-    position: absolute;\r
-    top: 0;\r
-    width: 30px;\r
-    height: 30px;\r
-    left: 4px;\r
-    top: 0;\r
-    width: 30px; }\r
-  .datepicker .due-date.disabled .show-date:after {\r
-    border: 2px solid #0568ae;\r
-    border-radius: 7px;\r
-    content: "";\r
-    display: block;\r
-    height: 30px;\r
-    left: 4px;\r
-    position: absolute;\r
-    top: 0;\r
-    width: 30px; }\r
-  .datepicker .day.due-date:focus .show-date:after {\r
-    height: 30px;\r
-    left: 4px;\r
-    top: 0;\r
-    width: 30px; }\r
-  .datepicker .due-date.old:after {\r
-    visibility: hidden; }\r
-  .datepicker .due-date.new:after {\r
-    visibility: hidden; }\r
-  .datepicker .due-date.active:after {\r
-    border-color: #FFFFFF; }\r
-  .datepicker .due-date.active.focused {\r
-    color: #0568ae !important; }\r
-    .datepicker .due-date.active.focused:after {\r
-      border-color: #cf2a2a !important; }\r
-  .datepicker .dow {\r
-    height: 24px;\r
-    width: 42px;\r
-    font-weight: normal;\r
-    position: relative;\r
-    overflow: hidden;\r
-    color: transparent;\r
-    letter-spacing: -6px;\r
-    margin: 0 -1px -1px 0; }\r
-    .datepicker .dow span[aria-hidden="true"] {\r
-      bottom: 0;\r
-      color: #5A5A5A;\r
-      display: block;\r
-      left: 1px;\r
-      letter-spacing: 0;\r
-      line-height: .9;\r
-      margin: 0 auto;\r
-      padding: 0;\r
-      position: relative;\r
-      width: 22px; }\r
-  .datepicker .calendar-legend {\r
-    margin-top: 3px;\r
-    margin-bottom: 20px; }\r
-    .datepicker .calendar-legend li {\r
-      font-size: 1.4rem;\r
-      font-weight: normal;\r
-      margin-bottom: 5px;\r
-      padding-left: 10px;\r
-      padding-top: 5px;\r
-      position: relative; }\r
-  .datepicker i.legend-due-date {\r
-    background-color: #cf2a2a;\r
-    border-radius: 5px;\r
-    height: 18px;\r
-    width: 18px;\r
-    margin-right: 8px;\r
-    vertical-align: middle;\r
-    display: inline-block; }\r
-  .datepicker i.legend-selected-date {\r
-    background-color: #FFFFFF;\r
-    border: 2px solid #0568ae;\r
-    border-radius: 5px;\r
-    height: 18px;\r
-    width: 18px;\r
-    margin-right: 8px;\r
-    vertical-align: middle;\r
-    display: inline-block; }\r
-  .datepicker i.legend-selectedisdue {\r
-    background-color: #FFFFFF;\r
-    border: 2px solid #0568ae;\r
-    border-radius: 5px;\r
-    display: inline-block;\r
-    height: 18px;\r
-    margin-right: 8px;\r
-    position: relative;\r
-    vertical-align: middle;\r
-    width: 18px; }\r
-    .datepicker i.legend-selectedisdue:after {\r
-      background-color: #cf2a2a;\r
-      border-radius: 3px;\r
-      content: "";\r
-      display: block;\r
-      height: 10px;\r
-      left: 2px;\r
-      position: absolute;\r
-      top: 2px;\r
-      width: 10px; }\r
-  .datepicker .text-left {\r
-    width: 100%; }\r
-  .datepicker .active.old {\r
-    background-color: #ededed !important;\r
-    color: #ededed !important; }\r
-\r
-.datepicker-inline {\r
-  width: 220px; }\r
-\r
-.datepicker.datepicker-rtl {\r
-  direction: rtl; }\r
-  .datepicker.datepicker-rtl td span {\r
-    float: right; }\r
-\r
-.datepicker-dropdown {\r
-  top: 0;\r
-  left: 0; }\r
-  .datepicker-dropdown:before {\r
-    content: " ";\r
-    display: inline-block;\r
-    border-left: 10px solid transparent;\r
-    border-right: 10px solid transparent;\r
-    border-bottom: 10px solid #d2d2d2;\r
-    border-top: 0;\r
-    border-bottom-color: rgba(0, 0, 0, 0.2);\r
-    position: absolute; }\r
-  .datepicker-dropdown:after {\r
-    content: " ";\r
-    display: inline-block;\r
-    border-left: 10px solid transparent;\r
-    border-right: 10px solid transparent;\r
-    border-bottom: 10px solid #fff;\r
-    border-top: 0;\r
-    position: absolute; }\r
-\r
-.datepicker-dropdown.datepicker-orient-left:before {\r
-  left: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-left:after {\r
-  left: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-right:before {\r
-  right: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-right:after {\r
-  right: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-top:before {\r
-  top: -10px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-top:after {\r
-  top: -9px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-bottom:before {\r
-  bottom: -7px;\r
-  border-bottom: 0;\r
-  border-top: 7px solid #959595; }\r
-\r
-.datepicker-dropdown.datepicker-orient-bottom:after {\r
-  bottom: -6px;\r
-  border-bottom: 0;\r
-  border-top: 6px solid #fff; }\r
-\r
-.datepicker.days div.datepicker-days {\r
-  display: block; }\r
-\r
-.datepicker.months div.datepicker-months {\r
-  display: block; }\r
-\r
-.datepicker.years div.datepicker-years {\r
-  display: block; }\r
-\r
-.show-date {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #0568ae;\r
-  height: 26px;\r
-  line-height: 26px;\r
-  margin: 4px auto 0;\r
-  width: 26px; }\r
-\r
-.input-group.date .input-group-addon i {\r
-  cursor: pointer;\r
-  width: 16px;\r
-  height: 16px; }\r
-\r
-.datepicker.dropdown-menu {\r
-  box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);\r
-  position: absolute;\r
-  top: 100%;\r
-  left: 0;\r
-  float: left;\r
-  display: none;\r
-  margin-top: 13px;\r
-  width: 290px;\r
-  list-style: none;\r
-  background-color: #FFFFFF;\r
-  border: 1px solid #d2d2d2;\r
-  border: 1px solid rgba(0, 0, 0, 0.2);\r
-  border-radius: 5px;\r
-  color: #333333;\r
-  font-size: 13px;\r
-  line-height: 1.428571429;\r
-  z-index: 1050; }\r
-  .datepicker.dropdown-menu th {\r
-    display: block;\r
-    float: left;\r
-    padding: 0;\r
-    position: relative; }\r
-  .datepicker.dropdown-menu td {\r
-    display: block;\r
-    float: left;\r
-    padding: 0;\r
-    position: relative; }\r
-\r
-.s {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: -62px 0; }\r
-\r
-.m {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: -5px 0; }\r
-\r
-.t {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: -19px 0; }\r
-\r
-.w {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: -34px 0; }\r
-\r
-.f {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: -49px 0; }\r
-\r
-.d {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: 0 0; }\r
-\r
-.l {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: 0 0; }\r
-\r
-.v {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: 0 0; }\r
-\r
-.j {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: #FFFFFF;\r
-  background-repeat: no-repeat;\r
-  background-position: 0 0; }\r
-\r
-.b2b-coachmark-label {\r
-  z-index: 1060;\r
-  opacity: 1;\r
-  cursor: not-allowed;\r
-  position: relative; }\r
-\r
-.b2b-coachmark-highlight {\r
-  border: 1px solid #d3d3d3;\r
-  cursor: default;\r
-  z-index: 1045;\r
-  opacity: 1;\r
-  background-color: #ffffff;\r
-  border-radius: 10px;\r
-  position: relative;\r
-  box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);\r
-  padding: 10px;\r
-  position: absolute; }\r
-\r
-.b2b-coachmark-highlight-mask {\r
-  z-index: 1100;\r
-  opacity: .1; }\r
-\r
-.b2b-coachmark-container {\r
-  border: 1px solid #cccccc;\r
-  width: 316px;\r
-  pointer-events: auto;\r
-  -webkit-box-sizing: border-box;\r
-  -moz-box-sizing: border-box;\r
-  box-sizing: border-box;\r
-  font-size: 16px;\r
-  -webkit-transition: opacity .2s ease-out;\r
-  -moz-transition: opacity .2s ease-out;\r
-  transition: opacity .2s ease-out;\r
-  background: #fff;\r
-  border-radius: 20px;\r
-  box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.15);\r
-  color: #333;\r
-  line-height: 20px;\r
-  position: absolute;\r
-  top: 50px;\r
-  left: -97px;\r
-  display: block;\r
-  background-color: #ffffff;\r
-  z-index: 1050;\r
-  opacity: 1; }\r
-  .b2b-coachmark-container i.b2b-coachmark-caret {\r
-    position: absolute;\r
-    top: -12px;\r
-    left: 47%;\r
-    opacity: 1;\r
-    z-index: 1050; }\r
-  .b2b-coachmark-container i.b2b-coachmark-caret:before {\r
-    content: "";\r
-    border-left: 12px solid transparent;\r
-    border-right: 12px solid transparent;\r
-    border-bottom: 12px solid #d3d3d3;\r
-    position: absolute;\r
-    top: -1px; }\r
-  .b2b-coachmark-container i.b2b-coachmark-caret:after {\r
-    content: "";\r
-    border-left: 12px solid transparent;\r
-    border-right: 12px solid transparent;\r
-    border-bottom: 12px solid #fff;\r
-    position: absolute; }\r
-  .b2b-coachmark-container .b2b-coachmark-header {\r
-    position: relative;\r
-    height: 47px;\r
-    overflow: hidden; }\r
-    .b2b-coachmark-container .b2b-coachmark-header .corner-button {\r
-      box-shadow: 0 -24px 0 0 #f2f2f2 inset;\r
-      height: 69px;\r
-      position: absolute;\r
-      right: -33px;\r
-      top: -38px;\r
-      transform: rotate(45deg);\r
-      width: 69px; }\r
-  .b2b-coachmark-container .b2b-coachmark-countlabel {\r
-    font-size: 12px;\r
-    font-family: "Omnes-ECOMP-W02, Arial";\r
-    color: #333333;\r
-    margin-left: 20px;\r
-    margin-top: 20px; }\r
-  .b2b-coachmark-container .b2b-coachmark-content {\r
-    padding: 0px 20px 20px 20px;\r
-    float: left; }\r
-    .b2b-coachmark-container .b2b-coachmark-content .icon-misc-dimmer {\r
-      font-size: 32px;\r
-      float: left;\r
-      margin-right: 10px;\r
-      width: 32px; }\r
-    .b2b-coachmark-container .b2b-coachmark-content .offscreen-text {\r
-      position: absolute;\r
-      left: -10000px;\r
-      top: auto;\r
-      width: 1px;\r
-      height: 1px;\r
-      overflow: hidden; }\r
-    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-content-header {\r
-      font-size: 16px;\r
-      color: #333333;\r
-      line-height: 18px;\r
-      float: left;\r
-      width: 220px; }\r
-    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-description {\r
-      font-size: 14px;\r
-      line-height: 18px;\r
-      color: #333333;\r
-      width: 100%;\r
-      float: left;\r
-      margin-top: 15px; }\r
-    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group {\r
-      margin-top: 20px;\r
-      float: left;\r
-      text-align: right;\r
-      width: 100%; }\r
-      .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group .b2b-coachmark-link {\r
-        font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-        font-size: 15px;\r
-        color: #0574ac;\r
-        line-height: 18px;\r
-        margin-right: 20px; }\r
-      .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group button {\r
-        font-size: 15px;\r
-        margin: 0px; }\r
-\r
-.datepicker {\r
-  background-color: #fff;\r
-  padding: 0;\r
-  border-radius: 5px;\r
-  direction: ltr; }\r
-\r
-.datepicker-inline {\r
-  width: 220px; }\r
-\r
-.datepicker.datepicker-rtl {\r
-  direction: rtl; }\r
-\r
-.datepicker.datepicker-rtl td span {\r
-  float: right; }\r
-\r
-.datepicker-dropdown {\r
-  top: 0;\r
-  left: 0; }\r
-\r
-/* ARROW */\r
-.datepicker-dropdown:before {\r
-  content: " ";\r
-  display: inline-block;\r
-  border-left: 10px solid transparent;\r
-  border-right: 10px solid transparent;\r
-  border-bottom: 10px solid #d2d2d2;\r
-  border-top: 0;\r
-  border-bottom-color: rgba(0, 0, 0, 0.2);\r
-  position: absolute; }\r
-\r
-.datepicker-dropdown:after {\r
-  content: " ";\r
-  display: inline-block;\r
-  border-left: 10px solid transparent;\r
-  border-right: 10px solid transparent;\r
-  border-bottom: 10px solid #fff;\r
-  border-top: 0;\r
-  position: absolute; }\r
-\r
-.datepicker-dropdown.datepicker-orient-left:before,\r
-.datepicker-dropdown.datepicker-orient-left:after {\r
-  left: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-right:before,\r
-.datepicker-dropdown.datepicker-orient-right:after {\r
-  right: 16px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-top:before {\r
-  top: -10px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-top:after {\r
-  top: -9px; }\r
-\r
-.datepicker-dropdown.datepicker-orient-bottom:before {\r
-  bottom: -7px;\r
-  border-bottom: 0;\r
-  border-top: 7px solid #959595; }\r
-\r
-.datepicker-dropdown.datepicker-orient-bottom:after {\r
-  bottom: -6px;\r
-  border-bottom: 0;\r
-  border-top: 6px solid #fff; }\r
-\r
-.datepicker > div {\r
-  display: none; }\r
-\r
-.datepicker.days div.datepicker-days {\r
-  display: block; }\r
-\r
-.datepicker.months div.datepicker-months {\r
-  display: block; }\r
-\r
-.datepicker.years div.datepicker-years {\r
-  display: block; }\r
-\r
-.datepicker table {\r
-  -webkit-touch-callout: none;\r
-  -webkit-user-select: none;\r
-  -khtml-user-select: none;\r
-  -moz-user-select: none;\r
-  -ms-user-select: none;\r
-  user-select: none;\r
-  margin: 0 0 0 0; }\r
-\r
-.datepicker td,\r
-.datepicker th {\r
-  text-align: center;\r
-  display: block;\r
-  width: 30px;\r
-  height: 30px;\r
-  border: none; }\r
-\r
-.datepicker tbody :focus {\r
-  outline: none; }\r
-\r
-.datepicker td.day {\r
-  background-color: transparent;\r
-  color: #0568ae;\r
-  cursor: pointer;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 16px;\r
-  height: 34px;\r
-  line-height: 30rem;\r
-  margin: -2px -1px 0 0;\r
-  overflow: hidden;\r
-  text-align: center;\r
-  width: 42px; }\r
-\r
-.datepicker :focus {\r
-  outline: 1px dotted #000;\r
-  outline-offset: -2px; }\r
-\r
-.datepicker td.day.focused {\r
-  background: #ededed;\r
-  cursor: pointer; }\r
-\r
-.datepicker td.day.focused.active {\r
-  background-color: #ededed;\r
-  color: #0568ae; }\r
-\r
-.datepicker td.disabled,\r
-.datepicker td.disabled:hover {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  color: #5a5a5a;\r
-  cursor: default; }\r
-\r
-.datepicker td.today,\r
-.datepicker td.today:hover,\r
-.datepicker td.today.disabled {\r
-  color: #fff;\r
-  background-color: #0568ae; }\r
-\r
-.datepicker td.today.active,\r
-.datepicker td.today:active,\r
-.datepicker td.today:hover,\r
-.datepicker td.today:focus {\r
-  color: #fff;\r
-  background-color: #0568ae; }\r
-\r
-.datepicker td.today.active:hover {\r
-  color: #fff; }\r
-\r
-.datepicker td.selected,\r
-.datepicker td.selected:hover,\r
-.datepicker td.selected.disabled {\r
-  color: #ffffff;\r
-  background-color: #959595; }\r
-\r
-.datepicker td.active:not(.new),\r
-.datepicker td.active:hover:not(.new) {\r
-  color: #ffffff;\r
-  border-color: #357ebd; }\r
-\r
-.show-date {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #0568ae;\r
-  height: 26px;\r
-  line-height: 26px;\r
-  margin: 4px auto 0;\r
-  width: 26px; }\r
-\r
-.datepicker .start-date .show-date,\r
-.datepicker .between-date .show-date,\r
-.datepicker .end-date .show-date {\r
-  background-color: #0568ae;\r
-  color: #fff !important; }\r
-\r
-.datepicker .start-date .show-date {\r
-  border-radius: 5px 0 0 5px;\r
-  z-index: 1; }\r
-\r
-.datepicker .start-date .show-date:before {\r
-  background-color: #0568ae;\r
-  content: "";\r
-  display: block;\r
-  height: 26px;\r
-  left: 20px;\r
-  position: absolute;\r
-  width: 100%;\r
-  z-index: -1; }\r
-\r
-.datepicker .between-date .show-date:before {\r
-  background-color: #0568ae;\r
-  content: "";\r
-  display: block;\r
-  height: 26px;\r
-  left: 0;\r
-  position: absolute;\r
-  width: 100%;\r
-  z-index: -1; }\r
-\r
-.datepicker .end-date .show-date {\r
-  border-radius: 0 5px 5px 0; }\r
-\r
-.datepicker .end-date .show-date:before {\r
-  background-color: #0568ae;\r
-  content: "";\r
-  display: block;\r
-  height: 26px;\r
-  left: -20px;\r
-  position: absolute;\r
-  width: 100%;\r
-  z-index: -1; }\r
-\r
-.datepicker .between-date:first-child .show-date:before {\r
-  background-color: #fff;\r
-  content: "";\r
-  height: 26px;\r
-  position: absolute;\r
-  left: 0;\r
-  width: 8px; }\r
-\r
-.datepicker .end-date:first-child .show-date:after {\r
-  background-color: #fff;\r
-  content: "";\r
-  height: 26px;\r
-  position: absolute;\r
-  left: 0;\r
-  width: 8px; }\r
-\r
-.datepicker .end-date:first-child .show-date::before {\r
-  background-color: #fff; }\r
-\r
-.datepicker tr td.start-date:last-child .show-date:after,\r
-.datepicker tr td.between-date:last-child .show-date:after {\r
-  background-color: #fff;\r
-  content: "";\r
-  height: 26px;\r
-  position: absolute;\r
-  right: 0;\r
-  width: 8px; }\r
-\r
-.datepicker tr td.start-date:last-child:focus .show-date:after,\r
-.datepicker tr td.end-date:last-child:focus .show-date:after,\r
-.datepicker tr td.between-date:last-child:focus .show-date:after,\r
-.datepicker tr td.start-date:first-child:focus .show-date:after,\r
-.datepicker tr td.end-date:first-child:focus .show-date:after,\r
-.datepicker tr td.between-date:first-child:focus .show-date:after {\r
-  height: 30px;\r
-  width: 30px;\r
-  background-color: transparent; }\r
-\r
-.datepicker td.active:not(.new) .show-date,\r
-.datepicker td.active:hover:not(.new) .show-date {\r
-  color: #0568ae;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.datepicker td.disabled .show-date,\r
-.datepicker td.disabled:hover .show-date {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  color: #5a5a5a; }\r
-\r
-.datepicker td span {\r
-  display: block;\r
-  width: 23%;\r
-  height: 54px;\r
-  line-height: 54px;\r
-  float: left;\r
-  margin: 1%;\r
-  cursor: pointer;\r
-  border-radius: 4px; }\r
-\r
-.datepicker td span:hover {\r
-  background: #eeeeee; }\r
-\r
-.datepicker td span.disabled,\r
-.datepicker td span.disabled:hover {\r
-  background: none;\r
-  color: #5a5a5a;\r
-  cursor: default; }\r
-\r
-.datepicker td span.active,\r
-.datepicker td span.active:hover,\r
-.datepicker td span.active.disabled {\r
-  color: #ffffff;\r
-  background-color: #0568ae;\r
-  border-color: #357ebd; }\r
-\r
-.datepicker th.datepicker-switch {\r
-  width: 198px;\r
-  font-size: 20px;\r
-  font-weight: normal;\r
-  cursor: default !important; }\r
-\r
-.datepicker thead tr:first-child th,\r
-.datepicker tfoot tr th {\r
-  cursor: pointer;\r
-  height: 60px;\r
-  line-height: 60px; }\r
-\r
-.datepicker tfoot tr th {\r
-  height: auto;\r
-  line-height: normal; }\r
-\r
-.datepicker tfoot tr th li {\r
-  margin-bottom: 5px; }\r
-\r
-.datepicker .prev,\r
-.datepicker .next {\r
-  color: transparent;\r
-  font-size: 0;\r
-  margin: 0 -1px -1px 0;\r
-  width: 46px; }\r
-\r
-.datepicker .prev i,\r
-.datepicker .next i {\r
-  color: #0568ae;\r
-  position: absolute;\r
-  font-size: 27px;\r
-  margin: 0;\r
-  top: 15px; }\r
-\r
-.datepicker .prev i {\r
-  left: 8px; }\r
-\r
-.datepicker .next i {\r
-  right: 8px; }\r
-\r
-.datepicker .cw {\r
-  font-size: 10px;\r
-  width: 12px;\r
-  padding: 0 2px 0 5px;\r
-  vertical-align: middle; }\r
-\r
-.datepicker thead tr:first-child th.cw {\r
-  cursor: default;\r
-  background-color: transparent; }\r
-\r
-.input-group.date .input-group-addon i {\r
-  cursor: pointer;\r
-  width: 16px;\r
-  height: 16px; }\r
-\r
-.datepicker.dropdown-menu {\r
-  box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);\r
-  position: absolute;\r
-  top: 100%;\r
-  left: 0;\r
-  float: left;\r
-  display: none;\r
-  margin-top: 13px;\r
-  width: 290px;\r
-  list-style: none;\r
-  background-color: #ffffff;\r
-  border: 1px solid #d2d2d2;\r
-  border: 1px solid rgba(0, 0, 0, 0.2);\r
-  border-radius: 5px;\r
-  color: #333333;\r
-  font-size: 13px;\r
-  line-height: 1.428571429;\r
-  z-index: 1050; }\r
-\r
-.datepicker.dropdown-menu th,\r
-.datepicker.dropdown-menu td {\r
-  display: block;\r
-  float: left;\r
-  padding: 0;\r
-  position: relative; }\r
-\r
-.datepicker .due-date .show-date {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  background-color: #cf2a2a;\r
-  border-radius: 5px;\r
-  color: #fff !important; }\r
-\r
-.datepicker .day.active .show-date:after,\r
-.datepicker .day:focus .show-date:after,\r
-.datepicker .due-date.disabled .show-date:after {\r
-  border: 2px solid #0568ae;\r
-  border-radius: 7px;\r
-  content: "";\r
-  display: block;\r
-  height: 30px;\r
-  left: 4px;\r
-  position: absolute;\r
-  top: 0;\r
-  width: 30px; }\r
-\r
-.datepicker .day:focus .show-date:after {\r
-  height: 30px;\r
-  left: 4px;\r
-  top: 0;\r
-  width: 30px; }\r
-\r
-.datepicker .day.due-date:focus .show-date:after {\r
-  height: 30px;\r
-  left: 4px;\r
-  top: 0;\r
-  width: 30px; }\r
-\r
-.datepicker .due-date.old:after,\r
-.datepicker .due-date.new:after {\r
-  visibility: hidden; }\r
-\r
-.datepicker .due-date.active:after {\r
-  border-color: #fff; }\r
-\r
-.datepicker .due-date.active.focused {\r
-  color: #0568ae !important; }\r
-\r
-.datepicker .due-date.active.focused:after {\r
-  border-color: #cf2a2a !important; }\r
-\r
-.datepicker .dow {\r
-  height: 24px;\r
-  width: 42px;\r
-  font-weight: normal;\r
-  position: relative;\r
-  overflow: hidden;\r
-  color: transparent;\r
-  letter-spacing: -6px;\r
-  margin: 0 -1px -1px 0; }\r
-\r
-.datepicker .dow span[aria-hidden="true"] {\r
-  bottom: 0;\r
-  color: #5a5a5a;\r
-  display: block;\r
-  left: 1px;\r
-  letter-spacing: 0;\r
-  line-height: .9;\r
-  margin: 0 auto;\r
-  padding: 0;\r
-  position: relative;\r
-  width: 22px; }\r
-\r
-.datepicker .calendar-legend {\r
-  margin-top: 3px;\r
-  margin-bottom: 20px; }\r
-\r
-.datepicker .calendar-legend li {\r
-  font-size: 1.4rem;\r
-  font-weight: normal;\r
-  margin-bottom: 5px;\r
-  padding-left: 10px;\r
-  padding-top: 5px;\r
-  position: relative; }\r
-\r
-.datepicker i.legend-due-date {\r
-  background-color: #cf2a2a;\r
-  border-radius: 5px;\r
-  height: 18px;\r
-  width: 18px;\r
-  margin-right: 8px;\r
-  vertical-align: middle;\r
-  display: inline-block; }\r
-\r
-.datepicker i.legend-selected-date {\r
-  background-color: #fff;\r
-  border: 2px solid #0568ae;\r
-  border-radius: 5px;\r
-  height: 18px;\r
-  width: 18px;\r
-  margin-right: 8px;\r
-  vertical-align: middle;\r
-  display: inline-block; }\r
-\r
-.datepicker i.legend-selectedisdue {\r
-  background-color: #fff;\r
-  border: 2px solid #0568ae;\r
-  border-radius: 5px;\r
-  display: inline-block;\r
-  height: 18px;\r
-  margin-right: 8px;\r
-  position: relative;\r
-  vertical-align: middle;\r
-  width: 18px; }\r
-\r
-.datepicker i.legend-selectedisdue:after {\r
-  background-color: #cf2a2a;\r
-  border-radius: 3px;\r
-  content: "";\r
-  display: block;\r
-  height: 10px;\r
-  left: 2px;\r
-  position: absolute;\r
-  top: 2px;\r
-  width: 10px; }\r
-\r
-.datepicker .text-left {\r
-  width: 100%; }\r
-\r
-.datepicker .active.old {\r
-  background-color: #ededed !important;\r
-  color: #ededed !important; }\r
-\r
-.s,\r
-.m,\r
-.t,\r
-.w,\r
-.f,\r
-.d,\r
-.l,\r
-.v,\r
-.j {\r
-  display: block;\r
-  height: 20px;\r
-  width: 12px;\r
-  margin: 0 auto;\r
-  background-color: white;\r
-  background-repeat: no-repeat; }\r
-\r
-.s {\r
-  background-position: -62px 0; }\r
-\r
-.m {\r
-  background-position: -5px 0; }\r
-\r
-.t {\r
-  background-position: -19px 0; }\r
-\r
-.w {\r
-  background-position: -34px 0; }\r
-\r
-.f {\r
-  background-position: -49px 0; }\r
-\r
-/* spanish */\r
-.d {\r
-  background-position: 0 0; }\r
-\r
-.l {\r
-  background-position: 0 0; }\r
-\r
-.v {\r
-  background-position: 0 0; }\r
-\r
-.j {\r
-  background-position: 0 0; }\r
-\r
-/* remove focus outline when dropdown is opened */\r
-/*resolve blue focus outline over dropdown with error*/\r
-select {\r
-  margin-right: -1;\r
-  max-width: 100%;\r
-  height: 36px;\r
-  line-height: 25px;\r
-  width: auto;\r
-  background-color: #FFFFFF; }\r
-\r
-.selectWrap.disabled .icon-primary-down {\r
-  color: #767676; }\r
-\r
-.selectWrap.disabled input.awd-select {\r
-  z-index: 0;\r
-  padding: 10px 45px 10px 15px;\r
-  text-indent: 0; }\r
-\r
-.selectWrap.disabled button.awd-select {\r
-  z-index: 0;\r
-  text-indent: 15; }\r
-\r
-.selectWrap.disabled:after {\r
-  color: #5A5A5A;\r
-  cursor: not-allowed; }\r
-\r
-input.awd-select {\r
-  background-color: transparent;\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 6px;\r
-  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);\r
-  color: #333333;\r
-  display: block;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  /*font-size: 1.6rem;*/\r
-  height: 36px;\r
-  line-height: 0;\r
-  margin-bottom: 0;\r
-  padding: 12px 45px 8px 0;\r
-  position: relative;\r
-  text-align: left;\r
-  top: 0;\r
-  width: 100%;\r
-  z-index: 10;\r
-  padding: 12px 45px 8px 15px;\r
-  user-select: none; }\r
-  input.awd-select:focus {\r
-    border-color: #0568ae !important; }\r
-\r
-button.awd-select {\r
-  background-color: transparent;\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 6px;\r
-  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);\r
-  color: #333333;\r
-  display: block;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  /*font-size: 1.6rem;*/\r
-  height: 36px;\r
-  line-height: 36px;\r
-  margin-bottom: 0;\r
-  /*padding-right: 41px;*/\r
-  position: relative;\r
-  text-align: left;\r
-  top: 0;\r
-  width: 100%;\r
-  z-index: 10; }\r
-  button.awd-select:not(.large) {\r
-    text-indent: 15px;\r
-    white-space: nowrap;\r
-    overflow: hidden;\r
-    text-overflow: clip;\r
-    text-overflow: ellipsis; }\r
-  button.awd-select img {\r
-    height: 26px;\r
-    margin-right: 7px;\r
-    margin-top: -10px;\r
-    position: relative;\r
-    top: 2px;\r
-    vertical-align: text-bottom; }\r
-  button.awd-select:focus {\r
-    border-color: #0568ae !important; }\r
-  button.awd-select i {\r
-    font-size: 23px;\r
-    position: absolute;\r
-    right: 33px;\r
-    top: 5px;\r
-    z-index: 1000; }\r
-\r
-button.awd-select.large {\r
-  align-items: center;\r
-  display: flex;\r
-  height: 60px;\r
-  line-height: 20px;\r
-  overflow: hidden;\r
-  padding-left: 70px;\r
-  vertical-align: middle; }\r
-  button.awd-select.large img {\r
-    height: 40px;\r
-    left: 20px;\r
-    position: absolute;\r
-    top: 20px;\r
-    width: 40px; }\r
-\r
-.selectWrap.large {\r
-  height: 60px; }\r
-  .selectWrap.large .awd-select-list-item {\r
-    align-items: center;\r
-    display: flex;\r
-    height: 60px;\r
-    line-height: 20px;\r
-    overflow: hidden;\r
-    padding-left: 70px;\r
-    vertical-align: middle; }\r
-    .selectWrap.large .awd-select-list-item img {\r
-      height: 40px;\r
-      left: 20px;\r
-      position: absolute;\r
-      top: 20px;\r
-      width: 40px;\r
-      top: 10px; }\r
-\r
-button.awd-select.active {\r
-  border-radius: 6px 6px 0 0; }\r
-  button.awd-select.active:focus {\r
-    border-color: #d2d2d2 !important; }\r
-\r
-input.awd-select.active {\r
-  border-radius: 6px 6px 0 0; }\r
-  input.awd-select.active:focus {\r
-    border-color: #d2d2d2 !important; }\r
-\r
-.selectWrapper {\r
-  position: relative; }\r
-\r
-span.selectWrap input[readonly]:focus {\r
-  color: transparent;\r
-  text-shadow: 0 0 0 #000; }\r
-\r
-.isIE.ds2-no-colors .awd-select:focus {\r
-  outline: 1px dashed transparent; }\r
-\r
-.awd-select-list {\r
-  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);\r
-  border-radius: 0 0 6px 6px;\r
-  position: absolute;\r
-  border: 1px solid #d2d2d2;\r
-  border-top: 0;\r
-  padding: 0;\r
-  background-color: #f2f2f2;\r
-  z-index: 1000;\r
-  width: 100%;\r
-  max-height: 320px;\r
-  overflow-y: auto; }\r
-\r
-.awd-select-list-item {\r
-  cursor: pointer;\r
-  height: 100%;\r
-  min-height: 36px;\r
-  line-height: 38px;\r
-  overflow: hidden;\r
-  padding: 0 15px;\r
-  position: relative;\r
-  text-overflow: ellipsis;\r
-  white-space: nowrap;\r
-  z-index: 1000; }\r
-  .awd-select-list-item:hover {\r
-    cursor: pointer;\r
-    background-color: #d2d2d2;\r
-    outline: 1px dashed transparent; }\r
-  .awd-select-list-item:focus {\r
-    cursor: pointer;\r
-    background-color: #d2d2d2;\r
-    outline: 1px dashed transparent; }\r
-  .awd-select-list-item img {\r
-    margin-top: 0;\r
-    margin-right: 7px;\r
-    height: 26px;\r
-    width: 26px; }\r
-\r
-.selectWrap {\r
-  border-radius: 6px;\r
-  position: relative;\r
-  height: 36px;\r
-  line-height: 28px;\r
-  display: block;\r
-  margin: 0;\r
-  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-  background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);\r
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }\r
-  .selectWrap:not(.large) .awd-select-list-item:first-child {\r
-    margin-top: 15px; }\r
-  .selectWrap:not(.large) .awd-select-list-item:last-child {\r
-    margin-bottom: 15px; }\r
-  .selectWrap .icon-primary-down {\r
-    font-size: 23px;\r
-    margin-top: -11px;\r
-    position: absolute;\r
-    right: 4px;\r
-    top: 50%; }\r
-  .selectWrap + [aria-expanded="true"] {\r
-    padding-bottom: 9px;\r
-    padding-top: 20px; }\r
-\r
-.awd-select-list-item[aria-selected="true"] {\r
-  background-color: #d2d2d2; }\r
-\r
-span input.awd-select {\r
-  width: 100%;\r
-  cursor: pointer;\r
-  text-overflow: ellipsis;\r
-  padding-right: 45px; }\r
-\r
-li.optgroup-wrapper {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  cursor: default !important;\r
-  padding: 0px 15px; }\r
-  li.optgroup-wrapper:first-child {\r
-    padding-top: 10px; }\r
-  li.optgroup-wrapper:hover {\r
-    background-color: #f2f2f2; }\r
-\r
-ul.optgroup {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  cursor: pointer !important;\r
-  margin: 0 -15px; }\r
-  ul.optgroup li {\r
-    padding: 0 0 0 33px; }\r
-\r
-label + .selectWrap {\r
-  margin-top: 4px; }\r
-\r
-.selectorModule {\r
-  border-radius: 6px;\r
-  position: relative;\r
-  height: 36px;\r
-  line-height: 28px;\r
-  display: block;\r
-  margin: 0;\r
-  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-  background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);\r
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }\r
-\r
-.group .selectWrap {\r
-  margin: 0 0 10px 0; }\r
-\r
-select.awd-select {\r
-  position: relative;\r
-  top: 0;\r
-  left: 0;\r
-  font-size: 16px;\r
-  z-index: 1010;\r
-  height: 33px;\r
-  min-width: 100%;\r
-  opacity: 0.01; }\r
-  select.awd-select > optgroup {\r
-    padding-left: 8px;\r
-    font-style: normal;\r
-    margin-top: 10px; }\r
-    select.awd-select > optgroup:first-child {\r
-      margin-top: 0; }\r
-    select.awd-select > optgroup > option {\r
-      padding-left: 8px; }\r
-  select.awd-select > option {\r
-    padding-left: 8px; }\r
-  select.awd-select + span {\r
-    background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-    background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);\r
-    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0);\r
-    position: absolute;\r
-    top: 0;\r
-    left: 0;\r
-    z-index: 0;\r
-    display: block;\r
-    border: 1px solid #d2d2d2;\r
-    border-radius: 6px;\r
-    height: 35px;\r
-    line-height: 0;\r
-    padding: 18px 45px 15px 15px;\r
-    width: 100%;\r
-    font-size: 1.6rem;\r
-    padding-right: 45px;\r
-    white-space: nowrap;\r
-    overflow: hidden;\r
-    text-overflow: ellipsis; }\r
-    select.awd-select + span > i {\r
-      font-size: 23px;\r
-      position: absolute;\r
-      right: 33px;\r
-      top: 5px;\r
-      z-index: 1000; }\r
-      select.awd-select + span > i:before {\r
-        left: 1px;\r
-        position: absolute;\r
-        top: -1px; }\r
-  select.awd-select:focus + span {\r
-    border-color: #0568ae; }\r
-\r
-.isIE select.awd-select + span {\r
-  line-height: 1; }\r
-\r
-[data-default-option="true"] {\r
-  color: #767676 !important;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial; }\r
-\r
-.placeholdercolor {\r
-  color: #767676 !important;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial; }\r
-\r
-.filterTank button.awd-select {\r
-  border-color: #d2d2d2;\r
-  background-color: #333333;\r
-  color: #FFFFFF;\r
-  color: #333333; }\r
-  .filterTank button.awd-select:after {\r
-    background-color: #FFFFFF !important;\r
-    border-color: #d2d2d2; }\r
-\r
-.utility-bg button.awd-select {\r
-  border-color: #d2d2d2;\r
-  background-color: #333333;\r
-  color: #FFFFFF;\r
-  color: #333333; }\r
-  .utility-bg button.awd-select:after {\r
-    background-color: #FFFFFF !important;\r
-    border-color: #d2d2d2; }\r
-\r
-.utility-bg select.awd-select + span {\r
-  border-color: #d2d2d2;\r
-  border-color: #d2d2d2;\r
-  background-color: #333333;\r
-  background-color: #333333;\r
-  color: #FFFFFF;\r
-  color: #FFFFFF; }\r
-  .utility-bg select.awd-select + span:after {\r
-    background-color: #FFFFFF !important;\r
-    background-color: #FFFFFF !important;\r
-    border-color: #d2d2d2;\r
-    border-color: #d2d2d2; }\r
-\r
-.utility-bg select.awd-select:focus + span {\r
-  border-color: #d2d2d2;\r
-  border-color: #d2d2d2;\r
-  background-color: #333333;\r
-  background-color: #333333;\r
-  color: #FFFFFF;\r
-  color: #FFFFFF; }\r
-  .utility-bg select.awd-select:focus + span:after {\r
-    background-color: #FFFFFF !important;\r
-    background-color: #FFFFFF !important;\r
-    border-color: #d2d2d2;\r
-    border-color: #d2d2d2; }\r
-\r
-.utility-bg select.awd-select:hover + span {\r
-  border-color: #d2d2d2;\r
-  border-color: #d2d2d2;\r
-  background-color: #333333;\r
-  background-color: #333333;\r
-  color: #FFFFFF;\r
-  color: #FFFFFF; }\r
-  .utility-bg select.awd-select:hover + span:after {\r
-    background-color: #FFFFFF !important;\r
-    background-color: #FFFFFF !important;\r
-    border-color: #d2d2d2;\r
-    border-color: #d2d2d2; }\r
-\r
-input.awd-select[disabled] {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  input.awd-select[disabled] + span {\r
-    cursor: not-allowed;\r
-    border-color: #d2d2d2;\r
-    background-color: #d2d2d2;\r
-    background-image: none;\r
-    color: #5A5A5A; }\r
-\r
-button.awd-select[disabled] {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  button.awd-select[disabled]:after {\r
-    background-color: #d2d2d2 !important;\r
-    border-color: #d2d2d2; }\r
-\r
-select.awd-select[disabled] + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  select.awd-select[disabled] + span:after {\r
-    background-color: #d2d2d2 !important;\r
-    border-color: #d2d2d2; }\r
-\r
-select.awd-select[disabled]:focus + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-\r
-select.awd-select[disabled]:hover + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-\r
-input.awd-select[disabled="disabled"] {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  input.awd-select[disabled="disabled"] + span {\r
-    cursor: not-allowed;\r
-    border-color: #d2d2d2;\r
-    background-color: #d2d2d2;\r
-    background-image: none;\r
-    color: #5A5A5A; }\r
-\r
-select.awd-select[disabled="disabled"] + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  select.awd-select[disabled="disabled"] + span:after {\r
-    background-color: #d2d2d2 !important;\r
-    border-color: #d2d2d2; }\r
-\r
-select.awd-select[disabled="disabled"]:focus + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  select.awd-select[disabled="disabled"]:focus + span:after {\r
-    background-color: #d2d2d2 !important;\r
-    border-color: #d2d2d2; }\r
-\r
-select.awd-select[disabled="disabled"]:hover + span {\r
-  cursor: not-allowed;\r
-  border-color: #d2d2d2;\r
-  background-color: #d2d2d2;\r
-  background-image: none;\r
-  color: #5A5A5A; }\r
-  select.awd-select[disabled="disabled"]:hover + span:after {\r
-    background-color: #d2d2d2 !important;\r
-    border-color: #d2d2d2; }\r
-\r
-.ddexpand-wrapper > h2 {\r
-  margin-bottom: 11px; }\r
-  .ddexpand-wrapper > h2 + p {\r
-    margin-bottom: 4px; }\r
-\r
-.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .form-row {\r
-  margin-top: 11px; }\r
-\r
-.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .row + .row .form-row {\r
-  margin-top: 14px; }\r
-\r
-.modal .awd-select-list {\r
-  z-index: 1060 !important; }\r
-\r
-.form-row.error button.awd-select.active:focus {\r
-  border-color: #cf2a2a !important; }\r
-\r
-.form-row.error input.awd-select.active:focus {\r
-  border-color: #cf2a2a !important; }\r
-\r
-.awd-module-list .module-list-item[aria-selected="true"] {\r
-  background-color: #f2f2f2; }\r
-\r
-li.module-list-item[aria-selected="true"]:before {\r
-  color: #0568ae;\r
-  display: inline-block;\r
-  font-family: "icoControls" !important;\r
-  font-style: normal;\r
-  font-size: 20px;\r
-  font-weight: normal;\r
-  font-variant: normal;\r
-  height: 1em;\r
-  margin-right: 7px;\r
-  text-transform: none;\r
-  line-height: 1;\r
-  -webkit-font-smoothing: antialiased;\r
-  -moz-osx-font-smoothing: grayscale;\r
-  position: relative;\r
-  speak: none;\r
-  -webkit-user-select: none;\r
-  -moz-user-select: none;\r
-  -ms-user-select: none;\r
-  user-select: none;\r
-  vertical-align: middle;\r
-  width: 1em;\r
-  content: "\e907";\r
-  box-sizing: border-box;\r
-  display: inline-block;\r
-  font-size: 2em;\r
-  height: 1em;\r
-  position: absolute;\r
-  top: 20px;\r
-  right: 0px;\r
-  vertical-align: middle;\r
-  width: 1em;\r
-  color: #007a3e; }\r
-\r
-@media (min-width: 768px) {\r
-  span[class*="large"] {\r
-    max-width: 370px; }\r
-  .large {\r
-    max-width: 370px; } }\r
-\r
-@media (max-width: 767px) {\r
-  .selectWrap.large:after {\r
-    right: 5px; }\r
-  .selectWrap.large .awd-select-list-item {\r
-    padding-right: 41px; }\r
-  .selectWrap + div > h4 {\r
-    margin-bottom: 0;\r
-    font-size: 16px; } }\r
-\r
-/**********************Dropdown Chrome scrolling fix start ********************/\r
-input.awd-select {\r
-  -webkit-user-select: text;\r
-  -moz-user-select: text;\r
-  -ms-user-select: text;\r
-  user-select: text; }\r
-\r
-input.awd-select.focused {\r
-  -webkit-user-select: none !important;\r
-  -moz-user-select: none !important;\r
-  -ms-user-select: none !important;\r
-  user-select: none !important; }\r
-\r
-/**********************Dropdown Chrome scrolling fix end ********************/\r
-.mpc-expanders {\r
-  border-bottom: 1px solid #e4e4e4;\r
-  border-top: 1px solid #e4e4e4; }\r
-\r
-.mpc-expanders + .mpc-expanders {\r
-  border-top: 0px; }\r
-\r
-.mpc-expanders .heading-medium {\r
-  margin-bottom: 10px; }\r
-\r
-.mpc-expanders .p-small {\r
-  margin-top: 5px; }\r
-\r
-.mpc-expander-body {\r
-  border-top: 1px solid #e4e4e4; }\r
-\r
-.mpc-expander-body .mpc-expanders {\r
-  border-bottom: 1px solid #e4e4e4;\r
-  border-top: 0; }\r
-\r
-.mpc-expander-body .mpc-expanders:last-child {\r
-  border-bottom: 0px; }\r
-\r
-.ddh-blue {\r
-  color: #0574ac; }\r
-\r
-.b2b-dragdrop {\r
-  border: 1px dashed #bbb;\r
-  border-radius: 5px;\r
-  padding: 0;\r
-  text-align: center;\r
-  color: #bbb;\r
-  position: relative; }\r
-\r
-.b2b-dragdrop-over {\r
-  background: #0091d9;\r
-  color: #006496; }\r
-  .b2b-dragdrop-over:after {\r
-    content: "Drop the file";\r
-    color: #fff;\r
-    width: 80px;\r
-    height: 20px;\r
-    overflow: hidden;\r
-    margin: auto;\r
-    position: absolute;\r
-    top: 0;\r
-    left: 0;\r
-    bottom: 0;\r
-    right: 0; }\r
-\r
-.b2b-file-container {\r
-  position: relative;\r
-  overflow: hidden;\r
-  display: inline-table;\r
-  font-weight: 400; }\r
-  .b2b-file-container [type=file] {\r
-    position: absolute;\r
-    cursor: inherit;\r
-    display: block;\r
-    font-size: 0;\r
-    opacity: 0;\r
-    height: 0;\r
-    width: 0;\r
-    left: 0;\r
-    top: 0;\r
-    -ms-filter: "alpha(Opacity=0)"; }\r
-\r
-.b2b-upload-link {\r
-  color: #0568ae; }\r
-\r
-.b2b-flyout {\r
-  position: relative;\r
-  display: inline-block;\r
-  cursor: default; }\r
-\r
-.b2b-flyout-icon {\r
-  cursor: pointer; }\r
-  .b2b-flyout-icon:focus {\r
-    outline: thin dotted #666;\r
-    outline-offset: -1px; }\r
-\r
-.b2b-flyout .b2b-flyout-container {\r
-  border: 1px solid #d3d3d3;\r
-  width: 300px;\r
-  padding: 20px;\r
-  pointer-events: auto;\r
-  -webkit-box-sizing: border-box;\r
-  -moz-box-sizing: border-box;\r
-  box-sizing: border-box;\r
-  font-size: 16px;\r
-  -webkit-transition: opacity .2s ease-out;\r
-  -moz-transition: opacity .2s ease-out;\r
-  transition: opacity .2s ease-out;\r
-  background: #fff;\r
-  border-radius: 6px;\r
-  box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);\r
-  color: #333;\r
-  line-height: 20px;\r
-  position: absolute;\r
-  top: 35px;\r
-  opacity: 0;\r
-  z-index: 1010;\r
-  display: none; }\r
-  .b2b-flyout .b2b-flyout-container.open-flyout {\r
-    opacity: 1;\r
-    display: block; }\r
-\r
-.b2b-flyout i.b2b-flyout-caret {\r
-  position: absolute;\r
-  top: -8px;\r
-  left: 50%;\r
-  opacity: 0;\r
-  z-index: 1011;\r
-  display: none; }\r
-  .b2b-flyout i.b2b-flyout-caret.open-flyout {\r
-    opacity: 1;\r
-    display: block; }\r
-  .b2b-flyout i.b2b-flyout-caret:before {\r
-    content: "";\r
-    border-left: 8px solid transparent;\r
-    border-right: 8px solid transparent;\r
-    border-bottom: 8px solid #d3d3d3;\r
-    position: absolute;\r
-    top: -1px; }\r
-  .b2b-flyout i.b2b-flyout-caret:after {\r
-    content: "";\r
-    border-left: 8px solid transparent;\r
-    border-right: 8px solid transparent;\r
-    border-bottom: 8px solid #fff;\r
-    position: absolute; }\r
-\r
-.b2b-flyout .b2b-flyout-container.b2b-flyout-left i.b2b-flyout-caret {\r
-  left: 16px !important; }\r
-\r
-.b2b-flyout .b2b-flyout-container.b2b-flyout-right i.b2b-flyout-caret {\r
-  left: inherit !important;\r
-  right: 30px !important; }\r
-\r
-.b2b-flyout .b2b-flyout-container.b2b-flyout-above {\r
-  box-shadow: 0 -5px 6px 0 rgba(0, 0, 0, 0.25); }\r
-  .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret {\r
-    top: auto;\r
-    bottom: 0px; }\r
-    .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:before {\r
-      top: auto;\r
-      bottom: -9px;\r
-      border-top: 8px solid #d3d3d3;\r
-      border-bottom: none; }\r
-    .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:after {\r
-      border-top: 8px solid #fff;\r
-      border-bottom: none; }\r
-\r
-.b2b-flyout .b2b-flyout-container.b2b-flyout-centerLeft i.b2b-flyout-caret {\r
-  left: inherit !important;\r
-  right: -7px !important;\r
-  top: 8px;\r
-  transform: rotate(90deg); }\r
-\r
-.b2b-flyout .b2b-flyout-container.b2b-flyout-centerRight i.b2b-flyout-caret {\r
-  left: -8px !important;\r
-  top: 296px;\r
-  transform: rotate(-90deg); }\r
-\r
-.b2b-flyout .buttons-group {\r
-  margin-top: 20px; }\r
-  .b2b-flyout .buttons-group .cta-button-group {\r
-    width: 100%;\r
-    border-top: 1px solid #ccc;\r
-    padding: 20px 0 0; }\r
-    .b2b-flyout .buttons-group .cta-button-group button {\r
-      margin-bottom: 0; }\r
-\r
-.b2b-flyout .heading {\r
-  font-size: 20px;\r
-  margin-bottom: 10px; }\r
-\r
-.b2b-flyout .body-text {\r
-  font-size: 14px;\r
-  margin-bottom: 30px; }\r
-\r
-.b2b-footer-wrapper {\r
-  width: 100%;\r
-  background-color: #222; }\r
-\r
-.b2b-footer-container {\r
-  width: 980px;\r
-  margin: 0 auto;\r
-  padding-top: 15px; }\r
-  .b2b-footer-container .footer-columns {\r
-    display: inline-block;\r
-    text-align: left;\r
-    vertical-align: top; }\r
-    .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {\r
-      padding-top: 30px; }\r
-    .b2b-footer-container .footer-columns.three-column {\r
-      width: 33.3%;\r
-      padding-left: 75px; }\r
-    .b2b-footer-container .footer-columns.four-column {\r
-      width: 25%;\r
-      padding-left: 75px; }\r
-    .b2b-footer-container .footer-columns.five-column {\r
-      width: 20%; }\r
-    .b2b-footer-container .footer-columns .b2b-footer-header {\r
-      color: #009fdb;\r
-      font-size: 18px;\r
-      font-style: normal;\r
-      font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-      line-height: 23.9px;\r
-      margin: 0; }\r
-    .b2b-footer-container .footer-columns li {\r
-      padding: 7.5px 0; }\r
-    .b2b-footer-container .footer-columns ul li:first-child {\r
-      padding-top: 15px; }\r
-    .b2b-footer-container .footer-columns li a {\r
-      color: #fff;\r
-      font-size: 16px;\r
-      font-family: "Omnes-ECOMP-W02", Arial; }\r
-  .b2b-footer-container .footer-nav-content {\r
-    padding-bottom: 10px; }\r
-    .b2b-footer-container .footer-nav-content li {\r
-      display: inline;\r
-      font-size: 14px;\r
-      color: #fff;\r
-      vertical-align: middle; }\r
-      .b2b-footer-container .footer-nav-content li a {\r
-        color: #fff;\r
-        font-size: 14px;\r
-        vertical-align: middle;\r
-        margin-right: 5px;\r
-        font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-.b2b-footer-wrapper .b2b-footer-container hr {\r
-  background: #d2d2d2;\r
-  margin-top: 50px; }\r
-\r
-.b2b-footer-wrapper .divider-bottom-footer {\r
-  padding: 45px 0 50px 0; }\r
-\r
-.b2b-footer-wrapper .footerLogo {\r
-  margin: 10px 0 0 0px;\r
-  vertical-align: top; }\r
-  .b2b-footer-wrapper .footerLogo div {\r
-    display: inline-block; }\r
-  .b2b-footer-wrapper .footerLogo .icon-primary-att-globe {\r
-    font-size: 40px; }\r
-  .b2b-footer-wrapper .footerLogo .logo-title {\r
-    color: #fff;\r
-    margin-left: 10px;\r
-    display: inline-block;\r
-    font-size: 26px;\r
-    margin-top: 0px; }\r
-\r
-.b2b-footer-wrapper .copyright-text {\r
-  color: #fff;\r
-  font-size: 11px;\r
-  text-align: left;\r
-  font-family: "Omnes-ECOMP-W02", Arial; }\r
-  .b2b-footer-wrapper .copyright-text a {\r
-    color: #fff;\r
-    text-decoration: underline;\r
-    display: inline-block; }\r
-    .b2b-footer-wrapper .copyright-text a:hover {\r
-      text-decoration: none; }\r
-\r
-@media (max-width: 768px) {\r
-  .b2b-footer-wrapper {\r
-    padding: 0 15px; }\r
-  .b2b-footer-container {\r
-    width: 100%; }\r
-    .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {\r
-      width: 50%; }\r
-  .b2b-footer-wrapper .divider-bottom-footer {\r
-    padding-top: 15px; }\r
-    .b2b-footer-wrapper .divider-bottom-footer .footer-links {\r
-      width: 100%; }\r
-  .b2b-footer-wrapper .footerLogo {\r
-    margin: 30px 0 0 0; }\r
-    .b2b-footer-wrapper .footerLogo .footer-logo {\r
-      margin: 0;\r
-      padding-left: 10px; } }\r
-\r
-.b2b-header-tabs {\r
-  background-color: #222;\r
-  width: 100%;\r
-  position: relative;\r
-  height: 45px; }\r
-  .b2b-header-tabs .icon-primary-att-globe {\r
-    color: #0568ae; }\r
-  .b2b-header-tabs a:focus {\r
-    border: 1px solid white; }\r
-  .b2b-header-tabs .header__items {\r
-    width: 980px;\r
-    margin: 0 auto;\r
-    display: block;\r
-    list-style: none;\r
-    padding: 6px 0px 0px 0px;\r
-    border-spacing: 30px 0; }\r
-  .b2b-header-tabs .header__item {\r
-    display: inline-block;\r
-    text-align: left;\r
-    width: auto;\r
-    font-size: 16px;\r
-    font-family: "Omnes-ECOMP-W02, Arial";\r
-    cursor: pointer;\r
-    padding: 5px 15px;\r
-    color: #fff; }\r
-    .b2b-header-tabs .header__item.b2b-headermenu {\r
-      padding: 0; }\r
-      .b2b-header-tabs .header__item.b2b-headermenu:last-child {\r
-        background: none; }\r
-      .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {\r
-        color: #fff;\r
-        text-decoration: none;\r
-        display: inline-block;\r
-        padding: 5px 15px; }\r
-    .b2b-header-tabs .header__item.active {\r
-      background-color: #fff;\r
-      border-radius: 2px;\r
-      border-bottom-left-radius: 0;\r
-      border-bottom-right-radius: 0; }\r
-      .b2b-header-tabs .header__item.active a.menu__item {\r
-        color: #0578ae; }\r
-  .b2b-header-tabs li:focus {\r
-    outline: 2px solid #0578ae; }\r
-  .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {\r
-    background-color: #fff;\r
-    position: absolute;\r
-    width: 100%;\r
-    left: 0;\r
-    top: 42px;\r
-    border-bottom: solid 1px #ccc;\r
-    -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-    -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-    display: none;\r
-    z-index: 111; }\r
-  .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {\r
-    background-color: #fff;\r
-    width: 980px;\r
-    margin: 0 auto; }\r
-  .b2b-header-tabs .header__item.active .header-secondary-wrapper {\r
-    display: block; }\r
-  .b2b-header-tabs .header-secondary .header-subitem {\r
-    display: inline-block;\r
-    width: auto;\r
-    margin: 0 15px; }\r
-    .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {\r
-      display: block; }\r
-    .b2b-header-tabs .header-secondary .header-subitem a.menu__item {\r
-      display: inline-block;\r
-      padding: 15px 0;\r
-      color: #333; }\r
-      .b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {\r
-        color: #0578ae; }\r
-\r
-/** Secondary Menu **/\r
-.b2b-labelhide {\r
-  position: absolute;\r
-  clip: rect(1px, 1px, 1px, 1px); }\r
-\r
-/** Tertiary Level Menu **/\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {\r
-  position: absolute;\r
-  z-index: 111;\r
-  top: 25px; }\r
-  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after, .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {\r
-    content: '';\r
-    border-left: 8px solid transparent;\r
-    border-right: 8px solid transparent;\r
-    position: absolute;\r
-    -webkit-transition: left .2s ease-out;\r
-    -moz-transition: left .2s ease-out;\r
-    transition: left .2s ease-out; }\r
-  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {\r
-    border-bottom: 8px solid #fff;\r
-    top: 10px; }\r
-  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {\r
-    border-bottom: 8px solid #ccc;\r
-    top: 9px; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {\r
-  border-top: solid 1px #ccc; }\r
-\r
-.b2b-header-tabs .header-tertiary:after {\r
-  content: '';\r
-  clear: both;\r
-  display: block; }\r
-\r
-.b2b-header-tabs .header-tertiary li {\r
-  display: inline-block;\r
-  padding: 0;\r
-  float: left; }\r
-  .b2b-header-tabs .header-tertiary li a {\r
-    color: #333;\r
-    display: block;\r
-    padding: 10px 15px; }\r
-  .b2b-header-tabs .header-tertiary li label {\r
-    text-align: left;\r
-    display: block;\r
-    font-size: 16px;\r
-    font-weight: bold;\r
-    color: #857B7B;\r
-    padding: 15px 0 0 15px; }\r
-\r
-.b2b-header-tabs .header__item.skip {\r
-  padding: 0;\r
-  display: inline-block;\r
-  cursor: default !important; }\r
-  .b2b-header-tabs .header__item.skip a {\r
-    color: transparent;\r
-    font-size: 12px;\r
-    line-height: 15px;\r
-    text-decoration: none; }\r
-    .b2b-header-tabs .header__item.skip a:focus {\r
-      color: #fff;\r
-      outline: 2px solid #0578ae; }\r
-\r
-.b2b-header-tabs .selectWrap {\r
-  min-width: 150px; }\r
-  .b2b-header-tabs .selectWrap button.awd-select {\r
-    height: 30px;\r
-    line-height: 31px;\r
-    font-size: 1rem;\r
-    display: inline-block; }\r
-  .b2b-header-tabs .selectWrap .awd-select-list {\r
-    background-color: #fff;\r
-    color: #333;\r
-    -webkit-transition: opacity .2s ease-out;\r
-    -moz-transition: opacity .2s ease-out;\r
-    transition: opacity .2s ease-out;\r
-    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }\r
-\r
-@media (max-width: 768px) {\r
-  .b2b-header-tabs {\r
-    padding: 0 15px; }\r
-    .b2b-header-tabs .header__items, .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {\r
-      width: 100%; }\r
-    .b2b-header-tabs .header__item {\r
-      padding: 5px 0; }\r
-    .b2b-header-tabs .globe-text {\r
-      display: none; }\r
-    .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {\r
-      padding: 5px 7px 9px 7px; }\r
-    .b2b-header-tabs .header__item .header-tertiary-wrapper {\r
-      top: 30px; }\r
-    .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {\r
-      top: 14px; }\r
-    .b2b-header-tabs .header__item .header-secondary-wrapper {\r
-      top: 45px; }\r
-    .b2b-header-tabs .header__item.profile {\r
-      padding-left: 15px;\r
-      float: none; } }\r
-\r
-/************* Header - Start *************/\r
-.b2b-header-tabs {\r
-  background-color: #222;\r
-  width: 100%;\r
-  position: relative;\r
-  height: 45px; }\r
-\r
-.b2b-header-tabs .icon-primary-primary-att-globe {\r
-  color: #0568ae;\r
-  font-size: 34px;\r
-  bottom: 1px; }\r
-\r
-/*\r
- *TODO: delete below .icon-primary-att-globel will not be used \r
- *instead the one above, icon-primary-primary-att-globe not available here\r
- */\r
-.b2b-header-tabs .icon-primary-att-globe {\r
-  color: #0568ae;\r
-  font-size: 34px; }\r
-\r
-.b2b-header-tabs .globe-text {\r
-  margin-left: 20px;\r
-  font-size: 2rem; }\r
-\r
-.b2b-header-tabs .header__items {\r
-  width: 980px;\r
-  margin: 0 auto;\r
-  display: block;\r
-  list-style: none;\r
-  border-spacing: 30px 0;\r
-  padding: 3px 0px 0px 0px; }\r
-\r
-.b2b-header-tabs .header__item {\r
-  display: inline-block;\r
-  text-align: left;\r
-  width: auto;\r
-  font-size: 14px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  cursor: pointer;\r
-  padding: 0 15px 4px 15px;\r
-  /*margin-top:-3px;*/\r
-  color: #fff; }\r
-\r
-.b2b-header-tabs .header__item.b2b-headermenu {\r
-  padding: 0; }\r
-\r
-.b2b-header-tabs .header__item.b2b-headermenu a.menu__item {\r
-  color: #fff;\r
-  text-decoration: none;\r
-  display: inline-block;\r
-  padding: 8px 15px 12px 15px;\r
-  font-size: 16px; }\r
-\r
-.b2b-header-tabs .header__item.active {\r
-  background-color: #fff;\r
-  border-radius: 2px;\r
-  border-bottom-left-radius: 0;\r
-  border-bottom-right-radius: 0; }\r
-\r
-.b2b-header-tabs .header__item.active a.menu__item {\r
-  color: #0578ae; }\r
-\r
-.b2b-header-tabs li:focus {\r
-  outline: 2px solid #0578ae; }\r
-\r
-/** profile pop Over **/\r
-.b2b-header-tabs .header__item.profile {\r
-  position: relative;\r
-  float: right; }\r
-\r
-/** Secondary Menu **/\r
-.b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {\r
-  background-color: #fff;\r
-  position: absolute;\r
-  width: 100%;\r
-  left: 0;\r
-  top: 42px;\r
-  border-bottom: solid 1px #ccc;\r
-  -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-  -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);\r
-  display: none;\r
-  z-index: 111; }\r
-\r
-.b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {\r
-  background-color: #fff;\r
-  width: 980px;\r
-  margin: 0 auto; }\r
-\r
-.b2b-header-tabs .header__item.active .header-secondary-wrapper,\r
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {\r
-  display: block; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem {\r
-  display: inline-block;\r
-  width: auto;\r
-  margin: 0 15px; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem a.menu__item {\r
-  display: inline-block;\r
-  padding: 15px 0;\r
-  color: #333;\r
-  font-size: 14px; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {\r
-  color: #0578ae; }\r
-\r
-.b2b-label-hide {\r
-  position: absolute;\r
-  clip: rect(1px, 1px, 1px, 1px); }\r
-\r
-/** Tertiary Level Menu **/\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after,\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {\r
-  content: '';\r
-  border-left: 8px solid transparent;\r
-  border-right: 8px solid transparent;\r
-  position: absolute;\r
-  -webkit-transition: left .2s ease-out;\r
-  -moz-transition: left .2s ease-out;\r
-  transition: left .2s ease-out; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {\r
-  position: absolute;\r
-  z-index: 111;\r
-  top: 25px; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {\r
-  border-bottom: 8px solid #fff;\r
-  top: 10px; }\r
-\r
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {\r
-  border-bottom: 8px solid #ccc;\r
-  top: 9px; }\r
-\r
-/** Tertiary Level Menu **/\r
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {\r
-  border-top: solid 1px #ccc; }\r
-\r
-.b2b-header-tabs .header-tertiary:after {\r
-  content: '';\r
-  clear: both;\r
-  display: block; }\r
-\r
-.b2b-header-tabs .header-tertiary li {\r
-  display: inline-block;\r
-  padding: 0;\r
-  float: left; }\r
-\r
-.b2b-header-tabs .header-tertiary li a {\r
-  color: #333;\r
-  display: block;\r
-  padding: 7px 15px;\r
-  max-width: 228px; }\r
-\r
-.b2b-header-tabs .header-tertiary li label {\r
-  text-align: left;\r
-  display: block;\r
-  font-size: 14px !important;\r
-  font-weight: bold;\r
-  color: #857B7B;\r
-  padding: 15px 0 0 15px; }\r
-\r
-/** Quarternary Level Menu **/\r
-.b2b-header-tabs .header-quarternary {\r
-  width: 100%;\r
-  float: left; }\r
-\r
-.b2b-header-tabs .header-quarternary li {\r
-  padding-left: 15px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  display: none; }\r
-\r
-.b2b-header-tabs .header-quarternary li.active {\r
-  display: block; }\r
-\r
-.b2b-header-tabs .header-quarternary li a {\r
-  color: #666666;\r
-  font-size: 14px;\r
-  padding: 0px 10px 10px 10px; }\r
-\r
-/** Skip Navigation**/\r
-.b2b-header-tabs .header__item.skip {\r
-  padding: 0;\r
-  display: inline-block;\r
-  cursor: default !important; }\r
-\r
-.b2b-header-tabs .header__item.skip a {\r
-  color: transparent;\r
-  font-size: 12px;\r
-  line-height: 15px;\r
-  text-decoration: none; }\r
-\r
-.b2b-header-tabs .header__item.skip a:focus {\r
-  color: #fff;\r
-  outline: 2px solid #0578ae; }\r
-\r
-/** Dropdown css inside Header ****/\r
-.b2b-header-tabs .selectWrap {\r
-  min-width: 150px; }\r
-\r
-.b2b-header-tabs .selectWrap button.awd-select, .b2b-header-tabs .selectWrap input.awd-select {\r
-  height: 36px;\r
-  line-height: 8px;\r
-  font-size: 1rem;\r
-  display: inline-block; }\r
-\r
-.b2b-header-tabs .selectWrap .awd-select-list {\r
-  background-color: #fff;\r
-  color: #333;\r
-  -webkit-transition: opacity .2s ease-out;\r
-  -moz-transition: opacity .2s ease-out;\r
-  transition: opacity .2s ease-out;\r
-  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }\r
-\r
-/*\r
- * responsive header media queries\r
- */\r
-@media screen and (max-width: 1100px) {\r
-  .b2b-header-tabs .globe-text {\r
-    display: none; }\r
-  .b2b-header-tabs .header__item.profile {\r
-    padding-left: 15px;\r
-    float: none; }\r
-  .b2b-header-tabs .header__items {\r
-    padding-top: 0px; } }\r
-\r
-@media screen and (max-width: 950px) {\r
-  .header__item.profile {\r
-    top: 20px; }\r
-  .b2b-header-tabs {\r
-    height: 90px; }\r
-  .selectWrap {\r
-    bottom: 15px; }\r
-  .b2b-header-tabs .header__items {\r
-    padding-top: 25px; }\r
-  .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {\r
-    top: 80px; }\r
-  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {\r
-    top: 35px; }\r
-  .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {\r
-    padding-bottom: 30px; }\r
-  .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {\r
-    margin-top: -28px; } }\r
-\r
-/*************** Header - END ******************/\r
-.hp-container {\r
-  display: block;\r
-  max-width: 408px; }\r
-  .hp-container i:focus {\r
-    outline: thin dotted #666; }\r
-  .hp-container .icon-misc-pen {\r
-    cursor: pointer; }\r
-  .hp-container .icon-misc-trash {\r
-    cursor: pointer; }\r
-\r
-.hp-selected {\r
-  border-bottom: 1px solid #ccc;\r
-  border-bottom: 1px solid #ccc;\r
-  margin-bottom: 16px;\r
-  padding-bottom: 16px; }\r
-  .hp-selected .selected-days {\r
-    padding-bottom: 16px; }\r
-    .hp-selected .selected-days .day {\r
-      padding-top: 10px;\r
-      float: left; }\r
-\r
-.hp-checkbox {\r
-  padding-top: 20px;\r
-  margin: 16px auto 0 auto; }\r
-  .hp-checkbox label {\r
-    position: relative;\r
-    width: 20px;\r
-    margin-right: 34px; }\r
-    .hp-checkbox label span {\r
-      position: absolute;\r
-      top: -20px;\r
-      left: 0px;\r
-      margin-left: 0px; }\r
-\r
-.hp-dropdowns {\r
-  margin-top: 15px;\r
-  display: flex;\r
-  display: -webkit-flex;\r
-  display: -ms-flexbox; }\r
-\r
-.hp-buttons {\r
-  margin-top: 20px;\r
-  display: flex;\r
-  display: -webkit-flex;\r
-  display: -ms-flexbox; }\r
-\r
-.hp-dropdowns .radio-buttons {\r
-  margin-top: 30px; }\r
-  .hp-dropdowns .radio-buttons .radio {\r
-    margin-right: 15px; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02";\r
-  src: url("fonts/Omnes_ATTW02.eot");\r
-  src: url("fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02.woff") format("woff"), url("fonts/Omnes_ATTW02.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Medium";\r
-  src: url("fonts/Omnes_ATTW02Medium.eot");\r
-  src: url("fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Medium.woff") format("woff"), url("fonts/Omnes_ATTW02Medium.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Italic";\r
-  src: url("fonts/Omnes_ATTW02Italic.eot");\r
-  src: url("fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Italic.woff") format("woff"), url("fonts/Omnes_ATTW02Italic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Light";\r
-  src: url("fonts/Omnes_ATTW02Light.eot");\r
-  src: url("fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Light.woff") format("woff"), url("fonts/Omnes_ATTW02Light.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Bold";\r
-  src: url("fonts/Omnes_ATTW02Bold.eot");\r
-  src: url("fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Bold.woff") format("woff"), url("fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("fonts/Omnes_ATTW02Bold.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Light-Italic";\r
-  src: url("fonts/Omnes_ATTW02LightItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Medium-Italic";\r
-  src: url("fonts/Omnes_ATTW02MediumItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-@font-face {\r
-  font-family: "Omnes-ECOMP-W02-Bold-Italic";\r
-  src: url("fonts/Omnes_ATTW02BoldItalic.eot");\r
-  src: url("fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");\r
-  font-weight: normal;\r
-  font-style: normal; }\r
-\r
-/* TODO: Build a reference page for these classes */\r
-.font-regular {\r
-  font-family: "Omnes-ECOMP-W02", Arial !important; }\r
-\r
-.font-light {\r
-  font-family: "Omnes-ECOMP-W02-Light", Arial !important; }\r
-\r
-.font-italic {\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }\r
-\r
-.font-light-italic {\r
-  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }\r
-\r
-.font-medium {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }\r
-\r
-.font-medium-italic {\r
-  font-family: "Omnes-ECOMP-W02-Medium-Italic", Arial !important; }\r
-\r
-.font-reset {\r
-  font-style: normal;\r
-  font-variant: normal;\r
-  font-weight: normal;\r
-  text-transform: none; }\r
-\r
-.b2b-nav-menu {\r
-  background-color: #efefef;\r
-  border: 1px solid #efefef;\r
-  width: 230px;\r
-  font-size: 1.4rem; }\r
-\r
-.b2b-subnav-container > ul {\r
-  padding: 0px; }\r
-\r
-.b2b-subnav-content {\r
-  margin: 0;\r
-  margin-bottom: 10px; }\r
-\r
-.b2b-subnav-content > li {\r
-  border-bottom: 1px solid #999999;\r
-  position: relative;\r
-  cursor: pointer; }\r
-\r
-.b2b-subnav-content > li > a {\r
-  text-decoration: none;\r
-  line-height: 18px;\r
-  display: block;\r
-  padding: 10px; }\r
-\r
-.b2b-subnav-content > li > a.expand {\r
-  color: #333; }\r
-\r
-.b2b-subnav-content > li ul {\r
-  overflow: hidden;\r
-  max-height: 0;\r
-  transition-duration: 0.5s;\r
-  transition-timing-function: cubic-bezier(0, 1, 0.5, 1); }\r
-\r
-.b2b-subnav-content > li ul.expand {\r
-  transition-duration: 0.7s;\r
-  transition-timing-function: ease-in-out;\r
-  max-height: 1000px;\r
-  overflow: hidden; }\r
-\r
-.b2b-subnav-content > li > a:focus, .b2b-subnav-content > li ul > li > a:focus {\r
-  outline: thin dotted #666; }\r
-\r
-.b2b-subnav-content > li ul > li > a {\r
-  line-height: 18px;\r
-  padding: 8px 0;\r
-  display: block;\r
-  outline-offset: -4px;\r
-  padding-left: 10px; }\r
-\r
-.b2b-icon-primary-plus-minus {\r
-  display: inline-block;\r
-  height: 20px;\r
-  margin-right: 10px;\r
-  padding: 0;\r
-  position: absolute;\r
-  right: 0px;\r
-  top: 10px;\r
-  vertical-align: middle;\r
-  width: 20px; }\r
-\r
-@media (min-width: 320px) and (max-width: 767px) {\r
-  .b2b-nav-menu {\r
-    background-color: #fff;\r
-    border: 1px solid white;\r
-    width: 100%; }\r
-  .b2b-subnav-content > li {\r
-    padding-left: 10px; }\r
-  .b2b-subnav-container > ul:first-child {\r
-    border-top: 1px solid #999; }\r
-  .b2b-icon-primary-plus-minus {\r
-    right: 10px; }\r
-  .b2b-subnav-content > li li > a.active {\r
-    color: #0574ac;\r
-    text-decoration: none;\r
-    font-family: "Omnes-ECOMP-W02", Arial; } }\r
-\r
-.b2b-list-box-item {\r
-  white-space: nowrap;\r
-  margin: 1px;\r
-  border: 1px solid transparent;\r
-  outline: none;\r
-  visibility: inherit;\r
-  display: inherit;\r
-  text-align: left;\r
-  overflow: hidden;\r
-  cursor: pointer;\r
-  padding: 5px 0 5px;\r
-  padding-left: 15px;\r
-  -moz-user-select: none;\r
-  -webkit-user-select: none;\r
-  -ms-user-select: none; }\r
-  .b2b-list-box-item:focus {\r
-    border: 2px solid #5e8cb3; }\r
-\r
-.b2b-list-box-item--selected {\r
-  background-color: #cfdde9; }\r
-\r
-.btn.disabled[ddh-load-button] {\r
-  line-height: 46px;\r
-  padding: 0 19px 0 18px; }\r
-\r
-.btn.disabled[ddh-load-button] {\r
-  color: #666666; }\r
-\r
-.icon-primary-spinner-ddh.large {\r
-  height: 50px;\r
-  width: 50px; }\r
-\r
-.icon-primary-spinner-ddh.small {\r
-  height: 30px;\r
-  width: 30px; }\r
-\r
-.icon-primary-spinner-ddh {\r
-  -webkit-animation: 1s linear infinite spinner;\r
-  animation: 1s linear infinite spinner;\r
-  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgaWQ9InN2Zy1zcGlubmVyIiB4PSIwcHgiIHk9IjBweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CiAgIDxwYXRoIGZpbGw9IiNGNUY1RjUiIGQ9Ik0xOCAzNkM4LjEgMzYgMCAyNy45IDAgMThTOC4xIDAgMTggMHMxOCA4LjEgMTggMTgtOC4xIDE4LTE4IDE4em0wLTMxLjVjLTcuNSAwLTEzLjUgNi0xMy41IDEzLjVTMTAuNiAzMS41IDE4IDMxLjVjNy41IDAgMTMuNS02LjEgMTMuNS0xMy41IDAtNy41LTYtMTMuNS0xMy41LTEzLjV6Ii8+CiAgIDxwYXRoIGZpbGw9IiMwNTY4QUUiIGlkPSJzcGlubmVyIiBkPSJNMzAuNyA1LjNsLTMuMSAzLjJjMi40IDIuNCAzLjkgNS44IDMuOSA5LjUgMCA3LjQtNi4xIDEzLjUtMTMuNSAxMy41UzQuNSAyNS40IDQuNSAxOCAxMC42IDQuNSAxOCA0LjVWMEM4LjEgMCAwIDguMSAwIDE4czguMSAxOCAxOCAxOCAxOC04LjEgMTgtMThjMC01LTItOS41LTUuMy0xMi43eiIgdHJhbnNmb3JtPSIiPiAgICAgIAogICA8L3BhdGg+Cjwvc3ZnPg==); }\r
-\r
-.btn-small .icon-primary-spinner-ddh {\r
-  height: 30px !important;\r
-  width: 30px !important; }\r
-\r
-.btn-small .icon-primary-spinner {\r
-  height: 30px;\r
-  width: 30px; }\r
-\r
-.load-backdrop {\r
-  position: absolute;\r
-  top: 50%;\r
-  left: 50%; }\r
-\r
-.body.styled-by-modal {\r
-  position: fixed; }\r
-\r
-.b2b-modal-backdrop {\r
-  position: fixed;\r
-  top: 0;\r
-  right: 0;\r
-  bottom: 0;\r
-  left: 0;\r
-  z-index: -1; }\r
-\r
-.b2b-modal-backdrop.fade {\r
-  background-color: #000;\r
-  opacity: 0;\r
-  filter: alpha(opacity=0);\r
-  transition: all 0.3s linear 0s; }\r
-\r
-.b2b-modal-backdrop.fade.in {\r
-  z-index: 1040;\r
-  opacity: 0.7;\r
-  filter: alpha(opacity=70);\r
-  background-color: #000;\r
-  transition: opacity 0.3s linear 0s; }\r
-\r
-.modalwrapper {\r
-  height: 100%;\r
-  width: 100%;\r
-  left: 0;\r
-  overflow-y: hidden;\r
-  position: absolute;\r
-  right: 0;\r
-  padding: 20px;\r
-  top: 0;\r
-  z-index: -1; }\r
-\r
-.modalwrapper.active {\r
-  z-index: 1050;\r
-  overflow-y: auto; }\r
-\r
-.modal {\r
-  background-clip: padding-box;\r
-  background-color: #ffffff;\r
-  border: 1px solid rgba(0, 0, 0, 0.1);\r
-  border-radius: 8px;\r
-  box-shadow: 0 3px 5px 1px rgba(0, 0, 0, 0.4);\r
-  margin: 0 auto;\r
-  /*margin-bottom:10%;*/\r
-  outline: medium none;\r
-  /*position: absolute;*/\r
-  height: 0;\r
-  min-height: 150px;\r
-  overflow: hidden;\r
-  /*top: 10%;*/\r
-  width: 100%;\r
-  z-index: -1; }\r
-\r
-.modalwrapper.modal-docked .modal {\r
-  max-height: 80%;\r
-  height: 80%;\r
-  overflow: hidden;\r
-  top: 0; }\r
-\r
-.modal.fade.in {\r
-  position: relative;\r
-  height: auto;\r
-  overflow: auto;\r
-  top: 10%;\r
-  z-index: 1060;\r
-  transition: opacity .5s linear 0s; }\r
-\r
-.modal.fade.in.modal-landscape {\r
-  overflow-y: auto; }\r
-\r
-.modal.fade {\r
-  transition: opacity .5s linear 0s; }\r
-\r
-.fade.in {\r
-  opacity: 1; }\r
-\r
-.fade {\r
-  opacity: 0; }\r
-\r
-.b2b-modal-header {\r
-  align-items: center;\r
-  border-radius: 8px 8px 0 0;\r
-  display: flex;\r
-  min-height: 60px;\r
-  overflow: hidden;\r
-  padding: 30px 46px 30px 30px;\r
-  position: relative; }\r
-\r
-.b2b-modal-header > h2 {\r
-  line-height: 1;\r
-  margin: 0;\r
-  padding: 0; }\r
-\r
-.modal-header-portrait {\r
-  -webkit-overflow-scrolling: auto; }\r
-\r
-.modal-header-landscape {\r
-  -webkit-overflow-scrolling: auto; }\r
-\r
-.b2b-modal-body {\r
-  -webkit-overflow-scrolling: touch;\r
-  padding: 0 30px 20px;\r
-  position: relative;\r
-  width: auto; }\r
-\r
-.b2b-modal-body:focus {\r
-  outline: 1px dotted #333333; }\r
-\r
-.modal-form {\r
-  margin-bottom: 0; }\r
-\r
-.b2b-modal-footer {\r
-  background-color: #fff;\r
-  width: 100%;\r
-  padding: 0 30px;\r
-  border-radius: 0;\r
-  position: absolute;\r
-  bottom: 0; }\r
-\r
-:not(.modal-docked) .b2b-modal-footer {\r
-  position: relative; }\r
-\r
-.modal-docked .b2b-modal-footer {\r
-  border-top: 1px solid #d2d2d2; }\r
-\r
-.modal-landscape .b2b-modal-footer {\r
-  position: relative; }\r
-\r
-.b2b-modal-footer .cta-button-group {\r
-  display: flex;\r
-  justify-content: flex-end;\r
-  padding: 20px 0 5px;\r
-  width: 100%; }\r
-\r
-.b2b-modal-footer .cta-button-group .btn {\r
-  margin-left: auto;\r
-  margin-right: auto;\r
-  float: right;\r
-  margin-left: 10px; }\r
-\r
-.b2b-modal-footer .cta-button-group .btn + .btn {\r
-  margin-right: 0 !important; }\r
-\r
-[class*="modal-"] {\r
-  width: 100%; }\r
-\r
-.modal-small {\r
-  max-width: 420px; }\r
-\r
-.modal-medium {\r
-  max-width: 620px; }\r
-\r
-.modal-large {\r
-  max-width: 720px; }\r
-\r
-.modal-xlarge {\r
-  max-width: 860px; }\r
-\r
-.modal-jumbo {\r
-  max-width: 1000px; }\r
-\r
-.modalwrapper.modal-docked {\r
-  height: 100%;\r
-  display: flex;\r
-  align-items: center; }\r
-\r
-.modalwrapper.modal-docked .b2b-modal-body {\r
-  height: 80%;\r
-  overflow-y: scroll;\r
-  padding-bottom: 60px; }\r
-\r
-.modalwrapper.modal-docked .modal {\r
-  max-height: 80%;\r
-  height: 80%;\r
-  overflow: hidden;\r
-  top: 0; }\r
-\r
-.modalwrapper.modal-docked .b2b-modal-body > *:last-child {\r
-  margin-bottom: 60px; }\r
-\r
-@media (max-width: 767px) {\r
-  .modalwrapper {\r
-    padding: 15px;\r
-    overflow-x: hidden; }\r
-  .modal.fade.in {\r
-    top: 0;\r
-    right: 0;\r
-    left: 0;\r
-    margin-bottom: 15px;\r
-    border: none; }\r
-  .b2b-modal-header {\r
-    padding: 20px 46px 20px 15px; }\r
-  .b2b-modal-body {\r
-    width: 100%;\r
-    padding: 0 15px 15px; }\r
-  .modalwrapper.modal-docked {\r
-    position: absolute;\r
-    height: 100%;\r
-    padding: 0; }\r
-  .modalwrapper.modal-docked .modal.fade.in {\r
-    margin-bottom: 0;\r
-    width: 100% !important;\r
-    max-height: 100%;\r
-    height: 100%;\r
-    border-radius: 0; }\r
-  .modalwrapper.modal-docked .b2b-modal-body {\r
-    overflow-y: scroll;\r
-    height: 100%; }\r
-  .modalwrapper.modal-docked.modal-landscape {\r
-    overflow-y: hidden;\r
-    position: fixed; }\r
-  .modalwrapper.modal-docked.modal-landscape .modal {\r
-    overflow-y: scroll;\r
-    max-width: 100%; }\r
-  .modalwrapper.modal-docked.modal-landscape .b2b-modal-body {\r
-    height: auto;\r
-    overflow-y: hidden; }\r
-  .b2b-modal-footer {\r
-    padding: 0 15px; }\r
-  .b2b-modal-footer .cta-button-group {\r
-    display: block;\r
-    padding: 15px 0; }\r
-  .b2b-modal-footer .cta-button-group .btn {\r
-    float: none; }\r
-  .b2b-modal-footer .cta-button-group .btn + .btn {\r
-    margin-bottom: 0; }\r
-  .b2b-modal-footer .cta-button-group a.visible-phone {\r
-    align-items: center;\r
-    display: flex !important;\r
-    height: 42px;\r
-    justify-content: center; } }\r
-\r
-.b2b-modal-footer > .cta-button-group {\r
-  line-height: 40px; }\r
-\r
-.ajaxed,\r
-.modal.fade.in .b2b-modal-header,\r
-.modal.fade.in .b2b-modal-body,\r
-.modal.fade.in .b2b-modal-footer {\r
-  animation-duration: 0.01s;\r
-  -o-animation-duration: 0.01s;\r
-  -ms-animation-duration: 0.01s;\r
-  -moz-animation-duration: 0.01s;\r
-  -webkit-animation-duration: 0.01s;\r
-  animation-name: DOMinsertion;\r
-  -o-animation-name: DOMinsertion;\r
-  -ms-animation-name: DOMinsertion;\r
-  -moz-animation-name: DOMinsertion;\r
-  -webkit-animation-name: DOMinsertion; }\r
-\r
-.monthselector thead tr th {\r
-  min-width: 46px; }\r
-\r
-.monthselector thead tr:after {\r
-  content: "";\r
-  position: absolute;\r
-  left: 20px;\r
-  top: 52px;\r
-  height: 1px;\r
-  width: 85%;\r
-  border-bottom: 1px solid #ccc; }\r
-\r
-.monthselector tbody tr:last-child {\r
-  height: 50px; }\r
-\r
-.monthselector td.day {\r
-  margin: 1px 4px !important;\r
-  width: 64px !important; }\r
-\r
-.monthselector .datepicker-switch {\r
-  width: 195px !important; }\r
-\r
-.monthselector .show-date {\r
-  width: 30px !important; }\r
-\r
-.monthselector button.faux-input {\r
-  width: 100%; }\r
-  .monthselector button.faux-input:focus {\r
-    border: 1px solid #0574ac; }\r
-  .monthselector button.faux-input:disabled {\r
-    cursor: not-allowed; }\r
-\r
-.monthselector .cta-button-group {\r
-  padding: 0 20px; }\r
-  .monthselector .cta-button-group a {\r
-    margin-right: 20px; }\r
-\r
-.monthselector .day.active .show-date:after, .monthselector .day:focus .show-date:after, .monthselector .due-date.disabled .show-date:after {\r
-  height: 30px;\r
-  left: 9px !important;\r
-  top: 0;\r
-  width: 42px !important; }\r
-\r
-.monthselector .disabled.day:focus .show-date:after {\r
-  border: none; }\r
-\r
-.monthselector .icon-primary-calendar {\r
-  display: block; }\r
-\r
-.b2b-ml-nav {\r
-  padding: 0 10px 0 10px;\r
-  width: 320px; }\r
-\r
-.b2b-ml-nav ul {\r
-  list-style: none;\r
-  list-style-type: none; }\r
-\r
-.b2b-ml-nav a {\r
-  display: block;\r
-  padding: 0 0 5px 30px;\r
-  line-height: 22px;\r
-  margin-left: -10px;\r
-  color: #333;\r
-  font-size: 1.4rem; }\r
-\r
-.b2b-ml-nav a:focus {\r
-  outline-offset: 1px; }\r
-\r
-.b2b-ml-nav li:focus {\r
-  outline: none; }\r
-\r
-.b2b-ml-nav li:focus > a {\r
-  outline: thin dotted #666;\r
-  outline-offset: 1px; }\r
-\r
-.b2b-ml-nav ul li {\r
-  border-left: 1px solid #ccc; }\r
-\r
-.b2b-ml-nav ul ul {\r
-  padding: 0 0 0 20px; }\r
-\r
-.b2b-ml-nav ul > li {\r
-  position: relative;\r
-  line-height: 18px; }\r
-\r
-.b2b-ml-nav a > span {\r
-  background-color: #FFF;\r
-  display: inline;\r
-  margin: 0;\r
-  padding: 0;\r
-  position: absolute;\r
-  left: -11px;\r
-  top: 0; }\r
-\r
-.b2b-ml-nav a > span > i {\r
-  font-size: 20px; }\r
-\r
-.b2b-ml-nav a:only-child {\r
-  color: #0574ac; }\r
-\r
-.b2b-ml-nav a:only-child > span {\r
-  left: -6px;\r
-  border-radius: 50%;\r
-  line-height: 7px;\r
-  top: 5px; }\r
-\r
-.b2b-ml-nav a:only-child > span > i {\r
-  background-color: inherit;\r
-  background: #fff;\r
-  font-size: 10px; }\r
-\r
-.b2b-ml-nav ul li:first-child > a:only-child > span {\r
-  left: -6px;\r
-  border-radius: 50%;\r
-  line-height: 12px;\r
-  top: 0px; }\r
-\r
-.b2b-ml-nav li a + ul {\r
-  display: none; }\r
-\r
-.b2b-ml-nav li a.active + ul {\r
-  display: block; }\r
-\r
-/*to overide ng-doc inline property for library demo - TODO: Move to docs.css*/\r
-.b2b-ml-nav a [class^="icon-primary-"], a [class*=" icon-primary-"], a [class^="icon-primary-"]:before, a [class*=" icon-primary-"]:before {\r
-  display: inline-block; }\r
-\r
-.b2b-alerts-messages {\r
-  background-color: #fff;\r
-  border-radius: 8px;\r
-  height: auto; }\r
-  .b2b-alerts-messages h3 {\r
-    color: #333 !important;\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    margin-bottom: 0 !important; }\r
-  .b2b-alerts-messages h4 {\r
-    color: #333 !important;\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    margin-bottom: 0 !important; }\r
-  .b2b-alerts-messages .alert-info {\r
-    background-color: #0574ac;\r
-    border: 0; }\r
-  .b2b-alerts-messages .alert-error {\r
-    background-color: #cf2a2a;\r
-    border: 0; }\r
-  .b2b-alerts-messages .alert-success {\r
-    background-color: #1b7e28;\r
-    border: 0; }\r
-  .b2b-alerts-messages div:nth-child(2) {\r
-    padding: 0 0 15px 10px;\r
-    vertical-align: baseline; }\r
-  .b2b-alerts-messages .close:before {\r
-    color: #767676; }\r
-  .b2b-alerts-messages p {\r
-    font-size: 14px;\r
-    color: #333;\r
-    font-family: "Omnes-ECOMP-W02", Arial; }\r
-    .b2b-alerts-messages p a {\r
-      color: #333; }\r
-  .b2b-alerts-messages .btn-small {\r
-    margin-bottom: 0px; }\r
-\r
-.b2b-alerts-success {\r
-  border: 1px solid #1b7e28; }\r
-\r
-.b2b-alerts-error {\r
-  border: 1px solid #cf2a2a; }\r
-\r
-.b2b-alerts-info {\r
-  border: 1px solid #0574ac; }\r
-\r
-/* TODO: Rearange this and move to patches if needed */\r
-.b2b-breadcrumb-css-override > li {\r
-  margin-right: 24px; }\r
-\r
-.b2b-breadcrumb-css-override li > * {\r
-  float: left !important; }\r
-\r
-.b2b-css-override ul.nav-tabs {\r
-  margin-bottom: 0; }\r
-\r
-.b2b-css-override div.tab-content {\r
-  margin-top: 0;\r
-  border-top: none; }\r
-\r
-.b2b-css-override .tab-content .prettyprint, .b2b-css-override .usage .prettyprint {\r
-  max-height: 500px;\r
-  overflow-y: auto; }\r
-\r
-.b2b-top-nav-buttons-css-override {\r
-  margin-bottom: 0;\r
-  margin-top: 2px; }\r
-\r
-.b2b-auto-width {\r
-  width: auto !important; }\r
-\r
-.b2b-toggle-header-active {\r
-  color: #0568ae; }\r
-\r
-.b2b-toggle-header-inactive {\r
-  color: #333333; }\r
-\r
-.b2b-toggle-header-icon {\r
-  cursor: pointer; }\r
-\r
-.tab-content > .tab-pane {\r
-  display: none; }\r
-\r
-.tab-content > .active {\r
-  display: block; }\r
-\r
-.icon-primary-circle:before {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");\r
-  content: "";\r
-  position: absolute;\r
-  top: 0;\r
-  z-index: 1; }\r
-\r
-.ds2-no-colors .icon-primary-circle:before {\r
-  background-image: none;\r
-  content: "\e902"; }\r
-\r
-i:focus {\r
-  outline: thin dotted #666; }\r
-\r
-.p-col-md-12 {\r
-  width: 50%; }\r
-\r
-.pager__item {\r
-  border-radius: 0;\r
-  cursor: default;\r
-  display: inline-block;\r
-  margin: 5px;\r
-  width: 22px;\r
-  height: 23px;\r
-  /*transition: all 0.3s ease-out 0s;*/\r
-  vertical-align: baseline; }\r
-\r
-.pager {\r
-  padding-top: 10px;\r
-  padding-bottom: 20px;\r
-  text-align: center;\r
-  margin: 0 auto; }\r
-\r
-.pager__item--input {\r
-  color: #067ab4;\r
-  max-height: 32px;\r
-  max-width: 40px;\r
-  padding-left: 0;\r
-  padding-right: 0;\r
-  text-align: center;\r
-  margin-left: 10px; }\r
-\r
-.row.section-row {\r
-  margin-bottom: 20px; }\r
-\r
-.pager__item--active {\r
-  border-bottom: 2px solid #0574ac;\r
-  border-radius: 0;\r
-  color: #333333; }\r
-\r
-.pager a.pager__item--active:hover {\r
-  cursor: default; }\r
-\r
-.pager a:hover, .pager a:focus {\r
-  text-decoration: none;\r
-  color: #333333;\r
-  cursor: pointer; }\r
-\r
-.pager a.disabled:hover, .pager a.disabled:focus {\r
-  cursor: not-allowed; }\r
-\r
-.row.section-row.b2b-page {\r
-  display: block; }\r
-\r
-a.pager__item--next:focus, a.pager__item--prev:focus {\r
-  text-decoration: none;\r
-  border: 0; }\r
-\r
-.pager__item--next, .pager__item--prev {\r
-  margin: 5px;\r
-  padding: 1.5px 6px 1.5px 6px; }\r
-\r
-.pager .disabled i {\r
-  pointer-events: none;\r
-  cursor: default;\r
-  color: #c4c4c4; }\r
-\r
-.fieldLabel {\r
-  color: #666666; }\r
-\r
-.fieldLabel input {\r
-  color: #666666; }\r
-\r
-.pSelect {\r
-  float: right;\r
-  width: 150px; }\r
-\r
-.numericResult {\r
-  margin-bottom: 20px;\r
-  font-size: 1.6rem;\r
-  margin-top: 20px;\r
-  display: inline-block;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.mobile-view > .pager__item {\r
-  margin: 5px 10px;\r
-  width: 24px;\r
-  height: 34px;\r
-  vertical-align: middle;\r
-  line-height: 34px; }\r
-\r
-.fade1, .fadel {\r
-  opacity: 0.4; }\r
-\r
-.fade2, .fadesl {\r
-  opacity: 0.6; }\r
-\r
-h4#pagination-truncated {\r
-  margin-top: 50px; }\r
-\r
-h4#pagination-large-count {\r
-  margin-top: 50px; }\r
-\r
-.p-col-md-12 input {\r
-  margin-left: 20px; }\r
-\r
-.pager a .icon-primary-right:before {\r
-  display: inline-block; }\r
-\r
-.pager a .icon-primary-left:before {\r
-  display: inline-block; }\r
-\r
-.page-heading {\r
-  background: white none repeat scroll 0 0;\r
-  margin-bottom: -12px;\r
-  padding-left: 10px;\r
-  padding-right: 10px;\r
-  position: relative; }\r
-\r
-.numericResult:focus {\r
-  outline: 1px dotted #0574ac; }\r
-\r
-.page-heading-group {\r
-  color: #ef6f00;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.pager > div > span.fieldLabel {\r
-  margin-left: 18px; }\r
-\r
-.pager .fieldLabel .btn-arrow {\r
-  top: 0;\r
-  left: 10px; }\r
-\r
-.b2b-p-col-md-12 {\r
-  width: 50%; }\r
-  .b2b-p-col-md-12 input {\r
-    margin-left: 20px; }\r
-\r
-.b2b-pager__item {\r
-  border-radius: 0;\r
-  cursor: default;\r
-  display: inline-block;\r
-  margin: 5px;\r
-  min-width: 23px;\r
-  height: 23px;\r
-  vertical-align: baseline; }\r
-\r
-.b2b-pager__item--noclick {\r
-  pointer-events: none !important;\r
-  cursor: default !important; }\r
-\r
-.b2b-pager {\r
-  padding-top: 10px;\r
-  padding-bottom: 20px;\r
-  text-align: center;\r
-  margin: 0 auto; }\r
-  .b2b-pager a:hover {\r
-    text-decoration: none;\r
-    color: #333333;\r
-    cursor: pointer; }\r
-  .b2b-pager a:focus {\r
-    text-decoration: none;\r
-    color: #333333;\r
-    cursor: pointer; }\r
-  .b2b-pager a .icon-primary-right:before {\r
-    display: inline-block; }\r
-  .b2b-pager a .icon-primary-left:before {\r
-    display: inline-block; }\r
-  .b2b-pager .disabled i {\r
-    pointer-events: none;\r
-    cursor: default;\r
-    color: #c4c4c4; }\r
-\r
-.b2b-pager__item--input {\r
-  color: #067ab4;\r
-  max-height: 32px;\r
-  max-width: 60px;\r
-  padding-left: 0;\r
-  padding-right: 0;\r
-  text-align: center;\r
-  margin-left: 10px; }\r
-\r
-.row.section-row {\r
-  margin-bottom: 20px; }\r
-\r
-.b2b-pager__item--active {\r
-  border-bottom: 2px solid #0574ac;\r
-  border-radius: 0;\r
-  color: #333333; }\r
-\r
-.row.section-row.b2b-page {\r
-  display: block; }\r
-\r
-a.b2b-pager__item--next:focus {\r
-  text-decoration: none;\r
-  border: 0; }\r
-\r
-a.b2b-pager__item--next-disabled {\r
-  outline: 0; }\r
-\r
-a.b2b-pager__item--next-disabled > [class^="icon-primary-"] {\r
-  color: #cccccc;\r
-  cursor: not-allowed;\r
-  outline: 0; }\r
-\r
-a.b2b-pager__item--prev:focus {\r
-  text-decoration: none;\r
-  border: 0; }\r
-\r
-a.b2b-pager__item--prev-disabled {\r
-  outline: 0; }\r
-\r
-a.b2b-pager__item--prev-disabled > [class^="icon-primary-"] {\r
-  color: #cccccc;\r
-  cursor: not-allowed; }\r
-\r
-.b2b-pager__item--next {\r
-  margin: 5px;\r
-  padding: 1.5px 6px 1.5px 6px; }\r
-\r
-.b2b-pager__item--prev {\r
-  margin: 5px;\r
-  padding: 1.5px 6px 1.5px 6px; }\r
-\r
-.fieldLabel {\r
-  color: #666666; }\r
-  .fieldLabel input {\r
-    color: #666666; }\r
-  .fieldLabel .btn-arrow {\r
-    top: 0;\r
-    left: 10px; }\r
-\r
-.b2b-pSelect {\r
-  float: right;\r
-  width: 150px; }\r
-\r
-.b2b-numericResult {\r
-  margin-bottom: 20px;\r
-  font-size: 1.6rem;\r
-  margin-top: 20px; }\r
-\r
-.b2b-mobile-view > .b2b-pager__item {\r
-  margin: 5px 10px;\r
-  min-width: 23px;\r
-  height: 34px;\r
-  vertical-align: middle;\r
-  line-height: 34px; }\r
-\r
-.b2b-fade1 {\r
-  opacity: 0.4; }\r
-\r
-.b2b-fade2 {\r
-  opacity: 0.6; }\r
-\r
-.b2b-fadesl {\r
-  opacity: 0.6; }\r
-\r
-h4#b2b-pagination-truncated {\r
-  margin-top: 50px; }\r
-\r
-h4#b2b-pagination-large-count {\r
-  margin-top: 50px; }\r
-\r
-.b2b-page-heading {\r
-  background: white none repeat scroll 0 0;\r
-  margin-bottom: -12px;\r
-  padding-left: 10px;\r
-  padding-right: 10px;\r
-  position: relative; }\r
-\r
-.b2b-numericResult:focus {\r
-  outline: 1px dotted #0574ac; }\r
-\r
-.b2b-page-heading-group {\r
-  color: #ef6f00;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.b2b-pager > div > span.fieldLabel {\r
-  margin-left: 18px; }\r
-\r
-input.b2b-phone-mask-input {\r
-  padding-right: 15px; }\r
-  input.b2b-phone-mask-input:hover, input.b2b-phone-mask-input:focus {\r
-    padding-right: 15px; }\r
-\r
-/************************** Start - Should be removed after the styling in global is fixed *******************/\r
-input::-ms-clear {\r
-  display: none; }\r
-\r
-/************************** End - Should be removed after the styling in global is fixed *******************/\r
-@media (max-width: 767px) {\r
-  input::-ms-clear {\r
-    display: block; } }\r
-\r
-.pivot-link-group {\r
-  background-color: #5a5a5a;\r
-  border-top: 1px solid #959595; }\r
-\r
-.pivot-links > li {\r
-  border-bottom: 1px solid #959595; }\r
-\r
-.pivot-links > li > a {\r
-  color: #fff;\r
-  display: block;\r
-  padding: 12px 15px 10px;\r
-  line-height: normal; }\r
-\r
-.b2b-profile-block-container {\r
-  min-height: 200px;\r
-  height: auto;\r
-  background-color: #fff;\r
-  border-radius: 8px;\r
-  border: 1px solid #ccc;\r
-  box-shadow: 0px 1px 1px 1px  #ccc;\r
-  display: inline-table;\r
-  margin: 15px 15px; }\r
-\r
-.b2b-profile-block-details p, .b2b-profile-block-details div {\r
-  padding: 2px 7px;\r
-  font-size: 1.4rem; }\r
-\r
-.b2b-profile-block-details .radio-label, .b2b-profile-block-details a {\r
-  font-size: 1.4rem; }\r
-\r
-.b2b-profile-block-details p label, .b2b-profile-block-details p span {\r
-  padding-left: 10px; }\r
-\r
-.b2b-profile-block-footer {\r
-  margin-bottom: 12px;\r
-  margin-top: 5px;\r
-  height: 35px; }\r
-\r
-.b2b-profile-block-details p {\r
-  word-wrap: break-word;\r
-  height: 61px; }\r
-  .b2b-profile-block-details p:first-child {\r
-    margin-top: 10px; }\r
-  .b2b-profile-block-details p:after {\r
-    content: ' ';\r
-    display: block;\r
-    border: 0.2px solid #ccc;\r
-    margin-top: 12px; }\r
-\r
-.b2b-profile-block-details .radio {\r
-  margin-left: 15px;\r
-  height: 30px; }\r
-\r
-.b2b-approval-icon {\r
-  color: #1b7e28;\r
-  float: right;\r
-  position: relative;\r
-  left: 10px; }\r
-  .b2b-approval-icon i {\r
-    color: #1b7e28;\r
-    float: right; }\r
-\r
-.b2b-profile-link {\r
-  float: right;\r
-  position: relative;\r
-  left: -4px; }\r
-\r
-a.link-profile {\r
-  position: relative;\r
-  left: -5px;\r
-  float: right;\r
-  margin-bottom: 16px; }\r
-\r
-.b2b-profile-block-radio {\r
-  position: relative;\r
-  top: -5px; }\r
-\r
-.b2b-profile-card {\r
-  min-width: 229px;\r
-  min-height: 354px;\r
-  margin: 10px;\r
-  border: solid 1px #CCC;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  display: inline-block;\r
-  vertical-align: top; }\r
-  .b2b-profile-card .top-block {\r
-    padding: 15px 20px;\r
-    background-color: #e4e4e4;\r
-    max-height: 153px; }\r
-  .b2b-profile-card .bottom-block {\r
-    padding: 15px 20px 15px 20px;\r
-    background-color: #fff; }\r
-  .b2b-profile-card .profile-image {\r
-    background: #e4e4e4;\r
-    margin-bottom: 15px;\r
-    text-align: center; }\r
-    .b2b-profile-card .profile-image .default-img {\r
-      display: inline-block;\r
-      width: 60px;\r
-      height: 60px;\r
-      margin-bottom: 10px;\r
-      border: 6px solid #fff;\r
-      border-radius: 99em;\r
-      -webkit-border-radius: 99em;\r
-      -moz-border-radius: 99em;\r
-      /* background-color: #eee; */ }\r
-\r
-.profile-image img {\r
-  display: inline-block;\r
-  width: 60px;\r
-  height: 60px;\r
-  margin-bottom: 10px;\r
-  border: 6px solid #fff;\r
-  border-radius: 99em;\r
-  -webkit-border-radius: 99em;\r
-  -moz-border-radius: 99em;\r
-  /* background-color: #eee; */ }\r
-\r
-.b2b-profile-card .profile-image .default-img {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  color: #333;\r
-  background-color: #fff;\r
-  font-size: 32px;\r
-  line-height: 22px;\r
-  padding: 5px;\r
-  padding-top: 13px;\r
-  width: 60px;\r
-  height: 60px;\r
-  text-transform: uppercase; }\r
-\r
-.b2b-profile-card .profile-image .name {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 16px;\r
-  color: #333;\r
-  text-align: center;\r
-  margin-bottom: 5px;\r
-  margin-top: 5px;\r
-  overflow: hidden;\r
-  word-break: break-word;\r
-  white-space: normal;\r
-  text-transform: capitalize; }\r
-\r
-.b2b-profile-card .profile-image .status-icon {\r
-  border-radius: 10px;\r
-  border: 1px solid #fff;\r
-  margin: 0 3px 0 0;\r
-  width: 10px;\r
-  height: 10px;\r
-  display: inline-block;\r
-  vertical-align: middle; }\r
-\r
-.b2b-profile-card .profile-image .status {\r
-  font-size: 12px;\r
-  line-height: 15px;\r
-  text-align: center;\r
-  margin: 0 15px 0 0;\r
-  color: #444; }\r
-\r
-.b2b-profile-card .status .circle {\r
-  width: 10px;\r
-  height: 10px;\r
-  border-radius: 50%;\r
-  margin: 30px 6px 0px 20px;\r
-  text-align: center;\r
-  background-color: #444; }\r
-\r
-.b2b-profile-card .profile-image .status-green {\r
-  background-color: #0c0; }\r
-\r
-.b2b-profile-card .profile-image .status-red {\r
-  background-color: red; }\r
-\r
-.b2b-profile-card .profile-image .status-blue {\r
-  background-color: #00f; }\r
-\r
-.b2b-profile-card .profile-image .status-yellow {\r
-  background-color: #ff0; }\r
-\r
-.b2b-profile-card .profile-image .status .status-badge {\r
-  margin-left: 5px;\r
-  border: dotted 1px #444;\r
-  background-color: transparent;\r
-  font-weight: 400;\r
-  color: #444;\r
-  height: 17px;\r
-  padding: 0 5px;\r
-  font-size: 11px;\r
-  padding-left: 5px;\r
-  padding-right: 5px; }\r
-\r
-.b2b-profile-card .profile-details {\r
-  background: #fff; }\r
-  .b2b-profile-card .profile-details label {\r
-    display: block;\r
-    cursor: text;\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    font-weight: bolder;\r
-    font-size: 14px;\r
-    color: #333;\r
-    padding: 0;\r
-    margin: 0; }\r
-  .b2b-profile-card .profile-details div {\r
-    margin: 0;\r
-    font-size: 14px;\r
-    color: #333;\r
-    padding-bottom: 6.5px; }\r
-\r
-.b2b-profile-card .b2b-add-user {\r
-  background: white;\r
-  border-style: dotted;\r
-  font-size: 16px;\r
-  color: #333;\r
-  position: relative; }\r
-  .b2b-profile-card .b2b-add-user i {\r
-    font-size: 30px;\r
-    padding-bottom: 15px; }\r
-\r
-.b2b-profile-card .atcenter {\r
-  cursor: pointer;\r
-  margin-top: 60%;\r
-  vertical-align: middle;\r
-  text-align: center; }\r
-\r
-.b2b-profile-card .tooltip {\r
-  cursor: pointer; }\r
-  .b2b-profile-card .tooltip .helpertext {\r
-    position: relative;\r
-    color: white; }\r
-\r
-.b2b-profile-card .tooltip-wrapper {\r
-  position: relative; }\r
-\r
-/* Overrides for tooltip absolute positioning */\r
-@media (min-width: 1025px) {\r
-  .b2b-profile-card .tooltip-size-control {\r
-    width: 100% !important; } }\r
-\r
-@-webkit-keyframes progress-bar-stripes {\r
-  from {\r
-    background-position: 0 0; }\r
-  to {\r
-    background-position: 80px 0; } }\r
-\r
-@keyframes progress-bar-stripes {\r
-  from {\r
-    background-position: 0 0; }\r
-  to {\r
-    background-position: 80px 0; } }\r
-\r
-.progress {\r
-  background-color: #e4e4e4;\r
-  border-radius: 4px;\r
-  height: 14px;\r
-  margin-bottom: 20px;\r
-  min-width: 250px;\r
-  overflow: hidden;\r
-  padding: 0;\r
-  position: relative; }\r
-\r
-a .progress {\r
-  margin-bottom: 0; }\r
-\r
-.progress .bar {\r
-  background-color: #666;\r
-  border-radius: 4px;\r
-  display: -webkit-flex;\r
-  display: -ms-flexbox;\r
-  display: flex;\r
-  height: 100%;\r
-  width: 0; }\r
-\r
-.progress-arrow {\r
-  display: -webkit-flex;\r
-  display: -ms-flexbox;\r
-  display: flex;\r
-  -webkit-align-items: center;\r
-  -ms-flex-align: center;\r
-  align-items: center;\r
-  -webkit-justify-content: flex-end;\r
-  -ms-flex-pack: end;\r
-  justify-content: flex-end; }\r
-\r
-.progress-link + .usage-bar {\r
-  margin-top: 5px; }\r
-\r
-.progress-success .bar, .progress .bar-success {\r
-  background-color: #1b7e28; }\r
-\r
-.progress-warning .bar, .progress .bar-warning {\r
-  background-color: #ef6f00; }\r
-\r
-.progress-danger .bar, .progress .bar-danger {\r
-  background-color: #cf2a2a; }\r
-\r
-.progress.increment {\r
-  display: -webkit-flex;\r
-  display: -ms-flexbox;\r
-  display: flex; }\r
-\r
-.progress.increment .bar:first-child:not(:last-child) {\r
-  border-right: none;\r
-  border-radius: 4px 0 0 4px; }\r
-\r
-.progress.increment .bar:last-child:not(:first-child) {\r
-  border-left: none;\r
-  border-radius: 0 4px 4px 0; }\r
-\r
-.progress.increment .bar + .bar:not(:last-child) {\r
-  border-left: none;\r
-  border-right: none;\r
-  border-radius: 0; }\r
-\r
-.progress.increment .bar:not(:first-child) {\r
-  border-left: 1px solid white !important; }\r
-\r
-.usage-bar {\r
-  display: table;\r
-  float: none;\r
-  width: 100%;\r
-  margin-bottom: 1px; }\r
-\r
-.usage-bar > .usage-text {\r
-  display: table-cell;\r
-  width: 1%; }\r
-\r
-.progress + .usage-bar {\r
-  margin-top: -15px; }\r
-\r
-.usage-bar .usage-text {\r
-  font-size: 1.4rem; }\r
-\r
-.usage-bar .usage-text:first-child {\r
-  white-space: nowrap; }\r
-\r
-.usage-bar .usage-text.text-right {\r
-  vertical-align: top;\r
-  font-size: 1.4rem;\r
-  width: auto !important; }\r
-\r
-.usage-bar .usage-text.text-right:before {\r
-  content: "";\r
-  display: table;\r
-  height: .1em; }\r
-\r
-.usage-bar.billing-cycle .usage-text {\r
-  font-size: 1.4rem; }\r
-\r
-.usage-bar.billing-cycle .usage-text.text-right {\r
-  vertical-align: bottom; }\r
-\r
-.progress.autocolor [data-percentage="1"], .progress.autocolor [data-percentage="2"], .progress.autocolor [data-percentage="3"], .progress.autocolor [data-percentage="4"], .progress.autocolor [data-percentage="5"], .progress.autocolor [data-percentage="6"], .progress.autocolor [data-percentage="7"], .progress.autocolor [data-percentage="8"], .progress.autocolor [data-percentage="9"], .progress.autocolor [data-percentage="10"] .progress.autocolor [data-percentage^="2"], .progress.autocolor [data-percentage^="3"], .progress.autocolor [data-percentage^="4"], .progress.autocolor [data-percentage^="5"], .progress.autocolor [data-percentage="60"], .progress.autocolor [data-percentage="61"], .progress.autocolor [data-percentage="62"], .progress.autocolor [data-percentage="63"], .progress.autocolor [data-percentage="64"] {\r
-  background-color: #1b7e28; }\r
-\r
-.progress.autocolor [data-percentage="65"], .progress.autocolor [data-percentage="66"], .progress.autocolor [data-percentage="67"], .progress.autocolor [data-percentage="68"], .progress.autocolor [data-percentage="69"], .progress.autocolor [data-percentage^="7"], .progress.autocolor [data-percentage^="8"] {\r
-  background-color: #ef6f00; }\r
-\r
-.progress.autocolor [data-percentage^="9"], .progress.autocolor [data-percentage="100"] {\r
-  background-color: #cf2a2a; }\r
-\r
-.b2b-seek-bar-container {\r
-  position: relative; }\r
-  .b2b-seek-bar-container div {\r
-    position: absolute; }\r
-  .b2b-seek-bar-container .b2b-seek-bar-track-container {\r
-    width: 100%; }\r
-  .b2b-seek-bar-container .b2b-seek-bar-track {\r
-    width: 100%;\r
-    height: 6px;\r
-    background-color: #cccccc;\r
-    border-radius: 10px; }\r
-  .b2b-seek-bar-container .b2b-seek-bar-track-fill {\r
-    width: 100%;\r
-    height: 6px;\r
-    background-color: #cccccc;\r
-    border-radius: 10px;\r
-    width: 0;\r
-    background-color: #157BB2;\r
-    transition: width 0s linear; }\r
-\r
-.seek-bar-container .seek-bar-knob-container {\r
-  transition: left 0s linear; }\r
-\r
-.b2b-seek-bar-container .b2b-seek-bar-knob {\r
-  width: 14px;\r
-  height: 14px;\r
-  border-radius: 10px;\r
-  top: -4px;\r
-  left: -8px;\r
-  border: 1px solid #cccccc;\r
-  background: white;\r
-  cursor: pointer; }\r
-\r
-.b2b-seek-bar-container .b2b-seek-bar-knob:focus {\r
-  outline: thin dotted #666; }\r
-\r
-.b2b-seek-bar-container.vertical {\r
-  width: 100%;\r
-  height: 100%;\r
-  margin: 0 auto;\r
-  position: relative;\r
-  border-radius: 10px; }\r
-  .b2b-seek-bar-container.vertical .b2b-seek-bar-track-container {\r
-    position: relative;\r
-    height: 100%; }\r
-  .b2b-seek-bar-container.vertical .b2b-seek-bar-track {\r
-    position: absolute;\r
-    height: 100%; }\r
-  .b2b-seek-bar-container.vertical .b2b-seek-bar-track-fill {\r
-    position: absolute;\r
-    bottom: 0;\r
-    height: 0;\r
-    width: 100%; }\r
-  .b2b-seek-bar-container.vertical .b2b-seek-bar-knob-container {\r
-    transition: bottom .01s linear;\r
-    position: relative;\r
-    bottom: 0; }\r
-  .b2b-seek-bar-container.vertical .b2b-seek-bar-knob {\r
-    position: absolute;\r
-    border-radius: 10px;\r
-    top: -7px;\r
-    left: -4px; }\r
-\r
-.form-search .search-query {\r
-  width: 100% !important; }\r
-\r
-.form-search .well {\r
-  margin-top: 0; }\r
-\r
-.form-search > ul.nav > li.section {\r
-  min-height: 20px !important; }\r
-\r
-input.b2b-search-input-field {\r
-  margin-bottom: 0px; }\r
-\r
-.search-suggestion-list {\r
-  background-color: #FFFFFF;\r
-  border: 1px solid #ccc;\r
-  border-radius: 0 0 6px 6px;\r
-  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);\r
-  margin-top: -5px;\r
-  max-height: 400px;\r
-  overflow-x: hidden;\r
-  overflow-y: auto;\r
-  padding: 15px 0;\r
-  position: absolute;\r
-  width: 100%;\r
-  z-index: 1000; }\r
-  .search-suggestion-list > li.active {\r
-    background-color: #cccccc; }\r
-  .search-suggestion-list:empty {\r
-    display: none; }\r
-\r
-.b2b-search-hightlight {\r
-  font-weight: bold; }\r
-\r
-input[type="text"]::-moz-placeholder {\r
-  color: #767676;\r
-  font-family: "Omnes-ECOMP-W02-Italic", Arial; }\r
-\r
-input[type="text"]:focus {\r
-  z-index: 1000; }\r
-\r
-input[type="text"] + .reset-field {\r
-  background-color: #FFFFFF;\r
-  height: 90%;\r
-  top: 5%; }\r
-\r
-.btn-search:focus {\r
-  outline: 1px dotted #0574ac; }\r
-\r
-.field-group input:not([type="button"])[disabled] ~ .btn-search {\r
-  background-color: #eee; }\r
-\r
-.btn-search[class*="btn"] {\r
-  background-color: #FFFFFF;\r
-  background-size: 20px 20px;\r
-  border-radius: 0 1.5rem 1.5rem 0;\r
-  height: 3rem;\r
-  min-width: 4.4rem !important;\r
-  right: 0.15rem;\r
-  top: 0.15rem;\r
-  width: 4.4rem; }\r
-\r
-.search-suggestion-wrapper {\r
-  margin-bottom: 15px;\r
-  position: relative; }\r
-  .search-suggestion-wrapper .no-result {\r
-    padding: 0px 15px; }\r
-\r
-.search-suggestion-item {\r
-  color: #333333;\r
-  line-height: 4rem;\r
-  padding: 0 15px;\r
-  position: relative;\r
-  z-index: 1000; }\r
-  .search-suggestion-item:hover {\r
-    background-color: #e4e4e4;\r
-    cursor: pointer; }\r
-  .search-suggestion-item:focus {\r
-    background-color: #e4e4e4;\r
-    cursor: pointer; }\r
-  .search-suggestion-item a {\r
-    color: #333333;\r
-    text-decoration: none; }\r
-\r
-.btn-search i {\r
-  color: #767676; }\r
-\r
-input.b2b-search-input-field:focus ~ .btn-search > i, .btn-search:focus > i {\r
-  color: #0568ae; }\r
-\r
-button.btn-search[disabled] {\r
-  cursor: not-allowed; }\r
-  button.btn-search[disabled] i {\r
-    color: #767676; }\r
-\r
-.linkSelectorModule {\r
-  position: relative;\r
-  height: 32px;\r
-  line-height: 20px;\r
-  border: 0px;\r
-  width: auto;\r
-  display: block; }\r
-  .linkSelectorModule .icon-primary-down {\r
-    font-size: 23px;\r
-    margin-top: -10px;\r
-    position: absolute;\r
-    top: 50%;\r
-    margin-left: -30px; }\r
-  .linkSelectorModule .selectModule {\r
-    background-color: transparent;\r
-    border: none;\r
-    color: #0568ae;\r
-    cursor: pointer;\r
-    border: 1px solid transparent;\r
-    box-shadow: none;\r
-    padding-right: 35px;\r
-    position: relative;\r
-    user-select: none;\r
-    font-size: 1.6rem; }\r
-    .linkSelectorModule .selectModule:focus {\r
-      border: 1px dotted #ccc;\r
-      box-shadow: none;\r
-      -moz-user-select: none; }\r
-    .linkSelectorModule .selectModule:hover {\r
-      text-decoration: underline; }\r
-  .linkSelectorModule .active + .moduleWrapper:before {\r
-    background-color: #FFFFFF;\r
-    border-color: #d2d2d2;\r
-    border-style: solid;\r
-    border-width: 1px 1px 0 0;\r
-    content: "";\r
-    display: block;\r
-    height: 15px;\r
-    right: 122px;\r
-    margin: 0;\r
-    position: absolute;\r
-    top: -8px;\r
-    -webkit-transform: rotate(-45deg);\r
-    transform: rotate(-45deg);\r
-    width: 15px; }\r
-  .linkSelectorModule .moduleWrapper {\r
-    top: 40px; }\r
-  .linkSelectorModule ul.awd-module-list {\r
-    border-radius: 6px 6px 0px 0px; }\r
-\r
-.selectorModule .icon-primary-down {\r
-  font-size: 23px;\r
-  margin-top: -11px;\r
-  position: absolute;\r
-  right: 4px;\r
-  top: 50%; }\r
-\r
-.selectorModule .selectModule {\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 6px;\r
-  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);\r
-  display: block;\r
-  width: 100%;\r
-  padding-left: 15px;\r
-  background-color: transparent;\r
-  cursor: pointer; }\r
-  .selectorModule .selectModule:focus {\r
-    border: 1px solid #0568ae;\r
-    -moz-user-select: none; }\r
-  .selectorModule .selectModule span.module-data {\r
-    position: absolute;\r
-    bottom: 6px;\r
-    line-height: 20px; }\r
-  .selectorModule .selectModule img + span.module-data {\r
-    padding-left: 45px; }\r
-\r
-.selectorModule .selectModule.active {\r
-  border-bottom-right-radius: 0px;\r
-  border-bottom-left-radius: 0px; }\r
-\r
-.selectorModule .moduleWrapper {\r
-  position: absolute;\r
-  width: 100% !important;\r
-  border-top: none; }\r
-\r
-.selectorModule ul.awd-module-list {\r
-  border-radius: 0px 0px 6px 6px; }\r
-\r
-.selectorModule .large > img {\r
-  height: 30px;\r
-  position: absolute;\r
-  width: 30px;\r
-  top: 20px;\r
-  left: 15px; }\r
-\r
-.selectModule {\r
-  background-color: transparent;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  color: #333333;\r
-  font-size: 1.6rem;\r
-  height: 36px;\r
-  line-height: 35px;\r
-  margin-bottom: 0;\r
-  position: relative;\r
-  text-align: left;\r
-  top: 0;\r
-  z-index: 10;\r
-  padding: 0px;\r
-  margin: 0px;\r
-  cursor: pointer; }\r
-\r
-.moduleWrapper {\r
-  background-color: #FFFFFF;\r
-  position: absolute;\r
-  color: #191919;\r
-  z-index: 9999;\r
-  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15);\r
-  border-radius: 0px 0px 6px 6px; }\r
-  .moduleWrapper .module-list-item img {\r
-    height: 30px;\r
-    position: absolute;\r
-    width: 30px;\r
-    top: 30px;\r
-    left: 15px;\r
-    align-self: center; }\r
-  .moduleWrapper span {\r
-    display: block;\r
-    white-space: nowrap;\r
-    font-size: 1.5rem; }\r
-\r
-.awd-module-list {\r
-  overflow-y: auto;\r
-  z-index: 9999;\r
-  max-height: 360px;\r
-  border: 1px solid #d2d2d2; }\r
-  .awd-module-list .module-list-item > .module-data {\r
-    overflow: ellipsis;\r
-    white-space: nowrap;\r
-    line-height: 20px;\r
-    font-size: 1.6rem;\r
-    border-bottom: 1px dotted #959595;\r
-    margin: 0px 15px 0px 15px;\r
-    padding-right: 50px;\r
-    padding-bottom: 14px;\r
-    padding-top: 14px;\r
-    align-self: center;\r
-    width: 100%; }\r
-  .awd-module-list .module-list-item:hover {\r
-    background-color: #f2f2f2; }\r
-  .awd-module-list .module-list-item:active {\r
-    background-color: #f2f2f2; }\r
-  .awd-module-list .module-list-item[aria-selected="true"] {\r
-    background-color: #f2f2f2; }\r
-\r
-.module-list-item {\r
-  cursor: pointer;\r
-  overflow: hidden;\r
-  position: relative;\r
-  overflow: ellipsis;\r
-  white-space: nowrap;\r
-  z-index: 1000;\r
-  color: #191919;\r
-  display: flex; }\r
-  .module-list-item:last-of-type .module-data {\r
-    border-bottom: none; }\r
-  .module-list-item img + span.module-data {\r
-    padding-left: 45px; }\r
-\r
-.module-groups:first-of-type .module-list-item:last-of-type .module-data {\r
-  border-bottom: 1px solid #959595; }\r
-\r
-.module-groupitem {\r
-  padding-bottom: 4px; }\r
-\r
-.selectorModule.large {\r
-  height: 72px;\r
-  vertical-align: middle;\r
-  text-align: left; }\r
-  .selectorModule.large .moduleWrapper {\r
-    top: 71px; }\r
-  .selectorModule.large input {\r
-    height: 72px;\r
-    vertical-align: middle;\r
-    text-align: left; }\r
-  .selectorModule.large button {\r
-    height: 72px;\r
-    vertical-align: middle;\r
-    text-align: left; }\r
-  .selectorModule.large .selectModule img {\r
-    left: 15px;\r
-    top: 21px; }\r
-\r
-ul.module-groupitem li {\r
-  margin: 0 -15px 0 -15px; }\r
-\r
-span.module-data span {\r
-  display: block;\r
-  line-height: 20px;\r
-  font-size: 1.5rem; }\r
-\r
-li.module-groups {\r
-  cursor: default !important;\r
-  padding: 18px 15px 0px 15px; }\r
-\r
-li.module-list-item[selected]:before {\r
-  box-sizing: border-box;\r
-  display: inline-block;\r
-  font-size: 2em;\r
-  height: 1em;\r
-  position: absolute;\r
-  top: 20px;\r
-  right: 0px;\r
-  vertical-align: middle;\r
-  width: 1em;\r
-  color: #007a3e; }\r
-\r
-ul.module-optinalcta {\r
-  position: relative;\r
-  height: 44px;\r
-  margin-top: 0px;\r
-  border-bottom: 1px solid #d2d2d2;\r
-  border-left: 1px solid #d2d2d2;\r
-  border-right: 1px solid #d2d2d2;\r
-  border-radius: 0px 0px 6px 6px; }\r
-  ul.module-optinalcta li {\r
-    position: absolute;\r
-    bottom: 10px; }\r
-  ul.module-optinalcta a {\r
-    text-indent: 15px;\r
-    padding: 15px; }\r
-\r
-.b2b-slider-container {\r
-  position: relative; }\r
-  .b2b-slider-container.slider-disabled {\r
-    cursor: not-allowed !important; }\r
-  .b2b-slider-container div {\r
-    position: absolute; }\r
-  .b2b-slider-container .slider-track-container {\r
-    width: 100%;\r
-    cursor: pointer; }\r
-  .b2b-slider-container .slider-track {\r
-    width: 100%;\r
-    height: 6px;\r
-    background-color: #cccccc;\r
-    border-radius: 10px; }\r
-  .b2b-slider-container .slider-track-fill {\r
-    width: 100%;\r
-    height: 6px;\r
-    background-color: #cccccc;\r
-    border-radius: 10px;\r
-    width: 0;\r
-    background-color: #157BB2;\r
-    transition: width 0s linear; }\r
-  .b2b-slider-container .slider-knob-container {\r
-    transition: left 0s linear; }\r
-    .b2b-slider-container .slider-knob-container.slider-knob-hidden {\r
-      display: none !important; }\r
-  .b2b-slider-container .slider-knob {\r
-    width: 14px;\r
-    height: 14px;\r
-    border-radius: 10px;\r
-    top: -4px;\r
-    left: -8px;\r
-    border: 1px solid #cccccc;\r
-    background: white;\r
-    cursor: pointer; }\r
-    .b2b-slider-container .slider-knob:focus {\r
-      outline: thin dotted #666; }\r
-\r
-.b2b-slider-endpoints-container {\r
-  margin-top: 13px;\r
-  color: #333;\r
-  font-size: 12px; }\r
-  .b2b-slider-endpoints-container .b2b-slider-endpoints-left {\r
-    float: left;\r
-    line-height: 100%; }\r
-  .b2b-slider-endpoints-container .b2b-slider-endpoints-right {\r
-    float: right;\r
-    line-height: 100%; }\r
-  .b2b-slider-endpoints-container::after {\r
-    clear: both;\r
-    content: "";\r
-    display: block; }\r
-\r
-.b2b-slider-container.vertical {\r
-  width: 100%;\r
-  height: 100%;\r
-  margin: 0 auto;\r
-  position: relative;\r
-  border-radius: 10px; }\r
-  .b2b-slider-container.vertical .slider-track-container {\r
-    position: relative;\r
-    height: 100%; }\r
-  .b2b-slider-container.vertical .slider-track {\r
-    position: absolute;\r
-    height: 100%; }\r
-  .b2b-slider-container.vertical .slider-track-fill {\r
-    position: absolute;\r
-    bottom: 0;\r
-    height: 0;\r
-    width: 100%; }\r
-  .b2b-slider-container.vertical .slider-knob-container {\r
-    transition: bottom 0s linear;\r
-    position: relative;\r
-    bottom: 0; }\r
-    .b2b-slider-container.vertical .slider-knob-container.slider-knob-hidden {\r
-      display: none !important; }\r
-  .b2b-slider-container.vertical .slider-knob {\r
-    position: absolute;\r
-    border-radius: 10px;\r
-    top: -7px;\r
-    left: -4px; }\r
-\r
-.icon-primary-spinner {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20id%3D%22svg-spinner%22%20x%3D%220px%22%20y%3D%220px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%20%20%20%3Cpath%20fill%3D%22%23F5F5F5%22%20d%3D%22M18%2036C8.1%2036%200%2027.9%200%2018S8.1%200%2018%200s18%208.1%2018%2018-8.1%2018-18%2018zm0-31.5c-7.5%200-13.5%206-13.5%2013.5S10.6%2031.5%2018%2031.5c7.5%200%2013.5-6.1%2013.5-13.5%200-7.5-6-13.5-13.5-13.5z%22%2F%3E%0A%20%20%20%3Cpath%20fill%3D%22%230568AE%22%20id%3D%22spinner%22%20d%3D%22M30.7%205.3l-3.1%203.2c2.4%202.4%203.9%205.8%203.9%209.5%200%207.4-6.1%2013.5-13.5%2013.5S4.5%2025.4%204.5%2018%2010.6%204.5%2018%204.5V0C8.1%200%200%208.1%200%2018s8.1%2018%2018%2018%2018-8.1%2018-18c0-5-2-9.5-5.3-12.7z%22%3E%0A%20%20%20%20%20%20%3CanimateTransform%20%0A%20%20%20%20%20%20%20%20%20attributeType%3D%22xml%22%0A%20%20%20%20%20%20%20%20%20attributeName%3D%22transform%22%0A%20%20%20%20%20%20%20%20%20type%3D%22rotate%22%0A%20%20%20%20%20%20%20%20%20from%3D%220%2018%2018%22%0A%20%20%20%20%20%20%20%20%20to%3D%22360%2018%2018%22%0A%20%20%20%20%20%20%20%20%20dur%3D%221.0s%22%0A%20%20%20%20%20%20%20%20%20repeatCount%3D%22indefinite%22%0A%20%20%20%20%20%20%2F%3E%0A%20%20%20%3C%2Fpath%3E%0A%3C%2Fsvg%3E");\r
-  height: 50px;\r
-  width: 50px; }\r
-\r
-.icon-primary-spinner.small {\r
-  margin-right: 5px;\r
-  height: 30px !important;\r
-  width: 30px !important; }\r
-\r
-.isIE .icon-primary-spinner,\r
-.isIE .icon-primary-spinner.small {\r
-  animation: spinner 1s linear infinite; }\r
-\r
-.ds2-no-colors .icon-primary-spinner {\r
-  animation: spinner 1s linear infinite;\r
-  border: 5px dotted transparent;\r
-  border-radius: 50%; }\r
-\r
-@keyframes spinner {\r
-  0% {\r
-    transform: rotate(0deg); }\r
-  100% {\r
-    transform: rotate(359deg); } }\r
-\r
-.b2b-status-tracker > .btn-arrow:nth-of-type(1) {\r
-  margin-right: 10px; }\r
-\r
-.b2b-status-tracker > .btn-arrow:nth-of-type(2) {\r
-  margin-left: 20px; }\r
-\r
-.b2b-status-tracker > .btn-arrow {\r
-  height: 20px;\r
-  margin-top: 25px;\r
-  overflow: visible; }\r
-  .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-left {\r
-    margin-right: 5px;\r
-    color: #0574ac; }\r
-  .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-right {\r
-    color: #0574ac; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step {\r
-  padding: 0;\r
-  position: relative; }\r
-\r
-.b2b-status-tracker-step {\r
-  margin-left: 5px; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step .b2b-status-tracker-heading {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  color: #767676;\r
-  margin-bottom: 10px; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-heading {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #1b7e28; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.complete > .progress > .progress-bar {\r
-  width: 100%;\r
-  background-color: #1b7e28; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-estimate {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #333333; }\r
-  .b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-estimate > .icoControls-approval {\r
-    color: #1b7e28; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.current > .b2b-status-tracker-heading {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #333333; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.current > .progress > .progress-bar {\r
-  width: 100%;\r
-  background-color: #333333; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step.current > .b2b-status-tracker-estimate > .icon-misc-time {\r
-  color: #333333; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step > .progress {\r
-  position: relative;\r
-  border-radius: 1.5px;\r
-  height: 3px;\r
-  margin-bottom: 10px;\r
-  background-color: #c5c5c5; }\r
-  .b2b-status-tracker > .b2b-status-tracker-step > .progress > .progress-bar {\r
-    width: 0;\r
-    height: 3px; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-estimate {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  color: #767676;\r
-  margin-bottom: 10px; }\r
-  .b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-estimate > .icon-misc-time {\r
-    color: #767676; }\r
-\r
-.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-description {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 12px;\r
-  color: #767676;\r
-  padding-right: 15px; }\r
-\r
-.step-indicator {\r
-  height: auto;\r
-  padding: 40px 0; }\r
-\r
-.step-heading {\r
-  color: #333333;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 3.8rem;\r
-  line-height: 0.8; }\r
-\r
-.steps {\r
-  display: flex;\r
-  height: 5px;\r
-  margin-top: 60px;\r
-  position: relative; }\r
-\r
-.steps li {\r
-  color: #5a5a5a;\r
-  flex: 1;\r
-  margin-right: 5px;\r
-  background-color: #c4c4c4;\r
-  outline: 1px solid transparent; }\r
-\r
-.steps li:first-child {\r
-  border-radius: 4px 0 0 4px; }\r
-\r
-.steps li:last-child {\r
-  margin-right: 0;\r
-  border-radius: 0 4px 4px 0; }\r
-\r
-.steps li.step-on,\r
-.steps li.step-done {\r
-  background-color: #007a3e;\r
-  color: #007a3e;\r
-  border: 1px solid transparent; }\r
-\r
-.step-text {\r
-  bottom: 29px;\r
-  display: inline-block;\r
-  font-size: 1.8rem;\r
-  margin-top: 0;\r
-  position: relative;\r
-  white-space: nowrap; }\r
-\r
-.step-on .step-text {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.steps li .step-text[data-large-text]:before {\r
-  content: attr(data-large-text) " "; }\r
-\r
-.step-confirmation {\r
-  color: #007a3e;\r
-  margin-bottom: 30px; }\r
-\r
-.step-confirmation > div {\r
-  display: flex; }\r
-\r
-.step-confirmation > div i {\r
-  color: #007a3e;\r
-  font-size: 50px;\r
-  margin-right: 10px; }\r
-\r
-.step-confirmation.centered > div i {\r
-  margin-left: -60px; }\r
-\r
-.step-confirmation > div h3 {\r
-  font-size: 2.4rem;\r
-  margin: 26px 0 20px; }\r
-\r
-.step-confirmation > p {\r
-  margin: 0; }\r
-\r
-@media (max-width: 1024px) {\r
-  .step-indicator {\r
-    padding: 25px 0; }\r
-  .steps {\r
-    margin-top: 0; }\r
-  .step-heading {\r
-    font-size: 2.4rem;\r
-    margin-bottom: 11px; }\r
-  .step-text {\r
-    display: none; }\r
-  .step-on .step-text {\r
-    bottom: 6px;\r
-    display: block;\r
-    font-size: 1.2rem;\r
-    left: 0;\r
-    line-height: 1;\r
-    margin-top: 10px;\r
-    position: absolute;\r
-    top: 4px; }\r
-  .steps li .step-text[data-sm-text]:before {\r
-    content: attr(data-sm-text) " ";\r
-    color: #333333; }\r
-  .step-confirmation {\r
-    margin-top: 30px !important; } }\r
-\r
-@media (max-width: 767px) {\r
-  .step-confirmation.centered > div i {\r
-    margin-left: 0; }\r
-  .step-confirmation.centered > p {\r
-    margin-left: 40px; }\r
-  .step-confirmation > div h3 {\r
-    font-size: 1.8rem;\r
-    margin: 13px 0 10px; }\r
-  .step-confirmation > div i {\r
-    font-size: 30px;\r
-    margin-right: 10px; } }\r
-\r
-.step-indicator.vertical {\r
-  height: auto; }\r
-\r
-.vertical .step-heading {\r
-  font-size: 24px; }\r
-\r
-.vertical .steps {\r
-  display: block;\r
-  height: inherit;\r
-  width: 100%; }\r
-\r
-.vertical .steps li {\r
-  align-items: center;\r
-  background-color: transparent;\r
-  display: flex;\r
-  height: 60px;\r
-  margin: 0 0 4px;\r
-  padding: 0 0 0 20px;\r
-  position: relative; }\r
-\r
-.vertical .steps li .step-text {\r
-  align-self: center;\r
-  color: #0568ae;\r
-  display: block;\r
-  margin: 0;\r
-  position: relative;\r
-  font-size: 14px;\r
-  top: 0; }\r
-\r
-.vertical .steps li .step-text[data-large-text]:before {\r
-  content: attr(data-large-text) " "; }\r
-\r
-.vertical .steps li:after {\r
-  background-color: transparent;\r
-  border-left: 4px solid #d2d2d2;\r
-  content: "";\r
-  height: 60px;\r
-  left: 0;\r
-  margin: 0;\r
-  padding: 0;\r
-  position: absolute;\r
-  top: 0;\r
-  width: 4px; }\r
-\r
-.vertical .steps li.step-on:after,\r
-.vertical .steps li.step-done:after {\r
-  border-color: #0568ae; }\r
-\r
-.b2b-step-tracker {\r
-  height: auto;\r
-  padding: 0px 0px 0px 0px; }\r
-  .b2b-step-tracker .btn.btn-left {\r
-    margin-right: 10px; }\r
-  .b2b-step-tracker .btn.btn-right {\r
-    margin-left: 5px; }\r
-  .b2b-step-tracker .b2b-left-arrow {\r
-    float: left;\r
-    margin-top: -5px; }\r
-  .b2b-step-tracker .b2b-right-arrow {\r
-    float: right;\r
-    margin-top: -5px; }\r
-  .b2b-step-tracker .b2b-steps {\r
-    display: flex;\r
-    height: 5px;\r
-    margin-top: 30px;\r
-    position: relative; }\r
-    .b2b-step-tracker .b2b-steps li {\r
-      color: #767676;\r
-      flex: 1;\r
-      margin-right: 5px;\r
-      background-color: #767676;\r
-      outline: 1px solid transparent;\r
-      height: 3px; }\r
-      .b2b-step-tracker .b2b-steps li.b2b-step-done {\r
-        background-color: #1b7e28;\r
-        color: #007a3e;\r
-        height: 3px; }\r
-      .b2b-step-tracker .b2b-steps li.b2b-step-on {\r
-        background-color: #333333;\r
-        color: #333333;\r
-        height: 3px;\r
-        font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-      .b2b-step-tracker .b2b-steps li .b2b-step-text {\r
-        bottom: 29px;\r
-        display: inline-block;\r
-        font-size: 14px;\r
-        margin-top: 0;\r
-        position: relative;\r
-        white-space: nowrap; }\r
-      .b2b-step-tracker .b2b-steps li .b2b-step-text[data-large-text]:before {\r
-        content: attr(data-large-text) " "; }\r
-    .b2b-step-tracker .b2b-steps li:first-child {\r
-      border-radius: 2px 0 0 2px; }\r
-    .b2b-step-tracker .b2b-steps li:last-child {\r
-      margin-right: 0;\r
-      border-radius: 0 2px 2px 0; }\r
-\r
-@media (max-width: 1024px) {\r
-  .b2b-step-tracker {\r
-    padding: 25px 0; }\r
-    .b2b-step-tracker .b2b-steps {\r
-      margin-top: 0; }\r
-      .b2b-step-tracker .b2b-steps li .b2b-step-text {\r
-        display: none; }\r
-      .b2b-step-tracker .b2b-steps li .b2b-step-text[data-sm-text]:before {\r
-        content: attr(data-sm-text) " ";\r
-        color: #333333; }\r
-      .b2b-step-tracker .b2b-steps li.b2b-step-on .b2b-step-text {\r
-        bottom: 6px;\r
-        display: block;\r
-        font-size: 10px;\r
-        left: 0;\r
-        line-height: 1;\r
-        margin-top: 10px;\r
-        position: absolute;\r
-        top: 4px; } }\r
-\r
-.strength-meter-container {\r
-  height: 26px;\r
-  max-width: 450px; }\r
-\r
-.strength-meter-gauge {\r
-  border-radius: 2px;\r
-  background-color: #d2d2d2;\r
-  height: 5px;\r
-  display: block;\r
-  position: relative;\r
-  outline: 1px solid transparent; }\r
-\r
-.strength-meter-gauge-fill {\r
-  height: 100%;\r
-  display: block;\r
-  border-radius: 2px;\r
-  text-indent: -9999px;\r
-  width: 0%;\r
-  border: 2px solid transparent; }\r
-\r
-.strength-meter-gauge-fill.strength-meter-animate {\r
-  transition: width 0.5s linear, background-color 0.5s linear; }\r
-\r
-.strength-meter-animate[style*="20"] {\r
-  background-color: #cf2a2a; }\r
-\r
-.strength-meter-animate[style*="20"] + .strength-meter-divider + .strength-meter-content:after {\r
-  content: "Unacceptable"; }\r
-\r
-.strength-meter-animate[style*="40"] {\r
-  background-color: #ea7400; }\r
-\r
-.strength-meter-animate[style*="40"] + .strength-meter-divider + .strength-meter-content:after {\r
-  content: "Weak"; }\r
-\r
-.strength-meter-animate[style*="60"] {\r
-  background-color: #ea7400; }\r
-\r
-.strength-meter-animate[style*="60"] + .strength-meter-divider + .strength-meter-content:after {\r
-  content: "Fair"; }\r
-\r
-.strength-meter-animate[style*="80"] {\r
-  background-color: #007a3e; }\r
-\r
-.strength-meter-animate[style*="80"] + .strength-meter-divider + .strength-meter-content:after {\r
-  content: "Good"; }\r
-\r
-.strength-meter-animate[style*="100"] {\r
-  background-color: #007a3e; }\r
-\r
-.strength-meter-animate[style*="100"] + .strength-meter-divider + .strength-meter-content:after {\r
-  content: "Excellent"; }\r
-\r
-.strength-meter-divider {\r
-  position: absolute;\r
-  top: 0;\r
-  bottom: 0;\r
-  left: 0;\r
-  right: 0;\r
-  display: flex;\r
-  overflow: hidden; }\r
-\r
-.strength-meter-divider span {\r
-  background: transparent;\r
-  display: block;\r
-  flex-grow: 1;\r
-  border-right: solid 1px #fff; }\r
-\r
-.strength-meter-divider span:first-child {\r
-  border-radius: 2px 0 0 2px; }\r
-\r
-.strength-meter-divider span + .strength-meter-divider span {\r
-  border-radius: 0; }\r
-\r
-.strength-meter-divider span:last-child {\r
-  border-radius: 0 2px 2px 0;\r
-  border-right: 0; }\r
-\r
-.strength-meter-content {\r
-  font-size: 14px;\r
-  line-height: 1;\r
-  padding-top: 7px;\r
-  position: absolute; }\r
-\r
-.strength-meter-content:before {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  content: "Password strength: "; }\r
-\r
-.strength-meter-content:after {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.strength-meter-container {\r
-  height: 26px;\r
-  min-width: 290px;\r
-  max-width: 450px; }\r
-\r
-.strength-meter-container .strength-meter-gauge {\r
-  border-radius: 2px;\r
-  background-color: #cccccc;\r
-  box-shadow: 0 1px 1px -1px #333 inset;\r
-  height: 5px;\r
-  display: block;\r
-  overflow: hidden;\r
-  position: relative; }\r
-\r
-.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill {\r
-  height: 100%;\r
-  box-shadow: 0 1px 1px -1px #999 inset;\r
-  display: block;\r
-  text-indent: -9999px;\r
-  width: 0%; }\r
-\r
-.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill.strength-meter-animate {\r
-  transition: width 0ms ease-out, background-color 0ms ease-in; }\r
-\r
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider {\r
-  position: absolute;\r
-  top: 0;\r
-  bottom: 0;\r
-  left: 0;\r
-  right: 0;\r
-  display: flex; }\r
-\r
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span {\r
-  background: transparent;\r
-  display: block;\r
-  flex-grow: 1;\r
-  border-right: solid 1px #fff; }\r
-\r
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span:last-child {\r
-  border-right: 0; }\r
-\r
-.strength-meter-container > .strength-meter-content {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  line-height: 1;\r
-  padding-top: 7px; }\r
-\r
-.strength-meter-container > .strength-meter-content:before {\r
-  content: none; }\r
-\r
-.strength-meter-container > .strength-meter-content > .strength-meter-content-state {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial; }\r
-\r
-.btn-switch-label {\r
-  display: flex;\r
-  align-items: center; }\r
-  .btn-switch-label:focus .btn-switch {\r
-    outline: 1px dotted #666;\r
-    outline-offset: 5px; }\r
-  .btn-switch-label input:focus .btn-switch {\r
-    outline: 1px dotted #666;\r
-    outline-offset: 5px; }\r
-  .btn-switch-label > span {\r
-    flex: 1; }\r
-\r
-.btn-switch {\r
-  background-color: #fff;\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 16px;\r
-  box-shadow: 0 4px 5px -5px rgba(0, 0, 0, 0.15) inset, 0 5px 5px -5px rgba(0, 0, 0, 0.15);\r
-  height: 32px;\r
-  overflow: hidden;\r
-  position: relative;\r
-  width: 80px;\r
-  user-select: none; }\r
-  .btn-switch input[type="checkbox"] {\r
-    left: 0;\r
-    margin: 0;\r
-    opacity: 0;\r
-    position: absolute;\r
-    top: 0;\r
-    transition: none; }\r
-    .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on .activo {\r
-      font: 0px/0 "Omnes-ECOMP-W02"; }\r
-    .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on + .btn + .btn-slider-off .inactivo {\r
-      font: 0px/0 "Omnes-ECOMP-W02"; }\r
-  .btn-switch input:checked + .switch-overlay {\r
-    left: 0;\r
-    transition: all .3s linear .0s; }\r
-    .btn-switch input:checked + .switch-overlay .switch-handle {\r
-      background-color: #007a3e;\r
-      background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);\r
-      transition: background-color 0.3s linear 0s;\r
-      border: 1px solid transparent; }\r
-  .btn-switch input + .switch-overlay {\r
-    left: -48px;\r
-    transition: all .3s linear .0s; }\r
-    .btn-switch input + .switch-overlay .switch-handle {\r
-      background-color: #f2f2f2;\r
-      background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);\r
-      transition: background-color 0.3s linear 0s;\r
-      border: 1px solid #d2d2d2; }\r
-  .btn-switch input[disabled] + .switch-overlay {\r
-    left: 0;\r
-    width: 100% !important;\r
-    background-color: #d2d2d2;\r
-    color: #959595;\r
-    cursor: not-allowed !important; }\r
-    .btn-switch input[disabled] + .switch-overlay .btn-slider-on {\r
-      display: none; }\r
-    .btn-switch input[disabled] + .switch-overlay .activo {\r
-      display: none; }\r
-    .btn-switch input[disabled] + .switch-overlay .switch-handle {\r
-      display: none; }\r
-    .btn-switch input[disabled] + .switch-overlay .btn-slider-off {\r
-      left: 0;\r
-      text-align: center;\r
-      padding: 0; }\r
-  .btn-switch input[disabled]:checked + .switch-overlay {\r
-    left: 0;\r
-    width: 100% !important;\r
-    background-color: #fff; }\r
-    .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off {\r
-      display: none; }\r
-      .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off + .inactivo {\r
-        display: none; }\r
-    .btn-switch input[disabled]:checked + .switch-overlay .switch-handle {\r
-      display: none; }\r
-    .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-on {\r
-      display: block;\r
-      text-align: center;\r
-      padding: 0;\r
-      color: #007a3e !important;\r
-      font-weight: bold; }\r
-    .btn-switch input[disabled]:checked + .switch-overlay .activo {\r
-      display: block;\r
-      text-align: center;\r
-      padding: 0;\r
-      color: #007a3e !important;\r
-      font-weight: bold; }\r
-  .btn-switch input[disabled]:checked + .btn-slider-on {\r
-    display: block; }\r
-  .btn-switch input[disabled] + .btn-slider-on + .switch-handle {\r
-    width: 100%;\r
-    margin: 0; }\r
-    .btn-switch input[disabled] + .btn-slider-on + .switch-handle + .btn-slider-off {\r
-      display: block; }\r
-  .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on {\r
-    display: none; }\r
-    .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo {\r
-      border: medium none;\r
-      color: #666;\r
-      font: 16px/32px "Omnes-ECOMP-W02";\r
-      height: auto;\r
-      margin: 0 auto;\r
-      width: auto; }\r
-      .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo:before {\r
-        display: none; }\r
-    .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {\r
-      display: block;\r
-      padding: 0;\r
-      text-align: center;\r
-      color: #333333; }\r
-      .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo {\r
-        border: medium none;\r
-        color: #666;\r
-        font: 16px/32px "Omnes-ECOMP-W02";\r
-        height: auto;\r
-        margin: 0 auto;\r
-        width: auto; }\r
-        .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo:before {\r
-          display: none; }\r
-  .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on {\r
-    display: block;\r
-    padding: 0;\r
-    text-align: center;\r
-    color: #007a3e; }\r
-    .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {\r
-      display: none; }\r
-  .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .activo {\r
-    color: #007a3e;\r
-    font-weight: bold; }\r
-\r
-.switch-overlay {\r
-  border-radius: 16px;\r
-  color: black !important;\r
-  font-size: 1.6rem;\r
-  height: 32px;\r
-  left: 0;\r
-  position: absolute;\r
-  top: -1px;\r
-  width: 126px;\r
-  overflow: hidden; }\r
-\r
-.btn-slider-on {\r
-  left: -1px;\r
-  text-align: left;\r
-  padding-left: 12px;\r
-  display: inline-block;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  height: 32px;\r
-  line-height: 32px;\r
-  position: absolute;\r
-  top: 1px;\r
-  width: 80px; }\r
-\r
-.btn-slider-off {\r
-  display: inline-block;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  height: 32px;\r
-  line-height: 32px;\r
-  position: absolute;\r
-  top: 1px;\r
-  width: 80px;\r
-  right: 1px;\r
-  text-align: right;\r
-  padding-right: 11px; }\r
-\r
-.switch-handle {\r
-  border-radius: 50%;\r
-  display: inline-block;\r
-  height: 26px;\r
-  left: 50px;\r
-  position: absolute;\r
-  top: 3px;\r
-  width: 26px; }\r
-\r
-.activo {\r
-  display: block;\r
-  font-size: 0.1px;\r
-  line-height: 40px;\r
-  overflow: hidden; }\r
-  .activo:before {\r
-    background-image: none;\r
-    border-left: 3px solid #007a3e;\r
-    content: " ";\r
-    height: 18px;\r
-    left: 22px;\r
-    margin: 2px auto;\r
-    position: absolute;\r
-    top: 5px;\r
-    width: 0; }\r
-\r
-.inactivo {\r
-  font-size: 0.1px;\r
-  line-height: 40px; }\r
-  .inactivo:before {\r
-    background-image: none;\r
-    border: 3px solid #959595;\r
-    border-radius: 100%;\r
-    content: " ";\r
-    display: block;\r
-    position: absolute;\r
-    top: 4px;\r
-    right: 3px;\r
-    height: 16px;\r
-    width: 16px; }\r
-\r
-table {\r
-  max-width: 100%;\r
-  background-color: transparent;\r
-  border-collapse: collapse;\r
-  border-spacing: 0;\r
-  width: 100%;\r
-  margin-bottom: 20px; }\r
-\r
-table caption {\r
-  text-align: left; }\r
-\r
-table thead th {\r
-  vertical-align: bottom; }\r
-\r
-table th,\r
-table td {\r
-  padding: 19px 20px;\r
-  line-height: 1;\r
-  font-size: 1.4rem;\r
-  text-align: left;\r
-  vertical-align: top;\r
-  word-wrap: break-word; }\r
-\r
-table th {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 1.6rem;\r
-  font-weight: normal;\r
-  color: #333333;\r
-  padding: 13px 20px; }\r
-\r
-table tbody td {\r
-  border-left: 1px solid #d2d2d2;\r
-  border-top: 1px solid #d2d2d2; }\r
-\r
-table tbody td:first-child {\r
-  border-left: none; }\r
-\r
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header,\r
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header + .accordion-content,\r
-.tiny-accordion.iconleft.accordion-table-layout .inactive-toggle-header {\r
-  padding: 0 0 0 50px; }\r
-\r
-.faux-table-cell,\r
-.inactive-toggle-header .faux-table-cell {\r
-  display: table-cell;\r
-  width: 100%;\r
-  padding: 13px 0 10px 0;\r
-  font-size: 16px;\r
-  color: #333333; }\r
-\r
-.accordion-content .faux-table-cell {\r
-  display: table-cell;\r
-  width: 100%;\r
-  padding: 0 0 10px 0; }\r
-\r
-.faux-table-cell:last-child {\r
-  text-align: right;\r
-  min-width: 100px;\r
-  max-width: 150px;\r
-  width: 1%;\r
-  background-color: #f2f2f2;\r
-  color: #333333;\r
-  font-size: 14px;\r
-  border-left: 1px solid #d2d2d2;\r
-  padding: 0 20px 0 10px; }\r
-\r
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {\r
-  opacity: 1; }\r
-\r
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {\r
-  opacity: 0;\r
-  transition: opacity .3s linear .2s; }\r
-\r
-@media (max-width: 767px) {\r
-  table th,\r
-  table td {\r
-    padding: 19px 10px; }\r
-  table th:first-child,\r
-  table td:first-child {\r
-    padding: 19px 15px; } }\r
-\r
-.data-row-list ul > li {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important; }\r
-\r
-table {\r
-  border-bottom: 1px solid #d2d2d2; }\r
-\r
-table th,\r
-table td {\r
-  padding: 15px 15px 10px; }\r
-\r
-.data-row .col-1 {\r
-  white-space: nowrap;\r
-  padding: 15px 15px 0 15px;\r
-  position: relative;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.4rem;\r
-  border-top: 1px solid #d2d2d2; }\r
-\r
-.data-row.has-button .col-1 {\r
-  padding: 0; }\r
-\r
-.complex-table .data-row .col-1 {\r
-  color: #0568ae;\r
-  cursor: pointer; }\r
-\r
-.data-row.opened {\r
-  box-shadow: 0 -2px 0 0 #d2d2d2; }\r
-\r
-.data-row.opened td,\r
-.data-row.opened th {\r
-  border-left: 1px solid transparent;\r
-  border-bottom: 1px solid transparent; }\r
-\r
-.data-row.opened + .data-row-list {\r
-  box-shadow: 0 1px 0 0 #d2d2d2; }\r
-\r
-.data-row.opened + .data-row-list > td {\r
-  padding-top: 0; }\r
-\r
-.data-row.opened + .data-row-list + .data-row.opened {\r
-  box-shadow: 0 -1px 0 0 #d2d2d2; }\r
-\r
-.data-row button {\r
-  background-color: transparent;\r
-  border: medium none;\r
-  border-radius: 0;\r
-  color: #0568ae;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.4rem;\r
-  left: 0;\r
-  margin: 0;\r
-  padding: 12px 15px 7px;\r
-  position: relative;\r
-  text-align: left;\r
-  top: 0;\r
-  vertical-align: middle; }\r
-\r
-.data-row button:focus {\r
-  outline: 1px dotted black; }\r
-\r
-.data-row .col-1 i {\r
-  top: -1px;\r
-  margin-right: 10px;\r
-  display: inline-block !important; }\r
-\r
-.data-row-list th:first-child {\r
-  background-color: inherit !important;\r
-  border-top: none;\r
-  padding: 0 15px 15px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.4rem; }\r
-\r
-.data-row-list ul {\r
-  margin: 0 0 0 30px; }\r
-\r
-.data-row-list ul > li:before {\r
-  display: none; }\r
-\r
-.data-row-list ul > li {\r
-  /* background-image in tables.less */\r
-  background-position: left 13px;\r
-  background-repeat: repeat-x;\r
-  background-size: 4px 1px;\r
-  display: table;\r
-  padding-left: 0;\r
-  width: 100%; }\r
-\r
-.data-row-list li div {\r
-  display: table-cell;\r
-  background-color: white;\r
-  float: left;\r
-  text-align: left;\r
-  padding-left: 0;\r
-  padding-right: 7px; }\r
-\r
-.data-row-list li div + div {\r
-  float: right;\r
-  text-align: right;\r
-  padding-right: 0;\r
-  padding-left: 7px; }\r
-\r
-.complex-table td:nth-child(1),\r
-.complex-table td:nth-child(2),\r
-.complex-table td:nth-child(3),\r
-.complex-table td:nth-child(4),\r
-.complex-table td:nth-child(5),\r
-.complex-table td:nth-child(6),\r
-.complex-table td:nth-child(7),\r
-.complex-table td:nth-child(8),\r
-.complex-table td:nth-child(9) {\r
-  white-space: nowrap; }\r
-\r
-th:nth-child(8) {\r
-  word-wrap: break-word;\r
-  word-spacing: 0; }\r
-\r
-.align-col-right {\r
-  text-align: right; }\r
-\r
-.complex-table th:not(:first-child),\r
-.complex-table td:not(:first-child) {\r
-  text-align: right; }\r
-\r
-.striped tbody > tr td {\r
-  background-color: transparent !important; }\r
-\r
-.striped tbody > tr.data-row.odd,\r
-.striped tbody > tr.data-row.odd + .data-row-list,\r
-.striped tbody > tr.data-row.odd + .data-row-list li div {\r
-  background-color: #f2f2f2 !important; }\r
-\r
-.striped tbody > tr:not('.data-row'):nth-child(even) {\r
-  background-color: #f2f2f2; }\r
-\r
-.b2b-table-div .selectWrap {\r
-  width: 290px;\r
-  position: relative;\r
-  left: 10px;\r
-  display: inline-table;\r
-  margin-bottom: 0px; }\r
-\r
-.b2b-external-sort-div {\r
-  float: right;\r
-  padding-bottom: 25px; }\r
-\r
-.b2b-external-sort-div .sortButton {\r
-  font-size: 36px;\r
-  border: 1px solid #ccc;\r
-  background: #FFF;\r
-  border-radius: 6px; }\r
-\r
-.b2b-external-sort-label {\r
-  padding-bottom: 10px; }\r
-\r
-.b2b-external-sort-div a:hover {\r
-  cursor: pointer; }\r
-\r
-.b2b-external-sort-div a:hover, .b2b-external-sort-div a:focus {\r
-  text-decoration: none; }\r
-\r
-.b2b-external-sort-label label {\r
-  position: relative;\r
-  left: 10px; }\r
-\r
-.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {\r
-  background: 0 0;\r
-  cursor: default; }\r
-\r
-.tablesorter-default .tablesorter-header .tablesorter-header-inner {\r
-  /*  background-image: url(images/tables/upanddown.png);*/\r
-  background-position: center right;\r
-  background-repeat: no-repeat;\r
-  cursor: pointer;\r
-  white-space: normal;\r
-  display: inline-block;\r
-  vertical-align: baseline;\r
-  zoom: 1;\r
-  *display: inline;\r
-  *vertical-align: auto;\r
-  /*  padding: 0 24px 0 0;*/ }\r
-\r
-.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {\r
-  padding: 0; }\r
-\r
-.tablesorter-default .tablesorter-header.tablesort-sortable .tablesorter-header-inner span {\r
-  margin-right: 24px;\r
-  display: inline-block; }\r
-\r
-/*\r
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner {\r
-  background-image: url(images/tables/up.png);\r
-}\r
-\r
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {\r
-  background-image: url(images/tables/down.png);\r
-}\r
-*/\r
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner,\r
-.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,\r
-.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner,\r
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner,\r
-.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,\r
-.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {\r
-  padding-right: 0;\r
-  line-height: 16px; }\r
-\r
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner:after,\r
-.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner:after,\r
-.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner:after {\r
-  font-family: 'icoPrimary' !important;\r
-  speak: none;\r
-  font-style: normal;\r
-  font-size: 24px;\r
-  font-weight: normal;\r
-  font-variant: normal;\r
-  text-transform: none;\r
-  line-height: 14px;\r
-  -webkit-font-smoothing: antialiased;\r
-  -moz-osx-font-smoothing: grayscale;\r
-  -moz-user-select: none;\r
-  -ms-user-select: none;\r
-  -webkit-user-select: none;\r
-  user-select: none;\r
-  content: "\ea3c";\r
-  /*    position: relative;*/\r
-  position: absolute;\r
-  text-decoration: inherit;\r
-  display: inline-block;\r
-  transform: rotate(180deg);\r
-  margin-left: -22px;\r
-  margin-top: 2px; }\r
-\r
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner:after,\r
-.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner:after,\r
-.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner:after {\r
-  font-family: 'icoPrimary' !important;\r
-  speak: none;\r
-  font-style: normal;\r
-  font-size: 24px;\r
-  font-weight: normal;\r
-  font-variant: normal;\r
-  text-transform: none;\r
-  line-height: 14px;\r
-  -webkit-font-smoothing: antialiased;\r
-  -moz-osx-font-smoothing: grayscale;\r
-  -moz-user-select: none;\r
-  -ms-user-select: none;\r
-  -webkit-user-select: none;\r
-  user-select: none;\r
-  content: "\ea3c";\r
-  /*    position: relative;*/\r
-  position: absolute;\r
-  text-decoration: inherit;\r
-  display: inline-block;\r
-  margin-left: -22px;\r
-  margin-top: 2px; }\r
-\r
-.tablesorter-search-highlight {\r
-  font-weight: 700; }\r
-\r
-.tablesorter-headerRow th:focus {\r
-  outline: thin dotted #666;\r
-  outline-offset: -1px; }\r
-\r
-.b2b-table-message {\r
-  font-family: "Omnes-ECOMP-W02", Arial; }\r
-  .b2b-table-message .b2b-magnify-glass {\r
-    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20enable-background%3D%22new%200%200%2036%2036%22%3E%3Cpath%20d%3D%22M27.847%208.26c-1.805-1.803-4.202-2.795-6.751-2.795-2.548%200-4.945.993-6.749%202.796-1.803%201.803-2.796%204.2-2.796%206.75%200%201.879.543%203.681%201.576%205.242l-7.059%207.059c-.357.356-.554.831-.554%201.336-.001.505.196.98.554%201.337.357.356.832.552%201.336.552.503%200%20.977-.196%201.336-.553l7.047-7.048c1.576%201.062%203.402%201.622%205.309%201.622%202.55%200%204.948-.993%206.751-2.796%201.803-1.804%202.796-4.201%202.796-6.751%200-2.549-.993-4.947-2.796-6.751zm-6.761.96c3.186%200%205.778%202.592%205.778%205.778%200%203.186-2.592%205.778-5.778%205.778-3.186%200-5.778-2.592-5.778-5.778%200-3.185%202.592-5.778%205.778-5.778z%22%20fill%3D%22%23767676%22%2F%3E%3C%2Fsvg%3E");\r
-    background-repeat: no-repeat;\r
-    background-position: center;\r
-    height: 50px; }\r
-  .b2b-table-message .b2b-alert {\r
-    font-size: 50px; }\r
-  .b2b-table-message .b2b-loading-dots {\r
-    font-size: 50px;\r
-    margin-bottom: 20px; }\r
-  .b2b-table-message .b2b-message {\r
-    text-align: center;\r
-    padding-bottom: 45px;\r
-    padding-top: 40px;\r
-    border-style: solid;\r
-    border-width: 1px;\r
-    border-top: none;\r
-    padding-bottom: 45px;\r
-    border-color: #d2d2d2;\r
-    width: 100%;\r
-    min-height: 220px; }\r
-  .b2b-table-message .b2b-error-title {\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    color: #444444;\r
-    line-height: 26px;\r
-    margin-top: 10px; }\r
-  .b2b-table-message .b2b-message-title {\r
-    color: #444;\r
-    font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-.b2b-table-scrollbar {\r
-  border: 1px solid;\r
-  width: 651px; }\r
-  .b2b-table-scrollbar .b2b-table-inner-container {\r
-    width: 650px;\r
-    padding-left: 150px;\r
-    overflow-x: scroll; }\r
-  .b2b-table-scrollbar th:first-child {\r
-    background-color: #FFFFFF; }\r
-  .b2b-table-scrollbar td:first-child {\r
-    background-color: #FFFFFF;\r
-    border-top: 1px solid #cccccc;\r
-    border-right: 1px solid #cccccc;\r
-    margin-top: -0.5px; }\r
-  .b2b-table-scrollbar tr {\r
-    th: nth-child(2), td; }\r
-    .b2b-table-scrollbar tr :nth-child(2) {\r
-      border-left: none; }\r
-  .b2b-table-scrollbar tr:last-child > td:first-child {\r
-    border-bottom: 1px solid #cccccc; }\r
-\r
-.b2b-scrollbar-arrow-left {\r
-  float: left;\r
-  margin: 10px; }\r
-\r
-.b2b-scrollbar-arrow-right {\r
-  float: right;\r
-  clear: right;\r
-  margin: 10px; }\r
-  .b2b-scrollbar-arrow-right.btn-arrow .btn {\r
-    margin-right: 0; }\r
-\r
-.b2b-table-scrollbar ::-webkit-scrollbar {\r
-  height: 10px; }\r
-\r
-.b2b-table-scrollbar ::-webkit-scrollbar-thumb {\r
-  background: #666666;\r
-  border-radius: 5px; }\r
-\r
-.tabs {\r
-  margin-left: 0;\r
-  margin-bottom: 20px;\r
-  list-style: none; }\r
-\r
-.tabs > li > a {\r
-  display: block; }\r
-\r
-.tabs > li > a:hover,\r
-.tabs > li > a:focus {\r
-  text-decoration: none;\r
-  background-color: #d2d2d2; }\r
-\r
-.tabs > .pull-right {\r
-  float: right; }\r
-\r
-.tabs:before,\r
-.tabs:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.tabs:after {\r
-  clear: both; }\r
-\r
-.tabs > li {\r
-  float: left; }\r
-\r
-.tabs > li > a {\r
-  padding-right: 20px;\r
-  padding-left: 20px;\r
-  margin-right: 3px;\r
-  line-height: 16px; }\r
-\r
-.tabs {\r
-  margin: 0; }\r
-\r
-.tabs > li {\r
-  margin-bottom: -1px; }\r
-\r
-.tabs > li:first-child {\r
-  margin-left: 20px; }\r
-\r
-.tabs > li > a {\r
-  padding: 12px 20px;\r
-  border: 1px solid #d2d2d2;\r
-  border-radius: 6px 6px 0 0;\r
-  background-color: #f2f2f2;\r
-  color: #5a5a5a;\r
-  border-color: #d2d2d2; }\r
-\r
-.tabs > li > a {\r
-  margin-right: 6px; }\r
-\r
-.tabs > li > a,\r
-.tabs > li > a:hover,\r
-.tabs > li > a:focus {\r
-  background-image: none;\r
-  background-color: #ffffff;\r
-  color: #5a5a5a;\r
-  border-color: #d2d2d2;\r
-  border-bottom: 1px solid transparent;\r
-  cursor: pointer; }\r
-\r
-.tabs.tabs-justified,\r
-.tabs.promo-tabs {\r
-  width: 100%;\r
-  border-bottom: 0;\r
-  margin-bottom: -1px; }\r
-\r
-.tabs.tabs-justified > li,\r
-.tabs.promo-tabs > li {\r
-  display: table-cell;\r
-  float: none;\r
-  width: 1%;\r
-  border-left: 1px solid #d2d2d2; }\r
-\r
-.tabs.tabs-justified > li.active,\r
-.tabs.promo-tabs > li.active {\r
-  position: relative;\r
-  z-index: 1000; }\r
-\r
-.tabs.tabs-justified > li > a {\r
-  padding-right: 5px;\r
-  padding-left: 5px; }\r
-\r
-.tabs.tabs-justified > li > a,\r
-.tabs.promo-tabs > li > a {\r
-  text-align: center; }\r
-\r
-.tabs.promo-tabs > li > a {\r
-  padding: 0;\r
-  margin: 0;\r
-  border-radius: 0;\r
-  border: none;\r
-  color: #0568ae;\r
-  font-size: 1.2rem;\r
-  text-align: center;\r
-  padding: 6px 10px 10px;\r
-  border-top: 4px solid #e6e6e6;\r
-  filter: none;\r
-  border-bottom: 1px solid #d2d2d2;\r
-  background-color: #f9f9f9; }\r
-\r
-.tabs > li:last-child > a {\r
-  margin-right: 0; }\r
-\r
-.tabs.promo-tabs > li.active > a {\r
-  color: #333333;\r
-  border-top: 4px solid #ea7400;\r
-  border-bottom-color: white;\r
-  background-color: #fff !important;\r
-  filter: none;\r
-  cursor: default; }\r
-\r
-.tabs.promo-tabs > li:first-child {\r
-  border-left: none; }\r
-\r
-.tabs.promo-tabs > li > a img {\r
-  max-width: inherit;\r
-  max-height: 39px;\r
-  margin: 0 auto 5px auto;\r
-  display: block; }\r
-\r
-.tabbable:before,\r
-.tabbable:after {\r
-  display: table;\r
-  content: "";\r
-  line-height: 0; }\r
-\r
-.tabbable:after {\r
-  clear: both; }\r
-\r
-.tab-content {\r
-  overflow: auto;\r
-  border: 1px solid #e6e6e6; }\r
-\r
-.tabs.promo-tabs + .tab-content {\r
-  border: none;\r
-  border-bottom: 1px solid #e6e6e6; }\r
-\r
-.tab-content > .tab-pane {\r
-  padding: 10px 15px; }\r
-\r
-.tab-content.noborder {\r
-  border: none; }\r
-\r
-.tab-content.noborder > .tab-pane {\r
-  padding: 0; }\r
-\r
-.tab-content > .tab-pane {\r
-  display: none; }\r
-\r
-.tab-content > .active {\r
-  display: block; }\r
-\r
-.tabs.promo-tabs > li > a {\r
-  font-size: 2.0rem;\r
-  height: 70px;\r
-  padding: 20px 20px 24px;\r
-  background-color: #FFFFFF;\r
-  border-top: 5px solid #FFFFFF;\r
-  white-space: nowrap; }\r
-\r
-.tabs.promo-tabs > li.active > a {\r
-  border-top: 5px solid #0574ac; }\r
-\r
-.tabs.promo-tabs > li > a:hover {\r
-  color: #333333; }\r
-\r
-.tabs.promo-tabs > li {\r
-  width: auto; }\r
-\r
-.tabs > li[disabled="disabled"] > a:hover {\r
-  cursor: not-allowed; }\r
-\r
-.b2b-tags {\r
-  background-color: #f2f2f2;\r
-  -webkit-transition: all .3s ease-out;\r
-  -moz-transition: all .3s ease-out;\r
-  transition: all .3s ease-out;\r
-  margin: 3px 5px 3px 0;\r
-  padding: 2px 15px;\r
-  border-radius: 6px;\r
-  border: 1px solid #c9c9c9;\r
-  display: inline-block; }\r
-  .b2b-tags .tags__item {\r
-    font-size: 14px;\r
-    vertical-align: baseline;\r
-    zoom: 1;\r
-    color: #333; }\r
-    .b2b-tags .tags__item i {\r
-      color: #0574ac;\r
-      font-size: 14px;\r
-      font-weight: bold;\r
-      margin-left: 10px; }\r
-      .b2b-tags .tags__item i:hover {\r
-        cursor: pointer; }\r
-    .b2b-tags .tags__item i:focus {\r
-      outline: thin dotted #666; }\r
-    .b2b-tags .tags__item:last-child {\r
-      margin-right: 0; }\r
-    .b2b-tags .tags__item:hover {\r
-      text-decoration: none; }\r
-    .b2b-tags .tags__item:focus {\r
-      outline: 1px dotted #666; }\r
-\r
-.tooltip-size-control {\r
-  display: block; }\r
-\r
-.tooltip {\r
-  display: inline-block;\r
-  height: 20px;\r
-  vertical-align: middle;\r
-  margin: 1px 0 0 7px; }\r
-\r
-p .tooltip {\r
-  margin: -3px 7px 0 0; }\r
-\r
-label .tooltip {\r
-  margin: 1px 0 0 7px; }\r
-\r
-.tooltip .icon-primary-tooltip {\r
-  background: none;\r
-  border: none;\r
-  display: inline-block;\r
-  font-size: 20px;\r
-  height: 20px;\r
-  margin: 0;\r
-  position: relative;\r
-  width: 20px; }\r
-\r
-.tooltip .icon-primary-tooltip:before {\r
-  top: 0; }\r
-\r
-.tooltip .icon-primary-tooltip:focus {\r
-  text-decoration: none;\r
-  outline: 1px dotted black; }\r
-\r
-.tooltip.active .icon-primary-tooltip:focus {\r
-  outline: none; }\r
-\r
-.tooltip .arrow {\r
-  display: none;\r
-  border-color: transparent;\r
-  border-style: solid;\r
-  background-color: #0568ae;\r
-  height: 20px;\r
-  width: 20px;\r
-  position: absolute;\r
-  top: 0;\r
-  right: 0;\r
-  bottom: 0;\r
-  left: 0;\r
-  opacity: 0;\r
-  transform: rotate(45deg); }\r
-\r
-.tooltip.active .icon-primary-tooltip[data-placement="top"] .arrow {\r
-  display: block;\r
-  bottom: 32px;\r
-  top: auto;\r
-  border-width: 0 1px 1px 0; }\r
-\r
-.tooltip.active .icon-primary-tooltip[data-placement="bottom"] .arrow {\r
-  border-width: 1px 0 0 1px;\r
-  display: block;\r
-  bottom: -33px;\r
-  top: auto; }\r
-\r
-.tooltip.active .arrow {\r
-  opacity: 1; }\r
-\r
-.tooltip .closingtooltip {\r
-  display: block; }\r
-\r
-.tooltip.active .closingtooltip {\r
-  display: none; }\r
-\r
-.tooltip-wrapper {\r
-  position: absolute;\r
-  margin-top: 20px;\r
-  left: 15px;\r
-  right: 15px;\r
-  display: none;\r
-  opacity: 0;\r
-  z-index: 1010;\r
-  text-align: left; }\r
-\r
-.helpertext {\r
-  background-color: #0568ae;\r
-  border: 1px solid transparent;\r
-  border-radius: 6px;\r
-  color: #fff;\r
-  display: none;\r
-  margin: 0;\r
-  padding: 25px;\r
-  position: relative;\r
-  text-align: left;\r
-  width: 100%;\r
-  top: 0;\r
-  z-index: 1009; }\r
-\r
-.tooltip .helpertext {\r
-  position: absolute; }\r
-\r
-.tooltip.active .icon-primary-tooltip[data-placement="bottom"] + .tooltip-wrapper .helpertext {\r
-  bottom: inherit;\r
-  top: 19px; }\r
-\r
-.tooltip.active .icon-primary-tooltip[data-placement="top"] + .tooltip-wrapper .helpertext {\r
-  top: inherit;\r
-  bottom: 38px; }\r
-\r
-.tooltip.active .tooltip-wrapper {\r
-  opacity: 1;\r
-  display: block;\r
-  margin-top: 0; }\r
-\r
-.tooltip.active .tooltip-wrapper .helpertext {\r
-  display: block; }\r
-\r
-.tooltip-onclick .btn.icon-primary-tooltip {\r
-  border: medium none;\r
-  box-shadow: none;\r
-  color: #0568ae;\r
-  font-size: 20px;\r
-  height: 34px;\r
-  line-height: 36px;\r
-  margin: 0;\r
-  min-width: 50px;\r
-  padding: 0;\r
-  position: absolute;\r
-  right: 0;\r
-  top: 0; }\r
-\r
-.tooltip-onclick .icon-primary-tooltip:before {\r
-  display: inline;\r
-  position: relative; }\r
-\r
-.tooltip-onclick textarea + .reset-field + .icon-primary-tooltip {\r
-  top: 4px;\r
-  right: 5px;\r
-  min-width: 40px; }\r
-\r
-.tooltip-onclick.active .helpertext:before,\r
-.tooltip-onfocus.active .helpertext:before {\r
-  background-color: #0568ae;\r
-  border-color: transparent;\r
-  border-style: solid;\r
-  border-width: 1px 1px 0 0;\r
-  content: "";\r
-  display: block;\r
-  height: 15px;\r
-  left: 17px;\r
-  margin: 0;\r
-  position: absolute;\r
-  top: -7px;\r
-  transform: rotate(-45deg);\r
-  width: 15px; }\r
-\r
-.tooltip-onclick.active .helpertext {\r
-  display: block;\r
-  opacity: 1;\r
-  margin: 14px 0 0; }\r
-\r
-.tooltip-onclick.active .helpertext:before {\r
-  left: inherit;\r
-  right: 18px; }\r
-\r
-.tooltip-onclick .reset-field {\r
-  right: 37px; }\r
-\r
-.tooltip-onclick .reset-field:before {\r
-  position: relative;\r
-  top: -1px; }\r
-\r
-.tooltip-onfocus.active .helpertext {\r
-  display: block;\r
-  margin: 14px 0 10px 0; }\r
-\r
-.popover-title {\r
-  display: block;\r
-  font-size: 14px;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-weight: bold;\r
-  margin-bottom: 8px;\r
-  white-space: normal; }\r
-\r
-.popover-content {\r
-  display: block;\r
-  font-size: 12px;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  line-height: 1.5rem;\r
-  white-space: normal; }\r
-\r
-.popover-content span,\r
-.popover-content p {\r
-  line-height: 1.5rem; }\r
-\r
-.popover-content p:last-child {\r
-  margin-bottom: 0; }\r
-\r
-.tooltip .tooltip-element {\r
-  position: relative; }\r
-\r
-.tooltip .icon-primary-tooltip:hover {\r
-  text-decoration: none; }\r
-\r
-.tooltip.active .tooltip-element[data-placement="top"] .arrow {\r
-  display: block;\r
-  bottom: 32px;\r
-  top: auto; }\r
-\r
-.tooltip.active .tooltip-element[data-placement="bottom"] .arrow {\r
-  display: block;\r
-  border-color: transparent transparent #0574ac;\r
-  bottom: -33px;\r
-  top: auto; }\r
-\r
-.tooltip.active .tooltip-element[data-placement="bottom"] + .tooltip-wrapper .helpertext {\r
-  bottom: inherit;\r
-  top: 19px; }\r
-\r
-.tooltip.active .tooltip-element[data-placement="top"] + .tooltip-wrapper .helpertext {\r
-  top: inherit;\r
-  bottom: 38px; }\r
-\r
-.b2b-tree {\r
-  padding: 0 10px 0 10px;\r
-  width: 320px; }\r
-  .b2b-tree ul {\r
-    list-style: none;\r
-    list-style-type: none; }\r
-  .b2b-tree a {\r
-    display: block;\r
-    padding: 0 0 5px 30px;\r
-    line-height: 22px;\r
-    margin-left: -10px;\r
-    font-size: 1.4rem;\r
-    outline-offset: -1px; }\r
-  .b2b-tree li:focus {\r
-    outline: none; }\r
-    .b2b-tree li:focus > a {\r
-      outline: thin dotted #666;\r
-      outline-offset: -1px; }\r
-  .b2b-tree ul li {\r
-    border-left: 1px solid #ccc; }\r
-    .b2b-tree ul li.bg > a {\r
-      color: #333;\r
-      background-image: url("../style/images/treebg.png"); }\r
-    .b2b-tree ul li .b2b-tree-tooltip {\r
-      display: none;\r
-      position: absolute;\r
-      top: -25px;\r
-      left: 100%;\r
-      white-space: nowrap;\r
-      margin-left: 10px;\r
-      z-index: 1010;\r
-      font-family: "Omnes-ECOMP-W02", Arial;\r
-      font-size: 12px; }\r
-    .b2b-tree ul li .b2b-tree-tooltip-content {\r
-      background-color: #0568ae;\r
-      margin-left: 9px;\r
-      border-radius: 6px;\r
-      color: #fff;\r
-      padding: 25px; }\r
-    .b2b-tree ul li .b2b-tree-arrow-left {\r
-      width: 0;\r
-      height: 0;\r
-      border-top: 10px solid transparent;\r
-      border-bottom: 10px solid transparent;\r
-      border-right: 10px solid #0568ae;\r
-      position: absolute;\r
-      top: 25px; }\r
-    .b2b-tree ul li.activeTooltip > a .b2b-tree-tooltip {\r
-      display: block; }\r
-  .b2b-tree ul ul {\r
-    padding: 0 0 0 20px; }\r
-  .b2b-tree ul > li {\r
-    position: relative;\r
-    line-height: 18px; }\r
-  .b2b-tree a > span.b2b-tree-node-icon {\r
-    background-color: #FFF;\r
-    display: inline;\r
-    margin: 0;\r
-    padding: 0;\r
-    position: absolute;\r
-    left: -11px;\r
-    top: 0;\r
-    line-height: 14px;\r
-    width: 11px; }\r
-    .b2b-tree a > span.b2b-tree-node-icon > i {\r
-      font-size: 20px; }\r
-  .b2b-tree a:only-child {\r
-    color: #0574ac; }\r
-    .b2b-tree a:only-child > span.b2b-tree-node-icon {\r
-      left: -11px;\r
-      border-radius: 50%;\r
-      line-height: 7px;\r
-      top: 0; }\r
-      .b2b-tree a:only-child > span.b2b-tree-node-icon > i {\r
-        background-color: inherit;\r
-        background: #fff; }\r
-  .b2b-tree a > span.b2b-tree-node-icon > i.icon-primary-circle {\r
-    background-color: inherit;\r
-    background: #fff;\r
-    font-size: 10px; }\r
-  .b2b-tree a.b2b-locked-node:after {\r
-    content: "\ec58";\r
-    float: right;\r
-    font-family: 'icoSecurityalerts' !important; }\r
-  .b2b-tree a:hover .b2b-locked-node:after {\r
-    text-decoration: none; }\r
-  .b2b-tree ul li:first-child > a:only-child > span.b2b-tree-node-icon {\r
-    left: -11px;\r
-    border-radius: 50%;\r
-    line-height: 12px; }\r
-  .b2b-tree ul li:last-child > a:only-child > span.b2b-tree-node-icon {\r
-    height: 27px;\r
-    background-color: #fff; }\r
-  .b2b-tree li a + ul {\r
-    height: 0;\r
-    overflow: hidden; }\r
-  .b2b-tree li a.active + ul {\r
-    height: auto;\r
-    overflow: visible; }\r
-  .b2b-tree li a.grp {\r
-    font-family: "Omnes-ECOMP-W02-Italic", Arial; }\r
-    .b2b-tree li a.grp.active {\r
-      color: #333; }\r
-  .b2b-tree span.end {\r
-    left: -6px !important;\r
-    top: 5px !important; }\r
-  .b2b-tree span.first-link {\r
-    width: 3px !important;\r
-    height: 15px !important;\r
-    top: 0px !important;\r
-    left: -2px !important;\r
-    background: #fff; }\r
-\r
-.b2b-tree-checkbox {\r
-  padding: 0 10px 0 10px;\r
-  width: 320px; }\r
-  .b2b-tree-checkbox ul {\r
-    list-style: none;\r
-    list-style-type: none; }\r
-  .b2b-tree-checkbox a {\r
-    display: block;\r
-    padding: 0 0 5px 30px;\r
-    line-height: 22px;\r
-    margin-left: -10px;\r
-    font-size: 14px;\r
-    outline-offset: -1px; }\r
-  .b2b-tree-checkbox li:focus {\r
-    outline: none; }\r
-    .b2b-tree-checkbox li:focus > a {\r
-      outline: thin dotted #666;\r
-      outline-offset: -1px; }\r
-  .b2b-tree-checkbox ul li {\r
-    border-left: 1px solid #ccc; }\r
-  .b2b-tree-checkbox ul ul {\r
-    padding: 0 0 0 20px; }\r
-  .b2b-tree-checkbox ul > li {\r
-    position: relative;\r
-    line-height: 18px; }\r
-  .b2b-tree-checkbox a > span.nodeIcon {\r
-    background-color: #FFF;\r
-    display: inline;\r
-    margin: 0;\r
-    padding: 0;\r
-    position: absolute;\r
-    left: -11px;\r
-    top: 0;\r
-    line-height: 14px;\r
-    width: 11px; }\r
-    .b2b-tree-checkbox a > span.nodeIcon > i {\r
-      font-size: 20px; }\r
-    .b2b-tree-checkbox a > span.nodeIcon.end {\r
-      margin-top: 10px; }\r
-  .b2b-tree-checkbox a:only-child {\r
-    color: #0574ac; }\r
-    .b2b-tree-checkbox a:only-child > span.nodeIcon {\r
-      left: -11px;\r
-      border-radius: 50%;\r
-      line-height: 7px;\r
-      top: 0; }\r
-      .b2b-tree-checkbox a:only-child > span.nodeIcon > i {\r
-        background-color: inherit;\r
-        background: #fff; }\r
-  .b2b-tree-checkbox a > span.nodeIcon > i.icon-primary-circle {\r
-    background-color: inherit;\r
-    background: #fff;\r
-    font-size: 10px; }\r
-  .b2b-tree-checkbox ul li:first-child > a:only-child > span {\r
-    left: -11px;\r
-    border-radius: 50%;\r
-    line-height: 12px;\r
-    top: 0px; }\r
-  .b2b-tree-checkbox ul li:first-child > a:only-child > span.end {\r
-    margin-top: 0px; }\r
-  .b2b-tree-checkbox ul li:first-child > a:only-child > span i.icon-primary-circle {\r
-    top: 8px; }\r
-  .b2b-tree-checkbox ul li:last-child > a:only-child > span {\r
-    height: 34px;\r
-    background-color: #fff; }\r
-  .b2b-tree-checkbox li a + ul {\r
-    height: 0;\r
-    overflow: hidden; }\r
-  .b2b-tree-checkbox li a.active + ul {\r
-    height: auto; }\r
-  .b2b-tree-checkbox li a.grp {\r
-    font-family: "Omnes-ECOMP-W02-Italic", Arial; }\r
-  .b2b-tree-checkbox span.end {\r
-    left: -6px !important; }\r
-  .b2b-tree-checkbox .checkbox {\r
-    margin-bottom: 0px;\r
-    margin-top: 2px;\r
-    font-size: 14px; }\r
-    .b2b-tree-checkbox .checkbox input:indeterminate + .skin:after {\r
-      content: "\2014";\r
-      padding-left: 2px;\r
-      font-family: inherit !important;\r
-      line-height: inherit !important; }\r
-  .b2b-tree-checkbox span.first-link {\r
-    width: 3px !important;\r
-    height: 15px !important;\r
-    top: 0px !important;\r
-    left: -2px !important;\r
-    background: #fff; }\r
-\r
-.b2b-widget-window {\r
-  width: 147px;\r
-  right: 5px;\r
-  top: 60px;\r
-  position: absolute;\r
-  border: 1px solid #ccc;\r
-  background-color: #fff;\r
-  border-radius: 8px;\r
-  z-index: 1000; }\r
-  .b2b-widget-window li {\r
-    margin: 15px; }\r
-\r
-.b2b-widget-container {\r
-  background-color: #fff;\r
-  border-radius: 8px;\r
-  border: 1px solid #ccc;\r
-  position: relative; }\r
-  .b2b-widget-container .b2b-widget-header {\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    color: #333;\r
-    height: 55px;\r
-    padding-left: 15px;\r
-    padding-top: 19px; }\r
-    .b2b-widget-container .b2b-widget-header .header {\r
-      font-size: 18px; }\r
-  .b2b-widget-container .b2b-widget-header-icons {\r
-    font-size: 16px;\r
-    color: #0574ac; }\r
-\r
-.b2b-widget-header-icons button {\r
-  border: none;\r
-  background: transparent;\r
-  color: #0574ac; }\r
-  .b2b-widget-header-icons button:focus {\r
-    outline-style: solid;\r
-    outline-width: 1px;\r
-    outline-color: #0574ac; }\r
-  .b2b-widget-header-icons button:first-child {\r
-    margin-right: 0px; }\r
-\r
-.b2b-widget-container .b2b-widget-content {\r
-  height: 325px;\r
-  margin: 0;\r
-  padding: 20px;\r
-  position: relative;\r
-  border-top: 1px solid #ccc; }\r
-\r
-.b2b-widget-content .form-row:first-child {\r
-  margin-top: 0; }\r
-\r
-.b2b-widget-header-icons button.icoControls-gear:focus, .b2b-widget-header-icons button.icon-primary-close:focus {\r
-  outline: thin dotted #666; }\r
-\r
-.b2b-widget-header .icon-primary-close:before {\r
-  content: '-';\r
-  display: inline-block;\r
-  margin: 0;\r
-  padding: 0;\r
-  outline: none; }\r
-\r
-.b2b-widget-window .arrow_box {\r
-  background: #fff;\r
-  border: 1px solid #ccc; }\r
-\r
-.b2b-widget-window.arrow_box:after, .b2b-widget-window.arrow_box:before {\r
-  bottom: 100%;\r
-  left: 75%;\r
-  border: solid transparent;\r
-  content: " ";\r
-  height: 0;\r
-  width: 0;\r
-  position: absolute;\r
-  pointer-events: none; }\r
-\r
-.b2b-widget-window.arrow_box:after {\r
-  border-color: rgba(255, 255, 255, 0);\r
-  border-bottom-color: #fff;\r
-  border-width: 10px;\r
-  margin-left: 1px; }\r
-\r
-.b2b-widget-window.arrow_box:before {\r
-  border-color: rgba(204, 204, 204, 0);\r
-  border-bottom-color: #ccc;\r
-  border-width: 11px;\r
-  margin-left: 0px; }\r
-\r
-/************************** Overrides for Filters ***************************/\r
-.filter-container .filter-header h2 {\r
-  line-height: 1 !important;\r
-  margin: 0 !important; }\r
-\r
-.filter-container .icon-primary-spinner:before {\r
-  content: none; }\r
-\r
-.filter-container .fixed-230-subnav {\r
-  margin: 10px !important;\r
-  width: inherit !important; }\r
-\r
-.filter-container .unlinked:focus {\r
-  outline: thin dotted #666 !important; }\r
-\r
-.filter-container .unlinked.active {\r
-  color: inherit !important; }\r
-\r
-.filter-container .fixed-230-subnav a > i {\r
-  background: none; }\r
-\r
-.filter-container .fixed-230-subnav ul {\r
-  margin: 0 0 10px 10px; }\r
-\r
-/************************** Overrides for Filters ***************************/\r
-.row .filter-container {\r
-  background-color: #fff; }\r
-\r
-.filter-header {\r
-  overflow: hidden;\r
-  padding: 20px 0;\r
-  position: relative; }\r
-\r
-.filter-header h2 {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 2.4rem;\r
-  margin-bottom: 0; }\r
-\r
-.filter-selected {\r
-  border-top: 1px solid #ccc;\r
-  padding-top: 20px; }\r
-\r
-.filter-selected > span {\r
-  font-size: 1.3rem;\r
-  text-transform: uppercase; }\r
-\r
-.filter-selected > a.clear-all-filters {\r
-  float: right;\r
-  font-size: 1.4rem; }\r
-\r
-.filter-selected > span,\r
-.filter-selected > a.clear-all-filters {\r
-  font-family: Omnes-ECOMP-W02-Medium, Arial; }\r
-\r
-.filter-selected-group {\r
-  padding-top: 15px; }\r
-\r
-.filter-selected-badge {\r
-  background-color: #f2f2f2;\r
-  border-radius: 15px;\r
-  display: inline-block;\r
-  font-size: 1.4rem;\r
-  margin-bottom: 10px;\r
-  padding: 0 0 0 12px; }\r
-\r
-.filter-selected-badge .icoControls-optionsoff {\r
-  background: transparent none repeat scroll 0 0;\r
-  border: medium none;\r
-  font-size: 2.5em;\r
-  margin: 0;\r
-  padding: 0; }\r
-\r
-.filters .fixed-230-subnav > ng-transclude > div:first-child {\r
-  border-top: 1px solid #ccc; }\r
-\r
-.filters .fixed-230-subnav > ng-transclude > div {\r
-  border-bottom: 1px solid #ccc; }\r
-\r
-.filter-results {\r
-  align-items: center;\r
-  border-bottom: 1px solid #ccc;\r
-  display: flex;\r
-  flex-wrap: wrap;\r
-  height: 50px;\r
-  -webkit-justify-content: space-between;\r
-  -ms-flex-pack: justify;\r
-  justify-content: space-between; }\r
-\r
-.filter-results-sortby > span {\r
-  text-transform: uppercase; }\r
-\r
-.filter-results-view .icon-primary-content-gridguide {\r
-  font-size: 2em;\r
-  margin-right: 0; }\r
-\r
-.filter-container .fixed-230-subnav > ng-transclude > div > a {\r
-  font-size: 1.8rem;\r
-  margin: 0;\r
-  padding: 15px 20px 15px 0;\r
-  color: #0574ac !important;\r
-  cursor: pointer !important;\r
-  font-family: "Omnes-ECOMP-W02", Arial !important;\r
-  outline-offset: inherit !important;\r
-  position: relative;\r
-  height: auto;\r
-  width: auto; }\r
-\r
-.filter-container .fixed-230-subnav a > i {\r
-  right: 0;\r
-  top: 15px; }\r
-\r
-.filter-container .fixed-230-subnav .icon-primary-collapsed:before, .filter-container .fixed-230-subnav .icon-primary-expanded:before {\r
-  float: right; }\r
-\r
-.filter-container .fixed-230-subnav ul.collapse {\r
-  position: inherit;\r
-  transition: height 0.5s ease;\r
-  height: 0;\r
-  overflow: hidden; }\r
-\r
-.filter-container .checkbox .icon-primary-spinner {\r
-  height: 24px;\r
-  position: absolute;\r
-  width: 24px; }\r
-\r
-.fixed-230-subnav.affix {\r
-  margin: -28px 0 0; }\r
-\r
-#nav-menu .b2b-menu,\r
-#nav-menu .fixed-230-subnav {\r
-  margin: 0; }\r
-\r
-.b2b-menu > li,\r
-.fixed-230-subnav > div {\r
-  border-bottom: 1px solid #ccc;\r
-  line-height: 4.0rem; }\r
-\r
-.b2b-menu > li:first-child,\r
-.fixed-230-subnav > li:first-child {\r
-  border-top: 1px solid #ccc; }\r
-\r
-.b2b-menu div > a,\r
-.fixed-230-subnav div > a {\r
-  color: #0574ac;\r
-  cursor: pointer;\r
-  display: block;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 1.4rem;\r
-  margin: 0;\r
-  outline-offset: -1px;\r
-  padding: 0 10px;\r
-  position: relative; }\r
-\r
-.fixed-230-subnav div > a.live {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  color: #666; }\r
-\r
-.fixed-230-subnav > ng-transclude > div li > a {\r
-  display: block;\r
-  font-size: 1.4rem;\r
-  line-height: 20px; }\r
-\r
-.fixed-230-subnav > ng-transclude > div li > a.active {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  text-decoration: none;\r
-  color: #666; }\r
-\r
-#nav-menu .fixed-230-subnav a > i {\r
-  top: 10px; }\r
-\r
-.fixed-230-subnav > li > a.active > i:after {\r
-  display: none; }\r
-\r
-.b2b-menu ul,\r
-.fixed-230-subnav ul {\r
-  margin: 0 0 10px 0; }\r
-\r
-.b2b-menu ul div a,\r
-.fixed-230-subnav ul div a {\r
-  padding: 0 10px; }\r
-\r
-.unlinked {\r
-  outline: medium none !important;\r
-  text-decoration: none !important; }\r
-\r
-@media (max-width: 1024px) {\r
-  .filter-container .fixed-230-subnav {\r
-    margin: 0 20px;\r
-    width: auto; }\r
-  .filter-container .fixed-230-subnav > li {\r
-    margin: 0; }\r
-  .row .filter-container {\r
-    display: none;\r
-    height: 100%;\r
-    left: 0;\r
-    position: fixed;\r
-    overflow: auto;\r
-    top: 0;\r
-    transition: all 0.5s ease 0s;\r
-    width: 285px;\r
-    z-index: 9999; }\r
-  .filter-header {\r
-    padding-left: 20px; }\r
-  .filter-selected {\r
-    margin: 0 20px 10px; } }\r
-\r
-.b2b-pane-selector-wrapper {\r
-  width: 100%;\r
-  display: block;\r
-  border-top: solid 1px #ccc;\r
-  border-bottom: solid 1px #ccc; }\r
-  .b2b-pane-selector-wrapper .side-nav {\r
-    width: 20% !important;\r
-    display: inline-block;\r
-    float: left; }\r
-  .b2b-pane-selector-wrapper .pane-container {\r
-    width: 80%;\r
-    vertical-align: top;\r
-    margin: 0;\r
-    padding-top: 30px;\r
-    border-left: solid 1px #ccc;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    display: none; }\r
-    .b2b-pane-selector-wrapper .pane-container.active {\r
-      display: inline-block; }\r
-    .b2b-pane-selector-wrapper .pane-container .pane-container-top {\r
-      padding-left: 15px; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes {\r
-      display: -webkit-flex;\r
-      display: flex;\r
-      border-top: solid 1px #ccc;\r
-      margin-top: 30px; }\r
-      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block {\r
-        height: inherit;\r
-        overflow-y: auto;\r
-        border-right: solid 1px #ccc;\r
-        position: relative;\r
-        flex: 1;\r
-        -webkit-flex: 1;\r
-        /* Safari 6.1+ */\r
-        -ms-flex: 1;\r
-        /* IE 10 */ }\r
-        .b2b-pane-selector-wrapper .pane-container .panes div.pane-block:focus {\r
-          outline: dotted 1px #333333; }\r
-    .b2b-pane-selector-wrapper .pane-container .search-block {\r
-      position: relative;\r
-      float: right; }\r
-      .b2b-pane-selector-wrapper .pane-container .search-block input[type="search"]:focus {\r
-        padding-right: 40px; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row p {\r
-      margin-top: 15px; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div {\r
-      border-bottom: solid 1px #ccc; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row {\r
-      display: block;\r
-      padding: 19px 14px 19px 14px;\r
-      margin-top: 0px;\r
-      border: dotted 1px transparent;\r
-      border-bottom: solid 1px #ccc; }\r
-      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:focus {\r
-        border: dotted 1px #333333 !important; }\r
-      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:last-child {\r
-        border-bottom: none; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block > .no-content {\r
-      text-align: center;\r
-      border-bottom: none;\r
-      display: block;\r
-      position: absolute;\r
-      top: 45%;\r
-      left: 0;\r
-      right: 0; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div:last-child {\r
-      border-bottom: none; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row span.margin-chk {\r
-      margin: 15px 15px 0px 15px;\r
-      float: left; }\r
-    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row .checkbox-selectall {\r
-      margin: 0px 0 0 24px !important; }\r
-  .b2b-pane-selector-wrapper .side-nav li {\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    border: none;\r
-    border-top: solid 1px #ccc;\r
-    display: block !important;\r
-    width: auto !important;\r
-    margin-left: 0px !important; }\r
-    .b2b-pane-selector-wrapper .side-nav li.active {\r
-      background-color: #f6f6f6;\r
-      position: inherit !important; }\r
-      .b2b-pane-selector-wrapper .side-nav li.active > a {\r
-        font-size: 16px;\r
-        color: #333;\r
-        text-decoration: none;\r
-        border: none;\r
-        background-color: transparent;\r
-        padding: 20px 15px;\r
-        display: block;\r
-        height: auto;\r
-        border-left: 4px solid #0574ac; }\r
-    .b2b-pane-selector-wrapper .side-nav li > a {\r
-      font-size: 16px;\r
-      color: #333;\r
-      text-decoration: none;\r
-      border: none;\r
-      background-color: transparent;\r
-      padding: 20px 15px;\r
-      display: block;\r
-      height: auto;\r
-      text-align: left; }\r
-    .b2b-pane-selector-wrapper .side-nav li > a:focus {\r
-      border-right: dotted 1px #333333; }\r
-    .b2b-pane-selector-wrapper .side-nav li:first-child {\r
-      border-top: none;\r
-      margin-left: none !important; }\r
-/********************* Utility CSS Starts **********************/\r
-.offscreen-text {\r
-  position: absolute;\r
-  left: -10000px;\r
-  top: auto;\r
-  width: 1px;\r
-  height: 1px;\r
-  overflow: hidden; }\r
-\r
-/********************* Utility CSS Ends **********************/\r
-/* Fix for alignment issue on Cancel link inside modal */\r
-.b2b-modal-footer > .cta-button-group {\r
-  line-height: 40px; }\r
-\r
-/* .att-dark-green { // Not used\r
-  color: #007a3e;\r
-} */\r
-.colors-off-msg {\r
-  display: none; }\r
-\r
-button .colors-off-msg {\r
-  position: relative; }\r
-\r
-.ds2-no-colors .colors-off-msg {\r
-  display: block; }\r
-\r
-.ds2-no-colors [data-colordatatext] button .colors-off-msg {\r
-  font-size: 1.1rem;\r
-  line-height: normal;\r
-  padding: 5px 0;\r
-  position: absolute;\r
-  top: 0;\r
-  white-space: normal;\r
-  width: 60px; }\r
-\r
-/* Not used\r
-.make-all-white * {\r
-  color: #fff;\r
-}\r
-.make-all-white a {\r
-  text-decoration: underline;\r
-} */\r
-.loader > span {\r
-  display: block;\r
-  padding-top: 20px; }\r
-\r
-.modal > .loader {\r
-  left: 50%;\r
-  margin-left: -25px;\r
-  margin-top: -25px;\r
-  position: absolute;\r
-  top: 50%; }\r
-\r
-#pageLevelLoader.modal {\r
-  background-color: transparent;\r
-  border: none;\r
-  box-shadow: none;\r
-  top: 40%; }\r
-\r
-.modal.fade .loader {\r
-  display: none; }\r
-\r
-.modal.fade.in .loader {\r
-  display: block; }\r
-\r
-.btn.disabled[data-loading-text] {\r
-  padding: 0 19px 0 18px;\r
-  line-height: 46px; }\r
-\r
-.btn.disabled[data-loading-text] img {\r
-  position: relative;\r
-  top: 2px; }\r
-\r
-/*  Seems to already be in docs.css\r
-.fixed-230.leftnav {\r
-  position: relative;\r
-}\r
-.fixed-230-subnav {\r
-  margin: 10px;\r
-}\r
-.fixed-230-subnav > li:first-child {\r
-  border-top: none;\r
-}\r
-.fixed-230-subnav > li {\r
-  border-bottom: 1px solid #d2d2d2;\r
-}\r
-.fixed-230-subnav > li > a {\r
-  display: block;\r
-  font-size: 1.4rem;\r
-  line-height: normal;\r
-  margin: 0 -9px;\r
-  padding: 11px 35px 12px 9px;\r
-  outline-offset: 0;\r
-  position: relative;\r
-}\r
-.fixed-230-subnav > li > a.live {\r
-  color: #333333;\r
-  font-family: "Omnes-ECOMP-W02-Medium";\r
-}\r
-.fixed-230-subnav a > i {\r
-  right: 10px;\r
-  margin: 0;\r
-  position: absolute;\r
-  top: 10px;\r
-}\r
-.fixed-230-subnav a > i:after {\r
-  display: none;\r
-}\r
-.fixed-230-subnav > li li > a {\r
-  display: block;\r
-  font-size: 1.4rem;\r
-  line-height: 18px;\r
-}\r
-.fixed-230-subnav > li li > a.active {\r
-  color: #333333;\r
-  font-family: "Omnes-ECOMP-W02-Medium";\r
-  text-decoration: none;\r
-}\r
-.fixed-230-subnav ul {\r
-  margin: 0 0 10px;\r
-} */\r
-.unlinked {\r
-  color: #0568ae !important;\r
-  font-family: "Omnes-ECOMP-W02" !important; }\r
-\r
-.unlinked.active {\r
-  color: inherit !important; }\r
-\r
-/* @media (max-width: 767px) {\r
-  .row.has-leftnav {\r
-    flex-wrap: wrap;\r
-  }\r
-  .row.has-leftnav .fluid-space {\r
-    padding-right: 0;\r
-  }\r
-  .row .fixed-230 {\r
-    background-color: #fff;\r
-    width: auto;\r
-  }\r
-  .row .leftnav {\r
-    background-color: #fff !important;\r
-    display: block !important;\r
-  }\r
-  .fixed-230-subnav {\r
-    margin: 10px 0 0;\r
-    width: 100%;\r
-  }\r
-  .fixed-230-subnav > li {\r
-    margin-left: -15px;\r
-    margin-right: -15px;\r
-  }\r
-  .fixed-230-subnav > li:first-child {\r
-    border-top: 1px solid #d2d2d2;\r
-  }\r
-  .fixed-230-subnav > li > a {\r
-    margin: 0;\r
-  }\r
-  .fixed-230-subnav a:hover,\r
-  .fixed-230-subnav a:focus {\r
-    text-decoration: none !important;\r
-  }\r
-  .fixed-230-subnav > li li > a {\r
-    padding: 5px 10px;\r
-  }\r
-  .fixed-230-subnav > li li > a.active {\r
-    color: inherit;\r
-    font-family: "Omnes-ECOMP-W02-Medium";\r
-  }\r
-} */\r
-@keyframes DOMinsertion {\r
-  from {\r
-    outline-color: transparent; }\r
-  to {\r
-    outline-color: transparent; } }\r
-\r
-@-moz-keyframes DOMinsertion {\r
-  from {\r
-    outline-color: transparent; }\r
-  to {\r
-    outline-color: transparent; } }\r
-\r
-@-webkit-keyframes DOMinsertion {\r
-  from {\r
-    outline-color: transparent; }\r
-  to {\r
-    outline-color: transparent; } }\r
-\r
-@-ms-keyframes DOMinsertion {\r
-  from {\r
-    outline-color: transparent; }\r
-  to {\r
-    outline-color: transparent; } }\r
-\r
-@-o-keyframes DOMinsertion {\r
-  from {\r
-    outline-color: transparent; }\r
-  to {\r
-    outline-color: transparent; } }\r
-\r
-.ajaxed,\r
-.modal.fade.in .b2b-modal-header,\r
-.modal.fade.in .b2b-modal-body,\r
-.modal.fade.in .b2b-modal-footer {\r
-  animation-duration: 0.01s;\r
-  -o-animation-duration: 0.01s;\r
-  -ms-animation-duration: 0.01s;\r
-  -moz-animation-duration: 0.01s;\r
-  -webkit-animation-duration: 0.01s;\r
-  animation-name: DOMinsertion;\r
-  -o-animation-name: DOMinsertion;\r
-  -ms-animation-name: DOMinsertion;\r
-  -moz-animation-name: DOMinsertion;\r
-  -webkit-animation-name: DOMinsertion; }\r
-\r
-.dda-css-override ul.nav-tabs {\r
-  margin-bottom: 0; }\r
-\r
-.dda-css-override div.tab-content {\r
-  margin-top: 0;\r
-  border-top: none; }\r
-\r
-.dda-css-override .tab-content .prettyprint, .dda-css-override .usage .prettyprint {\r
-  max-height: 500px;\r
-  overflow-y: auto; }\r
-\r
-.formsWithinProcessButton {\r
-  margin-right: 0px; }\r
-\r
-.heading-sub-section-form {\r
-  font-size: 2.4rem;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  margin-bottom: 20px;\r
-  margin-top: 10px; }\r
-\r
-.heading-small-form {\r
-  font-size: 1.6rem;\r
-  font-family: "Omnes-ECOMP-W02, Arial";\r
-  margin-top: 0px; }\r
-\r
-.icon-primary-form-sizeL {\r
-  font-size: 50px; }\r
-\r
-.icon-primary-form-size {\r
-  font-size: 30px; }\r
-\r
-.spanformfix {\r
-  margin-right: 15px !important; }\r
-\r
-@media (max-width: 767px) {\r
-  .heading-sub-section-form {\r
-    font-size: 1.8rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-bottom: 20px;\r
-    padding-top: 10px;\r
-    margin-top: 30px; }\r
-  .heading-small-form {\r
-    font-size: 1.4rem;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    margin-top: 0px; } }\r
-\r
-@media (max-width: 479px) {\r
-  .icon-primary-form-resizeL {\r
-    display: none; }\r
-  .icon-primary-form-resize {\r
-    display: none; }\r
-  .heading-center-form {\r
-    margin-left: 20px; } }\r
-\r
-@media (min-width: 480px) {\r
-  .icon-primary-form-resizeL {\r
-    display: none; }\r
-  .icon-primary-form-resize {\r
-    display: inherit; }\r
-  .icon-primary-center-min {\r
-    margin-top: 30px; } }\r
-\r
-@media (min-width: 768px) {\r
-  .icon-primary-form-resizeL {\r
-    display: inherit;\r
-    margin-top: 30px; }\r
-  .icon-primary-form-resize {\r
-    display: none; }\r
-  .center-form-align {\r
-    margin-top: 35px; } }\r
-\r
-@media (min-width: 1024px) {\r
-  .icon-primary-form-resizeL {\r
-    display: inherit;\r
-    margin-top: 0px; }\r
-  .icon-primary-form-resize {\r
-    display: none; }\r
-  .center-form-align {\r
-    margin-top: 5px; } }\r
-\r
-.data-row.has-button td.col-1 {\r
-  padding: 0; }\r
-\r
-.tab-content > .tab-pane {\r
-  display: none; }\r
-\r
-.tab-content > .active {\r
-  display: block; }\r
-\r
-.icon-primary-circle:before {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");\r
-  content: "";\r
-  position: absolute;\r
-  top: 0;\r
-  z-index: 1; }\r
-\r
-.icon-primary-primary-circle:before {\r
-  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");\r
-  content: "";\r
-  position: absolute;\r
-  top: 0;\r
-  z-index: 1; }\r
-/* Flyout inputs color is not aligned */\r
-textarea, input {\r
-  color: #333; }\r
-\r
-.isIE .btn-primary.btn:focus::after,\r
-.isIE .btn-specialty.btn:focus::after,\r
-.isIE .btn-alt.btn:focus::after {\r
-  border: 1px dashed #fff !important; }\r
-.b2b-config-section-container {\r
-  height: auto;\r
-  min-height: 330px;\r
-  width: 815px;\r
-  background-color: #fff;\r
-  border: 1px solid #ccc;\r
-  display: inline-table;\r
-  border-radius: 6px; }\r
-\r
-.b2b-config-section-first-div {\r
-  border-right: 1px solid #ccc;\r
-  height: auto;\r
-  min-height: 330px; }\r
-\r
-.b2b-config-section-icon-primary-font {\r
-  font-size: 50px;\r
-  height: 31px;\r
-  line-height: 31px; }\r
-\r
-.b2b-config-section-padding {\r
-  padding: 20px 20px 15px 15px;\r
-  height: auto; }\r
-\r
-.b2b-config-sec-flyout {\r
-  position: relative;\r
-  left: 10px;\r
-  float: right;\r
-  color: #0574ac;\r
-  font-size: 16px;\r
-  font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-.b2b-config-sec-divider {\r
-  border-bottom: 1px solid #ccc; }\r
-\r
-.b2b-confi-sec-span-border {\r
-  border-right: 1px solid;\r
-  height: auto; }\r
-\r
-.b2b-config-sec-speed-div {\r
-  text-align: center;\r
-  margin-top: 20px; }\r
-\r
-.b2b-config-sec-label-font {\r
-  font-size: 16px; }\r
-\r
-.b2b-config-sec-expander-main {\r
-  padding: 0 5px 0px 15px; }\r
-\r
-.b2b-config-sec-expander-body .b2b-config-vlan-padding {\r
-  padding: 5px 15px 10px 0px; }\r
-\r
-.b2b-conif-sec-row-height {\r
-  height: 110px; }\r
-\r
-.b2b-config-sec-expander-body {\r
-  font-size: 14px; }\r
-  .b2b-config-sec-expander-body .b2b-config-vlan-data {\r
-    font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-    padding-left: 15px; }\r
-\r
-.b2b-config-sec-expander-body-first-div {\r
-  border-top: 1px solid #ccc; }\r
-\r
-.b2b-config-sec-expander-body .tooltip {\r
-  position: static;\r
-  opacity: 1; }\r
-\r
-.b2b-config-section-container .row > [class*="span"] {\r
-  margin-right: 0px; }\r
-\r
-.b2b-config-vlan-icons {\r
-  font-size: 16px;\r
-  float: right;\r
-  margin-right: 0px; }\r
-\r
-.b2b-config-section-container .span6 {\r
-  width: 50%; }\r
-\r
-.b2b-config-sec-data-link-style {\r
-  position: relative;\r
-  left: 95%;\r
-  top: 30px;\r
-  border-radius: 50%;\r
-  width: 23px;\r
-  height: 23px;\r
-  background: #fff;\r
-  border: 1px solid #ccc;\r
-  color: #666666; }\r
-\r
-.b2b-config-sec-text-align {\r
-  text-align: center;\r
-  margin-top: 15px;\r
-  margin-bottom: 35px;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 14px;\r
-  color: #333333; }\r
-\r
-.b2b-config-port-text-align {\r
-  text-align: center;\r
-  margin-top: 15px;\r
-  margin-bottom: 8px;\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 14px;\r
-  color: #333333; }\r
-\r
-.b2b-config-port-text-label {\r
-  margin-top: 6px;\r
-  margin-bottom: 8px;\r
-  font-size: 14px;\r
-  text-align: center; }\r
-\r
-.b2b-confi-sec-last-div p {\r
-  font-size: 14px;\r
-  padding: 10px 15px 0 15px; }\r
-\r
-.b2b-confi-sec-router-label {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 16px;\r
-  color: #333333;\r
-  float: left;\r
-  width: 100%;\r
-  margin-bottom: 7px; }\r
-\r
-.b2b-config-vlan-label {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 14px;\r
-  color: #333333;\r
-  margin-top: 1px;\r
-  margin-bottom: 9px; }\r
-\r
-.b2b-config-vlan-info {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  color: #333333;\r
-  margin-bottom: 1px; }\r
-  .b2b-config-vlan-info .icon-misc-pen {\r
-    padding-left: 7px; }\r
-\r
-.b2b-confi-sec-model-label {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  color: #333333; }\r
-\r
-.b2b-confi-sec-router-info {\r
-  float: left;\r
-  width: 62%; }\r
-\r
-.b2b-config-sec-speed-sec {\r
-  border-right: 1px solid #ccc; }\r
-\r
-.b2b-config-sec-speed-label {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 20px;\r
-  color: #333333;\r
-  text-align: center; }\r
-  .b2b-config-sec-speed-label i {\r
-    margin-left: 15px;\r
-    font-size: 16px; }\r
-\r
-.b2b-config-sec-yellow-flag-div {\r
-  width: 1.6%;\r
-  background-color: #ffb18c; }\r
-\r
-.b2b-config-sec-expander-icons {\r
-  margin-top: 6px; }\r
-  .b2b-config-sec-expander-icons .icon-misc-trash {\r
-    margin-right: 10px; }\r
-\r
-.b2b-config-sec-yellow-flag .b2b-config-sec-expander-icons {\r
-  left: 40px; }\r
-\r
-.b2b-config-sec-expander-body-icons .icon-misc-pen {\r
-  position: relative;\r
-  left: 18px; }\r
-.b2b-directory-listing .listBox {\r
-  height: 310px;\r
-  width: 450px;\r
-  padding-left: 1px;\r
-  padding-right: 1px;\r
-  font-family: "Omnes-ECOMP-W02", Arial; }\r
-\r
-.b2b-directory-listing .listBox:focus {\r
-  outline: thin dotted #666; }\r
-\r
-.b2b-directory-listing .b2b-directory-listing-no-results {\r
-  font-weight: bold; }\r
-\r
-.b2b-directory-listing .b2b-directory-listing-list {\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  color: #5a5a5a;\r
-  overflow-x: hidden;\r
-  position: relative;\r
-  height: 300px;\r
-  border: 1px solid #333;\r
-  border-radius: 6px;\r
-  margin-bottom: 10px; }\r
-\r
-.b2b-directory-listing .b2b-directory-listing-item {\r
-  margin: 1px;\r
-  border: 1px solid transparent;\r
-  outline: none;\r
-  text-align: left;\r
-  overflow: hidden;\r
-  cursor: pointer;\r
-  padding-top: 13px;\r
-  padding-bottom: 7px;\r
-  padding-left: 15px;\r
-  -moz-user-select: none;\r
-  -webkit-user-select: none;\r
-  -ms-user-select: none;\r
-  word-wrap: break-word; }\r
-  .b2b-directory-listing .b2b-directory-listing-item:focus {\r
-    border: 1px #3399FF solid; }\r
-\r
-.b2b-directory-listing .b2b-directory-listing-item-selected {\r
-  color: #fff;\r
-  background-color: #3399FF; }\r
-\r
-.b2b-directory-listing input[type="text"] {\r
-  padding-right: 30px; }\r
-  .b2b-directory-listing input[type="text"]:focus, .b2b-directory-listing input[type="text"]:hover {\r
-    padding-right: 30px; }\r
-\r
-.b2b-directory-listing .row .btns {\r
-  margin-right: 90px;\r
-  margin-left: -115px;\r
-  margin-top: 100px; }\r
-\r
-.b2b-directory-listing .btn-right {\r
-  margin-bottom: 15px !important; }\r
-  .b2b-directory-listing .btn-right:after {\r
-    content: "  \27A1"; }\r
-\r
-.b2b-directory-listing .btn-left {\r
-  margin-top: 10px !important; }\r
-\r
-.b2b-directory-listing .btn-remove {\r
-  margin-right: auto !important;\r
-  margin-bottom: 15px; }\r
-\r
-.b2b-directory-listing .btn-remove-all {\r
-  margin-top: 0;\r
-  margin-bottom: 61px !important;\r
-  /* need to be removed */\r
-  margin-right: auto !important; }\r
-\r
-.b2b-directory-listing .btn-add-all {\r
-  margin-top: 0;\r
-  margin-bottom: 61px !important; }\r
-\r
-.b2b-directory-listing .btn-left:before {\r
-  content: "\2B05  "; }\r
-\r
-.b2b-directory-listing .btn-search[class*="btn"] {\r
-  right: 0.09rem; }\r
-\r
-.b2b-directory-listing .btn {\r
-  width: 130px; }\r
-\r
-.b2b-directory-listing-disabled {\r
-  cursor: not-allowed; }\r
-\r
-.b2b-directory-listing-label-heading {\r
-  margin-top: 24px;\r
-  padding-bottom: 5px; }\r
-\r
-.b2b-dl-list-box option {\r
-  padding-top: 13px;\r
-  padding-bottom: 7px;\r
-  padding-left: 15px; }\r
-\r
-.b2b-dl-modal-button-div {\r
-  padding-top: 110px;\r
-  text-align: center; }\r
-.b2b-tmpl-notification-card {\r
-  border-radius: 6px;\r
-  height: auto;\r
-  width: 420px;\r
-  background-color: #ffffff;\r
-  border: 1px solid rgba(0, 0, 0, 0.1);\r
-  border-radius: 8px;\r
-  overflow: hidden; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-header {\r
-    padding-left: 30px;\r
-    font-family: "Omnes-ECOMP-W02", Arial;\r
-    color: #333333;\r
-    font-size: 24px;\r
-    margin-top: 2px;\r
-    display: inline-block;\r
-    min-height: 60px;\r
-    position: relative; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-body {\r
-    padding: 0 30px 20px;\r
-    position: relative; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-header-title {\r
-    margin-top: 10px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button {\r
-    box-shadow: 0 -50px 0 0 #f2f2f2 inset;\r
-    height: 69px;\r
-    position: absolute;\r
-    border-color: #f2f2f2 #f2f2f2 transparent transparent;\r
-    border-style: solid;\r
-    border-width: 35px;\r
-    height: 0;\r
-    right: -295px;\r
-    top: -4px;\r
-    width: 69px;\r
-    /*Old properties */\r
-    box-shadow: none;\r
-    transform: none; }\r
-    .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close {\r
-      height: 48px;\r
-      right: -40px;\r
-      top: -40px;\r
-      width: 48px;\r
-      position: relative;\r
-      /*Old properties */\r
-      transform: none; }\r
-      .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:before {\r
-        color: #0568ae;\r
-        display: block;\r
-        font-size: 20px;\r
-        height: auto;\r
-        right: -4px;\r
-        top: 4px;\r
-        width: auto;\r
-        /*Old properties */\r
-        left: auto;\r
-        height: auto;\r
-        bottom: auto; }\r
-      .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:focus {\r
-        outline: 1px dotted black; }\r
-  .b2b-tmpl-notification-card button.close {\r
-    -webkit-appearance: none;\r
-    moz-appearance: none;\r
-    appearance: none; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-icon-primary-cirlce {\r
-    width: 30px;\r
-    height: 30px;\r
-    border-radius: 50%; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-outer-cirlce {\r
-    background: #f0f5f5;\r
-    border-radius: 50%;\r
-    height: 16px;\r
-    width: 16px;\r
-    vertical-align: middle; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-inner-cirlce {\r
-    background: #fff;\r
-    width: 22px;\r
-    height: 22px;\r
-    position: relative;\r
-    border-radius: 50%;\r
-    display: block;\r
-    left: 4px;\r
-    top: 4px;\r
-    border: 1px solid #767676; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-row {\r
-    padding-top: 10px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-sub-header {\r
-    margin-top: 0px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item {\r
-    background-color: #fff;\r
-    margin-top: 25px;\r
-    border-top: 1px solid #ccc; }\r
-    .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item .cta-button-group {\r
-      line-height: 40px;\r
-      padding-top: 20px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-edit-section .cta-button-group {\r
-    line-height: 40px;\r
-    padding-top: 15px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-add-item-container {\r
-    padding-top: 30px; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-link-active {\r
-    pointer-events: none;\r
-    cursor: default;\r
-    color: #ccc; }\r
-  .b2b-tmpl-notification-card .b2b-tmpl-card-cursor:hover {\r
-    cursor: pointer; }\r
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon {\r
-  text-align: center;\r
-  margin-top: 91px; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon i {\r
-    font-size: 99px;\r
-    color: #1b7e28; }\r
-\r
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading {\r
-  color: #333333;\r
-  text-align: center;\r
-  margin-top: 20px; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading h1 {\r
-    font-size: 38px; }\r
-\r
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading {\r
-  color: #333333;\r
-  text-align: center; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading h5 {\r
-    font-size: 18px; }\r
-\r
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info {\r
-  padding-left: 18%;\r
-  font-size: 16px;\r
-  margin-top: 20px; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info ul {\r
-    list-style-type: disc;\r
-    list-style-position: inside; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info li {\r
-    padding-top: 5px; }\r
-\r
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section {\r
-  font-size: 15px;\r
-  color: #0574ac;\r
-  margin-top: 20px;\r
-  text-align: center;\r
-  margin-bottom: 55px; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section .b2b-tmpl-order-confirmation-link {\r
-    margin-right: 8%; }\r
-  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section a {\r
-    cursor: pointer; }\r
-.b2b-tmpl-profile-block-container {\r
-  min-height: 200px;\r
-  height: auto;\r
-  background-color: #fff;\r
-  border-radius: 8px;\r
-  border: 1px solid #ccc;\r
-  box-shadow: 0px 1px 1px 1px #ccc;\r
-  display: inline-table;\r
-  margin: 15px 15px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-title {\r
-    font-weight: bold; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-footer {\r
-    margin-bottom: 12px;\r
-    margin-top: 5px;\r
-    height: 35px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p {\r
-    word-wrap: break-word;\r
-    height: 61px; }\r
-    .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:first-child {\r
-      margin-top: 10px; }\r
-    .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:after {\r
-      content: ' ';\r
-      display: block;\r
-      border: 0.2px solid #ccc;\r
-      margin-top: 12px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio {\r
-    margin-left: 15px;\r
-    height: 30px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details div {\r
-    padding: 2px 7px;\r
-    font-size: 14px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio-label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details a {\r
-    font-size: 14px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p span {\r
-    padding-left: 10px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon {\r
-    color: #1b7e28;\r
-    float: right;\r
-    position: relative;\r
-    left: 10px; }\r
-    .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon i {\r
-      color: #1b7e28;\r
-      float: right; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-link {\r
-    float: right;\r
-    position: relative;\r
-    left: -4px; }\r
-  .b2b-tmpl-profile-block-container a.link-profile {\r
-    position: relative;\r
-    left: -5px;\r
-    float: right;\r
-    margin-bottom: 16px; }\r
-  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-radio {\r
-    position: relative;\r
-    top: -5px; }\r
-.b2b-static-route-container {\r
-  padding-left: 32px;\r
-  display: inline-block; }\r
-\r
-.b2b-static-route-label-heading {\r
-  font-family: "Omnes-ECOMP-W02-Medium", Arial;\r
-  font-size: 16px !important;\r
-  color: #333333;\r
-  font-style: normal;\r
-  text-align: left; }\r
-\r
-label.b2b-static-route-label-heading {\r
-  margin-bottom: 12px;\r
-  margin-top: 15px;\r
-  display: block; }\r
-\r
-#b2b-static-route-input {\r
-  margin: 5px 0 5px; }\r
-\r
-.b2b-static-route-list {\r
-  margin-bottom: 30px;\r
-  width: 216px;\r
-  float: left;\r
-  margin-right: 20px;\r
-  max-height: 540px;\r
-  overflow-y: auto; }\r
-  .b2b-static-route-list .status-text {\r
-    flex: 1;\r
-    display: flex;\r
-    align-items: center;\r
-    outline: 0; }\r
-\r
-.b2b-static-route-list-item {\r
-  border: 1px #cccccc solid;\r
-  font-family: "Omnes-ECOMP-W02", Arial;\r
-  font-size: 14px;\r
-  display: flex;\r
-  cursor: pointer; }\r
-  .b2b-static-route-list-item > .status-bar {\r
-    padding: 20px 0 20px;\r
-    background-color: #ea7400;\r
-    border-radius: 0;\r
-    width: 10px;\r
-    display: inline-block;\r
-    margin-right: 20px;\r
-    height: 100%;\r
-    float: left; }\r
-    .b2b-static-route-list-item > .status-bar:after {\r
-      content: '.';\r
-      visibility: hidden; }\r
-  .b2b-static-route-list-item > .status-bar-unedited {\r
-    padding: 20px 0 20px;\r
-    background-color: #ffb81c;\r
-    border-radius: 0;\r
-    width: 10px;\r
-    display: inline-block;\r
-    margin-right: 20px;\r
-    height: 100%;\r
-    float: left;\r
-    background-color: transparent; }\r
-    .b2b-static-route-list-item > .status-bar-unedited:after {\r
-      content: '.';\r
-      visibility: hidden; }\r
-\r
-.b2b-static-route-list-item:focus {\r
-  outline: 1px dashed #00f; }\r
-\r
-.b2b-static-route-list-item--selected {\r
-  background: #f2f2f2; }\r
-\r
-.b2b-static-route-content {\r
-  display: inline-block; }\r
-\r
-\r
-/*\r
-To Remove later\r
-*/\r
-\r
-.selectWrap::after { \r
-  align-items: center; \r
-  background-position: 7px 7px; \r
-  background-repeat: no-repeat; \r
-  background-size: auto 23px; \r
-  border-left: 1px solid transparent; \r
-  color: #0568ae; \r
-  display: flex; \r
-  font-size: 23px; \r
-  height: 36px; \r
-  margin-right: 0; \r
-  overflow: hidden; \r
-  position: absolute; \r
-  right: 0; \r
-  text-indent: 7px; \r
-  top: 0; \r
-  user-select: none; \r
-  width: 41px; \r
-  z-index: 0; \r
-  position: absolute !important; \r
-  display: flex !important; \r
+/*! b2b-angular-library - v1.0.1 - Last updated: 2017-03-02. Copyright (c) 2016 AT&T Services, Inc. */ 
+.b2b-horizontal-table {
+  border: 1px solid;
+  width: 651px; }
+  .b2b-horizontal-table ::-webkit-scrollbar {
+    height: 10px; }
+  .b2b-horizontal-table ::-webkit-scrollbar-thumb {
+    background: #666666;
+    border-radius: 5px; }
+  .b2b-horizontal-table .b2b-horizontal-table-inner-container {
+    width: 650px;
+    padding-left: 150px;
+    overflow-x: scroll; }
+  .b2b-horizontal-table th:first-child {
+    background-color: #FFFFFF; }
+  .b2b-horizontal-table td:first-child {
+    background-color: #FFFFFF;
+    border-top: 1px solid #cccccc;
+    border-right: 1px solid #cccccc;
+    margin-top: -0.5px; }
+  .b2b-horizontal-table tr th:nth-child(2), .b2b-horizontal-table tr td:nth-child(2) {
+    border-left: none; }
+  .b2b-horizontal-table .b2b-horizontal-table-column-info {
+    padding-top: 16px;
+    text-align: center; }
+  .b2b-horizontal-table .b2b-horizontal-table-arrows .btn-arrow:hover, .b2b-horizontal-table .b2b-horizontal-table-arrows .btn-arrow:focus {
+    text-decoration: none; }
+  .b2b-horizontal-table .b2b-horizontal-table-arrows .left {
+    float: left;
+    margin: 10px;
+    color: #0568ae; }
+    .b2b-horizontal-table .b2b-horizontal-table-arrows .left[disabled] {
+      color: #767676;
+      cursor: not-allowed; }
+  .b2b-horizontal-table .b2b-horizontal-table-arrows .right {
+    float: right;
+    clear: right;
+    margin: 10px;
+    color: #0568ae; }
+    .b2b-horizontal-table .b2b-horizontal-table-arrows .right[disabled] {
+      color: #767676;
+      cursor: not-allowed; }
+    .b2b-horizontal-table .b2b-horizontal-table-arrows .right.btn-arrow .btn {
+      margin-right: 0;
+      margin-left: 10px; }
+
+@-moz-document url-prefix() {
+  .b2b-horizontal-table td:first-child {
+    border-top: none; } }
+* {
+  box-sizing: border-box; }
+
+:root {
+  -ms-overflow-style: -ms-autohiding-scrollbar;
+  overflow-y: scroll;
+  -ms-text-size-adjust: 100%;
+  -webkit-text-size-adjust: 100%;
+  box-sizing: border-box;
+  font: 0.625pc/1.5 sans-serif;
+  text-rendering: optimizeLegibility; }
+
+html {
+  overflow-y: scroll;
+  -webkit-overflow-scrolling: touch;
+  height: 100%;
+  position: relative; }
+
+h1,
+h2,
+h3,
+h4,
+h5,
+p,
+blockquote,
+figure,
+ol,
+ul {
+  margin: 0;
+  padding: 0; }
+
+/* a:focus {
+  outline: thin dotted #191919;
+} */
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: top; }
+
+sup {
+  top: .75em;
+  display: inline-block; }
+
+sub {
+  bottom: -0.25em; }
+
+img {
+  max-width: 100%;
+  height: auto;
+  vertical-align: middle;
+  border: 0;
+  -ms-interpolation-mode: bicubic; }
+
+.img-no-rwd {
+  max-width: inherit !important; }
+
+svg {
+  display: inline-block; }
+
+.responsive-img {
+  width: 100%;
+  height: auto; }
+
+button,
+input,
+select,
+textarea {
+  margin: 0;
+  font-size: 100%;
+  vertical-align: middle; }
+
+::-moz-focus-inner {
+  padding: 0;
+  border: 0; }
+
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+  appearance: button;
+  cursor: pointer; }
+
+label,
+select,
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"],
+input[type="radio"],
+input[type="checkbox"] {
+  cursor: pointer; }
+
+input[type=search] {
+  -webkit-appearance: textfield; }
+
+input[type=search]:-webkit-search-cancel-button,
+input[type=search]:-webkit-search-decoration {
+  -webkit-appearance: none; }
+
+textarea {
+  overflow: auto;
+  vertical-align: top;
+  resize: none; }
+
+select {
+  -moz-appearance: none;
+  -webkit-appearance: none; }
+
+[aria-busy=true] {
+  cursor: progress; }
+
+[aria-controls] {
+  cursor: pointer; }
+
+body {
+  background-color: #ffffff;
+  color: #191919;
+  font-family: "Omnes-ECOMP-W02", Arial;
+/*  font-size: 1.6rem;
+  line-height: 2rem;*/
+  margin: 0;
+  position: relative;
+  width: 100%;
+  -moz-osx-font-smoothing: grayscale;
+  -webkit-font-smoothing: antialiased; }
+
+small {
+  font-size: 1.6rem; }
+
+.container {
+  margin: 0 auto;
+  padding: 0; }
+
+.tooltip {
+  display: inline-block;
+  height: 20px;
+  margin: 1px 0 0 7px;
+  vertical-align: middle; }
+
+.tooltip-wrapper {
+  display: none; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02";
+  src: url("fonts/Omnes_ATTW02.eot");
+  src: url("fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02.woff") format("woff"), url("fonts/Omnes_ATTW02.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Medium";
+  src: url("fonts/Omnes_ATTW02Medium.eot");
+  src: url("fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Medium.woff") format("woff"), url("fonts/Omnes_ATTW02Medium.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Italic";
+  src: url("fonts/Omnes_ATTW02Italic.eot");
+  src: url("fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Italic.woff") format("woff"), url("fonts/Omnes_ATTW02Italic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Light";
+  src: url("fonts/Omnes_ATTW02Light.eot");
+  src: url("fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Light.woff") format("woff"), url("fonts/Omnes_ATTW02Light.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Bold";
+  src: url("fonts/Omnes_ATTW02Bold.eot");
+  src: url("fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Bold.woff") format("woff"), url("fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("fonts/Omnes_ATTW02Bold.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Light-Italic";
+  src: url("fonts/Omnes_ATTW02LightItalic.eot");
+  src: url("fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Medium-Italic";
+  src: url("fonts/Omnes_ATTW02MediumItalic.eot");
+  src: url("fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Bold-Italic";
+  src: url("fonts/Omnes_ATTW02BoldItalic.eot");
+  src: url("fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+/* TODO: Build a reference page for these classes */
+.font-regular {
+  font-family: "Omnes-ECOMP-W02", Arial !important; }
+
+.font-light {
+  font-family: "Omnes-ECOMP-W02-Light", Arial !important; }
+
+.font-italic {
+  font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }
+
+.font-light-italic {
+  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }
+
+.font-medium {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }
+
+.font-medium-italic {
+  font-family: "Omnes-ECOMP-W02-Medium-Italic", Arial !important; }
+
+.font-reset {
+  font-style: normal;
+  font-variant: normal;
+  font-weight: normal;
+  text-transform: none; }
+
+.visible-phone {
+  display: none !important; }
+
+.visible-tablet {
+  display: none !important; }
+
+.hidden-desktop {
+  display: none !important; }
+
+.visible-desktop {
+  display: inherit !important; }
+
+.row,
+.row-nowrap {
+  margin-left: 0; }
+
+.row:before,
+.row-nowrap:before,
+.row:after,
+.row-nowrap:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.row:after,
+.row-nowrap:after {
+  clear: both; }
+
+.row:before,
+.row-nowrap:before,
+.row:after,
+.row-nowrap:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.row:after,
+.row-nowrap:after {
+  clear: both; }
+
+.row,
+.row-nowrap {
+  display: flex; }
+
+.row > [class*="span"],
+.row-nowrap > [class*="span"] {
+  float: left;
+  margin-right: 14px;
+  margin-right: 1.40845%\9; }
+
+.row > [class*="span"]:last-child,
+.row-nowrap > [class*="span"]:last-child {
+  margin-right: 0; }
+
+.row > [class*="span"].centered,
+.row-nowrap > [class*="span"].centered {
+  margin-left: auto !important;
+  margin-right: auto !important; }
+
+.row.no-flex,
+.row-nowrap.no-flex {
+  display: block; }
+
+.row.no-flex > [class*="span"],
+.row-nowrap.no-flex > [class*="span"] {
+  margin-right: 1.408450704225352%; }
+
+.row.no-flex > [class*="span"]:last-child,
+.row-nowrap.no-flex > [class*="span"]:last-child {
+  margin-right: 0; }
+
+.row.flex-justify,
+.row-nowrap.flex-justify {
+  justify-content: space-between; }
+
+.row.flex-justify > [class*="span"],
+.row-nowrap.flex-justify > [class*="span"] {
+  flex: 1 1 0; }
+
+.row.flex-justify > .flex-col,
+.row-nowrap.flex-justify > .flex-col {
+  margin-right: 14px;
+  margin-right: 1.40845%\9; }
+
+.row.flex-wrap,
+.row-nowrap.flex-wrap {
+  flex-wrap: wrap; }
+
+.align-items-top {
+  align-items: flex-start; }
+
+.align-items-center {
+  align-items: center; }
+
+.align-items-bottom {
+  align-items: flex-end; }
+
+.align-self-top {
+  align-self: flex-start; }
+
+.align-self-center {
+  align-self: center; }
+
+.align-self-bottom {
+  align-self: flex-end; }
+
+.row .fixed-230 {
+  flex: 0;
+  display: block;
+  width: 230px;
+  vertical-align: top;
+  min-width: 230px;
+  background-color: #efefef; }
+
+.row .fluid-space {
+  flex: 1 1 0;
+  display: block;
+  vertical-align: top;
+  padding-left: 0;
+  padding-right: 20px;
+  width: 100%; }
+
+.row .fixed-230 + .fluid-space {
+  padding-left: 20px;
+  padding-right: 20px; }
+
+.row .fluid-space:last-child {
+  padding-right: 0; }
+
+.span1 {
+  width: 7.042253521126761%; }
+
+.span2 {
+  width: 15.49295774647887%; }
+
+.span3 {
+  width: 23.94366197183099%; }
+
+.span4 {
+  width: 32.3943661971831%; }
+
+.span5 {
+  width: 40.84507042253521%; }
+
+.span6 {
+  width: 49.29577464788733%; }
+
+.span7 {
+  width: 57.74647887323944%; }
+
+.span8 {
+  width: 66.19718309859155%; }
+
+.span9 {
+  width: 74.64788732394367%; }
+
+.span10 {
+  width: 83.09859154929578%; }
+
+.span11 {
+  width: 91.54929577464789%; }
+
+.span12 {
+  width: 100%; }
+
+.offset1 {
+  margin-left: 8.450704225352113%; }
+
+.offset2 {
+  margin-left: 16.90140845070423%; }
+
+.offset3 {
+  margin-left: 25.35211267605634%; }
+
+.offset4 {
+  margin-left: 33.8028169%; }
+
+.offset5 {
+  margin-left: 42.25352113%; }
+
+.offset6 {
+  margin-left: 50.70422535%; }
+
+.offset7 {
+  margin-left: 59.15492958%; }
+
+.offset8 {
+  margin-left: 67.6056338%; }
+
+.offset9 {
+  margin-left: 76.05633803%; }
+
+.offset10 {
+  margin-left: 84.50704225%; }
+
+.offset11 {
+  margin-left: 92.95774648%; }
+
+.align-center {
+  margin: 0 auto;
+  text-align: center; }
+
+[class*="span"].align-center {
+  margin: 0 auto !important;
+  float: none; }
+
+.align-left .container {
+  padding-left: 0 !important;
+  margin: 0 !important; }
+
+/* BEGIN RESPONSIVE-4.LESS ************** */
+@media (min-width: 1025px) {
+  .row > [class*="span"],
+  .row-nowrap > [class*="span"] {
+    margin-right: 20px;
+    margin-right: 1.487301587301587%\9; }
+  .container {
+    padding-left: 20px;
+    padding-right: 20px;
+    max-width: 1260px; }
+  /* 1col = 6.878306878306879 */
+  /* 1colgutter = 1.587301587301587 */
+  .span0 {
+    display: none; }
+  .span1 {
+    width: 6.878306878306879%; }
+  .span2 {
+    width: 15.34391534391534%; }
+  .span3 {
+    width: 23.80952380952381%; }
+  .span4 {
+    width: 32.27513227513228%; }
+  .span5 {
+    width: 40.74074074074074%; }
+  .span6 {
+    width: 49.20634920634921%; }
+  .span7 {
+    width: 57.67195767195767%; }
+  .span8 {
+    width: 66.13756613756614%; }
+  .span9 {
+    width: 74.60317460317461%; }
+  .span10 {
+    width: 83.06878306878308%; }
+  .span11 {
+    width: 91.53439153439154%; }
+  .span12 {
+    width: 100%; }
+  .offset1 {
+    margin-left: 8.465608465608466%; }
+  .offset2 {
+    margin-left: 16.93121693121693%; }
+  .offset3 {
+    margin-left: 25.3968253968254%; }
+  .offset4 {
+    margin-left: 33.86243386%; }
+  .offset5 {
+    margin-left: 42.32804233%; }
+  .offset6 {
+    margin-left: 50.79365079%; }
+  .offset7 {
+    margin-left: 59.25925926%; }
+  .offset8 {
+    margin-left: 67.72486772%; }
+  .offset9 {
+    margin-left: 76.19047619%; }
+  .offset10 {
+    margin-left: 84.65608466%; }
+  .offset11 {
+    margin-left: 93.12169312%; }
+  .tooltip-size-control {
+    position: relative;
+    width: 400px; }
+  .thumbnails > li {
+    margin-left: 1.40845070422535%; }
+  .row .thumbnails {
+    margin-left: 0; } }
+
+/* END RESPONSIVE-4.LESS ****************** */
+/* BEGIN RESPONSIVE-3.LESS ******************* */
+@media (min-width: 768px) and (max-width: 1024px) {
+  .hidden-desktop {
+    display: inherit !important; }
+  .visible-desktop {
+    display: none !important; }
+  .visible-tablet {
+    display: inherit !important; }
+  .hidden-tablet {
+    display: none !important; }
+  .container {
+    width: 100%;
+    margin: 0 auto;
+    padding-left: 20px;
+    padding-right: 20px; }
+  .span0-md {
+    display: none; }
+  .span1-md {
+    width: 7.042253521126761%; }
+  .span2-md {
+    width: 15.49295774647887%; }
+  .span3-md {
+    width: 23.94366197183099%; }
+  .span4-md {
+    width: 32.3943661971831%; }
+  .span5-md {
+    width: 40.84507042253521%; }
+  .span6-md {
+    width: 49.29577464788733%; }
+  .span7-md {
+    width: 57.74647887323944%; }
+  .span8-md {
+    width: 66.19718309859155%; }
+  .span9-md {
+    width: 74.64788732394367%; }
+  .span10-md {
+    width: 83.09859154929578%; }
+  .span11-md {
+    width: 91.54929577464789%; }
+  .span12-md {
+    width: 100%; }
+  .offset1-md {
+    margin-left: 8.450704225352113%; }
+  .offset2-md {
+    margin-left: 16.90140845070423%; }
+  .offset3-md {
+    margin-left: 25.35211267605634%; }
+  .offset4-md {
+    margin-left: 33.8028169%; }
+  .offset5-md {
+    margin-left: 42.25352113%; }
+  .offset6-md {
+    margin-left: 50.70422535%; }
+  .offset7-md {
+    margin-left: 59.15492958%; }
+  .offset8-md {
+    margin-left: 67.6056338%; }
+  .offset9-md {
+    margin-left: 76.05633803%; }
+  .offset10-md {
+    margin-left: 84.50704225%; }
+  .offset11-md {
+    margin-left: 92.95774648%; }
+  .tooltip-size-control {
+    position: relative;
+    width: 300px; } }
+
+/* END RESPONSIVE-3.LESS ******************* */
+/* BEGIN RESPONSIVE-2.LESS *************** */
+@media (max-width: 767px) {
+  .hidden-desktop {
+    display: inherit !important; }
+  .visible-desktop {
+    display: none !important; }
+  .visible-phone {
+    display: inherit !important; }
+  .visible-tablet {
+    display: inherit !important; }
+  .hidden-phone {
+    display: none !important; }
+  .hidden-tablet {
+    display: none !important; }
+  .container {
+    width: auto;
+    padding-left: 15px;
+    padding-right: 15px; }
+  /*.row{ display:block; }*/
+  .row > [class*="span"] {
+    float: none;
+    margin-left: 0;
+    margin-right: 0;
+    width: 100%; }
+  .row {
+    display: block; }
+  .row.flex > .flex-col,
+  .row-nowrap.flex > .flex-col {
+    margin-right: 0; }
+  .row .fixed-230 {
+    display: block;
+    width: 100%; }
+  .row .fluid-space {
+    display: block;
+    padding-left: 0;
+    padding-right: 0;
+    width: auto; }
+  .row .fluid-space + .fixed-230 {
+    padding-left: 0; }
+  .row .fluid-space:last-child {
+    padding-right: 0; }
+  .span0-sm {
+    display: none; }
+  .span1-sm {
+    width: 7.042253521126761%; }
+  .span2-sm {
+    width: 15.49295774647887%; }
+  .span3-sm {
+    width: 23.94366197183099%; }
+  .span4-sm {
+    width: 32.3943661971831%; }
+  .span5-sm {
+    width: 40.84507042253521%; }
+  .span6-sm {
+    width: 49.29577464788733%; }
+  .span7-sm {
+    width: 57.74647887323944%; }
+  .span8-sm {
+    width: 66.19718309859155%; }
+  .span9-sm {
+    width: 74.64788732394367%; }
+  .span10-sm {
+    width: 83.09859154929578%; }
+  .span11-sm {
+    width: 91.54929577464789%; }
+  .span12-sm {
+    width: 100%; }
+  .offset1-sm {
+    margin-left: 8.450704225352113%; }
+  .offset2-sm {
+    margin-left: 16.90140845070423%; }
+  .offset3-sm {
+    margin-left: 25.35211267605634%; }
+  .offset4-sm {
+    margin-left: 33.8028169%; }
+  .offset5-sm {
+    margin-left: 42.25352113%; }
+  .offset6-sm {
+    margin-left: 50.70422535%; }
+  .offset7-sm {
+    margin-left: 59.15492958%; }
+  .offset8-sm {
+    margin-left: 67.6056338%; }
+  .offset9-sm {
+    margin-left: 76.05633803%; }
+  .offset10-sm {
+    margin-left: 84.50704225%; }
+  .offset11-sm {
+    margin-left: 92.95774648%; }
+  input {
+    padding: 8px 15px 8px 15px; }
+  .field-group input.input-emphasized[type="search"] + .reset-field:after {
+    top: 14px; }
+  .field-group input.input-emphasized[type="search"] + .reset-field {
+    height: 46px;
+    top: 1px; }
+  .marquee {
+    margin-bottom: 30px; }
+  .marquee .blur-overlay {
+    border-radius: 0;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    margin: 0;
+    padding: 34px 15px 30px; }
+  .marquee + div {
+    margin-top: 30px; }
+  .marquee h1 {
+    font-size: 1.8rem;
+    letter-spacing: -0.035px; }
+  .marquee .lead {
+    font-size: 3.0rem;
+    line-height: 3.6rem;
+    margin-bottom: 0; }
+  .marquee p:not(.lead) {
+    font-family: "Omnes-ECOMP-W02-Light" , Arial;
+    font-size: 1.8rem;
+    margin-bottom: 0; }
+  .marquee .btn-fullwidth {
+    margin-top: 10px;
+    width: 100%;
+    float: none; }
+  .tooltip-size-control {
+    width: 100%; }
+  .table-wrapper,
+  .accordion-table-layout {
+    margin-left: -15px;
+    margin-right: -15px; }
+  .table-wrapper caption {
+    padding-left: 15px; } }
+
+@media (max-width: 480px) {
+  .span1-xsm {
+    width: 7.042253521126761%; }
+  .span2-xsm {
+    width: 15.49295774647887%; }
+  .span3-xsm {
+    width: 23.94366197183099%; }
+  .span4-xsm {
+    width: 32.3943661971831%; }
+  .span5-xsm {
+    width: 40.84507042253521%; }
+  .span6-xsm {
+    width: 49.29577464788733%; }
+  .span7-xsm {
+    width: 57.74647887323944%; }
+  .span8-xsm {
+    width: 66.19718309859155%; }
+  .span9-xsm {
+    width: 74.64788732394367%; }
+  .span10-xsm {
+    width: 83.09859154929578%; }
+  .span11-xsm {
+    width: 91.54929577464789%; }
+  .span12-xsm {
+    width: 100%; }
+  .offset1-xsm {
+    margin-left: 8.450704225352113%; }
+  .offset2-xsm {
+    margin-left: 16.90140845070423%; }
+  .offset3-xsm {
+    margin-left: 25.35211267605634%; }
+  .offset4-xsm {
+    margin-left: 33.8028169%; }
+  .offset5-xsm {
+    margin-left: 42.25352113%; }
+  .offset6-xsm {
+    margin-left: 50.70422535%; }
+  .offset7-xsm {
+    margin-left: 59.15492958%; }
+  .offset8-xsm {
+    margin-left: 67.6056338%; }
+  .offset9-xsm {
+    margin-left: 76.05633803%; }
+  .offset10-xsm {
+    margin-left: 84.50704225%; }
+  .offset11-xsm {
+    margin-left: 92.95774648%; } }
+
+/* END RESPONSIVE-2.LESS ******************* */
+/* BEGIN RESPONSIVE-1.LESS ************** */
+.xxxxxxxx-begin-responsive-480px.less {
+  /* placeholder */ }
+
+@media (max-width: 480px) {
+  .hidden-desktop {
+    display: inherit !important; }
+  .hidden-tablet {
+    display: inherit !important; }
+  .hidden-phone {
+    display: none !important; }
+  .visible-desktop {
+    display: none !important; }
+  .visible-tablet {
+    display: none !important; }
+  .visible-phone {
+    display: inherit !important; }
+  .container {
+    width: auto;
+    padding-left: 15px;
+    padding-right: 15px; } }
+
+@font-face {
+  font-family: 'icoPrimary';
+  src: url("fonts/icons/icoPrimary.eot?timestamp=@@timestamp");
+  src: url("fonts/icons/icoPrimary.eot?timestamp=@@timestamp#iefix") format("embedded-opentype"), url("data:font/woff2; charset=utf-8;base64,d09GMgABAAAAABD0AAsAAAAAIegAABClAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAfBEICroMr2IBNgIkA4EgC1IABCAFgyoHIBupG1GUj1aB7Gdh7HA7jbPiOgkYNpcuoRGZ37q6G3w0QpLZI9q02bs97HSRw5ogEesTAjElSqy0FGpCCRWzJBXR9DXJiydPX7T+Ip7vq3Pv2mcm2W+ShSugqkVXWVfbquUDpNKMTezCAYKwBVR91VU1+/0yazd3Lg9/AVmoSmRNKGStQEmoXKfLdLXNNyxbs5Yfwc8kTV8FeDfk73Xq+p9zCqBT5NCYYSvusE3/f1mxnmQFWA6RnaJdkoqgAvFKLJdQbnlDXMbO3TvsHZa1ZsvFBqhZqAl6879jOe2lIjbiiEUU6HPz354AaHoI7QMGgDpOXQeAvZtjQTfBi9SwGR2SIFAN8E15bK7/byAvdR15B0eq3dPoY80wQNCRBpSOYaquB+mFOI/OPmQdcg6lDWUMzf2mPPFfIgEMIB8Vhmz3g8Q/IzYiOSH/Lz9muMlr/jtGiCJVD2IyIRDYAKCZgxRuYmymuEdFrlK6KIorkyoV0Jgn91QkTcVrHlnDg0jnUvGnTA92OqstI80g6PVEEm6BJ58mg+OFFJIiZSQJRK/PEoSkZFHIMFiIwSg5iVar1xtzjZI/tyLTWigIQa1DY08zd4EUSVJK8Gz82QyGgCCkMyoZr7IHBBsvEoBwgxx6h+4EV3YeZwzc4W52q6lXGM9evr6oy1gTMmP79l5RTsJBClIq7jrFUaLH1BlHKTeOKPwhzFfAQqrZ2mdSzISbZTdbdQl5bjevMrg6SgcDfJsLwZ/gjUAu7PiWjAuyegyQbSvIRz8KdZreQMHJY91AKf2ArQnUq2M6QdzlV0h1cKvJFCQVXWrjZUR+mfsPuqrSKAw7vXHdA4jIfVYLo4QrFyzwSOWFzqWWIKXKCEE+n6FtUFH2YbuLsSii68GKBu9o6y0RSZVJ6FRPGxY6Wb2FSJub7hiVhvKqc+F2ZtFE3vy1GtWhiilfD6YouogRzzUU9QRuchi1FjSJJgeylOAoWaCMiX6CWJbjEw6CqMHl0OrKXnIfH7FAFHoZV2FPGgcTV4VSp4ELLxaGwcusuFYdvr5GheLQpKy5GMVLTbBdzuKpytLgd8xSTL08wGmaatJUkkztzRHn2w1Xct5RnWGYyhc+auWs9aErust7X2pNknPQ2B2xIlkrnvHaZA1jFaxXrNVb3cXM+hsVaV1EXdc/huV7XRgkZtxMJhCI4mMuecG0QWlOcxNicqGmtL5Yl1MtLdMuJZAYGFr+/P8+gr7e06WKrICOPml5b5Sf7tmW1JdFGrwGUEwBf/ugoV77AoqJkjXmTRyNQO+F45oBx8CweKoOWwPZj+aomITyzIUd5nHykU3h0LJjuvrUF2MQTKJTKF3omb9SMBepKzcOhZBoAWkP8+mKQRI+dD7mrTs3znGe6gr/mwGLt422RgkZnEDSK3zTEJuKNuypY3YIlACmD/E9UiDiW2pRpQFoIgY7UcwtdgFPmOI1KptGbgcZMkRPIREEQT6lN2dwYWs3U1lqLIorlivL7I4rN2oukpq/qu/QZiikJ5jZH+SjMMi4EXhLg9b7QhPFhFjkFki1i1pl8SNzSoZkDACAalthJVIMPBQdXQdiqtHyZrzsHFI1T5Gb6wPe+qNx+crLqRAFgeKxDOFLaukLuRIbl/ourN1HPnsxaSqUSLpJAXWIYs5UHlzOXzuteVtoQ9hau02jSTcwSs6UMVxp7dI8ung189KKGvmmpMtZF8G85uXCLcWOprejUii+ko1h/AYKs28W8lVRxlHzLI3XJYBelGiLoBBX01ilMCJwScYKsWmLVkmq3hLYezFPsXpoGkVE5aRiCpXBlhyDAsMTY/jqTSxhSLVsMwKRptxYOTg30SKjXESn43ch5IpJaBAUozLiiL05h3Fv0VN2IQVOPehaVXcThJXuuUP07jSi5YgkX2ndValmfTYCjkkCWR8V63ctCjduimfsyJwyXMMi0V6sJBKjXkPZ56wEKGZTEvPG49iM57DV0TwzvaYbajGyUZv0NuTSsnNYBdvKsVZ80SobcaqLo+xtycdXWB+FcsLCVjAcE0eYu6bcbIAxp3N1M+GWLWpksrCjNS5NMpa365lnKZz9bAw3TUuws386w6Zoq20INqiI5w/boj3XHG9/C3MNubDPWsPY/O5u09KaHVOf+vbCgu3+6z5//jc2vXnoO896lqr8R6+f2/+3/Id9t16NzQwm4gf+PncKN87cnnbF+sZXu3+sH5hdu8N1wRwqX6mdkxYu6pw+sW2997RlbPcH0/ZmTC8raJhvqPKYLvXHRhWudJ1Liu64Nz1W8PzkrZp6Z9LWpSP6fa/kdETO32qo9piy5EebyrZ4nnduD+7TLUhvKr613OaZIfbAshG9RfHkhuZOayS3tCbN4lZQQOUt7CEYG95Y7LrV1nEsHErjtvc7U3FsAU4PVnTl3GUMT+i0jMk+bNV9k3a984q/YP+GVL9/c+pBVZ7Gvrd4a81CErT+ojV89xV8dPwpYSkhdeQFsbU/BImq2YOBHTsCg7NnF7Smp9Vs1IHiwstT7vCvX+e/c8oU/x3r1t/pJwZ5vcwDM5Q4XaliSPRz3lVO0/posZkkb11CSuJ1weOcUyd/YPjR8IEMNpzXWqe+plZfVyty0Ta+hbOS+4Pf5+eQB1TkesscVVylVfWpwqpeIo+ZoNBXpr+m7+D83+FFaR3pYBNKfmNFtoNLqD+VsMNrGbzE/1kJMbia6E+rDmfQxMiOnos7MBPGczniMTmEC0RIN5G5tSsIWTFMdU1VqI6Xpri6VYdDOJypzNwIhQfQq/IHhgEY5LaybdyPNqvkJkJV6tvK2iyFAwbOgV9Wx9VnSraqrlGptkLhKMtVKSz+URWSxvuO4w5c+ZoW+nHfeEuEP8SwJA1THlNe7bQ/rsYFBzQfaIpwlKlCcBEi6ADB/HoNDjMowhoPzicj9C72LEWiQtTTeZbsSH8kbccSNEkpuNMeSQ9V0ZlhnvATXeK1XMiOLlVcNbkokdXLjVbLbcF2Y2BnWSxWtjMQKN8Jesoj7q5ySmoZhELhgawx451aHRErl0sOS5WjK7SR/70L9DPSJxQFHJCod5eSp4TGVrqNha981GKj7l0W2QAYb4DIgf7MRzL6D3oWg0RR8Hob0w/2ZzyS2Y+CrO0HbWQjILQRItofbI/YPtamLAOeQjAgH0d4IjtMVhCykoSZ7YHKsCquropUYZpZHT90yiY4+ECT4RefbRyPNykYkPewzh5K73tqrO/kkiUnfWPHCirpaTkWfa3vxypHHMydVDyqsTnYNtppK0W+fwozn7eXbcxSxhQIuIX6Wr1GH9Sr9SEi9YvM8YU/+8jIKk8QNbnTIquTCzti6ZyeS491FCYtiZvjFpYTzJp41vJp4J6lULO3NnWBM700r7aqrZmaIBZaBzeGbWVzV84YVf1EU853ybe8b7QojW6d5HDbeafdSdEgB2+32+D3NRpj54fZLwvC99mVzccCu8LEiqxx2YNZWEaH0/677E86jRpT8it4PjlV+Mu6J0Vh144nfrg77dq1wLWe/Y6994T//mvZWSjZN5H8ePVdv36Wwf/u1Y8JAkAIsBKbl47Ll9++2wzmu9/e9HFLzbIYIO41PbOPPMdEOCU/3Sg9a3bX57+hFtVv1NVXWUINujqdSpevU+q862up1UEROWGr63KbvtWcZYFjgd1WQeQIQKfv/fRKVdLxpCkCVlC7aAVO2p58udqwMfsljBIv7tt1UNKjATlYVfE1pmhKf10H3qktgGC/kYk6imEfAALQvGuq/BZoxCaUw2EsjWDQX9RTmMJJxqqDJLXLkXA4UU8z1DHto99cmRs9NvfsBpBnVCcfwc3xBfAZHKQp6yrHAetqau7Y/3qvEfPOzguH15gjv45zhAYoTAEAlYrW3iuxRcuBeAgAUCkE0ttVJq/ZnGKiMV2qMXtN5OxaIKljlsAszEVLJyYof/m8/L/cdcydFqyuDKfkeZiudqlBdxIAGK4b9JUNAEBS0cjW0hKqLzrGGiOnh3KQ/zP+avzv3uyVqkr6jqEERzETpZddeWYZuMFzMCckS8bWU8OdbYMBh8s10jG433q4j128fIas0f1p8rkb6jweLnX7OtuL+kpGBcrKgoESn9SsUvR4Pc0KX6atPtKUnJ3lTw6Sw8xTjUZQsArReKdhKA8Z9axQK95JCQIbf6d4dVoFXum8/L+RPeZOzU+iJ4+kzV/xyvj1IhSXlObJifEYeN2dxp+mD3oyxtTWTEjLz2e60vNVeAbz3vOiChblVxi/NFbko0rPy+6g473UEa6BhoHqSRNqfVRa3Zz9L9FcPLKtpDTQVjywaMCVMuJm0JFLXsOki3ypXQ70cBq6yXYAgEmkm0C6ZmZzjMlyCROr6iq6K1Zs7MovYVA47f9pWVit40j6vHVwGk/4uay9spjYHWVCzCIMeS7ceBFT4sNoRzwPXw8b/4KIjNR2D+hitbmpNR9o86D4fgvE4DgMWLpa1aARLEtHarsBwkeHS20xkbBYWCwsnsd7PCixPw2A8gwfyq3D5A8Mhu/kYWNu5IP+rfKHhvF4EcYMAOT+kX3gyOjgct+RvgW99/bc+9z5vp4+wyP3Htnx8PupRCcPPCfxIznC8Yh7PMBL3FtWTrcBOMK32gxsKw22MVvMd9ga1ZzZ3+N2thOtW3R/Z88Do5MDPzmEW/zAvoN37evbJ++7d9+F3fLaiznEQ/7Gp5K2Jw8OmgJasSIPEpK3UzRDYiWL8KxtIc2veoLtVb+vYS8K+/MXt7erb7Bu9U2WvS5eavPNPl/Fq+ol0Tlzoxnq1WS5trnU5LReMjlMTxQvdmm411KfpVyhbFzALMcLnn7llvEH1e+z6sfZCer3QJ4ozNngqVQ8oPAiWV332kDBUz0DlqjlkpUniltC1ktm3OZRj7ZDe4nEtHFtjFw6J46fLsQdzCbqh5kOvOkqu3czy/E2vJzB8xBjE47hSeAQUDQ+NIIJJHcgc33JO5go3T5nbvdKNih/LyMcY/AKjIRcPkhVk/UiuI5Kobe/Wfmb29tOdK4Y3xGNAZo99oRLIycsxqF/53E//4rOrZ7IcyUrz1zamdx7l22wa9VPbTt/+3RpwS7XGPXTfznuQ4seHl/I1Bfh7v704h7DbJ1YrZ9fk1Cjh89vud1+e6Dn9oLND1k2nyGb15Py4uQHm/bPPjd6TvWE86Nnb7oWF5eHKmfisSDQBo638MeOe4u9vwwNv3pLvPs/SCLXK3U61/uidPwYDwAaoAEAXk1sFTnoJryR2CFc6H1YnqgROygXnEj8QI9B6wABAAJ4aV5G3xSx/DcViwEA4HX9bwcnNv8/hYF6CgBUCoBj8/ctSgEwLfAaYK1MjKj3JKNalv6Np+hn6IVTECHLyhCO9gGOC0EIQwCL8Cq+AZgJs8mkBPDCFHwJcAOWw3x4DAZhFkRgrBZK8p8ApGFPeAVEoOa7qxHgnjy5EWikZwYFSliTQYMGqgAL+zIYYCE5QwEamBTUgAXu+SEdYXWNHjSQQYEAm5G2CX7EEE5kMCBDFiogxGbRQD5cnhVZ8IcXEWAWRGABBGDxrs+DaZm26jMzoXkuN4Qh+sQlDhpwMeaDHfLABW7SRUiQ/qzjCjAKohCDZTA3bBHS848Uz/MxDNlf8H9qtgQaVMKluR6D6M4VxWl3PQozoE+HVbPq54ZtzPEO3AU0bAAAAAA=") format("woff2"), url("data:application/font-woff; charset=utf-8;base64,d09GRgABAAAAACJAAAsAAAAAIfQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgEAQFaGNtYXAAAAFoAAAAfAAAAHy9F7zuZ2FzcAAAAeQAAAAIAAAACAAAABBnbHlmAAAB7AAAHRgAAB0Yg9YlNWhlYWQAAB8EAAAANgAAADYLSS2jaGhlYQAAHzwAAAAkAAAAJAbOAvZobXR4AAAfYAAAAKAAAACglK4SEGxvY2EAACAAAAAAUgAAAFKIhIEEbWF4cAAAIFQAAAAgAAAAIAA4ANNuYW1lAAAgdAAAAaoAAAGq0IdVx3Bvc3QAACIgAAAAIAAAACAAAwAAAAMD6QGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6jwCzP7NATMCzAEzAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEAGAAAAAUABAAAwAEAAEAIOkb6SLpJekn6WzqPP/9//8AAAAAACDpAOkf6SXpJ+ls6jz//f//AAH/4xcEFwEW/xb+FroV6wADAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAYACf7JA/0CtwASAC0ATABzAJgArQAAFx4DMzI+AjcOAyMiJicFMj4CNz4BNz4BNw4DIyIuAiceAzMnIi4CJxQWFx4BFx4DMzI+Ajc+AT0BDgMjAQ4BBwYWFx4DMzI+Ajc2NCcuAScWDgIjIi4CNT4BNTIwIyUeARUUDgIjIiY1NDY3DgEHDgEVFB4CMzI+AjU0JicuAScnLgEjIgYHDgEVFBYzMj4CNTYmJ8ogSE5ULDBbVE0hDzlUbkN1mSgBWC9gWk8dEh4PCRAGHGuLpFU8eWxXGRddf55YiGGQYzYHBAQCDQsXU3mhZYqwaC0GCQsJda3SZv6cCxYEAgMCDEmExolTkXBJCwQEBxELAXarvEZKhmQ7AgQCAgMXAgE+c6VmmFcJCxMjEQcHVIeqVluGWCoPEw0ZDUo6gElJgzoRFJCEQXFUMAIPD84ZJxsOESEuHQodGxQqGBoNGiYaDCYYDiEPKUQvGhMmOCYzTjQb3ig8Rx8VMBMJGA0YNy8eJzY2DxVGIh0lUEMsAaIVQRMJCgcYPDMjFCc5JQ0fExUwEzFQOB8cMEIlCxEGogIFBBU2LyBWJQwaDRMlFQgQBCY+LBgbKzYbExsWDRYKNiIlJSQJEgogORIcJBIGDggAAAEA+gCaAw0A5gANAAAlISImNTQ2MyEyFhUUBgLg/kAOGBURAcYPGBqaFRERFRURERUAAAACAAD+wAQAAsAAEwAnAAABIi4CNTQ+AjMyHgIVFA4CAyIOAhUUHgIzMj4CNTQuAgIAarqLUVGLumpquotRUYu6al+of0pKfqlfX6h/Skp+qf7AUYu6amq6i1FRi7pqarqLUQPQSn6pX1+of0pKf6hfX6h/SgAAAAADAEn/UgO3Ai4AEAAgADAAAAEhIgYdARQWMyEyNj0BNCYjESEiBh0BFBYzITI2PQE0JgMhIgYdARQWMyEyNj0BNCYDkvzcDxYWDwMkDxYWD/zcDxYWDwMkDxYWD/zcDxYWDwMkDxYWAi4WD0kPFhYPSQ8W/tsVD0oPFRUPSg8V/twWD0kPFhYPSQ8WAAQAqv8VA1YCawAPAB0AKgA7AAABISIGFREUFjMhMjY1ETQmAyMiJjU0NjsBMhYVFAY3DgEHBiY3PgE3NhYHNxQGIyEiJjURNDYzITIWFREDIv28Fh4eFgJEFh4ew0QJDQ0JRAkMDIQCEgwWHwQDEgwWHwUbDAj97ggLCwgCEggMAmseFf0QFR4eFQLwFR785QwJCQ0NCQkMDQwSAgQfFQwSAwQfFmwIDAwIAlYICwsI/aoAAAYAnP8VA2QCawAQACEASABUAGEAbwAAATQmIyEiBhURFBYzITI2NREDISImNQM0NjMhMhYVERQGIwMRFAYjISImNTQ2MyEyNjURNCYjISIGFREUBiMiJjURNDYzITIWFQMiBhUUFjMyNjU0JgciJjU0NjMyFhUUBiMnFAYrASImNTQ2OwEyFgNkHRT9mhQdHRQCZhQdMf2aCxABEQsCZgwQEAwYEg3+CAUGBgUB+AQFBQT+CAQFBwQFBhINAfgNElERGRkREhgYEggNDQgJDAwJTQYEVgQGBgRWBAYCOxQcHBT9ChQcHBQC9vzvEAsC9gsQEAv9CgsQAtT92Q0RBgUEBgUEAicDBQUD/pQEBwcEAWwMEhIM/ZwYEREYGBERGD0MCAgMDAgIDBQEBgYEBQYGAAAAAgBj/24DnQIBACIAMwAAASEiBhURFBYzIRUjIgYVFBYzITI2NTQmKwE1ITI2NRE0JiMDFAYjISImNRE0NjMhMhYVEQNp/S4WHh4WAU2IDBAQDAFIDBAQDIgBTRYeHhYFDAn9YgkMDAkCngkMAgEeFf5IFh47EQwLERELDBE7HhYBuBUe/i8JDAwJAYQIDAwI/nwAAAMAdf9/A4sCGgAiADIAWQAAASEiBhURFBYzIRUjIgYVFBYzITI2NTQmKwE1ITI2NRE0JiMTFAYjISImNRE0NjMhMhYVBxEUBiMhIiY1NDYzITI2NRE0JiMhIgYVERQGIyImNRE0NjMhMhYVA2X9NhAWFhABWpkEBwcEAUgEBwcEmQFaEBYWEBEKB/02BwoKBwLKBwonDgr9yQQHBwQCNwECAgH9kgECBgUEBg4KAm4KDgIaFw/+CRAWQgcEBAcHBAQHQhYQAfcPF/3jBwkJBwH3BwkJBzD+bgoOBgUEBgIBAZIBAgIB/vYEBwcEAQoKDg4KAAADAQT/DwL8AngAHAAqADsAAAEuASsBIgYHDgEVERQWFx4BOwEyNjc+ATURNCYnAyMiJjU0NjsBMhYVFAY3FAYjISImNRE0NjMhMhYVEQKrJHUPBg91JCgpKSgkdQ8HDnUkKCkpKIBWDRISDVYNEhKLDAj+oggMDAgBXggMAnMDAgIDBCsm/UolKwQDAgIDBCslArYmKwT82BINDRITDA0ShwgMDAgCFgkMDAn96gAAAAIAAP7ABAACwAATACcAAAEiLgI1ND4CMzIeAhUUDgIDIg4CFRQeAjMyPgI1NC4CAgBquotRUYu6amq6i1FRi7pqUIxoPD1ojE9QjGg8PGiM/sBRi7pqarqLUVGLumpquotRA4A8aIxQUIxoPD1ojE9QjGg8AAAAAAEAAP7ABAACwAAoAAABBx4BFRQOAiMiLgI1ND4CMzUiDgIVFB4CMzI+AjU0LgInA2lYMzw9aIxPT4xoPT1ojE9quotRUYu6amq6i1EVJzgjAilbM4xPT4xoPT1ojE9PjGg9gFGLumpquotRUYu6ajVlXFEiAAAAAAIA+v+6Aw0BxgANABsAAAUiJjURNDYzMhYVERQGNyEiJjU0NjMhMhYVFAYCAA4YFRERFRjS/kAOGBURAcYPGBpGFREBwA4YFRH+Og8R4BURERUVEREVAAAFAQD/DAMAAnsAHAA6AEkAVwB+AAABLgEjIgYHDgEVERQWFx4BMzoBMTI2Nz4BNRE0JhMUBgcOASMiJicuATURNDY3PgEzOgExMhYXHgEVEScjIgYVFBY7ATI2NTQmIxUjIiY1NDY7ATIWFRQGExEUBiMhIiY1NDYzITI2NRE0JiMhIgYVERQGIyImNRE0NjMhMhYVAqsngAQEgCcqKysqJHMQAgIEgCcqKysVHyIngQEBgSciHx8iI3YNAgEBgSciH79WERgYEVYRGBgRVggMDAhWCAwMlRMN/rAFBgYFAVAFBgYF/rAFBgYEBQYTDQFQDRMCdgQBAQQDLSj9SictBAMBAQMELScCtigt/PUfIAMEAQEEAyAfArYfIQMEAQEEAyEf/UorGBERGRkRERg+DAkIDAwICQwCnf3hDhIGBQQGBgUCHwQGBgT+fwQGBgQBgQ0SEg0AAAMAVf8VA6sCawAUAC4APwAAJRQOAiMiLgI1ND4CMzIeAhUFMzQ2NTQmIyIGFRQWNz4BMzIWFRQGBwYWMQcUFjsBMjY9ATQmKwEiBh0BA6tDdJxYWJx0Q0N0nFhYnHRD/iM+lFNKU040AQUwNigtgQgBAQ0VFAoUFhYUChQVwFicdENDdJxYWJx0Q0N0nFhoTzBdOEhVIh8LAiM8JiA7KmgHAnEUFBQUCRQWFhQJAAAAAwBV/xUDqwJrABQAKwA7AAAlFA4CIyIuAjU0PgIzMh4CFSUTHgE7ATI2NxM2JicuASsBIgYHDgEXEzQmKwEiBh0BFBY7ATI2NQOrQ3ScWFicdENDdJxYWJx0Q/4cGAEKEQkRCwIXAgQHBxMMFAwTBwcEAnQcGgsZHBwZCxocwFicdENDdJxYWJx0Q0N0nFjg/vQIGxkLAQoPFwcIBwcIBxcO/kQZHBwZChkcHBkAAAACARr/YQLmAh8AIQAyAAAlPgM1NCYjIgYHBiY1ND4CMzIWFRQOAgcOASMiJjcTMzI2PQE0JisBIgYdARQWMwGvATlENzQxQ0AFAVwcOVc7bHk8ST8CAx4XGiECMRAhJCMiECEhIx91QkAlICImK04rAxA2GzoxIGVSQD8sLi8ODRgY/uwhIA0iISIhDSAhAAACANL/hAMrAesAEQAjAAAXIiYnJjQ3ATYyFxYUBwEOASMhIiYnASY0NzYyFwEWFAcOASP3ChIJDg4CDw8qEQ8P/fEIEgsCDwsSCP3xDg4PKhECDw8PCRIKfAgGDyoRAg8PDw8qEf30CAkIBgIPDyoRDw/98Q4qEgYIAAAAAgAA/sAEAALAABMAJwAAASIuAjU0PgIzMh4CFRQOAgMiDgIVFB4CMzI+AjU0LgICAGq6i1FRi7pqarqLUVGLumpfqH9KSn6pX1+of0pKfqn+wFGLumpquotRUYu6amq6i1ED0Ep+qV9fqH9KSn+oX1+of0oAAAAAAQDV/4oDLgHcABYAAAkBDgEjIiYvASY2Nz4BHwEBPgEXHgEHAy7+yQgcDw4ZCb8LAw0NJg2jASILJhAQCAoBnP4MDhANC/AOJgwMAQySAZAPBwsKJhAAAAMAaP9SA5kCLgAuAEUAVQAABRQGBw4BIyEiJicuATU0MDE8ATE0NjU+ATcBPgEzMTIWFwEeARcUFhUwFhU4ARUBFx4BOwEyNj8BNiYnLgErASIGBw4BFxM0JisBIgYdARQWOwEyNjUDmRANDiUU/ZcVJQ4NDwECCAYBNQ4rGRkrDgE1BggCAQH+PRIBBwwHDQcCEQIEBQQOCQ8JDgUFBAJWFRMIExQUEwgTFVwRIQsLCgoLCyERAQEBBAgEChUKAhcZHh4Z/ekKFQoECAQBAQEBkcUGFBMIxAoRBgUGBgUGEAv+uRMVFRMHExQUEwAAAAEAav+DA6EB/QBIAAABIS4BJy4BKwEiBhUUFjsBEhY5AR4BFw4BFRQWMzI2NTQmJzMUBhUUFjMyNjU0JicmIisBIiYnITgBMzgBMTI2PwI0NjU0JiMDcf3hBQkEAg8KnwsREQuIPhcJJR4DBCodHSoBAYwBKR4dKiYaAgQB/zQsCQGTAREaBD4BAR0TAZoVJxEJDREMCxH+7mQmMw0HDwgdKiodBAcDAwcEHSoqHRwoAgEhHRQQ6QUCBAIUHQAAAAQAXf9zA6QB5wAuAGsAkwCuAAAlMCIxISImNTQ2MzEFMDI5ATI2PwEwNDU0JiMhIiY1NDYzMSEyFhUcARUPAQ4BIxcUBiMiJjU8ATcjHAEVFAYjIiY1NDY3LgEnMCYDIyImNTQ2OwEyFhcUHgIVHgEXPgEzMhYXMz4BMzIWFSUxLgEnOAExLgEnLgEjIgYHMQ4BBzgBMQ4BBzEOARUUFjMyNjU0JjUFNCYjIgYHMQ4BBzgBMQ4BBzEUBhUUFjMyNjUDNgH+bwQHBwQBkQEKDgI/EAv96wQGBgQCFRQcAT4EGhElMCEiMAGYMCEiMAYGExoIF0GWBAYGBJ4EBgEcIhwHFhALHREZKQmjCigZIjD+sAEBAQEDAQgbEAsUCAIEAgEDAgMFJBkZIwEBOyQYERoIAgMBAQEBASQZGCRLBwQFBgELCe0DAQsQBwQEBx0UAgQCBekQFIchMDAhAwUDAwUDITAwIQwVCRAwIGUBHwYFBAYEBAJ6k3sCHSkOCwwcFhYcMCILAwUDAwUCDRAIBwIDAgMEAgcPCBgkJBgDBQMLGSQQDQIFAwMFAwMFAxgkJBgAAAABADP/MQPNAlUANQAAJTQmIyE1NC4CIyIOAh0BOAExFBYzMjY1OAE5ATU0NjMyFh0BIyIGFTERMRQWMyEyNjUxEQPNIBb+eiZBVzEyV0ElHRUUHVI6OVILFyAgFwH0FyChFh+YMFQ/JCQ/VDAdFR0dFR03TU03mB8W/sQWHh4WATwAAAAEAF//SgOhAjYADQAbAG4AgAAABSEiJjU0NjMhMhYVFAYnISImNTQ2MyEyFhUUBjc0JiMhNTQuAiMiDgIdARQWFx4BMzI2PQE0NjMyFh0BFBYzMjY9ATQmIyIGHQEUBiMiJicuAT0BND4CMzIeAh0BIyIGBxEeATMhMjY3MxEDFAYjISImNRE0NjMhMhYVERUDMf7HBQYGBQE5BAcHBP7HBQYGBQE5BAcHbCIX/rQjPFEuLlI8IwgIBxIKEyBHMjJHBgQFBlM7O1QVCAYLBAQFIDdJKilKNiBHFyEBASEXAagVHwQBFRUP/lgOFRUOAagPFT8GBQQGBgQFBnYHBAQHBwQEB1YWIZwsTjoiIjpOLEILEwcFBxkYQjBFRTBCBAYGBEI5UVE5QhALAwQDCwZCKEY0Hx80RiicIRf+9RcgGhIBF/70DhQUDgELDhQUDv79CAAAAgDP/zEDMQJVACAAKgAAJTQmKwE1NC4CIyIOAh0BIyIGFTERMRQWMyEyNjUxESU0NjMyFh0BITUDMSAXCyVBVzIxV0EmCxcgIBcB9Bcg/kRSOTpS/umhFh+YMFQ/JCQ/VDCYHxb+xBYeHhYBPM03TU03mJgAAAAABQDN/xQDMwJsAB8ARABdAGsAeQAAJTQmJzU0LgIjIg4CHQEOAQcjERUzHgEzITI2NzMRATIeAh0BIzU0JiMiBh0BFBYzMjY9ATQ2MzIWHQEhNTQ+AjMBFAYjISImJzURNT4BMyE4ATkBMzIWFRMHJyEiJjU0NjMhMhYVFAYnISImNTQ2MyEyFhUUBgMzIBcoRFw0NFxEKBQeBAEBBCQXAeYXJAQB/s0wVD4lRl5DQl4GBQQGUjk6Uf6PJD9ULwEdGRH+GhIYAQEZEQGJXREZAQFp/pkFBgYFAWcEBgYE/pkFBgYFAWcEBgaFFyIDuTJYQiYmQlgyuQIcFP7DCxUeHhUBPgHRIjxQLri4QFxcQEoFBgYFSjhOTji4uC5QPCL8/BEXFxEDASwDERgYEf7ZC0sGBAUGBgUEBocHBAQHBwQEBwAADQB2/1QDhQJQACIAMgBCAEkAWQBpAHkAiQCZAKAAsADAANAAAAEjNTQmIw4BHQEhNTQmIw4BHQEjIgYVERQWMyEyNjURNCYjARQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhUnLgE1MxQGExQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhUTFAYrASImPQE0NjsBMhYVNRQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhU3MxQGJy4BExQGKwEiJj0BNDY7ATIWFTUUBisBIiY9ATQ2OwEyFhU1FAYrASImPQE0NjsBMhYVA2ZhGRERFv6TGRERFmENEhINAtENEhIN/c8GBXEEBgYEcQUGBgVxBAYGBHEFBhgRFlEZuQYEcQUGBgVxBAYGBHEFBgYFcQQGsgYEcQQGBgRxBAYGBHEEBgYEcQQGBgRxBAYGBHEEBhtRGRERFpgGBHIEBgYEcgQGBgRyBAYGBHIEBgYEcgQGBgRyBAYB/ikRGAEaESYpERgBGhEmEg39lA0SEg0CbA0S/ZoFBgYFbAUGBgVCBAYGBG0EBgYE+gEXERIY/ewFBgYFbAUGBgVCBAYGBG0EBgYE/uUFBgYFbAUGBgVCBAYGBG0EBgYEQQQGBgRtBAYGBHUSGAEBF/3TBQYGBWwFBgYFQgQGBgRtBAYGBEEEBgYEbQQGBgQAAA8Abv9mA5ICdwApAC4AMgA2ADoAPgBCAFAAXgCEAIkAkQCVAJkAoQAAJTgBNRE0JisBNTQmIyIGHQEhNTQmIyIGHQEjIgYVERQWMyEyNjUROAE1BTMVIzU7ARUjJSM1MwcjNTMXMxUjNzMVIwM0NjMyFh0BFAYjIiY1JTQ2MzIWHQEUBiMiJjUnNDY7ARUUFjMyNj0BIRUUFjMyNj0BMzIWFREjNTMyNjU0JiMhNRcVIzUzAyImPQEzFSMzNTMVMzUzFTMjNTMVFAYjA5IeFkweFRUf/qkeFRUeTBYeHhYCvBYe/PGyssirqwFwr6/Fq6sWr6/Fq6sQEQ0MEhIMDRH+QhIMDBISDAwSgBINTB4VFR4BVx8VFR5MDRGsMAQHBwT9g7KyspMNErKTqasWr6ONqxENwQEBMRUfHBYeHhYcHBYeHhYcHxX9phUeHhUBJwELlpaWq6KioreWlpYCIw0REQ1RDBISDFENERENUQwSEgwBDBIfFR4eFR8fFR4eFR8SDP7YogYFBAZxhqKi/g4SDHKQkJCQkJByDBIAAAAAAQC6/3kDSAIHAB8AACUUBisBFRQGIyImPQEjIiY1NDY7ATU0NjMyFh0BMzIWA0gpHrkpHh0quR0qKh25Kh0eKbkeKcAdKrkdKioduSodHSq5HSoqHbkqAAEAuQB5A0cBBwANAAAlISImNTQ2MyEyFhUUBgMA/gAdKiodAgAdKip5Kh0dKiodHSoAAAAGAGn/ZAOdAhYADQAbADoARwBWAGcAAAE0JisBIgYVFBY7AT4BFzQmIyEiBhUUFjMhPgEXIzU0Ji8BLgEjISIGFREjIgYdARQWMyEyNj0BLgEjATQ2MyEVFBY7ARUhEQMiJjU0NjsBMhYVFAYrAQUUBiMhIiY9ATQ2MyEyFh0BAiYMC6oJDgwLqgsMig0L/tAJDw0LATAJD6w9CAdsBxMJ/oYRGDoYIyMYAr4YIwMkGv26CAcBRwgEb/4vWwkODAtbCQ4MC1sCLAgG/k4GCAgGAa8GCAFKCA8NCgsNAg1PCQ4MCwsNAwxD0gkUBm0GCBcS/rYjG8cYIiIYxx0kASoHCG8FB8EBLf5sDQsJDgwLCQ+ABwgIBxEHCAgHEQAAAAAIAGP/XgOfAh8AEAAhAC8APQBLAFkAhACHAAAFISImPQE0NjMhMhYdAQ4BIwEiBh0BFBYzITI2PQE0JiMhFzQmKwEiBhUUFjsBMjYFNCYjISIGFRQWMyEyNgM0JiMhIgYVFBYzITI2JzQmKwEiBhUUFjsBMjYlJy4BIyEiBhURFBYzMjY1ETQ2MyEyFhcVFBY7ARQWHQEUFjMyNj0BLgEnJxcjA1z9SBonJxoCuxomAica/UgSFxcSArsSFxcS/UWeBwWBBAcHBIEFBwGOCAT+eAQICAQBiAQIGAcE/qMEBwcEAV0GBbUHBacEBwcEpwUHAQRsCRgL/q0WHwcFBAgTDQFTAgUCBwV9AwgEBAgFCgl4Z2eiJhrHGyYmG8caJgEzFxLHERgYEccSFzcEBwcEBQcHjgUHBwUEBwcBSQQICAQECAhQBQcHBQQIBk9tCAkfFv7/BAgIBAEBDhABAn4ECAIEA4kECAgEiQ4bBltmAAIAWP8VA60CawAUACsAAAEiDgIVFB4CMzI+AjU0LgIjFwEOASMiJi8BJjY3NjIfARM+ARceAQcCAlibdENDdJtYWZt0Q0N0m1nz/v4IFg0MFAifCQILCx8Mh/IJIA0NBwkCa0N0nFhYnHRDQ3ScWFicdEP1/l8LDQoJyAwfCwoKegFODAYJCCANAAAAAwBV/xUDqwJrABQAIQAuAAAlFA4CIyIuAjU0PgIzMh4CFQUyNiMuATcTIwMGFjMTMjY1NCYjIgYVFBYzA6tDdJxYWJx0Q0N0nFhYnHRD/j4hDAEYDAY3RTgJGyY5FRcVFBUXFRTAWJx0Q0N0nFhYnHRDQ3ScWPohAhYbAQb++ygtAaMbEw8RGxMOEgABAHb/QQOKAi4AKAAAATYyHwEeAR8BHgEPAQ4BHwEWBi8BJiIPAQYmPwE2Ji8BJjY/AT4BPwEB5QsgC1ELNBm1GQoSgxIUBB8FGhehF0AWohcZBB8EFBKDEgoZtRk0C1ECLhcXoxcmAxsDHxJ/Ej0ZtBkSC1UMDFULEhm0GT0SfxIfAxsDJhejAAAAAAEAmv/vA1cBfQAZAAATNDY3NjIfATc2MhcWFAcBDgEjIiYnAS4BNZoKChQ4FPT0FDkUFBT+7w0kExMjDv7wCgoBTA0ZChQU9PUUFBQ4FP7uDQ8PDQERChkNAAAAAQAAAAEAAJw5MTFfDzz1AAsEAAAAAADUFPWTAAAAANQU9ZMAAP7ABAACwAAAAAgAAgAAAAAAAAABAAACzP7NAAAEAAAAAAAEAAABAAAAAAAAAAAAAAAAAAAAKAQAAAAAAAAAAAAAAACuAAAEAAAJBAAA+gQAAAAEAABJBAAAqgQAAJwEAABjBAAAdQQAAQQEAAAABAAAAAQAAPoEAAEABAAAVQQAAFUEAAEaBAAA0gQAAAAEAADVBAAAaAQAAGoEAABdBAAAMwQAAF8EAADPBAAAzQQAAHYEAABuBAAAugQAALkEAABpBAAAYwQAAFgEAABVBAAAdgQAAJoAAAAAAAoAFAAeAQ4BKAFkAaoCBAKeAugDYgO6A/YEMgReBQoFYgW6BgIGQAZ8BqgHIAeACFoInAlGCYIKJAsuC/4MKgxEDNQNjA3SDhgOXg6MAAAAAQAAACgA0QAPAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAoAAAABAAAAAAACAAcAewABAAAAAAADAAoAPwABAAAAAAAEAAoAkAABAAAAAAAFAAsAHgABAAAAAAAGAAoAXQABAAAAAAAKABoArgADAAEECQABABQACgADAAEECQACAA4AggADAAEECQADABQASQADAAEECQAEABQAmgADAAEECQAFABYAKQADAAEECQAGABQAZwADAAEECQAKADQAyGljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeVZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeWljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeVJlZ3VsYXIAUgBlAGcAdQBsAGEAcmljb1ByaW1hcnkAaQBjAG8AUAByAGkAbQBhAHIAeUZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("woff"), url("fonts/icons/icoPrimary.ttf?timestamp=@@timestamp") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+[class*="icon-primary-"],
+.nav-links a:after,
+.bellyband-link a:after,
+.breadcrumb > li:after,
+.checkbox input:checked + .skin:after,
+.checkbox input.indeterminate + .skin:after,
+.checkbox input:indeterminate + .skin:after,
+.selectWrap.large:before,
+.form-row.error .error-msg:before,
+.close:before,
+.reset-field:before,
+.cssIcon-globe:before,
+.selectWrap:after {
+  color: #0568ae;
+  display: inline-block;
+  font-family: 'icoPrimary' !important;
+  font-style: normal;
+  font-size: 20px;
+  font-weight: normal;
+  font-variant: normal;
+  height: 1em;
+  margin-right: 7px;
+  text-transform: none;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  position: relative;
+  speak: none;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  vertical-align: middle;
+  width: 1em; }
+
+[class*="icon-primary-"]:before,
+[class*="icon-primary-"]:after {
+  box-sizing: border-box;
+  display: inline-block;
+  font-size: 1em;
+  height: 1em;
+  position: relative;
+  top: 0;
+  left: 0;
+  vertical-align: middle;
+  width: 1em; }
+
+.icon-primary-att-globe:before,
+.cssIcon-globe:before {
+  content: "\e900";
+  color: #44c7f5; }
+
+.icon-primary-hamburger:before {
+  content: "\e903"; }
+
+.icon-primary-secure:before {
+  content: "\e918"; }
+
+.icon-primary-secureL:before {
+  content: "\e919"; }
+
+.icon-primary-padlockopen:before {
+  content: "\e916"; }
+
+.icon-primary-padlockopenL:before {
+  content: "\e917"; }
+
+.icon-primary-shoppingcart:before {
+  content: "\e914"; }
+
+.icon-primary-shoppingcartL:before {
+  content: "\e915"; }
+
+.icon-primary-print:before {
+  content: "\e921"; }
+
+.icon-primary-printL:before {
+  content: "\e922"; }
+
+.icon-primary-mobilesmartphone:before {
+  content: "\e908"; }
+
+.icon-primary-mobilesmartphoneL:before {
+  content: "\e90c"; }
+
+.icon-primary-tablet:before {
+  content: "\e904"; }
+
+.icon-primary-tabletL:before {
+  content: "\e905"; }
+
+.icon-primary-tv:before {
+  content: "\e906"; }
+
+.icon-primary-tvL:before {
+  content: "\e907"; }
+
+.icon-primary-calendar {
+  width: 100% !important; }
+
+.icon-primary-calendar:before {
+  content: "\e91a";
+  z-index: 1; }
+
+.icon-primary-calendarL:before {
+  content: "\e91b"; }
+
+.icon-primary-star:before {
+  content: "\e96c"; }
+
+.icon-primary-close:before,
+.close:before,
+.reset-field:before {
+  content: "\e910"; }
+
+.icon-primary-down:before {
+  content: "\ea3c"; }
+
+.checkbox input.indeterminate + .skin:after,
+.icon-primary-subtractminimize:before {
+  content: "\e920"; }
+
+.icon-primary-add-maximize:before {
+  content: "\e91f"; }
+
+.icon-primary-check:before,
+.checkbox input:checked + .skin:after {
+  content: "\e912"; }
+
+.icon-primary-questionmark:before {
+  content: "\e90f"; }
+
+.icon-primary-badgealert:before,
+.form-row.error .error-msg:before {
+  content: "\e90e"; }
+
+.icon-primary-approval:before {
+  content: "\e925"; }
+
+.icon-primary-flat-info:before {
+  content: "\e927"; }
+
+.icon-primary-alert:before {
+  content: "\e913"; }
+
+.icon-primary-tooltip:before,
+.icon-primary-flat-faq:before {
+  content: "\e90d"; }
+
+.icon-primary-tooltip {
+  font-size: 20px; }
+
+.nav-links a:after,
+.bellyband-link a:after,
+.breadcrumb > li:after,
+.icon-primary-right:before {
+  content: "\ea3c";
+  transform: rotate(-90deg); }
+
+.icon-primary-left:before {
+  content: "\ea3c";
+  transform: rotate(90deg); }
+
+.icon-primary-accordion-plus:after,
+.icon-primary-collapsed:after,
+.icon-primary-accordion-minus:after,
+.icon-primary-expanded:after {
+  content: "";
+  position: absolute;
+  top: 0;
+  z-index: 1; }
+
+.icon-primary-accordion-minus,
+.icon-primary-expanded,
+.icon-primary-accordion-plus,
+.icon-primary-collapsed {
+  font-size: 20px !important; }
+
+:not(.ds2-no-colors) .icon-primary-accordion-minus:before,
+:not(.ds2-no-colors) .icon-primary-expanded:before {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");
+  content: ""; }
+
+:not(.ds2-no-colors) .icon-primary-accordion-plus:before,
+:not(.ds2-no-colors) .icon-primary-collapsed:before {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M10.5%2015.9c-.4%200-.8-.3-.8-.8V5.9c0-.4.3-.8.8-.8s.8.3.8.8v9.3c0%20.4-.4.7-.8.7z%22%2F%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");
+  content: ""; }
+
+.ds2-no-colors .icon-primary-accordion-minus:before,
+.ds2-no-colors .icon-primary-expanded:before {
+  background-image: none;
+  content: "\e901"; }
+
+.ds2-no-colors .icon-primary-accordion-minus:after,
+.ds2-no-colors .icon-primary-expanded:after {
+  content: "\e902"; }
+
+.ds2-no-colors .icon-primary-accordion-plus:before,
+.ds2-no-colors .icon-primary-collapsed:before {
+  background-image: none;
+  content: "\e90b"; }
+
+.ds2-no-colors .icon-primary-accordion-plus:after,
+.ds2-no-colors .icon-primary-collapsed:after {
+  content: "\e911"; }
+
+.icon-primary-circle-arrow {
+  outline: 1px solid transparent;
+  border-radius: 50%;
+  font-size: 20px !important;
+  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
+  margin-right: 7px; }
+
+.icon-primary-circle-arrow:after {
+  background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2036%2036%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20baseProfile%3D%22tiny%22%3E%3Ccircle%20r%3D%2217%22%20cy%3D%2218%22%20cx%3D%2218%22%20stroke-width%3D%221%22%20fill%3D%22transparent%22%20stroke%3D%22%23ccc%22%2F%3E%3C%2Fsvg%3E");
+  content: "";
+  position: absolute;
+  top: 0;
+  z-index: 2; }
+
+.icon-primary-circle-arrow:before {
+  border-radius: 50%;
+  content: "\ea3c";
+  font-size: 12px;
+  top: 0;
+  position: absolute;
+  transform: rotate(-90deg);
+  width: 20px;
+  z-index: 1; }
+
+[class*="icon-primary-"] [class*="icon-primary-"] {
+  display: inline-block;
+  float: left;
+  font-size: 1em;
+  margin-left: -1em;
+  position: absolute; }
+
+[class*="icon-primary-"].white {
+  color: #fff; }
+
+[class*="icon-primary-"].black {
+  color: #000; }
+
+[class*="icon-primary-"].blue {
+  color: #0568ae; }
+
+[class*="icon-primary-"].green {
+  color: #007a3e; }
+
+@-webkit-viewport {
+  width: device-width; }
+
+@-moz-viewport {
+  width: device-width; }
+
+@-ms-viewport {
+  width: device-width; }
+
+@-o-viewport {
+  width: device-width; }
+
+@viewport {
+  width: device-width; }
+
+.clearfix:before,
+.clearfix:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.clearfix:after {
+  clear: both; }
+
+.pull-right {
+  float: right !important; }
+
+.pull-left {
+  float: left !important; }
+
+.float-children-left:before,
+.float-children-left:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.float-children-left:after {
+  clear: both; }
+
+.float-children-left > div {
+  float: left;
+  white-space: nowrap; }
+
+.block {
+  display: block !important; }
+
+.inline {
+  display: inline !important; }
+
+.inline-block {
+  display: inline-block !important; }
+
+.table-cell {
+  display: table-cell !important;
+  width: 1%;
+  vertical-align: middle; }
+
+@media (max-width: 767px) {
+  .full-bleed {
+    width: auto;
+    margin-left: -15px;
+    margin-right: -15px;
+    padding: 15px; } }
+
+@media (min-width: 768px) {
+  .full-bleed {
+    width: auto;
+    margin-left: -20px;
+    margin-right: -20px;
+    padding: 20px; } }
+
+@media (max-width: 480px) {
+  .full-bleed {
+    width: auto;
+    margin-left: -15px;
+    margin-right: -15px;
+    padding: 0 15px; } }
+
+.fade {
+  opacity: 0;
+  filter: alpha(opacity=0);
+  transition: opacity .15s linear; }
+
+.fade.in {
+  opacity: 1;
+  filter: alpha(opacity=100); }
+
+.b2bCollapse {
+  display: none; }
+
+.collapse.in {
+  height: auto; }
+
+.nowrap {
+  white-space: nowrap; }
+
+.pre {
+  white-space: pre; }
+
+.hidden-spoken {
+  border: 0 none !important;
+  clip: rect(0px, 0px, 0px, 0px) !important;
+  height: 1px !important;
+  letter-spacing: 0;
+  line-height: 0;
+  overflow: hidden !important;
+  margin-top: -1px;
+  padding: 0 !important;
+  position: absolute !important;
+  width: 1px !important; }
+
+[data-sr-text].hidden-spoken:before {
+  border: 0 none !important;
+  content: attr(data-sr-text);
+  clip: rect(0px, 0px, 0px, 0px) !important;
+  height: 1px !important;
+  letter-spacing: 0;
+  line-height: 0;
+  overflow: hidden !important;
+  padding: 0 !important;
+  position: absolute !important;
+  width: 100% !important;
+  z-index: -1; }
+
+[data-sr-text].hidden-spoken {
+  position: relative !important;
+  width: auto !important; }
+
+[data-show-between] {
+  display: none;
+  visibility: hidden; }
+
+.noscroll-y {
+  overflow-y: hidden !important; }
+
+.invisible {
+  visibility: hidden !important;
+  opacity: 0 !important; }
+
+.transparent {
+  background-color: rgba(255, 255, 255, 0) !important; }
+
+.hide {
+  display: none !important; }
+
+.show {
+  display: block !important; }
+
+.rel {
+  position: relative !important; }
+
+.legend-pad {
+  padding: 0 15px; }
+
+.border-top {
+  border-top-width: 1px !important; }
+
+.border-left {
+  border-left-width: 1px !important; }
+
+.border-right {
+  border-right-width: 1px !important; }
+
+.border-bottom {
+  border-bottom-width: 1px !important; }
+
+.border-dark {
+  border-color: #000; }
+
+.border-light {
+  border-color: #fff; }
+
+.no-border-top {
+  border-top-width: 0 !important; }
+
+.no-border-left {
+  border-left-width: 0 !important; }
+
+.no-border-right {
+  border-right-width: 0 !important; }
+
+.no-border-bottom {
+  border-bottom-width: 0 !important; }
+
+.align-middle {
+  margin: 0 auto !important; }
+
+.align-top {
+  position: absolute;
+  top: 0; }
+
+.align-bottom {
+  position: absolute;
+  bottom: 0; }
+
+.valign-top {
+  vertical-align: top !important; }
+
+.valign-middle {
+  vertical-align: middle !important; }
+
+.valign-bottom {
+  vertical-align: bottom !important; }
+
+.align-children-middle > * {
+  margin: 0 auto; }
+
+[class*="valign-children-"] {
+  display: table; }
+
+[class*="valign-children-"] > * {
+  display: table-cell; }
+
+.valign-children-top > * {
+  vertical-align: top; }
+
+.valign-children-middle > * {
+  vertical-align: middle; }
+
+.valign-children-bottom > * {
+  vertical-align: bottom; }
+
+.no-pad {
+  padding: 0 !important; }
+
+.top-space {
+  margin-top: 60px !important; }
+
+.bottom-space {
+  margin-bottom: 60px !important; }
+
+.top-pad {
+  padding-top: 60px !important; }
+
+.bottom-pad {
+  padding-bottom: 60px !important; }
+
+@media (max-width: 767px) {
+  .top-space {
+    margin-top: 30px !important; }
+  .bottom-space {
+    margin-bottom: 30px !important; }
+  .top-pad {
+    padding-top: 30px !important; }
+  .bottom-pad {
+    padding-bottom: 30px !important; } }
+
+.affix {
+  position: fixed; }
+
+.img-landscape,
+.img-portrait {
+  position: relative; }
+
+@media (orientation: landscape) {
+  .img-landscape {
+    display: block; }
+  .img-portrait {
+    display: none !important; } }
+
+@media (orientation: portrait) {
+  .img-landscape {
+    display: none !important; }
+  .img-portrait {
+    display: block; } }
+
+.dark-bg {
+  background-color: #222222; }
+
+/* ... JAVASCRIPT HOOKS .................
+   ... used by javascript ............... */
+.autoSize,
+.autoSize-this {
+  position: relative; }
+
+.truncate {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis; }
+
+.placeholdersjs {
+  color: #5a5a5a !important; }
+
+.jshook-return-focus-here {
+  display: block; }
+
+.visible-print {
+  display: none !important; }
+
+.hidden-print {
+  display: inherit !important; }
+
+@media print {
+  .visible-print {
+    display: inherit !important; }
+  .hidden-print {
+    display: none !important; }
+  * {
+    color: #000 !important;
+    background: transparent !important;
+    box-shadow: none !important; }
+  a,
+  a:visited {
+    text-decoration: underline; }
+  pre,
+  blockquote {
+    border: 1px solid #000;
+    page-break-inside: avoid; }
+  thead {
+    display: table-header-group; }
+  tr,
+  img {
+    page-break-inside: avoid; }
+  img {
+    max-width: 100% !important; }
+  @page {
+    margin: 0.5cm; }
+  p,
+  h2,
+  h3 {
+    orphans: 3;
+    widows: 3; }
+  h2,
+  h3 {
+    page-break-after: avoid; } }
+
+.mar-top-0 {
+  margin-top: 0px; }
+
+.mar-top-30 {
+  margin-top: 30px; }
+
+a:focus {
+  outline: thin dotted #191919; }
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  font-weight: normal;
+  text-rendering: optimizeLegibility;
+  margin: 0;
+  line-height: 1; }
+
+.heading-page {
+  font-size: 3.8rem !important;
+  font-family: "Omnes-ECOMP-W02-Light", Arial;
+  margin-bottom: 40px; }
+
+.heading-major-section {
+  font-size: 3rem !important;
+  font-family: "Omnes-ECOMP-W02-Light" , Arial;
+  margin-bottom: 40px !important; }
+
+.heading-sub-section {
+  font-size: 2.4rem !important;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  margin-bottom: 40px; }
+
+.heading-group {
+  font-size: 2rem !important;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #ea7400;
+  margin-bottom: 20px !important; }
+
+.heading-medium {
+  font-size: 2rem !important;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  margin-bottom: 20px; }
+
+.heading-medium-emphasis {
+  font-size: 2rem !important;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  margin-bottom: 20px; }
+
+.heading-small {
+  font-size: 1.8rem !important;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  margin-bottom: 20px; }
+
+.heading-small-emphasis {
+  font-size: 1.8rem !important;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  margin-bottom: 20px; }
+
+.heading-micro {
+  font-size: 1.3rem !important;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  text-transform: uppercase;
+  color: #da0081;
+  margin-bottom: 10px; }
+
+* + .heading-major-section {
+  margin-top: 60px; }
+
+* + .heading-sub-section {
+  margin-top: 60px; }
+
+* + .heading-group {
+  margin-top: 40px !important; }
+
+* + .heading-medium {
+  margin-top: 40px; }
+
+* + .heading-medium-emphasis {
+  margin-top: 40px; }
+
+* + .heading-small {
+  margin-top: 40px; }
+
+* + .heading-small-emphasis {
+  margin-top: 40px; }
+
+* + .heading-micro {
+  margin-top: 20px; }
+
+.lead {
+  color: #666;
+  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial;
+  font-size: 2.4rem;
+  line-height: 2.8rem;
+  margin-top: 10px;
+  letter-spacing: -0.024rem; }
+
+.eyebrow {
+  text-transform: uppercase;
+  line-height: .65 !important; }
+
+.eyebrow,
+.subheading {
+  font-size: 1.4rem !important;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #666; }
+
+.eyebrow + .heading-major-section,
+.eyebrow + .heading-sub-section {
+  margin-top: 4px; }
+
+.subheading {
+  margin-top: 10px; }
+
+@media (max-width: 767px) {
+  h1,
+  h2,
+  h3,
+  h4,
+  h5,
+  h6,
+  .heading-page {
+    font-size: 2rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 30px; }
+  .heading-major-section {
+    font-size: 2rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 30px; }
+  .heading-sub-section {
+    font-size: 2rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 20px; }
+  .heading-medium {
+    font-size: 2rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 20px; }
+  .heading-medium-emphasis {
+    font-size: 2rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 20px; }
+  .heading-small {
+    font-size: 1.6rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 10px; }
+  .heading-small-emphasis {
+    font-size: 1.6rem;
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    margin-bottom: 5px; }
+  * + .heading-major-section {
+    margin-top: 30px; }
+  * + .heading-sub-section {
+    margin-top: 30px; }
+  * + .heading-group {
+    margin-top: 20px; }
+  * + .heading-medium {
+    margin-top: 20px; }
+  * + .heading-medium-emphasis {
+    margin-top: 20px; }
+  * + .heading-small {
+    margin-top: 20px; }
+  * + .heading-small-emphasis {
+    margin-top: 20px; }
+  * + .heading-micro {
+    margin-top: 10px; } }
+
+/* Standard Type styles */
+.zeromargin {
+  margin: 0 !important; }
+
+a {
+  color: #0568ae;
+  text-decoration: none; }
+
+a:hover,
+a:focus {
+  text-decoration: underline; }
+
+a:active {
+  color: #0568ae; }
+
+.a-min {
+  font-size: 12px; }
+
+.a-small {
+  font-size: 14px; }
+
+.a-max {
+  font-size: 18px; }
+
+a.show-qualifier {
+  margin-right: 25px;
+  position: relative; }
+
+a.show-qualifier:after {
+  color: #333333;
+  display: inline-block;
+  white-space: pre !important; }
+
+a[href$="pdf"].show-qualifier:after,
+a.show-qualifier.pdf:after {
+  content: " (PDF)"; }
+
+a[href$="psd"].show-qualifier:after,
+a.show-qualifier.psd:after {
+  content: " (PSD)"; }
+
+.standalone-link {
+  display: flex; }
+
+/* 20px for the icon, 10px left of icon */
+.standalone-link.small {
+  font-size: 1.4rem; }
+
+.standalone-link.small i[class*="icon-primary-"] {
+  font-size: 16px;
+  top: 2px; }
+
+.standalone-link.large {
+  font-size: 1.8rem; }
+
+.standalone-link.large i[class*="icon-primary-"] {
+  font-size: 24px;
+  top: -1px; }
+
+p {
+  margin: 0 0 12px 0;
+  line-height: 2rem; }
+
+.p-small {
+  font-size: 1.4rem;
+  line-height: 1.8rem; }
+
+p + .p-small {
+  margin: 10px 0 0; }
+
+.p-micro {
+  font-size: 1.2rem;
+  line-height: 1.5rem; }
+
+p + .p-micro {
+  margin: 10px 0 0; }
+
+.p-max {
+  font-size: 1.8rem; }
+
+p + .p-max {
+  margin: 10px 0 0; }
+
+b,
+strong {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-weight: normal; }
+
+i,
+em {
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  font-style: normal; }
+
+.strike {
+  text-decoration: line-through; }
+
+sup {
+  display: inline-block;
+  font-style: normal;
+  height: 1em;
+  position: relative;
+  vertical-align: text-top;
+  width: auto; }
+
+.text-legal {
+  color: #5a5a5a;
+  font-size: 1.1rem;
+  line-height: 1.5rem;
+  margin: 0 0 10px; }
+
+.text-legal.legal-module {
+  line-height: 1.3rem;
+  margin: 0 0 12px; }
+
+.text-legal b,
+.text-legal strong {
+  font-weight: bold; }
+
+.text-legal a {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.text-left {
+  text-align: left !important; }
+
+.text-right {
+  text-align: right !important; }
+
+.text-center {
+  text-align: center !important; }
+
+.text-justified {
+  text-align: justify !important; }
+
+ul {
+  padding: 0;
+  margin: 0;
+  list-style: none; }
+
+ul.bullet,
+ul.no-bullet,
+ul.lower-alpha,
+ul.lower-roman,
+ol {
+  padding: 0;
+  margin: 12px 0 0 20px; }
+
+ul.bullet li,
+ul.no-bullet li,
+ul.lower-alpha li,
+ul.lower-roman li,
+ol li {
+  padding-left: 15px;
+  line-height: 20px;
+  position: relative; }
+
+ul.bullet li + li,
+ul.no-bullet li + li,
+ul.lower-alpha li + li,
+ul.lower-roman li + li,
+ol li + li {
+  margin-top: 12px; }
+
+ul.bullet > li:before,
+ul.no-bullet > li:before,
+ul.lower-alpha > li:before,
+ul.lower-roman > li:before,
+ol > li:before {
+  background-color: #333333;
+  border: 2px solid #333333;
+  border-radius: 100%;
+  content: " ";
+  display: block;
+  height: 1px;
+  left: 0;
+  position: absolute;
+  top: 8px;
+  width: 1px; }
+
+ul.bullet ul,
+ul.no-bullet ul,
+ul.lower-alpha ul,
+ul.lower-roman ul,
+ol ul,
+ul.bullet ol,
+ul.no-bullet ol,
+ul.lower-alpha ol,
+ul.lower-roman ol,
+ol ol {
+  margin-top: 12px; }
+
+ul + *,
+ol + * {
+  margin-top: 20px; }
+
+ul.no-bullet,
+ul.lower-alpha,
+ul.lower-roman {
+  margin: 0; }
+
+ul.no-bullet > li,
+ul.lower-alpha > li,
+ul.lower-roman > li {
+  padding-left: 0; }
+
+ul.no-bullet > li:before,
+ul.lower-alpha > li:before,
+ul.lower-roman > li:before {
+  display: none !important; }
+
+ol {
+  margin: 20px 0 0 32px; }
+
+ol li {
+  padding-left: 3px; }
+
+ol li:before {
+  display: none; }
+
+ol ol {
+  margin-left: 25px; }
+
+ol ul {
+  margin-left: -5px; }
+
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+  margin-top: 0; }
+
+ul.lower-roman {
+  list-style-type: lower-roman;
+  margin-top: 12px;
+  margin-left: 35px;
+  margin-bottom: 0; }
+
+ul.lower-alpha {
+  list-style-type: lower-alpha;
+  margin-top: 12px;
+  margin-left: 35px;
+  margin-bottom: 0; }
+
+dl {
+  display: table;
+  margin: 0 0 20px;
+  width: 100%; }
+
+dt,
+dd {
+  display: table-cell; }
+
+.btn {
+  background-color: transparent;
+  background-clip: padding-box;
+  border: 1px solid transparent;
+  border-radius: 8px;
+  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
+  cursor: pointer;
+  display: inline-block;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 1.9rem;
+  font-weight: normal;
+  line-height: 1;
+  margin: 0 7px 10px 0;
+  max-width: 470px;
+  min-width: 70px;
+  padding: 14px 19px 11px 18px;
+  position: relative;
+  text-align: center;
+  vertical-align: middle;
+  white-space: nowrap;
+  overflow: hidden; }
+  .btn:focus {
+    outline: 1px dotted #000;
+    outline-offset: -5px; }
+  .btn:last-child {
+    margin-right: 0; }
+  .btn::-moz-focus-inner {
+    padding: 0;
+    border: 0; }
+  .btn i[class*="icon-primary-"].icon-primary-small {
+    font-size: 24px;
+    top: -2px; }
+  .btn i[class*="icon-primary-"].icon-primary-medium {
+    font-size: 30px;
+    top: -2px; }
+  .btn i[class*="icon-primary-"].icon-primary-large {
+    font-size: 36px;
+    top: -2px; }
+
+a.btn {
+  vertical-align: middle; }
+  a.btn:hover {
+    text-decoration: none; }
+
+.field-group + .btn {
+  margin-left: 20px; }
+
+.btn-primary {
+  border-color: #ea7400 transparent #d16500;
+  background-color: #ea7400 transparent #d16500;
+  background: linear-gradient(to bottom, #ea7400 0%, #d16500 100%);
+  color: #ffffff;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-weight: bold; }
+  .btn-primary:hover {
+    text-decoration: none;
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+  .btn-primary:focus {
+    text-decoration: none;
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+  .btn-primary:active {
+    text-decoration: none;
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+
+.btn-arrow {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.6rem;
+  font-weight: normal;
+  background-color: transparent;
+  border: none;
+  padding: 5px 0 0;
+  top: -4px;
+  color: #333333;
+  position: relative; }
+  .btn-arrow:hover {
+    text-decoration: underline; }
+    .btn-arrow:hover .btn-primary {
+      text-decoration: none;
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+    .btn-arrow:hover .btn-secondary {
+      color: #0568ae;
+      outline-color: #000000 !important;
+      background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+    .btn-arrow:hover .btn-alt {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
+    .btn-arrow:hover .btn-specialty {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+  .btn-arrow:focus {
+    text-decoration: underline;
+    outline: 1px dotted #666; }
+    .btn-arrow:focus .btn-primary {
+      text-decoration: none;
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+    .btn-arrow:focus .btn-secondary {
+      color: #0568ae;
+      outline-color: #000000 !important;
+      background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+    .btn-arrow:focus .btn-alt {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
+    .btn-arrow:focus .btn-specialty {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+  .btn-arrow:active .btn-primary {
+    text-decoration: none;
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
+  .btn-arrow:active .btn-secondary {
+    color: #0568ae;
+    outline-color: #000000 !important;
+    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+  .btn-arrow:active .btn-alt {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
+  .btn-arrow:active .btn-specialty {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+  .btn-arrow .btn-alt {
+    border-color: #087ac2 transparent #0568ae;
+    background-color: #0568ae;
+    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
+    color: #ffffff; }
+    .btn-arrow .btn-alt:hover {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+    .btn-arrow .btn-alt:focus {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+    .btn-arrow .btn-alt:active {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+  .btn-arrow::-moz-focus-inner {
+    padding: 0;
+    border: 0; }
+  .btn-arrow .btn {
+    border: 1px solid transparent;
+    border-radius: 100%;
+    height: 36px;
+    margin-bottom: 0;
+    margin-right: 7px;
+    max-width: 36px;
+    min-width: 20px;
+    padding: 0;
+    margin-top: -4px;
+    vertical-align: middle;
+    width: 36px; }
+    .btn-arrow .btn .icon-primary-left {
+      bottom: 0;
+      display: block;
+      height: 100%;
+      left: 0;
+      line-height: 0;
+      position: absolute;
+      right: 0;
+      text-indent: 0;
+      top: 0; }
+      .btn-arrow .btn .icon-primary-left:before {
+        position: absolute;
+        font-size: 1.6rem;
+        left: 1px;
+        top: 9px; }
+    .btn-arrow .btn .icon-primary-right {
+      bottom: 0;
+      display: block;
+      height: 100%;
+      left: 0;
+      line-height: 0;
+      position: absolute;
+      right: 0;
+      text-indent: 0;
+      top: 0;
+      color: #ffffff; }
+      .btn-arrow .btn .icon-primary-right:before {
+        position: absolute;
+        font-size: 1.6rem;
+        left: 17px;
+        top: 9px; }
+  .btn-arrow .btn.btn-primary .icon-primary-left {
+    color: #fff; }
+  .btn-arrow .btn.btn-primary .icon-primary-right {
+    color: #fff; }
+  .btn-arrow .btn.btn-alt .icon-primary-left {
+    color: #fff; }
+  .btn-arrow .btn.btn-alt .icon-primary-right {
+    color: #fff; }
+  .btn-arrow .btn.btn-secondary {
+    border: 1px solid #d2d2d2; }
+    .btn-arrow .btn.btn-secondary .icon-primary-left {
+      color: #0568ae; }
+    .btn-arrow .btn.btn-secondary .icon-primary-right {
+      color: #0568ae; }
+  .btn-arrow .btn.btn-small {
+    height: 20px;
+    max-width: 20px;
+    min-width: 20px;
+    width: 20px;
+    top: -1px; }
+    .btn-arrow .btn.btn-small .icon-primary-left:before {
+      font-size: 10px;
+      top: 4px;
+      left: 0; }
+    .btn-arrow .btn.btn-small .icon-primary-right:before {
+      font-size: 10px;
+      top: 4px;
+      left: 10px; }
+  .btn-arrow .btn.btn-large .icon-primary-left:before {
+    font-size: 112%;
+    top: 12px;
+    left: 23px; }
+  .btn-arrow .btn.btn-large .icon-primary-right:before {
+    font-size: 112%;
+    top: 12px;
+    left: 23px; }
+
+.btn-secondary {
+  border: 1px solid #d2d2d2;
+  background-color: #f2f2f2;
+  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+  color: #0568ae;
+  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
+  padding: 14px 18px 11px 17px; }
+  .btn-secondary:hover {
+    color: #0568ae;
+    outline-color: #000000 !important;
+    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+  .btn-secondary:focus {
+    color: #0568ae;
+    outline-color: #000000 !important;
+    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+  .btn-secondary:active {
+    color: #0568ae;
+    outline-color: #000000 !important;
+    background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
+
+.btn-alt {
+  border-color: #087ac2 transparent #0568ae;
+  background-color: #0568ae;
+  background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
+  color: #ffffff; }
+  .btn-alt:hover {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+  .btn-alt:focus {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+  .btn-alt:active {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
+
+.btn-specialty {
+  border-color: #008744 transparent #007a3e;
+  background-color: #007a3e;
+  background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);
+  color: #ffffff; }
+  .btn-specialty:hover {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+  .btn-specialty:focus {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+  .btn-specialty:active {
+    color: #ffffff;
+    outline-color: #ffffff !important;
+    background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
+
+.btn-clear {
+  background: transparent !important;
+  border-color: transparent !important;
+  font-weight: normal;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  box-shadow: none;
+  text-decoration: none;
+  color: #0568ae; }
+  .btn-clear:focus {
+    text-decoration: underline; }
+  .btn-clear:hover {
+    text-decoration: underline; }
+
+.isIE .btn:focus {
+  outline: none !important;
+  text-decoration: none !important; }
+  .isIE .btn:focus:after {
+    display: block;
+    content: "";
+    position: absolute;
+    top: 4px;
+    left: 4px;
+    right: 4px;
+    bottom: 4px;
+    border: 1px dotted #000; }
+
+.isIE .btn:active {
+  outline: none !important;
+  text-decoration: none !important; }
+  .isIE .btn:active:after {
+    display: block;
+    content: "";
+    position: absolute;
+    top: 4px;
+    left: 4px;
+    right: 4px;
+    bottom: 4px;
+    border: 1px dotted #000; }
+
+.isIE .btn.active {
+  outline: none !important;
+  text-decoration: none !important; }
+  .isIE .btn.active:not(:focus):after {
+    border: 1px solid #000; }
+  .isIE .btn.active:after {
+    display: block;
+    content: "";
+    position: absolute;
+    top: 4px;
+    left: 4px;
+    right: 4px;
+    bottom: 4px;
+    border: 1px dotted #000; }
+
+.isIE .btn.btn-primary:focus:after {
+  border: 2px dashed #fff; }
+
+.isIE .btn.btn-specialty:focus:after {
+  border: 2px dashed #fff; }
+
+.isIE .btn.btn-alt:focus:after {
+  border: 2px dashed #fff; }
+
+.btn.disabled {
+  background-image: none;
+  background-color: #767676;
+  box-shadow: none;
+  cursor: not-allowed;
+  color: #ffffff;
+  border-color: transparent;
+  outline: 0 !important; }
+  .btn.disabled:hover {
+    color: #f2f2f2;
+    outline: none !important; }
+  .btn.disabled:focus {
+    color: #f2f2f2;
+    outline: none !important; }
+
+.btn[disabled] {
+  background-image: none;
+  background-color: #767676;
+  box-shadow: none;
+  cursor: not-allowed;
+  color: #ffffff;
+  border-color: transparent;
+  outline: 0 !important; }
+  .btn[disabled]:hover {
+    color: #f2f2f2;
+    outline: none !important; }
+  .btn[disabled]:focus {
+    color: #f2f2f2;
+    outline: none !important; }
+
+.btn[disabled="disabled"] {
+  background-image: none;
+  background-color: #767676;
+  box-shadow: none;
+  cursor: not-allowed;
+  color: #ffffff;
+  border-color: transparent;
+  outline: 0 !important; }
+  .btn[disabled="disabled"]:hover {
+    color: #f2f2f2;
+    outline: none !important; }
+  .btn[disabled="disabled"]:focus {
+    color: #f2f2f2;
+    outline: none !important; }
+
+.btn-arrow[disabled] .btn {
+  background-image: none;
+  background-color: #767676;
+  box-shadow: none;
+  cursor: not-allowed;
+  color: #ffffff;
+  border-color: transparent;
+  outline: 0 !important; }
+  .btn-arrow[disabled] .btn:hover {
+    color: #f2f2f2;
+    outline: none !important; }
+  .btn-arrow[disabled] .btn:focus {
+    color: #f2f2f2;
+    outline: none !important; }
+
+.btn-arrow[disabled] .icon-primary-left {
+  color: #fff !important; }
+
+.btn-arrow[disabled] .icon-primary-right {
+  color: #fff !important; }
+
+.btn-arrow.disabled .btn {
+  background-image: none;
+  background-color: #767676;
+  box-shadow: none;
+  cursor: not-allowed;
+  color: #ffffff;
+  border-color: transparent;
+  outline: 0 !important; }
+  .btn-arrow.disabled .btn:hover {
+    color: #f2f2f2;
+    outline: none !important; }
+  .btn-arrow.disabled .btn:focus {
+    color: #f2f2f2;
+    outline: none !important; }
+
+.btn-arrow.disabled .icon-primary-left {
+  color: #fff !important; }
+
+.btn-arrow.disabled .icon-primary-right {
+  color: #fff !important; }
+
+.btn-medium {
+  padding: 12px 19px 11px 18px;
+  font-size: 1.7rem; }
+
+.btn-small {
+  padding: 10px 19px 9px 18px;
+  font-size: 1.5rem;
+  border-radius: 8px; }
+
+.btn-fullwidth {
+  width: 100%; }
+
+*:not(.btn-arrow) > .btn > i[class*="icon-primary-"] {
+  margin-top: -20px;
+  margin-bottom: -20px; }
+
+.enhanced-cta-group {
+  display: -ms-flexbox;
+  display: flex;
+  -ms-flex-direction: row-reverse;
+  flex-direction: row-reverse;
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3A%23959595%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
+  background-position: 0 -1px;
+  background-repeat: repeat-x; }
+  .enhanced-cta-group > .cta-button-group {
+    border-top: 0;
+    background-image: none !important; }
+    .enhanced-cta-group > .cta-button-group + .cta-button-group a {
+      font-size: 1.4rem;
+      line-height: 1em; }
+      .enhanced-cta-group > .cta-button-group + .cta-button-group a a {
+        margin-right: 0; }
+    .enhanced-cta-group > .cta-button-group hr {
+      min-height: 14px; }
+    .enhanced-cta-group > .cta-button-group + .cta-button-group {
+      -ms-flex-align: center;
+      -ms-grid-row-align: center;
+      align-items: center;
+      -ms-flex-direction: row;
+      flex-direction: row;
+      padding: 10px 0; }
+
+.cta-button-group {
+  text-align: right;
+  -ms-flex-align: baseline;
+  align-items: baseline;
+  padding: 20px 0 10px;
+  width: 100%; }
+  .cta-button-group.nodots {
+    background-image: none !important; }
+  .cta-button-group .hidden-phone {
+    margin-right: 14px; }
+  .cta-button-group .btn + .btn {
+    margin-right: 20px !important; }
+  .cta-button-group .btn:not(.hidden-phone):not(.visible-phone) {
+    margin-right: 0; }
+
+.isMobile .btn-arrow .btn.btn-small .icon-primary-left:before {
+  left: -1px; }
+
+.isMobile .btn-arrow .btn.btn-large .icon-primary-left:before {
+  left: 24px; }
+
+.isMobile .btn-arrow .btn.btn-large .icon-primary-right:before {
+  left: 24px; }
+
+@media (max-width: 1024px) {
+  .field-group + .btn {
+    margin-left: 15px; } }
+
+@media (max-width: 767px) {
+  .cta-button-group {
+    text-align: center; }
+    .cta-button-group > .btn {
+      display: block;
+      float: none;
+      width: 100%;
+      margin-left: auto !important;
+      margin-right: auto !important; } }
+
+.btn-group {
+  border-radius: 8px;
+  box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
+  display: -ms-flexbox;
+  display: flex;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+  margin-bottom: 10px;
+  max-width: 470px;
+  min-width: 290px;
+  position: relative;
+  vertical-align: middle;
+  width: 100%; }
+  .btn-group > .btn {
+    box-shadow: none;
+    -ms-flex: 1;
+    flex: 1;
+    position: relative;
+    float: left;
+    margin-right: -1px;
+    margin-bottom: 0;
+    padding-left: 0;
+    padding-right: 0;
+    text-align: center; }
+  .btn-group:not([data-select-color]) .btn.active:not(:first-child) {
+    margin-right: -1px;
+    border-left: 1px solid #d2d2d2 !important; }
+  .btn-group:not([data-select-color]) .btn[disabled]:not(:first-child) {
+    border-left: 1px solid #d2d2d2 !important; }
+  .btn-group:not([data-select-color]) .btn[disabled] + .btn[disabled] {
+    border-left: 1px solid #ebebeb !important; }
+  .btn-group:not([data-select-color]) > .btn.active {
+    border-color: #087ac2 transparent #0568ae;
+    background-color: #0568ae;
+    background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
+    color: #ffffff; }
+    .btn-group:not([data-select-color]) > .btn.active:hover {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: #0563a6;
+      border-color: #0563a6; }
+    .btn-group:not([data-select-color]) > .btn.active:focus {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: #0563a6;
+      border-color: #0563a6; }
+    .btn-group:not([data-select-color]) > .btn.active:active {
+      color: #ffffff;
+      outline-color: #ffffff !important;
+      background: #0563a6;
+      border-color: #0563a6; }
+  .btn-group:not([data-select-color]) > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+    border-radius: 0; }
+  .btn-group:not([data-select-color]) > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0; }
+  .btn-group:not([data-select-color]) > .btn:last-child:not(:first-child) {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0; }
+  .btn-group:not([data-select-color]) > .dropdown-toggle:not(:first-child) {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0; }
+  .btn-group > .active {
+    text-decoration: none;
+    outline: 1px dotted transparent; }
+    .btn-group > .active:focus {
+      outline: 1px dotted #ffffff; }
+
+.btn-group.btn-fullwidth > .btn {
+  -ms-flex: 1;
+  flex: 1; }
+
+.btn-group[data-select-color] {
+  margin-top: 5px;
+  box-shadow: none;
+  -ms-flex-pack: start;
+  justify-content: flex-start;
+  -ms-flex-wrap: wrap;
+  flex-wrap: wrap; }
+  .btn-group[data-select-color] .btn {
+    border: 1px solid #959595;
+    border-radius: 4px;
+    box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
+    margin-right: 10px;
+    margin-bottom: 10px;
+    height: 40px;
+    font-size: 16px;
+    color: #333333;
+    max-width: 60px;
+    min-width: 60px;
+    -ms-flex: 0;
+    flex: 0; }
+  .btn-group[data-select-color] > .btn.active:focus {
+    outline: 1px dotted #191919;
+    outline-offset: 4px; }
+
+button .btn-fill {
+  background-clip: padding-box;
+  border: 0;
+  border-radius: 4px;
+  bottom: 0;
+  display: block;
+  height: auto;
+  left: 0;
+  margin: 5px;
+  position: absolute;
+  right: 0;
+  top: 0;
+  width: auto; }
+
+button .btn-fill[style*="#fff"] {
+  border: 1px solid #d2d2d2; }
+
+[data-select-color] .btn.active {
+  background: none !important;
+  outline: 0;
+  margin-right: 10px;
+  border-width: 3px;
+  color: #333333;
+  line-height: 12px; }
+  [data-select-color] .btn.active > .btn-fill {
+    margin: 3px; }
+  [data-select-color] .btn.active:hover {
+    color: #333333; }
+
+[data-select-color] .btn:active {
+  background: none !important;
+  outline: 0;
+  margin-right: 10px;
+  border-width: 3px;
+  color: #333333;
+  line-height: 12px; }
+  [data-select-color] .btn:active > .btn-fill {
+    margin: 3px; }
+  [data-select-color] .btn:active:hover {
+    color: #333333; }
+
+.btn-group[data-select-color="orange"] > .btn.active {
+  border-color: #ea7400; }
+
+.btn-group[data-select-color="blue"] > .btn.active {
+  border-color: #0568ae; }
+
+.btn-group[data-select-color="green"] > .btn.active {
+  border-color: #007a3e; }
+
+.btn-spinbutton-toggle.btn-group {
+  display: block !important;
+  height: 40px !important;
+  margin-top: 5px;
+  max-width: 138px;
+  min-width: 138px;
+  white-space: nowrap; }
+
+.btn-spinbutton-toggle .btn {
+  border-radius: 6px;
+  font-weight: normal;
+  -ms-flex: unset;
+  flex: unset;
+  height: 40px;
+  letter-spacing: normal;
+  min-width: auto;
+  padding: 3px 0 0;
+  text-align: center;
+  min-width: 46px;
+  width: 46px; }
+
+.btn-spinbutton-toggle .btn[data-max-value] {
+  border-bottom: 1px solid #d2d2d2;
+  border-top: 1px solid #d2d2d2;
+  box-shadow: 0 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
+  background-color: #fff;
+  cursor: text;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 2rem;
+  font-weight: normal;
+  padding: 4px 0 0;
+  text-align: center;
+  min-width: 46px !important;
+  width: 46px; }
+  .btn-spinbutton-toggle .btn[data-max-value]:focus {
+    border-color: #0568ae;
+    outline: none; }
+    .btn-spinbutton-toggle .btn[data-max-value]:focus + .btn {
+      border-left: 1px solid #0568ae;
+      transition: border 0.3s linear 0s; }
+
+.btn-spinbutton-toggle .icon-primary-subtractminimize {
+  font-size: 30px !important;
+  color: #0568ae !important; }
+
+.btn-spinbutton-toggle .icon-primary-add-maximize {
+  font-size: 30px !important;
+  color: #0568ae !important; }
+
+.btn-spinbutton-toggle .btn[disabled].icon-primary-subtractminimize {
+  background-color: #d2d2d2;
+  color: #767676 !important; }
+
+.btn-spinbutton-toggle .btn[disabled].icon-primary-add-maximize {
+  background-color: #d2d2d2;
+  color: #767676 !important; }
+
+.btn-spinbutton-toggle input.btn[disabled] {
+  background-color: #d2d2d2;
+  color: #5a5a5a;
+  cursor: not-allowed; }
+
+.btn-group.btn-spinbutton-toggle .btn[disabled] + .btn[disabled] {
+  border-left: 1px solid #f0f0f0 !important; }
+
+.btn-group.btn-spinbutton-toggle .btn[data-max-value]:focus + .btn:not(:first-child) {
+  border-left: 1px solid #0568ae !important; }
+
+@media (max-width: 480px) {
+  .btn-group:not([data-select-color]) > .btn {
+    font-size: 1.3rem;
+    min-width: auto; } }
+
+.reset-field,
+.close {
+  float: right;
+  background: none;
+  width: 34px;
+  height: 34px;
+  padding: 0;
+  overflow: hidden;
+  display: inline-block; }
+
+.reset-field {
+  display: none; }
+
+.reset-field:before {
+  font-size: 22px;
+  color: #5a5a5a; }
+
+.input-emphasized + .reset-field:before {
+  font-size: 29px;
+  color: #5a5a5a; }
+
+.reset-field:active,
+.reset-field:hover,
+.reset-field:focus {
+  display: block !important; }
+
+button.close {
+  border: 0;
+  appearance: none; }
+
+.corner-button {
+  box-shadow: 0 -50px 0 0 #f2f2f2 inset;
+  height: 69px;
+  /*overflow: hidden;*/
+  position: absolute;
+  right: -35px;
+  top: -35px;
+  transform: rotate(45deg);
+  width: 69px; }
+
+.corner-button .close:before {
+  bottom: -7px;
+  color: #0568ae;
+  display: block;
+  font-size: 20px;
+  height: 50px;
+  left: -11px;
+  position: absolute;
+  width: 50px; }
+
+.corner-button .close {
+  float: none;
+  height: 45px;
+  margin: 0;
+  position: absolute;
+  right: 12px;
+  top: 45px;
+  transform: rotate(45deg);
+  width: 45px; }
+
+.corner-button .close:focus {
+  outline: 1px dotted black; }
+
+.ds2-no-colors .corner-button .close {
+  border: 1px solid black; }
+
+.field-group input + .reset-field {
+  background: none;
+  height: 36px;
+  width: 45px;
+  display: none;
+  padding: 0;
+  position: absolute;
+  right: 0;
+  top: 0;
+  box-shadow: none;
+  border: none;
+  content: " "; }
+
+.field-group input[type="search"] + .reset-field,
+.field-group input[type="search"] + .btn-search + .reset-field,
+.tooltip-onclick input + .reset-field,
+.tooltip-onclick input + .icon-primary-tooltip + .reset-field,
+.tooltip-onclick textarea + .reset-field,
+.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {
+  right: 45px; }
+
+.field-group input[type="search"] + .reset-field:after,
+.field-group input[type="search"] + .btn-search + .reset-field:after,
+.tooltip-onclick input + .reset-field:after,
+.tooltip-onclick input + .icon-primary-tooltip + .reset-field:after,
+.tooltip-onclick textarea + .reset-field:after,
+.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field:after {
+  background-color: #d2d2d2;
+  content: "";
+  display: block;
+  height: 20px;
+  position: absolute;
+  right: 0;
+  top: 8px;
+  width: 1px; }
+
+.tooltip-onclick input + .reset-field,
+.tooltip-onclick input + .icon-primary-tooltip + .reset-field {
+  right: 50px !important; }
+
+.tooltip-onclick textarea + .reset-field,
+.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {
+  right: 45px !important;
+  width: 40px; }
+
+.field-group input.input-emphasized + .reset-field {
+  width: 45px;
+  height: 46px;
+  right: 6px; }
+
+.field-group input.input-emphasized + .reset-field:after {
+  top: 14px; }
+
+.field-group [disabled] + .reset-field {
+  display: none; }
+
+.ds2_touchevents .field-group input + .reset-field:focus,
+.ds2_touchevents .field-group input:focus + .reset-field,
+.ds2_touchevents textarea:focus + .reset-field,
+.ds2_touchevents textarea + .reset-field:focus {
+  display: block;
+  position: absolute;
+  right: 0px;
+  top: 0;
+  border: none; }
+
+.ds2_touchevents .field-group input {
+  padding: 8px 55px 8px 15px;
+  -webkit-appearance: none; }
+
+.ds2_touchevents textarea:focus {
+  padding: 15px 55px 15px 15px; }
+
+.ds2_touchevents textarea:focus + .reset-field {
+  border: none;
+  position: absolute;
+  right: 6px;
+  top: 5px; }
+
+.ds2_touchevents textarea.hasScrollbar:focus {
+  padding: 15px 35px 15px 15px; }
+
+.ds2_touchevents textarea.hasScrollbar:focus + .reset-field {
+  right: 22px; }
+
+.form-row.error .error-msg {
+  display: block;
+  font-size: 14px;
+  line-height: 14px;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  position: relative;
+  padding-left: 18px; }
+
+.form-row.error .error-msg:before {
+  color: #cf2a2a;
+  font-size: 14px;
+  left: 0;
+  line-height: 14px;
+  position: absolute;
+  vertical-align: middle; }
+
+.form-row.error label,
+.form-row.error .error-msg,
+.form-row.error button.awd-select,
+.form-row.error select.awd-select + span,
+.form-row.error .checkbox,
+.form-row.error .radio,
+.form-row.error legend.error,
+.form-row.error input {
+  color: #cf2a2a; }
+
+.form-row.error .btn-group > .btn,
+.form-row.error button.awd-select,
+.form-row.error .awd-select-list,
+.form-row.error select.awd-select + span,
+.form-row.error textarea,
+.form-row.error input,
+.form-row.error .checkbox .skin,
+.form-row.error .radio .skin {
+  border-color: #cf2a2a !important; }
+
+.form-row.error .checkbox input:checked:not(:disabled) + .skin {
+  background-color: #cf2a2a; }
+
+.form-row.error .radio input:checked + .skin:after {
+  background-color: #cf2a2a; }
+
+.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg {
+  margin-top: -11px;
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0; }
+
+.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext {
+  margin: 0 0 10px; }
+
+.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:before,
+.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:after {
+  display: none; }
+
+.error .helpertext {
+  border-color: #cf2a2a;
+  /*border-radius:0;*/ }
+
+.error .helpertext:before {
+  border-top-color: #cf2a2a; }
+
+.error .tooltip-onfocus .helpertext {
+  margin: 14px 0 10px 0; }
+
+.error [class*="price"],
+.error [class*="pricing-"] {
+  color: #cf2a2a; }
+
+input:-ms-clear {
+  display: none; }
+
+input[type]::-webkit-inner-spin-button,
+input[type]::-webkit-outer-spin-button {
+  -webkit-appearance: none; }
+
+/*  input[type] {
+  -moz-appearance: textfield; } 
+ */
+form {
+  margin: 0; }
+
+fieldset {
+  padding: 0;
+  margin: 0;
+  border: 0; }
+
+label,
+legend {
+  display: inline-block;
+  font-size: 1.4rem;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+legend {
+  display: block; }
+
+.error-msg {
+  display: none; }
+
+select,
+textarea,
+input {
+  border-radius: 6px;
+  color: #5a5a5a;
+  display: inline-block;
+  font-size: 1.6rem;
+  margin: 0px;
+  padding: 0 15px 0 15px;
+  vertical-align: middle;
+  line-height: normal; }
+
+select::-webkit-input-placeholder,
+textarea::-webkit-input-placeholder,
+input::-webkit-input-placeholder {
+  color: #5a5a5a;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  font-style: normal;
+  opacity: 1; }
+
+select:-moz-placeholder,
+textarea:-moz-placeholder,
+input:-moz-placeholder {
+  color: #5a5a5a;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  font-style: normal;
+  opacity: 1; }
+
+select::-moz-placeholder,
+textarea::-moz-placeholder,
+input::-moz-placeholder {
+  color: #5a5a5a;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  font-style: normal;
+  opacity: 1; }
+
+select:-ms-input-placeholder,
+textarea:-ms-input-placeholder,
+input:-ms-input-placeholder {
+  color: #5a5a5a;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  transition: none;
+  opacity: 1; }
+
+select:placeholder,
+textarea:placeholder,
+input:placeholder {
+  color: #5a5a5a;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial;
+  font-style: normal;
+  opacity: 1; }
+
+select:last-child,
+textarea:last-child,
+input:last-child {
+  margin-right: 0; }
+
+input:not([type="button"]) {
+  height: 36px; }
+
+input.input-emphasized {
+  font-size: 1.8rem;
+  height: 48px;
+  padding: 13px 20px 13px; }
+
+input[type="search"]:focus {
+  padding-right: 88px; }
+
+input[type="search"] {
+  padding-right: 40px;
+  -webkit-appearance: none !important; }
+
+input[type="search"].input-emphasized {
+  padding-right: 45px; }
+
+.btn-search[class*="btn"] {
+  background-color: transparent;
+  background-position: 50% 50%;
+  background-size: 20px;
+  background-repeat: no-repeat;
+  border: none;
+  height: 100%;
+  margin-left: 0;
+  margin-top: 0;
+  min-width: 45px !important;
+  outline-offset: 0;
+  padding: 0 !important;
+  position: absolute;
+  right: 0;
+  top: 0;
+  border-radius: 0 5px 5px 0;
+  min-width: 44px;
+  width: 44px; }
+
+.input-emphasized + .btn-search[class*="btn"],
+.input-emphasized + .reset-field + .btn-search[class*="btn"] {
+  background-size: 26px;
+  height: 46px;
+  top: 1px;
+  outline-offset: -3px;
+  margin-bottom: 0;
+  border-radius: 0 5px 5px 0; }
+
+input[type="search"].input-emphasized + .reset-field {
+  right: 45px !important; }
+
+.search-suggestion-wrapper {
+  position: relative;
+  margin-bottom: 15px; }
+
+/*styles from dropdown*/
+.search-suggestion-list {
+  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
+  border-radius: 0 0 6px 6px;
+  position: relative;
+  border: 1px solid #0568ae;
+  border-top: 0;
+  padding: 15px 0;
+  background-color: #f2f2f2;
+  z-index: 1000;
+  width: 100%;
+  max-height: 400px;
+  overflow-y: auto; }
+
+.search-suggestion-list:empty {
+  display: none; }
+
+.search-suggestion-item {
+  position: relative;
+  z-index: -1;
+  padding: 0 15px;
+  line-height: 4.0rem;
+  color: #5a5a5a; }
+
+.search-suggestion-item a {
+  text-decoration: none;
+  color: #5a5a5a; }
+
+.search-suggestion-item:hover,
+.search-suggestion-item:focus {
+  cursor: pointer;
+  background-color: #d2d2d2; }
+
+input[data-provide="datepicker"],
+[data-provide="datepicker"]:-moz-placeholder,
+[data-provide="datepicker"]:-ms-input-placeholder,
+[data-provide="datepicker"]:-webkit-input-placeholder {
+  color: #0568ae !important;
+  opacity: 1;
+  filter: alpha(opacity=100); }
+
+input[disabled],
+input[readonly],
+select[disabled],
+select[readonly],
+textarea[disabled],
+textarea[readonly],
+span.icon-primary-calendar.disabled,
+span.icon-primary-calendar.readonly {
+  cursor: not-allowed;
+  background-color: #f2f2f2;
+  box-shadow: none; }
+
+span.icon-primary-calendar.disabled input,
+span.icon-primary-calendar.readonly input {
+  color: #959595 !important; }
+
+textarea {
+  display: block;
+  width: 100%;
+  max-width: 100%;
+  padding: 15px; }
+
+textarea.small {
+  line-height: 20px; }
+
+textarea + .reset-field {
+  display: none; }
+
+textarea::-webkit-input-placeholder {
+  line-height: .99; }
+
+textarea:-moz-placeholder {
+  line-height: .99; }
+
+textarea::-moz-placeholder {
+  line-height: .99; }
+
+textarea:-ms-input-placeholder {
+  line-height: .99; }
+
+textarea:placeholder {
+  line-height: .99; }
+
+textarea,
+input {
+  background-color: #ffffff;
+  border: 1px solid #d2d2d2; 
+/* -webkit-appearance: none; */
+  box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
+  transition: border .3s linear 0s;
+  font-family: "Omnes-ECOMP-W02", Arial; }
+
+textarea:focus,
+input:focus {
+  outline: 0;
+  border-color: #0568ae; }
+
+.input-append {
+  display: table; }
+
+.input-append > div {
+  display: table-cell;
+  width: 1%; }
+
+.input-append > .field-group {
+  width: 100%; }
+
+.row .field-group input[class*="span"] {
+  float: none; }
+
+.field-group {
+  position: relative;
+  display: inline-block; }
+
+label + .field-group,
+label + .input-append,
+label + .row,
+label + .row-nowrap,
+label + .form-row {
+  margin-top: 5px; }
+
+.field-group {
+  position: relative;
+  display: block; }
+
+.field-group input:not([type="button"])[disabled] {
+  padding-right: 15px; }
+
+input:invalid,
+textarea:invalid,
+select:invalid {
+  outline: none !important; }
+
+.form-row {
+  margin-top: 20px; }
+
+.form-row.nomar {
+  margin: 0; }
+
+.row-nowrap.no-flex.form-row > label + br {
+  margin-bottom: 5px; }
+
+span.form-row {
+  display: inline-block; }
+
+legend + .form-row {
+  margin-top: 20px; }
+
+.tooltip-onclick input {
+  padding-right: 45px; }
+
+.ds2_touchevents .tooltip-onclick input:focus {
+  padding-right: 95px; }
+
+span.icon-primary-calendar {
+  display: block;
+  position: relative;
+  background-color: #fff;
+  border-radius: 4px;
+  overflow: hidden;
+  height: 36px; }
+
+span.icon-primary-calendar:before {
+  position: absolute;
+  top: 7px;
+  left: 13px;
+  color: #0568ae; }
+
+span.icon-primary-calendar.disabled {
+  background-color: #f2f2f2; }
+
+span.icon-primary-calendar.disabled:before {
+  color: #959595; }
+
+span.icon-primary-calendar input {
+  padding-left: 35px;
+  color: #0568ae;
+  transition: border-color 0.3s linear 0s;
+  box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
+  position: absolute;
+  top: 0;
+  left: 0; }
+
+.faux-input + input.datepicker-input:not([disabled]) {
+  cursor: pointer;
+  margin-left: 0;
+  background-color: #fff;
+  position: absolute;
+  left: 0;
+  top: 0;
+  z-index: 0; }
+
+.faux-input {
+  background-color: transparent !important;
+  border: 1px solid transparent;
+  border-radius: 4px;
+  font-size: 1.6rem;
+  height: 35px;
+  left: 0;
+  line-height: 35px;
+  margin-bottom: 10px;
+  margin-right: 6px;
+  padding: 0 0 0 35px;
+  position: relative;
+  text-align: left;
+  top: 0;
+  vertical-align: middle;
+  width: 100%;
+  z-index: 1; }
+
+.faux-input:disabled {
+  cursor: not-allowed; }
+
+.faux-input:focus + .datepicker-input,
+[data-calendar-state="opened"] + .datepicker-input {
+  border-color: #0568ae;
+  box-shadow: 2px 3px 2px -2px rgba(5, 116, 172, 0.35) inset;
+  outline: 0 none; }
+
+.form-row.error .error-msg {
+  display: block;
+  font-size: 14px;
+  line-height: 14px;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  position: relative;
+  padding-left: 18px;
+  margin-top: 10px; }
+
+.form-row.error .error-msg > .icon-primary-badgealert {
+  height: 14px;
+  width: 14px;
+  position: absolute;
+  left: 0;
+  margin-right: 0; }
+
+.form-row.error .error-msg > .icon-primary-badgealert:before {
+  color: #cf2a2a;
+  font-size: 14px;
+  left: 0;
+  line-height: 14px;
+  position: absolute;
+  vertical-align: middle; }
+
+.form-row.error label,
+.form-row.error .error-msg,
+.form-row.error button.awd-select,
+.form-row.error select.awd-select + span,
+.form-row.error .checkbox,
+.form-row.error .radio,
+.form-row.error legend.error,
+.form-row.error input,
+.form-row.error textarea {
+  color: #cf2a2a; }
+
+.form-row.error .btn-group > .btn,
+.form-row.error button.awd-select,
+.form-row.error .awd-select-list,
+.form-row.error select.awd-select + span,
+.form-row.error textarea,
+.form-row.error input,
+.form-row.error .checkbox .skin,
+.form-row.error .radio .skin {
+  border-color: #cf2a2a !important; }
+
+.form-row.error .checkbox input:checked:not(:disabled) + .skin {
+  background-color: #cf2a2a; }
+
+.form-row.error .radio input:checked + .skin:after {
+  background-color: #cf2a2a; }
+
+.error [class*="price"],
+.error [class*="pricing-"] {
+  color: #cf2a2a; }
+
+hr,
+.hr-or {
+  display: block;
+  height: 1px;
+  margin: 15px 0;
+  border: none;
+  background-repeat: repeat-x;
+  background-color: #959595;
+  position: relative; }
+
+hr.dark {
+  background-color: #959595; }
+
+hr.lite {
+  background-color: #d2d2d2; }
+
+.hr-or:before {
+  background-color: #fff;
+  color: #666;
+  content: " OR ";
+  display: block;
+  font-size: 1.4rem;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  height: 16px;
+  left: 50%;
+  line-height: 1.6rem;
+  margin-left: -15px;
+  margin-top: -8px;
+  position: absolute;
+  text-align: center;
+  top: 50%;
+  width: 30px;
+  z-index: 1111; }
+
+hr.hr-dotted.dark {
+  background-color: transparent;
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E");
+  background-position: bottom;
+  background-repeat: repeat-x;
+  background-size: 4px 1px;
+  width: 100%; }
+
+hr.hr-dotted.lite {
+  background-color: transparent;
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
+
+hr.is-vertical.dark,
+hr.hr-or.dark,
+hr.is-vertical.lite,
+hr.hr-or.lite {
+  display: inline-block;
+  height: auto;
+  margin: 0 15px;
+  min-height: 20px;
+  width: 1px; }
+
+hr.is-vertical.dark,
+hr.hr-or.dark {
+  background-color: #959595; }
+
+hr.is-vertical.lite,
+hr.hr-or.lite {
+  background-color: #d2d2d2; }
+
+.hr-dotted.is-vertical.dark,
+.hr-dotted.is-vertical.lite {
+  background-color: transparent;
+  background-repeat: repeat-y;
+  background-size: 1px 4px;
+  height: auto;
+  min-height: 20px;
+  width: 1px; }
+
+.hr-dotted.is-vertical.dark {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
+
+.hr-dotted.is-vertical.lite {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
+
+.row-nowrap > .span + hr.is-vertical,
+.row > .span + hr.is-vertical {
+  margin: 0 0 0 -20px; }
+
+@media (max-width: 767px) {
+  hr,
+  .hr-or {
+    margin: 30px 0; }
+  hr.full {
+    margin-left: -15px;
+    margin-right: -15px; }
+  .hr-or.is-vertical {
+    min-height: 1px;
+    height: 1px;
+    width: 100%; }
+  .row-nowrap > .span + hr.is-vertical {
+    margin: 0 0 0 -15px; }
+  .row > .span + hr.is-vertical {
+    min-height: 1px;
+    height: 1px;
+    width: 100%;
+    margin: 0;
+    display: block; }
+  .row > .span + hr.is-vertical.lite {
+    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
+    background-size: 4px 1px;
+    background-repeat: repeat-x; }
+  .row > .span + hr.is-vertical.dark {
+    background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
+    background-size: 4px 1px;
+    background-repeat: repeat-x; } }
+
+hr.bottom-space-only {
+  margin-top: 0; }
+
+.hr-nomargin {
+  margin: 0; }
+
+.radio {
+  position: relative;
+  min-height: 24px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.6rem;
+  margin-bottom: 5px; }
+  .radio input {
+    -webkit-tap-highlight-color: transparent;
+    height: 10px;
+    margin: 6px;
+    opacity: 0;
+    outline: none;
+    position: absolute;
+    left: 1px;
+    top: 1px;
+    width: 10px; }
+    .radio input:focus + .skin {
+      border-color: #0568ae; }
+      .radio input:focus + .skin:before {
+        content: "";
+        height: 34px;
+        left: -6px;
+        top: -6px;
+        outline: 1px dotted #000000;
+        position: absolute;
+        width: 34px; }
+    .radio input + .skin {
+      border-radius: 100%; }
+    .radio input:checked + .skin:after {
+      background-color: #0568ae;
+      border-radius: 100%;
+      border: 3px solid #FFFFFF;
+      content: "";
+      display: block;
+      height: 16px;
+      position: absolute;
+      width: 16px; }
+    .radio input:disabled + .skin {
+      cursor: not-allowed;
+      background-color: #d2d2d2;
+      border-color: #d2d2d2;
+      color: #666666; }
+      .radio input:disabled + .skin + span {
+        cursor: not-allowed;
+        color: #666666; }
+    .radio input:disabled:checked + .skin:after {
+      background-color: #666666; }
+    .radio input:invalid + .skin {
+      border: solid 1px #cf2a2a; }
+  .radio .skin {
+    background-color: #FFFFFF;
+    border: 1px solid #d2d2d2;
+    border-radius: 3px;
+    display: inline-block;
+    height: 24px;
+    left: 0;
+    position: absolute;
+    top: 0;
+    width: 24px; }
+  .radio span {
+    display: inline-block;
+    margin-left: 34px;
+    margin-top: 0;
+    position: relative;
+    top: 3px; }
+  .radio label {
+    font-size: 1.6rem;
+    font-family: "Omnes-ECOMP-W02", Arial; }
+
+.radio.inline {
+  display: inline-block;
+  margin-bottom: 10px;
+  vertical-align: middle;
+  margin-right: 10px; }
+  .radio.inline:last-child {
+    margin-right: 0; }
+
+.radio-box {
+  border: 1px solid #d2d2d2;
+  border-radius: 8px; }
+  .radio-box > [role="radio"] label {
+    padding: 15px 15px 20px 15px;
+    display: block;
+    width: 100%; }
+    .radio-box > [role="radio"] label .skin + span {
+      top: 2px; }
+  .radio-box > [role="radio"] + div {
+    padding: 0 15px 15px 47px; }
+  .radio-box > [aria-checked="false"] label > input {
+    top: 15px;
+    left: 15px; }
+  .radio-box > [aria-checked="false"] label .skin {
+    top: 15px;
+    left: 15px; }
+  .radio-box > [aria-checked="true"] label > input {
+    top: 13px;
+    left: 13px; }
+  .radio-box > [aria-checked="true"] label .skin {
+    top: 13px;
+    left: 13px; }
+
+.radio-box.active {
+  border: 3px solid #0568ae; }
+  .radio-box.active > [role="radio"] label {
+    padding: 13px 14px 19px 13px; }
+
+.checkbox {
+  position: relative;
+  min-height: 24px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.6rem;
+  margin-bottom: 5px; }
+  .checkbox input {
+    -webkit-tap-highlight-color: transparent;
+    height: 10px;
+    margin: 6px;
+    opacity: 0;
+    outline: none;
+    position: absolute;
+    left: 1px;
+    top: 1px;
+    width: 10px; }
+    .checkbox input:focus + .skin {
+      border-color: #0568ae; }
+      .checkbox input:focus + .skin:before {
+        content: "";
+        height: 34px;
+        left: -6px;
+        top: -6px;
+        outline: 1px dotted #000000;
+        position: absolute;
+        width: 34px; }
+    .checkbox input:checked:not(:disabled) + .skin {
+      background-color: #0568ae;
+      border-color: #0568ae; }
+    .checkbox input:checked:disabled + .skin:after {
+      color: #5A5A5A; }
+    .checkbox input:checked + .skin:after {
+      height: 24px;
+      width: 24px;
+      background-color: transparent;
+      font-size: 23.4px;
+      color: #FFFFFF;
+      line-height: 21px; }
+    .checkbox input:disabled + .skin {
+      cursor: not-allowed;
+      background-color: #d2d2d2;
+      border-color: #d2d2d2;
+      color: #666666; }
+      .checkbox input:disabled + .skin + span {
+        cursor: not-allowed;
+        color: #666666; }
+    .checkbox input:invalid + .skin {
+      border: solid 1px #cf2a2a; }
+    .checkbox input:indeterminate + .skin:after {
+      background-color: transparent;
+      font-size: 25px;
+      color: #0574ac;
+      content: "\e920"; }
+  .checkbox .skin {
+    background-color: #fff;
+    border: 1px solid #d2d2d2;
+    border-radius: 3px;
+    display: inline-block;
+    height: 24px;
+    width: 24px;
+    position: absolute;
+    left: 0;
+    top: 0; }
+  .checkbox span {
+    display: inline-block;
+    margin-left: 34px;
+    margin-top: 0;
+    position: relative;
+    top: 3px; }
+  .checkbox label {
+    font-size: 1.6rem;
+    font-family: "Omnes-ECOMP-W02", Arial; }
+  .checkbox input {
+    z-index: 9999; }
+  .checkbox input.indeterminate + .skin:after {
+    font-size: 22px;
+    color: #0568ae; }
+
+.checkbox.inline {
+  display: inline-block;
+  margin-bottom: 10px;
+  vertical-align: middle;
+  margin-right: 10px; }
+  .checkbox.inline:last-child {
+    margin-right: 0; }
+
+.checkbox.checkbox-selectall {
+  margin: 20px 0 0 24px; }
+
+.terms-after-checkbox {
+  margin-top: 15px; }
+
+.indeterminate-margin {
+  padding-left: 24px; }
+
+.tiny-accordion {
+  border-bottom: 1px solid #d2d2d2; }
+
+.toggle-header,
+.inactive-toggle-header {
+  border-color: #fff;
+  color: #0568ae;
+  cursor: pointer;
+  display: block;
+  font-size: 2.0rem;
+  line-height: 2.2rem;
+  min-height: 41px;
+  position: relative;
+  padding: 16px 55px 16px 15px; }
+
+.toggle-header.opened {
+  color: #333333; }
+
+.tiny-accordion .toggle-header,
+.tiny-accordion .inactive-toggle-header {
+  padding: 16px 55px 16px 15px;
+  border-top: 1px solid #d2d2d2; }
+
+.tiny-accordion .toggle-header:focus {
+  text-decoration: underline; }
+
+.tiny-accordion.iconleft .toggle-header,
+.tiny-accordion.iconleft .inactive-toggle-header {
+  padding: 15px 15px 15px 50px; }
+
+.accordion-content {
+  font-size: 1.4rem; }
+
+.accordion-content .toggle-header:first-child {
+  margin-top: 16px; }
+
+.tiny-accordion .toggle-header + .accordion-content {
+  padding: 0 50px 15px 15px; }
+
+.tiny-accordion.iconleft .toggle-header + .accordion-content {
+  padding: 0 15px 15px 50px; }
+
+.toggle-header .icon-primary-accordion-plus,
+.toggle-header .icon-primary-accordion-minus {
+  display: inline-block;
+  font-size: 20px;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  right: 15px;
+  vertical-align: middle;
+  top: 16px;
+  font-weight: bold; }
+
+.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-plus,
+.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-minus {
+  left: 15px; }
+
+.inactive-toggle-header:hover {
+  cursor: inherit; }
+
+.tiny-accordion-to-tabs,
+.tiny-tabs {
+  position: relative;
+  width: 100%;
+  margin: 0px;
+  padding: 0px; }
+
+.tiny-tabs [class*="icon-primary-accordion-"] {
+  display: none !important; }
+
+.tiny-accordion-to-tabs:before,
+.tiny-accordion-to-tabs:after,
+.tiny-tabs:before,
+.tiny-tabs:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.tiny-accordion-to-tabs:after,
+.tiny-tabs:after {
+  clear: both; }
+
+.tiny-accordion-to-tabs:before,
+.tiny-accordion-to-tabs:after,
+.tiny-tabs:before,
+.tiny-tabs:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.tiny-accordion-to-tabs:after,
+.tiny-tabs:after {
+  clear: both; }
+
+.tiny-tabs > .toggle-header {
+  display: inline-block;
+  float: left;
+  border-top: none;
+  overflow: hidden;
+  height: 70px;
+  text-align: center;
+  background-color: #fff;
+  border-radius: 0px;
+  padding: 26px 20px 25px 20px !important;
+  border-top: 1px solid #fff;
+  -webkit-filter: none;
+  filter: none;
+  background-clip: padding-box;
+  border-bottom: 1px solid #d2d2d2;
+  font-weight: normal;
+  border-right: 1px solid #d2d2d2;
+  white-space: nowrap; }
+
+.tiny-tabs .toggle-header + div {
+  left: 0px;
+  position: absolute;
+  top: 69px;
+  border-top: 1px solid #d2d2d2;
+  padding: 0;
+  display: block;
+  border-bottom: none;
+  width: 100%; }
+
+.accordion-pad {
+  padding-top: 30px;
+  padding-bottom: 30px; }
+
+.tiny-tabs .opened {
+  color: #333333;
+  border-top: 5px solid #0568ae !important;
+  padding-top: 22px !important;
+  border-bottom: none;
+  background-color: #fff;
+  -webkit-filter: none;
+  filter: none;
+  cursor: default;
+  z-index: 999; }
+
+.tiny-tabs .toggle-header:focus {
+  text-decoration: underline;
+  outline: thin dotted #666;
+  outline-offset: 0; }
+
+.tiny-tabs .toggle-header:first-child {
+  border-left: none;
+  margin-left: 0; }
+
+.tiny-tabs .toggle-header:first-child {
+  border-left: 1px solid #fff; }
+
+.tiny-tabs .opened:first-child {
+  border-left: 1px solid #d2d2d2; }
+
+.tiny-tabs .toggle-header:nth-last-of-type(2) {
+  border-right-color: #fff; }
+
+.tiny-tabs .opened:nth-last-of-type(2) {
+  border-right: 1px solid #d2d2d2; }
+
+@media (max-width: 767px) {
+  .tiny-accordion,
+  .tiny-accordion-to-tabs {
+    margin-left: -15px;
+    margin-right: -15px;
+    width: auto; }
+  .tiny-accordion-to-tabs {
+    display: block;
+    border-bottom: 1px solid #d2d2d2; }
+  .tiny-accordion-to-tabs .toggle-header {
+    display: block;
+    min-height: 41px;
+    padding: 16px 50px 16px 15px;
+    border-top: 1px solid #d2d2d2; }
+  .tiny-accordion-to-tabs .toggle-header:focus {
+    text-decoration: underline; }
+  .tiny-accordion-to-tabs .toggle-header + .accordion-content {
+    padding: 0 50px 15px 15px; } }
+
+@media (min-width: 768px) {
+  .tiny-accordion-to-tabs [class*="icon-primary-accordion-"] {
+    display: none !important; }
+  .tiny-accordion-to-tabs > .toggle-header {
+    display: inline-block;
+    float: left;
+    border-top: none;
+    /*overflow: hidden;*/
+    height: 70px;
+    text-align: center;
+    background-color: #fff;
+    border-radius: 0px;
+    padding: 26px 20px 25px 20px !important;
+    border-top: 1px solid #fff;
+    -webkit-filter: none;
+    filter: none;
+    background-clip: padding-box;
+    border-bottom: 1px solid #d2d2d2;
+    font-weight: normal;
+    border-right: 1px solid #d2d2d2;
+    white-space: nowrap; }
+  .tiny-accordion-to-tabs .toggle-header + div {
+    left: 0px;
+    position: absolute;
+    top: 69px;
+    border-top: 1px solid #d2d2d2;
+    padding-top: 30px;
+    padding-left: 20px;
+    display: block;
+    border-bottom: none;
+    width: 100%; }
+  .tiny-accordion-to-tabs .opened {
+    color: #333333;
+    border-top: 5px solid #0568ae !important;
+    padding-top: 22px !important;
+    border-bottom: none;
+    background-color: #fff;
+    -webkit-filter: none;
+    filter: none;
+    cursor: default;
+    text-decoration: none;
+    z-index: 999; }
+  .tiny-accordion-to-tabs .toggle-header:focus {
+    text-decoration: underline;
+    outline: thin dotted #666;
+    outline-offset: 0px; }
+  .tiny-accordion-to-tabs .toggle-header:nth-last-of-type(2) {
+    border-right: none; }
+  .tiny-accordion-to-tabs .toggle-header:first-child {
+    border-left: none;
+    margin-left: 0; }
+  .tiny-accordion-to-tabs .toggle-header:first-child {
+    border-left: 1px solid #fff; }
+  .tiny-accordion-to-tabs .opened:first-child {
+    border-left: 1px solid #d2d2d2; }
+  .tiny-accordion-to-tabs .opened:nth-last-of-type(2) {
+    border-right: 1px solid #d2d2d2; } }
+
+.toggle-header .tooltip .icon-primary-tooltip {
+  margin-top: -5px; }
+
+.accordion-content {
+  transition: all 0.8s linear; }
+
+.opaque-content {
+  opacity: 0; }
+
+.tiny-tabs .toggle-header {
+  display: inline-block;
+  float: left;
+  border-top: none;
+  overflow: hidden;
+  height: 70px;
+  text-align: center;
+  background-color: #fff;
+  border-radius: 0px;
+  padding: 22px 20px 25px 20px !important;
+  border-top: 5px solid #fff;
+  -webkit-filter: none;
+  filter: none;
+  background-clip: padding-box;
+  border-bottom: 1px solid #ccc;
+  font-weight: normal;
+  border-right: 1px solid #ccc;
+  white-space: nowrap; }
+
+.tiny-tabs .toggle-header:first-child {
+  margin-left: 0; }
+
+.tiny-tabs div:first-child .toggle-header {
+  margin-left: 30px; }
+
+.tiny-tabs > div .toggle-header.opened {
+  border-bottom: 0 !important; }
+
+.tiny-accordion-to-tabs > div > div.toggle-header {
+  background-clip: padding-box;
+  background-color: #fff;
+  border-bottom: 1px solid #ccc;
+  border-radius: 0;
+  border-top: 5px solid #fff;
+  display: inline-block;
+  filter: none;
+  float: left;
+  font-weight: normal;
+  overflow: hidden;
+  padding: 22px 20px 21px !important;
+  text-align: center;
+  white-space: nowrap; }
+
+.tiny-accordion-to-tabs .toggle-header:first-child {
+  margin-left: 0; }
+
+.tiny-accordion-to-tabs div:first-child .toggle-header {
+  margin-left: 30px;
+  border-bottom: 0 !important; }
+
+.tiny-accordion-to-tabs > div .toggle-header.opened {
+  border-bottom: 0 !important; }
+
+@media (max-width: 767px) {
+  .tiny-accordion-to-tabs {
+    display: block !important;
+    border-bottom: 1px solid #ccc !important; }
+  .tiny-accordion-to-tabs > div > div.toggle-header {
+    display: block !important;
+    float: none;
+    text-align: left;
+    min-height: 41px !important;
+    padding: 15px 50px 15px 15px !important;
+    border-top: 1px solid #ccc; }
+  .tiny-accordion-to-tabs > div > div.toggle-header:first-child {
+    margin-left: 0 !important; }
+  .tiny-accordion-to-tabs > div > div.toggle-header + .accordion-content {
+    padding: 0 50px 15px 15px; }
+  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus {
+    background-position: 0 0;
+    background-size: 20px 40px; }
+  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {
+    background-position: 0 -20px;
+    background-size: 20px 40px; }
+  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus,
+  .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {
+    display: inline-block;
+    height: 20px;
+    margin: 0;
+    padding: 0;
+    position: absolute;
+    right: 15px;
+    vertical-align: middle;
+    width: 20px; } }
+
+.alert {
+  background-color: #5a5a5a;
+  border-radius: 8px;
+  color: #fff;
+  margin-top: 15px;
+  padding: 0;
+  position: relative;
+  border: 0; }
+
+.alert h3,
+.alert h4 {
+  color: #fff;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 1.6rem;
+  margin: 0 20px 5px 0; }
+
+.alert div {
+  padding: 15px 20px; }
+
+.alert div:first-child {
+  border-radius: 8px 0 0 8px;
+  width: 1%; }
+
+.alert div:first-child + div {
+  border: 1px solid transparent;
+  border-left: none;
+  border-radius: 0 8px 8px 0; }
+
+.alert-error {
+  background-color: #cf2a2a;
+  border: 1px solid #cf2a2a; }
+
+.alert-info {
+  background-color: #44c8f5;
+  border: 1px solid #44c8f5; }
+
+.alert-success {
+  background-color: #c5d63d;
+  border: 1px solid #c5d63d; }
+
+.alert [class*="icon-primary-"] {
+  color: #fff;
+  font-size: 30px;
+  margin-right: 0; }
+
+.alert .close {
+  height: 30px;
+  position: absolute;
+  right: 1px;
+  top: 1px;
+  width: 30px; }
+
+.alert .close:before {
+  color: #fff;
+  margin-right: 0;
+  position: absolute;
+  right: 9px;
+  top: 9px; }
+
+.alert a {
+  color: #fff;
+  text-decoration: underline; }
+
+.alert .close:focus {
+  outline: 1px dotted #666; }
+
+.alert p {
+  font-size: 1.4rem; }
+
+.alert p:last-child {
+  margin-bottom: 0; }
+
+.alert .standalone-link i[class*="icon-primary-"] {
+  font-size: 20px;
+  margin-right: 5px; }
+
+@media (max-width: 767px) {
+  .alert {
+    border-radius: 0;
+    margin: 0 -15px; }
+  .alert + .alert {
+    margin-top: 4px; }
+  .alert div {
+    padding: 15px 10px; }
+  .alert div:first-child {
+    border-radius: 0;
+    padding: 15px; }
+  .alert h3,
+  .alert h4 {
+    font-size: 1.4rem; }
+  .alert p {
+    font-size: 1.2rem; }
+  .alert .close {
+    right: 5px;
+    top: 5px; }
+  .alert .standalone-link i[class*="icon-primary-"] {
+    font-size: 16px; } }
+
+.alert h3 {
+  margin: 0;
+  font-size: 16px; }
+
+.alert p {
+  font-size: 14px; }
+
+.alert p a {
+  color: #FFFFFF;
+  text-decoration: underline; }
+
+.alert div:first-child + div {
+  padding-right: 25px; }
+
+.alert div:last-child {
+  padding-right: 20px !important; }
+
+.alert p [class*="icon-primary-"] {
+  color: #fff;
+  font-size: 20px;
+  margin-right: 0; }
+
+@media (max-width: 767px) {
+  .alert h3 {
+    font-size: 14px; }
+  .alert div:first-child + div {
+    padding-right: 20px; }
+  .alert div:last-child {
+    padding-right: 15px !important; }
+  .alert div:first-child {
+    padding: 15px; }
+  .alert p {
+    font-size: 12px; }
+  .alert p [class*="icon-primary-"] {
+    font-size: 16px; } }
+
+.b2b-audio {
+  width: auto;
+  margin: 10px auto;
+  height: 35px; }
+  .b2b-audio .controls-wrapper {
+    display: inline-block;
+    font-size: 25px;
+    cursor: pointer; }
+    .b2b-audio .controls-wrapper i {
+      font-size: 25px;
+      margin-right: 0px;
+      color: #444; }
+      .b2b-audio .controls-wrapper i:hover {
+        color: #0574AC; }
+  .b2b-audio .seek-bar-container-wrapper {
+    display: inline-block;
+    outline: 0;
+    min-width: 180px;
+    margin-right: 10px;
+    margin-left: 10px;
+    height: 14px;
+    padding-top: 5px; }
+    .b2b-audio .seek-bar-container-wrapper .timing-container {
+      padding-top: 13px;
+      color: #333;
+      font-size: 12px; }
+      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-left {
+        float: left;
+        line-height: 100%; }
+      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-right {
+        float: right;
+        line-height: 100%; }
+      .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-spacer {
+        clear: both; }
+  .b2b-audio .seek-bar-tooltip {
+    text-align: center;
+    min-width: 76px; }
+
+.b2b-audio-popover {
+  width: 22px; }
+  .b2b-audio-popover .volume-popover {
+    height: 100px !important;
+    width: 6px !important;
+    margin: 7px auto; }
+  .b2b-audio-popover .min-label {
+    margin-top: 5px; }
+
+.b2b-audio-native {
+  width: auto;
+  height: auto; }
+
+.b2b-audio-recorder {
+  border: 1px solid #ccc;
+  box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.15);
+  height: 63px;
+  min-height: 63px;
+  min-width: 347px; }
+  .b2b-audio-recorder .b2b-elapsed-time {
+    margin: 23px 0 24px 15px;
+    font-size: 16px;
+    font-style: italic;
+    color: #767676; }
+  .b2b-audio-recorder .b2b-controls {
+    width: 68px;
+    cursor: pointer; }
+    .b2b-audio-recorder .b2b-controls i.icoControls-record {
+      font-size: 64px;
+      color: black;
+      float: right;
+      margin-right: 10px; }
+      .b2b-audio-recorder .b2b-controls i.icoControls-record:focus, .b2b-audio-recorder .b2b-controls i.icoControls-record:hover {
+        color: #0568ae; }
+    .b2b-audio-recorder .b2b-controls i.icoControls-stop {
+      font-size: 36px;
+      color: black;
+      float: right;
+      margin-right: 20px;
+      margin-top: 12px; }
+      .b2b-audio-recorder .b2b-controls i.icoControls-stop:focus, .b2b-audio-recorder .b2b-controls i.icoControls-stop:hover {
+        color: #0568ae; }
+
+.b2b-top-btn {
+  height: 36px;
+  width: 36px;
+  border-radius: 7px; }
+
+.b2b-top-btn > i {
+  position: absolute;
+  top: 13px;
+  left: 9px;
+  width: 11px;
+  height: 18px; }
+
+.b2b-badge {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  background-color: #5A5A5A;
+  border-radius: 12px;
+  color: #FFFFFF;
+  display: inline-block;
+  font-size: 1.5rem;
+  font-weight: normal;
+  height: 20px;
+  line-height: 0;
+  margin-top: 0;
+  min-width: 20px;
+  padding: 0 5px;
+  text-align: center;
+  vertical-align: baseline; }
+  .b2b-badge:empty {
+    display: none; }
+
+* + .b2b-heading-micro {
+  margin-top: 20px !important; }
+
+.b2b-heading-micro {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-weight: normal;
+  text-rendering: optimizeLegibility;
+  font-size: 1.2rem !important;
+  text-transform: uppercase !important;
+  margin-bottom: 20px !important;
+  line-height: 1.2 !important; }
+
+.b2b-no-colors .b2b-badge {
+  border: 1px solid transparent; }
+
+.btn > .b2b-badge {
+  margin-right: 5px; }
+
+a > .b2b-badge {
+  margin-right: 6px;
+  padding-top: 10px; }
+
+.b2b-badge-urgent {
+  background-color: #cf2a2a; }
+
+.bellyband-container {
+  margin: 0 -15px; }
+
+.bellyband-group {
+  width: auto; }
+
+.bellyband-link {
+  border-top: 1px solid #d2d2d2; }
+
+.bellyband-link a {
+  display: block;
+  height: 40px;
+  line-height: 40px;
+  padding: 0 15px;
+  position: relative;
+  text-decoration: none; }
+
+.bellyband-link a:hover > div span,
+.bellyband-link a:focus > div span {
+  text-decoration: underline; }
+
+.bellyband-link a:after {
+  color: #666;
+  font-size: 2.3rem;
+  height: 20px;
+  position: absolute;
+  right: 5px;
+  top: 12px;
+  width: 18px; }
+
+.dark-bg .bellyband-link a:after {
+  color: white; }
+
+.bellyband-link img[src$="svg"].hidden-desktop,
+.bellyband-link [class*="icon-primary-"].hidden-desktop {
+  display: inline-block !important;
+  float: left;
+  font-size: 24px;
+  height: 24px;
+  margin-right: 5px;
+  margin-top: 8px;
+  width: 24px; }
+
+.dark-bg .bellyband-link [class*="icon-primary-"].hidden-desktop,
+.dark-bg .bellyband-link [class*="icon-primary-"].visible-desktop {
+  color: #fff; }
+
+.bellyband-link img[src$="svg"].visible-desktop {
+  display: none !important; }
+
+.bellyband-link p {
+  margin-top: -10px;
+  margin-left: 29px;
+  font-size: 1.4rem;
+  color: #666; }
+
+@media (min-width: 481px) and (max-width: 767px) {
+  .bellyband-container {
+    display: flex;
+    margin: 0; }
+  .bellyband-group {
+    align-content: flex-start;
+    align-items: stretch;
+    display: inline-flex;
+    flex-direction: column;
+    flex-wrap: wrap;
+    margin-top: 1px;
+    width: 100%; }
+  .bellyband-group .row {
+    display: flex !important; }
+  .bellyband-link {
+    padding-top: 0;
+    position: relative;
+    border-top: none;
+    margin-bottom: 20px;
+    width: 50%; }
+  .bellyband-link a {
+    height: inherit;
+    line-height: inherit;
+    display: flex;
+    padding: 0; }
+  .bellyband-link a:after {
+    display: none; }
+  .bellyband-link a span {
+    display: block;
+    padding-top: 10px; }
+  .bellyband-link p {
+    display: block;
+    padding: 0 15px 0 0;
+    margin-bottom: 0;
+    margin-left: 0;
+    margin-top: 0; }
+  .bellyband-link a:focus p {
+    text-decoration: none; } }
+
+@media (min-width: 768px) {
+  .bellyband-group {
+    margin: 0;
+    max-width: 100%;
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center; }
+  .bellyband-group .row {
+    display: block; }
+  .bellyband-group .row .span {
+    float: none;
+    margin-right: 0;
+    margin-bottom: 30px;
+    display: flex;
+    justify-content: space-between; }
+  .bellyband-link {
+    border-top: none;
+    flex: 0 0 auto;
+    margin-right: 0;
+    margin-bottom: 30px; }
+  .bellyband-link:last-child {
+    margin-right: 0; }
+  .bellyband-link a {
+    height: auto;
+    line-height: 1;
+    text-align: center; }
+  .bellyband-link a:after {
+    display: none; }
+  .bellyband-link img[src$="svg"].hidden-desktop,
+  .bellyband-link [class*="icon-primary-"].hidden-desktop {
+    display: none !important; }
+  .bellyband-link img[src$="svg"].visible-desktop,
+  .bellyband-link [class*="icon-primary-"].visible-desktop {
+    display: block !important;
+    font-size: 50px;
+    height: 50px;
+    margin-right: 0;
+    margin-top: 0;
+    margin-left: auto;
+    margin-right: auto;
+    width: auto; }
+  .bellyband-link a span {
+    display: block;
+    margin-top: 12px;
+    line-height: 2rem; }
+  .bellyband-link p {
+    display: block;
+    text-align: center;
+    margin-top: 6px;
+    margin-left: 0;
+    padding-left: 0 !important;
+    color: #666;
+    line-height: 1.8rem; } }
+
+@media (max-width: 480px) {
+  .bellyband-link-tall a {
+    height: auto;
+    padding: 0 40px 10px 15px; }
+  .bellyband-link-tall p {
+    line-height: 1.8rem;
+    margin-bottom: 0; }
+  .bellyband-link-tall > a:after {
+    margin-top: -8px;
+    top: 50%; } }
+
+.b2b-boardstrip {
+  display: inline-block;
+  width: 100%;
+  border-bottom: 1px solid #9d9d9d;
+  position: relative;
+  padding-top: 15px; }
+  .b2b-boardstrip .boardstrip-reel {
+    margin-bottom: 15px; }
+  .b2b-boardstrip .boardstrip-item--add {
+    border: 1px dashed #ccc;
+    background: #FFFFFF;
+    color: #0574ac;
+    width: 140px;
+    height: 80px;
+    font-size: 14px;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+    position: absolute;
+    left: 29px;
+    top: 15px; }
+    .b2b-boardstrip .boardstrip-item--add:hover, .b2b-boardstrip .boardstrip-item--add:focus {
+      border: 2px solid #007A3E;
+      cursor: pointer; }
+    .b2b-boardstrip .boardstrip-item--add i {
+      font-size: 14px;
+      margin-left: auto;
+      margin-right: auto;
+      text-align: initial; }
+    .b2b-boardstrip .boardstrip-item--add .centered {
+      margin-left: auto;
+      margin-right: auto;
+      margin-top: 27px;
+      margin-bottom: 35px;
+      display: block; }
+  .b2b-boardstrip .board-viewport {
+    float: left;
+    margin-left: 210px;
+    max-height: 95px;
+    position: relative;
+    height: 95px;
+    overflow: hidden;
+    width: 0px; }
+    .b2b-boardstrip .board-viewport .boardstrip-container {
+      width: 0px;
+      margin-left: 0;
+      left: 0px;
+      position: absolute;
+      list-style: none;
+      -webkit-transition: left 1000ms;
+      transition: left 1000ms; }
+    .b2b-boardstrip .board-viewport .board-item {
+      width: 140px;
+      height: 80px;
+      border: 1px solid #ccc;
+      margin: 0 15px 15px 0;
+      background-color: #FFFFFF;
+      border-radius: 3px;
+      float: left;
+      overflow: hidden; }
+      .b2b-boardstrip .board-viewport .board-item:hover, .b2b-boardstrip .board-viewport .board-item:focus {
+        border: 2px solid #007A3E;
+        background-color: white;
+        cursor: pointer; }
+      .b2b-boardstrip .board-viewport .board-item .board-img {
+        width: 61px;
+        height: 40px;
+        margin: 0 auto; }
+        .b2b-boardstrip .board-viewport .board-item .board-img img {
+          max-width: 100%; }
+      .b2b-boardstrip .board-viewport .board-item .title {
+        text-align: center;
+        line-height: 16px;
+        color: #666;
+        font-size: 14px;
+        font-family: "Omnes-ECOMP-W02", Arial;
+        padding: 10px 0; }
+      .b2b-boardstrip .board-viewport .board-item.selected {
+        background-color: #FFFFFF;
+        border: 2px solid #0574ac; }
+      .b2b-boardstrip .board-viewport .board-item .board-caret {
+        cursor: default;
+        outline: 0;
+        position: absolute;
+        bottom: 7px; }
+        .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-indicator {
+          border-left: 8px solid transparent;
+          border-right: 8px solid transparent;
+          border-bottom: 8px solid #999;
+          width: 0px;
+          height: 0px;
+          position: absolute;
+          left: 61px;
+          bottom: -7px; }
+        .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-arrow-up {
+          width: 0px;
+          height: 0px;
+          border-style: solid;
+          border-width: 0 8px 8px 8px;
+          border-color: transparent transparent #FFFFFF transparent;
+          left: 61px;
+          position: absolute; }
+  .b2b-boardstrip .arrow {
+    font-size: 14px;
+    cursor: pointer;
+    color: #0574ac; }
+    .b2b-boardstrip .arrow:hover {
+      color: #0574ac; }
+    .b2b-boardstrip .arrow.disabled {
+      color: #767676 !important;
+      cursor: not-allowed; }
+  .b2b-boardstrip .prev-items {
+    display: inline-block;
+    margin-top: auto;
+    margin-bottom: auto;
+    margin-right: 15px;
+    position: absolute;
+    left: 0;
+    top: 45px;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    -o-user-select: none;
+    user-select: none; }
+  .b2b-boardstrip .next-items {
+    display: inline-block;
+    margin-top: 30px;
+    margin-bottom: auto;
+    margin-left: 10px;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    -o-user-select: none;
+    user-select: none; }
+  .b2b-boardstrip .centered {
+    display: table-cell;
+    text-align: center;
+    vertical-align: middle; }
+
+.breadcrumb {
+  padding: 10px 15px;
+  height: 40px;
+  list-style: none;
+  border-bottom: 1px solid #d2d2d2;
+  font-size: 1.2rem;
+  width: 100%;
+  z-index: 1000; }
+
+.breadcrumb > li {
+  position: relative;
+  display: inline-block;
+  margin-right: 15px; }
+
+.breadcrumb > li:after {
+  font-size: 8px;
+  margin-right: 0;
+  right: -8px;
+  color: #333333; }
+
+.breadcrumb > li:last-child {
+  color: #333333; }
+
+.breadcrumb > li:last-child:after {
+  content: ""; }
+
+.breadcrumb li > * {
+  float: none !important;
+  margin: 0; }
+
+.breadcrumb {
+  padding: 10px 15px !important; }
+
+/* ARROW */
+/* spanish */
+.datepicker {
+  background-color: #FFFFFF;
+  padding: 0;
+  border-radius: 5px;
+  direction: ltr; }
+  .datepicker > div {
+    display: none; }
+  .datepicker table {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    margin: 0 0 0 0; }
+  .datepicker td {
+    text-align: center;
+    display: block;
+    width: 30px;
+    height: 30px;
+    border: none; }
+    .datepicker td span {
+      display: block;
+      width: 23%;
+      height: 54px;
+      line-height: 54px;
+      float: left;
+      margin: 1%;
+      cursor: pointer;
+      border-radius: 4px; }
+      .datepicker td span:hover {
+        background: #eeeeee; }
+    .datepicker td span.disabled {
+      background: none;
+      color: #5A5A5A;
+      cursor: default; }
+      .datepicker td span.disabled:hover {
+        background: none;
+        color: #5A5A5A;
+        cursor: default; }
+    .datepicker td span.active {
+      color: #FFFFFF;
+      background-color: #0568ae;
+      border-color: #357ebd; }
+      .datepicker td span.active:hover {
+        color: #FFFFFF;
+        background-color: #0568ae;
+        border-color: #357ebd; }
+    .datepicker td span.active.disabled {
+      color: #FFFFFF;
+      background-color: #0568ae;
+      border-color: #357ebd; }
+  .datepicker th {
+    text-align: center;
+    display: block;
+    width: 30px;
+    height: 30px;
+    border: none; }
+  .datepicker tbody:focus {
+    outline: none; }
+  .datepicker td.day {
+    background-color: transparent;
+    color: #0568ae;
+    cursor: pointer;
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    font-size: 16px;
+    height: 34px;
+    line-height: 30rem;
+    margin: -2px -1px 0 0;
+    overflow: hidden;
+    text-align: center;
+    width: 42px; }
+  .datepicker:focus {
+    outline: 1px dotted #191919;
+    outline-offset: -2px; }
+  .datepicker th[tabindex]:focus {
+    outline-offset: -15px; }
+  .datepicker td.day.focused {
+    background: #ededed;
+    cursor: pointer; }
+  .datepicker td.day.focused.active {
+    background-color: #ededed;
+    color: #0568ae; }
+  .datepicker td.disabled {
+    font-family: "Omnes-ECOMP-W02", Arial;
+    color: #5A5A5A;
+    cursor: default; }
+    .datepicker td.disabled:hover {
+      font-family: "Omnes-ECOMP-W02", Arial;
+      color: #5A5A5A;
+      cursor: default; }
+      .datepicker td.disabled:hover .show-date {
+        font-family: "Omnes-ECOMP-W02", Arial;
+        color: #5A5A5A; }
+    .datepicker td.disabled .show-date {
+      font-family: "Omnes-ECOMP-W02", Arial;
+      color: #5A5A5A; }
+  .datepicker td.today {
+    color: #FFFFFF;
+    background-color: #0568ae; }
+    .datepicker td.today:hover {
+      color: #FFFFFF;
+      background-color: #0568ae;
+      color: #FFFFFF;
+      background-color: #0568ae; }
+    .datepicker td.today:active {
+      color: #FFFFFF;
+      background-color: #0568ae; }
+    .datepicker td.today:focus {
+      color: #FFFFFF;
+      background-color: #0568ae; }
+  .datepicker td.today.disabled {
+    color: #FFFFFF;
+    background-color: #0568ae; }
+  .datepicker td.today.active {
+    color: #FFFFFF;
+    background-color: #0568ae; }
+    .datepicker td.today.active:hover {
+      color: #FFFFFF; }
+  .datepicker td.selected {
+    color: #FFFFFF;
+    background-color: #959595; }
+    .datepicker td.selected:hover {
+      color: #FFFFFF;
+      background-color: #959595; }
+  .datepicker td.selected.disabled {
+    color: #FFFFFF;
+    background-color: #959595; }
+  .datepicker td.active:not(.new) {
+    color: #FFFFFF;
+    border-color: #357ebd; }
+    .datepicker td.active:not(.new) .show-date {
+      color: #0568ae;
+      font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+  .datepicker td.active:hover:not(.new) {
+    color: #FFFFFF;
+    border-color: #357ebd; }
+    .datepicker td.active:hover:not(.new) .show-date {
+      color: #0568ae;
+      font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+  .datepicker .start-date .show-date {
+    background-color: #0568ae;
+    color: #FFFFFF !important;
+    border-radius: 5px 0 0 5px;
+    z-index: 1; }
+    .datepicker .start-date .show-date:before {
+      background-color: #0568ae;
+      content: "";
+      display: block;
+      height: 26px;
+      left: 20px;
+      position: absolute;
+      width: 100%;
+      z-index: -1; }
+  .datepicker .between-date .show-date {
+    background-color: #0568ae;
+    color: #FFFFFF !important; }
+    .datepicker .between-date .show-date:before {
+      background-color: #0568ae;
+      content: "";
+      display: block;
+      height: 26px;
+      left: 0;
+      position: absolute;
+      width: 100%;
+      z-index: -1; }
+  .datepicker .between-date:first-child .show-date:before {
+    background-color: #FFFFFF;
+    content: "";
+    height: 26px;
+    position: absolute;
+    left: 0;
+    width: 8px; }
+  .datepicker .end-date .show-date {
+    background-color: #0568ae;
+    color: #FFFFFF !important;
+    border-radius: 0 5px 5px 0; }
+    .datepicker .end-date .show-date:before {
+      background-color: #0568ae;
+      content: "";
+      display: block;
+      height: 26px;
+      left: -20px;
+      position: absolute;
+      width: 100%;
+      z-index: -1; }
+  .datepicker .end-date:first-child .show-date:after {
+    background-color: #FFFFFF;
+    content: "";
+    height: 26px;
+    position: absolute;
+    left: 0;
+    width: 8px; }
+  .datepicker .end-date:first-child .show-date::before {
+    background-color: #FFFFFF; }
+  .datepicker tr td.start-date:last-child .show-date:after {
+    background-color: #FFFFFF;
+    content: "";
+    height: 26px;
+    position: absolute;
+    right: 0;
+    width: 8px; }
+  .datepicker tr td.start-date:last-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker tr td.start-date:first-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker tr td.between-date:last-child .show-date:after {
+    background-color: #FFFFFF;
+    content: "";
+    height: 26px;
+    position: absolute;
+    right: 0;
+    width: 8px; }
+  .datepicker tr td.between-date:last-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker tr td.between-date:first-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker tr td.end-date:last-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker tr td.end-date:first-child:focus .show-date:after {
+    height: 30px;
+    width: 30px;
+    background-color: transparent; }
+  .datepicker th.datepicker-switch {
+    width: 198px;
+    font-size: 20px;
+    font-weight: normal;
+    cursor: default !important; }
+  .datepicker thead tr:first-child th {
+    cursor: pointer;
+    height: 60px;
+    line-height: 60px; }
+  .datepicker thead tr:first-child th.cw {
+    cursor: default;
+    background-color: transparent; }
+  .datepicker tfoot tr th {
+    cursor: pointer;
+    height: 60px;
+    line-height: 60px;
+    height: auto;
+    line-height: normal; }
+    .datepicker tfoot tr th li {
+      margin-bottom: 5px; }
+  .datepicker .prev {
+    color: transparent;
+    font-size: 0;
+    margin: 0 -1px -1px 0;
+    width: 46px; }
+    .datepicker .prev i {
+      color: #0568ae;
+      position: absolute;
+      font-size: 27px;
+      margin: 0;
+      top: 15px;
+      left: 8px; }
+  .datepicker .next {
+    color: transparent;
+    font-size: 0;
+    margin: 0 -1px -1px 0;
+    width: 46px; }
+    .datepicker .next i {
+      color: #0568ae;
+      position: absolute;
+      font-size: 27px;
+      margin: 0;
+      top: 15px;
+      right: 8px; }
+  .datepicker .cw {
+    font-size: 10px;
+    width: 12px;
+    padding: 0 2px 0 5px;
+    vertical-align: middle; }
+  .datepicker .due-date .show-date {
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    background-color: #cf2a2a;
+    border-radius: 5px;
+    color: #FFFFFF !important; }
+  .datepicker .day.active .show-date:after {
+    border: 2px solid #0568ae;
+    border-radius: 7px;
+    content: "";
+    display: block;
+    height: 30px;
+    left: 4px;
+    position: absolute;
+    top: 0;
+    width: 30px; }
+  .datepicker .day:focus .show-date:after {
+    border: 2px solid #0568ae;
+    border-radius: 7px;
+    content: "";
+    display: block;
+    height: 30px;
+    left: 4px;
+    position: absolute;
+    top: 0;
+    width: 30px;
+    height: 30px;
+    left: 4px;
+    top: 0;
+    width: 30px; }
+  .datepicker .due-date.disabled .show-date:after {
+    border: 2px solid #0568ae;
+    border-radius: 7px;
+    content: "";
+    display: block;
+    height: 30px;
+    left: 4px;
+    position: absolute;
+    top: 0;
+    width: 30px; }
+  .datepicker .day.due-date:focus .show-date:after {
+    height: 30px;
+    left: 4px;
+    top: 0;
+    width: 30px; }
+  .datepicker .due-date.old:after {
+    visibility: hidden; }
+  .datepicker .due-date.new:after {
+    visibility: hidden; }
+  .datepicker .due-date.active:after {
+    border-color: #FFFFFF; }
+  .datepicker .due-date.active.focused {
+    color: #0568ae !important; }
+    .datepicker .due-date.active.focused:after {
+      border-color: #cf2a2a !important; }
+  .datepicker .dow {
+    height: 24px;
+    width: 42px;
+    font-weight: normal;
+    position: relative;
+    overflow: hidden;
+    color: transparent;
+    letter-spacing: -6px;
+    margin: 0 -1px -1px 0; }
+    .datepicker .dow span[aria-hidden="true"] {
+      bottom: 0;
+      color: #5A5A5A;
+      display: block;
+      left: 1px;
+      letter-spacing: 0;
+      line-height: .9;
+      margin: 0 auto;
+      padding: 0;
+      position: relative;
+      width: 22px; }
+  .datepicker .calendar-legend {
+    margin-top: 3px;
+    margin-bottom: 20px; }
+    .datepicker .calendar-legend li {
+      font-size: 1.4rem;
+      font-weight: normal;
+      margin-bottom: 5px;
+      padding-left: 10px;
+      padding-top: 5px;
+      position: relative; }
+  .datepicker i.legend-due-date {
+    background-color: #cf2a2a;
+    border-radius: 5px;
+    height: 18px;
+    width: 18px;
+    margin-right: 8px;
+    vertical-align: middle;
+    display: inline-block; }
+  .datepicker i.legend-selected-date {
+    background-color: #FFFFFF;
+    border: 2px solid #0568ae;
+    border-radius: 5px;
+    height: 18px;
+    width: 18px;
+    margin-right: 8px;
+    vertical-align: middle;
+    display: inline-block; }
+  .datepicker i.legend-selectedisdue {
+    background-color: #FFFFFF;
+    border: 2px solid #0568ae;
+    border-radius: 5px;
+    display: inline-block;
+    height: 18px;
+    margin-right: 8px;
+    position: relative;
+    vertical-align: middle;
+    width: 18px; }
+    .datepicker i.legend-selectedisdue:after {
+      background-color: #cf2a2a;
+      border-radius: 3px;
+      content: "";
+      display: block;
+      height: 10px;
+      left: 2px;
+      position: absolute;
+      top: 2px;
+      width: 10px; }
+  .datepicker .text-left {
+    width: 100%; }
+  .datepicker .active.old {
+    background-color: #ededed !important;
+    color: #ededed !important; }
+
+.datepicker-inline {
+  width: 220px; }
+
+.datepicker.datepicker-rtl {
+  direction: rtl; }
+  .datepicker.datepicker-rtl td span {
+    float: right; }
+
+.datepicker-dropdown {
+  top: 0;
+  left: 0; }
+  .datepicker-dropdown:before {
+    content: " ";
+    display: inline-block;
+    border-left: 10px solid transparent;
+    border-right: 10px solid transparent;
+    border-bottom: 10px solid #d2d2d2;
+    border-top: 0;
+    border-bottom-color: rgba(0, 0, 0, 0.2);
+    position: absolute; }
+  .datepicker-dropdown:after {
+    content: " ";
+    display: inline-block;
+    border-left: 10px solid transparent;
+    border-right: 10px solid transparent;
+    border-bottom: 10px solid #fff;
+    border-top: 0;
+    position: absolute; }
+
+.datepicker-dropdown.datepicker-orient-left:before {
+  left: 16px; }
+
+.datepicker-dropdown.datepicker-orient-left:after {
+  left: 16px; }
+
+.datepicker-dropdown.datepicker-orient-right:before {
+  right: 16px; }
+
+.datepicker-dropdown.datepicker-orient-right:after {
+  right: 16px; }
+
+.datepicker-dropdown.datepicker-orient-top:before {
+  top: -10px; }
+
+.datepicker-dropdown.datepicker-orient-top:after {
+  top: -9px; }
+
+.datepicker-dropdown.datepicker-orient-bottom:before {
+  bottom: -7px;
+  border-bottom: 0;
+  border-top: 7px solid #959595; }
+
+.datepicker-dropdown.datepicker-orient-bottom:after {
+  bottom: -6px;
+  border-bottom: 0;
+  border-top: 6px solid #fff; }
+
+.datepicker.days div.datepicker-days {
+  display: block; }
+
+.datepicker.months div.datepicker-months {
+  display: block; }
+
+.datepicker.years div.datepicker-years {
+  display: block; }
+
+.show-date {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #0568ae;
+  height: 26px;
+  line-height: 26px;
+  margin: 4px auto 0;
+  width: 26px; }
+
+.input-group.date .input-group-addon i {
+  cursor: pointer;
+  width: 16px;
+  height: 16px; }
+
+.datepicker.dropdown-menu {
+  box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);
+  position: absolute;
+  top: 100%;
+  left: 0;
+  float: left;
+  display: none;
+  margin-top: 13px;
+  width: 290px;
+  list-style: none;
+  background-color: #FFFFFF;
+  border: 1px solid #d2d2d2;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 5px;
+  color: #333333;
+  font-size: 13px;
+  line-height: 1.428571429;
+  z-index: 1050; }
+  .datepicker.dropdown-menu th {
+    display: block;
+    float: left;
+    padding: 0;
+    position: relative; }
+  .datepicker.dropdown-menu td {
+    display: block;
+    float: left;
+    padding: 0;
+    position: relative; }
+
+.s {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: -62px 0; }
+
+.m {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: -5px 0; }
+
+.t {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: -19px 0; }
+
+.w {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: -34px 0; }
+
+.f {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: -49px 0; }
+
+.d {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: 0 0; }
+
+.l {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: 0 0; }
+
+.v {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: 0 0; }
+
+.j {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: #FFFFFF;
+  background-repeat: no-repeat;
+  background-position: 0 0; }
+
+.b2b-coachmark-label {
+  z-index: 1060;
+  opacity: 1;
+  cursor: not-allowed;
+  position: relative; }
+
+.b2b-coachmark-highlight {
+  border: 1px solid #d3d3d3;
+  cursor: default;
+  z-index: 1045;
+  opacity: 1;
+  background-color: #ffffff;
+  border-radius: 10px;
+  position: relative;
+  box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);
+  padding: 10px;
+  position: absolute; }
+
+.b2b-coachmark-highlight-mask {
+  z-index: 1100;
+  opacity: .1; }
+
+.b2b-coachmark-container {
+  border: 1px solid #cccccc;
+  width: 316px;
+  pointer-events: auto;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  font-size: 16px;
+  -webkit-transition: opacity .2s ease-out;
+  -moz-transition: opacity .2s ease-out;
+  transition: opacity .2s ease-out;
+  background: #fff;
+  border-radius: 20px;
+  box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.15);
+  color: #333;
+  line-height: 20px;
+  position: absolute;
+  top: 50px;
+  left: -97px;
+  display: block;
+  background-color: #ffffff;
+  z-index: 1050;
+  opacity: 1; }
+  .b2b-coachmark-container i.b2b-coachmark-caret {
+    position: absolute;
+    top: -12px;
+    left: 47%;
+    opacity: 1;
+    z-index: 1050; }
+  .b2b-coachmark-container i.b2b-coachmark-caret:before {
+    content: "";
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 12px solid #d3d3d3;
+    position: absolute;
+    top: -1px; }
+  .b2b-coachmark-container i.b2b-coachmark-caret:after {
+    content: "";
+    border-left: 12px solid transparent;
+    border-right: 12px solid transparent;
+    border-bottom: 12px solid #fff;
+    position: absolute; }
+  .b2b-coachmark-container .b2b-coachmark-header {
+    position: relative;
+    height: 47px;
+    overflow: hidden; }
+    .b2b-coachmark-container .b2b-coachmark-header .corner-button {
+      box-shadow: 0 -24px 0 0 #f2f2f2 inset;
+      height: 69px;
+      position: absolute;
+      right: -33px;
+      top: -38px;
+      transform: rotate(45deg);
+      width: 69px; }
+  .b2b-coachmark-container .b2b-coachmark-countlabel {
+    font-size: 12px;
+    font-family: "Omnes-ECOMP-W02, Arial";
+    color: #333333;
+    margin-left: 20px;
+    margin-top: 20px; }
+  .b2b-coachmark-container .b2b-coachmark-content {
+    padding: 0px 20px 20px 20px;
+    float: left; }
+    .b2b-coachmark-container .b2b-coachmark-content .icon-misc-dimmer {
+      font-size: 32px;
+      float: left;
+      margin-right: 10px;
+      width: 32px; }
+    .b2b-coachmark-container .b2b-coachmark-content .offscreen-text {
+      position: absolute;
+      left: -10000px;
+      top: auto;
+      width: 1px;
+      height: 1px;
+      overflow: hidden; }
+    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-content-header {
+      font-size: 16px;
+      color: #333333;
+      line-height: 18px;
+      float: left;
+      width: 220px; }
+    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-description {
+      font-size: 14px;
+      line-height: 18px;
+      color: #333333;
+      width: 100%;
+      float: left;
+      margin-top: 15px; }
+    .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group {
+      margin-top: 20px;
+      float: left;
+      text-align: right;
+      width: 100%; }
+      .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group .b2b-coachmark-link {
+        font-family: "Omnes-ECOMP-W02-Medium", Arial;
+        font-size: 15px;
+        color: #0574ac;
+        line-height: 18px;
+        margin-right: 20px; }
+      .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group button {
+        font-size: 15px;
+        margin: 0px; }
+
+.datepicker {
+  background-color: #fff;
+  padding: 0;
+  border-radius: 5px;
+  direction: ltr; }
+
+.datepicker-inline {
+  width: 220px; }
+
+.datepicker.datepicker-rtl {
+  direction: rtl; }
+
+.datepicker.datepicker-rtl td span {
+  float: right; }
+
+.datepicker-dropdown {
+  top: 0;
+  left: 0; }
+
+/* ARROW */
+.datepicker-dropdown:before {
+  content: " ";
+  display: inline-block;
+  border-left: 10px solid transparent;
+  border-right: 10px solid transparent;
+  border-bottom: 10px solid #d2d2d2;
+  border-top: 0;
+  border-bottom-color: rgba(0, 0, 0, 0.2);
+  position: absolute; }
+
+.datepicker-dropdown:after {
+  content: " ";
+  display: inline-block;
+  border-left: 10px solid transparent;
+  border-right: 10px solid transparent;
+  border-bottom: 10px solid #fff;
+  border-top: 0;
+  position: absolute; }
+
+.datepicker-dropdown.datepicker-orient-left:before,
+.datepicker-dropdown.datepicker-orient-left:after {
+  left: 16px; }
+
+.datepicker-dropdown.datepicker-orient-right:before,
+.datepicker-dropdown.datepicker-orient-right:after {
+  right: 16px; }
+
+.datepicker-dropdown.datepicker-orient-top:before {
+  top: -10px; }
+
+.datepicker-dropdown.datepicker-orient-top:after {
+  top: -9px; }
+
+.datepicker-dropdown.datepicker-orient-bottom:before {
+  bottom: -7px;
+  border-bottom: 0;
+  border-top: 7px solid #959595; }
+
+.datepicker-dropdown.datepicker-orient-bottom:after {
+  bottom: -6px;
+  border-bottom: 0;
+  border-top: 6px solid #fff; }
+
+.datepicker > div {
+  display: none; }
+
+.datepicker.days div.datepicker-days {
+  display: block; }
+
+.datepicker.months div.datepicker-months {
+  display: block; }
+
+.datepicker.years div.datepicker-years {
+  display: block; }
+
+.datepicker table {
+  -webkit-touch-callout: none;
+  -webkit-user-select: none;
+  -khtml-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  margin: 0 0 0 0; }
+
+.datepicker td,
+.datepicker th {
+  text-align: center;
+  display: block;
+  width: 30px;
+  height: 30px;
+  border: none; }
+
+.datepicker tbody :focus {
+  outline: none; }
+
+.datepicker td.day {
+  background-color: transparent;
+  color: #0568ae;
+  cursor: pointer;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 16px;
+  height: 34px;
+  line-height: 30rem;
+  margin: -2px -1px 0 0;
+  overflow: hidden;
+  text-align: center;
+  width: 42px; }
+
+.datepicker :focus {
+  outline: 1px dotted #000;
+  outline-offset: -2px; }
+
+.datepicker td.day.focused {
+  background: #ededed;
+  cursor: pointer; }
+
+.datepicker td.day.focused.active {
+  background-color: #ededed;
+  color: #0568ae; }
+
+.datepicker td.disabled,
+.datepicker td.disabled:hover {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  color: #5a5a5a;
+  cursor: default; }
+
+.datepicker td.today,
+.datepicker td.today:hover,
+.datepicker td.today.disabled {
+  color: #fff;
+  background-color: #0568ae; }
+
+.datepicker td.today.active,
+.datepicker td.today:active,
+.datepicker td.today:hover,
+.datepicker td.today:focus {
+  color: #fff;
+  background-color: #0568ae; }
+
+.datepicker td.today.active:hover {
+  color: #fff; }
+
+.datepicker td.selected,
+.datepicker td.selected:hover,
+.datepicker td.selected.disabled {
+  color: #ffffff;
+  background-color: #959595; }
+
+.datepicker td.active:not(.new),
+.datepicker td.active:hover:not(.new) {
+  color: #ffffff;
+  border-color: #357ebd; }
+
+.show-date {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #0568ae;
+  height: 26px;
+  line-height: 26px;
+  margin: 4px auto 0;
+  width: 26px; }
+
+.datepicker .start-date .show-date,
+.datepicker .between-date .show-date,
+.datepicker .end-date .show-date {
+  background-color: #0568ae;
+  color: #fff !important; }
+
+.datepicker .start-date .show-date {
+  border-radius: 5px 0 0 5px;
+  z-index: 1; }
+
+.datepicker .start-date .show-date:before {
+  background-color: #0568ae;
+  content: "";
+  display: block;
+  height: 26px;
+  left: 20px;
+  position: absolute;
+  width: 100%;
+  z-index: -1; }
+
+.datepicker .between-date .show-date:before {
+  background-color: #0568ae;
+  content: "";
+  display: block;
+  height: 26px;
+  left: 0;
+  position: absolute;
+  width: 100%;
+  z-index: -1; }
+
+.datepicker .end-date .show-date {
+  border-radius: 0 5px 5px 0; }
+
+.datepicker .end-date .show-date:before {
+  background-color: #0568ae;
+  content: "";
+  display: block;
+  height: 26px;
+  left: -20px;
+  position: absolute;
+  width: 100%;
+  z-index: -1; }
+
+.datepicker .between-date:first-child .show-date:before {
+  background-color: #fff;
+  content: "";
+  height: 26px;
+  position: absolute;
+  left: 0;
+  width: 8px; }
+
+.datepicker .end-date:first-child .show-date:after {
+  background-color: #fff;
+  content: "";
+  height: 26px;
+  position: absolute;
+  left: 0;
+  width: 8px; }
+
+.datepicker .end-date:first-child .show-date::before {
+  background-color: #fff; }
+
+.datepicker tr td.start-date:last-child .show-date:after,
+.datepicker tr td.between-date:last-child .show-date:after {
+  background-color: #fff;
+  content: "";
+  height: 26px;
+  position: absolute;
+  right: 0;
+  width: 8px; }
+
+.datepicker tr td.start-date:last-child:focus .show-date:after,
+.datepicker tr td.end-date:last-child:focus .show-date:after,
+.datepicker tr td.between-date:last-child:focus .show-date:after,
+.datepicker tr td.start-date:first-child:focus .show-date:after,
+.datepicker tr td.end-date:first-child:focus .show-date:after,
+.datepicker tr td.between-date:first-child:focus .show-date:after {
+  height: 30px;
+  width: 30px;
+  background-color: transparent; }
+
+.datepicker td.active:not(.new) .show-date,
+.datepicker td.active:hover:not(.new) .show-date {
+  color: #0568ae;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.datepicker td.disabled .show-date,
+.datepicker td.disabled:hover .show-date {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  color: #5a5a5a; }
+
+.datepicker td span {
+  display: block;
+  width: 23%;
+  height: 54px;
+  line-height: 54px;
+  float: left;
+  margin: 1%;
+  cursor: pointer;
+  border-radius: 4px; }
+
+.datepicker td span:hover {
+  background: #eeeeee; }
+
+.datepicker td span.disabled,
+.datepicker td span.disabled:hover {
+  background: none;
+  color: #5a5a5a;
+  cursor: default; }
+
+.datepicker td span.active,
+.datepicker td span.active:hover,
+.datepicker td span.active.disabled {
+  color: #ffffff;
+  background-color: #0568ae;
+  border-color: #357ebd; }
+
+.datepicker th.datepicker-switch {
+  width: 198px;
+  font-size: 20px;
+  font-weight: normal;
+  cursor: default !important; }
+
+.datepicker thead tr:first-child th,
+.datepicker tfoot tr th {
+  cursor: pointer;
+  height: 60px;
+  line-height: 60px; }
+
+.datepicker tfoot tr th {
+  height: auto;
+  line-height: normal; }
+
+.datepicker tfoot tr th li {
+  margin-bottom: 5px; }
+
+.datepicker .prev,
+.datepicker .next {
+  color: transparent;
+  font-size: 0;
+  margin: 0 -1px -1px 0;
+  width: 46px; }
+
+.datepicker .prev i,
+.datepicker .next i {
+  color: #0568ae;
+  position: absolute;
+  font-size: 27px;
+  margin: 0;
+  top: 15px; }
+
+.datepicker .prev i {
+  left: 8px; }
+
+.datepicker .next i {
+  right: 8px; }
+
+.datepicker .cw {
+  font-size: 10px;
+  width: 12px;
+  padding: 0 2px 0 5px;
+  vertical-align: middle; }
+
+.datepicker thead tr:first-child th.cw {
+  cursor: default;
+  background-color: transparent; }
+
+.input-group.date .input-group-addon i {
+  cursor: pointer;
+  width: 16px;
+  height: 16px; }
+
+.datepicker.dropdown-menu {
+  box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);
+  position: absolute;
+  top: 100%;
+  left: 0;
+  float: left;
+  display: none;
+  margin-top: 13px;
+  width: 290px;
+  list-style: none;
+  background-color: #ffffff;
+  border: 1px solid #d2d2d2;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 5px;
+  color: #333333;
+  font-size: 13px;
+  line-height: 1.428571429;
+  z-index: 1050; }
+
+.datepicker.dropdown-menu th,
+.datepicker.dropdown-menu td {
+  display: block;
+  float: left;
+  padding: 0;
+  position: relative; }
+
+.datepicker .due-date .show-date {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  background-color: #cf2a2a;
+  border-radius: 5px;
+  color: #fff !important; }
+
+.datepicker .day.active .show-date:after,
+.datepicker .day:focus .show-date:after,
+.datepicker .due-date.disabled .show-date:after {
+  border: 2px solid #0568ae;
+  border-radius: 7px;
+  content: "";
+  display: block;
+  height: 30px;
+  left: 4px;
+  position: absolute;
+  top: 0;
+  width: 30px; }
+
+.datepicker .day:focus .show-date:after {
+  height: 30px;
+  left: 4px;
+  top: 0;
+  width: 30px; }
+
+.datepicker .day.due-date:focus .show-date:after {
+  height: 30px;
+  left: 4px;
+  top: 0;
+  width: 30px; }
+
+.datepicker .due-date.old:after,
+.datepicker .due-date.new:after {
+  visibility: hidden; }
+
+.datepicker .due-date.active:after {
+  border-color: #fff; }
+
+.datepicker .due-date.active.focused {
+  color: #0568ae !important; }
+
+.datepicker .due-date.active.focused:after {
+  border-color: #cf2a2a !important; }
+
+.datepicker .dow {
+  height: 24px;
+  width: 42px;
+  font-weight: normal;
+  position: relative;
+  overflow: hidden;
+  color: transparent;
+  letter-spacing: -6px;
+  margin: 0 -1px -1px 0; }
+
+.datepicker .dow span[aria-hidden="true"] {
+  bottom: 0;
+  color: #5a5a5a;
+  display: block;
+  left: 1px;
+  letter-spacing: 0;
+  line-height: .9;
+  margin: 0 auto;
+  padding: 0;
+  position: relative;
+  width: 22px; }
+
+.datepicker .calendar-legend {
+  margin-top: 3px;
+  margin-bottom: 20px; }
+
+.datepicker .calendar-legend li {
+  font-size: 1.4rem;
+  font-weight: normal;
+  margin-bottom: 5px;
+  padding-left: 10px;
+  padding-top: 5px;
+  position: relative; }
+
+.datepicker i.legend-due-date {
+  background-color: #cf2a2a;
+  border-radius: 5px;
+  height: 18px;
+  width: 18px;
+  margin-right: 8px;
+  vertical-align: middle;
+  display: inline-block; }
+
+.datepicker i.legend-selected-date {
+  background-color: #fff;
+  border: 2px solid #0568ae;
+  border-radius: 5px;
+  height: 18px;
+  width: 18px;
+  margin-right: 8px;
+  vertical-align: middle;
+  display: inline-block; }
+
+.datepicker i.legend-selectedisdue {
+  background-color: #fff;
+  border: 2px solid #0568ae;
+  border-radius: 5px;
+  display: inline-block;
+  height: 18px;
+  margin-right: 8px;
+  position: relative;
+  vertical-align: middle;
+  width: 18px; }
+
+.datepicker i.legend-selectedisdue:after {
+  background-color: #cf2a2a;
+  border-radius: 3px;
+  content: "";
+  display: block;
+  height: 10px;
+  left: 2px;
+  position: absolute;
+  top: 2px;
+  width: 10px; }
+
+.datepicker .text-left {
+  width: 100%; }
+
+.datepicker .active.old {
+  background-color: #ededed !important;
+  color: #ededed !important; }
+
+.s,
+.m,
+.t,
+.w,
+.f,
+.d,
+.l,
+.v,
+.j {
+  display: block;
+  height: 20px;
+  width: 12px;
+  margin: 0 auto;
+  background-color: white;
+  background-repeat: no-repeat; }
+
+.s {
+  background-position: -62px 0; }
+
+.m {
+  background-position: -5px 0; }
+
+.t {
+  background-position: -19px 0; }
+
+.w {
+  background-position: -34px 0; }
+
+.f {
+  background-position: -49px 0; }
+
+/* spanish */
+.d {
+  background-position: 0 0; }
+
+.l {
+  background-position: 0 0; }
+
+.v {
+  background-position: 0 0; }
+
+.j {
+  background-position: 0 0; }
+
+/* remove focus outline when dropdown is opened */
+/*resolve blue focus outline over dropdown with error*/
+select {
+  margin-right: -1;
+  max-width: 100%;
+  height: 36px;
+  line-height: 25px;
+  width: auto;
+  background-color: #FFFFFF; }
+
+.selectWrap.disabled .icon-primary-down {
+  color: #767676; }
+
+.selectWrap.disabled input.awd-select {
+  z-index: 0;
+  padding: 10px 45px 10px 15px;
+  text-indent: 0; }
+
+.selectWrap.disabled button.awd-select {
+  z-index: 0;
+  text-indent: 15; }
+
+.selectWrap.disabled:after {
+  color: #5A5A5A;
+  cursor: not-allowed; }
+
+input.awd-select {
+  background-color: transparent;
+  border: 1px solid #d2d2d2;
+  border-radius: 6px;
+  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
+  color: #333333;
+  display: block;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  /*font-size: 1.6rem;*/
+  height: 36px;
+  line-height: 0;
+  margin-bottom: 0;
+  padding: 12px 45px 8px 0;
+  position: relative;
+  text-align: left;
+  top: 0;
+  width: 100%;
+  z-index: 10;
+  padding: 12px 45px 8px 15px;
+  user-select: none; }
+  input.awd-select:focus {
+    border-color: #0568ae !important; }
+
+button.awd-select {
+  background-color: transparent;
+  border: 1px solid #d2d2d2;
+  border-radius: 6px;
+  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
+  color: #333333;
+  display: block;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  /*font-size: 1.6rem;*/
+  height: 36px;
+  line-height: 36px;
+  margin-bottom: 0;
+  /*padding-right: 41px;*/
+  position: relative;
+  text-align: left;
+  top: 0;
+  width: 100%;
+  z-index: 10; }
+  button.awd-select:not(.large) {
+    text-indent: 15px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: clip;
+    text-overflow: ellipsis; }
+  button.awd-select img {
+    height: 26px;
+    margin-right: 7px;
+    margin-top: -10px;
+    position: relative;
+    top: 2px;
+    vertical-align: text-bottom; }
+  button.awd-select:focus {
+    border-color: #0568ae !important; }
+  button.awd-select i {
+    font-size: 23px;
+    position: absolute;
+    right: 33px;
+    top: 5px;
+    z-index: 1000; }
+
+button.awd-select.large {
+  align-items: center;
+  display: flex;
+  height: 60px;
+  line-height: 20px;
+  overflow: hidden;
+  padding-left: 70px;
+  vertical-align: middle; }
+  button.awd-select.large img {
+    height: 40px;
+    left: 20px;
+    position: absolute;
+    top: 20px;
+    width: 40px; }
+
+.selectWrap.large {
+  height: 60px; }
+  .selectWrap.large .awd-select-list-item {
+    align-items: center;
+    display: flex;
+    height: 60px;
+    line-height: 20px;
+    overflow: hidden;
+    padding-left: 70px;
+    vertical-align: middle; }
+    .selectWrap.large .awd-select-list-item img {
+      height: 40px;
+      left: 20px;
+      position: absolute;
+      top: 20px;
+      width: 40px;
+      top: 10px; }
+
+button.awd-select.active {
+  border-radius: 6px 6px 0 0; }
+  button.awd-select.active:focus {
+    border-color: #d2d2d2 !important; }
+
+input.awd-select.active {
+  border-radius: 6px 6px 0 0; }
+  input.awd-select.active:focus {
+    border-color: #d2d2d2 !important; }
+
+.selectWrapper {
+  position: relative; }
+
+span.selectWrap input[readonly]:focus {
+  color: transparent;
+  text-shadow: 0 0 0 #000; }
+
+.isIE.ds2-no-colors .awd-select:focus {
+  outline: 1px dashed transparent; }
+
+.awd-select-list {
+  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
+  border-radius: 0 0 6px 6px;
+  position: absolute;
+  border: 1px solid #d2d2d2;
+  border-top: 0;
+  padding: 0;
+  background-color: #f2f2f2;
+  z-index: 1000;
+  width: 100%;
+  max-height: 320px;
+  overflow-y: auto; }
+
+.awd-select-list-item {
+  cursor: pointer;
+  height: 100%;
+  min-height: 36px;
+  line-height: 38px;
+  overflow: hidden;
+  padding: 0 15px;
+  position: relative;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  z-index: 1000; }
+  .awd-select-list-item:hover {
+    cursor: pointer;
+    background-color: #d2d2d2;
+    outline: 1px dashed transparent; }
+  .awd-select-list-item:focus {
+    cursor: pointer;
+    background-color: #d2d2d2;
+    outline: 1px dashed transparent; }
+  .awd-select-list-item img {
+    margin-top: 0;
+    margin-right: 7px;
+    height: 26px;
+    width: 26px; }
+
+.selectWrap {
+  border-radius: 6px;
+  position: relative;
+  height: 36px;
+  line-height: 28px;
+  display: block;
+  margin: 0;
+  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+  background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }
+  .selectWrap:not(.large) .awd-select-list-item:first-child {
+    margin-top: 15px; }
+  .selectWrap:not(.large) .awd-select-list-item:last-child {
+    margin-bottom: 15px; }
+  .selectWrap .icon-primary-down {
+    font-size: 23px;
+    margin-top: -11px;
+    position: absolute;
+    right: 4px;
+    top: 50%; }
+  .selectWrap + [aria-expanded="true"] {
+    padding-bottom: 9px;
+    padding-top: 20px; }
+
+.awd-select-list-item[aria-selected="true"] {
+  background-color: #d2d2d2; }
+
+span input.awd-select {
+  width: 100%;
+  cursor: pointer;
+  text-overflow: ellipsis;
+  padding-right: 45px; }
+
+li.optgroup-wrapper {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  cursor: default !important;
+  padding: 0px 15px; }
+  li.optgroup-wrapper:first-child {
+    padding-top: 10px; }
+  li.optgroup-wrapper:hover {
+    background-color: #f2f2f2; }
+
+ul.optgroup {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  cursor: pointer !important;
+  margin: 0 -15px; }
+  ul.optgroup li {
+    padding: 0 0 0 33px; }
+
+label + .selectWrap {
+  margin-top: 4px; }
+
+.selectorModule {
+  border-radius: 6px;
+  position: relative;
+  height: 36px;
+  line-height: 28px;
+  display: block;
+  margin: 0;
+  background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+  background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }
+
+.group .selectWrap {
+  margin: 0 0 10px 0; }
+
+select.awd-select {
+  position: relative;
+  top: 0;
+  left: 0;
+  font-size: 16px;
+  z-index: 1010;
+  height: 33px;
+  min-width: 100%;
+  opacity: 0.01; }
+  select.awd-select > optgroup {
+    padding-left: 8px;
+    font-style: normal;
+    margin-top: 10px; }
+    select.awd-select > optgroup:first-child {
+      margin-top: 0; }
+    select.awd-select > optgroup > option {
+      padding-left: 8px; }
+  select.awd-select > option {
+    padding-left: 8px; }
+  select.awd-select + span {
+    background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+    background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
+    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0);
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 0;
+    display: block;
+    border: 1px solid #d2d2d2;
+    border-radius: 6px;
+    height: 35px;
+    line-height: 0;
+    padding: 18px 45px 15px 15px;
+    width: 100%;
+    font-size: 1.6rem;
+    padding-right: 45px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis; }
+    select.awd-select + span > i {
+      font-size: 23px;
+      position: absolute;
+      right: 33px;
+      top: 5px;
+      z-index: 1000; }
+      select.awd-select + span > i:before {
+        left: 1px;
+        position: absolute;
+        top: -1px; }
+  select.awd-select:focus + span {
+    border-color: #0568ae; }
+
+.isIE select.awd-select + span {
+  line-height: 1; }
+
+[data-default-option="true"] {
+  color: #767676 !important;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial; }
+
+.placeholdercolor {
+  color: #767676 !important;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial; }
+
+.filterTank button.awd-select {
+  border-color: #d2d2d2;
+  background-color: #333333;
+  color: #FFFFFF;
+  color: #333333; }
+  .filterTank button.awd-select:after {
+    background-color: #FFFFFF !important;
+    border-color: #d2d2d2; }
+
+.utility-bg button.awd-select {
+  border-color: #d2d2d2;
+  background-color: #333333;
+  color: #FFFFFF;
+  color: #333333; }
+  .utility-bg button.awd-select:after {
+    background-color: #FFFFFF !important;
+    border-color: #d2d2d2; }
+
+.utility-bg select.awd-select + span {
+  border-color: #d2d2d2;
+  border-color: #d2d2d2;
+  background-color: #333333;
+  background-color: #333333;
+  color: #FFFFFF;
+  color: #FFFFFF; }
+  .utility-bg select.awd-select + span:after {
+    background-color: #FFFFFF !important;
+    background-color: #FFFFFF !important;
+    border-color: #d2d2d2;
+    border-color: #d2d2d2; }
+
+.utility-bg select.awd-select:focus + span {
+  border-color: #d2d2d2;
+  border-color: #d2d2d2;
+  background-color: #333333;
+  background-color: #333333;
+  color: #FFFFFF;
+  color: #FFFFFF; }
+  .utility-bg select.awd-select:focus + span:after {
+    background-color: #FFFFFF !important;
+    background-color: #FFFFFF !important;
+    border-color: #d2d2d2;
+    border-color: #d2d2d2; }
+
+.utility-bg select.awd-select:hover + span {
+  border-color: #d2d2d2;
+  border-color: #d2d2d2;
+  background-color: #333333;
+  background-color: #333333;
+  color: #FFFFFF;
+  color: #FFFFFF; }
+  .utility-bg select.awd-select:hover + span:after {
+    background-color: #FFFFFF !important;
+    background-color: #FFFFFF !important;
+    border-color: #d2d2d2;
+    border-color: #d2d2d2; }
+
+input.awd-select[disabled] {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  input.awd-select[disabled] + span {
+    cursor: not-allowed;
+    border-color: #d2d2d2;
+    background-color: #d2d2d2;
+    background-image: none;
+    color: #5A5A5A; }
+
+button.awd-select[disabled] {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  button.awd-select[disabled]:after {
+    background-color: #d2d2d2 !important;
+    border-color: #d2d2d2; }
+
+select.awd-select[disabled] + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  select.awd-select[disabled] + span:after {
+    background-color: #d2d2d2 !important;
+    border-color: #d2d2d2; }
+
+select.awd-select[disabled]:focus + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+
+select.awd-select[disabled]:hover + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+
+input.awd-select[disabled="disabled"] {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  input.awd-select[disabled="disabled"] + span {
+    cursor: not-allowed;
+    border-color: #d2d2d2;
+    background-color: #d2d2d2;
+    background-image: none;
+    color: #5A5A5A; }
+
+select.awd-select[disabled="disabled"] + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  select.awd-select[disabled="disabled"] + span:after {
+    background-color: #d2d2d2 !important;
+    border-color: #d2d2d2; }
+
+select.awd-select[disabled="disabled"]:focus + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  select.awd-select[disabled="disabled"]:focus + span:after {
+    background-color: #d2d2d2 !important;
+    border-color: #d2d2d2; }
+
+select.awd-select[disabled="disabled"]:hover + span {
+  cursor: not-allowed;
+  border-color: #d2d2d2;
+  background-color: #d2d2d2;
+  background-image: none;
+  color: #5A5A5A; }
+  select.awd-select[disabled="disabled"]:hover + span:after {
+    background-color: #d2d2d2 !important;
+    border-color: #d2d2d2; }
+
+.ddexpand-wrapper > h2 {
+  margin-bottom: 11px; }
+  .ddexpand-wrapper > h2 + p {
+    margin-bottom: 4px; }
+
+.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .form-row {
+  margin-top: 11px; }
+
+.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .row + .row .form-row {
+  margin-top: 14px; }
+
+.modal .awd-select-list {
+  z-index: 1060 !important; }
+
+.form-row.error button.awd-select.active:focus {
+  border-color: #cf2a2a !important; }
+
+.form-row.error input.awd-select.active:focus {
+  border-color: #cf2a2a !important; }
+
+.awd-module-list .module-list-item[aria-selected="true"] {
+  background-color: #f2f2f2; }
+
+li.module-list-item[aria-selected="true"]:before {
+  color: #0568ae;
+  display: inline-block;
+  font-family: "icoControls" !important;
+  font-style: normal;
+  font-size: 20px;
+  font-weight: normal;
+  font-variant: normal;
+  height: 1em;
+  margin-right: 7px;
+  text-transform: none;
+  line-height: 1;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  position: relative;
+  speak: none;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  vertical-align: middle;
+  width: 1em;
+  content: "\e907";
+  box-sizing: border-box;
+  display: inline-block;
+  font-size: 2em;
+  height: 1em;
+  position: absolute;
+  top: 20px;
+  right: 0px;
+  vertical-align: middle;
+  width: 1em;
+  color: #007a3e; }
+
+@media (min-width: 768px) {
+  span[class*="large"] {
+    max-width: 370px; }
+  .large {
+    max-width: 370px; } }
+
+@media (max-width: 767px) {
+  .selectWrap.large:after {
+    right: 5px; }
+  .selectWrap.large .awd-select-list-item {
+    padding-right: 41px; }
+  .selectWrap + div > h4 {
+    margin-bottom: 0;
+    font-size: 16px; } }
+
+/**********************Dropdown Chrome scrolling fix start ********************/
+input.awd-select {
+  -webkit-user-select: text;
+  -moz-user-select: text;
+  -ms-user-select: text;
+  user-select: text; }
+
+input.awd-select.focused {
+  -webkit-user-select: none !important;
+  -moz-user-select: none !important;
+  -ms-user-select: none !important;
+  user-select: none !important; }
+
+/**********************Dropdown Chrome scrolling fix end ********************/
+.mpc-expanders {
+  border-bottom: 1px solid #e4e4e4;
+  border-top: 1px solid #e4e4e4; }
+
+.mpc-expanders + .mpc-expanders {
+  border-top: 0px; }
+
+.mpc-expanders .heading-medium {
+  margin-bottom: 10px; }
+
+.mpc-expanders .p-small {
+  margin-top: 5px; }
+
+.mpc-expander-body {
+  border-top: 1px solid #e4e4e4; }
+
+.mpc-expander-body .mpc-expanders {
+  border-bottom: 1px solid #e4e4e4;
+  border-top: 0; }
+
+.mpc-expander-body .mpc-expanders:last-child {
+  border-bottom: 0px; }
+
+.ddh-blue {
+  color: #0574ac; }
+
+.b2b-dragdrop {
+  border: 1px dashed #bbb;
+  border-radius: 5px;
+  padding: 0;
+  text-align: center;
+  color: #bbb;
+  position: relative; }
+
+.b2b-dragdrop-over {
+  background: #0091d9;
+  color: #006496; }
+  .b2b-dragdrop-over:after {
+    content: "Drop the file";
+    color: #fff;
+    width: 80px;
+    height: 20px;
+    overflow: hidden;
+    margin: auto;
+    position: absolute;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0; }
+
+.b2b-file-container {
+  position: relative;
+  overflow: hidden;
+  display: inline-table;
+  font-weight: 400; }
+  .b2b-file-container [type=file] {
+    position: absolute;
+    cursor: inherit;
+    display: block;
+    font-size: 0;
+    opacity: 0;
+    height: 0;
+    width: 0;
+    left: 0;
+    top: 0;
+    -ms-filter: "alpha(Opacity=0)"; }
+
+.b2b-upload-link {
+  color: #0568ae; }
+
+.b2b-flyout {
+  position: relative;
+  display: inline-block;
+  cursor: default; }
+
+.b2b-flyout-icon {
+  cursor: pointer; }
+  .b2b-flyout-icon:focus {
+    outline: thin dotted #666;
+    outline-offset: -1px; }
+
+.b2b-flyout .b2b-flyout-container {
+  border: 1px solid #d3d3d3;
+  width: 300px;
+  padding: 20px;
+  pointer-events: auto;
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+  font-size: 16px;
+  -webkit-transition: opacity .2s ease-out;
+  -moz-transition: opacity .2s ease-out;
+  transition: opacity .2s ease-out;
+  background: #fff;
+  border-radius: 6px;
+  box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);
+  color: #333;
+  line-height: 20px;
+  position: absolute;
+  top: 35px;
+  opacity: 0;
+  z-index: 1010;
+  display: none; }
+  .b2b-flyout .b2b-flyout-container.open-flyout {
+    opacity: 1;
+    display: block; }
+
+.b2b-flyout i.b2b-flyout-caret {
+  position: absolute;
+  top: -8px;
+  left: 50%;
+  opacity: 0;
+  z-index: 1011;
+  display: none; }
+  .b2b-flyout i.b2b-flyout-caret.open-flyout {
+    opacity: 1;
+    display: block; }
+  .b2b-flyout i.b2b-flyout-caret:before {
+    content: "";
+    border-left: 8px solid transparent;
+    border-right: 8px solid transparent;
+    border-bottom: 8px solid #d3d3d3;
+    position: absolute;
+    top: -1px; }
+  .b2b-flyout i.b2b-flyout-caret:after {
+    content: "";
+    border-left: 8px solid transparent;
+    border-right: 8px solid transparent;
+    border-bottom: 8px solid #fff;
+    position: absolute; }
+
+.b2b-flyout .b2b-flyout-container.b2b-flyout-left i.b2b-flyout-caret {
+  left: 16px !important; }
+
+.b2b-flyout .b2b-flyout-container.b2b-flyout-right i.b2b-flyout-caret {
+  left: inherit !important;
+  right: 30px !important; }
+
+.b2b-flyout .b2b-flyout-container.b2b-flyout-above {
+  box-shadow: 0 -5px 6px 0 rgba(0, 0, 0, 0.25); }
+  .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret {
+    top: auto;
+    bottom: 0px; }
+    .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:before {
+      top: auto;
+      bottom: -9px;
+      border-top: 8px solid #d3d3d3;
+      border-bottom: none; }
+    .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:after {
+      border-top: 8px solid #fff;
+      border-bottom: none; }
+
+.b2b-flyout .b2b-flyout-container.b2b-flyout-centerLeft i.b2b-flyout-caret {
+  left: inherit !important;
+  right: -7px !important;
+  top: 8px;
+  transform: rotate(90deg); }
+
+.b2b-flyout .b2b-flyout-container.b2b-flyout-centerRight i.b2b-flyout-caret {
+  left: -8px !important;
+  top: 296px;
+  transform: rotate(-90deg); }
+
+.b2b-flyout .buttons-group {
+  margin-top: 20px; }
+  .b2b-flyout .buttons-group .cta-button-group {
+    width: 100%;
+    border-top: 1px solid #ccc;
+    padding: 20px 0 0; }
+    .b2b-flyout .buttons-group .cta-button-group button {
+      margin-bottom: 0; }
+
+.b2b-flyout .heading {
+  font-size: 20px;
+  margin-bottom: 10px; }
+
+.b2b-flyout .body-text {
+  font-size: 14px;
+  margin-bottom: 30px; }
+
+.b2b-footer-wrapper {
+  width: 100%;
+  background-color: #222; }
+
+.b2b-footer-container {
+  width: 980px;
+  margin: 0 auto;
+  padding-top: 15px; }
+  .b2b-footer-container .footer-columns {
+    display: inline-block;
+    text-align: left;
+    vertical-align: top; }
+    .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {
+      padding-top: 30px; }
+    .b2b-footer-container .footer-columns.three-column {
+      width: 33.3%;
+      padding-left: 75px; }
+    .b2b-footer-container .footer-columns.four-column {
+      width: 25%;
+      padding-left: 75px; }
+    .b2b-footer-container .footer-columns.five-column {
+      width: 20%; }
+    .b2b-footer-container .footer-columns .b2b-footer-header {
+      color: #009fdb;
+      font-size: 18px;
+      font-style: normal;
+      font-family: "Omnes-ECOMP-W02-Medium", Arial;
+      line-height: 23.9px;
+      margin: 0; }
+    .b2b-footer-container .footer-columns li {
+      padding: 7.5px 0; }
+    .b2b-footer-container .footer-columns ul li:first-child {
+      padding-top: 15px; }
+    .b2b-footer-container .footer-columns li a {
+      color: #fff;
+      font-size: 16px;
+      font-family: "Omnes-ECOMP-W02", Arial; }
+  .b2b-footer-container .footer-nav-content {
+    padding-bottom: 10px; }
+    .b2b-footer-container .footer-nav-content li {
+      display: inline;
+      font-size: 14px;
+      color: #fff;
+      vertical-align: middle; }
+      .b2b-footer-container .footer-nav-content li a {
+        color: #fff;
+        font-size: 14px;
+        vertical-align: middle;
+        margin-right: 5px;
+        font-family: "Omnes-ECOMP-W02", Arial; }
+
+.b2b-footer-wrapper .b2b-footer-container hr {
+  background: #d2d2d2;
+  margin-top: 50px; }
+
+.b2b-footer-wrapper .divider-bottom-footer {
+  padding: 45px 0 50px 0; }
+
+.b2b-footer-wrapper .footerLogo {
+  margin: 10px 0 0 0px;
+  vertical-align: top; }
+  .b2b-footer-wrapper .footerLogo div {
+    display: inline-block; }
+  .b2b-footer-wrapper .footerLogo .icon-primary-att-globe {
+    font-size: 40px; }
+  .b2b-footer-wrapper .footerLogo .logo-title {
+    color: #fff;
+    margin-left: 10px;
+    display: inline-block;
+    font-size: 26px;
+    margin-top: 0px; }
+
+.b2b-footer-wrapper .copyright-text {
+  color: #fff;
+  font-size: 11px;
+  text-align: left;
+  font-family: "Omnes-ECOMP-W02", Arial; }
+  .b2b-footer-wrapper .copyright-text a {
+    color: #fff;
+    text-decoration: underline;
+    display: inline-block; }
+    .b2b-footer-wrapper .copyright-text a:hover {
+      text-decoration: none; }
+
+@media (max-width: 768px) {
+  .b2b-footer-wrapper {
+    padding: 0 15px; }
+  .b2b-footer-container {
+    width: 100%; }
+    .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {
+      width: 50%; }
+  .b2b-footer-wrapper .divider-bottom-footer {
+    padding-top: 15px; }
+    .b2b-footer-wrapper .divider-bottom-footer .footer-links {
+      width: 100%; }
+  .b2b-footer-wrapper .footerLogo {
+    margin: 30px 0 0 0; }
+    .b2b-footer-wrapper .footerLogo .footer-logo {
+      margin: 0;
+      padding-left: 10px; } }
+
+.b2b-header-tabs {
+  background-color: #222;
+  width: 100%;
+  position: relative;
+  height: 45px; }
+  .b2b-header-tabs .icon-primary-att-globe {
+    color: #0568ae; }
+  .b2b-header-tabs a:focus {
+    border: 1px solid white; }
+  .b2b-header-tabs .header__items {
+    width: 980px;
+    margin: 0 auto;
+    display: block;
+    list-style: none;
+    padding: 6px 0px 0px 0px;
+    border-spacing: 30px 0; }
+  .b2b-header-tabs .header__item {
+    display: inline-block;
+    text-align: left;
+    width: auto;
+    font-size: 16px;
+    font-family: "Omnes-ECOMP-W02, Arial";
+    cursor: pointer;
+    padding: 5px 15px;
+    color: #fff; }
+    .b2b-header-tabs .header__item.b2b-headermenu {
+      padding: 0; }
+      .b2b-header-tabs .header__item.b2b-headermenu:last-child {
+        background: none; }
+      .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
+        color: #fff;
+        text-decoration: none;
+        display: inline-block;
+        padding: 5px 15px; }
+    .b2b-header-tabs .header__item.active {
+      background-color: #fff;
+      border-radius: 2px;
+      border-bottom-left-radius: 0;
+      border-bottom-right-radius: 0; }
+      .b2b-header-tabs .header__item.active a.menu__item {
+        color: #0578ae; }
+  .b2b-header-tabs li:focus {
+    outline: 2px solid #0578ae; }
+  .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
+    background-color: #fff;
+    position: absolute;
+    width: 100%;
+    left: 0;
+    top: 42px;
+    border-bottom: solid 1px #ccc;
+    -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+    -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+    display: none;
+    z-index: 111; }
+  .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
+    background-color: #fff;
+    width: 980px;
+    margin: 0 auto; }
+  .b2b-header-tabs .header__item.active .header-secondary-wrapper {
+    display: block; }
+  .b2b-header-tabs .header-secondary .header-subitem {
+    display: inline-block;
+    width: auto;
+    margin: 0 15px; }
+    .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {
+      display: block; }
+    .b2b-header-tabs .header-secondary .header-subitem a.menu__item {
+      display: inline-block;
+      padding: 15px 0;
+      color: #333; }
+      .b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {
+        color: #0578ae; }
+
+/** Secondary Menu **/
+.b2b-labelhide {
+  position: absolute;
+  clip: rect(1px, 1px, 1px, 1px); }
+
+/** Tertiary Level Menu **/
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
+  position: absolute;
+  z-index: 111;
+  top: 25px; }
+  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after, .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
+    content: '';
+    border-left: 8px solid transparent;
+    border-right: 8px solid transparent;
+    position: absolute;
+    -webkit-transition: left .2s ease-out;
+    -moz-transition: left .2s ease-out;
+    transition: left .2s ease-out; }
+  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {
+    border-bottom: 8px solid #fff;
+    top: 10px; }
+  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
+    border-bottom: 8px solid #ccc;
+    top: 9px; }
+
+.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
+  border-top: solid 1px #ccc; }
+
+.b2b-header-tabs .header-tertiary:after {
+  content: '';
+  clear: both;
+  display: block; }
+
+.b2b-header-tabs .header-tertiary li {
+  display: inline-block;
+  padding: 0;
+  float: left; }
+  .b2b-header-tabs .header-tertiary li a {
+    color: #333;
+    display: block;
+    padding: 10px 15px; }
+  .b2b-header-tabs .header-tertiary li label {
+    text-align: left;
+    display: block;
+    font-size: 16px;
+    font-weight: bold;
+    color: #857B7B;
+    padding: 15px 0 0 15px; }
+
+.b2b-header-tabs .header__item.skip {
+  padding: 0;
+  display: inline-block;
+  cursor: default !important; }
+  .b2b-header-tabs .header__item.skip a {
+    color: transparent;
+    font-size: 12px;
+    line-height: 15px;
+    text-decoration: none; }
+    .b2b-header-tabs .header__item.skip a:focus {
+      color: #fff;
+      outline: 2px solid #0578ae; }
+
+.b2b-header-tabs .selectWrap {
+  min-width: 150px; }
+  .b2b-header-tabs .selectWrap button.awd-select {
+    height: 30px;
+    line-height: 31px;
+    font-size: 1rem;
+    display: inline-block; }
+  .b2b-header-tabs .selectWrap .awd-select-list {
+    background-color: #fff;
+    color: #333;
+    -webkit-transition: opacity .2s ease-out;
+    -moz-transition: opacity .2s ease-out;
+    transition: opacity .2s ease-out;
+    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }
+
+@media (max-width: 768px) {
+  .b2b-header-tabs {
+    padding: 0 15px; }
+    .b2b-header-tabs .header__items, .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
+      width: 100%; }
+    .b2b-header-tabs .header__item {
+      padding: 5px 0; }
+    .b2b-header-tabs .globe-text {
+      display: none; }
+    .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
+      padding: 5px 7px 9px 7px; }
+    .b2b-header-tabs .header__item .header-tertiary-wrapper {
+      top: 30px; }
+    .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
+      top: 14px; }
+    .b2b-header-tabs .header__item .header-secondary-wrapper {
+      top: 45px; }
+    .b2b-header-tabs .header__item.profile {
+      padding-left: 15px;
+      float: none; } }
+
+/************* Header - Start *************/
+.b2b-header-tabs {
+  background-color: #222;
+  width: 100%;
+  position: relative;
+  height: 45px; }
+
+.b2b-header-tabs .icon-primary-primary-att-globe {
+  color: #0568ae;
+  font-size: 34px;
+  bottom: 1px; }
+
+/*
+ *TODO: delete below .icon-primary-att-globel will not be used 
+ *instead the one above, icon-primary-primary-att-globe not available here
+ */
+.b2b-header-tabs .icon-primary-att-globe {
+  color: #0568ae;
+  font-size: 34px; }
+
+.b2b-header-tabs .globe-text {
+  margin-left: 20px;
+  font-size: 2rem; }
+
+.b2b-header-tabs .header__items {
+  width: 980px;
+  margin: 0 auto;
+  display: block;
+  list-style: none;
+  border-spacing: 30px 0;
+  padding: 3px 0px 0px 0px; }
+
+.b2b-header-tabs .header__item {
+  display: inline-block;
+  text-align: left;
+  width: auto;
+  font-size: 14px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  cursor: pointer;
+  padding: 0 15px 4px 15px;
+  /*margin-top:-3px;*/
+  color: #fff; }
+
+.b2b-header-tabs .header__item.b2b-headermenu {
+  padding: 0; }
+
+.b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
+  color: #fff;
+  text-decoration: none;
+  display: inline-block;
+  padding: 8px 15px 12px 15px;
+  font-size: 16px; }
+
+.b2b-header-tabs .header__item.active {
+  background-color: #fff;
+  border-radius: 2px;
+  border-bottom-left-radius: 0;
+  border-bottom-right-radius: 0; }
+
+.b2b-header-tabs .header__item.active a.menu__item {
+  color: #0578ae; }
+
+.b2b-header-tabs li:focus {
+  outline: 2px solid #0578ae; }
+
+/** profile pop Over **/
+.b2b-header-tabs .header__item.profile {
+  position: relative;
+  float: right; }
+
+/** Secondary Menu **/
+.b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
+  background-color: #fff;
+  position: absolute;
+  width: 100%;
+  left: 0;
+  top: 42px;
+  border-bottom: solid 1px #ccc;
+  -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+  -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
+  display: none;
+  z-index: 111; }
+
+.b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
+  background-color: #fff;
+  width: 980px;
+  margin: 0 auto; }
+
+.b2b-header-tabs .header__item.active .header-secondary-wrapper,
+.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {
+  display: block; }
+
+.b2b-header-tabs .header-secondary .header-subitem {
+  display: inline-block;
+  width: auto;
+  margin: 0 15px; }
+
+.b2b-header-tabs .header-secondary .header-subitem a.menu__item {
+  display: inline-block;
+  padding: 15px 0;
+  color: #333;
+  font-size: 14px; }
+
+.b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {
+  color: #0578ae; }
+
+.b2b-label-hide {
+  position: absolute;
+  clip: rect(1px, 1px, 1px, 1px); }
+
+/** Tertiary Level Menu **/
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after,
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
+  content: '';
+  border-left: 8px solid transparent;
+  border-right: 8px solid transparent;
+  position: absolute;
+  -webkit-transition: left .2s ease-out;
+  -moz-transition: left .2s ease-out;
+  transition: left .2s ease-out; }
+
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
+  position: absolute;
+  z-index: 111;
+  top: 25px; }
+
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {
+  border-bottom: 8px solid #fff;
+  top: 10px; }
+
+.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
+  border-bottom: 8px solid #ccc;
+  top: 9px; }
+
+/** Tertiary Level Menu **/
+.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
+  border-top: solid 1px #ccc; }
+
+.b2b-header-tabs .header-tertiary:after {
+  content: '';
+  clear: both;
+  display: block; }
+
+.b2b-header-tabs .header-tertiary li {
+  display: inline-block;
+  padding: 0;
+  float: left; }
+
+.b2b-header-tabs .header-tertiary li a {
+  color: #333;
+  display: block;
+  padding: 7px 15px;
+  max-width: 228px; }
+
+.b2b-header-tabs .header-tertiary li label {
+  text-align: left;
+  display: block;
+  font-size: 14px !important;
+  font-weight: bold;
+  color: #857B7B;
+  padding: 15px 0 0 15px; }
+
+/** Quarternary Level Menu **/
+.b2b-header-tabs .header-quarternary {
+  width: 100%;
+  float: left; }
+
+.b2b-header-tabs .header-quarternary li {
+  padding-left: 15px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  display: none; }
+
+.b2b-header-tabs .header-quarternary li.active {
+  display: block; }
+
+.b2b-header-tabs .header-quarternary li a {
+  color: #666666;
+  font-size: 14px;
+  padding: 0px 10px 10px 10px; }
+
+/** Skip Navigation**/
+.b2b-header-tabs .header__item.skip {
+  padding: 0;
+  display: inline-block;
+  cursor: default !important; }
+
+.b2b-header-tabs .header__item.skip a {
+  color: transparent;
+  font-size: 12px;
+  line-height: 15px;
+  text-decoration: none; }
+
+.b2b-header-tabs .header__item.skip a:focus {
+  color: #fff;
+  outline: 2px solid #0578ae; }
+
+/** Dropdown css inside Header ****/
+.b2b-header-tabs .selectWrap {
+  min-width: 150px; }
+
+.b2b-header-tabs .selectWrap button.awd-select, .b2b-header-tabs .selectWrap input.awd-select {
+  height: 36px;
+  line-height: 8px;
+  font-size: 1rem;
+  display: inline-block; }
+
+.b2b-header-tabs .selectWrap .awd-select-list {
+  background-color: #fff;
+  color: #333;
+  -webkit-transition: opacity .2s ease-out;
+  -moz-transition: opacity .2s ease-out;
+  transition: opacity .2s ease-out;
+  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }
+
+/*
+ * responsive header media queries
+ */
+@media screen and (max-width: 1100px) {
+  .b2b-header-tabs .globe-text {
+    display: none; }
+  .b2b-header-tabs .header__item.profile {
+    padding-left: 15px;
+    float: none; }
+  .b2b-header-tabs .header__items {
+    padding-top: 0px; } }
+
+@media screen and (max-width: 950px) {
+  .header__item.profile {
+    top: 20px; }
+  .b2b-header-tabs {
+    height: 90px; }
+  .selectWrap {
+    bottom: 15px; }
+  .b2b-header-tabs .header__items {
+    padding-top: 25px; }
+  .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
+    top: 80px; }
+  .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
+    top: 35px; }
+  .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
+    padding-bottom: 30px; }
+  .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
+    margin-top: -28px; } }
+
+/*************** Header - END ******************/
+.hp-container {
+  display: block;
+  max-width: 408px; }
+  .hp-container i:focus {
+    outline: thin dotted #666; }
+  .hp-container .icon-misc-pen {
+    cursor: pointer; }
+  .hp-container .icon-misc-trash {
+    cursor: pointer; }
+
+.hp-selected {
+  border-bottom: 1px solid #ccc;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 16px;
+  padding-bottom: 16px; }
+  .hp-selected .selected-days {
+    padding-bottom: 16px; }
+    .hp-selected .selected-days .day {
+      padding-top: 10px;
+      float: left; }
+
+.hp-checkbox {
+  padding-top: 20px;
+  margin: 16px auto 0 auto; }
+  .hp-checkbox label {
+    position: relative;
+    width: 20px;
+    margin-right: 34px; }
+    .hp-checkbox label span {
+      position: absolute;
+      top: -20px;
+      left: 0px;
+      margin-left: 0px; }
+
+.hp-dropdowns {
+  margin-top: 15px;
+  display: flex;
+  display: -webkit-flex;
+  display: -ms-flexbox; }
+
+.hp-buttons {
+  margin-top: 20px;
+  display: flex;
+  display: -webkit-flex;
+  display: -ms-flexbox; }
+
+.hp-dropdowns .radio-buttons {
+  margin-top: 30px; }
+  .hp-dropdowns .radio-buttons .radio {
+    margin-right: 15px; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02";
+  src: url("fonts/Omnes_ATTW02.eot");
+  src: url("fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02.woff") format("woff"), url("fonts/Omnes_ATTW02.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Medium";
+  src: url("fonts/Omnes_ATTW02Medium.eot");
+  src: url("fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Medium.woff") format("woff"), url("fonts/Omnes_ATTW02Medium.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Italic";
+  src: url("fonts/Omnes_ATTW02Italic.eot");
+  src: url("fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Italic.woff") format("woff"), url("fonts/Omnes_ATTW02Italic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Light";
+  src: url("fonts/Omnes_ATTW02Light.eot");
+  src: url("fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Light.woff") format("woff"), url("fonts/Omnes_ATTW02Light.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Bold";
+  src: url("fonts/Omnes_ATTW02Bold.eot");
+  src: url("fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02Bold.woff") format("woff"), url("fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("fonts/Omnes_ATTW02Bold.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Light-Italic";
+  src: url("fonts/Omnes_ATTW02LightItalic.eot");
+  src: url("fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Medium-Italic";
+  src: url("fonts/Omnes_ATTW02MediumItalic.eot");
+  src: url("fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+@font-face {
+  font-family: "Omnes-ECOMP-W02-Bold-Italic";
+  src: url("fonts/Omnes_ATTW02BoldItalic.eot");
+  src: url("fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");
+  font-weight: normal;
+  font-style: normal; }
+
+/* TODO: Build a reference page for these classes */
+.font-regular {
+  font-family: "Omnes-ECOMP-W02", Arial !important; }
+
+.font-light {
+  font-family: "Omnes-ECOMP-W02-Light", Arial !important; }
+
+.font-italic {
+  font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }
+
+.font-light-italic {
+  font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }
+
+.font-medium {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }
+
+.font-medium-italic {
+  font-family: "Omnes-ECOMP-W02-Medium-Italic", Arial !important; }
+
+.font-reset {
+  font-style: normal;
+  font-variant: normal;
+  font-weight: normal;
+  text-transform: none; }
+
+.b2b-nav-menu {
+  background-color: #efefef;
+  border: 1px solid #efefef;
+  width: 230px;
+  font-size: 1.4rem; }
+
+.b2b-subnav-container > ul {
+  padding: 0px; }
+
+.b2b-subnav-content {
+  margin: 0;
+  margin-bottom: 10px; }
+
+.b2b-subnav-content > li {
+  border-bottom: 1px solid #999999;
+  position: relative;
+  cursor: pointer; }
+
+.b2b-subnav-content > li > a {
+  text-decoration: none;
+  line-height: 18px;
+  display: block;
+  padding: 10px; }
+
+.b2b-subnav-content > li > a.expand {
+  color: #333; }
+
+.b2b-subnav-content > li ul {
+  overflow: hidden;
+  max-height: 0;
+  transition-duration: 0.5s;
+  transition-timing-function: cubic-bezier(0, 1, 0.5, 1); }
+
+.b2b-subnav-content > li ul.expand {
+  transition-duration: 0.7s;
+  transition-timing-function: ease-in-out;
+  max-height: 1000px;
+  overflow: hidden; }
+
+.b2b-subnav-content > li > a:focus, .b2b-subnav-content > li ul > li > a:focus {
+  outline: thin dotted #666; }
+
+.b2b-subnav-content > li ul > li > a {
+  line-height: 18px;
+  padding: 8px 0;
+  display: block;
+  outline-offset: -4px;
+  padding-left: 10px; }
+
+.b2b-icon-primary-plus-minus {
+  display: inline-block;
+  height: 20px;
+  margin-right: 10px;
+  padding: 0;
+  position: absolute;
+  right: 0px;
+  top: 10px;
+  vertical-align: middle;
+  width: 20px; }
+
+@media (min-width: 320px) and (max-width: 767px) {
+  .b2b-nav-menu {
+    background-color: #fff;
+    border: 1px solid white;
+    width: 100%; }
+  .b2b-subnav-content > li {
+    padding-left: 10px; }
+  .b2b-subnav-container > ul:first-child {
+    border-top: 1px solid #999; }
+  .b2b-icon-primary-plus-minus {
+    right: 10px; }
+  .b2b-subnav-content > li li > a.active {
+    color: #0574ac;
+    text-decoration: none;
+    font-family: "Omnes-ECOMP-W02", Arial; } }
+
+.b2b-list-box-item {
+  white-space: nowrap;
+  margin: 1px;
+  border: 1px solid transparent;
+  outline: none;
+  visibility: inherit;
+  display: inherit;
+  text-align: left;
+  overflow: hidden;
+  cursor: pointer;
+  padding: 5px 0 5px;
+  padding-left: 15px;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none; }
+  .b2b-list-box-item:focus {
+    border: 2px solid #5e8cb3; }
+
+.b2b-list-box-item--selected {
+  background-color: #cfdde9; }
+
+.btn.disabled[ddh-load-button] {
+  line-height: 46px;
+  padding: 0 19px 0 18px; }
+
+.btn.disabled[ddh-load-button] {
+  color: #666666; }
+
+.icon-primary-spinner-ddh.large {
+  height: 50px;
+  width: 50px; }
+
+.icon-primary-spinner-ddh.small {
+  height: 30px;
+  width: 30px; }
+
+.icon-primary-spinner-ddh {
+  -webkit-animation: 1s linear infinite spinner;
+  animation: 1s linear infinite spinner;
+  background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgaWQ9InN2Zy1zcGlubmVyIiB4PSIwcHgiIHk9IjBweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CiAgIDxwYXRoIGZpbGw9IiNGNUY1RjUiIGQ9Ik0xOCAzNkM4LjEgMzYgMCAyNy45IDAgMThTOC4xIDAgMTggMHMxOCA4LjEgMTggMTgtOC4xIDE4LTE4IDE4em0wLTMxLjVjLTcuNSAwLTEzLjUgNi0xMy41IDEzLjVTMTAuNiAzMS41IDE4IDMxLjVjNy41IDAgMTMuNS02LjEgMTMuNS0xMy41IDAtNy41LTYtMTMuNS0xMy41LTEzLjV6Ii8+CiAgIDxwYXRoIGZpbGw9IiMwNTY4QUUiIGlkPSJzcGlubmVyIiBkPSJNMzAuNyA1LjNsLTMuMSAzLjJjMi40IDIuNCAzLjkgNS44IDMuOSA5LjUgMCA3LjQtNi4xIDEzLjUtMTMuNSAxMy41UzQuNSAyNS40IDQuNSAxOCAxMC42IDQuNSAxOCA0LjVWMEM4LjEgMCAwIDguMSAwIDE4czguMSAxOCAxOCAxOCAxOC04LjEgMTgtMThjMC01LTItOS41LTUuMy0xMi43eiIgdHJhbnNmb3JtPSIiPiAgICAgIAogICA8L3BhdGg+Cjwvc3ZnPg==); }
+
+.btn-small .icon-primary-spinner-ddh {
+  height: 30px !important;
+  width: 30px !important; }
+
+.btn-small .icon-primary-spinner {
+  height: 30px;
+  width: 30px; }
+
+.load-backdrop {
+  position: absolute;
+  top: 50%;
+  left: 50%; }
+
+.body.styled-by-modal {
+  position: fixed; }
+
+.b2b-modal-backdrop {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  z-index: -1; }
+
+.b2b-modal-backdrop.fade {
+  background-color: #000;
+  opacity: 0;
+  filter: alpha(opacity=0);
+  transition: all 0.3s linear 0s; }
+
+.b2b-modal-backdrop.fade.in {
+  z-index: 1040;
+  opacity: 0.7;
+  filter: alpha(opacity=70);
+  background-color: #000;
+  transition: opacity 0.3s linear 0s; }
+
+.modalwrapper {
+  height: 100%;
+  width: 100%;
+  left: 0;
+  overflow-y: hidden;
+  position: absolute;
+  right: 0;
+  padding: 20px;
+  top: 0;
+  z-index: -1; }
+
+.modalwrapper.active {
+  z-index: 1050;
+  overflow-y: auto; }
+
+.modal {
+  background-clip: padding-box;
+  background-color: #ffffff;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: 8px;
+  box-shadow: 0 3px 5px 1px rgba(0, 0, 0, 0.4);
+  margin: 0 auto;
+  /*margin-bottom:10%;*/
+  outline: medium none;
+  /*position: absolute;*/
+  height: 0;
+  min-height: 150px;
+  overflow: hidden;
+  /*top: 10%;*/
+  width: 100%;
+  z-index: -1; }
+
+.modalwrapper.modal-docked .modal {
+  max-height: 80%;
+  height: 80%;
+  overflow: hidden;
+  top: 0; }
+
+.modal.fade.in {
+  position: relative;
+  height: auto;
+  overflow: auto;
+  top: 10%;
+  z-index: 1060;
+  transition: opacity .5s linear 0s; }
+
+.modal.fade.in.modal-landscape {
+  overflow-y: auto; }
+
+.modal.fade {
+  transition: opacity .5s linear 0s; }
+
+.fade.in {
+  opacity: 1; }
+
+.fade {
+  opacity: 0; }
+
+.b2b-modal-header {
+  align-items: center;
+  border-radius: 8px 8px 0 0;
+  display: flex;
+  min-height: 60px;
+  overflow: hidden;
+  padding: 30px 46px 30px 30px;
+  position: relative; }
+
+.b2b-modal-header > h2 {
+  line-height: 1;
+  margin: 0;
+  padding: 0; }
+
+.modal-header-portrait {
+  -webkit-overflow-scrolling: auto; }
+
+.modal-header-landscape {
+  -webkit-overflow-scrolling: auto; }
+
+.b2b-modal-body {
+  -webkit-overflow-scrolling: touch;
+  padding: 0 30px 20px;
+  position: relative;
+  width: auto; }
+
+.b2b-modal-body:focus {
+  outline: 1px dotted #333333; }
+
+.modal-form {
+  margin-bottom: 0; }
+
+.b2b-modal-footer {
+  background-color: #fff;
+  width: 100%;
+  padding: 0 30px;
+  border-radius: 0;
+  position: absolute;
+  bottom: 0; }
+
+:not(.modal-docked) .b2b-modal-footer {
+  position: relative; }
+
+.modal-docked .b2b-modal-footer {
+  border-top: 1px solid #d2d2d2; }
+
+.modal-landscape .b2b-modal-footer {
+  position: relative; }
+
+.b2b-modal-footer .cta-button-group {
+  display: flex;
+  justify-content: flex-end;
+  padding: 20px 0 5px;
+  width: 100%; }
+
+.b2b-modal-footer .cta-button-group .btn {
+  margin-left: auto;
+  margin-right: auto;
+  float: right;
+  margin-left: 10px; }
+
+.b2b-modal-footer .cta-button-group .btn + .btn {
+  margin-right: 0 !important; }
+
+[class*="modal-"] {
+  width: 100%; }
+
+.modal-small {
+  max-width: 420px; }
+
+.modal-medium {
+  max-width: 620px; }
+
+.modal-large {
+  max-width: 720px; }
+
+.modal-xlarge {
+  max-width: 860px; }
+
+.modal-jumbo {
+  max-width: 1000px; }
+
+.modalwrapper.modal-docked {
+  height: 100%;
+  display: flex;
+  align-items: center; }
+
+.modalwrapper.modal-docked .b2b-modal-body {
+  height: 80%;
+  overflow-y: scroll;
+  padding-bottom: 60px; }
+
+.modalwrapper.modal-docked .modal {
+  max-height: 80%;
+  height: 80%;
+  overflow: hidden;
+  top: 0; }
+
+.modalwrapper.modal-docked .b2b-modal-body > *:last-child {
+  margin-bottom: 60px; }
+
+@media (max-width: 767px) {
+  .modalwrapper {
+    padding: 15px;
+    overflow-x: hidden; }
+  .modal.fade.in {
+    top: 0;
+    right: 0;
+    left: 0;
+    margin-bottom: 15px;
+    border: none; }
+  .b2b-modal-header {
+    padding: 20px 46px 20px 15px; }
+  .b2b-modal-body {
+    width: 100%;
+    padding: 0 15px 15px; }
+  .modalwrapper.modal-docked {
+    position: absolute;
+    height: 100%;
+    padding: 0; }
+  .modalwrapper.modal-docked .modal.fade.in {
+    margin-bottom: 0;
+    width: 100% !important;
+    max-height: 100%;
+    height: 100%;
+    border-radius: 0; }
+  .modalwrapper.modal-docked .b2b-modal-body {
+    overflow-y: scroll;
+    height: 100%; }
+  .modalwrapper.modal-docked.modal-landscape {
+    overflow-y: hidden;
+    position: fixed; }
+  .modalwrapper.modal-docked.modal-landscape .modal {
+    overflow-y: scroll;
+    max-width: 100%; }
+  .modalwrapper.modal-docked.modal-landscape .b2b-modal-body {
+    height: auto;
+    overflow-y: hidden; }
+  .b2b-modal-footer {
+    padding: 0 15px; }
+  .b2b-modal-footer .cta-button-group {
+    display: block;
+    padding: 15px 0; }
+  .b2b-modal-footer .cta-button-group .btn {
+    float: none; }
+  .b2b-modal-footer .cta-button-group .btn + .btn {
+    margin-bottom: 0; }
+  .b2b-modal-footer .cta-button-group a.visible-phone {
+    align-items: center;
+    display: flex !important;
+    height: 42px;
+    justify-content: center; } }
+
+.b2b-modal-footer > .cta-button-group {
+  line-height: 40px; }
+
+.ajaxed,
+.modal.fade.in .b2b-modal-header,
+.modal.fade.in .b2b-modal-body,
+.modal.fade.in .b2b-modal-footer {
+  animation-duration: 0.01s;
+  -o-animation-duration: 0.01s;
+  -ms-animation-duration: 0.01s;
+  -moz-animation-duration: 0.01s;
+  -webkit-animation-duration: 0.01s;
+  animation-name: DOMinsertion;
+  -o-animation-name: DOMinsertion;
+  -ms-animation-name: DOMinsertion;
+  -moz-animation-name: DOMinsertion;
+  -webkit-animation-name: DOMinsertion; }
+
+.monthselector thead tr th {
+  min-width: 46px; }
+
+.monthselector thead tr:after {
+  content: "";
+  position: absolute;
+  left: 20px;
+  top: 52px;
+  height: 1px;
+  width: 85%;
+  border-bottom: 1px solid #ccc; }
+
+.monthselector tbody tr:last-child {
+  height: 50px; }
+
+.monthselector td.day {
+  margin: 1px 4px !important;
+  width: 64px !important; }
+
+.monthselector .datepicker-switch {
+  width: 195px !important; }
+
+.monthselector .show-date {
+  width: 30px !important; }
+
+.monthselector button.faux-input {
+  width: 100%; }
+  .monthselector button.faux-input:focus {
+    border: 1px solid #0574ac; }
+  .monthselector button.faux-input:disabled {
+    cursor: not-allowed; }
+
+.monthselector .cta-button-group {
+  padding: 0 20px; }
+  .monthselector .cta-button-group a {
+    margin-right: 20px; }
+
+.monthselector .day.active .show-date:after, .monthselector .day:focus .show-date:after, .monthselector .due-date.disabled .show-date:after {
+  height: 30px;
+  left: 9px !important;
+  top: 0;
+  width: 42px !important; }
+
+.monthselector .disabled.day:focus .show-date:after {
+  border: none; }
+
+.monthselector .icon-primary-calendar {
+  display: block; }
+
+.b2b-ml-nav {
+  padding: 0 10px 0 10px;
+  width: 320px; }
+
+.b2b-ml-nav ul {
+  list-style: none;
+  list-style-type: none; }
+
+.b2b-ml-nav a {
+  display: block;
+  padding: 0 0 5px 30px;
+  line-height: 22px;
+  margin-left: -10px;
+  color: #333;
+  font-size: 1.4rem; }
+
+.b2b-ml-nav a:focus {
+  outline-offset: 1px; }
+
+.b2b-ml-nav li:focus {
+  outline: none; }
+
+.b2b-ml-nav li:focus > a {
+  outline: thin dotted #666;
+  outline-offset: 1px; }
+
+.b2b-ml-nav ul li {
+  border-left: 1px solid #ccc; }
+
+.b2b-ml-nav ul ul {
+  padding: 0 0 0 20px; }
+
+.b2b-ml-nav ul > li {
+  position: relative;
+  line-height: 18px; }
+
+.b2b-ml-nav a > span {
+  background-color: #FFF;
+  display: inline;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  left: -11px;
+  top: 0; }
+
+.b2b-ml-nav a > span > i {
+  font-size: 20px; }
+
+.b2b-ml-nav a:only-child {
+  color: #0574ac; }
+
+.b2b-ml-nav a:only-child > span {
+  left: -6px;
+  border-radius: 50%;
+  line-height: 7px;
+  top: 5px; }
+
+.b2b-ml-nav a:only-child > span > i {
+  background-color: inherit;
+  background: #fff;
+  font-size: 10px; }
+
+.b2b-ml-nav ul li:first-child > a:only-child > span {
+  left: -6px;
+  border-radius: 50%;
+  line-height: 12px;
+  top: 0px; }
+
+.b2b-ml-nav li a + ul {
+  display: none; }
+
+.b2b-ml-nav li a.active + ul {
+  display: block; }
+
+/*to overide ng-doc inline property for library demo - TODO: Move to docs.css*/
+.b2b-ml-nav a [class^="icon-primary-"], a [class*=" icon-primary-"], a [class^="icon-primary-"]:before, a [class*=" icon-primary-"]:before {
+  display: inline-block; }
+
+.b2b-alerts-messages {
+  background-color: #fff;
+  border-radius: 8px;
+  height: auto; }
+  .b2b-alerts-messages h3 {
+    color: #333 !important;
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    margin-bottom: 0 !important; }
+  .b2b-alerts-messages h4 {
+    color: #333 !important;
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    margin-bottom: 0 !important; }
+  .b2b-alerts-messages .alert-info {
+    background-color: #0574ac;
+    border: 0; }
+  .b2b-alerts-messages .alert-error {
+    background-color: #cf2a2a;
+    border: 0; }
+  .b2b-alerts-messages .alert-success {
+    background-color: #1b7e28;
+    border: 0; }
+  .b2b-alerts-messages div:nth-child(2) {
+    padding: 0 0 15px 10px;
+    vertical-align: baseline; }
+  .b2b-alerts-messages .close:before {
+    color: #767676; }
+  .b2b-alerts-messages p {
+    font-size: 14px;
+    color: #333;
+    font-family: "Omnes-ECOMP-W02", Arial; }
+    .b2b-alerts-messages p a {
+      color: #333; }
+  .b2b-alerts-messages .btn-small {
+    margin-bottom: 0px; }
+
+.b2b-alerts-success {
+  border: 1px solid #1b7e28; }
+
+.b2b-alerts-error {
+  border: 1px solid #cf2a2a; }
+
+.b2b-alerts-info {
+  border: 1px solid #0574ac; }
+
+/* TODO: Rearange this and move to patches if needed */
+.b2b-breadcrumb-css-override > li {
+  margin-right: 24px; }
+
+.b2b-breadcrumb-css-override li > * {
+  float: left !important; }
+
+.b2b-css-override ul.nav-tabs {
+  margin-bottom: 0; }
+
+.b2b-css-override div.tab-content {
+  margin-top: 0;
+  border-top: none; }
+
+.b2b-css-override .tab-content .prettyprint, .b2b-css-override .usage .prettyprint {
+  max-height: 500px;
+  overflow-y: auto; }
+
+.b2b-top-nav-buttons-css-override {
+  margin-bottom: 0;
+  margin-top: 2px; }
+
+.b2b-auto-width {
+  width: auto !important; }
+
+.b2b-toggle-header-active {
+  color: #0568ae; }
+
+.b2b-toggle-header-inactive {
+  color: #333333; }
+
+.b2b-toggle-header-icon {
+  cursor: pointer; }
+
+.tab-content > .tab-pane {
+  display: none; }
+
+.tab-content > .active {
+  display: block; }
+
+.icon-primary-circle:before {
+  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");
+  content: "";
+  position: absolute;
+  top: 0;
+  z-index: 1; }
+
+.ds2-no-colors .icon-primary-circle:before {
+  background-image: none;
+  content: "\e902"; }
+
+i:focus {
+  outline: thin dotted #666; }
+
+.p-col-md-12 {
+  width: 50%; }
+
+.pager__item {
+  border-radius: 0;
+  cursor: default;
+  display: inline-block;
+  margin: 5px;
+  width: 22px;
+  height: 23px;
+  /*transition: all 0.3s ease-out 0s;*/
+  vertical-align: baseline; }
+
+.pager {
+  padding-top: 10px;
+  padding-bottom: 20px;
+  text-align: center;
+  margin: 0 auto; }
+
+.pager__item--input {
+  color: #067ab4;
+  max-height: 32px;
+  max-width: 40px;
+  padding-left: 0;
+  padding-right: 0;
+  text-align: center;
+  margin-left: 10px; }
+
+.row.section-row {
+  margin-bottom: 20px; }
+
+.pager__item--active {
+  border-bottom: 2px solid #0574ac;
+  border-radius: 0;
+  color: #333333; }
+
+.pager a.pager__item--active:hover {
+  cursor: default; }
+
+.pager a:hover, .pager a:focus {
+  text-decoration: none;
+  color: #333333;
+  cursor: pointer; }
+
+.pager a.disabled:hover, .pager a.disabled:focus {
+  cursor: not-allowed; }
+
+.row.section-row.b2b-page {
+  display: block; }
+
+a.pager__item--next:focus, a.pager__item--prev:focus {
+  text-decoration: none;
+  border: 0; }
+
+.pager__item--next, .pager__item--prev {
+  margin: 5px;
+  padding: 1.5px 6px 1.5px 6px; }
+
+.pager .disabled i {
+  pointer-events: none;
+  cursor: default;
+  color: #c4c4c4; }
+
+.fieldLabel {
+  color: #666666; }
+
+.fieldLabel input {
+  color: #666666; }
+
+.pSelect {
+  float: right;
+  width: 150px; }
+
+.numericResult {
+  margin-bottom: 20px;
+  font-size: 1.6rem;
+  margin-top: 20px;
+  display: inline-block;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.mobile-view > .pager__item {
+  margin: 5px 10px;
+  width: 24px;
+  height: 34px;
+  vertical-align: middle;
+  line-height: 34px; }
+
+.fade1, .fadel {
+  opacity: 0.4; }
+
+.fade2, .fadesl {
+  opacity: 0.6; }
+
+h4#pagination-truncated {
+  margin-top: 50px; }
+
+h4#pagination-large-count {
+  margin-top: 50px; }
+
+.p-col-md-12 input {
+  margin-left: 20px; }
+
+.pager a .icon-primary-right:before {
+  display: inline-block; }
+
+.pager a .icon-primary-left:before {
+  display: inline-block; }
+
+.page-heading {
+  background: white none repeat scroll 0 0;
+  margin-bottom: -12px;
+  padding-left: 10px;
+  padding-right: 10px;
+  position: relative; }
+
+.numericResult:focus {
+  outline: 1px dotted #0574ac; }
+
+.page-heading-group {
+  color: #ef6f00;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.pager > div > span.fieldLabel {
+  margin-left: 18px; }
+
+.pager .fieldLabel .btn-arrow {
+  top: 0;
+  left: 10px; }
+
+.b2b-p-col-md-12 {
+  width: 50%; }
+  .b2b-p-col-md-12 input {
+    margin-left: 20px; }
+
+.b2b-pager__item {
+  border-radius: 0;
+  cursor: default;
+  display: inline-block;
+  margin: 5px;
+  min-width: 23px;
+  height: 23px;
+  vertical-align: baseline; }
+
+.b2b-pager__item--noclick {
+  pointer-events: none !important;
+  cursor: default !important; }
+
+.b2b-pager {
+  padding-top: 10px;
+  padding-bottom: 20px;
+  text-align: center;
+  margin: 0 auto; }
+  .b2b-pager a:hover {
+    text-decoration: none;
+    color: #333333;
+    cursor: pointer; }
+  .b2b-pager a:focus {
+    text-decoration: none;
+    color: #333333;
+    cursor: pointer; }
+  .b2b-pager a .icon-primary-right:before {
+    display: inline-block; }
+  .b2b-pager a .icon-primary-left:before {
+    display: inline-block; }
+  .b2b-pager .disabled i {
+    pointer-events: none;
+    cursor: default;
+    color: #c4c4c4; }
+
+.b2b-pager__item--input {
+  color: #067ab4;
+  max-height: 32px;
+  max-width: 60px;
+  padding-left: 0;
+  padding-right: 0;
+  text-align: center;
+  margin-left: 10px; }
+
+.row.section-row {
+  margin-bottom: 20px; }
+
+.b2b-pager__item--active {
+  border-bottom: 2px solid #0574ac;
+  border-radius: 0;
+  color: #333333; }
+
+.row.section-row.b2b-page {
+  display: block; }
+
+a.b2b-pager__item--next:focus {
+  text-decoration: none;
+  border: 0; }
+
+a.b2b-pager__item--next-disabled {
+  outline: 0; }
+
+a.b2b-pager__item--next-disabled > [class^="icon-primary-"] {
+  color: #cccccc;
+  cursor: not-allowed;
+  outline: 0; }
+
+a.b2b-pager__item--prev:focus {
+  text-decoration: none;
+  border: 0; }
+
+a.b2b-pager__item--prev-disabled {
+  outline: 0; }
+
+a.b2b-pager__item--prev-disabled > [class^="icon-primary-"] {
+  color: #cccccc;
+  cursor: not-allowed; }
+
+.b2b-pager__item--next {
+  margin: 5px;
+  padding: 1.5px 6px 1.5px 6px; }
+
+.b2b-pager__item--prev {
+  margin: 5px;
+  padding: 1.5px 6px 1.5px 6px; }
+
+.fieldLabel {
+  color: #666666; }
+  .fieldLabel input {
+    color: #666666; }
+  .fieldLabel .btn-arrow {
+    top: 0;
+    left: 10px; }
+
+.b2b-pSelect {
+  float: right;
+  width: 150px; }
+
+.b2b-numericResult {
+  margin-bottom: 20px;
+  font-size: 1.6rem;
+  margin-top: 20px; }
+
+.b2b-mobile-view > .b2b-pager__item {
+  margin: 5px 10px;
+  min-width: 23px;
+  height: 34px;
+  vertical-align: middle;
+  line-height: 34px; }
+
+.b2b-fade1 {
+  opacity: 0.4; }
+
+.b2b-fade2 {
+  opacity: 0.6; }
+
+.b2b-fadesl {
+  opacity: 0.6; }
+
+h4#b2b-pagination-truncated {
+  margin-top: 50px; }
+
+h4#b2b-pagination-large-count {
+  margin-top: 50px; }
+
+.b2b-page-heading {
+  background: white none repeat scroll 0 0;
+  margin-bottom: -12px;
+  padding-left: 10px;
+  padding-right: 10px;
+  position: relative; }
+
+.b2b-numericResult:focus {
+  outline: 1px dotted #0574ac; }
+
+.b2b-page-heading-group {
+  color: #ef6f00;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.b2b-pager > div > span.fieldLabel {
+  margin-left: 18px; }
+
+input.b2b-phone-mask-input {
+  padding-right: 15px; }
+  input.b2b-phone-mask-input:hover, input.b2b-phone-mask-input:focus {
+    padding-right: 15px; }
+
+/************************** Start - Should be removed after the styling in global is fixed *******************/
+input::-ms-clear {
+  display: none; }
+
+/************************** End - Should be removed after the styling in global is fixed *******************/
+@media (max-width: 767px) {
+  input::-ms-clear {
+    display: block; } }
+
+.pivot-link-group {
+  background-color: #5a5a5a;
+  border-top: 1px solid #959595; }
+
+.pivot-links > li {
+  border-bottom: 1px solid #959595; }
+
+.pivot-links > li > a {
+  color: #fff;
+  display: block;
+  padding: 12px 15px 10px;
+  line-height: normal; }
+
+.b2b-profile-block-container {
+  min-height: 200px;
+  height: auto;
+  background-color: #fff;
+  border-radius: 8px;
+  border: 1px solid #ccc;
+  box-shadow: 0px 1px 1px 1px  #ccc;
+  display: inline-table;
+  margin: 15px 15px; }
+
+.b2b-profile-block-details p, .b2b-profile-block-details div {
+  padding: 2px 7px;
+  font-size: 1.4rem; }
+
+.b2b-profile-block-details .radio-label, .b2b-profile-block-details a {
+  font-size: 1.4rem; }
+
+.b2b-profile-block-details p label, .b2b-profile-block-details p span {
+  padding-left: 10px; }
+
+.b2b-profile-block-footer {
+  margin-bottom: 12px;
+  margin-top: 5px;
+  height: 35px; }
+
+.b2b-profile-block-details p {
+  word-wrap: break-word;
+  height: 61px; }
+  .b2b-profile-block-details p:first-child {
+    margin-top: 10px; }
+  .b2b-profile-block-details p:after {
+    content: ' ';
+    display: block;
+    border: 0.2px solid #ccc;
+    margin-top: 12px; }
+
+.b2b-profile-block-details .radio {
+  margin-left: 15px;
+  height: 30px; }
+
+.b2b-approval-icon {
+  color: #1b7e28;
+  float: right;
+  position: relative;
+  left: 10px; }
+  .b2b-approval-icon i {
+    color: #1b7e28;
+    float: right; }
+
+.b2b-profile-link {
+  float: right;
+  position: relative;
+  left: -4px; }
+
+a.link-profile {
+  position: relative;
+  left: -5px;
+  float: right;
+  margin-bottom: 16px; }
+
+.b2b-profile-block-radio {
+  position: relative;
+  top: -5px; }
+
+.b2b-profile-card {
+  min-width: 229px;
+  min-height: 354px;
+  margin: 10px;
+  border: solid 1px #CCC;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  display: inline-block;
+  vertical-align: top; }
+  .b2b-profile-card .top-block {
+    padding: 15px 20px;
+    background-color: #e4e4e4;
+    max-height: 153px; }
+  .b2b-profile-card .bottom-block {
+    padding: 15px 20px 15px 20px;
+    background-color: #fff; }
+  .b2b-profile-card .profile-image {
+    background: #e4e4e4;
+    margin-bottom: 15px;
+    text-align: center; }
+    .b2b-profile-card .profile-image .default-img {
+      display: inline-block;
+      width: 60px;
+      height: 60px;
+      margin-bottom: 10px;
+      border: 6px solid #fff;
+      border-radius: 99em;
+      -webkit-border-radius: 99em;
+      -moz-border-radius: 99em;
+      /* background-color: #eee; */ }
+
+.profile-image img {
+  display: inline-block;
+  width: 60px;
+  height: 60px;
+  margin-bottom: 10px;
+  border: 6px solid #fff;
+  border-radius: 99em;
+  -webkit-border-radius: 99em;
+  -moz-border-radius: 99em;
+  /* background-color: #eee; */ }
+
+.b2b-profile-card .profile-image .default-img {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  color: #333;
+  background-color: #fff;
+  font-size: 32px;
+  line-height: 22px;
+  padding: 5px;
+  padding-top: 13px;
+  width: 60px;
+  height: 60px;
+  text-transform: uppercase; }
+
+.b2b-profile-card .profile-image .name {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 16px;
+  color: #333;
+  text-align: center;
+  margin-bottom: 5px;
+  margin-top: 5px;
+  overflow: hidden;
+  word-break: break-word;
+  white-space: normal;
+  text-transform: capitalize; }
+
+.b2b-profile-card .profile-image .status-icon {
+  border-radius: 10px;
+  border: 1px solid #fff;
+  margin: 0 3px 0 0;
+  width: 10px;
+  height: 10px;
+  display: inline-block;
+  vertical-align: middle; }
+
+.b2b-profile-card .profile-image .status {
+  font-size: 12px;
+  line-height: 15px;
+  text-align: center;
+  margin: 0 15px 0 0;
+  color: #444; }
+
+.b2b-profile-card .status .circle {
+  width: 10px;
+  height: 10px;
+  border-radius: 50%;
+  margin: 30px 6px 0px 20px;
+  text-align: center;
+  background-color: #444; }
+
+.b2b-profile-card .profile-image .status-green {
+  background-color: #0c0; }
+
+.b2b-profile-card .profile-image .status-red {
+  background-color: red; }
+
+.b2b-profile-card .profile-image .status-blue {
+  background-color: #00f; }
+
+.b2b-profile-card .profile-image .status-yellow {
+  background-color: #ff0; }
+
+.b2b-profile-card .profile-image .status .status-badge {
+  margin-left: 5px;
+  border: dotted 1px #444;
+  background-color: transparent;
+  font-weight: 400;
+  color: #444;
+  height: 17px;
+  padding: 0 5px;
+  font-size: 11px;
+  padding-left: 5px;
+  padding-right: 5px; }
+
+.b2b-profile-card .profile-details {
+  background: #fff; }
+  .b2b-profile-card .profile-details label {
+    display: block;
+    cursor: text;
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    font-weight: bolder;
+    font-size: 14px;
+    color: #333;
+    padding: 0;
+    margin: 0; }
+  .b2b-profile-card .profile-details div {
+    margin: 0;
+    font-size: 14px;
+    color: #333;
+    padding-bottom: 6.5px; }
+
+.b2b-profile-card .b2b-add-user {
+  background: white;
+  border-style: dotted;
+  font-size: 16px;
+  color: #333;
+  position: relative; }
+  .b2b-profile-card .b2b-add-user i {
+    font-size: 30px;
+    padding-bottom: 15px; }
+
+.b2b-profile-card .atcenter {
+  cursor: pointer;
+  margin-top: 60%;
+  vertical-align: middle;
+  text-align: center; }
+
+.b2b-profile-card .tooltip {
+  cursor: pointer; }
+  .b2b-profile-card .tooltip .helpertext {
+    position: relative;
+    color: white; }
+
+.b2b-profile-card .tooltip-wrapper {
+  position: relative; }
+
+/* Overrides for tooltip absolute positioning */
+@media (min-width: 1025px) {
+  .b2b-profile-card .tooltip-size-control {
+    width: 100% !important; } }
+
+@-webkit-keyframes progress-bar-stripes {
+  from {
+    background-position: 0 0; }
+  to {
+    background-position: 80px 0; } }
+
+@keyframes progress-bar-stripes {
+  from {
+    background-position: 0 0; }
+  to {
+    background-position: 80px 0; } }
+
+.progress {
+  background-color: #e4e4e4;
+  border-radius: 4px;
+  height: 14px;
+  margin-bottom: 20px;
+  min-width: 250px;
+  overflow: hidden;
+  padding: 0;
+  position: relative; }
+
+a .progress {
+  margin-bottom: 0; }
+
+.progress .bar {
+  background-color: #666;
+  border-radius: 4px;
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  height: 100%;
+  width: 0; }
+
+.progress-arrow {
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-align-items: center;
+  -ms-flex-align: center;
+  align-items: center;
+  -webkit-justify-content: flex-end;
+  -ms-flex-pack: end;
+  justify-content: flex-end; }
+
+.progress-link + .usage-bar {
+  margin-top: 5px; }
+
+.progress-success .bar, .progress .bar-success {
+  background-color: #1b7e28; }
+
+.progress-warning .bar, .progress .bar-warning {
+  background-color: #ef6f00; }
+
+.progress-danger .bar, .progress .bar-danger {
+  background-color: #cf2a2a; }
+
+.progress.increment {
+  display: -webkit-flex;
+  display: -ms-flexbox;
+  display: flex; }
+
+.progress.increment .bar:first-child:not(:last-child) {
+  border-right: none;
+  border-radius: 4px 0 0 4px; }
+
+.progress.increment .bar:last-child:not(:first-child) {
+  border-left: none;
+  border-radius: 0 4px 4px 0; }
+
+.progress.increment .bar + .bar:not(:last-child) {
+  border-left: none;
+  border-right: none;
+  border-radius: 0; }
+
+.progress.increment .bar:not(:first-child) {
+  border-left: 1px solid white !important; }
+
+.usage-bar {
+  display: table;
+  float: none;
+  width: 100%;
+  margin-bottom: 1px; }
+
+.usage-bar > .usage-text {
+  display: table-cell;
+  width: 1%; }
+
+.progress + .usage-bar {
+  margin-top: -15px; }
+
+.usage-bar .usage-text {
+  font-size: 1.4rem; }
+
+.usage-bar .usage-text:first-child {
+  white-space: nowrap; }
+
+.usage-bar .usage-text.text-right {
+  vertical-align: top;
+  font-size: 1.4rem;
+  width: auto !important; }
+
+.usage-bar .usage-text.text-right:before {
+  content: "";
+  display: table;
+  height: .1em; }
+
+.usage-bar.billing-cycle .usage-text {
+  font-size: 1.4rem; }
+
+.usage-bar.billing-cycle .usage-text.text-right {
+  vertical-align: bottom; }
+
+.progress.autocolor [data-percentage="1"], .progress.autocolor [data-percentage="2"], .progress.autocolor [data-percentage="3"], .progress.autocolor [data-percentage="4"], .progress.autocolor [data-percentage="5"], .progress.autocolor [data-percentage="6"], .progress.autocolor [data-percentage="7"], .progress.autocolor [data-percentage="8"], .progress.autocolor [data-percentage="9"], .progress.autocolor [data-percentage="10"] .progress.autocolor [data-percentage^="2"], .progress.autocolor [data-percentage^="3"], .progress.autocolor [data-percentage^="4"], .progress.autocolor [data-percentage^="5"], .progress.autocolor [data-percentage="60"], .progress.autocolor [data-percentage="61"], .progress.autocolor [data-percentage="62"], .progress.autocolor [data-percentage="63"], .progress.autocolor [data-percentage="64"] {
+  background-color: #1b7e28; }
+
+.progress.autocolor [data-percentage="65"], .progress.autocolor [data-percentage="66"], .progress.autocolor [data-percentage="67"], .progress.autocolor [data-percentage="68"], .progress.autocolor [data-percentage="69"], .progress.autocolor [data-percentage^="7"], .progress.autocolor [data-percentage^="8"] {
+  background-color: #ef6f00; }
+
+.progress.autocolor [data-percentage^="9"], .progress.autocolor [data-percentage="100"] {
+  background-color: #cf2a2a; }
+
+.b2b-seek-bar-container {
+  position: relative; }
+  .b2b-seek-bar-container div {
+    position: absolute; }
+  .b2b-seek-bar-container .b2b-seek-bar-track-container {
+    width: 100%; }
+  .b2b-seek-bar-container .b2b-seek-bar-track {
+    width: 100%;
+    height: 6px;
+    background-color: #cccccc;
+    border-radius: 10px; }
+  .b2b-seek-bar-container .b2b-seek-bar-track-fill {
+    width: 100%;
+    height: 6px;
+    background-color: #cccccc;
+    border-radius: 10px;
+    width: 0;
+    background-color: #157BB2;
+    transition: width 0s linear; }
+
+.seek-bar-container .seek-bar-knob-container {
+  transition: left 0s linear; }
+
+.b2b-seek-bar-container .b2b-seek-bar-knob {
+  width: 14px;
+  height: 14px;
+  border-radius: 10px;
+  top: -4px;
+  left: -8px;
+  border: 1px solid #cccccc;
+  background: white;
+  cursor: pointer; }
+
+.b2b-seek-bar-container .b2b-seek-bar-knob:focus {
+  outline: thin dotted #666; }
+
+.b2b-seek-bar-container.vertical {
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+  position: relative;
+  border-radius: 10px; }
+  .b2b-seek-bar-container.vertical .b2b-seek-bar-track-container {
+    position: relative;
+    height: 100%; }
+  .b2b-seek-bar-container.vertical .b2b-seek-bar-track {
+    position: absolute;
+    height: 100%; }
+  .b2b-seek-bar-container.vertical .b2b-seek-bar-track-fill {
+    position: absolute;
+    bottom: 0;
+    height: 0;
+    width: 100%; }
+  .b2b-seek-bar-container.vertical .b2b-seek-bar-knob-container {
+    transition: bottom .01s linear;
+    position: relative;
+    bottom: 0; }
+  .b2b-seek-bar-container.vertical .b2b-seek-bar-knob {
+    position: absolute;
+    border-radius: 10px;
+    top: -7px;
+    left: -4px; }
+
+.form-search .search-query {
+  width: 100% !important; }
+
+.form-search .well {
+  margin-top: 0; }
+
+.form-search > ul.nav > li.section {
+  min-height: 20px !important; }
+
+input.b2b-search-input-field {
+  margin-bottom: 0px; }
+
+.search-suggestion-list {
+  background-color: #FFFFFF;
+  border: 1px solid #ccc;
+  border-radius: 0 0 6px 6px;
+  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
+  margin-top: -5px;
+  max-height: 400px;
+  overflow-x: hidden;
+  overflow-y: auto;
+  padding: 15px 0;
+  position: absolute;
+  width: 100%;
+  z-index: 1000; }
+  .search-suggestion-list > li.active {
+    background-color: #cccccc; }
+  .search-suggestion-list:empty {
+    display: none; }
+
+.b2b-search-hightlight {
+  font-weight: bold; }
+
+input[type="text"]::-moz-placeholder {
+  color: #767676;
+  font-family: "Omnes-ECOMP-W02-Italic", Arial; }
+
+input[type="text"]:focus {
+  z-index: 1000; }
+
+input[type="text"] + .reset-field {
+  background-color: #FFFFFF;
+  height: 90%;
+  top: 5%; }
+
+.btn-search:focus {
+  outline: 1px dotted #0574ac; }
+
+.field-group input:not([type="button"])[disabled] ~ .btn-search {
+  background-color: #eee; }
+
+.btn-search[class*="btn"] {
+  background-color: #FFFFFF;
+  background-size: 20px 20px;
+  border-radius: 0 1.5rem 1.5rem 0;
+  height: 3rem;
+  min-width: 4.4rem !important;
+  right: 0.15rem;
+  top: 0.15rem;
+  width: 4.4rem; }
+
+.search-suggestion-wrapper {
+  margin-bottom: 15px;
+  position: relative; }
+  .search-suggestion-wrapper .no-result {
+    padding: 0px 15px; }
+
+.search-suggestion-item {
+  color: #333333;
+  line-height: 4rem;
+  padding: 0 15px;
+  position: relative;
+  z-index: 1000; }
+  .search-suggestion-item:hover {
+    background-color: #e4e4e4;
+    cursor: pointer; }
+  .search-suggestion-item:focus {
+    background-color: #e4e4e4;
+    cursor: pointer; }
+  .search-suggestion-item a {
+    color: #333333;
+    text-decoration: none; }
+
+.btn-search i {
+  color: #767676; }
+
+input.b2b-search-input-field:focus ~ .btn-search > i, .btn-search:focus > i {
+  color: #0568ae; }
+
+button.btn-search[disabled] {
+  cursor: not-allowed; }
+  button.btn-search[disabled] i {
+    color: #767676; }
+
+.linkSelectorModule {
+  position: relative;
+  height: 32px;
+  line-height: 20px;
+  border: 0px;
+  width: auto;
+  display: block; }
+  .linkSelectorModule .icon-primary-down {
+    font-size: 23px;
+    margin-top: -10px;
+    position: absolute;
+    top: 50%;
+    margin-left: -30px; }
+  .linkSelectorModule .selectModule {
+    background-color: transparent;
+    border: none;
+    color: #0568ae;
+    cursor: pointer;
+    border: 1px solid transparent;
+    box-shadow: none;
+    padding-right: 35px;
+    position: relative;
+    user-select: none;
+    font-size: 1.6rem; }
+    .linkSelectorModule .selectModule:focus {
+      border: 1px dotted #ccc;
+      box-shadow: none;
+      -moz-user-select: none; }
+    .linkSelectorModule .selectModule:hover {
+      text-decoration: underline; }
+  .linkSelectorModule .active + .moduleWrapper:before {
+    background-color: #FFFFFF;
+    border-color: #d2d2d2;
+    border-style: solid;
+    border-width: 1px 1px 0 0;
+    content: "";
+    display: block;
+    height: 15px;
+    right: 122px;
+    margin: 0;
+    position: absolute;
+    top: -8px;
+    -webkit-transform: rotate(-45deg);
+    transform: rotate(-45deg);
+    width: 15px; }
+  .linkSelectorModule .moduleWrapper {
+    top: 40px; }
+  .linkSelectorModule ul.awd-module-list {
+    border-radius: 6px 6px 0px 0px; }
+
+.selectorModule .icon-primary-down {
+  font-size: 23px;
+  margin-top: -11px;
+  position: absolute;
+  right: 4px;
+  top: 50%; }
+
+.selectorModule .selectModule {
+  border: 1px solid #d2d2d2;
+  border-radius: 6px;
+  box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
+  display: block;
+  width: 100%;
+  padding-left: 15px;
+  background-color: transparent;
+  cursor: pointer; }
+  .selectorModule .selectModule:focus {
+    border: 1px solid #0568ae;
+    -moz-user-select: none; }
+  .selectorModule .selectModule span.module-data {
+    position: absolute;
+    bottom: 6px;
+    line-height: 20px; }
+  .selectorModule .selectModule img + span.module-data {
+    padding-left: 45px; }
+
+.selectorModule .selectModule.active {
+  border-bottom-right-radius: 0px;
+  border-bottom-left-radius: 0px; }
+
+.selectorModule .moduleWrapper {
+  position: absolute;
+  width: 100% !important;
+  border-top: none; }
+
+.selectorModule ul.awd-module-list {
+  border-radius: 0px 0px 6px 6px; }
+
+.selectorModule .large > img {
+  height: 30px;
+  position: absolute;
+  width: 30px;
+  top: 20px;
+  left: 15px; }
+
+.selectModule {
+  background-color: transparent;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  color: #333333;
+  font-size: 1.6rem;
+  height: 36px;
+  line-height: 35px;
+  margin-bottom: 0;
+  position: relative;
+  text-align: left;
+  top: 0;
+  z-index: 10;
+  padding: 0px;
+  margin: 0px;
+  cursor: pointer; }
+
+.moduleWrapper {
+  background-color: #FFFFFF;
+  position: absolute;
+  color: #191919;
+  z-index: 9999;
+  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15);
+  border-radius: 0px 0px 6px 6px; }
+  .moduleWrapper .module-list-item img {
+    height: 30px;
+    position: absolute;
+    width: 30px;
+    top: 30px;
+    left: 15px;
+    align-self: center; }
+  .moduleWrapper span {
+    display: block;
+    white-space: nowrap;
+    font-size: 1.5rem; }
+
+.awd-module-list {
+  overflow-y: auto;
+  z-index: 9999;
+  max-height: 360px;
+  border: 1px solid #d2d2d2; }
+  .awd-module-list .module-list-item > .module-data {
+    overflow: ellipsis;
+    white-space: nowrap;
+    line-height: 20px;
+    font-size: 1.6rem;
+    border-bottom: 1px dotted #959595;
+    margin: 0px 15px 0px 15px;
+    padding-right: 50px;
+    padding-bottom: 14px;
+    padding-top: 14px;
+    align-self: center;
+    width: 100%; }
+  .awd-module-list .module-list-item:hover {
+    background-color: #f2f2f2; }
+  .awd-module-list .module-list-item:active {
+    background-color: #f2f2f2; }
+  .awd-module-list .module-list-item[aria-selected="true"] {
+    background-color: #f2f2f2; }
+
+.module-list-item {
+  cursor: pointer;
+  overflow: hidden;
+  position: relative;
+  overflow: ellipsis;
+  white-space: nowrap;
+  z-index: 1000;
+  color: #191919;
+  display: flex; }
+  .module-list-item:last-of-type .module-data {
+    border-bottom: none; }
+  .module-list-item img + span.module-data {
+    padding-left: 45px; }
+
+.module-groups:first-of-type .module-list-item:last-of-type .module-data {
+  border-bottom: 1px solid #959595; }
+
+.module-groupitem {
+  padding-bottom: 4px; }
+
+.selectorModule.large {
+  height: 72px;
+  vertical-align: middle;
+  text-align: left; }
+  .selectorModule.large .moduleWrapper {
+    top: 71px; }
+  .selectorModule.large input {
+    height: 72px;
+    vertical-align: middle;
+    text-align: left; }
+  .selectorModule.large button {
+    height: 72px;
+    vertical-align: middle;
+    text-align: left; }
+  .selectorModule.large .selectModule img {
+    left: 15px;
+    top: 21px; }
+
+ul.module-groupitem li {
+  margin: 0 -15px 0 -15px; }
+
+span.module-data span {
+  display: block;
+  line-height: 20px;
+  font-size: 1.5rem; }
+
+li.module-groups {
+  cursor: default !important;
+  padding: 18px 15px 0px 15px; }
+
+li.module-list-item[selected]:before {
+  box-sizing: border-box;
+  display: inline-block;
+  font-size: 2em;
+  height: 1em;
+  position: absolute;
+  top: 20px;
+  right: 0px;
+  vertical-align: middle;
+  width: 1em;
+  color: #007a3e; }
+
+ul.module-optinalcta {
+  position: relative;
+  height: 44px;
+  margin-top: 0px;
+  border-bottom: 1px solid #d2d2d2;
+  border-left: 1px solid #d2d2d2;
+  border-right: 1px solid #d2d2d2;
+  border-radius: 0px 0px 6px 6px; }
+  ul.module-optinalcta li {
+    position: absolute;
+    bottom: 10px; }
+  ul.module-optinalcta a {
+    text-indent: 15px;
+    padding: 15px; }
+
+.b2b-slider-container {
+  position: relative; }
+  .b2b-slider-container.slider-disabled {
+    cursor: not-allowed !important; }
+  .b2b-slider-container div {
+    position: absolute; }
+  .b2b-slider-container .slider-track-container {
+    width: 100%;
+    cursor: pointer; }
+  .b2b-slider-container .slider-track {
+    width: 100%;
+    height: 6px;
+    background-color: #cccccc;
+    border-radius: 10px; }
+  .b2b-slider-container .slider-track-fill {
+    width: 100%;
+    height: 6px;
+    background-color: #cccccc;
+    border-radius: 10px;
+    width: 0;
+    background-color: #157BB2;
+    transition: width 0s linear; }
+  .b2b-slider-container .slider-knob-container {
+    transition: left 0s linear; }
+    .b2b-slider-container .slider-knob-container.slider-knob-hidden {
+      display: none !important; }
+  .b2b-slider-container .slider-knob {
+    width: 14px;
+    height: 14px;
+    border-radius: 10px;
+    top: -4px;
+    left: -8px;
+    border: 1px solid #cccccc;
+    background: white;
+    cursor: pointer; }
+    .b2b-slider-container .slider-knob:focus {
+      outline: thin dotted #666; }
+
+.b2b-slider-endpoints-container {
+  margin-top: 13px;
+  color: #333;
+  font-size: 12px; }
+  .b2b-slider-endpoints-container .b2b-slider-endpoints-left {
+    float: left;
+    line-height: 100%; }
+  .b2b-slider-endpoints-container .b2b-slider-endpoints-right {
+    float: right;
+    line-height: 100%; }
+  .b2b-slider-endpoints-container::after {
+    clear: both;
+    content: "";
+    display: block; }
+
+.b2b-slider-container.vertical {
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+  position: relative;
+  border-radius: 10px; }
+  .b2b-slider-container.vertical .slider-track-container {
+    position: relative;
+    height: 100%; }
+  .b2b-slider-container.vertical .slider-track {
+    position: absolute;
+    height: 100%; }
+  .b2b-slider-container.vertical .slider-track-fill {
+    position: absolute;
+    bottom: 0;
+    height: 0;
+    width: 100%; }
+  .b2b-slider-container.vertical .slider-knob-container {
+    transition: bottom 0s linear;
+    position: relative;
+    bottom: 0; }
+    .b2b-slider-container.vertical .slider-knob-container.slider-knob-hidden {
+      display: none !important; }
+  .b2b-slider-container.vertical .slider-knob {
+    position: absolute;
+    border-radius: 10px;
+    top: -7px;
+    left: -4px; }
+
+.icon-primary-spinner {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20id%3D%22svg-spinner%22%20x%3D%220px%22%20y%3D%220px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%20%20%20%3Cpath%20fill%3D%22%23F5F5F5%22%20d%3D%22M18%2036C8.1%2036%200%2027.9%200%2018S8.1%200%2018%200s18%208.1%2018%2018-8.1%2018-18%2018zm0-31.5c-7.5%200-13.5%206-13.5%2013.5S10.6%2031.5%2018%2031.5c7.5%200%2013.5-6.1%2013.5-13.5%200-7.5-6-13.5-13.5-13.5z%22%2F%3E%0A%20%20%20%3Cpath%20fill%3D%22%230568AE%22%20id%3D%22spinner%22%20d%3D%22M30.7%205.3l-3.1%203.2c2.4%202.4%203.9%205.8%203.9%209.5%200%207.4-6.1%2013.5-13.5%2013.5S4.5%2025.4%204.5%2018%2010.6%204.5%2018%204.5V0C8.1%200%200%208.1%200%2018s8.1%2018%2018%2018%2018-8.1%2018-18c0-5-2-9.5-5.3-12.7z%22%3E%0A%20%20%20%20%20%20%3CanimateTransform%20%0A%20%20%20%20%20%20%20%20%20attributeType%3D%22xml%22%0A%20%20%20%20%20%20%20%20%20attributeName%3D%22transform%22%0A%20%20%20%20%20%20%20%20%20type%3D%22rotate%22%0A%20%20%20%20%20%20%20%20%20from%3D%220%2018%2018%22%0A%20%20%20%20%20%20%20%20%20to%3D%22360%2018%2018%22%0A%20%20%20%20%20%20%20%20%20dur%3D%221.0s%22%0A%20%20%20%20%20%20%20%20%20repeatCount%3D%22indefinite%22%0A%20%20%20%20%20%20%2F%3E%0A%20%20%20%3C%2Fpath%3E%0A%3C%2Fsvg%3E");
+  height: 50px;
+  width: 50px; }
+
+.icon-primary-spinner.small {
+  margin-right: 5px;
+  height: 30px !important;
+  width: 30px !important; }
+
+.isIE .icon-primary-spinner,
+.isIE .icon-primary-spinner.small {
+  animation: spinner 1s linear infinite; }
+
+.ds2-no-colors .icon-primary-spinner {
+  animation: spinner 1s linear infinite;
+  border: 5px dotted transparent;
+  border-radius: 50%; }
+
+@keyframes spinner {
+  0% {
+    transform: rotate(0deg); }
+  100% {
+    transform: rotate(359deg); } }
+
+.b2b-status-tracker > .btn-arrow:nth-of-type(1) {
+  margin-right: 10px; }
+
+.b2b-status-tracker > .btn-arrow:nth-of-type(2) {
+  margin-left: 20px; }
+
+.b2b-status-tracker > .btn-arrow {
+  height: 20px;
+  margin-top: 25px;
+  overflow: visible; }
+  .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-left {
+    margin-right: 5px;
+    color: #0574ac; }
+  .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-right {
+    color: #0574ac; }
+
+.b2b-status-tracker > .b2b-status-tracker-step {
+  padding: 0;
+  position: relative; }
+
+.b2b-status-tracker-step {
+  margin-left: 5px; }
+
+.b2b-status-tracker > .b2b-status-tracker-step .b2b-status-tracker-heading {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  color: #767676;
+  margin-bottom: 10px; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-heading {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #1b7e28; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.complete > .progress > .progress-bar {
+  width: 100%;
+  background-color: #1b7e28; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-estimate {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #333333; }
+  .b2b-status-tracker > .b2b-status-tracker-step.complete > .b2b-status-tracker-estimate > .icoControls-approval {
+    color: #1b7e28; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.current > .b2b-status-tracker-heading {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #333333; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.current > .progress > .progress-bar {
+  width: 100%;
+  background-color: #333333; }
+
+.b2b-status-tracker > .b2b-status-tracker-step.current > .b2b-status-tracker-estimate > .icon-misc-time {
+  color: #333333; }
+
+.b2b-status-tracker > .b2b-status-tracker-step > .progress {
+  position: relative;
+  border-radius: 1.5px;
+  height: 3px;
+  margin-bottom: 10px;
+  background-color: #c5c5c5; }
+  .b2b-status-tracker > .b2b-status-tracker-step > .progress > .progress-bar {
+    width: 0;
+    height: 3px; }
+
+.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-estimate {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  color: #767676;
+  margin-bottom: 10px; }
+  .b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-estimate > .icon-misc-time {
+    color: #767676; }
+
+.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-description {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 12px;
+  color: #767676;
+  padding-right: 15px; }
+
+.step-indicator {
+  height: auto;
+  padding: 40px 0; }
+
+.step-heading {
+  color: #333333;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 3.8rem;
+  line-height: 0.8; }
+
+.steps {
+  display: flex;
+  height: 5px;
+  margin-top: 60px;
+  position: relative; }
+
+.steps li {
+  color: #5a5a5a;
+  flex: 1;
+  margin-right: 5px;
+  background-color: #c4c4c4;
+  outline: 1px solid transparent; }
+
+.steps li:first-child {
+  border-radius: 4px 0 0 4px; }
+
+.steps li:last-child {
+  margin-right: 0;
+  border-radius: 0 4px 4px 0; }
+
+.steps li.step-on,
+.steps li.step-done {
+  background-color: #007a3e;
+  color: #007a3e;
+  border: 1px solid transparent; }
+
+.step-text {
+  bottom: 29px;
+  display: inline-block;
+  font-size: 1.8rem;
+  margin-top: 0;
+  position: relative;
+  white-space: nowrap; }
+
+.step-on .step-text {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.steps li .step-text[data-large-text]:before {
+  content: attr(data-large-text) " "; }
+
+.step-confirmation {
+  color: #007a3e;
+  margin-bottom: 30px; }
+
+.step-confirmation > div {
+  display: flex; }
+
+.step-confirmation > div i {
+  color: #007a3e;
+  font-size: 50px;
+  margin-right: 10px; }
+
+.step-confirmation.centered > div i {
+  margin-left: -60px; }
+
+.step-confirmation > div h3 {
+  font-size: 2.4rem;
+  margin: 26px 0 20px; }
+
+.step-confirmation > p {
+  margin: 0; }
+
+@media (max-width: 1024px) {
+  .step-indicator {
+    padding: 25px 0; }
+  .steps {
+    margin-top: 0; }
+  .step-heading {
+    font-size: 2.4rem;
+    margin-bottom: 11px; }
+  .step-text {
+    display: none; }
+  .step-on .step-text {
+    bottom: 6px;
+    display: block;
+    font-size: 1.2rem;
+    left: 0;
+    line-height: 1;
+    margin-top: 10px;
+    position: absolute;
+    top: 4px; }
+  .steps li .step-text[data-sm-text]:before {
+    content: attr(data-sm-text) " ";
+    color: #333333; }
+  .step-confirmation {
+    margin-top: 30px !important; } }
+
+@media (max-width: 767px) {
+  .step-confirmation.centered > div i {
+    margin-left: 0; }
+  .step-confirmation.centered > p {
+    margin-left: 40px; }
+  .step-confirmation > div h3 {
+    font-size: 1.8rem;
+    margin: 13px 0 10px; }
+  .step-confirmation > div i {
+    font-size: 30px;
+    margin-right: 10px; } }
+
+.step-indicator.vertical {
+  height: auto; }
+
+.vertical .step-heading {
+  font-size: 24px; }
+
+.vertical .steps {
+  display: block;
+  height: inherit;
+  width: 100%; }
+
+.vertical .steps li {
+  align-items: center;
+  background-color: transparent;
+  display: flex;
+  height: 60px;
+  margin: 0 0 4px;
+  padding: 0 0 0 20px;
+  position: relative; }
+
+.vertical .steps li .step-text {
+  align-self: center;
+  color: #0568ae;
+  display: block;
+  margin: 0;
+  position: relative;
+  font-size: 14px;
+  top: 0; }
+
+.vertical .steps li .step-text[data-large-text]:before {
+  content: attr(data-large-text) " "; }
+
+.vertical .steps li:after {
+  background-color: transparent;
+  border-left: 4px solid #d2d2d2;
+  content: "";
+  height: 60px;
+  left: 0;
+  margin: 0;
+  padding: 0;
+  position: absolute;
+  top: 0;
+  width: 4px; }
+
+.vertical .steps li.step-on:after,
+.vertical .steps li.step-done:after {
+  border-color: #0568ae; }
+
+.b2b-step-tracker {
+  height: auto;
+  padding: 0px 0px 0px 0px; }
+  .b2b-step-tracker .btn.btn-left {
+    margin-right: 10px; }
+  .b2b-step-tracker .btn.btn-right {
+    margin-left: 5px; }
+  .b2b-step-tracker .b2b-left-arrow {
+    float: left;
+    margin-top: -5px; }
+  .b2b-step-tracker .b2b-right-arrow {
+    float: right;
+    margin-top: -5px; }
+  .b2b-step-tracker .b2b-steps {
+    display: flex;
+    height: 5px;
+    margin-top: 30px;
+    position: relative; }
+    .b2b-step-tracker .b2b-steps li {
+      color: #767676;
+      flex: 1;
+      margin-right: 5px;
+      background-color: #767676;
+      outline: 1px solid transparent;
+      height: 3px; }
+      .b2b-step-tracker .b2b-steps li.b2b-step-done {
+        background-color: #1b7e28;
+        color: #007a3e;
+        height: 3px; }
+      .b2b-step-tracker .b2b-steps li.b2b-step-on {
+        background-color: #333333;
+        color: #333333;
+        height: 3px;
+        font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+      .b2b-step-tracker .b2b-steps li .b2b-step-text {
+        bottom: 29px;
+        display: inline-block;
+        font-size: 14px;
+        margin-top: 0;
+        position: relative;
+        white-space: nowrap; }
+      .b2b-step-tracker .b2b-steps li .b2b-step-text[data-large-text]:before {
+        content: attr(data-large-text) " "; }
+    .b2b-step-tracker .b2b-steps li:first-child {
+      border-radius: 2px 0 0 2px; }
+    .b2b-step-tracker .b2b-steps li:last-child {
+      margin-right: 0;
+      border-radius: 0 2px 2px 0; }
+
+@media (max-width: 1024px) {
+  .b2b-step-tracker {
+    padding: 25px 0; }
+    .b2b-step-tracker .b2b-steps {
+      margin-top: 0; }
+      .b2b-step-tracker .b2b-steps li .b2b-step-text {
+        display: none; }
+      .b2b-step-tracker .b2b-steps li .b2b-step-text[data-sm-text]:before {
+        content: attr(data-sm-text) " ";
+        color: #333333; }
+      .b2b-step-tracker .b2b-steps li.b2b-step-on .b2b-step-text {
+        bottom: 6px;
+        display: block;
+        font-size: 10px;
+        left: 0;
+        line-height: 1;
+        margin-top: 10px;
+        position: absolute;
+        top: 4px; } }
+
+.strength-meter-container {
+  height: 26px;
+  max-width: 450px; }
+
+.strength-meter-gauge {
+  border-radius: 2px;
+  background-color: #d2d2d2;
+  height: 5px;
+  display: block;
+  position: relative;
+  outline: 1px solid transparent; }
+
+.strength-meter-gauge-fill {
+  height: 100%;
+  display: block;
+  border-radius: 2px;
+  text-indent: -9999px;
+  width: 0%;
+  border: 2px solid transparent; }
+
+.strength-meter-gauge-fill.strength-meter-animate {
+  transition: width 0.5s linear, background-color 0.5s linear; }
+
+.strength-meter-animate[style*="20"] {
+  background-color: #cf2a2a; }
+
+.strength-meter-animate[style*="20"] + .strength-meter-divider + .strength-meter-content:after {
+  content: "Unacceptable"; }
+
+.strength-meter-animate[style*="40"] {
+  background-color: #ea7400; }
+
+.strength-meter-animate[style*="40"] + .strength-meter-divider + .strength-meter-content:after {
+  content: "Weak"; }
+
+.strength-meter-animate[style*="60"] {
+  background-color: #ea7400; }
+
+.strength-meter-animate[style*="60"] + .strength-meter-divider + .strength-meter-content:after {
+  content: "Fair"; }
+
+.strength-meter-animate[style*="80"] {
+  background-color: #007a3e; }
+
+.strength-meter-animate[style*="80"] + .strength-meter-divider + .strength-meter-content:after {
+  content: "Good"; }
+
+.strength-meter-animate[style*="100"] {
+  background-color: #007a3e; }
+
+.strength-meter-animate[style*="100"] + .strength-meter-divider + .strength-meter-content:after {
+  content: "Excellent"; }
+
+.strength-meter-divider {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  display: flex;
+  overflow: hidden; }
+
+.strength-meter-divider span {
+  background: transparent;
+  display: block;
+  flex-grow: 1;
+  border-right: solid 1px #fff; }
+
+.strength-meter-divider span:first-child {
+  border-radius: 2px 0 0 2px; }
+
+.strength-meter-divider span + .strength-meter-divider span {
+  border-radius: 0; }
+
+.strength-meter-divider span:last-child {
+  border-radius: 0 2px 2px 0;
+  border-right: 0; }
+
+.strength-meter-content {
+  font-size: 14px;
+  line-height: 1;
+  padding-top: 7px;
+  position: absolute; }
+
+.strength-meter-content:before {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  content: "Password strength: "; }
+
+.strength-meter-content:after {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.strength-meter-container {
+  height: 26px;
+  min-width: 290px;
+  max-width: 450px; }
+
+.strength-meter-container .strength-meter-gauge {
+  border-radius: 2px;
+  background-color: #cccccc;
+  box-shadow: 0 1px 1px -1px #333 inset;
+  height: 5px;
+  display: block;
+  overflow: hidden;
+  position: relative; }
+
+.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill {
+  height: 100%;
+  box-shadow: 0 1px 1px -1px #999 inset;
+  display: block;
+  text-indent: -9999px;
+  width: 0%; }
+
+.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill.strength-meter-animate {
+  transition: width 0ms ease-out, background-color 0ms ease-in; }
+
+.strength-meter-container > .strength-meter-gauge > .strength-meter-divider {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  display: flex; }
+
+.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span {
+  background: transparent;
+  display: block;
+  flex-grow: 1;
+  border-right: solid 1px #fff; }
+
+.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span:last-child {
+  border-right: 0; }
+
+.strength-meter-container > .strength-meter-content {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  line-height: 1;
+  padding-top: 7px; }
+
+.strength-meter-container > .strength-meter-content:before {
+  content: none; }
+
+.strength-meter-container > .strength-meter-content > .strength-meter-content-state {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial; }
+
+.btn-switch-label {
+  display: flex;
+  align-items: center; }
+  .btn-switch-label:focus .btn-switch {
+    outline: 1px dotted #666;
+    outline-offset: 5px; }
+  .btn-switch-label input:focus .btn-switch {
+    outline: 1px dotted #666;
+    outline-offset: 5px; }
+  .btn-switch-label > span {
+    flex: 1; }
+
+.btn-switch {
+  background-color: #fff;
+  border: 1px solid #d2d2d2;
+  border-radius: 16px;
+  box-shadow: 0 4px 5px -5px rgba(0, 0, 0, 0.15) inset, 0 5px 5px -5px rgba(0, 0, 0, 0.15);
+  height: 32px;
+  overflow: hidden;
+  position: relative;
+  width: 80px;
+  user-select: none; }
+  .btn-switch input[type="checkbox"] {
+    left: 0;
+    margin: 0;
+    opacity: 0;
+    position: absolute;
+    top: 0;
+    transition: none; }
+    .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on .activo {
+      font: 0px/0 "Omnes-ECOMP-W02"; }
+    .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on + .btn + .btn-slider-off .inactivo {
+      font: 0px/0 "Omnes-ECOMP-W02"; }
+  .btn-switch input:checked + .switch-overlay {
+    left: 0;
+    transition: all .3s linear .0s; }
+    .btn-switch input:checked + .switch-overlay .switch-handle {
+      background-color: #007a3e;
+      background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);
+      transition: background-color 0.3s linear 0s;
+      border: 1px solid transparent; }
+  .btn-switch input + .switch-overlay {
+    left: -48px;
+    transition: all .3s linear .0s; }
+    .btn-switch input + .switch-overlay .switch-handle {
+      background-color: #f2f2f2;
+      background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
+      transition: background-color 0.3s linear 0s;
+      border: 1px solid #d2d2d2; }
+  .btn-switch input[disabled] + .switch-overlay {
+    left: 0;
+    width: 100% !important;
+    background-color: #d2d2d2;
+    color: #959595;
+    cursor: not-allowed !important; }
+    .btn-switch input[disabled] + .switch-overlay .btn-slider-on {
+      display: none; }
+    .btn-switch input[disabled] + .switch-overlay .activo {
+      display: none; }
+    .btn-switch input[disabled] + .switch-overlay .switch-handle {
+      display: none; }
+    .btn-switch input[disabled] + .switch-overlay .btn-slider-off {
+      left: 0;
+      text-align: center;
+      padding: 0; }
+  .btn-switch input[disabled]:checked + .switch-overlay {
+    left: 0;
+    width: 100% !important;
+    background-color: #fff; }
+    .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off {
+      display: none; }
+      .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off + .inactivo {
+        display: none; }
+    .btn-switch input[disabled]:checked + .switch-overlay .switch-handle {
+      display: none; }
+    .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-on {
+      display: block;
+      text-align: center;
+      padding: 0;
+      color: #007a3e !important;
+      font-weight: bold; }
+    .btn-switch input[disabled]:checked + .switch-overlay .activo {
+      display: block;
+      text-align: center;
+      padding: 0;
+      color: #007a3e !important;
+      font-weight: bold; }
+  .btn-switch input[disabled]:checked + .btn-slider-on {
+    display: block; }
+  .btn-switch input[disabled] + .btn-slider-on + .switch-handle {
+    width: 100%;
+    margin: 0; }
+    .btn-switch input[disabled] + .btn-slider-on + .switch-handle + .btn-slider-off {
+      display: block; }
+  .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on {
+    display: none; }
+    .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo {
+      border: medium none;
+      color: #666;
+      font: 16px/32px "Omnes-ECOMP-W02";
+      height: auto;
+      margin: 0 auto;
+      width: auto; }
+      .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo:before {
+        display: none; }
+    .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {
+      display: block;
+      padding: 0;
+      text-align: center;
+      color: #333333; }
+      .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo {
+        border: medium none;
+        color: #666;
+        font: 16px/32px "Omnes-ECOMP-W02";
+        height: auto;
+        margin: 0 auto;
+        width: auto; }
+        .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo:before {
+          display: none; }
+  .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on {
+    display: block;
+    padding: 0;
+    text-align: center;
+    color: #007a3e; }
+    .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {
+      display: none; }
+  .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .activo {
+    color: #007a3e;
+    font-weight: bold; }
+
+.switch-overlay {
+  border-radius: 16px;
+  color: black !important;
+  font-size: 1.6rem;
+  height: 32px;
+  left: 0;
+  position: absolute;
+  top: -1px;
+  width: 126px;
+  overflow: hidden; }
+
+.btn-slider-on {
+  left: -1px;
+  text-align: left;
+  padding-left: 12px;
+  display: inline-block;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  height: 32px;
+  line-height: 32px;
+  position: absolute;
+  top: 1px;
+  width: 80px; }
+
+.btn-slider-off {
+  display: inline-block;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  height: 32px;
+  line-height: 32px;
+  position: absolute;
+  top: 1px;
+  width: 80px;
+  right: 1px;
+  text-align: right;
+  padding-right: 11px; }
+
+.switch-handle {
+  border-radius: 50%;
+  display: inline-block;
+  height: 26px;
+  left: 50px;
+  position: absolute;
+  top: 3px;
+  width: 26px; }
+
+.activo {
+  display: block;
+  font-size: 0.1px;
+  line-height: 40px;
+  overflow: hidden; }
+  .activo:before {
+    background-image: none;
+    border-left: 3px solid #007a3e;
+    content: " ";
+    height: 18px;
+    left: 22px;
+    margin: 2px auto;
+    position: absolute;
+    top: 5px;
+    width: 0; }
+
+.inactivo {
+  font-size: 0.1px;
+  line-height: 40px; }
+  .inactivo:before {
+    background-image: none;
+    border: 3px solid #959595;
+    border-radius: 100%;
+    content: " ";
+    display: block;
+    position: absolute;
+    top: 4px;
+    right: 3px;
+    height: 16px;
+    width: 16px; }
+
+table {
+  max-width: 100%;
+  background-color: transparent;
+  border-collapse: collapse;
+  border-spacing: 0;
+  width: 100%;
+  margin-bottom: 20px; }
+
+table caption {
+  text-align: left; }
+
+table thead th {
+  vertical-align: bottom; }
+
+table th,
+table td {
+  padding: 19px 20px;
+  line-height: 1;
+  font-size: 1.4rem;
+  text-align: left;
+  vertical-align: top;
+  word-wrap: break-word; }
+
+table th {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 1.6rem;
+  font-weight: normal;
+  color: #333333;
+  padding: 13px 20px; }
+
+table tbody td {
+  border-left: 1px solid #d2d2d2;
+  border-top: 1px solid #d2d2d2; }
+
+table tbody td:first-child {
+  border-left: none; }
+
+.tiny-accordion.iconleft.accordion-table-layout .toggle-header,
+.tiny-accordion.iconleft.accordion-table-layout .toggle-header + .accordion-content,
+.tiny-accordion.iconleft.accordion-table-layout .inactive-toggle-header {
+  padding: 0 0 0 50px; }
+
+.faux-table-cell,
+.inactive-toggle-header .faux-table-cell {
+  display: table-cell;
+  width: 100%;
+  padding: 13px 0 10px 0;
+  font-size: 16px;
+  color: #333333; }
+
+.accordion-content .faux-table-cell {
+  display: table-cell;
+  width: 100%;
+  padding: 0 0 10px 0; }
+
+.faux-table-cell:last-child {
+  text-align: right;
+  min-width: 100px;
+  max-width: 150px;
+  width: 1%;
+  background-color: #f2f2f2;
+  color: #333333;
+  font-size: 14px;
+  border-left: 1px solid #d2d2d2;
+  padding: 0 20px 0 10px; }
+
+.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {
+  opacity: 1; }
+
+.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {
+  opacity: 0;
+  transition: opacity .3s linear .2s; }
+
+@media (max-width: 767px) {
+  table th,
+  table td {
+    padding: 19px 10px; }
+  table th:first-child,
+  table td:first-child {
+    padding: 19px 15px; } }
+
+.data-row-list ul > li {
+  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important; }
+
+table {
+  border-bottom: 1px solid #d2d2d2; }
+
+table th,
+table td {
+  padding: 15px 15px 10px; }
+
+.data-row .col-1 {
+  white-space: nowrap;
+  padding: 15px 15px 0 15px;
+  position: relative;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.4rem;
+  border-top: 1px solid #d2d2d2; }
+
+.data-row.has-button .col-1 {
+  padding: 0; }
+
+.complex-table .data-row .col-1 {
+  color: #0568ae;
+  cursor: pointer; }
+
+.data-row.opened {
+  box-shadow: 0 -2px 0 0 #d2d2d2; }
+
+.data-row.opened td,
+.data-row.opened th {
+  border-left: 1px solid transparent;
+  border-bottom: 1px solid transparent; }
+
+.data-row.opened + .data-row-list {
+  box-shadow: 0 1px 0 0 #d2d2d2; }
+
+.data-row.opened + .data-row-list > td {
+  padding-top: 0; }
+
+.data-row.opened + .data-row-list + .data-row.opened {
+  box-shadow: 0 -1px 0 0 #d2d2d2; }
+
+.data-row button {
+  background-color: transparent;
+  border: medium none;
+  border-radius: 0;
+  color: #0568ae;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.4rem;
+  left: 0;
+  margin: 0;
+  padding: 12px 15px 7px;
+  position: relative;
+  text-align: left;
+  top: 0;
+  vertical-align: middle; }
+
+.data-row button:focus {
+  outline: 1px dotted black; }
+
+.data-row .col-1 i {
+  top: -1px;
+  margin-right: 10px;
+  display: inline-block !important; }
+
+.data-row-list th:first-child {
+  background-color: inherit !important;
+  border-top: none;
+  padding: 0 15px 15px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.4rem; }
+
+.data-row-list ul {
+  margin: 0 0 0 30px; }
+
+.data-row-list ul > li:before {
+  display: none; }
+
+.data-row-list ul > li {
+  /* background-image in tables.less */
+  background-position: left 13px;
+  background-repeat: repeat-x;
+  background-size: 4px 1px;
+  display: table;
+  padding-left: 0;
+  width: 100%; }
+
+.data-row-list li div {
+  display: table-cell;
+  background-color: white;
+  float: left;
+  text-align: left;
+  padding-left: 0;
+  padding-right: 7px; }
+
+.data-row-list li div + div {
+  float: right;
+  text-align: right;
+  padding-right: 0;
+  padding-left: 7px; }
+
+.complex-table td:nth-child(1),
+.complex-table td:nth-child(2),
+.complex-table td:nth-child(3),
+.complex-table td:nth-child(4),
+.complex-table td:nth-child(5),
+.complex-table td:nth-child(6),
+.complex-table td:nth-child(7),
+.complex-table td:nth-child(8),
+.complex-table td:nth-child(9) {
+  white-space: nowrap; }
+
+th:nth-child(8) {
+  word-wrap: break-word;
+  word-spacing: 0; }
+
+.align-col-right {
+  text-align: right; }
+
+.complex-table th:not(:first-child),
+.complex-table td:not(:first-child) {
+  text-align: right; }
+
+.striped tbody > tr td {
+  background-color: transparent !important; }
+
+.striped tbody > tr.data-row.odd,
+.striped tbody > tr.data-row.odd + .data-row-list,
+.striped tbody > tr.data-row.odd + .data-row-list li div {
+  background-color: #f2f2f2 !important; }
+
+.striped tbody > tr:not('.data-row'):nth-child(even) {
+  background-color: #f2f2f2; }
+
+.b2b-table-div .selectWrap {
+  width: 290px;
+  position: relative;
+  left: 10px;
+  display: inline-table;
+  margin-bottom: 0px; }
+
+.b2b-external-sort-div {
+  float: right;
+  padding-bottom: 25px; }
+
+.b2b-external-sort-div .sortButton {
+  font-size: 36px;
+  border: 1px solid #ccc;
+  background: #FFF;
+  border-radius: 6px; }
+
+.b2b-external-sort-label {
+  padding-bottom: 10px; }
+
+.b2b-external-sort-div a:hover {
+  cursor: pointer; }
+
+.b2b-external-sort-div a:hover, .b2b-external-sort-div a:focus {
+  text-decoration: none; }
+
+.b2b-external-sort-label label {
+  position: relative;
+  left: 10px; }
+
+.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {
+  background: 0 0;
+  cursor: default; }
+
+.tablesorter-default .tablesorter-header .tablesorter-header-inner {
+  /*  background-image: url(images/tables/upanddown.png);*/
+  background-position: center right;
+  background-repeat: no-repeat;
+  cursor: pointer;
+  white-space: normal;
+  display: inline-block;
+  vertical-align: baseline;
+  zoom: 1;
+  *display: inline;
+  *vertical-align: auto;
+  /*  padding: 0 24px 0 0;*/ }
+
+.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {
+  padding: 0; }
+
+.tablesorter-default .tablesorter-header.tablesort-sortable .tablesorter-header-inner span {
+  margin-right: 24px;
+  display: inline-block; }
+
+/*
+.tablesorter-default thead .headerSortUp .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner {
+  background-image: url(images/tables/up.png);
+}
+
+.tablesorter-default thead .headerSortDown .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {
+  background-image: url(images/tables/down.png);
+}
+*/
+.tablesorter-default thead .headerSortUp .tablesorter-header-inner,
+.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,
+.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner,
+.tablesorter-default thead .headerSortDown .tablesorter-header-inner,
+.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,
+.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {
+  padding-right: 0;
+  line-height: 16px; }
+
+.tablesorter-default thead .headerSortUp .tablesorter-header-inner:after,
+.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner:after,
+.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner:after {
+  font-family: 'icoPrimary' !important;
+  speak: none;
+  font-style: normal;
+  font-size: 24px;
+  font-weight: normal;
+  font-variant: normal;
+  text-transform: none;
+  line-height: 14px;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  -webkit-user-select: none;
+  user-select: none;
+  content: "\ea3c";
+  /*    position: relative;*/
+  position: absolute;
+  text-decoration: inherit;
+  display: inline-block;
+  transform: rotate(180deg);
+  margin-left: -22px;
+  margin-top: 2px; }
+
+.tablesorter-default thead .headerSortDown .tablesorter-header-inner:after,
+.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner:after,
+.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner:after {
+  font-family: 'icoPrimary' !important;
+  speak: none;
+  font-style: normal;
+  font-size: 24px;
+  font-weight: normal;
+  font-variant: normal;
+  text-transform: none;
+  line-height: 14px;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  -webkit-user-select: none;
+  user-select: none;
+  content: "\ea3c";
+  /*    position: relative;*/
+  position: absolute;
+  text-decoration: inherit;
+  display: inline-block;
+  margin-left: -22px;
+  margin-top: 2px; }
+
+.tablesorter-search-highlight {
+  font-weight: 700; }
+
+.tablesorter-headerRow th:focus {
+  outline: thin dotted #666;
+  outline-offset: -1px; }
+
+.b2b-table-message {
+  font-family: "Omnes-ECOMP-W02", Arial; }
+  .b2b-table-message .b2b-magnify-glass {
+    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20enable-background%3D%22new%200%200%2036%2036%22%3E%3Cpath%20d%3D%22M27.847%208.26c-1.805-1.803-4.202-2.795-6.751-2.795-2.548%200-4.945.993-6.749%202.796-1.803%201.803-2.796%204.2-2.796%206.75%200%201.879.543%203.681%201.576%205.242l-7.059%207.059c-.357.356-.554.831-.554%201.336-.001.505.196.98.554%201.337.357.356.832.552%201.336.552.503%200%20.977-.196%201.336-.553l7.047-7.048c1.576%201.062%203.402%201.622%205.309%201.622%202.55%200%204.948-.993%206.751-2.796%201.803-1.804%202.796-4.201%202.796-6.751%200-2.549-.993-4.947-2.796-6.751zm-6.761.96c3.186%200%205.778%202.592%205.778%205.778%200%203.186-2.592%205.778-5.778%205.778-3.186%200-5.778-2.592-5.778-5.778%200-3.185%202.592-5.778%205.778-5.778z%22%20fill%3D%22%23767676%22%2F%3E%3C%2Fsvg%3E");
+    background-repeat: no-repeat;
+    background-position: center;
+    height: 50px; }
+  .b2b-table-message .b2b-alert {
+    font-size: 50px; }
+  .b2b-table-message .b2b-loading-dots {
+    font-size: 50px;
+    margin-bottom: 20px; }
+  .b2b-table-message .b2b-message {
+    text-align: center;
+    padding-bottom: 45px;
+    padding-top: 40px;
+    border-style: solid;
+    border-width: 1px;
+    border-top: none;
+    padding-bottom: 45px;
+    border-color: #d2d2d2;
+    width: 100%;
+    min-height: 220px; }
+  .b2b-table-message .b2b-error-title {
+    font-family: "Omnes-ECOMP-W02", Arial;
+    color: #444444;
+    line-height: 26px;
+    margin-top: 10px; }
+  .b2b-table-message .b2b-message-title {
+    color: #444;
+    font-family: "Omnes-ECOMP-W02", Arial; }
+
+.b2b-table-scrollbar {
+  border: 1px solid;
+  width: 651px; }
+  .b2b-table-scrollbar .b2b-table-inner-container {
+    width: 650px;
+    padding-left: 150px;
+    overflow-x: scroll; }
+  .b2b-table-scrollbar th:first-child {
+    background-color: #FFFFFF; }
+  .b2b-table-scrollbar td:first-child {
+    background-color: #FFFFFF;
+    border-top: 1px solid #cccccc;
+    border-right: 1px solid #cccccc;
+    margin-top: -0.5px; }
+  .b2b-table-scrollbar tr {
+    th: nth-child(2), td; }
+    .b2b-table-scrollbar tr :nth-child(2) {
+      border-left: none; }
+  .b2b-table-scrollbar tr:last-child > td:first-child {
+    border-bottom: 1px solid #cccccc; }
+
+.b2b-scrollbar-arrow-left {
+  float: left;
+  margin: 10px; }
+
+.b2b-scrollbar-arrow-right {
+  float: right;
+  clear: right;
+  margin: 10px; }
+  .b2b-scrollbar-arrow-right.btn-arrow .btn {
+    margin-right: 0; }
+
+.b2b-table-scrollbar ::-webkit-scrollbar {
+  height: 10px; }
+
+.b2b-table-scrollbar ::-webkit-scrollbar-thumb {
+  background: #666666;
+  border-radius: 5px; }
+
+.tabs {
+  margin-left: 0;
+  margin-bottom: 20px;
+  list-style: none; }
+
+.tabs > li > a {
+  display: block; }
+
+.tabs > li > a:hover,
+.tabs > li > a:focus {
+  text-decoration: none;
+  background-color: #d2d2d2; }
+
+.tabs > .pull-right {
+  float: right; }
+
+.tabs:before,
+.tabs:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.tabs:after {
+  clear: both; }
+
+.tabs > li {
+  float: left; }
+
+.tabs > li > a {
+  padding-right: 20px;
+  padding-left: 20px;
+  margin-right: 3px;
+  line-height: 16px; }
+
+.tabs {
+  margin: 0; }
+
+.tabs > li {
+  margin-bottom: -1px; }
+
+.tabs > li:first-child {
+  margin-left: 20px; }
+
+.tabs > li > a {
+  padding: 12px 20px;
+  border: 1px solid #d2d2d2;
+  border-radius: 6px 6px 0 0;
+  background-color: #f2f2f2;
+  color: #5a5a5a;
+  border-color: #d2d2d2; }
+
+.tabs > li > a {
+  margin-right: 6px; }
+
+.tabs > li > a,
+.tabs > li > a:hover,
+.tabs > li > a:focus {
+  background-image: none;
+  background-color: #ffffff;
+  color: #5a5a5a;
+  border-color: #d2d2d2;
+  border-bottom: 1px solid transparent;
+  cursor: pointer; }
+
+.tabs.tabs-justified,
+.tabs.promo-tabs {
+  width: 100%;
+  border-bottom: 0;
+  margin-bottom: -1px; }
+
+.tabs.tabs-justified > li,
+.tabs.promo-tabs > li {
+  display: table-cell;
+  float: none;
+  width: 1%;
+  border-left: 1px solid #d2d2d2; }
+
+.tabs.tabs-justified > li.active,
+.tabs.promo-tabs > li.active {
+  position: relative;
+  z-index: 1000; }
+
+.tabs.tabs-justified > li > a {
+  padding-right: 5px;
+  padding-left: 5px; }
+
+.tabs.tabs-justified > li > a,
+.tabs.promo-tabs > li > a {
+  text-align: center; }
+
+.tabs.promo-tabs > li > a {
+  padding: 0;
+  margin: 0;
+  border-radius: 0;
+  border: none;
+  color: #0568ae;
+  font-size: 1.2rem;
+  text-align: center;
+  padding: 6px 10px 10px;
+  border-top: 4px solid #e6e6e6;
+  filter: none;
+  border-bottom: 1px solid #d2d2d2;
+  background-color: #f9f9f9; }
+
+.tabs > li:last-child > a {
+  margin-right: 0; }
+
+.tabs.promo-tabs > li.active > a {
+  color: #333333;
+  border-top: 4px solid #ea7400;
+  border-bottom-color: white;
+  background-color: #fff !important;
+  filter: none;
+  cursor: default; }
+
+.tabs.promo-tabs > li:first-child {
+  border-left: none; }
+
+.tabs.promo-tabs > li > a img {
+  max-width: inherit;
+  max-height: 39px;
+  margin: 0 auto 5px auto;
+  display: block; }
+
+.tabbable:before,
+.tabbable:after {
+  display: table;
+  content: "";
+  line-height: 0; }
+
+.tabbable:after {
+  clear: both; }
+
+.tab-content {
+  overflow: auto;
+  border: 1px solid #e6e6e6; }
+
+.tabs.promo-tabs + .tab-content {
+  border: none;
+  border-bottom: 1px solid #e6e6e6; }
+
+.tab-content > .tab-pane {
+  padding: 10px 15px; }
+
+.tab-content.noborder {
+  border: none; }
+
+.tab-content.noborder > .tab-pane {
+  padding: 0; }
+
+.tab-content > .tab-pane {
+  display: none; }
+
+.tab-content > .active {
+  display: block; }
+
+.tabs.promo-tabs > li > a {
+  font-size: 2.0rem;
+  height: 70px;
+  padding: 20px 20px 24px;
+  background-color: #FFFFFF;
+  border-top: 5px solid #FFFFFF;
+  white-space: nowrap; }
+
+.tabs.promo-tabs > li.active > a {
+  border-top: 5px solid #0574ac; }
+
+.tabs.promo-tabs > li > a:hover {
+  color: #333333; }
+
+.tabs.promo-tabs > li {
+  width: auto; }
+
+.tabs > li[disabled="disabled"] > a:hover {
+  cursor: not-allowed; }
+
+.b2b-tags {
+  background-color: #f2f2f2;
+  -webkit-transition: all .3s ease-out;
+  -moz-transition: all .3s ease-out;
+  transition: all .3s ease-out;
+  margin: 3px 5px 3px 0;
+  padding: 2px 15px;
+  border-radius: 6px;
+  border: 1px solid #c9c9c9;
+  display: inline-block; }
+  .b2b-tags .tags__item {
+    font-size: 14px;
+    vertical-align: baseline;
+    zoom: 1;
+    color: #333; }
+    .b2b-tags .tags__item i {
+      color: #0574ac;
+      font-size: 14px;
+      font-weight: bold;
+      margin-left: 10px; }
+      .b2b-tags .tags__item i:hover {
+        cursor: pointer; }
+    .b2b-tags .tags__item i:focus {
+      outline: thin dotted #666; }
+    .b2b-tags .tags__item:last-child {
+      margin-right: 0; }
+    .b2b-tags .tags__item:hover {
+      text-decoration: none; }
+    .b2b-tags .tags__item:focus {
+      outline: 1px dotted #666; }
+
+.tooltip-size-control {
+  display: block; }
+
+.tooltip {
+  display: inline-block;
+  height: 20px;
+  vertical-align: middle;
+  margin: 1px 0 0 7px; }
+
+p .tooltip {
+  margin: -3px 7px 0 0; }
+
+label .tooltip {
+  margin: 1px 0 0 7px; }
+
+.tooltip .icon-primary-tooltip {
+  background: none;
+  border: none;
+  display: inline-block;
+  font-size: 20px;
+  height: 20px;
+  margin: 0;
+  position: relative;
+  width: 20px; }
+
+.tooltip .icon-primary-tooltip:before {
+  top: 0; }
+
+.tooltip .icon-primary-tooltip:focus {
+  text-decoration: none;
+  outline: 1px dotted black; }
+
+.tooltip.active .icon-primary-tooltip:focus {
+  outline: none; }
+
+.tooltip .arrow {
+  display: none;
+  border-color: transparent;
+  border-style: solid;
+  background-color: #0568ae;
+  height: 20px;
+  width: 20px;
+  position: absolute;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  opacity: 0;
+  transform: rotate(45deg); }
+
+.tooltip.active .icon-primary-tooltip[data-placement="top"] .arrow {
+  display: block;
+  bottom: 32px;
+  top: auto;
+  border-width: 0 1px 1px 0; }
+
+.tooltip.active .icon-primary-tooltip[data-placement="bottom"] .arrow {
+  border-width: 1px 0 0 1px;
+  display: block;
+  bottom: -33px;
+  top: auto; }
+
+.tooltip.active .arrow {
+  opacity: 1; }
+
+.tooltip .closingtooltip {
+  display: block; }
+
+.tooltip.active .closingtooltip {
+  display: none; }
+
+.tooltip-wrapper {
+  position: absolute;
+  margin-top: 20px;
+  left: 15px;
+  right: 15px;
+  display: none;
+  opacity: 0;
+  z-index: 1010;
+  text-align: left; }
+
+.helpertext {
+  background-color: #0568ae;
+  border: 1px solid transparent;
+  border-radius: 6px;
+  color: #fff;
+  display: none;
+  margin: 0;
+  padding: 25px;
+  position: relative;
+  text-align: left;
+  width: 100%;
+  top: 0;
+  z-index: 1009; }
+
+.tooltip .helpertext {
+  position: absolute; }
+
+.tooltip.active .icon-primary-tooltip[data-placement="bottom"] + .tooltip-wrapper .helpertext {
+  bottom: inherit;
+  top: 19px; }
+
+.tooltip.active .icon-primary-tooltip[data-placement="top"] + .tooltip-wrapper .helpertext {
+  top: inherit;
+  bottom: 38px; }
+
+.tooltip.active .tooltip-wrapper {
+  opacity: 1;
+  display: block;
+  margin-top: 0; }
+
+.tooltip.active .tooltip-wrapper .helpertext {
+  display: block; }
+
+.tooltip-onclick .btn.icon-primary-tooltip {
+  border: medium none;
+  box-shadow: none;
+  color: #0568ae;
+  font-size: 20px;
+  height: 34px;
+  line-height: 36px;
+  margin: 0;
+  min-width: 50px;
+  padding: 0;
+  position: absolute;
+  right: 0;
+  top: 0; }
+
+.tooltip-onclick .icon-primary-tooltip:before {
+  display: inline;
+  position: relative; }
+
+.tooltip-onclick textarea + .reset-field + .icon-primary-tooltip {
+  top: 4px;
+  right: 5px;
+  min-width: 40px; }
+
+.tooltip-onclick.active .helpertext:before,
+.tooltip-onfocus.active .helpertext:before {
+  background-color: #0568ae;
+  border-color: transparent;
+  border-style: solid;
+  border-width: 1px 1px 0 0;
+  content: "";
+  display: block;
+  height: 15px;
+  left: 17px;
+  margin: 0;
+  position: absolute;
+  top: -7px;
+  transform: rotate(-45deg);
+  width: 15px; }
+
+.tooltip-onclick.active .helpertext {
+  display: block;
+  opacity: 1;
+  margin: 14px 0 0; }
+
+.tooltip-onclick.active .helpertext:before {
+  left: inherit;
+  right: 18px; }
+
+.tooltip-onclick .reset-field {
+  right: 37px; }
+
+.tooltip-onclick .reset-field:before {
+  position: relative;
+  top: -1px; }
+
+.tooltip-onfocus.active .helpertext {
+  display: block;
+  margin: 14px 0 10px 0; }
+
+.popover-title {
+  display: block;
+  font-size: 14px;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-weight: bold;
+  margin-bottom: 8px;
+  white-space: normal; }
+
+.popover-content {
+  display: block;
+  font-size: 12px;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  line-height: 1.5rem;
+  white-space: normal; }
+
+.popover-content span,
+.popover-content p {
+  line-height: 1.5rem; }
+
+.popover-content p:last-child {
+  margin-bottom: 0; }
+
+.tooltip .tooltip-element {
+  position: relative; }
+
+.tooltip .icon-primary-tooltip:hover {
+  text-decoration: none; }
+
+.tooltip.active .tooltip-element[data-placement="top"] .arrow {
+  display: block;
+  bottom: 32px;
+  top: auto; }
+
+.tooltip.active .tooltip-element[data-placement="bottom"] .arrow {
+  display: block;
+  border-color: transparent transparent #0574ac;
+  bottom: -33px;
+  top: auto; }
+
+.tooltip.active .tooltip-element[data-placement="bottom"] + .tooltip-wrapper .helpertext {
+  bottom: inherit;
+  top: 19px; }
+
+.tooltip.active .tooltip-element[data-placement="top"] + .tooltip-wrapper .helpertext {
+  top: inherit;
+  bottom: 38px; }
+
+.b2b-tree {
+  padding: 0 10px 0 10px;
+  width: 320px; }
+  .b2b-tree ul {
+    list-style: none;
+    list-style-type: none; }
+  .b2b-tree a {
+    display: block;
+    padding: 0 0 5px 30px;
+    line-height: 22px;
+    margin-left: -10px;
+    font-size: 1.4rem;
+    outline-offset: -1px; }
+  .b2b-tree li:focus {
+    outline: none; }
+    .b2b-tree li:focus > a {
+      outline: thin dotted #666;
+      outline-offset: -1px; }
+  .b2b-tree ul li {
+    border-left: 1px solid #ccc; }
+    .b2b-tree ul li.bg > a {
+      color: #333;
+      background-image: url("../style/images/treebg.png"); }
+    .b2b-tree ul li .b2b-tree-tooltip {
+      display: none;
+      position: absolute;
+      top: -25px;
+      left: 100%;
+      white-space: nowrap;
+      margin-left: 10px;
+      z-index: 1010;
+      font-family: "Omnes-ECOMP-W02", Arial;
+      font-size: 12px; }
+    .b2b-tree ul li .b2b-tree-tooltip-content {
+      background-color: #0568ae;
+      margin-left: 9px;
+      border-radius: 6px;
+      color: #fff;
+      padding: 25px; }
+    .b2b-tree ul li .b2b-tree-arrow-left {
+      width: 0;
+      height: 0;
+      border-top: 10px solid transparent;
+      border-bottom: 10px solid transparent;
+      border-right: 10px solid #0568ae;
+      position: absolute;
+      top: 25px; }
+    .b2b-tree ul li.activeTooltip > a .b2b-tree-tooltip {
+      display: block; }
+  .b2b-tree ul ul {
+    padding: 0 0 0 20px; }
+  .b2b-tree ul > li {
+    position: relative;
+    line-height: 18px; }
+  .b2b-tree a > span.b2b-tree-node-icon {
+    background-color: #FFF;
+    display: inline;
+    margin: 0;
+    padding: 0;
+    position: absolute;
+    left: -11px;
+    top: 0;
+    line-height: 14px;
+    width: 11px; }
+    .b2b-tree a > span.b2b-tree-node-icon > i {
+      font-size: 20px; }
+  .b2b-tree a:only-child {
+    color: #0574ac; }
+    .b2b-tree a:only-child > span.b2b-tree-node-icon {
+      left: -11px;
+      border-radius: 50%;
+      line-height: 7px;
+      top: 0; }
+      .b2b-tree a:only-child > span.b2b-tree-node-icon > i {
+        background-color: inherit;
+        background: #fff; }
+  .b2b-tree a > span.b2b-tree-node-icon > i.icon-primary-circle {
+    background-color: inherit;
+    background: #fff;
+    font-size: 10px; }
+  .b2b-tree a.b2b-locked-node:after {
+    content: "\ec58";
+    float: right;
+    font-family: 'icoSecurityalerts' !important; }
+  .b2b-tree a:hover .b2b-locked-node:after {
+    text-decoration: none; }
+  .b2b-tree ul li:first-child > a:only-child > span.b2b-tree-node-icon {
+    left: -11px;
+    border-radius: 50%;
+    line-height: 12px; }
+  .b2b-tree ul li:last-child > a:only-child > span.b2b-tree-node-icon {
+    height: 27px;
+    background-color: #fff; }
+  .b2b-tree li a + ul {
+    height: 0;
+    overflow: hidden; }
+  .b2b-tree li a.active + ul {
+    height: auto;
+    overflow: visible; }
+  .b2b-tree li a.grp {
+    font-family: "Omnes-ECOMP-W02-Italic", Arial; }
+    .b2b-tree li a.grp.active {
+      color: #333; }
+  .b2b-tree span.end {
+    left: -6px !important;
+    top: 5px !important; }
+  .b2b-tree span.first-link {
+    width: 3px !important;
+    height: 15px !important;
+    top: 0px !important;
+    left: -2px !important;
+    background: #fff; }
+
+.b2b-tree-checkbox {
+  padding: 0 10px 0 10px;
+  width: 320px; }
+  .b2b-tree-checkbox ul {
+    list-style: none;
+    list-style-type: none; }
+  .b2b-tree-checkbox a {
+    display: block;
+    padding: 0 0 5px 30px;
+    line-height: 22px;
+    margin-left: -10px;
+    font-size: 14px;
+    outline-offset: -1px; }
+  .b2b-tree-checkbox li:focus {
+    outline: none; }
+    .b2b-tree-checkbox li:focus > a {
+      outline: thin dotted #666;
+      outline-offset: -1px; }
+  .b2b-tree-checkbox ul li {
+    border-left: 1px solid #ccc; }
+  .b2b-tree-checkbox ul ul {
+    padding: 0 0 0 20px; }
+  .b2b-tree-checkbox ul > li {
+    position: relative;
+    line-height: 18px; }
+  .b2b-tree-checkbox a > span.nodeIcon {
+    background-color: #FFF;
+    display: inline;
+    margin: 0;
+    padding: 0;
+    position: absolute;
+    left: -11px;
+    top: 0;
+    line-height: 14px;
+    width: 11px; }
+    .b2b-tree-checkbox a > span.nodeIcon > i {
+      font-size: 20px; }
+    .b2b-tree-checkbox a > span.nodeIcon.end {
+      margin-top: 10px; }
+  .b2b-tree-checkbox a:only-child {
+    color: #0574ac; }
+    .b2b-tree-checkbox a:only-child > span.nodeIcon {
+      left: -11px;
+      border-radius: 50%;
+      line-height: 7px;
+      top: 0; }
+      .b2b-tree-checkbox a:only-child > span.nodeIcon > i {
+        background-color: inherit;
+        background: #fff; }
+  .b2b-tree-checkbox a > span.nodeIcon > i.icon-primary-circle {
+    background-color: inherit;
+    background: #fff;
+    font-size: 10px; }
+  .b2b-tree-checkbox ul li:first-child > a:only-child > span {
+    left: -11px;
+    border-radius: 50%;
+    line-height: 12px;
+    top: 0px; }
+  .b2b-tree-checkbox ul li:first-child > a:only-child > span.end {
+    margin-top: 0px; }
+  .b2b-tree-checkbox ul li:first-child > a:only-child > span i.icon-primary-circle {
+    top: 8px; }
+  .b2b-tree-checkbox ul li:last-child > a:only-child > span {
+    height: 34px;
+    background-color: #fff; }
+  .b2b-tree-checkbox li a + ul {
+    height: 0;
+    overflow: hidden; }
+  .b2b-tree-checkbox li a.active + ul {
+    height: auto; }
+  .b2b-tree-checkbox li a.grp {
+    font-family: "Omnes-ECOMP-W02-Italic", Arial; }
+  .b2b-tree-checkbox span.end {
+    left: -6px !important; }
+  .b2b-tree-checkbox .checkbox {
+    margin-bottom: 0px;
+    margin-top: 2px;
+    font-size: 14px; }
+    .b2b-tree-checkbox .checkbox input:indeterminate + .skin:after {
+      content: "\2014";
+      padding-left: 2px;
+      font-family: inherit !important;
+      line-height: inherit !important; }
+  .b2b-tree-checkbox span.first-link {
+    width: 3px !important;
+    height: 15px !important;
+    top: 0px !important;
+    left: -2px !important;
+    background: #fff; }
+
+.b2b-widget-window {
+  width: 147px;
+  right: 5px;
+  top: 60px;
+  position: absolute;
+  border: 1px solid #ccc;
+  background-color: #fff;
+  border-radius: 8px;
+  z-index: 1000; }
+  .b2b-widget-window li {
+    margin: 15px; }
+
+.b2b-widget-container {
+  background-color: #fff;
+  border-radius: 8px;
+  border: 1px solid #ccc;
+  position: relative; }
+  .b2b-widget-container .b2b-widget-header {
+    font-family: "Omnes-ECOMP-W02", Arial;
+    color: #333;
+    height: 55px;
+    padding-left: 15px;
+    padding-top: 19px; }
+    .b2b-widget-container .b2b-widget-header .header {
+      font-size: 18px; }
+  .b2b-widget-container .b2b-widget-header-icons {
+    font-size: 16px;
+    color: #0574ac; }
+
+.b2b-widget-header-icons button {
+  border: none;
+  background: transparent;
+  color: #0574ac; }
+  .b2b-widget-header-icons button:focus {
+    outline-style: solid;
+    outline-width: 1px;
+    outline-color: #0574ac; }
+  .b2b-widget-header-icons button:first-child {
+    margin-right: 0px; }
+
+.b2b-widget-container .b2b-widget-content {
+  height: 325px;
+  margin: 0;
+  padding: 20px;
+  position: relative;
+  border-top: 1px solid #ccc; }
+
+.b2b-widget-content .form-row:first-child {
+  margin-top: 0; }
+
+.b2b-widget-header-icons button.icoControls-gear:focus, .b2b-widget-header-icons button.icon-primary-close:focus {
+  outline: thin dotted #666; }
+
+.b2b-widget-header .icon-primary-close:before {
+  content: '-';
+  display: inline-block;
+  margin: 0;
+  padding: 0;
+  outline: none; }
+
+.b2b-widget-window .arrow_box {
+  background: #fff;
+  border: 1px solid #ccc; }
+
+.b2b-widget-window.arrow_box:after, .b2b-widget-window.arrow_box:before {
+  bottom: 100%;
+  left: 75%;
+  border: solid transparent;
+  content: " ";
+  height: 0;
+  width: 0;
+  position: absolute;
+  pointer-events: none; }
+
+.b2b-widget-window.arrow_box:after {
+  border-color: rgba(255, 255, 255, 0);
+  border-bottom-color: #fff;
+  border-width: 10px;
+  margin-left: 1px; }
+
+.b2b-widget-window.arrow_box:before {
+  border-color: rgba(204, 204, 204, 0);
+  border-bottom-color: #ccc;
+  border-width: 11px;
+  margin-left: 0px; }
+
+/************************** Overrides for Filters ***************************/
+.filter-container .filter-header h2 {
+  line-height: 1 !important;
+  margin: 0 !important; }
+
+.filter-container .icon-primary-spinner:before {
+  content: none; }
+
+.filter-container .fixed-230-subnav {
+  margin: 10px !important;
+  width: inherit !important; }
+
+.filter-container .unlinked:focus {
+  outline: thin dotted #666 !important; }
+
+.filter-container .unlinked.active {
+  color: inherit !important; }
+
+.filter-container .fixed-230-subnav a > i {
+  background: none; }
+
+.filter-container .fixed-230-subnav ul {
+  margin: 0 0 10px 10px; }
+
+/************************** Overrides for Filters ***************************/
+.row .filter-container {
+  background-color: #fff; }
+
+.filter-header {
+  overflow: hidden;
+  padding: 20px 0;
+  position: relative; }
+
+.filter-header h2 {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 2.4rem;
+  margin-bottom: 0; }
+
+.filter-selected {
+  border-top: 1px solid #ccc;
+  padding-top: 20px; }
+
+.filter-selected > span {
+  font-size: 1.3rem;
+  text-transform: uppercase; }
+
+.filter-selected > a.clear-all-filters {
+  float: right;
+  font-size: 1.4rem; }
+
+.filter-selected > span,
+.filter-selected > a.clear-all-filters {
+  font-family: Omnes-ECOMP-W02-Medium, Arial; }
+
+.filter-selected-group {
+  padding-top: 15px; }
+
+.filter-selected-badge {
+  background-color: #f2f2f2;
+  border-radius: 15px;
+  display: inline-block;
+  font-size: 1.4rem;
+  margin-bottom: 10px;
+  padding: 0 0 0 12px; }
+
+.filter-selected-badge .icoControls-optionsoff {
+  background: transparent none repeat scroll 0 0;
+  border: medium none;
+  font-size: 2.5em;
+  margin: 0;
+  padding: 0; }
+
+.filters .fixed-230-subnav > ng-transclude > div:first-child {
+  border-top: 1px solid #ccc; }
+
+.filters .fixed-230-subnav > ng-transclude > div {
+  border-bottom: 1px solid #ccc; }
+
+.filter-results {
+  align-items: center;
+  border-bottom: 1px solid #ccc;
+  display: flex;
+  flex-wrap: wrap;
+  height: 50px;
+  -webkit-justify-content: space-between;
+  -ms-flex-pack: justify;
+  justify-content: space-between; }
+
+.filter-results-sortby > span {
+  text-transform: uppercase; }
+
+.filter-results-view .icon-primary-content-gridguide {
+  font-size: 2em;
+  margin-right: 0; }
+
+.filter-container .fixed-230-subnav > ng-transclude > div > a {
+  font-size: 1.8rem;
+  margin: 0;
+  padding: 15px 20px 15px 0;
+  color: #0574ac !important;
+  cursor: pointer !important;
+  font-family: "Omnes-ECOMP-W02", Arial !important;
+  outline-offset: inherit !important;
+  position: relative;
+  height: auto;
+  width: auto; }
+
+.filter-container .fixed-230-subnav a > i {
+  right: 0;
+  top: 15px; }
+
+.filter-container .fixed-230-subnav .icon-primary-collapsed:before, .filter-container .fixed-230-subnav .icon-primary-expanded:before {
+  float: right; }
+
+.filter-container .fixed-230-subnav ul.collapse {
+  position: inherit;
+  transition: height 0.5s ease;
+  height: 0;
+  overflow: hidden; }
+
+.filter-container .checkbox .icon-primary-spinner {
+  height: 24px;
+  position: absolute;
+  width: 24px; }
+
+.fixed-230-subnav.affix {
+  margin: -28px 0 0; }
+
+#nav-menu .b2b-menu,
+#nav-menu .fixed-230-subnav {
+  margin: 0; }
+
+.b2b-menu > li,
+.fixed-230-subnav > div {
+  border-bottom: 1px solid #ccc;
+  line-height: 4.0rem; }
+
+.b2b-menu > li:first-child,
+.fixed-230-subnav > li:first-child {
+  border-top: 1px solid #ccc; }
+
+.b2b-menu div > a,
+.fixed-230-subnav div > a {
+  color: #0574ac;
+  cursor: pointer;
+  display: block;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 1.4rem;
+  margin: 0;
+  outline-offset: -1px;
+  padding: 0 10px;
+  position: relative; }
+
+.fixed-230-subnav div > a.live {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  color: #666; }
+
+.fixed-230-subnav > ng-transclude > div li > a {
+  display: block;
+  font-size: 1.4rem;
+  line-height: 20px; }
+
+.fixed-230-subnav > ng-transclude > div li > a.active {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  text-decoration: none;
+  color: #666; }
+
+#nav-menu .fixed-230-subnav a > i {
+  top: 10px; }
+
+.fixed-230-subnav > li > a.active > i:after {
+  display: none; }
+
+.b2b-menu ul,
+.fixed-230-subnav ul {
+  margin: 0 0 10px 0; }
+
+.b2b-menu ul div a,
+.fixed-230-subnav ul div a {
+  padding: 0 10px; }
+
+.unlinked {
+  outline: medium none !important;
+  text-decoration: none !important; }
+
+@media (max-width: 1024px) {
+  .filter-container .fixed-230-subnav {
+    margin: 0 20px;
+    width: auto; }
+  .filter-container .fixed-230-subnav > li {
+    margin: 0; }
+  .row .filter-container {
+    display: none;
+    height: 100%;
+    left: 0;
+    position: fixed;
+    overflow: auto;
+    top: 0;
+    transition: all 0.5s ease 0s;
+    width: 285px;
+    z-index: 9999; }
+  .filter-header {
+    padding-left: 20px; }
+  .filter-selected {
+    margin: 0 20px 10px; } }
+
+.b2b-pane-selector-wrapper {
+  width: 100%;
+  display: block;
+  border-top: solid 1px #ccc;
+  border-bottom: solid 1px #ccc; }
+  .b2b-pane-selector-wrapper .side-nav {
+    width: 20% !important;
+    display: inline-block;
+    float: left; }
+  .b2b-pane-selector-wrapper .pane-container {
+    width: 80%;
+    vertical-align: top;
+    margin: 0;
+    padding-top: 30px;
+    border-left: solid 1px #ccc;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    display: none; }
+    .b2b-pane-selector-wrapper .pane-container.active {
+      display: inline-block; }
+    .b2b-pane-selector-wrapper .pane-container .pane-container-top {
+      padding-left: 15px; }
+    .b2b-pane-selector-wrapper .pane-container .panes {
+      display: -webkit-flex;
+      display: flex;
+      border-top: solid 1px #ccc;
+      margin-top: 30px; }
+      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block {
+        height: inherit;
+        overflow-y: auto;
+        border-right: solid 1px #ccc;
+        position: relative;
+        flex: 1;
+        -webkit-flex: 1;
+        /* Safari 6.1+ */
+        -ms-flex: 1;
+        /* IE 10 */ }
+        .b2b-pane-selector-wrapper .pane-container .panes div.pane-block:focus {
+          outline: dotted 1px #333333; }
+    .b2b-pane-selector-wrapper .pane-container .search-block {
+      position: relative;
+      float: right; }
+      .b2b-pane-selector-wrapper .pane-container .search-block input[type="search"]:focus {
+        padding-right: 40px; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row p {
+      margin-top: 15px; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div {
+      border-bottom: solid 1px #ccc; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row {
+      display: block;
+      padding: 19px 14px 19px 14px;
+      margin-top: 0px;
+      border: dotted 1px transparent;
+      border-bottom: solid 1px #ccc; }
+      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:focus {
+        border: dotted 1px #333333 !important; }
+      .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:last-child {
+        border-bottom: none; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block > .no-content {
+      text-align: center;
+      border-bottom: none;
+      display: block;
+      position: absolute;
+      top: 45%;
+      left: 0;
+      right: 0; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div:last-child {
+      border-bottom: none; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row span.margin-chk {
+      margin: 15px 15px 0px 15px;
+      float: left; }
+    .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row .checkbox-selectall {
+      margin: 0px 0 0 24px !important; }
+  .b2b-pane-selector-wrapper .side-nav li {
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    border: none;
+    border-top: solid 1px #ccc;
+    display: block !important;
+    width: auto !important;
+    margin-left: 0px !important; }
+    .b2b-pane-selector-wrapper .side-nav li.active {
+      background-color: #f6f6f6;
+      position: inherit !important; }
+      .b2b-pane-selector-wrapper .side-nav li.active > a {
+        font-size: 16px;
+        color: #333;
+        text-decoration: none;
+        border: none;
+        background-color: transparent;
+        padding: 20px 15px;
+        display: block;
+        height: auto;
+        border-left: 4px solid #0574ac; }
+    .b2b-pane-selector-wrapper .side-nav li > a {
+      font-size: 16px;
+      color: #333;
+      text-decoration: none;
+      border: none;
+      background-color: transparent;
+      padding: 20px 15px;
+      display: block;
+      height: auto;
+      text-align: left; }
+    .b2b-pane-selector-wrapper .side-nav li > a:focus {
+      border-right: dotted 1px #333333; }
+    .b2b-pane-selector-wrapper .side-nav li:first-child {
+      border-top: none;
+      margin-left: none !important; }
+/********************* Utility CSS Starts **********************/
+.offscreen-text {
+  position: absolute;
+  left: -10000px;
+  top: auto;
+  width: 1px;
+  height: 1px;
+  overflow: hidden; }
+
+/********************* Utility CSS Ends **********************/
+/* Fix for alignment issue on Cancel link inside modal */
+.b2b-modal-footer > .cta-button-group {
+  line-height: 40px; }
+
+/* .att-dark-green { // Not used
+  color: #007a3e;
+} */
+.colors-off-msg {
+  display: none; }
+
+button .colors-off-msg {
+  position: relative; }
+
+.ds2-no-colors .colors-off-msg {
+  display: block; }
+
+.ds2-no-colors [data-colordatatext] button .colors-off-msg {
+  font-size: 1.1rem;
+  line-height: normal;
+  padding: 5px 0;
+  position: absolute;
+  top: 0;
+  white-space: normal;
+  width: 60px; }
+
+/* Not used
+.make-all-white * {
+  color: #fff;
+}
+.make-all-white a {
+  text-decoration: underline;
+} */
+.loader > span {
+  display: block;
+  padding-top: 20px; }
+
+.modal > .loader {
+  left: 50%;
+  margin-left: -25px;
+  margin-top: -25px;
+  position: absolute;
+  top: 50%; }
+
+#pageLevelLoader.modal {
+  background-color: transparent;
+  border: none;
+  box-shadow: none;
+  top: 40%; }
+
+.modal.fade .loader {
+  display: none; }
+
+.modal.fade.in .loader {
+  display: block; }
+
+.btn.disabled[data-loading-text] {
+  padding: 0 19px 0 18px;
+  line-height: 46px; }
+
+.btn.disabled[data-loading-text] img {
+  position: relative;
+  top: 2px; }
+
+/*  Seems to already be in docs.css
+.fixed-230.leftnav {
+  position: relative;
+}
+.fixed-230-subnav {
+  margin: 10px;
+}
+.fixed-230-subnav > li:first-child {
+  border-top: none;
+}
+.fixed-230-subnav > li {
+  border-bottom: 1px solid #d2d2d2;
+}
+.fixed-230-subnav > li > a {
+  display: block;
+  font-size: 1.4rem;
+  line-height: normal;
+  margin: 0 -9px;
+  padding: 11px 35px 12px 9px;
+  outline-offset: 0;
+  position: relative;
+}
+.fixed-230-subnav > li > a.live {
+  color: #333333;
+  font-family: "Omnes-ECOMP-W02-Medium";
+}
+.fixed-230-subnav a > i {
+  right: 10px;
+  margin: 0;
+  position: absolute;
+  top: 10px;
+}
+.fixed-230-subnav a > i:after {
+  display: none;
+}
+.fixed-230-subnav > li li > a {
+  display: block;
+  font-size: 1.4rem;
+  line-height: 18px;
+}
+.fixed-230-subnav > li li > a.active {
+  color: #333333;
+  font-family: "Omnes-ECOMP-W02-Medium";
+  text-decoration: none;
+}
+.fixed-230-subnav ul {
+  margin: 0 0 10px;
+} */
+.unlinked {
+  color: #0568ae !important;
+  font-family: "Omnes-ECOMP-W02" !important; }
+
+.unlinked.active {
+  color: inherit !important; }
+
+/* @media (max-width: 767px) {
+  .row.has-leftnav {
+    flex-wrap: wrap;
+  }
+  .row.has-leftnav .fluid-space {
+    padding-right: 0;
+  }
+  .row .fixed-230 {
+    background-color: #fff;
+    width: auto;
+  }
+  .row .leftnav {
+    background-color: #fff !important;
+    display: block !important;
+  }
+  .fixed-230-subnav {
+    margin: 10px 0 0;
+    width: 100%;
+  }
+  .fixed-230-subnav > li {
+    margin-left: -15px;
+    margin-right: -15px;
+  }
+  .fixed-230-subnav > li:first-child {
+    border-top: 1px solid #d2d2d2;
+  }
+  .fixed-230-subnav > li > a {
+    margin: 0;
+  }
+  .fixed-230-subnav a:hover,
+  .fixed-230-subnav a:focus {
+    text-decoration: none !important;
+  }
+  .fixed-230-subnav > li li > a {
+    padding: 5px 10px;
+  }
+  .fixed-230-subnav > li li > a.active {
+    color: inherit;
+    font-family: "Omnes-ECOMP-W02-Medium";
+  }
+} */
+@keyframes DOMinsertion {
+  from {
+    outline-color: transparent; }
+  to {
+    outline-color: transparent; } }
+
+@-moz-keyframes DOMinsertion {
+  from {
+    outline-color: transparent; }
+  to {
+    outline-color: transparent; } }
+
+@-webkit-keyframes DOMinsertion {
+  from {
+    outline-color: transparent; }
+  to {
+    outline-color: transparent; } }
+
+@-ms-keyframes DOMinsertion {
+  from {
+    outline-color: transparent; }
+  to {
+    outline-color: transparent; } }
+
+@-o-keyframes DOMinsertion {
+  from {
+    outline-color: transparent; }
+  to {
+    outline-color: transparent; } }
+
+.ajaxed,
+.modal.fade.in .b2b-modal-header,
+.modal.fade.in .b2b-modal-body,
+.modal.fade.in .b2b-modal-footer {
+  animation-duration: 0.01s;
+  -o-animation-duration: 0.01s;
+  -ms-animation-duration: 0.01s;
+  -moz-animation-duration: 0.01s;
+  -webkit-animation-duration: 0.01s;
+  animation-name: DOMinsertion;
+  -o-animation-name: DOMinsertion;
+  -ms-animation-name: DOMinsertion;
+  -moz-animation-name: DOMinsertion;
+  -webkit-animation-name: DOMinsertion; }
+
+.dda-css-override ul.nav-tabs {
+  margin-bottom: 0; }
+
+.dda-css-override div.tab-content {
+  margin-top: 0;
+  border-top: none; }
+
+.dda-css-override .tab-content .prettyprint, .dda-css-override .usage .prettyprint {
+  max-height: 500px;
+  overflow-y: auto; }
+
+.formsWithinProcessButton {
+  margin-right: 0px; }
+
+.heading-sub-section-form {
+  font-size: 2.4rem;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  margin-bottom: 20px;
+  margin-top: 10px; }
+
+.heading-small-form {
+  font-size: 1.6rem;
+  font-family: "Omnes-ECOMP-W02, Arial";
+  margin-top: 0px; }
+
+.icon-primary-form-sizeL {
+  font-size: 50px; }
+
+.icon-primary-form-size {
+  font-size: 30px; }
+
+.spanformfix {
+  margin-right: 15px !important; }
+
+@media (max-width: 767px) {
+  .heading-sub-section-form {
+    font-size: 1.8rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-bottom: 20px;
+    padding-top: 10px;
+    margin-top: 30px; }
+  .heading-small-form {
+    font-size: 1.4rem;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    margin-top: 0px; } }
+
+@media (max-width: 479px) {
+  .icon-primary-form-resizeL {
+    display: none; }
+  .icon-primary-form-resize {
+    display: none; }
+  .heading-center-form {
+    margin-left: 20px; } }
+
+@media (min-width: 480px) {
+  .icon-primary-form-resizeL {
+    display: none; }
+  .icon-primary-form-resize {
+    display: inherit; }
+  .icon-primary-center-min {
+    margin-top: 30px; } }
+
+@media (min-width: 768px) {
+  .icon-primary-form-resizeL {
+    display: inherit;
+    margin-top: 30px; }
+  .icon-primary-form-resize {
+    display: none; }
+  .center-form-align {
+    margin-top: 35px; } }
+
+@media (min-width: 1024px) {
+  .icon-primary-form-resizeL {
+    display: inherit;
+    margin-top: 0px; }
+  .icon-primary-form-resize {
+    display: none; }
+  .center-form-align {
+    margin-top: 5px; } }
+
+.data-row.has-button td.col-1 {
+  padding: 0; }
+
+.tab-content > .tab-pane {
+  display: none; }
+
+.tab-content > .active {
+  display: block; }
+
+.icon-primary-circle:before {
+  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");
+  content: "";
+  position: absolute;
+  top: 0;
+  z-index: 1; }
+
+.icon-primary-primary-circle:before {
+  background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");
+  content: "";
+  position: absolute;
+  top: 0;
+  z-index: 1; }
+/* Flyout inputs color is not aligned */
+textarea, input {
+  color: #333; }
+
+.isIE .btn-primary.btn:focus::after,
+.isIE .btn-specialty.btn:focus::after,
+.isIE .btn-alt.btn:focus::after {
+  border: 1px dashed #fff !important; }
+.b2b-config-section-container {
+  height: auto;
+  min-height: 330px;
+  width: 815px;
+  background-color: #fff;
+  border: 1px solid #ccc;
+  display: inline-table;
+  border-radius: 6px; }
+
+.b2b-config-section-first-div {
+  border-right: 1px solid #ccc;
+  height: auto;
+  min-height: 330px; }
+
+.b2b-config-section-icon-primary-font {
+  font-size: 50px;
+  height: 31px;
+  line-height: 31px; }
+
+.b2b-config-section-padding {
+  padding: 20px 20px 15px 15px;
+  height: auto; }
+
+.b2b-config-sec-flyout {
+  position: relative;
+  left: 10px;
+  float: right;
+  color: #0574ac;
+  font-size: 16px;
+  font-family: "Omnes-ECOMP-W02", Arial; }
+
+.b2b-config-sec-divider {
+  border-bottom: 1px solid #ccc; }
+
+.b2b-confi-sec-span-border {
+  border-right: 1px solid;
+  height: auto; }
+
+.b2b-config-sec-speed-div {
+  text-align: center;
+  margin-top: 20px; }
+
+.b2b-config-sec-label-font {
+  font-size: 16px; }
+
+.b2b-config-sec-expander-main {
+  padding: 0 5px 0px 15px; }
+
+.b2b-config-sec-expander-body .b2b-config-vlan-padding {
+  padding: 5px 15px 10px 0px; }
+
+.b2b-conif-sec-row-height {
+  height: 110px; }
+
+.b2b-config-sec-expander-body {
+  font-size: 14px; }
+  .b2b-config-sec-expander-body .b2b-config-vlan-data {
+    font-family: "Omnes-ECOMP-W02-Medium", Arial;
+    padding-left: 15px; }
+
+.b2b-config-sec-expander-body-first-div {
+  border-top: 1px solid #ccc; }
+
+.b2b-config-sec-expander-body .tooltip {
+  position: static;
+  opacity: 1; }
+
+.b2b-config-section-container .row > [class*="span"] {
+  margin-right: 0px; }
+
+.b2b-config-vlan-icons {
+  font-size: 16px;
+  float: right;
+  margin-right: 0px; }
+
+.b2b-config-section-container .span6 {
+  width: 50%; }
+
+.b2b-config-sec-data-link-style {
+  position: relative;
+  left: 95%;
+  top: 30px;
+  border-radius: 50%;
+  width: 23px;
+  height: 23px;
+  background: #fff;
+  border: 1px solid #ccc;
+  color: #666666; }
+
+.b2b-config-sec-text-align {
+  text-align: center;
+  margin-top: 15px;
+  margin-bottom: 35px;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 14px;
+  color: #333333; }
+
+.b2b-config-port-text-align {
+  text-align: center;
+  margin-top: 15px;
+  margin-bottom: 8px;
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 14px;
+  color: #333333; }
+
+.b2b-config-port-text-label {
+  margin-top: 6px;
+  margin-bottom: 8px;
+  font-size: 14px;
+  text-align: center; }
+
+.b2b-confi-sec-last-div p {
+  font-size: 14px;
+  padding: 10px 15px 0 15px; }
+
+.b2b-confi-sec-router-label {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 16px;
+  color: #333333;
+  float: left;
+  width: 100%;
+  margin-bottom: 7px; }
+
+.b2b-config-vlan-label {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 14px;
+  color: #333333;
+  margin-top: 1px;
+  margin-bottom: 9px; }
+
+.b2b-config-vlan-info {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  color: #333333;
+  margin-bottom: 1px; }
+  .b2b-config-vlan-info .icon-misc-pen {
+    padding-left: 7px; }
+
+.b2b-confi-sec-model-label {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  color: #333333; }
+
+.b2b-confi-sec-router-info {
+  float: left;
+  width: 62%; }
+
+.b2b-config-sec-speed-sec {
+  border-right: 1px solid #ccc; }
+
+.b2b-config-sec-speed-label {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 20px;
+  color: #333333;
+  text-align: center; }
+  .b2b-config-sec-speed-label i {
+    margin-left: 15px;
+    font-size: 16px; }
+
+.b2b-config-sec-yellow-flag-div {
+  width: 1.6%;
+  background-color: #ffb18c; }
+
+.b2b-config-sec-expander-icons {
+  margin-top: 6px; }
+  .b2b-config-sec-expander-icons .icon-misc-trash {
+    margin-right: 10px; }
+
+.b2b-config-sec-yellow-flag .b2b-config-sec-expander-icons {
+  left: 40px; }
+
+.b2b-config-sec-expander-body-icons .icon-misc-pen {
+  position: relative;
+  left: 18px; }
+.b2b-directory-listing .listBox {
+  height: 310px;
+  width: 450px;
+  padding-left: 1px;
+  padding-right: 1px;
+  font-family: "Omnes-ECOMP-W02", Arial; }
+
+.b2b-directory-listing .listBox:focus {
+  outline: thin dotted #666; }
+
+.b2b-directory-listing .b2b-directory-listing-no-results {
+  font-weight: bold; }
+
+.b2b-directory-listing .b2b-directory-listing-list {
+  font-family: "Omnes-ECOMP-W02", Arial;
+  color: #5a5a5a;
+  overflow-x: hidden;
+  position: relative;
+  height: 300px;
+  border: 1px solid #333;
+  border-radius: 6px;
+  margin-bottom: 10px; }
+
+.b2b-directory-listing .b2b-directory-listing-item {
+  margin: 1px;
+  border: 1px solid transparent;
+  outline: none;
+  text-align: left;
+  overflow: hidden;
+  cursor: pointer;
+  padding-top: 13px;
+  padding-bottom: 7px;
+  padding-left: 15px;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -ms-user-select: none;
+  word-wrap: break-word; }
+  .b2b-directory-listing .b2b-directory-listing-item:focus {
+    border: 1px #3399FF solid; }
+
+.b2b-directory-listing .b2b-directory-listing-item-selected {
+  color: #fff;
+  background-color: #3399FF; }
+
+.b2b-directory-listing input[type="text"] {
+  padding-right: 30px; }
+  .b2b-directory-listing input[type="text"]:focus, .b2b-directory-listing input[type="text"]:hover {
+    padding-right: 30px; }
+
+.b2b-directory-listing .row .btns {
+  margin-right: 90px;
+  margin-left: -115px;
+  margin-top: 100px; }
+
+.b2b-directory-listing .btn-right {
+  margin-bottom: 15px !important; }
+  .b2b-directory-listing .btn-right:after {
+    content: "  \27A1"; }
+
+.b2b-directory-listing .btn-left {
+  margin-top: 10px !important; }
+
+.b2b-directory-listing .btn-remove {
+  margin-right: auto !important;
+  margin-bottom: 15px; }
+
+.b2b-directory-listing .btn-remove-all {
+  margin-top: 0;
+  margin-bottom: 61px !important;
+  /* need to be removed */
+  margin-right: auto !important; }
+
+.b2b-directory-listing .btn-add-all {
+  margin-top: 0;
+  margin-bottom: 61px !important; }
+
+.b2b-directory-listing .btn-left:before {
+  content: "\2B05  "; }
+
+.b2b-directory-listing .btn-search[class*="btn"] {
+  right: 0.09rem; }
+
+.b2b-directory-listing .btn {
+  width: 130px; }
+
+.b2b-directory-listing-disabled {
+  cursor: not-allowed; }
+
+.b2b-directory-listing-label-heading {
+  margin-top: 24px;
+  padding-bottom: 5px; }
+
+.b2b-dl-list-box option {
+  padding-top: 13px;
+  padding-bottom: 7px;
+  padding-left: 15px; }
+
+.b2b-dl-modal-button-div {
+  padding-top: 110px;
+  text-align: center; }
+.b2b-tmpl-notification-card {
+  border-radius: 6px;
+  height: auto;
+  width: 420px;
+  background-color: #ffffff;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: 8px;
+  overflow: hidden; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-header {
+    padding-left: 30px;
+    font-family: "Omnes-ECOMP-W02", Arial;
+    color: #333333;
+    font-size: 24px;
+    margin-top: 2px;
+    display: inline-block;
+    min-height: 60px;
+    position: relative; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-body {
+    padding: 0 30px 20px;
+    position: relative; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-header-title {
+    margin-top: 10px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button {
+    box-shadow: 0 -50px 0 0 #f2f2f2 inset;
+    height: 69px;
+    position: absolute;
+    border-color: #f2f2f2 #f2f2f2 transparent transparent;
+    border-style: solid;
+    border-width: 35px;
+    height: 0;
+    right: -295px;
+    top: -4px;
+    width: 69px;
+    /*Old properties */
+    box-shadow: none;
+    transform: none; }
+    .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close {
+      height: 48px;
+      right: -40px;
+      top: -40px;
+      width: 48px;
+      position: relative;
+      /*Old properties */
+      transform: none; }
+      .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:before {
+        color: #0568ae;
+        display: block;
+        font-size: 20px;
+        height: auto;
+        right: -4px;
+        top: 4px;
+        width: auto;
+        /*Old properties */
+        left: auto;
+        height: auto;
+        bottom: auto; }
+      .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:focus {
+        outline: 1px dotted black; }
+  .b2b-tmpl-notification-card button.close {
+    -webkit-appearance: none;
+    moz-appearance: none;
+    appearance: none; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-icon-primary-cirlce {
+    width: 30px;
+    height: 30px;
+    border-radius: 50%; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-outer-cirlce {
+    background: #f0f5f5;
+    border-radius: 50%;
+    height: 16px;
+    width: 16px;
+    vertical-align: middle; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-inner-cirlce {
+    background: #fff;
+    width: 22px;
+    height: 22px;
+    position: relative;
+    border-radius: 50%;
+    display: block;
+    left: 4px;
+    top: 4px;
+    border: 1px solid #767676; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-row {
+    padding-top: 10px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-sub-header {
+    margin-top: 0px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item {
+    background-color: #fff;
+    margin-top: 25px;
+    border-top: 1px solid #ccc; }
+    .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item .cta-button-group {
+      line-height: 40px;
+      padding-top: 20px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-edit-section .cta-button-group {
+    line-height: 40px;
+    padding-top: 15px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-add-item-container {
+    padding-top: 30px; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-link-active {
+    pointer-events: none;
+    cursor: default;
+    color: #ccc; }
+  .b2b-tmpl-notification-card .b2b-tmpl-card-cursor:hover {
+    cursor: pointer; }
+.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon {
+  text-align: center;
+  margin-top: 91px; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon i {
+    font-size: 99px;
+    color: #1b7e28; }
+
+.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading {
+  color: #333333;
+  text-align: center;
+  margin-top: 20px; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading h1 {
+    font-size: 38px; }
+
+.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading {
+  color: #333333;
+  text-align: center; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading h5 {
+    font-size: 18px; }
+
+.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info {
+  padding-left: 18%;
+  font-size: 16px;
+  margin-top: 20px; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info ul {
+    list-style-type: disc;
+    list-style-position: inside; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info li {
+    padding-top: 5px; }
+
+.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section {
+  font-size: 15px;
+  color: #0574ac;
+  margin-top: 20px;
+  text-align: center;
+  margin-bottom: 55px; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section .b2b-tmpl-order-confirmation-link {
+    margin-right: 8%; }
+  .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section a {
+    cursor: pointer; }
+.b2b-tmpl-profile-block-container {
+  min-height: 200px;
+  height: auto;
+  background-color: #fff;
+  border-radius: 8px;
+  border: 1px solid #ccc;
+  box-shadow: 0px 1px 1px 1px #ccc;
+  display: inline-table;
+  margin: 15px 15px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-title {
+    font-weight: bold; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-footer {
+    margin-bottom: 12px;
+    margin-top: 5px;
+    height: 35px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p {
+    word-wrap: break-word;
+    height: 61px; }
+    .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:first-child {
+      margin-top: 10px; }
+    .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:after {
+      content: ' ';
+      display: block;
+      border: 0.2px solid #ccc;
+      margin-top: 12px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio {
+    margin-left: 15px;
+    height: 30px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details div {
+    padding: 2px 7px;
+    font-size: 14px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio-label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details a {
+    font-size: 14px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p span {
+    padding-left: 10px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon {
+    color: #1b7e28;
+    float: right;
+    position: relative;
+    left: 10px; }
+    .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon i {
+      color: #1b7e28;
+      float: right; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-link {
+    float: right;
+    position: relative;
+    left: -4px; }
+  .b2b-tmpl-profile-block-container a.link-profile {
+    position: relative;
+    left: -5px;
+    float: right;
+    margin-bottom: 16px; }
+  .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-radio {
+    position: relative;
+    top: -5px; }
+.b2b-static-route-container {
+  padding-left: 32px;
+  display: inline-block; }
+
+.b2b-static-route-label-heading {
+  font-family: "Omnes-ECOMP-W02-Medium", Arial;
+  font-size: 16px !important;
+  color: #333333;
+  font-style: normal;
+  text-align: left; }
+
+label.b2b-static-route-label-heading {
+  margin-bottom: 12px;
+  margin-top: 15px;
+  display: block; }
+
+#b2b-static-route-input {
+  margin: 5px 0 5px; }
+
+.b2b-static-route-list {
+  margin-bottom: 30px;
+  width: 216px;
+  float: left;
+  margin-right: 20px;
+  max-height: 540px;
+  overflow-y: auto; }
+  .b2b-static-route-list .status-text {
+    flex: 1;
+    display: flex;
+    align-items: center;
+    outline: 0; }
+
+.b2b-static-route-list-item {
+  border: 1px #cccccc solid;
+  font-family: "Omnes-ECOMP-W02", Arial;
+  font-size: 14px;
+  display: flex;
+  cursor: pointer; }
+  .b2b-static-route-list-item > .status-bar {
+    padding: 20px 0 20px;
+    background-color: #ea7400;
+    border-radius: 0;
+    width: 10px;
+    display: inline-block;
+    margin-right: 20px;
+    height: 100%;
+    float: left; }
+    .b2b-static-route-list-item > .status-bar:after {
+      content: '.';
+      visibility: hidden; }
+  .b2b-static-route-list-item > .status-bar-unedited {
+    padding: 20px 0 20px;
+    background-color: #ffb81c;
+    border-radius: 0;
+    width: 10px;
+    display: inline-block;
+    margin-right: 20px;
+    height: 100%;
+    float: left;
+    background-color: transparent; }
+    .b2b-static-route-list-item > .status-bar-unedited:after {
+      content: '.';
+      visibility: hidden; }
+
+.b2b-static-route-list-item:focus {
+  outline: 1px dashed #00f; }
+
+.b2b-static-route-list-item--selected {
+  background: #f2f2f2; }
+
+.b2b-static-route-content {
+  display: inline-block; }
+
+
+/*
+To Remove later
+*/
+
+.selectWrap::after { 
+  align-items: center; 
+  background-position: 7px 7px; 
+  background-repeat: no-repeat; 
+  background-size: auto 23px; 
+  border-left: 1px solid transparent; 
+  color: #0568ae; 
+  display: flex; 
+  font-size: 23px; 
+  height: 36px; 
+  margin-right: 0; 
+  overflow: hidden; 
+  position: absolute; 
+  right: 0; 
+  text-indent: 7px; 
+  top: 0; 
+  user-select: none; 
+  width: 41px; 
+  z-index: 0; 
+  position: absolute !important; 
+  display: flex !important; 
 }
\ No newline at end of file
index 8c30ec5..addbd91 100644 (file)
@@ -19,4 +19,8 @@ scope.toggleDrawer = function(showmenu){
        }
        else
                document.getElementById('page-content').style.paddingLeft = "230px";            
-};
\ No newline at end of file
+};
+
+26 May 2017 : Changed b2b sort icons
++
+"<i ng-class=\"{'icon-controls-upPRIMARY active': sortPattern === 'ascending', 'icon-controls-down active down': sortPattern === 'descending'}\"></i>\n" 
index ecf62a2..bea9fb7 100644 (file)
-/*! b2b-angular-library - v1.0.1 - Last updated: 2017-03-02. Copyright (c) 2016 AT&T Services, Inc. */ \r
-angular.module("b2b.att.tpls", ['b2bTemplate/audioPlayer/audioPlayer.html', 'b2bTemplate/audioRecorder/audioRecorder.html', 'b2bTemplate/backToTop/backToTop.html', 'b2bTemplate/boardstrip/b2bAddBoard.html', 'b2bTemplate/boardstrip/b2bBoard.html', 'b2bTemplate/boardstrip/b2bBoardstrip.html', 'b2bTemplate/calendar/datepicker-popup.html', 'b2bTemplate/calendar/datepicker.html', 'b2bTemplate/coachmark/coachmark.html', 'b2bTemplate/dropdowns/b2bDropdownDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownListDesktop.html', 'b2bTemplate/fileUpload/fileUpload.html', 'b2bTemplate/flyout/flyout.html', 'b2bTemplate/flyout/flyoutContent.html', 'b2bTemplate/footer/footer_column_switch_tpl.html', 'b2bTemplate/horizontalTable/horizontalTable.html', 'b2bTemplate/hourPicker/b2bHourpicker.html', 'b2bTemplate/hourPicker/b2bHourpickerPanel.html', 'b2bTemplate/hourPicker/b2bHourpickerValue.html', 'b2bTemplate/leftNavigation/leftNavigation.html', 'b2bTemplate/listbox/listbox.html', 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html', 'b2bTemplate/modalsAndAlerts/b2b-window.html', 'b2bTemplate/monthSelector/monthSelector-popup.html', 'b2bTemplate/monthSelector/monthSelector.html', 'b2bTemplate/monthSelector/monthSelectorLink.html', 'b2bTemplate/pagination/b2b-pagination.html', 'b2bTemplate/paneSelector/paneSelector.html', 'b2bTemplate/paneSelector/paneSelectorPane.html', 'b2bTemplate/profileCard/profileCard-addUser.html', 'b2bTemplate/profileCard/profileCard.html', 'b2bTemplate/searchField/searchField.html', 'b2bTemplate/seekBar/seekBar.html', 'b2bTemplate/slider/slider.html', 'b2bTemplate/spinButton/spinButton.html', 'b2bTemplate/statusTracker/statusTracker.html', 'b2bTemplate/stepTracker/stepTracker.html', 'b2bTemplate/switches/switches-spanish.html', 'b2bTemplate/switches/switches.html', 'b2bTemplate/tableMessages/tableMessage.html', 'b2bTemplate/tables/b2bTable.html', 'b2bTemplate/tables/b2bTableBody.html', 'b2bTemplate/tables/b2bTableHeaderSortable.html', 'b2bTemplate/tables/b2bTableHeaderUnsortable.html', 'b2bTemplate/tableScrollbar/tableScrollbar.html', 'b2bTemplate/tabs/b2bTab.html', 'b2bTemplate/tabs/b2bTabset.html', 'b2bTemplate/treeNav/groupedTree.html', 'b2bTemplate/treeNav/treeMember.html', 'b2bTemplate/treeNav/ungroupedTree.html', 'b2bTemplate/treeNodeCheckbox/groupedTree.html', 'b2bTemplate/treeNodeCheckbox/treeMember.html', 'b2bTemplate/treeNodeCheckbox/ungroupedTree.html']);angular.module("b2b.att", ["b2b.att.tpls", 'b2b.att.addressInputTemplate','b2b.att.arrows','b2b.att.audioPlayer','b2b.att.audioRecorder','b2b.att.backToTop','b2b.att.badgesForAlerts','b2b.att.boardstrip','b2b.att.breadcrumbs','b2b.att.buttonGroups','b2b.att.buttons','b2b.att.calendar','b2b.att.checkboxes','b2b.att.coachmark','b2b.att.configurationSection','b2b.att.directoryListingTemplate','b2b.att.dropdowns','b2b.att.fileUpload','b2b.att.filters','b2b.att.flyout','b2b.att.footer','b2b.att.header','b2b.att.headings','b2b.att.horizontalTable','b2b.att.hourPicker','b2b.att.inputTemplate','b2b.att.leftNavigation','b2b.att.links','b2b.att.listbox','b2b.att.loaderAnimation','b2b.att.messageWrapper','b2b.att.modalsAndAlerts','b2b.att.monthSelector','b2b.att.multiLevelNavigation','b2b.att.multipurposeExpander','b2b.att.notesMessagesAndErrors','b2b.att.notificationCardTemplate','b2b.att.orderConfirmationTemplate','b2b.att.pagination','b2b.att.paneSelector','b2b.att.phoneNumberInput','b2b.att.profileBlockTemplate','b2b.att.profileCard','b2b.att.radios','b2b.att.searchField','b2b.att.seekBar','b2b.att.selectorModule','b2b.att.separators','b2b.att.slider','b2b.att.spinButton','b2b.att.staticRouteTemplate','b2b.att.statusTracker','b2b.att.stepTracker','b2b.att.switches','b2b.att.tableMessages','b2b.att.tables','b2b.att.tableScrollbar','b2b.att.tabs','b2b.att.tagBadges','b2b.att.textArea','b2b.att.tooltipsForForms','b2b.att.treeNav','b2b.att.treeNodeCheckbox','b2b.att.utilities']);/**\r
- * @ngdoc directive\r
- * @name Template.att:Address Input\r
- *\r
- * @description\r
- *  <file src="src/addressInputTemplate/docs/readme.md" />\r
- *\r
- * @usage\r
-\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <example module="b2b.att">\r
- <file src="src/addressInputTemplate/docs/demo.html" />\r
- <file src="src/addressInputTemplate/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.addressInputTemplate', ['ngMessages']);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:arrows\r
- *\r
- * @description\r
- *  <file src="src/arrows/docs/readme.md" />\r
- *\r
- * @usage\r
- *   Please refer demo.html tab in Example section below.\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/arrows/docs/demo.html" />\r
-            <file src="src/arrows/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.arrows', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:Audio Player\r
- * @scope\r
- * @param {string} audioSrcUrl - MP3 audio source URL or Blob URL\r
- * @description\r
- *  <file src="src/audioPlayer/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
- <div b2b-audio audio-src-url='audioSrcUrl'></div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/audioPlayer/docs/demo.html" />\r
-            <file src="src/audioPlayer/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
\r
-angular.module('b2b.att.audioPlayer', ['b2b.att.utilities', 'b2b.att.seekBar'])\r
-    .constant('AudioPlayerConfig', {\r
-        'defaultVolume': 50,\r
-        'timeShiftInSeconds': 5\r
-    })\r
-    .filter('trustedAudioUrl', ['$sce', function ($sce) {\r
-        return function (audioFileFullPath) {\r
-            return audioFileFullPath ? $sce.trustAsResourceUrl(audioFileFullPath) : 'undefined';\r
-        };\r
-    }])\r
-    .directive('b2bAudio', ['$log', '$timeout', 'AudioPlayerConfig', '$compile', 'events', function ($log, $timeout, AudioPlayerConfig, $compile, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            scope: {\r
-                audioSrcUrl: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/audioPlayer/audioPlayer.html',\r
-            controller: function ($scope) {\r
-\r
-                $scope.audio = {};\r
-\r
-                if (!angular.isDefined($scope.audioSrcUrl)) {\r
-                    $log.warn('b2b-audio : audio-src-url undefined');\r
-                    $scope.audioSrcUrl = undefined;\r
-                    $scope.audio.mp3 = undefined;\r
-                }\r
-\r
-            },\r
-            link: function (scope, element) {\r
-                var audioElement = angular.element(element[0].querySelector('audio'))[0];\r
-                scope.audio.audioElement = audioElement;\r
-                \r
-                function setAttributes(element, attributes) {\r
-                    Object.keys(attributes).forEach(function (name) {\r
-                        element.setAttribute(name, attributes[name]);\r
-                    });\r
-                }\r
-\r
-                $timeout(function () {\r
-                    // TODO: Replace with DDA Tooltip\r
-                    var seekBarKnob = element[0].querySelector('.b2b-seek-bar-knob');\r
-                    var tooltipObject = {\r
-                        'tooltip': '{{timeFormatter(audio.currentTime)}}',\r
-                        'tooltip-placement': 'above',\r
-                        'tooltip-style': 'blue',\r
-                        'tooltip-trigger': 'mousedown',\r
-                        'tooltip-append-to-body': 'false',\r
-                        'tooltip-offset': '-10',\r
-                        'refer-by': 'seek-bar-tooltip'\r
-                    };\r
-                    setAttributes(seekBarKnob, tooltipObject);\r
-                    $compile(seekBarKnob)(scope);\r
-                });\r
-\r
-                if (angular.isDefined(scope.audioSrcUrl)) {\r
-                    scope.audio.mp3 = scope.audioSrcUrl;\r
-                }\r
-\r
-                scope.audio.currentTime = 0;\r
-                scope.audio.currentVolume = AudioPlayerConfig.defaultVolume;\r
-                scope.audio.timeShiftInSeconds = AudioPlayerConfig.timeShiftInSeconds;\r
-                scope.isPlayInProgress = false;\r
-                scope.isReady = false;\r
-                scope.isAudioDragging = false;\r
-\r
-                $timeout(function () {\r
-                    audioElement.load();\r
-                    audioElement.volume = scope.audio.currentVolume / 100;\r
-                });\r
-\r
-                scope.$watch('audioSrcUrl', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        if (!newVal) {\r
-                            $log.warn('b2b-audio : audio-src-url undefined. Please provide a valid URL');\r
-                        }\r
-                        \r
-                        scope.audio.mp3 = newVal;\r
-                        $timeout(function () {\r
-                            audioElement.load();\r
-                        });\r
-                    }\r
-                });\r
-\r
-                scope.playAudio = function () {\r
-                    if (scope.isReady) {\r
-                        audioElement.play();\r
-                    }\r
-                };\r
-\r
-                audioElement.onplay = function () {\r
-                    scope.isPlayInProgress = true;\r
-                    scope.$digest();\r
-                };\r
-\r
-                scope.pauseAudio = function () {\r
-                    audioElement.pause();\r
-                };\r
-\r
-                audioElement.onpause = function () {\r
-                    scope.isPlayInProgress = false;\r
-                    scope.$digest();\r
-                };\r
-\r
-                scope.toggleAudio = function () {\r
-                    if (audioElement.paused) {\r
-                        scope.playAudio();\r
-                    } else {\r
-                        scope.pauseAudio();\r
-                    }\r
-                };\r
-\r
-                scope.volumeUp = function (delta) {\r
-                    if (!delta) {\r
-                        delta = 0.1;\r
-                    } else {\r
-                        delta = delta / 100;\r
-                    }\r
-                    audioElement.muted = false;\r
-                    if (audioElement.volume < 1) {\r
-                        audioElement.volume = Math.min((Math.round((audioElement.volume + delta) * 100) / 100), 1);\r
-                    }\r
-                    scope.audio.currentVolume = audioElement.volume * 100;\r
-                    return audioElement.volume;\r
-                };\r
-\r
-                scope.volumeDown = function (delta) {\r
-                    if (!delta) {\r
-                        delta = 0.1;\r
-                    } else {\r
-                        delta = delta / 100;\r
-                    }\r
-                    audioElement.muted = false;\r
-                    if (audioElement.volume > 0) {\r
-                        audioElement.volume = Math.max((Math.round((audioElement.volume - delta) * 100) / 100), 0);\r
-                    }\r
-                    scope.audio.currentVolume = audioElement.volume * 100;\r
-                    return audioElement.volume;\r
-                };\r
-\r
-                var volumeHandler = function (e) {\r
-                    events.preventDefault(e);\r
-                    if ((e.wheelDelta && e.wheelDelta > 0) || (e.detail && e.detail < 0)) {\r
-                        scope.volumeUp();\r
-                    } else {\r
-                        scope.volumeDown();\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                \r
-\r
-                scope.$watch('audio.currentVolume', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        audioElement.volume = newVal / 100;\r
-                    }\r
-                });\r
-\r
-                scope.setCurrentTime = function (timeInSec) {\r
-                    audioElement.currentTime = timeInSec;\r
-                };\r
-\r
-                scope.setAudioPosition = function (val) {\r
-                    if (scope.isReady) {\r
-                        scope.setCurrentTime(val);\r
-                        scope.isAudioDragging = false;\r
-                    }\r
-                };\r
-\r
-                function getTimestampArray(timestamp) {\r
-                    var d = Math.abs(timestamp) / 1000; // delta\r
-                    var r = {}; // result\r
-                    var s = { // structure\r
-                        day: 86400,\r
-                        hour: 3600,\r
-                        minute: 60,\r
-                        second: 1\r
-                    };\r
-\r
-                    Object.keys(s).forEach(function (key) {\r
-                        r[key] = Math.floor(d / s[key]);\r
-                        d -= r[key] * s[key];\r
-                    });\r
-\r
-                    return r;\r
-                };\r
-\r
-                scope.timeFormatter = function (timeInSec) {\r
-                    var formattedTime = '00:00';\r
-\r
-                    if (!timeInSec || timeInSec < 1) {\r
-                        return formattedTime;\r
-                    }\r
-\r
-                    if (typeof timeInSec === 'string') {\r
-                        return timeInSec;\r
-                    }\r
-\r
-                    var dateArray = getTimestampArray(timeInSec * 1000);\r
-                    Object.keys(dateArray).forEach(function (key) {\r
-                        if (dateArray[key] === 0) {\r
-                            dateArray[key] = '00';\r
-                        } else if (dateArray[key] < 10) {\r
-                            dateArray[key] = '0' + dateArray[key];\r
-                        }\r
-                    });\r
-\r
-                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];\r
-\r
-                    if (dateArray['hour'] !== '00') {\r
-                        formattedTime = dateArray['hour'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    if (dateArray['day'] !== '00') {\r
-                        formattedTime = dateArray['day'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    return formattedTime;\r
-                };\r
-\r
-                audioElement.onloadedmetadata = function () {\r
-                    scope.audio.duration = audioElement.duration;\r
-                    scope.$digest();\r
-                };\r
-\r
-                audioElement.ontimeupdate = function () {\r
-                    if (!scope.isAudioDragging) {\r
-                        scope.audio.currentTime = audioElement.currentTime;\r
-                        scope.$digest();\r
-                    }\r
-                };\r
-\r
-                audioElement.onended = function () {\r
-                    scope.setCurrentTime(0);\r
-                    scope.audio.currentTime = 0;\r
-                    if (!audioElement.paused) {\r
-                        scope.pauseAudio();\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                audioElement.oncanplay = function () {\r
-                    scope.isReady = true;\r
-                    scope.isPlayInProgress = !audioElement.paused;\r
-                    scope.$digest();\r
-                };\r
-\r
-                var onloadstart = function () {\r
-                    scope.isReady = false;\r
-                    scope.isPlayInProgress = !audioElement.paused;\r
-                    scope.audio.currentTime = 0;\r
-                    scope.audio.duration = 0;\r
-                    scope.$digest();\r
-                };\r
-                audioElement.addEventListener("loadstart", onloadstart);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:Audio Recorder\r
- * @scope\r
- * @param {function} callback - A callback to handle the WAV blob\r
- * @param {object} config - A config object with properties startRecordingMessage & whileRecordingMessage\r
- * @description\r
- *  <file src="src/audioRecorder/docs/readme.md" />\r
- *\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/audioRecorder/docs/demo.html" />\r
-            <file src="src/audioRecorder/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.audioRecorder', ['b2b.att.utilities'])\r
-    .constant('AudioRecorderConfig', {\r
-        'startRecordingMessage': 'Click on REC icon to being recording',\r
-        'whileRecordingMessage': 'Recording...'\r
-    })\r
-    .directive('b2bAudioRecorder', ['$interval', 'AudioRecorderConfig', 'b2bUserAgent', 'b2bRecorder', function($interval, AudioRecorderConfig, b2bUserAgent, b2bRecorder) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            scope: {\r
-                callback: '&'\r
-            },\r
-            templateUrl: 'b2bTemplate/audioRecorder/audioRecorder.html',\r
-            controller: function($scope) {\r
-\r
-                function hasGetUserMedia() {\r
-                    return !!(navigator.getUserMedia || navigator.webkitGetUserMedia ||\r
-                        navigator.mozGetUserMedia || navigator.msGetUserMedia);\r
-                }\r
-\r
-                if (!hasGetUserMedia()) {\r
-                    throw new Error('Your broswer does not support MediaRecorder API');\r
-                }\r
-\r
-                if (!(b2bUserAgent.isFF() || b2bUserAgent.isChrome())) {\r
-                    throw new Error('b2bAudioRecorder does not support this browser!');\r
-                }\r
-\r
-            },\r
-            link: function(scope, element) {\r
-                scope.elapsedTime = 0;\r
-                scope.isRecording = false;\r
-                scope.config = {};\r
-                scope.config.startRecordingMessage = AudioRecorderConfig.startRecordingMessage;\r
-                scope.config.whileRecordingMessage = AudioRecorderConfig.whileRecordingMessage;\r
-                \r
-\r
-                var timer = undefined; // Interval promise\r
-                navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;\r
-                var stream;\r
-                var audio = angular.element(element[0].querySelector('audio'))[0];\r
-                var recorder = undefined;\r
-\r
-                function startRecording() {\r
-                    scope.isRecording = true;\r
-                    navigator.mediaDevices.getUserMedia({\r
-                        audio: true\r
-                    }).then(function(stream) {\r
-                        //create the MediaStreamAudioSourceNode\r
-                        context = new AudioContext();\r
-                        source = context.createMediaStreamSource(stream);\r
-                        recorder = new b2bRecorder(source);\r
-                        recorder.record();\r
-\r
-                        timer = $interval(function() {\r
-                            scope.elapsedTime += 1;\r
-                        }, 1000, 0);\r
-                    }).catch(function(err) {\r
-                        angular.noop();\r
-                    });\r
-\r
-                };\r
-\r
-                function stopRecording() {\r
-                    scope.isRecording = false;\r
-                    recorder.stop();\r
-                    var audio = {};\r
-                    recorder.exportWAV(function(s) {\r
-                        audio.src = window.URL.createObjectURL(s);\r
-                        context.close().then(function() {\r
-                            if (timer) {\r
-                                $interval.cancel(timer);\r
-                            }\r
-                            scope.elapsedTime = 0;\r
-                            \r
-                            recorder.clear();\r
-                            recorder = undefined;\r
-                        });\r
-                        if (angular.isFunction(scope.callback)){\r
-                            scope.callback({'data': audio});    \r
-                        }\r
-                    });\r
-                    \r
-                    \r
-                }\r
-\r
-                scope.toggleRecording = function() {\r
-                    if (scope.isRecording) {\r
-                        stopRecording();\r
-                    } else {\r
-                        startRecording();\r
-                    }\r
-                };\r
-\r
-\r
-\r
-                //TODO: Move this into utilities\r
-                function getTimestampArray(timestamp) {\r
-                    var d = Math.abs(timestamp) / 1000; // delta\r
-                    var r = {}; // result\r
-                    var s = { // structure\r
-                        day: 86400,\r
-                        hour: 3600,\r
-                        minute: 60,\r
-                        second: 1\r
-                    };\r
-\r
-                    Object.keys(s).forEach(function(key) {\r
-                        r[key] = Math.floor(d / s[key]);\r
-                        d -= r[key] * s[key];\r
-                    });\r
-\r
-                    return r;\r
-                };\r
-                scope.timeFormatter = function(timeInSec) {\r
-                    var formattedTime = '00:00';\r
-\r
-                    if (!timeInSec || timeInSec < 1) {\r
-                        return formattedTime;\r
-                    }\r
-\r
-                    if (typeof timeInSec === 'string') {\r
-                        return timeInSec;\r
-                    }\r
-\r
-                    var dateArray = getTimestampArray(timeInSec * 1000);\r
-                    Object.keys(dateArray).forEach(function(key) {\r
-                        if (dateArray[key] === 0) {\r
-                            dateArray[key] = '00';\r
-                        } else if (dateArray[key] < 10) {\r
-                            dateArray[key] = '0' + dateArray[key];\r
-                        }\r
-                    });\r
-\r
-                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];\r
-\r
-                    if (dateArray['hour'] !== '00') {\r
-                        formattedTime = dateArray['hour'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    if (dateArray['day'] !== '00') {\r
-                        formattedTime = dateArray['day'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    return formattedTime;\r
-                };\r
-\r
-                scope.$on('$destroy', function() {\r
-                    if (timer) {\r
-                        $interval.cancel(timer);\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:Back To Top\r
- * @scope\r
- * @description\r
- *  <file src="src/backToTop/docs/readme.md" />\r
- * @param {integer} scrollSpeed - Scroll speed in seconds, default is 1\r
-*\r
- * @usage\r
- * \r
-    <div ng-controller="backToTopController">\r
-        <div b2b-backtotop></div>\r
-    </div>\r
- * \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/backToTop/docs/demo.html" />\r
-            <file src="src/backToTop/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
\r
-angular.module('b2b.att.backToTop', ['b2b.att.utilities','b2b.att.position'])\r
-    .directive('b2bBacktotopButton', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/backToTop/backToTop.html',\r
-            link: function (scope, elem, attr) {\r
-                elem.bind('click', function(evt) {\r
-                    var scrollSpeed = parseInt(attr.scrollSpeed) || 1;\r
-                    TweenLite.to(window, scrollSpeed, {scrollTo:{x: 0, y: 0}});\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:badgesForAlerts\r
- *\r
- * @description\r
- *  <file src="src/badgesForAlerts/docs/readme.md" />\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/badgesForAlerts/docs/demo.html" />\r
-            <file src="src/badgesForAlerts/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.badgesForAlerts', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:boardstrip\r
- *\r
- * @description\r
- *  <file src="src/boardstrip/docs/readme.md" />\r
- *\r
- * @usage\r
- * See demo section\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/boardstrip/docs/demo.html" />\r
-            <file src="src/boardstrip/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.boardstrip', ['b2b.att.utilities'])\r
-    .constant('BoardStripConfig', {\r
-        'maxVisibleBoards': 4,\r
-        'boardsToScroll': 1,\r
-        /* These parameters are non-configurable and remain unaltered, until there is a change in corresponding CSS */\r
-        'boardLength': 140,\r
-        'boardMargin': 15\r
-    })\r
-    .directive('b2bBoard', [function () {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            require: '^b2bBoardStrip',\r
-            scope: {\r
-                boardIndex: '=',\r
-                boardLabel: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bBoard.html',\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var parentCtrl = ctrls;\r
-\r
-                scope.getCurrentIndex = function () {\r
-                    return parentCtrl.getCurrentIndex();\r
-                };\r
-                scope.selectBoard = function (boardIndex) {\r
-                    if (!isNaN(boardIndex)) {\r
-                        parentCtrl.setCurrentIndex(boardIndex);\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBoardStrip', ['BoardStripConfig', '$timeout', function (BoardStripConfig, $timeout) {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            require: ['?ngModel', 'b2bBoardStrip'],\r
-            scope: {\r
-                boardsMasterArray: '=',\r
-                onAddBoard: '&?'\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bBoardstrip.html',\r
-            controller: function ($scope) {\r
-                if (!angular.isDefined($scope.boardsMasterArray)) {\r
-                    $scope.boardsMasterArray = [];\r
-                }\r
-\r
-                this.rectifyMaxVisibleBoards = function () {\r
-                    if (this.maxVisibleIndex >= $scope.boardsMasterArray.length) {\r
-                        this.maxVisibleIndex = $scope.boardsMasterArray.length - 1;\r
-                    }\r
-\r
-                    if (this.maxVisibleIndex < 0) {\r
-                        this.maxVisibleIndex = 0;\r
-                    }\r
-                };\r
-\r
-                this.resetBoardStrip = function () {\r
-                    $scope.currentIndex = 0;\r
-\r
-                    this.maxVisibleIndex = BoardStripConfig.maxVisibleBoards - 1;\r
-                    this.minVisibleIndex = 0;\r
-\r
-                    this.rectifyMaxVisibleBoards();\r
-                };\r
-\r
-                this.getCurrentIndex = function () {\r
-                    return $scope.currentIndex;\r
-                };\r
-                this.setCurrentIndex = function (indx) {\r
-                    $scope.currentIndex = indx;\r
-                };\r
-\r
-                this.getBoardsMasterArrayLength = function () {\r
-                    return $scope.boardsMasterArray.length;\r
-                };\r
-\r
-                $scope.addBoardPressedFlag = false;\r
-                this.getAddBoardPressedFlag = function () {\r
-                    return $scope.addBoardPressedFlag;\r
-                };\r
-                this.setAddBoardPressedFlag = function (booleanValue) {\r
-                    $scope.addBoardPressedFlag = booleanValue;\r
-                };\r
-\r
-            },\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var ctrl = ctrls[1];\r
-\r
-                var oldTimeout;\r
-                var animationTimeout = 1000;\r
-\r
-                var getBoardViewportWidth = function (numberOfVisibleBoards) {\r
-                    return numberOfVisibleBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);\r
-                };\r
-                if (element[0].querySelector(".board-viewport")) {\r
-                    angular.element(element[0].querySelector(".board-viewport")).css({\r
-                        "width": getBoardViewportWidth(BoardStripConfig.maxVisibleBoards) + "px"\r
-                    });\r
-                }\r
-\r
-                var getBoardstripContainerWidth = function (totalNumberOfBoards) {\r
-                    return totalNumberOfBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);\r
-                };\r
-                if (element[0].querySelector(".boardstrip-container")) {\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                    });\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": "0px"\r
-                    });\r
-                }\r
-\r
-                var calculateAndGetBoardstripContainerAdjustment = function () {\r
-\r
-                    var calculatedAdjustmentValue;\r
-\r
-                    if (ctrl.getBoardsMasterArrayLength() <= BoardStripConfig.maxVisibleBoards) {\r
-                        calculatedAdjustmentValue = 0;\r
-                    } else {\r
-                        calculatedAdjustmentValue = (ctrl.minVisibleIndex * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin)) * -1;\r
-                    }\r
-\r
-                    return calculatedAdjustmentValue;\r
-                };\r
-\r
-                var animateBoardstripContainerAdjustment = function (elementToFocusAfterAnimation) {\r
-                    var oldContainerAdjustment = angular.element(element[0].querySelector(".boardstrip-container"))[0].style.left;\r
-                    var containerAdjustment = calculateAndGetBoardstripContainerAdjustment();\r
-                    if (oldContainerAdjustment !== containerAdjustment + 'px') {\r
-                        angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                            "left": containerAdjustment + "px"\r
-                        });\r
-\r
-                        $timeout.cancel(oldTimeout);\r
-                        oldTimeout = $timeout(function () {\r
-                            elementToFocusAfterAnimation.focus();\r
-                        }, animationTimeout);\r
-                    } else {\r
-                        elementToFocusAfterAnimation.focus();\r
-                    }\r
-                };\r
-\r
-                var updateBoardsTabIndex = function (boardArray, minViewIndex, maxViewIndex) {\r
-                    for (var i = 0; i < boardArray.length; i++) {\r
-                        angular.element(boardArray[i]).attr('tabindex', '-1');\r
-                    }\r
-                    for (var j = minViewIndex; j <= maxViewIndex; j++) {\r
-                        angular.element(boardArray[j]).attr('tabindex', '0');\r
-                    }\r
-                };\r
-\r
-                $timeout(function () {\r
-                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                });\r
-\r
-                scope.$watchCollection('boardsMasterArray', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        /* When a board is removed */\r
-                        if (newVal.length < oldVal.length) {\r
-                            ctrl.resetBoardStrip();\r
-                            $timeout(function () {\r
-\r
-                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                if (currentBoardArray.length !== 0) {\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[0]);\r
-                                } else {\r
-                                    element[0].querySelector('div.boardstrip-item--add').focus();\r
-                                }\r
-\r
-                                angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                    "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                });\r
-                                /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                            });\r
-                        }\r
-                        /* When a board is added */\r
-                        else {\r
-                            if (ctrl.getAddBoardPressedFlag()) {\r
-                                ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                                ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-\r
-                                ctrl.setCurrentIndex(ctrl.maxVisibleIndex);\r
-\r
-                                $timeout(function () {\r
-                                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                    });\r
-\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[currentBoardArray.length - 1]);\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            } else {\r
-                                if (ctrl.minVisibleIndex === 0 && ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards + 1) {\r
-                                    ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                                    ctrl.rectifyMaxVisibleBoards();\r
-                                }\r
-\r
-                                $timeout(function () {\r
-                                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                    });\r
-\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            }\r
-\r
-                            ctrl.setAddBoardPressedFlag(false);\r
-                        }\r
-                    }\r
-                });\r
-\r
-                scope.nextBoard = function () {\r
-                    ctrl.maxVisibleIndex += BoardStripConfig.boardsToScroll;\r
-                    ctrl.rectifyMaxVisibleBoards();\r
-                    ctrl.minVisibleIndex = ctrl.maxVisibleIndex - (BoardStripConfig.maxVisibleBoards - 1);\r
-\r
-                    $timeout.cancel(oldTimeout);\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"\r
-                    });\r
-\r
-                    $timeout(function () {\r
-                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-\r
-                        /* Remove tabindex from non-visible boards */\r
-                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-\r
-                        if (!(scope.isNextBoard())) {\r
-                            try {\r
-                                currentBoardArray[currentBoardArray.length - 1].focus();\r
-                            } catch (e) { /* IE8 may throw exception */ }\r
-                        }\r
-                    }, animationTimeout);\r
-                };\r
-                scope.prevBoard = function () {\r
-\r
-                    ctrl.minVisibleIndex -= BoardStripConfig.boardsToScroll;\r
-                    if (ctrl.minVisibleIndex < 0) {\r
-                        ctrl.minVisibleIndex = 0;\r
-                    }\r
-\r
-                    ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;\r
-                    ctrl.rectifyMaxVisibleBoards();\r
-\r
-                    $timeout.cancel(oldTimeout);\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"\r
-                    });\r
-\r
-                    $timeout(function () {\r
-                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-\r
-                        /* Remove tabindex from non-visible boards */\r
-                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-\r
-                        if (ctrl.minVisibleIndex === 0) {\r
-                            try {\r
-                                element[0].querySelector('div.boardstrip-item--add').focus();\r
-                            } catch (e) { /* IE8 may throw exception */ }\r
-                        }\r
-                    });\r
-                };\r
-\r
-                scope.isPrevBoard = function () {\r
-                    return (ctrl.minVisibleIndex > 0);\r
-                };\r
-                scope.isNextBoard = function () {\r
-                    return (ctrl.getBoardsMasterArrayLength() - 1 > ctrl.maxVisibleIndex);\r
-                };\r
-\r
-                ngModelCtrl.$render = function () {\r
-                    if (ngModelCtrl.$viewValue || ngModelCtrl.$viewValue === 0) {\r
-                        var newCurrentIndex = ngModelCtrl.$viewValue;\r
-\r
-                        if (!(newCurrentIndex = parseInt(newCurrentIndex, 10))) {\r
-                            newCurrentIndex = 0;\r
-                        }\r
-\r
-                        if (newCurrentIndex <= 0) {\r
-                            ctrl.resetBoardStrip();\r
-                            newCurrentIndex = 0;\r
-\r
-                            var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                            if (currentBoardArray.length !== 0) {\r
-                                animateBoardstripContainerAdjustment(currentBoardArray[0]);\r
-                            } else {\r
-                                element[0].querySelector('div.boardstrip-item--add').focus();\r
-                            }\r
-                            /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                            updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                        } else if (newCurrentIndex >= ctrl.getBoardsMasterArrayLength()) {\r
-                            ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                            ctrl.rectifyMaxVisibleBoards();\r
-                            ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-\r
-                            newCurrentIndex = ctrl.maxVisibleIndex;\r
-\r
-                            $timeout(function () {\r
-                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);\r
-                                /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                            });\r
-                        } else {\r
-\r
-                            if (!(newCurrentIndex >= ctrl.minVisibleIndex && newCurrentIndex <= ctrl.maxVisibleIndex)) {\r
-                                ctrl.minVisibleIndex = newCurrentIndex;\r
-                                ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;\r
-                                ctrl.rectifyMaxVisibleBoards();\r
-\r
-                                if (ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards) {\r
-                                    ctrl.minVisibleIndex = 0;\r
-                                } else {\r
-                                    ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-                                }\r
-\r
-                                $timeout(function () {\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            }\r
-                        }\r
-                        scope.currentIndex = newCurrentIndex;\r
-                        ngModelCtrl.$setViewValue(newCurrentIndex);\r
-                    } else {\r
-                        ctrl.resetBoardStrip();\r
-                        ngModelCtrl.$setViewValue(0);\r
-                    }\r
-                };\r
-\r
-                scope.$watch('currentIndex', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal && ngModelCtrl && ngModelCtrl.$viewValue !== newVal) {\r
-                        ngModelCtrl.$setViewValue(newVal);\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bAddBoard', ['BoardStripConfig', '$parse', function (BoardStripConfig, $parse) {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            require: '^b2bBoardStrip',\r
-            scope: {\r
-                onAddBoard: '&?'\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bAddBoard.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.addBoard = function () {\r
-                    if (attrs['onAddBoard']) {\r
-                        scope.onAddBoard = $parse(scope.onAddBoard);\r
-                        scope.onAddBoard();\r
-                        ctrl.setAddBoardPressedFlag(true);\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBoardNavigation', ['keymap', 'events', function (keymap, events) {\r
-        return {\r
-            restrict: 'AE',\r
-            link: function (scope, elem) {\r
-\r
-                var prevElem = keymap.KEY.LEFT;\r
-                var nextElem = keymap.KEY.RIGHT;\r
-\r
-                elem.bind('keydown', function (ev) {\r
-\r
-                    if (!(ev.keyCode)) {\r
-                        ev.keyCode = ev.which;\r
-                    }\r
-\r
-                    switch (ev.keyCode) {\r
-                    case nextElem:\r
-                        events.preventDefault(ev);\r
-                        events.stopPropagation(ev);\r
-\r
-                        if (elem[0].nextElementSibling && parseInt(angular.element(elem[0].nextElementSibling).attr('tabindex')) >= 0) {\r
-                            angular.element(elem[0])[0].nextElementSibling.focus();\r
-                        } else {\r
-                            /* IE8 fix */\r
-                            var el = angular.element(elem[0])[0];\r
-                            do {\r
-                                if (el.nextSibling) {\r
-                                    el = el.nextSibling;\r
-                                } else {\r
-                                    break;\r
-                                }\r
-                            } while (el && el.tagName !== 'LI');\r
-\r
-                            if (el.tagName && el.tagName === 'LI' && parseInt(angular.element(el).attr('tabindex')) >= 0) {\r
-                                el.focus();\r
-                            }\r
-                        }\r
-\r
-                        break;\r
-                    case prevElem:\r
-                        events.preventDefault(ev);\r
-                        events.stopPropagation(ev);\r
-\r
-                        if (elem[0].previousElementSibling && parseInt(angular.element(elem[0].previousElementSibling).attr('tabindex')) >= 0) {\r
-                            angular.element(elem[0])[0].previousElementSibling.focus();\r
-                        } else {\r
-                            /* IE8 fix */\r
-                            var el1 = angular.element(elem[0])[0];\r
-                            do {\r
-                                if (el1.previousSibling) {\r
-                                    el1 = el1.previousSibling;\r
-                                } else {\r
-                                    break;\r
-                                }\r
-                            } while (el1 && el1.tagName !== 'LI');\r
-\r
-                            if (el1.tagName && el1.tagName === 'LI' && parseInt(angular.element(el1).attr('tabindex')) >= 0) {\r
-                                el1.focus();\r
-                            }\r
-                        }\r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:breadcrumbs\r
- *\r
- * @description\r
- *  <file src="src/breadcrumbs/docs/readme.md" />\r
- * @usage\r
-    <ul class="breadcrumb">\r
-        <li ng-repeat="link in breadCrumbsLink"><a tabindex="{{(idx==$index)?-1:0}}" href='javascript:void(0)' ng-click="clickActive($index)" ng-class="{'active':idx==$index, '': idx!=$index}">{{link.title}}</a></li>\r
-    </ul>\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/breadcrumbs/docs/demo.html" />\r
- <file src="src/breadcrumbs/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.breadcrumbs',[])\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:buttonGroups\r
- *\r
- * @description\r
- *  <file src="src/buttonGroups/docs/readme.md" />\r
- *\r
- * @usage\r
-<h2>Radio Aproach</h2>\r
-<div class="btn-group" b2b-key prev="37,38" next="39,40" circular-traversal role="radiogroup">\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 1'" ng-model="radioModel" b2b-btn-radio="'Button 1'" tabindex="{{(!radioModel || 'Button 1'===radioModel)?0:-1}}">Button 1</button>\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 2'" ng-model="radioModel" b2b-btn-radio="'Button 2'" tabindex="{{(!radioModel || 'Button 2'===radioModel)?0:-1}}">Button 2</button>\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 3'" ng-model="radioModel" b2b-btn-radio="'Button 3'" tabindex="{{(!radioModel || 'Button 3'===radioModel)?0:-1}}">Button 3</button>\r
-</div>\r
-\r
-<h2>Checkbox Aproach</h2>\r
-<span b2b-button-group class="btn-group btn-fullwidth" role="group" max-select="3" ng-model="checkModel1">\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button1" b2b-btn-checkbox>Button1</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button2" b2b-btn-checkbox>Button2</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button3" b2b-btn-checkbox>Button3</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button4" b2b-btn-checkbox>Button4</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button5" b2b-btn-checkbox>Button5</button>\r
-</span>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/buttonGroups/docs/demo.html" />\r
-            <file src="src/buttonGroups/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.buttonGroups', ['b2b.att.utilities'])\r
-    .constant('buttonConfig', {\r
-        activeClass: 'active',\r
-        toggleEvent: 'click'\r
-    })\r
-    .directive('b2bBtnRadio', ['buttonConfig', function (buttonConfig) {\r
-        var activeClass = buttonConfig.activeClass || 'active';\r
-        var toggleEvent = buttonConfig.toggleEvent || 'click';\r
-\r
-        return {\r
-            require: 'ngModel',\r
-            link: function (scope, element, attrs, ngModelCtrl) {\r
-                var notMobile = !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-\r
-                if (notMobile) {\r
-                    element.bind('focus', function () {\r
-                        scope.$apply(function () {\r
-                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));\r
-                            ngModelCtrl.$render();\r
-                        });\r
-                    });\r
-                }\r
-\r
-                element.attr('role', 'radio');\r
-\r
-                //model -> UI\r
-                ngModelCtrl.$render = function () {\r
-                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio)));\r
-                    if (angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio))) {\r
-                        element.attr("aria-checked", true);\r
-                    } else {\r
-                        element.attr("aria-checked", false);\r
-                    }\r
-                };\r
-\r
-                //ui->model\r
-                element.bind(toggleEvent, function () {\r
-                    if (!element.hasClass(activeClass)) {\r
-                        scope.$apply(function () {\r
-                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));\r
-                            ngModelCtrl.$render();\r
-                        });\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBtnCheckbox', ['buttonConfig', function (buttonConfig) {\r
-        var activeClass = buttonConfig.activeClass || 'active';\r
-        var toggleEvent = buttonConfig.toggleEvent || 'click';\r
-\r
-        return {\r
-            require: ['ngModel', '^^b2bButtonGroup'],\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var parentCtrl = ctrls[1];\r
-\r
-                element.attr('role', 'checkbox');\r
-                element.attr('aria-describedby', parentCtrl.getStateDescriptionElemId());\r
-\r
-                function getTrueValue() {\r
-                    var trueValue = scope.$eval(attrs.b2bBtnCheckboxTrue);\r
-                    return angular.isDefined(trueValue) ? trueValue : true;\r
-                }\r
-\r
-                function getFalseValue() {\r
-                    var falseValue = scope.$eval(attrs.b2bBtnCheckboxFalse);\r
-                    return angular.isDefined(falseValue) ? falseValue : false;\r
-                }\r
-\r
-                //model -> UI\r
-                ngModelCtrl.$render = function () {\r
-                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));\r
-                    if ((angular.equals(ngModelCtrl.$modelValue, getTrueValue()))) {\r
-                        element.attr("aria-checked", true);\r
-                    } else {\r
-                        element.attr("aria-checked", false);\r
-                    }\r
-                };\r
-\r
-                //ui->model\r
-                element.bind(toggleEvent, function () {\r
-                    scope.$apply(function () {\r
-                        ngModelCtrl.$setViewValue(element.hasClass(activeClass) ? getFalseValue() : getTrueValue());\r
-                        ngModelCtrl.$render();\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bButtonGroup', ['$timeout', '$compile', function ($timeout, $compile) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                maxSelect: "=",\r
-                ngModelButtonState: '=ngModel'\r
-            },\r
-            controller: ['$scope', '$element', function ($scope, $element) {\r
-                $scope.nSel = 0;\r
-\r
-                var stateDescriptionElem = angular.element('<span id="b2b_button_group_' + $scope.$id + '" class="hide" aria-hidden="true">{{nSel}} of {{maxSelect}} options selected.</span>');\r
-                $compile(stateDescriptionElem)($scope);\r
-                $element.after(stateDescriptionElem);\r
-\r
-                this.getStateDescriptionElemId = function () {\r
-                    return stateDescriptionElem.attr('id');\r
-                };\r
-            }],\r
-            link: function (scope, element) {\r
-\r
-\r
-                var executeFxn = function () {\r
-                    scope.nSel = 0;\r
-                    angular.forEach(scope.ngModelButtonState, function (value, key) {\r
-                        if (value === true) {\r
-                            scope.nSel += 1;\r
-                        }\r
-                    });\r
-\r
-                    if (scope.nSel >= scope.maxSelect) {\r
-                        angular.forEach(element.children(), function (chd) {\r
-                            if (chd.className.indexOf('active') < 0) {\r
-                                chd.disabled = true;\r
-                                chd.setAttribute('aria-disabled', true);\r
-                            }\r
-                        });\r
-                    } else {\r
-                        angular.forEach(element.children(), function (chd) {\r
-                            chd.disabled = false;\r
-                            chd.setAttribute('aria-disabled', false);\r
-                        });\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                $timeout(function () {\r
-                    executeFxn();\r
-                });\r
-                element.bind('click', executeFxn);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:buttons\r
- * @element input\r
- * @function\r
- *\r
- * @description\r
- *  <file src="src/buttons/docs/readme.md" />\r
- * @usage\r
- *\r
-Button shape\r
-<button class="btn" type="button">Button</button> button.btn (button shape only)\r
-<button aria-label="Custom aria label" class="btn" type="button">Button</button> button.btn (button shape only) with custom aria label\r
-<button aria-label="Click on button/Press enter" class="btn" type="button" onclick="javascript:alert('It works!');">Click on button/Press enter</button> button.btn with click functionality\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn" role="button">Button</a> a.btn (button shape only)\r
-<button class="btn btn-primary">Button</button> .btn-primary\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-primary" role="button">Button</a> a.btn-primary\r
-\r
-5 Button colors\r
-<button class="btn btn-secondary">Button</button> .btn-secondary\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-secondary" role="button">Button</a> a.btn-secondary\r
-<button class="btn btn-alt">Button</button> .btn-alt\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-alt" role="button">Button</a> a.btn-alt\r
-<button class="btn btn-specialty">Button</button> .btn-specialty\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-specialty" role="button">Button</a> a.btn-specialty\r
-<button class="btn btn-specialty" disabled="">Button</button> disabled="disabled"\r
-<a b2b-keyup-click="32" aria-disabled="true" href="javascript:void(0)" class="btn btn-primary disabled" role="button">Button</a> a.disabled\r
-\r
-3 button heights\r
-<button class="btn btn-secondary">Button</button> .btn is default and 46px height\r
-<button class="btn btn-secondary btn-medium">Button</button> .btn-medium is 42px\r
-<button class="btn btn-secondary btn-small">Button</button> .btn-small is 36px\r
-\r
-.row-nowrap 2 up buttons\r
-<div class="row-nowrap">\r
-    <button class="btn btn-secondary btn-fullwidth" type="button">Cancel</button>\r
-    <button class="btn btn-primary btn-fullwidth" type="button">Continue</button>\r
-</div>\r
-\r
-.row 2 up buttons (desktop) stacked (mobile) (different order)\r
-<div class="row cta-button-group">\r
-    <button class="span btn btn-secondary btn-fullwidth hidden-phone" type="button">Cancel</button>\r
-    <button class="span btn btn-primary btn-fullwidth" type="button">Continue</button>\r
-    <button class="span btn btn-secondary btn-fullwidth visible-phone" type="button">Cancel</button>\r
-</div>\r
-\r
- * @example\r
- *  <section id="code">\r
-               <b>HTML + AngularJS</b>\r
- *              <example module="b2b.att">\r
- *              <file src="src/buttons/docs/demo.html" />\r
-                 <file src="src/buttons/docs/demo.js" />\r
- *              </example>\r
-            </section>\r
- *\r
- */\r
-angular.module('b2b.att.buttons', ['b2b.att.utilities']);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:calendar\r
- *\r
- * @description\r
- *  <file src="src/calendar/docs/readme.md" />\r
- * @usage\r
- *  <input type="text" ng-model="dt" b2b-datepicker>\r
- *\r
- * @example\r
-   <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-     <file src="src/calendar/docs/demo.html" />\r
-     <file src="src/calendar/docs/demo.js" />\r
-    </example>\r
-   </section>\r
- */\r
-angular.module('b2b.att.calendar', ['b2b.att.position', 'b2b.att.utilities'])\r
-\r
-.constant('b2bDatepickerConfig', {\r
-    dateFormat: 'MM/dd/yyyy',\r
-    dayFormat: 'd',\r
-    monthFormat: 'MMMM',\r
-    yearFormat: 'yyyy',\r
-    dayHeaderFormat: 'EEEE',\r
-    dayTitleFormat: 'MMMM yyyy',\r
-    disableWeekend: false,\r
-    disableSunday: false,\r
-    disableDates: null,\r
-    onSelectClose: null,\r
-    startingDay: 0,\r
-    minDate: null,\r
-    maxDate: null,\r
-    dueDate: null,\r
-    fromDate: null,\r
-    legendIcon: null,\r
-    legendMessage: null,\r
-    calendarDisabled: false,\r
-    collapseWait: 0,\r
-    orientation: 'left',\r
-    inline: false,\r
-    helperText: 'The date you selected is $date. In case of mobile double tap to open calendar. Select a date to close the calendar.',\r
-    datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation'],\r
-    datepickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],\r
-    datepickerFunctionAttributes: ['disableDates', 'onSelectClose']\r
-})\r
-\r
-.factory('b2bDatepickerService', ['b2bDatepickerConfig', 'dateFilter', function (b2bDatepickerConfig, dateFilter) {\r
-    var setAttributes = function (attr, elem) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {\r
-            var attributes = b2bDatepickerConfig.datepickerEvalAttributes.concat(b2bDatepickerConfig.datepickerWatchAttributes, b2bDatepickerConfig.datepickerFunctionAttributes);\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    elem.attr(key.toSnakeCase(), key);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    var bindScope = function (attr, scope) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {\r
-            var evalFunction = function (key, val) {\r
-                scope[key] = scope.$parent.$eval(val);\r
-            };\r
-\r
-            var watchFunction = function (key, val) {\r
-                scope.$parent.$watch(val, function (value) {\r
-                    scope[key] = value;\r
-                });\r
-                scope.$watch(key, function (value) {\r
-                    scope.$parent[val] = value;\r
-                });\r
-            };\r
-\r
-            var evalAttributes = b2bDatepickerConfig.datepickerEvalAttributes;\r
-            var watchAttributes = b2bDatepickerConfig.datepickerWatchAttributes;\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    evalFunction(key, val);\r
-                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    watchFunction(key, val);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return {\r
-        setAttributes: setAttributes,\r
-        bindScope: bindScope\r
-    };\r
-}])\r
-\r
-.controller('b2bDatepickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bDatepickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {\r
-    var format = {\r
-            date: getValue($attrs.dateFormat, dtConfig.dateFormat),\r
-            day: getValue($attrs.dayFormat, dtConfig.dayFormat),\r
-            month: getValue($attrs.monthFormat, dtConfig.monthFormat),\r
-            year: getValue($attrs.yearFormat, dtConfig.yearFormat),\r
-            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),\r
-            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),\r
-            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),\r
-            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),\r
-            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)\r
-        },\r
-        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);\r
-\r
-    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;\r
-    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;\r
-    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;\r
-    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;\r
-    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;\r
-    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;\r
-    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;\r
-    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);\r
-    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);\r
-    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);\r
-\r
-    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;\r
-\r
-    function getValue(value, defaultValue) {\r
-        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;\r
-    }\r
-\r
-    function getDaysInMonth(year, month) {\r
-        return new Date(year, month, 0).getDate();\r
-    }\r
-\r
-    function getDates(startDate, n) {\r
-        var dates = new Array(n);\r
-        var current = startDate,\r
-            i = 0;\r
-        while (i < n) {\r
-            dates[i++] = new Date(current);\r
-            current.setDate(current.getDate() + 1);\r
-        }\r
-        return dates;\r
-    }\r
-\r
-    this.updatePosition = function (b2bDatepickerPopupTemplate) {\r
-        $scope.position = $position.offset($element);\r
-        $scope.position.top = $scope.position.top + $element.find('input').prop('offsetHeight');\r
-        if ($scope.orientation === 'right') {\r
-            $scope.position.left = $scope.position.left - (((b2bDatepickerPopupTemplate && b2bDatepickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));\r
-        }\r
-    };\r
-\r
-    function isSelected(dt) {\r
-        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isFromDate(dt) {\r
-        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDateRange(dt) {\r
-        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {\r
-            return true;\r
-        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isOld(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isNew(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isPastDue(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt > $scope.dueDate);\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDueDate(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt.getTime() === $scope.dueDate.getTime());\r
-        }\r
-        return false;\r
-    }\r
-\r
-    var isDisabled = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };\r
-\r
-    var compare = function (date1, date2) {\r
-        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));\r
-    };\r
-\r
-    function isMinDateAvailable(startDate, endDate) {\r
-        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-    }\r
-\r
-    function isMaxDateAvailable(startDate, endDate) {\r
-        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-    }\r
-\r
-    function getLabel(label) {\r
-        if (label) {\r
-            var labelObj = {\r
-                pre: label.substr(0, 1).toUpperCase(),\r
-                post: label\r
-            };\r
-            return labelObj;\r
-        }\r
-        return;\r
-    }\r
-\r
-    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {\r
-        return {\r
-            date: date,\r
-            label: dateFilter(date, dayFormat),\r
-            header: dateFilter(date, dayHeaderFormat),\r
-            selected: !!isSelected,\r
-            fromDate: !!isFromDate,\r
-            dateRange: !!isDateRange,\r
-            oldMonth: !!isOld,\r
-            nextMonth: !!isNew,\r
-            disabled: !!isDisabled,\r
-            dueDate: !!dueDate,\r
-            pastDue: !!pastDue,\r
-            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))\r
-        };\r
-    }\r
-\r
-    this.modes = [\r
-        {\r
-            name: 'day',\r
-            getVisibleDates: function (date) {\r
-                var year = date.getFullYear(),\r
-                    month = date.getMonth(),\r
-                    firstDayOfMonth = new Date(year, month, 1),\r
-                    lastDayOfMonth = new Date(year, month + 1, 0);\r
-                var difference = startingDay - firstDayOfMonth.getDay(),\r
-                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,\r
-                    firstDate = new Date(firstDayOfMonth),\r
-                    numDates = 0;\r
-\r
-                if (numDisplayedFromPreviousMonth > 0) {\r
-                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\r
-                    numDates += numDisplayedFromPreviousMonth; // Previous\r
-                }\r
-                numDates += getDaysInMonth(year, month + 1); // Current\r
-                numDates += (7 - numDates % 7) % 7; // Next\r
-\r
-                var days = getDates(firstDate, numDates),\r
-                    labels = new Array(7);\r
-                for (var i = 0; i < numDates; i++) {\r
-                    var dt = new Date(days[i]);\r
-                    days[i] = makeDate(dt,\r
-                        format.day,\r
-                        format.dayHeader,\r
-                        isSelected(dt),\r
-                        isFromDate(dt),\r
-                        isDateRange(dt),\r
-                        isOld(dt, date),\r
-                        isNew(dt, date),\r
-                        isDisabled(dt, date),\r
-                        isDueDate(dt),\r
-                        isPastDue(dt));\r
-                }\r
-                for (var j = 0; j < 7; j++) {\r
-                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));\r
-                }\r
-                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                return {\r
-                    objects: days,\r
-                    title: dateFilter(date, format.dayTitle),\r
-                    labels: labels\r
-                };\r
-            },\r
-            split: 7,\r
-            step: {\r
-                months: 1\r
-            }\r
-        }\r
-    ];\r
-}])\r
-\r
-.directive('b2bDatepickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile', 'trapFocusInElement', '$position', '$window', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, trapFocusInElement, $position, $window) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: function (elem, attr) {\r
-            if (attr.inline === 'true') {\r
-                return 'b2bTemplate/calendar/datepicker-popup.html';\r
-            } else {\r
-                return 'b2bTemplate/calendar/datepicker.html';\r
-            }\r
-        },\r
-        scope: {},\r
-        require: ['b2bDatepickerPopup', 'ngModel', '?^b2bDatepickerGroup'],\r
-        controller: 'b2bDatepickerController',\r
-        link: function (scope, element, attrs, ctrls) {\r
-            var datepickerCtrl = ctrls[0],\r
-                ngModel = ctrls[1],\r
-                b2bDatepickerGroupCtrl = ctrls[2];\r
-            var b2bDatepickerPopupTemplate;\r
-\r
-            if (!ngModel) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            // Configuration parameters\r
-            var mode = 0,\r
-                selected;\r
-            scope.isOpen = false;\r
-\r
-            scope.headers = [];\r
-            scope.footers = [];\r
-\r
-            if (b2bDatepickerGroupCtrl) {\r
-                b2bDatepickerGroupCtrl.registerDatepickerScope(scope);\r
-            }\r
-\r
-            element.find('button').bind('click', function () {\r
-                element.find('input')[0].click();\r
-            });\r
-\r
-            element.find('input').bind('click', function () {\r
-                if (!scope.ngDisabled) {\r
-                    scope.isOpen = !scope.isOpen;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                    $timeout(function () { \r
-                        angular.element(element[0].querySelector('.datepicker-input')).scrollTop=0;\r
-                    },10);\r
-                }\r
-            });\r
-            var toggleCalendar = function (flag) {\r
-                if (!scope.inline) {\r
-                    if (flag) {\r
-                        b2bDatepickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/calendar/datepicker-popup.html'));\r
-                        b2bDatepickerPopupTemplate = $compile(b2bDatepickerPopupTemplate)(scope);\r
-                        $document.find('body').append(b2bDatepickerPopupTemplate);\r
-                        b2bDatepickerPopupTemplate.bind('keydown', keyPress);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            trapFocusInElement(flag, b2bDatepickerPopupTemplate);\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false; \r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                    } else {\r
-                        b2bDatepickerPopupTemplate.unbind('keydown', keyPress);\r
-                        b2bDatepickerPopupTemplate.remove();\r
-                        element.find('button')[0].focus();\r
-                        scope.getFocus = false;\r
-                        trapFocusInElement(flag, b2bDatepickerPopupTemplate);\r
-                    }\r
-                }\r
-            };\r
-\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), element, $document);\r
-                var isb2bDatepickerPopupTemplate = $isElement(angular.element(e.target), b2bDatepickerPopupTemplate, $document);\r
-                if (!(isElement || isb2bDatepickerPopupTemplate)) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            var keyPress = function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (ev.keyCode === 27) {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 33) {\r
-                        !scope.disablePrev && scope.move(-1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 34) {\r
-                        !scope.disableNext && scope.move(1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            $documentBind.click('isOpen', outsideClick, scope);\r
-\r
-            var modalContainer = angular.element(document.querySelector('.modalwrapper'));\r
-            var modalBodyContainer = angular.element(document.querySelector('.modal-body'));\r
-            if (modalContainer) {\r
-                modalContainer.bind('scroll', function () {\r
-                    if (b2bDatepickerPopupTemplate) {\r
-                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-            }\r
-            if (modalBodyContainer) {\r
-                modalBodyContainer.bind('scroll', function () {\r
-                    if (b2bDatepickerPopupTemplate) {\r
-                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                        var datepickerTextfield = $position.offset(element.find('input'));\r
-                        var modalBodyPosition = $position.offset(modalBodyContainer);\r
-\r
-                        if (((datepickerTextfield.top + datepickerTextfield.height) < modalBodyPosition.top || datepickerTextfield.top > (modalBodyPosition.top + modalBodyPosition.height)) && scope.isOpen) {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-            }\r
-            var window = angular.element($window);\r
-            window.bind('resize', function () {\r
-                if (b2bDatepickerPopupTemplate) {\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                    scope.$apply();\r
-                }\r
-            });\r
-\r
-            scope.$on('$destroy', function () {\r
-                if (scope.isOpen) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                }\r
-            });\r
-\r
-            scope.resetTime = function (date) {\r
-                if (typeof date === 'string') {\r
-                    date = date + 'T12:00:00';\r
-                }\r
-                var dt;\r
-                if (!isNaN(new Date(date))) {\r
-                    dt = new Date(date);\r
-                } else {\r
-                    return null;\r
-                }\r
-                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-            };\r
-\r
-            if (attrs.min) {\r
-                scope.$parent.$watch($parse(attrs.min), function (value) {\r
-                    scope.minDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.max) {\r
-                scope.$parent.$watch($parse(attrs.max), function (value) {\r
-                    scope.maxDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.due) {\r
-                scope.$parent.$watch($parse(attrs.due), function (value) {\r
-                    scope.dueDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.from) {\r
-                scope.$parent.$watch($parse(attrs.from), function (value) {\r
-                    scope.fromDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-\r
-            if (attrs.legendIcon) {\r
-                scope.$parent.$watch(attrs.legendIcon, function (value) {\r
-                    scope.legendIcon = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.legendMessage) {\r
-                scope.$parent.$watch(attrs.legendMessage, function (value) {\r
-                    scope.legendMessage = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.ngDisabled) {\r
-                scope.$parent.$watch(attrs.ngDisabled, function (value) {\r
-                    scope.ngDisabled = value ? value : null;\r
-                });\r
-            }\r
-\r
-            // Split array into smaller arrays\r
-            function split(arr, size) {\r
-                var arrays = [];\r
-                while (arr.length > 0) {\r
-                    arrays.push(arr.splice(0, size));\r
-                }\r
-                return arrays;\r
-            }\r
-\r
-            function refill(date) {\r
-                if (angular.isDate(date) && !isNaN(date)) {\r
-                    selected = new Date(date);\r
-                } else {\r
-                    if (!selected) {\r
-                        selected = new Date();\r
-                    }\r
-                }\r
-\r
-                if (selected) {\r
-                    var currentMode = datepickerCtrl.modes[mode],\r
-                        data = currentMode.getVisibleDates(selected);\r
-                    scope.rows = split(data.objects, currentMode.split);\r
-                    var flag = false;\r
-                    var startFlag = false;\r
-                    var firstSelected = false;\r
-                    for (var i = 0; i < scope.rows.length; i++) {\r
-                        for (var j = 0; j < scope.rows[i].length; j++) {\r
-\r
-                            if (scope.rows[i][j].label === "1" && !firstSelected) {\r
-                                firstSelected = true;\r
-                                var firstDay = scope.rows[i][j];\r
-                            }\r
-\r
-                            if (scope.rows[i][j].selected === true) {\r
-                                flag = true;\r
-                                break;\r
-                            }\r
-                        }\r
-                        if (flag) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (!flag) {\r
-                        firstDay.firstFocus = true;\r
-                    }\r
-\r
-                    scope.labels = data.labels || [];\r
-                    scope.title = data.title;\r
-\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                }\r
-            }\r
-\r
-            scope.select = function (date) {\r
-                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());\r
-                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({\r
-                        date: dt\r
-                    }) !== false)) {\r
-                    scope.currentDate = dt;\r
-                    if (angular.isNumber(scope.collapseWait)) {\r
-                        $timeout(function () {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }, scope.collapseWait);\r
-                    } else {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                    }\r
-                }\r
-            };\r
-\r
-            scope.move = function (direction,$event) {\r
-                var step = datepickerCtrl.modes[mode].step;\r
-                selected.setDate(1);\r
-                selected.setMonth(selected.getMonth() + direction * (step.months || 0));\r
-                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));\r
-                refill();\r
-\r
-                $timeout(function () {\r
-                    trapFocusInElement();\r
-                }, 100);\r
-\r
-                $event.preventDefault();\r
-                $event.stopPropagation();\r
-            };\r
-\r
-            scope.trapFocus = function () {\r
-                $timeout(function () {\r
-                    trapFocusInElement();\r
-                }, 100);\r
-            };\r
-\r
-            scope.$watch('currentDate', function (value) {\r
-                if (angular.isDefined(value) && value !== null) {\r
-                    refill(value);\r
-                } else {\r
-                    refill();\r
-                }\r
-                ngModel.$setViewValue(value);\r
-            });\r
-\r
-            ngModel.$render = function () {\r
-                scope.currentDate = ngModel.$viewValue;\r
-            };\r
-\r
-            var stringToDate = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    value = new Date(value);\r
-                }\r
-                return value;\r
-            };\r
-            ngModel.$formatters.unshift(stringToDate);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepicker', ['$compile', '$log', 'b2bDatepickerConfig', 'b2bDatepickerService', function ($compile, $log, b2bDatepickerConfig, b2bDatepickerService) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            disableDates: '&',\r
-            onSelectClose: '&'\r
-        },\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bDatepickerConfig.dateFormat;\r
-            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bDatepickerConfig.helperText;\r
-            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');\r
-\r
-            var inline = false;\r
-            if (elem.prop('nodeName') !== 'INPUT') {\r
-                inline = true;\r
-            }\r
-\r
-            var calendarIcon = '<i class="icon-primary-calendar" aria-hidden="true"></i>'\r
-            var selectedDateMessage = '<button id="' + attr.btnId + '" type="button" class="span12 faux-input" ng-disabled="ngDisabled"><span class="hidden-spoken">' + helperText + '</span></button>';\r
-\r
-            elem.removeAttr('b2b-datepicker');\r
-            elem.removeAttr('ng-model');\r
-            elem.removeAttr('ng-disabled');\r
-            elem.addClass('datepicker-input');\r
-            elem.attr('ng-model', 'dt');\r
-            elem.attr('aria-describedby', 'datepicker');\r
-            elem.attr('aria-hidden', 'true');\r
-            elem.attr('tabindex', '-1');\r
-            elem.attr('readonly', 'true');\r
-            elem.attr('ng-disabled', 'ngDisabled');\r
-            elem.attr('b2b-format-date', dateFormatString);\r
-\r
-            var wrapperElement = angular.element('<div></div>');\r
-            wrapperElement.attr('b2b-datepicker-popup', '');\r
-            wrapperElement.attr('ng-model', 'dt');\r
-            if (inline) {\r
-                wrapperElement.attr('inline', inline);\r
-            }\r
-\r
-            b2bDatepickerService.setAttributes(attr, wrapperElement);\r
-            b2bDatepickerService.bindScope(attr, scope);\r
-\r
-            wrapperElement.html('');\r
-            wrapperElement.append(calendarIcon);\r
-            wrapperElement.append(selectedDateMessage);\r
-            wrapperElement.append(elem.prop('outerHTML'));\r
-\r
-            var elm = wrapperElement.prop('outerHTML');\r
-            elm = $compile(elm)(scope);\r
-            elem.replaceWith(elm);\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            if (!ctrl) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            scope.$watch('dt', function (value) {\r
-                ctrl.$setViewValue(value);\r
-            });\r
-            ctrl.$render = function () {\r
-                scope.dt = ctrl.$viewValue;\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerGroup', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            this.$$headers = [];\r
-            this.$$footers = [];\r
-            this.registerDatepickerScope = function (datepickerScope) {\r
-                datepickerScope.headers = this.$$headers;\r
-                datepickerScope.footers = this.$$footers;\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {}\r
-    };\r
-}])\r
-\r
-.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var b2bFormatDate = "";\r
-            attr.$observe('b2bFormatDate', function (value) {\r
-                b2bFormatDate = value;\r
-            });\r
-            var dateToString = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    return dateFilter(new Date(value), b2bFormatDate);\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$formatters.unshift(dateToString);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerHeader', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bDatepickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$headers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerFooter', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bDatepickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$footers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:checkboxes\r
- *\r
- * @description\r
- *  <file src="src/checkboxes/docs/readme.md" />\r
- * @usage\r
- * See demo section\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/checkboxes/docs/demo.html" />\r
- <file src="src/checkboxes/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.checkboxes', ['b2b.att.utilities'])\r
-.directive('b2bSelectGroup', [function (){\r
-        return {\r
-            restrict: 'A',\r
-            require: 'ngModel',\r
-            scope: {\r
-                checkboxes: "="\r
-            },\r
-            link: function (scope, elem, attr, ctrl) {\r
-                elem.bind('change', function () {\r
-                    var isChecked = elem.prop('checked');\r
-                    angular.forEach(scope.checkboxes, function (item) {\r
-                        item.isSelected = isChecked;\r
-                    });\r
-                    scope.$apply();\r
-                });\r
-                scope.$watch('checkboxes', function () {\r
-                    var setBoxes = 0;\r
-                    if(scope.checkboxes === undefined) {\r
-                        return;\r
-                    }\r
-                    angular.forEach(scope.checkboxes, function (item) {\r
-                        if (item.isSelected) {\r
-                            setBoxes++; \r
-                        } \r
-                    });\r
-                    elem.prop('indeterminate', false);\r
-                    if ( scope.checkboxes !==undefined && setBoxes === scope.checkboxes.length && scope.checkboxes.length > 0) { \r
-                        ctrl.$setViewValue(true); \r
-                        elem.removeClass('indeterminate');\r
-                    } else if (setBoxes === 0) { \r
-                       ctrl.$setViewValue(false); \r
-                       elem.removeClass('indeterminate');\r
-                    } else { \r
-                        ctrl.$setViewValue(false); \r
-                        elem.addClass('indeterminate');\r
-                        elem.prop('indeterminate', true); \r
-                    }\r
-                    ctrl.$render();\r
-                }, true);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:coachmark\r
- *\r
- * @description\r
- * <file src="src/coachmark/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
-<button b2b-coachmark start-coachmark-callback="startCoachmark()" end-coachmark-callback="endCoachmark()" action-coachmark-callback="actionCoachmark(action)" coachmark-index="coachmarkIndex" coachmarks="coachmarkElements" id="coachmark0" class="btn btn-alt">Initiate tour</button>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/coachmark/docs/demo.html" />\r
-            <file src="src/coachmark/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.coachmark', ['b2b.att.utilities','b2b.att.position'])\r
-        \r
-    .directive('b2bCoachmark', ['$document', '$compile', '$position', '$timeout', function($document, $compile, $position, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-             scope: {\r
-                coachmarks: '=',\r
-                coachmarkIndex: '=',\r
-                startCoachmarkCallback: '&',\r
-                endCoachmarkCallback: '&',\r
-                actionCoachmarkCallback: '&'\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var coachmarkItems = scope.coachmarks;\r
-                var body = $document.find('body').eq(0);\r
-                var coackmarkJqContainer;\r
-                var coackmarkContainer;\r
-                var coachMarkElement;\r
-                var backdropjqLiteEl;\r
-                var coachmarkHighlight;\r
-                var initaitedCoachmark = false;\r
-                scope.coackmarkElPos ={\r
-                    'top':'',\r
-                    'left':''\r
-                };\r
-                \r
-                scope.currentCoachmark = {};\r
-                \r
-                \r
-                var coachmarkBackdrop = function(){\r
-                    backdropjqLiteEl = angular.element('<div class="b2b-modal-backdrop fade in hidden-by-modal"></div>');\r
-                    body.append(backdropjqLiteEl);\r
-\r
-                    backdropjqLiteEl.bind('click', function() {\r
-                        scope.closeCoachmark();\r
-                        scope.$apply();\r
-                    });\r
-                };\r
-                \r
-                \r
-                scope.closeButtonFocus = function(){\r
-                    if(document.getElementsByClassName('b2b-coachmark-header').length >0){\r
-                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollLeft = 0;\r
-                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollTop = 0;\r
-                    }\r
-                }\r
-\r
-                scope.actionCoachmark = function(action){\r
-                    scope.actionCoachmarkCallback({\r
-                        'action':action\r
-                    })\r
-                };\r
-                \r
-                scope.closeCoachmark = function(){\r
-                    initaitedCoachmark = false;\r
-                    backdropjqLiteEl.remove();  \r
-                    coackmarkContainer.remove();\r
-                    coachmarkHighlight.remove();\r
-                    if(coachMarkElement !== undefined && coachMarkElement !==""){\r
-                        coachMarkElement.removeClass('b2b-coachmark-label')\r
-                    }\r
-                    if (angular.isFunction(scope.endCoachmarkCallback)){\r
-                        scope.endCoachmarkCallback();   \r
-                    }\r
-                    element[0].focus();\r
-                }\r
-                \r
-                function showCoachmark(targetElement) {\r
-                    scope.currentCoachmark = targetElement;\r
-                    if(coachMarkElement !== undefined && coachMarkElement !==""){\r
-                        coachMarkElement.removeClass('b2b-coachmark-label')\r
-                        coackmarkContainer.remove();\r
-                        coachmarkHighlight.remove();\r
-                    }\r
-                    coachMarkElement = angular.element(document.querySelector(targetElement.elementId));\r
-                    coachMarkElement.addClass('b2b-coachmark-label');\r
-                    var elementPosition = $position.offset(coachMarkElement);\r
-                    \r
-                    coachmarkHighlight = angular.element('<div class="b2b-coachmark-highlight"></div><div class="b2b-coachmark-highlight b2b-coachmark-highlight-mask"></div>');\r
-                    coachmarkHighlight.css({\r
-                        'width': (elementPosition.width + 20) +'px',\r
-                        'top': (elementPosition.top -10) + 'px',\r
-                        'left': (elementPosition.left - 10) + 'px',\r
-                        'height': (elementPosition.height + 20) +'px'\r
-                    }); \r
-                    body.append(coachmarkHighlight);\r
-                    \r
-                    scope.coackmarkElPos.top = (elementPosition.top + elementPosition.height + 32) + 'px';\r
-                    scope.coackmarkElPos.left = (elementPosition.left - 158 + elementPosition.width / 2 ) + 'px';\r
-                    coackmarkJqContainer = angular.element('<div b2b-coachmark-container b2b-trap-focus-inside-element="true"></div>');\r
-                    coackmarkContainer = $compile(coackmarkJqContainer)(scope);\r
-                    body.append(coackmarkContainer);\r
-                    \r
-                    $timeout(function () {\r
-                        var currentCoachmarkContainer = document.getElementsByClassName('b2b-coachmark-container')[0];\r
-                        currentCoachmarkContainer.focus();\r
-                        var coachmarkHeight = window.getComputedStyle(currentCoachmarkContainer).height.split('px')[0];\r
-                        var newOffsetHeight = (Math.round(elementPosition.top) - Math.round(coachmarkHeight));\r
-                        \r
-                        // We need a slight offset to show the lightboxed item\r
-                        TweenLite.to(window, 2, {scrollTo:{x: (scope.coackmarkElPos.left.split('px')[0]-100), y: newOffsetHeight}});\r
-                    }, 200);\r
-                }\r
-                \r
-                element.bind('click', function (e) {\r
-                    initaitedCoachmark = true;\r
-                    if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){\r
-                        scope.coachmarkIndex = 0;\r
-                    }\r
-                    scope.$watch('coachmarkIndex', function () {\r
-                        if(initaitedCoachmark === true){\r
-                            if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){\r
-                                scope.closeCoachmark();\r
-                            }else{\r
-                                showCoachmark(coachmarkItems[scope.coachmarkIndex]);\r
-                            }\r
-                        }\r
-                    });\r
-                    coachmarkBackdrop();\r
-                    showCoachmark(coachmarkItems[scope.coachmarkIndex]);\r
-                    if (angular.isFunction(scope.startCoachmarkCallback)){\r
-                        scope.startCoachmarkCallback(); \r
-                    }\r
-                    $document.bind('keydown', function (evt) {\r
-                        if (evt.which === 27 && initaitedCoachmark) {\r
-                            scope.closeCoachmark();\r
-                            scope.$apply(); \r
-                        }\r
-                    });\r
-                });\r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bCoachmarkContainer', ['$document', '$position', function($document, $position) {\r
-        return {\r
-            restrict: 'A',\r
-            transclude: true,\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/coachmark/coachmark.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                            \r
-            }\r
-        };  \r
-    }]);\r
-    \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Configuration Section \r
- * \r
- * @description \r
- *  <file src="src/configurationSection/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/configurationSection/docs/demo.html" /> \r
-            <file src="src/configurationSection/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.configurationSection', [])\r
-  \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Directory Listing \r
- * \r
- * @description \r
- *  <file src="src/directoryListingTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/directoryListingTemplate/docs/demo.html" /> \r
-            <file src="src/directoryListingTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.directoryListingTemplate', [])\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:dropdowns\r
- *\r
- * @description\r
- *  <file src="src/dropdowns/docs/readme.md" />\r
- * @usage\r
- *\r
- * @example\r
-   <section id="code">\r
-    <example module="b2b.att">\r
-     <file src="src/dropdowns/docs/demo.html" />\r
-     <file src="src/dropdowns/docs/demo.js" />\r
-    </example>\r
-   </section>\r
- */\r
-angular.module('b2b.att.dropdowns', ['b2b.att.utilities', 'b2b.att.position', 'ngSanitize'])\r
-\r
-.constant('b2bDropdownConfig', {\r
-    prev: '37,38',\r
-    next: '39,40',\r
-    menuKeyword: 'menu',\r
-    linkMenuKeyword: 'link-menu',\r
-    largeKeyword: 'large',\r
-    smallKeyword: 'small'\r
-})  \r
-\r
-.directive("b2bDropdown", ['$timeout', '$compile', '$templateCache', 'b2bUserAgent', 'b2bDropdownConfig', '$position', function ($timeout, $compile, $templateCache, b2bUserAgent, b2bDropdownConfig, $position) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            scope.isInputDropdown = true;\r
-            scope.placeHoldertext = attr.placeholderText;\r
-            if (attr.type) {\r
-                if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1 || attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {\r
-                    scope.isInputDropdown = false;\r
-                    if (attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {\r
-                        scope.dropdownType = b2bDropdownConfig.linkMenuKeyword;\r
-                    } else if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1) {\r
-                        scope.dropdownType = b2bDropdownConfig.menuKeyword;\r
-                    }\r
-                }\r
-                if (attr.type.indexOf(b2bDropdownConfig.largeKeyword) > -1) {\r
-                    scope.dropdownSize = b2bDropdownConfig.largeKeyword;\r
-                } else if (attr.type.indexOf(b2bDropdownConfig.smallKeyword) > -1) {\r
-                    scope.dropdownSize = b2bDropdownConfig.smallKeyword;\r
-                }\r
-            }\r
-\r
-            scope.labelText = attr.labelText;\r
-\r
-            scope.setBlur = function () {\r
-                scope.setTouched();\r
-            };\r
-\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var formCtrl = elem.controller('form');\r
-                scope.setNgModelController = function (name, ngModelCtrl) {\r
-                    if (name && formCtrl && ngModelCtrl) {\r
-                        formCtrl[name] = ngModelCtrl;\r
-                    }\r
-                };\r
-                scope.setOptionalCta = function (optionalCta) {\r
-                    scope.optionalCta = optionalCta;\r
-                };\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownDesktop.html'));\r
-                template.find('ul').eq(0).append(innerHtml);\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                elem.css({\r
-                    'opacity': '0',\r
-                    'filter': 'alpha(opacity=0)'\r
-                });\r
-                elem.addClass('awd-select isWrapped');\r
-                elem.wrap('<span class="selectWrap"></span>');\r
-                var cover = angular.element('<span aria-hidden="true"><i class="icon-primary-down" aria-hidden="true"></i></span>');\r
-                elem.parent().append(cover);\r
-                elem.parent().append('<i class="icon-primary-down" aria-hidden="true"></i>');\r
-                var set = function () {\r
-                    var sel = elem[0] ? elem[0] : elem;\r
-                    var selectedText = "";\r
-                    var selIndex = sel.selectedIndex;\r
-                    if (typeof selIndex !== 'undefined') {\r
-                        selectedText = sel.options[selIndex].text;\r
-                    }\r
-                    cover.text(selectedText).append('<i class="icon-primary-down" aria-hidden="true"></i>');\r
-                };\r
-                var update = function (value) {\r
-                    $timeout(set, 100);\r
-                };\r
-\r
-                if (attr.ngModel) {\r
-                    scope.$watch(attr.ngModel, function (newVal, oldVal) {\r
-                        update();\r
-                    });\r
-                }\r
-                elem.bind('keyup', function (ev) {\r
-                    if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                        return;\r
-                    }\r
-                    set();\r
-                });\r
-            }\r
-        }],  \r
-        link: function (scope, elem, attr, ctrl) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                scope.updateModel = function () {\r
-                    if (ctrl.$dirty) {\r
-                        debugger;\r
-                    }\r
-                    ctrl.$setViewValue(scope.currentSelected.value);\r
-                    if (scope.dropdownRequired && scope.currentSelected.value === '') {\r
-                        scope.setRequired(false);\r
-                    } else {\r
-                        scope.setRequired(true);\r
-                    }\r
-\r
-                    if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                        $timeout(function () {\r
-                            scope.appendCaretPositionStyle();\r
-                        }, 100);\r
-                    }\r
-                };\r
-                ctrl.$render = function () {\r
-//                    if(ctrl.$dirty || ctrl.$pristine) {\r
-                        $timeout(function () {\r
-\r
-                            if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && (angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '')) {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            } else if ((angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '') && ctrl.$viewValue !== '' ) {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            } else if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && scope.placeHoldertext !== '' )  {\r
-                                scope.currentSelected.text = scope.placeHoldertext; \r
-                            } else {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            }\r
-\r
-                        }, 100);\r
-                    };\r
-//                }\r
-                scope.disabled = false;\r
-                scope.dropdownName = attr.name;\r
-                scope.dropdownId = attr.id;\r
-                scope.labelId = attr.ariaLabelledby;\r
-                scope.dropdownDescribedBy = attr.ariaDescribedby;\r
-                if (attr.required) {\r
-                    scope.dropdownRequired = true;\r
-                } else {\r
-                    scope.dropdownRequired = false;\r
-                }\r
-                elem.removeAttr('name');\r
-                elem.removeAttr('id');\r
-                scope.$parent.$watch(attr.ngDisabled, function (val) {\r
-                    scope.disabled = val;\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownToggle", ['$document', '$documentBind', '$isElement', 'b2bDropdownConfig', 'keymap', 'b2bUtilitiesConfig', '$timeout', '$position', function ($document, $documentBind, $isElement, b2bDropdownConfig, keymap, b2bUtilitiesConfig, $timeout, $position) {\r
-    return {\r
-        restrict: 'A',\r
-        require: '?^b2bKey',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.appendCaretPositionStyle = function () {\r
-                while (document.querySelector('style.b2bDropdownCaret')) {\r
-                    document.querySelector('style.b2bDropdownCaret').remove();\r
-                };\r
-                var caretPosition = $position.position(elem).width - 26;\r
-                if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                    var template = angular.element('<style class="b2bDropdownCaret" type="text/css">.linkSelectorModule .active+.moduleWrapper:before {left: ' + caretPosition + 'px;}</style>');\r
-                    $document.find('head').append(template);\r
-                }\r
-            };\r
-\r
-            if (scope.isInputDropdown && (scope.labelText !== undefined)) {\r
-                elem.attr('aria-label', scope.labelText);\r
-            }\r
-\r
-            scope.toggleFlag = false;\r
-            scope.dropdownLists = {};\r
-            scope.dropdownListValues = [];\r
-            scope.dropdown = {\r
-                totalIndex: -1\r
-            };\r
-            scope.currentSelected = {\r
-                value: '',\r
-                text: '',\r
-                label: '',\r
-                index: -1\r
-            };\r
-            var searchString = '';\r
-            var searchElement = function (searchExp) {\r
-                var regex = new RegExp("\\b" + searchExp, "gi");\r
-                var position = scope.dropdownListValues.regexIndexOf(regex, scope.currentSelected.index + 1, true);\r
-                if (position > -1) {\r
-                    return position;\r
-                }\r
-                return undefined;\r
-            };\r
-            var startTimer = function (time) {\r
-                if (searchString === '') {\r
-                    $timeout(function () {\r
-                        searchString = '';\r
-                    }, time);\r
-                }\r
-            };\r
-            scope.toggleDropdown = function (toggleFlag) {\r
-                if (!scope.disabled) {\r
-                    if (angular.isDefined(toggleFlag)) {\r
-                        scope.toggleFlag = toggleFlag;\r
-                    } else {\r
-                        scope.toggleFlag = !scope.toggleFlag;\r
-                    }\r
-                    if (!scope.toggleFlag) {\r
-                        if (scope.isInputDropdown) {\r
-                            elem.parent().find('input')[0].focus();\r
-                        } else {\r
-                            elem.parent().find('button')[0].focus();\r
-                        }\r
-                    } else {\r
-                        scope.dropdown.highlightedValue = scope.currentSelected.value;\r
-                        if (ctrl && ctrl.enableSearch) {\r
-                            if (angular.isDefined(scope.dropdownLists[scope.currentSelected.value])) {\r
-                                ctrl.resetCounter(scope.dropdownLists[scope.currentSelected.value][2]);\r
-                            }\r
-                        }\r
-                        if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                            scope.appendCaretPositionStyle();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-\r
-            elem.bind('keydown', function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (!scope.toggleFlag) {\r
-                    if (ev.keyCode) {\r
-                        var currentIndex = scope.currentSelected.index;\r
-                        if (ev.altKey === true && ev.keyCode === keymap.KEY.DOWN) {\r
-                            scope.toggleDropdown(true);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (b2bDropdownConfig.prev.split(',').indexOf(ev.keyCode.toString()) > -1) {\r
-                            angular.isDefined(scope.dropdownListValues[currentIndex - 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex - 1]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (b2bDropdownConfig.next.split(',').indexOf(ev.keyCode.toString()) > -1) {\r
-                            angular.isDefined(scope.dropdownListValues[currentIndex + 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex + 1]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {\r
-                            startTimer(b2bUtilitiesConfig.searchTimer);\r
-                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');\r
-                            var position = searchElement(searchString);\r
-                            angular.isDefined(scope.dropdownListValues[position]) ? scope.dropdownLists[scope.dropdownListValues[position]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    }\r
-                } else {\r
-                    if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {\r
-                        scope.toggleDropdown(false);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                        scope.toggleDropdown(false);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                }\r
-                scope.$apply(); // TODO: Move this into each block to avoid expensive digest cycles\r
-            });\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), elem.parent(), $document);\r
-                if (!isElement) {\r
-                    scope.toggleDropdown(false);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-            $documentBind.click('toggleFlag', outsideClick, scope);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownGroup", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html'));\r
-                template.attr('ng-repeat', attr.optGroupRepeat);\r
-                template.attr('label', elem.attr('label'));\r
-                template.find('ul').append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                var template = angular.element(elem.prop('outerHTML'));\r
-                template.attr('ng-repeat', attr.optGroupRepeat);\r
-                template.removeAttr('b2b-dropdown-group');\r
-                template.removeAttr('opt-group-repeat');\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownGroupDesktop", [function () {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.groupHeader = attr.label;\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownList", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownListDesktop.html'));\r
-                template.attr('ng-repeat', attr.optionRepeat);\r
-                template.attr('value', elem.attr('value'));\r
-                template.attr('search-key', elem.attr('value'));\r
-                if (elem.attr('aria-describedby')){\r
-                    template.attr('aria-describedby', attr.ariaDescribedby);\r
-                }\r
-                if (elem.attr('imgsrc')) {\r
-                    if (elem.attr('imgalt')) {\r
-                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt="' + elem.attr('imgalt') + '"/>');\r
-                    } else {\r
-                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt=""/>');\r
-                    }\r
-                }\r
-                template.append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                var template = angular.element(elem.prop('outerHTML'));\r
-                template.attr('ng-repeat', attr.optionRepeat);\r
-                if (elem.attr('aria-describedby')){\r
-                    template.attr('aria-describedby', attr.ariaDescribedby);\r
-                }\r
-                template.removeAttr('b2b-dropdown-list');\r
-                template.removeAttr('option-repeat');\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownListDesktop", ['$sce', 'keymap', 'b2bDropdownConfig', function ($sce, keymap, b2bDropdownConfig) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var dropdownListValue = scope.dropdownListValue = attr.value;\r
-            scope.dropdown.totalIndex++;\r
-            var dropdownListIndex = scope.dropdown.totalIndex;\r
-            scope.dropdownListValues.push(dropdownListValue);\r
-            scope.dropdownLists[dropdownListValue] = [];\r
-            scope.dropdownLists[dropdownListValue][0] = scope;\r
-            scope.dropdownLists[dropdownListValue][1] = elem;\r
-            scope.dropdownLists[dropdownListValue][2] = dropdownListIndex;\r
-            scope.updateDropdownValue = function () {\r
-                scope.currentSelected.value = dropdownListValue;\r
-                if (scope.isInputDropdown) {\r
-                    scope.currentSelected.text = elem.text();\r
-                } else if ((scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) || (scope.dropdownType === b2bDropdownConfig.menuKeyword && scope.dropdownSize === b2bDropdownConfig.smallKeyword)) {\r
-                    scope.currentSelected.text = dropdownListValue;\r
-                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {\r
-                    scope.currentSelected.text = $sce.trustAsHtml(elem.html());\r
-                }\r
-                if (scope.isInputDropdown) {\r
-                    scope.currentSelected.label = elem.text();\r
-                } else if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                    scope.currentSelected.label = dropdownListValue;\r
-                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {\r
-                    scope.currentSelected.label = elem.text();\r
-                }\r
-                scope.currentSelected.index = dropdownListIndex;\r
-                scope.updateModel();\r
-            };\r
-            scope.selectDropdownItem = function () {\r
-                scope.setDirty();\r
-                scope.updateDropdownValue();\r
-                scope.toggleDropdown(false);\r
-            };\r
-            scope.highlightDropdown = function () {\r
-                scope.dropdown.highlightedValue = dropdownListValue;\r
-            };\r
-            elem.bind('mouseover', function (ev) {\r
-                elem[0].focus();\r
-            });\r
-            elem.bind('keydown', function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {\r
-                    scope.toggleDropdown(false);\r
-                    ev.preventDefault();\r
-                    ev.stopPropagation();\r
-                } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                    scope.toggleDropdown(false);\r
-                    ev.preventDefault();\r
-                    ev.stopPropagation();\r
-                }\r
-                scope.$apply();\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownRepeat", ['$compile', 'b2bUserAgent', function ($compile, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element('<div></div>');\r
-                template.attr('ng-repeat', attr.b2bDropdownRepeat);\r
-                template.append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                angular.noop();\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownValidation", ['$timeout', function ($timeout) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            $timeout(function () {\r
-                scope.setNgModelController(attr.name, ctrl);\r
-            }, 100);\r
-            scope.setDirty = function () {\r
-                if (ctrl.$dirty === false) {\r
-                    ctrl.$dirty = true;\r
-                    ctrl.$pristine = false;\r
-                }\r
-            };\r
-            scope.setTouched = function () {\r
-                if (ctrl.$touched === false) {\r
-                    ctrl.$touched = true;\r
-                    ctrl.$pristine = false;\r
-                }\r
-            };\r
-            scope.setRequired = function (flag) {\r
-                ctrl.$setValidity('required', flag);\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDropdownOptionalCta', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (scope.setOptionalCta) {\r
-                    scope.setOptionalCta(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:File Upload\r
- *\r
- * @description\r
- *  <file src="src/fileUpload/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
-<form id="dragDropFile">        \r
-    <div b2b-file-drop file-model="fileModel" on-drop="triggerFileUpload()"  align="center">\r
-        <p>\r
-            <br>To upload a file, drag & drop it here or \r
-            <span b2b-file-link file-model="fileModel" on-file-select="triggerFileUpload()" >\r
-                click here to select from your computer.\r
-            </span><br>\r
-        </p>\r
-    </div>\r
-</form>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/fileUpload/docs/demo.html" />\r
-            <file src="src/fileUpload/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.fileUpload', ['b2b.att.utilities'])\r
-    .directive('b2bFileDrop', [function() {\r
-            return {\r
-                restrict: 'EA',\r
-                scope: {\r
-                    fileModel: '=',\r
-                    onDrop: '&'\r
-                },\r
-                controller: ['$scope', '$attrs', function($scope, $attrs) {\r
-                    this.onDrop = $scope.onDrop;\r
-                }],\r
-                link: function(scope, element) {\r
-                    element.addClass('b2b-dragdrop');\r
-                    element.bind(\r
-                        'dragover',\r
-                        function(e) {\r
-                            if (e.originalEvent) {\r
-                                e.dataTransfer = e.originalEvent.dataTransfer;\r
-                            }\r
-                            e.dataTransfer.dropEffect = 'move';\r
-                            // allows us to drop\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            element.addClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'dragenter',\r
-                        function(e) {\r
-                            // allows us to drop\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            element.addClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'dragleave',\r
-                        function() {\r
-                            element.removeClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'drop',\r
-                        function(e) {\r
-                            // Stops some browsers from redirecting.\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            if (e.stopPropagation) {\r
-                                e.stopPropagation();\r
-                            }\r
-                            if (e.originalEvent) {\r
-                                e.dataTransfer = e.originalEvent.dataTransfer;\r
-                            }\r
-                            element.removeClass('b2b-dragdrop-over');\r
-                            if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {\r
-                                scope.fileModel = e.dataTransfer.files[0];\r
-                                scope.$apply();\r
-                                if (angular.isFunction(scope.onDrop)) {\r
-                                    scope.onDrop();\r
-                                }\r
-                            }\r
-                            return false;\r
-                        }\r
-                    );\r
-                }\r
-            };\r
-        }])\r
-        .directive('b2bFileLink', [function() {\r
-            return {\r
-                restrict: 'EA',\r
-                require: '^?b2bFileDrop',\r
-                replace: true,\r
-                transclude: true,\r
-                templateUrl: 'b2bTemplate/fileUpload/fileUpload.html',\r
-                scope: {\r
-                    fileModel: '=?',\r
-                    onFileSelect: '&'\r
-                },\r
-                controller: ['$scope', function($scope) {\r
-                    this.setFileModel = function(fileModel) {\r
-                        if ($scope.takeFileModelFromParent) {\r
-                            $scope.$parent.fileModel = fileModel;\r
-                            $scope.$parent.$apply();\r
-                        } else {\r
-                            $scope.fileModel = fileModel;\r
-                            $scope.$apply();\r
-                        }\r
-                    };\r
-                    this.callbackFunction = function() {\r
-                        if (angular.isFunction($scope.onFileSelect)) {\r
-                            $scope.onFileSelect();\r
-                        }\r
-                    };\r
-        \r
-                }],\r
-                link: function(scope, element, attr, b2bFileDropCtrl) {\r
-                    scope.takeFileModelFromParent = false;\r
-                    if (!(attr.fileModel) && b2bFileDropCtrl) {\r
-                        scope.takeFileModelFromParent = true;\r
-                    }\r
-                    if (!(attr.onFileSelect) && b2bFileDropCtrl) {\r
-                        scope.onFileSelect = b2bFileDropCtrl.onDrop;\r
-                    }\r
-                }\r
-            };\r
-        }])\r
-        .directive('b2bFileChange', ['$log', '$rootScope', function($log, $rootScope) {\r
-            return {\r
-                restrict: 'A',\r
-                require: '^b2bFileLink',\r
-                link: function(scope, element, attr, b2bFileLinkCtrl) {\r
-                    element.bind('change', changeFileModel);\r
-\r
-                    function changeFileModel(e) {\r
-                        if (e.target.files && e.target.files.length > 0) {\r
-                            b2bFileLinkCtrl.setFileModel(e.target.files[0]);\r
-                            b2bFileLinkCtrl.callbackFunction();\r
-                        } else {\r
-                            var strFileName = e.target.value;\r
-                            try {\r
-                                var objFSO = new ActiveXObject("Scripting.FileSystemObject");\r
-                                b2bFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));\r
-                                b2bFileLinkCtrl.callbackFunction();\r
-                            } catch (e) {\r
-                                var errMsg = "There was an issue uploading " + strFileName + ". Please try again.";\r
-                                $log.error(errMsg);\r
-                                $rootScope.$broadcast('b2b-file-link-failure', errMsg);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-        }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:filters\r
- *\r
- * @description\r
- *  <file src="src/filters/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <div b2b-filters></div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-       <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/filters/docs/demo.html" />\r
-            <file src="src/filters/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- * \r
- */\r
-angular.module('b2b.att.filters', ['b2b.att.utilities', 'b2b.att.multipurposeExpander'])\r
-    .filter('filtersSelectedItemsFilter', [function () {\r
-        return function (listOfItemsArray) {\r
-\r
-            if (!listOfItemsArray) {\r
-                listOfItemsArray = [];\r
-            }\r
-\r
-            var returnArray = [];\r
-\r
-            for (var i = 0; i < listOfItemsArray.length; i++) {\r
-                for (var j = 0; j < listOfItemsArray[i].filterTypeItems.length; j++) {\r
-                    if (listOfItemsArray[i].filterTypeItems[j].selected && !listOfItemsArray[i].filterTypeItems[j].inProgress) {\r
-                        returnArray.push(listOfItemsArray[i].filterTypeItems[j]);\r
-                    }\r
-                }\r
-            }\r
-\r
-            return returnArray;\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:flyout\r
- *\r
- * @description\r
- *  <file src="src/flyout/docs/readme.md" />\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/flyout/docs/demo.html" />\r
-            <file src="src/flyout/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.flyout', ['b2b.att.utilities', 'b2b.att.position'])\r
-    .directive('b2bFlyout', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/flyout/flyout.html',\r
-            controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-                scope.flyoutOpened = false;\r
-                var contentScope = '';\r
-                var togglerScope = '';\r
-                this.registerContentScope = function (scp) {\r
-                    contentScope = scp;\r
-                };\r
-                this.registerTogglerScope = function (scp) {\r
-                    togglerScope = scp;\r
-                };\r
-\r
-                this.toggleFlyoutState = function () {\r
-                    if (contentScope) {\r
-                        contentScope.toggleFlyout();\r
-                    }\r
-                };\r
-                this.getTogglerDimensions = function () {\r
-                    return togglerScope.getTogglerDimensions();\r
-                }\r
-                this.setTogglerFocus = function () {\r
-                    return togglerScope.setTogglerFocus();\r
-                }\r
-\r
-                this.closeFlyout = function (e) {\r
-                    contentScope.closeFromChild(e);\r
-                };\r
-                this.gotFocus = function () {\r
-                    contentScope.gotFocus();\r
-                };\r
-\r
-                this.updateAriaModel = function (val) {\r
-                    scope.flyoutOpened = val;\r
-                };\r
-\r
-                var firstTabableElement = undefined,\r
-                    lastTabableElement = undefined;\r
-\r
-                var firstTabableElementKeyhandler = function (e) {\r
-                    if (!e.keyCode) {\r
-                        e.keyCode = e.which;\r
-                    }\r
-                    if (e.keyCode === keymap.KEY.TAB && e.shiftKey && scope.flyoutOpened) { \r
-                        contentScope.gotFocus();\r
-                        events.preventDefault(e);\r
-                        events.stopPropagation(e);\r
-                    }\r
-                };\r
-\r
-                var lastTabableElementKeyhandler = function (e) {\r
-                    if (!e.keyCode) {\r
-                        e.keyCode = e.which;\r
-                    }\r
-                    if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {\r
-                        contentScope.gotFocus();    \r
-                        events.preventDefault(e);\r
-                        events.stopPropagation(e);\r
-                    }\r
-                };\r
-                this.associateTabEvent = function(){\r
-                    $timeout(function () {\r
-                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];\r
-                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                        if(angular.isUndefined(firstTabableElement)){\r
-                            angular.element(element).css('display','block');\r
-                            firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                            lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                            angular.element(element).css('display','none');\r
-                        }\r
-                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                    });\r
-                }\r
-                this.updateTabbableElements = function(){\r
-                    $timeout(function () {\r
-                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];\r
-                        angular.element(element).css('display','block');\r
-                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                        angular.element(element).css('display','none');\r
-                    });\r
-                }\r
-                this.unbindTabbaleEvents = function(){\r
-                    if(angular.isDefined(firstTabableElement)){\r
-                        angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);\r
-                    }\r
-\r
-                    if(angular.isDefined(lastTabableElement)){\r
-                        angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);\r
-                    }\r
-                }\r
-            }],\r
-            link: function (scope, element, attrs, ctrl) {\r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutToggler', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            require: '^b2bFlyout',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                element.bind('click', function (e) {\r
-                    ctrl.toggleFlyoutState();\r
-                });\r
-\r
-                scope.getTogglerDimensions = function () {\r
-                    return element[0].getBoundingClientRect();\r
-                }\r
-\r
-                scope.setTogglerFocus = function () {\r
-                    element[0].focus();\r
-                }\r
-\r
-                ctrl.registerTogglerScope(scope);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutContent', ['$position', '$timeout', '$documentBind', '$isElement', '$document', function ($position, $timeout, $documentBind, $isElement, $document) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            require: '^b2bFlyout',\r
-            scope: {\r
-                horizontalPlacement: '@',\r
-                verticalPlacement: '@',\r
-                flyoutStyle: '@',\r
-                flyoutTitle: '@',\r
-                contentUpdated: "=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/flyout/flyoutContent.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var flyoutStyleArray, eachCssProperty, cssPropertyKey, cssPropertyVal, temp;\r
-                scope.openFlyout = false;\r
-                if (!scope.horizontalPlacement) {\r
-                    scope.horizontalPlacement = 'center';\r
-                }\r
-                if (!scope.verticalPlacement) {\r
-                    scope.verticalPlacement = 'below';\r
-                }\r
-\r
-                scope.toggleFlyout = function () {\r
-\r
-                    scope.openFlyout = !scope.openFlyout;\r
-\r
-                    if (scope.openFlyout) {\r
-\r
-                        if (angular.isDefined(scope.flyoutStyle) && scope.flyoutStyle != "") {\r
-                            flyoutStyleArray = scope.flyoutStyle.split(";");\r
-                            for (i = 0; i < flyoutStyleArray.length; i++) {\r
-                                eachCssProperty = flyoutStyleArray[i].split(":");\r
-                                if (eachCssProperty.length == 2) {\r
-                                    cssPropertyKey = eachCssProperty[0].trim();\r
-                                    cssPropertyVal = eachCssProperty[1].trim();\r
-                                    angular.element(element[0])[0].style[cssPropertyKey] = cssPropertyVal;\r
-                                }\r
-                            }\r
-                        }\r
-\r
-                        angular.element(element[0]).css({\r
-                            'opacity': 0,\r
-                            'display': 'block'\r
-                        });\r
-\r
-                        var flyoutIcons = angular.element(document.querySelectorAll(".b2b-flyout-icon"));\r
-                        angular.forEach(flyoutIcons, function (elm) {\r
-                            angular.element(elm)[0].blur();\r
-                        });\r
-\r
-                        $timeout(function () {\r
-                            ctrl.setTogglerFocus();\r
-\r
-                            var togglerDimensions = ctrl.getTogglerDimensions();\r
-                            var flyoutDimensions = element[0].getBoundingClientRect();\r
-\r
-                            switch (scope.horizontalPlacement) {\r
-                            case "left":\r
-                                angular.element(element[0]).css({\r
-                                    'left': ((togglerDimensions.width / 2) - 26) + 'px'\r
-                                });\r
-                                break;\r
-                            case "right":\r
-                                angular.element(element[0]).css({\r
-                                    'right': ((togglerDimensions.width / 2) - 23) + 'px'\r
-                                });\r
-                                break;  \r
-\r
-                            case "centerLeft":\r
-                                var marginLeft =  10-(flyoutDimensions.width)-20;\r
-                                angular.element(element[0]).css({\r
-                                    'margin-left': marginLeft + 'px'\r
-                                });\r
-                                break;\r
-                            case "centerRight":\r
-                                angular.element(element[0]).css({\r
-                                    'left': ((togglerDimensions.width + 9 )) + 'px'\r
-                                });\r
-                                break;    \r
-\r
-                            default:\r
-                                var marginLeft = (togglerDimensions.width / 2) - (flyoutDimensions.width / 2) - 8;\r
-                                angular.element(element[0]).css({\r
-                                    'margin-left': marginLeft + 'px'\r
-                                });\r
-                            }\r
-\r
-                            switch (scope.verticalPlacement) {\r
-                            case "above":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -(flyoutDimensions.height + 13) + 'px'\r
-                                });\r
-                                break;\r
-                            case "centerLeft":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -((togglerDimensions.height-13))+ 'px'\r
-                                });\r
-                                break;\r
-                            case "centerRight":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -(flyoutDimensions.height - 23)+ 'px'\r
-                                });\r
-                                break;                                    \r
-                            default:\r
-                                angular.element(element[0]).css({\r
-                                    'top': (togglerDimensions.height + 13) + 'px'\r
-                                });\r
-                            }\r
-\r
-                            angular.element(element[0]).css({\r
-                                'opacity': 1\r
-                            });\r
-                        }, 100);\r
-                    } else {\r
-                        scope.hideFlyout();\r
-                    }\r
-                };\r
-\r
-                scope.gotFocus = function () {\r
-                    scope.openFlyout = false;\r
-                    scope.hideFlyout();\r
-                    ctrl.setTogglerFocus();\r
-                    scope.$apply();\r
-                };\r
-\r
-                scope.closeFromChild = function (e) {\r
-                    scope.openFlyout = false;\r
-                    scope.hideFlyout();\r
-                    ctrl.setTogglerFocus();\r
-                    scope.$apply();\r
-                };\r
-\r
-                scope.hideFlyout = function () {\r
-                    angular.element(element[0]).css({\r
-                        'opacity': 0,\r
-                        'display': 'none'\r
-                    });\r
-                };\r
-\r
-                scope.closeFlyout = function (e) {\r
-                    var isElement = $isElement(angular.element(e.target), element, $document);\r
-                    if ((e.type === "keydown" && e.which === 27) || ((e.type === "click" || e.type==="touchend") && !isElement)) {\r
-                        scope.openFlyout = false;\r
-                        scope.hideFlyout();\r
-                        ctrl.setTogglerFocus();\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-\r
-                scope.$watch('openFlyout', function () {\r
-                    ctrl.updateAriaModel(scope.openFlyout);\r
-                });\r
-\r
-                $documentBind.click('openFlyout', scope.closeFlyout, scope);\r
-                $documentBind.event('keydown', 'openFlyout', scope.closeFlyout, scope);\r
-                $documentBind.event('touchend', 'openFlyout', scope.closeFlyout, scope);\r
-                ctrl.registerContentScope(scope);\r
-\r
-                if (angular.isDefined(scope.contentUpdated) && scope.contentUpdated !== null) {\r
-                    scope.$watch('contentUpdated', function (newVal, oldVal) {\r
-                        if(newVal){\r
-                            if (newVal !== oldVal) {\r
-                                ctrl.unbindTabbaleEvents();\r
-                                ctrl.associateTabEvent();\r
-                            }\r
-                            scope.contentUpdated = false;\r
-                        } \r
-                    });\r
-                }  \r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bCloseFlyout', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            require: '^b2bFlyout',\r
-            scope: {\r
-                closeFlyout: '&'\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                element.bind('click', function (e) {\r
-                    scope.closeFlyout(e);\r
-                    ctrl.closeFlyout(e);\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutTrapFocusInside', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            transclude: false,\r
-            require: '^b2bFlyout',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                /* Before opening modal, find the focused element */\r
-                ctrl.updateTabbableElements();\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:footer\r
- *\r
- * @description\r
- *  <file src="src/footer/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
- <footer class="b2b-footer-wrapper" role="contentinfo" aria-label="footer">\r
-        <div class="b2b-footer-container" b2b-column-switch-footer footer-link-items='footerItems'>\r
-            <hr>\r
-            <div class="divider-bottom-footer">\r
-                <div class="span2 dispalyInline">&nbsp;</div>\r
-                <div class="span6 dispalyInline">\r
-                    <ul class="footer-nav-content">\r
-                        <li><a href="Terms_of_use.html" title="Terms of use" id="foot0">Terms of use</a>|</li>\r
-                        <li><a href="Privacy_policy.html" title="Privacy policy" id="foot1" class="active">Privacy policy</a>|</li>\r
-                        <li><a href="Tollfree_directory_assistance.html" title="Tollfree directory assistance" id="foot2">Tollfree directory assistance</a>|</li>\r
-                        <li><a href="compliance.html" title="Accessibility" id="foot3">Accessibility</a></li>\r
-\r
-                    </ul>\r
-                    <p><a href="//www.att.com/gen/privacy-policy?pid=2587" target="_blank">© <span class="copyright">2016</span> AT&amp;T Intellectual Property</a>. All rights reserved. AT&amp;T,the AT&amp;T Globe logo and all other AT&amp;T marks contained herein are tardemarks of AT&amp;T intellectual property and/or AT&amp;T affiliated companines.\r
-\r
-                    </p>\r
-                </div>\r
-                <div class="span3 footerLogo dispalyInline">\r
-                    <a href="index.html" class="footer-logo">\r
-                        <i class="icon-primary-att-globe"><span class="hidden-spoken">A T &amp; T</span></i>\r
-                        <h2 class="logo-title">AT&amp;T</h2>\r
-                    </a>\r
-                </div>\r
-            </div>\r
-\r
-        </div>  \r
-    </footer>\r
-\r
- * @example\r
- *  <section id="code">   \r
- <example module="b2b.att">\r
- <file src="src/footer/docs/demo.html" />\r
- <file src="src/footer/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.footer', ['b2b.att.utilities']).\r
-        directive('b2bColumnSwitchFooter', [function() {\r
-                return {\r
-                    restrict: 'A',\r
-                    transclude: true,\r
-                    scope: {\r
-                        footerLinkItems: "="\r
-                    },\r
-                    templateUrl: 'b2bTemplate/footer/footer_column_switch_tpl.html',\r
-                    link: function(scope) {\r
-                        var tempFooterColumns = scope.footerLinkItems.length;\r
-                        scope.footerColumns = 3;\r
-                        if ( (tempFooterColumns === 5) || (tempFooterColumns === 4) ) {\r
-                            scope.footerColumns = tempFooterColumns;\r
-                        }\r
-                    }\r
-\r
-                };\r
-\r
-            }]);\r
-     \r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:header\r
- *\r
- * @description\r
- *  <file src="src/header/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <li b2b-header-menu class="header__item b2b-headermenu" ng-repeat="item in tabItems" role="presentation">\r
-        <a href="#" class="menu__item" role="menuitem">{{item.title}}</a>\r
-        <div class="header-secondary-wrapper">\r
-            <ul class="header-secondary" role="menu">\r
-                <li class="header-subitem" b2b-header-submenu ng-repeat="i in item.subitems" role="presentation">\r
-                    <a href="#" class="menu__item" aria-haspopup="true" role="menuitem">{{i.value}}</a>\r
-                    <div class="header-tertiary-wrapper" ng-if="i.links">\r
-                        <ul class="header-tertiary" role="menu">\r
-                            <li b2b-header-tertiarymenu ng-repeat="link in i.links" role="presentation">\r
-                                <label>{{link.title}}</label>\r
-                                <div b2b-tertiary-link ng-repeat="title in link.value">\r
-                                    <a href="{{link.href}}" class="header-tertiaryitem" ng-if="!title.subitems" aria-haspopup="false" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>\r
-                                    <a href="{{link.href}}" class="header-tertiaryitem" b2b-header-togglemenu ng-if="title.subitems" aria-haspopup="true" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>\r
-                                    <ul class="header-quarternary" role="menu"  ng-if="title.subitems">\r
-                                        <li b2b-header-quarternarymenu role="presentation">\r
-                                            <a href="{{nav.href}}" ng-repeat="nav in title.subitems" role="menuitem" aria-haspopup="true">{{nav.title}}</a>\r
-                                        </li>\r
-                                    </ul>\r
-                                </div>\r
-                            </li>\r
-                        </ul>\r
-                    </div>\r
-                </li>\r
-            </ul>\r
-        </div>\r
-    </li> \r
- *\r
- * @example\r
- *  <section id="code">\r
- <example module="b2b.att.header">\r
- <file src="src/header/docs/demo.html" />\r
- <file src="src/header/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.header', ['b2b.att.dropdowns','b2b.att.utilities'])\r
-    .directive('b2bHeaderMenu', ['keymap', '$documentBind', '$timeout', '$isElement', '$document', function (keymap, $documentBind, $timeout, $isElement, $document) {\r
-        return {\r
-            restrict: 'A',\r
-            controller:['$scope',function($scope){\r
-                this.nextSiblingFocus = function (elObj,flag) {\r
-                        if (elObj.nextElementSibling) {\r
-                            if(flag){\r
-                                var nextmenuItem = this.getFirstElement(elObj.nextElementSibling,'a');\r
-                                nextmenuItem.focus();\r
-                            }else{\r
-                                elObj.nextElementSibling.focus();\r
-                            }\r
-                        }\r
-                };\r
-                \r
-                this.previousSiblingFocus = function (elObj,flag) {\r
-                        if (elObj.previousElementSibling) {\r
-                            if(flag){\r
-                                var prevmenuItem = this.getFirstElement(elObj.previousElementSibling,'a');\r
-                                prevmenuItem.focus();\r
-                            }else{\r
-                                elObj.previousElementSibling.focus();\r
-                            }\r
-                        }\r
-                };\r
-                    \r
-                this.getFirstElement = function(elmObj,selector){\r
-                        return elmObj.querySelector(selector);                        \r
-                    };\r
-            }],\r
-            link: function (scope, elem,attr,ctrl) {\r
-                scope.showMenu = false;\r
-                var activeElm, subMenu, tertiaryMenu, el= angular.element(elem)[0], \r
-                        menuItem = angular.element(elem[0].children[0]);\r
-                menuItem.bind('click', function () {\r
-                    elem.parent().children().removeClass('active');\r
-                    elem.addClass('active');\r
-                    var elems= this.parentElement.parentElement.querySelectorAll('li[b2b-header-menu]>a');\r
-                    for (var i=0; i<elems.length; i++) {\r
-                        elems[i].setAttribute("aria-expanded",false);\r
-                    }\r
-                    scope.showMenu = true;\r
-                    var elmTofocus = ctrl.getFirstElement(this.parentElement,'li[b2b-header-submenu]');\r
-                    elmTofocus.firstElementChild.focus();\r
-                    this.setAttribute('aria-expanded',true);\r
-                    scope.$apply();\r
-                });\r
-               \r
-                elem.bind('keydown', function (evt) {\r
-                    activeElm = document.activeElement;\r
-                    subMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-submenu]');\r
-                    tertiaryMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-tertiarymenu]');\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.ENTER:\r
-                        case keymap.KEY.SPACE:\r
-                            elem[0].click();\r
-                            break;\r
-                        case keymap.KEY.UP:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                menuItem[0].focus();\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.DOWN:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (subMenu) {\r
-                                subMenu.firstElementChild.focus();\r
-                            } else if (tertiaryMenu) {\r
-                                var firstSubitem = ctrl.getFirstElement(tertiaryMenu,'a.header-tertiaryitem');\r
-                                firstSubitem.focus();\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.RIGHT:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                var elm = angular.element(activeElm.parentElement)[0];\r
-                                ctrl.nextSiblingFocus(elm,true);\r
-                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {\r
-                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];\r
-                                if (tertiaryLI.nextElementSibling) {\r
-                                    var nextElm = ctrl.getFirstElement(tertiaryLI.nextElementSibling,"a.header-tertiaryitem");\r
-                                    nextElm.focus();\r
-                                }\r
-                            }\r
-                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')){\r
-                                ctrl.nextSiblingFocus(el,true);\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.LEFT:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                var previousElm = angular.element(activeElm.parentElement)[0];\r
-                                ctrl.previousSiblingFocus(previousElm,true);\r
-                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {\r
-                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];\r
-                                if (tertiaryLI.previousElementSibling) {\r
-                                    var prevElm = ctrl.getFirstElement(tertiaryLI.previousElementSibling,"a.header-tertiaryitem");\r
-                                    prevElm.focus();\r
-                                }\r
-                            }\r
-                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')) {\r
-                                ctrl.previousSiblingFocus(el,true);\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.ESC:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            scope.showMenu = false;\r
-                            elem.removeClass('active');\r
-                            menuItem.attr('aria-expanded',false);\r
-                            $timeout(function(){\r
-                                menuItem[0].focus();\r
-                            },100);\r
-                            scope.$apply();\r
-                            break;\r
-                        default:\r
-                            break;\r
-                    }\r
-                });\r
-                var outsideClick = function (e) {\r
-                    var isElement = $isElement(angular.element(e.target), elem, $document);\r
-                    if (!isElement) {\r
-                        scope.showMenu = false;\r
-                        elem.removeClass('active');\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-                $documentBind.click('showMenu', outsideClick, scope);\r
-                /*Change for ECOMP - hide header menu when click on iframe in a new tab*/\r
-                $(window).blur(function() {\r
-                       if(scope.showMenu){\r
-                                scope.showMenu = false;\r
-                     elem.removeClass('active');\r
-                     scope.$apply();\r
-                               }\r
-                });\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderSubmenu', ['$timeout',function ($timeout) {\r
-        return{\r
-            restrict: 'A',\r
-            link: function (scope, elem) {\r
-                var caretSign = angular.element("<i class='menuCaret'></i>");\r
-                $timeout(function(){\r
-                    var menuItem = angular.element(elem[0].children[0]);\r
-                    menuItem.bind('focus mouseenter', function () {\r
-                        elem.parent().children().removeClass('active');\r
-                        elem.addClass('active');\r
-                        if(elem[0].childElementCount > 1){ // > 1 has third level menu\r
-                            menuItem.attr('aria-expanded',true);\r
-                            menuItem.attr('aria-haspopup',true);\r
-                        }\r
-                        var caretLeft = (elem[0].offsetLeft +  elem[0].offsetWidth/2) - 10;\r
-                        caretSign.css({left: caretLeft + 'px'});\r
-                        angular.element(caretSign);\r
-                        var tertiaryItems = elem[0].querySelectorAll('[b2b-header-tertiarymenu]');\r
-                        if(tertiaryItems.length >=1){\r
-                            elem.append(caretSign);\r
-                        }\r
-                    });\r
-                    menuItem.bind('blur', function () {\r
-                        $timeout(function () {\r
-                            var parentElm = document.activeElement.parentElement.parentElement;\r
-                            if(parentElm){\r
-                                if (!(parentElm.hasAttribute('b2b-header-tertiarymenu'))) {\r
-                                    elem.removeClass('active');\r
-                                    if(elem[0].childElementCount > 1){ // > 1 has third level menu\r
-                                        menuItem.attr('aria-expanded',false);\r
-                                    }\r
-                                    var caret = elem[0].querySelector('.menuCaret');\r
-                                    if(caret){\r
-                                        caret.remove();\r
-                                    }   \r
-                                }\r
-                            }\r
-                        });\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderTertiarymenu', ['$timeout','keymap', function ($timeout,keymap){\r
-        return{\r
-            restrict: 'A',\r
-            require:'^b2bHeaderMenu',\r
-            link: function (scope, elem,attr,ctrl) {\r
-                \r
-                elem.bind('keydown', function (evt) {\r
-                    var activeElm = document.activeElement;\r
-                    var activeParentElm = activeElm.parentElement;\r
-                    var activeParentObj  = angular.element(activeParentElm)[0];\r
-                    \r
-                    if(activeParentElm.hasAttribute('b2b-tertiary-link')){\r
-                        var quarterNav = angular.element(activeParentElm)[0].querySelector('li[b2b-header-quarternarymenu]');\r
-                        if(quarterNav){\r
-                            var links = ctrl.getFirstElement(angular.element(quarterNav)[0],'a');\r
-                        }\r
-                    }\r
-                    var tertiaryMenu = activeElm.parentElement.parentElement.parentElement;\r
-                    var tertiaryMenuFlag = tertiaryMenu.hasAttribute('b2b-tertiary-link');\r
-                    \r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeParentElm.hasAttribute('b2b-tertiary-link')) {\r
-                                if(angular.element(quarterNav).hasClass('active')){\r
-                                    links.focus();\r
-                                }else if(activeParentObj.nextElementSibling){\r
-                                    ctrl.nextSiblingFocus(activeParentObj,true);\r
-                                }\r
-                            }\r
-                            else if(angular.element(activeParentElm).hasClass('active')){\r
-                                ctrl.nextSiblingFocus(activeElm);\r
-                            }\r
-                            break;                        \r
-                        case keymap.KEY.UP:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if(activeParentElm.hasAttribute('b2b-tertiary-link')){\r
-                                if(activeParentObj.previousElementSibling.hasAttribute('b2b-tertiary-link')){\r
-                                    ctrl.previousSiblingFocus(activeParentObj,true);\r
-                                }else{\r
-                                    var elm = angular.element(activeElm.parentElement.parentElement.parentElement.parentElement.parentElement)[0];\r
-                                    ctrl.getFirstElement(elm,"a").focus();\r
-                                }\r
-                            }else if(angular.element(activeParentElm).hasClass('active')){\r
-                                    if (activeElm.previousElementSibling) {\r
-                                        ctrl.previousSiblingFocus(activeElm);\r
-                                    }else if (tertiaryMenuFlag) {\r
-                                        var elm = angular.element(tertiaryMenu)[0];\r
-                                        ctrl.getFirstElement(elm,"a.header-tertiaryitem").focus();\r
-                                    }\r
-                                }\r
-                            break;\r
-                        default:\r
-                            break;\r
-                    }\r
-                });\r
-            }            \r
-        };          \r
-    }]).directive('b2bHeaderTogglemenu', ['$timeout', 'keymap', function ($timeout, keymap) {\r
-        return{\r
-            restrict: 'A',\r
-            require: '^b2bHeaderMenu',\r
-            link: function (scope, elem, attrs, ctrl) {\r
-                var quarterNav;\r
-                $timeout(function () {\r
-                    quarterNav = angular.element(elem.parent())[0].querySelector('li[b2b-header-quarternarymenu]');\r
-                    elem.bind('click', function () {\r
-                        angular.element(quarterNav).toggleClass('active');\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderResponsive', ['$timeout',function ($timeout) {\r
-        return{\r
-            restrict: 'A',\r
-            controller: function($scope){\r
-                this.applyMediaQueries = function(value){\r
-                    document.querySelector('style').textContent += \r
-                        "@media screen and (max-width:950px) { \\r
-                            .header__item.profile { right: " + value + "px; } \\r
-                        }";\r
-                };\r
-                this.arrangeResponsiveHeader = function(children){\r
-                    /* \r
-                     * clientWidth of 1090 === max-width of 1100px\r
-                     * clientWidth of 920 === max-width of 950px\r
-                     * see b2b-angular.css for rest of responsive header CSS\r
-                     */\r
-                  if (document.documentElement.clientWidth <= 920) { \r
-                        switch(children){\r
-                            case 1:\r
-                                this.applyMediaQueries(200);                    \r
-                                break;\r
-                            case 2:\r
-                                this.applyMediaQueries(200);                            \r
-                                break;\r
-                            default: // anthing above 3, however, should not have more than 3 to date\r
-                                this.applyMediaQueries(200);                                                                            \r
-                        }\r
-                    }\r
-                }\r
-            },\r
-            link: function (scope, elem, attrs, ctrl) {\r
-                var children;\r
-                var profile;\r
-                \r
-                // onload of page\r
-                $timeout(function(){ \r
-                    profile = document.querySelector('li.header__item.profile');\r
-                    children = angular.element(profile).children().length;\r
-                    \r
-                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers\r
-                });\r
-\r
-                // on screen resize\r
-                window.addEventListener('resize', function(event){ // caret adjustmet\r
-                    var activeSubmenu = elem[0].querySelector('[b2b-header-menu] [b2b-header-submenu].active');\r
-                    var activeSubmenuEl = angular.element(activeSubmenu);\r
-                    if(activeSubmenu){\r
-                        var caretSign = activeSubmenu.querySelector('i.menuCaret');\r
-                        if(caretSign){\r
-                            var caretSignEl = angular.element(caretSign);\r
-                            var caretLeft = (activeSubmenu.offsetLeft +  activeSubmenu.offsetWidth/2) - 10;\r
-                            caretSignEl.css({left: caretLeft + 'px'});\r
-                        }\r
-                    }\r
-\r
-                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:headings\r
- *\r
- * @description\r
- *  <file src="src/headings/docs/readme.md" />\r
- *\r
- * @usage\r
-    <h1 class="heading-page">38px page heading</h1>\r
-    <h2 class="heading-major-section">30px major section heading</h2>\r
-    <h3 class="heading-sub-section">24px sub-section heading</h3>\r
-    <h2 class="heading-medium">20px medium heading</h2>\r
-    <h2 class="heading-medium-emphasis">20px medium emphasis heading</h2>\r
-    <h3 class="heading-small">18px small heading</h3>\r
-    <h3 class="heading-small-emphasis">18px small emphasis heading</h3>\r
-    <h3 class="heading-micro">13px micro heading</h3>\r
-\r
-    <h2 class="heading-group">Lead</h2>\r
-    <h1 class="heading-page">This is 38px heading</h1>\r
-    <h2 class="lead">This is lead text...The next big thing since the last big thing we announced.</h2>\r
-    <h2 class="heading-group">Eyebrow</h2>\r
-    <h3 class="eyebrow">EYEBROW TEXT</h3>\r
-    <h2 class="heading-major-section">This is a 30px heading</h2>\r
-    <h3 class="eyebrow">EYEBROW TEXT</h3>\r
-    <h3 class="heading-sub-section">24px sub-section heading</h3>\r
-    <h2 class="heading-group">Subheading</h2>\r
-    <h2 class="heading-major-section">This is a 30px heading</h2>\r
-    <h3 class="subheading">A subheading here to support what was said above</h3>\r
- * @example\r
- <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-    <file src="src/headings/docs/demo.html" />\r
-</example>\r
-</section>\r
- */\r
-\r
-var b2bLegalCopy = angular.module('b2b.att.headings', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:horizontalTable\r
- *\r
- * @description\r
- *  <file src="src/horizontalTable/docs/readme.md" />\r
- *\r
- * @usage\r
- * @param {int} sticky - Number of sticky columns to have. Maximum of 3.\r
- * @param {boolean} refresh - A boolean that when set to true will force a re-render of table. Only use when using 'bulk mode'\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/horizontalTable/docs/demo.html" />\r
-            <file src="src/horizontalTable/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.horizontalTable', [])\r
-    .constant('b2bHorizontalTableConfig', {\r
-        'maxStickyColumns': 3\r
-    })\r
-    .directive('b2bHorizontalTable', ['$timeout', 'b2bHorizontalTableConfig', 'b2bDOMHelper', function ($timeout, b2bHorizontalTableConfig, b2bDOMHelper) {\r
-        return {\r
-            restrict: 'EA',\r
-            scope: true,\r
-            transclude: true,\r
-            scope: {\r
-                numOfStickyCols: '=?sticky',\r
-                refresh: '=?'\r
-\r
-            },\r
-            templateUrl: 'b2bTemplate/horizontalTable/horizontalTable.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.numOfStickyCols = scope.numOfStickyCols || 1;\r
-                scope.viewportIndex = scope.numOfStickyCols;\r
-\r
-                // JM520E: This is a temporary hack until I solve the ngRepeat issue\r
-                function hack() {\r
-                    if (element.find('th').length < scope.numOfStickyCols) {\r
-                        // DOM ngRepeat is not ready, let's check back in 10 ms\r
-                        console.info('THs are not ready, trying again in 10ms');\r
-                        $timeout(hack, 10, false);\r
-                    } else {\r
-                        init();\r
-                    }\r
-                }\r
-                hack();\r
-\r
-                if (attrs.refresh !== undefined && attrs.refresh !== '') {\r
-                    scope.$watch('refresh', function(oldVal, newVal) {\r
-                        if (scope.refresh) {\r
-                            // From testing it takes about 30 ms before ngRepeat executes, so let's set initial timeout\r
-                            // NOTE: May need to expose timeout to developers. Application is known to have digest cycle of 3-5k watches.\r
-                            $timeout(init, 100, false);\r
-                            scope.refresh = false;\r
-                        }\r
-                    });\r
-                }\r
-\r
-                var tableElement = element.find('table');\r
-                var thElements = element.find('th');\r
-                var innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));\r
-                var outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));\r
-\r
-                var tableColumns = [];\r
-                var tableRows = element.find('tr');\r
-\r
-                var maxWidth = 0,\r
-                    maxHeight = 0;\r
-                var totalWidth = element.children()[0].offsetWidth;\r
-                var lastVisibleColumn = 0;\r
-                var collectiveColumnWidth = [];\r
-                var collectiveRowHeight = [];\r
-                var columnSets = [];\r
-                var setIndex = 0; \r
-                var stickyPixels = 0;\r
-\r
-                var displayNoneCSS = {'display': 'none'};\r
-                var displayBlockCSS = {'display': 'table-cell'};\r
-\r
-                function calculateVisibleColumns(startingPoint) {\r
-                    var usedWidth = 0, \r
-                        visibleColumns = startingPoint || scope.numOfStickyCols;\r
-\r
-                    while(usedWidth < stickyPixels && visibleColumns < collectiveColumnWidth.length) {\r
-                        if (usedWidth+collectiveColumnWidth[visibleColumns] > stickyPixels) {\r
-                            if (startingPoint === visibleColumns) {\r
-                                return visibleColumns; // The next cell is too large to fit, it should be only thing to fit\r
-                            }\r
-                            visibleColumns--;\r
-                            return visibleColumns;\r
-                        }\r
-                        usedWidth += collectiveColumnWidth[visibleColumns];\r
-                        visibleColumns++;\r
-                    }\r
-\r
-                    if (usedWidth > stickyPixels) {\r
-                        return --visibleColumns;\r
-                    }\r
-                    return visibleColumns;\r
-                }\r
-\r
-                function updateCellDisplay(set) {\r
-                    for (var i = scope.numOfStickyCols; i < tableColumns.length; i++) {\r
-                        angular.element(tableColumns[i]).css(displayNoneCSS);\r
-                    }\r
-\r
-                    for (var i = set[0]; i <= set[1]; i++) {\r
-                        angular.element(tableColumns[i]).css(displayBlockCSS);\r
-                    }\r
-                }\r
-\r
-                function forceDigest() {\r
-                    if (!scope.$$phase) {\r
-                        scope.$digest();\r
-                    }\r
-                }\r
-\r
-                function findMax(arr, prop) {\r
-                    var max = 0;\r
-                    var localVal = 0;\r
-                    var prevDisplay;\r
-                    var item;\r
-                    for (var i = 0; i < arr.length; i++) {\r
-                        item = arr[i];\r
-                        prevDisplay = angular.element(item).css('display');\r
-                        if (scope.$$phase) {\r
-                            scope.$digest();\r
-                        }\r
-                        if (prop === 'width') {\r
-                            localVal = Math.ceil(parseInt(window.getComputedStyle(item).width.split('px')[0], 10)) + 30; // 30 px is padding\r
-                        } else if (prop === 'offsetWidth') {\r
-                            localVal = item.offsetWidth;\r
-                        } else if (prop === 'height') {\r
-                            localVal = item.offsetHeight;\r
-                        }\r
-\r
-                        if (localVal >= max) {\r
-                            max = localVal;\r
-                        }\r
-                    }\r
-                    \r
-                    return max;\r
-                }\r
-\r
-                function init() {\r
-                    // Reset this from a previous execution\r
-                    tableColumns = [];\r
-                    collectiveColumnWidth = [];\r
-                    collectiveRowHeight = [];\r
-                    maxWidth = 0;\r
-                    maxHeight = 0;\r
-                    lastVisibleColumn = 0;\r
-                    columnSets = [];\r
-                    setIndex = 0; \r
-                    visibleColumns = [];\r
-                    stickyPixels = 0;\r
-\r
-                    tableElement = element.find('table');\r
-                    thElements = element.find('th');\r
-                    innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));\r
-                    outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));\r
-                    totalWidth = element.children()[0].offsetWidth;\r
-\r
-\r
-                    tableRows = element.find('tr');\r
-                    totalWidth = element.children()[0].offsetWidth;\r
-\r
-                    scope.disableLeft = true;\r
-                    scope.disableRight = false;\r
-\r
-                    if (scope.numOfStickyCols > b2bHorizontalTableConfig.maxStickyColumns) {\r
-                        throw new Error("Table can only support 3 sticky columns.");\r
-                    }                  \r
-\r
-                    angular.forEach(tableRows, function(row, rowIndex) {\r
-                        collectiveRowHeight.push(findMax(row.children, 'height'));\r
-                        for(var j = 0; j < row.children.length; j++) {\r
-                            if (tableColumns[j] === undefined) {\r
-                                tableColumns[j] = [];\r
-                            }\r
-                            tableColumns[j].push(row.children[j]);\r
-                        }\r
-                    });\r
-\r
-                    // We need to reset all the displayNones from previous runs, if applicable\r
-                    if (attrs.refresh !== undefined && attrs.refresh !== '')  {\r
-                        for (var i = scope.numOfStickyCols+1; i < tableColumns.length; i++) {\r
-                            angular.element(tableColumns[i]).css(displayBlockCSS);\r
-                        }\r
-                    }\r
-\r
-                    for (var i = 0; i < tableColumns.length; i++) {\r
-                        collectiveColumnWidth.push(findMax(tableColumns[i], 'width')); //offsetWidth doesn't take into account custom css inside\r
-                    }\r
-                    for(var i = 0; i < scope.numOfStickyCols; i++) {\r
-                        maxWidth += collectiveColumnWidth[i];\r
-                    }\r
-      \r
-                    stickyPixels = totalWidth-maxWidth;\r
-\r
-\r
-                    // At this point, for each tr, I need to set the properties (height) and each numOfStickyCols children\r
-                    // should be set with sticky properties (margin-left and width)\r
-                    var width = maxWidth;\r
-                    for(var i = 0; i < scope.numOfStickyCols; i++) {\r
-                        for (var j = 0; j < tableRows.length; j++) {\r
-                            trObject = angular.element(tableRows[j].children[i]);\r
-                            \r
-                            angular.element(trObject).css({\r
-                                'margin-left': -(width + 2) + 'px', \r
-                                'width': (collectiveColumnWidth[i] + 3) + 'px', // instead of taking the max width, grab max width for that column\r
-                                'height': collectiveRowHeight[j] + 'px',\r
-                                'position': 'absolute',\r
-                                'background-color': 'lightgrey'\r
-                            });\r
-                        }\r
-                        \r
-\r
-                        width -= collectiveColumnWidth[i];\r
-                    }\r
-\r
-                    innerContainer.css({\r
-                        'padding-left': (maxWidth + 2) + 'px'\r
-                    });\r
-\r
-\r
-                    // Let's precompute all the (set) combinations beforehand\r
-                    columnSets = []; \r
-                    for (var i = scope.numOfStickyCols; i < tableColumns.length;) {\r
-                        visibleColumns = calculateVisibleColumns(i);\r
-                        columnSets.push([i, visibleColumns]);\r
-                        i = visibleColumns + 1;\r
-                    }\r
-                    \r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-\r
-                    scope.numOfCols = tableColumns.length;\r
-\r
-                    console.log('Bulk Mode is ' + (attrs.bulkMode ? 'enabled': 'disabled'));\r
-                    console.log('tableColumns', tableColumns);\r
-                    console.log('collectiveColumnWidth: ', collectiveColumnWidth);\r
-                    console.log('maxWidth: ', maxWidth);\r
-                }\r
-\r
-                function checkScrollArrows() {\r
-                    scope.disableLeft = (setIndex === 0);\r
-                    scope.disableRight = !(setIndex < columnSets.length-1);\r
-                }\r
-\r
-\r
-                scope.moveViewportLeft = function () {\r
-                    setIndex--;\r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-\r
-                    if (scope.disableLeft) {\r
-                        element.find('span')[0].focus();\r
-                    }\r
-                };\r
-                \r
-                scope.moveViewportRight = function () {\r
-                    setIndex++;\r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-                    \r
-                    if (scope.disableRight) {\r
-                        element.find('span')[0].focus();\r
-                    }\r
-                };\r
-\r
-                scope.getColumnSet = function () {\r
-                    return columnSets[setIndex];\r
-                };\r
-\r
-                innerContainer.bind('scroll', function () {\r
-                    $timeout(function () {\r
-                        checkScrollArrows();\r
-                    }, 1);\r
-                });\r
-\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:hourPicker\r
- *\r
- * @description\r
- *  <file src="src/hourPicker/docs/readme.md" />\r
- *\r
- * @usage\r
- * <div b2b-hourpicker ng-model="hourpickerValue.value"></div>\r
-    \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/hourPicker/docs/demo.html" />\r
-            <file src="src/hourPicker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.hourPicker', ['b2b.att.utilities'])\r
-\r
-.constant('b2bHourpickerConfig', {\r
-    dayOptions: [{\r
-        title: 'sunday',\r
-        caption: 'Sun',\r
-        label: 'S',\r
-        disabled: false\r
-    }, {\r
-        title: 'monday',\r
-        caption: 'Mon',\r
-        label: 'M',\r
-        disabled: false\r
-    }, {\r
-        title: 'tuesday',\r
-        caption: 'Tues',\r
-        label: 'T',\r
-        disabled: false\r
-    }, {\r
-        title: 'wednesday',\r
-        caption: 'Wed',\r
-        label: 'W',\r
-        disabled: false\r
-    }, {\r
-        title: 'thursday',\r
-        caption: 'Thu',\r
-        label: 'T',\r
-        disabled: false\r
-    }, {\r
-        title: 'friday',\r
-        caption: 'Fri',\r
-        label: 'F',\r
-        disabled: false\r
-    }, {\r
-        title: 'saturday',\r
-        caption: 'Sat',\r
-        label: 'S',\r
-        disabled: false\r
-    }],\r
-    startTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],\r
-    startTimeDefaultOptionIndex: -1,\r
-    startTimeDefaultMeridiem: "am",\r
-    endTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],\r
-    endTimeDefaultOptionIndex: -1,\r
-    endTimeDefaultMeridiem: "pm",\r
-    sameDayOption: true\r
-})\r
-\r
-.factory('b2bNormalizeHourpickerValues', [function () {\r
-    var _normalize = function (hourpickerValues) {\r
-        if (angular.isDefined(hourpickerValues) && hourpickerValues != null) {\r
-            var finalHourpickerValues = [];\r
-            var hourpickerValue = {};\r
-            var days = {};\r
-            for (var i = 0; i < hourpickerValues.length; i++) {\r
-                days = hourpickerValues[i].days ? hourpickerValues[i].days : {};\r
-                hourpickerValue.startTime = hourpickerValues[i].startTime ? hourpickerValues[i].startTime : '';\r
-                hourpickerValue.startMeridiem = hourpickerValues[i].startMeridiem ? hourpickerValues[i].startMeridiem : '';\r
-                hourpickerValue.endTime = hourpickerValues[i].endTime ? hourpickerValues[i].endTime : '';\r
-                hourpickerValue.endMeridiem = hourpickerValues[i].endMeridiem ? hourpickerValues[i].endMeridiem : '';\r
-                hourpickerValue.days = [];\r
-\r
-                var retrieveDaysText = function (daysDetails) {\r
-                    var daysTexts = [];\r
-                    var first = -1;\r
-                    var last = -1;\r
-                    var index = -1;\r
-                    for (var i in days) {\r
-                        if (days[i].value) {\r
-                            daysTexts.push(i);\r
-                        }\r
-                    }\r
-\r
-                    first = daysTexts[0];\r
-                    last = daysTexts[0];\r
-                    index = 0;\r
-                    hourpickerValue.days[index] = days[first].caption;\r
-                    if (daysTexts.length > 1) {\r
-                        for (var i = 1; i < daysTexts.length; i++) {\r
-                            if (daysTexts[i] - last === 1) {\r
-                                last = daysTexts[i];\r
-                                hourpickerValue.days[index] = days[first].caption + ' - ' + days[last].caption;\r
-                            } else {\r
-                                index++;\r
-                                first = last = daysTexts[i];\r
-                                hourpickerValue.days[index] = days[first].caption;\r
-                            }\r
-                        }\r
-                    }\r
-                };\r
-                retrieveDaysText();\r
-\r
-                finalHourpickerValues.push(angular.copy(hourpickerValue));\r
-            }\r
-\r
-            return angular.copy(finalHourpickerValues);\r
-        }\r
-    };\r
-\r
-    return {\r
-        normalize: _normalize\r
-    };\r
-}])\r
-\r
-.directive('b2bHourpicker', ['b2bHourpickerConfig', 'b2bNormalizeHourpickerValues', function (b2bHourpickerConfig, b2bNormalizeHourpickerValues) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        scope: true,\r
-        require: 'ngModel',\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpicker.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.hourpicker = {};\r
-            scope.hourpicker.dayOptions = attr.dayOptions ? scope.$parent.$eval(attr.dayOptions) : b2bHourpickerConfig.dayOptions;\r
-            scope.hourpicker.startTimeOptions = attr.startTimeOptions ? scope.$parent.$eval(attr.startTimeOptions) : b2bHourpickerConfig.startTimeOptions;\r
-            scope.hourpicker.endTimeOptions = attr.endTimeOptions ? scope.$parent.$eval(attr.endTimeOptions) : b2bHourpickerConfig.endTimeOptions;\r
-            scope.hourpicker.startTimeDefaultOptionIndex = attr.startTimeDefaultOptionIndex ? scope.$parent.$eval(attr.startTimeDefaultOptionIndex) : b2bHourpickerConfig.startTimeDefaultOptionIndex;\r
-            scope.hourpicker.endTimeDefaultOptionIndex = attr.endTimeDefaultOptionIndex ? scope.$parent.$eval(attr.endTimeDefaultOptionIndex) : b2bHourpickerConfig.endTimeDefaultOptionIndex;\r
-            scope.hourpicker.startTimeDefaultMeridiem = attr.startTimeDefaultMeridiem ? scope.$parent.$eval(attr.startTimeDefaultMeridiem) : b2bHourpickerConfig.startTimeDefaultMeridiem;\r
-            scope.hourpicker.endTimeDefaultMeridiem = attr.endTimeDefaultMeridiem ? scope.$parent.$eval(attr.endTimeDefaultMeridiem) : b2bHourpickerConfig.endTimeDefaultMeridiem;\r
-            scope.hourpicker.sameDayOption = attr.sameDayOption ? scope.$parent.$eval(attr.sameDayOption) : b2bHourpickerConfig.sameDayOption;\r
-            scope.hourpicker.editMode = -1;\r
-\r
-            scope.hourpickerValues = [];\r
-            scope.finalHourpickerValues = [];\r
-            scope.addHourpickerValue = function (hourpickerPanelValue) {\r
-                if (hourpickerPanelValue) {\r
-                    if (scope.hourpicker.editMode > -1) {\r
-                        scope.hourpickerValues[scope.hourpicker.editMode] = hourpickerPanelValue;\r
-                        scope.hourpicker.editMode = -1;\r
-                    } else {\r
-                        scope.hourpickerValues.push(hourpickerPanelValue);\r
-                    }\r
-                }\r
-                scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));\r
-                ctrl.$setViewValue(angular.copy(scope.hourpickerValues));\r
-            };\r
-            ctrl.$render = function () {\r
-                if (angular.isDefined(ctrl.$modelValue)) {\r
-                    scope.hourpickerValues = angular.copy(ctrl.$modelValue);\r
-                    scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));\r
-                }\r
-            };\r
-            scope.editHourpickerValue = function (index) {\r
-                scope.hourpickerPanelValue = angular.copy(scope.hourpickerValues[index]);\r
-                scope.hourpicker.editMode = index;\r
-            };\r
-            scope.deleteHourpickerValue = function (index) {\r
-                scope.hourpickerValues.splice(index, 1);\r
-                scope.resetHourpickerPanelValue();\r
-                scope.addHourpickerValue();\r
-            };\r
-\r
-            scope.setValidity = function (errorType, errorValue) {\r
-                ctrl.$setValidity(errorType, errorValue);\r
-            }\r
-        }\r
-    }\r
-}])\r
-\r
-.directive('b2bHourpickerPanel', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerPanel.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var hourpickerPanelValueTemplate = {\r
-                days: {},\r
-                startTime: '',\r
-                startMeridiem: 'am',\r
-                endTime: '',\r
-                endMeridiem: 'pm'\r
-            };\r
-            for (var i = 0; i < scope.hourpicker.dayOptions.length; i++) {\r
-                hourpickerPanelValueTemplate.days[i] = {\r
-                    value: false,\r
-                    title: scope.hourpicker.dayOptions[i].title,\r
-                    caption: scope.hourpicker.dayOptions[i].caption\r
-                };\r
-            }\r
-            scope.hourpickerPanelValue = {};\r
-            scope.disableAddBtn = true;\r
-\r
-            scope.$watch('hourpickerPanelValue.days', function(){\r
-                for(var i in scope.hourpickerPanelValue.days)\r
-                {\r
-                    if(scope.hourpickerPanelValue.days[i].value)\r
-                    {\r
-                        scope.disableAddBtn = false;\r
-                        break;\r
-                    }\r
-                    scope.disableAddBtn = true;\r
-                }\r
-            }, true);\r
-\r
-            scope.resetHourpickerPanelValue = function () {\r
-                scope.hourpickerPanelValue = angular.copy(hourpickerPanelValueTemplate);\r
-                if (scope.hourpicker.startTimeDefaultOptionIndex > -1) {\r
-                    scope.hourpickerPanelValue.startTime = scope.hourpicker.startTimeOptions[scope.hourpicker.startTimeDefaultOptionIndex];\r
-                }\r
-                if (scope.hourpicker.endTimeDefaultOptionIndex > -1) {\r
-                    scope.hourpickerPanelValue.endTime = scope.hourpicker.endTimeOptions[scope.hourpicker.endTimeDefaultOptionIndex];\r
-                }\r
-                scope.hourpickerPanelValue.startMeridiem = scope.hourpicker.startTimeDefaultMeridiem;\r
-                scope.hourpickerPanelValue.endMeridiem = scope.hourpicker.endTimeDefaultMeridiem;\r
-                scope.hourpicker.editMode = -1;\r
-                scope.setValidity('invalidHourpickerData', true);\r
-                scope.setValidity('invalidHourpickerTimeRange', true);\r
-            };\r
-            scope.resetHourpickerPanelValue();\r
-            scope.updateHourpickerValue = function () {\r
-                if (scope.isFormValid() && !scope.isTimeOverlap()) {\r
-                    scope.addHourpickerValue(angular.copy(scope.hourpickerPanelValue));\r
-                    scope.resetHourpickerPanelValue();\r
-                }\r
-            };\r
-\r
-            scope.isFormValid = function () {\r
-                var isStartTimeAvailable = scope.hourpickerPanelValue.startTime ? true : false;\r
-                var isStartMeridiemAvailable = scope.hourpickerPanelValue.startMeridiem ? true : false;\r
-                var isEndTimeAvailable = scope.hourpickerPanelValue.endTime ? true : false;\r
-                var isEndMeridiemAvailable = scope.hourpickerPanelValue.endMeridiem ? true : false;\r
-                var currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);\r
-                var currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);\r
-                var isTimeInProperSequence = currentEndTime > currentStartTime;\r
-                var isDayChecked = false;\r
-                for (var i in scope.hourpickerPanelValue.days) {\r
-                    if (scope.hourpickerPanelValue.days[i].value) {\r
-                        isDayChecked = true;\r
-                        break;\r
-                    }\r
-                }\r
-\r
-                if (isStartTimeAvailable && isStartMeridiemAvailable && isEndTimeAvailable && isEndMeridiemAvailable && isTimeInProperSequence && isDayChecked) {\r
-                    scope.setValidity('invalidHourpickerData', true);\r
-                    return true;\r
-                } else {\r
-                    scope.setValidity('invalidHourpickerData', false);\r
-                    return false;\r
-                }\r
-            };\r
-            scope.isTimeOverlap = function () {\r
-                var selectedDays = [];\r
-                for (var i in scope.hourpickerPanelValue.days) {\r
-                    if (scope.hourpickerPanelValue.days[i].value) {\r
-                        selectedDays.push(i);\r
-                    }\r
-                }\r
-\r
-                var currentStartTime, currentEndTime, existingStartTime, existingEndTime;\r
-                currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);\r
-                currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);\r
-                for (var i = 0; i < scope.hourpickerValues.length; i++) {\r
-                    \r
-                    if (i === scope.hourpicker.editMode) {\r
-                        continue;\r
-                    }\r
-\r
-                    for (var j = 0; j < selectedDays.length; j++) {\r
-                        existingStartTime = getTime(scope.hourpickerValues[i].startTime, scope.hourpickerValues[i].startMeridiem);\r
-                        existingEndTime = getTime(scope.hourpickerValues[i].endTime, scope.hourpickerValues[i].endMeridiem);\r
-                        if (scope.hourpickerValues[i].days[selectedDays[j]].value) {\r
-                            if(!scope.hourpicker.sameDayOption){\r
-                                scope.setValidity('dayAlreadySelected', false);\r
-                                return true;\r
-                            } else if ((currentStartTime > existingStartTime && currentStartTime < existingEndTime) || (currentEndTime > existingStartTime && currentEndTime < existingEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            } else if ((existingStartTime > currentStartTime && existingStartTime < currentEndTime) || (existingEndTime > currentStartTime && existingEndTime < currentEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            } else if ((currentStartTime === existingStartTime) && (currentEndTime === existingEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-\r
-                scope.setValidity('dayAlreadySelected', true);\r
-                scope.setValidity('invalidHourpickerTimeRange', true);\r
-                return false;\r
-            };\r
-            var getTime = function (timeString, meridiem) {\r
-                var tempDate = new Date();\r
-                if (timeString && meridiem) {\r
-                    var timeSplit = timeString.split(':');\r
-                    var hour = ((meridiem === 'PM' || meridiem === 'pm') && timeSplit[0] !== '12') ? parseInt(timeSplit[0], 10) + 12 : parseInt(timeSplit[0], 10);\r
-                    tempDate.setHours(hour, parseInt(timeSplit[1], 10), 0, 0);\r
-                }\r
-\r
-                return tempDate.getTime();\r
-            };\r
-        }\r
-    }\r
-}])\r
-\r
-.directive('b2bHourpickerValue', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerValue.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.hourpickerValue = {};\r
-            scope.hourpickerValue.startTime = attr.startTime ? scope.$eval(attr.startTime) : '';\r
-            scope.hourpickerValue.startMeridiem = attr.startMeridiem ? scope.$eval(attr.startMeridiem) : '';\r
-            scope.hourpickerValue.endTime = attr.endTime ? scope.$eval(attr.endTime) : '';\r
-            scope.hourpickerValue.endMeridiem = attr.endMeridiem ? scope.$eval(attr.endMeridiem) : '';\r
-            scope.hourpickerValue.days = attr.days ? scope.$eval(attr.days).join(', ') : '';\r
-            scope.hourpickerValue.index = attr.b2bHourpickerValue ? scope.$eval(attr.b2bHourpickerValue) : -1;\r
-        }\r
-    }\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Template.att:inputTemplate\r
- *\r
- * @description\r
- *  <file src="src/inputTemplate/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <input type="text" id="fieldId" placeholder="placholder text here" class="span12 input-enhanced" name="fieldName">\r
- *\r
- * @example\r
- <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-        <file src="src/inputTemplate/docs/demo.html" />\r
-        <file src="src/inputTemplate/docs/demo.js" />\r
-    </example>\r
- </section>\r
- */\r
-angular.module('b2b.att.inputTemplate', []);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:leftNavigation\r
- *\r
- * @description\r
- *  <file src="src/leftNavigation/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <b2b-left-navigation data-menu="menuData"></b2b-left-navigation> \r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/leftNavigation/docs/demo.html" />\r
-            <file src="src/leftNavigation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.leftNavigation', [])\r
-    .directive('b2bLeftNavigation', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            templateUrl: 'b2bTemplate/leftNavigation/leftNavigation.html',\r
-            scope: {\r
-                menuData: '='\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.idx = -1;\r
-                scope.itemIdx = -1;\r
-                scope.navIdx = -1;\r
-                scope.toggleNav = function (val,link) {\r
-                    if (val === scope.idx) {\r
-                        scope.idx = -1;\r
-                        return;\r
-                    }\r
-                    scope.idx = val;\r
-                };\r
-                /*New function for ECOMP sdk*/\r
-                scope.toggleDrawer = function(showmenu){\r
-                       scope.idx=-1; /*hide the sunmenus*/\r
-                       if(showmenu){\r
-                               document.getElementById('page-content').style.paddingLeft = "50px";\r
-                       }\r
-                       else\r
-                               document.getElementById('page-content').style.paddingLeft = "230px";            \r
-                };\r
-                scope.liveLink = function (evt, val1, val2) {\r
-                    scope.itemIdx = val1;\r
-                    scope.navIdx = val2;\r
-                    evt.stopPropagation();\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:links\r
- *\r
- * @description\r
- *  <file src="src/links/docs/readme.md" />\r
- * @usage\r
- *      <!-- See below examples for link implementation -->\r
- *      \r
- * @example\r
-       <section id="code">              \r
-           <b>HTML + AngularJS</b>\r
-           <example module="b2b.att">\r
-           <file src="src/links/docs/demo.html" />\r
-            <file src="src/links/docs/demo.js" />            \r
-          </example>          \r
-        </section>\r
- */\r
-angular.module('b2b.att.links', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:listbox\r
- *\r
- * @description\r
- *  <file src="src/listbox/docs/readme.md" />\r
- *\r
- * @param {int} currentIndex - Current index of selected listbox item. Is not supported on multiselect listbox\r
- * @param {Array} listboxData - Data of listbox items. Should include full data regardless if HTML will be filtered.\r
-\r
- * @example\r
- *  <section id="code">   \r
-     <example module="b2b.att">\r
-     <file src="src/listbox/docs/demo.html" />\r
-     <file src="src/listbox/docs/demo.js" />\r
-     </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.listbox', ['b2b.att.utilities'])\r
-.directive('b2bListBox', ['keymap', 'b2bDOMHelper', '$rootScope', function(keymap, b2bDOMHelper, $rootScope) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    transclude: true,\r
-                    replace: true,\r
-                    scope: {\r
-                        currentIndex: '=', \r
-                        listboxData: '='\r
-                    },\r
-                    templateUrl: 'b2bTemplate/listbox/listbox.html',\r
-                    link: function(scope, elem, attr) {\r
-\r
-                        if (attr.ariaMultiselectable !== undefined || attr.ariaMultiselectable === 'true') {\r
-                            scope.multiselectable = true;\r
-                        } else {\r
-                            scope.multiselectable = false;\r
-                        }\r
-\r
-                        var shiftKey = false;\r
-                        var elements = [];\r
-                        var prevDirection = undefined; // previous direction is used for an edge case when shifting\r
-                        var shiftKeyPressed = false; // Used to handle shift clicking\r
-                        var ctrlKeyPressed = false;\r
-\r
-                        var currentIndexSet = {\r
-                            'elementIndex': 0,\r
-                            'listboxDataIndex': 0\r
-                        };\r
-\r
-                        /*scope.$watch('currentIndex', function(oldVal, newVal) {\r
-                            if (angular.equals(oldVal, newVal)) return;\r
-                            if (!scope.multiselectable) {\r
-                                // This doesn't garuntee anything. index will update on focus based on rules\r
-                                currentIndexSet.listboxDataIndex = scope.currentIndex;\r
-                                // Should this occur? \r
-                                //scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-\r
-                                // Update elementIndex\r
-                                elements = elem.children();\r
-                                var indecies = Array.prototype.map.call(elements, function(item) {\r
-                                    return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                }).filter(function(item) {\r
-                                    return item === scope.currentIndex;\r
-                                });\r
-                                currentIndex.elementIndex = indecies[0];\r
-                                //focusOnElement(currentIndexSet.elementIndex); // This isn't shifting focus\r
-                                if (!scope.$$phase) {\r
-                                    scope.$apply();\r
-                                }\r
-                            }\r
-                        });*/\r
-\r
-                        function isTrue(item) {\r
-                            if (item.selected === true) {\r
-                                return true;\r
-                            }\r
-                        }\r
-\r
-                        function incrementIndex(elem) {\r
-                            $rootScope.$apply();\r
-\r
-                            var nextElem = elem.next();\r
-                            if (!angular.isDefined(nextElem) || nextElem.length === 0) {\r
-                                return;\r
-                            }\r
-\r
-                            currentIndexSet.elementIndex += 1;\r
-                            currentIndexSet.listboxDataIndex = parseInt(nextElem.attr('data-index'), 10);\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (currentIndexSet.elementIndex >= elements.length - 1) {\r
-                                currentIndexSet.elementIndex = elements.length-1;\r
-                            }\r
-                        }\r
-\r
-                        function decrementIndex(elem) {\r
-                            $rootScope.$apply();\r
-                            var prevElem = angular.element(b2bDOMHelper.previousElement(elem));\r
-                            if (!angular.isDefined(prevElem) || prevElem.length === 0) {\r
-                                return;\r
-                            }\r
-\r
-                            currentIndexSet.elementIndex -= 1;\r
-                            currentIndexSet.listboxDataIndex = parseInt(prevElem.attr('data-index'), 10);\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (currentIndexSet.elementIndex <= 0) {\r
-                                currentIndexSet.elementIndex = 0;\r
-                            }\r
-                        }\r
-\r
-                        var focusOnElement = function(index) {\r
-                            try {\r
-                                elements[index].focus();\r
-                            } catch (e) {};\r
-                        }\r
-\r
-                        function selectItems(startIndex, endIndex, forceValue) {\r
-                            for (var i = startIndex; i < endIndex; i++) {\r
-                                if (forceValue === undefined) {\r
-                                    // We will flip the value\r
-                                    scope.listboxData[i].selected = !scope.listboxData[i].selected;\r
-                                } else {\r
-                                    scope.listboxData[i].selected = forceValue;\r
-                                }\r
-                            }\r
-\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                        }\r
-\r
-                        elem.bind('focus', function(evt) { \r
-                            // If multiselectable or not and nothing is selected, put focus on first element \r
-                            // If multiselectable and a range is set, put focus on first element of range \r
-                            // If not multiselectable and something selected, put focus on element \r
-                            elements = elem.children(); \r
-                             var selectedItems = scope.listboxData.filter(isTrue); \r
-                             var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                return parseInt(angular.element(item).attr('data-index'), 10);\r
-                            });\r
\r
-                            if (selectedItems.length == 0) { \r
-                                focusOnElement(0); \r
-                                currentIndexSet.listboxDataIndex = 0;\r
-                            } else if (attr.ariaMultiselectable) { \r
-                                var index = scope.listboxData.indexOf(selectedItems[0]); \r
-                                var indies = elementsIndies.filter(function(item) {\r
-                                    return (item === index);\r
-                                });\r
-\r
-                                if (indies.length === 0 || indies[0] != index) {\r
-                                    // Set focused on 0\r
-                                    currentIndexSet.elementIndex = elementsIndies[0]; \r
-                                    currentIndexSet.listboxDataIndex = 0;\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                } else {\r
-                                    focusOnElement(indies[0]); \r
-                                    currentIndexSet.elementIndex = indies[0];\r
-                                    currentIndexSet.listboxDataIndex = index;\r
-                                }\r
-                            } else { \r
-                                focusOnElement(currentIndexSet.elementIndex);  \r
-                            }\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                        });\r
-                        elem.bind('keyup', function(evt) {\r
-                            if (evt.keyCode === keymap.KEY.SHIFT) {\r
-                                shiftKeyPressed = false;\r
-                            } else if (evt.keyCode === keymap.KEY.CTRL) {\r
-                                ctrlKeyPressed = false;\r
-                            }\r
-                        });\r
-        \r
-                        elem.bind('keydown', function(evt) {\r
-                            var keyCode = evt.keyCode;\r
-                            elements = elem.children();\r
-                            if (keyCode === keymap.KEY.SHIFT) {\r
-                                shiftKeyPressed = true;\r
-                            } else if (evt.keyCode === keymap.KEY.CTRL) {\r
-                                ctrlKeyPressed = true;\r
-                            }\r
-\r
-                            switch(keyCode) {\r
-                                case 65: // A key\r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey) {\r
-                                        var arr = scope.listboxData.filter(isTrue);\r
-                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                            return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                        });\r
-                                        var val = !(arr.length === scope.listboxData.length);\r
-                                        for (var i = 0; i < elementsIndies.length; i++) {\r
-                                            scope.listboxData[elementsIndies[i]].selected = val;\r
-                                        }\r
-\r
-                                        if (!scope.$$phase) {\r
-                                            scope.$apply();\r
-                                        }\r
-                                        \r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.END:\r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {\r
-                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                            return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                        }).filter(function(item) {\r
-                                            return (item >= currentIndexSet.listboxDataIndex);\r
-                                        });\r
-                                        for (var i = 0; i < elementsIndies.length; i++) {\r
-                                            scope.listboxData[elementsIndies[i]].selected = true;\r
-                                        }\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-\r
-                                        if (!scope.$$phase) {\r
-                                            scope.$apply();\r
-                                        }\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.HOME: \r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {\r
-                                        selectItems(0, currentIndexSet.listboxDataIndex+1, true); // currentIndex+1 is what is being focused on\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.LEFT:\r
-                                case keymap.KEY.UP:\r
-                                {\r
-                                    if (currentIndexSet.listboxDataIndex === 0) {\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                        return;\r
-                                    }\r
-\r
-                                    decrementIndex(elements.eq(currentIndexSet.elementIndex));\r
-                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {\r
-                                        if (evt.shiftKey) {\r
-                                            if (prevDirection === 'DOWN') {\r
-                                                scope.listboxData[currentIndexSet.listboxDataIndex+1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex+1].selected;\r
-                                            }\r
-                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;\r
-                                        }\r
-                                        prevDirection = 'UP';\r
-                                    } else {\r
-                                        // If no modifier keys are selected, all other items need to be unselected.\r
-                                        prevDirection = undefined;\r
-                                        selectItems(0, scope.listboxData.length, false);\r
-                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-                                    }\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                    if(!scope.$$phase) {\r
-                                        scope.$apply();\r
-                                    }\r
-                                    evt.preventDefault();\r
-                                    evt.stopPropagation();\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.RIGHT:\r
-                                case keymap.KEY.DOWN:\r
-                                {\r
-                                    if (currentIndexSet.listboxDataIndex === scope.listboxData.length-1) {\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                        return;\r
-                                    }\r
-\r
-                                    incrementIndex(elements.eq(currentIndexSet.elementIndex));\r
-                                    \r
-                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {\r
-                                        if (evt.shiftKey) {\r
-                                            if (prevDirection === 'UP') {\r
-                                                scope.listboxData[currentIndexSet.listboxDataIndex-1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex-1].selected;\r
-                                            }\r
-                                            \r
-                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;    \r
-                                        }\r
-                                        prevDirection = 'DOWN';\r
-                                    } else {\r
-                                        // If no modifier keys are selected, all other items need to be unselected.\r
-                                        prevDirection = undefined;\r
-                                        selectItems(0, scope.listboxData.length, false);\r
-                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-                                    }\r
-\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                    if(!scope.$$phase) {\r
-                                        scope.$apply();\r
-                                    }\r
-                                    evt.preventDefault();\r
-                                    evt.stopPropagation();\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.TAB:\r
-                                    if(evt.shiftKey) {\r
-                                        var previousElement = b2bDOMHelper.previousElement(elem.parent().parent(), true);\r
-                                        evt.preventDefault();\r
-                                        previousElement.focus();\r
-                                    }\r
-                                    break;\r
-                                default:\r
-                                    break;\r
-                            }\r
-                        });\r
-\r
-                        elem.bind('click', function(evt) {\r
-                            var index = parseInt(evt.target.dataset.index, 10);\r
-                            if (index === undefined || isNaN(index)) {\r
-                                return;\r
-                            }\r
-                            if (scope.multiselectable && currentIndexSet.listboxDataIndex !== undefined) {\r
-                                if (shiftKeyPressed) {\r
-                                    var min = Math.min(index, currentIndexSet.listboxDataIndex);\r
-                                    var max = Math.max(index, currentIndexSet.listboxDataIndex);\r
-\r
-                                    if (index === min) { // clicking up\r
-                                        var firstIndex = scope.listboxData.findIndex(function(item) { return item.selected === true;});\r
-                                        // Given the firstIndex, let's find the matching element to get proper element match\r
-                                        elements = elem.children();\r
-                                        elements.eq(firstIndex)\r
-                                        var elementsThatMatch = Array.prototype.filter.call(elements, function(item) {\r
-                                            if (parseInt(angular.element(item).attr('data-index'), 10) === firstIndex) {\r
-                                                return true;\r
-                                            }\r
-                                        });\r
-                                        firstIndex = parseInt(angular.element(elementsThatMatch).attr('data-index'), 10);\r
-                                        \r
-                                        if (index <= firstIndex && scope.listboxData.filter(isTrue).length > 1) {\r
-                                            // Break the selection into 2\r
-                                            selectItems(firstIndex + 1, max + 1, undefined); // + 1 needed because selectItems only selects up to MAX\r
-                                            selectItems(min, firstIndex, undefined); \r
-                                        } else if (scope.listboxData.filter(isTrue).length == 1){\r
-                                            selectItems(min, max, undefined); \r
-                                        } else {\r
-                                            selectItems(min + 1, max + 1, undefined);\r
-                                        }\r
-                                    } else { // clicking down\r
-                                        selectItems(min + 1, max + 1, scope.listboxData[min].selected);\r
-                                    }\r
-                                } else if (ctrlKeyPressed) {\r
-                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                                } else {\r
-                                    selectItems(0, scope.listboxData.length, false);\r
-                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                                }\r
-                            } else {\r
-                                selectItems(0, scope.listboxData.length, false);\r
-                                scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                            }\r
-                            currentIndexSet.elementIndex = index;\r
-                            currentIndexSet.listboxDataIndex = index;\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                            focusOnElement(index);\r
-                        });\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:loaderAnimation\r
- *\r
- * @description\r
- *  <file src="src/loaderAnimation/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <!-- Below demo js shows-->\r
- *   Angular library uses Global.css's icon-primary-spinner.\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/loaderAnimation/docs/demo.html" />\r
-            <file src="src/loaderAnimation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.loaderAnimation', [])\r
-    .constant('b2bSpinnerConfig', {\r
-        loadingText: 'Loading...',\r
-        startEvent: 'startButtonSpinner',\r
-        stopEvent: 'stopButtonSpinner'\r
-    })\r
-    .constant("progressTrackerConfig", {\r
-        loadingText: 'Loading...',\r
-        minDuration: "",\r
-        activationDelay: "",\r
-        minDurationPromise: "",\r
-        activationDelayPromise: ""\r
-    })\r
-\r
-.provider('progressTracker', function () {\r
-    this.$get = ['$q', '$timeout', function ($q, $timeout) {\r
-        function cancelTimeout(promise) {\r
-            if (promise) {\r
-                $timeout.cancel(promise);\r
-            }\r
-        }\r
-        return function ProgressTracker(options) {\r
-            //do new if user doesn't\r
-            if (!(this instanceof ProgressTracker)) {\r
-                return new ProgressTracker(options);\r
-            }\r
-\r
-            options = options || {};\r
-            //Array of promises being tracked\r
-            var tracked = [];\r
-            var self = this;\r
-            //Allow an optional "minimum duration" that the tracker has to stay active for.\r
-            var minDuration = options.minDuration;\r
-            //Allow a delay that will stop the tracker from activating until that time is reached\r
-            var activationDelay = options.activationDelay;\r
-            var minDurationPromise;\r
-            var activationDelayPromise;\r
-            self.active = function () {\r
-                //Even if we have a promise in our tracker, we aren't active until delay is elapsed\r
-                if (activationDelayPromise) {\r
-                    return false;\r
-                }\r
-                return tracked.length > 0;\r
-            };\r
-            self.tracking = function () {\r
-                //Even if we aren't active, we could still have a promise in our tracker\r
-                return tracked.length > 0;\r
-            };\r
-            self.destroy = self.cancel = function () {\r
-                minDurationPromise = cancelTimeout(minDurationPromise);\r
-                activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                for (var i = tracked.length - 1; i >= 0; i--) {\r
-                    tracked[i].resolve();\r
-                }\r
-                tracked.length = 0;\r
-            };\r
-            //Create a promise that will make our tracker active until it is resolved.\r
-            // @return deferred - our deferred object that is being tracked\r
-            self.createPromise = function () {\r
-                var deferred = $q.defer();\r
-                tracked.push(deferred);\r
-                //If the tracker was just inactive and this the first in the list of promises, we reset our delay and minDuration again.\r
-                if (tracked.length === 1) {\r
-                    if (activationDelay) {\r
-                        activationDelayPromise = $timeout(function () {\r
-                            activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                            startMinDuration();\r
-                        }, activationDelay);\r
-                    } else {\r
-                        startMinDuration();\r
-                    }\r
-                }\r
-                deferred.promise.then(onDone(false), onDone(true));\r
-                return deferred;\r
-\r
-                function startMinDuration() {\r
-                    if (minDuration) {\r
-                        minDurationPromise = $timeout(angular.noop, minDuration);\r
-                    }\r
-                }\r
-                //Create a callback for when this promise is done. It will remove our tracked promise from the array if once minDuration is complete\r
-                function onDone() {\r
-                    return function () {\r
-                        (minDurationPromise || $q.when()).then(function () {\r
-                            var index = tracked.indexOf(deferred);\r
-                            tracked.splice(index, 1);\r
-                            //If this is the last promise, cleanup the timeouts for activationDelay\r
-                            if (tracked.length === 0) {\r
-                                activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                            }\r
-                        });\r
-                    };\r
-                }\r
-            };\r
-            self.addPromise = function (promise) {\r
-                \r
-//                we cannot assign then function in other var and then add the resolve and reject \r
-                var thenFxn = promise && (promise.then || promise.$then || (promise.$promise && promise.$promise.then));                \r
-                if (!thenFxn) {\r
-                    throw new Error("progressTracker expects a promise object :: Not found");\r
-                }\r
-                var deferred = self.createPromise();\r
-                //When given promise is done, resolve our created promise\r
-                //Allow $then for angular-resource objects\r
-\r
-                promise.then(function (value) {\r
-                        deferred.resolve(value);\r
-                        return value;\r
-                    }, function (value) {\r
-                        deferred.reject(value);\r
-                        return $q.reject(value);\r
-                    }\r
-                );\r
-                return deferred;\r
-            };\r
-        };\r
-    }];\r
-})\r
-\r
-.config(['$httpProvider', function ($httpProvider) {\r
-    $httpProvider.interceptors.push(['$q', 'progressTracker', function ($q) {\r
-        return {\r
-            request: function (config) {\r
-                if (config.tracker) {\r
-                    if (!angular.isArray(config.tracker)) {\r
-                        config.tracker = [config.tracker];\r
-                    }\r
-                    config.$promiseTrackerDeferred = config.$promiseTrackerDeferred || [];\r
-\r
-                    angular.forEach(config.tracker, function (tracker) {\r
-                        var deferred = tracker.createPromise();\r
-                        config.$promiseTrackerDeferred.push(deferred);\r
-                    });\r
-                }\r
-                return $q.when(config);\r
-            },\r
-            response: function (response) {\r
-                if (response.config && response.config.$promiseTrackerDeferred) {\r
-                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {\r
-                        deferred.resolve(response);\r
-                    });\r
-                }\r
-                return $q.when(response);\r
-            },\r
-            responseError: function (response) {\r
-                if (response.config && response.config.$promiseTrackerDeferred) {\r
-                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {\r
-                        deferred.reject(response);\r
-                    });\r
-                }\r
-                return $q.reject(response);\r
-            }\r
-        };\r
-    }]);\r
-}])\r
-\r
-.directive('b2bClickSpin', ['$timeout', '$parse', '$rootScope', 'progressTracker', function ($timeout, $parse, $rootScope, progressTracker) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elm, attrs) {\r
-            var fn = $parse(attrs.b2bClickSpin);\r
-            elm.on('click', function (event) {\r
-                var promise = $timeout(function () {console.log("inside Promise")}, 5000);\r
-                scope.$apply(function () {\r
-                    fn(scope, {\r
-                        $event: event\r
-                    });\r
-                });\r
-                //comment this line if not running unit test\r
-                $rootScope.loadingTracker = progressTracker({\r
-                    minDuration: 750\r
-                });\r
-                $rootScope.loadingTracker.addPromise(promise);\r
-                angular.forEach("$routeChangeSuccess $viewContentLoaded $locationChangeSuccess".split(" "), function (event) {\r
-                    $rootScope.$on(event, function () {\r
-\r
-                        $timeout.cancel(promise);\r
-                    });\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bProgressTracker', ['progressTrackerConfig', function (ptc) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        template: '<div><div ng-show="loadingTracker.active()" style="width:100%; text-align:center"><i class=\"icon-primary-spinner\"></i></div><div ng-show="loadingTracker.active()" style="width:100%;margin-top:10px; text-align:center">'+ ptc.loadingText+'</div></div>'\r
-    };\r
-}])\r
-\r
-.directive('b2bLoadButton', ['b2bSpinnerConfig', '$timeout', function (spinnerConfig, $timeout) {\r
-    var spinButton = function (state, element, data) {\r
-        \r
-        var attr = element.html() ? 'html' : 'val';\r
-        state = state + 'Text';\r
-        if (state === 'loadingText') {\r
-            element[attr](data[state]);\r
-            element.attr("disabled",'disabled');\r
-            element.addClass('disabled');\r
-        } else if (state === 'resetText') {\r
-            element[attr](data[state]);\r
-            element.removeAttr("disabled");\r
-            element.removeClass('disabled');\r
-        }\r
-    };\r
-\r
-    return {\r
-        restrict: 'A',\r
-        replace: false,\r
-        scope: {\r
-            promise: '=promise',\r
-            startEvent: '@startEvent',\r
-            stopEvent: '@stopEvent'\r
-        },\r
-        link: function (scope, element, attr) {\r
-            var validAttr = element.html() ? 'html' : 'val';\r
-            var data = {\r
-                loadingText: '',\r
-                resetText: ''\r
-            };\r
-\r
-            var updateLoadingText = function (val) {\r
-                var loadingText = val;\r
-                if (!angular.isDefined(loadingText) || loadingText === "") {\r
-                    loadingText = spinnerConfig.loadingText;\r
-                }\r
-                data.loadingText = validAttr === 'html' ? "<i class=\"icon-primary-spinner small\"></i>" + loadingText : loadingText;\r
-            };\r
-            var updateResetText = function (val) {\r
-                data.resetText = val;\r
-            };\r
-\r
-            attr.$observe('b2bLoadButton', function (val) {\r
-                updateLoadingText(val);\r
-            });\r
-            $timeout(function () {\r
-                updateResetText(element[validAttr]());\r
-            }, 500);\r
-\r
-            if (!angular.isDefined(scope.startEvent) || scope.startEvent === "") {\r
-                scope.startEvent = spinnerConfig.startEvent;\r
-            }\r
-\r
-            if (!angular.isDefined(scope.stopEvent) || scope.stopEvent === "") {\r
-                scope.stopEvent = spinnerConfig.stopEvent;\r
-            }\r
-\r
-            scope.$watch('promise', function () {\r
-                if (angular.isDefined(scope.promise) && angular.isFunction(scope.promise.then)) {\r
-                    spinButton('loading', element, data);\r
-                    scope.promise.then(function () {\r
-                        spinButton('reset', element, data);\r
-                    }, function () {\r
-                        spinButton('reset', element, data);\r
-                    });\r
-                }\r
-            });\r
-\r
-            scope.$on(scope.startEvent, function () {\r
-                spinButton('loading', element, data);\r
-                scope.$on(scope.stopEvent, function () {\r
-                    spinButton('reset', element, data);\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-;\r
- /**\r
- * @ngdoc directive\r
- * @name Misc.att:messageWrapper\r
- * @scope\r
- * @param {boolean} trigger - A boolean that triggers directive to switch focus\r
- * @param {integer} delay  - Extra delay added to trigger code to allow for DOM to be ready. Default is 10ms.\r
- * @param {string} noFocus - Attribute-based API to trigger whether first focusable element receives focus on trigger or whole message (assumes tabindex="-1" set on first child)\r
- * @param {string} trapFocus - Attribute-based API to trap focus within the message. This should be enabled by default on all toast messages.\r
- * @description\r
- *  <file src="src/messageWrapper/docs/readme.md" />\r
- * @usage\r
- * <b2b-message-wrapper>Code that contains at least one focusable element and will be shown/hidden on some logic. This must have tabindex="-1".</b2b-message-wrapper>\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <b>HTML + AngularJS</b>\r
- <example module="b2b.att">\r
- <file src="src/messageWrapper/docs/demo.html" />\r
- <file src="src/messageWrapper/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.messageWrapper', ['b2b.att.utilities'])\r
-.directive('b2bMessageWrapper', ['b2bDOMHelper', '$compile', '$timeout', '$log', function(b2bDOMHelper, $compile, $timeout, $log) {\r
-  return {\r
-    restrict: 'AE',\r
-    scope: {\r
-      trigger: '=',\r
-      delay: '=?'\r
-    },\r
-    transclude: true,\r
-    replace: true,\r
-    template: '<div ng-transclude></div>',\r
-    link: function(scope, elem, attrs) {\r
-      scope.delay = scope.delay || 10;\r
-\r
-      if (attrs.trapFocus != undefined && !elem.children().eq(0).attr('b2b-trap-focus-inside-element')) {\r
-        // Append b2bTrapFocusInsideElement onto first child and recompile\r
-        elem.children().eq(0).attr('b2b-trap-focus-inside-element', 'false');\r
-        elem.children().eq(0).attr('trigger', scope.trigger);\r
-        $compile(elem.contents())(scope);\r
-      }\r
-\r
-      var firstElement = undefined,\r
-          launchingElement = undefined;\r
-      \r
-      scope.$watch('trigger', function(oldVal, newVal) {\r
-        if (oldVal === newVal) return;\r
-        if (!angular.isDefined(launchingElement)) {\r
-          launchingElement = document.activeElement;\r
-        }\r
-        $timeout(function() {\r
-          if (scope.trigger) {\r
-\r
-            if (attrs.noFocus === true || attrs.noFocus === "") {\r
-              elem.children()[0].focus();\r
-            } else {\r
-              firstElement = b2bDOMHelper.firstTabableElement(elem);\r
-\r
-              if (angular.isDefined(firstElement)) {\r
-                firstElement.focus();\r
-              }\r
-            }\r
-            \r
-          } else {\r
-            if (angular.isDefined(launchingElement) && launchingElement.nodeName !== 'BODY') {\r
-              if (launchingElement === document.activeElement) {\r
-                return;\r
-              }\r
-\r
-              if (b2bDOMHelper.isInDOM(launchingElement) && b2bDOMHelper.isTabable(launchingElement)) {\r
-                  // At this point, launchingElement is still a valid element, but focus will fail and \r
-                  // activeElement will become body, hence we want to apply custom logic and find previousElement\r
-                  var prevLaunchingElement = launchingElement;\r
-                  launchingElement.focus();\r
-\r
-                  if (document.activeElement !== launchingElement || document.activeElement.nodeName === 'BODY') {\r
-                    launchingElement = b2bDOMHelper.previousElement(angular.element(prevLaunchingElement), true);\r
-                    launchingElement.focus();\r
-                  }\r
-              } else {\r
-                launchingElement = b2bDOMHelper.previousElement(launchingElement, true);\r
-                launchingElement.focus();\r
-              }\r
-            }\r
-          }\r
-        }, scope.delay); \r
-      });\r
-    }\r
-  };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:modalsAndAlerts\r
- *\r
- * @description\r
- *  <file src="src/modalsAndAlerts/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <button class="btn" b2b-modal="b2bTemplate/modalsAndAlerts/demo_modal.html" modal-ok="ok()" modal-cancel="cancel()">Launch demo modal</button>\r
- *\r
- * @example\r
- *  <section id="code">\r
-     <example module="b2b.att">\r
-      <file src="src/modalsAndAlerts/docs/demo.html" />\r
-      <file src="src/modalsAndAlerts/docs/demo.js" />\r
-     </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.modalsAndAlerts', ['b2b.att.position', 'b2b.att.transition', 'b2b.att.utilities'])\r
-\r
-/**\r
- * A helper, internal data structure that acts as a map but also allows getting / removing\r
- * elements in the LIFO order\r
- */\r
-.factory('$$stackedMap', function () {\r
-    return {\r
-        createNew: function () {\r
-            var stack = [];\r
-\r
-            return {\r
-                add: function (key, value) {\r
-                    stack.push({\r
-                        key: key,\r
-                        value: value\r
-                    });\r
-                },\r
-                get: function (key) {\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        if (key === stack[i].key) {\r
-                            return stack[i];\r
-                        }\r
-                    }\r
-                },\r
-                keys: function () {\r
-                    var keys = [];\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        keys.push(stack[i].key);\r
-                    }\r
-                    return keys;\r
-                },\r
-                top: function () {\r
-                    return stack[stack.length - 1];\r
-                },\r
-                remove: function (key) {\r
-                    var idx = -1;\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        if (key === stack[i].key) {\r
-                            idx = i;\r
-                            break;\r
-                        }\r
-                    }\r
-                    return stack.splice(idx, 1)[0];\r
-                },\r
-                removeTop: function () {\r
-                    return stack.splice(stack.length - 1, 1)[0];\r
-                },\r
-                length: function () {\r
-                    return stack.length;\r
-                }\r
-            };\r
-        }\r
-    };\r
-}).factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var firstTabableElement, lastTabableElement;\r
-\r
-    var trapKeyboardFocusInFirstElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-            lastTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-\r
-    };\r
-\r
-    var trapKeyboardFocusInLastElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-            firstTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-    };\r
-    \r
-    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element) {\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        }else {\r
-            if (angular.isDefined(stackHead)) {\r
-                trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                trapFocusInElement(true);\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-/**\r
- * A helper directive for the $modal service. It creates a backdrop element.\r
- */\r
-.directive('b2bModalBackdrop', ['$modalStack', '$timeout', function ($modalStack, $timeout) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html',\r
-        link: function (scope, element, attrs) {\r
-            scope.close = function (evt) {\r
-                var modal = $modalStack.getTop();\r
-                if (modal && modal.value.backdrop && modal.value.backdrop !== 'static') {\r
-                    evt.preventDefault();\r
-                    evt.stopPropagation();\r
-                    $modalStack.dismiss(modal.key, 'backdrop click');\r
-                }\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalWindow', ['$timeout', 'windowOrientation', '$window', function ($timeout, windowOrientation, $window) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-window.html',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {\r
-            scope.windowClass = attrs.windowClass || '';\r
-            scope.sizeClass = attrs.sizeClass || '';\r
-            scope.isNotifDialog = false;\r
-\r
-            this.setTitle = function (title) {\r
-                scope.title = title;\r
-            };\r
-            this.setContent = function (content) {\r
-                scope.content = content;\r
-                scope.isNotifDialog = true;\r
-            };\r
-            this.isDockedModal = scope.windowClass.indexOf('modal-docked') > -1;\r
-        }],\r
-        link: function (scope, element, attrs, ctrl) {\r
-            if (ctrl.isDockedModal) {\r
-                scope.isModalLandscape = false;\r
-\r
-                var window = angular.element($window);\r
-                scope.updateCss = function () {\r
-                    if (windowOrientation.isPotrait()) { // Potrait Mode\r
-                        scope.isModalLandscape = false;\r
-                    } else if (windowOrientation.isLandscape()) { // Landscape Mode\r
-                        scope.isModalLandscape = true;\r
-                    }\r
-                };\r
-\r
-                $timeout(function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                }, 100);\r
-                window.bind('orientationchange', function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                });\r
-                window.bind('resize', function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                });\r
-            }else {\r
-                angular.element(element[0].querySelectorAll(".awd-select-list")).css({\r
-                    "max-height": "200px"\r
-                });\r
-            }\r
-\r
-            var isIE = /msie|trident/i.test(navigator.userAgent);\r
-            if (isIE) {\r
-                if(angular.element(element[0].querySelector('.corner-button button.close')).length > 0){\r
-                    angular.element(element[0].querySelector('.corner-button button.close')).bind('focus', function () {\r
-                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollLeft = 0;\r
-                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollTop = 0;\r
-                    });\r
-                }\r
-            }\r
-            \r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalTitle', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.setTitle(attr.id);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalContent', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.setContent(attr.id);\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-.directive('b2bModalBody', ['$timeout', '$position', '$document', '$window', 'windowOrientation', 'b2bAwdBreakpoints', function ($timeout, $position, $document, $window, windowOrientation, b2bAwdBreakpoints) {\r
-    return {\r
-        restrict: 'AC',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, element, attrs, ctrl) {\r
-            var window = angular.element($window);\r
-            var body = $document.find('body').eq(0);\r
-            scope.setModalHeight = function () {\r
-                var modalHeaderHeight, modalFooterHeight, modalBodyHeight, windowHeight, windowWidth, modalHeight;\r
-                modalHeaderHeight = 0;\r
-                modalFooterHeight = 0;\r
-                windowHeight = $window.innerHeight;\r
-                windowWidth = $window.innerWidth;\r
-                body.css({\r
-                    'height': windowHeight + 'px'\r
-                });\r
-\r
-                if (ctrl.isDockedModal) {\r
-                    var modalElements = element.parent().children();\r
-                    for (var i = 0; i < modalElements.length; i++) {\r
-                        if (modalElements.eq(i).hasClass('b2b-modal-header')) {\r
-                            modalHeaderHeight = $position.position(modalElements.eq(i)).height;\r
-                        } else if (modalElements.eq(i).hasClass('b2b-modal-footer')) {\r
-                            modalFooterHeight = $position.position(modalElements.eq(i)).height;\r
-                        }\r
-                    }\r
-\r
-                    modalHeight = $position.position(element.parent()).height;\r
-\r
-                    modalBodyHeight = modalHeight - (modalHeaderHeight + modalFooterHeight) + 'px';\r
-\r
-                    if (windowOrientation.isPotrait()) { // Potrait Mode\r
-                        element.removeAttr('style').css({\r
-                            height: modalBodyHeight\r
-                        });\r
-                    } else if (windowOrientation.isLandscape() && windowWidth < b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Mobile\r
-                        element.removeAttr('style');\r
-                    } else if (windowOrientation.isLandscape() && windowWidth >= b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Non-Mobile\r
-                        element.removeAttr('style').css({\r
-                            height: modalBodyHeight\r
-                        });\r
-                    }\r
-                }\r
-            };\r
-\r
-            $timeout(function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            }, 100);\r
-            window.bind('orientationchange', function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            });\r
-            window.bind('resize', function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalFooter', ['windowOrientation', '$window', function (windowOrientation, $window) {\r
-    return {\r
-        restrict: 'AC',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        link: function (scope, element, attrs) {\r
-\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap', '$log', '$timeout', 'trapFocusInElement', function ($document, $compile, $rootScope, $$stackedMap, $log, $timeout, trapFocusInElement) {\r
-    var backdropjqLiteEl, backdropDomEl;\r
-    var backdropScope = $rootScope.$new(true);\r
-    var body = $document.find('body').eq(0);\r
-    var html = $document.find('html').eq(0);\r
-    var openedWindows = $$stackedMap.createNew();\r
-    var $modalStack = {};\r
-\r
-    function backdropIndex() {\r
-        var topBackdropIndex = -1;\r
-        var opened = openedWindows.keys();\r
-        for (var i = 0; i < opened.length; i++) {\r
-            if (openedWindows.get(opened[i]).value.backdrop) {\r
-                topBackdropIndex = i;\r
-            }\r
-        }\r
-        return topBackdropIndex;\r
-    }\r
-\r
-    $rootScope.$watch(backdropIndex, function (newBackdropIndex) {\r
-        backdropScope.index = newBackdropIndex;\r
-    });\r
-\r
-    function removeModalWindow(modalInstance) {\r
-        //background scroll fix\r
-        html.removeAttr('style');\r
-        body.removeAttr('style');\r
-        body.removeClass('styled-by-modal');\r
-\r
-        var modalWindow = openedWindows.get(modalInstance).value;\r
-        trapFocusInElement(false, modalWindow.modalDomEl);\r
-\r
-        //clean up the stack\r
-        openedWindows.remove(modalInstance);\r
-\r
-        //remove window DOM element\r
-        modalWindow.modalDomEl.remove();\r
-\r
-        //remove backdrop if no longer needed\r
-        if (backdropDomEl && backdropIndex() === -1) {\r
-            backdropDomEl.remove();\r
-            backdropDomEl = undefined;\r
-        }\r
-\r
-        //destroy scope\r
-        modalWindow.modalScope.$destroy();\r
-    }\r
-\r
-    $document.bind('keydown', function (evt) {\r
-        var modal;\r
-\r
-        if (evt.which === 27) {\r
-            modal = openedWindows.top();\r
-            if (modal && modal.value.keyboard) {\r
-                $rootScope.$apply(function () {\r
-                    $modalStack.dismiss(modal.key);\r
-                });\r
-            }\r
-        }\r
-    });\r
-\r
-    $modalStack.open = function (modalInstance, modal) {\r
-\r
-        openedWindows.add(modalInstance, {\r
-            deferred: modal.deferred,\r
-            modalScope: modal.scope,\r
-            backdrop: modal.backdrop,\r
-            keyboard: modal.keyboard\r
-        });\r
-\r
-        var angularDomEl = angular.element('<div b2b-modal-window></div>');\r
-        angularDomEl.attr('window-class', modal.windowClass);\r
-        angularDomEl.attr('size-class', modal.sizeClass);\r
-        angularDomEl.attr('index', openedWindows.length() - 1);\r
-        angularDomEl.html(modal.content);\r
-\r
-        var modalDomEl = $compile(angularDomEl)(modal.scope);\r
-        openedWindows.top().value.modalDomEl = modalDomEl;\r
-        //background page scroll fix\r
-        html.css({\r
-            'overflow-y': 'hidden'\r
-        });\r
-        body.css({\r
-            'overflow-y': 'hidden',\r
-            'width': '100%',\r
-            'height': window.innerHeight + 'px'\r
-        });\r
-        body.addClass('styled-by-modal');\r
-        body.append(modalDomEl);\r
-\r
-        if (backdropIndex() >= 0 && !backdropDomEl) {\r
-            backdropjqLiteEl = angular.element('<div b2b-modal-backdrop></div>');\r
-            backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);\r
-            body.append(backdropDomEl);\r
-        }\r
-\r
-        $timeout(function () {\r
-\r
-            if (modal.scope.$$childHead.isNotifDialog) {\r
-                angular.element(modalDomEl).find('button')[0].focus();\r
-            } else {\r
-                angular.element(modalDomEl)[0].focus();\r
-            }\r
-            trapFocusInElement(true, angular.element(modalDomEl).eq(0));\r
-        }, 200);\r
-    };\r
-\r
-    $modalStack.close = function (modalInstance, result) {\r
-        var modal = openedWindows.get(modalInstance);\r
-        if (modal) {\r
-            modal.value.deferred.resolve(result);\r
-            removeModalWindow(modalInstance);\r
-        }\r
-    };\r
-\r
-    $modalStack.dismiss = function (modalInstance, reason) {\r
-        var modalWindow = openedWindows.get(modalInstance).value;\r
-        if (modalWindow) {\r
-            modalWindow.deferred.reject(reason);\r
-            removeModalWindow(modalInstance);\r
-        }\r
-    };\r
-\r
-    $modalStack.getTop = function () {\r
-        return openedWindows.top();\r
-    };\r
-\r
-    return $modalStack;\r
-}])\r
-\r
-.provider('$modal', function () {\r
-    var $modalProvider = {\r
-        options: {\r
-            backdrop: true, //can be also false or 'static'\r
-            keyboard: true\r
-        },\r
-        $get: ['$injector', '$rootScope', '$q', '$http', '$templateCache', '$controller', '$modalStack', function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {\r
-            var $modal = {};\r
-\r
-            function getTemplatePromise(options) {\r
-                return options.template ? $q.when(options.template) :\r
-                    $http.get(options.templateUrl, {\r
-                        cache: $templateCache\r
-                    }).then(function (result) {\r
-                        return result.data;\r
-                    });\r
-            }\r
-\r
-            function getResolvePromises(resolves) {\r
-                var promisesArr = [];\r
-                angular.forEach(resolves, function (value, key) {\r
-                    if (angular.isFunction(value) || angular.isArray(value)) {\r
-                        promisesArr.push($q.when($injector.invoke(value)));\r
-                    }\r
-                });\r
-                return promisesArr;\r
-            }\r
-\r
-            $modal.open = function (modalOptions) {\r
-\r
-                var modalResultDeferred = $q.defer();\r
-                var modalOpenedDeferred = $q.defer();\r
-                //prepare an instance of a modal to be injected into controllers and returned to a caller\r
-                var modalInstance = {\r
-                    result: modalResultDeferred.promise,\r
-                    opened: modalOpenedDeferred.promise,\r
-                    close: function (result) {\r
-                        $modalStack.close(modalInstance, result);\r
-                    },\r
-                    dismiss: function (reason) {\r
-                        $modalStack.dismiss(modalInstance, reason);\r
-                    }\r
-                };\r
-\r
-                //merge and clean up options\r
-                modalOptions = angular.extend({}, $modalProvider.options, modalOptions);\r
-                modalOptions.resolve = modalOptions.resolve || {};\r
-\r
-                //verify options\r
-                if (!modalOptions.template && !modalOptions.templateUrl) {\r
-                    throw new Error('One of template or templateUrl options is required.');\r
-                }\r
-\r
-                var templateAndResolvePromise =\r
-                    $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));\r
-\r
-\r
-                templateAndResolvePromise.then(function resolveSuccess(tplAndVars) {\r
-\r
-                    var modalScope = (modalOptions.scope || $rootScope).$new();\r
-                    modalScope.$close = modalInstance.close;\r
-                    modalScope.$dismiss = modalInstance.dismiss;\r
-\r
-                    var ctrlInstance, ctrlLocals = {};\r
-                    var resolveIter = 1;\r
-\r
-                    //controllers\r
-                    if (modalOptions.controller) {\r
-                        ctrlLocals.$scope = modalScope;\r
-                        ctrlLocals.$modalInstance = modalInstance;\r
-                        angular.forEach(modalOptions.resolve, function (value, key) {\r
-                            ctrlLocals[key] = tplAndVars[resolveIter++];\r
-                        });\r
-\r
-                        ctrlInstance = $controller(modalOptions.controller, ctrlLocals);\r
-                    }\r
-\r
-                    $modalStack.open(modalInstance, {\r
-                        scope: modalScope,\r
-                        deferred: modalResultDeferred,\r
-                        content: tplAndVars[0],\r
-                        backdrop: modalOptions.backdrop,\r
-                        keyboard: modalOptions.keyboard,\r
-                        windowClass: modalOptions.windowClass,\r
-                        sizeClass: modalOptions.sizeClass\r
-                    });\r
-\r
-                }, function resolveError(reason) {\r
-                    modalResultDeferred.reject(reason);\r
-                });\r
-\r
-                templateAndResolvePromise.then(function () {\r
-                    modalOpenedDeferred.resolve(true);\r
-                }, function () {\r
-                    modalOpenedDeferred.reject(false);\r
-                });\r
-\r
-                return modalInstance;\r
-            };\r
-\r
-            return $modal;\r
-        }]\r
-    };\r
-\r
-    return $modalProvider;\r
-})\r
-\r
-.directive("b2bModal", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            b2bModal: '@',\r
-            modalController: '@',\r
-            modalOk: '&',\r
-            modalCancel: '&',\r
-            windowClass: '@',\r
-            sizeClass: '@'\r
-        },\r
-        link: function (scope, elm, attr) {\r
-            elm.bind('click', function (ev) {\r
-                var currentPosition = ev.pageY - ev.clientY;\r
-                ev.preventDefault();\r
-                if (angular.isDefined(elm.attr("href")) && elm.attr("href") !== "") {\r
-                    scope.b2bModal = elm.attr("href");\r
-                }\r
-                $modal.open({\r
-                    templateUrl: scope.b2bModal,\r
-                    controller: scope.modalController,\r
-                    windowClass: scope.windowClass,\r
-                    sizeClass: scope.sizeClass\r
-                }).result.then(function (value) {\r
-                    scope.modalOk({\r
-                        value: value\r
-                    });\r
-                    elm[0].focus();\r
-                }, function (value) {\r
-                    scope.modalCancel({\r
-                        value: value\r
-                    });\r
-                    elm[0].focus();\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("utilityFilter", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-            utilityFilter: '@'\r
-        },\r
-        require: 'ngModel',\r
-        templateUrl: 'b2bTemplate/modal/u-filter.html',\r
-        link: function (scope, element, attribute, ctrl) {\r
-            //controller to be passed to $modal service\r
-            scope.options = angular.copy(scope.$parent.$eval(attribute.ngModel));\r
-            scope.$parent.$watch(attribute.ngModel, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    scope.options = newVal;\r
-                }\r
-            });\r
-            var modalCtrl = function ($scope, options) {\r
-                $scope.options = angular.copy(options);\r
-            };\r
-\r
-            if (angular.isDefined(scope.utilityFilter)) {\r
-                scope.templateUrl = scope.utilityFilter;\r
-            } else {\r
-                scope.templateUrl = 'b2bTemplate/modal/u-filter-window.html';\r
-            }\r
-            element.bind('click', function (ev) {\r
-                var currentPosition = ev.pageY - ev.clientY;\r
-                $modal.open({\r
-                    templateUrl: scope.templateUrl,\r
-                    controller: modalCtrl,\r
-                    resolve: {\r
-                        options: function () {\r
-                            return scope.options;\r
-                        }\r
-                    }\r
-                }).result.then(function (value) {\r
-                    ctrl.$setViewValue(value);\r
-                    element[0].focus();\r
-                    $scrollTo(0, currentPosition, 0);\r
-                }, function () {\r
-                    element[0].focus();\r
-                    $scrollTo(0, currentPosition, 0);\r
-                });\r
-            });\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:monthSelector\r
- *\r
- * @description\r
- *  <file src="src/monthSelector/docs/readme.md" />\r
- *\r
- * @usage\r
- * <div b2b-monthpicker ng-model="dt" min="minDate" max="maxDate" mode="monthpicker"></div>\r
-    \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/monthSelector/docs/demo.html" />\r
-            <file src="src/monthSelector/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.monthSelector', ['b2b.att.position', 'b2b.att.utilities'])\r
-\r
-.constant('b2bMonthpickerConfig', {\r
-    dateFormat: 'MM/dd/yyyy',\r
-    dayFormat: 'd',\r
-    monthFormat: 'MMMM',\r
-    yearFormat: 'yyyy',\r
-    dayHeaderFormat: 'EEEE',\r
-    dayTitleFormat: 'MMMM yyyy',\r
-    disableWeekend: false,\r
-    disableSunday: false,\r
-    disableDates: null,\r
-    onSelectClose: null,\r
-    startingDay: 0,\r
-    minDate: null,\r
-    maxDate: null,\r
-    dueDate: null,\r
-    fromDate: null,\r
-    legendIcon: null,\r
-    legendMessage: null,\r
-    calendarDisabled: false,\r
-    collapseWait: 0,\r
-    orientation: 'left',\r
-    inline: false,\r
-    mode:0,\r
-    helperText: 'The date you selected is $date. Double tap to open calendar. Select a date to close the calendar.',\r
-    descriptionText: 'Use tab to navigate between previous button, next button and month. Use arrow keys to navigate between months. Use space or enter to select a month.',\r
-    MonthpickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation','mode','id'],\r
-    MonthpickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],\r
-    MonthpickerFunctionAttributes: ['disableDates', 'onSelectClose']\r
-})\r
-\r
-.factory('b2bMonthpickerService', ['b2bMonthpickerConfig', 'dateFilter', function (b2bMonthpickerConfig, dateFilter) {\r
-    var setAttributes = function (attr, elem) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {\r
-            var attributes = b2bMonthpickerConfig.MonthpickerEvalAttributes.concat(b2bMonthpickerConfig.MonthpickerWatchAttributes, b2bMonthpickerConfig.MonthpickerFunctionAttributes);\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    elem.attr(key.toSnakeCase(), key);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    var bindScope = function (attr, scope) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {\r
-            var evalFunction = function (key, val) {\r
-                scope[key] = scope.$parent.$eval(val);\r
-            };\r
-\r
-            var watchFunction = function (key, val) {\r
-                scope.$parent.$watch(val, function (value) {\r
-                    scope[key] = value;\r
-                });\r
-                scope.$watch(key, function (value) {\r
-                    scope.$parent[val] = value;\r
-                });\r
-            };\r
-\r
-            var evalAttributes = b2bMonthpickerConfig.MonthpickerEvalAttributes;\r
-            var watchAttributes = b2bMonthpickerConfig.MonthpickerWatchAttributes;\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    evalFunction(key, val);\r
-                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    watchFunction(key, val);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return {\r
-        setAttributes: setAttributes,\r
-        bindScope: bindScope\r
-    };\r
-}])\r
-\r
-.controller('b2bMonthpickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bMonthpickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {\r
-    var format = {\r
-            date: getValue($attrs.dateFormat, dtConfig.dateFormat),\r
-            day: getValue($attrs.dayFormat, dtConfig.dayFormat),\r
-            month: getValue($attrs.monthFormat, dtConfig.monthFormat),\r
-            year: getValue($attrs.yearFormat, dtConfig.yearFormat),\r
-            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),\r
-            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),\r
-            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),\r
-            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),\r
-            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)\r
-        },\r
-        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);\r
-\r
-    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;\r
-    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;\r
-    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;\r
-    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;\r
-    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;\r
-    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;\r
-    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;\r
-    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);\r
-    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);\r
-    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);\r
-    $scope.mode = getValue($attrs.mode, dtConfig.mode);\r
-    \r
-    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;\r
-\r
-    function getValue(value, defaultValue) {\r
-        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;\r
-    }\r
-\r
-    function getDaysInMonth(year, month) {\r
-        return new Date(year, month, 0).getDate();\r
-    }\r
-\r
-    function getDates(startDate, n) {\r
-        var dates = new Array(n);\r
-        var current = startDate,\r
-            i = 0;\r
-        while (i < n) {\r
-            dates[i++] = new Date(current);\r
-            current.setDate(current.getDate() + 1);\r
-        }\r
-        return dates;\r
-    }\r
-\r
-    this.updatePosition = function (b2bMonthpickerPopupTemplate) {\r
-        $scope.position = $position.offset($element);\r
-        if($element.find('input').length > 0 ){\r
-            $scope.position.top += $element.find('input').prop('offsetHeight');\r
-        }else{\r
-            $scope.position.top += $element.find('a').prop('offsetHeight');\r
-        }\r
-        \r
-        if ($scope.orientation === 'right') {\r
-            $scope.position.left -= (((b2bMonthpickerPopupTemplate && b2bMonthpickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));\r
-        }\r
-    };\r
-\r
-    function isSelected(dt) { \r
-        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isFromDate(dt) {\r
-        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDateRange(dt) {\r
-        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {\r
-            return true;\r
-        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isOld(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isNew(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isPastDue(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt > $scope.dueDate);\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDueDate(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt.getTime() === $scope.dueDate.getTime());\r
-        }\r
-        return false;\r
-    }\r
-\r
-    var isDisabled = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };\r
-    \r
-    var isDisabledMonth = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };    \r
-         \r
-    var compare = function (date1, date2) {\r
-        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));\r
-    };\r
-\r
-    function isMinDateAvailable(startDate, endDate) {\r
-        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-    }\r
-    \r
-    function isMaxDateAvailable(startDate, endDate) {\r
-        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-    }    \r
-    \r
-    function isYearInRange(currentYear) {\r
-            \r
-        if ($scope.minDate && currentYear === $scope.minDate.getFullYear()) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-        \r
-        if ($scope.maxDate && currentYear === $scope.maxDate.getFullYear()) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-        \r
-    }    \r
-\r
-    this.focusNextPrev = function(b2bMonthpickerPopupTemplate,init){\r
-        if(init){\r
-            if (!$scope.disablePrev){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.prev').focus();\r
-            }else if (!$scope.disableNext){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.next').focus();\r
-            }else{\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();\r
-            }\r
-        }else{\r
-            if ($scope.disableNext || $scope.disablePrev){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();\r
-            }       \r
-        }    \r
-    };\r
-\r
-    function getLabel(label) {\r
-        if (label) {\r
-            var labelObj = {\r
-                pre: label.substr(0, 1).toUpperCase(),\r
-                post: label\r
-            };\r
-            return labelObj;\r
-        }\r
-        return;\r
-    }\r
-\r
-    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {\r
-        return {\r
-            date: date,\r
-            label: dateFilter(date, dayFormat),\r
-            header: dateFilter(date, dayHeaderFormat),\r
-            selected: !!isSelected,\r
-            fromDate: !!isFromDate,\r
-            dateRange: !!isDateRange,\r
-            oldMonth: !!isOld,\r
-            nextMonth: !!isNew,\r
-            disabled: !!isDisabled,\r
-            dueDate: !!dueDate,\r
-            pastDue: !!pastDue,\r
-            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))\r
-        };\r
-    }\r
-    \r
-    this.modes = [\r
-        {\r
-            name: 'day',\r
-            getVisibleDates: function (date) {\r
-                var year = date.getFullYear(),\r
-                    month = date.getMonth(),\r
-                    firstDayOfMonth = new Date(year, month, 1),\r
-                    lastDayOfMonth = new Date(year, month + 1, 0);\r
-                var difference = startingDay - firstDayOfMonth.getDay(),\r
-                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,\r
-                    firstDate = new Date(firstDayOfMonth),\r
-                    numDates = 0;\r
-\r
-                if (numDisplayedFromPreviousMonth > 0) {\r
-                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\r
-                    numDates += numDisplayedFromPreviousMonth; // Previous\r
-                }\r
-                numDates += getDaysInMonth(year, month + 1); // Current\r
-                numDates += (7 - numDates % 7) % 7; // Next\r
-\r
-                var days = getDates(firstDate, numDates),\r
-                    labels = new Array(7);\r
-                for (var i = 0; i < numDates; i++) {\r
-                    var dt = new Date(days[i]);\r
-                    days[i] = makeDate(dt,\r
-                        format.day,\r
-                        format.dayHeader,\r
-                        isSelected(dt),\r
-                        isFromDate(dt),\r
-                        isDateRange(dt),\r
-                        isOld(dt, date),\r
-                        isNew(dt, date),\r
-                        isDisabled(dt, date),\r
-                        isDueDate(dt),\r
-                        isPastDue(dt));\r
-                }\r
-                for (var j = 0; j < 7; j++) {\r
-                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));\r
-                }\r
-                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                return {\r
-                    objects: days,\r
-                    title: dateFilter(date, format.dayTitle),\r
-                    labels: labels\r
-                };\r
-            },\r
-            split: 7,\r
-            step: {\r
-                months: 1\r
-            }\r
-        },\r
-        {\r
-            name: 'month',\r
-            getVisibleDates: function(date) {\r
-                var months = [], \r
-                    labels = [], \r
-                    year = date.getFullYear();\r
-                    for (var i = 0; i < 12; i++) {\r
-                        var dt = new Date(year,i,1);                \r
-                        months[i] = makeDate(dt,\r
-                                    format.month,\r
-                                    format.dayHeader,\r
-                                    isSelected(dt), \r
-                                    isFromDate(dt),\r
-                                    isDateRange(dt),\r
-                                    false,\r
-                                    false,\r
-                                    isDisabledMonth(dt, date),\r
-                                    isDueDate(dt),                                       \r
-                                    isPastDue(dt));                                                                                                                                                         \r
-                    }\r
-                isYearInRange(year);  \r
-                return {objects: months, title: dateFilter(date, format.year), labels: labels};\r
-            },\r
-            split:4,\r
-            step: {years: 1}\r
-        }\r
-    ];\r
-}])\r
-\r
-.directive('b2bMonthpickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile','$interval', 'trapFocusInElement', 'keymap', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, $interval,trapFocusInElement, keymap) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-          trigger: '='\r
-        },\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: function (elem, attr) {\r
-            if (attr.inline === 'true') {\r
-                return 'b2bTemplate/monthSelector/monthSelector-popup.html';\r
-            }else if (attr.link === 'true') {\r
-                return 'b2bTemplate/monthSelector/monthSelectorLink.html';\r
-            }else {\r
-                return 'b2bTemplate/monthSelector/monthSelector.html';\r
-            }\r
-        },\r
-        scope: {},\r
-        require: ['b2bMonthpickerPopup', 'ngModel', '?^b2bMonthpickerGroup'],\r
-        controller: 'b2bMonthpickerController',\r
-        link: function (scope, element, attrs, ctrls) {\r
-            var MonthpickerCtrl = ctrls[0],\r
-                ngModel = ctrls[1],\r
-                b2bMonthpickerGroupCtrl = ctrls[2];\r
-            var b2bMonthpickerPopupTemplate;\r
-\r
-            if (!ngModel) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            // Configuration parameters\r
-            var mode = scope.mode,\r
-                selected;\r
-            scope.isOpen = false;\r
-\r
-            scope.headers = [];\r
-            scope.footers = [];\r
-            scope.triggerInterval=undefined;\r
-\r
-\r
-            if (b2bMonthpickerGroupCtrl) {\r
-                b2bMonthpickerGroupCtrl.registerMonthpickerScope(scope);\r
-            }\r
-\r
-            element.bind('keydown', function (ev) {                   \r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }                                \r
-                if(ev.keyCode === keymap.KEY.ESC)\r
-                {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            });\r
-            \r
-            element.find('button').bind('click', function () {\r
-                onClicked();                \r
-            });\r
-\r
-            element.find('a').bind('click', function () {\r
-                onClicked();                \r
-            });\r
-\r
-            \r
-            element.find('input').bind('click', function () {\r
-                onClicked();\r
-            });\r
-\r
-            var onClicked = function() {        \r
-                if (!scope.ngDisabled) {\r
-                    scope.isOpen = !scope.isOpen;\r
-                    toggleCalendar(scope.isOpen);                    \r
-                    MonthpickerCtrl.updatePosition(b2bMonthpickerPopupTemplate);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-        \r
-            var toggleCalendar = function (flag) {\r
-                if (!scope.inline) {\r
-                    if (flag) {\r
-                        b2bMonthpickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/monthSelector/monthSelector-popup.html'));\r
-                        b2bMonthpickerPopupTemplate.attr('b2b-trap-focus-inside-element', 'false');\r
-                        b2bMonthpickerPopupTemplate.attr('trigger', 'true');\r
-                        b2bMonthpickerPopupTemplate = $compile(b2bMonthpickerPopupTemplate)(scope);\r
-                        $document.find('body').append(b2bMonthpickerPopupTemplate);\r
-                        b2bMonthpickerPopupTemplate.bind('keydown', escPress);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.trigger=0;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                                MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,true);\r
-                            }, 100);\r
-                        });\r
-                        scope.triggerInterval = $interval(function () {\r
-                            //This value is updated to trigger init() function of directive on year change.\r
-                            scope.trigger=(scope.trigger === 0 ? 1 : 0);\r
-                        }, 200);\r
-\r
-                    } else {\r
-                        b2bMonthpickerPopupTemplate.unbind('keydown', escPress);\r
-                        if(scope.triggerInterval)\r
-                        {\r
-                            $interval.cancel(scope.triggerInterval);\r
-                            scope.triggerInterval=undefined;\r
-                        }\r
-                        b2bMonthpickerPopupTemplate.remove();\r
-                        if(element.find('button').length > 0){\r
-                            element.find('button')[0].focus();\r
-                        }else{\r
-                            element.find('a')[0].focus();\r
-                        }\r
-                        \r
-                        scope.getFocus = false;\r
-                    }\r
-                }\r
-            };\r
-\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), element, $document);\r
-                var isb2bMonthpickerPopupTemplate = $isElement(angular.element(e.target), b2bMonthpickerPopupTemplate, $document);\r
-                if (!(isElement || isb2bMonthpickerPopupTemplate)) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            var escPress = function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (ev.keyCode === keymap.KEY.ESC) {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 33) {\r
-                        !scope.disablePrev && scope.move(-1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 34) {\r
-                        !scope.disableNext && scope.move(1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                    scope.$apply();\r
-                }\r
-            };              \r
-                    \r
-            $documentBind.click('isOpen', outsideClick, scope);\r
-\r
-            scope.$on('$destroy', function () {\r
-                if (scope.isOpen) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                }\r
-            });\r
-\r
-            scope.resetTime = function (date) {\r
-                if (typeof date === 'string') {\r
-                    date = date + 'T12:00:00';\r
-                }\r
-                var dt;\r
-                if (!isNaN(new Date(date))) {\r
-                    dt = new Date(date);\r
-                    if(scope.mode === 1){\r
-                        dt = new Date(dt.getFullYear(), dt.getMonth());\r
-                    }else{\r
-                        dt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-                    }                                                            \r
-                } else {\r
-                    return null;\r
-                }\r
-                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-            };\r
-            \r
-            if (attrs.min) {\r
-                scope.$parent.$watch($parse(attrs.min), function (value) {\r
-                    scope.minDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.max) {\r
-                scope.$parent.$watch($parse(attrs.max), function (value) {\r
-                    scope.maxDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.due) {\r
-                scope.$parent.$watch($parse(attrs.due), function (value) {\r
-                    scope.dueDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.from) {\r
-                scope.$parent.$watch($parse(attrs.from), function (value) {\r
-                    scope.fromDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-\r
-            if (attrs.legendIcon) {\r
-                scope.$parent.$watch(attrs.legendIcon, function (value) {\r
-                    scope.legendIcon = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.legendMessage) {\r
-                scope.$parent.$watch(attrs.legendMessage, function (value) {\r
-                    scope.legendMessage = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.ngDisabled) {\r
-                scope.$parent.$watch(attrs.ngDisabled, function (value) {\r
-                    scope.ngDisabled = value ? value : null;\r
-                });\r
-            }      \r
-            \r
-\r
-            // Split array into smaller arrays\r
-            function split(arr, size) {\r
-                var arrays = [];\r
-                while (arr.length > 0) {\r
-                    arrays.push(arr.splice(0, size));\r
-                }\r
-                return arrays;\r
-            }\r
-            \r
-            var moveMonth = function(selectedDate, direction) {\r
-                var step = MonthpickerCtrl.modes[scope.mode].step;\r
-                selectedDate.setDate(1);\r
-                selectedDate.setMonth(selectedDate.getMonth() + direction * (step.months || 0));\r
-                selectedDate.setFullYear(selectedDate.getFullYear() + direction * (step.years || 0));\r
-\r
-                return selectedDate;\r
-            };            \r
-\r
-            function refill(date) {\r
-                if (angular.isDate(date) && !isNaN(date)) {\r
-                    selected = new Date(date);\r
-                } else {\r
-                    if (!selected) {\r
-                        selected = new Date();\r
-                    }\r
-                }\r
-\r
-                if (selected) {                    \r
-                    var selectedCalendar;\r
-                    if(scope.mode === 1){\r
-                        if(!angular.isDate(selected))\r
-                           {                           \r
-                                selected = new Date();\r
-                           }\r
-                        selectedCalendar = moveMonth(angular.copy(selected), -1);\r
-                    } else {\r
-                        selectedCalendar = angular.copy(selected);\r
-                    }\r
-                    \r
-                    var currentMode = MonthpickerCtrl.modes[mode],\r
-                        data = currentMode.getVisibleDates(selected);\r
-\r
-                    scope.rows = split(data.objects, currentMode.split);\r
-            \r
-                    var flag=false;\r
-                    var startFlag=false;\r
-                    var firstSelected = false;\r
-                    for(var i=0; i<scope.rows.length; i++)\r
-                    {\r
-                        for(var j=0; j<scope.rows[i].length; j++)\r
-                        {\r
-                            if(!scope.rows[i][j].disabled && !firstSelected)\r
-                            {\r
-                                firstSelected=true;\r
-                                var firstDay = scope.rows[i][j];\r
-                            }\r
-\r
-                            if(scope.rows[i][j].selected)\r
-                            {\r
-                                flag=true;\r
-                                break;\r
-                            }                  \r
-                        }\r
-                        if(flag)\r
-                        {\r
-                            break;\r
-                        }\r
-                    }\r
-                    if(!flag && firstSelected)\r
-                    {\r
-                       firstDay.firstFocus=true;\r
-                    }\r
-\r
-                    scope.labels = data.labels || [];\r
-                    scope.title = data.title;                    \r
-                }\r
-            }\r
-\r
-            scope.select = function (date,$event) {\r
-                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());\r
-                scope.currentDate = dt;\r
-                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({\r
-                        date: dt\r
-                    }) !== false)) {\r
-                    if (angular.isNumber(scope.collapseWait)) {\r
-                        $timeout(function () {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }, scope.collapseWait);\r
-                    } else {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                    }\r
-                }\r
-            };\r
-\r
-            scope.move = function (direction,$event) {\r
-                var step = MonthpickerCtrl.modes[mode].step;\r
-                selected.setDate(1);\r
-                selected.setMonth(selected.getMonth() + direction * (step.months || 0));\r
-                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));\r
-                refill();\r
-                scope.getFocus = true;\r
-                $timeout(function () {\r
-                    if (attrs.inline === 'true') {\r
-                        MonthpickerCtrl.focusNextPrev(element,false); \r
-                    }else{\r
-                        MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,false);\r
-                    }\r
-                },100);\r
-                $event.preventDefault();\r
-                $event.stopPropagation();\r
-            };\r
-\r
-            scope.$watch('currentDate', function (value) {\r
-                if (angular.isDefined(value) && value !== null) {\r
-                    refill(value);\r
-                } else {\r
-                    refill();\r
-                }\r
-                ngModel.$setViewValue(value);\r
-            });\r
-\r
-            ngModel.$render = function () {\r
-                scope.currentDate = ngModel.$viewValue;\r
-            };\r
-\r
-            var stringToDate = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    value = new Date(value);\r
-                }\r
-                return value;\r
-            };\r
-            ngModel.$formatters.unshift(stringToDate);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpicker', ['$compile', '$log', 'b2bMonthpickerConfig', 'b2bMonthpickerService', function ($compile, $log, b2bMonthpickerConfig, b2bMonthpickerService) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            disableDates: '&',\r
-            onSelectClose: '&'\r
-        },\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bMonthpickerConfig.dateFormat;\r
-            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bMonthpickerConfig.helperText; \r
-            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');\r
-\r
-            var descriptionText = angular.isDefined(attr.descriptionText) ? scope.$parent.$eval(attr.descriptionText) : b2bMonthpickerConfig.descriptionText;  \r
-\r
-\r
-            var inline = false;\r
-            if (elem.prop('nodeName') !== 'INPUT' && elem.prop('nodeName') !== 'A') {\r
-                inline = true;\r
-            }\r
-\r
-            var selectedDateMessage = "";\r
-            \r
-            if (elem.prop('nodeName') !== 'A'){\r
-                selectedDateMessage = '<button type="button" class="span12 faux-input" ng-disabled="ngDisabled" aria-describedby="monthpicker-description'+scope.$id+'"><span class="hidden-spoken" aria-live="assertive" aria-atomic="false">' + helperText + '</span></button>';    \r
-                elem.attr('tabindex', '-1'); \r
-                elem.attr('aria-hidden', 'true');  \r
-                elem.attr('readonly', 'true'); \r
-            }else{\r
-                selectedDateMessage = ''\r
-                elem.attr('aria-label', helperText);\r
-            }\r
-            \r
-            var descriptionTextSpan = '<span class="offscreen-text" id="monthpicker-description'+scope.$id+'">'+descriptionText+'</span>';\r
-            elem.removeAttr('b2b-Monthpicker');\r
-            elem.removeAttr('ng-model');\r
-            elem.removeAttr('ng-disabled');\r
-            elem.addClass('Monthpicker-input');\r
-            elem.attr('ng-model', 'dt');\r
-            elem.attr('aria-describedby', 'monthpicker-description'+scope.$id);\r
-            \r
-            \r
-            \r
-            elem.attr('ng-disabled', 'ngDisabled');\r
-            elem.attr('b2b-format-date', dateFormatString);\r
-\r
-            var wrapperElement = angular.element('<div></div>');\r
-            wrapperElement.attr('b2b-Monthpicker-popup', '');\r
-            wrapperElement.attr('ng-model', 'dt');\r
-            if (inline) {\r
-                wrapperElement.attr('inline', inline);\r
-            }\r
-            if (elem.prop('nodeName') === 'A'){\r
-                wrapperElement.attr('link', true);\r
-            }\r
-            b2bMonthpickerService.setAttributes(attr, wrapperElement);\r
-            b2bMonthpickerService.bindScope(attr, scope);\r
-\r
-            wrapperElement.html('');\r
-            wrapperElement.append(selectedDateMessage);\r
-            wrapperElement.append('');\r
-            wrapperElement.append(descriptionTextSpan);\r
-            wrapperElement.append('');\r
-            wrapperElement.append(elem.prop('outerHTML'));\r
-\r
-            var elm = wrapperElement.prop('outerHTML');\r
-            elm = $compile(elm)(scope);\r
-            elem.replaceWith(elm);\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            if (!ctrl) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-            \r
-            scope.$watch('dt', function (value) {\r
-                ctrl.$setViewValue(value);\r
-            });\r
-            ctrl.$render = function () {\r
-                scope.dt = ctrl.$viewValue;\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerGroup', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            this.$$headers = [];\r
-            this.$$footers = [];\r
-            this.registerMonthpickerScope = function (MonthpickerScope) {\r
-                MonthpickerScope.headers = this.$$headers;\r
-                MonthpickerScope.footers = this.$$footers;\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {}\r
-    };\r
-}])\r
-\r
-.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var b2bFormatDate = "";\r
-            attr.$observe('b2bFormatDate', function (value) {\r
-                b2bFormatDate = value;\r
-            });\r
-            var dateToString = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    return dateFilter(new Date(value), b2bFormatDate);\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$formatters.unshift(dateToString);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerHeader', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bMonthpickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$headers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerFooter', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bMonthpickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$footers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:multiLevelNavigation\r
- *\r
- * @description\r
- *  <file src="src/multiLevelNavigation/docs/readme.md" />\r
- *\r
- * @usage\r
- *       <div class="b2b-ml-nav">\r
- *          <ul role="tree">\r
- *             <li aria-label="{{child.name}}" tabindex="-1" b2b-ml-nav="{{child.type}}" role="treeitem" ng-repeat="child in treeStructure">\r
- *                  <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>\r
- *                      <!-- Below UL tag is RECURSIVE to generate n-childs -->\r
- *                      <ul role="group" ng-if="child.child">\r
- *                          <li aria-label="{{child.name}}" b2b-ml-nav="{{child.type}}" tabindex="-1" role="treeitem" ng-repeat="child in child.child">\r
- *                          <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>\r
- *                               <!-- RECURSIVE UL tag goes here -->\r
- *                          </li>\r
- *                      </ul>\r
- *             </li>\r
- *           </ul>\r
- *        </div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/multiLevelNavigation/docs/demo.html" />\r
-            <file src="src/multiLevelNavigation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.multiLevelNavigation', ['b2b.att.utilities'])\r
-    //directive b2bMlNav Test coverage 100% on 5/13\r
-    .directive('b2bMlNav', ['keymap', function (keymap) {\r
-        return {\r
-            restrict: 'EA',\r
-            link: function (scope, element) {\r
-                var rootE, parentE, upE, downE, lastE, homeE, endE;\r
-                //default root tree element tabindex set zero\r
-                if (element.parent().parent().hasClass('b2b-ml-nav') && (element[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                //check root via class\r
-                var isRoot = function (elem) {\r
-                        if (elem.parent().parent().eq(0).hasClass('b2b-ml-nav')) {\r
-                            return true;\r
-                        } else {\r
-                            return false;\r
-                        }\r
-\r
-                    }\r
-                    //for any expandable tree item on click\r
-                var toggleState = function (e) {\r
-                    if (angular.element(e.target).attr("b2b-ml-nav") !== "endNode") {\r
-                        var eLink = element.find('a').eq(0);\r
-                        if (eLink.hasClass('active')) {\r
-                            eLink.removeClass('active');\r
-                            eLink.parent().attr("aria-expanded", "false");\r
-                            eLink.find('i').eq(0).removeClass('icon-primary-expanded');\r
-                            eLink.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                        } else {\r
-                            eLink.addClass('active');\r
-                            eLink.parent().attr("aria-expanded", "true");\r
-                            eLink.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            eLink.find('i').eq(0).addClass('icon-primary-expanded');\r
-                        }\r
-                    }\r
-                };\r
-                //function finds the main root-item from particular tree-group\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem.attr("b2b-ml-nav") === "middleNode" || elem.attr("b2b-ml-nav") === "endNode") {\r
-                        parentE = elem.parent().parent();\r
-                    } else {\r
-                        parentE = elem;\r
-                    }\r
-                    if (parentE.attr("b2b-ml-nav") === "rootNode") {\r
-                        rootE = parentE;\r
-                    } else {\r
-                        findRoot(parentE);\r
-                    }\r
-                };\r
-                //finds the last visible node of the previous tree-group\r
-                var findPreActive = function (elem) {\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.attr("b2b-ml-nav") === "middleNode" && lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-                //find above visible link\r
-                var findUp = function (elem) {\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                    if (isRoot(elem) || (upE.attr('b2b-ml-nav') === "middleNode" && upE[0] !== elem.parent().parent()[0])) {\r
-                        findPreActive(upE.find('a').eq(0)); \r
-                    }\r
-                };\r
-                //find below visible link\r
-                var findDown = function (elem) {\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                    } else {\r
-                        if (elem.parent().next().length !== 0) {\r
-                            downE = elem.parent().next().eq(0);\r
-                        } else {\r
-                            if (elem.parent().parent().parent().next().length !== 0) {\r
-                                downE = elem.parent().parent().parent().next().eq(0);\r
-                                return;\r
-                            }\r
-                            downE = elem.parent().eq(0);\r
-                        }\r
-                    }\r
-                };\r
-                //finds last root-group element of the tree\r
-                var findEnd = function (elem) {\r
-                    findRoot(elem);\r
-                    endE = angular.element(rootE.parent()[0].children[rootE.parent()[0].children.length - 1]);\r
-                };\r
-                //finds first root element of tree\r
-                var findHome = function (elem) {\r
-                    findRoot(elem);\r
-                    homeE = angular.element(rootE.parent()[0].children[0]);\r
-                };\r
-                element.bind('click', function (e) {\r
-                    if(element.attr("b2b-ml-nav") !== "endNode") { \r
-                        toggleState(e); \r
-                    }\r
-                    e.stopPropagation();\r
-                });\r
-                element.bind('focus', function (e) {\r
-                    if(element.attr("b2b-ml-nav") !== "endNode") {\r
-                        if(element.find('a').eq(0).hasClass('active')) {\r
-                            element.attr("aria-expanded", true);\r
-                        }\r
-                        else {\r
-                            element.attr("aria-expanded", false);\r
-                        }\r
-                        \r
-                    }\r
-                })\r
-                //Keyboard functionality approach:\r
-                //find keycode\r
-                //set set tabindex -1 on the current focus element\r
-                //find the next element to be focussed, set tabindex 0 and throw focus\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.ENTER:\r
-                    case keymap.KEY.SPACE:\r
-                        element.triggerHandler('click');\r
-                        evt.stopPropagation();\r
-                        evt.preventDefault();\r
-                        break;\r
-                    case keymap.KEY.END:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findEnd(element);\r
-                        endE.eq(0).attr('tabindex', 0);\r
-                        endE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findHome(element);\r
-                        homeE.eq(0).attr('tabindex', 0);\r
-                        homeE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        if (!isRoot(element)) {\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.eq(0).attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                            parentE.eq(0).triggerHandler('click');\r
-                        } else {\r
-                            if (element.find('a').eq(0).hasClass('active')) {\r
-                                element.triggerHandler('click');\r
-                            }\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        if (!(isRoot(element) && element[0].previousElementSibling === null)) {\r
-                            element.attr('tabindex', -1);\r
-                            findUp(element);\r
-                            upE.eq(0).attr('tabindex', 0);\r
-                            upE[0].focus();\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        if (element.attr("b2b-ml-nav") !== "endNode") {\r
-                            if (!element.find('a').eq(0).hasClass('active')) {\r
-                                element.triggerHandler('click');\r
-                            }\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        if (!(element.attr("b2b-ml-nav") === "middleNode" && element.find('a').eq(0).hasClass('active')) && (element.next().length === 0)) {\r
-                            if(element.parent().parent().attr("b2b-ml-nav") !== "rootNode" && element.parent().parent()[0].nextElementSibling !== null)\r
-                            {\r
-                                findDown(element.find('a').eq(0));\r
-                                downE.eq(0).attr('tabindex', 0);\r
-                                downE[0].focus();\r
-                                evt.stopPropagation();\r
-                                break;\r
-                            }\r
-                            findRoot(element);\r
-                            if (!(rootE.next().length === 0)) {\r
-                                rootE.next().eq(0).attr('tabindex', 0);\r
-                                rootE.next()[0].focus();\r
-                            } else {\r
-                                rootE.eq(0).attr('tabindex', 0);\r
-                                rootE[0].focus();\r
-                            }\r
-                            evt.stopPropagation();\r
-                            break;\r
-                        }\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:multipurposeExpander\r
- *\r
- * @description\r
- *  <file src="src/multipurposeExpander/docs/readme.md" />\r
- *\r
- * @usage\r
- * <!--With Close Other -->\r
- * <b2b-expander-group close-others="true">\r
- *  <b2b-expanders class="mpc-expanders" is-open="testmpc">            \r
- *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc, 'b2b-toggle-header-inactive': testmpc } ">Heading content goes here</b2b-expander-heading>               \r
- *      <b2b-expander-body>\r
-            <p>body content goes here</p>\r
-        </b2b-expander-body>\r
- *  </b2b-expanders>\r
- *  </b2b-expander-group>\r
- *  \r
- * <!-- Without Close Other -->\r
- *  <b2b-expanders class="mpc-expanders" is-open="testmpc2">            \r
- *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc2, 'b2b-toggle-header-inactive': testmpc2 } ">Heading content goes here</b2b-expander-heading>               \r
- *      <b2b-expander-body>\r
-            <p>body content goes here</p>\r
-        </b2b-expander-body>\r
- *  </b2b-expanders>\r
- *  \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att.multipurposeExpander">\r
-            <file src="src/multipurposeExpander/docs/demo.html" />\r
-            <file src="src/multipurposeExpander/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.multipurposeExpander', ['b2b.att', 'b2b.att.collapse'])\r
-.directive('b2bExpanderGroup', function () {\r
-    return {\r
-        restrict: 'EA',\r
-        transclude: true,\r
-        template: "<ng-transclude></ng-transclude>",\r
-        controller:['$scope','$attrs', function($scope,$attrs){\r
-            this.groups = [];\r
-            this.index = -1;            \r
-            this.scope = $scope;\r
-            \r
-            this.addGroup = function (groupScope) {\r
-                var that = this;\r
-                groupScope.index = this.groups.length;\r
-                this.groups.push(groupScope);\r
-                if(this.groups.length > 0){\r
-                    this.index = 0;\r
-                }\r
-                groupScope.$on('$destroy', function () {\r
-                that.removeGroup(groupScope);\r
-            });\r
-            };\r
-\r
-            this.closeOthers = function (openGroup) {\r
-                var closeOthers = angular.isDefined($attrs.closeOthers);\r
-                if (closeOthers && !$scope.forceExpand) {\r
-                    angular.forEach(this.groups, function (group) {\r
-                        if (group !== openGroup) {\r
-                            group.isOpen = false;\r
-                        }\r
-                    });\r
-                }\r
-                if (this.groups.indexOf(openGroup) === (this.groups.length - 1) && $scope.forceExpand) {\r
-                    $scope.forceExpand = false;\r
-                }\r
-            };\r
-            this.removeGroup = function (group) {\r
-            var index = this.groups.indexOf(group);\r
-            if (index !== -1) {\r
-                this.groups.splice(this.groups.indexOf(group), 1);\r
-            }\r
-        };\r
-        }]\r
-       \r
-    };\r
-    \r
-})\r
-.directive('b2bExpanders', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        replace: true,\r
-        require:['b2bExpanders','?^b2bExpanderGroup'],\r
-        transclude: true,\r
-        scope:{isOpen:'=?'},\r
-        template: "<div ng-transclude></div>",\r
-        controller: ['$scope', function ($scope){\r
-                var bodyScope = null;\r
-                var expanderScope = null;\r
-                this.isOpened = function(){                \r
-                    if($scope.isOpen)\r
-                    {\r
-                        return  true;\r
-                    }else\r
-                    {\r
-                        return false;\r
-                    }\r
-                };                \r
-                this.setScope = function (scope) {\r
-                    bodyScope = scope; \r
-                    bodyScope.isOpen = $scope.isOpen;                   \r
-                };                \r
-                this.setExpanderScope = function (scope) {\r
-                    expanderScope = scope;                                   \r
-                };\r
-                this.toggle = function () {\r
-                    $scope.isOpen = bodyScope.isOpen = !bodyScope.isOpen;                    \r
-                    return bodyScope.isOpen;\r
-                    \r
-                };\r
-                this.watchToggle = function(io){ \r
-                    bodyScope.isOpen = io;\r
-                    expanderScope.updateIcons(io);\r
-                };  \r
-            }],\r
-        link: function (scope, elem, attr, myCtrl)\r
-        {\r
-            //scope.isOpen = false; \r
-            if(myCtrl[1]){\r
-                myCtrl[1].addGroup(scope);\r
-            }\r
-            scope.$watch('isOpen', function(val){                               \r
-                myCtrl[0].watchToggle(scope.isOpen);\r
-                if(val && myCtrl[1]){\r
-                    myCtrl[1].closeOthers(scope);\r
-                }\r
-            });            \r
-        }\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderHeading', function () {\r
-    return{\r
-        require: "^b2bExpanders",\r
-        restrict: 'EA',\r
-        replace: true,\r
-        transclude: true,\r
-        scope: true,\r
-        template: "<div style='padding:10px 10px 10px 0 !important' ng-transclude></div>"\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderBody', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        require: "^b2bExpanders",\r
-        replace: true,\r
-        transclude: true,\r
-        scope: {},\r
-        template: "<div b2b-collapse='!isOpen' ><div ng-transclude></div></div>",\r
-        link: function (scope, elem, attr, myCtrl) {\r
-            scope.isOpen = false;\r
-            myCtrl.setScope(scope);\r
-        }\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderToggle', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        require: "^b2bExpanders",\r
-        scope: {\r
-            expandIcon: '@',\r
-            collapseIcon: '@'\r
-        },\r
-        \r
-        link: function (scope, element, attr, myCtrl)\r
-        {\r
-            myCtrl.setExpanderScope(scope);\r
-            var isOpen = myCtrl.isOpened();   \r
-\r
-            scope.setIcon = function () {\r
-                element.attr("role", "tab");\r
-\r
-                if (scope.expandIcon && scope.collapseIcon)\r
-                {\r
-                    if (isOpen) {\r
-                        element.removeClass(scope.expandIcon);\r
-                        element.addClass(scope.collapseIcon);\r
-\r
-                        element.attr("aria-expanded", "true");\r
-                    }\r
-                    else {\r
-                        element.removeClass(scope.collapseIcon);\r
-                        element.addClass(scope.expandIcon);\r
-\r
-                        element.attr("aria-expanded", "false");\r
-                    }\r
-                }                               \r
-            };\r
-            \r
-            element.bind('click', function (){\r
-                scope.toggleit();\r
-            });\r
-            scope.updateIcons = function(nStat){\r
-                isOpen = nStat;\r
-                scope.setIcon();                \r
-            };\r
-            scope.toggleit = function (){\r
-                isOpen = myCtrl.toggle();\r
-                scope.setIcon();\r
-                scope.$apply();\r
-            };                    \r
-            scope.setIcon();\r
-        }\r
-    };\r
-});\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:notesMessagesAndErrors\r
- *\r
- * @description\r
- *  <file src="src/notesMessagesAndErrors/docs/readme.md" />\r
- *\r
- * @usage\r
- *  See Demo\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/notesMessagesAndErrors/docs/demo.html" />\r
-            <file src="src/notesMessagesAndErrors/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.notesMessagesAndErrors', []);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Notification Card\r
- * \r
- * @description \r
- *  <file src="src/notificationCardTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/notificationCardTemplate/docs/demo.html" /> \r
-            <file src="src/notificationCardTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.notificationCardTemplate', [])\r
-  \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Order Confirmation Template\r
- * \r
- * @description \r
- *  <file src="src/orderConfirmationTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/orderConfirmationTemplate/docs/demo.html" /> \r
-            <file src="src/orderConfirmationTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.orderConfirmationTemplate', []);\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:pagination\r
- *\r
- * @description\r
- *  <file src="src/pagination/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <div b2b-pagination="" input-id="goto-page-2" total-pages="totalPages1" current-page="currentPage1" click-handler="customHandler" show-input="showInput"></div> \r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/pagination/docs/demo.html" />\r
-            <file src="src/pagination/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.pagination', ['b2b.att.utilities', 'ngTouch'])\r
-    .directive('b2bPagination', ['b2bUserAgent', 'keymap', '$window', '$timeout', function (b2bUserAgent, keymap, $window, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                totalPages: '=',\r
-                currentPage: '=',\r
-                showInput: '=',\r
-                clickHandler: '=?',\r
-                inputId: '='\r
-            },\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/pagination/b2b-pagination.html',\r
-            link: function (scope, elem) {\r
-                scope.isMobile = b2bUserAgent.isMobile();\r
-                scope.notMobile = b2bUserAgent.notMobile();\r
-                scope.focusedPage;\r
-                scope.meanVal = 3;\r
-                scope.$watch('totalPages', function (value) {\r
-                    if (angular.isDefined(value) && value !== null) {\r
-                        scope.pages = [];\r
-                        if (value < 1) {\r
-                            scope.totalPages = 1;\r
-                            return;\r
-                        }\r
-                        if (value <= 10) {\r
-                            for (var i = 1; i <= value; i++) {\r
-                                scope.pages.push(i);\r
-                            }\r
-                        } else if (value > 10) {\r
-                            var midVal = Math.ceil(value / 2);\r
-                            scope.pages = [midVal - 2, midVal - 1, midVal, midVal + 1, midVal + 2];\r
-                        }\r
-                        if(scope.currentPage === undefined || scope.currentPage === 1)\r
-                        {\r
-                            currentPageChanged(1);\r
-                        }\r
-                    }\r
-                });\r
-                scope.$watch('currentPage', function (value) {\r
-                    currentPageChanged(value);\r
-                    callbackHandler(value);\r
-                });\r
-                var callbackHandler = function (num) {\r
-                    if (angular.isFunction(scope.clickHandler)) {\r
-                        scope.clickHandler(num);\r
-                    }\r
-                };\r
-\r
-                function currentPageChanged(value) {\r
-                    if (angular.isDefined(value) && value !== null) {\r
-                        if (!value || value < 1) {\r
-                            value = 1;\r
-                        }\r
-                        if (value > scope.totalPages) {\r
-                            value = scope.totalPages;\r
-                        }\r
-                        if (scope.currentPage !== value) {\r
-                            scope.currentPage = value;\r
-                            callbackHandler(scope.currentPage);\r
-                        }\r
-                        if (scope.totalPages > 10) {\r
-                            var val = parseInt(value);\r
-                            if (val <= 6) {\r
-                                scope.pages = [1, 2, 3, 4, 5, 6, 7, 8];\r
-                            } else if (val > 6 && val <= scope.totalPages - 5) {\r
-                                scope.pages = [val - 1, val, val + 1];\r
-                            } else if (val >= scope.totalPages - 5) {\r
-                                scope.pages = [scope.totalPages - 7, scope.totalPages - 6, scope.totalPages - 5, scope.totalPages - 4, scope.totalPages - 3, scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];\r
-                            }\r
-                        }\r
-                        if (scope.isMobile) {\r
-                            var inWidth = $window.innerWidth;\r
-                            var viewLimit = 7;\r
-                            if (inWidth <= 400) {\r
-                                viewLimit = 7;\r
-                            } else if (inWidth > 400 && inWidth < 500) {\r
-                                viewLimit = 9;\r
-                            } else if (inWidth >= 500 && inWidth < 600) {\r
-                                viewLimit = 11;\r
-                            } else if (inWidth >= 600 && inWidth < 700) {\r
-                                viewLimit = 13;\r
-                            } else if (inWidth >= 700 && inWidth < 800) {\r
-                                viewLimit = 15;\r
-                            }\r
-\r
-                            var val = parseInt(value);\r
-\r
-                            scope.meanVal = Math.floor(viewLimit / 2);\r
-                            var lowerLimit = (val - scope.meanVal) < 1 ? 1 : val - scope.meanVal;\r
-                            var upperLimit = (lowerLimit + viewLimit - 1) > scope.totalPages ? scope.totalPages : lowerLimit + viewLimit - 1;\r
-                            scope.pages = [];\r
-                            for (var i = lowerLimit; i <= upperLimit; i++) {\r
-                                scope.pages.push(i);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-                scope.gotoKeyClick = function (keyEvent) {\r
-                  if (keyEvent.which === keymap.KEY.ENTER) {\r
-                    scope.gotoBtnClick()\r
-                  }\r
-                }\r
-                scope.gotoBtnClick = function () {\r
-                    currentPageChanged(parseInt(scope.gotoPage)); \r
-                    callbackHandler(scope.currentPage);\r
-                    var qResult = elem[0].querySelector('button');\r
-                    angular.element(qResult).attr('disabled','true');\r
-                    $timeout(function(){\r
-                        elem[0].querySelector('.b2b-pager__item--active').focus();\r
-                    }, 50); \r
-                    scope.gotoPage = null;               \r
-                }\r
-                scope.onfocusIn = function(evt)\r
-                {\r
-                    var qResult = elem[0].querySelector('button');\r
-                    angular.element(qResult).removeAttr('disabled');\r
-                }\r
-                scope.onfocusOut = function(evt)\r
-                {\r
-                    if(evt.target.value === "")\r
-                    {\r
-                        var qResult = elem[0].querySelector('button');\r
-                        angular.element(qResult).attr('disabled','true');\r
-                    }                    \r
-                }\r
-                scope.next = function (event) {\r
-                    if (event != undefined) {\r
-                        event.preventDefault();\r
-                    }\r
-                    if (scope.currentPage < scope.totalPages) {\r
-                        scope.currentPage += 1;\r
-                        callbackHandler(scope.currentPage);\r
-                    }\r
-                };\r
-                scope.prev = function (event) {\r
-                    if (event != undefined) {\r
-                        event.preventDefault();\r
-                    }\r
-                    if (scope.currentPage > 1) {\r
-                        scope.currentPage -= 1;\r
-                        callbackHandler(scope.currentPage);\r
-                    }\r
-                };\r
-                scope.selectPage = function (value, event) {\r
-                    event.preventDefault();\r
-                    scope.currentPage = value;\r
-                    scope.focusedPage = value;\r
-                    callbackHandler(scope.currentPage);\r
-                };\r
-                scope.checkSelectedPage = function (value) {\r
-                    if (scope.currentPage === value) {\r
-                        return true;\r
-                    }\r
-                    return false;\r
-                };\r
-                scope.isFocused = function (page) {\r
-                    return scope.focusedPage === page;\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:paneSelector\r
- *\r
- * @description\r
- *  <file src="src/paneSelector/docs/readme.md" />\r
- *\r
- * @usage\r
- *  Please refer demo.html tab in Example section below.\r
- *\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/paneSelector/docs/demo.html" />\r
-            <file src="src/paneSelector/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.paneSelector', ['b2b.att.tabs', 'b2b.att.utilities'])\r
-\r
-.filter('paneSelectorSelectedItemsFilter', [function () {\r
-    return function (listOfItemsArray) {\r
-\r
-        if (!listOfItemsArray) {\r
-            listOfItemsArray = [];\r
-        }\r
-\r
-        var returnArray = [];\r
-\r
-        for (var i = 0; i < listOfItemsArray.length; i++) {\r
-            if (listOfItemsArray[i].isSelected) {\r
-                returnArray.push(listOfItemsArray[i]);\r
-            }\r
-        }\r
-\r
-        return returnArray;\r
-    };\r
-}])\r
-\r
-.filter('paneSelectorFetchChildItemsFilter', [function () {\r
-    return function (listOfItemsArray) {\r
-\r
-        if (!listOfItemsArray) {\r
-            listOfItemsArray = [];\r
-        }\r
-\r
-        var returnArray = [];\r
-\r
-        for (var i = 0; i < listOfItemsArray.length; i++) {\r
-            for (var j = 0; j < listOfItemsArray[i].childItems.length; j++) {\r
-                returnArray.push(listOfItemsArray[i].childItems[j]);\r
-            }\r
-        }\r
-\r
-        return returnArray;\r
-    };\r
-}])\r
-\r
-.directive('b2bPaneSelector', [function () {\r
-    return {\r
-        restrict: 'AE',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/paneSelector/paneSelector.html',\r
-        transclude: true,\r
-        scope: {}\r
-    };\r
-}])\r
-\r
-.directive('b2bPaneSelectorPane', [ function () {\r
-    return {\r
-        restrict: 'AE',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/paneSelector/paneSelectorPane.html',\r
-        transclude: true,\r
-        scope: {}\r
-    };\r
-}])\r
-\r
-.directive('b2bTabVertical', ['$timeout', 'keymap', function ($timeout, keymap) {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bTab',\r
-        link: function (scope, element, attr, b2bTabCtrl) {\r
-\r
-            if (!b2bTabCtrl) {\r
-                return;\r
-            }\r
-\r
-            // retreive the isolateScope\r
-            var iScope = angular.element(element).isolateScope();\r
-\r
-            $timeout(function () {\r
-                angular.element(element[0].querySelector('a')).unbind('keydown');\r
-                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {\r
-\r
-                    if (!(evt.keyCode)) {\r
-                        evt.keyCode = evt.which;\r
-                    }\r
-\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            evt.preventDefault();\r
-                            iScope.nextKey();\r
-                            break;\r
-\r
-                        case keymap.KEY.UP:\r
-                            evt.preventDefault();\r
-                            iScope.previousKey();\r
-                            break;\r
-\r
-                        default:;\r
-                    }\r
-                });\r
-            });\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:phoneNumberInput\r
- *\r
- * @description\r
- *  <file src="src/phoneNumberInput/docs/readme.md" />\r
- *\r
- * @usage\r
-<form name="userForm1">\r
-    <div class="form-row" ng-class="{'error':!userForm1.text.$valid && userForm1.text.$dirty}">\r
-        <label>Phone Mask<span style="color:red">*</span>: (npa) nxx-line &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Model Value: {{mask.text}}</label>\r
-        <div>\r
-            <input b2b-phone-mask="phoneMask" name="text" ng-model="mask.text" type="text" placeholder="e.g. (123) 456-7890" title="Phone Number" class="b2b-phone-mask-input" required />\r
-            <div ng-messages="userForm1.text.$error" class="error-msg" aria-live="polite" aria-atomic="true">\r
-                <span ng-message="required" role="alert">This field is mandatory!</span>\r
-                <span ng-message="invalidPhoneNumber" role="alert">Please enter valid phone number!</span>\r
-                <span ng-message="mask" role="alert">Please enter valid phone number!</span>\r
-            </div>\r
-        </div>\r
-    </div>\r
-</form>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/phoneNumberInput/docs/demo.html" />\r
-            <file src="src/phoneNumberInput/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.phoneNumberInput', ['ngMessages', 'b2b.att.utilities'])\r
-    .constant("CoreFormsUiConfig", {\r
-        phoneMask: '(___) ___-____',\r
-        phoneMaskDot: '___.___.____',\r
-        phoneMaskHyphen: '___-___-____'\r
-    })\r
-    .directive('b2bPhoneMask', ['$parse', 'CoreFormsUiConfig', 'keymap', function ($parse, CoreFormsUiConfig, keymap) {\r
-        return {\r
-            require: 'ngModel',\r
-            scope: {\r
-                ngModel: '='\r
-            },\r
-            link: function (scope, iElement, iAttrs, ctrl) {\r
-                var navigatorAgent = navigator.userAgent.toLowerCase(),\r
-                    isAndroid = navigatorAgent.indexOf("android") > -1,\r
-                    oldIE = navigatorAgent.indexOf('msie 8.0') !== -1;\r
-                var mask = '';\r
-                var validPhoneNumber = false;\r
-                var currentKey = '';\r
-                if (isAndroid) {\r
-                    mask = "__________";\r
-                } else {\r
-                    switch (iAttrs.b2bPhoneMask) {\r
-                    case "phoneMask":\r
-                        mask = CoreFormsUiConfig.phoneMask;\r
-                        break;\r
-                    case "phoneMaskDot":\r
-                        mask = CoreFormsUiConfig.phoneMaskDot;\r
-                        break;\r
-                    case "phoneMaskHyphen":\r
-                        mask = CoreFormsUiConfig.phoneMaskHyphen;\r
-                        break;\r
-                    default:\r
-                        mask = CoreFormsUiConfig.phoneMask;\r
-                    }\r
-                }\r
-                iElement.attr("maxlength", mask.length);\r
-                var checkValidity = function (unmaskedValue, rawValue) {\r
-                    var valid = false;\r
-                    if (angular.isUndefined(rawValue) || rawValue === '') {\r
-                        valid = true;\r
-                    } else if (unmaskedValue) {\r
-                        valid = (unmaskedValue.length === 10);\r
-                    }\r
-                    ctrl.$setValidity('invalidPhoneNumber', validPhoneNumber);\r
-                    ctrl.$setValidity('mask', valid);\r
-                    return valid;\r
-                };\r
-                var handleKeyup = function (evt) {\r
-\r
-                    if (evt && evt.keyCode === keymap.KEY.SHIFT) {\r
-                        return;\r
-                    }\r
-\r
-                    var index, formattedNumber;\r
-                    if (ctrl.$modelValue) {\r
-                        formattedNumber = ctrl.$modelValue;\r
-                    } else {\r
-                        formattedNumber = iElement.val();\r
-                    }\r
-                    if (!formattedNumber.length && currentKey === '') {\r
-                        return;\r
-                    }\r
-                    var maskLength, inputNumbers, maskArray, tempArray, maskArrayLength;\r
-                    tempArray = [];\r
-                    maskArray = mask.split("");\r
-                    maskArrayLength = maskArray.length;\r
-                    maskLength = formattedNumber.substring(0, mask.length);\r
-                    inputNumbers = formattedNumber.replace(/[^0-9]/g, "").split("");\r
-                    for (index = 0; index < maskArrayLength; index++) {\r
-                        tempArray.push(maskArray[index] === "_" ? inputNumbers.shift() : maskArray[index]);\r
-                        if (inputNumbers.length === 0) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    formattedNumber = tempArray.join("");\r
-                    if (formattedNumber === '(') {\r
-                        formattedNumber = '';\r
-                    }\r
-\r
-                    if ( (angular.isDefined(evt) && evt.which) && currentKey !== '') {\r
-                        if (maskArray[0] === currentKey && formattedNumber === '') {\r
-                            formattedNumber = '(';\r
-                        } else if (evt.which === keymap.KEY.SPACE && currentKey === ' ') {\r
-                            formattedNumber = formattedNumber + ') ';\r
-                        } else if (maskArray[0] === currentKey && formattedNumber === '') {\r
-                            formattedNumber = formattedNumber + currentKey;\r
-                        } else if (maskArray[formattedNumber.length] === currentKey) {\r
-                            formattedNumber = formattedNumber + currentKey;\r
-                        }\r
-                        currentKey = '';\r
-                    }\r
-\r
-                    ctrl.$setViewValue(formattedNumber);\r
-                    ctrl.$render();\r
-                    return formattedNumber;\r
-                };\r
-\r
-\r
-                // since we are only allowing 0-9, why even let the keypress go forward?\r
-                // also added in delete... in case they want to delete :)\r
-                var handlePress = function (e) {\r
-                    if (e.which) {\r
-                        if ((e.which < 48 || e.which > 57) && (e.which < 96 || e.which > 105)) {\r
-                            if (e.which !== keymap.KEY.BACKSPACE && e.which !== keymap.KEY.TAB && e.which !== keymap.KEY.DELETE && e.which !== keymap.KEY.ENTER && e.which !== keymap.KEY.LEFT && e.which !== keymap.KEY.RIGHT &&\r
-                                // Allow: Ctrl+V/v\r
-                                (!(e.ctrlKey) && (e.which !== '118' || e.which !== '86')) &&\r
-                                // Allow: Ctrl+C/c\r
-                                (!(e.ctrlKey) && (e.which !== '99' || e.which !== '67')) &&\r
-                                // Allow: Ctrl+X/x\r
-                                (!(e.ctrlKey) && (e.which !== '120' || e.which !== '88'))) {\r
-                                e.preventDefault ? e.preventDefault() : e.returnValue = false;\r
-                                iElement.attr("aria-label", "Only numbers are allowed");\r
-                                validPhoneNumber = false;\r
-                            }\r
-                        } else {\r
-                            iElement.removeAttr("aria-label");\r
-                            validPhoneNumber = true;\r
-                        }\r
-\r
-                        setCurrentKey(e);\r
-                    }\r
-                    scope.$apply();\r
-                };\r
-                // i moved this out because i thought i might need focus as well..\r
-                // to handle setting the model as the view changes\r
-                var parser = function (fromViewValue) {\r
-                    var letters = /^[A-Za-z]+$/;\r
-                    var numbers = /^[0-9]+$/;\r
-                    if (angular.isUndefined(fromViewValue) || fromViewValue === '') {\r
-                        validPhoneNumber = true;\r
-                    } else {\r
-                        if (fromViewValue.match(letters)) {\r
-                            validPhoneNumber = false;\r
-                        }\r
-                        if (fromViewValue.match(numbers)) {\r
-                            validPhoneNumber = true;\r
-                        }\r
-                    }\r
-                    var clean = "";\r
-                    if (fromViewValue && fromViewValue.length > 0) {\r
-                        clean = fromViewValue.replace(/[^0-9]/g, '');\r
-                    }\r
-                    checkValidity(clean, fromViewValue);\r
-                    return clean;\r
-                };\r
-\r
-                //to handle reading the model and formatting it\r
-                var formatter = function (fromModelView) {\r
-                    var input = '';\r
-                    checkValidity(fromModelView);\r
-                    if (fromModelView) {\r
-                        input = handleKeyup();\r
-                    }\r
-                    return input;\r
-                };\r
-\r
-                var setCurrentKey = function (e) {\r
-                    switch (e.which) {\r
-                    case 189:\r
-                    case 109:\r
-                        currentKey = '-';\r
-                        break;\r
-                    case 190:\r
-                    case 110:\r
-                        currentKey = '.';\r
-                        break;\r
-                    case 57:\r
-                        if (e.shiftKey === true) {\r
-                            currentKey = '(';\r
-                        }\r
-                        break;\r
-                    case 48:\r
-                        if (e.shiftKey === true) {\r
-                            currentKey = ')';\r
-                        }\r
-                        break;\r
-                    case 32:\r
-                        currentKey = ' ';\r
-                        break;\r
-                    }\r
-                };\r
-\r
-                if (angular.isDefined(scope.ngModel)) {\r
-                    parser(scope.ngModel);\r
-                }\r
-\r
-                ctrl.$parsers.push(parser);\r
-                ctrl.$formatters.push(formatter);\r
-                iElement.bind('keyup', handleKeyup);\r
-                iElement.bind('keydown', handlePress);\r
-            }\r
-        };\r
-}]);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Profile Blocks \r
- * \r
- * @description \r
- *  <file src="src/profileBlockTemplate/docs/readme.md" /> \r
- * @example \r
- *  <section id="code">  \r
-        <example module="b2b.att"> \r
-            <file src="src/profileBlockTemplate/docs/demo.html" /> \r
-            <file src="src/profileBlockTemplate/docs/demo.js" /> \r
-       </example>  \r
-    </section>  \r
- *  \r
- */   \r
-\r
-angular.module('b2b.att.profileBlockTemplate', [])\r
-    \r
-     \r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:profileCard\r
- *\r
- * @description\r
- *  <file src="src/profileCard/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-profile-card></b2b-profile-card>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <example module="b2b.att">\r
-            <file src="src/profileCard/docs/demo.html" />\r
-            <file src="src/profileCard/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.profileCard', ['b2b.att'])\r
-.constant('profileStatus',{\r
-    status: {\r
-        ACTIVE: {\r
-            status: "Active",\r
-            color: "green"\r
-        },\r
-        DEACTIVATED: {\r
-            status: "Deactivated",\r
-            color: "red"\r
-        },\r
-        LOCKED: {\r
-            status: "Locked",\r
-            color: "red"\r
-        },\r
-        IDLE: {\r
-            status: "Idle",\r
-            color: "yellow"\r
-        },\r
-        PENDING: {\r
-            status: "Pending",\r
-            color: "blue"\r
-        }\r
-    },\r
-    role: "COMPANY ADMINISTRATOR"\r
-\r
-})\r
-.directive('b2bProfileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {\r
-   return {\r
-        restrict: 'EA',\r
-        replace: 'true',\r
-        templateUrl: function(element, attrs){\r
-            if(!attrs.addUser){\r
-                return 'b2bTemplate/profileCard/profileCard.html';\r
-            }\r
-            else{\r
-                return 'b2bTemplate/profileCard/profileCard-addUser.html';\r
-            }\r
-        },\r
-        scope: {\r
-            profile:'=',\r
-            characterLimit: '@'\r
-        },\r
-        link: function(scope, elem, attr){\r
-            scope.characterLimit = parseInt(attr.characterLimit, 10) || 25;\r
-            scope.shouldClip = function(str) {\r
-                return str.length > scope.characterLimit;\r
-            };\r
-\r
-            scope.showEmailTooltip = false;\r
-\r
-            scope.image=true;\r
-            function isImage(src) {\r
-                var deferred = $q.defer();\r
-                var image = new Image();\r
-                image.onerror = function() {\r
-                    deferred.reject(false);\r
-                };\r
-                image.onload = function() {\r
-                    deferred.resolve(true);\r
-                };\r
-                if(src !== undefined && src.length>0 ){\r
-                    image.src = src;\r
-                } else {\r
-                     deferred.reject(false);\r
-                }\r
-                return deferred.promise;\r
-            }\r
-            if(!attr.addUser){\r
-            scope.image=false;\r
-            isImage(scope.profile.img).then(function(img) {\r
-                scope.image=img;\r
-            });\r
-            var splitName=(scope.profile.name).split(' ');\r
-            scope.initials='';\r
-            for(var i=0;i<splitName.length;i++){\r
-                scope.initials += splitName[i][0];\r
-            }\r
-            if(scope.profile.role.toUpperCase() === profileStatus.role){\r
-                scope.badge=true;\r
-            }\r
-            var profileState=profileStatus.status[scope.profile.state.toUpperCase()];\r
-            if(profileState) {\r
-                scope.profile.state=profileStatus.status[scope.profile.state.toUpperCase()].status;\r
-                scope.colorIcon=profileStatus.status[scope.profile.state.toUpperCase()].color;\r
-                if(scope.profile.state.toUpperCase()===profileStatus.status.PENDING.status.toUpperCase()||scope.profile.state.toUpperCase()===profileStatus.status.LOCKED.status.toUpperCase()){\r
-                        scope.profile.lastLogin=scope.profile.state;\r
-                }\r
-            }\r
-            var today=new Date().getTime();\r
-            var lastlogin=new Date(scope.profile.lastLogin).getTime();\r
-            var diff=(today-lastlogin)/(1000*60*60*24);\r
-            if(diff<=1){\r
-                scope.profile.lastLogin="Today";\r
-            }\r
-            else if(diff<=2){\r
-                scope.profile.lastLogin="Yesterday";\r
-            }\r
-        }\r
-    }\r
-};\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:radios\r
- *\r
- * @description\r
- *  <file src="src/radios/docs/readme.md" />\r
- *\r
- * @usage\r
- *  See demo section\r
- *\r
- * @param {boolean} refreshRadioGroup - A trigger that recalculates and updates the accessibility roles on radios in a group.\r
- * \r
- * @example\r
-    <section id="code">\r
-               <b>HTML + AngularJS</b>\r
-               <example module="b2b.att">\r
-                <file src="src/radios/docs/demo.html" />\r
-                <file src="src/radios/docs/demo.js" />\r
-               </example>\r
-            </section>\r
- */\r
-angular.module('b2b.att.radios', ['b2b.att.utilities'])\r
-.directive('b2bRadioGroupAccessibility', ['$timeout', 'b2bUserAgent', function($timeout, b2bUserAgent) {\r
-    return {\r
-        restrict: "A",\r
-        scope: {\r
-            refreshRadioGroup: "=",\r
-        },\r
-        link: function(scope, ele, attr) {\r
-\r
-            var roleRadioElement, radioProductSelectElement, radioInputTypeElement;\r
-\r
-            $timeout(calculateNumberOfRadio);\r
-\r
-            scope.$watch('refreshRadioGroup', function(value) {\r
-                if (value === true) {\r
-                    addingRoleAttribute();\r
-                    $timeout(calculateNumberOfRadio);\r
-                    scope.refreshRadioGroup = false;\r
-                } else {\r
-                    return;\r
-                }\r
-            })\r
-\r
-\r
-            function calculateNumberOfRadio() {\r
-                roleRadioElement = ele[0].querySelectorAll('[role="radio"]');\r
-\r
-                radioProductSelectElement = ele[0].querySelectorAll('[role="radiogroup"] li.radio-box');\r
-\r
-                radioInputTypeElement = ele[0].querySelectorAll('input[type="radio"]');\r
-\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';\r
-                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';\r
-                    var numOfx = i + 1 + ' of ' + radioInputTypeElement.length;\r
-                    angular.element(roleRadioElement[i]).attr({\r
-                        'aria-checked': isChecked,\r
-                        'aria-disabled': isDisabled,\r
-                        'data-opNum': numOfx\r
-                    });\r
-                    if (b2bUserAgent.notMobile()) {\r
-                        angular.element(roleRadioElement[i]).removeAttr("role");\r
-                    }\r
-\r
-                    if (radioProductSelectElement.length) {\r
-                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');\r
-                    }\r
-\r
-                    if (/Android/i.test(navigator.userAgent)) {\r
-                        angular.element(roleRadioElement[i]).append('<span class="hidden-spoken">. ' + numOfx + '.</span>');\r
-                    }\r
-\r
-\r
-                    angular.element(radioInputTypeElement[i]).bind('click', radioStateChangeonClick);\r
-\r
-                }\r
-            }\r
-\r
-            function addingRoleAttribute() {\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    if (b2bUserAgent.notMobile()) {\r
-                        angular.element(roleRadioElement[i]).attr("role", "radio");\r
-                    }\r
-                }\r
-            }\r
-\r
-            function radioStateChangeonClick() {\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';\r
-                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';\r
-                    if (radioProductSelectElement.length) {\r
-                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');\r
-                    }\r
-                    angular.element(roleRadioElement[i]).attr({\r
-                        'aria-checked': isChecked,\r
-                        'aria-disabled': isDisabled\r
-                    });\r
-                }\r
-\r
-            }\r
-        }\r
-    }\r
-\r
-}]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:searchField\r
- *\r
- * @description\r
- *  <file src="src/searchField/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <div b2b-search-field dropdown-list="listdata" on-click-callback="clickFn(value)" class="span12" input-model='typedString' config-obj='keyConfigObj'></div>\r
- *\r
- * @example\r
- <section id="code">\r
-    <example module="b2b.att">\r
-    <file src="src/searchField/docs/demo.html" />\r
-    <file src="src/searchField/docs/demo.js" />\r
-    </example>\r
-</section>\r
- */\r
-\r
-angular.module('b2b.att.searchField', ['b2b.att.utilities', 'b2b.att.position'])\r
-    .filter('b2bFilterInput', [function() {\r
-        return function(list, str, keyArray, displayListKey, isContainsSearch, searchSeperator) {\r
-            var res = [];\r
-            var searchLabel;\r
-            var searchCondition;\r
-            var conditionCheck = function(searchSeperator, listItem, displayListKey, splitString) {\r
-                var displayTitle = null;\r
-                if (splitString) {\r
-                    for (var i = 0; i < displayListKey.length; i++) {\r
-                        if (i <= 0) {\r
-                            displayTitle = listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase()) > -1;\r
-                        } else {\r
-                            displayTitle = (splitString[i]) ? displayTitle && listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase().trim()) > -1 : displayTitle;\r
-                        }\r
-                    }\r
-                } else {\r
-                    angular.forEach(displayListKey, function(value) {\r
-                        if (!displayTitle) {\r
-                            displayTitle = listItem[value];\r
-                        } else {\r
-                            displayTitle = displayTitle + (listItem[value] ? searchSeperator + ' ' + listItem[value] : '');\r
-                        }\r
-                    });\r
-                }\r
-                return displayTitle;\r
-            }\r
-            angular.forEach(list, function(listItem) {\r
-                var splitString = str.indexOf(searchSeperator) > -1 ? str.split(searchSeperator) : false;\r
-                var displayList = conditionCheck(searchSeperator, listItem, displayListKey, splitString)\r
-                for (var i = 0; i < keyArray.length; i++) {\r
-                    searchLabel = keyArray[i];\r
-                    if (listItem[searchLabel]) {\r
-                        if (isContainsSearch) {\r
-                            var displaySearchList = listItem[searchLabel].toLowerCase().indexOf(str.toLowerCase()) > -1;\r
-                            if (splitString.length > 1) {\r
-                                displaySearchList = (splitString.length <= keyArray.length) ? displayList : false;\r
-                            }\r
-                            searchCondition = displaySearchList;\r
-                        } else {\r
-                            searchCondition = listItem[searchLabel].match(new RegExp('^' + str, 'gi'));\r
-                        }\r
-                        if (searchCondition) {\r
-                            res.push({\r
-                                'title': conditionCheck(searchSeperator, listItem, displayListKey),\r
-                                'valueObj': listItem\r
-                            });\r
-                            break;\r
-                        }\r
-                    }\r
-                }\r
-            });\r
-            return res;\r
-        };\r
-    }]).directive('b2bSearchField', ['$filter', 'b2bFilterInputFilter', 'keymap', '$documentBind', '$isElement', '$document', 'events', '$timeout', function($filter, b2bFilterInput, keymap, $documentBind, $isElement, $document, events, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                dataList: '=dropdownList',\r
-                onClickCallback: '&',\r
-                inputModel: '=',\r
-                configObj: '=',\r
-                objModel: '=',\r
-                inputDeny: '=?',\r
-                disabled: '=?'\r
-            },\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/searchField/searchField.html',\r
-            controller: ['$scope', function($scope) {\r
-                this.searchKeyArray = [];\r
-                if ($scope.configObj.searchKeys) {\r
-                    this.searchKeyArray = $scope.configObj.searchKeys;\r
-                }\r
-                if (angular.isUndefined($scope.disabled)) {\r
-                    $scope.disabled = false;\r
-                }\r
-                this.triggerInput = function(searchString) {\r
-                    $scope.originalInputModel = searchString;\r
-                    if (searchString === '') {\r
-                        $scope.currentIndex = -1;\r
-                        $scope.filterList = [];\r
-                        $scope.showListFlag = false;\r
-                    } else if (searchString !== '' && !$scope.isFilterEnabled) {\r
-                        $scope.filterList = $filter('b2bFilterInput')($scope.dataList, searchString, this.searchKeyArray, $scope.configObj.displayListDataKey, $scope.configObj.isContainsSearch, $scope.configObj.searchSeperator);\r
-                        $scope.showListFlag = true;\r
-                    }\r
-                };\r
-                this.denyRegex = function() {\r
-                    return $scope.inputDeny;\r
-                };\r
-            }],\r
-            link: function(scope, elem) {\r
-                scope.isFilterEnabled = false;\r
-                scope.showListFlag = false;\r
-                scope.currentIndex = -1;\r
-                scope.setCurrentIdx = function(idx) {\r
-                    scope.currentIndex = idx;\r
-                    if (idx > -1) {\r
-                        scope.inputModel = scope.filterList[idx].title;\r
-                        scope.objModel = scope.filterList[idx];\r
-                    }\r
-                };\r
-                scope.isActive = function(index, dropdownLength) {\r
-                    scope.dropdownLength = dropdownLength;\r
-                    return scope.currentIndex === index;\r
-                };\r
-                scope.selectItem = function(idx) {\r
-                    scope.setCurrentIdx(idx);\r
-                    scope.onClickCallback({\r
-                        value: scope.inputModel,\r
-                        objValue: scope.objModel\r
-                    });\r
-                    scope.showListFlag = false;\r
-                    $timeout(function() {\r
-                        elem.find('div').find('input')[0].focus();\r
-                    }, 150);\r
-                };\r
-                scope.startSearch = function() {\r
-                    scope.onClickCallback({\r
-                        value: scope.inputModel,\r
-                        objValue: scope.objModel\r
-                    });\r
-                };\r
-                scope.selectPrev = function() {\r
-                    if (scope.currentIndex > 0 && scope.filterList.length > 0) {\r
-                        scope.currentIndex = scope.currentIndex - 1;\r
-                        scope.setCurrentIdx(scope.currentIndex);\r
-                    } else if (scope.currentIndex === 0) {\r
-                        scope.currentIndex = scope.currentIndex - 1;\r
-                        scope.inputModel = scope.originalInputModel;\r
-                        scope.isFilterEnabled = true;\r
-                    }\r
-                };\r
-                scope.selectNext = function() {\r
-                    if (scope.currentIndex < scope.configObj.noOfItemsDisplay - 1) {\r
-                        if (scope.currentIndex < scope.filterList.length - 1) {\r
-                            scope.currentIndex = scope.currentIndex + 1;\r
-                            scope.setCurrentIdx(scope.currentIndex);\r
-                        }\r
-                    }\r
-                };\r
-                scope.selectCurrent = function() {\r
-                    scope.selectItem(scope.currentIndex);\r
-                };\r
-                scope.selectionIndex = function(e) {\r
-                    switch (e.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectNext();\r
-                            break;\r
-                        case keymap.KEY.UP:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectPrev();\r
-                            break;\r
-                        case keymap.KEY.ENTER:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectCurrent();\r
-                            break;\r
-                        case keymap.KEY.ESC:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = false;\r
-                            scope.showListFlag = false;\r
-                            scope.inputModel = '';\r
-                            break;\r
-                        default:\r
-                            scope.isFilterEnabled = false;\r
-                            break;\r
-                    }\r
-                    if (elem[0].querySelector('.filtercontainer')) {\r
-                        elem[0].querySelector('.filtercontainer').scrollTop = (scope.currentIndex - 1) * 35;\r
-                    }\r
-                };\r
-                scope.$watch('filterList', function(newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        scope.currentIndex = -1;\r
-                    }\r
-                });\r
-                scope.blurInput = function() {\r
-                    $timeout(function() {\r
-                        scope.showListFlag = false;\r
-                    }, 150);\r
-                };\r
-                var outsideClick = function(e) {\r
-                    var isElement = $isElement(angular.element(e.target), elem.find('ul').eq(0), $document);\r
-                    if (!isElement && document.activeElement.tagName.toLowerCase() !== 'input') {\r
-                        scope.showListFlag = false;\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-                $documentBind.click('showListFlag', outsideClick, scope);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bSearchInput', [function() {\r
-        return {\r
-            restrict: 'A',\r
-            require: ['ngModel', '^b2bSearchField'],\r
-            link: function(scope, elem, attr, ctrl) {\r
-                var ngModelCtrl = ctrl[0];\r
-                var attSearchBarCtrl = ctrl[1];\r
-                var REGEX = ctrl[1].denyRegex();\r
-                var parser = function(viewValue) {\r
-                    attSearchBarCtrl.triggerInput(viewValue);\r
-                    return viewValue;\r
-                };\r
-                ngModelCtrl.$parsers.push(parser);\r
-\r
-                if (REGEX !== undefined || REGEX !== '') {\r
-                    elem.bind('input', function() {\r
-                        var inputString = ngModelCtrl.$viewValue && ngModelCtrl.$viewValue.replace(REGEX, '');\r
-                        if (inputString !== ngModelCtrl.$viewValue) {\r
-                            ngModelCtrl.$setViewValue(inputString);\r
-                            ngModelCtrl.$render();\r
-                            scope.$apply();\r
-                        }\r
-                    });\r
-                }\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:Seek bar\r
- *\r
- * @description\r
- *  <file src="src/seekBar/docs/readme.md" />\r
- *\r
- * @usage\r
- *  Horizontal Seek Bar\r
- *  <b2b-seek-bar min="0" max="400" step="1" skip-interval="1" data-ng-model="horizontalSeekBarVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()"></b2b-seek-bar>\r
-\r
- *  Vertical Seek Bar\r
- *  <b2b-seek-bar min="0" max="1" step="0.01" skip-interval="0.1" vertical data-ng-model="verticalSeekBarVal" style=" width: 6px; height: 180px; margin: auto;"></b2b-seek-bar>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/seekBar/docs/demo.html" />\r
-            <file src="src/seekBar/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.seekBar', ['b2b.att.utilities','b2b.att.position'])\r
-        .constant('b2bSeekBarConfig', {\r
-            'min': 0,\r
-            'max': 100,\r
-            'step': 1,\r
-            'skipInterval': 1\r
-        })\r
-        .directive('b2bSeekBar', ['$documentBind', 'events', 'b2bSeekBarConfig', 'keymap', '$compile', function($documentBind, events, b2bSeekBarConfig, keymap, $compile) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    replace: true,\r
-                    require: 'ngModel',\r
-                    templateUrl: 'b2bTemplate/seekBar/seekBar.html',\r
-                    scope: {\r
-                        onDragEnd: '&?',\r
-                        onDragInit: '&?'\r
-                    },\r
-                    link: function(scope, elm, attr, ngModelCtrl) {\r
-                        scope.isDragging = false;\r
-                        scope.verticalSeekBar = false;\r
-                        var min;\r
-                        var max;\r
-                        var step = b2bSeekBarConfig.step;\r
-                        var skipInterval = b2bSeekBarConfig.skipInterval;\r
-                        var knob = angular.element(elm[0].querySelector('.b2b-seek-bar-knob-container'));\r
-                        var seekBarKnob = angular.element(knob[0].querySelector('.b2b-seek-bar-knob'));\r
-                        var trackContainer = angular.element(elm[0].querySelector('.b2b-seek-bar-track-container'));\r
-                        var trackFill = angular.element(elm[0].querySelector('.b2b-seek-bar-track-fill'));\r
-                        var trackContainerRect = {};\r
-                        var axisPosition;\r
-                        var trackFillOrderPositioning;\r
-\r
-                        if (angular.isDefined(attr.vertical)) {\r
-                            scope.verticalSeekBar = true;\r
-                            axisPosition = "clientY";\r
-                        }\r
-                        else {\r
-                            scope.verticalSeekBar = false;\r
-                            axisPosition = "clientX";\r
-                        }\r
-                        var getValidStep = function(val) {\r
-                            val = parseFloat(val);\r
-                            // in case $modelValue came in string number\r
-                            if (angular.isNumber(val)) {\r
-                                val = Math.round((val - min) / step) * step + min;\r
-                                return Math.round(val * 1000) / 1000;\r
-                            }\r
-                        };\r
-\r
-                        var getPositionToPercent = function(x) {\r
-                            if (scope.verticalSeekBar) {\r
-                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));\r
-                            }\r
-                            else {\r
-                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));\r
-                            }\r
-                        };\r
-\r
-                        var getPercentToValue = function(percent) {\r
-                            return (min + percent * (max - min));\r
-                        };\r
-\r
-                        var getValueToPercent = function(val) {\r
-                            return (val - min) / (max - min);\r
-                        };\r
-\r
-                        var getValidMinMax = function(val) {\r
-                            return Math.max(min, Math.min(max, val));\r
-                        };\r
-\r
-                        var updateTrackContainerRect = function() {\r
-                            trackContainerRect = trackContainer[0].getBoundingClientRect();\r
-                            if (scope.verticalSeekBar) {\r
-                                if (!trackContainerRect.height) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.height;\r
-                                }\r
-                            }\r
-                            else {\r
-                                if (!trackContainerRect.width) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.width;\r
-                                }\r
-\r
-                            }\r
-\r
-                        };\r
-\r
-                        var updateKnobPosition = function(percent) {\r
-                            var percentStr = (percent * 100) + '%';\r
-                            if (scope.verticalSeekBar) {\r
-                                knob.css('bottom', percentStr);\r
-                                trackFill.css('height', percentStr);\r
-                            }\r
-                            else {\r
-                                knob.css('left', percentStr);\r
-                                trackFill.css('width', percentStr);\r
-                            }\r
-                        };\r
-\r
-                        var modelRenderer = function() {\r
-                            if (isNaN(ngModelCtrl.$viewValue)) {\r
-                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;\r
-                            }\r
-\r
-                            var viewVal = ngModelCtrl.$viewValue;\r
-                            scope.currentModelValue = viewVal;\r
-\r
-                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation\r
-                            if ((min || min === 0) && max && step) {\r
-                                updateKnobPosition(getValueToPercent(viewVal));\r
-                            }\r
-                        };\r
-\r
-                        var setModelValue = function(val) {\r
-                            scope.currentModelValue = getValidMinMax(getValidStep(val));\r
-                            ngModelCtrl.$setViewValue(scope.currentModelValue);\r
-                        };\r
-\r
-                        var updateMin = function(val) {\r
-                            min = parseFloat(val);\r
-                            if(isNaN(min)){\r
-                               min = b2bSeekBarConfig.min; \r
-                            }\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateMax = function(val) {\r
-                            max = parseFloat(val);\r
-                            if(isNaN(max)){\r
-                               max = b2bSeekBarConfig.max; \r
-                            }\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateStep = function(val) {\r
-                            step = parseFloat(val);\r
-                            if (!attr['skipInterval']) {\r
-                                skipInterval = step;\r
-                            }\r
-                        };\r
-\r
-                        var updateSkipInterval = function(val) {\r
-                            skipInterval = step * Math.ceil(val / (step!==0?step:1));\r
-                        };\r
-\r
-                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(b2bSeekBarConfig.min);\r
-                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(b2bSeekBarConfig.max);\r
-                        if (angular.isDefined(attr.step)) {\r
-                            attr.$observe('step', updateStep);\r
-                        }\r
-                        if (angular.isDefined(attr.skipInterval)) {\r
-                            attr.$observe('skipInterval', updateSkipInterval);\r
-                        }\r
-                        scope.currentModelValue = getValidMinMax(getValidStep(min));\r
-                        var onMouseDown = function(e) {\r
-                            switch (e.which) {\r
-                                case 1:\r
-                                    // left mouse button\r
-                                    break;\r
-                                case 2:\r
-                                case 3:\r
-                                    // right or middle mouse button\r
-                                    return;\r
-                            }\r
-                            ;\r
-\r
-                            scope.isDragging = true;\r
-                            seekBarKnob[0].focus();\r
-                            updateTrackContainerRect();\r
-                            if (attr['onDragInit']) {\r
-                                scope.onDragInit();\r
-                            }\r
-                            events.stopPropagation(e);\r
-                            events.preventDefault(e);\r
-                             scope.$apply(function() {\r
-                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                            });\r
-                        };\r
-\r
-                        var onMouseUp = function() {\r
-\r
-                            if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            scope.isDragging = false;\r
-                            scope.$digest();\r
-                        };\r
-\r
-                        var onMouseMove = function(e) {\r
-                            if (scope.isDragging) {\r
-                                events.stopPropagation(e);\r
-                                events.preventDefault(e);\r
-\r
-                                scope.$apply(function() {\r
-                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                                });\r
-                            }\r
-                        };\r
-\r
-                        function onKeyDown(e) {\r
-                            if (!(e.keyCode)) {\r
-                                e.keyCode = e.which;\r
-                            }\r
-                            var updateStep;\r
-                            switch (e.keyCode) {\r
-                                case keymap.KEY.LEFT:\r
-                                    if (!scope.verticalSeekBar) {\r
-                                        updateStep = -skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.RIGHT:\r
-                                    if (!scope.verticalSeekBar) {\r
-                                        updateStep = skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.UP:\r
-                                    if (scope.verticalSeekBar) {\r
-                                        updateStep = skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.DOWN:\r
-                                    if (scope.verticalSeekBar) {\r
-                                        updateStep = -skipInterval;\r
-                                    }\r
-                                    break;\r
-                                default:\r
-                                    return;\r
-                            }\r
-\r
-                            if (updateStep) {\r
-                                events.stopPropagation(e);\r
-                                events.preventDefault(e);\r
-                                scope.$apply(function() {\r
-                                    setModelValue(ngModelCtrl.$viewValue + updateStep);\r
-                                });\r
-                                if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            }\r
-                        }\r
-\r
-                        elm.on('keydown', onKeyDown);\r
-                        elm.on('mousedown', onMouseDown);\r
-\r
-                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);\r
-                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);\r
-\r
-                        ngModelCtrl.$render = function() {\r
-                            if (!scope.isDragging) {\r
-                                modelRenderer();\r
-                            }\r
-                        };\r
-                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);\r
-                        ngModelCtrl.$formatters.push(getValidMinMax);\r
-                        ngModelCtrl.$formatters.push(getValidStep);\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:selectorModule\r
- *\r
- * @description\r
- *  <file src="src/selectorModule/docs/readme.md" />\r
- *\r
- * @usage\r
- * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">\r
- *   <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- * </select>\r
- *\r
- * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">\r
- * <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- * </select>\r
- *\r
- * <select name="myNameBig" b2b-dropdown ng-model="Controller Variable here">\r
- *   <optgroup b2b-dropdown-group label="Group Label here">\r
- *     <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- *   </optgroup>\r
- * </select>\r
- *\r
- *  @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/selectorModule/docs/demo.html" />\r
-            <file src="src/selectorModule/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.selectorModule', ['b2b.att.dropdowns']);\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:separators\r
- *\r
- * @description\r
- *  <file src="src/separators/docs/readme.md" />\r
- *\r
- * @usage\r
-\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <b>HTML + AngularJS</b>\r
- <example module="b2b.att">\r
- <file src="src/separators/docs/demo.html" />\r
- <file src="src/separators/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.separators', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:slider\r
- *\r
- * @description\r
- *  <file src="src/slider/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-slider min="0" max="400" step="1" no-aria-label skip-interval="1" ng-model="horizontalSliderVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()" label-id="slider-label" post-aria-label="postAriaLabel"></b2b-slider>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/slider/docs/demo.html" />\r
-            <file src="src/slider/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.slider', ['b2b.att.utilities'])\r
-        .constant('SliderConfig', {\r
-            'min': 0,\r
-            'max': 100,\r
-            'step': 1,\r
-            'skipInterval': 1\r
-        })\r
-        .directive('b2bSlider', ['$documentBind', 'SliderConfig', 'keymap', '$compile', '$log', function($documentBind, SliderConfig, keymap, $compile, $log) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    replace: true,\r
-                    require: 'ngModel',\r
-                    templateUrl: 'b2bTemplate/slider/slider.html',\r
-                    scope: {\r
-                        onDragEnd: '&?',\r
-                        onDragInit: '&?',\r
-                        trackFillColor: '=?',\r
-                        preAriaLabel: '=?',\r
-                        postAriaLabel: '=?',\r
-                        onRenderEnd: '&?',\r
-                        sliderSnapPoints: '=?',\r
-                        customAriaLabel: '=?',\r
-                        labelId: '@?'\r
-                    },\r
-                    link: function(scope, elm, attr, ngModelCtrl) {\r
-                        scope.isDragging = false;\r
-                        scope.verticalSlider = false;\r
-                        var min;\r
-                        var max;\r
-                        var step = SliderConfig.step;\r
-                        var skipInterval = SliderConfig.skipInterval;\r
-                        var knob = angular.element(elm[0].querySelector('.slider-knob-container'));\r
-                        var sliderKnob = angular.element(knob[0].querySelector('.slider-knob'));\r
-                        var trackContainer = angular.element(elm[0].querySelector('.slider-track-container'));\r
-                        var trackFill = angular.element(elm[0].querySelector('.slider-track-fill'));\r
-                        var trackContainerRect = {};\r
-                        var axisPosition = "clientX";\r
-                        var trackFillOrderPositioning;\r
-\r
-                        //Forcefully disabling the vertical Slider code.\r
-                        if (angular.isDefined(attr.vertical)) {\r
-                            scope.verticalSlider = true;\r
-                            axisPosition = "clientY";\r
-                        }\r
-\r
-                        if (angular.isDefined(scope.noAriaLabel) && scope.noAriaLabel !== '') {\r
-                            $log.warn('no-aria-label has been deprecated. This will be removed in v0.6.0.');\r
-                        }\r
-                        if (angular.isDefined(scope.preAriaLabel) && scope.preAriaLabel !== '') {\r
-                            $log.warn('pre-aria-label has been deprecated. Please use label-id instead. This will be removed in v0.6.0.');\r
-                        }\r
-                        if (angular.isDefined(scope.customAriaLabel) && scope.customAriaLabel !== '') {\r
-                            $log.warn('custom-aria-label has been deprecated. Please use label-id and post-aria-label instead. This will be removed in v0.6.0.');\r
-                        }\r
-\r
-                        var binarySearchNearest = function (num, arr) {\r
-                            var mid;\r
-                            var lo = 0;\r
-                            var hi = arr.length - 1;\r
-                            \r
-                            while (hi - lo > 1) {\r
-                                mid = Math.floor((lo + hi) / 2);\r
-                                if (arr[mid] < num) {\r
-                                    lo = mid;\r
-                                } else {\r
-                                    hi = mid;\r
-                                }\r
-                            }\r
-                            if (num - arr[lo] < arr[hi] - num) {\r
-                                return arr[lo];\r
-                            }\r
-                            return arr[hi];\r
-                        };\r
-                        \r
-                        var getValidStep = function(val) {\r
-                            val = parseFloat(val);\r
-                            // in case $modelValue came in string number\r
-                            if (!isNaN(val)) {\r
-                                \r
-                                if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                    val = binarySearchNearest(val, scope.sliderSnapPoints);\r
-                                }\r
-                                else {\r
-                                    val = Math.round((val - min) / step) * step + min;\r
-                                }\r
-                                \r
-                                return Math.round(val * 1000) / 1000;\r
-                            }\r
-                        };\r
-\r
-                        var getPositionToPercent = function(x) {\r
-                            if (scope.verticalSlider) {\r
-                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));\r
-                            }\r
-                            else {\r
-                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));\r
-                            }\r
-                        };\r
-\r
-                        var getPercentToValue = function(percent) {\r
-                            return (min + percent * (max - min));\r
-                        };\r
-\r
-                        var getValueToPercent = function(val) {\r
-                            return (val - min) / (max - min);\r
-                        };\r
-\r
-                        var getValidMinMax = function(val) {\r
-                            return Math.max(min, Math.min(max, val));\r
-                        };\r
-\r
-                        var updateTrackContainerRect = function() {\r
-                            trackContainerRect = trackContainer[0].getBoundingClientRect();\r
-                            if (scope.verticalSlider) {\r
-                                if (!trackContainerRect.height) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.height;\r
-                                }\r
-                            }\r
-                            else {\r
-                                if (!trackContainerRect.width) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.width;\r
-                                }\r
-\r
-                            }\r
-\r
-                        };\r
-\r
-                        var updateKnobPosition = function(percent) {\r
-                            var percentStr = (percent * 100) + '%';\r
-                            if (scope.verticalSlider) {\r
-                                knob.css('bottom', percentStr);\r
-                                trackFill.css('height', percentStr);\r
-                            }\r
-                            else {\r
-                                knob.css('left', percentStr);\r
-                                trackFill.css('width', percentStr);\r
-                            }\r
-                        };\r
-\r
-                        var modelRenderer = function() {\r
-\r
-                            if(attr['disabled']){\r
-                                return;\r
-                            }\r
-\r
-                            if (isNaN(ngModelCtrl.$viewValue)) {\r
-                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;\r
-                            }\r
-\r
-                            var viewVal = ngModelCtrl.$viewValue;\r
-                            scope.currentModelValue = viewVal;\r
-\r
-                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation\r
-                            if ((min || min === 0) && max && step) {\r
-                                updateKnobPosition(getValueToPercent(viewVal));\r
-                            }\r
-                        };\r
-\r
-                        var setModelValue = function(val) {\r
-                            scope.currentModelValue = getValidMinMax(getValidStep(val));\r
-                            ngModelCtrl.$setViewValue(scope.currentModelValue);\r
-                        };\r
-\r
-                        var updateMin = function(val) {\r
-                            min = parseFloat(val);\r
-                            if(isNaN(min)){\r
-                               min = SliderConfig.min; \r
-                            }\r
-                            scope.min = min;\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateMax = function(val) {\r
-                            max = parseFloat(val);\r
-                            if(isNaN(max)){\r
-                               max = SliderConfig.max; \r
-                            }\r
-                            scope.max = max;\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateStep = function(val) {\r
-                            step = parseFloat(val);\r
-                            if (!attr['skipInterval']) {\r
-                                skipInterval = step;\r
-                            }\r
-                        };\r
-\r
-                        var updateSkipInterval = function(val) {\r
-                            skipInterval = step * Math.ceil(val / (step!==0?step:1));\r
-                        };\r
-\r
-                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(SliderConfig.min);\r
-                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(SliderConfig.max);\r
-                        if (angular.isDefined(attr.step)) {\r
-                            attr.$observe('step', updateStep);\r
-                        }\r
-                        if (angular.isDefined(attr.skipInterval)) {\r
-                            attr.$observe('skipInterval', updateSkipInterval);\r
-                        }\r
-                        scope.currentModelValue = getValidMinMax(getValidStep(min));\r
-                        var onMouseDown = function(e) {\r
-\r
-                            if(attr['disabled']){\r
-                                return;\r
-                            }\r
-\r
-                            switch (e.which) {\r
-                                case 1:\r
-                                    // left mouse button\r
-                                    break;\r
-                                case 2:\r
-                                case 3:\r
-                                    // right or middle mouse button\r
-                                    return;\r
-                            }\r
-\r
-                            scope.isDragging = true;\r
-                            sliderKnob[0].focus();\r
-                            updateTrackContainerRect();\r
-                            if (attr['onDragInit']) {\r
-                                scope.onDragInit();\r
-                            }\r
-                            e.stopPropagation();\r
-                            e.preventDefault();\r
-                             scope.$apply(function() {\r
-                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                            });\r
-                        };\r
-\r
-                        var onMouseUp = function() {\r
-\r
-                            if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            scope.isDragging = false;\r
-                            scope.$digest();\r
-                        };\r
-\r
-                        var onMouseMove = function(e) {\r
-                            if (scope.isDragging) {\r
-                                e.stopPropagation();\r
-                                e.preventDefault();\r
-\r
-                                scope.$apply(function() {\r
-                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                                });\r
-                            }\r
-                        };\r
-\r
-                        function onKeyDown(e) {\r
-                            if (!(e.keyCode)) {\r
-                                e.keyCode = e.which;\r
-                            }\r
-                            var updateStep;\r
-                            switch (e.keyCode) {\r
-                                case keymap.KEY.DOWN:\r
-                                case keymap.KEY.LEFT:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);\r
-                                        if (currentIndex > 0) {\r
-                                            currentIndex--;\r
-                                        }\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    }\r
-                                    else {\r
-                                        updateStep = ngModelCtrl.$viewValue - skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.UP:\r
-                                case keymap.KEY.RIGHT:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);\r
-                                        if (currentIndex < scope.sliderSnapPoints.length-1) {\r
-                                            currentIndex++;\r
-                                        }\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    }\r
-                                    else {\r
-                                        updateStep = ngModelCtrl.$viewValue + skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.END:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        currentIndex = scope.sliderSnapPoints.length-1;\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    } else {\r
-                                        setModelValue(scope.max);\r
-                                    }\r
-                                    e.preventDefault();\r
-                                    e.stopPropagation();\r
-                                    break;\r
-                                case keymap.KEY.HOME:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        currentIndex = 0;\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    } else {\r
-                                        setModelValue(scope.min);\r
-                                    }\r
-                                    e.preventDefault();\r
-                                    e.stopPropagation();\r
-                                    break;\r
-                                default:\r
-                                    return;\r
-                            }\r
-\r
-                            if (angular.isNumber(updateStep) && !attr['disabled']) {\r
-                                e.stopPropagation();\r
-                                e.preventDefault();\r
-                                scope.$apply(function() {\r
-                                    setModelValue(updateStep);\r
-                                });\r
-                                if (attr['onDragEnd']) {\r
-                                    scope.onDragEnd();\r
-                                }\r
-                            }\r
-                        }\r
-\r
-                        elm.on('keydown', onKeyDown);\r
-                        elm.on('mousedown', onMouseDown);\r
-\r
-                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);\r
-                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);\r
-\r
-                        attr.$observe('disabled', function (disabled) {\r
-                            if (disabled) {\r
-                                sliderKnob.removeAttr('tabindex');\r
-                            } else {\r
-                                sliderKnob.attr('tabindex', '0');\r
-                                disabled = false;\r
-                            }\r
-\r
-                            elm.toggleClass("slider-disabled", disabled);\r
-\r
-                            if (angular.isDefined(attr.hideDisabledKnob)) {\r
-                                scope.hideKnob = disabled;\r
-                            }\r
-                        });\r
-\r
-                        ngModelCtrl.$render = function() {\r
-                            if (!scope.isDragging) {\r
-                                modelRenderer();\r
-                                if (attr['onRenderEnd'] && !attr['disabled']) {\r
-                                    scope.onRenderEnd({currentModelValue: scope.currentModelValue});\r
-                                }\r
-                            }\r
-                        };\r
-                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);\r
-                        ngModelCtrl.$formatters.push(getValidMinMax);\r
-                        ngModelCtrl.$formatters.push(getValidStep);\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:spinButton\r
- *\r
- * @param {String} spin-button-id - An ID for the input field\r
- * @param {Integer} min - Minimum value for the input\r
- * @param {Integer} max - Maximum value for the input\r
- * @param {Integer} step - Value by which input field increments or decrements on up/down arrow keys\r
- * @param {Integer} page-step - Value by which input field increments or decrements on page up/down keys\r
- * @param {boolean} input-model-key - Default value for input field\r
- * @param {boolean} disabled-flag - A boolean that triggers directive once the min or max value has reached\r
- *\r
- * @description\r
- *  <file src="src/spinButton/docs/readme.md" />\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/spinButton/docs/demo.html" />\r
-            <file src="src/spinButton/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- * \r
- */\r
-angular.module('b2b.att.spinButton', ['b2b.att.utilities'])\r
-    .constant('b2bSpinButtonConfig', {\r
-        min: 1,\r
-        max: 10,\r
-        step: 1,\r
-        pageStep: 10,\r
-        inputModelKey: 'value',\r
-        disabledFlag: false\r
-    })\r
-    .directive('b2bSpinButton', ['keymap', 'b2bSpinButtonConfig', 'b2bUserAgent', function (keymap, b2bSpinButtonConfig, userAgent) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '?ngModel',\r
-            transclude: false,\r
-            replace: true,\r
-            scope: {\r
-                min: '=min',\r
-                max: '=max',\r
-                step: '=step',\r
-                pageStep: '=pageStep',\r
-                spinButtonId: '@',\r
-                inputValue: '=ngModel',\r
-                inputModelKey: '@',\r
-                disabledFlag: "=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/spinButton/spinButton.html',\r
-            controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {\r
-\r
-                scope.isMobile = userAgent.isMobile();\r
-                scope.notMobile = userAgent.notMobile();\r
-\r
-                scope.min = attrs.min ? scope.min : b2bSpinButtonConfig.min;\r
-                scope.max = attrs.max ? scope.max : b2bSpinButtonConfig.max;\r
-                scope.step = attrs.step ? scope.step : b2bSpinButtonConfig.step;\r
-                scope.pageStep = attrs.pageStep ? scope.pageStep : b2bSpinButtonConfig.pageStep;\r
-                scope.inputModelKey = attrs.inputModelKey ? scope.inputModelKey : b2bSpinButtonConfig.inputModelKey;\r
-                scope.disabledFlag = attrs.disabledFlag ? scope.disabledFlag : b2bSpinButtonConfig.disabledFlag;\r
-                \r
-                if (scope.min < 0) {\r
-                    scope.min = 0;\r
-                }\r
-                if (scope.max > 999) {\r
-                    scope.max = 999;\r
-                }\r
-\r
-                scope.isPlusDisabled = function () {\r
-                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] >= scope.max);\r
-                };\r
-                scope.isMinusDisabled = function () {\r
-                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] <= scope.min);\r
-                };\r
-\r
-                scope.getValidateInputValue = function (value) {\r
-                    if (value <= scope.min) {\r
-                        return scope.min;\r
-                    } else if (value >= scope.max) {\r
-                        return scope.max;\r
-                    } else {\r
-                        return value;\r
-                    }\r
-                };\r
-\r
-                scope.plus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.step);\r
-                };\r
-                scope.minus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.step);\r
-                };\r
-                scope.pagePlus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.pageStep);\r
-                };\r
-                scope.pageMinus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.pageStep);\r
-                };\r
-\r
-            }],\r
-            link: function (scope, elem) {\r
-\r
-                if (scope.notMobile) {\r
-                    angular.element(elem).find('input').attr('aria-live', 'off');\r
-                    angular.element(elem).find('input').attr('role', 'spinbutton');\r
-                }\r
-\r
-                elem.find('input').bind('keydown', function (e) {\r
-                    if (e.keyCode === keymap.KEY.UP) {\r
-                        scope.plus();\r
-                    } else if (e.keyCode === keymap.KEY.DOWN){\r
-                        scope.minus();\r
-                    } else if (e.keyCode === keymap.KEY.HOME) {\r
-                        scope.inputValue[scope.inputModelKey] = parseInt(scope.min);\r
-                    } else if (e.keyCode === keymap.KEY.END) {\r
-                        scope.inputValue[scope.inputModelKey] = parseInt(scope.max);\r
-                    } else if (e.keyCode === keymap.KEY.PAGE_UP) {\r
-                        scope.pagePlus();\r
-                    } else if (e.keyCode === keymap.KEY.PAGE_DOWN) {\r
-                        scope.pageMinus();\r
-                    }\r
-                    scope.$apply();\r
-                });\r
-\r
-                elem.find('input').bind('keyup', function () {\r
-                    if (scope.inputValue[scope.inputModelKey] === null ||\r
-                        scope.inputValue[scope.inputModelKey] === '' ||\r
-                        scope.inputValue[scope.inputModelKey] < scope.min) {\r
-                        scope.inputValue[scope.inputModelKey] = scope.min;\r
-                        scope.$apply();\r
-                    } else if (angular.isUndefined(scope.inputValue[scope.inputModelKey]) || \r
-                               scope.inputValue[scope.inputModelKey] > scope.max) {\r
-                        scope.inputValue[scope.inputModelKey] = scope.max;\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-\r
-                scope.focusInputSpinButton = function (evt) {\r
-                    evt.preventDefault();\r
-                    if (scope.notMobile) {\r
-                        elem[0].querySelector('input').focus();\r
-                    }\r
-                };\r
-\r
-            }\r
-        };  \r
-    }]);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Static Route\r
- * \r
- * @description \r
- *  <file src="src/staticRouteTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <example module="b2b.att"> \r
-            <file src="src/staticRouteTemplate/docs/demo.html" /> \r
-            <file src="src/staticRouteTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.staticRouteTemplate', ['b2b.att.utilities'])\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Progress & usage indicators.att:statusTracker\r
- *\r
- * @scope\r
- * @param {array} statuses - An array of status objects\r
- * @description\r
- * <file src="src/statusTracker/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
-<div ng-controller="statusTrackerController">\r
-    <b2b-status-tracker statuses="statusObject"></b2b-status-tracker>\r
-</div>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/statusTracker/docs/demo.html" />\r
-            <file src="src/statusTracker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.statusTracker', ['b2b.att.utilities'])\r
-.constant('b2bStatusTrackerConfig', {\r
-    'maxViewItems': 3\r
-})\r
-.directive('b2bStatusTracker', ['b2bStatusTrackerConfig', function(b2bStatusTrackerConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: false,\r
-            replace: true,\r
-            scope:{\r
-                statuses: '='\r
-            },\r
-            templateUrl: function(scope) {\r
-                return 'b2bTemplate/statusTracker/statusTracker.html';\r
-            },\r
-            link: function(scope, element, attr) {\r
-                scope.currentViewIndex = 0;\r
-                scope.b2bStatusTrackerConfig = b2bStatusTrackerConfig;\r
-\r
-                scope.nextStatus = function() {\r
-                    if (scope.currentViewIndex+1 <= scope.statuses.length) {\r
-                        scope.currentViewIndex++;\r
-                    }\r
-                };\r
-                scope.previousStatus = function() {\r
-                    if (scope.currentViewIndex-1 >= 0) {\r
-                        scope.currentViewIndex--;\r
-                    }\r
-                };\r
-                scope.isInViewport = function(index) {\r
-                    return (index < scope.currentViewIndex+3 && index >= scope.currentViewIndex);  // && index > scope.currentViewIndex-2\r
-                };\r
-                scope.currentStatus = function(index) {\r
-                    if(index != undefined){\r
-                        if(!scope.statuses[index].complete) {\r
-                            if(index > 0 && scope.statuses[index-1].complete) {\r
-                                return true;\r
-                            } else if(index == 0 && !scope.statuses[index].complete){\r
-                                return true;\r
-                            } else {\r
-                                return false;\r
-                            }\r
-                        }\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Progress & usage indicators.att:stepTracker\r
- *\r
- * @scope\r
- * @param {array} stepsItemsObject - An array of step objects\r
- * @param {Integer} currenIindex - This indicates the current running step\r
- * @param {Integer} viewportIndex - This is optional. This can used to start the view port rather than 1 item.\r
- * @description\r
- * <file src="src/stepTracker/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
- *  <b2b-step-tracker steps-items-object="stepsObject" current-index="currentStepIndex" step-indicator-heading="stepHeading"></b2b-step-tracker>\r
- *\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/stepTracker/docs/demo.html" />\r
-            <file src="src/stepTracker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.stepTracker', ['b2b.att.utilities'])\r
-    .constant('b2bStepTrackerConfig', {\r
-        'maxViewItems': 5\r
-    })\r
-    .directive('b2bStepTracker', ['b2bStepTrackerConfig', function(b2bStepTrackerConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            scope:{\r
-                stepsItemsObject:"=",\r
-                currentIndex:"=",\r
-                viewportIndex:"=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/stepTracker/stepTracker.html',\r
-            link: function(scope, ele, attr) {\r
-                if (angular.isDefined(scope.viewportIndex)) {\r
-                    scope.currentViewIndex = scope.viewportIndex - 1;   \r
-                }else{\r
-                    scope.currentViewIndex = 0;\r
-                }\r
-               \r
-               scope.b2bStepTrackerConfig = b2bStepTrackerConfig;\r
-               scope.nextStatus = function() {\r
-                    if (scope.currentViewIndex+1 <= scope.stepsItemsObject.length) {\r
-                        scope.currentViewIndex++;\r
-                    }\r
-                };\r
-                scope.previousStatus = function() {\r
-                    if (scope.currentViewIndex-1 >= 0) {\r
-                        scope.currentViewIndex--;\r
-                    }\r
-                };\r
-                scope.isInViewport = function(index) {\r
-                    return (index < scope.currentViewIndex+b2bStepTrackerConfig.maxViewItems && index >= scope.currentViewIndex);\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-     \r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:switches\r
- *\r
- * @description\r
- *  <file src="src/switches/docs/readme.md" />\r
- *\r
- * @usage\r
- *  \r
- *  <!-- On / Off Toggle switch -->\r
- *  <label for="switch1" class="controlled-text-wrap"> This is ON\r
- *      <input type="checkbox" role="checkbox" b2b-switches id="switch1" ng-model="switch1.value">\r
- *  </label>\r
- *\r
- *  <!-- On / Off Toggle switch and DISABLED -->\r
- *  <label for="switch2" class="controlled-text-wrap"> This is ON (disabled)\r
- *      <input type="checkbox" role="checkbox" b2b-switches id="switch2" ng-model="switch1.value" ng-disabled="true" >\r
- *  </label> \r
- *\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/switches/docs/demo.js" />\r
-            <file src="src/switches/docs/demo.html" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.switches', ['b2b.att.utilities'])\r
-    .directive('b2bSwitches', ['$compile', '$templateCache', 'keymap', 'events', function ($compile, $templateCache, keymap, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: ['ngModel'],\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var ngModelController = ctrl[0];\r
-        \r
-                element.parent().bind("keydown", function (e) {\r
-                    if (!attrs.disabled && (e.keyCode === keymap.KEY.ENTER || e.keyCode === keymap.KEY.SPACE)) {\r
-                        events.preventDefault(e);\r
-                        ngModelController.$setViewValue(!ngModelController.$viewValue);\r
-                        element.prop("checked", ngModelController.$viewValue);\r
-                    }\r
-                });\r
-\r
-                element.wrap('<div class="btn-switch">');\r
-                //element.attr("tabindex", -1);\r
-                if (navigator.userAgent.match(/iphone/i)){\r
-                    element.attr("aria-live", "polite");\r
-                }\r
-                else {\r
-                    element.removeAttr('aria-live');\r
-                }\r
-\r
-                var templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches.html"));\r
-                if (angular.isDefined(attrs.typeSpanish)) {\r
-                    templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches-spanish.html"));\r
-                }\r
-\r
-                templateSwitch = $compile(templateSwitch)(scope);\r
-                element.parent().append(templateSwitch);\r
-\r
-                element.bind("focus", function (e) {\r
-                    element.parent().addClass('focused');\r
-                });\r
-\r
-                element.bind("blur", function (e) {\r
-                    element.parent().removeClass('focused');\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:tableMessages\r
- *\r
- * @description\r
- *  <file src="src/tableMessages/docs/readme.md" />\r
- *\r
- * @usage\r
-    <!-- no matching results -->\r
-    <b2b-table-message msg-type="'noMatchingResults'">\r
-       <p>No Matching Results</p>\r
-    </b2b-table-message>\r
-  \r
-    <!-- info could not load -->\r
-    <b2b-table-message msg-type="'infoCouldNotLoad'" on-refresh-click="refreshClicked()">\r
-    </b2b-table-message>\r
-   \r
-    <!-- magnify search -->\r
-    <b2b-table-message msg-type="'magnifySearch'">\r
-    </b2b-table-message>\r
-   \r
-    <!-- loading data -->\r
-    <b2b-table-message msg-type="'loadingTable'">\r
-          <!-- custom html -->\r
-          <p>The data is currently loading...</p>\r
-    </b2b-table-message>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/tableMessages/docs/demo.html" />\r
-            <file src="src/tableMessages/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.tableMessages', [])\r
-    .directive('b2bTableMessage', [function() {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                msgType: '=',\r
-                onRefreshClick: '&'\r
-            },\r
-            templateUrl: 'b2bTemplate/tableMessages/tableMessage.html',\r
-            link: function(scope) {\r
-                scope.refreshAction = function(evt) {\r
-                    scope.onRefreshClick(evt);\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tableScrollbar\r
- *\r
- * @description\r
- *  <file src="src/tableScrollbar/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
-<b2b-table-scrollbar>\r
-    <table>\r
-        <thead type="header">\r
-            <tr>\r
-                <th role="columnheader" scope="col" key="Id" id="col1">Id</th>\r
-                .....\r
-            </tr>\r
-        </thead>\r
-        <tbody type="body">\r
-            <tr>\r
-                <td id="rowheader0" headers="col1">1002</td>\r
-                .....\r
-            </tr>\r
-        </tbody>\r
-    </table>\r
-</b2b-table-scrollbar>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tableScrollbar/docs/demo.html" />\r
-            <file src="src/tableScrollbar/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tableScrollbar', [])\r
-    .directive('b2bTableScrollbar', ['$timeout', function ($timeout) {\r
-        return {\r
-            restrict: 'E',\r
-            scope: true,\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/tableScrollbar/tableScrollbar.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var firstThWidth, firstTdWidth, firstColumnWidth, firstColumnHeight, trHeight = 0;\r
-                var pxToScroll = '';\r
-                var tableElement = element.find('table');\r
-                var thElements = element.find('th');\r
-                var tdElements = element.find('td');\r
-                var innerContainer = angular.element(element[0].querySelector('.b2b-table-inner-container'));\r
-                var outerContainer = angular.element(element[0].querySelector('.b2b-table-scrollbar'));\r
-\r
-                scope.disableLeft = true;\r
-                scope.disableRight = false;\r
-\r
-                if (angular.isDefined(thElements[0])) {\r
-                    firstThWidth = thElements[0].offsetWidth;\r
-                }\r
-                if (angular.isDefined(tdElements[0])) {\r
-                    firstTdWidth = tdElements[0].offsetWidth;\r
-                }\r
-                firstColumnWidth = (firstThWidth > firstTdWidth) ? firstThWidth : firstTdWidth;\r
-\r
-                innerContainer.css({\r
-                    'padding-left': (firstColumnWidth + 2) + 'px'\r
-                });\r
-\r
-                angular.forEach(element.find('tr'), function (eachTr, index) {\r
-                    trObject = angular.element(eachTr);\r
-                    firstColumn = angular.element(trObject.children()[0]);\r
-\r
-                    angular.element(firstColumn).css({\r
-                        'margin-left': -(firstColumnWidth + 2) + 'px',\r
-                        'width': (firstColumnWidth + 2) + 'px',\r
-                        'position': 'absolute'\r
-                    });\r
-\r
-                    trHeight = trObject[0].offsetHeight;\r
-                    firstColumnHeight = firstColumn[0].offsetHeight;\r
-                    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\r
-                        firstColumnHeight += 1;\r
-                    }\r
-\r
-                    if (trHeight !== firstColumnHeight - 1) {\r
-                        if (trHeight > firstColumnHeight) {\r
-                            if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\r
-                                trHeight -= 1;\r
-                            }\r
-                            angular.element(firstColumn).css({\r
-                                'height': (trHeight + 1) + 'px'\r
-                            });\r
-                        } else {\r
-                            angular.element(trObject).css({\r
-                                'height': (firstColumnHeight - 1) + 'px'\r
-                            });\r
-                        }\r
-                    }\r
-\r
-                });\r
-\r
-                pxToScroll = outerContainer[0].offsetWidth - firstColumnWidth;\r
-\r
-                scope.scrollLeft = function () {\r
-                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + 20 - pxToScroll;\r
-                };\r
-\r
-                scope.scrollRight = function () {\r
-                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + pxToScroll - 20;\r
-                };\r
-\r
-                scope.checkScrollArrows = function () {\r
-                    if (innerContainer[0].scrollLeft == 0) {\r
-                        scope.disableLeft = true;\r
-                    } else {\r
-                        scope.disableLeft = false;\r
-                    }\r
-\r
-                    if (((innerContainer[0].offsetWidth - firstColumnWidth) + innerContainer[0].scrollLeft) >= tableElement[0].offsetWidth) {\r
-                        scope.disableRight = true;\r
-                    } else {\r
-                        scope.disableRight = false;\r
-                    }\r
-                };\r
-\r
-                innerContainer.bind('scroll', function () {\r
-                    $timeout(function () {\r
-                        scope.checkScrollArrows();\r
-                    }, 1);\r
-                });\r
-\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tables\r
- *\r
- * @description\r
- *  <file src="src/tables/docs/readme.md" />\r
- *\r
- * @usage\r
- *   \r
- Table\r
- <table b2b-table table-data="tableData" search-string="searchString">\r
-    <thead b2b-table-row type="header">\r
-        <tr>\r
-            <th b2b-table-header key="requestId" default-sort="a" id="col1">Header 1</th>\r
-            <th b2b-table-header key="requestType" sortable="false" id="col2">Header 2</th>\r
-        </tr>\r
-    </thead>\r
-    <tbody b2b-table-row type="body" row-repeat="rowData in tableData">\r
-        <tr>\r
-            <td b2b-table-body id="rowheader{{$index}}" headers="col1" ng-bind="rowData['requestId']"> </td>\r
-            <td b2b-table-body ng-bind="rowData['requestType']"></td>\r
-        </tr>\r
-    </tbody>\r
- </table>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tables/docs/demo.html" />\r
-            <file src="src/tables/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tables', ['b2b.att.utilities'])\r
-    .constant('b2bTableConfig', {\r
-        defaultSortPattern: false, // true for descending & false for ascending\r
-        highlightSearchStringClass: 'tablesorter-search-highlight',\r
-        zebraStripCutOff: 6, // > zebraStripCutOff\r
-        tableBreakpoints: [ // breakpoints are >= min and < max\r
-            {\r
-                min: 0,\r
-                max: 480,\r
-                columns: 2\r
-            },\r
-            {\r
-                min: 480,\r
-                max: 768,\r
-                columns: 3\r
-            },\r
-            {\r
-                min: 768,\r
-                max: 1025,\r
-                columns: 5\r
-            },\r
-            {\r
-                min: 1025,\r
-                max: 1920,\r
-                columns: 7\r
-            }\r
-        ]\r
-    })\r
-    .directive('b2bTable', ['$filter', '$window', 'b2bTableConfig', '$timeout', function ($filter, $window, b2bTableConfig, $timeout) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                tableData: "=",\r
-                viewPerPage: "=",\r
-                currentPage: "=",\r
-                totalPage: "=",\r
-                searchCategory: "=",\r
-                searchString: "=",\r
-                nextSort: '='\r
-            },\r
-            require: 'b2bTable',\r
-            templateUrl: 'b2bTemplate/tables/b2bTable.html',\r
-            controller: ['$scope', '$attrs', function ($scope, $attrs) {\r
-                this.headers = [];\r
-                this.currentSortIndex = null;\r
-                this.responsive = $scope.responsive = $attrs.responsive;\r
-                this.maxTableColumns = -1;\r
-                this.totalTableColums = 0;\r
-                this.active = $scope.active = false;\r
-                this.responsiveRowScopes = [];\r
-                this.hideColumnPriority = [];\r
-                this.hiddenColumn = [];\r
-                this.setIndex = function (headerScope, priority) {\r
-                    this.headers.push(headerScope);\r
-                    if (this.responsive) {\r
-                        this.totalTableColums++;\r
-                        if (!isNaN(priority)) {\r
-                            this.hideColumnPriority[priority] = this.totalTableColums - 1;\r
-                        } else {\r
-                            this.hideColumnPriority[this.totalTableColums - 1] = this.totalTableColums - 1;\r
-                        }\r
-                    }\r
-                    return this.totalTableColums - 1;\r
-                };\r
-                this.getIndex = function (headerName) {\r
-                    for (var i = 0; i < this.headers.length; i++) {\r
-                        if (this.headers[i].headerName === headerName) {\r
-                            return this.headers[i].index;\r
-                        }\r
-                    }\r
-                    return null;\r
-                };\r
-                this.setResponsiveRow = function (responsiveRowScope) {\r
-                    this.responsiveRowScopes.push(responsiveRowScope);\r
-                }\r
-                $scope.nextSort = '';\r
-                this.sortData = function (columnIndex, reverse, externalSort) {\r
-                    if ($scope.$parent && $scope.$parent !== undefined) {\r
-                        $scope.$parent.columnIndex = columnIndex;\r
-                        $scope.$parent.reverse = reverse;\r
-                    }\r
-                    this.currentSortIndex = columnIndex;\r
-                    if (externalSort === true) {\r
-                        if (!reverse) {\r
-                            $scope.nextSort = 'd'\r
-                        } else {\r
-                            $scope.nextSort = 'a'\r
-                        }\r
-                    }\r
-                    $scope.currentPage = 1;\r
-                    this.resetSortPattern();\r
-                };\r
-                this.getSearchString = function () {\r
-                    return $scope.searchString;\r
-                };\r
-                this.resetSortPattern = function () {\r
-                    for (var i = 0; i < this.headers.length; i++) {\r
-                        var currentScope = this.headers[i];\r
-                        if (currentScope.index !== this.currentSortIndex) {\r
-                            currentScope.resetSortPattern();\r
-                        }\r
-                    }\r
-                };\r
-\r
-                $scope.$watch('nextSort', function (val) {\r
-                    if ($scope.$parent && $scope.$parent !== undefined) {\r
-                        $scope.$parent.nextSort = val;\r
-                    }\r
-\r
-                });\r
-            }],\r
-            link: function (scope, elem, attr, ctrl) {\r
-                scope.searchCriteria = {};\r
-                scope.tableBreakpoints = attr.tableConfig ? scope.$parent.$eval(attr.tableConfig) : angular.copy(b2bTableConfig.tableBreakpoints);\r
-                scope.$watchCollection('tableData', function (value) {\r
-                    if (value && !isNaN(value.length)) {\r
-                        scope.totalRows = value.length;\r
-                    }\r
-                });\r
-                scope.$watch('currentPage', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.currentPage = val;\r
-                    }\r
-\r
-                });\r
-                scope.$watch('viewPerPage', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.viewPerPage = val;\r
-                    }\r
-                });\r
-                scope.$watch('totalRows', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        if (val > b2bTableConfig.zebraStripCutOff) {\r
-                            scope.$parent.zebraStripFlag = true;\r
-                        } else {\r
-                            scope.$parent.zebraStripFlag = false;\r
-                        }\r
-                    }\r
-                });\r
-                scope.$watch(function () {\r
-                    return scope.totalRows / scope.viewPerPage;\r
-                }, function (value) {\r
-                    if (!isNaN(value)) {\r
-                        scope.totalPage = Math.ceil(value);\r
-                        scope.currentPage = 1;\r
-                    }\r
-                });\r
-                var searchValCheck = function (val) {\r
-                    if (angular.isDefined(val) && val !== null && val !== "") {\r
-                        return true;\r
-                    }\r
-                };\r
-                var setSearchCriteria = function (v1, v2) {\r
-                    if (searchValCheck(v1) && searchValCheck(v2)) {\r
-                        var index = ctrl.getIndex(v2);\r
-                        scope.searchCriteria = {};\r
-                        if (index !== null) {\r
-                            scope.searchCriteria[index] = v1;\r
-                        }\r
-                    } else if (searchValCheck(v1) && (!angular.isDefined(v2) || v2 === null || v2 === "")) {\r
-                        scope.searchCriteria = {\r
-                            $: v1\r
-                        };\r
-                    } else {\r
-                        scope.searchCriteria = {};\r
-                    }\r
-                };\r
-                scope.$watch('searchCategory', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        setSearchCriteria(scope.searchString, newVal);\r
-                    }\r
-                });\r
-                scope.$watch('searchString', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        setSearchCriteria(newVal, scope.searchCategory);\r
-                    }\r
-                });\r
-                scope.$watchCollection('searchCriteria', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.searchCriteria = val;\r
-                    }\r
-                    scope.totalRows = scope.tableData && ($filter('filter')(scope.tableData, val, false)).length || 0;\r
-                    scope.currentPage = 1;\r
-                });\r
-                var window = angular.element($window);\r
-                var findMaxTableColumns = function () {\r
-                    var windowWidth;\r
-                    windowWidth = $window.innerWidth;\r
-                    ctrl.maxTableColumns = -1;\r
-                    for (var i in scope.tableBreakpoints) {\r
-                        if (windowWidth >= scope.tableBreakpoints[i].min && windowWidth < scope.tableBreakpoints[i].max) {\r
-                            ctrl.maxTableColumns = scope.tableBreakpoints[i].columns;\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (ctrl.maxTableColumns > -1 && ctrl.totalTableColums > ctrl.maxTableColumns) {\r
-                        ctrl.active = true;\r
-                    } else {\r
-                        ctrl.active = false;\r
-                    }\r
-                    for (var i in ctrl.responsiveRowScopes) {\r
-                        ctrl.responsiveRowScopes[i].setActive(ctrl.active);\r
-                    }\r
-                };\r
-                var findHiddenColumn = function () {\r
-                    var columnDiffenence = ctrl.maxTableColumns > -1 ? ctrl.totalTableColums - ctrl.maxTableColumns : 0;\r
-                    ctrl.hiddenColumn = [];\r
-                    if (columnDiffenence > 0) {\r
-                        var tempHideColumnPriority = angular.copy(ctrl.hideColumnPriority);\r
-                        for (var i = 0; i < columnDiffenence; i++) {\r
-                            ctrl.hiddenColumn.push(tempHideColumnPriority.pop());\r
-                        }\r
-                    }\r
-                };\r
-                var resizeListener = function () {\r
-                    findMaxTableColumns();\r
-                    findHiddenColumn();\r
-                };\r
-                if (ctrl.responsive) {\r
-                    window.bind('resize', function () {\r
-                        resizeListener();\r
-                        scope.$apply();\r
-                    });\r
-                    $timeout(function () {\r
-                        resizeListener();\r
-                    }, 100);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableRow', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            compile: function (elem, attr) {\r
-                if (attr.type === 'header') {\r
-                    angular.noop();\r
-                } else if (attr.type === 'body') {\r
-                    var html = elem.children();\r
-                    if (attr.rowRepeat) {\r
-                        html.attr('ng-repeat', attr.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false "));\r
-                    }\r
-                    html.attr('ng-class', "{'odd': $odd && zebraStripFlag}");\r
-                    html.attr('class', 'data-row');\r
-                    html.attr('b2b-responsive-row', '{{$index}}');\r
-                    elem.append(html);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableHeader', ['b2bTableConfig', function (b2bTableConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                sortable: '@',\r
-                defaultSort: '@',\r
-                index: '@key'\r
-            },\r
-            require: '^b2bTable',\r
-            templateUrl: function (elem, attr) {\r
-                if (attr.sortable === 'false') {\r
-                    return 'b2bTemplate/tables/b2bTableHeaderUnsortable.html';\r
-                } else {\r
-                    return 'b2bTemplate/tables/b2bTableHeaderSortable.html';\r
-                }\r
-            },\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var reverse = b2bTableConfig.defaultSortPattern;\r
-                scope.headerName = elem.text();\r
-                scope.headerId = elem.attr('id');\r
-                scope.sortPattern = null;\r
-                var priority = parseInt(attr.priority, 10);\r
-                scope.columnIndex = ctrl.setIndex(scope, priority);\r
-\r
-                scope.isHidden = function () {\r
-                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                };\r
-\r
-                scope.$watch(function () {\r
-                    return elem.text();\r
-                }, function (value) {\r
-                    scope.headerName = value;\r
-                });\r
-                scope.sort = function (sortType) {\r
-                    if (typeof sortType === 'boolean') {\r
-                        reverse = sortType;\r
-                    }\r
-                    ctrl.sortData(scope.index, reverse, false);\r
-                    scope.sortPattern = reverse ? 'descending' : 'ascending';\r
-                    reverse = !reverse;\r
-                };\r
-                scope.$watch(function () {\r
-                    return ctrl.currentSortIndex;\r
-                }, function (value) {\r
-                    if (value !== scope.index) {\r
-                        scope.sortPattern = null;\r
-                    }\r
-                });\r
-\r
-                if (scope.sortable === undefined || scope.sortable === 'true' || scope.sortable === true) {\r
-                    scope.sortable = 'true';\r
-                } else if (scope.sortable === false || scope.sortable === 'false') {\r
-                    scope.sortable = 'false';\r
-                }\r
-\r
-                if (scope.sortable !== 'false') {\r
-                    if (scope.defaultSort === 'A' || scope.defaultSort === 'a') {\r
-                        scope.sort(false);\r
-                    } else if (scope.defaultSort === 'D' || scope.defaultSort === 'd') {\r
-                        scope.sort(true);\r
-                    }\r
-                }\r
-                scope.resetSortPattern = function () {\r
-                    reverse = b2bTableConfig.defaultSortPattern;\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bResponsiveRow', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '^b2bTable',\r
-            controller: ['$scope', function ($scope) {\r
-                this.rowValues = $scope.rowValues = [];\r
-                this.setRowValues = function (rowValue) {\r
-                    this.rowValues.push(rowValue);\r
-                };\r
-                var columnIndexCounter = -1;\r
-                this.getIndex = function () {\r
-                    columnIndexCounter++;\r
-                    return columnIndexCounter;\r
-                };\r
-            }],\r
-            link: function (scope, elem, attr, ctrl) {\r
-                if (ctrl.responsive) {\r
-                    scope.rowIndex = attr.b2bResponsiveRow;\r
-                    scope.active = false;\r
-                    scope.expandFlag = false;\r
-                    scope.headerValues = ctrl.headers;\r
-                    ctrl.setResponsiveRow(scope);\r
-                    var firstTd = elem.find('td').eq(0);\r
-                    scope.setActive = function (activeFlag) {\r
-                        scope.active = activeFlag;\r
-                        if (scope.active) {\r
-                            elem.addClass('has-button');\r
-                            firstTd.attr('role', 'rowheader');\r
-                            firstTd.parent().attr('role', 'row');\r
-                        } else {\r
-                            elem.removeClass('has-button');\r
-                            firstTd.removeAttr('role');\r
-                            firstTd.parent().removeAttr('role');\r
-                        }\r
-                    };\r
-                    scope.toggleExpandFlag = function (expandFlag) {\r
-                        if (angular.isDefined(expandFlag)) {\r
-                            scope.expandFlag = expandFlag;\r
-                        } else {\r
-                            scope.expandFlag = !scope.expandFlag;\r
-                        }\r
-                        if (scope.expandFlag) {\r
-                            elem.addClass('opened');\r
-                        } else {\r
-                            elem.removeClass('opened');\r
-                        }\r
-                    };\r
-\r
-                    firstTd.attr('scope', 'row');\r
-                    firstTd.addClass('col-1');\r
-                    scope.$on('$destroy', function () {\r
-                        elem.next().remove();\r
-                    });\r
-                    $timeout(function () {\r
-                        scope.firstTdId = firstTd.attr('id');\r
-                        var firstTdContent = firstTd.html();\r
-                        var toggleButtonTemplate = '<span ng-show="!active">' + firstTdContent + '</span><button type="button" aria-describedby="sup-actNum{{$id}}" aria-expanded="{{expandFlag}}" ng-show="active" ng-click="toggleExpandFlag()"><i ng-class="{\'icon-primary-accordion-plus\': !expandFlag, \'icon-primary-accordion-minus\': expandFlag}" aria-hidden="true"></i>' + firstTdContent + '</button><span id="sup-actNum{{$id}}" style="display:none">{{expandFlag && "Hide row below." || "Show row below."}}</span>';\r
-                        toggleButtonTemplate = $compile(toggleButtonTemplate)(scope);\r
-                        firstTd.html('');\r
-                        firstTd.prepend(toggleButtonTemplate);\r
-\r
-                        var template = $templateCache.get('b2bTemplate/tables/b2bResponsiveRow.html');\r
-                        template = $compile(template)(scope);\r
-                        elem.after(template);\r
-                    }, 100);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bResponsiveList', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '^b2bTable',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                scope.columnIndex = parseInt(attr.b2bResponsiveList, 10);\r
-                scope.isVisible = function () {\r
-                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableBody', ['$filter', '$timeout', 'b2bTableConfig', function ($filter, $timeout, b2bTableConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: ['^b2bTable', '?^b2bResponsiveRow'],\r
-            scope: true,\r
-            replace: true,\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/tables/b2bTableBody.html',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var b2bTableCtrl = ctrl[0];\r
-                var b2bResponsiveRowCtrl = ctrl[1];\r
-                var highlightSearchStringClass = b2bTableConfig.highlightSearchStringClass;\r
-                var searchString = "";\r
-                var wrapElement = function (elem) {\r
-                    var text = elem.text();\r
-                    elem.html($filter('b2bHighlight')(text, searchString, highlightSearchStringClass));\r
-                };\r
-                var traverse = function (elem) {\r
-                    var innerHtml = elem.children();\r
-                    if (innerHtml.length > 0) {\r
-                        for (var i = 0; i < innerHtml.length; i++) {\r
-                            traverse(innerHtml.eq(i));\r
-                        }\r
-                    } else {\r
-                        wrapElement(elem);\r
-                        return;\r
-                    }\r
-                };\r
-                var clearWrap = function (elem) {\r
-                    var elems = elem.find('*');\r
-                    for (var i = 0; i < elems.length; i++) {\r
-                        if (elems.eq(i).attr('class') && elems.eq(i).attr('class').indexOf(highlightSearchStringClass) !== -1) {\r
-                            var text = elems.eq(i).text();\r
-                            elems.eq(i).replaceWith(text);\r
-                        }\r
-                    }\r
-                };\r
-                if (b2bResponsiveRowCtrl) {\r
-                    scope.columnIndex = b2bResponsiveRowCtrl.getIndex();\r
-                    scope.isHidden = function () {\r
-                        return (b2bTableCtrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                    };\r
-                }\r
-                $timeout(function () {\r
-                    var actualHtml = elem.children();\r
-                    scope.$watch(function () {\r
-                        return b2bTableCtrl.getSearchString();\r
-                    }, function (val) {\r
-                        searchString = val;\r
-                        clearWrap(elem);\r
-                        if (actualHtml.length > 0) {\r
-                            traverse(elem);\r
-                        } else {\r
-                            wrapElement(elem);\r
-                        }\r
-                    });\r
-                    if (b2bResponsiveRowCtrl) {\r
-                        b2bResponsiveRowCtrl.setRowValues(elem.html());\r
-                    }\r
-                }, 50);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableSort', ['b2bTableConfig','$timeout', function (b2bTableConfig,$timeout) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            require: '^b2bTable',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var initialSort = '',\r
-                    nextSort = '',\r
-                    tempsort = '';\r
-                initialSort = attr.initialSort;\r
-\r
-                scope.sortTable = function (msg) {\r
-                    $timeout(function(){\r
-                        if (nextSort.length > 0) {\r
-\r
-                        if (nextSort === 'd' || nextSort === 'D') {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, true, true);\r
-                            nextSort = 'a';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                            \r
-                        } else {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, false, true);\r
-                            nextSort = 'd';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                        }\r
-                    } else if (initialSort.length > 0) {\r
-\r
-                        if (initialSort === 'd' || initialSort === 'D') {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, true, true);\r
-                            nextSort = 'a';\r
-                            $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                             \r
-                        } else {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, false, true);\r
-                            nextSort = 'd';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-\r
-                             \r
-                        }\r
-                    }\r
-                    },10)\r
-\r
-                };\r
-\r
-                scope.sortDropdown = function(msg) {\r
-\r
-                    if(tempsort==='') {\r
-\r
-                        tempsort='a'\r
-                    }\r
-                    if(tempsort === 'd' || tempsort === 'D' ) {\r
-                        ctrl.sortData(msg, true, false);       \r
-                    } else {\r
-                       ctrl.sortData(msg, false, false);\r
-                    }\r
-\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tabs\r
- *\r
- * @description\r
- *  <file src="src/tabs/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-tabset tab-id-selected="activeTabsId">\r
-        <b2b-tab ng-repeat="tab in gTabs" tab-item="tab" \r
-                 id="{{tab.uniqueId}}" aria-controls="{{tab.tabPanelId}}"\r
-                 ng-disabled="tab.disabled">\r
-            {{tab.title}}\r
-        </b2b-tab>\r
-    </b2b-tabset>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tabs/docs/demo.html" />\r
-            <file src="src/tabs/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.tabs', ['b2b.att.utilities'])\r
-    .directive('b2bTabset', function () {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            scope: {\r
-                tabIdSelected: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/tabs/b2bTabset.html',\r
-            controller: ['$scope', function ($scope) {\r
-\r
-                this.setTabIdSelected = function (tab) {\r
-                    $scope.tabIdSelected = tab.id;\r
-                };\r
-\r
-                this.getTabIdSelected = function () {\r
-                    return $scope.tabIdSelected;\r
-                };\r
-            }]\r
-        };\r
-    })\r
-    .directive('b2bTab', ['keymap', function (keymap) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            require: '^b2bTabset',\r
-            scope: {\r
-                tabItem: "="\r
-            },\r
-            templateUrl: 'b2bTemplate/tabs/b2bTab.html',\r
-            controller: [function(){}],\r
-            link: function (scope, element, attr, b2bTabsetCtrl) {\r
-\r
-                if (scope.tabItem && !scope.tabItem.disabled) {\r
-                    scope.tabItem.disabled = false;\r
-                }\r
-\r
-                scope.isTabActive = function () {\r
-                    return (scope.tabItem.id === b2bTabsetCtrl.getTabIdSelected());\r
-                };\r
-\r
-                scope.clickTab = function () {\r
-                    if (attr.disabled) {\r
-                        return;\r
-                    }\r
-                    b2bTabsetCtrl.setTabIdSelected(scope.tabItem);\r
-                };\r
-\r
-                scope.nextKey = function () {\r
-                    var el = angular.element(element[0])[0];\r
-                    var elementToFocus = null;\r
-                    while (el && el.nextElementSibling) {\r
-                        el = el.nextElementSibling;\r
-                        if (!el.querySelector('a').disabled) {\r
-                            elementToFocus = el.querySelector('a');\r
-                            break;\r
-                        }\r
-                    }\r
-\r
-                    if (!elementToFocus) {\r
-                        var childTabs = element.parent().children();\r
-                        for (var i = 0; i < childTabs.length; i++) {\r
-                            if (!childTabs[i].querySelector('a').disabled) {\r
-                                elementToFocus = childTabs[i].querySelector('a');\r
-                                break;\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    if (elementToFocus) {\r
-                        elementToFocus.focus();\r
-                    }\r
-                };\r
-\r
-                scope.previousKey = function () {\r
-                    var el = angular.element(element[0])[0];\r
-                    var elementToFocus = null;\r
-\r
-                    while (el && el.previousElementSibling) {\r
-                        el = el.previousElementSibling;\r
-                        if (!el.querySelector('a').disabled) {\r
-                            elementToFocus = el.querySelector('a');\r
-                            break;\r
-                        }\r
-                    }\r
-\r
-                    if (!elementToFocus) {\r
-                        var childTabs = element.parent().children();\r
-                        for (var i = childTabs.length - 1; i > 0; i--) {\r
-                            if (!childTabs[i].querySelector('a').disabled) {\r
-                                elementToFocus = childTabs[i].querySelector('a');\r
-                                break;\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    if (elementToFocus) {\r
-                        elementToFocus.focus();\r
-                    }\r
-                };\r
-\r
-                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {\r
-\r
-                    if (!(evt.keyCode)) {\r
-                        evt.keyCode = evt.which;\r
-                    }\r
-\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.RIGHT:\r
-                            evt.preventDefault();\r
-                            scope.nextKey();\r
-                            break;\r
-\r
-                        case keymap.KEY.LEFT:\r
-                            evt.preventDefault();\r
-                            scope.previousKey();\r
-                            break;\r
-\r
-                        default:;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:tagBadges\r
- *\r
- * @description\r
- *  <file src="src/tagBadges/docs/readme.md" />\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tagBadges/docs/demo.html" />\r
-            <file src="src/tagBadges/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tagBadges', ['b2b.att.utilities'])\r
-        .directive('b2bTagBadge',['$timeout',function($timeout){\r
-            return{\r
-                restrict: 'EA',\r
-                link: function(scope,elem,attr,ctrl){\r
-                    elem.addClass('b2b-tags');\r
-                    if(angular.element(elem[0].querySelector('.icon-primary-close')).length>0) {\r
-                        var item = angular.element(elem[0].querySelector('.icon-primary-close'));\r
-                        item.bind('click',function(){\r
-                        elem.css({'height':'0','width':'0','padding':'0','border':'0'});\r
-                        elem.attr('tabindex','0');\r
-                        elem[0].focus();\r
-                        item.parent().remove();\r
-                        elem[0].bind('blur',function(){\r
-                            elem[0].remove();\r
-                        });\r
-                    });  \r
-                    }\r
-                  \r
-\r
-\r
-\r
-                }\r
-            };   \r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:textArea\r
- *\r
- * @description\r
- *  <file src="src/textArea/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <textarea b2b-reset b2b-reset-textarea ng-model="textAreaModel" ng-disabled="disabled" ng-trim="false" placeholder="{{placeholderText}}" rows="{{textAreaRows}}" maxlength="{{textAreaMaxlength}}" role="textarea"></textarea>\r
- *\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/textArea/docs/demo.html" />\r
-            <file src="src/textArea/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.textArea', ['b2b.att.utilities'])\r
-\r
-.directive('b2bResetTextarea', [ function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'b2bReset',\r
-        link: function (scope, element, attrs, ctrl) {\r
-\r
-            var resetButton = ctrl.getResetButton();\r
-            \r
-            var computeScrollbarAndAddClass = function () {\r
-                if (element.prop('scrollHeight') > element[0].clientHeight) {\r
-                    element.addClass('hasScrollbar');\r
-                } else {\r
-                    element.removeClass('hasScrollbar');\r
-                }\r
-            };\r
-            \r
-            computeScrollbarAndAddClass();\r
-\r
-            element.on('focus keyup', function(){\r
-                computeScrollbarAndAddClass();\r
-            });\r
-        }\r
-    };\r
-}]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:tooltipsForForms\r
- *\r
- * @description\r
- *  <file src="src/tooltipsForForms/docs/readme.md" />\r
- *\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/tooltipsForForms/docs/demo.html" />\r
- <file src="src/tooltipsForForms/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.tooltipsForForms', ['b2b.att.utilities'])\r
-        .directive('b2bTooltip', ['$document', '$window', '$isElement', function ($document, $window, $isElement) {\r
-                return  {\r
-                    restrict: 'A',\r
-                    link: function (scope, elem, attr, ctrl) {\r
-                        var icon = elem[0].querySelector('a.tooltip-element');\r
-                        var btnIcon = elem[0].querySelector('.btn.tooltip-element');\r
-                        var tooltipText = elem[0].querySelector('.helpertext');\r
-                        var tooltipWrapper = elem[0].querySelector('.tooltip-size-control');\r
-                        if (elem.hasClass('tooltip-onfocus')) {\r
-                            var inputElm = angular.element(elem[0].querySelector("input"));\r
-                            var textAreaElm = angular.element(elem[0].querySelector("textarea"));\r
-                        }\r
-                        angular.element(icon).attr({'aria-expanded': false});\r
-                        angular.element(btnIcon).attr({'aria-expanded': false});\r
-                        var calcTooltip = function () {\r
-                            if (!elem.hasClass('tooltip active')) {\r
-                                if (elem.hasClass('tooltip-onfocus')) {\r
-                                    angular.element(elem[0].querySelector("input")).triggerHandler('focusout');\r
-                                }\r
-                                if (elem.hasClass('tooltip-onclick')) {\r
-                                    return false;\r
-                                }\r
-                                angular.element(icon).removeClass('active');\r
-                                angular.element(icon).attr({'aria-expanded': true});\r
-                                angular.element(icon).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                                angular.element(tooltipText).attr({'aria-hidden': false});\r
-                                elem.addClass('active');\r
-\r
-                                var tooltipIconPos = angular.element(icon).prop('offsetLeft'),\r
-                                        tooltipPosition = angular.element(tooltipText).prop('offsetWidth') / 2,\r
-                                        tipOffset = (tooltipIconPos - 30) - tooltipPosition,\r
-                                        maxRightPos = (($window.innerWidth - 72) - (tooltipPosition * 2)) - 14.5;\r
-\r
-                                if ($window.innerWidth >= '768') {\r
-                                    if (tipOffset < 0) {// if icon on far left side of page\r
-                                        tipOffset = 15;\r
-                                    }\r
-                                    else if (tooltipIconPos > maxRightPos) {// if icon is far right side of page\r
-                                        tipOffset = maxRightPos;\r
-                                    }\r
-                                    else {// if tooltip in the middle somewhere\r
-                                        tipOffset = tipOffset;\r
-                                    }\r
-                                    angular.element(tooltipWrapper).css({left: tipOffset + 'px'});\r
-                                }\r
-                            }\r
-                        };\r
-                        \r
-                        // TOOLTIP LINK ONCLICK AND FOCUS\r
-                        angular.element(icon).on('click mouseover mouseout focus blur', function (e) {\r
-                            if (e.type == 'mouseover') {\r
-                                calcTooltip();\r
-                            }\r
-                            else if (e.type == 'mouseout' && elem.hasClass('active')) {\r
-                                if (!elem.hasClass('activeClick')) {\r
-                                    angular.element(tooltipText).attr({\r
-                                        'aria-hidden': true,\r
-                                        'tabindex': '-1'\r
-                                    });\r
-                                    elem.removeClass('active');\r
-                                } else if (elem.hasClass('activeClick') && navigator.userAgent.match(/iphone/i)) {\r
-                                    elem.removeClass('active activeClick');\r
-                                }\r
-                            }\r
-\r
-                            else {\r
-                                if (elem.hasClass('activeClick')) {\r
-                                    angular.element(icon).attr({'aria-expanded': false});\r
-                                    angular.element(tooltipText).attr({'aria-hidden': true});\r
-                                    angular.element(icon).removeAttr('aria-describedby');\r
-                                    elem.removeClass('activeClick active');\r
-                                    e.preventDefault();\r
-                                }\r
-                                else if (e.type == 'click') {\r
-                                    elem.addClass('activeClick');\r
-                                    calcTooltip();\r
-                                    e.preventDefault();\r
-                                }\r
-                                else {\r
-                                    angular.element(icon).on('keydown', function (e) {\r
-                                        if (e.keyCode == '32') {\r
-                                            (elem.hasClass('active')) ? elem.removeClass('active') : elem.addClass('value');\r
-                                            angular.element(icon).triggerHandler('click');\r
-                                            e.preventDefault();\r
-                                        } else if (e.keyCode == '27') {\r
-                                            (elem.hasClass('active')) ? elem.removeClass('active activeClick') : elem.addClass('value');\r
-                                        }\r
-                                    });\r
-                                    e.preventDefault();\r
-                                }\r
-                            }\r
-                            e.preventDefault();\r
-                        });\r
-\r
-                        // TOOLTIP BUTTON INSIDE A TEXT FIELD\r
-                        angular.element(btnIcon).on('click', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                elem.removeClass('active');\r
-                                $this.removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                $this.attr({'aria-expanded': 'false'});\r
-                                $this.removeAttr('aria-describedby');\r
-                            } else {\r
-                                elem.addClass('active');\r
-                                $this.addClass('active');\r
-                                $this.attr({'aria-expanded': 'true', 'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                                angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            }\r
-                        });\r
-\r
-                        angular.element(btnIcon).on('blur', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                elem.removeClass('active');\r
-                                $this.removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                $this.attr({'aria-expanded': 'false'});\r
-                                $this.removeAttr('aria-describedby');\r
-                            }\r
-                        });  \r
-\r
-                        angular.element(btnIcon).on('keydown', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if (e.keyCode == '27') {\r
-                                var $this = angular.element(this);\r
-                                if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                    elem.removeClass('active');\r
-                                    $this.removeClass('active');\r
-                                    angular.element(tooltipText).removeAttr('aria-live');\r
-                                    $this.attr({'aria-expanded': 'false'});\r
-                                    $this.removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        // close all tooltips if clicking something else\r
-                        $document.bind('click', function (e) {\r
-                            var isElement = $isElement(angular.element(e.target), elem, $document);\r
-                            if (!isElement) {\r
-                                elem.removeClass('active');\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).attr({'aria-expanded': 'false'});\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).removeAttr('aria-describedby');\r
-                            };\r
-                        });\r
-\r
-                        angular.element(inputElm).on('keydown', function (e) {\r
-                            if (e.keyCode == '27'){\r
-                                elem.removeClass('active');\r
-                                angular.element(tooltipText).css('display', 'none');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-\r
-                                if (angular.element(this).attr('aria-describedby') === undefined){\r
-\r
-                                }\r
-\r
-                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){\r
-\r
-                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);\r
-\r
-                                    angular.element(this).attr('aria-describedby', describedByValue);\r
-\r
-                                }\r
-                                else {\r
-                                    angular.element(this).removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        angular.element(textAreaElm).on('keydown', function (e) {\r
-                            if (e.keyCode == '27'){\r
-                                elem.removeClass('active');\r
-                                angular.element(tooltipText).css('display', 'none');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                if (angular.element(this).attr('aria-describedby') === undefined){\r
-\r
-                                }\r
-\r
-                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){\r
-\r
-                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);\r
-\r
-                                    angular.element(this).attr('aria-describedby', describedByValue);\r
-\r
-                                }\r
-                                else {\r
-                                    angular.element(this).removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXT FIELD\r
-                        angular.element(inputElm).on('focus', function (e) {\r
-                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');\r
-                            for (var i = 0; i < allTooltip.length; i++) {\r
-                                if (angular.element(allTooltip[i]).hasClass('active')) {\r
-                                    angular.element(allTooltip[i]).triggerHandler('click');\r
-                                }\r
-                            };\r
-                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                            angular.element(tooltipText).css('display', 'block');\r
-                            angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            elem.addClass('active');\r
-                        });\r
-                        angular.element(inputElm).on('blur', function (e) {\r
-                            elem.removeClass('active');\r
-                            angular.element(tooltipText).css('display', 'none');\r
-                            angular.element(tooltipText).removeAttr('aria-live');\r
-                            angular.element(this).removeAttr('aria-describedby');\r
-                        });\r
-\r
-                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXTAREA\r
-                        angular.element(textAreaElm).on('focus', function (e) {\r
-                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');\r
-                            for (var i = 0; i < allTooltip.length; i++) {\r
-                                if (angular.element(allTooltip[i]).hasClass('active')) {\r
-                                    angular.element(allTooltip[i]).triggerHandler('click');\r
-                                }\r
-                            };\r
-                            elem.addClass('active');\r
-                            angular.element(tooltipText).css('display', 'block');\r
-                            angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                        });\r
-                        angular.element(textAreaElm).on('blur', function (e) {\r
-                            elem.removeClass('active');\r
-                            angular.element(tooltipText).css('display', 'none');\r
-                            angular.element(tooltipText).removeAttr('aria-live');\r
-                            angular.element(this).removeAttr('aria-describedby');\r
-                        });\r
-                    }\r
-                };\r
-            }]); \r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:TreeNavigation\r
- *\r
- *\r
- * @scope\r
- * @param {String} setRole - This value needs to be "tree". This is required to incorporate CATO requirements.\r
- * @param {Boolean} groupIt - This value needs to be "false" for top-level tree rendered.\r
- *\r
- * @description\r
- *  <file src="src/treeNav/docs/readme.md" />\r
- *\r
- * @usage\r
- *      <div class="b2b-tree">\r
- *                <b2b-tree-nav collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-nav>\r
- *            </div>\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/treeNav/docs/demo.html" />\r
-            <file src="src/treeNav/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.treeNav', ['b2b.att.utilities'])\r
-    .directive('b2bTreeNav', function () {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                collection: '=',\r
-                groupIt: '=',\r
-                setRole: '@'\r
-            },\r
-            templateUrl: function (element, attrs) {\r
-                if (attrs.groupIt === 'true') {\r
-                    return "b2bTemplate/treeNav/groupedTree.html";\r
-                } else {\r
-                    return "b2bTemplate/treeNav/ungroupedTree.html";\r
-                }\r
-            },\r
-            link: function (scope) {               \r
-                if (!(scope.setRole === 'tree')) {\r
-                    scope.setRole = 'group';\r
-                }             \r
-            }\r
-        }\r
-    })\r
-    .directive('b2bMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                member: '=',\r
-                groupIt: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/treeNav/treeMember.html',\r
-            link: function (scope, element, attrs) {\r
-                scope.elemArr = [];\r
-                var removeRootTabIndex = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {\r
-                        elem.attr('tabindex', -1);                        \r
-                        return;\r
-                    }\r
-                    removeRootTabIndex(elem.parent());\r
-                };\r
-                scope.$watch('member.child', function(newVal, oldVal){                  \r
-                    if(newVal !== oldVal){\r
-                        scope.showChild();\r
-                    };\r
-                });\r
-                scope.showChild = function () {\r
-                        if (!element.hasClass('grouped')) {\r
-                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {\r
-                                scope.groupIt = false;\r
-                                element.addClass('grouped');\r
-                                element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('aria-selected', true);\r
-                                    element.attr('tabindex', 0);\r
-                                    removeRootTabIndex(element);\r
-                                };\r
-                                if(scope.member.active && scope.member.active == undefined){\r
-                                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {\r
-                                element.addClass('grouped');\r
-                                scope.groupIt = true;\r
-                                // FILTER - GROUPBY - APPROACH \r
-                                var j = 0;\r
-                                var grpName = '';\r
-                                if(scope.member.child[0].groupName !== undefined){\r
-                                    grpName = scope.member.child[0].groupName;\r
-                                }\r
-                                else{\r
-                                    var toSlice = scope.member.child[0].name.search(' ');\r
-                                    grpName = scope.member.child[0].name.slice(0, toSlice);\r
-                                }\r
-\r
-                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {\r
-                                    j = 0;\r
-                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        \r
-                                        if (j === scope.member.child.length) {\r
-                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            break;\r
-                                            \r
-                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){\r
-                                                scope.member.child[j-1].activeGrp = true;\r
-                                            };\r
-                                            \r
-                                        }\r
-                                        if (i + scope.member.divide > scope.member.child.length) {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-\r
-                                        } else {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-                                        }\r
-                                    }\r
-                                }\r
-                                if(scope.member.divide){\r
-                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                } else {\r
-                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                }\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('aria-selected', true);\r
-                                };\r
-                                if( scope.member.active && scope.member.active == undefined){\r
-                                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            }\r
-                        }\r
-                };\r
-                //Below condition opens node for opening on json load.\r
-                if(scope.member.active && scope.member.active == true){\r
-                    scope.showChild();\r
-                };\r
-                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){\r
-                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                }\r
-                else if(scope.member.child == undefined){\r
-                    element.find('i').eq(0).addClass('icon-primary-circle');\r
-                };\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.ENTER:\r
-                            if (element.hasClass('bg') && scope.member.onSelect !== undefined) {\r
-                                scope.member.onSelect(scope.member);\r
-                            }\r
-                            evt.stopPropagation();\r
-                            break;\r
-                        default: \r
-                            break;                            \r
-                    }\r
-                    \r
-                });\r
-                //else getting true in every case .. so better use switch case .. that makes more sense you dumb.\r
-                element.bind('click', function (evt) {\r
-                    scope.showChild();\r
-                    var expandFunc = scope.member.onExpand;\r
-                    \r
-                    //onSelect\r
-                        if (element.hasClass('bg') && scope.member.onSelect !== undefined) {\r
-                                    scope.member.onSelect(scope.member);\r
-                                }\r
-                        if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {\r
-                           var eValue = scope.member.onExpand(scope.member);\r
-                        }\r
-                        if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {\r
-                            scope.member.onCollapse(scope.member);\r
-                        }\r
-                });\r
-            }\r
-        }\r
-}])\r
-    .directive('b2bTreeLink', ['keymap', '$timeout', function (keymap, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            link: function (scope, element, attr, ctrl) {\r
-                var rootE, parentE, upE, downE;\r
-                var closeOthersUp = function (elem,isKeyPress,passiveClose) {\r
-                    //For accordion functionality on sibling nodes\r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem,isKeyPress,passiveClose);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg') && !isKeyPress) {\r
-                        elem.removeClass('bg');\r
-                        if (elem.attr('aria-selected')) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }                        \r
-                    }\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling),isKeyPress);\r
-                    }\r
-                };\r
-                var closeOthersDown = function (elem,isKeyPress,passiveClose) {\r
-                    //For accordion functionality on sibling nodes\r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem,isKeyPress,passiveClose);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg') && !isKeyPress) {\r
-                        elem.removeClass('bg');\r
-                        if (elem.attr('aria-selected')) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }                        \r
-                    }\r
-                    if (elem[0].nextElementSibling !== null) {\r
-                        closeOthersDown(angular.element(elem[0].nextElementSibling),isKeyPress);\r
-                    }\r
-                };\r
-\r
-               \r
-                var removeBackground = function(elem){\r
-\r
-                    if(elem.hasClass('b2b-tree')){\r
-                        angular.element(elem[0].getElementsByClassName('bg')).removeClass('bg');\r
-                        return;\r
-                    }else{\r
-                        removeBackground(elem.parent().parent());\r
-                    }\r
-\r
-                };\r
-\r
-/**\r
-* These two functions used for setting heights on parent nodes as the child node closes\r
-* Retaining this code for future reference\r
-\r
-                var addParentHeight = function(e, h) {\r
-                    var parentLi = e.parent().parent();\r
-                    var parentUl = e.parent();\r
-                    if(!parentLi.hasClass('b2b-tree')) {\r
-                        var addHeight = parentUl[0].offsetHeight + h;\r
-                        parentLi.find('ul').eq(0).css({\r
-                            height: addHeight+'px'\r
-                        })\r
-                        addParentHeight(parentLi, h);\r
-                    }                    \r
-                };\r
-\r
-                var removeParentHeight = function(e, h) {\r
-                    var parentLi = e.parent().parent();\r
-                    var parentUl = e.parent();\r
-                    if(!parentLi.hasClass('b2b-tree')) {\r
-                        var addHeight = parentUl[0].offsetHeight - h;\r
-                        parentLi.find('ul').eq(0).css({\r
-                            height: addHeight+'px'\r
-                        })\r
-                        removeParentHeight(parentLi, h);\r
-                    }\r
-                };\r
-*/          \r
-\r
-            // isKeyPress - to notify that the function is called by Right Key press\r
-            // passiveClose -  prevents firing of oncollapse events during the action\r
-            // of expand function(check the function definition)\r
-\r
-                var activeToggle = function (elem,isKeyPress,passiveClose) {\r
-                    var element = elem.find('a').eq(0);\r
-                    if (element.hasClass('active')) {\r
-                        if(!isKeyPress){\r
-                            elem.removeClass('bg');\r
-                        }\r
-                        \r
-                        if (elem.attr('aria-selected') && !isKeyPress) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }\r
-                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(isKeyPress && scope.member){\r
-                                if (scope.member.onCollapse !== undefined && !passiveClose) {\r
-                                    scope.member.onCollapse(scope.member);\r
-                                }\r
-                            }\r
-                            element.removeClass('active');\r
-                            elem.attr('aria-expanded', 'false');\r
-                            element.find('i').eq(0).removeClass('icon-primary-expanded');\r
-                            element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                            //For Animation: below commented code is used to manually set height of UL to zero \r
-                            //retaining code for future reference\r
-                            /*\r
-                            var totalHeight = elem.find('ul')[0].scrollHeight;\r
-                            removeParentHeight(elem, totalHeight);\r
-                            elem.find('ul').eq(0).css({\r
-                                height: null\r
-                            });*/\r
-                        }\r
-                    } else {\r
-                        if(!isKeyPress){\r
-                            elem.addClass('bg');\r
-                            elem.attr('aria-selected', 'true');\r
-                        }\r
-                        \r
-                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(isKeyPress){\r
-                                if(typeof scope.showChild === 'function' ){\r
-                                scope.showChild();\r
-                                }\r
-                                if(scope.member){\r
-                                    if (scope.member.onExpand !== undefined) {\r
-                                        scope.member.onExpand(scope.member);\r
-                                    }\r
-                                }\r
-                            }\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            element.find('i').eq(0).addClass('icon-primary-expanded');\r
-                            //For Animation: below commented code is used to manually set height of the ul generatedon the click of parent LI.\r
-                            //retaining code for future reference\r
-                            /*                            \r
-                            var totalHeight = elem.find('ul')[0].scrollHeight;\r
-                            addParentHeight(elem, totalHeight);\r
-                            elem.find('ul').eq(0).css({\r
-                                height: totalHeight+'px'\r
-                            });*/\r
-                            \r
-                        }\r
-                    }\r
-                };\r
-                element.bind('click', function (evt) {\r
-                    //first we close others and then we open the clicked element\r
-                    if (element[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                    }\r
-                    if (element[0].nextElementSibling) {\r
-                        closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                    }\r
-                    removeBackground(element);\r
-                    activeToggle(element);                    \r
-                    \r
-                    evt.stopPropagation();                    \r
-                });\r
-                //default root tree element tabindex set zero\r
-                if (element.parent().parent().hasClass('b2b-tree') && (element.parent()[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                //check root via class\r
-                var isRoot = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {\r
-                        return true;\r
-                    } else {\r
-                        return false;\r
-                    }\r
-                };\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    findRoot(elem.parent());\r
-                };\r
-\r
-                var findPreActive = function (elem) {\r
-\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-\r
-                var findUp = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        upE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                        if (upE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(upE.find('a').eq(0));\r
-                        }\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                };\r
-\r
-                var downElement = function (elem) {\r
-                    if (elem.next().hasClass('tree-hide')) {\r
-                        downElement(elem.next());\r
-                    } else {\r
-                        downE = elem.next();\r
-                    }\r
-                }\r
-                var isBottomElem = false;\r
-                var downParent = function(liElem){\r
-                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree')){\r
-                        isBottomElem = true;\r
-                        return;\r
-                    }\r
-                    if(liElem.next().length !== 0){\r
-                        downE = liElem.next().eq(0);\r
-                        return;\r
-                    }\r
-                    else {\r
-                        downParent(liElem.parent().parent());\r
-                    }\r
-                }\r
-                \r
-                var findDown = function (elem) {\r
-                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {\r
-                        downE = elem.parent();\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                        if (downE.hasClass('tree-hide')) {\r
-                            downElement(downE);\r
-                        }\r
-\r
-                    } else {\r
-                        downParent(elem.parent());\r
-                        if(isBottomElem === true){\r
-                            downE = elem.parent();\r
-                            isBottomElem = false;\r
-                        }\r
-                    }\r
-                };\r
-\r
-\r
-                var resetTabPosition = function(element){\r
-                    findRoot(element);\r
-                    angular.element(rootE.parent().parent()[0].querySelector("li[tabindex='0']")).attr('tabindex','-1');\r
-                    var elemToFocus =  rootE.parent().parent()[0].querySelector(".bg")|| rootE;\r
-\r
-                    angular.element(elemToFocus).attr('tabindex','0');\r
-                };\r
-                // Function to control the expansion of nodes when the user tabs into the tree and\r
-                // the slected node is not visible\r
-                var expand = function(elemArr){\r
-                    var elem= elemArr.pop();\r
-                    var element = elem.find('a').eq(0);                    \r
-                    var selectedNode = elem.parent().parent()[0].querySelector(".bg");\r
-                    if(selectedNode != null){\r
-                        while(elem){\r
-                             element = elem.find('a').eq(0);\r
-                    if(!element.hasClass('active') ){\r
-\r
-\r
-                    if (elem[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling),true,true);\r
-                        }\r
-                        if (elem[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(elem[0].nextElementSibling),true,true);\r
-                        }\r
-\r
-                         if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(typeof scope.showChild === 'function' ){\r
-                                scope.showChild();\r
-                            }\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            element.find('i').eq(0).addClass('icon-primary-expanded');\r
-                            }\r
-                          \r
-                          }   \r
-                          elem = elemArr.pop();\r
-                        }                      \r
-                        \r
-                    }else{\r
-                        return;\r
-                    }                   \r
-                };\r
-\r
-                element.find('a').eq(0).bind('mouseenter', function (evt) {\r
-                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {\r
-                        angular.element(value).removeClass('activeTooltip') \r
-                    });\r
-                    element.addClass('activeTooltip');\r
-                });\r
-                element.find('a').eq(0).bind('mouseleave', function (evt) {\r
-                    element.removeClass('activeTooltip');\r
-                });\r
-                element.bind('focus', function (evt) {\r
-                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {\r
-                        angular.element(value).removeClass('activeTooltip') \r
-                    });\r
-                    element.addClass('activeTooltip');\r
-                });\r
-                element.bind('blur', function (evt) {\r
-                    element.removeClass('activeTooltip');\r
-                });\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findRoot(element);\r
-                        rootE.eq(0).attr('tabindex', 0);\r
-                        rootE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation(); \r
-                      \r
-                        if(element.find('a').eq(0).hasClass('active')){\r
-                            if (element[0].previousElementSibling) {\r
-                                closeOthersUp(angular.element(element[0].previousElementSibling),true);\r
-                            }\r
-                            if (element[0].nextElementSibling) {\r
-                                closeOthersDown(angular.element(element[0].nextElementSibling),true);\r
-                             }\r
-                             activeToggle(element,true);\r
-                                return;\r
-                        }\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findUp(element);\r
-                        upE.eq(0).attr('tabindex', 0);\r
-                        upE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(element.find('i').eq(0).hasClass('icon-primary-circle')){\r
-                            break;\r
-                        }    \r
-                        if (!element.find('a').eq(0).hasClass('active')) {\r
-                            if (element[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(element[0].previousElementSibling),true);\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling),true);\r
-                        }\r
-                        activeToggle(element,true);\r
-                    \r
-                        }\r
-                        else {\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();                            \r
-                        }                        \r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.ENTER:\r
-                        var isSelectedElem = element.hasClass('bg');\r
-                        var enterFunc = function(element){\r
-                            if (isSelectedElem) {\r
-                                element.removeClass('bg');\r
-                                if (element.attr('aria-selected')) {\r
-                                    element.attr('aria-selected', 'false');\r
-                                }                        \r
-                            }\r
-                            else {\r
-                                element.addClass('bg');\r
-                                element.attr('aria-selected', 'true');                                   \r
-                            }  \r
-                        };                            \r
-                        if (element[0].previousElementSibling) {\r
-                            closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                        }                   \r
-                        \r
-                        removeBackground(element);\r
-                        enterFunc(element);\r
-                        evt.stopPropagation();                                                      \r
-                        break;\r
-                    case keymap.KEY.TAB:\r
-                        $timeout(function(){\r
-                            resetTabPosition(element);\r
-                        },0);\r
-                         evt.stopPropagation(); \r
-                        \r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            element.bind('keyup',function(evt){\r
-                if(evt.keyCode === keymap.KEY.TAB){\r
-                  \r
-                        var tempElem = element;\r
-                        var elemArr = [];\r
-                        while(!tempElem.hasClass('b2b-tree')){\r
-                            elemArr.push(tempElem);\r
-                            tempElem = tempElem.parent().parent();\r
-                        }\r
-                        elemArr.push(tempElem);\r
-                      \r
-                        expand(elemArr);                    \r
-                }\r
-                 evt.stopPropagation(); \r
-            });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:Tree nodes with checkboxes\r
- *\r
- * @param {String} setRole - The value needs to be "tree". This is required to incorporate CATO requirements.\r
- * @param {boolean} groupIt - The value needs to be "false" for top-level tree rendered. \r
- * @param {Object} collection -  The JSON object of tree to be rendered.\r
- * @description\r
- *  <file src="src/treeNodeCheckbox/docs/readme.md" />\r
- *\r
- * @usage\r
- *      <div class="b2b-tree-checkbox">\r
- *                <b2b-tree-node-checkbox collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-node-checkbox>\r
- *            </div>\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/treeNodeCheckbox/docs/demo.html" />\r
-            <file src="src/treeNodeCheckbox/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.treeNodeCheckbox', ['b2b.att.utilities'])\r
-    .directive('b2bTreeNodeCheckbox', function () {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                collection: '=',\r
-                groupIt: '=',\r
-                setRole: '@'\r
-            },\r
-            templateUrl: function (element, attrs) {\r
-                if (attrs.groupIt === 'true') {\r
-                    return "b2bTemplate/treeNodeCheckbox/groupedTree.html";\r
-                } else {\r
-                    return "b2bTemplate/treeNodeCheckbox/ungroupedTree.html";\r
-                }\r
-            },\r
-            link: function (scope) {\r
-                if (!(scope.setRole === 'tree')) {\r
-                    scope.setRole = 'group';\r
-                }\r
-            }\r
-        }\r
-    })\r
-    .directive('b2bTreeMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                member: '=',\r
-                groupIt: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/treeNodeCheckbox/treeMember.html',\r
-            link: function (scope, element, attrs) {\r
-                scope.elemArr = [];\r
-                var removeRootTabIndex = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {\r
-                        elem.attr('tabindex', -1);                        \r
-                        return;\r
-                    }\r
-                    removeRootTabIndex(elem.parent());\r
-                };\r
-                scope.$watch('member.child', function(newVal, oldVal){                  \r
-                    if(newVal !== oldVal){\r
-                        scope.showChild();\r
-                    };\r
-                });\r
-\r
-                var checkedCount = 0;\r
-                var nonCheckedCount = 0;\r
-                var checkBoxesCount = 0;\r
-\r
-                if(element.find('a').eq(0).find('input')){\r
-                    if(scope.member.indeterminate){\r
-                        element.find('a').eq(0).find('input').prop('indeterminate', true);\r
-                        element.attr('aria-checked',"mixed");\r
-                    }\r
-                    element.attr('aria-checked',scope.member.isSelected);\r
-                }\r
-\r
-                element.find('a').eq(0).find('input').bind('change',function(){\r
-                    scope.member.indeterminate = false;\r
-                    downwardModalUpdate(scope.member);\r
-                    downwardSelection(element);\r
-                    upwardSelection(element);\r
-                    element.attr('aria-checked',scope.member.isSelected);\r
-                     if (scope.member.onSelect !== undefined) {\r
-                        scope.member.onSelect(scope.member);\r
-                    }\r
-                });\r
-\r
-                element.find('a').eq(0).find('input').bind('click',function(){\r
-                    var elem = angular.element(this);\r
-                    if(scope.member.indeterminate){\r
-                        scope.member.indeterminate = false;\r
-                        scope.member.isSelected = true;\r
-                        elem.prop('indeterminate', false);\r
-                        elem.prop('checked', true);\r
-                        elem.triggerHandler('change');\r
-                    }\r
-                });\r
-\r
-                var groupNode = false;\r
-                var checkedTreeNode = false;\r
-\r
-                var isCheckboxSelected = function(elem){\r
-                    checkedTreeNode = false;\r
-                    checkedTreeNode = angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked;\r
-                }\r
-\r
-                var findCheckbox = function(elem){\r
-                    return angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox');\r
-                }\r
-\r
-                var updateGrpNodeCheckboxes = function(elem, checked){\r
-                    angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked = checked;\r
-                }\r
-\r
-                \r
-                var isGroupNode = function(elem){\r
-                    groupNode = false;\r
-                    if(angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.grpTreeCheckbox')){\r
-                        groupNode = true;\r
-                    }\r
-                }\r
-\r
-                var downwardModalUpdate = function(curMember){\r
-                    angular.forEach(curMember.child, function(childMember, key) {\r
-                        childMember.isSelected = curMember.isSelected;\r
-                        childMember.indeterminate = false;\r
-                        if(angular.isArray(childMember.child) && scope.member.child.length > 0){\r
-                            downwardModalUpdate(childMember);\r
-                        }\r
-                    });\r
-                }\r
-\r
-                var downwardSelection = function(elem){\r
-                    if(findCheckbox(elem)){\r
-                        isCheckboxSelected(elem)\r
-                    } \r
-                    if(angular.element(elem).find('ul').length > 0){\r
-                        var childNodes = angular.element(elem).find('ul').eq(0).children('li');\r
-                        for(var i=0; i<childNodes.length; i++){\r
-                            if(findCheckbox(childNodes[i])){\r
-                                isGroupNode(childNodes[i]);\r
-                                angular.element(findCheckbox(childNodes[i])).prop('indeterminate', false);\r
-                                angular.element(childNodes[i]).attr('aria-checked',checkedTreeNode);\r
-                                if(groupNode){\r
-                                    updateGrpNodeCheckboxes(childNodes[i],checkedTreeNode);\r
-                                }else{\r
-                                    angular.element(childNodes[i]).scope().member.isSelected = checkedTreeNode;\r
-                                    angular.element(childNodes[i]).scope().member.indeterminate = false\r
-                                    angular.element(childNodes[i]).scope().$apply();\r
-                                }\r
-                                downwardSelection(childNodes[i]);\r
-                            }\r
-                        }\r
-\r
-                    }\r
-                }\r
-                var upwardSelection = function(elem){\r
-                    var childNodes = elem.parent().parent().find('ul').eq(0).children('li');\r
-                    checkedCount = 0;\r
-                    nonCheckedCount = 0;\r
-                    checkBoxesCount = 0;    \r
-                    for(i=0; i<childNodes.length; i++){\r
-                        if(findCheckbox(childNodes[i])){\r
-                            isGroupNode(childNodes[i]);\r
-                            isCheckboxSelected(childNodes[i]);\r
-                            checkBoxesCount++;\r
-                            if(checkedTreeNode){\r
-                                checkedCount++;\r
-                            }else if(!angular.element(angular.element(angular.element(childNodes[i]).find('a').eq(0))[0].querySelector('input.treeCheckBox')).prop('indeterminate')){\r
-                                nonCheckedCount++;\r
-                            }\r
-                        }\r
-                    }\r
-                    var parentNodeScope;\r
-                    parentNodeScope = angular.element(elem.parent().parent()).scope();\r
-                    if(findCheckbox(elem.parent().parent())){\r
-                        if(nonCheckedCount == checkBoxesCount){\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = false;\r
-                                parentNodeScope.member.indeterminate = false;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),false);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',false);\r
-                        }else if(checkedCount == checkBoxesCount){\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = true;\r
-                                parentNodeScope.member.indeterminate = false;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),true);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',true);\r
-                        }else{\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', true);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = false;\r
-                                parentNodeScope.member.indeterminate = true;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),false);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',"mixed");\r
-                        }\r
-                        if(parentNodeScope &&  parentNodeScope.member){\r
-                            parentNodeScope.$apply();\r
-                        }        \r
-                    }\r
-                    \r
-                    \r
-                    \r
-                    if(elem.parent().parent().attr('role') == "treeitem"){\r
-                        upwardSelection(elem.parent().parent());\r
-                    }\r
-                }\r
-\r
-                scope.showChild = function () {\r
-                        if (!element.hasClass('grouped')) {\r
-                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {\r
-                                scope.groupIt = false;\r
-                                element.addClass('grouped');\r
-                                element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('tabindex', 0);\r
-                                    removeRootTabIndex(element);\r
-                                };\r
-                                if(scope.member.active && scope.member.active == undefined){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {\r
-                                element.addClass('grouped');\r
-                                scope.groupIt = true;\r
-                                var j = 0;\r
-                                var grpName = '';\r
-                                if(scope.member.child[0].groupName !== undefined){\r
-                                    grpName = scope.member.child[0].groupName;\r
-                                }\r
-                                else{\r
-                                    var toSlice = scope.member.child[0].name.search(' ');\r
-                                    grpName = scope.member.child[0].name.slice(0, toSlice);\r
-                                }\r
-\r
-                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {\r
-                                    j = 0;\r
-                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        \r
-                                        if (j === scope.member.child.length) {\r
-                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            break;\r
-                                            \r
-                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){\r
-                                                scope.member.child[j-1].activeGrp = true;\r
-                                            };\r
-                                            \r
-                                        }\r
-                                        if (i + scope.member.divide > scope.member.child.length) {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-\r
-                                        } else {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-                                        }\r
-                                    }\r
-                                }\r
-                                if(scope.member.divide){\r
-                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                } else {\r
-                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                }\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                \r
-                                if( scope.member.active && scope.member.active == undefined){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            }\r
-                        }\r
-                        $timeout(function () {\r
-                            if(!scope.member.indeterminate){\r
-                                downwardSelection(element);\r
-                            }    \r
-                        });  \r
-\r
-                };\r
-                \r
-                if(scope.member.active && scope.member.active == true){\r
-                    scope.showChild();\r
-                };\r
-                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){\r
-                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                }\r
-                else if(scope.member.child == undefined){\r
-                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-circle');\r
-                    if(scope.$parent.$index === 0) {\r
-                        element.find('a').eq(0).append('<span class="first-link"></span>');\r
-                    };\r
-                };\r
-                \r
-                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {\r
-                    scope.showChild();\r
-                    var expandFunc = scope.member.onExpand;\r
-                    if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {\r
-                       var eValue = scope.member.onExpand(scope.member);\r
-                    }\r
-                    if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {\r
-                        scope.member.onCollapse(scope.member);\r
-                    }\r
-                });\r
-\r
-                angular.element(element[0].querySelectorAll('.treeNodeName')).eq(0).bind('click', function (evt) {\r
-\r
-                });\r
-                \r
-            }\r
-        }\r
-}])\r
-    .directive('b2bTreeNodeLink', ['keymap', '$timeout', function (keymap, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            link: function (scope, element, attr, ctrl) {\r
-                var rootE, parentE, upE, downE;\r
-                var closeOthersUp = function (elem) {\r
-                    \r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg')) {\r
-                        elem.removeClass('bg');\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling));\r
-                    }\r
-                };\r
-                var closeOthersDown = function (elem) {\r
-                    \r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg')) {\r
-                        elem.removeClass('bg');\r
-                    }\r
-                    if (elem[0].nextElementSibling !== null) {\r
-                        closeOthersDown(angular.element(elem[0].nextElementSibling));\r
-                    }\r
-                };\r
-\r
-                var removeBackgroundUp = function (elem) {\r
-                    \r
-                    if (elem.hasClass('b2b-tree-checkbox')) {\r
-                        return;\r
-                    } else {\r
-                        elem.parent().parent().removeClass('bg');\r
-                        removeBackgroundUp(elem.parent().parent());\r
-                    }\r
-                };\r
-\r
-                var removeBackgroundDown = function (elem) {\r
-                    \r
-                    angular.element(elem[0].querySelector('.bg')).removeClass('bg');\r
-                };\r
-\r
-\r
-\r
-                var activeToggle = function (elem) {\r
-                    var element = elem.find('a').eq(0);\r
-                    if (element.hasClass('active')) {\r
-                        elem.removeClass('bg');\r
-                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {\r
-                            element.removeClass('active');\r
-                            elem.attr('aria-expanded', 'false');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-expanded');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                        }\r
-                    } else {\r
-                        elem.addClass('bg');\r
-                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-expanded');\r
-                        }\r
-                    }\r
-                };\r
-                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {\r
-                    \r
-                        if (element[0].previousElementSibling) {\r
-                            closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                        }\r
-\r
-                        activeToggle(element);\r
-\r
-                    removeBackgroundDown(element);\r
-                    removeBackgroundUp(element);\r
-                    evt.stopPropagation();                    \r
-                });\r
-                \r
-                if (element.parent().parent().hasClass('b2b-tree-checkbox') && (element.parent()[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                \r
-                var isRoot = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {\r
-                        return true;\r
-                    } else {\r
-                        return false;\r
-                    }\r
-                };\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    findRoot(elem.parent());\r
-                };\r
-\r
-                var findPreActive = function (elem) {\r
-\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-\r
-                var findUp = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        upE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                        if (upE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(upE.find('a').eq(0));\r
-                        }\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                };\r
-\r
-                var downElement = function (elem) {\r
-                    if (elem.next().hasClass('tree-hide')) {\r
-                        downElement(elem.next());\r
-                    } else {\r
-                        downE = elem.next();\r
-                    }\r
-                }\r
-                var isBottomElem = false;\r
-                var downParent = function(liElem){\r
-                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree-checkbox')){\r
-                        isBottomElem = true;\r
-                        return;\r
-                    }\r
-                    if(liElem.next().length !== 0){\r
-                        downE = liElem.next().eq(0);\r
-                        return;\r
-                    }\r
-                    else {\r
-                        downParent(liElem.parent().parent());\r
-                    }\r
-                }\r
-                \r
-                var findDown = function (elem) {\r
-                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {\r
-                        downE = elem.parent();\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                        if (downE.hasClass('tree-hide')) {\r
-                            downElement(downE);\r
-                        }\r
-\r
-                    } else {\r
-                        downParent(elem.parent());\r
-                        if(isBottomElem === true){\r
-                            downE = elem.parent();\r
-                            isBottomElem = false;\r
-                        }\r
-                    }\r
-                };\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findRoot(element);\r
-                        rootE.eq(0).attr('tabindex', 0);\r
-                        rootE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if (!isRoot(element)) {\r
-                            if(element.find('a').eq(0).hasClass('active')){\r
-                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                                return;\r
-                            }\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                        } else {\r
-                            if (element.find('a').eq(0).hasClass('active')) {\r
-                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                            }\r
-                        };\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findUp(element);\r
-                        upE.eq(0).attr('tabindex', 0);\r
-                        upE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')){\r
-                            break;\r
-                        }    \r
-                        if (!element.find('a').eq(0).hasClass('active')) {\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                        }\r
-                        else {\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();                            \r
-                        }                        \r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.SPACE:\r
-                    case keymap.KEY.ENTER:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(angular.isDefined(element.scope().member.isSelected)){\r
-                            element.scope().member.isSelected = !element.scope().member.isSelected;\r
-                            element.scope().member.indeterminate = false;\r
-                            element.scope().$apply();\r
-                            element.find('a').eq(0).find('input').prop('indeterminate', false);\r
-                            element.find('a').eq(0).find('input').triggerHandler('change');\r
-                        }\r
-                        break;    \r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/*!\r
- * VERSION: 1.7.3\r
- * DATE: 2014-01-14\r
- * UPDATES AND DOCS AT: http://www.greensock.com\r
- *\r
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.\r
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for\r
- * Club GreenSock members, the software agreement that was issued with your membership.\r
- * \r
- * @author: Jack Doyle, jack@greensock.com\r
- **/\r
-(window._gsQueue || (window._gsQueue = [])).push( function() {\r
-\r
-    "use strict";\r
-\r
-    var _doc = document.documentElement,\r
-        _window = window,\r
-        _max = function(element, axis) {\r
-            var dim = (axis === "x") ? "Width" : "Height",\r
-                scroll = "scroll" + dim,\r
-                client = "client" + dim,\r
-                body = document.body;\r
-            return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || Math.max(_doc[client], body[client])) : element[scroll] - element["offset" + dim];\r
-        },\r
-\r
-        ScrollToPlugin = window._gsDefine.plugin({\r
-            propName: "scrollTo",\r
-            API: 2,\r
-            version:"1.7.3",\r
-\r
-            //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-            init: function(target, value, tween) {\r
-                this._wdw = (target === _window);\r
-                this._target = target;\r
-                this._tween = tween;\r
-                if (typeof(value) !== "object") {\r
-                    value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".\r
-                }\r
-                this._autoKill = (value.autoKill !== false);\r
-                this.x = this.xPrev = this.getX();\r
-                this.y = this.yPrev = this.getY();\r
-                if (value.x != null) {\r
-                    this._addTween(this, "x", this.x, (value.x === "max") ? _max(target, "x") : value.x, "scrollTo_x", true);\r
-                    this._overwriteProps.push("scrollTo_x");\r
-                } else {\r
-                    this.skipX = true;\r
-                }\r
-                if (value.y != null) {\r
-                    this._addTween(this, "y", this.y, (value.y === "max") ? _max(target, "y") : value.y, "scrollTo_y", true);\r
-                    this._overwriteProps.push("scrollTo_y");\r
-                } else {\r
-                    this.skipY = true;\r
-                }\r
-                return true;\r
-            },\r
-\r
-            //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-            set: function(v) {\r
-                this._super.setRatio.call(this, v);\r
-\r
-                var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,\r
-                    y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,\r
-                    yDif = y - this.yPrev,\r
-                    xDif = x - this.xPrev;\r
-\r
-                if (this._autoKill) {\r
-                    //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.\r
-                    if (!this.skipX && (xDif > 7 || xDif < -7) && x < _max(this._target, "x")) {\r
-                        this.skipX = true; //if the user scrolls separately, we should stop tweening!\r
-                    }\r
-                    if (!this.skipY && (yDif > 7 || yDif < -7) && y < _max(this._target, "y")) {\r
-                        this.skipY = true; //if the user scrolls separately, we should stop tweening!\r
-                    }\r
-                    if (this.skipX && this.skipY) {\r
-                        this._tween.kill();\r
-                    }\r
-                }\r
-                if (this._wdw) {\r
-                    _window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);\r
-                } else {\r
-                    if (!this.skipY) {\r
-                        this._target.scrollTop = this.y;\r
-                    }\r
-                    if (!this.skipX) {\r
-                        this._target.scrollLeft = this.x;\r
-                    }\r
-                }\r
-                this.xPrev = this.x;\r
-                this.yPrev = this.y;\r
-            }\r
-\r
-        }),\r
-        p = ScrollToPlugin.prototype;\r
-\r
-    ScrollToPlugin.max = _max;\r
-\r
-    p.getX = function() {\r
-        return (!this._wdw) ? this._target.scrollLeft : (_window.pageXOffset != null) ? _window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : document.body.scrollLeft;\r
-    };\r
-\r
-    p.getY = function() {\r
-        return (!this._wdw) ? this._target.scrollTop : (_window.pageYOffset != null) ? _window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : document.body.scrollTop;\r
-    };\r
-\r
-    p._kill = function(lookup) {\r
-        if (lookup.scrollTo_x) {\r
-            this.skipX = true;\r
-        }\r
-        if (lookup.scrollTo_y) {\r
-            this.skipY = true;\r
-        }\r
-        return this._super._kill.call(this, lookup);\r
-    };\r
-\r
-}); if (window._gsDefine) { window._gsQueue.pop()(); }\r
-/*!\r
- * VERSION: 1.12.1\r
- * DATE: 2014-06-26\r
- * UPDATES AND DOCS AT: http://www.greensock.com\r
- * \r
- * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin\r
- *\r
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.\r
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for\r
- * Club GreenSock members, the software agreement that was issued with your membership.\r
- * \r
- * @author: Jack Doyle, jack@greensock.com\r
- **/\r
-\r
-(window._gsQueue || (window._gsQueue = [])).push( function() {\r
-\r
-    "use strict";\r
-\r
-    window._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {\r
-\r
-        var _slice = [].slice,\r
-            TweenMax = function(target, duration, vars) {\r
-                TweenLite.call(this, target, duration, vars);\r
-                this._cycle = 0;\r
-                this._yoyo = (this.vars.yoyo === true);\r
-                this._repeat = this.vars.repeat || 0;\r
-                this._repeatDelay = this.vars.repeatDelay || 0;\r
-                this._dirty = true; //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.\r
-                this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            TweenLiteInternals = TweenLite._internals,\r
-            _isSelector = TweenLiteInternals.isSelector,\r
-            _isArray = TweenLiteInternals.isArray,\r
-            p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),\r
-            _blankArray = [];\r
-\r
-        TweenMax.version = "1.12.1";\r
-        p.constructor = TweenMax;\r
-        p.kill()._gc = false;\r
-        TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;\r
-        TweenMax.getTweensOf = TweenLite.getTweensOf;\r
-        TweenMax.lagSmoothing = TweenLite.lagSmoothing;\r
-        TweenMax.ticker = TweenLite.ticker;\r
-        TweenMax.render = TweenLite.render;\r
-\r
-        p.invalidate = function() {\r
-            this._yoyo = (this.vars.yoyo === true);\r
-            this._repeat = this.vars.repeat || 0;\r
-            this._repeatDelay = this.vars.repeatDelay || 0;\r
-            this._uncache(true);\r
-            return TweenLite.prototype.invalidate.call(this);\r
-        };\r
-        \r
-        p.updateTo = function(vars, resetDuration) {\r
-            var curRatio = this.ratio, p;\r
-            if (resetDuration && this._startTime < this._timeline._time) {\r
-                this._startTime = this._timeline._time;\r
-                this._uncache(false);\r
-                if (this._gc) {\r
-                    this._enabled(true, false);\r
-                } else {\r
-                    this._timeline.insert(this, this._startTime - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.\r
-                }\r
-            }\r
-            for (p in vars) {\r
-                this.vars[p] = vars[p];\r
-            }\r
-            if (this._initted) {\r
-                if (resetDuration) {\r
-                    this._initted = false;\r
-                } else {\r
-                    if (this._gc) {\r
-                        this._enabled(true, false);\r
-                    }\r
-                    if (this._notifyPluginsOfEnabled && this._firstPT) {\r
-                        TweenLite._onPluginEvent("_onDisable", this); //in case a plugin like MotionBlur must perform some cleanup tasks\r
-                    }\r
-                    if (this._time / this._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards. \r
-                        var prevTime = this._time;\r
-                        this.render(0, true, false);\r
-                        this._initted = false;\r
-                        this.render(prevTime, true, false);\r
-                    } else if (this._time > 0) {\r
-                        this._initted = false;\r
-                        this._init();\r
-                        var inv = 1 / (1 - curRatio),\r
-                            pt = this._firstPT, endValue;\r
-                        while (pt) {\r
-                            endValue = pt.s + pt.c; \r
-                            pt.c *= inv;\r
-                            pt.s = endValue - pt.c;\r
-                            pt = pt._next;\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-                \r
-        p.render = function(time, suppressEvents, force) {\r
-            if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly.\r
-                this.invalidate();\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                prevTime = this._time,\r
-                prevTotalTime = this._totalTime, \r
-                prevCycle = this._cycle,\r
-                duration = this._duration,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, i;\r
-            if (time >= totalDur) {\r
-                this._totalTime = totalDur;\r
-                this._cycle = this._repeat;\r
-                if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                    this._time = 0;\r
-                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                } else {\r
-                    this._time = duration;\r
-                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;\r
-                }\r
-                if (!this._reversed) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                }\r
-                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.\r
-                        time = 0;\r
-                    }\r
-                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {\r
-                        force = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                }\r
-                \r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = this._cycle = 0;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        if (prevRawPrevTime >= 0) {\r
-                            force = true;\r
-                        }\r
-                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    }\r
-                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\r
-                    force = true;\r
-                }\r
-            } else {\r
-                this._totalTime = this._time = time;\r
-                \r
-                if (this._repeat !== 0) {\r
-                    cycleDuration = duration + this._repeatDelay;\r
-                    this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but Flash reports it as 0.79999999!)\r
-                    if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {\r
-                        this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)\r
-                    }\r
-                    this._time = this._totalTime - (this._cycle * cycleDuration);\r
-                    if (this._yoyo) if ((this._cycle & 1) !== 0) {\r
-                        this._time = duration - this._time;\r
-                    }\r
-                    if (this._time > duration) {\r
-                        this._time = duration;\r
-                    } else if (this._time < 0) {\r
-                        this._time = 0;\r
-                    }\r
-                }\r
-\r
-                if (this._easeType) {\r
-                    r = this._time / duration;\r
-                    type = this._easeType;\r
-                    pow = this._easePower;\r
-                    if (type === 1 || (type === 3 && r >= 0.5)) {\r
-                        r = 1 - r;\r
-                    }\r
-                    if (type === 3) {\r
-                        r *= 2;\r
-                    }\r
-                    if (pow === 1) {\r
-                        r *= r;\r
-                    } else if (pow === 2) {\r
-                        r *= r * r;\r
-                    } else if (pow === 3) {\r
-                        r *= r * r * r;\r
-                    } else if (pow === 4) {\r
-                        r *= r * r * r * r;\r
-                    }\r
-\r
-                    if (type === 1) {\r
-                        this.ratio = 1 - r;\r
-                    } else if (type === 2) {\r
-                        this.ratio = r;\r
-                    } else if (this._time / duration < 0.5) {\r
-                        this.ratio = r / 2;\r
-                    } else {\r
-                        this.ratio = 1 - (r / 2);\r
-                    }\r
-\r
-                } else {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                }\r
-                \r
-            }\r
-                \r
-            if (prevTime === this._time && !force && prevCycle === this._cycle) {\r
-                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._init();\r
-                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.\r
-                    return;\r
-                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true.\r
-                    this._time = prevTime;\r
-                    this._totalTime = prevTotalTime;\r
-                    this._rawPrevTime = prevRawPrevTime;\r
-                    this._cycle = prevCycle;\r
-                    TweenLiteInternals.lazyTweens.push(this);\r
-                    this._lazy = time;\r
-                    return;\r
-                }\r
-                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.\r
-                if (this._time && !isComplete) {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                } else if (isComplete && this._ease._calcEnd) {\r
-                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);\r
-                }\r
-            }\r
-            if (this._lazy !== false) {\r
-                this._lazy = false;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {\r
-                this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.\r
-            }\r
-            if (prevTotalTime === 0) {\r
-                if (this._initted === 2 && time > 0) {\r
-                    //this.invalidate();\r
-                    this._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true\r
-                }\r
-                if (this._startAt) {\r
-                    if (time >= 0) {\r
-                        this._startAt.render(time, suppressEvents, force);\r
-                    } else if (!callback) {\r
-                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.\r
-                    }\r
-                }\r
-                if (this.vars.onStart) if (this._totalTime !== 0 || duration === 0) if (!suppressEvents) {\r
-                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-                }\r
-            }\r
-            \r
-            pt = this._firstPT;\r
-            while (pt) {\r
-                if (pt.f) {\r
-                    pt.t[pt.p](pt.c * this.ratio + pt.s);\r
-                } else {\r
-                    pt.t[pt.p] = pt.c * this.ratio + pt.s;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            \r
-            if (this._onUpdate) {\r
-                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\r
-                }\r
-                if (!suppressEvents) if (this._totalTime !== prevTotalTime || isComplete) {\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-            }\r
-            if (this._cycle !== prevCycle) if (!suppressEvents) if (!this._gc) if (this.vars.onRepeat) {\r
-                this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);\r
-            }\r
-            if (callback) if (!this._gc) { //check gc because there's a chance that kill() could be called in an onUpdate\r
-                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force);\r
-                }\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.\r
-                    this._rawPrevTime = 0;\r
-                }\r
-            }\r
-        };\r
-        \r
-//---- STATIC FUNCTIONS -----------------------------------------------------------------------------------------------------------\r
-        \r
-        TweenMax.to = function(target, duration, vars) {\r
-            return new TweenMax(target, duration, vars);\r
-        };\r
-        \r
-        TweenMax.from = function(target, duration, vars) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return new TweenMax(target, duration, vars);\r
-        };\r
-        \r
-        TweenMax.fromTo = function(target, duration, fromVars, toVars) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return new TweenMax(target, duration, toVars);\r
-        };\r
-        \r
-        TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            stagger = stagger || 0;\r
-            var delay = vars.delay || 0,\r
-                a = [],\r
-                finalComplete = function() {\r
-                    if (vars.onComplete) {\r
-                        vars.onComplete.apply(vars.onCompleteScope || this, arguments);\r
-                    }\r
-                    onCompleteAll.apply(onCompleteAllScope || this, onCompleteAllParams || _blankArray);\r
-                },\r
-                l, copy, i, p;\r
-            if (!_isArray(targets)) {\r
-                if (typeof(targets) === "string") {\r
-                    targets = TweenLite.selector(targets) || targets;\r
-                }\r
-                if (_isSelector(targets)) {\r
-                    targets = _slice.call(targets, 0);\r
-                }\r
-            }\r
-            l = targets.length;\r
-            for (i = 0; i < l; i++) {\r
-                copy = {};\r
-                for (p in vars) {\r
-                    copy[p] = vars[p];\r
-                }\r
-                copy.delay = delay;\r
-                if (i === l - 1 && onCompleteAll) {\r
-                    copy.onComplete = finalComplete;\r
-                }\r
-                a[i] = new TweenMax(targets[i], duration, copy);\r
-                delay += stagger;\r
-            }\r
-            return a;\r
-        };\r
-        \r
-        TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-        \r
-        TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-                \r
-        TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) {\r
-            return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});\r
-        };\r
-        \r
-        TweenMax.set = function(target, vars) {\r
-            return new TweenMax(target, 0, vars);\r
-        };\r
-        \r
-        TweenMax.isTweening = function(target) {\r
-            return (TweenLite.getTweensOf(target, true).length > 0);\r
-        };\r
-        \r
-        var _getChildrenOf = function(timeline, includeTimelines) {\r
-                var a = [],\r
-                    cnt = 0,\r
-                    tween = timeline._first;\r
-                while (tween) {\r
-                    if (tween instanceof TweenLite) {\r
-                        a[cnt++] = tween;\r
-                    } else {\r
-                        if (includeTimelines) {\r
-                            a[cnt++] = tween;\r
-                        }\r
-                        a = a.concat(_getChildrenOf(tween, includeTimelines));\r
-                        cnt = a.length;\r
-                    }\r
-                    tween = tween._next;\r
-                }\r
-                return a;\r
-            }, \r
-            getAllTweens = TweenMax.getAllTweens = function(includeTimelines) {\r
-                return _getChildrenOf(Animation._rootTimeline, includeTimelines).concat( _getChildrenOf(Animation._rootFramesTimeline, includeTimelines) );\r
-            };\r
-        \r
-        TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) {\r
-            if (tweens == null) {\r
-                tweens = true;\r
-            }\r
-            if (delayedCalls == null) {\r
-                delayedCalls = true;\r
-            }\r
-            var a = getAllTweens((timelines != false)),\r
-                l = a.length,\r
-                allTrue = (tweens && delayedCalls && timelines),\r
-                isDC, tween, i;\r
-            for (i = 0; i < l; i++) {\r
-                tween = a[i];\r
-                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {\r
-                    if (complete) {\r
-                        tween.totalTime(tween._reversed ? 0 : tween.totalDuration());\r
-                    } else {\r
-                        tween._enabled(false, false);\r
-                    }\r
-                }\r
-            }\r
-        };\r
-        \r
-        TweenMax.killChildTweensOf = function(parent, complete) {\r
-            if (parent == null) {\r
-                return;\r
-            }\r
-            var tl = TweenLiteInternals.tweenLookup,\r
-                a, curParent, p, i, l;\r
-            if (typeof(parent) === "string") {\r
-                parent = TweenLite.selector(parent) || parent;\r
-            }\r
-            if (_isSelector(parent)) {\r
-                parent = _slice.call(parent, 0);\r
-            }\r
-            if (_isArray(parent)) {\r
-                i = parent.length;\r
-                while (--i > -1) {\r
-                    TweenMax.killChildTweensOf(parent[i], complete);\r
-                }\r
-                return;\r
-            }\r
-            a = [];\r
-            for (p in tl) {\r
-                curParent = tl[p].target.parentNode;\r
-                while (curParent) {\r
-                    if (curParent === parent) {\r
-                        a = a.concat(tl[p].tweens);\r
-                    }\r
-                    curParent = curParent.parentNode;\r
-                }\r
-            }\r
-            l = a.length;\r
-            for (i = 0; i < l; i++) {\r
-                if (complete) {\r
-                    a[i].totalTime(a[i].totalDuration());\r
-                }\r
-                a[i]._enabled(false, false);\r
-            }\r
-        };\r
-\r
-        var _changePause = function(pause, tweens, delayedCalls, timelines) {\r
-            tweens = (tweens !== false);\r
-            delayedCalls = (delayedCalls !== false);\r
-            timelines = (timelines !== false);\r
-            var a = getAllTweens(timelines),\r
-                allTrue = (tweens && delayedCalls && timelines),\r
-                i = a.length,\r
-                isDC, tween;\r
-            while (--i > -1) {\r
-                tween = a[i];\r
-                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {\r
-                    tween.paused(pause);\r
-                }\r
-            }\r
-        };\r
-        \r
-        TweenMax.pauseAll = function(tweens, delayedCalls, timelines) {\r
-            _changePause(true, tweens, delayedCalls, timelines);\r
-        };\r
-        \r
-        TweenMax.resumeAll = function(tweens, delayedCalls, timelines) {\r
-            _changePause(false, tweens, delayedCalls, timelines);\r
-        };\r
-\r
-        TweenMax.globalTimeScale = function(value) {\r
-            var tl = Animation._rootTimeline,\r
-                t = TweenLite.ticker.time;\r
-            if (!arguments.length) {\r
-                return tl._timeScale;\r
-            }\r
-            value = value || _tinyNum; //can't allow zero because it'll throw the math off\r
-            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);\r
-            tl = Animation._rootFramesTimeline;\r
-            t = TweenLite.ticker.frame;\r
-            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);\r
-            tl._timeScale = Animation._rootTimeline._timeScale = value;\r
-            return value;\r
-        };\r
-        \r
-    \r
-//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------\r
-        \r
-        p.progress = function(value) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);\r
-        };\r
-        \r
-        p.totalProgress = function(value) {\r
-            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);\r
-        };\r
-        \r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            if (value > this._duration) {\r
-                value = this._duration;\r
-            }\r
-            if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));\r
-            } else if (this._repeat !== 0) {\r
-                value += this._cycle * (this._duration + this._repeatDelay);\r
-            }\r
-            return this.totalTime(value, suppressEvents);\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect.\r
-            }\r
-            return Animation.prototype.duration.call(this, value);\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    //instead of Infinity, we use 999999999999 so that we can accommodate reverses\r
-                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);\r
-                    this._dirty = false;\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );\r
-        };\r
-        \r
-        p.repeat = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeat;\r
-            }\r
-            this._repeat = value;\r
-            return this._uncache(true);\r
-        };\r
-        \r
-        p.repeatDelay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeatDelay;\r
-            }\r
-            this._repeatDelay = value;\r
-            return this._uncache(true);\r
-        };\r
-        \r
-        p.yoyo = function(value) {\r
-            if (!arguments.length) {\r
-                return this._yoyo;\r
-            }\r
-            this._yoyo = value;\r
-            return this;\r
-        };\r
-        \r
-        \r
-        return TweenMax;\r
-        \r
-    }, true);\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TimelineLite\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {\r
-\r
-        var TimelineLite = function(vars) {\r
-                SimpleTimeline.call(this, vars);\r
-                this._labels = {};\r
-                this.autoRemoveChildren = (this.vars.autoRemoveChildren === true);\r
-                this.smoothChildTiming = (this.vars.smoothChildTiming === true);\r
-                this._sortChildren = true;\r
-                this._onUpdate = this.vars.onUpdate;\r
-                var v = this.vars,\r
-                    val, p;\r
-                for (p in v) {\r
-                    val = v[p];\r
-                    if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) {\r
-                        v[p] = this._swapSelfInParams(val);\r
-                    }\r
-                }\r
-                if (_isArray(v.tweens)) {\r
-                    this.add(v.tweens, 0, v.align, v.stagger);\r
-                }\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            _isSelector = TweenLite._internals.isSelector,\r
-            _isArray = TweenLite._internals.isArray,\r
-            _blankArray = [],\r
-            _globals = window._gsDefine.globals,\r
-            _copy = function(vars) {\r
-                var copy = {}, p;\r
-                for (p in vars) {\r
-                    copy[p] = vars[p];\r
-                }\r
-                return copy;\r
-            },\r
-            _pauseCallback = function(tween, callback, params, scope) {\r
-                tween._timeline.pause(tween._startTime);\r
-                if (callback) {\r
-                    callback.apply(scope || tween._timeline, params || _blankArray);\r
-                }\r
-            },\r
-            _slice = _blankArray.slice,\r
-            p = TimelineLite.prototype = new SimpleTimeline();\r
-\r
-        TimelineLite.version = "1.12.1";\r
-        p.constructor = TimelineLite;\r
-        p.kill()._gc = false;\r
-\r
-        p.to = function(target, duration, vars, position) {\r
-            var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;\r
-            return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position);\r
-        };\r
-\r
-        p.from = function(target, duration, vars, position) {\r
-            return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, vars), position);\r
-        };\r
-\r
-        p.fromTo = function(target, duration, fromVars, toVars, position) {\r
-            var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite;\r
-            return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position);\r
-        };\r
-\r
-        p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, onCompleteScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}),\r
-                i;\r
-            if (typeof(targets) === "string") {\r
-                targets = TweenLite.selector(targets) || targets;\r
-            }\r
-            if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.\r
-                targets = _slice.call(targets, 0);\r
-            }\r
-            stagger = stagger || 0;\r
-            for (i = 0; i < targets.length; i++) {\r
-                if (vars.startAt) {\r
-                    vars.startAt = _copy(vars.startAt);\r
-                }\r
-                tl.to(targets[i], duration, _copy(vars), i * stagger);\r
-            }\r
-            return this.add(tl, position);\r
-        };\r
-\r
-        p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            vars.runBackwards = true;\r
-            return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-\r
-        p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-\r
-        p.call = function(callback, params, scope, position) {\r
-            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);\r
-        };\r
-\r
-        p.set = function(target, vars, position) {\r
-            position = this._parseTimeOrLabel(position, 0, true);\r
-            if (vars.immediateRender == null) {\r
-                vars.immediateRender = (position === this._time && !this._paused);\r
-            }\r
-            return this.add( new TweenLite(target, 0, vars), position);\r
-        };\r
-\r
-        TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) {\r
-            vars = vars || {};\r
-            if (vars.smoothChildTiming == null) {\r
-                vars.smoothChildTiming = true;\r
-            }\r
-            var tl = new TimelineLite(vars),\r
-                root = tl._timeline,\r
-                tween, next;\r
-            if (ignoreDelayedCalls == null) {\r
-                ignoreDelayedCalls = true;\r
-            }\r
-            root._remove(tl, true);\r
-            tl._startTime = 0;\r
-            tl._rawPrevTime = tl._time = tl._totalTime = root._time;\r
-            tween = root._first;\r
-            while (tween) {\r
-                next = tween._next;\r
-                if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {\r
-                    tl.add(tween, tween._startTime - tween._delay);\r
-                }\r
-                tween = next;\r
-            }\r
-            root.add(tl, 0);\r
-            return tl;\r
-        };\r
-\r
-        p.add = function(value, position, align, stagger) {\r
-            var curTime, l, i, child, tl, beforeRawTime;\r
-            if (typeof(position) !== "number") {\r
-                position = this._parseTimeOrLabel(position, 0, true, value);\r
-            }\r
-            if (!(value instanceof Animation)) {\r
-                if ((value instanceof Array) || (value && value.push && _isArray(value))) {\r
-                    align = align || "normal";\r
-                    stagger = stagger || 0;\r
-                    curTime = position;\r
-                    l = value.length;\r
-                    for (i = 0; i < l; i++) {\r
-                        if (_isArray(child = value[i])) {\r
-                            child = new TimelineLite({tweens:child});\r
-                        }\r
-                        this.add(child, curTime);\r
-                        if (typeof(child) !== "string" && typeof(child) !== "function") {\r
-                            if (align === "sequence") {\r
-                                curTime = child._startTime + (child.totalDuration() / child._timeScale);\r
-                            } else if (align === "start") {\r
-                                child._startTime -= child.delay();\r
-                            }\r
-                        }\r
-                        curTime += stagger;\r
-                    }\r
-                    return this._uncache(true);\r
-                } else if (typeof(value) === "string") {\r
-                    return this.addLabel(value, position);\r
-                } else if (typeof(value) === "function") {\r
-                    value = TweenLite.delayedCall(0, value);\r
-                } else {\r
-                    throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string.");\r
-                }\r
-            }\r
-\r
-            SimpleTimeline.prototype.add.call(this, value, position);\r
-\r
-            //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.\r
-            if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) {\r
-                //in case any of the ancestors had completed but should now be enabled...\r
-                tl = this;\r
-                beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect.\r
-                while (tl._timeline) {\r
-                    if (beforeRawTime && tl._timeline.smoothChildTiming) {\r
-                        tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it.\r
-                    } else if (tl._gc) {\r
-                        tl._enabled(true, false);\r
-                    }\r
-                    tl = tl._timeline;\r
-                }\r
-            }\r
-\r
-            return this;\r
-        };\r
-\r
-        p.remove = function(value) {\r
-            if (value instanceof Animation) {\r
-                return this._remove(value, false);\r
-            } else if (value instanceof Array || (value && value.push && _isArray(value))) {\r
-                var i = value.length;\r
-                while (--i > -1) {\r
-                    this.remove(value[i]);\r
-                }\r
-                return this;\r
-            } else if (typeof(value) === "string") {\r
-                return this.removeLabel(value);\r
-            }\r
-            return this.kill(null, value);\r
-        };\r
-\r
-        p._remove = function(tween, skipDisable) {\r
-            SimpleTimeline.prototype._remove.call(this, tween, skipDisable);\r
-            var last = this._last;\r
-            if (!last) {\r
-                this._time = this._totalTime = this._duration = this._totalDuration = 0;\r
-            } else if (this._time > last._startTime + last._totalDuration / last._timeScale) {\r
-                this._time = this.duration();\r
-                this._totalTime = this._totalDuration;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.append = function(value, offsetOrLabel) {\r
-            return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value));\r
-        };\r
-\r
-        p.insert = p.insertMultiple = function(value, position, align, stagger) {\r
-            return this.add(value, position || 0, align, stagger);\r
-        };\r
-\r
-        p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) {\r
-            return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger);\r
-        };\r
-\r
-        p.addLabel = function(label, position) {\r
-            this._labels[label] = this._parseTimeOrLabel(position);\r
-            return this;\r
-        };\r
-\r
-        p.addPause = function(position, callback, params, scope) {\r
-            return this.call(_pauseCallback, ["{self}", callback, params, scope], this, position);\r
-        };\r
-\r
-        p.removeLabel = function(label) {\r
-            delete this._labels[label];\r
-            return this;\r
-        };\r
-\r
-        p.getLabelTime = function(label) {\r
-            return (this._labels[label] != null) ? this._labels[label] : -1;\r
-        };\r
-\r
-        p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) {\r
-            var i;\r
-            //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration().\r
-            if (ignore instanceof Animation && ignore.timeline === this) {\r
-                this.remove(ignore);\r
-            } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) {\r
-                i = ignore.length;\r
-                while (--i > -1) {\r
-                    if (ignore[i] instanceof Animation && ignore[i].timeline === this) {\r
-                        this.remove(ignore[i]);\r
-                    }\r
-                }\r
-            }\r
-            if (typeof(offsetOrLabel) === "string") {\r
-                return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - this.duration() : 0, appendIfAbsent);\r
-            }\r
-            offsetOrLabel = offsetOrLabel || 0;\r
-            if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).\r
-                i = timeOrLabel.indexOf("=");\r
-                if (i === -1) {\r
-                    if (this._labels[timeOrLabel] == null) {\r
-                        return appendIfAbsent ? (this._labels[timeOrLabel] = this.duration() + offsetOrLabel) : offsetOrLabel;\r
-                    }\r
-                    return this._labels[timeOrLabel] + offsetOrLabel;\r
-                }\r
-                offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1));\r
-                timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : this.duration();\r
-            } else if (timeOrLabel == null) {\r
-                timeOrLabel = this.duration();\r
-            }\r
-            return Number(timeOrLabel) + offsetOrLabel;\r
-        };\r
-\r
-        p.seek = function(position, suppressEvents) {\r
-            return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false));\r
-        };\r
-\r
-        p.stop = function() {\r
-            return this.paused(true);\r
-        };\r
-\r
-        p.gotoAndPlay = function(position, suppressEvents) {\r
-            return this.play(position, suppressEvents);\r
-        };\r
-\r
-        p.gotoAndStop = function(position, suppressEvents) {\r
-            return this.pause(position, suppressEvents);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            if (this._gc) {\r
-                this._enabled(true, false);\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                prevTime = this._time,\r
-                prevStart = this._startTime,\r
-                prevTimeScale = this._timeScale,\r
-                prevPaused = this._paused,\r
-                tween, isComplete, next, callback, internalForce;\r
-            if (time >= totalDur) {\r
-                this._totalTime = this._time = totalDur;\r
-                if (!this._reversed) if (!this._hasPausedChild()) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                    if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {\r
-                        internalForce = true;\r
-                        if (this._rawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                }\r
-                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7.\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = 0;\r
-                if (prevTime !== 0 || (this._duration === 0 && this._rawPrevTime !== _tinyNum && (this._rawPrevTime > 0 || (time < 0 && this._rawPrevTime >= 0)))) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        internalForce = true;\r
-                    }\r
-                    this._rawPrevTime = time;\r
-                } else {\r
-                    this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-\r
-                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)\r
-                    if (!this._initted) {\r
-                        internalForce = true;\r
-                    }\r
-                }\r
-\r
-            } else {\r
-                this._totalTime = this._time = this._rawPrevTime = time;\r
-            }\r
-            if ((this._time === prevTime || !this._first) && !force && !internalForce) {\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._initted = true;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time > 0) {\r
-                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.\r
-            }\r
-\r
-            if (prevTime === 0) if (this.vars.onStart) if (this._time !== 0) if (!suppressEvents) {\r
-                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-            }\r
-\r
-            if (this._time >= prevTime) {\r
-                tween = this._first;\r
-                while (tween) {\r
-                    next = tween._next; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            } else {\r
-                tween = this._last;\r
-                while (tween) {\r
-                    next = tween._prev; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            }\r
-\r
-            if (this._onUpdate) if (!suppressEvents) {\r
-                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-            }\r
-\r
-            if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-            }\r
-        };\r
-\r
-        p._hasPausedChild = function() {\r
-            var tween = this._first;\r
-            while (tween) {\r
-                if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) {\r
-                    return true;\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) {\r
-            ignoreBeforeTime = ignoreBeforeTime || -9999999999;\r
-            var a = [],\r
-                tween = this._first,\r
-                cnt = 0;\r
-            while (tween) {\r
-                if (tween._startTime < ignoreBeforeTime) {\r
-                    //do nothing\r
-                } else if (tween instanceof TweenLite) {\r
-                    if (tweens !== false) {\r
-                        a[cnt++] = tween;\r
-                    }\r
-                } else {\r
-                    if (timelines !== false) {\r
-                        a[cnt++] = tween;\r
-                    }\r
-                    if (nested !== false) {\r
-                        a = a.concat(tween.getChildren(true, tweens, timelines));\r
-                        cnt = a.length;\r
-                    }\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            return a;\r
-        };\r
-\r
-        p.getTweensOf = function(target, nested) {\r
-            var disabled = this._gc,\r
-                a = [],\r
-                cnt = 0,\r
-                tweens, i;\r
-            if (disabled) {\r
-                this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here.\r
-            }\r
-            tweens = TweenLite.getTweensOf(target);\r
-            i = tweens.length;\r
-            while (--i > -1) {\r
-                if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) {\r
-                    a[cnt++] = tweens[i];\r
-                }\r
-            }\r
-            if (disabled) {\r
-                this._enabled(false, true);\r
-            }\r
-            return a;\r
-        };\r
-\r
-        p._contains = function(tween) {\r
-            var tl = tween.timeline;\r
-            while (tl) {\r
-                if (tl === this) {\r
-                    return true;\r
-                }\r
-                tl = tl.timeline;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) {\r
-            ignoreBeforeTime = ignoreBeforeTime || 0;\r
-            var tween = this._first,\r
-                labels = this._labels,\r
-                p;\r
-            while (tween) {\r
-                if (tween._startTime >= ignoreBeforeTime) {\r
-                    tween._startTime += amount;\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            if (adjustLabels) {\r
-                for (p in labels) {\r
-                    if (labels[p] >= ignoreBeforeTime) {\r
-                        labels[p] += amount;\r
-                    }\r
-                }\r
-            }\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p._kill = function(vars, target) {\r
-            if (!vars && !target) {\r
-                return this._enabled(false, false);\r
-            }\r
-            var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target),\r
-                i = tweens.length,\r
-                changed = false;\r
-            while (--i > -1) {\r
-                if (tweens[i]._kill(vars, target)) {\r
-                    changed = true;\r
-                }\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        p.clear = function(labels) {\r
-            var tweens = this.getChildren(false, true, true),\r
-                i = tweens.length;\r
-            this._time = this._totalTime = 0;\r
-            while (--i > -1) {\r
-                tweens[i]._enabled(false, false);\r
-            }\r
-            if (labels !== false) {\r
-                this._labels = {};\r
-            }\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            var tween = this._first;\r
-            while (tween) {\r
-                tween.invalidate();\r
-                tween = tween._next;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._enabled = function(enabled, ignoreTimeline) {\r
-            if (enabled === this._gc) {\r
-                var tween = this._first;\r
-                while (tween) {\r
-                    tween._enabled(enabled, true);\r
-                    tween = tween._next;\r
-                }\r
-            }\r
-            return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline);\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    this.totalDuration(); //just triggers recalculation\r
-                }\r
-                return this._duration;\r
-            }\r
-            if (this.duration() !== 0 && value !== 0) {\r
-                this.timeScale(this._duration / value);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    var max = 0,\r
-                        tween = this._last,\r
-                        prevStart = 999999999999,\r
-                        prev, end;\r
-                    while (tween) {\r
-                        prev = tween._prev; //record it here in case the tween changes position in the sequence...\r
-                        if (tween._dirty) {\r
-                            tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.\r
-                        }\r
-                        if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence\r
-                            this.add(tween, tween._startTime - tween._delay);\r
-                        } else {\r
-                            prevStart = tween._startTime;\r
-                        }\r
-                        if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.\r
-                            max -= tween._startTime;\r
-                            if (this._timeline.smoothChildTiming) {\r
-                                this._startTime += tween._startTime / this._timeScale;\r
-                            }\r
-                            this.shiftChildren(-tween._startTime, false, -9999999999);\r
-                            prevStart = 0;\r
-                        }\r
-                        end = tween._startTime + (tween._totalDuration / tween._timeScale);\r
-                        if (end > max) {\r
-                            max = end;\r
-                        }\r
-                        tween = prev;\r
-                    }\r
-                    this._duration = this._totalDuration = max;\r
-                    this._dirty = false;\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            if (this.totalDuration() !== 0) if (value !== 0) {\r
-                this.timeScale(this._totalDuration / value);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.usesFrames = function() {\r
-            var tl = this._timeline;\r
-            while (tl._timeline) {\r
-                tl = tl._timeline;\r
-            }\r
-            return (tl === Animation._rootFramesTimeline);\r
-        };\r
-\r
-        p.rawTime = function() {\r
-            return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;\r
-        };\r
-\r
-        return TimelineLite;\r
-\r
-    }, true);\r
-    \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * TimelineMax\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) {\r
-\r
-        var TimelineMax = function(vars) {\r
-                TimelineLite.call(this, vars);\r
-                this._repeat = this.vars.repeat || 0;\r
-                this._repeatDelay = this.vars.repeatDelay || 0;\r
-                this._cycle = 0;\r
-                this._yoyo = (this.vars.yoyo === true);\r
-                this._dirty = true;\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            _blankArray = [],\r
-            _easeNone = new Ease(null, null, 1, 0),\r
-            p = TimelineMax.prototype = new TimelineLite();\r
-\r
-        p.constructor = TimelineMax;\r
-        p.kill()._gc = false;\r
-        TimelineMax.version = "1.12.1";\r
-\r
-        p.invalidate = function() {\r
-            this._yoyo = (this.vars.yoyo === true);\r
-            this._repeat = this.vars.repeat || 0;\r
-            this._repeatDelay = this.vars.repeatDelay || 0;\r
-            this._uncache(true);\r
-            return TimelineLite.prototype.invalidate.call(this);\r
-        };\r
-\r
-        p.addCallback = function(callback, position, params, scope) {\r
-            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);\r
-        };\r
-\r
-        p.removeCallback = function(callback, position) {\r
-            if (callback) {\r
-                if (position == null) {\r
-                    this._kill(null, callback);\r
-                } else {\r
-                    var a = this.getTweensOf(callback, false),\r
-                        i = a.length,\r
-                        time = this._parseTimeOrLabel(position);\r
-                    while (--i > -1) {\r
-                        if (a[i]._startTime === time) {\r
-                            a[i]._enabled(false, false);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.tweenTo = function(position, vars) {\r
-            vars = vars || {};\r
-            var copy = {ease:_easeNone, overwrite:(vars.delay ? 2 : 1), useFrames:this.usesFrames(), immediateRender:false},//note: set overwrite to 1 (true/all) by default unless there's a delay so that we avoid a racing situation that could happen if, for example, an onmousemove creates the same tweenTo() over and over again.\r
-                duration, p, t;\r
-            for (p in vars) {\r
-                copy[p] = vars[p];\r
-            }\r
-            copy.time = this._parseTimeOrLabel(position);\r
-            duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001;\r
-            t = new TweenLite(this, duration, copy);\r
-            copy.onStart = function() {\r
-                t.target.paused(true);\r
-                if (t.vars.time !== t.target.time() && duration === t.duration()) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all.\r
-                    t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale );\r
-                }\r
-                if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.\r
-                    vars.onStart.apply(vars.onStartScope || t, vars.onStartParams || _blankArray);\r
-                }\r
-            };\r
-            return t;\r
-        };\r
-\r
-        p.tweenFromTo = function(fromPosition, toPosition, vars) {\r
-            vars = vars || {};\r
-            fromPosition = this._parseTimeOrLabel(fromPosition);\r
-            vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], onCompleteScope:this};\r
-            vars.immediateRender = (vars.immediateRender !== false);\r
-            var t = this.tweenTo(toPosition, vars);\r
-            return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            if (this._gc) {\r
-                this._enabled(true, false);\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                dur = this._duration,\r
-                prevTime = this._time,\r
-                prevTotalTime = this._totalTime,\r
-                prevStart = this._startTime,\r
-                prevTimeScale = this._timeScale,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                prevPaused = this._paused,\r
-                prevCycle = this._cycle,\r
-                tween, isComplete, next, callback, internalForce, cycleDuration;\r
-            if (time >= totalDur) {\r
-                if (!this._locked) {\r
-                    this._totalTime = totalDur;\r
-                    this._cycle = this._repeat;\r
-                }\r
-                if (!this._reversed) if (!this._hasPausedChild()) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                    if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {\r
-                        internalForce = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                }\r
-                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                    this._time = time = 0;\r
-                } else {\r
-                    this._time = dur;\r
-                    time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added.\r
-                }\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                if (!this._locked) {\r
-                    this._totalTime = this._cycle = 0;\r
-                }\r
-                this._time = 0;\r
-                if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !this._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare)\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (dur === 0) if (prevRawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        internalForce = true;\r
-                    }\r
-                    this._rawPrevTime = time;\r
-                } else {\r
-                    this._rawPrevTime = (dur || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)\r
-                    if (!this._initted) {\r
-                        internalForce = true;\r
-                    }\r
-                }\r
-\r
-            } else {\r
-                if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through.\r
-                    internalForce = true;\r
-                }\r
-                this._time = this._rawPrevTime = time;\r
-                if (!this._locked) {\r
-                    this._totalTime = time;\r
-                    if (this._repeat !== 0) {\r
-                        cycleDuration = dur + this._repeatDelay;\r
-                        this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)\r
-                        if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {\r
-                            this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)\r
-                        }\r
-                        this._time = this._totalTime - (this._cycle * cycleDuration);\r
-                        if (this._yoyo) if ((this._cycle & 1) !== 0) {\r
-                            this._time = dur - this._time;\r
-                        }\r
-                        if (this._time > dur) {\r
-                            this._time = dur;\r
-                            time = dur + 0.0001; //to avoid occasional floating point rounding error\r
-                        } else if (this._time < 0) {\r
-                            this._time = time = 0;\r
-                        } else {\r
-                            time = this._time;\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-\r
-            if (this._cycle !== prevCycle) if (!this._locked) {\r
-                /*\r
-                make sure children at the end/beginning of the timeline are rendered properly. If, for example,\r
-                a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which\r
-                would get transated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there\r
-                could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So\r
-                we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must\r
-                ensure that zero-duration tweens at the very beginning or end of the TimelineMax work.\r
-                */\r
-                var backwards = (this._yoyo && (prevCycle & 1) !== 0),\r
-                    wrap = (backwards === (this._yoyo && (this._cycle & 1) !== 0)),\r
-                    recTotalTime = this._totalTime,\r
-                    recCycle = this._cycle,\r
-                    recRawPrevTime = this._rawPrevTime,\r
-                    recTime = this._time;\r
-\r
-                this._totalTime = prevCycle * dur;\r
-                if (this._cycle < prevCycle) {\r
-                    backwards = !backwards;\r
-                } else {\r
-                    this._totalTime += dur;\r
-                }\r
-                this._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method.\r
-\r
-                this._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime;\r
-                this._cycle = prevCycle;\r
-                this._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render()\r
-                prevTime = (backwards) ? 0 : dur;\r
-                this.render(prevTime, suppressEvents, (dur === 0));\r
-                if (!suppressEvents) if (!this._gc) {\r
-                    if (this.vars.onRepeat) {\r
-                        this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);\r
-                    }\r
-                }\r
-                if (wrap) {\r
-                    prevTime = (backwards) ? dur + 0.0001 : -0.0001;\r
-                    this.render(prevTime, true, false);\r
-                }\r
-                this._locked = false;\r
-                if (this._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible)\r
-                    return;\r
-                }\r
-                this._time = recTime;\r
-                this._totalTime = recTotalTime;\r
-                this._cycle = recCycle;\r
-                this._rawPrevTime = recRawPrevTime;\r
-            }\r
-\r
-            if ((this._time === prevTime || !this._first) && !force && !internalForce) {\r
-                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._initted = true;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._totalTime !== prevTotalTime && time > 0) {\r
-                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.\r
-            }\r
-\r
-            if (prevTotalTime === 0) if (this.vars.onStart) if (this._totalTime !== 0) if (!suppressEvents) {\r
-                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-            }\r
-\r
-            if (this._time >= prevTime) {\r
-                tween = this._first;\r
-                while (tween) {\r
-                    next = tween._next; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-\r
-                    }\r
-                    tween = next;\r
-                }\r
-            } else {\r
-                tween = this._last;\r
-                while (tween) {\r
-                    next = tween._prev; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            }\r
-\r
-            if (this._onUpdate) if (!suppressEvents) {\r
-                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-            }\r
-            if (callback) if (!this._locked) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-            }\r
-        };\r
-\r
-        p.getActive = function(nested, tweens, timelines) {\r
-            if (nested == null) {\r
-                nested = true;\r
-            }\r
-            if (tweens == null) {\r
-                tweens = true;\r
-            }\r
-            if (timelines == null) {\r
-                timelines = false;\r
-            }\r
-            var a = [],\r
-                all = this.getChildren(nested, tweens, timelines),\r
-                cnt = 0,\r
-                l = all.length,\r
-                i, tween;\r
-            for (i = 0; i < l; i++) {\r
-                tween = all[i];\r
-                if (tween.isActive()) {\r
-                    a[cnt++] = tween;\r
-                }\r
-            }\r
-            return a;\r
-        };\r
-\r
-\r
-        p.getLabelAfter = function(time) {\r
-            if (!time) if (time !== 0) { //faster than isNan()\r
-                time = this._time;\r
-            }\r
-            var labels = this.getLabelsArray(),\r
-                l = labels.length,\r
-                i;\r
-            for (i = 0; i < l; i++) {\r
-                if (labels[i].time > time) {\r
-                    return labels[i].name;\r
-                }\r
-            }\r
-            return null;\r
-        };\r
-\r
-        p.getLabelBefore = function(time) {\r
-            if (time == null) {\r
-                time = this._time;\r
-            }\r
-            var labels = this.getLabelsArray(),\r
-                i = labels.length;\r
-            while (--i > -1) {\r
-                if (labels[i].time < time) {\r
-                    return labels[i].name;\r
-                }\r
-            }\r
-            return null;\r
-        };\r
-\r
-        p.getLabelsArray = function() {\r
-            var a = [],\r
-                cnt = 0,\r
-                p;\r
-            for (p in this._labels) {\r
-                a[cnt++] = {time:this._labels[p], name:p};\r
-            }\r
-            a.sort(function(a,b) {\r
-                return a.time - b.time;\r
-            });\r
-            return a;\r
-        };\r
-\r
-\r
-//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------\r
-\r
-        p.progress = function(value) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);\r
-        };\r
-\r
-        p.totalProgress = function(value) {\r
-            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    TimelineLite.prototype.totalDuration.call(this); //just forces refresh\r
-                    //Instead of Infinity, we use 999999999999 so that we can accommodate reverses.\r
-                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );\r
-        };\r
-\r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            if (value > this._duration) {\r
-                value = this._duration;\r
-            }\r
-            if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));\r
-            } else if (this._repeat !== 0) {\r
-                value += this._cycle * (this._duration + this._repeatDelay);\r
-            }\r
-            return this.totalTime(value, suppressEvents);\r
-        };\r
-\r
-        p.repeat = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeat;\r
-            }\r
-            this._repeat = value;\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.repeatDelay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeatDelay;\r
-            }\r
-            this._repeatDelay = value;\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.yoyo = function(value) {\r
-            if (!arguments.length) {\r
-                return this._yoyo;\r
-            }\r
-            this._yoyo = value;\r
-            return this;\r
-        };\r
-\r
-        p.currentLabel = function(value) {\r
-            if (!arguments.length) {\r
-                return this.getLabelBefore(this._time + 0.00000001);\r
-            }\r
-            return this.seek(value, true);\r
-        };\r
-\r
-        return TimelineMax;\r
-\r
-    }, true);\r
-    \r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * BezierPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    (function() {\r
-\r
-        var _RAD2DEG = 180 / Math.PI,\r
-            _r1 = [],\r
-            _r2 = [],\r
-            _r3 = [],\r
-            _corProps = {},\r
-            Segment = function(a, b, c, d) {\r
-                this.a = a;\r
-                this.b = b;\r
-                this.c = c;\r
-                this.d = d;\r
-                this.da = d - a;\r
-                this.ca = c - a;\r
-                this.ba = b - a;\r
-            },\r
-            _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",\r
-            cubicToQuadratic = function(a, b, c, d) {\r
-                var q1 = {a:a},\r
-                    q2 = {},\r
-                    q3 = {},\r
-                    q4 = {c:d},\r
-                    mab = (a + b) / 2,\r
-                    mbc = (b + c) / 2,\r
-                    mcd = (c + d) / 2,\r
-                    mabc = (mab + mbc) / 2,\r
-                    mbcd = (mbc + mcd) / 2,\r
-                    m8 = (mbcd - mabc) / 8;\r
-                q1.b = mab + (a - mab) / 4;\r
-                q2.b = mabc + m8;\r
-                q1.c = q2.a = (q1.b + q2.b) / 2;\r
-                q2.c = q3.a = (mabc + mbcd) / 2;\r
-                q3.b = mbcd - m8;\r
-                q4.b = mcd + (d - mcd) / 4;\r
-                q3.c = q4.a = (q3.b + q4.b) / 2;\r
-                return [q1, q2, q3, q4];\r
-            },\r
-            _calculateControlPoints = function(a, curviness, quad, basic, correlate) {\r
-                var l = a.length - 1,\r
-                    ii = 0,\r
-                    cp1 = a[0].a,\r
-                    i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl;\r
-                for (i = 0; i < l; i++) {\r
-                    seg = a[ii];\r
-                    p1 = seg.a;\r
-                    p2 = seg.d;\r
-                    p3 = a[ii+1].d;\r
-\r
-                    if (correlate) {\r
-                        r1 = _r1[i];\r
-                        r2 = _r2[i];\r
-                        tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5);\r
-                        m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0));\r
-                        m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0));\r
-                        mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0));\r
-                    } else {\r
-                        m1 = p2 - (p2 - p1) * curviness * 0.5;\r
-                        m2 = p2 + (p3 - p2) * curviness * 0.5;\r
-                        mm = p2 - (m1 + m2) / 2;\r
-                    }\r
-                    m1 += mm;\r
-                    m2 += mm;\r
-\r
-                    seg.c = cp2 = m1;\r
-                    if (i !== 0) {\r
-                        seg.b = cp1;\r
-                    } else {\r
-                        seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly.\r
-                    }\r
-\r
-                    seg.da = p2 - p1;\r
-                    seg.ca = cp2 - p1;\r
-                    seg.ba = cp1 - p1;\r
-\r
-                    if (quad) {\r
-                        qb = cubicToQuadratic(p1, cp1, cp2, p2);\r
-                        a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);\r
-                        ii += 4;\r
-                    } else {\r
-                        ii++;\r
-                    }\r
-\r
-                    cp1 = m2;\r
-                }\r
-                seg = a[ii];\r
-                seg.b = cp1;\r
-                seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly.\r
-                seg.da = seg.d - seg.a;\r
-                seg.ca = seg.c - seg.a;\r
-                seg.ba = cp1 - seg.a;\r
-                if (quad) {\r
-                    qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d);\r
-                    a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);\r
-                }\r
-            },\r
-            _parseAnchors = function(values, p, correlate, prepend) {\r
-                var a = [],\r
-                    l, i, p1, p2, p3, tmp;\r
-                if (prepend) {\r
-                    values = [prepend].concat(values);\r
-                    i = values.length;\r
-                    while (--i > -1) {\r
-                        if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") {\r
-                            values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons\r
-                        }\r
-                    }\r
-                }\r
-                l = values.length - 2;\r
-                if (l < 0) {\r
-                    a[0] = new Segment(values[0][p], 0, 0, values[(l < -1) ? 0 : 1][p]);\r
-                    return a;\r
-                }\r
-                for (i = 0; i < l; i++) {\r
-                    p1 = values[i][p];\r
-                    p2 = values[i+1][p];\r
-                    a[i] = new Segment(p1, 0, 0, p2);\r
-                    if (correlate) {\r
-                        p3 = values[i+2][p];\r
-                        _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1);\r
-                        _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2);\r
-                    }\r
-                }\r
-                a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]);\r
-                return a;\r
-            },\r
-            bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) {\r
-                var obj = {},\r
-                    props = [],\r
-                    first = prepend || values[0],\r
-                    i, p, a, j, r, l, seamless, last;\r
-                correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate;\r
-                if (curviness == null) {\r
-                    curviness = 1;\r
-                }\r
-                for (p in values[0]) {\r
-                    props.push(p);\r
-                }\r
-                //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later)\r
-                if (values.length > 1) {\r
-                    last = values[values.length - 1];\r
-                    seamless = true;\r
-                    i = props.length;\r
-                    while (--i > -1) {\r
-                        p = props[i];\r
-                        if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors. For example, if you set an object's position to 4.945, Flash will make it 4.9\r
-                            seamless = false;\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (seamless) {\r
-                        values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens\r
-                        if (prepend) {\r
-                            values.unshift(prepend);\r
-                        }\r
-                        values.push(values[1]);\r
-                        prepend = values[values.length - 3];\r
-                    }\r
-                }\r
-                _r1.length = _r2.length = _r3.length = 0;\r
-                i = props.length;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    _corProps[p] = (correlate.indexOf(","+p+",") !== -1);\r
-                    obj[p] = _parseAnchors(values, p, _corProps[p], prepend);\r
-                }\r
-                i = _r1.length;\r
-                while (--i > -1) {\r
-                    _r1[i] = Math.sqrt(_r1[i]);\r
-                    _r2[i] = Math.sqrt(_r2[i]);\r
-                }\r
-                if (!basic) {\r
-                    i = props.length;\r
-                    while (--i > -1) {\r
-                        if (_corProps[p]) {\r
-                            a = obj[props[i]];\r
-                            l = a.length - 1;\r
-                            for (j = 0; j < l; j++) {\r
-                                r = a[j+1].da / _r2[j] + a[j].da / _r1[j];\r
-                                _r3[j] = (_r3[j] || 0) + r * r;\r
-                            }\r
-                        }\r
-                    }\r
-                    i = _r3.length;\r
-                    while (--i > -1) {\r
-                        _r3[i] = Math.sqrt(_r3[i]);\r
-                    }\r
-                }\r
-                i = props.length;\r
-                j = quadratic ? 4 : 1;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    a = obj[p];\r
-                    _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties\r
-                    if (seamless) {\r
-                        a.splice(0, j);\r
-                        a.splice(a.length - j, j);\r
-                    }\r
-                }\r
-                return obj;\r
-            },\r
-            _parseBezierData = function(values, type, prepend) {\r
-                type = type || "soft";\r
-                var obj = {},\r
-                    inc = (type === "cubic") ? 3 : 2,\r
-                    soft = (type === "soft"),\r
-                    props = [],\r
-                    a, b, c, d, cur, i, j, l, p, cnt, tmp;\r
-                if (soft && prepend) {\r
-                    values = [prepend].concat(values);\r
-                }\r
-                if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; }\r
-                for (p in values[0]) {\r
-                    props.push(p);\r
-                }\r
-                i = props.length;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    obj[p] = cur = [];\r
-                    cnt = 0;\r
-                    l = values.length;\r
-                    for (j = 0; j < l; j++) {\r
-                        a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp);\r
-                        if (soft) if (j > 1) if (j < l - 1) {\r
-                            cur[cnt++] = (a + cur[cnt-2]) / 2;\r
-                        }\r
-                        cur[cnt++] = a;\r
-                    }\r
-                    l = cnt - inc + 1;\r
-                    cnt = 0;\r
-                    for (j = 0; j < l; j += inc) {\r
-                        a = cur[j];\r
-                        b = cur[j+1];\r
-                        c = cur[j+2];\r
-                        d = (inc === 2) ? 0 : cur[j+3];\r
-                        cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);\r
-                    }\r
-                    cur.length = cnt;\r
-                }\r
-                return obj;\r
-            },\r
-            _addCubicLengths = function(a, steps, resolution) {\r
-                var inc = 1 / resolution,\r
-                    j = a.length,\r
-                    d, d1, s, da, ca, ba, p, i, inv, bez, index;\r
-                while (--j > -1) {\r
-                    bez = a[j];\r
-                    s = bez.a;\r
-                    da = bez.d - s;\r
-                    ca = bez.c - s;\r
-                    ba = bez.b - s;\r
-                    d = d1 = 0;\r
-                    for (i = 1; i <= resolution; i++) {\r
-                        p = inc * i;\r
-                        inv = 1 - p;\r
-                        d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p);\r
-                        index = j * resolution + i - 1;\r
-                        steps[index] = (steps[index] || 0) + d * d;\r
-                    }\r
-                }\r
-            },\r
-            _parseLengthData = function(obj, resolution) {\r
-                resolution = resolution >> 0 || 6;\r
-                var a = [],\r
-                    lengths = [],\r
-                    d = 0,\r
-                    total = 0,\r
-                    threshold = resolution - 1,\r
-                    segments = [],\r
-                    curLS = [], //current length segments array\r
-                    p, i, l, index;\r
-                for (p in obj) {\r
-                    _addCubicLengths(obj[p], a, resolution);\r
-                }\r
-                l = a.length;\r
-                for (i = 0; i < l; i++) {\r
-                    d += Math.sqrt(a[i]);\r
-                    index = i % resolution;\r
-                    curLS[index] = d;\r
-                    if (index === threshold) {\r
-                        total += d;\r
-                        index = (i / resolution) >> 0;\r
-                        segments[index] = curLS;\r
-                        lengths[index] = total;\r
-                        d = 0;\r
-                        curLS = [];\r
-                    }\r
-                }\r
-                return {length:total, lengths:lengths, segments:segments};\r
-            },\r
-\r
-\r
-\r
-            BezierPlugin = window._gsDefine.plugin({\r
-                    propName: "bezier",\r
-                    priority: -1,\r
-                    version: "1.3.2",\r
-                    API: 2,\r
-                    global:true,\r
-\r
-                    //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-                    init: function(target, vars, tween) {\r
-                        this._target = target;\r
-                        if (vars instanceof Array) {\r
-                            vars = {values:vars};\r
-                        }\r
-                        this._func = {};\r
-                        this._round = {};\r
-                        this._props = [];\r
-                        this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10);\r
-                        var values = vars.values || [],\r
-                            first = {},\r
-                            second = values[0],\r
-                            autoRotate = vars.autoRotate || tween.vars.orientToBezier,\r
-                            p, isFunc, i, j, prepend;\r
-\r
-                        this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null;\r
-                        for (p in second) {\r
-                            this._props.push(p);\r
-                        }\r
-\r
-                        i = this._props.length;\r
-                        while (--i > -1) {\r
-                            p = this._props[i];\r
-\r
-                            this._overwriteProps.push(p);\r
-                            isFunc = this._func[p] = (typeof(target[p]) === "function");\r
-                            first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();\r
-                            if (!prepend) if (first[p] !== values[0][p]) {\r
-                                prepend = first;\r
-                            }\r
-                        }\r
-                        this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first);\r
-                        this._segCount = this._beziers[p].length;\r
-\r
-                        if (this._timeRes) {\r
-                            var ld = _parseLengthData(this._beziers, this._timeRes);\r
-                            this._length = ld.length;\r
-                            this._lengths = ld.lengths;\r
-                            this._segments = ld.segments;\r
-                            this._l1 = this._li = this._s1 = this._si = 0;\r
-                            this._l2 = this._lengths[0];\r
-                            this._curSeg = this._segments[0];\r
-                            this._s2 = this._curSeg[0];\r
-                            this._prec = 1 / this._curSeg.length;\r
-                        }\r
-\r
-                        if ((autoRotate = this._autoRotate)) {\r
-                            this._initialRotations = [];\r
-                            if (!(autoRotate[0] instanceof Array)) {\r
-                                this._autoRotate = autoRotate = [autoRotate];\r
-                            }\r
-                            i = autoRotate.length;\r
-                            while (--i > -1) {\r
-                                for (j = 0; j < 3; j++) {\r
-                                    p = autoRotate[i][j];\r
-                                    this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;\r
-                                }\r
-                                p = autoRotate[i][2];\r
-                                this._initialRotations[i] = this._func[p] ? this._func[p].call(this._target) : this._target[p];\r
-                            }\r
-                        }\r
-                        this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.\r
-                        return true;\r
-                    },\r
-\r
-                    //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-                    set: function(v) {\r
-                        var segments = this._segCount,\r
-                            func = this._func,\r
-                            target = this._target,\r
-                            notStart = (v !== this._startRatio),\r
-                            curIndex, inv, i, p, b, t, val, l, lengths, curSeg;\r
-                        if (!this._timeRes) {\r
-                            curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;\r
-                            t = (v - (curIndex * (1 / segments))) * segments;\r
-                        } else {\r
-                            lengths = this._lengths;\r
-                            curSeg = this._curSeg;\r
-                            v *= this._length;\r
-                            i = this._li;\r
-                            //find the appropriate segment (if the currently cached one isn't correct)\r
-                            if (v > this._l2 && i < segments - 1) {\r
-                                l = segments - 1;\r
-                                while (i < l && (this._l2 = lengths[++i]) <= v) {   }\r
-                                this._l1 = lengths[i-1];\r
-                                this._li = i;\r
-                                this._curSeg = curSeg = this._segments[i];\r
-                                this._s2 = curSeg[(this._s1 = this._si = 0)];\r
-                            } else if (v < this._l1 && i > 0) {\r
-                                while (i > 0 && (this._l1 = lengths[--i]) >= v) { }\r
-                                if (i === 0 && v < this._l1) {\r
-                                    this._l1 = 0;\r
-                                } else {\r
-                                    i++;\r
-                                }\r
-                                this._l2 = lengths[i];\r
-                                this._li = i;\r
-                                this._curSeg = curSeg = this._segments[i];\r
-                                this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0;\r
-                                this._s2 = curSeg[this._si];\r
-                            }\r
-                            curIndex = i;\r
-                            //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)\r
-                            v -= this._l1;\r
-                            i = this._si;\r
-                            if (v > this._s2 && i < curSeg.length - 1) {\r
-                                l = curSeg.length - 1;\r
-                                while (i < l && (this._s2 = curSeg[++i]) <= v) {    }\r
-                                this._s1 = curSeg[i-1];\r
-                                this._si = i;\r
-                            } else if (v < this._s1 && i > 0) {\r
-                                while (i > 0 && (this._s1 = curSeg[--i]) >= v) {    }\r
-                                if (i === 0 && v < this._s1) {\r
-                                    this._s1 = 0;\r
-                                } else {\r
-                                    i++;\r
-                                }\r
-                                this._s2 = curSeg[i];\r
-                                this._si = i;\r
-                            }\r
-                            t = (i + (v - this._s1) / (this._s2 - this._s1)) * this._prec;\r
-                        }\r
-                        inv = 1 - t;\r
-\r
-                        i = this._props.length;\r
-                        while (--i > -1) {\r
-                            p = this._props[i];\r
-                            b = this._beziers[p][curIndex];\r
-                            val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a;\r
-                            if (this._round[p]) {\r
-                                val = Math.round(val);\r
-                            }\r
-                            if (func[p]) {\r
-                                target[p](val);\r
-                            } else {\r
-                                target[p] = val;\r
-                            }\r
-                        }\r
-\r
-                        if (this._autoRotate) {\r
-                            var ar = this._autoRotate,\r
-                                b2, x1, y1, x2, y2, add, conv;\r
-                            i = ar.length;\r
-                            while (--i > -1) {\r
-                                p = ar[i][2];\r
-                                add = ar[i][3] || 0;\r
-                                conv = (ar[i][4] === true) ? 1 : _RAD2DEG;\r
-                                b = this._beziers[ar[i][0]];\r
-                                b2 = this._beziers[ar[i][1]];\r
-\r
-                                if (b && b2) { //in case one of the properties got overwritten.\r
-                                    b = b[curIndex];\r
-                                    b2 = b2[curIndex];\r
-\r
-                                    x1 = b.a + (b.b - b.a) * t;\r
-                                    x2 = b.b + (b.c - b.b) * t;\r
-                                    x1 += (x2 - x1) * t;\r
-                                    x2 += ((b.c + (b.d - b.c) * t) - x2) * t;\r
-\r
-                                    y1 = b2.a + (b2.b - b2.a) * t;\r
-                                    y2 = b2.b + (b2.c - b2.b) * t;\r
-                                    y1 += (y2 - y1) * t;\r
-                                    y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t;\r
-\r
-                                    val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i];\r
-\r
-                                    if (func[p]) {\r
-                                        target[p](val);\r
-                                    } else {\r
-                                        target[p] = val;\r
-                                    }\r
-                                }\r
-                            }\r
-                        }\r
-                    }\r
-            }),\r
-            p = BezierPlugin.prototype;\r
-\r
-\r
-        BezierPlugin.bezierThrough = bezierThrough;\r
-        BezierPlugin.cubicToQuadratic = cubicToQuadratic;\r
-        BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite\r
-        BezierPlugin.quadraticToCubic = function(a, b, c) {\r
-            return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);\r
-        };\r
-\r
-        BezierPlugin._cssRegister = function() {\r
-            var CSSPlugin = window._gsDefine.globals.CSSPlugin;\r
-            if (!CSSPlugin) {\r
-                return;\r
-            }\r
-            var _internals = CSSPlugin._internals,\r
-                _parseToProxy = _internals._parseToProxy,\r
-                _setPluginRatio = _internals._setPluginRatio,\r
-                CSSPropTween = _internals.CSSPropTween;\r
-            _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) {\r
-                if (e instanceof Array) {\r
-                    e = {values:e};\r
-                }\r
-                plugin = new BezierPlugin();\r
-                var values = e.values,\r
-                    l = values.length - 1,\r
-                    pluginValues = [],\r
-                    v = {},\r
-                    i, p, data;\r
-                if (l < 0) {\r
-                    return pt;\r
-                }\r
-                for (i = 0; i <= l; i++) {\r
-                    data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i));\r
-                    pluginValues[i] = data.end;\r
-                }\r
-                for (p in e) {\r
-                    v[p] = e[p]; //duplicate the vars object because we need to alter some things which would cause problems if the user plans to reuse the same vars object for another tween.\r
-                }\r
-                v.values = pluginValues;\r
-                pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2);\r
-                pt.data = data;\r
-                pt.plugin = plugin;\r
-                pt.setRatio = _setPluginRatio;\r
-                if (v.autoRotate === 0) {\r
-                    v.autoRotate = true;\r
-                }\r
-                if (v.autoRotate && !(v.autoRotate instanceof Array)) {\r
-                    i = (v.autoRotate === true) ? 0 : Number(v.autoRotate);\r
-                    v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false;\r
-                }\r
-                if (v.autoRotate) {\r
-                    if (!cssp._transform) {\r
-                        cssp._enableTransforms(false);\r
-                    }\r
-                    data.autoRotate = cssp._target._gsTransform;\r
-                }\r
-                plugin._onInitTween(data.proxy, v, cssp._tween);\r
-                return pt;\r
-            }});\r
-        };\r
-\r
-        p._roundProps = function(lookup, value) {\r
-            var op = this._overwriteProps,\r
-                i = op.length;\r
-            while (--i > -1) {\r
-                if (lookup[op[i]] || lookup.bezier || lookup.bezierThrough) {\r
-                    this._round[op[i]] = value;\r
-                }\r
-            }\r
-        };\r
-\r
-        p._kill = function(lookup) {\r
-            var a = this._props,\r
-                p, i;\r
-            for (p in this._beziers) {\r
-                if (p in lookup) {\r
-                    delete this._beziers[p];\r
-                    delete this._func[p];\r
-                    i = a.length;\r
-                    while (--i > -1) {\r
-                        if (a[i] === p) {\r
-                            a.splice(i, 1);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this._super._kill.call(this, lookup);\r
-        };\r
-\r
-    }());\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * CSSPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function(TweenPlugin, TweenLite) {\r
-\r
-        /** @constructor **/\r
-        var CSSPlugin = function() {\r
-                TweenPlugin.call(this, "css");\r
-                this._overwriteProps.length = 0;\r
-                this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)\r
-            },\r
-            _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.\r
-            _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance\r
-            _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter\r
-            _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.\r
-            _specialProps = {},\r
-            p = CSSPlugin.prototype = new TweenPlugin("css");\r
-\r
-        p.constructor = CSSPlugin;\r
-        CSSPlugin.version = "1.12.1";\r
-        CSSPlugin.API = 2;\r
-        CSSPlugin.defaultTransformPerspective = 0;\r
-        CSSPlugin.defaultSkewType = "compensated";\r
-        p = "px"; //we'll reuse the "p" variable to keep file size down\r
-        CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};\r
-\r
-\r
-        var _numExp = /(?:\d|\-\d|\.\d|\-\.\d)+/g,\r
-            _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,\r
-            _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"\r
-            _NaNExp = /[^\d\-\.]/g,\r
-            _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,\r
-            _opacityExp = /opacity *= *([^)]*)/i,\r
-            _opacityValExp = /opacity:([^;]*)/i,\r
-            _alphaFilterExp = /alpha\(opacity *=.+?\)/i,\r
-            _rgbhslExp = /^(rgb|hsl)/,\r
-            _capsExp = /([A-Z])/g,\r
-            _camelExp = /-([a-z])/gi,\r
-            _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage)\r
-            _camelFunc = function(s, g) { return g.toUpperCase(); },\r
-            _horizExp = /(?:Left|Right|Width)/i,\r
-            _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,\r
-            _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,\r
-            _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis\r
-            _DEG2RAD = Math.PI / 180,\r
-            _RAD2DEG = 180 / Math.PI,\r
-            _forcePT = {},\r
-            _doc = document,\r
-            _tempDiv = _doc.createElement("div"),\r
-            _tempImg = _doc.createElement("img"),\r
-            _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins\r
-            _agent = navigator.userAgent,\r
-            _autoRound,\r
-            _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).\r
-\r
-            _isSafari,\r
-            _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element.\r
-            _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!)\r
-            _ieVers,\r
-            _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.\r
-                var i = _agent.indexOf("Android"),\r
-                    d = _doc.createElement("div"), a;\r
-\r
-                _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3));\r
-                _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6));\r
-                _isFirefox = (_agent.indexOf("Firefox") !== -1);\r
-\r
-                if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {\r
-                    _ieVers = parseFloat( RegExp.$1 );\r
-                }\r
-\r
-                d.innerHTML = "<a title='' style='top:1px;opacity:.55;'>a</a>";\r
-                a = d.getElementsByTagName("a")[0];\r
-                return a ? /^0.55/.test(a.style.opacity) : false;\r
-            }()),\r
-            _getIEOpacity = function(v) {\r
-                return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);\r
-            },\r
-            _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.\r
-                if (window.console) {\r
-                    //console.log(s);\r
-                }\r
-            },\r
-            _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"\r
-            _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".\r
-\r
-            // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)\r
-            _checkPropPrefix = function(p, e) {\r
-                e = e || _tempDiv;\r
-                var s = e.style,\r
-                    a, i;\r
-                if (s[p] !== undefined) {\r
-                    return p;\r
-                }\r
-                p = p.charAt(0).toUpperCase() + p.substr(1);\r
-                a = ["O","Moz","ms","Ms","Webkit"];\r
-                i = 5;\r
-                while (--i > -1 && s[a[i]+p] === undefined) { }\r
-                if (i >= 0) {\r
-                    _prefix = (i === 3) ? "ms" : a[i];\r
-                    _prefixCSS = "-" + _prefix.toLowerCase() + "-";\r
-                    return _prefix + p;\r
-                }\r
-                return null;\r
-            },\r
-\r
-            _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {},\r
-\r
-            /**\r
-             * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:\r
-             * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left");\r
-             *\r
-             * @param {!Object} t Target element whose style property you want to query\r
-             * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.)\r
-             * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call.\r
-             * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value.\r
-             * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto".\r
-             * @return {?string} The current property value\r
-             */\r
-            _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) {\r
-                var rv;\r
-                if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here.\r
-                    return _getIEOpacity(t);\r
-                }\r
-                if (!calc && t.style[p]) {\r
-                    rv = t.style[p];\r
-                } else if ((cs = cs || _getComputedStyle(t))) {\r
-                    rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase());\r
-                } else if (t.currentStyle) {\r
-                    rv = t.currentStyle[p];\r
-                }\r
-                return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv;\r
-            },\r
-\r
-            /**\r
-             * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number.\r
-             * @param {!Object} t Target element\r
-             * @param {!string} p Property name (like "left", "top", "marginLeft", etc.)\r
-             * @param {!number} v Value\r
-             * @param {string=} sfx Suffix (like "px" or "%" or "em")\r
-             * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect.\r
-             * @return {number} value in pixels\r
-             */\r
-            _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {\r
-                if (sfx === "px" || !sfx) { return v; }\r
-                if (sfx === "auto" || !v) { return 0; }\r
-                var horiz = _horizExp.test(p),\r
-                    node = t,\r
-                    style = _tempDiv.style,\r
-                    neg = (v < 0),\r
-                    pix, cache, time;\r
-                if (neg) {\r
-                    v = -v;\r
-                }\r
-                if (sfx === "%" && p.indexOf("border") !== -1) {\r
-                    pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);\r
-                } else {\r
-                    style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";\r
-                    if (sfx === "%" || !node.appendChild) {\r
-                        node = t.parentNode || _doc.body;\r
-                        cache = node._gsCache;\r
-                        time = TweenLite.ticker.frame;\r
-                        if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)\r
-                            return cache.width * v / 100;\r
-                        }\r
-                        style[(horiz ? "width" : "height")] = v + sfx;\r
-                    } else {\r
-                        style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;\r
-                    }\r
-                    node.appendChild(_tempDiv);\r
-                    pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);\r
-                    node.removeChild(_tempDiv);\r
-                    if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) {\r
-                        cache = node._gsCache = node._gsCache || {};\r
-                        cache.time = time;\r
-                        cache.width = pix / v * 100;\r
-                    }\r
-                    if (pix === 0 && !recurse) {\r
-                        pix = _convertToPixels(t, p, v, sfx, true);\r
-                    }\r
-                }\r
-                return neg ? -pix : pix;\r
-            },\r
-            _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop\r
-                if (_getStyle(t, "position", cs) !== "absolute") { return 0; }\r
-                var dim = ((p === "left") ? "Left" : "Top"),\r
-                    v = _getStyle(t, "margin" + dim, cs);\r
-                return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);\r
-            },\r
-\r
-            // @private returns at object containing ALL of the style properties in camelCase and their associated values.\r
-            _getAllStyles = function(t, cs) {\r
-                var s = {},\r
-                    i, tr;\r
-                if ((cs = cs || _getComputedStyle(t, null))) {\r
-                    if ((i = cs.length)) {\r
-                        while (--i > -1) {\r
-                            s[cs[i].replace(_camelExp, _camelFunc)] = cs.getPropertyValue(cs[i]);\r
-                        }\r
-                    } else { //Opera behaves differently - cs.length is always 0, so we must do a for...in loop.\r
-                        for (i in cs) {\r
-                            s[i] = cs[i];\r
-                        }\r
-                    }\r
-                } else if ((cs = t.currentStyle || t.style)) {\r
-                    for (i in cs) {\r
-                        if (typeof(i) === "string" && s[i] === undefined) {\r
-                            s[i.replace(_camelExp, _camelFunc)] = cs[i];\r
-                        }\r
-                    }\r
-                }\r
-                if (!_supportsOpacity) {\r
-                    s.opacity = _getIEOpacity(t);\r
-                }\r
-                tr = _getTransform(t, cs, false);\r
-                s.rotation = tr.rotation;\r
-                s.skewX = tr.skewX;\r
-                s.scaleX = tr.scaleX;\r
-                s.scaleY = tr.scaleY;\r
-                s.x = tr.x;\r
-                s.y = tr.y;\r
-                if (_supports3D) {\r
-                    s.z = tr.z;\r
-                    s.rotationX = tr.rotationX;\r
-                    s.rotationY = tr.rotationY;\r
-                    s.scaleZ = tr.scaleZ;\r
-                }\r
-                if (s.filters) {\r
-                    delete s.filters;\r
-                }\r
-                return s;\r
-            },\r
-\r
-            // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.\r
-            _cssDif = function(t, s1, s2, vars, forceLookup) {\r
-                var difs = {},\r
-                    style = t.style,\r
-                    val, p, mpt;\r
-                for (p in s2) {\r
-                    if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") {\r
-                        difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.\r
-                        if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes.\r
-                            mpt = new MiniPropTween(style, p, style[p], mpt);\r
-                        }\r
-                    }\r
-                }\r
-                if (vars) {\r
-                    for (p in vars) { //copy properties (except className)\r
-                        if (p !== "className") {\r
-                            difs[p] = vars[p];\r
-                        }\r
-                    }\r
-                }\r
-                return {difs:difs, firstMPT:mpt};\r
-            },\r
-            _dimensions = {width:["Left","Right"], height:["Top","Bottom"]},\r
-            _margins = ["marginLeft","marginRight","marginTop","marginBottom"],\r
-\r
-            /**\r
-             * @private Gets the width or height of an element\r
-             * @param {!Object} t Target element\r
-             * @param {!string} p Property name ("width" or "height")\r
-             * @param {Object=} cs Computed style object (if one exists). Just a speed optimization.\r
-             * @return {number} Dimension (in pixels)\r
-             */\r
-            _getDimension = function(t, p, cs) {\r
-                var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),\r
-                    a = _dimensions[p],\r
-                    i = a.length;\r
-                cs = cs || _getComputedStyle(t, null);\r
-                while (--i > -1) {\r
-                    v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0;\r
-                    v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;\r
-                }\r
-                return v;\r
-            },\r
-\r
-            // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)\r
-            _parsePosition = function(v, recObj) {\r
-                if (v == null || v === "" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".\r
-                    v = "0 0";\r
-                }\r
-                var a = v.split(" "),\r
-                    x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],\r
-                    y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];\r
-                if (y == null) {\r
-                    y = "0";\r
-                } else if (y === "center") {\r
-                    y = "50%";\r
-                }\r
-                if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.\r
-                    x = "50%";\r
-                }\r
-                if (recObj) {\r
-                    recObj.oxp = (x.indexOf("%") !== -1);\r
-                    recObj.oyp = (y.indexOf("%") !== -1);\r
-                    recObj.oxr = (x.charAt(1) === "=");\r
-                    recObj.oyr = (y.charAt(1) === "=");\r
-                    recObj.ox = parseFloat(x.replace(_NaNExp, ""));\r
-                    recObj.oy = parseFloat(y.replace(_NaNExp, ""));\r
-                }\r
-                return x + " " + y + ((a.length > 2) ? " " + a[2] : "");\r
-            },\r
-\r
-            /**\r
-             * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!)\r
-             * @param {(number|string)} e End value which is typically a string, but could be a number\r
-             * @param {(number|string)} b Beginning value which is typically a string but could be a number\r
-             * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)\r
-             */\r
-            _parseChange = function(e, b) {\r
-                return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);\r
-            },\r
-\r
-            /**\r
-             * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.\r
-             * @param {Object} v Value to be parsed\r
-             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)\r
-             * @return {number} Parsed value\r
-             */\r
-            _parseVal = function(v, d) {\r
-                return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) + d : parseFloat(v);\r
-            },\r
-\r
-            /**\r
-             * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.\r
-             * @param {Object} v Value to be parsed\r
-             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)\r
-             * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY"\r
-             * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation.\r
-             * @return {number} parsed angle in radians\r
-             */\r
-            _parseAngle = function(v, d, p, directionalEnd) {\r
-                var min = 0.000001,\r
-                    cap, split, dif, result;\r
-                if (v == null) {\r
-                    result = d;\r
-                } else if (typeof(v) === "number") {\r
-                    result = v;\r
-                } else {\r
-                    cap = 360;\r
-                    split = v.split("_");\r
-                    dif = Number(split[0].replace(_NaNExp, "")) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - ((v.charAt(1) === "=") ? 0 : d);\r
-                    if (split.length) {\r
-                        if (directionalEnd) {\r
-                            directionalEnd[p] = d + dif;\r
-                        }\r
-                        if (v.indexOf("short") !== -1) {\r
-                            dif = dif % cap;\r
-                            if (dif !== dif % (cap / 2)) {\r
-                                dif = (dif < 0) ? dif + cap : dif - cap;\r
-                            }\r
-                        }\r
-                        if (v.indexOf("_cw") !== -1 && dif < 0) {\r
-                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {\r
-                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        }\r
-                    }\r
-                    result = d + dif;\r
-                }\r
-                if (result < min && result > -min) {\r
-                    result = 0;\r
-                }\r
-                return result;\r
-            },\r
-\r
-            _colorLookup = {aqua:[0,255,255],\r
-                lime:[0,255,0],\r
-                silver:[192,192,192],\r
-                black:[0,0,0],\r
-                maroon:[128,0,0],\r
-                teal:[0,128,128],\r
-                blue:[0,0,255],\r
-                navy:[0,0,128],\r
-                white:[255,255,255],\r
-                fuchsia:[255,0,255],\r
-                olive:[128,128,0],\r
-                yellow:[255,255,0],\r
-                orange:[255,165,0],\r
-                gray:[128,128,128],\r
-                purple:[128,0,128],\r
-                green:[0,128,0],\r
-                red:[255,0,0],\r
-                pink:[255,192,203],\r
-                cyan:[0,255,255],\r
-                transparent:[255,255,255,0]},\r
-\r
-            _hue = function(h, m1, m2) {\r
-                h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;\r
-                return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;\r
-            },\r
-\r
-            /**\r
-             * @private Parses a color (like #9F0, #FF9900, or rgb(255,51,153)) into an array with 3 elements for red, green, and blue. Also handles rgba() values (splits into array of 4 elements of course)\r
-             * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.\r
-             * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order.\r
-             */\r
-            _parseColor = function(v) {\r
-                var c1, c2, c3, h, s, l;\r
-                if (!v || v === "") {\r
-                    return _colorLookup.black;\r
-                }\r
-                if (typeof(v) === "number") {\r
-                    return [v >> 16, (v >> 8) & 255, v & 255];\r
-                }\r
-                if (v.charAt(v.length - 1) === ",") { //sometimes a trailing commma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.\r
-                    v = v.substr(0, v.length - 1);\r
-                }\r
-                if (_colorLookup[v]) {\r
-                    return _colorLookup[v];\r
-                }\r
-                if (v.charAt(0) === "#") {\r
-                    if (v.length === 4) { //for shorthand like #9F0\r
-                        c1 = v.charAt(1),\r
-                        c2 = v.charAt(2),\r
-                        c3 = v.charAt(3);\r
-                        v = "#" + c1 + c1 + c2 + c2 + c3 + c3;\r
-                    }\r
-                    v = parseInt(v.substr(1), 16);\r
-                    return [v >> 16, (v >> 8) & 255, v & 255];\r
-                }\r
-                if (v.substr(0, 3) === "hsl") {\r
-                    v = v.match(_numExp);\r
-                    h = (Number(v[0]) % 360) / 360;\r
-                    s = Number(v[1]) / 100;\r
-                    l = Number(v[2]) / 100;\r
-                    c2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;\r
-                    c1 = l * 2 - c2;\r
-                    if (v.length > 3) {\r
-                        v[3] = Number(v[3]);\r
-                    }\r
-                    v[0] = _hue(h + 1 / 3, c1, c2);\r
-                    v[1] = _hue(h, c1, c2);\r
-                    v[2] = _hue(h - 1 / 3, c1, c2);\r
-                    return v;\r
-                }\r
-                v = v.match(_numExp) || _colorLookup.transparent;\r
-                v[0] = Number(v[0]);\r
-                v[1] = Number(v[1]);\r
-                v[2] = Number(v[2]);\r
-                if (v.length > 3) {\r
-                    v[3] = Number(v[3]);\r
-                }\r
-                return v;\r
-            },\r
-            _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.\r
-\r
-        for (p in _colorLookup) {\r
-            _colorExp += "|" + p + "\\b";\r
-        }\r
-        _colorExp = new RegExp(_colorExp+")", "gi");\r
-\r
-        /**\r
-         * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned.\r
-         * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned.\r
-         * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't.\r
-         * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc.\r
-         * @return {Function} formatter function\r
-         */\r
-        var _getFormatter = function(dflt, clr, collapsible, multi) {\r
-                if (dflt == null) {\r
-                    return function(v) {return v;};\r
-                }\r
-                var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "",\r
-                    dVals = dflt.split(dColor).join("").match(_valuesExp) || [],\r
-                    pfx = dflt.substr(0, dflt.indexOf(dVals[0])),\r
-                    sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "",\r
-                    delim = (dflt.indexOf(" ") !== -1) ? " " : ",",\r
-                    numVals = dVals.length,\r
-                    dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "",\r
-                    formatter;\r
-                if (!numVals) {\r
-                    return function(v) {return v;};\r
-                }\r
-                if (clr) {\r
-                    formatter = function(v) {\r
-                        var color, vals, i, a;\r
-                        if (typeof(v) === "number") {\r
-                            v += dSfx;\r
-                        } else if (multi && _commasOutsideParenExp.test(v)) {\r
-                            a = v.replace(_commasOutsideParenExp, "|").split("|");\r
-                            for (i = 0; i < a.length; i++) {\r
-                                a[i] = formatter(a[i]);\r
-                            }\r
-                            return a.join(",");\r
-                        }\r
-                        color = (v.match(_colorExp) || [dColor])[0];\r
-                        vals = v.split(color).join("").match(_valuesExp) || [];\r
-                        i = vals.length;\r
-                        if (numVals > i--) {\r
-                            while (++i < numVals) {\r
-                                vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];\r
-                            }\r
-                        }\r
-                        return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : "");\r
-                    };\r
-                    return formatter;\r
-\r
-                }\r
-                formatter = function(v) {\r
-                    var vals, a, i;\r
-                    if (typeof(v) === "number") {\r
-                        v += dSfx;\r
-                    } else if (multi && _commasOutsideParenExp.test(v)) {\r
-                        a = v.replace(_commasOutsideParenExp, "|").split("|");\r
-                        for (i = 0; i < a.length; i++) {\r
-                            a[i] = formatter(a[i]);\r
-                        }\r
-                        return a.join(",");\r
-                    }\r
-                    vals = v.match(_valuesExp) || [];\r
-                    i = vals.length;\r
-                    if (numVals > i--) {\r
-                        while (++i < numVals) {\r
-                            vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];\r
-                        }\r
-                    }\r
-                    return pfx + vals.join(delim) + sfx;\r
-                };\r
-                return formatter;\r
-            },\r
-\r
-            /**\r
-             * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges.\r
-             * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft"\r
-             * @return {Function} a formatter function\r
-             */\r
-            _getEdgeParser = function(props) {\r
-                props = props.split(",");\r
-                return function(t, e, p, cssp, pt, plugin, vars) {\r
-                    var a = (e + "").split(" "),\r
-                        i;\r
-                    vars = {};\r
-                    for (i = 0; i < 4; i++) {\r
-                        vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)];\r
-                    }\r
-                    return cssp.parse(t, vars, pt, plugin);\r
-                };\r
-            },\r
-\r
-            // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens  which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.\r
-            _setPluginRatio = _internals._setPluginRatio = function(v) {\r
-                this.plugin.setRatio(v);\r
-                var d = this.data,\r
-                    proxy = d.proxy,\r
-                    mpt = d.firstMPT,\r
-                    min = 0.000001,\r
-                    val, pt, i, str;\r
-                while (mpt) {\r
-                    val = proxy[mpt.v];\r
-                    if (mpt.r) {\r
-                        val = Math.round(val);\r
-                    } else if (val < min && val > -min) {\r
-                        val = 0;\r
-                    }\r
-                    mpt.t[mpt.p] = val;\r
-                    mpt = mpt._next;\r
-                }\r
-                if (d.autoRotate) {\r
-                    d.autoRotate.rotation = proxy.rotation;\r
-                }\r
-                //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method.\r
-                if (v === 1) {\r
-                    mpt = d.firstMPT;\r
-                    while (mpt) {\r
-                        pt = mpt.t;\r
-                        if (!pt.type) {\r
-                            pt.e = pt.s + pt.xs0;\r
-                        } else if (pt.type === 1) {\r
-                            str = pt.xs0 + pt.s + pt.xs1;\r
-                            for (i = 1; i < pt.l; i++) {\r
-                                str += pt["xn"+i] + pt["xs"+(i+1)];\r
-                            }\r
-                            pt.e = str;\r
-                        }\r
-                        mpt = mpt._next;\r
-                    }\r
-                }\r
-            },\r
-\r
-            /**\r
-             * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value.\r
-             * @param {!Object} t target object whose property we're tweening (often a CSSPropTween)\r
-             * @param {!string} p property name\r
-             * @param {(number|string|object)} v value\r
-             * @param {MiniPropTween=} next next MiniPropTween in the linked list\r
-             * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer\r
-             */\r
-            MiniPropTween = function(t, p, v, next, r) {\r
-                this.t = t;\r
-                this.p = p;\r
-                this.v = v;\r
-                this.r = r;\r
-                if (next) {\r
-                    next._prev = this;\r
-                    this._next = next;\r
-                }\r
-            },\r
-\r
-            /**\r
-             * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element.\r
-             * This method returns an object that has the following properties:\r
-             *  - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin.  This is what we feed to the external _onInitTween() as the target\r
-             *  - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values\r
-             *  - firstMPT: the first MiniPropTween in the linked list\r
-             *  - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter.\r
-             * @param {!Object} t target object to be tweened\r
-             * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed\r
-             * @param {!CSSPlugin} cssp The CSSPlugin instance\r
-             * @param {CSSPropTween=} pt the next CSSPropTween in the linked list\r
-             * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values\r
-             * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter.\r
-             * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions)\r
-             */\r
-            _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) {\r
-                var bpt = pt,\r
-                    start = {},\r
-                    end = {},\r
-                    transform = cssp._transform,\r
-                    oldForce = _forcePT,\r
-                    i, p, xp, mpt, firstPT;\r
-                cssp._transform = null;\r
-                _forcePT = vars;\r
-                pt = firstPT = cssp.parse(t, vars, pt, plugin);\r
-                _forcePT = oldForce;\r
-                //break off from the linked list so the new ones are isolated.\r
-                if (shallow) {\r
-                    cssp._transform = transform;\r
-                    if (bpt) {\r
-                        bpt._prev = null;\r
-                        if (bpt._prev) {\r
-                            bpt._prev._next = null;\r
-                        }\r
-                    }\r
-                }\r
-                while (pt && pt !== bpt) {\r
-                    if (pt.type <= 1) {\r
-                        p = pt.p;\r
-                        end[p] = pt.s + pt.c;\r
-                        start[p] = pt.s;\r
-                        if (!shallow) {\r
-                            mpt = new MiniPropTween(pt, "s", p, mpt, pt.r);\r
-                            pt.c = 0;\r
-                        }\r
-                        if (pt.type === 1) {\r
-                            i = pt.l;\r
-                            while (--i > 0) {\r
-                                xp = "xn" + i;\r
-                                p = pt.p + "_" + xp;\r
-                                end[p] = pt.data[xp];\r
-                                start[p] = pt[xp];\r
-                                if (!shallow) {\r
-                                    mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]);\r
-                                }\r
-                            }\r
-                        }\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-                return {proxy:start, end:end, firstMPT:mpt, pt:firstPT};\r
-            },\r
-\r
-\r
-\r
-            /**\r
-             * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory.\r
-             * CSSPropTweens have the following optional properties as well (not defined through the constructor):\r
-             *  - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc.\r
-             *  - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list)\r
-             *  - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request.\r
-             *  - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target.\r
-             *  - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible.\r
-             * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything.\r
-             * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width".\r
-             * @param {number} s Starting numeric value\r
-             * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95.\r
-             * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it.\r
-             * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update.\r
-             * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip"\r
-             * @param {boolean=} r If true, the value(s) should be rounded\r
-             * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0.\r
-             * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues.\r
-             * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues.\r
-             */\r
-            CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) {\r
-                this.t = t; //target\r
-                this.p = p; //property\r
-                this.s = s; //starting value\r
-                this.c = c; //change value\r
-                this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at)\r
-                if (!(t instanceof CSSPropTween)) {\r
-                    _overwriteProps.push(this.n);\r
-                }\r
-                this.r = r; //round (boolean)\r
-                this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work\r
-                if (pr) {\r
-                    this.pr = pr;\r
-                    _hasPriority = true;\r
-                }\r
-                this.b = (b === undefined) ? s : b;\r
-                this.e = (e === undefined) ? s + c : e;\r
-                if (next) {\r
-                    this._next = next;\r
-                    next._prev = this;\r
-                }\r
-            },\r
-\r
-            /**\r
-             * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example:\r
-             * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt);\r
-             * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio().\r
-             * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method.\r
-             *\r
-             * @param {!Object} t Target whose property will be tweened\r
-             * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow")\r
-             * @param {string} b Beginning value\r
-             * @param {string} e Ending value\r
-             * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization)\r
-             * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match\r
-             * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this).\r
-             * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0.\r
-             * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300}\r
-             * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here.\r
-             * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call.\r
-             */\r
-            _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) {\r
-                //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e);\r
-                b = b || dflt || "";\r
-                pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);\r
-                e += ""; //ensures it's a string\r
-                var ba = b.split(", ").join(",").split(" "), //beginning array\r
-                    ea = e.split(", ").join(",").split(" "), //ending array\r
-                    l = ba.length,\r
-                    autoRound = (_autoRound !== false),\r
-                    i, xi, ni, bv, ev, bnums, enums, bn, rgba, temp, cv, str;\r
-                if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {\r
-                    ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");\r
-                    ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");\r
-                    l = ba.length;\r
-                }\r
-                if (l !== ea.length) {\r
-                    //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");\r
-                    ba = (dflt || "").split(" ");\r
-                    l = ba.length;\r
-                }\r
-                pt.plugin = plugin;\r
-                pt.setRatio = setRatio;\r
-                for (i = 0; i < l; i++) {\r
-                    bv = ba[i];\r
-                    ev = ea[i];\r
-                    bn = parseFloat(bv);\r
-\r
-                    //if the value begins with a number (most common). It's fine if it has a suffix like px\r
-                    if (bn || bn === 0) {\r
-                        pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);\r
-\r
-                    //if the value is a color\r
-                    } else if (clrs && (bv.charAt(0) === "#" || _colorLookup[bv] || _rgbhslExp.test(bv))) {\r
-                        str = ev.charAt(ev.length - 1) === "," ? ")," : ")"; //if there's a comma at the end, retain it.\r
-                        bv = _parseColor(bv);\r
-                        ev = _parseColor(ev);\r
-                        rgba = (bv.length + ev.length > 6);\r
-                        if (rgba && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color\r
-                            pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";\r
-                            pt.e = pt.e.split(ea[i]).join("transparent");\r
-                        } else {\r
-                            if (!_supportsOpacity) { //old versions of IE don't support rgba().\r
-                                rgba = false;\r
-                            }\r
-                            pt.appendXtra((rgba ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)\r
-                                .appendXtra("", bv[1], ev[1] - bv[1], ",", true)\r
-                                .appendXtra("", bv[2], ev[2] - bv[2], (rgba ? "," : str), true);\r
-                            if (rgba) {\r
-                                bv = (bv.length < 4) ? 1 : bv[3];\r
-                                pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false);\r
-                            }\r
-                        }\r
-\r
-                    } else {\r
-                        bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array\r
-\r
-                        //if no number is found, treat it as a non-tweening value and just append the string to the current xs.\r
-                        if (!bnums) {\r
-                            pt["xs" + pt.l] += pt.l ? " " + bv : bv;\r
-\r
-                        //loop through all the numbers that are found and construct the extra values on the pt.\r
-                        } else {\r
-                            enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5\r
-                            if (!enums || enums.length !== bnums.length) {\r
-                                //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");\r
-                                return pt;\r
-                            }\r
-                            ni = 0;\r
-                            for (xi = 0; xi < bnums.length; xi++) {\r
-                                cv = bnums[xi];\r
-                                temp = bv.indexOf(cv, ni);\r
-                                pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0));\r
-                                ni = temp + cv.length;\r
-                            }\r
-                            pt["xs" + pt.l] += bv.substr(ni);\r
-                        }\r
-                    }\r
-                }\r
-                //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly.\r
-                if (e.indexOf("=") !== -1) if (pt.data) {\r
-                    str = pt.xs0 + pt.data.s;\r
-                    for (i = 1; i < pt.l; i++) {\r
-                        str += pt["xs" + i] + pt.data["xn" + i];\r
-                    }\r
-                    pt.e = str + pt["xs" + i];\r
-                }\r
-                if (!pt.l) {\r
-                    pt.type = -1;\r
-                    pt.xs0 = pt.e;\r
-                }\r
-                return pt.xfirst || pt;\r
-            },\r
-            i = 9;\r
-\r
-\r
-        p = CSSPropTween.prototype;\r
-        p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc.\r
-        while (--i > 0) {\r
-            p["xn" + i] = 0;\r
-            p["xs" + i] = "";\r
-        }\r
-        p.xs0 = "";\r
-        p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null;\r
-\r
-\r
-        /**\r
-         * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this:\r
-         * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)"\r
-         * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method).\r
-         * @param {string=} pfx Prefix (if any)\r
-         * @param {!number} s Starting value\r
-         * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95.\r
-         * @param {string=} sfx Suffix (if any)\r
-         * @param {boolean=} r Round (if true).\r
-         * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space.\r
-         * @return {CSSPropTween} returns itself so that multiple methods can be chained together.\r
-         */\r
-        p.appendXtra = function(pfx, s, c, sfx, r, pad) {\r
-            var pt = this,\r
-                l = pt.l;\r
-            pt["xs" + l] += (pad && l) ? " " + pfx : pfx || "";\r
-            if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value!\r
-                pt["xs" + l] += s + (sfx || "");\r
-                return pt;\r
-            }\r
-            pt.l++;\r
-            pt.type = pt.setRatio ? 2 : 1;\r
-            pt["xs" + pt.l] = sfx || "";\r
-            if (l > 0) {\r
-                pt.data["xn" + l] = s + c;\r
-                pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method)\r
-                pt["xn" + l] = s;\r
-                if (!pt.plugin) {\r
-                    pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr);\r
-                    pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly.\r
-                }\r
-                return pt;\r
-            }\r
-            pt.data = {s:s + c};\r
-            pt.rxp = {};\r
-            pt.s = s;\r
-            pt.c = c;\r
-            pt.r = r;\r
-            return pt;\r
-        };\r
-\r
-        /**\r
-         * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly.\r
-         * @param {!string} p Property name (like "boxShadow" or "throwProps")\r
-         * @param {Object=} options An object containing any of the following configuration options:\r
-         *                      - defaultValue: the default value\r
-         *                      - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker)\r
-         *                      - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.)\r
-         *                      - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O)\r
-         *                      - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc.\r
-         *                      - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0.\r
-         *                      - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out.\r
-         *                      - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc.\r
-         *                      - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default).\r
-         */\r
-        var SpecialProp = function(p, options) {\r
-                options = options || {};\r
-                this.p = options.prefix ? _checkPropPrefix(p) || p : p;\r
-                _specialProps[p] = _specialProps[this.p] = this;\r
-                this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi);\r
-                if (options.parser) {\r
-                    this.parse = options.parser;\r
-                }\r
-                this.clrs = options.color;\r
-                this.multi = options.multi;\r
-                this.keyword = options.keyword;\r
-                this.dflt = options.defaultValue;\r
-                this.pr = options.priority || 0;\r
-            },\r
-\r
-            //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin.\r
-            _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) {\r
-                if (typeof(options) !== "object") {\r
-                    options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin\r
-                }\r
-                var a = p.split(","),\r
-                    d = options.defaultValue,\r
-                    i, temp;\r
-                defaults = defaults || [d];\r
-                for (i = 0; i < a.length; i++) {\r
-                    options.prefix = (i === 0 && options.prefix);\r
-                    options.defaultValue = defaults[i] || d;\r
-                    temp = new SpecialProp(a[i], options);\r
-                }\r
-            },\r
-\r
-            //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file.\r
-            _registerPluginProp = function(p) {\r
-                if (!_specialProps[p]) {\r
-                    var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin";\r
-                    _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-                        var pluginClass = (window.GreenSockGlobals || window).com.greensock.plugins[pluginName];\r
-                        if (!pluginClass) {\r
-                            _log("Error: " + pluginName + " js file not loaded.");\r
-                            return pt;\r
-                        }\r
-                        pluginClass._cssRegister();\r
-                        return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars);\r
-                    }});\r
-                }\r
-            };\r
-\r
-\r
-        p = SpecialProp.prototype;\r
-\r
-        /**\r
-         * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list)\r
-         * @param {!Object} t target element\r
-         * @param {(string|number|object)} b beginning value\r
-         * @param {(string|number|object)} e ending (destination) value\r
-         * @param {CSSPropTween=} pt next CSSPropTween in the linked list\r
-         * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here.\r
-         * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here.\r
-         * @return {CSSPropTween=} First CSSPropTween in the linked list\r
-         */\r
-        p.parseComplex = function(t, b, e, pt, plugin, setRatio) {\r
-            var kwd = this.keyword,\r
-                i, ba, ea, l, bi, ei;\r
-            //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example)\r
-            if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) {\r
-                ba = b.replace(_commasOutsideParenExp, "|").split("|");\r
-                ea = e.replace(_commasOutsideParenExp, "|").split("|");\r
-            } else if (kwd) {\r
-                ba = [b];\r
-                ea = [e];\r
-            }\r
-            if (ea) {\r
-                l = (ea.length > ba.length) ? ea.length : ba.length;\r
-                for (i = 0; i < l; i++) {\r
-                    b = ba[i] = ba[i] || this.dflt;\r
-                    e = ea[i] = ea[i] || this.dflt;\r
-                    if (kwd) {\r
-                        bi = b.indexOf(kwd);\r
-                        ei = e.indexOf(kwd);\r
-                        if (bi !== ei) {\r
-                            e = (ei === -1) ? ea : ba;\r
-                            e[i] += " " + kwd;\r
-                        }\r
-                    }\r
-                }\r
-                b = ba.join(", ");\r
-                e = ea.join(", ");\r
-            }\r
-            return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio);\r
-        };\r
-\r
-        /**\r
-         * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call:\r
-         * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this);\r
-         * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that).\r
-         * @param {!Object} t Target object whose property is being tweened\r
-         * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object).\r
-         * @param {!string} p Property name\r
-         * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween.\r
-         * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it)\r
-         * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance.\r
-         * @param {Object=} vars Original vars object that contains the data for parsing.\r
-         * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call.\r
-         */\r
-        p.parse = function(t, e, p, cssp, pt, plugin, vars) {\r
-            return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin);\r
-        };\r
-\r
-        /**\r
-         * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters:\r
-         *  1) Target object whose property should be tweened (typically a DOM element)\r
-         *  2) The end/destination value (could be a string, number, object, or whatever you want)\r
-         *  3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration)\r
-         *\r
-         * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example:\r
-         *\r
-         * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) {\r
-         *      var start = target.style.width;\r
-         *      return function(ratio) {\r
-         *              target.style.width = (start + value * ratio) + "px";\r
-         *              console.log("set width to " + target.style.width);\r
-         *          }\r
-         * }, 0);\r
-         *\r
-         * Then, when I do this tween, it will trigger my special property:\r
-         *\r
-         * TweenLite.to(element, 1, {css:{myCustomProp:100}});\r
-         *\r
-         * In the example, of course, we're just changing the width, but you can do anything you want.\r
-         *\r
-         * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}})\r
-         * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function.\r
-         * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones.\r
-         */\r
-        CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) {\r
-            _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-                var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority);\r
-                rv.plugin = plugin;\r
-                rv.setRatio = onInitTween(t, e, cssp._tween, p);\r
-                return rv;\r
-            }, priority:priority});\r
-        };\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-        //transform-related methods and properties\r
-        var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective").split(","),\r
-            _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.\r
-            _transformPropCSS = _prefixCSS + "transform",\r
-            _transformOriginProp = _checkPropPrefix("transformOrigin"),\r
-            _supports3D = (_checkPropPrefix("perspective") !== null),\r
-            Transform = _internals.Transform = function() {\r
-                this.skewY = 0;\r
-            },\r
-\r
-            /**\r
-             * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.\r
-             * @param {!Object} t target element\r
-             * @param {Object=} cs computed style object (optional)\r
-             * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...}\r
-             * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style)\r
-             * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...}\r
-             */\r
-            _getTransform = _internals.getTransform = function(t, cs, rec, parse) {\r
-                if (t._gsTransform && rec && !parse) {\r
-                    return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things.\r
-                }\r
-                var tm = rec ? t._gsTransform || new Transform() : new Transform(),\r
-                    invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.\r
-                    min = 0.00002,\r
-                    rnd = 100000,\r
-                    minAngle = 179.99,\r
-                    minPI = minAngle * _DEG2RAD,\r
-                    zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin  || 0 : 0,\r
-                    s, m, i, n, dec, scaleX, scaleY, rotation, skewX, difX, difY, difR, difS;\r
-                if (_transformProp) {\r
-                    s = _getStyle(t, _transformPropCSS, cs, true);\r
-                } else if (t.currentStyle) {\r
-                    //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix.\r
-                    s = t.currentStyle.filter.match(_ieGetMatrixExp);\r
-                    s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";\r
-                }\r
-                //split the matrix values out into an array (m for matrix)\r
-                m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || [];\r
-                i = m.length;\r
-                while (--i > -1) {\r
-                    n = Number(m[i]);\r
-                    m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).\r
-                }\r
-                if (m.length === 16) {\r
-\r
-                    //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)\r
-                    var a13 = m[8], a23 = m[9], a33 = m[10],\r
-                        a14 = m[12], a24 = m[13], a34 = m[14];\r
-\r
-                    //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari\r
-                    if (tm.zOrigin) {\r
-                        a34 = -tm.zOrigin;\r
-                        a14 = a13*a34-m[12];\r
-                        a24 = a23*a34-m[13];\r
-                        a34 = a33*a34+tm.zOrigin-m[14];\r
-                    }\r
-\r
-                    //only parse from the matrix if we MUST because not only is it usually unnecessary due to the fact that we store the values in the _gsTransform object, but also because it's impossible to accurately interpret rotationX, rotationY, rotationZ, scaleX, and scaleY if all are applied, so it's much better to rely on what we store. However, we must parse the first time that an object is tweened. We also assume that if the position has changed, the user must have done some styling changes outside of CSSPlugin, thus we force a parse in that scenario.\r
-                    if (!rec || parse || tm.rotationX == null) {\r
-                        var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],\r
-                            a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],\r
-                            a43 = m[11],\r
-                            angle = Math.atan2(a32, a33),\r
-                            xFlip = (angle < -minPI || angle > minPI),\r
-                            t1, t2, t3, cos, sin, yFlip, zFlip;\r
-                        tm.rotationX = angle * _RAD2DEG;\r
-                        //rotationX\r
-                        if (angle) {\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            t1 = a12*cos+a13*sin;\r
-                            t2 = a22*cos+a23*sin;\r
-                            t3 = a32*cos+a33*sin;\r
-                            a13 = a12*-sin+a13*cos;\r
-                            a23 = a22*-sin+a23*cos;\r
-                            a33 = a32*-sin+a33*cos;\r
-                            a43 = a42*-sin+a43*cos;\r
-                            a12 = t1;\r
-                            a22 = t2;\r
-                            a32 = t3;\r
-                        }\r
-                        //rotationY\r
-                        angle = Math.atan2(a13, a11);\r
-                        tm.rotationY = angle * _RAD2DEG;\r
-                        if (angle) {\r
-                            yFlip = (angle < -minPI || angle > minPI);\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            t1 = a11*cos-a13*sin;\r
-                            t2 = a21*cos-a23*sin;\r
-                            t3 = a31*cos-a33*sin;\r
-                            a23 = a21*sin+a23*cos;\r
-                            a33 = a31*sin+a33*cos;\r
-                            a43 = a41*sin+a43*cos;\r
-                            a11 = t1;\r
-                            a21 = t2;\r
-                            a31 = t3;\r
-                        }\r
-                        //rotationZ\r
-                        angle = Math.atan2(a21, a22);\r
-                        tm.rotation = angle * _RAD2DEG;\r
-                        if (angle) {\r
-                            zFlip = (angle < -minPI || angle > minPI);\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            a11 = a11*cos+a12*sin;\r
-                            t2 = a21*cos+a22*sin;\r
-                            a22 = a21*-sin+a22*cos;\r
-                            a32 = a31*-sin+a32*cos;\r
-                            a21 = t2;\r
-                        }\r
-\r
-                        if (zFlip && xFlip) {\r
-                            tm.rotation = tm.rotationX = 0;\r
-                        } else if (zFlip && yFlip) {\r
-                            tm.rotation = tm.rotationY = 0;\r
-                        } else if (yFlip && xFlip) {\r
-                            tm.rotationY = tm.rotationX = 0;\r
-                        }\r
-\r
-                        tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;\r
-                        tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd;\r
-                        tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd;\r
-                        tm.skewX = 0;\r
-                        tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;\r
-                        tm.x = a14;\r
-                        tm.y = a24;\r
-                        tm.z = a34;\r
-                    }\r
-\r
-                } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY)) && !(tm.x !== undefined && _getStyle(t, "display", cs) === "none")) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.\r
-                    var k = (m.length >= 6),\r
-                        a = k ? m[0] : 1,\r
-                        b = m[1] || 0,\r
-                        c = m[2] || 0,\r
-                        d = k ? m[3] : 1;\r
-                    tm.x = m[4] || 0;\r
-                    tm.y = m[5] || 0;\r
-                    scaleX = Math.sqrt(a * a + b * b);\r
-                    scaleY = Math.sqrt(d * d + c * c);\r
-                    rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).\r
-                    skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;\r
-                    difX = scaleX - Math.abs(tm.scaleX || 0);\r
-                    difY = scaleY - Math.abs(tm.scaleY || 0);\r
-                    if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {\r
-                        if (invX) {\r
-                            scaleX *= -1;\r
-                            skewX += (rotation <= 0) ? 180 : -180;\r
-                            rotation += (rotation <= 0) ? 180 : -180;\r
-                        } else {\r
-                            scaleY *= -1;\r
-                            skewX += (skewX <= 0) ? 180 : -180;\r
-                        }\r
-                    }\r
-                    difR = (rotation - tm.rotation) % 180; //note: matching ranges would be very small (+/-0.0001) or very close to 180.\r
-                    difS = (skewX - tm.skewX) % 180;\r
-                    //if there's already a recorded _gsTransform in place for the target, we should leave those values in place unless we know things changed for sure (beyond a super small amount). This gets around ambiguous interpretations, like if scaleX and scaleY are both -1, the matrix would be the same as if the rotation was 180 with normal scaleX/scaleY. If the user tweened to particular values, those must be prioritized to ensure animation is consistent.\r
-                    if (tm.skewX === undefined || difX > min || difX < -min || difY > min || difY < -min || (difR > -minAngle && difR < minAngle && (difR * rnd) | 0 !== 0) || (difS > -minAngle && difS < minAngle && (difS * rnd) | 0 !== 0)) {\r
-                        tm.scaleX = scaleX;\r
-                        tm.scaleY = scaleY;\r
-                        tm.rotation = rotation;\r
-                        tm.skewX = skewX;\r
-                    }\r
-                    if (_supports3D) {\r
-                        tm.rotationX = tm.rotationY = tm.z = 0;\r
-                        tm.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;\r
-                        tm.scaleZ = 1;\r
-                    }\r
-                }\r
-                tm.zOrigin = zOrigin;\r
-\r
-                //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.\r
-                for (i in tm) {\r
-                    if (tm[i] < min) if (tm[i] > -min) {\r
-                        tm[i] = 0;\r
-                    }\r
-                }\r
-                //DEBUG: _log("parsed rotation: "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);\r
-                if (rec) {\r
-                    t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)\r
-                }\r
-                return tm;\r
-            },\r
-\r
-            //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms)\r
-            _setIETransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    ang = -t.rotation * _DEG2RAD,\r
-                    skew = ang + t.skewX * _DEG2RAD,\r
-                    rnd = 100000,\r
-                    a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd,\r
-                    b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd,\r
-                    c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd,\r
-                    d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd,\r
-                    style = this.t.style,\r
-                    cs = this.t.currentStyle,\r
-                    filters, val;\r
-                if (!cs) {\r
-                    return;\r
-                }\r
-                val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted)\r
-                b = -c;\r
-                c = -val;\r
-                filters = cs.filter;\r
-                style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight\r
-                var w = this.t.offsetWidth,\r
-                    h = this.t.offsetHeight,\r
-                    clip = (cs.position !== "absolute"),\r
-                    m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d,\r
-                    ox = t.x,\r
-                    oy = t.y,\r
-                    dx, dy;\r
-\r
-                //if transformOrigin is being used, adjust the offset x and y\r
-                if (t.ox != null) {\r
-                    dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2;\r
-                    dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2;\r
-                    ox += dx - (dx * a + dy * b);\r
-                    oy += dy - (dx * c + dy * d);\r
-                }\r
-\r
-                if (!clip) {\r
-                    m += ", sizingMethod='auto expand')";\r
-                } else {\r
-                    dx = (w / 2);\r
-                    dy = (h / 2);\r
-                    //translate to ensure that transformations occur around the correct origin (default is center).\r
-                    m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")";\r
-                }\r
-                if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) {\r
-                    style.filter = filters.replace(_ieSetMatrixExp, m);\r
-                } else {\r
-                    style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha.\r
-                }\r
-\r
-                //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance.\r
-                if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) {\r
-                    style.removeAttribute("filter");\r
-                }\r
-\r
-                //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration).\r
-                if (!clip) {\r
-                    var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom\r
-                        marg, prop, dif;\r
-                    dx = t.ieOffsetX || 0;\r
-                    dy = t.ieOffsetY || 0;\r
-                    t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox);\r
-                    t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy);\r
-                    for (i = 0; i < 4; i++) {\r
-                        prop = _margins[i];\r
-                        marg = cs[prop];\r
-                        //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes)\r
-                        val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0;\r
-                        if (val !== t[prop]) {\r
-                            dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible.\r
-                        } else {\r
-                            dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY;\r
-                        }\r
-                        style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px";\r
-                    }\r
-                }\r
-            },\r
-\r
-            _set3DTransformRatio = _internals.set3DTransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    style = this.t.style,\r
-                    angle = t.rotation * _DEG2RAD,\r
-                    sx = t.scaleX,\r
-                    sy = t.scaleY,\r
-                    sz = t.scaleZ,\r
-                    perspective = t.perspective,\r
-                    a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43,\r
-                    zOrigin, rnd, cos, sin, t1, t2, t3, t4;\r
-                if (v === 1 || v === 0) if (t.force3D === "auto") if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !t.z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices\r
-                    _set2DTransformRatio.call(this, v);\r
-                    return;\r
-                }\r
-                if (_isFirefox) {\r
-                    var n = 0.0001;\r
-                    if (sx < n && sx > -n) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.\r
-                        sx = sz = 0.00002;\r
-                    }\r
-                    if (sy < n && sy > -n) {\r
-                        sy = sz = 0.00002;\r
-                    }\r
-                    if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).\r
-                        perspective = 0;\r
-                    }\r
-                }\r
-                if (angle || t.skewX) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    a11 = cos;\r
-                    a21 = sin;\r
-                    if (t.skewX) {\r
-                        angle -= t.skewX * _DEG2RAD;\r
-                        cos = Math.cos(angle);\r
-                        sin = Math.sin(angle);\r
-                        if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does\r
-                            t1 = Math.tan(t.skewX * _DEG2RAD);\r
-                            t1 = Math.sqrt(1 + t1 * t1);\r
-                            cos *= t1;\r
-                            sin *= t1;\r
-                        }\r
-                    }\r
-                    a12 = -sin;\r
-                    a22 = cos;\r
-\r
-                } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective) { //if we're only translating and/or 2D scaling, this is faster...\r
-                    style[_transformProp] = "translate3d(" + t.x + "px," + t.y + "px," + t.z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");\r
-                    return;\r
-                } else {\r
-                    a11 = a22 = 1;\r
-                    a12 = a21 = 0;\r
-                }\r
-                a33 = 1;\r
-                a13 = a14 = a23 = a24 = a31 = a32 = a34 = a41 = a42 = 0;\r
-                a43 = (perspective) ? -1 / perspective : 0;\r
-                zOrigin = t.zOrigin;\r
-                rnd = 100000;\r
-                angle = t.rotationY * _DEG2RAD;\r
-                if (angle) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    a31 = a33*-sin;\r
-                    a41 = a43*-sin;\r
-                    a13 = a11*sin;\r
-                    a23 = a21*sin;\r
-                    a33 *= cos;\r
-                    a43 *= cos;\r
-                    a11 *= cos;\r
-                    a21 *= cos;\r
-                }\r
-                angle = t.rotationX * _DEG2RAD;\r
-                if (angle) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    t1 = a12*cos+a13*sin;\r
-                    t2 = a22*cos+a23*sin;\r
-                    t3 = a32*cos+a33*sin;\r
-                    t4 = a42*cos+a43*sin;\r
-                    a13 = a12*-sin+a13*cos;\r
-                    a23 = a22*-sin+a23*cos;\r
-                    a33 = a32*-sin+a33*cos;\r
-                    a43 = a42*-sin+a43*cos;\r
-                    a12 = t1;\r
-                    a22 = t2;\r
-                    a32 = t3;\r
-                    a42 = t4;\r
-                }\r
-                if (sz !== 1) {\r
-                    a13*=sz;\r
-                    a23*=sz;\r
-                    a33*=sz;\r
-                    a43*=sz;\r
-                }\r
-                if (sy !== 1) {\r
-                    a12*=sy;\r
-                    a22*=sy;\r
-                    a32*=sy;\r
-                    a42*=sy;\r
-                }\r
-                if (sx !== 1) {\r
-                    a11*=sx;\r
-                    a21*=sx;\r
-                    a31*=sx;\r
-                    a41*=sx;\r
-                }\r
-                if (zOrigin) {\r
-                    a34 -= zOrigin;\r
-                    a14 = a13*a34;\r
-                    a24 = a23*a34;\r
-                    a34 = a33*a34+zOrigin;\r
-                }\r
-                //we round the x, y, and z slightly differently to allow even larger values.\r
-                a14 = (t1 = (a14 += t.x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;\r
-                a24 = (t1 = (a24 += t.y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;\r
-                a34 = (t1 = (a34 += t.z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;\r
-                style[_transformProp] = "matrix3d(" + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";\r
-            },\r
-\r
-            _set2DTransformRatio = _internals.set2DTransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    targ = this.t,\r
-                    style = targ.style,\r
-                    ang, skew, rnd, sx, sy;\r
-                if (t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.\r
-                    this.setRatio = _set3DTransformRatio;\r
-                    _set3DTransformRatio.call(this, v);\r
-                    return;\r
-                }\r
-                if (!t.rotation && !t.skewX) {\r
-                    style[_transformProp] = "matrix(" + t.scaleX + ",0,0," + t.scaleY + "," + t.x + "," + t.y + ")";\r
-                } else {\r
-                    ang = t.rotation * _DEG2RAD;\r
-                    skew = ang - t.skewX * _DEG2RAD;\r
-                    rnd = 100000;\r
-                    sx = t.scaleX * rnd;\r
-                    sy = t.scaleY * rnd;\r
-                    //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.\r
-                    style[_transformProp] = "matrix(" + (((Math.cos(ang) * sx) | 0) / rnd) + "," + (((Math.sin(ang) * sx) | 0) / rnd) + "," + (((Math.sin(skew) * -sy) | 0) / rnd) + "," + (((Math.cos(skew) * sy) | 0) / rnd) + "," + t.x + "," + t.y + ")";\r
-                }\r
-            };\r
-\r
-        _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType", {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-            if (cssp._transform) { return pt; } //only need to parse the transform once, and only if the browser supports it.\r
-            var m1 = cssp._transform = _getTransform(t, _cs, true, vars.parseTransform),\r
-                style = t.style,\r
-                min = 0.000001,\r
-                i = _transformProps.length,\r
-                v = vars,\r
-                endRotations = {},\r
-                m2, skewY, copy, orig, has3D, hasChange, dr;\r
-            if (typeof(v.transform) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"\r
-                copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.\r
-                copy[_transformProp] = v.transform;\r
-                copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.\r
-                copy.position = "absolute";\r
-                _doc.body.appendChild(_tempDiv);\r
-                m2 = _getTransform(_tempDiv, null, false);\r
-                _doc.body.removeChild(_tempDiv);\r
-            } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object)\r
-                m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX),\r
-                    scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY),\r
-                    scaleZ:_parseVal(v.scaleZ, m1.scaleZ),\r
-                    x:_parseVal(v.x, m1.x),\r
-                    y:_parseVal(v.y, m1.y),\r
-                    z:_parseVal(v.z, m1.z),\r
-                    perspective:_parseVal(v.transformPerspective, m1.perspective)};\r
-                dr = v.directionalRotation;\r
-                if (dr != null) {\r
-                    if (typeof(dr) === "object") {\r
-                        for (copy in dr) {\r
-                            v[copy] = dr[copy];\r
-                        }\r
-                    } else {\r
-                        v.rotation = dr;\r
-                    }\r
-                }\r
-                m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);\r
-                if (_supports3D) {\r
-                    m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);\r
-                    m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);\r
-                }\r
-                m2.skewX = (v.skewX == null) ? m1.skewX : _parseAngle(v.skewX, m1.skewX);\r
-\r
-                //note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.\r
-                m2.skewY = (v.skewY == null) ? m1.skewY : _parseAngle(v.skewY, m1.skewY);\r
-                if ((skewY = m2.skewY - m1.skewY)) {\r
-                    m2.skewX += skewY;\r
-                    m2.rotation += skewY;\r
-                }\r
-            }\r
-\r
-            if (_supports3D && v.force3D != null) {\r
-                m1.force3D = v.force3D;\r
-                hasChange = true;\r
-            }\r
-\r
-            m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;\r
-\r
-            has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);\r
-            if (!has3D && v.scale != null) {\r
-                m2.scaleZ = 1; //no need to tween scaleZ.\r
-            }\r
-\r
-            while (--i > -1) {\r
-                p = _transformProps[i];\r
-                orig = m2[p] - m1[p];\r
-                if (orig > min || orig < -min || _forcePT[p] != null) {\r
-                    hasChange = true;\r
-                    pt = new CSSPropTween(m1, p, m1[p], orig, pt);\r
-                    if (p in endRotations) {\r
-                        pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested\r
-                    }\r
-                    pt.xs0 = 0; //ensures the value stays numeric in setRatio()\r
-                    pt.plugin = plugin;\r
-                    cssp._overwriteProps.push(pt.n);\r
-                }\r
-            }\r
-\r
-            orig = v.transformOrigin;\r
-            if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).\r
-                if (_transformProp) {\r
-                    hasChange = true;\r
-                    p = _transformOriginProp;\r
-                    orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors\r
-                    pt = new CSSPropTween(style, p, 0, 0, pt, -1, "transformOrigin");\r
-                    pt.b = style[p];\r
-                    pt.plugin = plugin;\r
-                    if (_supports3D) {\r
-                        copy = m1.zOrigin;\r
-                        orig = orig.split(" ");\r
-                        m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.\r
-                        pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!\r
-                        pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)\r
-                        pt.b = copy;\r
-                        pt.xs0 = pt.e = m1.zOrigin;\r
-                    } else {\r
-                        pt.xs0 = pt.e = orig;\r
-                    }\r
-\r
-                //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).\r
-                } else {\r
-                    _parsePosition(orig + "", m1);\r
-                }\r
-            }\r
-\r
-            if (hasChange) {\r
-                cssp._transformType = (has3D || this._transformType === 3) ? 3 : 2; //quicker than calling cssp._enableTransforms();\r
-            }\r
-            return pt;\r
-        }, prefix:true});\r
-\r
-        _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});\r
-\r
-        _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {\r
-            e = this.format(e);\r
-            var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],\r
-                style = t.style,\r
-                ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em;\r
-            w = parseFloat(t.offsetWidth);\r
-            h = parseFloat(t.offsetHeight);\r
-            ea1 = e.split(" ");\r
-            for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis!\r
-                if (this.p.indexOf("border")) { //older browsers used a prefix\r
-                    props[i] = _checkPropPrefix(props[i]);\r
-                }\r
-                bs = bs2 = _getStyle(t, props[i], _cs, false, "0px");\r
-                if (bs.indexOf(" ") !== -1) {\r
-                    bs2 = bs.split(" ");\r
-                    bs = bs2[0];\r
-                    bs2 = bs2[1];\r
-                }\r
-                es = es2 = ea1[i];\r
-                bn = parseFloat(bs);\r
-                bsfx = bs.substr((bn + "").length);\r
-                rel = (es.charAt(1) === "=");\r
-                if (rel) {\r
-                    en = parseInt(es.charAt(0)+"1", 10);\r
-                    es = es.substr(2);\r
-                    en *= parseFloat(es);\r
-                    esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || "";\r
-                } else {\r
-                    en = parseFloat(es);\r
-                    esfx = es.substr((en + "").length);\r
-                }\r
-                if (esfx === "") {\r
-                    esfx = _suffixMap[p] || bsfx;\r
-                }\r
-                if (esfx !== bsfx) {\r
-                    hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent.\r
-                    vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number\r
-                    if (esfx === "%") {\r
-                        bs = (hn / w * 100) + "%";\r
-                        bs2 = (vn / h * 100) + "%";\r
-                    } else if (esfx === "em") {\r
-                        em = _convertToPixels(t, "borderLeft", 1, "em");\r
-                        bs = (hn / em) + "em";\r
-                        bs2 = (vn / em) + "em";\r
-                    } else {\r
-                        bs = hn + "px";\r
-                        bs2 = vn + "px";\r
-                    }\r
-                    if (rel) {\r
-                        es = (parseFloat(bs) + en) + esfx;\r
-                        es2 = (parseFloat(bs2) + en) + esfx;\r
-                    }\r
-                }\r
-                pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt);\r
-            }\r
-            return pt;\r
-        }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)});\r
-        _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) {\r
-            var bp = "background-position",\r
-                cs = (_cs || _getComputedStyle(t, null)),\r
-                bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase\r
-                es = this.format(e),\r
-                ba, ea, i, pct, overlap, src;\r
-            if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) {\r
-                src = _getStyle(t, "backgroundImage").replace(_urlExp, "");\r
-                if (src && src !== "none") {\r
-                    ba = bs.split(" ");\r
-                    ea = es.split(" ");\r
-                    _tempImg.setAttribute("src", src); //set the temp <img>'s src to the background-image so that we can measure its width/height\r
-                    i = 2;\r
-                    while (--i > -1) {\r
-                        bs = ba[i];\r
-                        pct = (bs.indexOf("%") !== -1);\r
-                        if (pct !== (ea[i].indexOf("%") !== -1)) {\r
-                            overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height;\r
-                            ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%";\r
-                        }\r
-                    }\r
-                    bs = ba.join(" ");\r
-                }\r
-            }\r
-            return this.parseComplex(t.style, bs, es, pt, plugin);\r
-        }, formatter:_parsePosition});\r
-        _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:_parsePosition});\r
-        _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});\r
-        _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});\r
-        _registerComplexSpecialProp("transformStyle", {prefix:true});\r
-        _registerComplexSpecialProp("backfaceVisibility", {prefix:true});\r
-        _registerComplexSpecialProp("userSelect", {prefix:true});\r
-        _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")});\r
-        _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")});\r
-        _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){\r
-            var b, cs, delim;\r
-            if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited.\r
-                cs = t.currentStyle;\r
-                delim = _ieVers < 8 ? " " : ",";\r
-                b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")";\r
-                e = this.format(e).split(",").join(delim);\r
-            } else {\r
-                b = this.format(_getStyle(t, this.p, _cs, false, this.dflt));\r
-                e = this.format(e);\r
-            }\r
-            return this.parseComplex(t.style, b, e, pt, plugin);\r
-        }});\r
-        _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true});\r
-        _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them)\r
-        _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) {\r
-                return this.parseComplex(t.style, this.format(_getStyle(t, "borderTopWidth", _cs, false, "0px") + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), this.format(e), pt, plugin);\r
-            }, color:true, formatter:function(v) {\r
-                var a = v.split(" ");\r
-                return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0];\r
-            }});\r
-        _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline).\r
-        _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) {\r
-            var s = t.style,\r
-                prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat";\r
-            return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e);\r
-        }});\r
-\r
-        //opacity-related\r
-        var _setIEOpacityRatio = function(v) {\r
-                var t = this.t, //refers to the element's style property\r
-                    filters = t.filter || _getStyle(this.data, "filter"),\r
-                    val = (this.s + this.c * v) | 0,\r
-                    skip;\r
-                if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.\r
-                    if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) {\r
-                        t.removeAttribute("filter");\r
-                        skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check.\r
-                    } else {\r
-                        t.filter = filters.replace(_alphaFilterExp, "");\r
-                        skip = true;\r
-                    }\r
-                }\r
-                if (!skip) {\r
-                    if (this.xn1) {\r
-                        t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame.\r
-                    }\r
-                    if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues\r
-                        if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween)\r
-                            t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly.\r
-                        }\r
-                    } else {\r
-                        t.filter = filters.replace(_opacityExp, "opacity=" + val);\r
-                    }\r
-                }\r
-            };\r
-        _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) {\r
-            var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")),\r
-                style = t.style,\r
-                isAutoAlpha = (p === "autoAlpha");\r
-            if (typeof(e) === "string" && e.charAt(1) === "=") {\r
-                e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b;\r
-            }\r
-            if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)\r
-                b = 0;\r
-            }\r
-            if (_supportsOpacity) {\r
-                pt = new CSSPropTween(style, "opacity", b, e - b, pt);\r
-            } else {\r
-                pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt);\r
-                pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug.\r
-                style.zoom = 1; //helps correct an IE issue.\r
-                pt.type = 2;\r
-                pt.b = "alpha(opacity=" + pt.s + ")";\r
-                pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")";\r
-                pt.data = t;\r
-                pt.plugin = plugin;\r
-                pt.setRatio = _setIEOpacityRatio;\r
-            }\r
-            if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier\r
-                pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));\r
-                pt.xs0 = "inherit";\r
-                cssp._overwriteProps.push(pt.n);\r
-                cssp._overwriteProps.push(p);\r
-            }\r
-            return pt;\r
-        }});\r
-\r
-\r
-        var _removeProp = function(s, p) {\r
-                if (p) {\r
-                    if (s.removeProperty) {\r
-                        if (p.substr(0,2) === "ms") { //Microsoft browsers don't conform to the standard of capping the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)\r
-                            p = "M" + p.substr(1);\r
-                        }\r
-                        s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());\r
-                    } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"\r
-                        s.removeAttribute(p);\r
-                    }\r
-                }\r
-            },\r
-            _setClassNameRatio = function(v) {\r
-                this.t._gsClassPT = this;\r
-                if (v === 1 || v === 0) {\r
-                    this.t.setAttribute("class", (v === 0) ? this.b : this.e);\r
-                    var mpt = this.data, //first MiniPropTween\r
-                        s = this.t.style;\r
-                    while (mpt) {\r
-                        if (!mpt.v) {\r
-                            _removeProp(s, mpt.p);\r
-                        } else {\r
-                            s[mpt.p] = mpt.v;\r
-                        }\r
-                        mpt = mpt._next;\r
-                    }\r
-                    if (v === 1 && this.t._gsClassPT === this) {\r
-                        this.t._gsClassPT = null;\r
-                    }\r
-                } else if (this.t.getAttribute("class") !== this.e) {\r
-                    this.t.setAttribute("class", this.e);\r
-                }\r
-            };\r
-        _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-            var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable.\r
-                cssText = t.style.cssText,\r
-                difData, bs, cnpt, cnptLookup, mpt;\r
-            pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2);\r
-            pt.setRatio = _setClassNameRatio;\r
-            pt.pr = -11;\r
-            _hasPriority = true;\r
-            pt.b = b;\r
-            bs = _getAllStyles(t, _cs);\r
-            //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values)\r
-            cnpt = t._gsClassPT;\r
-            if (cnpt) {\r
-                cnptLookup = {};\r
-                mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned.\r
-                while (mpt) {\r
-                    cnptLookup[mpt.p] = 1;\r
-                    mpt = mpt._next;\r
-                }\r
-                cnpt.setRatio(1);\r
-            }\r
-            t._gsClassPT = pt;\r
-            pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("\\s*\\b" + e.substr(2) + "\\b"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");\r
-            if (cssp._tween._duration) { //if it's a zero-duration tween, there's no need to tween anything or parse the data. In fact, if we switch classes temporarily (which we must do for proper parsing) and the class has a transition applied, it could cause a quick flash to the end state and back again initially in some browsers.\r
-                t.setAttribute("class", pt.e);\r
-                difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);\r
-                t.setAttribute("class", b);\r
-                pt.data = difData.firstMPT;\r
-                t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).\r
-                pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)\r
-            }\r
-            return pt;\r
-        }});\r
-\r
-\r
-        var _setClearPropsRatio = function(v) {\r
-            if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).\r
-                var s = this.t.style,\r
-                    transformParse = _specialProps.transform.parse,\r
-                    a, p, i, clearTransform;\r
-                if (this.e === "all") {\r
-                    s.cssText = "";\r
-                    clearTransform = true;\r
-                } else {\r
-                    a = this.e.split(",");\r
-                    i = a.length;\r
-                    while (--i > -1) {\r
-                        p = a[i];\r
-                        if (_specialProps[p]) {\r
-                            if (_specialProps[p].parse === transformParse) {\r
-                                clearTransform = true;\r
-                            } else {\r
-                                p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow"\r
-                            }\r
-                        }\r
-                        _removeProp(s, p);\r
-                    }\r
-                }\r
-                if (clearTransform) {\r
-                    _removeProp(s, _transformProp);\r
-                    if (this.t._gsTransform) {\r
-                        delete this.t._gsTransform;\r
-                    }\r
-                }\r
-\r
-            }\r
-        };\r
-        _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) {\r
-            pt = new CSSPropTween(t, p, 0, 0, pt, 2);\r
-            pt.setRatio = _setClearPropsRatio;\r
-            pt.e = e;\r
-            pt.pr = -10;\r
-            pt.data = cssp._tween;\r
-            _hasPriority = true;\r
-            return pt;\r
-        }});\r
-\r
-        p = "bezier,throwProps,physicsProps,physics2D".split(",");\r
-        i = p.length;\r
-        while (i--) {\r
-            _registerPluginProp(p[i]);\r
-        }\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-        p = CSSPlugin.prototype;\r
-        p._firstPT = null;\r
-\r
-        //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.\r
-        p._onInitTween = function(target, vars, tween) {\r
-            if (!target.nodeType) { //css is only for dom elements\r
-                return false;\r
-            }\r
-            this._target = target;\r
-            this._tween = tween;\r
-            this._vars = vars;\r
-            _autoRound = vars.autoRound;\r
-            _hasPriority = false;\r
-            _suffixMap = vars.suffixMap || CSSPlugin.suffixMap;\r
-            _cs = _getComputedStyle(target, "");\r
-            _overwriteProps = this._overwriteProps;\r
-            var style = target.style,\r
-                v, pt, pt2, first, last, next, zIndex, tpt, threeD;\r
-            if (_reqSafariFix) if (style.zIndex === "") {\r
-                v = _getStyle(target, "zIndex", _cs);\r
-                if (v === "auto" || v === "") {\r
-                    //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive.\r
-                    this._addLazySet(style, "zIndex", 0);\r
-                }\r
-            }\r
-\r
-            if (typeof(vars) === "string") {\r
-                first = style.cssText;\r
-                v = _getAllStyles(target, _cs);\r
-                style.cssText = first + ";" + vars;\r
-                v = _cssDif(target, v, _getAllStyles(target)).difs;\r
-                if (!_supportsOpacity && _opacityValExp.test(vars)) {\r
-                    v.opacity = parseFloat( RegExp.$1 );\r
-                }\r
-                vars = v;\r
-                style.cssText = first;\r
-            }\r
-            this._firstPT = pt = this.parse(target, vars, null);\r
-\r
-            if (this._transformType) {\r
-                threeD = (this._transformType === 3);\r
-                if (!_transformProp) {\r
-                    style.zoom = 1; //helps correct an IE issue.\r
-                } else if (_isSafari) {\r
-                    _reqSafariFix = true;\r
-                    //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random).\r
-                    if (style.zIndex === "") {\r
-                        zIndex = _getStyle(target, "zIndex", _cs);\r
-                        if (zIndex === "auto" || zIndex === "") {\r
-                            this._addLazySet(style, "zIndex", 0);\r
-                        }\r
-                    }\r
-                    //Setting WebkitBackfaceVisibility corrects 3 bugs:\r
-                    // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update.\r
-                    // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly.\r
-                    // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug.\r
-                    //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween.\r
-                    if (_isSafariLT6) {\r
-                        this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden"));\r
-                    }\r
-                }\r
-                pt2 = pt;\r
-                while (pt2 && pt2._next) {\r
-                    pt2 = pt2._next;\r
-                }\r
-                tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);\r
-                this._linkCSSP(tpt, null, pt2);\r
-                tpt.setRatio = (threeD && _supports3D) ? _set3DTransformRatio : _transformProp ? _set2DTransformRatio : _setIETransformRatio;\r
-                tpt.data = this._transform || _getTransform(target, _cs, true);\r
-                _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.\r
-            }\r
-\r
-            if (_hasPriority) {\r
-                //reorders the linked list in order of pr (priority)\r
-                while (pt) {\r
-                    next = pt._next;\r
-                    pt2 = first;\r
-                    while (pt2 && pt2.pr > pt.pr) {\r
-                        pt2 = pt2._next;\r
-                    }\r
-                    if ((pt._prev = pt2 ? pt2._prev : last)) {\r
-                        pt._prev._next = pt;\r
-                    } else {\r
-                        first = pt;\r
-                    }\r
-                    if ((pt._next = pt2)) {\r
-                        pt2._prev = pt;\r
-                    } else {\r
-                        last = pt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-                this._firstPT = first;\r
-            }\r
-            return true;\r
-        };\r
-\r
-\r
-        p.parse = function(target, vars, pt, plugin) {\r
-            var style = target.style,\r
-                p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;\r
-            for (p in vars) {\r
-                es = vars[p]; //ending value string\r
-                sp = _specialProps[p]; //SpecialProp lookup.\r
-                if (sp) {\r
-                    pt = sp.parse(target, es, p, this, pt, plugin, vars);\r
-\r
-                } else {\r
-                    bs = _getStyle(target, p, _cs) + "";\r
-                    isStr = (typeof(es) === "string");\r
-                    if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor:\r
-                        if (!isStr) {\r
-                            es = _parseColor(es);\r
-                            es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")";\r
-                        }\r
-                        pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);\r
-\r
-                    } else if (isStr && (es.indexOf(" ") !== -1 || es.indexOf(",") !== -1)) {\r
-                        pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);\r
-\r
-                    } else {\r
-                        bn = parseFloat(bs);\r
-                        bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case.\r
-\r
-                        if (bs === "" || bs === "auto") {\r
-                            if (p === "width" || p === "height") {\r
-                                bn = _getDimension(target, p, _cs);\r
-                                bsfx = "px";\r
-                            } else if (p === "left" || p === "top") {\r
-                                bn = _calculateOffset(target, p, _cs);\r
-                                bsfx = "px";\r
-                            } else {\r
-                                bn = (p !== "opacity") ? 0 : 1;\r
-                                bsfx = "";\r
-                            }\r
-                        }\r
-\r
-                        rel = (isStr && es.charAt(1) === "=");\r
-                        if (rel) {\r
-                            en = parseInt(es.charAt(0) + "1", 10);\r
-                            es = es.substr(2);\r
-                            en *= parseFloat(es);\r
-                            esfx = es.replace(_suffixExp, "");\r
-                        } else {\r
-                            en = parseFloat(es);\r
-                            esfx = isStr ? es.substr((en + "").length) || "" : "";\r
-                        }\r
-\r
-                        if (esfx === "") {\r
-                            esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix.\r
-                        }\r
-\r
-                        es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.\r
-\r
-                        //if the beginning/ending suffixes don't match, normalize them...\r
-                        if (bsfx !== esfx) if (esfx !== "") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!\r
-                            bn = _convertToPixels(target, p, bn, bsfx);\r
-                            if (esfx === "%") {\r
-                                bn /= _convertToPixels(target, p, 100, "%") / 100;\r
-                                if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens.\r
-                                    bs = bn + "%";\r
-                                }\r
-\r
-                            } else if (esfx === "em") {\r
-                                bn /= _convertToPixels(target, p, 1, "em");\r
-\r
-                            //otherwise convert to pixels.\r
-                            } else if (esfx !== "px") {\r
-                                en = _convertToPixels(target, p, en, esfx);\r
-                                esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too.\r
-                            }\r
-                            if (rel) if (en || en === 0) {\r
-                                es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here.\r
-                            }\r
-                        }\r
-\r
-                        if (rel) {\r
-                            en += bn;\r
-                        }\r
-\r
-                        if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly.\r
-                            pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es);\r
-                            pt.xs0 = esfx;\r
-                            //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0);\r
-                        } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) {\r
-                            _log("invalid " + p + " tween value: " + vars[p]);\r
-                        } else {\r
-                            pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es);\r
-                            pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween.\r
-                            //DEBUG: _log("non-tweening value "+p+": "+pt.xs0);\r
-                        }\r
-                    }\r
-                }\r
-                if (plugin) if (pt && !pt.plugin) {\r
-                    pt.plugin = plugin;\r
-                }\r
-            }\r
-            return pt;\r
-        };\r
-\r
-\r
-        //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.\r
-        p.setRatio = function(v) {\r
-            var pt = this._firstPT,\r
-                min = 0.000001,\r
-                val, str, i;\r
-\r
-            //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).\r
-            if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {\r
-                while (pt) {\r
-                    if (pt.type !== 2) {\r
-                        pt.t[pt.p] = pt.e;\r
-                    } else {\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-\r
-            } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) {\r
-                while (pt) {\r
-                    val = pt.c * v + pt.s;\r
-                    if (pt.r) {\r
-                        val = Math.round(val);\r
-                    } else if (val < min) if (val > -min) {\r
-                        val = 0;\r
-                    }\r
-                    if (!pt.type) {\r
-                        pt.t[pt.p] = val + pt.xs0;\r
-                    } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"\r
-                        i = pt.l;\r
-                        if (i === 2) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2;\r
-                        } else if (i === 3) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3;\r
-                        } else if (i === 4) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4;\r
-                        } else if (i === 5) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5;\r
-                        } else {\r
-                            str = pt.xs0 + val + pt.xs1;\r
-                            for (i = 1; i < pt.l; i++) {\r
-                                str += pt["xn"+i] + pt["xs"+(i+1)];\r
-                            }\r
-                            pt.t[pt.p] = str;\r
-                        }\r
-\r
-                    } else if (pt.type === -1) { //non-tweening value\r
-                        pt.t[pt.p] = pt.xs0;\r
-\r
-                    } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc.\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-\r
-            //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever).\r
-            } else {\r
-                while (pt) {\r
-                    if (pt.type !== 2) {\r
-                        pt.t[pt.p] = pt.b;\r
-                    } else {\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-        };\r
-\r
-        /**\r
-         * @private\r
-         * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called.\r
-         * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked\r
-         * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call\r
-         * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin\r
-         * doesn't have any transform-related properties of its own. You can call this method as many times as you\r
-         * want and it won't create duplicate CSSPropTweens.\r
-         *\r
-         * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)\r
-         */\r
-        p._enableTransforms = function(threeD) {\r
-            this._transformType = (threeD || this._transformType === 3) ? 3 : 2;\r
-            this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.\r
-        };\r
-\r
-        var lazySet = function(v) {\r
-            this.t[this.p] = this.e;\r
-            this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop.\r
-        };\r
-        /** @private Gives us a way to set a value on the first render (and only the first render). **/\r
-        p._addLazySet = function(t, p, v) {\r
-            var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2);\r
-            pt.e = v;\r
-            pt.setRatio = lazySet;\r
-            pt.data = this;\r
-        };\r
-\r
-        /** @private **/\r
-        p._linkCSSP = function(pt, next, prev, remove) {\r
-            if (pt) {\r
-                if (next) {\r
-                    next._prev = pt;\r
-                }\r
-                if (pt._next) {\r
-                    pt._next._prev = pt._prev;\r
-                }\r
-                if (pt._prev) {\r
-                    pt._prev._next = pt._next;\r
-                } else if (this._firstPT === pt) {\r
-                    this._firstPT = pt._next;\r
-                    remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)\r
-                }\r
-                if (prev) {\r
-                    prev._next = pt;\r
-                } else if (!remove && this._firstPT === null) {\r
-                    this._firstPT = pt;\r
-                }\r
-                pt._next = next;\r
-                pt._prev = prev;\r
-            }\r
-            return pt;\r
-        };\r
-\r
-        //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property.\r
-        p._kill = function(lookup) {\r
-            var copy = lookup,\r
-                pt, p, xfirst;\r
-            if (lookup.autoAlpha || lookup.alpha) {\r
-                copy = {};\r
-                for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere.\r
-                    copy[p] = lookup[p];\r
-                }\r
-                copy.opacity = 1;\r
-                if (copy.autoAlpha) {\r
-                    copy.visibility = 1;\r
-                }\r
-            }\r
-            if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst".\r
-                xfirst = pt.xfirst;\r
-                if (xfirst && xfirst._prev) {\r
-                    this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev\r
-                } else if (xfirst === this._firstPT) {\r
-                    this._firstPT = pt._next;\r
-                }\r
-                if (pt._next) {\r
-                    this._linkCSSP(pt._next, pt._next._next, xfirst._prev);\r
-                }\r
-                this._classNamePT = null;\r
-            }\r
-            return TweenPlugin.prototype._kill.call(this, copy);\r
-        };\r
-\r
-\r
-\r
-        //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison.\r
-        var _getChildStyles = function(e, props, targets) {\r
-                var children, i, child, type;\r
-                if (e.slice) {\r
-                    i = e.length;\r
-                    while (--i > -1) {\r
-                        _getChildStyles(e[i], props, targets);\r
-                    }\r
-                    return;\r
-                }\r
-                children = e.childNodes;\r
-                i = children.length;\r
-                while (--i > -1) {\r
-                    child = children[i];\r
-                    type = child.type;\r
-                    if (child.style) {\r
-                        props.push(_getAllStyles(child));\r
-                        if (targets) {\r
-                            targets.push(child);\r
-                        }\r
-                    }\r
-                    if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) {\r
-                        _getChildStyles(child, props, targets);\r
-                    }\r
-                }\r
-            };\r
-\r
-        /**\r
-         * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite\r
-         * and then compares the style properties of all the target's child elements at the tween's start and end, and\r
-         * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting\r
-         * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is\r
-         * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens\r
-         * is because it creates entirely new tweens that may have completely different targets than the original tween,\r
-         * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API\r
-         * and it would create other problems. For example:\r
-         *  - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted)\r
-         *  - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others.\r
-         *  - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed.\r
-         *\r
-         * @param {Object} target object to be tweened\r
-         * @param {number} Duration in seconds (or frames for frames-based tweens)\r
-         * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone}\r
-         * @return {Array} An array of TweenLite instances\r
-         */\r
-        CSSPlugin.cascadeTo = function(target, duration, vars) {\r
-            var tween = TweenLite.to(target, duration, vars),\r
-                results = [tween],\r
-                b = [],\r
-                e = [],\r
-                targets = [],\r
-                _reservedProps = TweenLite._internals.reservedProps,\r
-                i, difs, p;\r
-            target = tween._targets || tween.target;\r
-            _getChildStyles(target, b, targets);\r
-            tween.render(duration, true);\r
-            _getChildStyles(target, e);\r
-            tween.render(0, true);\r
-            tween._enabled(true);\r
-            i = targets.length;\r
-            while (--i > -1) {\r
-                difs = _cssDif(targets[i], b[i], e[i]);\r
-                if (difs.firstMPT) {\r
-                    difs = difs.difs;\r
-                    for (p in vars) {\r
-                        if (_reservedProps[p]) {\r
-                            difs[p] = vars[p];\r
-                        }\r
-                    }\r
-                    results.push( TweenLite.to(targets[i], duration, difs) );\r
-                }\r
-            }\r
-            return results;\r
-        };\r
-\r
-        TweenPlugin.activate([CSSPlugin]);\r
-        return CSSPlugin;\r
-\r
-    }, true);\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * RoundPropsPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    (function() {\r
-\r
-        var RoundPropsPlugin = window._gsDefine.plugin({\r
-                propName: "roundProps",\r
-                priority: -1,\r
-                API: 2,\r
-\r
-                //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-                init: function(target, value, tween) {\r
-                    this._tween = tween;\r
-                    return true;\r
-                }\r
-\r
-            }),\r
-            p = RoundPropsPlugin.prototype;\r
-\r
-        p._onInitAllProps = function() {\r
-            var tween = this._tween,\r
-                rp = (tween.vars.roundProps instanceof Array) ? tween.vars.roundProps : tween.vars.roundProps.split(","),\r
-                i = rp.length,\r
-                lookup = {},\r
-                rpt = tween._propLookup.roundProps,\r
-                prop, pt, next;\r
-            while (--i > -1) {\r
-                lookup[rp[i]] = 1;\r
-            }\r
-            i = rp.length;\r
-            while (--i > -1) {\r
-                prop = rp[i];\r
-                pt = tween._firstPT;\r
-                while (pt) {\r
-                    next = pt._next; //record here, because it may get removed\r
-                    if (pt.pg) {\r
-                        pt.t._roundProps(lookup, true);\r
-                    } else if (pt.n === prop) {\r
-                        this._add(pt.t, prop, pt.s, pt.c);\r
-                        //remove from linked list\r
-                        if (next) {\r
-                            next._prev = pt._prev;\r
-                        }\r
-                        if (pt._prev) {\r
-                            pt._prev._next = next;\r
-                        } else if (tween._firstPT === pt) {\r
-                            tween._firstPT = next;\r
-                        }\r
-                        pt._next = pt._prev = null;\r
-                        tween._propLookup[prop] = rpt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p._add = function(target, p, s, c) {\r
-            this._addTween(target, p, s, s + c, p, true);\r
-            this._overwriteProps.push(p);\r
-        };\r
-\r
-    }());\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * AttrPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine.plugin({\r
-        propName: "attr",\r
-        API: 2,\r
-        version: "0.3.2",\r
-\r
-        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-        init: function(target, value, tween) {\r
-            var p, start, end;\r
-            if (typeof(target.setAttribute) !== "function") {\r
-                return false;\r
-            }\r
-            this._target = target;\r
-            this._proxy = {};\r
-            this._start = {}; // we record start and end values exactly as they are in case they're strings (not numbers) - we need to be able to revert to them cleanly.\r
-            this._end = {};\r
-            for (p in value) {\r
-                this._start[p] = this._proxy[p] = start = target.getAttribute(p);\r
-                end = this._addTween(this._proxy, p, parseFloat(start), value[p], p);\r
-                this._end[p] = end ? end.s + end.c : value[p];\r
-                this._overwriteProps.push(p);\r
-            }\r
-            return true;\r
-        },\r
-\r
-        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-        set: function(ratio) {\r
-            this._super.setRatio.call(this, ratio);\r
-            var props = this._overwriteProps,\r
-                i = props.length,\r
-                lookup = (ratio === 1) ? this._end : ratio ? this._proxy : this._start,\r
-                p;\r
-            while (--i > -1) {\r
-                p = props[i];\r
-                this._target.setAttribute(p, lookup[p] + "");\r
-            }\r
-        }\r
-\r
-    });\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * DirectionalRotationPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine.plugin({\r
-        propName: "directionalRotation",\r
-        API: 2,\r
-        version: "0.2.0",\r
-\r
-        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-        init: function(target, value, tween) {\r
-            if (typeof(value) !== "object") {\r
-                value = {rotation:value};\r
-            }\r
-            this.finals = {};\r
-            var cap = (value.useRadians === true) ? Math.PI * 2 : 360,\r
-                min = 0.000001,\r
-                p, v, start, end, dif, split;\r
-            for (p in value) {\r
-                if (p !== "useRadians") {\r
-                    split = (value[p] + "").split("_");\r
-                    v = split[0];\r
-                    start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );\r
-                    end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0;\r
-                    dif = end - start;\r
-                    if (split.length) {\r
-                        v = split.join("_");\r
-                        if (v.indexOf("short") !== -1) {\r
-                            dif = dif % cap;\r
-                            if (dif !== dif % (cap / 2)) {\r
-                                dif = (dif < 0) ? dif + cap : dif - cap;\r
-                            }\r
-                        }\r
-                        if (v.indexOf("_cw") !== -1 && dif < 0) {\r
-                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {\r
-                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        }\r
-                    }\r
-                    if (dif > min || dif < -min) {\r
-                        this._addTween(target, p, start, start + dif, p);\r
-                        this._overwriteProps.push(p);\r
-                    }\r
-                }\r
-            }\r
-            return true;\r
-        },\r
-\r
-        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-        set: function(ratio) {\r
-            var pt;\r
-            if (ratio !== 1) {\r
-                this._super.setRatio.call(this, ratio);\r
-            } else {\r
-                pt = this._firstPT;\r
-                while (pt) {\r
-                    if (pt.f) {\r
-                        pt.t[pt.p](this.finals[pt.p]);\r
-                    } else {\r
-                        pt.t[pt.p] = this.finals[pt.p];\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-        }\r
-\r
-    })._autoCSS = true;\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * EasePack\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("easing.Back", ["easing.Ease"], function(Ease) {\r
-        \r
-        var w = (window.GreenSockGlobals || window),\r
-            gs = w.com.greensock,\r
-            _2PI = Math.PI * 2,\r
-            _HALF_PI = Math.PI / 2,\r
-            _class = gs._class,\r
-            _create = function(n, f) {\r
-                var C = _class("easing." + n, function(){}, true),\r
-                    p = C.prototype = new Ease();\r
-                p.constructor = C;\r
-                p.getRatio = f;\r
-                return C;\r
-            },\r
-            _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist.\r
-            _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) {\r
-                var C = _class("easing."+name, {\r
-                    easeOut:new EaseOut(),\r
-                    easeIn:new EaseIn(),\r
-                    easeInOut:new EaseInOut()\r
-                }, true);\r
-                _easeReg(C, name);\r
-                return C;\r
-            },\r
-            EasePoint = function(time, value, next) {\r
-                this.t = time;\r
-                this.v = value;\r
-                if (next) {\r
-                    this.next = next;\r
-                    next.prev = this;\r
-                    this.c = next.v - value;\r
-                    this.gap = next.t - time;\r
-                }\r
-            },\r
-\r
-            //Back\r
-            _createBack = function(n, f) {\r
-                var C = _class("easing." + n, function(overshoot) {\r
-                        this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158;\r
-                        this._p2 = this._p1 * 1.525;\r
-                    }, true),\r
-                    p = C.prototype = new Ease();\r
-                p.constructor = C;\r
-                p.getRatio = f;\r
-                p.config = function(overshoot) {\r
-                    return new C(overshoot);\r
-                };\r
-                return C;\r
-            },\r
-\r
-            Back = _wrap("Back",\r
-                _createBack("BackOut", function(p) {\r
-                    return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1);\r
-                }),\r
-                _createBack("BackIn", function(p) {\r
-                    return p * p * ((this._p1 + 1) * p - this._p1);\r
-                }),\r
-                _createBack("BackInOut", function(p) {\r
-                    return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2);\r
-                })\r
-            ),\r
-\r
-\r
-            //SlowMo\r
-            SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) {\r
-                power = (power || power === 0) ? power : 0.7;\r
-                if (linearRatio == null) {\r
-                    linearRatio = 0.7;\r
-                } else if (linearRatio > 1) {\r
-                    linearRatio = 1;\r
-                }\r
-                this._p = (linearRatio !== 1) ? power : 0;\r
-                this._p1 = (1 - linearRatio) / 2;\r
-                this._p2 = linearRatio;\r
-                this._p3 = this._p1 + this._p2;\r
-                this._calcEnd = (yoyoMode === true);\r
-            }, true),\r
-            p = SlowMo.prototype = new Ease(),\r
-            SteppedEase, RoughEase, _createElastic;\r
-\r
-        p.constructor = SlowMo;\r
-        p.getRatio = function(p) {\r
-            var r = p + (0.5 - p) * this._p;\r
-            if (p < this._p1) {\r
-                return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);\r
-            } else if (p > this._p3) {\r
-                return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p);\r
-            }\r
-            return this._calcEnd ? 1 : r;\r
-        };\r
-        SlowMo.ease = new SlowMo(0.7, 0.7);\r
-\r
-        p.config = SlowMo.config = function(linearRatio, power, yoyoMode) {\r
-            return new SlowMo(linearRatio, power, yoyoMode);\r
-        };\r
-\r
-\r
-        //SteppedEase\r
-        SteppedEase = _class("easing.SteppedEase", function(steps) {\r
-                steps = steps || 1;\r
-                this._p1 = 1 / steps;\r
-                this._p2 = steps + 1;\r
-            }, true);\r
-        p = SteppedEase.prototype = new Ease();\r
-        p.constructor = SteppedEase;\r
-        p.getRatio = function(p) {\r
-            if (p < 0) {\r
-                p = 0;\r
-            } else if (p >= 1) {\r
-                p = 0.999999999;\r
-            }\r
-            return ((this._p2 * p) >> 0) * this._p1;\r
-        };\r
-        p.config = SteppedEase.config = function(steps) {\r
-            return new SteppedEase(steps);\r
-        };\r
-\r
-\r
-        //RoughEase\r
-        RoughEase = _class("easing.RoughEase", function(vars) {\r
-            vars = vars || {};\r
-            var taper = vars.taper || "none",\r
-                a = [],\r
-                cnt = 0,\r
-                points = (vars.points || 20) | 0,\r
-                i = points,\r
-                randomize = (vars.randomize !== false),\r
-                clamp = (vars.clamp === true),\r
-                template = (vars.template instanceof Ease) ? vars.template : null,\r
-                strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4,\r
-                x, y, bump, invX, obj, pnt;\r
-            while (--i > -1) {\r
-                x = randomize ? Math.random() : (1 / points) * i;\r
-                y = template ? template.getRatio(x) : x;\r
-                if (taper === "none") {\r
-                    bump = strength;\r
-                } else if (taper === "out") {\r
-                    invX = 1 - x;\r
-                    bump = invX * invX * strength;\r
-                } else if (taper === "in") {\r
-                    bump = x * x * strength;\r
-                } else if (x < 0.5) {  //"both" (start)\r
-                    invX = x * 2;\r
-                    bump = invX * invX * 0.5 * strength;\r
-                } else {                //"both" (end)\r
-                    invX = (1 - x) * 2;\r
-                    bump = invX * invX * 0.5 * strength;\r
-                }\r
-                if (randomize) {\r
-                    y += (Math.random() * bump) - (bump * 0.5);\r
-                } else if (i % 2) {\r
-                    y += bump * 0.5;\r
-                } else {\r
-                    y -= bump * 0.5;\r
-                }\r
-                if (clamp) {\r
-                    if (y > 1) {\r
-                        y = 1;\r
-                    } else if (y < 0) {\r
-                        y = 0;\r
-                    }\r
-                }\r
-                a[cnt++] = {x:x, y:y};\r
-            }\r
-            a.sort(function(a, b) {\r
-                return a.x - b.x;\r
-            });\r
-\r
-            pnt = new EasePoint(1, 1, null);\r
-            i = points;\r
-            while (--i > -1) {\r
-                obj = a[i];\r
-                pnt = new EasePoint(obj.x, obj.y, pnt);\r
-            }\r
-\r
-            this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next);\r
-        }, true);\r
-        p = RoughEase.prototype = new Ease();\r
-        p.constructor = RoughEase;\r
-        p.getRatio = function(p) {\r
-            var pnt = this._prev;\r
-            if (p > pnt.t) {\r
-                while (pnt.next && p >= pnt.t) {\r
-                    pnt = pnt.next;\r
-                }\r
-                pnt = pnt.prev;\r
-            } else {\r
-                while (pnt.prev && p <= pnt.t) {\r
-                    pnt = pnt.prev;\r
-                }\r
-            }\r
-            this._prev = pnt;\r
-            return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c);\r
-        };\r
-        p.config = function(vars) {\r
-            return new RoughEase(vars);\r
-        };\r
-        RoughEase.ease = new RoughEase();\r
-\r
-\r
-        //Bounce\r
-        _wrap("Bounce",\r
-            _create("BounceOut", function(p) {\r
-                if (p < 1 / 2.75) {\r
-                    return 7.5625 * p * p;\r
-                } else if (p < 2 / 2.75) {\r
-                    return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;\r
-                } else if (p < 2.5 / 2.75) {\r
-                    return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;\r
-                }\r
-                return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;\r
-            }),\r
-            _create("BounceIn", function(p) {\r
-                if ((p = 1 - p) < 1 / 2.75) {\r
-                    return 1 - (7.5625 * p * p);\r
-                } else if (p < 2 / 2.75) {\r
-                    return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75);\r
-                } else if (p < 2.5 / 2.75) {\r
-                    return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375);\r
-                }\r
-                return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375);\r
-            }),\r
-            _create("BounceInOut", function(p) {\r
-                var invert = (p < 0.5);\r
-                if (invert) {\r
-                    p = 1 - (p * 2);\r
-                } else {\r
-                    p = (p * 2) - 1;\r
-                }\r
-                if (p < 1 / 2.75) {\r
-                    p = 7.5625 * p * p;\r
-                } else if (p < 2 / 2.75) {\r
-                    p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;\r
-                } else if (p < 2.5 / 2.75) {\r
-                    p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;\r
-                } else {\r
-                    p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;\r
-                }\r
-                return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5;\r
-            })\r
-        );\r
-\r
-\r
-        //CIRC\r
-        _wrap("Circ",\r
-            _create("CircOut", function(p) {\r
-                return Math.sqrt(1 - (p = p - 1) * p);\r
-            }),\r
-            _create("CircIn", function(p) {\r
-                return -(Math.sqrt(1 - (p * p)) - 1);\r
-            }),\r
-            _create("CircInOut", function(p) {\r
-                return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1);\r
-            })\r
-        );\r
-\r
-\r
-        //Elastic\r
-        _createElastic = function(n, f, def) {\r
-            var C = _class("easing." + n, function(amplitude, period) {\r
-                    this._p1 = amplitude || 1;\r
-                    this._p2 = period || def;\r
-                    this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0);\r
-                }, true),\r
-                p = C.prototype = new Ease();\r
-            p.constructor = C;\r
-            p.getRatio = f;\r
-            p.config = function(amplitude, period) {\r
-                return new C(amplitude, period);\r
-            };\r
-            return C;\r
-        };\r
-        _wrap("Elastic",\r
-            _createElastic("ElasticOut", function(p) {\r
-                return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * _2PI / this._p2 ) + 1;\r
-            }, 0.3),\r
-            _createElastic("ElasticIn", function(p) {\r
-                return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ));\r
-            }, 0.3),\r
-            _createElastic("ElasticInOut", function(p) {\r
-                return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ) *0.5 + 1;\r
-            }, 0.45)\r
-        );\r
-\r
-\r
-        //Expo\r
-        _wrap("Expo",\r
-            _create("ExpoOut", function(p) {\r
-                return 1 - Math.pow(2, -10 * p);\r
-            }),\r
-            _create("ExpoIn", function(p) {\r
-                return Math.pow(2, 10 * (p - 1)) - 0.001;\r
-            }),\r
-            _create("ExpoInOut", function(p) {\r
-                return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\r
-            })\r
-        );\r
-\r
-\r
-        //Sine\r
-        _wrap("Sine",\r
-            _create("SineOut", function(p) {\r
-                return Math.sin(p * _HALF_PI);\r
-            }),\r
-            _create("SineIn", function(p) {\r
-                return -Math.cos(p * _HALF_PI) + 1;\r
-            }),\r
-            _create("SineInOut", function(p) {\r
-                return -0.5 * (Math.cos(Math.PI * p) - 1);\r
-            })\r
-        );\r
-\r
-        _class("easing.EaseLookup", {\r
-                find:function(s) {\r
-                    return Ease.map[s];\r
-                }\r
-            }, true);\r
-\r
-        //register the non-standard eases\r
-        _easeReg(w.SlowMo, "SlowMo", "ease,");\r
-        _easeReg(RoughEase, "RoughEase", "ease,");\r
-        _easeReg(SteppedEase, "SteppedEase", "ease,");\r
-\r
-        return Back;\r
-        \r
-    }, true);\r
-\r
-\r
-}); \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Base classes like TweenLite, SimpleTimeline, Ease, Ticker, etc.\r
- * ----------------------------------------------------------------\r
- */\r
-(function(window) {\r
-\r
-        "use strict";\r
-        var _globals = window.GreenSockGlobals || window;\r
-        if (_globals.TweenLite) {\r
-            return; //in case the core set of classes is already loaded, don't instantiate twice.\r
-        }\r
-        var _namespace = function(ns) {\r
-                var a = ns.split("."),\r
-                    p = _globals, i;\r
-                for (i = 0; i < a.length; i++) {\r
-                    p[a[i]] = p = p[a[i]] || {};\r
-                }\r
-                return p;\r
-            },\r
-            gs = _namespace("com.greensock"),\r
-            _tinyNum = 0.0000000001,\r
-            _slice = [].slice,\r
-            _emptyFunc = function() {},\r
-            _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)\r
-                var toString = Object.prototype.toString,\r
-                    array = toString.call([]);\r
-                return function(obj) {\r
-                    return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array));\r
-                };\r
-            }()),\r
-            a, i, p, _ticker, _tickerActive,\r
-            _defLookup = {},\r
-\r
-            /**\r
-             * @constructor\r
-             * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition.\r
-             * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is\r
-             * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin\r
-             * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally.\r
-             *\r
-             * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found,\r
-             * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere,\r
-             * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so\r
-             * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything\r
-             * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock\r
-             * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could\r
-             * sandbox the banner one like:\r
-             *\r
-             * <script>\r
-             *     var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever.\r
-             * </script>\r
-             * <script src="js/greensock/v1.7/TweenMax.js"></script>\r
-             * <script>\r
-             *     window.GreenSockGlobals = null; //reset it back to null so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)\r
-             * </script>\r
-             * <script src="js/greensock/v1.6/TweenMax.js"></script>\r
-             * <script>\r
-             *     gs.TweenLite.to(...); //would use v1.7\r
-             *     TweenLite.to(...); //would use v1.6\r
-             * </script>\r
-             *\r
-             * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".\r
-             * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]\r
-             * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.\r
-             * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)\r
-             */\r
-            Definition = function(ns, dependencies, func, global) {\r
-                this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses\r
-                _defLookup[ns] = this;\r
-                this.gsClass = null;\r
-                this.func = func;\r
-                var _classes = [];\r
-                this.check = function(init) {\r
-                    var i = dependencies.length,\r
-                        missing = i,\r
-                        cur, a, n, cl;\r
-                    while (--i > -1) {\r
-                        if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {\r
-                            _classes[i] = cur.gsClass;\r
-                            missing--;\r
-                        } else if (init) {\r
-                            cur.sc.push(this);\r
-                        }\r
-                    }\r
-                    if (missing === 0 && func) {\r
-                        a = ("com.greensock." + ns).split(".");\r
-                        n = a.pop();\r
-                        cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);\r
-\r
-                        //exports to multiple environments\r
-                        if (global) {\r
-                            _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)\r
-                            if (typeof(define) === "function" && define.amd){ //AMD\r
-                                define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").join("/"), [], function() { return cl; });\r
-                            } else if (typeof(module) !== "undefined" && module.exports){ //node\r
-                                module.exports = cl;\r
-                            }\r
-                        }\r
-                        for (i = 0; i < this.sc.length; i++) {\r
-                            this.sc[i].check();\r
-                        }\r
-                    }\r
-                };\r
-                this.check(true);\r
-            },\r
-\r
-            //used to create Definition instances (which basically registers a class that has dependencies).\r
-            _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {\r
-                return new Definition(ns, dependencies, func, global);\r
-            },\r
-\r
-            //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).\r
-            _class = gs._class = function(ns, func, global) {\r
-                func = func || function() {};\r
-                _gsDefine(ns, [], function(){ return func; }, global);\r
-                return func;\r
-            };\r
-\r
-        _gsDefine.globals = _globals;\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Ease\r
- * ----------------------------------------------------------------\r
- */\r
-        var _baseParams = [0, 0, 1, 1],\r
-            _blankArray = [],\r
-            Ease = _class("easing.Ease", function(func, extraParams, type, power) {\r
-                this._func = func;\r
-                this._type = type || 0;\r
-                this._power = power || 0;\r
-                this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;\r
-            }, true),\r
-            _easeMap = Ease.map = {},\r
-            _easeReg = Ease.register = function(ease, names, types, create) {\r
-                var na = names.split(","),\r
-                    i = na.length,\r
-                    ta = (types || "easeIn,easeOut,easeInOut").split(","),\r
-                    e, name, j, type;\r
-                while (--i > -1) {\r
-                    name = na[i];\r
-                    e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};\r
-                    j = ta.length;\r
-                    while (--j > -1) {\r
-                        type = ta[j];\r
-                        _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();\r
-                    }\r
-                }\r
-            };\r
-\r
-        p = Ease.prototype;\r
-        p._calcEnd = false;\r
-        p.getRatio = function(p) {\r
-            if (this._func) {\r
-                this._params[0] = p;\r
-                return this._func.apply(null, this._params);\r
-            }\r
-            var t = this._type,\r
-                pw = this._power,\r
-                r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;\r
-            if (pw === 1) {\r
-                r *= r;\r
-            } else if (pw === 2) {\r
-                r *= r * r;\r
-            } else if (pw === 3) {\r
-                r *= r * r * r;\r
-            } else if (pw === 4) {\r
-                r *= r * r * r * r;\r
-            }\r
-            return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);\r
-        };\r
-\r
-        //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)\r
-        a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];\r
-        i = a.length;\r
-        while (--i > -1) {\r
-            p = a[i]+",Power"+i;\r
-            _easeReg(new Ease(null,null,1,i), p, "easeOut", true);\r
-            _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));\r
-            _easeReg(new Ease(null,null,3,i), p, "easeInOut");\r
-        }\r
-        _easeMap.linear = gs.easing.Linear.easeIn;\r
-        _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * EventDispatcher\r
- * ----------------------------------------------------------------\r
- */\r
-        var EventDispatcher = _class("events.EventDispatcher", function(target) {\r
-            this._listeners = {};\r
-            this._eventTarget = target || this;\r
-        });\r
-        p = EventDispatcher.prototype;\r
-\r
-        p.addEventListener = function(type, callback, scope, useParam, priority) {\r
-            priority = priority || 0;\r
-            var list = this._listeners[type],\r
-                index = 0,\r
-                listener, i;\r
-            if (list == null) {\r
-                this._listeners[type] = list = [];\r
-            }\r
-            i = list.length;\r
-            while (--i > -1) {\r
-                listener = list[i];\r
-                if (listener.c === callback && listener.s === scope) {\r
-                    list.splice(i, 1);\r
-                } else if (index === 0 && listener.pr < priority) {\r
-                    index = i + 1;\r
-                }\r
-            }\r
-            list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});\r
-            if (this === _ticker && !_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-        };\r
-\r
-        p.removeEventListener = function(type, callback) {\r
-            var list = this._listeners[type], i;\r
-            if (list) {\r
-                i = list.length;\r
-                while (--i > -1) {\r
-                    if (list[i].c === callback) {\r
-                        list.splice(i, 1);\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-        };\r
-\r
-        p.dispatchEvent = function(type) {\r
-            var list = this._listeners[type],\r
-                i, t, listener;\r
-            if (list) {\r
-                i = list.length;\r
-                t = this._eventTarget;\r
-                while (--i > -1) {\r
-                    listener = list[i];\r
-                    if (listener.up) {\r
-                        listener.c.call(listener.s || t, {type:type, target:t});\r
-                    } else {\r
-                        listener.c.call(listener.s || t);\r
-                    }\r
-                }\r
-            }\r
-        };\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Ticker\r
- * ----------------------------------------------------------------\r
- */\r
-        var _reqAnimFrame = window.requestAnimationFrame,\r
-            _cancelAnimFrame = window.cancelAnimationFrame,\r
-            _getTime = Date.now || function() {return new Date().getTime();},\r
-            _lastUpdate = _getTime();\r
-\r
-        //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.\r
-        a = ["ms","moz","webkit","o"];\r
-        i = a.length;\r
-        while (--i > -1 && !_reqAnimFrame) {\r
-            _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];\r
-            _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];\r
-        }\r
-\r
-        _class("Ticker", function(fps, useRAF) {\r
-            var _self = this,\r
-                _startTime = _getTime(),\r
-                _useRAF = (useRAF !== false && _reqAnimFrame),\r
-                _lagThreshold = 500,\r
-                _adjustedLag = 33,\r
-                _fps, _req, _id, _gap, _nextTime,\r
-                _tick = function(manual) {\r
-                    var elapsed = _getTime() - _lastUpdate,\r
-                        overlap, dispatch;\r
-                    if (elapsed > _lagThreshold) {\r
-                        _startTime += elapsed - _adjustedLag;\r
-                    }\r
-                    _lastUpdate += elapsed;\r
-                    _self.time = (_lastUpdate - _startTime) / 1000;\r
-                    overlap = _self.time - _nextTime;\r
-                    if (!_fps || overlap > 0 || manual === true) {\r
-                        _self.frame++;\r
-                        _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);\r
-                        dispatch = true;\r
-                    }\r
-                    if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.\r
-                        _id = _req(_tick);\r
-                    }\r
-                    if (dispatch) {\r
-                        _self.dispatchEvent("tick");\r
-                    }\r
-                };\r
-\r
-            EventDispatcher.call(_self);\r
-            _self.time = _self.frame = 0;\r
-            _self.tick = function() {\r
-                _tick(true);\r
-            };\r
-\r
-            _self.lagSmoothing = function(threshold, adjustedLag) {\r
-                _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited\r
-                _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);\r
-            };\r
-\r
-            _self.sleep = function() {\r
-                if (_id == null) {\r
-                    return;\r
-                }\r
-                if (!_useRAF || !_cancelAnimFrame) {\r
-                    clearTimeout(_id);\r
-                } else {\r
-                    _cancelAnimFrame(_id);\r
-                }\r
-                _req = _emptyFunc;\r
-                _id = null;\r
-                if (_self === _ticker) {\r
-                    _tickerActive = false;\r
-                }\r
-            };\r
-\r
-            _self.wake = function() {\r
-                if (_id !== null) {\r
-                    _self.sleep();\r
-                } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().\r
-                    _lastUpdate = _getTime() - _lagThreshold + 5;\r
-                }\r
-                _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;\r
-                if (_self === _ticker) {\r
-                    _tickerActive = true;\r
-                }\r
-                _tick(2);\r
-            };\r
-\r
-            _self.fps = function(value) {\r
-                if (!arguments.length) {\r
-                    return _fps;\r
-                }\r
-                _fps = value;\r
-                _gap = 1 / (_fps || 60);\r
-                _nextTime = this.time + _gap;\r
-                _self.wake();\r
-            };\r
-\r
-            _self.useRAF = function(value) {\r
-                if (!arguments.length) {\r
-                    return _useRAF;\r
-                }\r
-                _self.sleep();\r
-                _useRAF = value;\r
-                _self.fps(_fps);\r
-            };\r
-            _self.fps(fps);\r
-\r
-            //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.\r
-            setTimeout(function() {\r
-                if (_useRAF && (!_id || _self.frame < 5)) {\r
-                    _self.useRAF(false);\r
-                }\r
-            }, 1500);\r
-        });\r
-\r
-        p = gs.Ticker.prototype = new gs.events.EventDispatcher();\r
-        p.constructor = gs.Ticker;\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Animation\r
- * ----------------------------------------------------------------\r
- */\r
-        var Animation = _class("core.Animation", function(duration, vars) {\r
-                this.vars = vars = vars || {};\r
-                this._duration = this._totalDuration = duration || 0;\r
-                this._delay = Number(vars.delay) || 0;\r
-                this._timeScale = 1;\r
-                this._active = (vars.immediateRender === true);\r
-                this.data = vars.data;\r
-                this._reversed = (vars.reversed === true);\r
-\r
-                if (!_rootTimeline) {\r
-                    return;\r
-                }\r
-                if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.\r
-                    _ticker.wake();\r
-                }\r
-\r
-                var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;\r
-                tl.add(this, tl._time);\r
-\r
-                if (this.vars.paused) {\r
-                    this.paused(true);\r
-                }\r
-            });\r
-\r
-        _ticker = Animation.ticker = new gs.Ticker();\r
-        p = Animation.prototype;\r
-        p._dirty = p._gc = p._initted = p._paused = false;\r
-        p._totalTime = p._time = 0;\r
-        p._rawPrevTime = -1;\r
-        p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;\r
-        p._paused = false;\r
-\r
-\r
-        //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.\r
-        var _checkTimeout = function() {\r
-                if (_tickerActive && _getTime() - _lastUpdate > 2000) {\r
-                    _ticker.wake();\r
-                }\r
-                setTimeout(_checkTimeout, 2000);\r
-            };\r
-        _checkTimeout();\r
-\r
-\r
-        p.play = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek(from, suppressEvents);\r
-            }\r
-            return this.reversed(false).paused(false);\r
-        };\r
-\r
-        p.pause = function(atTime, suppressEvents) {\r
-            if (atTime != null) {\r
-                this.seek(atTime, suppressEvents);\r
-            }\r
-            return this.paused(true);\r
-        };\r
-\r
-        p.resume = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek(from, suppressEvents);\r
-            }\r
-            return this.paused(false);\r
-        };\r
-\r
-        p.seek = function(time, suppressEvents) {\r
-            return this.totalTime(Number(time), suppressEvents !== false);\r
-        };\r
-\r
-        p.restart = function(includeDelay, suppressEvents) {\r
-            return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);\r
-        };\r
-\r
-        p.reverse = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek((from || this.totalDuration()), suppressEvents);\r
-            }\r
-            return this.reversed(true).paused(false);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            //stub - we override this method in subclasses.\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            return this;\r
-        };\r
-\r
-        p.isActive = function() {\r
-            var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.\r
-                startTime = this._startTime,\r
-                rawTime;\r
-            return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));\r
-        };\r
-\r
-        p._enabled = function (enabled, ignoreTimeline) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            this._gc = !enabled;\r
-            this._active = this.isActive();\r
-            if (ignoreTimeline !== true) {\r
-                if (enabled && !this.timeline) {\r
-                    this._timeline.add(this, this._startTime - this._delay);\r
-                } else if (!enabled && this.timeline) {\r
-                    this._timeline._remove(this, true);\r
-                }\r
-            }\r
-            return false;\r
-        };\r
-\r
-\r
-        p._kill = function(vars, target) {\r
-            return this._enabled(false, false);\r
-        };\r
-\r
-        p.kill = function(vars, target) {\r
-            this._kill(vars, target);\r
-            return this;\r
-        };\r
-\r
-        p._uncache = function(includeSelf) {\r
-            var tween = includeSelf ? this : this.timeline;\r
-            while (tween) {\r
-                tween._dirty = true;\r
-                tween = tween.timeline;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._swapSelfInParams = function(params) {\r
-            var i = params.length,\r
-                copy = params.concat();\r
-            while (--i > -1) {\r
-                if (params[i] === "{self}") {\r
-                    copy[i] = this;\r
-                }\r
-            }\r
-            return copy;\r
-        };\r
-\r
-//----Animation getters/setters --------------------------------------------------------\r
-\r
-        p.eventCallback = function(type, callback, params, scope) {\r
-            if ((type || "").substr(0,2) === "on") {\r
-                var v = this.vars;\r
-                if (arguments.length === 1) {\r
-                    return v[type];\r
-                }\r
-                if (callback == null) {\r
-                    delete v[type];\r
-                } else {\r
-                    v[type] = callback;\r
-                    v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;\r
-                    v[type + "Scope"] = scope;\r
-                }\r
-                if (type === "onUpdate") {\r
-                    this._onUpdate = callback;\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.delay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._delay;\r
-            }\r
-            if (this._timeline.smoothChildTiming) {\r
-                this.startTime( this._startTime + value - this._delay );\r
-            }\r
-            this._delay = value;\r
-            return this;\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                this._dirty = false;\r
-                return this._duration;\r
-            }\r
-            this._duration = this._totalDuration = value;\r
-            this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.\r
-            if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {\r
-                this.totalTime(this._totalTime * (value / this._duration), true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            this._dirty = false;\r
-            return (!arguments.length) ? this._totalDuration : this.duration(value);\r
-        };\r
-\r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);\r
-        };\r
-\r
-        p.totalTime = function(time, suppressEvents, uncapped) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            if (!arguments.length) {\r
-                return this._totalTime;\r
-            }\r
-            if (this._timeline) {\r
-                if (time < 0 && !uncapped) {\r
-                    time += this.totalDuration();\r
-                }\r
-                if (this._timeline.smoothChildTiming) {\r
-                    if (this._dirty) {\r
-                        this.totalDuration();\r
-                    }\r
-                    var totalDuration = this._totalDuration,\r
-                        tl = this._timeline;\r
-                    if (time > totalDuration && !uncapped) {\r
-                        time = totalDuration;\r
-                    }\r
-                    this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);\r
-                    if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.\r
-                        this._uncache(false);\r
-                    }\r
-                    //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.\r
-                    if (tl._timeline) {\r
-                        while (tl._timeline) {\r
-                            if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {\r
-                                tl.totalTime(tl._totalTime, true);\r
-                            }\r
-                            tl = tl._timeline;\r
-                        }\r
-                    }\r
-                }\r
-                if (this._gc) {\r
-                    this._enabled(true, false);\r
-                }\r
-                if (this._totalTime !== time || this._duration === 0) {\r
-                    this.render(time, suppressEvents, false);\r
-                    if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.\r
-                        _lazyRender();\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.progress = p.totalProgress = function(value, suppressEvents) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime(this.duration() * value, suppressEvents);\r
-        };\r
-\r
-        p.startTime = function(value) {\r
-            if (!arguments.length) {\r
-                return this._startTime;\r
-            }\r
-            if (value !== this._startTime) {\r
-                this._startTime = value;\r
-                if (this.timeline) if (this.timeline._sortChildren) {\r
-                    this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.timeScale = function(value) {\r
-            if (!arguments.length) {\r
-                return this._timeScale;\r
-            }\r
-            value = value || _tinyNum; //can't allow zero because it'll throw the math off\r
-            if (this._timeline && this._timeline.smoothChildTiming) {\r
-                var pauseTime = this._pauseTime,\r
-                    t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();\r
-                this._startTime = t - ((t - this._startTime) * this._timeScale / value);\r
-            }\r
-            this._timeScale = value;\r
-            return this._uncache(false);\r
-        };\r
-\r
-        p.reversed = function(value) {\r
-            if (!arguments.length) {\r
-                return this._reversed;\r
-            }\r
-            if (value != this._reversed) {\r
-                this._reversed = value;\r
-                this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.paused = function(value) {\r
-            if (!arguments.length) {\r
-                return this._paused;\r
-            }\r
-            if (value != this._paused) if (this._timeline) {\r
-                if (!_tickerActive && !value) {\r
-                    _ticker.wake();\r
-                }\r
-                var tl = this._timeline,\r
-                    raw = tl.rawTime(),\r
-                    elapsed = raw - this._pauseTime;\r
-                if (!value && tl.smoothChildTiming) {\r
-                    this._startTime += elapsed;\r
-                    this._uncache(false);\r
-                }\r
-                this._pauseTime = value ? raw : null;\r
-                this._paused = value;\r
-                this._active = this.isActive();\r
-                if (!value && elapsed !== 0 && this._initted && this.duration()) {\r
-                    this.render((tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale), true, true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.\r
-                }\r
-            }\r
-            if (this._gc && !value) {\r
-                this._enabled(true, false);\r
-            }\r
-            return this;\r
-        };\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * SimpleTimeline\r
- * ----------------------------------------------------------------\r
- */\r
-        var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {\r
-            Animation.call(this, 0, vars);\r
-            this.autoRemoveChildren = this.smoothChildTiming = true;\r
-        });\r
-\r
-        p = SimpleTimeline.prototype = new Animation();\r
-        p.constructor = SimpleTimeline;\r
-        p.kill()._gc = false;\r
-        p._first = p._last = null;\r
-        p._sortChildren = false;\r
-\r
-        p.add = p.insert = function(child, position, align, stagger) {\r
-            var prevTween, st;\r
-            child._startTime = Number(position || 0) + child._delay;\r
-            if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).\r
-                child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);\r
-            }\r
-            if (child.timeline) {\r
-                child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.\r
-            }\r
-            child.timeline = child._timeline = this;\r
-            if (child._gc) {\r
-                child._enabled(true, true);\r
-            }\r
-            prevTween = this._last;\r
-            if (this._sortChildren) {\r
-                st = child._startTime;\r
-                while (prevTween && prevTween._startTime > st) {\r
-                    prevTween = prevTween._prev;\r
-                }\r
-            }\r
-            if (prevTween) {\r
-                child._next = prevTween._next;\r
-                prevTween._next = child;\r
-            } else {\r
-                child._next = this._first;\r
-                this._first = child;\r
-            }\r
-            if (child._next) {\r
-                child._next._prev = child;\r
-            } else {\r
-                this._last = child;\r
-            }\r
-            child._prev = prevTween;\r
-            if (this._timeline) {\r
-                this._uncache(true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._remove = function(tween, skipDisable) {\r
-            if (tween.timeline === this) {\r
-                if (!skipDisable) {\r
-                    tween._enabled(false, true);\r
-                }\r
-                tween.timeline = null;\r
-\r
-                if (tween._prev) {\r
-                    tween._prev._next = tween._next;\r
-                } else if (this._first === tween) {\r
-                    this._first = tween._next;\r
-                }\r
-                if (tween._next) {\r
-                    tween._next._prev = tween._prev;\r
-                } else if (this._last === tween) {\r
-                    this._last = tween._prev;\r
-                }\r
-\r
-                if (this._timeline) {\r
-                    this._uncache(true);\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            var tween = this._first,\r
-                next;\r
-            this._totalTime = this._time = this._rawPrevTime = time;\r
-            while (tween) {\r
-                next = tween._next; //record it here because the value could change after rendering...\r
-                if (tween._active || (time >= tween._startTime && !tween._paused)) {\r
-                    if (!tween._reversed) {\r
-                        tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                    } else {\r
-                        tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                    }\r
-                }\r
-                tween = next;\r
-            }\r
-        };\r
-\r
-        p.rawTime = function() {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            return this._totalTime;\r
-        };\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TweenLite\r
- * ----------------------------------------------------------------\r
- */\r
-        var TweenLite = _class("TweenLite", function(target, duration, vars) {\r
-                Animation.call(this, duration, vars);\r
-                this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)\r
-\r
-                if (target == null) {\r
-                    throw "Cannot tween a null target.";\r
-                }\r
-\r
-                this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;\r
-\r
-                var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),\r
-                    overwrite = this.vars.overwrite,\r
-                    i, targ, targets;\r
-\r
-                this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];\r
-\r
-                if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {\r
-                    this._targets = targets = _slice.call(target, 0);\r
-                    this._propLookup = [];\r
-                    this._siblings = [];\r
-                    for (i = 0; i < targets.length; i++) {\r
-                        targ = targets[i];\r
-                        if (!targ) {\r
-                            targets.splice(i--, 1);\r
-                            continue;\r
-                        } else if (typeof(targ) === "string") {\r
-                            targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings\r
-                            if (typeof(targ) === "string") {\r
-                                targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)\r
-                            }\r
-                            continue;\r
-                        } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.\r
-                            targets.splice(i--, 1);\r
-                            this._targets = targets = targets.concat(_slice.call(targ, 0));\r
-                            continue;\r
-                        }\r
-                        this._siblings[i] = _register(targ, this, false);\r
-                        if (overwrite === 1) if (this._siblings[i].length > 1) {\r
-                            _applyOverwrite(targ, this, null, 1, this._siblings[i]);\r
-                        }\r
-                    }\r
-\r
-                } else {\r
-                    this._propLookup = {};\r
-                    this._siblings = _register(target, this, false);\r
-                    if (overwrite === 1) if (this._siblings.length > 1) {\r
-                        _applyOverwrite(target, this, null, 1, this._siblings);\r
-                    }\r
-                }\r
-                if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {\r
-                    this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)\r
-                    this.render(-this._delay);\r
-                }\r
-            }, true),\r
-            _isSelector = function(v) {\r
-                return (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.\r
-            },\r
-            _autoCSS = function(vars, target) {\r
-                var css = {},\r
-                    p;\r
-                for (p in vars) {\r
-                    if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.\r
-                        css[p] = vars[p];\r
-                        delete vars[p];\r
-                    }\r
-                }\r
-                vars.css = css;\r
-            };\r
-\r
-        p = TweenLite.prototype = new Animation();\r
-        p.constructor = TweenLite;\r
-        p.kill()._gc = false;\r
-\r
-//----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------\r
-\r
-        p.ratio = 0;\r
-        p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;\r
-        p._notifyPluginsOfEnabled = p._lazy = false;\r
-\r
-        TweenLite.version = "1.12.1";\r
-        TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);\r
-        TweenLite.defaultOverwrite = "auto";\r
-        TweenLite.ticker = _ticker;\r
-        TweenLite.autoSleep = true;\r
-        TweenLite.lagSmoothing = function(threshold, adjustedLag) {\r
-            _ticker.lagSmoothing(threshold, adjustedLag);\r
-        };\r
-        TweenLite.selector = window.$ || window.jQuery || function(e) { if (window.$) { TweenLite.selector = window.$; return window.$(e); } return window.document ? window.document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e) : e; };\r
-\r
-        var _lazyTweens = [],\r
-            _lazyLookup = {},\r
-            _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.\r
-            _plugins = TweenLite._plugins = {},\r
-            _tweenLookup = _internals.tweenLookup = {},\r
-            _tweenLookupNum = 0,\r
-            _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1},\r
-            _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},\r
-            _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),\r
-            _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),\r
-            _lazyRender = function() {\r
-                var i = _lazyTweens.length;\r
-                _lazyLookup = {};\r
-                while (--i > -1) {\r
-                    a = _lazyTweens[i];\r
-                    if (a && a._lazy !== false) {\r
-                        a.render(a._lazy, false, true);\r
-                        a._lazy = false;\r
-                    }\r
-                }\r
-                _lazyTweens.length = 0;\r
-            };\r
-\r
-        _rootTimeline._startTime = _ticker.time;\r
-        _rootFramesTimeline._startTime = _ticker.frame;\r
-        _rootTimeline._active = _rootFramesTimeline._active = true;\r
-        setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".\r
-\r
-        Animation._updateRoot = TweenLite.render = function() {\r
-                var i, a, p;\r
-                if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.\r
-                    _lazyRender();\r
-                }\r
-                _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);\r
-                _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);\r
-                if (_lazyTweens.length) {\r
-                    _lazyRender();\r
-                }\r
-                if (!(_ticker.frame % 120)) { //dump garbage every 120 frames...\r
-                    for (p in _tweenLookup) {\r
-                        a = _tweenLookup[p].tweens;\r
-                        i = a.length;\r
-                        while (--i > -1) {\r
-                            if (a[i]._gc) {\r
-                                a.splice(i, 1);\r
-                            }\r
-                        }\r
-                        if (a.length === 0) {\r
-                            delete _tweenLookup[p];\r
-                        }\r
-                    }\r
-                    //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly\r
-                    p = _rootTimeline._first;\r
-                    if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {\r
-                        while (p && p._paused) {\r
-                            p = p._next;\r
-                        }\r
-                        if (!p) {\r
-                            _ticker.sleep();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-\r
-        _ticker.addEventListener("tick", Animation._updateRoot);\r
-\r
-        var _register = function(target, tween, scrub) {\r
-                var id = target._gsTweenID, a, i;\r
-                if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {\r
-                    _tweenLookup[id] = {target:target, tweens:[]};\r
-                }\r
-                if (tween) {\r
-                    a = _tweenLookup[id].tweens;\r
-                    a[(i = a.length)] = tween;\r
-                    if (scrub) {\r
-                        while (--i > -1) {\r
-                            if (a[i] === tween) {\r
-                                a.splice(i, 1);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-                return _tweenLookup[id].tweens;\r
-            },\r
-\r
-            _applyOverwrite = function(target, tween, props, mode, siblings) {\r
-                var i, changed, curTween, l;\r
-                if (mode === 1 || mode >= 4) {\r
-                    l = siblings.length;\r
-                    for (i = 0; i < l; i++) {\r
-                        if ((curTween = siblings[i]) !== tween) {\r
-                            if (!curTween._gc) if (curTween._enabled(false, false)) {\r
-                                changed = true;\r
-                            }\r
-                        } else if (mode === 5) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    return changed;\r
-                }\r
-                //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)\r
-                var startTime = tween._startTime + _tinyNum,\r
-                    overlaps = [],\r
-                    oCount = 0,\r
-                    zeroDur = (tween._duration === 0),\r
-                    globalStart;\r
-                i = siblings.length;\r
-                while (--i > -1) {\r
-                    if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {\r
-                        //ignore\r
-                    } else if (curTween._timeline !== tween._timeline) {\r
-                        globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);\r
-                        if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {\r
-                            overlaps[oCount++] = curTween;\r
-                        }\r
-                    } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {\r
-                        overlaps[oCount++] = curTween;\r
-                    }\r
-                }\r
-\r
-                i = oCount;\r
-                while (--i > -1) {\r
-                    curTween = overlaps[i];\r
-                    if (mode === 2) if (curTween._kill(props, target)) {\r
-                        changed = true;\r
-                    }\r
-                    if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {\r
-                        if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.\r
-                            changed = true;\r
-                        }\r
-                    }\r
-                }\r
-                return changed;\r
-            },\r
-\r
-            _checkOverlap = function(tween, reference, zeroDur) {\r
-                var tl = tween._timeline,\r
-                    ts = tl._timeScale,\r
-                    t = tween._startTime;\r
-                while (tl._timeline) {\r
-                    t += tl._startTime;\r
-                    ts *= tl._timeScale;\r
-                    if (tl._paused) {\r
-                        return -100;\r
-                    }\r
-                    tl = tl._timeline;\r
-                }\r
-                t /= ts;\r
-                return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;\r
-            };\r
-\r
-\r
-//---- TweenLite instance methods -----------------------------------------------------------------------------\r
-\r
-        p._init = function() {\r
-            var v = this.vars,\r
-                op = this._overwrittenProps,\r
-                dur = this._duration,\r
-                immediate = !!v.immediateRender,\r
-                ease = v.ease,\r
-                i, initPlugins, pt, p, startVars;\r
-            if (v.startAt) {\r
-                if (this._startAt) {\r
-                    this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.\r
-                    this._startAt.kill();\r
-                }\r
-                startVars = {};\r
-                for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);\r
-                    startVars[p] = v.startAt[p];\r
-                }\r
-                startVars.overwrite = false;\r
-                startVars.immediateRender = true;\r
-                startVars.lazy = (immediate && v.lazy !== false);\r
-                startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).\r
-                this._startAt = TweenLite.to(this.target, 0, startVars);\r
-                if (immediate) {\r
-                    if (this._time > 0) {\r
-                        this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).\r
-                    } else if (dur !== 0) {\r
-                        return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.\r
-                    }\r
-                }\r
-            } else if (v.runBackwards && dur !== 0) {\r
-                //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)\r
-                if (this._startAt) {\r
-                    this._startAt.render(-1, true);\r
-                    this._startAt.kill();\r
-                    this._startAt = null;\r
-                } else {\r
-                    pt = {};\r
-                    for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.\r
-                        if (!_reservedProps[p] || p === "autoCSS") {\r
-                            pt[p] = v[p];\r
-                        }\r
-                    }\r
-                    pt.overwrite = 0;\r
-                    pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.\r
-                    pt.lazy = (immediate && v.lazy !== false);\r
-                    pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)\r
-                    this._startAt = TweenLite.to(this.target, 0, pt);\r
-                    if (!immediate) {\r
-                        this._startAt._init(); //ensures that the initial values are recorded\r
-                        this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.\r
-                    } else if (this._time === 0) {\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-            if (!ease) {\r
-                this._ease = TweenLite.defaultEase;\r
-            } else if (ease instanceof Ease) {\r
-                this._ease = (v.easeParams instanceof Array) ? ease.config.apply(ease, v.easeParams) : ease;\r
-            } else {\r
-                this._ease = (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;\r
-            }\r
-            this._easeType = this._ease._type;\r
-            this._easePower = this._ease._power;\r
-            this._firstPT = null;\r
-\r
-            if (this._targets) {\r
-                i = this._targets.length;\r
-                while (--i > -1) {\r
-                    if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null)) ) {\r
-                        initPlugins = true;\r
-                    }\r
-                }\r
-            } else {\r
-                initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op);\r
-            }\r
-\r
-            if (initPlugins) {\r
-                TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite\r
-            }\r
-            if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.\r
-                this._enabled(false, false);\r
-            }\r
-            if (v.runBackwards) {\r
-                pt = this._firstPT;\r
-                while (pt) {\r
-                    pt.s += pt.c;\r
-                    pt.c = -pt.c;\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-            this._onUpdate = v.onUpdate;\r
-            this._initted = true;\r
-        };\r
-\r
-        p._initProps = function(target, propLookup, siblings, overwrittenProps) {\r
-            var p, i, initPlugins, plugin, pt, v;\r
-            if (target == null) {\r
-                return false;\r
-            }\r
-\r
-            if (_lazyLookup[target._gsTweenID]) {\r
-                _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)\r
-            }\r
-\r
-            if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.\r
-                _autoCSS(this.vars, target);\r
-            }\r
-            for (p in this.vars) {\r
-                v = this.vars[p];\r
-                if (_reservedProps[p]) {\r
-                    if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {\r
-                        this.vars[p] = v = this._swapSelfInParams(v, this);\r
-                    }\r
-\r
-                } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this)) {\r
-\r
-                    //t - target        [object]\r
-                    //p - property      [string]\r
-                    //s - start         [number]\r
-                    //c - change        [number]\r
-                    //f - isFunction    [boolean]\r
-                    //n - name          [string]\r
-                    //pg - isPlugin     [boolean]\r
-                    //pr - priority     [number]\r
-                    this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:true, n:p, pg:true, pr:plugin._priority};\r
-                    i = plugin._overwriteProps.length;\r
-                    while (--i > -1) {\r
-                        propLookup[plugin._overwriteProps[i]] = this._firstPT;\r
-                    }\r
-                    if (plugin._priority || plugin._onInitAllProps) {\r
-                        initPlugins = true;\r
-                    }\r
-                    if (plugin._onDisable || plugin._onEnable) {\r
-                        this._notifyPluginsOfEnabled = true;\r
-                    }\r
-\r
-                } else {\r
-                    this._firstPT = propLookup[p] = pt = {_next:this._firstPT, t:target, p:p, f:(typeof(target[p]) === "function"), n:p, pg:false, pr:0};\r
-                    pt.s = (!pt.f) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();\r
-                    pt.c = (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : (Number(v) - pt.s) || 0;\r
-                }\r
-                if (pt) if (pt._next) {\r
-                    pt._next._prev = pt;\r
-                }\r
-            }\r
-\r
-            if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)\r
-                return this._initProps(target, propLookup, siblings, overwrittenProps);\r
-            }\r
-            if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {\r
-                this._kill(propLookup, target);\r
-                return this._initProps(target, propLookup, siblings, overwrittenProps);\r
-            }\r
-            if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.\r
-                _lazyLookup[target._gsTweenID] = true;\r
-            }\r
-            return initPlugins;\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            var prevTime = this._time,\r
-                duration = this._duration,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                isComplete, callback, pt, rawPrevTime;\r
-            if (time >= duration) {\r
-                this._totalTime = this._time = duration;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;\r
-                if (!this._reversed ) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                }\r
-                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.\r
-                        time = 0;\r
-                    }\r
-                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {\r
-                        force = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                }\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = 0;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        if (prevRawPrevTime >= 0) {\r
-                            force = true;\r
-                        }\r
-                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    }\r
-                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\r
-                    force = true;\r
-                }\r
-            } else {\r
-                this._totalTime = this._time = time;\r
-\r
-                if (this._easeType) {\r
-                    var r = time / duration, type = this._easeType, pow = this._easePower;\r
-                    if (type === 1 || (type === 3 && r >= 0.5)) {\r
-                        r = 1 - r;\r
-                    }\r
-                    if (type === 3) {\r
-                        r *= 2;\r
-                    }\r
-                    if (pow === 1) {\r
-                        r *= r;\r
-                    } else if (pow === 2) {\r
-                        r *= r * r;\r
-                    } else if (pow === 3) {\r
-                        r *= r * r * r;\r
-                    } else if (pow === 4) {\r
-                        r *= r * r * r * r;\r
-                    }\r
-\r
-                    if (type === 1) {\r
-                        this.ratio = 1 - r;\r
-                    } else if (type === 2) {\r
-                        this.ratio = r;\r
-                    } else if (time / duration < 0.5) {\r
-                        this.ratio = r / 2;\r
-                    } else {\r
-                        this.ratio = 1 - (r / 2);\r
-                    }\r
-\r
-                } else {\r
-                    this.ratio = this._ease.getRatio(time / duration);\r
-                }\r
-            }\r
-\r
-            if (this._time === prevTime && !force) {\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._init();\r
-                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.\r
-                    return;\r
-                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {\r
-                    this._time = this._totalTime = prevTime;\r
-                    this._rawPrevTime = prevRawPrevTime;\r
-                    _lazyTweens.push(this);\r
-                    this._lazy = time;\r
-                    return;\r
-                }\r
-                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.\r
-                if (this._time && !isComplete) {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                } else if (isComplete && this._ease._calcEnd) {\r
-                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);\r
-                }\r
-            }\r
-            if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occuring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.\r
-                this._lazy = false;\r
-            }\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {\r
-                this._active = true;  //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.\r
-            }\r
-            if (prevTime === 0) {\r
-                if (this._startAt) {\r
-                    if (time >= 0) {\r
-                        this._startAt.render(time, suppressEvents, force);\r
-                    } else if (!callback) {\r
-                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.\r
-                    }\r
-                }\r
-                if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {\r
-                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-                }\r
-            }\r
-\r
-            pt = this._firstPT;\r
-            while (pt) {\r
-                if (pt.f) {\r
-                    pt.t[pt.p](pt.c * this.ratio + pt.s);\r
-                } else {\r
-                    pt.t[pt.p] = pt.c * this.ratio + pt.s;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-\r
-            if (this._onUpdate) {\r
-                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\r
-                }\r
-                if (!suppressEvents) if (this._time !== prevTime || isComplete) {\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-            }\r
-\r
-            if (callback) if (!this._gc) { //check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force);\r
-                }\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.\r
-                    this._rawPrevTime = 0;\r
-                }\r
-            }\r
-\r
-        };\r
-\r
-        p._kill = function(vars, target) {\r
-            if (vars === "all") {\r
-                vars = null;\r
-            }\r
-            if (vars == null) if (target == null || target === this.target) {\r
-                this._lazy = false;\r
-                return this._enabled(false, false);\r
-            }\r
-            target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;\r
-            var i, overwrittenProps, p, pt, propLookup, changed, killProps, record;\r
-            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {\r
-                i = target.length;\r
-                while (--i > -1) {\r
-                    if (this._kill(vars, target[i])) {\r
-                        changed = true;\r
-                    }\r
-                }\r
-            } else {\r
-                if (this._targets) {\r
-                    i = this._targets.length;\r
-                    while (--i > -1) {\r
-                        if (target === this._targets[i]) {\r
-                            propLookup = this._propLookup[i] || {};\r
-                            this._overwrittenProps = this._overwrittenProps || [];\r
-                            overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";\r
-                            break;\r
-                        }\r
-                    }\r
-                } else if (target !== this.target) {\r
-                    return false;\r
-                } else {\r
-                    propLookup = this._propLookup;\r
-                    overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";\r
-                }\r
-\r
-                if (propLookup) {\r
-                    killProps = vars || propLookup;\r
-                    record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)\r
-                    for (p in killProps) {\r
-                        if ((pt = propLookup[p])) {\r
-                            if (pt.pg && pt.t._kill(killProps)) {\r
-                                changed = true; //some plugins need to be notified so they can perform cleanup tasks first\r
-                            }\r
-                            if (!pt.pg || pt.t._overwriteProps.length === 0) {\r
-                                if (pt._prev) {\r
-                                    pt._prev._next = pt._next;\r
-                                } else if (pt === this._firstPT) {\r
-                                    this._firstPT = pt._next;\r
-                                }\r
-                                if (pt._next) {\r
-                                    pt._next._prev = pt._prev;\r
-                                }\r
-                                pt._next = pt._prev = null;\r
-                            }\r
-                            delete propLookup[p];\r
-                        }\r
-                        if (record) {\r
-                            overwrittenProps[p] = 1;\r
-                        }\r
-                    }\r
-                    if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.\r
-                        this._enabled(false, false);\r
-                    }\r
-                }\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            if (this._notifyPluginsOfEnabled) {\r
-                TweenLite._onPluginEvent("_onDisable", this);\r
-            }\r
-            this._firstPT = null;\r
-            this._overwrittenProps = null;\r
-            this._onUpdate = null;\r
-            this._startAt = null;\r
-            this._initted = this._active = this._notifyPluginsOfEnabled = this._lazy = false;\r
-            this._propLookup = (this._targets) ? {} : [];\r
-            return this;\r
-        };\r
-\r
-        p._enabled = function(enabled, ignoreTimeline) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            if (enabled && this._gc) {\r
-                var targets = this._targets,\r
-                    i;\r
-                if (targets) {\r
-                    i = targets.length;\r
-                    while (--i > -1) {\r
-                        this._siblings[i] = _register(targets[i], this, true);\r
-                    }\r
-                } else {\r
-                    this._siblings = _register(this.target, this, true);\r
-                }\r
-            }\r
-            Animation.prototype._enabled.call(this, enabled, ignoreTimeline);\r
-            if (this._notifyPluginsOfEnabled) if (this._firstPT) {\r
-                return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);\r
-            }\r
-            return false;\r
-        };\r
-\r
-\r
-//----TweenLite static methods -----------------------------------------------------\r
-\r
-        TweenLite.to = function(target, duration, vars) {\r
-            return new TweenLite(target, duration, vars);\r
-        };\r
-\r
-        TweenLite.from = function(target, duration, vars) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return new TweenLite(target, duration, vars);\r
-        };\r
-\r
-        TweenLite.fromTo = function(target, duration, fromVars, toVars) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return new TweenLite(target, duration, toVars);\r
-        };\r
-\r
-        TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {\r
-            return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});\r
-        };\r
-\r
-        TweenLite.set = function(target, vars) {\r
-            return new TweenLite(target, 0, vars);\r
-        };\r
-\r
-        TweenLite.getTweensOf = function(target, onlyActive) {\r
-            if (target == null) { return []; }\r
-            target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;\r
-            var i, a, j, t;\r
-            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {\r
-                i = target.length;\r
-                a = [];\r
-                while (--i > -1) {\r
-                    a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));\r
-                }\r
-                i = a.length;\r
-                //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)\r
-                while (--i > -1) {\r
-                    t = a[i];\r
-                    j = i;\r
-                    while (--j > -1) {\r
-                        if (t === a[j]) {\r
-                            a.splice(i, 1);\r
-                        }\r
-                    }\r
-                }\r
-            } else {\r
-                a = _register(target).concat();\r
-                i = a.length;\r
-                while (--i > -1) {\r
-                    if (a[i]._gc || (onlyActive && !a[i].isActive())) {\r
-                        a.splice(i, 1);\r
-                    }\r
-                }\r
-            }\r
-            return a;\r
-        };\r
-\r
-        TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {\r
-            if (typeof(onlyActive) === "object") {\r
-                vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)\r
-                onlyActive = false;\r
-            }\r
-            var a = TweenLite.getTweensOf(target, onlyActive),\r
-                i = a.length;\r
-            while (--i > -1) {\r
-                a[i]._kill(vars, target);\r
-            }\r
-        };\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TweenPlugin   (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another <script> call before loading plugins which is easy to forget)\r
- * ----------------------------------------------------------------\r
- */\r
-        var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {\r
-                    this._overwriteProps = (props || "").split(",");\r
-                    this._propName = this._overwriteProps[0];\r
-                    this._priority = priority || 0;\r
-                    this._super = TweenPlugin.prototype;\r
-                }, true);\r
-\r
-        p = TweenPlugin.prototype;\r
-        TweenPlugin.version = "1.10.1";\r
-        TweenPlugin.API = 2;\r
-        p._firstPT = null;\r
-\r
-        p._addTween = function(target, prop, start, end, overwriteProp, round) {\r
-            var c, pt;\r
-            if (end != null && (c = (typeof(end) === "number" || end.charAt(1) !== "=") ? Number(end) - start : parseInt(end.charAt(0) + "1", 10) * Number(end.substr(2)))) {\r
-                this._firstPT = pt = {_next:this._firstPT, t:target, p:prop, s:start, c:c, f:(typeof(target[prop]) === "function"), n:overwriteProp || prop, r:round};\r
-                if (pt._next) {\r
-                    pt._next._prev = pt;\r
-                }\r
-                return pt;\r
-            }\r
-        };\r
-\r
-        p.setRatio = function(v) {\r
-            var pt = this._firstPT,\r
-                min = 0.000001,\r
-                val;\r
-            while (pt) {\r
-                val = pt.c * v + pt.s;\r
-                if (pt.r) {\r
-                    val = Math.round(val);\r
-                } else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser\r
-                    val = 0;\r
-                }\r
-                if (pt.f) {\r
-                    pt.t[pt.p](val);\r
-                } else {\r
-                    pt.t[pt.p] = val;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-        };\r
-\r
-        p._kill = function(lookup) {\r
-            var a = this._overwriteProps,\r
-                pt = this._firstPT,\r
-                i;\r
-            if (lookup[this._propName] != null) {\r
-                this._overwriteProps = [];\r
-            } else {\r
-                i = a.length;\r
-                while (--i > -1) {\r
-                    if (lookup[a[i]] != null) {\r
-                        a.splice(i, 1);\r
-                    }\r
-                }\r
-            }\r
-            while (pt) {\r
-                if (lookup[pt.n] != null) {\r
-                    if (pt._next) {\r
-                        pt._next._prev = pt._prev;\r
-                    }\r
-                    if (pt._prev) {\r
-                        pt._prev._next = pt._next;\r
-                        pt._prev = null;\r
-                    } else if (this._firstPT === pt) {\r
-                        this._firstPT = pt._next;\r
-                    }\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p._roundProps = function(lookup, value) {\r
-            var pt = this._firstPT;\r
-            while (pt) {\r
-                if (lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ])) { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.\r
-                    pt.r = value;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-        };\r
-\r
-        TweenLite._onPluginEvent = function(type, tween) {\r
-            var pt = tween._firstPT,\r
-                changed, pt2, first, last, next;\r
-            if (type === "_onInitAllProps") {\r
-                //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.\r
-                while (pt) {\r
-                    next = pt._next;\r
-                    pt2 = first;\r
-                    while (pt2 && pt2.pr > pt.pr) {\r
-                        pt2 = pt2._next;\r
-                    }\r
-                    if ((pt._prev = pt2 ? pt2._prev : last)) {\r
-                        pt._prev._next = pt;\r
-                    } else {\r
-                        first = pt;\r
-                    }\r
-                    if ((pt._next = pt2)) {\r
-                        pt2._prev = pt;\r
-                    } else {\r
-                        last = pt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-                pt = tween._firstPT = first;\r
-            }\r
-            while (pt) {\r
-                if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {\r
-                    changed = true;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        TweenPlugin.activate = function(plugins) {\r
-            var i = plugins.length;\r
-            while (--i > -1) {\r
-                if (plugins[i].API === TweenPlugin.API) {\r
-                    _plugins[(new plugins[i]())._propName] = plugins[i];\r
-                }\r
-            }\r
-            return true;\r
-        };\r
-\r
-        //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.\r
-        _gsDefine.plugin = function(config) {\r
-            if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }\r
-            var propName = config.propName,\r
-                priority = config.priority || 0,\r
-                overwriteProps = config.overwriteProps,\r
-                map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_roundProps", initAll:"_onInitAllProps"},\r
-                Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",\r
-                    function() {\r
-                        TweenPlugin.call(this, propName, priority);\r
-                        this._overwriteProps = overwriteProps || [];\r
-                    }, (config.global === true)),\r
-                p = Plugin.prototype = new TweenPlugin(propName),\r
-                prop;\r
-            p.constructor = Plugin;\r
-            Plugin.API = config.API;\r
-            for (prop in map) {\r
-                if (typeof(config[prop]) === "function") {\r
-                    p[map[prop]] = config[prop];\r
-                }\r
-            }\r
-            Plugin.version = config.version;\r
-            TweenPlugin.activate([Plugin]);\r
-            return Plugin;\r
-        };\r
-\r
-\r
-        //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.\r
-        a = window._gsQueue;\r
-        if (a) {\r
-            for (i = 0; i < a.length; i++) {\r
-                a[i]();\r
-            }\r
-            for (p in _defLookup) {\r
-                if (!_defLookup[p].func) {\r
-                    //window.console.log("GSAP encountered missing dependency: com.greensock." + p);\r
-                }\r
-            }\r
-        }\r
-\r
-        _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated\r
-\r
-})(window);\r
-\r
-angular.module('b2b.att.collapse', ['b2b.att.transition'])\r
-\r
-// The collapsible directive indicates a block of html that will expand and collapse\r
-.directive('b2bCollapse', ['$transition', function($transition) {\r
-    // CSS transitions don't work with height: auto, so we have to manually change the height to a\r
-    // specific value and then once the animation completes, we can reset the height to auto.\r
-    // Unfortunately if you do this while the CSS transitions are specified (i.e. in the CSS class\r
-    // "collapse") then you trigger a change to height 0 in between.\r
-    // The fix is to remove the "collapse" CSS class while changing the height back to auto - phew!\r
-\r
-    var props = {\r
-        open: {\r
-            marginTop: null,\r
-            marginBottom: null,\r
-            paddingTop: null,\r
-            paddingBottom: null,\r
-            display: 'block'\r
-        },\r
-        closed: {\r
-            marginTop: 0,\r
-            marginBottom: 0,\r
-            paddingTop: 0,\r
-            paddingBottom: 0,\r
-            display: 'none'\r
-        }\r
-    };\r
-\r
-    var fixUpHeight = function(scope, element, height) {\r
-        // We remove the collapse CSS class to prevent a transition when we change to height: auto\r
-        element.removeClass('b2bCollapse');\r
-        element.css({height: height});\r
-        //adjusting for any margin or padding\r
-        if (height === 0) {\r
-            element.css(props.closed);\r
-        } else {\r
-            element.css(props.open);\r
-        }\r
-        // It appears that  reading offsetWidth makes the browser realise that we have changed the\r
-        // height already :-/\r
-        var x = element[0].offsetWidth;\r
-        element.addClass('b2bCollapse');\r
-    };\r
-\r
-    return {\r
-        link: function(scope, element, attrs) {\r
-            var isCollapsed;\r
-            var initialAnimSkip = true;\r
-            scope.$watch(function() {\r
-                return element[0].scrollHeight;\r
-            }, function(value) {\r
-                //The listener is called when scrollHeight changes\r
-                //It actually does on 2 scenarios: \r
-                // 1. Parent is set to display none\r
-                // 2. angular bindings inside are resolved\r
-                //When we have a change of scrollHeight we are setting again the correct height if the group is opened\r
-                if (element[0].scrollHeight !== 0) {\r
-                    if (!isCollapsed) {\r
-                        if (initialAnimSkip) {\r
-                            fixUpHeight(scope, element, element[0].scrollHeight + 'px');\r
-                        } else {\r
-                            fixUpHeight(scope, element, 'auto');\r
-                            element.css({overflow: 'visible'});\r
-                        }\r
-                    }\r
-                }\r
-            });\r
-\r
-            scope.$watch(attrs.b2bCollapse, function(value) {\r
-                if (value) {\r
-                    collapse();\r
-                } else {\r
-                    expand();\r
-                }\r
-            });\r
-\r
-\r
-            var currentTransition;\r
-            var doTransition = function(change) {\r
-                if (currentTransition) {\r
-                    currentTransition.cancel();\r
-                }\r
-                currentTransition = $transition(element, change);\r
-                currentTransition.then(\r
-                        function() {\r
-                            currentTransition = undefined;\r
-                        },\r
-                        function() {\r
-                            currentTransition = undefined;\r
-                        }\r
-                );\r
-                return currentTransition;\r
-            };\r
-\r
-            var expand = function() {\r
-                scope.postTransition = true; \r
-                if (initialAnimSkip) {\r
-                    initialAnimSkip = false;\r
-                    if (!isCollapsed) {\r
-                        fixUpHeight(scope, element, 'auto');\r
-                    }\r
-                } else {\r
-                    //doTransition({ height : element[0].scrollHeight + 'px' })\r
-                    doTransition(angular.extend({height: element[0].scrollHeight + 'px'}, props.open))\r
-                            .then(function() {\r
-                                // This check ensures that we don't accidentally update the height if the user has closed\r
-                                // the group while the animation was still running\r
-                                if (!isCollapsed) {\r
-                                    fixUpHeight(scope, element, 'auto');\r
-                                }\r
-                            });\r
-                }\r
-                isCollapsed = false;\r
-            };\r
-\r
-            var collapse = function() {\r
-                isCollapsed = true;\r
-                if (initialAnimSkip) {\r
-                    initialAnimSkip = false;\r
-                    fixUpHeight(scope, element, 0);\r
-                } else {\r
-                    fixUpHeight(scope, element, element[0].scrollHeight + 'px');\r
-                    doTransition(angular.extend({height: 0}, props.closed)).then(function() {\r
-                        scope.postTransition = false;\r
-                    });\r
-                    element.css({overflow: 'hidden'});\r
-                }\r
-            };\r
-        }\r
-    };\r
-}]);\r
-angular.module('b2b.att.position', [])\r
-\r
-.factory('$position', ['$document', '$window', function ($document, $window) {\r
-    function getStyle(el, cssprop) {\r
-        if (el.currentStyle) { //IE\r
-            return el.currentStyle[cssprop];\r
-        } else if ($window.getComputedStyle) {\r
-            return $window.getComputedStyle(el)[cssprop];\r
-        }\r
-        // finally try and get inline style\r
-        return el.style[cssprop];\r
-    }\r
-\r
-    /**\r
-     * Checks if a given element is statically positioned\r
-     * @param element - raw DOM element\r
-     */\r
-    function isStaticPositioned(element) {\r
-        return (getStyle(element, "position") || 'static') === 'static';\r
-    }\r
-\r
-    /**\r
-     * returns the closest, non-statically positioned parentOffset of a given element\r
-     * @param element\r
-     */\r
-    var parentOffsetEl = function (element) {\r
-        var docDomEl = $document[0];\r
-        var offsetParent = element.offsetParent || docDomEl;\r
-        while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {\r
-            offsetParent = offsetParent.offsetParent;\r
-        }\r
-        return offsetParent || docDomEl;\r
-    };\r
-\r
-    return {\r
-        /**\r
-         * Provides read-only equivalent of jQuery's position function:\r
-         * http://api.jquery.com/position/\r
-         */\r
-        position: function (element) {\r
-            var elBCR = this.offset(element);\r
-            var offsetParentBCR = {\r
-                top: 0,\r
-                left: 0\r
-            };\r
-            var offsetParentEl = parentOffsetEl(element[0]);\r
-            if (offsetParentEl !== $document[0]) {\r
-                offsetParentBCR = this.offset(angular.element(offsetParentEl));\r
-                offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;\r
-                offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;\r
-            }\r
-\r
-            return {\r
-                width: element.prop('offsetWidth'),\r
-                height: element.prop('offsetHeight'),\r
-                top: elBCR.top - offsetParentBCR.top,\r
-                left: elBCR.left - offsetParentBCR.left\r
-            };\r
-        },\r
-\r
-        /**\r
-         * Provides read-only equivalent of jQuery's offset function:\r
-         * http://api.jquery.com/offset/\r
-         */\r
-        offset: function (element) {\r
-            var boundingClientRect = element[0].getBoundingClientRect();\r
-            return {\r
-                width: element.prop('offsetWidth'),\r
-                height: element.prop('offsetHeight'),\r
-                top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),\r
-                left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)\r
-            };\r
-        },\r
-        \r
-         /**\r
-         * Provides functionality to check whether an element is in view port.\r
-         */\r
-        isElementInViewport: function (element) {\r
-            if (element) {\r
-                var rect = element[0].getBoundingClientRect();\r
-                return (\r
-                    rect.top >= 0 &&\r
-                    rect.left >= 0 &&\r
-                    rect.bottom <= ($window.innerHeight || $document[0].documentElement.clientHeight) &&\r
-                    rect.right <= ($window.innerWidth || $document[0].documentElement.clientWidth)\r
-                );\r
-            } else {\r
-                return false;\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('$isElement', [function () {\r
-    var isElement = function (currentElem, targetElem, alternateElem) {\r
-        if (currentElem[0] === targetElem[0]) {\r
-            return true;\r
-        } else if (currentElem[0] === alternateElem[0]) {\r
-            return false;\r
-        } else {\r
-            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);\r
-        }\r
-    };\r
-\r
-    return isElement;\r
-}])\r
-\r
-.directive('attPosition', ['$position', function ($position) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr) {\r
-            scope.$watchCollection(function () {\r
-                return $position.position(elem);\r
-            }, function (value) {\r
-                scope[attr.attPosition] = value;\r
-            });\r
-        }\r
-    };\r
-}]);\r
-\r
-angular.module('b2b.att.transition', [])\r
-\r
-.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {\r
-\r
-  var $transition = function(element, trigger, options) {\r
-    options = options || {};\r
-    var deferred = $q.defer();\r
-    var endEventName = $transition[options.animation ? "animationEndEventName" : "transitionEndEventName"];\r
-\r
-    var transitionEndHandler = function() {\r
-      $rootScope.$apply(function() {\r
-        element.unbind(endEventName, transitionEndHandler);\r
-        deferred.resolve(element);\r
-      });\r
-    };\r
-\r
-    if (endEventName) {\r
-      element.bind(endEventName, transitionEndHandler);\r
-    }\r
-\r
-    // Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur\r
-    $timeout(function() {\r
-      if ( angular.isString(trigger) ) {\r
-        element.addClass(trigger);\r
-      } else if ( angular.isFunction(trigger) ) {\r
-        trigger(element);\r
-      } else if ( angular.isObject(trigger) ) {\r
-        element.css(trigger);\r
-      }\r
-      //If browser does not support transitions, instantly resolve\r
-      if ( !endEventName ) {\r
-        deferred.resolve(element);\r
-      }\r
-    }, 100);\r
-\r
-    // Add our custom cancel function to the promise that is returned\r
-    // We can call this if we are about to run a new transition, which we know will prevent this transition from ending,\r
-    // i.e. it will therefore never raise a transitionEnd event for that transition\r
-    deferred.promise.cancel = function() {\r
-      if ( endEventName ) {\r
-        element.unbind(endEventName, transitionEndHandler);\r
-      }\r
-      deferred.reject('Transition cancelled');\r
-    };\r
-\r
-    return deferred.promise;\r
-  };\r
-\r
-  // Work out the name of the transitionEnd event\r
-  var transElement = document.createElement('trans');\r
-  var transitionEndEventNames = {\r
-    'WebkitTransition': 'webkitTransitionEnd',\r
-    'MozTransition': 'transitionend',\r
-    'OTransition': 'oTransitionEnd',\r
-    'transition': 'transitionend'\r
-  };\r
-  var animationEndEventNames = {\r
-    'WebkitTransition': 'webkitAnimationEnd',\r
-    'MozTransition': 'animationend',\r
-    'OTransition': 'oAnimationEnd',\r
-    'transition': 'animationend'\r
-  };\r
-  function findEndEventName(endEventNames) {\r
-    for (var name in endEventNames){\r
-      if (transElement.style[name] !== undefined) {\r
-        return endEventNames[name];\r
-      }\r
-    }\r
-  }\r
-  $transition.transitionEndEventName = findEndEventName(transitionEndEventNames);\r
-  $transition.animationEndEventName = findEndEventName(animationEndEventNames);\r
-  return $transition;\r
-}])\r
-\r
-.factory('$scrollTo', ['$window', function($window) {\r
-    var $scrollTo = function(offsetLeft, offsetTop, duration) {\r
-        TweenMax.to($window, duration || 1, {scrollTo: {y: offsetTop, x: offsetLeft}, ease: Power4.easeOut});\r
-    };\r
-    return $scrollTo;\r
-}])\r
-.factory('animation', function(){\r
-    return TweenMax;\r
-})\r
-.factory('$progressBar', function(){\r
-\r
-   //Provides a function to pass in code for closure purposes\r
-   var loadingAnimationCreator = function(onUpdateCallback){\r
-\r
-      //Use closure to setup some resuable code\r
-      var loadingAnimation = function(callback, duration){\r
-          TweenMax.to({}, duration, {\r
-              onUpdateParams: ["{self}"],\r
-              onUpdate: onUpdateCallback,\r
-              onComplete: callback\r
-          });\r
-      };\r
-      //Returns a function that takes a callback function and a duration for the animation\r
-      return (function(){\r
-        return loadingAnimation;\r
-      })();\r
-    };\r
-\r
-  return loadingAnimationCreator;\r
-})\r
-.factory('$height', function(){\r
-  var heightAnimation = function(element,duration,height,alpha){\r
-    TweenMax.to(element,\r
-      duration,\r
-      {height:height, autoAlpha:alpha},\r
-      0);\r
-  };\r
-  return heightAnimation;\r
-});\r
-angular.module('b2b.att.utilities', ['ngSanitize'])\r
-.constant('b2bUtilitiesConfig', {\r
-    prev: '37',\r
-    up: '38',\r
-    next: '39',\r
-    down: '40',\r
-    type: 'list',\r
-    columns: 1,\r
-    enableSearch: false,\r
-    searchTimer: 200,\r
-    circularTraversal: false\r
-})\r
-.constant('b2bWhenScrollEndsConstants', {\r
-    'threshold': 100,\r
-    'width': 0,\r
-    'height': 0\r
-})\r
-// All breakpoints ranges from >= min and < max\r
-.constant('b2bAwdBreakpoints', {\r
-    breakpoints: {\r
-        mobile: {\r
-            min: 1,\r
-            max: 768\r
-        },\r
-        tablet: {\r
-            min: 768,\r
-            max: 1025\r
-        },\r
-        desktop: {\r
-            min: 1025,\r
-            max: 1920\r
-        }\r
-    }\r
-})\r
-.filter('groupBy', function ($timeout) {\r
-    //Custom GroupBy Filter for treeNav, returns key string and value.childarray as set of grouped elements\r
-    return function (data, key) {\r
-        if (!key) return data;\r
-        var outputPropertyName = '__groupBy__' + key;\r
-        if (!data[outputPropertyName]) {\r
-            var result = {};\r
-            for (var i = 0; i < data.length; i++) {\r
-                if (!result[data[i][key]])\r
-                    result[data[i][key]] = {};\r
-                if (!result[data[i][key]].childArray) {\r
-                    result[data[i][key]].childArray = [];\r
-                }\r
-                result[data[i][key]].childArray.push(data[i]);\r
-                if (data[i].activeGrp && data[i].activeGrp == true) {\r
-                    console.log('make ' + data[i].grpChild + ' active');\r
-                    result[data[i][key]].showGroup = true;\r
-                }\r
-            }\r
-            Object.defineProperty(result, 'length', {enumerable: false,value: Object.keys(result).length});\r
-            Object.defineProperty(data, outputPropertyName, {enumerable: false,configurable: true,writable:false,value:result});\r
-            $timeout(function(){delete data[outputPropertyName];},0,false);\r
-        }\r
-        return data[outputPropertyName];\r
-    };\r
-})\r
-.filter('searchObjectPropertiesFilter', [function() {\r
-    return function(items, searchText, attrs) {\r
-        if(!searchText){\r
-            return items;\r
-        }\r
-        var filtered = [];\r
-        searchText = searchText.toLowerCase();\r
-        angular.forEach(items, function(item) {\r
-            angular.forEach(attrs, function(attr) {\r
-                if (item.hasOwnProperty(attr) && item[attr].toLowerCase().includes(searchText)) {\r
-                    filtered.push(item);\r
-                    return;\r
-                }\r
-            });\r
-        });\r
-        return filtered;\r
-    };\r
-}])\r
-.filter('unsafe',[ '$sce', function ($sce) { \r
-    return function(val){ \r
-       return $sce.trustAsHtml(val); \r
-    }; \r
-}])\r
-.filter('b2bHighlight', function () {\r
-    function escapeRegexp(queryToEscape) {\r
-        return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');\r
-    }\r
-    return function (matchItem, query, className) {\r
-        return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<span class=\"' + className + '\">$&</span>') : matchItem;\r
-    }\r
-})\r
-/*License (MIT)\r
-Copyright Â© 2013 Matt Diamond\r
-https://github.com/cwilso/AudioRecorder/blob/master/js/recorderjs/recorder.js\r
-*/\r
-.factory('b2bRecorder', function() {\r
-\r
-    var Recorder = function(source, cfg) {\r
-        var WORKER_PATH = 'recorderWorker.js';\r
-        var config = cfg || {};\r
-        var bufferLen = config.bufferLen || 4096;\r
-        this.context = source.context;\r
-        if(!this.context.createScriptProcessor) {\r
-            this.node = this.context.createJavacriptProcessor(bufferLen, 2, 2);\r
-        } else {\r
-            this.node = this.context.createScriptProcessor(bufferLen, 2, 2);\r
-        }\r
-        var workerCode = 'function init(a){sampleRate=a.sampleRate}function record(a){recBuffersL.push(a[0]),recBuffersR.push(a[1]),recLength+=a[0].length}function exportWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=mergeBuffers(recBuffersR,recLength),d=interleave(b,c),e=encodeWAV(d),f=new Blob([e],{type:a});this.postMessage(f)}function exportMonoWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=encodeWAV(b,!0),d=new Blob([c],{type:a});this.postMessage(d)}function getBuffers(){var a=[];a.push(mergeBuffers(recBuffersL,recLength)),a.push(mergeBuffers(recBuffersR,recLength)),this.postMessage(a)}function clear(){recLength=0,recBuffersL=[],recBuffersR=[]}function mergeBuffers(a,b){for(var c=new Float32Array(b),d=0,e=0;e<a.length;e++)c.set(a[e],d),d+=a[e].length;return c}function interleave(a,b){for(var c=a.length+b.length,d=new Float32Array(c),e=0,f=0;e<c;)d[e++]=a[f],d[e++]=b[f],f++;return d}function floatTo16BitPCM(a,b,c){for(var d=0;d<c.length;d++,b+=2){var e=Math.max(-1,Math.min(1,c[d]));a.setInt16(b,e<0?32768*e:32767*e,!0)}}function writeString(a,b,c){for(var d=0;d<c.length;d++)a.setUint8(b+d,c.charCodeAt(d))}function encodeWAV(a,b){var c=new ArrayBuffer(44+2*a.length),d=new DataView(c);return writeString(d,0,"RIFF"),d.setUint32(4,32+2*a.length,!0),writeString(d,8,"WAVE"),writeString(d,12,"fmt "),d.setUint32(16,16,!0),d.setUint16(20,1,!0),d.setUint16(22,b?1:2,!0),d.setUint32(24,sampleRate,!0),d.setUint32(28,4*sampleRate,!0),d.setUint16(32,4,!0),d.setUint16(34,16,!0),writeString(d,36,"data"),d.setUint32(40,2*a.length,!0),floatTo16BitPCM(d,44,a),d}var recLength=0,recBuffersL=[],recBuffersR=[],sampleRate;this.onmessage=function(a){switch(a.data.command){case"init":init(a.data.config);break;case"record":record(a.data.buffer);break;case"exportWAV":exportWAV(a.data.type);break;case"exportMonoWAV":exportMonoWAV(a.data.type);break;case"getBuffers":getBuffers();break;case"clear":clear()}};';\r
-        var blob = new Blob([workerCode]);\r
-\r
-        var worker = new Worker(window.URL.createObjectURL(blob)); //TODO: Use a blob instead\r
-        worker.postMessage({\r
-            command: 'init',\r
-            config: {\r
-                sampleRate: this.context.sampleRate\r
-            }\r
-        });\r
-        var recording = false,\r
-            currCallback;\r
-\r
-        this.node.onaudioprocess = function(e) {\r
-            if (!recording) return;\r
-            worker.postMessage({\r
-                command: 'record',\r
-                buffer: [\r
-                    e.inputBuffer.getChannelData(0),\r
-                    e.inputBuffer.getChannelData(1)\r
-                ]\r
-            });\r
-        };\r
-\r
-        this.configure = function(cfg) {\r
-            for (var prop in cfg) {//TODO: look into using angular.extend() here\r
-                if (cfg.hasOwnProperty(prop)) {\r
-                    config[prop] = cfg[prop];\r
-                }\r
-            }\r
-        };\r
-\r
-        this.record = function() {\r
-            recording = true;\r
-        };\r
-\r
-        this.stop = function() {\r
-            recording = false;\r
-        };\r
-\r
-        this.clear = function() {\r
-            worker.postMessage({ command: 'clear' });\r
-            window.URL.revokeObjectURL(blob);\r
-        };\r
-\r
-        this.getBuffers = function(cb) {\r
-            currCallback = cb || config.callback;\r
-            worker.postMessage({ command: 'getBuffers' });\r
-        };\r
-\r
-        this.exportWAV = function(cb, type) {\r
-            currCallback = cb || config.callback;\r
-            type = type || config.type || 'audio/wav';\r
-            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');\r
-            worker.postMessage({\r
-                command: 'exportWAV',\r
-                type: type\r
-            });\r
-        };\r
-\r
-        this.exportMonoWAV = function(cb, type) {\r
-            currCallback = cb || config.callback;\r
-            type = type || config.type || 'audio/wav';\r
-            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');\r
-            worker.postMessage({\r
-                command: 'exportMonoWAV',\r
-                type: type\r
-            });\r
-        };\r
-\r
-        worker.onmessage = function(e) {\r
-            var blob = e.data;\r
-            currCallback(blob);\r
-        };\r
-\r
-        source.connect(this.node);\r
-        this.node.connect(this.context.destination); // if the script node is not connected to an output the "onaudioprocess" event is not triggerd in Chrome\r
-\r
-    };\r
-\r
-    return Recorder;\r
-\r
-})\r
-.factory('b2bViewport', function() {\r
-  /* Source: https://gist.github.com/bjankord/2399828 */\r
-  var _viewportWidth = function() {\r
-    var vpw;\r
-    var webkit = (!(window.webkitConvertPointFromNodeToPage == null));\r
-    \r
-    // Webkit:\r
-    if ( webkit ) {\r
-      var vpwtest = document.createElement( "div" );\r
-      // Sets test div to width 100%, !important overrides any other misc. box model styles that may be set in the CSS\r
-      vpwtest.style.cssText = "width:100% !important; margin:0 !important; padding:0 !important; border:none !important;";\r
-      document.documentElement.insertBefore( vpwtest, document.documentElement.firstChild );\r
-      vpw = vpwtest.offsetWidth;\r
-      document.documentElement.removeChild( vpwtest );\r
-    }\r
-    // IE 6-8:\r
-    else if ( window.innerWidth === undefined ) { \r
-      vpw = document.documentElement.clientWidth; \r
-    }\r
-    // Other:\r
-    else{\r
-      vpw =  window.innerWidth;\r
-    }\r
-\r
-    return (vpw);\r
-  }\r
-  return {\r
-    viewportWidth: _viewportWidth\r
-  };\r
-})\r
-.directive('b2bWhenScrollEnds', function(b2bWhenScrollEndsConstants, $log) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, element, attrs) {\r
-            /**\r
-            * Exposed Attributes:\r
-            *       threshold - integer - number of pixels before scrollbar hits end that callback is called\r
-            *       width - integer - override for element's width (px)\r
-            *       height - integer - override for element's height (px)\r
-            *       axis - string - x/y for scroll bar axis\r
-            */\r
-            var threshold = parseInt(attrs.threshold, 10) || b2bWhenScrollEndsConstants.threshold;\r
-\r
-            if (!attrs.axis || attrs.axis === '') {\r
-                $log.warn('axis attribute must be defined for b2bWhenScrollEnds.');\r
-                return;\r
-            }\r
-\r
-            if (attrs.axis === 'x') {\r
-                visibleWidth = parseInt(attrs.width, 10) || b2bWhenScrollEndsConstants.width;\r
-                if (element.css('width')) {\r
-                    visibleWidth = element.css('width').split('px')[0];  \r
-                }\r
-\r
-                element[0].addEventListener('scroll', function() {\r
-                    var scrollableWidth = element.prop('scrollWidth');\r
-                    if (scrollableWidth === undefined) {\r
-                        scrollableWidth = 1;\r
-                    }\r
-                    var hiddenContentWidth = scrollableWidth - visibleWidth;\r
-\r
-                    if (hiddenContentWidth - element[0].scrollLeft <= threshold) {\r
-                        /* Scroll almost at bottom, load more rows */\r
-                        scope.$apply(attrs.b2bWhenScrollEnds);\r
-                    }\r
-                });\r
-            } else if (attrs.axis === 'y') {\r
-                visibleHeight = parseInt(attrs.height, 10) || b2bWhenScrollEndsConstants.height;\r
-                if (element.css('width')) {\r
-                    visibleHeight = element.css('height').split('px')[0]; \r
-                }\r
-\r
-                element[0].addEventListener('scroll', function() {\r
-                    var scrollableHeight = element.prop('scrollHeight');\r
-                    if (scrollableHeight === undefined) {\r
-                        scrollableHeight = 1;\r
-                    }\r
-                    var hiddenContentHeight = scrollableHeight - visibleHeight;\r
-\r
-                    if (hiddenContentHeight - element[0].scrollTop <= threshold) {\r
-                        /* Scroll almost at bottom, load more rows */\r
-                        scope.$apply(attrs.b2bWhenScrollEnds);\r
-                    }\r
-                });\r
-            }\r
-        }\r
-    };\r
-})\r
-\r
-.factory('$windowBind', ['$window', '$timeout', function($window, $timeout) {\r
-    var win = angular.element($window);\r
-    var _scroll = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    win.bind('scroll', callbackFunc);\r
-                } else {\r
-                    win.unbind('scroll', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var throttle = function(type, name, obj) {\r
-        obj = obj || window;\r
-        var running = false;\r
-        var func = function() {\r
-            if (running) { return; }\r
-            running = true;\r
-             requestAnimationFrame(function() {\r
-                obj.dispatchEvent(new CustomEvent(name));\r
-                running = false;\r
-            });\r
-        };\r
-        obj.addEventListener(type, func);\r
-    };\r
-\r
-    var _resize = function(callbackFunc, scope) {\r
-        throttle("resize", "optimizedResize");\r
-        window.addEventListener("optimizedResize", function(event) {\r
-            callbackFunc();\r
-            //win.bind(event, callbackFunc);\r
-            if (!scope.$$phase) {\r
-                scope.$digest();\r
-            }\r
-        });\r
-    };\r
-\r
-    var _click = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    win.bind('click', callbackFunc);\r
-                } else {\r
-                    win.unbind('click', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {\r
-        if (timeoutFlag) {\r
-            if (!(timeoutValue)) {\r
-                timeoutValue = 0;\r
-            }\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    $timeout(function () {\r
-                        if (newVal) {\r
-                            win.bind(event, callbackFunc);\r
-                        } else {\r
-                            win.unbind(event, callbackFunc);\r
-                        }\r
-                    }, timeoutValue);\r
-                }\r
-            });\r
-        } else {\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    if (newVal) {\r
-                        win.bind(event, callbackFunc);\r
-                    } else {\r
-                        win.unbind(event, callbackFunc);\r
-                    }\r
-                }\r
-            });\r
-        }\r
-    };\r
-\r
-    return {\r
-        click: _click,\r
-        scroll: _scroll,\r
-        event: _event, \r
-        resize: _resize\r
-    };\r
-}])\r
-\r
-.factory('keymap', function () {\r
-    return {\r
-        KEY: {\r
-            TAB: 9,\r
-            ENTER: 13,\r
-            ESC: 27,\r
-            SPACE: 32,\r
-            LEFT: 37,\r
-            UP: 38,\r
-            RIGHT: 39,\r
-            DOWN: 40,\r
-            SHIFT: 16,\r
-            CTRL: 17,\r
-            ALT: 18,\r
-            PAGE_UP: 33,\r
-            PAGE_DOWN: 34,\r
-            HOME: 36,\r
-            END: 35,\r
-            BACKSPACE: 8,\r
-            DELETE: 46,\r
-            COMMAND: 91\r
-        },\r
-        MAP: { 91 : "COMMAND", 8 : "BACKSPACE" , 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSEBREAK" , 20 : "CAPSLOCK" , 27 : "ESC" , 32 : "SPACE" , 33 : "PAGE_UP", 34 : "PAGE_DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT" , 38 : "UP" , 39 : "RIGHT" , 40 : "DOWN" , 43 : "+" , 44 : "PRINTSCREEN" , 45 : "INSERT" , 46 : "DELETE", 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 59 : ";", 61 : "=" , 65 : "A" , 66 : "B" , 67 : "C" , 68 : "D" , 69 : "E" , 70 : "F" , 71 : "G" , 72 : "H" , 73 : "I" , 74 : "J" , 75 : "K" , 76 : "L", 77 : "M" , 78 : "N" , 79 : "O" , 80 : "P" , 81 : "Q" , 82 : "R" , 83 : "S" , 84 : "T" , 85 : "U" , 86 : "V" , 87 : "W" , 88 : "X" , 89 : "Y" , 90 : "Z", 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9", 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/", 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12", 144 : "NUMLOCK" , 145 : "SCROLLLOCK" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'"\r
-        },\r
-        isControl: function (e) {\r
-            var k = e.keyCode;\r
-            switch (k) {\r
-            case this.KEY.COMMAND:\r
-            case this.KEY.SHIFT:\r
-            case this.KEY.CTRL:\r
-            case this.KEY.ALT:\r
-                return true;\r
-            default:;\r
-            }\r
-\r
-            if (e.metaKey) {\r
-                return true;\r
-            }\r
-\r
-            return false;\r
-        },\r
-        isFunctionKey: function (k) {\r
-            k = k.keyCode ? k.keyCode : k;\r
-            return k >= 112 && k <= 123;\r
-        },\r
-        isVerticalMovement: function (k) {\r
-            return ~[this.KEY.UP, this.KEY.DOWN].indexOf(k);\r
-        },\r
-        isHorizontalMovement: function (k) {\r
-            return ~[this.KEY.LEFT, this.KEY.RIGHT, this.KEY.BACKSPACE, this.KEY.DELETE].indexOf(k);\r
-        },\r
-        isAllowedKey: function (k) {\r
-            return (~[this.KEY.SPACE, this.KEY.ESC, this.KEY.ENTER].indexOf(k)) || this.isHorizontalMovement(k) || this.isVerticalMovement(k);\r
-        },\r
-        isNumericKey: function (e) {\r
-            var k = e.keyCode;\r
-            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105)) {\r
-                return true;\r
-            } else {\r
-                return false;\r
-            }\r
-        },\r
-        isAlphaNumericKey: function (e) {\r
-            var k = e.keyCode;\r
-            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105) || (k >= 65 && k <= 90)) {\r
-                return true;\r
-            } else {\r
-                return false;\r
-            }\r
-        }\r
-    };\r
-})\r
-\r
-.factory('$isElement', [function () {\r
-    var isElement = function (currentElem, targetElem, alternateElem) {\r
-        if (currentElem[0] === targetElem[0]) {\r
-            return true;\r
-        } else if (currentElem[0] === alternateElem[0]) {\r
-            return false;\r
-        } else {\r
-            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);\r
-        }\r
-    };\r
-\r
-    return isElement;\r
-}])\r
-\r
-.factory('events', function () {\r
-    var _stopPropagation = function (evt) {\r
-        if (evt.stopPropagation) {\r
-            evt.stopPropagation();\r
-        } else {\r
-            evt.returnValue = false;\r
-        }\r
-    };\r
-    var _preventDefault = function (evt) {\r
-        if (evt.preventDefault) {\r
-            evt.preventDefault();\r
-        } else {\r
-            evt.returnValue = false;\r
-        }\r
-    }\r
-    return {\r
-        stopPropagation: _stopPropagation,\r
-        preventDefault: _preventDefault\r
-    };\r
-})\r
-\r
-\r
-.factory('$documentBind', ['$document', '$timeout', function ($document, $timeout) {\r
-    var _click = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    $document.bind('click', callbackFunc);\r
-                } else {\r
-                    $document.unbind('click', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _scroll = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    $document.bind('scroll', callbackFunc);\r
-                } else {\r
-                    $document.unbind('scroll', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {\r
-        if (timeoutFlag) {\r
-            if (!(timeoutValue)) {\r
-                timeoutValue = 0;\r
-            }\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    $timeout(function () {\r
-                        if (newVal) {\r
-                            $document.bind(event, callbackFunc);\r
-                        } else {\r
-                            $document.unbind(event, callbackFunc);\r
-                        }\r
-                    }, timeoutValue);\r
-                }\r
-            });\r
-        } else {\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    if (newVal) {\r
-                        $document.bind(event, callbackFunc);\r
-                    } else {\r
-                        $document.unbind(event, callbackFunc);\r
-                    }\r
-                }\r
-            });\r
-        }\r
-    };\r
-\r
-    return {\r
-        click: _click,\r
-        scroll: _scroll,\r
-        event: _event\r
-    };\r
-}])\r
-\r
-.directive('b2bOnlyNums', function (keymap) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elm, attrs, ctrl) {\r
-            var maxChars = attrs.b2bOnlyNums ? attrs.b2bOnlyNums : 4;\r
-            elm.on('keydown', function (event) {\r
-                if ((event.which >= 48 && event.which <= 57) || (event.which >= 96 && event.which <= 105)) {\r
-                    // check for maximum characters allowed\r
-                    if (elm.val().length < maxChars){\r
-                        return true;\r
-                    } else {\r
-                        event.preventDefault();\r
-                        return false;\r
-                    }\r
-                } else if ([8, 9, 13, 27, 37, 38, 39, 40].indexOf(event.which) > -1) {\r
-                    // to allow backspace, tab, enter, escape, arrows\r
-                    return true;\r
-                } else if (event.altKey || event.ctrlKey) {\r
-                    // to allow alter, control, and shift keys\r
-                    return true;\r
-                } else {\r
-                    // to stop others\r
-                    event.preventDefault();\r
-                    return false;\r
-                }\r
-            });\r
-\r
-            var validateString = function (value) {\r
-                if (angular.isUndefined(value) || value === null || value === '') {\r
-                    return ctrl.$modelValue;\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$parsers.unshift(validateString);\r
-        }\r
-    }\r
-})\r
-\r
-.directive('b2bKeyupClick', [ function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr) {\r
-            var keyCode = [];\r
-            attr.$observe('b2bKeyupClick', function (value) {\r
-                if (value) {\r
-                    keyCode = value.split(',');\r
-                }\r
-            });\r
-            elem.bind('keydown keyup', function (ev) {\r
-                var keyCodeCondition = function () {\r
-                    var flag = false;\r
-                    if (!(ev.keyCode)) {\r
-                        if (ev.which) {\r
-                            ev.keyCode = ev.which;\r
-                        } else if (ev.charCode) {\r
-                            ev.keyCode = ev.charCode;\r
-                        }\r
-                    }\r
-                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {\r
-                        flag = true;\r
-                    }\r
-                    return flag;\r
-                };\r
-                if (ev.type === 'keydown' && keyCodeCondition()) {\r
-                    ev.preventDefault();\r
-                }\r
-                else if (ev.type === 'keyup' && keyCodeCondition()) {\r
-                    elem[0].click();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('b2bDOMHelper', function() {\r
-\r
-    var _isTabable = function(node) {\r
-        var element = angular.element(node);\r
-        var tagName = element[0].tagName.toUpperCase();\r
-\r
-        if (isHidden(element)) {\r
-            return false;\r
-        }\r
-        if (element.attr('tabindex') !== undefined) {\r
-            return (parseInt(element.attr('tabindex'), 10) >= 0);\r
-        }\r
-        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {\r
-            if (tagName === 'A' || tagName === 'AREA') {\r
-                // anchors/areas without href are not focusable\r
-                return (element[0].href !== '');\r
-            }\r
-            return !(element[0].disabled || element[0].readOnly);\r
-        }\r
-        return false;\r
-    };\r
-\r
-    function isValidChild(child) {\r
-        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';\r
-    }\r
-    \r
-    function isHidden(obj) {\r
-        var elem = angular.element(obj);\r
-        var elemStyle = undefined;\r
-        if(obj instanceof HTMLElement){\r
-            elemStyle = window.getComputedStyle(obj);\r
-        }\r
-        else {\r
-            elemStyle = window.getComputedStyle(obj[0]);\r
-        }\r
-        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || elemStyle.display === 'none' || elemStyle.visibility === 'hidden' || elem.css('visibility') === 'hidden';\r
-    }\r
-\r
-    function hasValidParent(obj) {\r
-        return (isValidChild(obj) && obj.parentElement.nodeName !== 'BODY');\r
-    }\r
-\r
-    function traverse(obj, fromTop) {\r
-        var obj = obj || document.getElementsByTagName('body')[0];\r
-        if (isValidChild(obj) && _isTabable(obj)) {\r
-            return obj;\r
-        }\r
-        // If object is hidden, skip it's children\r
-        if (isValidChild(obj) && isHidden(obj)) {\r
-            return undefined;\r
-        } \r
-        // If object is hidden, skip it's children\r
-        if (angular.element(obj).hasClass('ng-hide')) {\r
-            return undefined;\r
-        }  \r
-        if (obj.hasChildNodes()) {\r
-            var child;\r
-            if (fromTop) {\r
-                child = obj.firstChild;\r
-            } else {\r
-                child = obj.lastChild;\r
-            }\r
-            while(child) {\r
-                var res =  traverse(child, fromTop);\r
-                if(res){\r
-                    return res;\r
-                }\r
-                else{\r
-                    if (fromTop) {\r
-                        child = child.nextSibling;\r
-                    } else {\r
-                        child = child.previousSibling;\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        else{\r
-            return undefined;\r
-        }\r
-    }\r
-\r
-    var _previousElement = function(el, isFocusable){\r
-\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        var parent = elem.parentElement;\r
-        var previousElem = undefined;\r
-\r
-        if(isFocusable) {\r
-            if (hasValidParent(elem)) {\r
-                var siblings = angular.element(parent).children();\r
-                if (siblings.length > 0) {\r
-                    // Good practice to splice out the elem from siblings if there, saving some time.\r
-                    // We allow for a quick check for jumping to parent first before removing. \r
-                    if (siblings[0] === elem) {\r
-                        // If we are looking at immidiate parent and elem is first child, we need to go higher\r
-                        var e = _previousElement(angular.element(elem).parent(), isFocusable);\r
-                        if (_isTabable(e)) {\r
-                            return e;\r
-                        }\r
-                    } else {\r
-                        // I need to filter myself and any nodes next to me from the siblings\r
-                        var indexOfElem = Array.prototype.indexOf.call(siblings, elem);\r
-                        siblings = Array.prototype.filter.call(siblings, function(item, itemIndex) {\r
-                            if (!angular.equals(elem, item) && itemIndex < indexOfElem) {\r
-                                return true;\r
-                            }\r
-                        });\r
-                    }\r
-                    // We need to search backwards\r
-                    for (var i = 0; i <= siblings.length-1; i++) {//for (var i = siblings.length-1; i >= 0; i--) {\r
-                        var ret = traverse(siblings[i], false);\r
-                        if (ret !== undefined) {\r
-                            return ret;\r
-                        }\r
-                    }\r
-\r
-                    var e = _previousElement(angular.element(elem).parent(), isFocusable);\r
-                    if (_isTabable(e)) {\r
-                        return e;\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            var siblings = angular.element(parent).children();\r
-            if (siblings.length > 1) {\r
-                // Since indexOf is on Array.prototype and parent.children is a NodeList, we have to use call()\r
-                var index = Array.prototype.indexOf.call(siblings, elem);\r
-                previousElem = siblings[index-1];\r
-            }\r
-        }\r
-        return previousElem;\r
-    };\r
-\r
-    var _lastTabableElement = function(el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, false);\r
-    };\r
-\r
-    var _firstTabableElement = function(el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, true);\r
-    };\r
-\r
-    var _isInDOM = function(obj) {\r
-      return document.documentElement.contains(obj);\r
-    }\r
-\r
-    return {\r
-        firstTabableElement: _firstTabableElement,\r
-        lastTabableElement: _lastTabableElement,\r
-        previousElement: _previousElement,\r
-        isInDOM: _isInDOM,\r
-        isTabable: _isTabable,\r
-        isHidden: isHidden\r
-    };\r
-})\r
-\r
-.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var trapFocusInElement = function (flag) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        var firstTabableElement = angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        var lastTabableElement = angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        var trapKeyboardFocusInFirstElement = function (e) {\r
-            if (!e.keyCode) {\r
-                e.keyCode = e.which;\r
-            }\r
-\r
-            if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-                lastTabableElement[0].focus();\r
-                e.preventDefault(e);\r
-                e.stopPropagation(e);\r
-            }\r
-\r
-        };\r
-\r
-        var trapKeyboardFocusInLastElement = function (e) {\r
-            if (!e.keyCode) {\r
-                e.keyCode = e.which;\r
-            }\r
-\r
-            if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-                firstTabableElement[0].focus();\r
-                e.preventDefault(e);\r
-                e.stopPropagation(e);\r
-            }\r
-        };\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element) {\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-.factory('DOMHelper', function () {\r
-\r
-    var _isTabable = function (node) {\r
-        var element = angular.element(node);\r
-        var tagName = element[0].tagName.toUpperCase();\r
-\r
-        if (isHidden(element)) {\r
-            return false;\r
-        }\r
-        if (element.attr('tabindex') !== undefined) {\r
-            return (parseInt(element.attr('tabindex'), 10) >= 0);\r
-        }\r
-        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {\r
-            if (tagName === 'A' || tagName === 'AREA') {\r
-                // anchors/areas without href are not focusable\r
-                return (element[0].href !== '');\r
-            }\r
-            return !(element[0].disabled || element[0].readOnly);\r
-        }\r
-        return false;\r
-    };\r
-\r
-    function isValidChild(child) {\r
-        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';\r
-    }\r
-\r
-    function isHidden(obj) {\r
-        var elem = angular.element(obj);\r
-        var style;\r
-        try {\r
-            style = window.getComputedStyle(obj);\r
-        }\r
-        catch(err) {\r
-            style = window.getComputedStyle(obj[0]);\r
-        }\r
-\r
-        // getComputedStyle() for Zepto object returns null\r
-        if (style === null){\r
-            return elem.hasClass('ng-hide') || elem.css('display') === 'none';\r
-        }\r
-\r
-        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || style.display === 'none' || style.display === 'hidden';\r
-    }\r
-\r
-    function traverse(obj, fromTop) {\r
-        var obj = obj || document.getElementsByTagName('body')[0];\r
-\r
-        if (isValidChild(obj) && _isTabable(obj)) {\r
-            return obj;\r
-        }\r
-\r
-        // If object is hidden, skip it's children\r
-        if (isValidChild(obj) && isHidden(obj)) {\r
-            return undefined;\r
-        }\r
-        // If object is hidden, skip it's children\r
-        if (angular.element(obj).hasClass('ng-hide')) {\r
-            return undefined;\r
-        }\r
-\r
-        if (obj.hasChildNodes()) {\r
-            var child;\r
-            if (fromTop) {\r
-                child = obj.firstChild;\r
-            } else {\r
-                child = obj.lastChild;\r
-            }\r
-            while (child) {\r
-                var res = traverse(child, fromTop);\r
-                if (res) {\r
-                    return res;\r
-                } else {\r
-                    if (fromTop) {\r
-                        child = child.nextSibling;\r
-                    } else {\r
-                        child = child.previousSibling;\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            return undefined;\r
-        }\r
-    }\r
-\r
-    var _lastTabableElement = function (el) {\r
-        /* This will return the last tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, false);\r
-    };\r
-\r
-    var _firstTabableElement = function (el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, true);\r
-    };\r
-\r
-    return {\r
-        firstTabableElement: _firstTabableElement,\r
-        lastTabableElement: _lastTabableElement,\r
-        isTabable: _isTabable\r
-    };\r
-})\r
-\r
-.factory('windowOrientation', ['$window', function ($window) {\r
-    var _isPotrait = function () {\r
-        if ($window.innerHeight > $window.innerWidth) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    };\r
-    var _isLandscape = function () {\r
-        if ($window.innerHeight < $window.innerWidth) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    };\r
-\r
-    return {\r
-        isPotrait: _isPotrait,\r
-        isLandscape: _isLandscape\r
-    };\r
-}])\r
-\r
-.directive('b2bNextElement', function() {\r
-  return {\r
-    restrict: 'A',\r
-    transclude: false,\r
-    link: function (scope, elem, attr, ctrls) {\r
-\r
-        var keys = attr.b2bNextElement.split(',');\r
-\r
-        elem.bind('keydown', function (e) {\r
-            var nextElement = elem.next();\r
-            if(e.keyCode == 39 || e.keyCode == 40){ // if e.keyCode in keys\r
-                if(nextElement.length) {\r
-                    e.preventDefault();\r
-                    nextElement[0].focus();\r
-                }\r
-            }\r
-        });\r
-    }\r
-  }\r
-})\r
-\r
-.directive('b2bAccessibilityClick', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var keyCode = [];\r
-            attr.$observe('b2bAccessibilityClick', function (value) {\r
-                if (value) {\r
-                    keyCode = value.split(',');\r
-                }\r
-            });\r
-            elem.bind('keydown keypress', function (ev) {\r
-                var keyCodeCondition = function () {\r
-                    var flag = false;\r
-                    if (!(ev.keyCode)) {\r
-                        if (ev.which) {\r
-                            ev.keyCode = ev.which; \r
-                        } else if (ev.charCode) {\r
-                            ev.keyCode = ev.charCode;\r
-                        }\r
-                    }\r
-                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {\r
-                        flag = true;\r
-                    }\r
-                    return flag;\r
-                };\r
-                if (keyCode.length > 0 && keyCodeCondition()) {\r
-                    elem[0].click();\r
-                    ev.preventDefault();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bReset', ['$compile', function ($compile) {\r
-        return {\r
-            restrict: 'A',\r
-            require: ['?ngModel', 'b2bReset'],\r
-            controller: ['$scope', function ($scope) {\r
-                var resetButton = angular.element('<button type="button" class="reset-field" tabindex="-1" aria-label="Click to reset" aria-hidden="true" role="button"></button>');\r
-\r
-                this.getResetButton = function () {\r
-                    return resetButton;\r
-                };\r
-            }],\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var ctrl = ctrls[1];\r
-\r
-                var resetButton = ctrl.getResetButton();\r
-\r
-\r
-                resetButton.on('click', function () {\r
-                    element[0].value = '';\r
-\r
-                    if (ngModelCtrl) {\r
-                        if (attrs.b2bReset) {\r
-                            ngModelCtrl.$setViewValue(attrs.b2bReset);\r
-                        } else {\r
-                            ngModelCtrl.$setViewValue('');\r
-                        }\r
-                        element[0].value = ngModelCtrl.$viewValue;\r
-                        ngModelCtrl.$render();\r
-                        scope.$digest();\r
-                    }\r
-                    element[0].focus();\r
-                    element[0].select();\r
-                });\r
-\r
-                var addResetButton = function () {\r
-                    element.after(resetButton);\r
-                    element.unbind('focus input', addResetButton);\r
-                };\r
-\r
-                element.bind('focus input', addResetButton);\r
-            }\r
-        };\r
-    }])\r
-\r
-.directive('b2bPrevElement', ['b2bDOMHelper', 'keymap', function (b2bDOMHelper, keymap) {\r
-  return {\r
-    restrict: 'A',\r
-    transclude: false,\r
-    link: function (scope, elem, attr) {\r
-\r
-        elem.bind('keydown', function (e) {\r
-            if(e.keyCode == 37 || e.keyCode == 38){\r
-                var prev = b2bDOMHelper.previousElement(elem, false);\r
-                if(prev !== undefined) {\r
-                    e.preventDefault();\r
-                    prev.focus();\r
-                }\r
-            }\r
-        });\r
-    }\r
-  }\r
-}])\r
-/**\r
- * @param {integer} delay - Timeout before first and last focusable elements are found\r
- * @param {boolean} trigger - A variable on scope that will trigger refinding first/last focusable elements \r
- */\r
-.directive('b2bTrapFocusInsideElement', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {\r
-    return {\r
-        restrict: 'A',\r
-        transclude: false,\r
-        link: function (scope, elem, attr) {\r
-\r
-            var delay = parseInt(attr.delay, 10) || 10;\r
-\r
-            /* Before opening modal, find the focused element */\r
-            var firstTabableElement = undefined,\r
-                lastTabableElement = undefined;\r
-                \r
-            function init() {\r
-                $timeout(function () {\r
-                    firstTabableElement = b2bDOMHelper.firstTabableElement(elem);\r
-                    lastTabableElement = b2bDOMHelper.lastTabableElement(elem);\r
-                    angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                    angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                }, delay, false);\r
-            }\r
-\r
-            if (attr.trigger !== undefined) {\r
-                scope.$watch('trigger', function() {\r
-                    if (scope.trigger) {\r
-                        init();\r
-                    }\r
-                });\r
-            }\r
-\r
-            var firstTabableElementKeyhandler = function(e) {\r
-                if (!e.keyCode) {\r
-                    e.keyCode = e.which;\r
-                }\r
-                if (e.keyCode === keymap.KEY.TAB && e.shiftKey) {\r
-                    if (attr.trapFocusInsideElement === 'true') {\r
-                        var temp = b2bDOMHelper.lastTabableElement(elem);\r
-                        if (lastTabableElement !== temp) {\r
-                            // Unbind keydown handler on lastTabableElement\r
-                            angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);\r
-                            lastTabableElement = temp;\r
-                            angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                        }\r
-                    }\r
-                    lastTabableElement.focus();\r
-                    events.preventDefault(e);\r
-                    events.stopPropagation(e);\r
-                }\r
-            };\r
-\r
-            var lastTabableElementKeyhandler = function(e) {\r
-                if (!e.keyCode) {\r
-                    e.keyCode = e.which;\r
-                }\r
-                if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {\r
-                    if (attr.trapFocusInsideElement === 'true') {\r
-                        var temp = b2bDOMHelper.firstTabableElement(elem);\r
-                        if (firstTabableElement !== temp) {\r
-                            // Unbind keydown handler on firstTabableElement\r
-                            angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);\r
-                            firstTabableElement = temp;\r
-                            angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        }\r
-                    }\r
-                    firstTabableElement.focus();\r
-                    events.preventDefault(e);\r
-                    events.stopPropagation(e);\r
-                }\r
-            };\r
-\r
-            init();\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', '$interval', function ($document, $isElement, DOMHelper, keymap, $interval) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var stopInterval = undefined;\r
-    var intervalRequired = false;\r
-    var interval = 1000;\r
-    var firstTabableElement, lastTabableElement;\r
-\r
-    var trapKeyboardFocusInFirstElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-            lastTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-\r
-    };\r
-\r
-    var trapKeyboardFocusInLastElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-            firstTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-    };\r
-\r
-    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-\r
-        if (intervalRequired && flag) {\r
-            stopInterval = $interval(function () {\r
-                var firstTabableElementTemp = angular.element(DOMHelper.firstTabableElement(stackHead));\r
-                var lastTabableElementTemp = angular.element(DOMHelper.lastTabableElement(stackHead));\r
-                if (firstTabableElementTemp[0] !== firstTabableElement[0] || lastTabableElementTemp[0] !== lastTabableElement[0]) {\r
-                    $interval.cancel(stopInterval);\r
-                    stopInterval = undefined;\r
-                    trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                    trapFocusInElement(true, firstTabableElementTemp, lastTabableElementTemp);\r
-                }\r
-            }, interval);\r
-        } else {\r
-            if (stopInterval) {\r
-                $interval.cancel(stopInterval);\r
-                stopInterval = undefined;\r
-            }\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element, intervalRequiredParam, intervalParam) {\r
-        intervalRequired = intervalRequiredParam ? intervalRequiredParam : intervalRequired;\r
-        interval = intervalParam ? intervalParam : interval;\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (flag && angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (angular.isDefined(stackHead) && (stackHead[0] === element[0])) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            if (angular.isDefined(stackHead)) {\r
-                trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                trapFocusInElement(true);\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-.directive('b2bSetNextFocusOn', ['b2bDOMHelper', '$timeout', function(b2bDOMHelper, $timeout) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr) {\r
-            elem.bind('click', function(){\r
-                var firstFocusableElement = undefined; \r
-                var containerElem = undefined; \r
-                var containerArray = [];\r
-                var timeout = parseInt(attr.setNextFocusTimeout, 0) | 100;\r
-                var index = parseInt(attr.b2bSetNextFocusIndex, 0) | 0;\r
-\r
-                 /*\r
-                  *Fix for IE7 and lower \r
-                  *polyfill src: https://github.com/HubSpot/pace/issues/102\r
-                  */\r
-                if (!document.querySelectorAll) {\r
-                    document.querySelectorAll = function (selectors) {\r
-                        var style = document.createElement('style'), elements = [], element;\r
-                        document.documentElement.firstChild.appendChild(style);\r
-                        document._qsa = [];\r
-\r
-                        style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';\r
-                        window.scrollBy(0, 0);\r
-                        style.parentNode.removeChild(style);\r
-\r
-                        while (document._qsa.length) {\r
-                            element = document._qsa.shift();\r
-                            element.style.removeAttribute('x-qsa');\r
-                            elements.push(element);\r
-                        }\r
-                        document._qsa = null;\r
-                        return elements;\r
-                    };\r
-                }\r
-\r
-                if (attr.b2bSetNextFocusOn === '') {\r
-                    return;\r
-                } else {\r
-                    containerArray = attr.b2bSetNextFocusOn.split(' ');\r
-                }\r
-                $timeout(function(){\r
-                    var i = 0;\r
-                    do { // cycles thru containerArray until finds a match in DOM to set focus to\r
-                        containerElem = document.querySelectorAll(containerArray[i])[index]; \r
-                        i++;\r
-                    } while ( (!containerElem) && (i < containerArray.length) );\r
-                    if(containerElem){\r
-                        if (!angular.isDefined(firstFocusableElement)) { \r
-                            firstFocusableElement = b2bDOMHelper.firstTabableElement(containerElem); \r
-                        }\r
-                        firstFocusableElement.focus(); \r
-                    }\r
-                }, timeout, false)\r
-            });\r
-        }\r
-\r
-    };\r
-}])\r
-\r
-.directive('b2bInputAllow', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var regexExpression = null;\r
-            attr.$observe('b2bInputAllow', function (value) {\r
-                if (value) {\r
-                    regexExpression = new RegExp(value);\r
-                }\r
-            });\r
-            var isValid = function(str) {\r
-                if (regexExpression !== null) {\r
-                    return regexExpression.test(str);\r
-                }\r
-                return false;\r
-            };\r
-            elem.bind('keypress', function($event) {\r
-                var charcode = String.fromCharCode($event.which || $event.keyCode);\r
-                if (!isValid(charcode)) {\r
-                    $event.preventDefault();\r
-                    $event.stopPropagation();\r
-                }\r
-            });\r
-            elem.bind('input', function (evt) {\r
-                var inputString = ctrl.$viewValue;\r
-                if (isValid(inputString)) {\r
-                    ctrl.$setViewValue(inputString);\r
-                    ctrl.$render();\r
-                    scope.$apply();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bInputDeny', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var regexExpression = null;\r
-            attr.$observe('b2bInputDeny', function (value) {\r
-                if (value) {\r
-                    regexExpression = new RegExp(value, 'g');\r
-                }\r
-            });\r
-            elem.bind('input', function () {\r
-                var inputString = ctrl.$viewValue && ctrl.$viewValue.replace(regexExpression, '');\r
-                if (inputString !== ctrl.$viewValue) {\r
-                    ctrl.$setViewValue(inputString);\r
-                    ctrl.$render();\r
-                    scope.$apply();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDragonInput', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            elem.on('focus keyup', function(){\r
-                elem.triggerHandler('change');\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKey', ['b2bUtilitiesConfig', '$timeout', 'keymap', function (b2bUtilitiesConfig, $timeout, keymap) {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function ($scope, $element,attr) {\r
-            this.childElements = [];\r
-            this.disableNodes = {};\r
-            this.enableSearch = attr.enableSearch !== undefined ? true : b2bUtilitiesConfig.enableSearch;\r
-            this.circularTraversal = attr.circularTraversal !== undefined ? true : b2bUtilitiesConfig.circularTraversal;\r
-            this.counter = -1;\r
-            if (this.enableSearch) {\r
-                this.searchKeys = [];\r
-            }\r
-            var searchString = '';\r
-\r
-            var selfCtrl = this;\r
-\r
-            this.childElementsList = [];\r
-\r
-            this.b2bKeyID = "";\r
-\r
-            if (angular.isDefined(attr.b2bKey)) {\r
-                this.b2bKeyID = attr.b2bKey;\r
-            }\r
-\r
-            this.calculateChildElementsList = function () {\r
-                return $element[0].querySelectorAll("[b2b-key-item='" + this.b2bKeyID + "']:not([disabled])");\r
-            };\r
-\r
-            this.resetChildElementsList = function () {\r
-                return $timeout(function () {\r
-                    selfCtrl.childElementsList = selfCtrl.calculateChildElementsList();\r
-                });\r
-            };\r
-\r
-            this.resetChildElementsList();\r
-\r
-            $scope.$on('b2b-key-reset-child-elements-list', function () {\r
-                selfCtrl.resetChildElementsList();\r
-            });\r
-\r
-\r
-            this.registerElement = function (childElement, searchKey) {\r
-                this.childElements.push(childElement);\r
-                if (this.enableSearch) {\r
-                    this.searchKeys.push(searchKey);\r
-                }\r
-                var count = this.childElements.length - 1;\r
-                this.maxLength = count + 1;\r
-                return count;\r
-            };\r
-            this.toggleDisable = function (count, state) {\r
-                this.disableNodes[count] = state;\r
-            };\r
-            this.searchElement = function (searchExp) {\r
-                var regex = new RegExp("\\b" + searchExp, "gi");\r
-                var position = this.searchKeys.regexIndexOf(regex, this.counter + 1, true);\r
-                if (position > -1) {\r
-                    this.counter = position;\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.startTimer = function (time) {\r
-                if (searchString === '') {\r
-                    $timeout(function () {\r
-                        searchString = '';\r
-                    }, time);\r
-                }\r
-            };\r
-            this.resetCounter = function (count) {\r
-                this.counter = count;\r
-            };\r
-            this.moveNext = function (count) {\r
-                this.counter = (this.counter + count) < this.maxLength ? this.counter + count : (this.circularTraversal ? 0 : this.counter);\r
-                if (this.disableNodes[this.counter]) {\r
-                    if ((this.counter + count) < this.maxLength) {\r
-                        this.moveNext(count);\r
-                    }\r
-                } else {\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.movePrev = function (count) {\r
-                this.counter = (this.counter - count) > -1 ? this.counter - count : (this.circularTraversal ? this.maxLength-1 : this.counter);\r
-                if (this.disableNodes[this.counter]) {\r
-                    if ((this.counter - count) > -1) {\r
-                        this.movePrev(count);\r
-                    }\r
-                } else {\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.moveFocus = function (index) {\r
-                this.childElements[index][0].focus();\r
-            };\r
-\r
-            this.keyDownHandler = function (ev, count) {\r
-                if (angular.isDefined(count) && !isNaN(count) && count !== this.counter) {\r
-                    this.resetCounter(count);\r
-                }\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (this.prev && this.prev.indexOf(ev.keyCode.toString()) > -1) {\r
-                        this.movePrev(1);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (this.next && this.next.indexOf(ev.keyCode.toString()) > -1) {\r
-                        this.moveNext(1);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (this.up && this.up.indexOf(ev.keyCode.toString()) > -1) {\r
-                        if (this.type === 'table') {\r
-                            this.movePrev(this.columns);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    } else if (this.down && this.down.indexOf(ev.keyCode.toString()) > -1) {\r
-                        if (this.type === 'table') {\r
-                            this.moveNext(this.columns);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    } else if (ev.keyCode === keymap.KEY.HOME) {\r
-                        var firstIndex = 0;\r
-                        while (this.disableNodes[firstIndex] !== false) {\r
-                            firstIndex++;\r
-                        };\r
-                        var count = this.counter - firstIndex;\r
-                        this.movePrev(count);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === keymap.KEY.END) {\r
-                        var lastIndex = this.childElements.length - 1;\r
-                        while (this.disableNodes[lastIndex] !== false) {\r
-                            lastIndex--;\r
-                        };\r
-                        var count = lastIndex - this.counter;\r
-                        this.moveNext(count);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {\r
-                        if (this.enableSearch) {\r
-                            this.startTimer(b2bUtilitiesConfig.searchTimer);\r
-                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');\r
-                            this.searchElement(searchString);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.prev = attr.prev ? attr.prev.split(',') : b2bUtilitiesConfig.prev.split(',');\r
-            ctrl.next = attr.next ? attr.next.split(',') : b2bUtilitiesConfig.next.split(',');\r
-            ctrl.type = attr.type ? attr.type : b2bUtilitiesConfig.type;\r
-            if (ctrl.type === 'table') {\r
-                ctrl.up = attr.up ? attr.up.split(',') : b2bUtilitiesConfig.up.split(',');\r
-                ctrl.down = attr.down ? attr.down.split(',') : b2bUtilitiesConfig.down.split(',');\r
-                ctrl.columns = attr.columns ? parseInt(attr.columns, 10) : b2bUtilitiesConfig.columns;\r
-            }\r
-\r
-            elem.bind('keydown', function (ev) {\r
-                ctrl.keyDownHandler(ev);\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKeyItem', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var parentCtrl = (elem.parent() && elem.parent().controller('b2bKey')) || undefined;\r
-            if (angular.isDefined(parentCtrl)) {\r
-                var count = parentCtrl.registerElement(elem, attr.searchKey);\r
-                elem.bind('keydown', function (ev) {\r
-                    parentCtrl.keyDownHandler(ev, count);\r
-                });\r
-                scope.$watch(attr.b2bKeyItem, function (value) {\r
-                    value = value === undefined ? true : value;\r
-                    parentCtrl.toggleDisable(count, !value); \r
-                });\r
-                scope.$on('$destroy', function () {\r
-                    parentCtrl.toggleDisable(count, true);\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bElementFocus', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.$watch(attr.b2bElementFocus, function (value) {\r
-                if (value === true) {\r
-                    elem[0].focus();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-.directive('b2bAppendElement', ['$compile', function ($compile) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var parameters = attr.b2bAppendElement.split(':');\r
-            if (parameters.length === 1) {\r
-                elem.append(scope.$eval(parameters[0]));\r
-            } else if (parameters.length === 2) {\r
-                if (parameters[1] === 'compile') {\r
-                    var element = angular.element('<span>' + scope.$eval(parameters[0]) + '</span>');\r
-                    elem.append($compile(element)(scope));\r
-                }\r
-            }\r
-\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKeyItemRefreshInNgRepeat', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^^b2bKey',\r
-        link: function (scope, elem, attr, parentCtrl) {\r
-            if (angular.isDefined(parentCtrl)) {\r
-\r
-                var attrToObserve = 'attrToObserve';\r
-\r
-                if (attr.b2bKeyItemRefreshInNgRepeat) {\r
-                    attrToObserve = 'b2bKeyItemRefreshInNgRepeat';\r
-                }\r
-\r
-                attr.$observe(attrToObserve, function (newVal, oldVal) {\r
-                    if (newVal && newVal !== oldVal) {\r
-                        parentCtrl.resetChildElementsList();\r
-                    }\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.filter('b2bMultiSepartorHighlight', function($sce) {\r
-        return function(text, searchText, searchSeperator) {\r
-            var splitText = function(string) {\r
-                if(angular.isDefined(searchSeperator)){\r
-                    if (string.indexOf(searchSeperator) > -1) {\r
-                        return string.split(searchSeperator);\r
-                    } else {\r
-                        return string\r
-                    }\r
-                }else{\r
-                    return string;\r
-                }\r
-            }\r
-            if (text) {\r
-                var newText = splitText(text);\r
-                var newPhrase = splitText(searchText);\r
-                if (angular.isArray(newPhrase)) {\r
-                    for (var i = 0; i < newText.length; i++) {\r
-                        if (i <= 0) {\r
-                            text = newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),\r
-                                '<span class="b2b-search-hightlight">$1</span>');\r
-                        } else {\r
-                            text = text + searchSeperator + ' ' + (newPhrase[i] ? newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),\r
-                                '<span class="b2b-search-hightlight">$1</span>') : newText[i]);\r
-                        }\r
-                    }\r
-                } else {\r
-                    text = text.replace(new RegExp('(' + searchText + ')', 'gi'),\r
-                        '<span class="b2b-search-hightlight">$1</span>');\r
-                }\r
-            }\r
-            return $sce.trustAsHtml(text)\r
-        }\r
-    })\r
-    \r
-    .factory('b2bUserAgent', [function() {\r
-        var _isMobile = function() {\r
-            return /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-        };\r
-        var _notMobile = function() {\r
-            return !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-        };\r
-        var _isIE = function() {\r
-            return /msie|trident/i.test(navigator.userAgent);\r
-        };\r
-        var _isFF = function() {\r
-            return /Firefox/.test(navigator.userAgent);\r
-        };\r
-        var _isChrome = function() {\r
-            return /Google Inc/.test(navigator.vendor);\r
-        };\r
-        var _isSafari = function() {\r
-            return /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);\r
-        };\r
-\r
-        return {\r
-            isMobile: _isMobile,\r
-            notMobile: _notMobile,\r
-            isIE: _isIE,\r
-            isFF: _isFF,\r
-            isChrome: _isChrome,\r
-            isSafari: _isSafari\r
-        };\r
-    }])\r
-    .run(['$document', 'b2bUserAgent', function($document, b2bUserAgent) {\r
-        var html = $document.find('html').eq(0);\r
-        if (b2bUserAgent.isIE()) {\r
-            html.addClass('isIE');\r
-        } else {\r
-            html.removeClass('isIE');\r
-        }\r
-    }]);\r
-    \r
-\r
-(function () {\r
-    String.prototype.toSnakeCase = function () {\r
-        return this.replace(/([A-Z])/g, function ($1) {\r
-            return "-" + $1.toLowerCase();\r
-        });\r
-    };\r
-    var concat = function (character, times) {\r
-        character = character || '';\r
-        times = (!isNaN(times) && times) || 0;\r
-        var finalChar = '';\r
-        for (var i = 0; i < times; i++) {\r
-            finalChar += character;\r
-        }\r
-        return finalChar;\r
-    };\r
-\r
-    // direction: true for left and false for right\r
-    var pad = function (actualString, width, character, direction) {\r
-        actualString = actualString || '';\r
-        width = (!isNaN(width) && width) || 0;\r
-        character = character || '';\r
-        if (width > actualString.length) {\r
-            if (direction) {\r
-                return concat(character, (width - actualString.length)) + actualString;\r
-            } else {\r
-                return actualString + concat(character, (width - actualString.length));\r
-            }\r
-        }\r
-        return actualString;\r
-    };\r
-\r
-    String.prototype.lPad = function (width, character) {\r
-        return pad(this, width, character, true);\r
-    };\r
-\r
-    String.prototype.rPad = function (width, character) {\r
-        return pad(this, width, character, false);\r
-    };\r
-\r
-    if (!Array.prototype.indexOf) {\r
-        Array.prototype.indexOf = function (val) {\r
-            for (var index = 0; index < this.length; index++) {\r
-                if (this[index] === val) {\r
-                    return index;\r
-                }\r
-            }\r
-            return -1;\r
-        };\r
-    }\r
-\r
-    if (!Array.prototype.regexIndexOf) {\r
-        Object.defineProperty(Array.prototype, 'regexIndexOf', {\r
-            enumerable: false,\r
-            value: function (regex, startIndex, loop) {\r
-                startIndex = startIndex && startIndex > -1 ? startIndex : 0;\r
-                for (var index = startIndex; index < this.length; index++) {\r
-                    if (this[index].toString().match(regex)) {\r
-                        return index;\r
-                    }\r
-                }\r
-                if (loop) {\r
-                    for (var index = 0; index < startIndex; index++) {\r
-                        if (this[index].toString().match(regex)) {\r
-                            return index;\r
-                        }\r
-                    }\r
-                }\r
-                return -1;\r
-            }\r
-        })\r
-    }\r
-})();\r
-angular.module("b2bTemplate/audioPlayer/audioPlayer.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/audioPlayer/audioPlayer.html",\r
-    "<div class=\"b2b-audio\">\n" +\r
-    "   <audio preload=\"auto\">\n" +\r
-    "       <source ng-src=\"{{audio.mp3 | trustedAudioUrl}}\" type=\"audio/mp3\"></source>\n" +\r
-    "       <i>Your browser does not support the audio element.</i>\n" +\r
-    "    </audio>\n" +\r
-    "\n" +\r
-    "    <div audio-play-pause-icon class=\"controls-wrapper\" ng-click=\"toggleAudio()\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"{{isPlayInProgress?'pause':'play'}}\">\n" +\r
-    "       <i class=\"icoControls-pointer\" ng-show='!isPlayInProgress'></i>\n" +\r
-    "       <i class=\"icoControls-pause\" ng-show='isPlayInProgress'></i>\n" +\r
-    "    </div>\n" +\r
-    "\n" +\r
-    "    <div class=\"seek-bar-container-wrapper\">\n" +\r
-    "       <b2b-seek-bar min=\"0\" max=\"{{audio.duration}}\" step=\"1\" skip-interval=\"{{audio.timeShiftInSeconds}}\" no-aria-label ng-model=\"audio.currentTime\" on-drag-init=\"isAudioDragging=true\" on-drag-end=\"setAudioPosition(audio.currentTime)\"></b2b-seek-bar>\n" +\r
-    "       <div class=\"timing-container\">\n" +\r
-    "           <span class=\"timing-container-left\">{{timeFormatter(audio.currentTime)}}</span>\n" +\r
-    "           <span class=\"timing-container-right\">{{timeFormatter(audio.duration)}}</span>\n" +\r
-    "           <div class=\"timing-container-spacer\"></div>\n" +\r
-    "       </div>\n" +\r
-    "    </div>\n" +\r
-    "       \n" +\r
-    "    <b2b-flyout>\n" +\r
-    "       <div tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"Volume pop-over. Volume set at {{audio.currentVolume}}%\" class=\"controls-wrapper audio-volume-control\" b2b-flyout-toggler>\n" +\r
-    "           <i class=\"icoControls-mutespeakers\" ng-show=\"audio.currentVolume === 0\"></i>\n" +\r
-    "           <i class=\"icoControls-volumedown\" ng-show=\"audio.currentVolume > 0 && audio.currentVolume <= 50\"></i>\n" +\r
-    "           <i class=\"icoControls-volumeup\" ng-show=\"audio.currentVolume > 50\"></i>\n" +\r
-    "       </div> \n" +\r
-    "       \n" +\r
-    "       <b2b-flyout-content horizontal-placement=\"center\" flyout-style=\"width:70px; height:190px;\" vertical-placement=\"above\">\n" +\r
-    "           <div class=\"b2b-audio-popover text-center\">\n" +\r
-    "               <span>Max</span>\n" +\r
-    "               <b2b-seek-bar min=\"0\" max=\"100\" step=\"1\" skip-interval=\"10\" vertical data-ng-model=\"audio.currentVolume\" class='volume-popover'></b2b-seek-bar>\n" +\r
-    "               <div class=\"min-label\">Min</div>\n" +\r
-    "           </div>\n" +\r
-    "       </b2b-flyout-content>\n" +\r
-    "   </b2b-flyout>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/audioRecorder/audioRecorder.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/audioRecorder/audioRecorder.html",\r
-    "<div class=\"b2b-audio-recorder row\">\n" +\r
-    "   <div class=\"b2b-elapsed-time span11\">\n" +\r
-    "       <div ng-if=\"isRecording\">\n" +\r
-    "           <span style=\"padding-right: 25px;\">{{config.whileRecordingMessage}}</span>\n" +\r
-    "           <span>{{timeFormatter(elapsedTime)}}</span>\n" +\r
-    "       </div>\n" +\r
-    "       <span ng-if=\"!isRecording\">{{config.startRecordingMessage}}</span>\n" +\r
-    "   </div>      \n" +\r
-    "   <div class=\"b2b-controls\" title=\"{{isRecording ? 'Stop' : 'REC'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"toggleRecording()\" role=\"button\">\n" +\r
-    "           <i ng-if=\"isRecording\" class=\"icoControls-stop\" ></i>\n" +\r
-    "           <i ng-if=\"!isRecording\" class=\"icoControls-record\"></i>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/backToTop/backToTop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/backToTop/backToTop.html",\r
-    "<button class=\"btn-arrow b2b-backtotop-button\" type=\"button\" aria-label=\"Back to top\">\n" +\r
-    "    <div class=\"btn-secondary b2b-top-btn\">\n" +\r
-    "        <i class=\"icoControls-upPRIMARY\" role=\"img\"></i>\n" +\r
-    "    </div>\n" +\r
-    "</button>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bAddBoard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bAddBoard.html",\r
-    "<div tabindex=\"0\" role=\"menuitem\" b2b-accessibility-click=\"13,32\" ng-click=\"addBoard()\" aria-label=\"Add Board\" class=\"boardstrip-item--add\">\n" +\r
-    "    <div class=\"centered\"><i aria-hidden=\"true\" class=\"icoControls-add-maximize\"></i> Add board</div>\n" +\r
-    "</div> ");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bBoard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bBoard.html",\r
-    "<li b2b-board-navigation tabindex=\"-1\" role=\"menuitem\" aria-label=\"{{boardLabel}} {{getCurrentIndex()===boardIndex?'selected':''}}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectBoard(boardIndex)\" class=\"board-item\" ng-class=\"{'selected': getCurrentIndex()===boardIndex}\">\n" +\r
-    "    <div ng-transclude></div>\n" +\r
-    "    <div class=\"board-caret\" ng-if=\"getCurrentIndex()===boardIndex\">\n" +\r
-    "        <div class=\"board-caret-indicator\"></div>\n" +\r
-    "        <div class=\"board-caret-arrow-up\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bBoardstrip.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bBoardstrip.html",\r
-    "<div class=\"b2b-boardstrip\">\n" +\r
-    "   <div class=\"boardstrip-reel\" role=\"menu\">\n" +\r
-    "       <div class=\"prev-items\">\n" +\r
-    "           <!-- <i tabindex=\"{{isPrevBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isPrevBoard()}\" role=\"menuitem\" aria-label=\"See previous boards\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" class=\"arrow icoControls-left\"></i> -->\n" +\r
-    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" ng-disabled=\"!isPrevBoard()\">\n" +\r
-    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-left\"></i>\n" +\r
-    "               </div>\n" +\r
-    "               <span class=\"offscreen-text\">Previous boards</span>\n" +\r
-    "           </button>\n" +\r
-    "       </div>\n" +\r
-    "       <div b2b-add-board on-add-board=\"onAddBoard()\"></div>\n" +\r
-    "       <div class=\"board-viewport\"><ul role=\"menu\" class=\"boardstrip-container\" ng-transclude></ul></div>\n" +\r
-    "       <div class=\"next-items\">\n" +\r
-    "           <!-- <i tabindex=\"{{isNextBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isNextBoard()}\" role=\"menuitem\" aria-label=\"See next boards\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" class=\"arrow icoControls-right\"></i> -->\n" +\r
-    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" ng-disabled=\"!isNextBoard()\">\n" +\r
-    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-right\"></i>\n" +\r
-    "               </div>\n" +\r
-    "               <span class=\"offscreen-text\">Next boards</span>\n" +\r
-    "           </button>\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/calendar/datepicker-popup.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/calendar/datepicker-popup.html",\r
-    "<div id=\"datepicker\" class=\"datepicker dropdown-menu\" ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" style=\"display: block;\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\" b2b-key type=\"table\" columns=\"7\">\n" +\r
-    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +\r
-    "        <div ng-repeat=\"header in headers\" class=\"text-left\" style=\"width: 100%;\" b2b-append-element=\"header\"></div>\n" +\r
-    "        <table class=\"table-condensed\">\n" +\r
-    "            <thead>\n" +\r
-    "                <tr>\n" +\r
-    "                    <th id=\"prev\" class=\"prev\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Month\" role=\"button\" b2b-element-focus=\"!disablePrev && getFocus\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\" aria-hidden=\"true\"></i></th>\n" +\r
-    "                    <th id=\"month\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +\r
-    "                    <th id=\"next\" class=\"next\" tabindex=\"0\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && getFocus\" aria-label=\"Next Month\" role=\"button\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\" aria-hidden=\"true\"></i></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr ng-show=\"labels.length > 0\">\n" +\r
-    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </thead>\n" +\r
-    "            <tbody>\n" +\r
-    "                <tr ng-repeat=\"row in rows\">\n" +\r
-    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && disableNext && getFocus && (dt.selected || dt.firstFocus || dt.fromDate || dt.dateRange)\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || dt.fromDate || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'EEEE, MMMM d') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true; trapFocus();\" ng-blur=\"currFocus=false; trapFocus();\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +\r
-    "                        <div aria-hidden=\"true\" tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label}}</div>{{(dt.focusable && dt.date | date : 'EEEE, MMMM d yyyy') || ''}}{{(dt.focusable && dt.dueDate && '. Bill-due-date.. ') || ''}}{{(dt.focusable && dt.pastDue && legendMessage) || ''}}</td>\n" +\r
-    "                </tr>\n" +\r
-    "            </tbody>\n" +\r
-    "            <tfoot>\n" +\r
-    "                <tr ng-repeat=\"footer in footers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"footer\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </tfoot>\n" +\r
-    "        </table>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/calendar/datepicker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/calendar/datepicker.html",\r
-    "<div>\n" +\r
-    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/coachmark/coachmark.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/coachmark/coachmark.html",\r
-    "<div class=\"b2b-coachmark-container\" tabindex=\"-1\" role=\"dialog\" aria-label=\"{{currentCoachmark.contentHeader}} {{currentCoachmark.content}} {{currentCoachmark.offscreenText}}\" ng-style=\"{'top':coackmarkElPos.top,'left':coackmarkElPos.left}\" aria-describeby=\"{{currentCoachmark}}\">\n" +\r
-    "   <i class=\"b2b-coachmark-caret\"></i>\n" +\r
-    "   <div class=\"b2b-coachmark-header\">\n" +\r
-    "       <div class=\"b2b-coachmark-countlabel\"><span ng-if=\"coachmarkIndex !== 0\">{{coachmarkIndex}} of {{(coachmarks.length-1)}}<span></div>\n" +\r
-    "       <div class=\"corner-button\">\n" +\r
-    "           <button type=\"button\" ng-focus=\"closeButtonFocus()\" class=\"close\" title=\"close\" aria-label=\"Close\" ng-click=\"closeCoachmark()\"></button>\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "   <div class=\"b2b-coachmark-content\">   \n" +\r
-    "       <i class=\"icon-misc-dimmer\"></i>\n" +\r
-    "       <div class=\"b2b-coachmark-content-header\"><span class=\"offscreen-text\">{{currentCoachmark.offscreenText}}</span>{{currentCoachmark.contentHeader}}</div>\n" +\r
-    "       <div class=\"b2b-coachmark-description\">{{currentCoachmark.content}}</div>\n" +\r
-    "       <div class=\"b2b-coachmark-btn-group\">\n" +\r
-    "           <a class=\"b2b-coachmark-link\" href=\"javascript:void(0)\" ng-if=\"currentCoachmark.linkLabel !== '' && currentCoachmark.linkLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.linkLabel)\">{{currentCoachmark.linkLabel}}</a>\n" +\r
-    "           <button class=\"btn btn-alt\" ng-if=\"currentCoachmark.buttonLabel !== '' && currentCoachmark.buttonLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.buttonLabel)\">{{currentCoachmark.buttonLabel}}</button>\n" +\r
-    "       </div>  \n" +\r
-    "   </div>  \n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownDesktop.html",\r
-    "<span b2b-key prev=\"38\" next=\"40\" enable-search ng-class=\"{'large': (dropdownSize === 'large'), 'disabled': (disabled), 'selectWrap': (isInputDropdown), 'selectorModule': (dropdownType === 'menu'), 'linkSelectorModule': (dropdownType === 'link-menu')}\">\n" +\r
-    "    <input b2b-dropdown-toggle b2b-dropdown-validation ng-disabled=\"disabled\" type=\"text\" id=\"{{dropdownId}}\" name=\"{{dropdownName}}\" class=\"awd-select isWrapped\" ng-required=\"dropdownRequired\" ng-model=\"currentSelected.text\" role=\"combobox\" aria-owns=\"listbox{{$id}}\" aria-expanded=\"{{toggleFlag}}\" ng-click=\"toggleDropdown()\" ng-focus=\"focused=true\" ng-blur=\"setBlur(); focused=false\" ng-class=\"{'active': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large'), 'focused':focused}\" style=\"width:100%;\" value=\"{{currentSelected.text}}\" ng-show=\"isInputDropdown\" aria-describedby=\"{{dropdownDescribedBy}}\" readonly=\"readonly\">\n" +\r
-    "    <button type=\"button\" b2b-dropdown-toggle ng-disabled=\"disabled\" class=\"selectModule\" aria-label=\"{{labelText}} {{currentSelected.label}}\" aria-expanded=\"{{toggleFlag}}\" aria-haspopup=\"true\" ng-click=\"toggleDropdown()\" ng-blur=\"setBlur()\" ng-class=\"{'active opened': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large')}\" ng-bind-html=\"currentSelected.text\" ng-show=\"!isInputDropdown\"></button>\n" +\r
-    "    <div ng-class=\"{'selectWrapper': (isInputDropdown), 'moduleWrapper': (!isInputDropdown)}\">\n" +\r
-    "        <ul id=\"listbox{{$id}}\" role=\"{{isInputDropdown?'listbox':'menu'}}\" ng-class=\"{'awd-select-list': (isInputDropdown), 'awd-module-list': (!isInputDropdown)}\" tabindex=\"-1\" ng-show=\"toggleFlag\" aria-label=\"Choose options\"></ul>\n" +\r
-    "        <ul class=\"module-optinalcta\" ng-if=\"toggleFlag && optionalCta\" tabindex=\"-1\" aria-hidden=\"false\">\n" +\r
-    "            <li class=\"module-list-item\" tabindex=\"-1\" role=\"menuitem\" value=\"\" aria-label=\"Optinal CTA\" aria-selected=\"true\">\n" +\r
-    "                <span class=\"module-data\" b2b-append-element=\"optionalCta\"></span>\n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "</div>\n" +\r
-    "<i class=\"icon-primary-down\" aria-hidden=\"true\"></i>\n" +\r
-    "</span>    ");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html",\r
-    "<li b2b-dropdown-group-desktop class=\"optgroup-wrapper\">{{groupHeader}}\n" +\r
-    "    <ul class=\"optgroup\" role=\"group\" aria-label=\"{{groupHeader}}\"></ul>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownListDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownListDesktop.html",\r
-    "<li b2b-dropdown-list-desktop b2b-key-item b2b-accessibility-click=\"13\" aria-selected=\"{{currentSelected.value === dropdownListValue}}\" ng-class=\"{'awd-select-list-item': (isInputDropdown), 'module-list-item': (!isInputDropdown)}\" tabindex=\"0\" role=\"{{isInputDropdown?'option':'menuitem'}}\" ng-click=\"selectDropdownItem()\"></li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/fileUpload/fileUpload.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/fileUpload/fileUpload.html",\r
-    "<label class=\"b2b-file-container\">\n" +\r
-    "   <span class=\"b2b-upload-link\" ng-transclude></span>\n" +\r
-    "   <input type=\"file\" b2b-file-change>\n" +\r
-    "</label>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/flyout/flyout.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/flyout/flyout.html",\r
-    "<span class=\"b2b-flyout\"  b2b-flyout-trap-focus-inside>\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "</span>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/flyout/flyoutContent.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/flyout/flyoutContent.html",\r
-    "<div class=\"b2b-flyout-container\" aria-live=\"polite\" aria-atomic=\"false\" ng-class=\"{'b2b-flyout-left':horizontalPlacement==='left',\n" +\r
-    "                'b2b-flyout-center':horizontalPlacement==='center', \n" +\r
-    "                'b2b-flyout-right':horizontalPlacement==='right',\n" +\r
-    "                'b2b-flyout-centerLeft':horizontalPlacement==='centerLeft',\n" +\r
-    "                'b2b-flyout-centerRight':horizontalPlacement==='centerRight',  \n" +\r
-    "                'b2b-flyout-above':verticalPlacement==='above', \n" +\r
-    "                'b2b-flyout-below':verticalPlacement==='below',\n" +\r
-    "                'open-flyout': openFlyout,\n" +\r
-    "                'b2b-close-flyout': !openFlyout}\">\n" +\r
-    "    <i class=\"b2b-flyout-caret\" ng-class=\"{'open-flyout': openFlyout, \n" +\r
-    "                                   'b2b-flyout-caret-above':verticalPlacement==='above',\n" +\r
-    "                                   'b2b-flyout-caret-below':verticalPlacement==='below'}\"></i>\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/footer/footer_column_switch_tpl.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/footer/footer_column_switch_tpl.html",\r
-    "<div class=\"footer-columns \" ng-class=\"{'five-column':footerColumns===5, 'four-column':footerColumns===4, 'three-column':footerColumns===3}\" ng-repeat=\"item in footerLinkItems\">\n" +\r
-    "    <h3 class=\"b2b-footer-header\">{{item.categoryName}}</h3>\n" +\r
-    "    <ul>\n" +\r
-    "        <li ng-repeat=\"i in item.values\">\n" +\r
-    "            <a href=\"{{i.href}}\" title=\"{{item.categoryName}} - {{i.displayLink}}\">{{i.displayLink}}</a>  \n" +\r
-    "        </li>\n" +\r
-    "    </ul>\n" +\r
-    "\n" +\r
-    "</div>\n" +\r
-    "\n" +\r
-    "<div ng-transclude></div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/horizontalTable/horizontalTable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/horizontalTable/horizontalTable.html",\r
-    "<div class=\"b2b-horizontal-table\">\n" +\r
-    "    <div class=\"b2b-horizontal-table-arrows row span12\">\n" +\r
-    "       <div class=\"span4\">\n" +\r
-    "           <button class=\"btn-arrow left\" type=\"button\" ng-click=\"moveViewportLeft()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div>Previous Set</button>\n" +\r
-    "        </div>\n" +\r
-    "        \n" +\r
-    "        <span class=\"span5 b2b-horizontal-table-column-info\" aria-live=\"polite\" tabindex=\"-1\">\n" +\r
-    "           Displaying {{getColumnSet()[0]}} - {{getColumnSet()[1]}} of {{numOfCols}} (total) columns\n" +\r
-    "        </span>\n" +\r
-    "        \n" +\r
-    "        <div class=\"span3\">\n" +\r
-    "           <button class=\"btn-arrow right\" ng-click=\"moveViewportRight()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableRight\" type=\"button\">Next Set<div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +\r
-    "       </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-horizontal-table-inner-container\">\n" +\r
-    "        <span ng-transclude></span>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpicker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpicker.html",\r
-    "<div class=\"hp-container\">\n" +\r
-    "    <div class=\"hp-selected\">\n" +\r
-    "        <div b2b-hourpicker-value=\"$index\" days=\"value.days\" start-time=\"value.startTime\" start-meridiem=\"value.startMeridiem\" end-time=\"value.endTime\" end-meridiem=\"value.endMeridiem\" ng-repeat=\"value in finalHourpickerValues\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div b2b-hourpicker-panel></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpickerPanel.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerPanel.html",\r
-    "<form name=\"{{'hourpickerForm' + $id}}\">\n" +\r
-    "    <div class=\"hp-checkbox\" role=\"group\">\n" +\r
-    "        <label class=\"checkbox\" for=\"checkbox_{{dayOption.title}}_{{$id}}\" aria-label=\"{{dayOption.title}}\" ng-repeat=\"dayOption in hourpicker.dayOptions\">\n" +\r
-    "            <input type=\"checkbox\" id=\"checkbox_{{dayOption.title}}_{{$id}}\" name=\"{{'hourpickerDays' + $id}}\" ng-model=\"hourpickerPanelValue.days[$index].value\" ng-disabled=\"dayOption.disabled\" /><i class=\"skin\"></i><span>{{dayOption.label}}</span>\n" +\r
-    "        </label>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-dropdowns\">\n" +\r
-    "        <div class=\"span4\">\n" +\r
-    "            <label for=\"{{'hourpickerStartTime' + $id}}\">From</label>\n" +\r
-    "            <select id=\"{{'hourpickerStartTime' + $parent.$id}}\" b2b-dropdown type=\"\" ng-model=\"hourpickerPanelValue.startTime\">\n" +\r
-    "                <option b2b-dropdown-list value=\"\">From</option>\n" +\r
-    "                <option b2b-dropdown-list option-repeat=\"startTimeOption in hourpicker.startTimeOptions\" value=\"{{startTimeOption}}\">{{startTimeOption}}</option>\n" +\r
-    "            </select>\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_AM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_AM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +\r
-    "            </label>\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_PM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_PM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +\r
-    "            </label>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-dropdowns\">\n" +\r
-    "        <div class=\"span4\">\n" +\r
-    "            <label for=\"{{'hourpickerEndTime' + $id}}\">To</label>\n" +\r
-    "            <select id=\"{{'hourpickerEndTime' + $parent.$id}}\" b2b-dropdown ng-model=\"hourpickerPanelValue.endTime\">\n" +\r
-    "                <option b2b-dropdown-list value=\"\">To</option>\n" +\r
-    "                <option b2b-dropdown-list option-repeat=\"endTimeOption in hourpicker.endTimeOptions\" value=\"{{endTimeOption}}\">{{endTimeOption}}</option>\n" +\r
-    "            </select>\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_AM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_AM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +\r
-    "            </label>\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_PM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_PM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +\r
-    "            </label>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-buttons\">\n" +\r
-    "        <div class=\"span12\">\n" +\r
-    "            <div style=\"float:right\">\n" +\r
-    "                <button class=\"btn btn-secondary btn-small\" ng-click=\"resetHourpickerPanelValue()\">Clear</button>\n" +\r
-    "                <button class=\"btn btn-alt btn-small\" ng-disabled = \"disableAddBtn\" ng-click=\"updateHourpickerValue()\">{{hourpicker.editMode > -1 ? 'Update' : 'Add'}}</button>\n" +\r
-    "            </div>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "</form>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpickerValue.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerValue.html",\r
-    "<div class=\"selected-days\">\n" +\r
-    "    <span class=\"day\">{{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}</span>\n" +\r
-    "    <span style=\"float:right\">\n" +\r
-    "        <i class=\"icon-misc-pen\" role=\"button\" title=\"Edit {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"editHourpickerValue(hourpickerValue.index)\"></i>\n" +\r
-    "        <i class=\"icon-misc-trash\" role=\"button\" title=\"Delete {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"deleteHourpickerValue(hourpickerValue.index)\"></i>\n" +\r
-    "    </span>\n" +\r
-    "    <div style=\"clear:both\"></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/leftNavigation/leftNavigation.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/leftNavigation/leftNavigation.html",\r
-  "<div class=\"b2b-nav-menu\" ng-init=\"(showmenu = true)\" ng-class=\"{false: 'left-menu-collapsed'}[showmenu]\">\n" +\r
-    "    <div class=\"b2b-subnav-container\">\n" +\r
-    "        <ul class=\"b2b-subnav-content\">\n" +\r
-    "                   <li>" +\r
-    "                          <div ng-class=\"{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]\">"+        \r
-    "                                  <a ng-click=\"toggleDrawer(showmenu);(showmenu = !showmenu) \" class=\"text-right\">" +\r
-    "                                  <i ng-class=\"{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]\">&nbsp;</i></a>" +\r
-    "                          </div>"+                        \r
-    "                  </li>" +\r
-    "            <li ng-repeat=\"menu in menuData\" ui-sref=\"{{menu.state}}\">" +\r
-    "                          <span ng-class=\"{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]\"><span class=\"{{menu.imageSrc}}\"></span>&nbsp;&nbsp;</span>" +\r
-    "                          <a ng-class=\"{expand: isOpen($index)}\" ng-if=\"showmenu\"  aria-label=\"{{menu.name}}\" title=\" \" aria-expanded=\"{{(idx==$index)?true:false;}}\" href=\"javascript:void(0);\">" +\r
-    "                                  {{menu.name}}" +\r
-    "                                  <i aria-hidden=\"true\" ng-if=\"(menu.menuItems.length > 0)\" class=\"b2b-icon-primary-plus-minus\"ng-class=\"idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'\"></i>" +\r
-    "                          </a>\n" +\r
-    "                          <div role=\"region\" aria-hidden=\"{{(isOpen($index))?false:true;}}\">\n" +\r
-    "                  <ul ng-class=\"{expand: idx==$index}\">\n" +\r
-    "                            <li ng-repeat=\"menuItem in menu.menuItems\" ng-click=\"liveLink($event, $index, $parent.$index)\"><a aria-hidden=\"{{!(idx==$parent.$index)}}\" aria-label=\"{{menuItem.name}}\" title=\" \" href=\"{{menuItem.href}}\" tabindex=\"{{(idx==$parent.$index)?0:-1;}}\" ng-class=\"{active: itemIdx==$index && navIdx==$parent.$index}\">{{menuItem.name}}</a></li>\n" +\r
-    "                          </ul>\n" +\r
-    "                          </div>\n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/listbox/listbox.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/listbox/listbox.html",\r
-    "<div class=\"b2b-list-box\" tabindex=\"0\" role=\"listbox\" ng-transclude>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/modalsAndAlerts/b2b-backdrop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-backdrop.html",\r
-    "<div class=\"b2b-modal-backdrop fade in hidden-by-modal\" aria-hidden=\"true\" tabindex=\"-1\"></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/modalsAndAlerts/b2b-window.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-window.html",\r
-    "<div class=\"modalwrapper active {{windowClass}}\" ng-class=\"{'modal-landscape': isModalLandscape}\" role=\"{{isNotifDialog?'alertdialog':'dialog'}}\" tabindex=\"-1\" aria-labelledby=\"{{title}}\" aria-describedby=\"{{content}}\">\n" +\r
-    "    <div class=\"modal fade in {{sizeClass}}\" ng-transclude></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelector-popup.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelector-popup.html",\r
-    "<div id=\"monthselector{{$id}}\" class=\"datepicker dropdown-menu monthselector\" \n" +\r
-    "     ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" \n" +\r
-    "     ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" \n" +\r
-    "     style=\"display: block;\" aria-hidden=\"false\" role=\"dialog presentation\" tabindex=\"-1\">\n" +\r
-    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +\r
-    "        <span class=\"offscreen-text\" aria-live=\"polite\" aria-atomic=\"true\">{{title}} displaying</span>\n" +\r
-    "        <table class=\"table-condensed\" role=\"grid\">\n" +\r
-    "            <thead>\n" +\r
-    "                <tr ng-repeat=\"header in headers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"header\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr>\n" +\r
-    "                    <th id=\"prev{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Year\" ng-class=\"{'prev': !disablePrev}\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\"></i></th>\n" +\r
-    "                    <th id=\"year{{$id}}\" role=\"heading\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch b2b-monthSelector-label\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +\r
-    "                    <th id=\"next{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Next Year\" ng-class=\"{'next': !disableNext}\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\"></i></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr ng-show=\"labels.length > 0\">\n" +\r
-    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </thead>\n" +\r
-    "            <tbody b2b-key type=\"table\" columns=\"4\" >\n" +\r
-    "                <tr ng-repeat=\"row in rows\">\n" +\r
-    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13,32\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'MMMM, y') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true\" ng-blur=\"currFocus=false\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" b2b-element-focus=\"inline && dt.focusable && dt.selected && !dt.dateRange\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +\r
-    "                        <div aria-hidden=\"true\"  tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label | limitTo: 3}}</div>\n" +\r
-    "                    </td>\n" +\r
-    "                </tr>\n" +\r
-    "            </tbody>\n" +\r
-    "            <tfoot>\n" +\r
-    "                <tr ng-repeat=\"footer in footers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" b2b-append-element=\"footer\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </tfoot>\n" +\r
-    "        </table>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelector.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelector.html",\r
-    "<div>\n" +\r
-    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelectorLink.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelectorLink.html",\r
-    "<div>\n" +\r
-    "    <span class=\"span12\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/pagination/b2b-pagination.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/pagination/b2b-pagination.html",\r
-    "<div class=\"b2b-pager\">\n" +\r
-    "    <div ng-if=\"notMobile && totalPages > 1\">\n" +\r
-    "        <a tabindex=\"{{currentPage <= 1 ? -1 : 0 }}\" class=\"b2b-pager__item--prev\" b2b-accessibility-click=\"13,32\" title=\"Previous Page\" ng-click=\"prev($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage <= 1 ? 'b2b-pager__item--prev-disabled': '' \">\n" +\r
-    "            <i class=\"icon-primary-left\"></i>\n" +\r
-    "        </a>\n" +\r
-    "        <a tabindex=\"{{currentPage === 1 ? -1 : 0}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 1}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 1{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">\n" +\r
-    "            1<span class=\"offscreen-text\" ng-if=\"currentPage === 1\"> is selected</span>\n" +\r
-    "        </a>\n" +\r
-    "        <a tabindex=\"{{currentPage === 2 ? -1 : 0}}\" aria-selected=\"{{checkSelectedPage(page)}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 2}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 2{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(2, $event)\">2<span class=\"offscreen-text\" ng-if=\"currentPage === 2\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage > 6\">...</span>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"!checkSelectedPage(page) && selectPage(page, $event)\">{{page}}<span class=\"offscreen-text\" ng-if=\"currentPage === page\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\">...</span>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': checkSelectedPage(page)}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages-1}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages-1, $event)\">{{totalPages-1}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages-1\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{currentPage === totalPages ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': currentPage === totalPages}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{currentPage >= totalPages ? -1 : 0 }}\" href=\"javascript:void(0)\" class=\"b2b-pager__item--next\" b2b-accessibility-click=\"13,32\" title=\"Next Page\" ng-click=\"next($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage >= totalPages ? 'b2b-pager__item--next-disabled' :'' \">\n" +\r
-    "            <i class=\"icon-primary-right\"></i>\n" +\r
-    "        </a>\n" +\r
-    "        \n" +\r
-    "        <span class=\"fieldLabel\" ng-show=\"totalPages > 10 && showInput === true\">    \n" +\r
-    "            <label for=\"{{inputId}}\">Go to Page:</label>\n" +\r
-    "            <input id=\"{{inputId}}\" class=\"b2b-pager__item--input\" type=\"number\" ng-blur=\"onfocusOut($event)\" ng-focus=\"onfocusIn($event)\" ng-keypress=\"gotoKeyClick($event)\" b2b-only-nums=\"4\" ng-model=\"$parent.gotoPage\" />\n" +\r
-    "            <button class=\"btn-arrow\" ng-click=\"gotoBtnClick()\" ng-disabled=\"$parent.gotoPage !== 0 || $parent.gotoPage !== undefined\" aria-label=\"Go to\">\n" +\r
-    "                <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "                    <i class=\"icon-primary-right\"></i>\n" +\r
-    "                </div>\n" +\r
-    "            </button>\n" +\r
-    "        </span>\n" +\r
-    "    </div>\n" +\r
-    "    <div ng-if=\"isMobile && totalPages > 1\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\" ng-class=\"isMobile ? 'b2b-mobile-view': '' \">\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), fade1: ($index == 0 && currentPage > meanVal+1),  fade2: ($index == 1 && currentPage > meanVal+1), fadesl: ($index == pages.length-2 && currentPage < totalPages - meanVal),  fadel: ($last && currentPage < totalPages - meanVal), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/paneSelector/paneSelector.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/paneSelector/paneSelector.html",\r
-    "<div class=\"panes\" ng-transclude></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/paneSelector/paneSelectorPane.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/paneSelector/paneSelectorPane.html",\r
-    "<div class=\"pane-block\" ng-transclude></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/profileCard/profileCard-addUser.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/profileCard/profileCard-addUser.html",\r
-    "<div  class=\"span3 b2b-profile-card b2b-add-user\">\n" +\r
-    "    <div class=\"atcenter\">\n" +\r
-    "        <div class=\"circle\"><i class=\"icon-primary-add-maximize\"></i></div>\n" +\r
-    "        <div>Create new user</div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/profileCard/profileCard.html",\r
-    "<div class=\"span3 b2b-profile-card\">\n" +\r
-    "    <div class=\"top-block\">\n" +\r
-    "       <div class=\"profile-image\">\n" +\r
-    "            <img ng-if=\"image\" profile-name=\"{{profile.name}}\" ng-src=\"{{profile.img}}\" alt=\"{{profile.name}}\">\n" +\r
-    "            <span ng-if=\"!image\" class=\"default-img\">{{initials}}</span>\n" +\r
-    "\n" +\r
-    "            <h4 class=\"name\">{{profile.name}}</h4>\n" +\r
-    "\n" +\r
-    "            <p class=\"status\">\n" +\r
-    "                <span class=\"status-icon\" ng-class=\"{'status-green':colorIcon==='green','status-red':colorIcon==='red','status-blue':colorIcon==='blue','status-yellow':colorIcon==='yellow'}\">   \n" +\r
-    "                </span>\n" +\r
-    "                <span>{{profile.state}}<span ng-if=\"badge\" class=\"status-badge\">Admin</span></span>\n" +\r
-    "            </p>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"bottom-block\">\n" +\r
-    "         <div class=\"profile-details\">\n" +\r
-    "            <label>Username</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.userName)\" ng-mouseover=\"showUserNameTooltip = true;\" ng-mouseleave=\"showUserNameTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.userName)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showUserNameTooltip\">\n" +\r
-    "                    {{profile.userName.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"arrow\"></div>\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.userName}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.userName)\">\n" +\r
-    "                {{profile.userName}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Email</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.email)\" ng-mouseover=\"showEmailTooltip = true;\" ng-mouseleave=\"showEmailTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.email)\" class=\"tooltip\" data-placement=\"bottom\" b2b-tooltip show-tooltip=\"showEmailTooltip\">\n" +\r
-    "                    {{profile.email.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"arrow\"></div>\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.email}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.email)\">\n" +\r
-    "                {{profile.email}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Role</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.role)\" ng-mouseover=\"showRoleTooltip = true;\" ng-mouseleave=\"showRoleTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.role)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showRoleTooltip\">\n" +\r
-    "                    {{profile.role.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.role}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.role)\">\n" +\r
-    "                {{profile.role}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Last login</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.lastLogin)\" ng-mouseover=\"showLastLoginTooltip = true;\" ng-mouseleave=\"showLastLoginTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.lastLogin)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showLastLoginTooltip\">\n" +\r
-    "                    {{profile.lastLogin.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.lastLogin}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.lastLogin)\">\n" +\r
-    "                {{profile.lastLogin}}\n" +\r
-    "            </div>\n" +\r
-    "         </div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/searchField/searchField.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/searchField/searchField.html",\r
-    "<div class=\"search-bar\">\n" +\r
-    "    <div class='input-container' ng-blur=\"blurInput()\">\n" +\r
-    "        <input type=\"text\" class=\"innershadow b2b-search-input-field\" id=\"{{configObj.labelId}}\" b2b-search-input ng-model=\"inputModel\" ng-disabled=\"disabled\" b2b-reset ng-keydown=\"selectionIndex($event)\" placeholder=\"{{configObj.ghostText}}\" style=\"width:100%\" maxlength=\"{{configObj.maxLength}}\" title=\"{{inputModel}}\" aria-label=\"{{inputModel.length>0?inputModel:configObj.ghostText}}\"  aria-live=\"assertive\"/>\n" +\r
-    "            <button class=\"btn-search\" ng-disabled=\"disabled\" ng-click=\"startSearch()\" b2b-accessibility-click=\"13,32\" aria-label=\"Search\" ng-focus=\"showListFlag = false\" type=\"button\"><i class=\"icoControls-magnifyingglass\"></i></button>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"search-suggestion-wrapper\" ng-if=\"filterList.length >=0\" ng-show=\"showListFlag\">\n" +\r
-    "        <ul class=\"search-suggestion-list\" role=\"listbox\">      \n" +\r
-    "            <li class=\"no-result\" ng-if=\"filterList.length == 0 && configObj.display\">{{configObj.resultText}}</li>\n" +\r
-    "            <li class=\"search-suggestion-item\" ng-if=\"filterList.length\" ng-repeat=\"item in filterList | limitTo:configObj.noOfItemsDisplay track by $index\" ng-bind-html=\"item.title | b2bMultiSepartorHighlight:inputModel:configObj.searchSeperator\" ng-class=\"{active:isActive($index,filterList.length)}\" ng-click=\"selectItem($index,item.title)\">\n" +\r
-    "                {{item.title}}     \n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/seekBar/seekBar.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/seekBar/seekBar.html",\r
-    "<div class=\"b2b-seek-bar-container\" ng-class=\"{vertical:verticalSeekBar}\">\n" +\r
-    "    <div class=\"b2b-seek-bar-track-container\">\n" +\r
-    "        <div class=\"b2b-seek-bar-track\"></div>\n" +\r
-    "        <div class=\"b2b-seek-bar-track-fill\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-seek-bar-knob-container\" role=\"menu\"  >\n" +\r
-    "        <div class=\"b2b-seek-bar-knob\" tabindex=\"0\" role=\"menuitem\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/slider/slider.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/slider/slider.html",\r
-    "<div class=\"b2b-slider-container\" ng-class=\"{'vertical':verticalSlider}\">\n" +\r
-    "    <div class=\"slider-track-container\">\n" +\r
-    "        <div class=\"slider-track\"></div>\n" +\r
-    "        <div class=\"slider-track-fill\" ng-style=\"{backgroundColor:trackFillColor}\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"slider-knob-container\" ng-class=\"{'slider-knob-hidden':hideKnob}\">\n" +\r
-    "        <div class=\"slider-knob\" role=\"slider\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" aria-labelledby=\"{{labelId}}\" aria-valuenow=\"{{currentModelValue}}\" aria-valuetext=\"{{currentModelValue}}{{postAriaLabel}}\" aria-orientation=\"{{verticalSlider ? 'vertical' : 'horizontal'}}\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/spinButton/spinButton.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/spinButton/spinButton.html",\r
-    "<div class=\"btn-group btn-spinbutton-toggle\" ng-class=\"{'disabled': disabledFlag}\">\n" +\r
-    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-prev icon-primary-subtractminimize\" ng-click=\"minus();focusInputSpinButton($event)\" aria-label=\"Remove {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isMinusDisabled()}\" ng-disabled=\"isMinusDisabled()\" aria-disabled=\"{{isMinusDisabled()}}\" role=\"spinbutton\"></button>\n" +\r
-    "    <input class=\"btn pull-left\" id=\"{{spinButtonId}}\" type=\"tel\" b2b-only-nums=\"3\" maxlength=\"3\" min={{min}} max={{max}} data-max-value=\"{{max}}\" ng-model=\"inputValue[inputModelKey]\" value=\"{{inputValue[inputModelKey]}}\" aria-live=\"polite\" aria-valuenow=\"{{inputValue[inputModelKey]}}\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" ng-disabled=\"disabledFlag\">\n" +\r
-    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-next icon-primary-add-maximize\" ng-click=\"plus();focusInputSpinButton($event)\" aria-label=\"Add {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isPlusDisabled()}\" ng-disabled=\"isPlusDisabled()\" aria-disabled=\"{{isPlusDisabled()}}\" role=\"spinbutton\"></button>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/statusTracker/statusTracker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/statusTracker/statusTracker.html",\r
-    "<div class=\"b2b-status-tracker row\">\n" +\r
-    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Previous status\" ng-click=\"previousStatus()\">\n" +\r
-    "       <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "           <i class=\"icon-primary-left\"></i>\n" +\r
-    "       </div>\n" +\r
-    "   </button>\n" +\r
-    "   <div ng-repeat=\"status in statuses\" class=\"b2b-status-tracker-step\" ng-class=\"{ 'complete' : status.complete, 'current' : currentStatus($index)}\" ng-show=\"isInViewport($index)\">\n" +\r
-    "       <p class=\"b2b-status-tracker-heading\">{{status.heading}}</p>\n" +\r
-    "       <div class=\"progress\">\n" +\r
-    "           <div class=\"progress-bar\">\n" +\r
-    "               <span class=\"hidden-spoken\">\n" +\r
-    "                   {{status.complete ? 'Complete' : 'Incomplete'}}\n" +\r
-    "               </span>\n" +\r
-    "           </div>\n" +\r
-    "       </div>\n" +\r
-    "       <div class=\"b2b-status-tracker-estimate\">\n" +\r
-    "           <i ng-show=\"status.estimate !== '' && status.estimate !== undefined\" ng-class=\"status.complete ? 'icoControls-approval' : 'icon-misc-time'\"></i> {{status.complete ? 'Complete' : status.estimate}}\n" +\r
-    "           &nbsp;\n" +\r
-    "       </div>\n" +\r
-    "       \n" +\r
-    "       <div class=\"b2b-status-tracker-description\">\n" +\r
-    "           {{status.description}}\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex + b2bStatusTrackerConfig.maxViewItems === statuses.length\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Next status\" ng-click=\"nextStatus()\">\n" +\r
-    "       <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "           <i class=\"icon-primary-right\"></i>\n" +\r
-    "       </div>\n" +\r
-    "   </button>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/stepTracker/stepTracker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/stepTracker/stepTracker.html",\r
-    "<div class=\"b2b-step-tracker\">\n" +\r
-    "    <button class=\"btn-arrow b2b-left-arrow\" ng-click=\"previousStatus()\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Previous step\">\n" +\r
-    "       <div class=\"btn btn-left btn-small btn-secondary\"><i class=\"icon-primary-left\"></i></div>\n" +\r
-    "   </button>\n" +\r
-    "    <button class=\"btn-arrow b2b-right-arrow\" ng-click=\"nextStatus()\" ng-disabled=\"currentViewIndex + b2bStepTrackerConfig.maxViewItems === stepsItemsObject.length\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Next step\">\n" +\r
-    "       <div class=\"btn btn-small btn-right btn-secondary\"><i class=\"icon-primary-right\"></i></div>\n" +\r
-    "   </button>\n" +\r
-    "    <ul class=\"b2b-steps\">\n" +\r
-    "        <li ng-class=\"{'b2b-step-done':$index < currentIndex - 1 ,'b2b-step-on':$index == currentIndex - 1}\" \n" +\r
-    "            ng-repeat=\"stepsItem in stepsItemsObject\" ng-show=\"isInViewport($index)\">\n" +\r
-    "           <p class=\"b2b-step-text\" data-sm-text=\"{{stepsItem.dataMobile}}\" data-large-text=\"{{stepsItem.dataDesktop}}\">{{stepsItem.text}}</p>\n" +\r
-    "            <span class=\"hidden-spoken\">\n" +\r
-    "                {{($index < currentIndex - 1)? 'Complete. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +\r
-    "                {{($index == currentIndex - 1)? 'In Progress. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +\r
-    "                {{($index > currentIndex - 1)? 'Incomplete. '+stepsItem.text+' '+stepsItem.dataMobile:''}}\n" +\r
-    "            </span>\n" +\r
-    "        </li>\n" +\r
-    "    </ul>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/switches/switches-spanish.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/switches/switches-spanish.html",\r
-    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +\r
-    "    <span class=\"btn-slider-on\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"activo\">activo</i></span>\n" +\r
-    "    <span class=\"switch-handle\"></span>\n" +\r
-    "    <span class=\"btn-slider-off\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"inactivo\">inactivo</i></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/switches/switches.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/switches/switches.html",\r
-    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +\r
-    "    <span class=\"btn-slider-on\">On</span>\n" +\r
-    "    <span class=\"switch-handle\"></span>\n" +\r
-    "    <span class=\"btn-slider-off\">Off</span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tableMessages/tableMessage.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tableMessages/tableMessage.html",\r
-    "<div class=\"b2b-table-message\">\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType === 'noMatchingResults'\">\n" +\r
-    "        <div class=\"b2b-magnify-glass\"></div>\n" +\r
-    "        <div>\n" +\r
-    "            <div ng-transclude></div>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType == 'infoCouldNotLoad'\">\n" +\r
-    "        <div class=\"icon-primary-alert b2b-alert\" aria-label=\"Oops! The information could not load at this time. Please click link to refresh the page.\"></div>\n" +\r
-    "        <div>Oops!</div>\n" +\r
-    "        <div>The information could not load at this time.</div>\n" +\r
-    "        <div>Please <a href=\"javascript:void(0)\" title=\"Refresh the page\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType == 'magnifySearch'\">\n" +\r
-    "        <div class=\"b2b-magnify-glass\"></div>\n" +\r
-    "        <div>\n" +\r
-    "            <p class=\"b2b-message-title\">Please input values to\n" +\r
-    "                <br/> begin your search.</p>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType === 'loadingTable'\">\n" +\r
-    "        <div class=\"icon-primary-spinner-ddh b2b-loading-dots\"></div>\n" +\r
-    "        <div ng-transclude></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tableScrollbar/tableScrollbar.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tableScrollbar/tableScrollbar.html",\r
-    "<div class=\"b2b-table-scrollbar\">\n" +\r
-    "    <div class=\"b2b-scrollbar-arrows\">\n" +\r
-    "        <button class=\"btn-arrow  b2b-scrollbar-arrow-left\" type=\"button\" ng-attr-aria-label=\"{{disableLeft ? 'Scroll Left Disabled' : 'Scroll Left'}}\" ng-click=\"scrollLeft()\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div></button>\n" +\r
-    "        <button class=\"btn-arrow b2b-scrollbar-arrow-right\" ng-attr-aria-label=\"{{disableRight ? 'Scroll Right Disabled' : 'Scroll Right'}}\" ng-click=\"scrollRight()\" ng-disabled=\"disableRight\" type=\"button\"><div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-table-inner-container\">\n" +\r
-    "        <span ng-transclude></span>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTable.html",\r
-    "<table ng-class=\"{'striped': responsive, 'complex-table': responsive && active}\" ng-transclude></table>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableBody.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableBody.html",\r
-    "<td ng-hide=\"isHidden()\" ng-transclude></td>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableHeaderSortable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableHeaderSortable.html",\r
-    "<th scope=\"col\" role=\"columnheader\" aria-sort=\"{{sortPattern !== 'null' && 'none' || sortPattern}}\" aria-label=\"{{headerName}} {{sortable !== 'false' && ': activate to sort' || ' '}} {{sortPattern !== 'null' && '' || sortPattern}}\" tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort();\" ng-hide=\"isHidden()\">\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "    <i ng-class=\"{'icon-primary-arrows-sort-arrow active': sortPattern === 'ascending', 'icon-primary-arrows-sort-arrow active down': sortPattern === 'descending'}\"></i>\n" +\r
-    "</th>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableHeaderUnsortable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableHeaderUnsortable.html",\r
-    "<th scope=\"col\" ng-hide=\"isHidden()\" ng-transclude></th>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tabs/b2bTab.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tabs/b2bTab.html",\r
-    "<li role=\"tab\" aria-selected=\"{{isTabActive()}}\" aria-controls=\"{{tabPanelId}}\" class=\"tab\" \n" +\r
-    "    ng-class=\"{'active': isTabActive()}\" ng-click=\"clickTab()\" ng-hide=\"tabItem.disabled\">\n" +\r
-    "    <a href=\"javascript:void(0)\"  tabindex=\"{{(isTabActive() && tabItem.disabled)?-1:0}}\"\n" +\r
-    "       ng-disabled=\"tabItem.disabled\" aria-expanded=\"{{(isTabActive() && !tabItem.disabled)}}\" \n" +\r
-    "       b2b-accessibility-click=\"13,32\" ng-transclude></a>\n" +\r
-    "    <span class=\"hidden-spoken\" ng-if=\"isTabActive()\">Active tab</span>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tabs/b2bTabset.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tabs/b2bTabset.html",\r
-    "<ul class=\"tabs promo-tabs\" role=\"tablist\" ng-transclude></ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/groupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/groupedTree.html",\r
-    "<ul role=\"group\">\n" +\r
-    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>{{(key)?key:''}}<span class=\"b2b-tree-node-icon\"><i ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +\r
-    "        <ul role=\"group\">\n" +\r
-    "            <b2b-member ng-repeat='member in value.childArray' member='member' time-delay='{{timeDelay}}' group-it='groupIt'></b2b-member>\n" +\r
-    "        </ul>\n" +\r
-    "    </li>\n" +\r
-    "</ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/treeMember.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/treeMember.html",\r
-    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" aria-describedby=\"description_{{$id}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-link>\n" +\r
-    "    <a tabindex=\"-1\" title=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active,'b2b-locked-node':member.locked}\">       <span class=\"b2b-tree-node-name\">{{member.name}}</span>\n" +\r
-    "        <span class=\"{{!member.child?'end':''}} b2b-tree-node-icon\">\n" +\r
-    "            <i class=\"b2b-tree-expandCollapse-icon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +\r
-    "        </span>\n" +\r
-    "         <div id=\"description_{{$id}}\" class=\"offscreen-text\">\n" +\r
-    "           {{member.descriptionText}}\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"b2b-tree-tooltip\" ng-if=\"member.showTooltip\">\n" +\r
-    "           <span class=\"b2b-tree-arrow-left\"></span>\n" +\r
-    "           <div class=\"b2b-tree-tooltip-content\">\n" +\r
-    "               {{member.tooltipContent}}\n" +\r
-    "           </div>  \n" +\r
-    "        </div>\n" +\r
-    "    </a>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/ungroupedTree.html",\r
-    "<ul role=\"{{setRole}}\"><b2b-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-member></ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/groupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/groupedTree.html",\r
-    "<ul role=\"group\">\n" +\r
-    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-node-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>\n" +\r
-    "        <span class=\"ng-hide\">\n" +\r
-    "            <label class=\"checkbox\">\n" +\r
-    "                <input type=\"checkbox\" tabindex=\"-1\" class=\"treeCheckBox grpTreeCheckbox\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{(key)?key:''}}</span>\n" +\r
-    "            </label>\n" +\r
-    "        </span>\n" +\r
-    "        <span>\n" +\r
-    "            {{(key)?key:''}}    \n" +\r
-    "        </span>\n" +\r
-    "        <span class=\"nodeIcon\"><i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +\r
-    "        <ul role=\"group\">\n" +\r
-    "            <b2b-tree-member ng-repeat='member in value.childArray' member='member' group-it='groupIt'></b2b-tree-member>\n" +\r
-    "        </ul>\n" +\r
-    "    </li>\n" +\r
-    "</ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/treeMember.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/treeMember.html",\r
-    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.name}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-node-link>\n" +\r
-    "    <a tabindex=\"-1\" title=\"{{member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active}\">\n" +\r
-    "       <span ng-show=\"member.displayCheckbox\">\n" +\r
-    "               <label class=\"checkbox\">\n" +\r
-    "                <input type=\"checkbox\" tabindex=\"-1\" ng-model=\"member.isSelected\" ng-class=\"{'treeCheckBox': (member.displayCheckbox !== undefined)}\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{member.name}}</span>\n" +\r
-    "            </label>\n" +\r
-    "        </span>\n" +\r
-    "       <span ng-show=\"!member.displayCheckbox\">\n" +\r
-    "           {{member.name}} \n" +\r
-    "       </span>\n" +\r
-    "        <span class=\"nodeIcon {{!member.child?'end':''}}\">\n" +\r
-    "            <i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +\r
-    "        </span>\n" +\r
-    "    </a>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/ungroupedTree.html",\r
-    "<ul role=\"{{setRole}}\"><b2b-tree-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-tree-member></ul>");\r
-}]);\r
+/*! b2b-angular-library - v1.0.1 - Last updated: 2017-03-02. Copyright (c) 2016 AT&T Services, Inc. */ 
+angular.module("b2b.att.tpls", ['b2bTemplate/audioPlayer/audioPlayer.html', 'b2bTemplate/audioRecorder/audioRecorder.html', 'b2bTemplate/backToTop/backToTop.html', 'b2bTemplate/boardstrip/b2bAddBoard.html', 'b2bTemplate/boardstrip/b2bBoard.html', 'b2bTemplate/boardstrip/b2bBoardstrip.html', 'b2bTemplate/calendar/datepicker-popup.html', 'b2bTemplate/calendar/datepicker.html', 'b2bTemplate/coachmark/coachmark.html', 'b2bTemplate/dropdowns/b2bDropdownDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownListDesktop.html', 'b2bTemplate/fileUpload/fileUpload.html', 'b2bTemplate/flyout/flyout.html', 'b2bTemplate/flyout/flyoutContent.html', 'b2bTemplate/footer/footer_column_switch_tpl.html', 'b2bTemplate/horizontalTable/horizontalTable.html', 'b2bTemplate/hourPicker/b2bHourpicker.html', 'b2bTemplate/hourPicker/b2bHourpickerPanel.html', 'b2bTemplate/hourPicker/b2bHourpickerValue.html', 'b2bTemplate/leftNavigation/leftNavigation.html', 'b2bTemplate/listbox/listbox.html', 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html', 'b2bTemplate/modalsAndAlerts/b2b-window.html', 'b2bTemplate/monthSelector/monthSelector-popup.html', 'b2bTemplate/monthSelector/monthSelector.html', 'b2bTemplate/monthSelector/monthSelectorLink.html', 'b2bTemplate/pagination/b2b-pagination.html', 'b2bTemplate/paneSelector/paneSelector.html', 'b2bTemplate/paneSelector/paneSelectorPane.html', 'b2bTemplate/profileCard/profileCard-addUser.html', 'b2bTemplate/profileCard/profileCard.html', 'b2bTemplate/searchField/searchField.html', 'b2bTemplate/seekBar/seekBar.html', 'b2bTemplate/slider/slider.html', 'b2bTemplate/spinButton/spinButton.html', 'b2bTemplate/statusTracker/statusTracker.html', 'b2bTemplate/stepTracker/stepTracker.html', 'b2bTemplate/switches/switches-spanish.html', 'b2bTemplate/switches/switches.html', 'b2bTemplate/tableMessages/tableMessage.html', 'b2bTemplate/tables/b2bTable.html', 'b2bTemplate/tables/b2bTableBody.html', 'b2bTemplate/tables/b2bTableHeaderSortable.html', 'b2bTemplate/tables/b2bTableHeaderUnsortable.html', 'b2bTemplate/tableScrollbar/tableScrollbar.html', 'b2bTemplate/tabs/b2bTab.html', 'b2bTemplate/tabs/b2bTabset.html', 'b2bTemplate/treeNav/groupedTree.html', 'b2bTemplate/treeNav/treeMember.html', 'b2bTemplate/treeNav/ungroupedTree.html', 'b2bTemplate/treeNodeCheckbox/groupedTree.html', 'b2bTemplate/treeNodeCheckbox/treeMember.html', 'b2bTemplate/treeNodeCheckbox/ungroupedTree.html']);angular.module("b2b.att", ["b2b.att.tpls", 'b2b.att.addressInputTemplate','b2b.att.arrows','b2b.att.audioPlayer','b2b.att.audioRecorder','b2b.att.backToTop','b2b.att.badgesForAlerts','b2b.att.boardstrip','b2b.att.breadcrumbs','b2b.att.buttonGroups','b2b.att.buttons','b2b.att.calendar','b2b.att.checkboxes','b2b.att.coachmark','b2b.att.configurationSection','b2b.att.directoryListingTemplate','b2b.att.dropdowns','b2b.att.fileUpload','b2b.att.filters','b2b.att.flyout','b2b.att.footer','b2b.att.header','b2b.att.headings','b2b.att.horizontalTable','b2b.att.hourPicker','b2b.att.inputTemplate','b2b.att.leftNavigation','b2b.att.links','b2b.att.listbox','b2b.att.loaderAnimation','b2b.att.messageWrapper','b2b.att.modalsAndAlerts','b2b.att.monthSelector','b2b.att.multiLevelNavigation','b2b.att.multipurposeExpander','b2b.att.notesMessagesAndErrors','b2b.att.notificationCardTemplate','b2b.att.orderConfirmationTemplate','b2b.att.pagination','b2b.att.paneSelector','b2b.att.phoneNumberInput','b2b.att.profileBlockTemplate','b2b.att.profileCard','b2b.att.radios','b2b.att.searchField','b2b.att.seekBar','b2b.att.selectorModule','b2b.att.separators','b2b.att.slider','b2b.att.spinButton','b2b.att.staticRouteTemplate','b2b.att.statusTracker','b2b.att.stepTracker','b2b.att.switches','b2b.att.tableMessages','b2b.att.tables','b2b.att.tableScrollbar','b2b.att.tabs','b2b.att.tagBadges','b2b.att.textArea','b2b.att.tooltipsForForms','b2b.att.treeNav','b2b.att.treeNodeCheckbox','b2b.att.utilities']);/**
+ * @ngdoc directive
+ * @name Template.att:Address Input
+ *
+ * @description
+ *  <file src="src/addressInputTemplate/docs/readme.md" />
+ *
+ * @usage
+
+ *
+ * @example
+ *  <section id="code">   
+ <example module="b2b.att">
+ <file src="src/addressInputTemplate/docs/demo.html" />
+ <file src="src/addressInputTemplate/docs/demo.js" />
+ </example>
+ </section>
+ *
+ */
+angular.module('b2b.att.addressInputTemplate', ['ngMessages']);
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:arrows
+ *
+ * @description
+ *  <file src="src/arrows/docs/readme.md" />
+ *
+ * @usage
+ *   Please refer demo.html tab in Example section below.
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/arrows/docs/demo.html" />
+            <file src="src/arrows/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.arrows', []);
+/**
+ * @ngdoc directive
+ * @name Videos, audio & animation.att:Audio Player
+ * @scope
+ * @param {string} audioSrcUrl - MP3 audio source URL or Blob URL
+ * @description
+ *  <file src="src/audioPlayer/docs/readme.md" />
+ *
+ * @usage
+ * 
+ <div b2b-audio audio-src-url='audioSrcUrl'></div>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/audioPlayer/docs/demo.html" />
+            <file src="src/audioPlayer/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.audioPlayer', ['b2b.att.utilities', 'b2b.att.seekBar'])
+    .constant('AudioPlayerConfig', {
+        'defaultVolume': 50,
+        'timeShiftInSeconds': 5
+    })
+    .filter('trustedAudioUrl', ['$sce', function ($sce) {
+        return function (audioFileFullPath) {
+            return audioFileFullPath ? $sce.trustAsResourceUrl(audioFileFullPath) : 'undefined';
+        };
+    }])
+    .directive('b2bAudio', ['$log', '$timeout', 'AudioPlayerConfig', '$compile', 'events', function ($log, $timeout, AudioPlayerConfig, $compile, events) {
+        return {
+            restrict: 'EA',
+            replace: true,
+            scope: {
+                audioSrcUrl: '='
+            },
+            templateUrl: 'b2bTemplate/audioPlayer/audioPlayer.html',
+            controller: function ($scope) {
+
+                $scope.audio = {};
+
+                if (!angular.isDefined($scope.audioSrcUrl)) {
+                    $log.warn('b2b-audio : audio-src-url undefined');
+                    $scope.audioSrcUrl = undefined;
+                    $scope.audio.mp3 = undefined;
+                }
+
+            },
+            link: function (scope, element) {
+                var audioElement = angular.element(element[0].querySelector('audio'))[0];
+                scope.audio.audioElement = audioElement;
+                
+                function setAttributes(element, attributes) {
+                    Object.keys(attributes).forEach(function (name) {
+                        element.setAttribute(name, attributes[name]);
+                    });
+                }
+
+                $timeout(function () {
+                    // TODO: Replace with DDA Tooltip
+                    var seekBarKnob = element[0].querySelector('.b2b-seek-bar-knob');
+                    var tooltipObject = {
+                        'tooltip': '{{timeFormatter(audio.currentTime)}}',
+                        'tooltip-placement': 'above',
+                        'tooltip-style': 'blue',
+                        'tooltip-trigger': 'mousedown',
+                        'tooltip-append-to-body': 'false',
+                        'tooltip-offset': '-10',
+                        'refer-by': 'seek-bar-tooltip'
+                    };
+                    setAttributes(seekBarKnob, tooltipObject);
+                    $compile(seekBarKnob)(scope);
+                });
+
+                if (angular.isDefined(scope.audioSrcUrl)) {
+                    scope.audio.mp3 = scope.audioSrcUrl;
+                }
+
+                scope.audio.currentTime = 0;
+                scope.audio.currentVolume = AudioPlayerConfig.defaultVolume;
+                scope.audio.timeShiftInSeconds = AudioPlayerConfig.timeShiftInSeconds;
+                scope.isPlayInProgress = false;
+                scope.isReady = false;
+                scope.isAudioDragging = false;
+
+                $timeout(function () {
+                    audioElement.load();
+                    audioElement.volume = scope.audio.currentVolume / 100;
+                });
+
+                scope.$watch('audioSrcUrl', function (newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        if (!newVal) {
+                            $log.warn('b2b-audio : audio-src-url undefined. Please provide a valid URL');
+                        }
+                        
+                        scope.audio.mp3 = newVal;
+                        $timeout(function () {
+                            audioElement.load();
+                        });
+                    }
+                });
+
+                scope.playAudio = function () {
+                    if (scope.isReady) {
+                        audioElement.play();
+                    }
+                };
+
+                audioElement.onplay = function () {
+                    scope.isPlayInProgress = true;
+                    scope.$digest();
+                };
+
+                scope.pauseAudio = function () {
+                    audioElement.pause();
+                };
+
+                audioElement.onpause = function () {
+                    scope.isPlayInProgress = false;
+                    scope.$digest();
+                };
+
+                scope.toggleAudio = function () {
+                    if (audioElement.paused) {
+                        scope.playAudio();
+                    } else {
+                        scope.pauseAudio();
+                    }
+                };
+
+                scope.volumeUp = function (delta) {
+                    if (!delta) {
+                        delta = 0.1;
+                    } else {
+                        delta = delta / 100;
+                    }
+                    audioElement.muted = false;
+                    if (audioElement.volume < 1) {
+                        audioElement.volume = Math.min((Math.round((audioElement.volume + delta) * 100) / 100), 1);
+                    }
+                    scope.audio.currentVolume = audioElement.volume * 100;
+                    return audioElement.volume;
+                };
+
+                scope.volumeDown = function (delta) {
+                    if (!delta) {
+                        delta = 0.1;
+                    } else {
+                        delta = delta / 100;
+                    }
+                    audioElement.muted = false;
+                    if (audioElement.volume > 0) {
+                        audioElement.volume = Math.max((Math.round((audioElement.volume - delta) * 100) / 100), 0);
+                    }
+                    scope.audio.currentVolume = audioElement.volume * 100;
+                    return audioElement.volume;
+                };
+
+                var volumeHandler = function (e) {
+                    events.preventDefault(e);
+                    if ((e.wheelDelta && e.wheelDelta > 0) || (e.detail && e.detail < 0)) {
+                        scope.volumeUp();
+                    } else {
+                        scope.volumeDown();
+                    }
+                    scope.$digest();
+                };
+
+                
+
+                scope.$watch('audio.currentVolume', function (newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        audioElement.volume = newVal / 100;
+                    }
+                });
+
+                scope.setCurrentTime = function (timeInSec) {
+                    audioElement.currentTime = timeInSec;
+                };
+
+                scope.setAudioPosition = function (val) {
+                    if (scope.isReady) {
+                        scope.setCurrentTime(val);
+                        scope.isAudioDragging = false;
+                    }
+                };
+
+                function getTimestampArray(timestamp) {
+                    var d = Math.abs(timestamp) / 1000; // delta
+                    var r = {}; // result
+                    var s = { // structure
+                        day: 86400,
+                        hour: 3600,
+                        minute: 60,
+                        second: 1
+                    };
+
+                    Object.keys(s).forEach(function (key) {
+                        r[key] = Math.floor(d / s[key]);
+                        d -= r[key] * s[key];
+                    });
+
+                    return r;
+                };
+
+                scope.timeFormatter = function (timeInSec) {
+                    var formattedTime = '00:00';
+
+                    if (!timeInSec || timeInSec < 1) {
+                        return formattedTime;
+                    }
+
+                    if (typeof timeInSec === 'string') {
+                        return timeInSec;
+                    }
+
+                    var dateArray = getTimestampArray(timeInSec * 1000);
+                    Object.keys(dateArray).forEach(function (key) {
+                        if (dateArray[key] === 0) {
+                            dateArray[key] = '00';
+                        } else if (dateArray[key] < 10) {
+                            dateArray[key] = '0' + dateArray[key];
+                        }
+                    });
+
+                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];
+
+                    if (dateArray['hour'] !== '00') {
+                        formattedTime = dateArray['hour'] + ':' + formattedTime;
+                    }
+
+                    if (dateArray['day'] !== '00') {
+                        formattedTime = dateArray['day'] + ':' + formattedTime;
+                    }
+
+                    return formattedTime;
+                };
+
+                audioElement.onloadedmetadata = function () {
+                    scope.audio.duration = audioElement.duration;
+                    scope.$digest();
+                };
+
+                audioElement.ontimeupdate = function () {
+                    if (!scope.isAudioDragging) {
+                        scope.audio.currentTime = audioElement.currentTime;
+                        scope.$digest();
+                    }
+                };
+
+                audioElement.onended = function () {
+                    scope.setCurrentTime(0);
+                    scope.audio.currentTime = 0;
+                    if (!audioElement.paused) {
+                        scope.pauseAudio();
+                    }
+                    scope.$digest();
+                };
+
+                audioElement.oncanplay = function () {
+                    scope.isReady = true;
+                    scope.isPlayInProgress = !audioElement.paused;
+                    scope.$digest();
+                };
+
+                var onloadstart = function () {
+                    scope.isReady = false;
+                    scope.isPlayInProgress = !audioElement.paused;
+                    scope.audio.currentTime = 0;
+                    scope.audio.duration = 0;
+                    scope.$digest();
+                };
+                audioElement.addEventListener("loadstart", onloadstart);
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Videos, audio & animation.att:Audio Recorder
+ * @scope
+ * @param {function} callback - A callback to handle the WAV blob
+ * @param {object} config - A config object with properties startRecordingMessage & whileRecordingMessage
+ * @description
+ *  <file src="src/audioRecorder/docs/readme.md" />
+ *
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/audioRecorder/docs/demo.html" />
+            <file src="src/audioRecorder/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.audioRecorder', ['b2b.att.utilities'])
+    .constant('AudioRecorderConfig', {
+        'startRecordingMessage': 'Click on REC icon to being recording',
+        'whileRecordingMessage': 'Recording...'
+    })
+    .directive('b2bAudioRecorder', ['$interval', 'AudioRecorderConfig', 'b2bUserAgent', 'b2bRecorder', function($interval, AudioRecorderConfig, b2bUserAgent, b2bRecorder) {
+        return {
+            restrict: 'EA',
+            replace: true,
+            scope: {
+                callback: '&'
+            },
+            templateUrl: 'b2bTemplate/audioRecorder/audioRecorder.html',
+            controller: function($scope) {
+
+                function hasGetUserMedia() {
+                    return !!(navigator.getUserMedia || navigator.webkitGetUserMedia ||
+                        navigator.mozGetUserMedia || navigator.msGetUserMedia);
+                }
+
+                if (!hasGetUserMedia()) {
+                    throw new Error('Your broswer does not support MediaRecorder API');
+                }
+
+                if (!(b2bUserAgent.isFF() || b2bUserAgent.isChrome())) {
+                    throw new Error('b2bAudioRecorder does not support this browser!');
+                }
+
+            },
+            link: function(scope, element) {
+                scope.elapsedTime = 0;
+                scope.isRecording = false;
+                scope.config = {};
+                scope.config.startRecordingMessage = AudioRecorderConfig.startRecordingMessage;
+                scope.config.whileRecordingMessage = AudioRecorderConfig.whileRecordingMessage;
+                
+
+                var timer = undefined; // Interval promise
+                navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
+                var stream;
+                var audio = angular.element(element[0].querySelector('audio'))[0];
+                var recorder = undefined;
+
+                function startRecording() {
+                    scope.isRecording = true;
+                    navigator.mediaDevices.getUserMedia({
+                        audio: true
+                    }).then(function(stream) {
+                        //create the MediaStreamAudioSourceNode
+                        context = new AudioContext();
+                        source = context.createMediaStreamSource(stream);
+                        recorder = new b2bRecorder(source);
+                        recorder.record();
+
+                        timer = $interval(function() {
+                            scope.elapsedTime += 1;
+                        }, 1000, 0);
+                    }).catch(function(err) {
+                        angular.noop();
+                    });
+
+                };
+
+                function stopRecording() {
+                    scope.isRecording = false;
+                    recorder.stop();
+                    var audio = {};
+                    recorder.exportWAV(function(s) {
+                        audio.src = window.URL.createObjectURL(s);
+                        context.close().then(function() {
+                            if (timer) {
+                                $interval.cancel(timer);
+                            }
+                            scope.elapsedTime = 0;
+                            
+                            recorder.clear();
+                            recorder = undefined;
+                        });
+                        if (angular.isFunction(scope.callback)){
+                            scope.callback({'data': audio});    
+                        }
+                    });
+                    
+                    
+                }
+
+                scope.toggleRecording = function() {
+                    if (scope.isRecording) {
+                        stopRecording();
+                    } else {
+                        startRecording();
+                    }
+                };
+
+
+
+                //TODO: Move this into utilities
+                function getTimestampArray(timestamp) {
+                    var d = Math.abs(timestamp) / 1000; // delta
+                    var r = {}; // result
+                    var s = { // structure
+                        day: 86400,
+                        hour: 3600,
+                        minute: 60,
+                        second: 1
+                    };
+
+                    Object.keys(s).forEach(function(key) {
+                        r[key] = Math.floor(d / s[key]);
+                        d -= r[key] * s[key];
+                    });
+
+                    return r;
+                };
+                scope.timeFormatter = function(timeInSec) {
+                    var formattedTime = '00:00';
+
+                    if (!timeInSec || timeInSec < 1) {
+                        return formattedTime;
+                    }
+
+                    if (typeof timeInSec === 'string') {
+                        return timeInSec;
+                    }
+
+                    var dateArray = getTimestampArray(timeInSec * 1000);
+                    Object.keys(dateArray).forEach(function(key) {
+                        if (dateArray[key] === 0) {
+                            dateArray[key] = '00';
+                        } else if (dateArray[key] < 10) {
+                            dateArray[key] = '0' + dateArray[key];
+                        }
+                    });
+
+                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];
+
+                    if (dateArray['hour'] !== '00') {
+                        formattedTime = dateArray['hour'] + ':' + formattedTime;
+                    }
+
+                    if (dateArray['day'] !== '00') {
+                        formattedTime = dateArray['day'] + ':' + formattedTime;
+                    }
+
+                    return formattedTime;
+                };
+
+                scope.$on('$destroy', function() {
+                    if (timer) {
+                        $interval.cancel(timer);
+                    }
+                });
+            }
+        };
+    }]);
+
+/**
+ * @ngdoc directive
+ * @name Navigation.att:Back To Top
+ * @scope
+ * @description
+ *  <file src="src/backToTop/docs/readme.md" />
+ * @param {integer} scrollSpeed - Scroll speed in seconds, default is 1
+*
+ * @usage
+ * 
+    <div ng-controller="backToTopController">
+        <div b2b-backtotop></div>
+    </div>
+ * 
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/backToTop/docs/demo.html" />
+            <file src="src/backToTop/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.backToTop', ['b2b.att.utilities','b2b.att.position'])
+    .directive('b2bBacktotopButton', [function () {
+        return {
+            restrict: 'EA',
+            replace: true,
+            templateUrl: 'b2bTemplate/backToTop/backToTop.html',
+            link: function (scope, elem, attr) {
+                elem.bind('click', function(evt) {
+                    var scrollSpeed = parseInt(attr.scrollSpeed) || 1;
+                    TweenLite.to(window, scrollSpeed, {scrollTo:{x: 0, y: 0}});
+                });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:badgesForAlerts
+ *
+ * @description
+ *  <file src="src/badgesForAlerts/docs/readme.md" />
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/badgesForAlerts/docs/demo.html" />
+            <file src="src/badgesForAlerts/docs/demo.js" />
+       </example>
+        </section>
+ *
+ */
+angular.module('b2b.att.badgesForAlerts', []);
+/**
+ * @ngdoc directive
+ * @name Misc.att:boardstrip
+ *
+ * @description
+ *  <file src="src/boardstrip/docs/readme.md" />
+ *
+ * @usage
+ * See demo section
+ * @example
+    <section id="code">
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/boardstrip/docs/demo.html" />
+            <file src="src/boardstrip/docs/demo.js" />
+        </example>
+    </section>
+ */
+angular.module('b2b.att.boardstrip', ['b2b.att.utilities'])
+    .constant('BoardStripConfig', {
+        'maxVisibleBoards': 4,
+        'boardsToScroll': 1,
+        /* These parameters are non-configurable and remain unaltered, until there is a change in corresponding CSS */
+        'boardLength': 140,
+        'boardMargin': 15
+    })
+    .directive('b2bBoard', [function () {
+        return {
+            restrict: 'AE',
+            replace: true,
+            transclude: true,
+            require: '^b2bBoardStrip',
+            scope: {
+                boardIndex: '=',
+                boardLabel: '='
+            },
+            templateUrl: 'b2bTemplate/boardstrip/b2bBoard.html',
+            link: function (scope, element, attrs, ctrls) {
+
+                var parentCtrl = ctrls;
+
+                scope.getCurrentIndex = function () {
+                    return parentCtrl.getCurrentIndex();
+                };
+                scope.selectBoard = function (boardIndex) {
+                    if (!isNaN(boardIndex)) {
+                        parentCtrl.setCurrentIndex(boardIndex);
+                    }
+                };
+            }
+        };
+    }])
+    .directive('b2bBoardStrip', ['BoardStripConfig', '$timeout', function (BoardStripConfig, $timeout) {
+        return {
+            restrict: 'AE',
+            replace: true,
+            transclude: true,
+            require: ['?ngModel', 'b2bBoardStrip'],
+            scope: {
+                boardsMasterArray: '=',
+                onAddBoard: '&?'
+            },
+            templateUrl: 'b2bTemplate/boardstrip/b2bBoardstrip.html',
+            controller: function ($scope) {
+                if (!angular.isDefined($scope.boardsMasterArray)) {
+                    $scope.boardsMasterArray = [];
+                }
+
+                this.rectifyMaxVisibleBoards = function () {
+                    if (this.maxVisibleIndex >= $scope.boardsMasterArray.length) {
+                        this.maxVisibleIndex = $scope.boardsMasterArray.length - 1;
+                    }
+
+                    if (this.maxVisibleIndex < 0) {
+                        this.maxVisibleIndex = 0;
+                    }
+                };
+
+                this.resetBoardStrip = function () {
+                    $scope.currentIndex = 0;
+
+                    this.maxVisibleIndex = BoardStripConfig.maxVisibleBoards - 1;
+                    this.minVisibleIndex = 0;
+
+                    this.rectifyMaxVisibleBoards();
+                };
+
+                this.getCurrentIndex = function () {
+                    return $scope.currentIndex;
+                };
+                this.setCurrentIndex = function (indx) {
+                    $scope.currentIndex = indx;
+                };
+
+                this.getBoardsMasterArrayLength = function () {
+                    return $scope.boardsMasterArray.length;
+                };
+
+                $scope.addBoardPressedFlag = false;
+                this.getAddBoardPressedFlag = function () {
+                    return $scope.addBoardPressedFlag;
+                };
+                this.setAddBoardPressedFlag = function (booleanValue) {
+                    $scope.addBoardPressedFlag = booleanValue;
+                };
+
+            },
+            link: function (scope, element, attrs, ctrls) {
+
+                var ngModelCtrl = ctrls[0];
+                var ctrl = ctrls[1];
+
+                var oldTimeout;
+                var animationTimeout = 1000;
+
+                var getBoardViewportWidth = function (numberOfVisibleBoards) {
+                    return numberOfVisibleBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);
+                };
+                if (element[0].querySelector(".board-viewport")) {
+                    angular.element(element[0].querySelector(".board-viewport")).css({
+                        "width": getBoardViewportWidth(BoardStripConfig.maxVisibleBoards) + "px"
+                    });
+                }
+
+                var getBoardstripContainerWidth = function (totalNumberOfBoards) {
+                    return totalNumberOfBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);
+                };
+                if (element[0].querySelector(".boardstrip-container")) {
+                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"
+                    });
+                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                        "left": "0px"
+                    });
+                }
+
+                var calculateAndGetBoardstripContainerAdjustment = function () {
+
+                    var calculatedAdjustmentValue;
+
+                    if (ctrl.getBoardsMasterArrayLength() <= BoardStripConfig.maxVisibleBoards) {
+                        calculatedAdjustmentValue = 0;
+                    } else {
+                        calculatedAdjustmentValue = (ctrl.minVisibleIndex * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin)) * -1;
+                    }
+
+                    return calculatedAdjustmentValue;
+                };
+
+                var animateBoardstripContainerAdjustment = function (elementToFocusAfterAnimation) {
+                    var oldContainerAdjustment = angular.element(element[0].querySelector(".boardstrip-container"))[0].style.left;
+                    var containerAdjustment = calculateAndGetBoardstripContainerAdjustment();
+                    if (oldContainerAdjustment !== containerAdjustment + 'px') {
+                        angular.element(element[0].querySelector(".boardstrip-container")).css({
+                            "left": containerAdjustment + "px"
+                        });
+
+                        $timeout.cancel(oldTimeout);
+                        oldTimeout = $timeout(function () {
+                            elementToFocusAfterAnimation.focus();
+                        }, animationTimeout);
+                    } else {
+                        elementToFocusAfterAnimation.focus();
+                    }
+                };
+
+                var updateBoardsTabIndex = function (boardArray, minViewIndex, maxViewIndex) {
+                    for (var i = 0; i < boardArray.length; i++) {
+                        angular.element(boardArray[i]).attr('tabindex', '-1');
+                    }
+                    for (var j = minViewIndex; j <= maxViewIndex; j++) {
+                        angular.element(boardArray[j]).attr('tabindex', '0');
+                    }
+                };
+
+                $timeout(function () {
+                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                });
+
+                scope.$watchCollection('boardsMasterArray', function (newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        /* When a board is removed */
+                        if (newVal.length < oldVal.length) {
+                            ctrl.resetBoardStrip();
+                            $timeout(function () {
+
+                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                                if (currentBoardArray.length !== 0) {
+                                    animateBoardstripContainerAdjustment(currentBoardArray[0]);
+                                } else {
+                                    element[0].querySelector('div.boardstrip-item--add').focus();
+                                }
+
+                                angular.element(element[0].querySelector(".boardstrip-container")).css({
+                                    "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"
+                                });
+                                /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                            });
+                        }
+                        /* When a board is added */
+                        else {
+                            if (ctrl.getAddBoardPressedFlag()) {
+                                ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;
+                                ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);
+
+                                ctrl.setCurrentIndex(ctrl.maxVisibleIndex);
+
+                                $timeout(function () {
+                                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"
+                                    });
+
+                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                                    animateBoardstripContainerAdjustment(currentBoardArray[currentBoardArray.length - 1]);
+                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                                });
+                            } else {
+                                if (ctrl.minVisibleIndex === 0 && ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards + 1) {
+                                    ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;
+                                    ctrl.rectifyMaxVisibleBoards();
+                                }
+
+                                $timeout(function () {
+                                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"
+                                    });
+
+                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                                });
+                            }
+
+                            ctrl.setAddBoardPressedFlag(false);
+                        }
+                    }
+                });
+
+                scope.nextBoard = function () {
+                    ctrl.maxVisibleIndex += BoardStripConfig.boardsToScroll;
+                    ctrl.rectifyMaxVisibleBoards();
+                    ctrl.minVisibleIndex = ctrl.maxVisibleIndex - (BoardStripConfig.maxVisibleBoards - 1);
+
+                    $timeout.cancel(oldTimeout);
+                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"
+                    });
+
+                    $timeout(function () {
+                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+
+                        /* Remove tabindex from non-visible boards */
+                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+
+                        if (!(scope.isNextBoard())) {
+                            try {
+                                currentBoardArray[currentBoardArray.length - 1].focus();
+                            } catch (e) { /* IE8 may throw exception */ }
+                        }
+                    }, animationTimeout);
+                };
+                scope.prevBoard = function () {
+
+                    ctrl.minVisibleIndex -= BoardStripConfig.boardsToScroll;
+                    if (ctrl.minVisibleIndex < 0) {
+                        ctrl.minVisibleIndex = 0;
+                    }
+
+                    ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;
+                    ctrl.rectifyMaxVisibleBoards();
+
+                    $timeout.cancel(oldTimeout);
+                    angular.element(element[0].querySelector(".boardstrip-container")).css({
+                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"
+                    });
+
+                    $timeout(function () {
+                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+
+                        /* Remove tabindex from non-visible boards */
+                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+
+                        if (ctrl.minVisibleIndex === 0) {
+                            try {
+                                element[0].querySelector('div.boardstrip-item--add').focus();
+                            } catch (e) { /* IE8 may throw exception */ }
+                        }
+                    });
+                };
+
+                scope.isPrevBoard = function () {
+                    return (ctrl.minVisibleIndex > 0);
+                };
+                scope.isNextBoard = function () {
+                    return (ctrl.getBoardsMasterArrayLength() - 1 > ctrl.maxVisibleIndex);
+                };
+
+                ngModelCtrl.$render = function () {
+                    if (ngModelCtrl.$viewValue || ngModelCtrl.$viewValue === 0) {
+                        var newCurrentIndex = ngModelCtrl.$viewValue;
+
+                        if (!(newCurrentIndex = parseInt(newCurrentIndex, 10))) {
+                            newCurrentIndex = 0;
+                        }
+
+                        if (newCurrentIndex <= 0) {
+                            ctrl.resetBoardStrip();
+                            newCurrentIndex = 0;
+
+                            var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                            if (currentBoardArray.length !== 0) {
+                                animateBoardstripContainerAdjustment(currentBoardArray[0]);
+                            } else {
+                                element[0].querySelector('div.boardstrip-item--add').focus();
+                            }
+                            /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                            updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                        } else if (newCurrentIndex >= ctrl.getBoardsMasterArrayLength()) {
+                            ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;
+                            ctrl.rectifyMaxVisibleBoards();
+                            ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);
+
+                            newCurrentIndex = ctrl.maxVisibleIndex;
+
+                            $timeout(function () {
+                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                                animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);
+                                /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                            });
+                        } else {
+
+                            if (!(newCurrentIndex >= ctrl.minVisibleIndex && newCurrentIndex <= ctrl.maxVisibleIndex)) {
+                                ctrl.minVisibleIndex = newCurrentIndex;
+                                ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;
+                                ctrl.rectifyMaxVisibleBoards();
+
+                                if (ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards) {
+                                    ctrl.minVisibleIndex = 0;
+                                } else {
+                                    ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);
+                                }
+
+                                $timeout(function () {
+                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');
+                                    animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);
+                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */
+                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);
+                                });
+                            }
+                        }
+                        scope.currentIndex = newCurrentIndex;
+                        ngModelCtrl.$setViewValue(newCurrentIndex);
+                    } else {
+                        ctrl.resetBoardStrip();
+                        ngModelCtrl.$setViewValue(0);
+                    }
+                };
+
+                scope.$watch('currentIndex', function (newVal, oldVal) {
+                    if (newVal !== oldVal && ngModelCtrl && ngModelCtrl.$viewValue !== newVal) {
+                        ngModelCtrl.$setViewValue(newVal);
+                    }
+                });
+            }
+        };
+    }])
+    .directive('b2bAddBoard', ['BoardStripConfig', '$parse', function (BoardStripConfig, $parse) {
+        return {
+            restrict: 'AE',
+            replace: true,
+            require: '^b2bBoardStrip',
+            scope: {
+                onAddBoard: '&?'
+            },
+            templateUrl: 'b2bTemplate/boardstrip/b2bAddBoard.html',
+            link: function (scope, element, attrs, ctrl) {
+                scope.addBoard = function () {
+                    if (attrs['onAddBoard']) {
+                        scope.onAddBoard = $parse(scope.onAddBoard);
+                        scope.onAddBoard();
+                        ctrl.setAddBoardPressedFlag(true);
+                    }
+                };
+            }
+        };
+    }])
+    .directive('b2bBoardNavigation', ['keymap', 'events', function (keymap, events) {
+        return {
+            restrict: 'AE',
+            link: function (scope, elem) {
+
+                var prevElem = keymap.KEY.LEFT;
+                var nextElem = keymap.KEY.RIGHT;
+
+                elem.bind('keydown', function (ev) {
+
+                    if (!(ev.keyCode)) {
+                        ev.keyCode = ev.which;
+                    }
+
+                    switch (ev.keyCode) {
+                    case nextElem:
+                        events.preventDefault(ev);
+                        events.stopPropagation(ev);
+
+                        if (elem[0].nextElementSibling && parseInt(angular.element(elem[0].nextElementSibling).attr('tabindex')) >= 0) {
+                            angular.element(elem[0])[0].nextElementSibling.focus();
+                        } else {
+                            /* IE8 fix */
+                            var el = angular.element(elem[0])[0];
+                            do {
+                                if (el.nextSibling) {
+                                    el = el.nextSibling;
+                                } else {
+                                    break;
+                                }
+                            } while (el && el.tagName !== 'LI');
+
+                            if (el.tagName && el.tagName === 'LI' && parseInt(angular.element(el).attr('tabindex')) >= 0) {
+                                el.focus();
+                            }
+                        }
+
+                        break;
+                    case prevElem:
+                        events.preventDefault(ev);
+                        events.stopPropagation(ev);
+
+                        if (elem[0].previousElementSibling && parseInt(angular.element(elem[0].previousElementSibling).attr('tabindex')) >= 0) {
+                            angular.element(elem[0])[0].previousElementSibling.focus();
+                        } else {
+                            /* IE8 fix */
+                            var el1 = angular.element(elem[0])[0];
+                            do {
+                                if (el1.previousSibling) {
+                                    el1 = el1.previousSibling;
+                                } else {
+                                    break;
+                                }
+                            } while (el1 && el1.tagName !== 'LI');
+
+                            if (el1.tagName && el1.tagName === 'LI' && parseInt(angular.element(el1).attr('tabindex')) >= 0) {
+                                el1.focus();
+                            }
+                        }
+                        break;
+                    default:
+                        break;
+                    }
+                });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Navigation.att:breadcrumbs
+ *
+ * @description
+ *  <file src="src/breadcrumbs/docs/readme.md" />
+ * @usage
+    <ul class="breadcrumb">
+        <li ng-repeat="link in breadCrumbsLink"><a tabindex="{{(idx==$index)?-1:0}}" href='javascript:void(0)' ng-click="clickActive($index)" ng-class="{'active':idx==$index, '': idx!=$index}">{{link.title}}</a></li>
+    </ul>
+ * @example
+ <example module="b2b.att">
+ <file src="src/breadcrumbs/docs/demo.html" />
+ <file src="src/breadcrumbs/docs/demo.js" />
+ </example>
+ */
+angular.module('b2b.att.breadcrumbs',[])
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:buttonGroups
+ *
+ * @description
+ *  <file src="src/buttonGroups/docs/readme.md" />
+ *
+ * @usage
+<h2>Radio Aproach</h2>
+<div class="btn-group" b2b-key prev="37,38" next="39,40" circular-traversal role="radiogroup">
+    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 1'" ng-model="radioModel" b2b-btn-radio="'Button 1'" tabindex="{{(!radioModel || 'Button 1'===radioModel)?0:-1}}">Button 1</button>
+    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 2'" ng-model="radioModel" b2b-btn-radio="'Button 2'" tabindex="{{(!radioModel || 'Button 2'===radioModel)?0:-1}}">Button 2</button>
+    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 3'" ng-model="radioModel" b2b-btn-radio="'Button 3'" tabindex="{{(!radioModel || 'Button 3'===radioModel)?0:-1}}">Button 3</button>
+</div>
+
+<h2>Checkbox Aproach</h2>
+<span b2b-button-group class="btn-group btn-fullwidth" role="group" max-select="3" ng-model="checkModel1">
+    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button1" b2b-btn-checkbox>Button1</button>
+    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button2" b2b-btn-checkbox>Button2</button>
+    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button3" b2b-btn-checkbox>Button3</button>
+    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button4" b2b-btn-checkbox>Button4</button>
+    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button5" b2b-btn-checkbox>Button5</button>
+</span>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/buttonGroups/docs/demo.html" />
+            <file src="src/buttonGroups/docs/demo.js" />
+       </example>
+        </section>
+ *
+ */
+angular.module('b2b.att.buttonGroups', ['b2b.att.utilities'])
+    .constant('buttonConfig', {
+        activeClass: 'active',
+        toggleEvent: 'click'
+    })
+    .directive('b2bBtnRadio', ['buttonConfig', function (buttonConfig) {
+        var activeClass = buttonConfig.activeClass || 'active';
+        var toggleEvent = buttonConfig.toggleEvent || 'click';
+
+        return {
+            require: 'ngModel',
+            link: function (scope, element, attrs, ngModelCtrl) {
+                var notMobile = !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
+
+                if (notMobile) {
+                    element.bind('focus', function () {
+                        scope.$apply(function () {
+                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));
+                            ngModelCtrl.$render();
+                        });
+                    });
+                }
+
+                element.attr('role', 'radio');
+
+                //model -> UI
+                ngModelCtrl.$render = function () {
+                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio)));
+                    if (angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio))) {
+                        element.attr("aria-checked", true);
+                    } else {
+                        element.attr("aria-checked", false);
+                    }
+                };
+
+                //ui->model
+                element.bind(toggleEvent, function () {
+                    if (!element.hasClass(activeClass)) {
+                        scope.$apply(function () {
+                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));
+                            ngModelCtrl.$render();
+                        });
+                    }
+                });
+            }
+        };
+    }])
+    .directive('b2bBtnCheckbox', ['buttonConfig', function (buttonConfig) {
+        var activeClass = buttonConfig.activeClass || 'active';
+        var toggleEvent = buttonConfig.toggleEvent || 'click';
+
+        return {
+            require: ['ngModel', '^^b2bButtonGroup'],
+            link: function (scope, element, attrs, ctrls) {
+
+                var ngModelCtrl = ctrls[0];
+                var parentCtrl = ctrls[1];
+
+                element.attr('role', 'checkbox');
+                element.attr('aria-describedby', parentCtrl.getStateDescriptionElemId());
+
+                function getTrueValue() {
+                    var trueValue = scope.$eval(attrs.b2bBtnCheckboxTrue);
+                    return angular.isDefined(trueValue) ? trueValue : true;
+                }
+
+                function getFalseValue() {
+                    var falseValue = scope.$eval(attrs.b2bBtnCheckboxFalse);
+                    return angular.isDefined(falseValue) ? falseValue : false;
+                }
+
+                //model -> UI
+                ngModelCtrl.$render = function () {
+                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
+                    if ((angular.equals(ngModelCtrl.$modelValue, getTrueValue()))) {
+                        element.attr("aria-checked", true);
+                    } else {
+                        element.attr("aria-checked", false);
+                    }
+                };
+
+                //ui->model
+                element.bind(toggleEvent, function () {
+                    scope.$apply(function () {
+                        ngModelCtrl.$setViewValue(element.hasClass(activeClass) ? getFalseValue() : getTrueValue());
+                        ngModelCtrl.$render();
+                    });
+                });
+            }
+        };
+    }])
+    .directive('b2bButtonGroup', ['$timeout', '$compile', function ($timeout, $compile) {
+        return {
+            restrict: 'A',
+            scope: {
+                maxSelect: "=",
+                ngModelButtonState: '=ngModel'
+            },
+            controller: ['$scope', '$element', function ($scope, $element) {
+                $scope.nSel = 0;
+
+                var stateDescriptionElem = angular.element('<span id="b2b_button_group_' + $scope.$id + '" class="hide" aria-hidden="true">{{nSel}} of {{maxSelect}} options selected.</span>');
+                $compile(stateDescriptionElem)($scope);
+                $element.after(stateDescriptionElem);
+
+                this.getStateDescriptionElemId = function () {
+                    return stateDescriptionElem.attr('id');
+                };
+            }],
+            link: function (scope, element) {
+
+
+                var executeFxn = function () {
+                    scope.nSel = 0;
+                    angular.forEach(scope.ngModelButtonState, function (value, key) {
+                        if (value === true) {
+                            scope.nSel += 1;
+                        }
+                    });
+
+                    if (scope.nSel >= scope.maxSelect) {
+                        angular.forEach(element.children(), function (chd) {
+                            if (chd.className.indexOf('active') < 0) {
+                                chd.disabled = true;
+                                chd.setAttribute('aria-disabled', true);
+                            }
+                        });
+                    } else {
+                        angular.forEach(element.children(), function (chd) {
+                            chd.disabled = false;
+                            chd.setAttribute('aria-disabled', false);
+                        });
+                    }
+                    scope.$digest();
+                };
+
+                $timeout(function () {
+                    executeFxn();
+                });
+                element.bind('click', executeFxn);
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:buttons
+ * @element input
+ * @function
+ *
+ * @description
+ *  <file src="src/buttons/docs/readme.md" />
+ * @usage
+ *
+Button shape
+<button class="btn" type="button">Button</button> button.btn (button shape only)
+<button aria-label="Custom aria label" class="btn" type="button">Button</button> button.btn (button shape only) with custom aria label
+<button aria-label="Click on button/Press enter" class="btn" type="button" onclick="javascript:alert('It works!');">Click on button/Press enter</button> button.btn with click functionality
+<a b2b-keyup-click="32" href="javascript:void(0)" class="btn" role="button">Button</a> a.btn (button shape only)
+<button class="btn btn-primary">Button</button> .btn-primary
+<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-primary" role="button">Button</a> a.btn-primary
+
+5 Button colors
+<button class="btn btn-secondary">Button</button> .btn-secondary
+<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-secondary" role="button">Button</a> a.btn-secondary
+<button class="btn btn-alt">Button</button> .btn-alt
+<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-alt" role="button">Button</a> a.btn-alt
+<button class="btn btn-specialty">Button</button> .btn-specialty
+<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-specialty" role="button">Button</a> a.btn-specialty
+<button class="btn btn-specialty" disabled="">Button</button> disabled="disabled"
+<a b2b-keyup-click="32" aria-disabled="true" href="javascript:void(0)" class="btn btn-primary disabled" role="button">Button</a> a.disabled
+
+3 button heights
+<button class="btn btn-secondary">Button</button> .btn is default and 46px height
+<button class="btn btn-secondary btn-medium">Button</button> .btn-medium is 42px
+<button class="btn btn-secondary btn-small">Button</button> .btn-small is 36px
+
+.row-nowrap 2 up buttons
+<div class="row-nowrap">
+    <button class="btn btn-secondary btn-fullwidth" type="button">Cancel</button>
+    <button class="btn btn-primary btn-fullwidth" type="button">Continue</button>
+</div>
+
+.row 2 up buttons (desktop) stacked (mobile) (different order)
+<div class="row cta-button-group">
+    <button class="span btn btn-secondary btn-fullwidth hidden-phone" type="button">Cancel</button>
+    <button class="span btn btn-primary btn-fullwidth" type="button">Continue</button>
+    <button class="span btn btn-secondary btn-fullwidth visible-phone" type="button">Cancel</button>
+</div>
+
+ * @example
+ *  <section id="code">
+               <b>HTML + AngularJS</b>
+ *              <example module="b2b.att">
+ *              <file src="src/buttons/docs/demo.html" />
+                 <file src="src/buttons/docs/demo.js" />
+ *              </example>
+            </section>
+ *
+ */
+angular.module('b2b.att.buttons', ['b2b.att.utilities']);
+/**
+ * @ngdoc directive
+ * @name Forms.att:calendar
+ *
+ * @description
+ *  <file src="src/calendar/docs/readme.md" />
+ * @usage
+ *  <input type="text" ng-model="dt" b2b-datepicker>
+ *
+ * @example
+   <section id="code">
+    <b>HTML + AngularJS</b>
+    <example module="b2b.att">
+     <file src="src/calendar/docs/demo.html" />
+     <file src="src/calendar/docs/demo.js" />
+    </example>
+   </section>
+ */
+angular.module('b2b.att.calendar', ['b2b.att.position', 'b2b.att.utilities'])
+
+.constant('b2bDatepickerConfig', {
+    dateFormat: 'MM/dd/yyyy',
+    dayFormat: 'd',
+    monthFormat: 'MMMM',
+    yearFormat: 'yyyy',
+    dayHeaderFormat: 'EEEE',
+    dayTitleFormat: 'MMMM yyyy',
+    disableWeekend: false,
+    disableSunday: false,
+    disableDates: null,
+    onSelectClose: null,
+    startingDay: 0,
+    minDate: null,
+    maxDate: null,
+    dueDate: null,
+    fromDate: null,
+    legendIcon: null,
+    legendMessage: null,
+    calendarDisabled: false,
+    collapseWait: 0,
+    orientation: 'left',
+    inline: false,
+    helperText: 'The date you selected is $date. In case of mobile double tap to open calendar. Select a date to close the calendar.',
+    datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation'],
+    datepickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],
+    datepickerFunctionAttributes: ['disableDates', 'onSelectClose']
+})
+
+.factory('b2bDatepickerService', ['b2bDatepickerConfig', 'dateFilter', function (b2bDatepickerConfig, dateFilter) {
+    var setAttributes = function (attr, elem) {
+        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {
+            var attributes = b2bDatepickerConfig.datepickerEvalAttributes.concat(b2bDatepickerConfig.datepickerWatchAttributes, b2bDatepickerConfig.datepickerFunctionAttributes);
+            for (var key in attr) {
+                var val = attr[key];
+                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    elem.attr(key.toSnakeCase(), key);
+                }
+            }
+        }
+    };
+
+    var bindScope = function (attr, scope) {
+        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {
+            var evalFunction = function (key, val) {
+                scope[key] = scope.$parent.$eval(val);
+            };
+
+            var watchFunction = function (key, val) {
+                scope.$parent.$watch(val, function (value) {
+                    scope[key] = value;
+                });
+                scope.$watch(key, function (value) {
+                    scope.$parent[val] = value;
+                });
+            };
+
+            var evalAttributes = b2bDatepickerConfig.datepickerEvalAttributes;
+            var watchAttributes = b2bDatepickerConfig.datepickerWatchAttributes;
+            for (var key in attr) {
+                var val = attr[key];
+                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    evalFunction(key, val);
+                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    watchFunction(key, val);
+                }
+            }
+        }
+    };
+
+    return {
+        setAttributes: setAttributes,
+        bindScope: bindScope
+    };
+}])
+
+.controller('b2bDatepickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bDatepickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {
+    var format = {
+            date: getValue($attrs.dateFormat, dtConfig.dateFormat),
+            day: getValue($attrs.dayFormat, dtConfig.dayFormat),
+            month: getValue($attrs.monthFormat, dtConfig.monthFormat),
+            year: getValue($attrs.yearFormat, dtConfig.yearFormat),
+            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),
+            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),
+            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),
+            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),
+            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)
+        },
+        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);
+
+    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;
+    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;
+    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;
+    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;
+    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;
+    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;
+    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;
+    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);
+    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);
+    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);
+
+    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;
+
+    function getValue(value, defaultValue) {
+        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;
+    }
+
+    function getDaysInMonth(year, month) {
+        return new Date(year, month, 0).getDate();
+    }
+
+    function getDates(startDate, n) {
+        var dates = new Array(n);
+        var current = startDate,
+            i = 0;
+        while (i < n) {
+            dates[i++] = new Date(current);
+            current.setDate(current.getDate() + 1);
+        }
+        return dates;
+    }
+
+    this.updatePosition = function (b2bDatepickerPopupTemplate) {
+        $scope.position = $position.offset($element);
+        $scope.position.top = $scope.position.top + $element.find('input').prop('offsetHeight');
+        if ($scope.orientation === 'right') {
+            $scope.position.left = $scope.position.left - (((b2bDatepickerPopupTemplate && b2bDatepickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));
+        }
+    };
+
+    function isSelected(dt) {
+        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isFromDate(dt) {
+        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isDateRange(dt) {
+        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {
+            return true;
+        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isOld(date, currentMonthDate) {
+        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isNew(date, currentMonthDate) {
+        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isPastDue(dt) {
+        if ($scope.dueDate) {
+            return (dt > $scope.dueDate);
+        }
+        return false;
+    }
+
+    function isDueDate(dt) {
+        if ($scope.dueDate) {
+            return (dt.getTime() === $scope.dueDate.getTime());
+        }
+        return false;
+    }
+
+    var isDisabled = function (date, currentMonthDate) {
+        if ($attrs.from && !angular.isDate($scope.fromDate)) {
+            return true;
+        }
+        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {
+            return true;
+        }
+        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({
+            date: date
+        })));
+    };
+
+    var compare = function (date1, date2) {
+        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));
+    };
+
+    function isMinDateAvailable(startDate, endDate) {
+        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {
+            $scope.disablePrev = true;
+            $scope.visibilityPrev = "hidden";
+        } else {
+            $scope.disablePrev = false;
+            $scope.visibilityPrev = "visible";
+        }
+    }
+
+    function isMaxDateAvailable(startDate, endDate) {
+        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {
+            $scope.disableNext = true;
+            $scope.visibilityNext = "hidden";
+        } else {
+            $scope.disableNext = false;
+            $scope.visibilityNext = "visible";
+        }
+    }
+
+    function getLabel(label) {
+        if (label) {
+            var labelObj = {
+                pre: label.substr(0, 1).toUpperCase(),
+                post: label
+            };
+            return labelObj;
+        }
+        return;
+    }
+
+    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {
+        return {
+            date: date,
+            label: dateFilter(date, dayFormat),
+            header: dateFilter(date, dayHeaderFormat),
+            selected: !!isSelected,
+            fromDate: !!isFromDate,
+            dateRange: !!isDateRange,
+            oldMonth: !!isOld,
+            nextMonth: !!isNew,
+            disabled: !!isDisabled,
+            dueDate: !!dueDate,
+            pastDue: !!pastDue,
+            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))
+        };
+    }
+
+    this.modes = [
+        {
+            name: 'day',
+            getVisibleDates: function (date) {
+                var year = date.getFullYear(),
+                    month = date.getMonth(),
+                    firstDayOfMonth = new Date(year, month, 1),
+                    lastDayOfMonth = new Date(year, month + 1, 0);
+                var difference = startingDay - firstDayOfMonth.getDay(),
+                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,
+                    firstDate = new Date(firstDayOfMonth),
+                    numDates = 0;
+
+                if (numDisplayedFromPreviousMonth > 0) {
+                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
+                    numDates += numDisplayedFromPreviousMonth; // Previous
+                }
+                numDates += getDaysInMonth(year, month + 1); // Current
+                numDates += (7 - numDates % 7) % 7; // Next
+
+                var days = getDates(firstDate, numDates),
+                    labels = new Array(7);
+                for (var i = 0; i < numDates; i++) {
+                    var dt = new Date(days[i]);
+                    days[i] = makeDate(dt,
+                        format.day,
+                        format.dayHeader,
+                        isSelected(dt),
+                        isFromDate(dt),
+                        isDateRange(dt),
+                        isOld(dt, date),
+                        isNew(dt, date),
+                        isDisabled(dt, date),
+                        isDueDate(dt),
+                        isPastDue(dt));
+                }
+                for (var j = 0; j < 7; j++) {
+                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));
+                }
+                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
+                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
+                return {
+                    objects: days,
+                    title: dateFilter(date, format.dayTitle),
+                    labels: labels
+                };
+            },
+            split: 7,
+            step: {
+                months: 1
+            }
+        }
+    ];
+}])
+
+.directive('b2bDatepickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile', 'trapFocusInElement', '$position', '$window', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, trapFocusInElement, $position, $window) {
+    return {
+        restrict: 'EA',
+        replace: true,
+        transclude: true,
+        templateUrl: function (elem, attr) {
+            if (attr.inline === 'true') {
+                return 'b2bTemplate/calendar/datepicker-popup.html';
+            } else {
+                return 'b2bTemplate/calendar/datepicker.html';
+            }
+        },
+        scope: {},
+        require: ['b2bDatepickerPopup', 'ngModel', '?^b2bDatepickerGroup'],
+        controller: 'b2bDatepickerController',
+        link: function (scope, element, attrs, ctrls) {
+            var datepickerCtrl = ctrls[0],
+                ngModel = ctrls[1],
+                b2bDatepickerGroupCtrl = ctrls[2];
+            var b2bDatepickerPopupTemplate;
+
+            if (!ngModel) {
+                $log.error("ng-model is required.");
+                return; // do nothing if no ng-model
+            }
+
+            // Configuration parameters
+            var mode = 0,
+                selected;
+            scope.isOpen = false;
+
+            scope.headers = [];
+            scope.footers = [];
+
+            if (b2bDatepickerGroupCtrl) {
+                b2bDatepickerGroupCtrl.registerDatepickerScope(scope);
+            }
+
+            element.find('button').bind('click', function () {
+                element.find('input')[0].click();
+            });
+
+            element.find('input').bind('click', function () {
+                if (!scope.ngDisabled) {
+                    scope.isOpen = !scope.isOpen;
+                    toggleCalendar(scope.isOpen);
+                    scope.$apply();
+                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);
+                    $timeout(function () { 
+                        angular.element(element[0].querySelector('.datepicker-input')).scrollTop=0;
+                    },10);
+                }
+            });
+            var toggleCalendar = function (flag) {
+                if (!scope.inline) {
+                    if (flag) {
+                        b2bDatepickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/calendar/datepicker-popup.html'));
+                        b2bDatepickerPopupTemplate = $compile(b2bDatepickerPopupTemplate)(scope);
+                        $document.find('body').append(b2bDatepickerPopupTemplate);
+                        b2bDatepickerPopupTemplate.bind('keydown', keyPress);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            trapFocusInElement(flag, b2bDatepickerPopupTemplate);
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false; 
+                                scope.$apply();
+                            }, 100);
+                        });
+                    } else {
+                        b2bDatepickerPopupTemplate.unbind('keydown', keyPress);
+                        b2bDatepickerPopupTemplate.remove();
+                        element.find('button')[0].focus();
+                        scope.getFocus = false;
+                        trapFocusInElement(flag, b2bDatepickerPopupTemplate);
+                    }
+                }
+            };
+
+            var outsideClick = function (e) {
+                var isElement = $isElement(angular.element(e.target), element, $document);
+                var isb2bDatepickerPopupTemplate = $isElement(angular.element(e.target), b2bDatepickerPopupTemplate, $document);
+                if (!(isElement || isb2bDatepickerPopupTemplate)) {
+                    scope.isOpen = false;
+                    toggleCalendar(scope.isOpen);
+                    scope.$apply();
+                }
+            };
+
+            var keyPress = function (ev) {
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }
+                if (ev.keyCode) {
+                    if (ev.keyCode === 27) {
+                        scope.isOpen = false;
+                        toggleCalendar(scope.isOpen);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === 33) {
+                        !scope.disablePrev && scope.move(-1);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false;
+                                scope.$apply();
+                            }, 100);
+                        });
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === 34) {
+                        !scope.disableNext && scope.move(1);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false;
+                                scope.$apply();
+                            }, 100);
+                        });
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    }
+                    scope.$apply();
+                }
+            };
+
+            $documentBind.click('isOpen', outsideClick, scope);
+
+            var modalContainer = angular.element(document.querySelector('.modalwrapper'));
+            var modalBodyContainer = angular.element(document.querySelector('.modal-body'));
+            if (modalContainer) {
+                modalContainer.bind('scroll', function () {
+                    if (b2bDatepickerPopupTemplate) {
+                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);
+                        scope.$apply();
+                    }
+                });
+            }
+            if (modalBodyContainer) {
+                modalBodyContainer.bind('scroll', function () {
+                    if (b2bDatepickerPopupTemplate) {
+                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);
+                        var datepickerTextfield = $position.offset(element.find('input'));
+                        var modalBodyPosition = $position.offset(modalBodyContainer);
+
+                        if (((datepickerTextfield.top + datepickerTextfield.height) < modalBodyPosition.top || datepickerTextfield.top > (modalBodyPosition.top + modalBodyPosition.height)) && scope.isOpen) {
+                            scope.isOpen = false;
+                            toggleCalendar(scope.isOpen);
+                        }
+                        scope.$apply();
+                    }
+                });
+            }
+            var window = angular.element($window);
+            window.bind('resize', function () {
+                if (b2bDatepickerPopupTemplate) {
+                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);
+                    scope.$apply();
+                }
+            });
+
+            scope.$on('$destroy', function () {
+                if (scope.isOpen) {
+                    scope.isOpen = false;
+                    toggleCalendar(scope.isOpen);
+                }
+            });
+
+            scope.resetTime = function (date) {
+                if (typeof date === 'string') {
+                    date = date + 'T12:00:00';
+                }
+                var dt;
+                if (!isNaN(new Date(date))) {
+                    dt = new Date(date);
+                } else {
+                    return null;
+                }
+                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
+            };
+
+            if (attrs.min) {
+                scope.$parent.$watch($parse(attrs.min), function (value) {
+                    scope.minDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.max) {
+                scope.$parent.$watch($parse(attrs.max), function (value) {
+                    scope.maxDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.due) {
+                scope.$parent.$watch($parse(attrs.due), function (value) {
+                    scope.dueDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.from) {
+                scope.$parent.$watch($parse(attrs.from), function (value) {
+                    scope.fromDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+
+            if (attrs.legendIcon) {
+                scope.$parent.$watch(attrs.legendIcon, function (value) {
+                    scope.legendIcon = value ? value : null;
+                    refill();
+                });
+            }
+            if (attrs.legendMessage) {
+                scope.$parent.$watch(attrs.legendMessage, function (value) {
+                    scope.legendMessage = value ? value : null;
+                    refill();
+                });
+            }
+            if (attrs.ngDisabled) {
+                scope.$parent.$watch(attrs.ngDisabled, function (value) {
+                    scope.ngDisabled = value ? value : null;
+                });
+            }
+
+            // Split array into smaller arrays
+            function split(arr, size) {
+                var arrays = [];
+                while (arr.length > 0) {
+                    arrays.push(arr.splice(0, size));
+                }
+                return arrays;
+            }
+
+            function refill(date) {
+                if (angular.isDate(date) && !isNaN(date)) {
+                    selected = new Date(date);
+                } else {
+                    if (!selected) {
+                        selected = new Date();
+                    }
+                }
+
+                if (selected) {
+                    var currentMode = datepickerCtrl.modes[mode],
+                        data = currentMode.getVisibleDates(selected);
+                    scope.rows = split(data.objects, currentMode.split);
+                    var flag = false;
+                    var startFlag = false;
+                    var firstSelected = false;
+                    for (var i = 0; i < scope.rows.length; i++) {
+                        for (var j = 0; j < scope.rows[i].length; j++) {
+
+                            if (scope.rows[i][j].label === "1" && !firstSelected) {
+                                firstSelected = true;
+                                var firstDay = scope.rows[i][j];
+                            }
+
+                            if (scope.rows[i][j].selected === true) {
+                                flag = true;
+                                break;
+                            }
+                        }
+                        if (flag) {
+                            break;
+                        }
+                    }
+                    if (!flag) {
+                        firstDay.firstFocus = true;
+                    }
+
+                    scope.labels = data.labels || [];
+                    scope.title = data.title;
+
+                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);
+                }
+            }
+
+            scope.select = function (date) {
+                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({
+                        date: dt
+                    }) !== false)) {
+                    scope.currentDate = dt;
+                    if (angular.isNumber(scope.collapseWait)) {
+                        $timeout(function () {
+                            scope.isOpen = false;
+                            toggleCalendar(scope.isOpen);
+                        }, scope.collapseWait);
+                    } else {
+                        scope.isOpen = false;
+                        toggleCalendar(scope.isOpen);
+                    }
+                }
+            };
+
+            scope.move = function (direction,$event) {
+                var step = datepickerCtrl.modes[mode].step;
+                selected.setDate(1);
+                selected.setMonth(selected.getMonth() + direction * (step.months || 0));
+                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));
+                refill();
+
+                $timeout(function () {
+                    trapFocusInElement();
+                }, 100);
+
+                $event.preventDefault();
+                $event.stopPropagation();
+            };
+
+            scope.trapFocus = function () {
+                $timeout(function () {
+                    trapFocusInElement();
+                }, 100);
+            };
+
+            scope.$watch('currentDate', function (value) {
+                if (angular.isDefined(value) && value !== null) {
+                    refill(value);
+                } else {
+                    refill();
+                }
+                ngModel.$setViewValue(value);
+            });
+
+            ngModel.$render = function () {
+                scope.currentDate = ngModel.$viewValue;
+            };
+
+            var stringToDate = function (value) {
+                if (!isNaN(new Date(value))) {
+                    value = new Date(value);
+                }
+                return value;
+            };
+            ngModel.$formatters.unshift(stringToDate);
+        }
+    };
+}])
+
+.directive('b2bDatepicker', ['$compile', '$log', 'b2bDatepickerConfig', 'b2bDatepickerService', function ($compile, $log, b2bDatepickerConfig, b2bDatepickerService) {
+    return {
+        restrict: 'A',
+        scope: {
+            disableDates: '&',
+            onSelectClose: '&'
+        },
+        require: 'ngModel',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bDatepickerConfig.dateFormat;
+            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bDatepickerConfig.helperText;
+            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');
+
+            var inline = false;
+            if (elem.prop('nodeName') !== 'INPUT') {
+                inline = true;
+            }
+
+            var calendarIcon = '<i class="icon-primary-calendar" aria-hidden="true"></i>'
+            var selectedDateMessage = '<button id="' + attr.btnId + '" type="button" class="span12 faux-input" ng-disabled="ngDisabled"><span class="hidden-spoken">' + helperText + '</span></button>';
+
+            elem.removeAttr('b2b-datepicker');
+            elem.removeAttr('ng-model');
+            elem.removeAttr('ng-disabled');
+            elem.addClass('datepicker-input');
+            elem.attr('ng-model', 'dt');
+            elem.attr('aria-describedby', 'datepicker');
+            elem.attr('aria-hidden', 'true');
+            elem.attr('tabindex', '-1');
+            elem.attr('readonly', 'true');
+            elem.attr('ng-disabled', 'ngDisabled');
+            elem.attr('b2b-format-date', dateFormatString);
+
+            var wrapperElement = angular.element('<div></div>');
+            wrapperElement.attr('b2b-datepicker-popup', '');
+            wrapperElement.attr('ng-model', 'dt');
+            if (inline) {
+                wrapperElement.attr('inline', inline);
+            }
+
+            b2bDatepickerService.setAttributes(attr, wrapperElement);
+            b2bDatepickerService.bindScope(attr, scope);
+
+            wrapperElement.html('');
+            wrapperElement.append(calendarIcon);
+            wrapperElement.append(selectedDateMessage);
+            wrapperElement.append(elem.prop('outerHTML'));
+
+            var elm = wrapperElement.prop('outerHTML');
+            elm = $compile(elm)(scope);
+            elem.replaceWith(elm);
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            if (!ctrl) {
+                $log.error("ng-model is required.");
+                return; // do nothing if no ng-model
+            }
+
+            scope.$watch('dt', function (value) {
+                ctrl.$setViewValue(value);
+            });
+            ctrl.$render = function () {
+                scope.dt = ctrl.$viewValue;
+            };
+        }
+    };
+}])
+
+.directive('b2bDatepickerGroup', [function () {
+    return {
+        restrict: 'EA',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            this.$$headers = [];
+            this.$$footers = [];
+            this.registerDatepickerScope = function (datepickerScope) {
+                datepickerScope.headers = this.$$headers;
+                datepickerScope.footers = this.$$footers;
+            };
+        }],
+        link: function (scope, elem, attr, ctrl) {}
+    };
+}])
+
+.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            var b2bFormatDate = "";
+            attr.$observe('b2bFormatDate', function (value) {
+                b2bFormatDate = value;
+            });
+            var dateToString = function (value) {
+                if (!isNaN(new Date(value))) {
+                    return dateFilter(new Date(value), b2bFormatDate);
+                }
+                return value;
+            };
+            ctrl.$formatters.unshift(dateToString);
+        }
+    };
+}])
+
+.directive('b2bDatepickerHeader', [function () {
+    return {
+        restrict: 'EA',
+        require: '^b2bDatepickerGroup',
+        transclude: true,
+        replace: true,
+        template: '',
+        compile: function (elem, attr, transclude) {
+            return function link(scope, elem, attr, ctrl) {
+                if (ctrl) {
+                    ctrl.$$headers.push(transclude(scope, function () {}));
+                }
+                elem.remove();
+            };
+        }
+    };
+}])
+
+.directive('b2bDatepickerFooter', [function () {
+    return {
+        restrict: 'EA',
+        require: '^b2bDatepickerGroup',
+        transclude: true,
+        replace: true,
+        template: '',
+        compile: function (elem, attr, transclude) {
+            return function link(scope, elem, attr, ctrl) {
+                if (ctrl) {
+                    ctrl.$$footers.push(transclude(scope, function () {}));
+                }
+                elem.remove();
+            };
+        }
+    };
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:checkboxes
+ *
+ * @description
+ *  <file src="src/checkboxes/docs/readme.md" />
+ * @usage
+ * See demo section
+ * @example
+ <example module="b2b.att">
+ <file src="src/checkboxes/docs/demo.html" />
+ <file src="src/checkboxes/docs/demo.js" />
+ </example>
+ */
+angular.module('b2b.att.checkboxes', ['b2b.att.utilities'])
+.directive('b2bSelectGroup', [function (){
+        return {
+            restrict: 'A',
+            require: 'ngModel',
+            scope: {
+                checkboxes: "="
+            },
+            link: function (scope, elem, attr, ctrl) {
+                elem.bind('change', function () {
+                    var isChecked = elem.prop('checked');
+                    angular.forEach(scope.checkboxes, function (item) {
+                        item.isSelected = isChecked;
+                    });
+                    scope.$apply();
+                });
+                scope.$watch('checkboxes', function () {
+                    var setBoxes = 0;
+                    if(scope.checkboxes === undefined) {
+                        return;
+                    }
+                    angular.forEach(scope.checkboxes, function (item) {
+                        if (item.isSelected) {
+                            setBoxes++; 
+                        } 
+                    });
+                    elem.prop('indeterminate', false);
+                    if ( scope.checkboxes !==undefined && setBoxes === scope.checkboxes.length && scope.checkboxes.length > 0) { 
+                        ctrl.$setViewValue(true); 
+                        elem.removeClass('indeterminate');
+                    } else if (setBoxes === 0) { 
+                       ctrl.$setViewValue(false); 
+                       elem.removeClass('indeterminate');
+                    } else { 
+                        ctrl.$setViewValue(false); 
+                        elem.addClass('indeterminate');
+                        elem.prop('indeterminate', true); 
+                    }
+                    ctrl.$render();
+                }, true);
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Misc.att:coachmark
+ *
+ * @description
+ * <file src="src/coachmark/docs/readme.md" />
+ *
+ * @usage
+ *
+<button b2b-coachmark start-coachmark-callback="startCoachmark()" end-coachmark-callback="endCoachmark()" action-coachmark-callback="actionCoachmark(action)" coachmark-index="coachmarkIndex" coachmarks="coachmarkElements" id="coachmark0" class="btn btn-alt">Initiate tour</button>
+
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/coachmark/docs/demo.html" />
+            <file src="src/coachmark/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.coachmark', ['b2b.att.utilities','b2b.att.position'])
+        
+    .directive('b2bCoachmark', ['$document', '$compile', '$position', '$timeout', function($document, $compile, $position, $timeout) {
+        return {
+            restrict: 'A',
+             scope: {
+                coachmarks: '=',
+                coachmarkIndex: '=',
+                startCoachmarkCallback: '&',
+                endCoachmarkCallback: '&',
+                actionCoachmarkCallback: '&'
+            },
+            link: function (scope, element, attrs, ctrl) {
+                var coachmarkItems = scope.coachmarks;
+                var body = $document.find('body').eq(0);
+                var coackmarkJqContainer;
+                var coackmarkContainer;
+                var coachMarkElement;
+                var backdropjqLiteEl;
+                var coachmarkHighlight;
+                var initaitedCoachmark = false;
+                scope.coackmarkElPos ={
+                    'top':'',
+                    'left':''
+                };
+                
+                scope.currentCoachmark = {};
+                
+                
+                var coachmarkBackdrop = function(){
+                    backdropjqLiteEl = angular.element('<div class="b2b-modal-backdrop fade in hidden-by-modal"></div>');
+                    body.append(backdropjqLiteEl);
+
+                    backdropjqLiteEl.bind('click', function() {
+                        scope.closeCoachmark();
+                        scope.$apply();
+                    });
+                };
+                
+                
+                scope.closeButtonFocus = function(){
+                    if(document.getElementsByClassName('b2b-coachmark-header').length >0){
+                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollLeft = 0;
+                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollTop = 0;
+                    }
+                }
+
+                scope.actionCoachmark = function(action){
+                    scope.actionCoachmarkCallback({
+                        'action':action
+                    })
+                };
+                
+                scope.closeCoachmark = function(){
+                    initaitedCoachmark = false;
+                    backdropjqLiteEl.remove();  
+                    coackmarkContainer.remove();
+                    coachmarkHighlight.remove();
+                    if(coachMarkElement !== undefined && coachMarkElement !==""){
+                        coachMarkElement.removeClass('b2b-coachmark-label')
+                    }
+                    if (angular.isFunction(scope.endCoachmarkCallback)){
+                        scope.endCoachmarkCallback();   
+                    }
+                    element[0].focus();
+                }
+                
+                function showCoachmark(targetElement) {
+                    scope.currentCoachmark = targetElement;
+                    if(coachMarkElement !== undefined && coachMarkElement !==""){
+                        coachMarkElement.removeClass('b2b-coachmark-label')
+                        coackmarkContainer.remove();
+                        coachmarkHighlight.remove();
+                    }
+                    coachMarkElement = angular.element(document.querySelector(targetElement.elementId));
+                    coachMarkElement.addClass('b2b-coachmark-label');
+                    var elementPosition = $position.offset(coachMarkElement);
+                    
+                    coachmarkHighlight = angular.element('<div class="b2b-coachmark-highlight"></div><div class="b2b-coachmark-highlight b2b-coachmark-highlight-mask"></div>');
+                    coachmarkHighlight.css({
+                        'width': (elementPosition.width + 20) +'px',
+                        'top': (elementPosition.top -10) + 'px',
+                        'left': (elementPosition.left - 10) + 'px',
+                        'height': (elementPosition.height + 20) +'px'
+                    }); 
+                    body.append(coachmarkHighlight);
+                    
+                    scope.coackmarkElPos.top = (elementPosition.top + elementPosition.height + 32) + 'px';
+                    scope.coackmarkElPos.left = (elementPosition.left - 158 + elementPosition.width / 2 ) + 'px';
+                    coackmarkJqContainer = angular.element('<div b2b-coachmark-container b2b-trap-focus-inside-element="true"></div>');
+                    coackmarkContainer = $compile(coackmarkJqContainer)(scope);
+                    body.append(coackmarkContainer);
+                    
+                    $timeout(function () {
+                        var currentCoachmarkContainer = document.getElementsByClassName('b2b-coachmark-container')[0];
+                        currentCoachmarkContainer.focus();
+                        var coachmarkHeight = window.getComputedStyle(currentCoachmarkContainer).height.split('px')[0];
+                        var newOffsetHeight = (Math.round(elementPosition.top) - Math.round(coachmarkHeight));
+                        
+                        // We need a slight offset to show the lightboxed item
+                        TweenLite.to(window, 2, {scrollTo:{x: (scope.coackmarkElPos.left.split('px')[0]-100), y: newOffsetHeight}});
+                    }, 200);
+                }
+                
+                element.bind('click', function (e) {
+                    initaitedCoachmark = true;
+                    if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){
+                        scope.coachmarkIndex = 0;
+                    }
+                    scope.$watch('coachmarkIndex', function () {
+                        if(initaitedCoachmark === true){
+                            if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){
+                                scope.closeCoachmark();
+                            }else{
+                                showCoachmark(coachmarkItems[scope.coachmarkIndex]);
+                            }
+                        }
+                    });
+                    coachmarkBackdrop();
+                    showCoachmark(coachmarkItems[scope.coachmarkIndex]);
+                    if (angular.isFunction(scope.startCoachmarkCallback)){
+                        scope.startCoachmarkCallback(); 
+                    }
+                    $document.bind('keydown', function (evt) {
+                        if (evt.which === 27 && initaitedCoachmark) {
+                            scope.closeCoachmark();
+                            scope.$apply(); 
+                        }
+                    });
+                });
+
+            }
+        };
+    }])
+    .directive('b2bCoachmarkContainer', ['$document', '$position', function($document, $position) {
+        return {
+            restrict: 'A',
+            transclude: true,
+            replace: true,
+            templateUrl: 'b2bTemplate/coachmark/coachmark.html',
+            link: function (scope, element, attrs, ctrl) {
+                            
+            }
+        };  
+    }]);
+    
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Configuration Section 
+ * 
+ * @description 
+ *  <file src="src/configurationSection/docs/readme.md" /> 
+ * 
+ * @example 
+ *  <section id="code"> 
+        <b>HTML + AngularJS</b> 
+        <example module="b2b.att"> 
+            <file src="src/configurationSection/docs/demo.html" /> 
+            <file src="src/configurationSection/docs/demo.js" /> 
+       </example> 
+    </section>    
+ * 
+ */
+angular.module('b2b.att.configurationSection', [])
+  
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Directory Listing 
+ * 
+ * @description 
+ *  <file src="src/directoryListingTemplate/docs/readme.md" /> 
+ * 
+ * @example 
+ *  <section id="code"> 
+        <b>HTML + AngularJS</b> 
+        <example module="b2b.att"> 
+            <file src="src/directoryListingTemplate/docs/demo.html" /> 
+            <file src="src/directoryListingTemplate/docs/demo.js" /> 
+       </example> 
+    </section>    
+ * 
+ */
+angular.module('b2b.att.directoryListingTemplate', [])
+  
+/**
+ * @ngdoc directive
+ * @name Forms.att:dropdowns
+ *
+ * @description
+ *  <file src="src/dropdowns/docs/readme.md" />
+ * @usage
+ *
+ * @example
+   <section id="code">
+    <example module="b2b.att">
+     <file src="src/dropdowns/docs/demo.html" />
+     <file src="src/dropdowns/docs/demo.js" />
+    </example>
+   </section>
+ */
+angular.module('b2b.att.dropdowns', ['b2b.att.utilities', 'b2b.att.position', 'ngSanitize'])
+
+.constant('b2bDropdownConfig', {
+    prev: '37,38',
+    next: '39,40',
+    menuKeyword: 'menu',
+    linkMenuKeyword: 'link-menu',
+    largeKeyword: 'large',
+    smallKeyword: 'small'
+})  
+
+.directive("b2bDropdown", ['$timeout', '$compile', '$templateCache', 'b2bUserAgent', 'b2bDropdownConfig', '$position', function ($timeout, $compile, $templateCache, b2bUserAgent, b2bDropdownConfig, $position) {
+    return {
+        restrict: 'A',
+        scope: true,
+        require: 'ngModel',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            scope.isInputDropdown = true;
+            scope.placeHoldertext = attr.placeholderText;
+            if (attr.type) {
+                if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1 || attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {
+                    scope.isInputDropdown = false;
+                    if (attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {
+                        scope.dropdownType = b2bDropdownConfig.linkMenuKeyword;
+                    } else if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1) {
+                        scope.dropdownType = b2bDropdownConfig.menuKeyword;
+                    }
+                }
+                if (attr.type.indexOf(b2bDropdownConfig.largeKeyword) > -1) {
+                    scope.dropdownSize = b2bDropdownConfig.largeKeyword;
+                } else if (attr.type.indexOf(b2bDropdownConfig.smallKeyword) > -1) {
+                    scope.dropdownSize = b2bDropdownConfig.smallKeyword;
+                }
+            }
+
+            scope.labelText = attr.labelText;
+
+            scope.setBlur = function () {
+                scope.setTouched();
+            };
+
+            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {
+                var formCtrl = elem.controller('form');
+                scope.setNgModelController = function (name, ngModelCtrl) {
+                    if (name && formCtrl && ngModelCtrl) {
+                        formCtrl[name] = ngModelCtrl;
+                    }
+                };
+                scope.setOptionalCta = function (optionalCta) {
+                    scope.optionalCta = optionalCta;
+                };
+                var innerHtml = angular.element('<div></div>').append(elem.html());
+                innerHtml = ($compile(innerHtml)(scope)).html();
+                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownDesktop.html'));
+                template.find('ul').eq(0).append(innerHtml);
+                template = $compile(template)(scope);
+                elem.replaceWith(template);
+            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {
+                elem.css({
+                    'opacity': '0',
+                    'filter': 'alpha(opacity=0)'
+                });
+                elem.addClass('awd-select isWrapped');
+                elem.wrap('<span class="selectWrap"></span>');
+                var cover = angular.element('<span aria-hidden="true"><i class="icon-primary-down" aria-hidden="true"></i></span>');
+                elem.parent().append(cover);
+                elem.parent().append('<i class="icon-primary-down" aria-hidden="true"></i>');
+                var set = function () {
+                    var sel = elem[0] ? elem[0] : elem;
+                    var selectedText = "";
+                    var selIndex = sel.selectedIndex;
+                    if (typeof selIndex !== 'undefined') {
+                        selectedText = sel.options[selIndex].text;
+                    }
+                    cover.text(selectedText).append('<i class="icon-primary-down" aria-hidden="true"></i>');
+                };
+                var update = function (value) {
+                    $timeout(set, 100);
+                };
+
+                if (attr.ngModel) {
+                    scope.$watch(attr.ngModel, function (newVal, oldVal) {
+                        update();
+                    });
+                }
+                elem.bind('keyup', function (ev) {
+                    if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {
+                        return;
+                    }
+                    set();
+                });
+            }
+        }],  
+        link: function (scope, elem, attr, ctrl) {
+            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {
+                scope.updateModel = function () {
+                    if (ctrl.$dirty) {
+                        debugger;
+                    }
+                    ctrl.$setViewValue(scope.currentSelected.value);
+                    if (scope.dropdownRequired && scope.currentSelected.value === '') {
+                        scope.setRequired(false);
+                    } else {
+                        scope.setRequired(true);
+                    }
+
+                    if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {
+                        $timeout(function () {
+                            scope.appendCaretPositionStyle();
+                        }, 100);
+                    }
+                };
+                ctrl.$render = function () {
+//                    if(ctrl.$dirty || ctrl.$pristine) {
+                        $timeout(function () {
+
+                            if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && (angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '')) {
+                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();
+                            } else if ((angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '') && ctrl.$viewValue !== '' ) {
+                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();
+                            } else if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && scope.placeHoldertext !== '' )  {
+                                scope.currentSelected.text = scope.placeHoldertext; 
+                            } else {
+                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();
+                            }
+
+                        }, 100);
+                    };
+//                }
+                scope.disabled = false;
+                scope.dropdownName = attr.name;
+                scope.dropdownId = attr.id;
+                scope.labelId = attr.ariaLabelledby;
+                scope.dropdownDescribedBy = attr.ariaDescribedby;
+                if (attr.required) {
+                    scope.dropdownRequired = true;
+                } else {
+                    scope.dropdownRequired = false;
+                }
+                elem.removeAttr('name');
+                elem.removeAttr('id');
+                scope.$parent.$watch(attr.ngDisabled, function (val) {
+                    scope.disabled = val;
+                });
+            }
+        }
+    };
+}])
+
+.directive("b2bDropdownToggle", ['$document', '$documentBind', '$isElement', 'b2bDropdownConfig', 'keymap', 'b2bUtilitiesConfig', '$timeout', '$position', function ($document, $documentBind, $isElement, b2bDropdownConfig, keymap, b2bUtilitiesConfig, $timeout, $position) {
+    return {
+        restrict: 'A',
+        require: '?^b2bKey',
+        link: function (scope, elem, attr, ctrl) {
+            scope.appendCaretPositionStyle = function () {
+                while (document.querySelector('style.b2bDropdownCaret')) {
+                    document.querySelector('style.b2bDropdownCaret').remove();
+                };
+                var caretPosition = $position.position(elem).width - 26;
+                if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {
+                    var template = angular.element('<style class="b2bDropdownCaret" type="text/css">.linkSelectorModule .active+.moduleWrapper:before {left: ' + caretPosition + 'px;}</style>');
+                    $document.find('head').append(template);
+                }
+            };
+
+            if (scope.isInputDropdown && (scope.labelText !== undefined)) {
+                elem.attr('aria-label', scope.labelText);
+            }
+
+            scope.toggleFlag = false;
+            scope.dropdownLists = {};
+            scope.dropdownListValues = [];
+            scope.dropdown = {
+                totalIndex: -1
+            };
+            scope.currentSelected = {
+                value: '',
+                text: '',
+                label: '',
+                index: -1
+            };
+            var searchString = '';
+            var searchElement = function (searchExp) {
+                var regex = new RegExp("\\b" + searchExp, "gi");
+                var position = scope.dropdownListValues.regexIndexOf(regex, scope.currentSelected.index + 1, true);
+                if (position > -1) {
+                    return position;
+                }
+                return undefined;
+            };
+            var startTimer = function (time) {
+                if (searchString === '') {
+                    $timeout(function () {
+                        searchString = '';
+                    }, time);
+                }
+            };
+            scope.toggleDropdown = function (toggleFlag) {
+                if (!scope.disabled) {
+                    if (angular.isDefined(toggleFlag)) {
+                        scope.toggleFlag = toggleFlag;
+                    } else {
+                        scope.toggleFlag = !scope.toggleFlag;
+                    }
+                    if (!scope.toggleFlag) {
+                        if (scope.isInputDropdown) {
+                            elem.parent().find('input')[0].focus();
+                        } else {
+                            elem.parent().find('button')[0].focus();
+                        }
+                    } else {
+                        scope.dropdown.highlightedValue = scope.currentSelected.value;
+                        if (ctrl && ctrl.enableSearch) {
+                            if (angular.isDefined(scope.dropdownLists[scope.currentSelected.value])) {
+                                ctrl.resetCounter(scope.dropdownLists[scope.currentSelected.value][2]);
+                            }
+                        }
+                        if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {
+                            scope.appendCaretPositionStyle();
+                        }
+                    }
+                }
+            };
+
+            elem.bind('keydown', function (ev) {
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }
+                if (!scope.toggleFlag) {
+                    if (ev.keyCode) {
+                        var currentIndex = scope.currentSelected.index;
+                        if (ev.altKey === true && ev.keyCode === keymap.KEY.DOWN) {
+                            scope.toggleDropdown(true);
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        } else if (b2bDropdownConfig.prev.split(',').indexOf(ev.keyCode.toString()) > -1) {
+                            angular.isDefined(scope.dropdownListValues[currentIndex - 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex - 1]][0].updateDropdownValue() : angular.noop();
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        } else if (b2bDropdownConfig.next.split(',').indexOf(ev.keyCode.toString()) > -1) {
+                            angular.isDefined(scope.dropdownListValues[currentIndex + 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex + 1]][0].updateDropdownValue() : angular.noop();
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {
+                            startTimer(b2bUtilitiesConfig.searchTimer);
+                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');
+                            var position = searchElement(searchString);
+                            angular.isDefined(scope.dropdownListValues[position]) ? scope.dropdownLists[scope.dropdownListValues[position]][0].updateDropdownValue() : angular.noop();
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        }
+                    }
+                } else {
+                    if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {
+                        scope.toggleDropdown(false);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {
+                        scope.toggleDropdown(false);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    }
+                }
+                scope.$apply(); // TODO: Move this into each block to avoid expensive digest cycles
+            });
+            var outsideClick = function (e) {
+                var isElement = $isElement(angular.element(e.target), elem.parent(), $document);
+                if (!isElement) {
+                    scope.toggleDropdown(false);
+                    scope.$apply();
+                }
+            };
+            $documentBind.click('toggleFlag', outsideClick, scope);
+        }
+    };
+}])
+
+.directive("b2bDropdownGroup", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {
+    return {
+        restrict: 'A',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {
+                var innerHtml = angular.element('<div></div>').append(elem.html());
+                innerHtml = ($compile(innerHtml)(scope)).html();
+                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html'));
+                template.attr('ng-repeat', attr.optGroupRepeat);
+                template.attr('label', elem.attr('label'));
+                template.find('ul').append(innerHtml);
+                elem.replaceWith(template);
+            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {
+                var template = angular.element(elem.prop('outerHTML'));
+                template.attr('ng-repeat', attr.optGroupRepeat);
+                template.removeAttr('b2b-dropdown-group');
+                template.removeAttr('opt-group-repeat');
+                template = $compile(template)(scope);
+                elem.replaceWith(template);
+            }
+        }]
+    };
+}])
+
+.directive("b2bDropdownGroupDesktop", [function () {
+    return {
+        restrict: 'A',
+        scope: true,
+        link: function (scope, elem, attr, ctrl) {
+            scope.groupHeader = attr.label;
+        }
+    };
+}])
+
+.directive("b2bDropdownList", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {
+    return {
+        restrict: 'A',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {
+                var innerHtml = angular.element('<div></div>').append(elem.html());
+                innerHtml = ($compile(innerHtml)(scope)).html();
+                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownListDesktop.html'));
+                template.attr('ng-repeat', attr.optionRepeat);
+                template.attr('value', elem.attr('value'));
+                template.attr('search-key', elem.attr('value'));
+                if (elem.attr('aria-describedby')){
+                    template.attr('aria-describedby', attr.ariaDescribedby);
+                }
+                if (elem.attr('imgsrc')) {
+                    if (elem.attr('imgalt')) {
+                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt="' + elem.attr('imgalt') + '"/>');
+                    } else {
+                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt=""/>');
+                    }
+                }
+                template.append(innerHtml);
+                elem.replaceWith(template);
+            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {
+                var template = angular.element(elem.prop('outerHTML'));
+                template.attr('ng-repeat', attr.optionRepeat);
+                if (elem.attr('aria-describedby')){
+                    template.attr('aria-describedby', attr.ariaDescribedby);
+                }
+                template.removeAttr('b2b-dropdown-list');
+                template.removeAttr('option-repeat');
+                template = $compile(template)(scope);
+                elem.replaceWith(template);
+            }
+        }]
+    };
+}])
+
+.directive("b2bDropdownListDesktop", ['$sce', 'keymap', 'b2bDropdownConfig', function ($sce, keymap, b2bDropdownConfig) {
+    return {
+        restrict: 'A',
+        scope: true,
+        link: function (scope, elem, attr, ctrl) {
+            var dropdownListValue = scope.dropdownListValue = attr.value;
+            scope.dropdown.totalIndex++;
+            var dropdownListIndex = scope.dropdown.totalIndex;
+            scope.dropdownListValues.push(dropdownListValue);
+            scope.dropdownLists[dropdownListValue] = [];
+            scope.dropdownLists[dropdownListValue][0] = scope;
+            scope.dropdownLists[dropdownListValue][1] = elem;
+            scope.dropdownLists[dropdownListValue][2] = dropdownListIndex;
+            scope.updateDropdownValue = function () {
+                scope.currentSelected.value = dropdownListValue;
+                if (scope.isInputDropdown) {
+                    scope.currentSelected.text = elem.text();
+                } else if ((scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) || (scope.dropdownType === b2bDropdownConfig.menuKeyword && scope.dropdownSize === b2bDropdownConfig.smallKeyword)) {
+                    scope.currentSelected.text = dropdownListValue;
+                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {
+                    scope.currentSelected.text = $sce.trustAsHtml(elem.html());
+                }
+                if (scope.isInputDropdown) {
+                    scope.currentSelected.label = elem.text();
+                } else if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {
+                    scope.currentSelected.label = dropdownListValue;
+                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {
+                    scope.currentSelected.label = elem.text();
+                }
+                scope.currentSelected.index = dropdownListIndex;
+                scope.updateModel();
+            };
+            scope.selectDropdownItem = function () {
+                scope.setDirty();
+                scope.updateDropdownValue();
+                scope.toggleDropdown(false);
+            };
+            scope.highlightDropdown = function () {
+                scope.dropdown.highlightedValue = dropdownListValue;
+            };
+            elem.bind('mouseover', function (ev) {
+                elem[0].focus();
+            });
+            elem.bind('keydown', function (ev) {
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }
+                if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {
+                    scope.toggleDropdown(false);
+                    ev.preventDefault();
+                    ev.stopPropagation();
+                } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {
+                    scope.toggleDropdown(false);
+                    ev.preventDefault();
+                    ev.stopPropagation();
+                }
+                scope.$apply();
+            });
+        }
+    };
+}])
+
+.directive("b2bDropdownRepeat", ['$compile', 'b2bUserAgent', function ($compile, b2bUserAgent) {
+    return {
+        restrict: 'A',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {
+                var innerHtml = angular.element('<div></div>').append(elem.html());
+                innerHtml = ($compile(innerHtml)(scope)).html();
+                var template = angular.element('<div></div>');
+                template.attr('ng-repeat', attr.b2bDropdownRepeat);
+                template.append(innerHtml);
+                elem.replaceWith(template);
+            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {
+                angular.noop();
+            }
+        }]
+    };
+}])
+
+.directive("b2bDropdownValidation", ['$timeout', function ($timeout) {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            $timeout(function () {
+                scope.setNgModelController(attr.name, ctrl);
+            }, 100);
+            scope.setDirty = function () {
+                if (ctrl.$dirty === false) {
+                    ctrl.$dirty = true;
+                    ctrl.$pristine = false;
+                }
+            };
+            scope.setTouched = function () {
+                if (ctrl.$touched === false) {
+                    ctrl.$touched = true;
+                    ctrl.$pristine = false;
+                }
+            };
+            scope.setRequired = function (flag) {
+                ctrl.$setValidity('required', flag);
+            };
+        }
+    };
+}])
+
+.directive('b2bDropdownOptionalCta', [function () {
+    return {
+        restrict: 'EA',
+        transclude: true,
+        replace: true,
+        template: '',
+        compile: function (elem, attr, transclude) {
+            return function link(scope, elem, attr, ctrl) {
+                if (scope.setOptionalCta) {
+                    scope.setOptionalCta(transclude(scope, function () {}));
+                }
+                elem.remove();
+            };
+        }
+    };
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:File Upload
+ *
+ * @description
+ *  <file src="src/fileUpload/docs/readme.md" />
+ *
+ * @usage
+ * 
+<form id="dragDropFile">        
+    <div b2b-file-drop file-model="fileModel" on-drop="triggerFileUpload()"  align="center">
+        <p>
+            <br>To upload a file, drag & drop it here or 
+            <span b2b-file-link file-model="fileModel" on-file-select="triggerFileUpload()" >
+                click here to select from your computer.
+            </span><br>
+        </p>
+    </div>
+</form>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/fileUpload/docs/demo.html" />
+            <file src="src/fileUpload/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.fileUpload', ['b2b.att.utilities'])
+    .directive('b2bFileDrop', [function() {
+            return {
+                restrict: 'EA',
+                scope: {
+                    fileModel: '=',
+                    onDrop: '&'
+                },
+                controller: ['$scope', '$attrs', function($scope, $attrs) {
+                    this.onDrop = $scope.onDrop;
+                }],
+                link: function(scope, element) {
+                    element.addClass('b2b-dragdrop');
+                    element.bind(
+                        'dragover',
+                        function(e) {
+                            if (e.originalEvent) {
+                                e.dataTransfer = e.originalEvent.dataTransfer;
+                            }
+                            e.dataTransfer.dropEffect = 'move';
+                            // allows us to drop
+                            if (e.preventDefault) {
+                                e.preventDefault();
+                            }
+                            element.addClass('b2b-dragdrop-over');
+                            return false;
+                        }
+                    );
+                    element.bind(
+                        'dragenter',
+                        function(e) {
+                            // allows us to drop
+                            if (e.preventDefault) {
+                                e.preventDefault();
+                            }
+                            element.addClass('b2b-dragdrop-over');
+                            return false;
+                        }
+                    );
+                    element.bind(
+                        'dragleave',
+                        function() {
+                            element.removeClass('b2b-dragdrop-over');
+                            return false;
+                        }
+                    );
+                    element.bind(
+                        'drop',
+                        function(e) {
+                            // Stops some browsers from redirecting.
+                            if (e.preventDefault) {
+                                e.preventDefault();
+                            }
+                            if (e.stopPropagation) {
+                                e.stopPropagation();
+                            }
+                            if (e.originalEvent) {
+                                e.dataTransfer = e.originalEvent.dataTransfer;
+                            }
+                            element.removeClass('b2b-dragdrop-over');
+                            if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
+                                scope.fileModel = e.dataTransfer.files[0];
+                                scope.$apply();
+                                if (angular.isFunction(scope.onDrop)) {
+                                    scope.onDrop();
+                                }
+                            }
+                            return false;
+                        }
+                    );
+                }
+            };
+        }])
+        .directive('b2bFileLink', [function() {
+            return {
+                restrict: 'EA',
+                require: '^?b2bFileDrop',
+                replace: true,
+                transclude: true,
+                templateUrl: 'b2bTemplate/fileUpload/fileUpload.html',
+                scope: {
+                    fileModel: '=?',
+                    onFileSelect: '&'
+                },
+                controller: ['$scope', function($scope) {
+                    this.setFileModel = function(fileModel) {
+                        if ($scope.takeFileModelFromParent) {
+                            $scope.$parent.fileModel = fileModel;
+                            $scope.$parent.$apply();
+                        } else {
+                            $scope.fileModel = fileModel;
+                            $scope.$apply();
+                        }
+                    };
+                    this.callbackFunction = function() {
+                        if (angular.isFunction($scope.onFileSelect)) {
+                            $scope.onFileSelect();
+                        }
+                    };
+        
+                }],
+                link: function(scope, element, attr, b2bFileDropCtrl) {
+                    scope.takeFileModelFromParent = false;
+                    if (!(attr.fileModel) && b2bFileDropCtrl) {
+                        scope.takeFileModelFromParent = true;
+                    }
+                    if (!(attr.onFileSelect) && b2bFileDropCtrl) {
+                        scope.onFileSelect = b2bFileDropCtrl.onDrop;
+                    }
+                }
+            };
+        }])
+        .directive('b2bFileChange', ['$log', '$rootScope', function($log, $rootScope) {
+            return {
+                restrict: 'A',
+                require: '^b2bFileLink',
+                link: function(scope, element, attr, b2bFileLinkCtrl) {
+                    element.bind('change', changeFileModel);
+
+                    function changeFileModel(e) {
+                        if (e.target.files && e.target.files.length > 0) {
+                            b2bFileLinkCtrl.setFileModel(e.target.files[0]);
+                            b2bFileLinkCtrl.callbackFunction();
+                        } else {
+                            var strFileName = e.target.value;
+                            try {
+                                var objFSO = new ActiveXObject("Scripting.FileSystemObject");
+                                b2bFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));
+                                b2bFileLinkCtrl.callbackFunction();
+                            } catch (e) {
+                                var errMsg = "There was an issue uploading " + strFileName + ". Please try again.";
+                                $log.error(errMsg);
+                                $rootScope.$broadcast('b2b-file-link-failure', errMsg);
+                            }
+                        }
+                    }
+                }
+            };
+        }]);
+/**
+ * @ngdoc directive
+ * @name Navigation.att:filters
+ *
+ * @description
+ *  <file src="src/filters/docs/readme.md" />
+ *
+ * @usage
+ *  <div b2b-filters></div>
+ *
+ * @example
+ *  <section id="code">
+       <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/filters/docs/demo.html" />
+            <file src="src/filters/docs/demo.js" />
+       </example>
+    </section>
+ * 
+ */
+angular.module('b2b.att.filters', ['b2b.att.utilities', 'b2b.att.multipurposeExpander'])
+    .filter('filtersSelectedItemsFilter', [function () {
+        return function (listOfItemsArray) {
+
+            if (!listOfItemsArray) {
+                listOfItemsArray = [];
+            }
+
+            var returnArray = [];
+
+            for (var i = 0; i < listOfItemsArray.length; i++) {
+                for (var j = 0; j < listOfItemsArray[i].filterTypeItems.length; j++) {
+                    if (listOfItemsArray[i].filterTypeItems[j].selected && !listOfItemsArray[i].filterTypeItems[j].inProgress) {
+                        returnArray.push(listOfItemsArray[i].filterTypeItems[j]);
+                    }
+                }
+            }
+
+            return returnArray;
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:flyout
+ *
+ * @description
+ *  <file src="src/flyout/docs/readme.md" />
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/flyout/docs/demo.html" />
+            <file src="src/flyout/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.flyout', ['b2b.att.utilities', 'b2b.att.position'])
+    .directive('b2bFlyout', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {
+        return {
+            restrict: 'EA',
+            transclude: true,
+            templateUrl: 'b2bTemplate/flyout/flyout.html',
+            controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+                scope.flyoutOpened = false;
+                var contentScope = '';
+                var togglerScope = '';
+                this.registerContentScope = function (scp) {
+                    contentScope = scp;
+                };
+                this.registerTogglerScope = function (scp) {
+                    togglerScope = scp;
+                };
+
+                this.toggleFlyoutState = function () {
+                    if (contentScope) {
+                        contentScope.toggleFlyout();
+                    }
+                };
+                this.getTogglerDimensions = function () {
+                    return togglerScope.getTogglerDimensions();
+                }
+                this.setTogglerFocus = function () {
+                    return togglerScope.setTogglerFocus();
+                }
+
+                this.closeFlyout = function (e) {
+                    contentScope.closeFromChild(e);
+                };
+                this.gotFocus = function () {
+                    contentScope.gotFocus();
+                };
+
+                this.updateAriaModel = function (val) {
+                    scope.flyoutOpened = val;
+                };
+
+                var firstTabableElement = undefined,
+                    lastTabableElement = undefined;
+
+                var firstTabableElementKeyhandler = function (e) {
+                    if (!e.keyCode) {
+                        e.keyCode = e.which;
+                    }
+                    if (e.keyCode === keymap.KEY.TAB && e.shiftKey && scope.flyoutOpened) { 
+                        contentScope.gotFocus();
+                        events.preventDefault(e);
+                        events.stopPropagation(e);
+                    }
+                };
+
+                var lastTabableElementKeyhandler = function (e) {
+                    if (!e.keyCode) {
+                        e.keyCode = e.which;
+                    }
+                    if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {
+                        contentScope.gotFocus();    
+                        events.preventDefault(e);
+                        events.stopPropagation(e);
+                    }
+                };
+                this.associateTabEvent = function(){
+                    $timeout(function () {
+                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];
+                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);
+                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);
+                        if(angular.isUndefined(firstTabableElement)){
+                            angular.element(element).css('display','block');
+                            firstTabableElement = b2bDOMHelper.firstTabableElement(element);
+                            lastTabableElement = b2bDOMHelper.lastTabableElement(element);
+                            angular.element(element).css('display','none');
+                        }
+                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);
+                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);
+                    });
+                }
+                this.updateTabbableElements = function(){
+                    $timeout(function () {
+                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];
+                        angular.element(element).css('display','block');
+                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);
+                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);
+                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);
+                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);
+                        angular.element(element).css('display','none');
+                    });
+                }
+                this.unbindTabbaleEvents = function(){
+                    if(angular.isDefined(firstTabableElement)){
+                        angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);
+                    }
+
+                    if(angular.isDefined(lastTabableElement)){
+                        angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);
+                    }
+                }
+            }],
+            link: function (scope, element, attrs, ctrl) {
+
+            }
+        };
+    }])
+    .directive('b2bFlyoutToggler', [function () {
+        return {
+            restrict: 'A',
+            require: '^b2bFlyout',
+            link: function (scope, element, attrs, ctrl) {
+                element.bind('click', function (e) {
+                    ctrl.toggleFlyoutState();
+                });
+
+                scope.getTogglerDimensions = function () {
+                    return element[0].getBoundingClientRect();
+                }
+
+                scope.setTogglerFocus = function () {
+                    element[0].focus();
+                }
+
+                ctrl.registerTogglerScope(scope);
+            }
+        };
+    }])
+    .directive('b2bFlyoutContent', ['$position', '$timeout', '$documentBind', '$isElement', '$document', function ($position, $timeout, $documentBind, $isElement, $document) {
+        return {
+            restrict: 'EA',
+            transclude: true,
+            replace: true,
+            require: '^b2bFlyout',
+            scope: {
+                horizontalPlacement: '@',
+                verticalPlacement: '@',
+                flyoutStyle: '@',
+                flyoutTitle: '@',
+                contentUpdated: "=?"
+            },
+            templateUrl: 'b2bTemplate/flyout/flyoutContent.html',
+            link: function (scope, element, attrs, ctrl) {
+                var flyoutStyleArray, eachCssProperty, cssPropertyKey, cssPropertyVal, temp;
+                scope.openFlyout = false;
+                if (!scope.horizontalPlacement) {
+                    scope.horizontalPlacement = 'center';
+                }
+                if (!scope.verticalPlacement) {
+                    scope.verticalPlacement = 'below';
+                }
+
+                scope.toggleFlyout = function () {
+
+                    scope.openFlyout = !scope.openFlyout;
+
+                    if (scope.openFlyout) {
+
+                        if (angular.isDefined(scope.flyoutStyle) && scope.flyoutStyle != "") {
+                            flyoutStyleArray = scope.flyoutStyle.split(";");
+                            for (i = 0; i < flyoutStyleArray.length; i++) {
+                                eachCssProperty = flyoutStyleArray[i].split(":");
+                                if (eachCssProperty.length == 2) {
+                                    cssPropertyKey = eachCssProperty[0].trim();
+                                    cssPropertyVal = eachCssProperty[1].trim();
+                                    angular.element(element[0])[0].style[cssPropertyKey] = cssPropertyVal;
+                                }
+                            }
+                        }
+
+                        angular.element(element[0]).css({
+                            'opacity': 0,
+                            'display': 'block'
+                        });
+
+                        var flyoutIcons = angular.element(document.querySelectorAll(".b2b-flyout-icon"));
+                        angular.forEach(flyoutIcons, function (elm) {
+                            angular.element(elm)[0].blur();
+                        });
+
+                        $timeout(function () {
+                            ctrl.setTogglerFocus();
+
+                            var togglerDimensions = ctrl.getTogglerDimensions();
+                            var flyoutDimensions = element[0].getBoundingClientRect();
+
+                            switch (scope.horizontalPlacement) {
+                            case "left":
+                                angular.element(element[0]).css({
+                                    'left': ((togglerDimensions.width / 2) - 26) + 'px'
+                                });
+                                break;
+                            case "right":
+                                angular.element(element[0]).css({
+                                    'right': ((togglerDimensions.width / 2) - 23) + 'px'
+                                });
+                                break;  
+
+                            case "centerLeft":
+                                var marginLeft =  10-(flyoutDimensions.width)-20;
+                                angular.element(element[0]).css({
+                                    'margin-left': marginLeft + 'px'
+                                });
+                                break;
+                            case "centerRight":
+                                angular.element(element[0]).css({
+                                    'left': ((togglerDimensions.width + 9 )) + 'px'
+                                });
+                                break;    
+
+                            default:
+                                var marginLeft = (togglerDimensions.width / 2) - (flyoutDimensions.width / 2) - 8;
+                                angular.element(element[0]).css({
+                                    'margin-left': marginLeft + 'px'
+                                });
+                            }
+
+                            switch (scope.verticalPlacement) {
+                            case "above":
+                                angular.element(element[0]).css({
+                                    'top': -(flyoutDimensions.height + 13) + 'px'
+                                });
+                                break;
+                            case "centerLeft":
+                                angular.element(element[0]).css({
+                                    'top': -((togglerDimensions.height-13))+ 'px'
+                                });
+                                break;
+                            case "centerRight":
+                                angular.element(element[0]).css({
+                                    'top': -(flyoutDimensions.height - 23)+ 'px'
+                                });
+                                break;                                    
+                            default:
+                                angular.element(element[0]).css({
+                                    'top': (togglerDimensions.height + 13) + 'px'
+                                });
+                            }
+
+                            angular.element(element[0]).css({
+                                'opacity': 1
+                            });
+                        }, 100);
+                    } else {
+                        scope.hideFlyout();
+                    }
+                };
+
+                scope.gotFocus = function () {
+                    scope.openFlyout = false;
+                    scope.hideFlyout();
+                    ctrl.setTogglerFocus();
+                    scope.$apply();
+                };
+
+                scope.closeFromChild = function (e) {
+                    scope.openFlyout = false;
+                    scope.hideFlyout();
+                    ctrl.setTogglerFocus();
+                    scope.$apply();
+                };
+
+                scope.hideFlyout = function () {
+                    angular.element(element[0]).css({
+                        'opacity': 0,
+                        'display': 'none'
+                    });
+                };
+
+                scope.closeFlyout = function (e) {
+                    var isElement = $isElement(angular.element(e.target), element, $document);
+                    if ((e.type === "keydown" && e.which === 27) || ((e.type === "click" || e.type==="touchend") && !isElement)) {
+                        scope.openFlyout = false;
+                        scope.hideFlyout();
+                        ctrl.setTogglerFocus();
+                        scope.$apply();
+                    }
+                };
+
+                scope.$watch('openFlyout', function () {
+                    ctrl.updateAriaModel(scope.openFlyout);
+                });
+
+                $documentBind.click('openFlyout', scope.closeFlyout, scope);
+                $documentBind.event('keydown', 'openFlyout', scope.closeFlyout, scope);
+                $documentBind.event('touchend', 'openFlyout', scope.closeFlyout, scope);
+                ctrl.registerContentScope(scope);
+
+                if (angular.isDefined(scope.contentUpdated) && scope.contentUpdated !== null) {
+                    scope.$watch('contentUpdated', function (newVal, oldVal) {
+                        if(newVal){
+                            if (newVal !== oldVal) {
+                                ctrl.unbindTabbaleEvents();
+                                ctrl.associateTabEvent();
+                            }
+                            scope.contentUpdated = false;
+                        } 
+                    });
+                }  
+
+            }
+        };
+    }])
+    .directive('b2bCloseFlyout', [function () {
+        return {
+            restrict: 'A',
+            require: '^b2bFlyout',
+            scope: {
+                closeFlyout: '&'
+            },
+            link: function (scope, element, attrs, ctrl) {
+                element.bind('click', function (e) {
+                    scope.closeFlyout(e);
+                    ctrl.closeFlyout(e);
+                });
+            }
+        };
+    }])
+    .directive('b2bFlyoutTrapFocusInside', [function () {
+        return {
+            restrict: 'A',
+            transclude: false,
+            require: '^b2bFlyout',
+            link: function (scope, elem, attr, ctrl) {
+                /* Before opening modal, find the focused element */
+                ctrl.updateTabbableElements();
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Layouts.att:footer
+ *
+ * @description
+ *  <file src="src/footer/docs/readme.md" />
+ *
+ * @usage
+ * 
+ <footer class="b2b-footer-wrapper" role="contentinfo" aria-label="footer">
+        <div class="b2b-footer-container" b2b-column-switch-footer footer-link-items='footerItems'>
+            <hr>
+            <div class="divider-bottom-footer">
+                <div class="span2 dispalyInline">&nbsp;</div>
+                <div class="span6 dispalyInline">
+                    <ul class="footer-nav-content">
+                        <li><a href="Terms_of_use.html" title="Terms of use" id="foot0">Terms of use</a>|</li>
+                        <li><a href="Privacy_policy.html" title="Privacy policy" id="foot1" class="active">Privacy policy</a>|</li>
+                        <li><a href="Tollfree_directory_assistance.html" title="Tollfree directory assistance" id="foot2">Tollfree directory assistance</a>|</li>
+                        <li><a href="compliance.html" title="Accessibility" id="foot3">Accessibility</a></li>
+
+                    </ul>
+                    <p><a href="//www.att.com/gen/privacy-policy?pid=2587" target="_blank">© <span class="copyright">2016</span> AT&amp;T Intellectual Property</a>. All rights reserved. AT&amp;T,the AT&amp;T Globe logo and all other AT&amp;T marks contained herein are tardemarks of AT&amp;T intellectual property and/or AT&amp;T affiliated companines.
+
+                    </p>
+                </div>
+                <div class="span3 footerLogo dispalyInline">
+                    <a href="index.html" class="footer-logo">
+                        <i class="icon-primary-att-globe"><span class="hidden-spoken">A T &amp; T</span></i>
+                        <h2 class="logo-title">AT&amp;T</h2>
+                    </a>
+                </div>
+            </div>
+
+        </div>  
+    </footer>
+
+ * @example
+ *  <section id="code">   
+ <example module="b2b.att">
+ <file src="src/footer/docs/demo.html" />
+ <file src="src/footer/docs/demo.js" />
+ </example>
+ </section>
+ *
+ */
+angular.module('b2b.att.footer', ['b2b.att.utilities']).
+        directive('b2bColumnSwitchFooter', [function() {
+                return {
+                    restrict: 'A',
+                    transclude: true,
+                    scope: {
+                        footerLinkItems: "="
+                    },
+                    templateUrl: 'b2bTemplate/footer/footer_column_switch_tpl.html',
+                    link: function(scope) {
+                        var tempFooterColumns = scope.footerLinkItems.length;
+                        scope.footerColumns = 3;
+                        if ( (tempFooterColumns === 5) || (tempFooterColumns === 4) ) {
+                            scope.footerColumns = tempFooterColumns;
+                        }
+                    }
+
+                };
+
+            }]);
+     
+
+/**
+ * @ngdoc directive
+ * @name Layouts.att:header
+ *
+ * @description
+ *  <file src="src/header/docs/readme.md" />
+ *
+ * @usage
+ *  <li b2b-header-menu class="header__item b2b-headermenu" ng-repeat="item in tabItems" role="presentation">
+        <a href="#" class="menu__item" role="menuitem">{{item.title}}</a>
+        <div class="header-secondary-wrapper">
+            <ul class="header-secondary" role="menu">
+                <li class="header-subitem" b2b-header-submenu ng-repeat="i in item.subitems" role="presentation">
+                    <a href="#" class="menu__item" aria-haspopup="true" role="menuitem">{{i.value}}</a>
+                    <div class="header-tertiary-wrapper" ng-if="i.links">
+                        <ul class="header-tertiary" role="menu">
+                            <li b2b-header-tertiarymenu ng-repeat="link in i.links" role="presentation">
+                                <label>{{link.title}}</label>
+                                <div b2b-tertiary-link ng-repeat="title in link.value">
+                                    <a href="{{link.href}}" class="header-tertiaryitem" ng-if="!title.subitems" aria-haspopup="false" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>
+                                    <a href="{{link.href}}" class="header-tertiaryitem" b2b-header-togglemenu ng-if="title.subitems" aria-haspopup="true" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>
+                                    <ul class="header-quarternary" role="menu"  ng-if="title.subitems">
+                                        <li b2b-header-quarternarymenu role="presentation">
+                                            <a href="{{nav.href}}" ng-repeat="nav in title.subitems" role="menuitem" aria-haspopup="true">{{nav.title}}</a>
+                                        </li>
+                                    </ul>
+                                </div>
+                            </li>
+                        </ul>
+                    </div>
+                </li>
+            </ul>
+        </div>
+    </li> 
+ *
+ * @example
+ *  <section id="code">
+ <example module="b2b.att.header">
+ <file src="src/header/docs/demo.html" />
+ <file src="src/header/docs/demo.js" />
+ </example>
+ </section>
+ *
+ */
+angular.module('b2b.att.header', ['b2b.att.dropdowns','b2b.att.utilities'])
+    .directive('b2bHeaderMenu', ['keymap', '$documentBind', '$timeout', '$isElement', '$document', function (keymap, $documentBind, $timeout, $isElement, $document) {
+        return {
+            restrict: 'A',
+            controller:['$scope',function($scope){
+                this.nextSiblingFocus = function (elObj,flag) {
+                        if (elObj.nextElementSibling) {
+                            if(flag){
+                                var nextmenuItem = this.getFirstElement(elObj.nextElementSibling,'a');
+                                nextmenuItem.focus();
+                            }else{
+                                elObj.nextElementSibling.focus();
+                            }
+                        }
+                };
+                
+                this.previousSiblingFocus = function (elObj,flag) {
+                        if (elObj.previousElementSibling) {
+                            if(flag){
+                                var prevmenuItem = this.getFirstElement(elObj.previousElementSibling,'a');
+                                prevmenuItem.focus();
+                            }else{
+                                elObj.previousElementSibling.focus();
+                            }
+                        }
+                };
+                    
+                this.getFirstElement = function(elmObj,selector){
+                        return elmObj.querySelector(selector);                        
+                    };
+            }],
+            link: function (scope, elem,attr,ctrl) {
+                scope.showMenu = false;
+                var activeElm, subMenu, tertiaryMenu, el= angular.element(elem)[0], 
+                        menuItem = angular.element(elem[0].children[0]);
+                menuItem.bind('click', function () {
+                    elem.parent().children().removeClass('active');
+                    elem.addClass('active');
+                    var elems= this.parentElement.parentElement.querySelectorAll('li[b2b-header-menu]>a');
+                    for (var i=0; i<elems.length; i++) {
+                        elems[i].setAttribute("aria-expanded",false);
+                    }
+                    scope.showMenu = true;
+                    var elmTofocus = ctrl.getFirstElement(this.parentElement,'li[b2b-header-submenu]');
+                    elmTofocus.firstElementChild.focus();
+                    this.setAttribute('aria-expanded',true);
+                    scope.$apply();
+                });
+               
+                elem.bind('keydown', function (evt) {
+                    activeElm = document.activeElement;
+                    subMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-submenu]');
+                    tertiaryMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-tertiarymenu]');
+                    switch (evt.keyCode) {
+                        case keymap.KEY.ENTER:
+                        case keymap.KEY.SPACE:
+                            elem[0].click();
+                            break;
+                        case keymap.KEY.UP:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {
+                                menuItem[0].focus();
+                            }
+                            break;
+                        case keymap.KEY.DOWN:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if (subMenu) {
+                                subMenu.firstElementChild.focus();
+                            } else if (tertiaryMenu) {
+                                var firstSubitem = ctrl.getFirstElement(tertiaryMenu,'a.header-tertiaryitem');
+                                firstSubitem.focus();
+                            }
+                            break;
+                        case keymap.KEY.RIGHT:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {
+                                var elm = angular.element(activeElm.parentElement)[0];
+                                ctrl.nextSiblingFocus(elm,true);
+                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {
+                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];
+                                if (tertiaryLI.nextElementSibling) {
+                                    var nextElm = ctrl.getFirstElement(tertiaryLI.nextElementSibling,"a.header-tertiaryitem");
+                                    nextElm.focus();
+                                }
+                            }
+                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')){
+                                ctrl.nextSiblingFocus(el,true);
+                            }
+                            break;
+                        case keymap.KEY.LEFT:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {
+                                var previousElm = angular.element(activeElm.parentElement)[0];
+                                ctrl.previousSiblingFocus(previousElm,true);
+                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {
+                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];
+                                if (tertiaryLI.previousElementSibling) {
+                                    var prevElm = ctrl.getFirstElement(tertiaryLI.previousElementSibling,"a.header-tertiaryitem");
+                                    prevElm.focus();
+                                }
+                            }
+                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')) {
+                                ctrl.previousSiblingFocus(el,true);
+                            }
+                            break;
+                        case keymap.KEY.ESC:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            scope.showMenu = false;
+                            elem.removeClass('active');
+                            menuItem.attr('aria-expanded',false);
+                            $timeout(function(){
+                                menuItem[0].focus();
+                            },100);
+                            scope.$apply();
+                            break;
+                        default:
+                            break;
+                    }
+                });
+                var outsideClick = function (e) {
+                    var isElement = $isElement(angular.element(e.target), elem, $document);
+                    if (!isElement) {
+                        scope.showMenu = false;
+                        elem.removeClass('active');
+                        scope.$apply();
+                    }
+                };
+                $documentBind.click('showMenu', outsideClick, scope);
+                /*Change for ECOMP - hide header menu when click on iframe in a new tab*/
+                $(window).blur(function() {
+                       if(scope.showMenu){
+                                scope.showMenu = false;
+                     elem.removeClass('active');
+                     scope.$apply();
+                               }
+                });
+            }
+        };
+    }]).directive('b2bHeaderSubmenu', ['$timeout',function ($timeout) {
+        return{
+            restrict: 'A',
+            link: function (scope, elem) {
+                var caretSign = angular.element("<i class='menuCaret'></i>");
+                $timeout(function(){
+                    var menuItem = angular.element(elem[0].children[0]);
+                    menuItem.bind('focus mouseenter', function () {
+                        elem.parent().children().removeClass('active');
+                        elem.addClass('active');
+                        if(elem[0].childElementCount > 1){ // > 1 has third level menu
+                            menuItem.attr('aria-expanded',true);
+                            menuItem.attr('aria-haspopup',true);
+                        }
+                        var caretLeft = (elem[0].offsetLeft +  elem[0].offsetWidth/2) - 10;
+                        caretSign.css({left: caretLeft + 'px'});
+                        angular.element(caretSign);
+                        var tertiaryItems = elem[0].querySelectorAll('[b2b-header-tertiarymenu]');
+                        if(tertiaryItems.length >=1){
+                            elem.append(caretSign);
+                        }
+                    });
+                    menuItem.bind('blur', function () {
+                        $timeout(function () {
+                            var parentElm = document.activeElement.parentElement.parentElement;
+                            if(parentElm){
+                                if (!(parentElm.hasAttribute('b2b-header-tertiarymenu'))) {
+                                    elem.removeClass('active');
+                                    if(elem[0].childElementCount > 1){ // > 1 has third level menu
+                                        menuItem.attr('aria-expanded',false);
+                                    }
+                                    var caret = elem[0].querySelector('.menuCaret');
+                                    if(caret){
+                                        caret.remove();
+                                    }   
+                                }
+                            }
+                        });
+                    });
+                });
+            }
+        };
+    }]).directive('b2bHeaderTertiarymenu', ['$timeout','keymap', function ($timeout,keymap){
+        return{
+            restrict: 'A',
+            require:'^b2bHeaderMenu',
+            link: function (scope, elem,attr,ctrl) {
+                
+                elem.bind('keydown', function (evt) {
+                    var activeElm = document.activeElement;
+                    var activeParentElm = activeElm.parentElement;
+                    var activeParentObj  = angular.element(activeParentElm)[0];
+                    
+                    if(activeParentElm.hasAttribute('b2b-tertiary-link')){
+                        var quarterNav = angular.element(activeParentElm)[0].querySelector('li[b2b-header-quarternarymenu]');
+                        if(quarterNav){
+                            var links = ctrl.getFirstElement(angular.element(quarterNav)[0],'a');
+                        }
+                    }
+                    var tertiaryMenu = activeElm.parentElement.parentElement.parentElement;
+                    var tertiaryMenuFlag = tertiaryMenu.hasAttribute('b2b-tertiary-link');
+                    
+                    switch (evt.keyCode) {
+                        case keymap.KEY.DOWN:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if (activeParentElm.hasAttribute('b2b-tertiary-link')) {
+                                if(angular.element(quarterNav).hasClass('active')){
+                                    links.focus();
+                                }else if(activeParentObj.nextElementSibling){
+                                    ctrl.nextSiblingFocus(activeParentObj,true);
+                                }
+                            }
+                            else if(angular.element(activeParentElm).hasClass('active')){
+                                ctrl.nextSiblingFocus(activeElm);
+                            }
+                            break;                        
+                        case keymap.KEY.UP:
+                            evt.stopPropagation();
+                            evt.preventDefault();
+                            if(activeParentElm.hasAttribute('b2b-tertiary-link')){
+                                if(activeParentObj.previousElementSibling.hasAttribute('b2b-tertiary-link')){
+                                    ctrl.previousSiblingFocus(activeParentObj,true);
+                                }else{
+                                    var elm = angular.element(activeElm.parentElement.parentElement.parentElement.parentElement.parentElement)[0];
+                                    ctrl.getFirstElement(elm,"a").focus();
+                                }
+                            }else if(angular.element(activeParentElm).hasClass('active')){
+                                    if (activeElm.previousElementSibling) {
+                                        ctrl.previousSiblingFocus(activeElm);
+                                    }else if (tertiaryMenuFlag) {
+                                        var elm = angular.element(tertiaryMenu)[0];
+                                        ctrl.getFirstElement(elm,"a.header-tertiaryitem").focus();
+                                    }
+                                }
+                            break;
+                        default:
+                            break;
+                    }
+                });
+            }            
+        };          
+    }]).directive('b2bHeaderTogglemenu', ['$timeout', 'keymap', function ($timeout, keymap) {
+        return{
+            restrict: 'A',
+            require: '^b2bHeaderMenu',
+            link: function (scope, elem, attrs, ctrl) {
+                var quarterNav;
+                $timeout(function () {
+                    quarterNav = angular.element(elem.parent())[0].querySelector('li[b2b-header-quarternarymenu]');
+                    elem.bind('click', function () {
+                        angular.element(quarterNav).toggleClass('active');
+                    });
+                });
+            }
+        };
+    }]).directive('b2bHeaderResponsive', ['$timeout',function ($timeout) {
+        return{
+            restrict: 'A',
+            controller: function($scope){
+                this.applyMediaQueries = function(value){
+                    document.querySelector('style').textContent += 
+                        "@media screen and (max-width:950px) { \
+                            .header__item.profile { right: " + value + "px; } \
+                        }";
+                };
+                this.arrangeResponsiveHeader = function(children){
+                    /* 
+                     * clientWidth of 1090 === max-width of 1100px
+                     * clientWidth of 920 === max-width of 950px
+                     * see b2b-angular.css for rest of responsive header CSS
+                     */
+                  if (document.documentElement.clientWidth <= 920) { 
+                        switch(children){
+                            case 1:
+                                this.applyMediaQueries(200);                    
+                                break;
+                            case 2:
+                                this.applyMediaQueries(200);                            
+                                break;
+                            default: // anthing above 3, however, should not have more than 3 to date
+                                this.applyMediaQueries(200);                                                                            
+                        }
+                    }
+                }
+            },
+            link: function (scope, elem, attrs, ctrl) {
+                var children;
+                var profile;
+                
+                // onload of page
+                $timeout(function(){ 
+                    profile = document.querySelector('li.header__item.profile');
+                    children = angular.element(profile).children().length;
+                    
+                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers
+                });
+
+                // on screen resize
+                window.addEventListener('resize', function(event){ // caret adjustmet
+                    var activeSubmenu = elem[0].querySelector('[b2b-header-menu] [b2b-header-submenu].active');
+                    var activeSubmenuEl = angular.element(activeSubmenu);
+                    if(activeSubmenu){
+                        var caretSign = activeSubmenu.querySelector('i.menuCaret');
+                        if(caretSign){
+                            var caretSignEl = angular.element(caretSign);
+                            var caretLeft = (activeSubmenu.offsetLeft +  activeSubmenu.offsetWidth/2) - 10;
+                            caretSignEl.css({left: caretLeft + 'px'});
+                        }
+                    }
+
+                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers
+                });
+            }
+        };
+    }]);
+
+/**
+ * @ngdoc directive
+ * @name Layouts.att:headings
+ *
+ * @description
+ *  <file src="src/headings/docs/readme.md" />
+ *
+ * @usage
+    <h1 class="heading-page">38px page heading</h1>
+    <h2 class="heading-major-section">30px major section heading</h2>
+    <h3 class="heading-sub-section">24px sub-section heading</h3>
+    <h2 class="heading-medium">20px medium heading</h2>
+    <h2 class="heading-medium-emphasis">20px medium emphasis heading</h2>
+    <h3 class="heading-small">18px small heading</h3>
+    <h3 class="heading-small-emphasis">18px small emphasis heading</h3>
+    <h3 class="heading-micro">13px micro heading</h3>
+
+    <h2 class="heading-group">Lead</h2>
+    <h1 class="heading-page">This is 38px heading</h1>
+    <h2 class="lead">This is lead text...The next big thing since the last big thing we announced.</h2>
+    <h2 class="heading-group">Eyebrow</h2>
+    <h3 class="eyebrow">EYEBROW TEXT</h3>
+    <h2 class="heading-major-section">This is a 30px heading</h2>
+    <h3 class="eyebrow">EYEBROW TEXT</h3>
+    <h3 class="heading-sub-section">24px sub-section heading</h3>
+    <h2 class="heading-group">Subheading</h2>
+    <h2 class="heading-major-section">This is a 30px heading</h2>
+    <h3 class="subheading">A subheading here to support what was said above</h3>
+ * @example
+ <section id="code">
+    <b>HTML + AngularJS</b>
+    <example module="b2b.att">
+    <file src="src/headings/docs/demo.html" />
+</example>
+</section>
+ */
+
+var b2bLegalCopy = angular.module('b2b.att.headings', []);
+/**
+ * @ngdoc directive
+ * @name Tabs, tables & accordions.att:horizontalTable
+ *
+ * @description
+ *  <file src="src/horizontalTable/docs/readme.md" />
+ *
+ * @usage
+ * @param {int} sticky - Number of sticky columns to have. Maximum of 3.
+ * @param {boolean} refresh - A boolean that when set to true will force a re-render of table. Only use when using 'bulk mode'
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/horizontalTable/docs/demo.html" />
+            <file src="src/horizontalTable/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.horizontalTable', [])
+    .constant('b2bHorizontalTableConfig', {
+        'maxStickyColumns': 3
+    })
+    .directive('b2bHorizontalTable', ['$timeout', 'b2bHorizontalTableConfig', 'b2bDOMHelper', function ($timeout, b2bHorizontalTableConfig, b2bDOMHelper) {
+        return {
+            restrict: 'EA',
+            scope: true,
+            transclude: true,
+            scope: {
+                numOfStickyCols: '=?sticky',
+                refresh: '=?'
+
+            },
+            templateUrl: 'b2bTemplate/horizontalTable/horizontalTable.html',
+            link: function (scope, element, attrs, ctrl) {
+                scope.numOfStickyCols = scope.numOfStickyCols || 1;
+                scope.viewportIndex = scope.numOfStickyCols;
+
+                // JM520E: This is a temporary hack until I solve the ngRepeat issue
+                function hack() {
+                    if (element.find('th').length < scope.numOfStickyCols) {
+                        // DOM ngRepeat is not ready, let's check back in 10 ms
+                        console.info('THs are not ready, trying again in 10ms');
+                        $timeout(hack, 10, false);
+                    } else {
+                        init();
+                    }
+                }
+                hack();
+
+                if (attrs.refresh !== undefined && attrs.refresh !== '') {
+                    scope.$watch('refresh', function(oldVal, newVal) {
+                        if (scope.refresh) {
+                            // From testing it takes about 30 ms before ngRepeat executes, so let's set initial timeout
+                            // NOTE: May need to expose timeout to developers. Application is known to have digest cycle of 3-5k watches.
+                            $timeout(init, 100, false);
+                            scope.refresh = false;
+                        }
+                    });
+                }
+
+                var tableElement = element.find('table');
+                var thElements = element.find('th');
+                var innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));
+                var outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));
+
+                var tableColumns = [];
+                var tableRows = element.find('tr');
+
+                var maxWidth = 0,
+                    maxHeight = 0;
+                var totalWidth = element.children()[0].offsetWidth;
+                var lastVisibleColumn = 0;
+                var collectiveColumnWidth = [];
+                var collectiveRowHeight = [];
+                var columnSets = [];
+                var setIndex = 0; 
+                var stickyPixels = 0;
+
+                var displayNoneCSS = {'display': 'none'};
+                var displayBlockCSS = {'display': 'table-cell'};
+
+                function calculateVisibleColumns(startingPoint) {
+                    var usedWidth = 0, 
+                        visibleColumns = startingPoint || scope.numOfStickyCols;
+
+                    while(usedWidth < stickyPixels && visibleColumns < collectiveColumnWidth.length) {
+                        if (usedWidth+collectiveColumnWidth[visibleColumns] > stickyPixels) {
+                            if (startingPoint === visibleColumns) {
+                                return visibleColumns; // The next cell is too large to fit, it should be only thing to fit
+                            }
+                            visibleColumns--;
+                            return visibleColumns;
+                        }
+                        usedWidth += collectiveColumnWidth[visibleColumns];
+                        visibleColumns++;
+                    }
+
+                    if (usedWidth > stickyPixels) {
+                        return --visibleColumns;
+                    }
+                    return visibleColumns;
+                }
+
+                function updateCellDisplay(set) {
+                    for (var i = scope.numOfStickyCols; i < tableColumns.length; i++) {
+                        angular.element(tableColumns[i]).css(displayNoneCSS);
+                    }
+
+                    for (var i = set[0]; i <= set[1]; i++) {
+                        angular.element(tableColumns[i]).css(displayBlockCSS);
+                    }
+                }
+
+                function forceDigest() {
+                    if (!scope.$$phase) {
+                        scope.$digest();
+                    }
+                }
+
+                function findMax(arr, prop) {
+                    var max = 0;
+                    var localVal = 0;
+                    var prevDisplay;
+                    var item;
+                    for (var i = 0; i < arr.length; i++) {
+                        item = arr[i];
+                        prevDisplay = angular.element(item).css('display');
+                        if (scope.$$phase) {
+                            scope.$digest();
+                        }
+                        if (prop === 'width') {
+                            localVal = Math.ceil(parseInt(window.getComputedStyle(item).width.split('px')[0], 10)) + 30; // 30 px is padding
+                        } else if (prop === 'offsetWidth') {
+                            localVal = item.offsetWidth;
+                        } else if (prop === 'height') {
+                            localVal = item.offsetHeight;
+                        }
+
+                        if (localVal >= max) {
+                            max = localVal;
+                        }
+                    }
+                    
+                    return max;
+                }
+
+                function init() {
+                    // Reset this from a previous execution
+                    tableColumns = [];
+                    collectiveColumnWidth = [];
+                    collectiveRowHeight = [];
+                    maxWidth = 0;
+                    maxHeight = 0;
+                    lastVisibleColumn = 0;
+                    columnSets = [];
+                    setIndex = 0; 
+                    visibleColumns = [];
+                    stickyPixels = 0;
+
+                    tableElement = element.find('table');
+                    thElements = element.find('th');
+                    innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));
+                    outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));
+                    totalWidth = element.children()[0].offsetWidth;
+
+
+                    tableRows = element.find('tr');
+                    totalWidth = element.children()[0].offsetWidth;
+
+                    scope.disableLeft = true;
+                    scope.disableRight = false;
+
+                    if (scope.numOfStickyCols > b2bHorizontalTableConfig.maxStickyColumns) {
+                        throw new Error("Table can only support 3 sticky columns.");
+                    }                  
+
+                    angular.forEach(tableRows, function(row, rowIndex) {
+                        collectiveRowHeight.push(findMax(row.children, 'height'));
+                        for(var j = 0; j < row.children.length; j++) {
+                            if (tableColumns[j] === undefined) {
+                                tableColumns[j] = [];
+                            }
+                            tableColumns[j].push(row.children[j]);
+                        }
+                    });
+
+                    // We need to reset all the displayNones from previous runs, if applicable
+                    if (attrs.refresh !== undefined && attrs.refresh !== '')  {
+                        for (var i = scope.numOfStickyCols+1; i < tableColumns.length; i++) {
+                            angular.element(tableColumns[i]).css(displayBlockCSS);
+                        }
+                    }
+
+                    for (var i = 0; i < tableColumns.length; i++) {
+                        collectiveColumnWidth.push(findMax(tableColumns[i], 'width')); //offsetWidth doesn't take into account custom css inside
+                    }
+                    for(var i = 0; i < scope.numOfStickyCols; i++) {
+                        maxWidth += collectiveColumnWidth[i];
+                    }
+      
+                    stickyPixels = totalWidth-maxWidth;
+
+
+                    // At this point, for each tr, I need to set the properties (height) and each numOfStickyCols children
+                    // should be set with sticky properties (margin-left and width)
+                    var width = maxWidth;
+                    for(var i = 0; i < scope.numOfStickyCols; i++) {
+                        for (var j = 0; j < tableRows.length; j++) {
+                            trObject = angular.element(tableRows[j].children[i]);
+                            
+                            angular.element(trObject).css({
+                                'margin-left': -(width + 2) + 'px', 
+                                'width': (collectiveColumnWidth[i] + 3) + 'px', // instead of taking the max width, grab max width for that column
+                                'height': collectiveRowHeight[j] + 'px',
+                                'position': 'absolute',
+                                'background-color': 'lightgrey'
+                            });
+                        }
+                        
+
+                        width -= collectiveColumnWidth[i];
+                    }
+
+                    innerContainer.css({
+                        'padding-left': (maxWidth + 2) + 'px'
+                    });
+
+
+                    // Let's precompute all the (set) combinations beforehand
+                    columnSets = []; 
+                    for (var i = scope.numOfStickyCols; i < tableColumns.length;) {
+                        visibleColumns = calculateVisibleColumns(i);
+                        columnSets.push([i, visibleColumns]);
+                        i = visibleColumns + 1;
+                    }
+                    
+                    updateCellDisplay(columnSets[setIndex]);
+                    checkScrollArrows();
+
+                    scope.numOfCols = tableColumns.length;
+
+                    console.log('Bulk Mode is ' + (attrs.bulkMode ? 'enabled': 'disabled'));
+                    console.log('tableColumns', tableColumns);
+                    console.log('collectiveColumnWidth: ', collectiveColumnWidth);
+                    console.log('maxWidth: ', maxWidth);
+                }
+
+                function checkScrollArrows() {
+                    scope.disableLeft = (setIndex === 0);
+                    scope.disableRight = !(setIndex < columnSets.length-1);
+                }
+
+
+                scope.moveViewportLeft = function () {
+                    setIndex--;
+                    updateCellDisplay(columnSets[setIndex]);
+                    checkScrollArrows();
+
+                    if (scope.disableLeft) {
+                        element.find('span')[0].focus();
+                    }
+                };
+                
+                scope.moveViewportRight = function () {
+                    setIndex++;
+                    updateCellDisplay(columnSets[setIndex]);
+                    checkScrollArrows();
+                    
+                    if (scope.disableRight) {
+                        element.find('span')[0].focus();
+                    }
+                };
+
+                scope.getColumnSet = function () {
+                    return columnSets[setIndex];
+                };
+
+                innerContainer.bind('scroll', function () {
+                    $timeout(function () {
+                        checkScrollArrows();
+                    }, 1);
+                });
+
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:hourPicker
+ *
+ * @description
+ *  <file src="src/hourPicker/docs/readme.md" />
+ *
+ * @usage
+ * <div b2b-hourpicker ng-model="hourpickerValue.value"></div>
+    
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/hourPicker/docs/demo.html" />
+            <file src="src/hourPicker/docs/demo.js" />
+        </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.hourPicker', ['b2b.att.utilities'])
+
+.constant('b2bHourpickerConfig', {
+    dayOptions: [{
+        title: 'sunday',
+        caption: 'Sun',
+        label: 'S',
+        disabled: false
+    }, {
+        title: 'monday',
+        caption: 'Mon',
+        label: 'M',
+        disabled: false
+    }, {
+        title: 'tuesday',
+        caption: 'Tues',
+        label: 'T',
+        disabled: false
+    }, {
+        title: 'wednesday',
+        caption: 'Wed',
+        label: 'W',
+        disabled: false
+    }, {
+        title: 'thursday',
+        caption: 'Thu',
+        label: 'T',
+        disabled: false
+    }, {
+        title: 'friday',
+        caption: 'Fri',
+        label: 'F',
+        disabled: false
+    }, {
+        title: 'saturday',
+        caption: 'Sat',
+        label: 'S',
+        disabled: false
+    }],
+    startTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],
+    startTimeDefaultOptionIndex: -1,
+    startTimeDefaultMeridiem: "am",
+    endTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],
+    endTimeDefaultOptionIndex: -1,
+    endTimeDefaultMeridiem: "pm",
+    sameDayOption: true
+})
+
+.factory('b2bNormalizeHourpickerValues', [function () {
+    var _normalize = function (hourpickerValues) {
+        if (angular.isDefined(hourpickerValues) && hourpickerValues != null) {
+            var finalHourpickerValues = [];
+            var hourpickerValue = {};
+            var days = {};
+            for (var i = 0; i < hourpickerValues.length; i++) {
+                days = hourpickerValues[i].days ? hourpickerValues[i].days : {};
+                hourpickerValue.startTime = hourpickerValues[i].startTime ? hourpickerValues[i].startTime : '';
+                hourpickerValue.startMeridiem = hourpickerValues[i].startMeridiem ? hourpickerValues[i].startMeridiem : '';
+                hourpickerValue.endTime = hourpickerValues[i].endTime ? hourpickerValues[i].endTime : '';
+                hourpickerValue.endMeridiem = hourpickerValues[i].endMeridiem ? hourpickerValues[i].endMeridiem : '';
+                hourpickerValue.days = [];
+
+                var retrieveDaysText = function (daysDetails) {
+                    var daysTexts = [];
+                    var first = -1;
+                    var last = -1;
+                    var index = -1;
+                    for (var i in days) {
+                        if (days[i].value) {
+                            daysTexts.push(i);
+                        }
+                    }
+
+                    first = daysTexts[0];
+                    last = daysTexts[0];
+                    index = 0;
+                    hourpickerValue.days[index] = days[first].caption;
+                    if (daysTexts.length > 1) {
+                        for (var i = 1; i < daysTexts.length; i++) {
+                            if (daysTexts[i] - last === 1) {
+                                last = daysTexts[i];
+                                hourpickerValue.days[index] = days[first].caption + ' - ' + days[last].caption;
+                            } else {
+                                index++;
+                                first = last = daysTexts[i];
+                                hourpickerValue.days[index] = days[first].caption;
+                            }
+                        }
+                    }
+                };
+                retrieveDaysText();
+
+                finalHourpickerValues.push(angular.copy(hourpickerValue));
+            }
+
+            return angular.copy(finalHourpickerValues);
+        }
+    };
+
+    return {
+        normalize: _normalize
+    };
+}])
+
+.directive('b2bHourpicker', ['b2bHourpickerConfig', 'b2bNormalizeHourpickerValues', function (b2bHourpickerConfig, b2bNormalizeHourpickerValues) {
+    return {
+        restrict: 'EA',
+        replace: false,
+        scope: true,
+        require: 'ngModel',
+        templateUrl: 'b2bTemplate/hourPicker/b2bHourpicker.html',
+        controller: ['$scope', function (scope) {
+
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            scope.hourpicker = {};
+            scope.hourpicker.dayOptions = attr.dayOptions ? scope.$parent.$eval(attr.dayOptions) : b2bHourpickerConfig.dayOptions;
+            scope.hourpicker.startTimeOptions = attr.startTimeOptions ? scope.$parent.$eval(attr.startTimeOptions) : b2bHourpickerConfig.startTimeOptions;
+            scope.hourpicker.endTimeOptions = attr.endTimeOptions ? scope.$parent.$eval(attr.endTimeOptions) : b2bHourpickerConfig.endTimeOptions;
+            scope.hourpicker.startTimeDefaultOptionIndex = attr.startTimeDefaultOptionIndex ? scope.$parent.$eval(attr.startTimeDefaultOptionIndex) : b2bHourpickerConfig.startTimeDefaultOptionIndex;
+            scope.hourpicker.endTimeDefaultOptionIndex = attr.endTimeDefaultOptionIndex ? scope.$parent.$eval(attr.endTimeDefaultOptionIndex) : b2bHourpickerConfig.endTimeDefaultOptionIndex;
+            scope.hourpicker.startTimeDefaultMeridiem = attr.startTimeDefaultMeridiem ? scope.$parent.$eval(attr.startTimeDefaultMeridiem) : b2bHourpickerConfig.startTimeDefaultMeridiem;
+            scope.hourpicker.endTimeDefaultMeridiem = attr.endTimeDefaultMeridiem ? scope.$parent.$eval(attr.endTimeDefaultMeridiem) : b2bHourpickerConfig.endTimeDefaultMeridiem;
+            scope.hourpicker.sameDayOption = attr.sameDayOption ? scope.$parent.$eval(attr.sameDayOption) : b2bHourpickerConfig.sameDayOption;
+            scope.hourpicker.editMode = -1;
+
+            scope.hourpickerValues = [];
+            scope.finalHourpickerValues = [];
+            scope.addHourpickerValue = function (hourpickerPanelValue) {
+                if (hourpickerPanelValue) {
+                    if (scope.hourpicker.editMode > -1) {
+                        scope.hourpickerValues[scope.hourpicker.editMode] = hourpickerPanelValue;
+                        scope.hourpicker.editMode = -1;
+                    } else {
+                        scope.hourpickerValues.push(hourpickerPanelValue);
+                    }
+                }
+                scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));
+                ctrl.$setViewValue(angular.copy(scope.hourpickerValues));
+            };
+            ctrl.$render = function () {
+                if (angular.isDefined(ctrl.$modelValue)) {
+                    scope.hourpickerValues = angular.copy(ctrl.$modelValue);
+                    scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));
+                }
+            };
+            scope.editHourpickerValue = function (index) {
+                scope.hourpickerPanelValue = angular.copy(scope.hourpickerValues[index]);
+                scope.hourpicker.editMode = index;
+            };
+            scope.deleteHourpickerValue = function (index) {
+                scope.hourpickerValues.splice(index, 1);
+                scope.resetHourpickerPanelValue();
+                scope.addHourpickerValue();
+            };
+
+            scope.setValidity = function (errorType, errorValue) {
+                ctrl.$setValidity(errorType, errorValue);
+            }
+        }
+    }
+}])
+
+.directive('b2bHourpickerPanel', [function () {
+    return {
+        restrict: 'EA',
+        replace: false,
+        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerPanel.html',
+        controller: ['$scope', function (scope) {
+
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            var hourpickerPanelValueTemplate = {
+                days: {},
+                startTime: '',
+                startMeridiem: 'am',
+                endTime: '',
+                endMeridiem: 'pm'
+            };
+            for (var i = 0; i < scope.hourpicker.dayOptions.length; i++) {
+                hourpickerPanelValueTemplate.days[i] = {
+                    value: false,
+                    title: scope.hourpicker.dayOptions[i].title,
+                    caption: scope.hourpicker.dayOptions[i].caption
+                };
+            }
+            scope.hourpickerPanelValue = {};
+            scope.disableAddBtn = true;
+
+            scope.$watch('hourpickerPanelValue.days', function(){
+                for(var i in scope.hourpickerPanelValue.days)
+                {
+                    if(scope.hourpickerPanelValue.days[i].value)
+                    {
+                        scope.disableAddBtn = false;
+                        break;
+                    }
+                    scope.disableAddBtn = true;
+                }
+            }, true);
+
+            scope.resetHourpickerPanelValue = function () {
+                scope.hourpickerPanelValue = angular.copy(hourpickerPanelValueTemplate);
+                if (scope.hourpicker.startTimeDefaultOptionIndex > -1) {
+                    scope.hourpickerPanelValue.startTime = scope.hourpicker.startTimeOptions[scope.hourpicker.startTimeDefaultOptionIndex];
+                }
+                if (scope.hourpicker.endTimeDefaultOptionIndex > -1) {
+                    scope.hourpickerPanelValue.endTime = scope.hourpicker.endTimeOptions[scope.hourpicker.endTimeDefaultOptionIndex];
+                }
+                scope.hourpickerPanelValue.startMeridiem = scope.hourpicker.startTimeDefaultMeridiem;
+                scope.hourpickerPanelValue.endMeridiem = scope.hourpicker.endTimeDefaultMeridiem;
+                scope.hourpicker.editMode = -1;
+                scope.setValidity('invalidHourpickerData', true);
+                scope.setValidity('invalidHourpickerTimeRange', true);
+            };
+            scope.resetHourpickerPanelValue();
+            scope.updateHourpickerValue = function () {
+                if (scope.isFormValid() && !scope.isTimeOverlap()) {
+                    scope.addHourpickerValue(angular.copy(scope.hourpickerPanelValue));
+                    scope.resetHourpickerPanelValue();
+                }
+            };
+
+            scope.isFormValid = function () {
+                var isStartTimeAvailable = scope.hourpickerPanelValue.startTime ? true : false;
+                var isStartMeridiemAvailable = scope.hourpickerPanelValue.startMeridiem ? true : false;
+                var isEndTimeAvailable = scope.hourpickerPanelValue.endTime ? true : false;
+                var isEndMeridiemAvailable = scope.hourpickerPanelValue.endMeridiem ? true : false;
+                var currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);
+                var currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);
+                var isTimeInProperSequence = currentEndTime > currentStartTime;
+                var isDayChecked = false;
+                for (var i in scope.hourpickerPanelValue.days) {
+                    if (scope.hourpickerPanelValue.days[i].value) {
+                        isDayChecked = true;
+                        break;
+                    }
+                }
+
+                if (isStartTimeAvailable && isStartMeridiemAvailable && isEndTimeAvailable && isEndMeridiemAvailable && isTimeInProperSequence && isDayChecked) {
+                    scope.setValidity('invalidHourpickerData', true);
+                    return true;
+                } else {
+                    scope.setValidity('invalidHourpickerData', false);
+                    return false;
+                }
+            };
+            scope.isTimeOverlap = function () {
+                var selectedDays = [];
+                for (var i in scope.hourpickerPanelValue.days) {
+                    if (scope.hourpickerPanelValue.days[i].value) {
+                        selectedDays.push(i);
+                    }
+                }
+
+                var currentStartTime, currentEndTime, existingStartTime, existingEndTime;
+                currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);
+                currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);
+                for (var i = 0; i < scope.hourpickerValues.length; i++) {
+                    
+                    if (i === scope.hourpicker.editMode) {
+                        continue;
+                    }
+
+                    for (var j = 0; j < selectedDays.length; j++) {
+                        existingStartTime = getTime(scope.hourpickerValues[i].startTime, scope.hourpickerValues[i].startMeridiem);
+                        existingEndTime = getTime(scope.hourpickerValues[i].endTime, scope.hourpickerValues[i].endMeridiem);
+                        if (scope.hourpickerValues[i].days[selectedDays[j]].value) {
+                            if(!scope.hourpicker.sameDayOption){
+                                scope.setValidity('dayAlreadySelected', false);
+                                return true;
+                            } else if ((currentStartTime > existingStartTime && currentStartTime < existingEndTime) || (currentEndTime > existingStartTime && currentEndTime < existingEndTime)) {
+                                scope.setValidity('invalidHourpickerTimeRange', false);
+                                return true;
+                            } else if ((existingStartTime > currentStartTime && existingStartTime < currentEndTime) || (existingEndTime > currentStartTime && existingEndTime < currentEndTime)) {
+                                scope.setValidity('invalidHourpickerTimeRange', false);
+                                return true;
+                            } else if ((currentStartTime === existingStartTime) && (currentEndTime === existingEndTime)) {
+                                scope.setValidity('invalidHourpickerTimeRange', false);
+                                return true;
+                            }
+                        }
+                    }
+                }
+
+                scope.setValidity('dayAlreadySelected', true);
+                scope.setValidity('invalidHourpickerTimeRange', true);
+                return false;
+            };
+            var getTime = function (timeString, meridiem) {
+                var tempDate = new Date();
+                if (timeString && meridiem) {
+                    var timeSplit = timeString.split(':');
+                    var hour = ((meridiem === 'PM' || meridiem === 'pm') && timeSplit[0] !== '12') ? parseInt(timeSplit[0], 10) + 12 : parseInt(timeSplit[0], 10);
+                    tempDate.setHours(hour, parseInt(timeSplit[1], 10), 0, 0);
+                }
+
+                return tempDate.getTime();
+            };
+        }
+    }
+}])
+
+.directive('b2bHourpickerValue', [function () {
+    return {
+        restrict: 'EA',
+        replace: false,
+        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerValue.html',
+        controller: ['$scope', function (scope) {
+
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            scope.hourpickerValue = {};
+            scope.hourpickerValue.startTime = attr.startTime ? scope.$eval(attr.startTime) : '';
+            scope.hourpickerValue.startMeridiem = attr.startMeridiem ? scope.$eval(attr.startMeridiem) : '';
+            scope.hourpickerValue.endTime = attr.endTime ? scope.$eval(attr.endTime) : '';
+            scope.hourpickerValue.endMeridiem = attr.endMeridiem ? scope.$eval(attr.endMeridiem) : '';
+            scope.hourpickerValue.days = attr.days ? scope.$eval(attr.days).join(', ') : '';
+            scope.hourpickerValue.index = attr.b2bHourpickerValue ? scope.$eval(attr.b2bHourpickerValue) : -1;
+        }
+    }
+}]);
+/**
+ * @ngdoc directive
+ * @name Template.att:inputTemplate
+ *
+ * @description
+ *  <file src="src/inputTemplate/docs/readme.md" />
+ *
+ * @usage
+ *  <input type="text" id="fieldId" placeholder="placholder text here" class="span12 input-enhanced" name="fieldName">
+ *
+ * @example
+ <section id="code">
+    <b>HTML + AngularJS</b>
+    <example module="b2b.att">
+        <file src="src/inputTemplate/docs/demo.html" />
+        <file src="src/inputTemplate/docs/demo.js" />
+    </example>
+ </section>
+ */
+angular.module('b2b.att.inputTemplate', []);
+
+/**
+ * @ngdoc directive
+ * @name Navigation.att:leftNavigation
+ *
+ * @description
+ *  <file src="src/leftNavigation/docs/readme.md" />
+ *
+ * @usage
+ *   <b2b-left-navigation data-menu="menuData"></b2b-left-navigation> 
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/leftNavigation/docs/demo.html" />
+            <file src="src/leftNavigation/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.leftNavigation', [])
+    .directive('b2bLeftNavigation', [function () {
+        return {
+            restrict: 'EA',
+            templateUrl: 'b2bTemplate/leftNavigation/leftNavigation.html',
+            scope: {
+                menuData: '='
+            },
+            link: function (scope, element, attrs, ctrl) {
+                scope.idx = -1;
+                scope.itemIdx = -1;
+                scope.navIdx = -1;
+                scope.toggleNav = function (val,link) {
+                    if (val === scope.idx) {
+                        scope.idx = -1;
+                        return;
+                    }
+                    scope.idx = val;
+                };
+                /*New function for ECOMP sdk*/
+                scope.toggleDrawer = function(showmenu){
+                       scope.idx=-1; /*hide the sunmenus*/
+                       if(showmenu){
+                               document.getElementById('page-content').style.paddingLeft = "50px";
+                       }
+                       else
+                               document.getElementById('page-content').style.paddingLeft = "230px";            
+                };
+                scope.liveLink = function (evt, val1, val2) {
+                    scope.itemIdx = val1;
+                    scope.navIdx = val2;
+                    evt.stopPropagation();
+                };
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:links
+ *
+ * @description
+ *  <file src="src/links/docs/readme.md" />
+ * @usage
+ *      <!-- See below examples for link implementation -->
+ *      
+ * @example
+       <section id="code">              
+           <b>HTML + AngularJS</b>
+           <example module="b2b.att">
+           <file src="src/links/docs/demo.html" />
+            <file src="src/links/docs/demo.js" />            
+          </example>          
+        </section>
+ */
+angular.module('b2b.att.links', []);
+/**
+ * @ngdoc directive
+ * @name Misc.att:listbox
+ *
+ * @description
+ *  <file src="src/listbox/docs/readme.md" />
+ *
+ * @param {int} currentIndex - Current index of selected listbox item. Is not supported on multiselect listbox
+ * @param {Array} listboxData - Data of listbox items. Should include full data regardless if HTML will be filtered.
+
+ * @example
+ *  <section id="code">   
+     <example module="b2b.att">
+     <file src="src/listbox/docs/demo.html" />
+     <file src="src/listbox/docs/demo.js" />
+     </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.listbox', ['b2b.att.utilities'])
+.directive('b2bListBox', ['keymap', 'b2bDOMHelper', '$rootScope', function(keymap, b2bDOMHelper, $rootScope) {
+                return {
+                    restrict: 'AE',
+                    transclude: true,
+                    replace: true,
+                    scope: {
+                        currentIndex: '=', 
+                        listboxData: '='
+                    },
+                    templateUrl: 'b2bTemplate/listbox/listbox.html',
+                    link: function(scope, elem, attr) {
+
+                        if (attr.ariaMultiselectable !== undefined || attr.ariaMultiselectable === 'true') {
+                            scope.multiselectable = true;
+                        } else {
+                            scope.multiselectable = false;
+                        }
+
+                        var shiftKey = false;
+                        var elements = [];
+                        var prevDirection = undefined; // previous direction is used for an edge case when shifting
+                        var shiftKeyPressed = false; // Used to handle shift clicking
+                        var ctrlKeyPressed = false;
+
+                        var currentIndexSet = {
+                            'elementIndex': 0,
+                            'listboxDataIndex': 0
+                        };
+
+                        /*scope.$watch('currentIndex', function(oldVal, newVal) {
+                            if (angular.equals(oldVal, newVal)) return;
+                            if (!scope.multiselectable) {
+                                // This doesn't garuntee anything. index will update on focus based on rules
+                                currentIndexSet.listboxDataIndex = scope.currentIndex;
+                                // Should this occur? 
+                                //scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;
+
+                                // Update elementIndex
+                                elements = elem.children();
+                                var indecies = Array.prototype.map.call(elements, function(item) {
+                                    return parseInt(angular.element(item).attr('data-index'), 10);
+                                }).filter(function(item) {
+                                    return item === scope.currentIndex;
+                                });
+                                currentIndex.elementIndex = indecies[0];
+                                //focusOnElement(currentIndexSet.elementIndex); // This isn't shifting focus
+                                if (!scope.$$phase) {
+                                    scope.$apply();
+                                }
+                            }
+                        });*/
+
+                        function isTrue(item) {
+                            if (item.selected === true) {
+                                return true;
+                            }
+                        }
+
+                        function incrementIndex(elem) {
+                            $rootScope.$apply();
+
+                            var nextElem = elem.next();
+                            if (!angular.isDefined(nextElem) || nextElem.length === 0) {
+                                return;
+                            }
+
+                            currentIndexSet.elementIndex += 1;
+                            currentIndexSet.listboxDataIndex = parseInt(nextElem.attr('data-index'), 10);
+                            scope.currentIndex = currentIndexSet.listboxDataIndex;
+
+                            if (currentIndexSet.elementIndex >= elements.length - 1) {
+                                currentIndexSet.elementIndex = elements.length-1;
+                            }
+                        }
+
+                        function decrementIndex(elem) {
+                            $rootScope.$apply();
+                            var prevElem = angular.element(b2bDOMHelper.previousElement(elem));
+                            if (!angular.isDefined(prevElem) || prevElem.length === 0) {
+                                return;
+                            }
+
+                            currentIndexSet.elementIndex -= 1;
+                            currentIndexSet.listboxDataIndex = parseInt(prevElem.attr('data-index'), 10);
+                            scope.currentIndex = currentIndexSet.listboxDataIndex;
+
+                            if (currentIndexSet.elementIndex <= 0) {
+                                currentIndexSet.elementIndex = 0;
+                            }
+                        }
+
+                        var focusOnElement = function(index) {
+                            try {
+                                elements[index].focus();
+                            } catch (e) {};
+                        }
+
+                        function selectItems(startIndex, endIndex, forceValue) {
+                            for (var i = startIndex; i < endIndex; i++) {
+                                if (forceValue === undefined) {
+                                    // We will flip the value
+                                    scope.listboxData[i].selected = !scope.listboxData[i].selected;
+                                } else {
+                                    scope.listboxData[i].selected = forceValue;
+                                }
+                            }
+
+                            if (!scope.$$phase) {
+                                scope.$apply();
+                            }
+                        }
+
+                        elem.bind('focus', function(evt) { 
+                            // If multiselectable or not and nothing is selected, put focus on first element 
+                            // If multiselectable and a range is set, put focus on first element of range 
+                            // If not multiselectable and something selected, put focus on element 
+                            elements = elem.children(); 
+                             var selectedItems = scope.listboxData.filter(isTrue); 
+                             var elementsIndies = Array.prototype.map.call(elements, function(item) {
+                                return parseInt(angular.element(item).attr('data-index'), 10);
+                            });
+                            if (selectedItems.length == 0) { 
+                                focusOnElement(0); 
+                                currentIndexSet.listboxDataIndex = 0;
+                            } else if (attr.ariaMultiselectable) { 
+                                var index = scope.listboxData.indexOf(selectedItems[0]); 
+                                var indies = elementsIndies.filter(function(item) {
+                                    return (item === index);
+                                });
+
+                                if (indies.length === 0 || indies[0] != index) {
+                                    // Set focused on 0
+                                    currentIndexSet.elementIndex = elementsIndies[0]; 
+                                    currentIndexSet.listboxDataIndex = 0;
+                                    focusOnElement(currentIndexSet.elementIndex);
+                                } else {
+                                    focusOnElement(indies[0]); 
+                                    currentIndexSet.elementIndex = indies[0];
+                                    currentIndexSet.listboxDataIndex = index;
+                                }
+                            } else { 
+                                focusOnElement(currentIndexSet.elementIndex);  
+                            }
+                            scope.currentIndex = currentIndexSet.listboxDataIndex;
+
+                            if (!scope.$$phase) {
+                                scope.$apply();
+                            }
+                        });
+                        elem.bind('keyup', function(evt) {
+                            if (evt.keyCode === keymap.KEY.SHIFT) {
+                                shiftKeyPressed = false;
+                            } else if (evt.keyCode === keymap.KEY.CTRL) {
+                                ctrlKeyPressed = false;
+                            }
+                        });
+        
+                        elem.bind('keydown', function(evt) {
+                            var keyCode = evt.keyCode;
+                            elements = elem.children();
+                            if (keyCode === keymap.KEY.SHIFT) {
+                                shiftKeyPressed = true;
+                            } else if (evt.keyCode === keymap.KEY.CTRL) {
+                                ctrlKeyPressed = true;
+                            }
+
+                            switch(keyCode) {
+                                case 65: // A key
+                                {
+                                    if (scope.multiselectable && evt.ctrlKey) {
+                                        var arr = scope.listboxData.filter(isTrue);
+                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {
+                                            return parseInt(angular.element(item).attr('data-index'), 10);
+                                        });
+                                        var val = !(arr.length === scope.listboxData.length);
+                                        for (var i = 0; i < elementsIndies.length; i++) {
+                                            scope.listboxData[elementsIndies[i]].selected = val;
+                                        }
+
+                                        if (!scope.$$phase) {
+                                            scope.$apply();
+                                        }
+                                        
+                                        evt.preventDefault();
+                                        evt.stopPropagation();
+                                    }
+                                    break;
+                                }
+                                case keymap.KEY.END:
+                                {
+                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {
+                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {
+                                            return parseInt(angular.element(item).attr('data-index'), 10);
+                                        }).filter(function(item) {
+                                            return (item >= currentIndexSet.listboxDataIndex);
+                                        });
+                                        for (var i = 0; i < elementsIndies.length; i++) {
+                                            scope.listboxData[elementsIndies[i]].selected = true;
+                                        }
+                                        evt.preventDefault();
+                                        evt.stopPropagation();
+
+                                        if (!scope.$$phase) {
+                                            scope.$apply();
+                                        }
+                                    }
+                                    break;
+                                }
+                                case keymap.KEY.HOME: 
+                                {
+                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {
+                                        selectItems(0, currentIndexSet.listboxDataIndex+1, true); // currentIndex+1 is what is being focused on
+                                        evt.preventDefault();
+                                        evt.stopPropagation();
+                                    }
+                                    break;
+                                }
+                                case keymap.KEY.LEFT:
+                                case keymap.KEY.UP:
+                                {
+                                    if (currentIndexSet.listboxDataIndex === 0) {
+                                        evt.preventDefault();
+                                        evt.stopPropagation();
+                                        return;
+                                    }
+
+                                    decrementIndex(elements.eq(currentIndexSet.elementIndex));
+                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {
+                                        if (evt.shiftKey) {
+                                            if (prevDirection === 'DOWN') {
+                                                scope.listboxData[currentIndexSet.listboxDataIndex+1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex+1].selected;
+                                            }
+                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;
+                                        }
+                                        prevDirection = 'UP';
+                                    } else {
+                                        // If no modifier keys are selected, all other items need to be unselected.
+                                        prevDirection = undefined;
+                                        selectItems(0, scope.listboxData.length, false);
+                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;
+                                    }
+                                    focusOnElement(currentIndexSet.elementIndex);
+                                    if(!scope.$$phase) {
+                                        scope.$apply();
+                                    }
+                                    evt.preventDefault();
+                                    evt.stopPropagation();
+                                    break;
+                                }
+                                case keymap.KEY.RIGHT:
+                                case keymap.KEY.DOWN:
+                                {
+                                    if (currentIndexSet.listboxDataIndex === scope.listboxData.length-1) {
+                                        evt.preventDefault();
+                                        evt.stopPropagation();
+                                        return;
+                                    }
+
+                                    incrementIndex(elements.eq(currentIndexSet.elementIndex));
+                                    
+                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {
+                                        if (evt.shiftKey) {
+                                            if (prevDirection === 'UP') {
+                                                scope.listboxData[currentIndexSet.listboxDataIndex-1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex-1].selected;
+                                            }
+                                            
+                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;    
+                                        }
+                                        prevDirection = 'DOWN';
+                                    } else {
+                                        // If no modifier keys are selected, all other items need to be unselected.
+                                        prevDirection = undefined;
+                                        selectItems(0, scope.listboxData.length, false);
+                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;
+                                    }
+
+                                    focusOnElement(currentIndexSet.elementIndex);
+                                    if(!scope.$$phase) {
+                                        scope.$apply();
+                                    }
+                                    evt.preventDefault();
+                                    evt.stopPropagation();
+                                    break;
+                                }
+                                case keymap.KEY.TAB:
+                                    if(evt.shiftKey) {
+                                        var previousElement = b2bDOMHelper.previousElement(elem.parent().parent(), true);
+                                        evt.preventDefault();
+                                        previousElement.focus();
+                                    }
+                                    break;
+                                default:
+                                    break;
+                            }
+                        });
+
+                        elem.bind('click', function(evt) {
+                            var index = parseInt(evt.target.dataset.index, 10);
+                            if (index === undefined || isNaN(index)) {
+                                return;
+                            }
+                            if (scope.multiselectable && currentIndexSet.listboxDataIndex !== undefined) {
+                                if (shiftKeyPressed) {
+                                    var min = Math.min(index, currentIndexSet.listboxDataIndex);
+                                    var max = Math.max(index, currentIndexSet.listboxDataIndex);
+
+                                    if (index === min) { // clicking up
+                                        var firstIndex = scope.listboxData.findIndex(function(item) { return item.selected === true;});
+                                        // Given the firstIndex, let's find the matching element to get proper element match
+                                        elements = elem.children();
+                                        elements.eq(firstIndex)
+                                        var elementsThatMatch = Array.prototype.filter.call(elements, function(item) {
+                                            if (parseInt(angular.element(item).attr('data-index'), 10) === firstIndex) {
+                                                return true;
+                                            }
+                                        });
+                                        firstIndex = parseInt(angular.element(elementsThatMatch).attr('data-index'), 10);
+                                        
+                                        if (index <= firstIndex && scope.listboxData.filter(isTrue).length > 1) {
+                                            // Break the selection into 2
+                                            selectItems(firstIndex + 1, max + 1, undefined); // + 1 needed because selectItems only selects up to MAX
+                                            selectItems(min, firstIndex, undefined); 
+                                        } else if (scope.listboxData.filter(isTrue).length == 1){
+                                            selectItems(min, max, undefined); 
+                                        } else {
+                                            selectItems(min + 1, max + 1, undefined);
+                                        }
+                                    } else { // clicking down
+                                        selectItems(min + 1, max + 1, scope.listboxData[min].selected);
+                                    }
+                                } else if (ctrlKeyPressed) {
+                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;
+                                } else {
+                                    selectItems(0, scope.listboxData.length, false);
+                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;
+                                }
+                            } else {
+                                selectItems(0, scope.listboxData.length, false);
+                                scope.listboxData[index].selected = !scope.listboxData[index].selected;
+                            }
+                            currentIndexSet.elementIndex = index;
+                            currentIndexSet.listboxDataIndex = index;
+                            scope.currentIndex = currentIndexSet.listboxDataIndex;
+                            if (!scope.$$phase) {
+                                scope.$apply();
+                            }
+                            focusOnElement(index);
+                        });
+                    }
+                };
+            }]);
+/**
+ * @ngdoc directive
+ * @name Videos, audio & animation.att:loaderAnimation
+ *
+ * @description
+ *  <file src="src/loaderAnimation/docs/readme.md" />
+ *
+ * @usage
+ *   <!-- Below demo js shows-->
+ *   Angular library uses Global.css's icon-primary-spinner.
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/loaderAnimation/docs/demo.html" />
+            <file src="src/loaderAnimation/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.loaderAnimation', [])
+    .constant('b2bSpinnerConfig', {
+        loadingText: 'Loading...',
+        startEvent: 'startButtonSpinner',
+        stopEvent: 'stopButtonSpinner'
+    })
+    .constant("progressTrackerConfig", {
+        loadingText: 'Loading...',
+        minDuration: "",
+        activationDelay: "",
+        minDurationPromise: "",
+        activationDelayPromise: ""
+    })
+
+.provider('progressTracker', function () {
+    this.$get = ['$q', '$timeout', function ($q, $timeout) {
+        function cancelTimeout(promise) {
+            if (promise) {
+                $timeout.cancel(promise);
+            }
+        }
+        return function ProgressTracker(options) {
+            //do new if user doesn't
+            if (!(this instanceof ProgressTracker)) {
+                return new ProgressTracker(options);
+            }
+
+            options = options || {};
+            //Array of promises being tracked
+            var tracked = [];
+            var self = this;
+            //Allow an optional "minimum duration" that the tracker has to stay active for.
+            var minDuration = options.minDuration;
+            //Allow a delay that will stop the tracker from activating until that time is reached
+            var activationDelay = options.activationDelay;
+            var minDurationPromise;
+            var activationDelayPromise;
+            self.active = function () {
+                //Even if we have a promise in our tracker, we aren't active until delay is elapsed
+                if (activationDelayPromise) {
+                    return false;
+                }
+                return tracked.length > 0;
+            };
+            self.tracking = function () {
+                //Even if we aren't active, we could still have a promise in our tracker
+                return tracked.length > 0;
+            };
+            self.destroy = self.cancel = function () {
+                minDurationPromise = cancelTimeout(minDurationPromise);
+                activationDelayPromise = cancelTimeout(activationDelayPromise);
+                for (var i = tracked.length - 1; i >= 0; i--) {
+                    tracked[i].resolve();
+                }
+                tracked.length = 0;
+            };
+            //Create a promise that will make our tracker active until it is resolved.
+            // @return deferred - our deferred object that is being tracked
+            self.createPromise = function () {
+                var deferred = $q.defer();
+                tracked.push(deferred);
+                //If the tracker was just inactive and this the first in the list of promises, we reset our delay and minDuration again.
+                if (tracked.length === 1) {
+                    if (activationDelay) {
+                        activationDelayPromise = $timeout(function () {
+                            activationDelayPromise = cancelTimeout(activationDelayPromise);
+                            startMinDuration();
+                        }, activationDelay);
+                    } else {
+                        startMinDuration();
+                    }
+                }
+                deferred.promise.then(onDone(false), onDone(true));
+                return deferred;
+
+                function startMinDuration() {
+                    if (minDuration) {
+                        minDurationPromise = $timeout(angular.noop, minDuration);
+                    }
+                }
+                //Create a callback for when this promise is done. It will remove our tracked promise from the array if once minDuration is complete
+                function onDone() {
+                    return function () {
+                        (minDurationPromise || $q.when()).then(function () {
+                            var index = tracked.indexOf(deferred);
+                            tracked.splice(index, 1);
+                            //If this is the last promise, cleanup the timeouts for activationDelay
+                            if (tracked.length === 0) {
+                                activationDelayPromise = cancelTimeout(activationDelayPromise);
+                            }
+                        });
+                    };
+                }
+            };
+            self.addPromise = function (promise) {
+                
+//                we cannot assign then function in other var and then add the resolve and reject 
+                var thenFxn = promise && (promise.then || promise.$then || (promise.$promise && promise.$promise.then));                
+                if (!thenFxn) {
+                    throw new Error("progressTracker expects a promise object :: Not found");
+                }
+                var deferred = self.createPromise();
+                //When given promise is done, resolve our created promise
+                //Allow $then for angular-resource objects
+
+                promise.then(function (value) {
+                        deferred.resolve(value);
+                        return value;
+                    }, function (value) {
+                        deferred.reject(value);
+                        return $q.reject(value);
+                    }
+                );
+                return deferred;
+            };
+        };
+    }];
+})
+
+.config(['$httpProvider', function ($httpProvider) {
+    $httpProvider.interceptors.push(['$q', 'progressTracker', function ($q) {
+        return {
+            request: function (config) {
+                if (config.tracker) {
+                    if (!angular.isArray(config.tracker)) {
+                        config.tracker = [config.tracker];
+                    }
+                    config.$promiseTrackerDeferred = config.$promiseTrackerDeferred || [];
+
+                    angular.forEach(config.tracker, function (tracker) {
+                        var deferred = tracker.createPromise();
+                        config.$promiseTrackerDeferred.push(deferred);
+                    });
+                }
+                return $q.when(config);
+            },
+            response: function (response) {
+                if (response.config && response.config.$promiseTrackerDeferred) {
+                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {
+                        deferred.resolve(response);
+                    });
+                }
+                return $q.when(response);
+            },
+            responseError: function (response) {
+                if (response.config && response.config.$promiseTrackerDeferred) {
+                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {
+                        deferred.reject(response);
+                    });
+                }
+                return $q.reject(response);
+            }
+        };
+    }]);
+}])
+
+.directive('b2bClickSpin', ['$timeout', '$parse', '$rootScope', 'progressTracker', function ($timeout, $parse, $rootScope, progressTracker) {
+    return {
+        restrict: 'A',
+        link: function (scope, elm, attrs) {
+            var fn = $parse(attrs.b2bClickSpin);
+            elm.on('click', function (event) {
+                var promise = $timeout(function () {console.log("inside Promise")}, 5000);
+                scope.$apply(function () {
+                    fn(scope, {
+                        $event: event
+                    });
+                });
+                //comment this line if not running unit test
+                $rootScope.loadingTracker = progressTracker({
+                    minDuration: 750
+                });
+                $rootScope.loadingTracker.addPromise(promise);
+                angular.forEach("$routeChangeSuccess $viewContentLoaded $locationChangeSuccess".split(" "), function (event) {
+                    $rootScope.$on(event, function () {
+
+                        $timeout.cancel(promise);
+                    });
+                });
+            });
+        }
+    };
+}])
+
+.directive('b2bProgressTracker', ['progressTrackerConfig', function (ptc) {
+    return {
+        restrict: 'EA',
+        replace: true,
+        template: '<div><div ng-show="loadingTracker.active()" style="width:100%; text-align:center"><i class=\"icon-primary-spinner\"></i></div><div ng-show="loadingTracker.active()" style="width:100%;margin-top:10px; text-align:center">'+ ptc.loadingText+'</div></div>'
+    };
+}])
+
+.directive('b2bLoadButton', ['b2bSpinnerConfig', '$timeout', function (spinnerConfig, $timeout) {
+    var spinButton = function (state, element, data) {
+        
+        var attr = element.html() ? 'html' : 'val';
+        state = state + 'Text';
+        if (state === 'loadingText') {
+            element[attr](data[state]);
+            element.attr("disabled",'disabled');
+            element.addClass('disabled');
+        } else if (state === 'resetText') {
+            element[attr](data[state]);
+            element.removeAttr("disabled");
+            element.removeClass('disabled');
+        }
+    };
+
+    return {
+        restrict: 'A',
+        replace: false,
+        scope: {
+            promise: '=promise',
+            startEvent: '@startEvent',
+            stopEvent: '@stopEvent'
+        },
+        link: function (scope, element, attr) {
+            var validAttr = element.html() ? 'html' : 'val';
+            var data = {
+                loadingText: '',
+                resetText: ''
+            };
+
+            var updateLoadingText = function (val) {
+                var loadingText = val;
+                if (!angular.isDefined(loadingText) || loadingText === "") {
+                    loadingText = spinnerConfig.loadingText;
+                }
+                data.loadingText = validAttr === 'html' ? "<i class=\"icon-primary-spinner small\"></i>" + loadingText : loadingText;
+            };
+            var updateResetText = function (val) {
+                data.resetText = val;
+            };
+
+            attr.$observe('b2bLoadButton', function (val) {
+                updateLoadingText(val);
+            });
+            $timeout(function () {
+                updateResetText(element[validAttr]());
+            }, 500);
+
+            if (!angular.isDefined(scope.startEvent) || scope.startEvent === "") {
+                scope.startEvent = spinnerConfig.startEvent;
+            }
+
+            if (!angular.isDefined(scope.stopEvent) || scope.stopEvent === "") {
+                scope.stopEvent = spinnerConfig.stopEvent;
+            }
+
+            scope.$watch('promise', function () {
+                if (angular.isDefined(scope.promise) && angular.isFunction(scope.promise.then)) {
+                    spinButton('loading', element, data);
+                    scope.promise.then(function () {
+                        spinButton('reset', element, data);
+                    }, function () {
+                        spinButton('reset', element, data);
+                    });
+                }
+            });
+
+            scope.$on(scope.startEvent, function () {
+                spinButton('loading', element, data);
+                scope.$on(scope.stopEvent, function () {
+                    spinButton('reset', element, data);
+                });
+            });
+        }
+    };
+}])
+
+
+;
+ /**
+ * @ngdoc directive
+ * @name Misc.att:messageWrapper
+ * @scope
+ * @param {boolean} trigger - A boolean that triggers directive to switch focus
+ * @param {integer} delay  - Extra delay added to trigger code to allow for DOM to be ready. Default is 10ms.
+ * @param {string} noFocus - Attribute-based API to trigger whether first focusable element receives focus on trigger or whole message (assumes tabindex="-1" set on first child)
+ * @param {string} trapFocus - Attribute-based API to trap focus within the message. This should be enabled by default on all toast messages.
+ * @description
+ *  <file src="src/messageWrapper/docs/readme.md" />
+ * @usage
+ * <b2b-message-wrapper>Code that contains at least one focusable element and will be shown/hidden on some logic. This must have tabindex="-1".</b2b-message-wrapper>
+ *
+ * @example
+ *  <section id="code">   
+ <b>HTML + AngularJS</b>
+ <example module="b2b.att">
+ <file src="src/messageWrapper/docs/demo.html" />
+ <file src="src/messageWrapper/docs/demo.js" />
+ </example>
+ </section>
+ *
+ */
+angular.module('b2b.att.messageWrapper', ['b2b.att.utilities'])
+.directive('b2bMessageWrapper', ['b2bDOMHelper', '$compile', '$timeout', '$log', function(b2bDOMHelper, $compile, $timeout, $log) {
+  return {
+    restrict: 'AE',
+    scope: {
+      trigger: '=',
+      delay: '=?'
+    },
+    transclude: true,
+    replace: true,
+    template: '<div ng-transclude></div>',
+    link: function(scope, elem, attrs) {
+      scope.delay = scope.delay || 10;
+
+      if (attrs.trapFocus != undefined && !elem.children().eq(0).attr('b2b-trap-focus-inside-element')) {
+        // Append b2bTrapFocusInsideElement onto first child and recompile
+        elem.children().eq(0).attr('b2b-trap-focus-inside-element', 'false');
+        elem.children().eq(0).attr('trigger', scope.trigger);
+        $compile(elem.contents())(scope);
+      }
+
+      var firstElement = undefined,
+          launchingElement = undefined;
+      
+      scope.$watch('trigger', function(oldVal, newVal) {
+        if (oldVal === newVal) return;
+        if (!angular.isDefined(launchingElement)) {
+          launchingElement = document.activeElement;
+        }
+        $timeout(function() {
+          if (scope.trigger) {
+
+            if (attrs.noFocus === true || attrs.noFocus === "") {
+              elem.children()[0].focus();
+            } else {
+              firstElement = b2bDOMHelper.firstTabableElement(elem);
+
+              if (angular.isDefined(firstElement)) {
+                firstElement.focus();
+              }
+            }
+            
+          } else {
+            if (angular.isDefined(launchingElement) && launchingElement.nodeName !== 'BODY') {
+              if (launchingElement === document.activeElement) {
+                return;
+              }
+
+              if (b2bDOMHelper.isInDOM(launchingElement) && b2bDOMHelper.isTabable(launchingElement)) {
+                  // At this point, launchingElement is still a valid element, but focus will fail and 
+                  // activeElement will become body, hence we want to apply custom logic and find previousElement
+                  var prevLaunchingElement = launchingElement;
+                  launchingElement.focus();
+
+                  if (document.activeElement !== launchingElement || document.activeElement.nodeName === 'BODY') {
+                    launchingElement = b2bDOMHelper.previousElement(angular.element(prevLaunchingElement), true);
+                    launchingElement.focus();
+                  }
+              } else {
+                launchingElement = b2bDOMHelper.previousElement(launchingElement, true);
+                launchingElement.focus();
+              }
+            }
+          }
+        }, scope.delay); 
+      });
+    }
+  };
+}]);
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:modalsAndAlerts
+ *
+ * @description
+ *  <file src="src/modalsAndAlerts/docs/readme.md" />
+ *
+ * @usage
+ *  <button class="btn" b2b-modal="b2bTemplate/modalsAndAlerts/demo_modal.html" modal-ok="ok()" modal-cancel="cancel()">Launch demo modal</button>
+ *
+ * @example
+ *  <section id="code">
+     <example module="b2b.att">
+      <file src="src/modalsAndAlerts/docs/demo.html" />
+      <file src="src/modalsAndAlerts/docs/demo.js" />
+     </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.modalsAndAlerts', ['b2b.att.position', 'b2b.att.transition', 'b2b.att.utilities'])
+
+/**
+ * A helper, internal data structure that acts as a map but also allows getting / removing
+ * elements in the LIFO order
+ */
+.factory('$$stackedMap', function () {
+    return {
+        createNew: function () {
+            var stack = [];
+
+            return {
+                add: function (key, value) {
+                    stack.push({
+                        key: key,
+                        value: value
+                    });
+                },
+                get: function (key) {
+                    for (var i = 0; i < stack.length; i++) {
+                        if (key === stack[i].key) {
+                            return stack[i];
+                        }
+                    }
+                },
+                keys: function () {
+                    var keys = [];
+                    for (var i = 0; i < stack.length; i++) {
+                        keys.push(stack[i].key);
+                    }
+                    return keys;
+                },
+                top: function () {
+                    return stack[stack.length - 1];
+                },
+                remove: function (key) {
+                    var idx = -1;
+                    for (var i = 0; i < stack.length; i++) {
+                        if (key === stack[i].key) {
+                            idx = i;
+                            break;
+                        }
+                    }
+                    return stack.splice(idx, 1)[0];
+                },
+                removeTop: function () {
+                    return stack.splice(stack.length - 1, 1)[0];
+                },
+                length: function () {
+                    return stack.length;
+                }
+            };
+        }
+    };
+}).factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {
+    var elementStack = [];
+    var stackHead = undefined;
+    var firstTabableElement, lastTabableElement;
+
+    var trapKeyboardFocusInFirstElement = function (e) {
+        if (!e.keyCode) {
+            e.keyCode = e.which;
+        }
+
+        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {
+            lastTabableElement[0].focus();
+            e.preventDefault(e);
+            e.stopPropagation(e);
+        }
+
+    };
+
+    var trapKeyboardFocusInLastElement = function (e) {
+        if (!e.keyCode) {
+            e.keyCode = e.which;
+        }
+
+        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {
+            firstTabableElement[0].focus();
+            e.preventDefault(e);
+            e.stopPropagation(e);
+        }
+    };
+    
+    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {
+        var bodyElements = $document.find('body').children();
+
+        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));
+        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));
+
+        if (flag) {
+            for (var i = 0; i < bodyElements.length; i++) {
+                if (bodyElements[i] !== stackHead[0]) {
+                    bodyElements.eq(i).attr('aria-hidden', true);
+                }
+            }
+            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);
+        } else {
+            for (var j = 0; j < bodyElements.length; j++) {
+                if (bodyElements[j] !== stackHead[0]) {
+                    bodyElements.eq(j).removeAttr('aria-hidden');
+                }
+            }
+            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);
+        }
+    };
+    var toggleTrapFocusInElement = function (flag, element) {
+        if (angular.isDefined(flag) && angular.isDefined(element)) {
+            if (angular.isUndefined(stackHead)) {
+                stackHead = element;
+                trapFocusInElement(flag);
+            } else {
+                if (flag) {
+                    trapFocusInElement(false);
+                    elementStack.push(stackHead);
+                    stackHead = element;
+                    trapFocusInElement(true);
+                } else {
+                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {
+                        trapFocusInElement(false);
+                        stackHead = elementStack.pop();
+                        if (angular.isDefined(stackHead)) {
+                            trapFocusInElement(true);
+                        }
+                    }
+                }
+            }
+        }else {
+            if (angular.isDefined(stackHead)) {
+                trapFocusInElement(false, firstTabableElement, lastTabableElement);
+                trapFocusInElement(true);
+            }
+        }
+    };
+
+    return toggleTrapFocusInElement;
+}])
+
+/**
+ * A helper directive for the $modal service. It creates a backdrop element.
+ */
+.directive('b2bModalBackdrop', ['$modalStack', '$timeout', function ($modalStack, $timeout) {
+    return {
+        restrict: 'EA',
+        replace: true,
+        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html',
+        link: function (scope, element, attrs) {
+            scope.close = function (evt) {
+                var modal = $modalStack.getTop();
+                if (modal && modal.value.backdrop && modal.value.backdrop !== 'static') {
+                    evt.preventDefault();
+                    evt.stopPropagation();
+                    $modalStack.dismiss(modal.key, 'backdrop click');
+                }
+            };
+        }
+    };
+}])
+
+.directive('b2bModalWindow', ['$timeout', 'windowOrientation', '$window', function ($timeout, windowOrientation, $window) {
+    return {
+        restrict: 'EA',
+        scope: {
+            index: '@'
+        },
+        replace: true,
+        transclude: true,
+        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-window.html',
+        controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {
+            scope.windowClass = attrs.windowClass || '';
+            scope.sizeClass = attrs.sizeClass || '';
+            scope.isNotifDialog = false;
+
+            this.setTitle = function (title) {
+                scope.title = title;
+            };
+            this.setContent = function (content) {
+                scope.content = content;
+                scope.isNotifDialog = true;
+            };
+            this.isDockedModal = scope.windowClass.indexOf('modal-docked') > -1;
+        }],
+        link: function (scope, element, attrs, ctrl) {
+            if (ctrl.isDockedModal) {
+                scope.isModalLandscape = false;
+
+                var window = angular.element($window);
+                scope.updateCss = function () {
+                    if (windowOrientation.isPotrait()) { // Potrait Mode
+                        scope.isModalLandscape = false;
+                    } else if (windowOrientation.isLandscape()) { // Landscape Mode
+                        scope.isModalLandscape = true;
+                    }
+                };
+
+                $timeout(function () {
+                    scope.updateCss();
+                    scope.$apply();
+                }, 100);
+                window.bind('orientationchange', function () {
+                    scope.updateCss();
+                    scope.$apply();
+                });
+                window.bind('resize', function () {
+                    scope.updateCss();
+                    scope.$apply();
+                });
+            }else {
+                angular.element(element[0].querySelectorAll(".awd-select-list")).css({
+                    "max-height": "200px"
+                });
+            }
+
+            var isIE = /msie|trident/i.test(navigator.userAgent);
+            if (isIE) {
+                if(angular.element(element[0].querySelector('.corner-button button.close')).length > 0){
+                    angular.element(element[0].querySelector('.corner-button button.close')).bind('focus', function () {
+                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollLeft = 0;
+                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollTop = 0;
+                    });
+                }
+            }
+            
+        }
+    };
+}])
+
+.directive('b2bModalTitle', [function () {
+    return {
+        restrict: 'A',
+        require: '^b2bModalWindow',
+        link: function (scope, elem, attr, ctrl) {
+            ctrl.setTitle(attr.id);
+        }
+    };
+}])
+
+.directive('b2bModalContent', [function () {
+    return {
+        restrict: 'A',
+        require: '^b2bModalWindow',
+        link: function (scope, elem, attr, ctrl) {
+            ctrl.setContent(attr.id);
+        }
+    };
+}])
+
+
+.directive('b2bModalBody', ['$timeout', '$position', '$document', '$window', 'windowOrientation', 'b2bAwdBreakpoints', function ($timeout, $position, $document, $window, windowOrientation, b2bAwdBreakpoints) {
+    return {
+        restrict: 'AC',
+        scope: {
+            index: '@'
+        },
+        require: '^b2bModalWindow',
+        link: function (scope, element, attrs, ctrl) {
+            var window = angular.element($window);
+            var body = $document.find('body').eq(0);
+            scope.setModalHeight = function () {
+                var modalHeaderHeight, modalFooterHeight, modalBodyHeight, windowHeight, windowWidth, modalHeight;
+                modalHeaderHeight = 0;
+                modalFooterHeight = 0;
+                windowHeight = $window.innerHeight;
+                windowWidth = $window.innerWidth;
+                body.css({
+                    'height': windowHeight + 'px'
+                });
+
+                if (ctrl.isDockedModal) {
+                    var modalElements = element.parent().children();
+                    for (var i = 0; i < modalElements.length; i++) {
+                        if (modalElements.eq(i).hasClass('b2b-modal-header')) {
+                            modalHeaderHeight = $position.position(modalElements.eq(i)).height;
+                        } else if (modalElements.eq(i).hasClass('b2b-modal-footer')) {
+                            modalFooterHeight = $position.position(modalElements.eq(i)).height;
+                        }
+                    }
+
+                    modalHeight = $position.position(element.parent()).height;
+
+                    modalBodyHeight = modalHeight - (modalHeaderHeight + modalFooterHeight) + 'px';
+
+                    if (windowOrientation.isPotrait()) { // Potrait Mode
+                        element.removeAttr('style').css({
+                            height: modalBodyHeight
+                        });
+                    } else if (windowOrientation.isLandscape() && windowWidth < b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Mobile
+                        element.removeAttr('style');
+                    } else if (windowOrientation.isLandscape() && windowWidth >= b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Non-Mobile
+                        element.removeAttr('style').css({
+                            height: modalBodyHeight
+                        });
+                    }
+                }
+            };
+
+            $timeout(function () {
+                scope.setModalHeight();
+                scope.$apply();
+            }, 100);
+            window.bind('orientationchange', function () {
+                scope.setModalHeight();
+                scope.$apply();
+            });
+            window.bind('resize', function () {
+                scope.setModalHeight();
+                scope.$apply();
+            });
+        }
+    };
+}])
+
+.directive('b2bModalFooter', ['windowOrientation', '$window', function (windowOrientation, $window) {
+    return {
+        restrict: 'AC',
+        scope: {
+            index: '@'
+        },
+        link: function (scope, element, attrs) {
+
+        }
+    };
+}])
+
+.factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap', '$log', '$timeout', 'trapFocusInElement', function ($document, $compile, $rootScope, $$stackedMap, $log, $timeout, trapFocusInElement) {
+    var backdropjqLiteEl, backdropDomEl;
+    var backdropScope = $rootScope.$new(true);
+    var body = $document.find('body').eq(0);
+    var html = $document.find('html').eq(0);
+    var openedWindows = $$stackedMap.createNew();
+    var $modalStack = {};
+
+    function backdropIndex() {
+        var topBackdropIndex = -1;
+        var opened = openedWindows.keys();
+        for (var i = 0; i < opened.length; i++) {
+            if (openedWindows.get(opened[i]).value.backdrop) {
+                topBackdropIndex = i;
+            }
+        }
+        return topBackdropIndex;
+    }
+
+    $rootScope.$watch(backdropIndex, function (newBackdropIndex) {
+        backdropScope.index = newBackdropIndex;
+    });
+
+    function removeModalWindow(modalInstance) {
+        //background scroll fix
+        html.removeAttr('style');
+        body.removeAttr('style');
+        body.removeClass('styled-by-modal');
+
+        var modalWindow = openedWindows.get(modalInstance).value;
+        trapFocusInElement(false, modalWindow.modalDomEl);
+
+        //clean up the stack
+        openedWindows.remove(modalInstance);
+
+        //remove window DOM element
+        modalWindow.modalDomEl.remove();
+
+        //remove backdrop if no longer needed
+        if (backdropDomEl && backdropIndex() === -1) {
+            backdropDomEl.remove();
+            backdropDomEl = undefined;
+        }
+
+        //destroy scope
+        modalWindow.modalScope.$destroy();
+    }
+
+    $document.bind('keydown', function (evt) {
+        var modal;
+
+        if (evt.which === 27) {
+            modal = openedWindows.top();
+            if (modal && modal.value.keyboard) {
+                $rootScope.$apply(function () {
+                    $modalStack.dismiss(modal.key);
+                });
+            }
+        }
+    });
+
+    $modalStack.open = function (modalInstance, modal) {
+
+        openedWindows.add(modalInstance, {
+            deferred: modal.deferred,
+            modalScope: modal.scope,
+            backdrop: modal.backdrop,
+            keyboard: modal.keyboard
+        });
+
+        var angularDomEl = angular.element('<div b2b-modal-window></div>');
+        angularDomEl.attr('window-class', modal.windowClass);
+        angularDomEl.attr('size-class', modal.sizeClass);
+        angularDomEl.attr('index', openedWindows.length() - 1);
+        angularDomEl.html(modal.content);
+
+        var modalDomEl = $compile(angularDomEl)(modal.scope);
+        openedWindows.top().value.modalDomEl = modalDomEl;
+        //background page scroll fix
+        html.css({
+            'overflow-y': 'hidden'
+        });
+        body.css({
+            'overflow-y': 'hidden',
+            'width': '100%',
+            'height': window.innerHeight + 'px'
+        });
+        body.addClass('styled-by-modal');
+        body.append(modalDomEl);
+
+        if (backdropIndex() >= 0 && !backdropDomEl) {
+            backdropjqLiteEl = angular.element('<div b2b-modal-backdrop></div>');
+            backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);
+            body.append(backdropDomEl);
+        }
+
+        $timeout(function () {
+
+            if (modal.scope.$$childHead.isNotifDialog) {
+                angular.element(modalDomEl).find('button')[0].focus();
+            } else {
+                angular.element(modalDomEl)[0].focus();
+            }
+            trapFocusInElement(true, angular.element(modalDomEl).eq(0));
+        }, 200);
+    };
+
+    $modalStack.close = function (modalInstance, result) {
+        var modal = openedWindows.get(modalInstance);
+        if (modal) {
+            modal.value.deferred.resolve(result);
+            removeModalWindow(modalInstance);
+        }
+    };
+
+    $modalStack.dismiss = function (modalInstance, reason) {
+        var modalWindow = openedWindows.get(modalInstance).value;
+        if (modalWindow) {
+            modalWindow.deferred.reject(reason);
+            removeModalWindow(modalInstance);
+        }
+    };
+
+    $modalStack.getTop = function () {
+        return openedWindows.top();
+    };
+
+    return $modalStack;
+}])
+
+.provider('$modal', function () {
+    var $modalProvider = {
+        options: {
+            backdrop: true, //can be also false or 'static'
+            keyboard: true
+        },
+        $get: ['$injector', '$rootScope', '$q', '$http', '$templateCache', '$controller', '$modalStack', function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {
+            var $modal = {};
+
+            function getTemplatePromise(options) {
+                return options.template ? $q.when(options.template) :
+                    $http.get(options.templateUrl, {
+                        cache: $templateCache
+                    }).then(function (result) {
+                        return result.data;
+                    });
+            }
+
+            function getResolvePromises(resolves) {
+                var promisesArr = [];
+                angular.forEach(resolves, function (value, key) {
+                    if (angular.isFunction(value) || angular.isArray(value)) {
+                        promisesArr.push($q.when($injector.invoke(value)));
+                    }
+                });
+                return promisesArr;
+            }
+
+            $modal.open = function (modalOptions) {
+
+                var modalResultDeferred = $q.defer();
+                var modalOpenedDeferred = $q.defer();
+                //prepare an instance of a modal to be injected into controllers and returned to a caller
+                var modalInstance = {
+                    result: modalResultDeferred.promise,
+                    opened: modalOpenedDeferred.promise,
+                    close: function (result) {
+                        $modalStack.close(modalInstance, result);
+                    },
+                    dismiss: function (reason) {
+                        $modalStack.dismiss(modalInstance, reason);
+                    }
+                };
+
+                //merge and clean up options
+                modalOptions = angular.extend({}, $modalProvider.options, modalOptions);
+                modalOptions.resolve = modalOptions.resolve || {};
+
+                //verify options
+                if (!modalOptions.template && !modalOptions.templateUrl) {
+                    throw new Error('One of template or templateUrl options is required.');
+                }
+
+                var templateAndResolvePromise =
+                    $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));
+
+
+                templateAndResolvePromise.then(function resolveSuccess(tplAndVars) {
+
+                    var modalScope = (modalOptions.scope || $rootScope).$new();
+                    modalScope.$close = modalInstance.close;
+                    modalScope.$dismiss = modalInstance.dismiss;
+
+                    var ctrlInstance, ctrlLocals = {};
+                    var resolveIter = 1;
+
+                    //controllers
+                    if (modalOptions.controller) {
+                        ctrlLocals.$scope = modalScope;
+                        ctrlLocals.$modalInstance = modalInstance;
+                        angular.forEach(modalOptions.resolve, function (value, key) {
+                            ctrlLocals[key] = tplAndVars[resolveIter++];
+                        });
+
+                        ctrlInstance = $controller(modalOptions.controller, ctrlLocals);
+                    }
+
+                    $modalStack.open(modalInstance, {
+                        scope: modalScope,
+                        deferred: modalResultDeferred,
+                        content: tplAndVars[0],
+                        backdrop: modalOptions.backdrop,
+                        keyboard: modalOptions.keyboard,
+                        windowClass: modalOptions.windowClass,
+                        sizeClass: modalOptions.sizeClass
+                    });
+
+                }, function resolveError(reason) {
+                    modalResultDeferred.reject(reason);
+                });
+
+                templateAndResolvePromise.then(function () {
+                    modalOpenedDeferred.resolve(true);
+                }, function () {
+                    modalOpenedDeferred.reject(false);
+                });
+
+                return modalInstance;
+            };
+
+            return $modal;
+        }]
+    };
+
+    return $modalProvider;
+})
+
+.directive("b2bModal", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {
+    return {
+        restrict: 'A',
+        scope: {
+            b2bModal: '@',
+            modalController: '@',
+            modalOk: '&',
+            modalCancel: '&',
+            windowClass: '@',
+            sizeClass: '@'
+        },
+        link: function (scope, elm, attr) {
+            elm.bind('click', function (ev) {
+                var currentPosition = ev.pageY - ev.clientY;
+                ev.preventDefault();
+                if (angular.isDefined(elm.attr("href")) && elm.attr("href") !== "") {
+                    scope.b2bModal = elm.attr("href");
+                }
+                $modal.open({
+                    templateUrl: scope.b2bModal,
+                    controller: scope.modalController,
+                    windowClass: scope.windowClass,
+                    sizeClass: scope.sizeClass
+                }).result.then(function (value) {
+                    scope.modalOk({
+                        value: value
+                    });
+                    elm[0].focus();
+                }, function (value) {
+                    scope.modalCancel({
+                        value: value
+                    });
+                    elm[0].focus();
+                });
+            });
+        }
+    };
+}])
+
+.directive("utilityFilter", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {
+    return {
+        restrict: 'EA',
+        scope: {
+            utilityFilter: '@'
+        },
+        require: 'ngModel',
+        templateUrl: 'b2bTemplate/modal/u-filter.html',
+        link: function (scope, element, attribute, ctrl) {
+            //controller to be passed to $modal service
+            scope.options = angular.copy(scope.$parent.$eval(attribute.ngModel));
+            scope.$parent.$watch(attribute.ngModel, function (newVal, oldVal) {
+                if (newVal !== oldVal) {
+                    scope.options = newVal;
+                }
+            });
+            var modalCtrl = function ($scope, options) {
+                $scope.options = angular.copy(options);
+            };
+
+            if (angular.isDefined(scope.utilityFilter)) {
+                scope.templateUrl = scope.utilityFilter;
+            } else {
+                scope.templateUrl = 'b2bTemplate/modal/u-filter-window.html';
+            }
+            element.bind('click', function (ev) {
+                var currentPosition = ev.pageY - ev.clientY;
+                $modal.open({
+                    templateUrl: scope.templateUrl,
+                    controller: modalCtrl,
+                    resolve: {
+                        options: function () {
+                            return scope.options;
+                        }
+                    }
+                }).result.then(function (value) {
+                    ctrl.$setViewValue(value);
+                    element[0].focus();
+                    $scrollTo(0, currentPosition, 0);
+                }, function () {
+                    element[0].focus();
+                    $scrollTo(0, currentPosition, 0);
+                });
+            });
+        }
+    };
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:monthSelector
+ *
+ * @description
+ *  <file src="src/monthSelector/docs/readme.md" />
+ *
+ * @usage
+ * <div b2b-monthpicker ng-model="dt" min="minDate" max="maxDate" mode="monthpicker"></div>
+    
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/monthSelector/docs/demo.html" />
+            <file src="src/monthSelector/docs/demo.js" />
+        </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.monthSelector', ['b2b.att.position', 'b2b.att.utilities'])
+
+.constant('b2bMonthpickerConfig', {
+    dateFormat: 'MM/dd/yyyy',
+    dayFormat: 'd',
+    monthFormat: 'MMMM',
+    yearFormat: 'yyyy',
+    dayHeaderFormat: 'EEEE',
+    dayTitleFormat: 'MMMM yyyy',
+    disableWeekend: false,
+    disableSunday: false,
+    disableDates: null,
+    onSelectClose: null,
+    startingDay: 0,
+    minDate: null,
+    maxDate: null,
+    dueDate: null,
+    fromDate: null,
+    legendIcon: null,
+    legendMessage: null,
+    calendarDisabled: false,
+    collapseWait: 0,
+    orientation: 'left',
+    inline: false,
+    mode:0,
+    helperText: 'The date you selected is $date. Double tap to open calendar. Select a date to close the calendar.',
+    descriptionText: 'Use tab to navigate between previous button, next button and month. Use arrow keys to navigate between months. Use space or enter to select a month.',
+    MonthpickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation','mode','id'],
+    MonthpickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],
+    MonthpickerFunctionAttributes: ['disableDates', 'onSelectClose']
+})
+
+.factory('b2bMonthpickerService', ['b2bMonthpickerConfig', 'dateFilter', function (b2bMonthpickerConfig, dateFilter) {
+    var setAttributes = function (attr, elem) {
+        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {
+            var attributes = b2bMonthpickerConfig.MonthpickerEvalAttributes.concat(b2bMonthpickerConfig.MonthpickerWatchAttributes, b2bMonthpickerConfig.MonthpickerFunctionAttributes);
+            for (var key in attr) {
+                var val = attr[key];
+                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    elem.attr(key.toSnakeCase(), key);
+                }
+            }
+        }
+    };
+
+    var bindScope = function (attr, scope) {
+        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {
+            var evalFunction = function (key, val) {
+                scope[key] = scope.$parent.$eval(val);
+            };
+
+            var watchFunction = function (key, val) {
+                scope.$parent.$watch(val, function (value) {
+                    scope[key] = value;
+                });
+                scope.$watch(key, function (value) {
+                    scope.$parent[val] = value;
+                });
+            };
+
+            var evalAttributes = b2bMonthpickerConfig.MonthpickerEvalAttributes;
+            var watchAttributes = b2bMonthpickerConfig.MonthpickerWatchAttributes;
+            for (var key in attr) {
+                var val = attr[key];
+                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    evalFunction(key, val);
+                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {
+                    watchFunction(key, val);
+                }
+            }
+        }
+    };
+
+    return {
+        setAttributes: setAttributes,
+        bindScope: bindScope
+    };
+}])
+
+.controller('b2bMonthpickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bMonthpickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {
+    var format = {
+            date: getValue($attrs.dateFormat, dtConfig.dateFormat),
+            day: getValue($attrs.dayFormat, dtConfig.dayFormat),
+            month: getValue($attrs.monthFormat, dtConfig.monthFormat),
+            year: getValue($attrs.yearFormat, dtConfig.yearFormat),
+            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),
+            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),
+            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),
+            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),
+            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)
+        },
+        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);
+
+    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;
+    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;
+    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;
+    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;
+    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;
+    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;
+    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;
+    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);
+    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);
+    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);
+    $scope.mode = getValue($attrs.mode, dtConfig.mode);
+    
+    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;
+
+    function getValue(value, defaultValue) {
+        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;
+    }
+
+    function getDaysInMonth(year, month) {
+        return new Date(year, month, 0).getDate();
+    }
+
+    function getDates(startDate, n) {
+        var dates = new Array(n);
+        var current = startDate,
+            i = 0;
+        while (i < n) {
+            dates[i++] = new Date(current);
+            current.setDate(current.getDate() + 1);
+        }
+        return dates;
+    }
+
+    this.updatePosition = function (b2bMonthpickerPopupTemplate) {
+        $scope.position = $position.offset($element);
+        if($element.find('input').length > 0 ){
+            $scope.position.top += $element.find('input').prop('offsetHeight');
+        }else{
+            $scope.position.top += $element.find('a').prop('offsetHeight');
+        }
+        
+        if ($scope.orientation === 'right') {
+            $scope.position.left -= (((b2bMonthpickerPopupTemplate && b2bMonthpickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));
+        }
+    };
+
+    function isSelected(dt) { 
+        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isFromDate(dt) {
+        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isDateRange(dt) {
+        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {
+            return true;
+        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {
+            return true;
+        }
+        return false;
+    }
+
+    function isOld(date, currentMonthDate) {
+        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isNew(date, currentMonthDate) {
+        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    function isPastDue(dt) {
+        if ($scope.dueDate) {
+            return (dt > $scope.dueDate);
+        }
+        return false;
+    }
+
+    function isDueDate(dt) {
+        if ($scope.dueDate) {
+            return (dt.getTime() === $scope.dueDate.getTime());
+        }
+        return false;
+    }
+
+    var isDisabled = function (date, currentMonthDate) {
+        if ($attrs.from && !angular.isDate($scope.fromDate)) {
+            return true;
+        }
+        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {
+            return true;
+        }
+        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({
+            date: date
+        })));
+    };
+    
+    var isDisabledMonth = function (date, currentMonthDate) {
+        if ($attrs.from && !angular.isDate($scope.fromDate)) {
+            return true;
+        }
+        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {
+            return true;
+        }
+        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({
+            date: date
+        })));
+    };    
+         
+    var compare = function (date1, date2) {
+        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));
+    };
+
+    function isMinDateAvailable(startDate, endDate) {
+        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {
+            $scope.disablePrev = true;
+            $scope.visibilityPrev = "hidden";
+        } else {
+            $scope.disablePrev = false;
+            $scope.visibilityPrev = "visible";
+        }
+    }
+    
+    function isMaxDateAvailable(startDate, endDate) {
+        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {
+            $scope.disableNext = true;
+            $scope.visibilityNext = "hidden";
+        } else {
+            $scope.disableNext = false;
+            $scope.visibilityNext = "visible";
+        }
+    }    
+    
+    function isYearInRange(currentYear) {
+            
+        if ($scope.minDate && currentYear === $scope.minDate.getFullYear()) {
+            $scope.disablePrev = true;
+            $scope.visibilityPrev = "hidden";
+        } else {
+            $scope.disablePrev = false;
+            $scope.visibilityPrev = "visible";
+        }
+        
+        if ($scope.maxDate && currentYear === $scope.maxDate.getFullYear()) {
+            $scope.disableNext = true;
+            $scope.visibilityNext = "hidden";
+        } else {
+            $scope.disableNext = false;
+            $scope.visibilityNext = "visible";
+        }
+        
+    }    
+
+    this.focusNextPrev = function(b2bMonthpickerPopupTemplate,init){
+        if(init){
+            if (!$scope.disablePrev){
+                b2bMonthpickerPopupTemplate[0].querySelector('th.prev').focus();
+            }else if (!$scope.disableNext){
+                b2bMonthpickerPopupTemplate[0].querySelector('th.next').focus();
+            }else{
+                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();
+            }
+        }else{
+            if ($scope.disableNext || $scope.disablePrev){
+                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();
+            }       
+        }    
+    };
+
+    function getLabel(label) {
+        if (label) {
+            var labelObj = {
+                pre: label.substr(0, 1).toUpperCase(),
+                post: label
+            };
+            return labelObj;
+        }
+        return;
+    }
+
+    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {
+        return {
+            date: date,
+            label: dateFilter(date, dayFormat),
+            header: dateFilter(date, dayHeaderFormat),
+            selected: !!isSelected,
+            fromDate: !!isFromDate,
+            dateRange: !!isDateRange,
+            oldMonth: !!isOld,
+            nextMonth: !!isNew,
+            disabled: !!isDisabled,
+            dueDate: !!dueDate,
+            pastDue: !!pastDue,
+            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))
+        };
+    }
+    
+    this.modes = [
+        {
+            name: 'day',
+            getVisibleDates: function (date) {
+                var year = date.getFullYear(),
+                    month = date.getMonth(),
+                    firstDayOfMonth = new Date(year, month, 1),
+                    lastDayOfMonth = new Date(year, month + 1, 0);
+                var difference = startingDay - firstDayOfMonth.getDay(),
+                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,
+                    firstDate = new Date(firstDayOfMonth),
+                    numDates = 0;
+
+                if (numDisplayedFromPreviousMonth > 0) {
+                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
+                    numDates += numDisplayedFromPreviousMonth; // Previous
+                }
+                numDates += getDaysInMonth(year, month + 1); // Current
+                numDates += (7 - numDates % 7) % 7; // Next
+
+                var days = getDates(firstDate, numDates),
+                    labels = new Array(7);
+                for (var i = 0; i < numDates; i++) {
+                    var dt = new Date(days[i]);
+                    days[i] = makeDate(dt,
+                        format.day,
+                        format.dayHeader,
+                        isSelected(dt),
+                        isFromDate(dt),
+                        isDateRange(dt),
+                        isOld(dt, date),
+                        isNew(dt, date),
+                        isDisabled(dt, date),
+                        isDueDate(dt),
+                        isPastDue(dt));
+                }
+                for (var j = 0; j < 7; j++) {
+                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));
+                }
+                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);
+                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);
+                return {
+                    objects: days,
+                    title: dateFilter(date, format.dayTitle),
+                    labels: labels
+                };
+            },
+            split: 7,
+            step: {
+                months: 1
+            }
+        },
+        {
+            name: 'month',
+            getVisibleDates: function(date) {
+                var months = [], 
+                    labels = [], 
+                    year = date.getFullYear();
+                    for (var i = 0; i < 12; i++) {
+                        var dt = new Date(year,i,1);                
+                        months[i] = makeDate(dt,
+                                    format.month,
+                                    format.dayHeader,
+                                    isSelected(dt), 
+                                    isFromDate(dt),
+                                    isDateRange(dt),
+                                    false,
+                                    false,
+                                    isDisabledMonth(dt, date),
+                                    isDueDate(dt),                                       
+                                    isPastDue(dt));                                                                                                                                                         
+                    }
+                isYearInRange(year);  
+                return {objects: months, title: dateFilter(date, format.year), labels: labels};
+            },
+            split:4,
+            step: {years: 1}
+        }
+    ];
+}])
+
+.directive('b2bMonthpickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile','$interval', 'trapFocusInElement', 'keymap', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, $interval,trapFocusInElement, keymap) {
+    return {
+        restrict: 'EA',
+        scope: {
+          trigger: '='
+        },
+        replace: true,
+        transclude: true,
+        templateUrl: function (elem, attr) {
+            if (attr.inline === 'true') {
+                return 'b2bTemplate/monthSelector/monthSelector-popup.html';
+            }else if (attr.link === 'true') {
+                return 'b2bTemplate/monthSelector/monthSelectorLink.html';
+            }else {
+                return 'b2bTemplate/monthSelector/monthSelector.html';
+            }
+        },
+        scope: {},
+        require: ['b2bMonthpickerPopup', 'ngModel', '?^b2bMonthpickerGroup'],
+        controller: 'b2bMonthpickerController',
+        link: function (scope, element, attrs, ctrls) {
+            var MonthpickerCtrl = ctrls[0],
+                ngModel = ctrls[1],
+                b2bMonthpickerGroupCtrl = ctrls[2];
+            var b2bMonthpickerPopupTemplate;
+
+            if (!ngModel) {
+                $log.error("ng-model is required.");
+                return; // do nothing if no ng-model
+            }
+
+            // Configuration parameters
+            var mode = scope.mode,
+                selected;
+            scope.isOpen = false;
+
+            scope.headers = [];
+            scope.footers = [];
+            scope.triggerInterval=undefined;
+
+
+            if (b2bMonthpickerGroupCtrl) {
+                b2bMonthpickerGroupCtrl.registerMonthpickerScope(scope);
+            }
+
+            element.bind('keydown', function (ev) {                   
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }                                
+                if(ev.keyCode === keymap.KEY.ESC)
+                {
+                    scope.isOpen = false;
+                    toggleCalendar(scope.isOpen);
+                    scope.$apply();
+                }
+            });
+            
+            element.find('button').bind('click', function () {
+                onClicked();                
+            });
+
+            element.find('a').bind('click', function () {
+                onClicked();                
+            });
+
+            
+            element.find('input').bind('click', function () {
+                onClicked();
+            });
+
+            var onClicked = function() {        
+                if (!scope.ngDisabled) {
+                    scope.isOpen = !scope.isOpen;
+                    toggleCalendar(scope.isOpen);                    
+                    MonthpickerCtrl.updatePosition(b2bMonthpickerPopupTemplate);
+                    scope.$apply();
+                }
+            };
+        
+            var toggleCalendar = function (flag) {
+                if (!scope.inline) {
+                    if (flag) {
+                        b2bMonthpickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/monthSelector/monthSelector-popup.html'));
+                        b2bMonthpickerPopupTemplate.attr('b2b-trap-focus-inside-element', 'false');
+                        b2bMonthpickerPopupTemplate.attr('trigger', 'true');
+                        b2bMonthpickerPopupTemplate = $compile(b2bMonthpickerPopupTemplate)(scope);
+                        $document.find('body').append(b2bMonthpickerPopupTemplate);
+                        b2bMonthpickerPopupTemplate.bind('keydown', escPress);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            scope.trigger=0;
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false;
+                                scope.$apply();
+                                MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,true);
+                            }, 100);
+                        });
+                        scope.triggerInterval = $interval(function () {
+                            //This value is updated to trigger init() function of directive on year change.
+                            scope.trigger=(scope.trigger === 0 ? 1 : 0);
+                        }, 200);
+
+                    } else {
+                        b2bMonthpickerPopupTemplate.unbind('keydown', escPress);
+                        if(scope.triggerInterval)
+                        {
+                            $interval.cancel(scope.triggerInterval);
+                            scope.triggerInterval=undefined;
+                        }
+                        b2bMonthpickerPopupTemplate.remove();
+                        if(element.find('button').length > 0){
+                            element.find('button')[0].focus();
+                        }else{
+                            element.find('a')[0].focus();
+                        }
+                        
+                        scope.getFocus = false;
+                    }
+                }
+            };
+
+            var outsideClick = function (e) {
+                var isElement = $isElement(angular.element(e.target), element, $document);
+                var isb2bMonthpickerPopupTemplate = $isElement(angular.element(e.target), b2bMonthpickerPopupTemplate, $document);
+                if (!(isElement || isb2bMonthpickerPopupTemplate)) {
+                    scope.isOpen = false;
+                    toggleCalendar(scope.isOpen);
+                    scope.$apply();
+                }
+            };
+
+            var escPress = function (ev) {
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }
+                if (ev.keyCode) {
+                    if (ev.keyCode === keymap.KEY.ESC) {
+                        scope.isOpen = false;
+                        toggleCalendar(scope.isOpen);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === 33) {
+                        !scope.disablePrev && scope.move(-1);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false;
+                                scope.$apply();
+                            }, 100);
+                        });
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === 34) {
+                        !scope.disableNext && scope.move(1);
+                        $timeout(function () {
+                            scope.getFocus = true;
+                            scope.$apply();
+                            $timeout(function () {
+                                scope.getFocus = false;
+                                scope.$apply();
+                            }, 100);
+                        });
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    }
+                    scope.$apply();
+                }
+            };              
+                    
+            $documentBind.click('isOpen', outsideClick, scope);
+
+            scope.$on('$destroy', function () {
+                if (scope.isOpen) {
+                    scope.isOpen = false;
+                    toggleCalendar(scope.isOpen);
+                }
+            });
+
+            scope.resetTime = function (date) {
+                if (typeof date === 'string') {
+                    date = date + 'T12:00:00';
+                }
+                var dt;
+                if (!isNaN(new Date(date))) {
+                    dt = new Date(date);
+                    if(scope.mode === 1){
+                        dt = new Date(dt.getFullYear(), dt.getMonth());
+                    }else{
+                        dt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
+                    }                                                            
+                } else {
+                    return null;
+                }
+                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());
+            };
+            
+            if (attrs.min) {
+                scope.$parent.$watch($parse(attrs.min), function (value) {
+                    scope.minDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.max) {
+                scope.$parent.$watch($parse(attrs.max), function (value) {
+                    scope.maxDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.due) {
+                scope.$parent.$watch($parse(attrs.due), function (value) {
+                    scope.dueDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+            if (attrs.from) {
+                scope.$parent.$watch($parse(attrs.from), function (value) {
+                    scope.fromDate = value ? scope.resetTime(value) : null;
+                    refill();
+                });
+            }
+
+            if (attrs.legendIcon) {
+                scope.$parent.$watch(attrs.legendIcon, function (value) {
+                    scope.legendIcon = value ? value : null;
+                    refill();
+                });
+            }
+            if (attrs.legendMessage) {
+                scope.$parent.$watch(attrs.legendMessage, function (value) {
+                    scope.legendMessage = value ? value : null;
+                    refill();
+                });
+            }
+            if (attrs.ngDisabled) {
+                scope.$parent.$watch(attrs.ngDisabled, function (value) {
+                    scope.ngDisabled = value ? value : null;
+                });
+            }      
+            
+
+            // Split array into smaller arrays
+            function split(arr, size) {
+                var arrays = [];
+                while (arr.length > 0) {
+                    arrays.push(arr.splice(0, size));
+                }
+                return arrays;
+            }
+            
+            var moveMonth = function(selectedDate, direction) {
+                var step = MonthpickerCtrl.modes[scope.mode].step;
+                selectedDate.setDate(1);
+                selectedDate.setMonth(selectedDate.getMonth() + direction * (step.months || 0));
+                selectedDate.setFullYear(selectedDate.getFullYear() + direction * (step.years || 0));
+
+                return selectedDate;
+            };            
+
+            function refill(date) {
+                if (angular.isDate(date) && !isNaN(date)) {
+                    selected = new Date(date);
+                } else {
+                    if (!selected) {
+                        selected = new Date();
+                    }
+                }
+
+                if (selected) {                    
+                    var selectedCalendar;
+                    if(scope.mode === 1){
+                        if(!angular.isDate(selected))
+                           {                           
+                                selected = new Date();
+                           }
+                        selectedCalendar = moveMonth(angular.copy(selected), -1);
+                    } else {
+                        selectedCalendar = angular.copy(selected);
+                    }
+                    
+                    var currentMode = MonthpickerCtrl.modes[mode],
+                        data = currentMode.getVisibleDates(selected);
+
+                    scope.rows = split(data.objects, currentMode.split);
+            
+                    var flag=false;
+                    var startFlag=false;
+                    var firstSelected = false;
+                    for(var i=0; i<scope.rows.length; i++)
+                    {
+                        for(var j=0; j<scope.rows[i].length; j++)
+                        {
+                            if(!scope.rows[i][j].disabled && !firstSelected)
+                            {
+                                firstSelected=true;
+                                var firstDay = scope.rows[i][j];
+                            }
+
+                            if(scope.rows[i][j].selected)
+                            {
+                                flag=true;
+                                break;
+                            }                  
+                        }
+                        if(flag)
+                        {
+                            break;
+                        }
+                    }
+                    if(!flag && firstSelected)
+                    {
+                       firstDay.firstFocus=true;
+                    }
+
+                    scope.labels = data.labels || [];
+                    scope.title = data.title;                    
+                }
+            }
+
+            scope.select = function (date,$event) {
+                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+                scope.currentDate = dt;
+                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({
+                        date: dt
+                    }) !== false)) {
+                    if (angular.isNumber(scope.collapseWait)) {
+                        $timeout(function () {
+                            scope.isOpen = false;
+                            toggleCalendar(scope.isOpen);
+                        }, scope.collapseWait);
+                    } else {
+                        scope.isOpen = false;
+                        toggleCalendar(scope.isOpen);
+                    }
+                }
+            };
+
+            scope.move = function (direction,$event) {
+                var step = MonthpickerCtrl.modes[mode].step;
+                selected.setDate(1);
+                selected.setMonth(selected.getMonth() + direction * (step.months || 0));
+                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));
+                refill();
+                scope.getFocus = true;
+                $timeout(function () {
+                    if (attrs.inline === 'true') {
+                        MonthpickerCtrl.focusNextPrev(element,false); 
+                    }else{
+                        MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,false);
+                    }
+                },100);
+                $event.preventDefault();
+                $event.stopPropagation();
+            };
+
+            scope.$watch('currentDate', function (value) {
+                if (angular.isDefined(value) && value !== null) {
+                    refill(value);
+                } else {
+                    refill();
+                }
+                ngModel.$setViewValue(value);
+            });
+
+            ngModel.$render = function () {
+                scope.currentDate = ngModel.$viewValue;
+            };
+
+            var stringToDate = function (value) {
+                if (!isNaN(new Date(value))) {
+                    value = new Date(value);
+                }
+                return value;
+            };
+            ngModel.$formatters.unshift(stringToDate);
+        }
+    };
+}])
+
+.directive('b2bMonthpicker', ['$compile', '$log', 'b2bMonthpickerConfig', 'b2bMonthpickerService', function ($compile, $log, b2bMonthpickerConfig, b2bMonthpickerService) {
+    return {
+        restrict: 'A',
+        scope: {
+            disableDates: '&',
+            onSelectClose: '&'
+        },
+        require: 'ngModel',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bMonthpickerConfig.dateFormat;
+            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bMonthpickerConfig.helperText; 
+            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');
+
+            var descriptionText = angular.isDefined(attr.descriptionText) ? scope.$parent.$eval(attr.descriptionText) : b2bMonthpickerConfig.descriptionText;  
+
+
+            var inline = false;
+            if (elem.prop('nodeName') !== 'INPUT' && elem.prop('nodeName') !== 'A') {
+                inline = true;
+            }
+
+            var selectedDateMessage = "";
+            
+            if (elem.prop('nodeName') !== 'A'){
+                selectedDateMessage = '<button type="button" class="span12 faux-input" ng-disabled="ngDisabled" aria-describedby="monthpicker-description'+scope.$id+'"><span class="hidden-spoken" aria-live="assertive" aria-atomic="false">' + helperText + '</span></button>';    
+                elem.attr('tabindex', '-1'); 
+                elem.attr('aria-hidden', 'true');  
+                elem.attr('readonly', 'true'); 
+            }else{
+                selectedDateMessage = ''
+                elem.attr('aria-label', helperText);
+            }
+            
+            var descriptionTextSpan = '<span class="offscreen-text" id="monthpicker-description'+scope.$id+'">'+descriptionText+'</span>';
+            elem.removeAttr('b2b-Monthpicker');
+            elem.removeAttr('ng-model');
+            elem.removeAttr('ng-disabled');
+            elem.addClass('Monthpicker-input');
+            elem.attr('ng-model', 'dt');
+            elem.attr('aria-describedby', 'monthpicker-description'+scope.$id);
+            
+            
+            
+            elem.attr('ng-disabled', 'ngDisabled');
+            elem.attr('b2b-format-date', dateFormatString);
+
+            var wrapperElement = angular.element('<div></div>');
+            wrapperElement.attr('b2b-Monthpicker-popup', '');
+            wrapperElement.attr('ng-model', 'dt');
+            if (inline) {
+                wrapperElement.attr('inline', inline);
+            }
+            if (elem.prop('nodeName') === 'A'){
+                wrapperElement.attr('link', true);
+            }
+            b2bMonthpickerService.setAttributes(attr, wrapperElement);
+            b2bMonthpickerService.bindScope(attr, scope);
+
+            wrapperElement.html('');
+            wrapperElement.append(selectedDateMessage);
+            wrapperElement.append('');
+            wrapperElement.append(descriptionTextSpan);
+            wrapperElement.append('');
+            wrapperElement.append(elem.prop('outerHTML'));
+
+            var elm = wrapperElement.prop('outerHTML');
+            elm = $compile(elm)(scope);
+            elem.replaceWith(elm);
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            if (!ctrl) {
+                $log.error("ng-model is required.");
+                return; // do nothing if no ng-model
+            }
+            
+            scope.$watch('dt', function (value) {
+                ctrl.$setViewValue(value);
+            });
+            ctrl.$render = function () {
+                scope.dt = ctrl.$viewValue;
+            };
+        }
+    };
+}])
+
+.directive('b2bMonthpickerGroup', [function () {
+    return {
+        restrict: 'EA',
+        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {
+            this.$$headers = [];
+            this.$$footers = [];
+            this.registerMonthpickerScope = function (MonthpickerScope) {
+                MonthpickerScope.headers = this.$$headers;
+                MonthpickerScope.footers = this.$$footers;
+            };
+        }],
+        link: function (scope, elem, attr, ctrl) {}
+    };
+}])
+
+.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            var b2bFormatDate = "";
+            attr.$observe('b2bFormatDate', function (value) {
+                b2bFormatDate = value;
+            });
+            var dateToString = function (value) {
+                if (!isNaN(new Date(value))) {
+                    return dateFilter(new Date(value), b2bFormatDate);
+                }
+                return value;
+            };
+            ctrl.$formatters.unshift(dateToString);
+        }
+    };
+}])
+
+.directive('b2bMonthpickerHeader', [function () {
+    return {
+        restrict: 'EA',
+        require: '^b2bMonthpickerGroup',
+        transclude: true,
+        replace: true,
+        template: '',
+        compile: function (elem, attr, transclude) {
+            return function link(scope, elem, attr, ctrl) {
+                if (ctrl) {
+                    ctrl.$$headers.push(transclude(scope, function () {}));
+                }
+                elem.remove();
+            };
+        }
+    };
+}])
+
+.directive('b2bMonthpickerFooter', [function () {
+    return {
+        restrict: 'EA',
+        require: '^b2bMonthpickerGroup',
+        transclude: true,
+        replace: true,
+        template: '',
+        compile: function (elem, attr, transclude) {
+            return function link(scope, elem, attr, ctrl) {
+                if (ctrl) {
+                    ctrl.$$footers.push(transclude(scope, function () {}));
+                }
+                elem.remove();
+            };
+        }
+    };
+}]);
+/**
+ * @ngdoc directive
+ * @name Navigation.att:multiLevelNavigation
+ *
+ * @description
+ *  <file src="src/multiLevelNavigation/docs/readme.md" />
+ *
+ * @usage
+ *       <div class="b2b-ml-nav">
+ *          <ul role="tree">
+ *             <li aria-label="{{child.name}}" tabindex="-1" b2b-ml-nav="{{child.type}}" role="treeitem" ng-repeat="child in treeStructure">
+ *                  <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>
+ *                      <!-- Below UL tag is RECURSIVE to generate n-childs -->
+ *                      <ul role="group" ng-if="child.child">
+ *                          <li aria-label="{{child.name}}" b2b-ml-nav="{{child.type}}" tabindex="-1" role="treeitem" ng-repeat="child in child.child">
+ *                          <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>
+ *                               <!-- RECURSIVE UL tag goes here -->
+ *                          </li>
+ *                      </ul>
+ *             </li>
+ *           </ul>
+ *        </div>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/multiLevelNavigation/docs/demo.html" />
+            <file src="src/multiLevelNavigation/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.multiLevelNavigation', ['b2b.att.utilities'])
+    //directive b2bMlNav Test coverage 100% on 5/13
+    .directive('b2bMlNav', ['keymap', function (keymap) {
+        return {
+            restrict: 'EA',
+            link: function (scope, element) {
+                var rootE, parentE, upE, downE, lastE, homeE, endE;
+                //default root tree element tabindex set zero
+                if (element.parent().parent().hasClass('b2b-ml-nav') && (element[0].previousElementSibling === null)) {
+                    element.attr('tabindex', 0);
+                }
+                //check root via class
+                var isRoot = function (elem) {
+                        if (elem.parent().parent().eq(0).hasClass('b2b-ml-nav')) {
+                            return true;
+                        } else {
+                            return false;
+                        }
+
+                    }
+                    //for any expandable tree item on click
+                var toggleState = function (e) {
+                    if (angular.element(e.target).attr("b2b-ml-nav") !== "endNode") {
+                        var eLink = element.find('a').eq(0);
+                        if (eLink.hasClass('active')) {
+                            eLink.removeClass('active');
+                            eLink.parent().attr("aria-expanded", "false");
+                            eLink.find('i').eq(0).removeClass('icon-primary-expanded');
+                            eLink.find('i').eq(0).addClass('icon-primary-collapsed');
+                        } else {
+                            eLink.addClass('active');
+                            eLink.parent().attr("aria-expanded", "true");
+                            eLink.find('i').eq(0).removeClass('icon-primary-collapsed');
+                            eLink.find('i').eq(0).addClass('icon-primary-expanded');
+                        }
+                    }
+                };
+                //function finds the main root-item from particular tree-group
+                var findRoot = function (elem) {
+                    if (isRoot(elem)) {
+                        rootE = elem;
+                        return;
+                    }
+                    if (elem.attr("b2b-ml-nav") === "middleNode" || elem.attr("b2b-ml-nav") === "endNode") {
+                        parentE = elem.parent().parent();
+                    } else {
+                        parentE = elem;
+                    }
+                    if (parentE.attr("b2b-ml-nav") === "rootNode") {
+                        rootE = parentE;
+                    } else {
+                        findRoot(parentE);
+                    }
+                };
+                //finds the last visible node of the previous tree-group
+                var findPreActive = function (elem) {
+                    if (!(elem.hasClass("active"))) {
+                        return;
+                    } else {
+                        var childElems = angular.element(elem[0].nextElementSibling.children);
+                        lastE = angular.element(childElems[childElems.length - 1]);
+                        if (lastE.attr("b2b-ml-nav") === "middleNode" && lastE.find('a').eq(0).hasClass('active')) {
+                            findPreActive(lastE.find('a').eq(0));
+                        }
+                        upE = lastE;
+                    }
+                };
+                //find above visible link
+                var findUp = function (elem) {
+                    if (elem[0].previousElementSibling !== null) {
+                        upE = angular.element(elem[0].previousElementSibling);
+                    } else {
+                        upE = elem.parent().parent();
+                    }
+                    if (isRoot(elem) || (upE.attr('b2b-ml-nav') === "middleNode" && upE[0] !== elem.parent().parent()[0])) {
+                        findPreActive(upE.find('a').eq(0)); 
+                    }
+                };
+                //find below visible link
+                var findDown = function (elem) {
+                    if (elem.hasClass('active')) {
+                        downE = elem.next().find('li').eq(0);
+                    } else {
+                        if (elem.parent().next().length !== 0) {
+                            downE = elem.parent().next().eq(0);
+                        } else {
+                            if (elem.parent().parent().parent().next().length !== 0) {
+                                downE = elem.parent().parent().parent().next().eq(0);
+                                return;
+                            }
+                            downE = elem.parent().eq(0);
+                        }
+                    }
+                };
+                //finds last root-group element of the tree
+                var findEnd = function (elem) {
+                    findRoot(elem);
+                    endE = angular.element(rootE.parent()[0].children[rootE.parent()[0].children.length - 1]);
+                };
+                //finds first root element of tree
+                var findHome = function (elem) {
+                    findRoot(elem);
+                    homeE = angular.element(rootE.parent()[0].children[0]);
+                };
+                element.bind('click', function (e) {
+                    if(element.attr("b2b-ml-nav") !== "endNode") { 
+                        toggleState(e); 
+                    }
+                    e.stopPropagation();
+                });
+                element.bind('focus', function (e) {
+                    if(element.attr("b2b-ml-nav") !== "endNode") {
+                        if(element.find('a').eq(0).hasClass('active')) {
+                            element.attr("aria-expanded", true);
+                        }
+                        else {
+                            element.attr("aria-expanded", false);
+                        }
+                        
+                    }
+                })
+                //Keyboard functionality approach:
+                //find keycode
+                //set set tabindex -1 on the current focus element
+                //find the next element to be focussed, set tabindex 0 and throw focus
+                element.bind('keydown', function (evt) {
+                    switch (evt.keyCode) {
+                    case keymap.KEY.ENTER:
+                    case keymap.KEY.SPACE:
+                        element.triggerHandler('click');
+                        evt.stopPropagation();
+                        evt.preventDefault();
+                        break;
+                    case keymap.KEY.END:
+                        evt.preventDefault();
+                        element.attr('tabindex', -1);
+                        findEnd(element);
+                        endE.eq(0).attr('tabindex', 0);
+                        endE[0].focus();
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.HOME:
+                        evt.preventDefault();
+                        element.attr('tabindex', -1);
+                        findHome(element);
+                        homeE.eq(0).attr('tabindex', 0);
+                        homeE[0].focus();
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.LEFT:
+                        evt.preventDefault();
+                        if (!isRoot(element)) {
+                            element.attr('tabindex', -1);
+                            parentE = element.parent().parent();
+                            parentE.eq(0).attr('tabindex', 0);
+                            parentE[0].focus();
+                            parentE.eq(0).triggerHandler('click');
+                        } else {
+                            if (element.find('a').eq(0).hasClass('active')) {
+                                element.triggerHandler('click');
+                            }
+                        }
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.UP:
+                        evt.preventDefault();
+                        if (!(isRoot(element) && element[0].previousElementSibling === null)) {
+                            element.attr('tabindex', -1);
+                            findUp(element);
+                            upE.eq(0).attr('tabindex', 0);
+                            upE[0].focus();
+                        }
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.RIGHT:
+                        evt.preventDefault();
+                        if (element.attr("b2b-ml-nav") !== "endNode") {
+                            if (!element.find('a').eq(0).hasClass('active')) {
+                                element.triggerHandler('click');
+                            }
+                            element.attr('tabindex', -1);
+                            findDown(element.find('a').eq(0));
+                            downE.eq(0).attr('tabindex', 0);
+                            downE[0].focus();
+                        }
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.DOWN:
+                        evt.preventDefault();
+                        element.attr('tabindex', -1);
+                        if (!(element.attr("b2b-ml-nav") === "middleNode" && element.find('a').eq(0).hasClass('active')) && (element.next().length === 0)) {
+                            if(element.parent().parent().attr("b2b-ml-nav") !== "rootNode" && element.parent().parent()[0].nextElementSibling !== null)
+                            {
+                                findDown(element.find('a').eq(0));
+                                downE.eq(0).attr('tabindex', 0);
+                                downE[0].focus();
+                                evt.stopPropagation();
+                                break;
+                            }
+                            findRoot(element);
+                            if (!(rootE.next().length === 0)) {
+                                rootE.next().eq(0).attr('tabindex', 0);
+                                rootE.next()[0].focus();
+                            } else {
+                                rootE.eq(0).attr('tabindex', 0);
+                                rootE[0].focus();
+                            }
+                            evt.stopPropagation();
+                            break;
+                        }
+                        findDown(element.find('a').eq(0));
+                        downE.eq(0).attr('tabindex', 0);
+                        downE[0].focus();
+                        evt.stopPropagation();
+                        break;
+                    default:
+                        break;
+                    }
+                });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Tabs, tables & accordions.att:multipurposeExpander
+ *
+ * @description
+ *  <file src="src/multipurposeExpander/docs/readme.md" />
+ *
+ * @usage
+ * <!--With Close Other -->
+ * <b2b-expander-group close-others="true">
+ *  <b2b-expanders class="mpc-expanders" is-open="testmpc">            
+ *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc, 'b2b-toggle-header-inactive': testmpc } ">Heading content goes here</b2b-expander-heading>               
+ *      <b2b-expander-body>
+            <p>body content goes here</p>
+        </b2b-expander-body>
+ *  </b2b-expanders>
+ *  </b2b-expander-group>
+ *  
+ * <!-- Without Close Other -->
+ *  <b2b-expanders class="mpc-expanders" is-open="testmpc2">            
+ *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc2, 'b2b-toggle-header-inactive': testmpc2 } ">Heading content goes here</b2b-expander-heading>               
+ *      <b2b-expander-body>
+            <p>body content goes here</p>
+        </b2b-expander-body>
+ *  </b2b-expanders>
+ *  
+ * @example
+ *  <section id="code">
+        <example module="b2b.att.multipurposeExpander">
+            <file src="src/multipurposeExpander/docs/demo.html" />
+            <file src="src/multipurposeExpander/docs/demo.js" />
+        </example>
+    </section>
+ *
+ */
+
+angular.module('b2b.att.multipurposeExpander', ['b2b.att', 'b2b.att.collapse'])
+.directive('b2bExpanderGroup', function () {
+    return {
+        restrict: 'EA',
+        transclude: true,
+        template: "<ng-transclude></ng-transclude>",
+        controller:['$scope','$attrs', function($scope,$attrs){
+            this.groups = [];
+            this.index = -1;            
+            this.scope = $scope;
+            
+            this.addGroup = function (groupScope) {
+                var that = this;
+                groupScope.index = this.groups.length;
+                this.groups.push(groupScope);
+                if(this.groups.length > 0){
+                    this.index = 0;
+                }
+                groupScope.$on('$destroy', function () {
+                that.removeGroup(groupScope);
+            });
+            };
+
+            this.closeOthers = function (openGroup) {
+                var closeOthers = angular.isDefined($attrs.closeOthers);
+                if (closeOthers && !$scope.forceExpand) {
+                    angular.forEach(this.groups, function (group) {
+                        if (group !== openGroup) {
+                            group.isOpen = false;
+                        }
+                    });
+                }
+                if (this.groups.indexOf(openGroup) === (this.groups.length - 1) && $scope.forceExpand) {
+                    $scope.forceExpand = false;
+                }
+            };
+            this.removeGroup = function (group) {
+            var index = this.groups.indexOf(group);
+            if (index !== -1) {
+                this.groups.splice(this.groups.indexOf(group), 1);
+            }
+        };
+        }]
+       
+    };
+    
+})
+.directive('b2bExpanders', function () {
+    return{
+        restrict: 'EA',
+        replace: true,
+        require:['b2bExpanders','?^b2bExpanderGroup'],
+        transclude: true,
+        scope:{isOpen:'=?'},
+        template: "<div ng-transclude></div>",
+        controller: ['$scope', function ($scope){
+                var bodyScope = null;
+                var expanderScope = null;
+                this.isOpened = function(){                
+                    if($scope.isOpen)
+                    {
+                        return  true;
+                    }else
+                    {
+                        return false;
+                    }
+                };                
+                this.setScope = function (scope) {
+                    bodyScope = scope; 
+                    bodyScope.isOpen = $scope.isOpen;                   
+                };                
+                this.setExpanderScope = function (scope) {
+                    expanderScope = scope;                                   
+                };
+                this.toggle = function () {
+                    $scope.isOpen = bodyScope.isOpen = !bodyScope.isOpen;                    
+                    return bodyScope.isOpen;
+                    
+                };
+                this.watchToggle = function(io){ 
+                    bodyScope.isOpen = io;
+                    expanderScope.updateIcons(io);
+                };  
+            }],
+        link: function (scope, elem, attr, myCtrl)
+        {
+            //scope.isOpen = false; 
+            if(myCtrl[1]){
+                myCtrl[1].addGroup(scope);
+            }
+            scope.$watch('isOpen', function(val){                               
+                myCtrl[0].watchToggle(scope.isOpen);
+                if(val && myCtrl[1]){
+                    myCtrl[1].closeOthers(scope);
+                }
+            });            
+        }
+    };
+})
+
+.directive('b2bExpanderHeading', function () {
+    return{
+        require: "^b2bExpanders",
+        restrict: 'EA',
+        replace: true,
+        transclude: true,
+        scope: true,
+        template: "<div style='padding:10px 10px 10px 0 !important' ng-transclude></div>"
+    };
+})
+
+.directive('b2bExpanderBody', function () {
+    return{
+        restrict: 'EA',
+        require: "^b2bExpanders",
+        replace: true,
+        transclude: true,
+        scope: {},
+        template: "<div b2b-collapse='!isOpen' ><div ng-transclude></div></div>",
+        link: function (scope, elem, attr, myCtrl) {
+            scope.isOpen = false;
+            myCtrl.setScope(scope);
+        }
+    };
+})
+
+.directive('b2bExpanderToggle', function () {
+    return{
+        restrict: 'EA',
+        require: "^b2bExpanders",
+        scope: {
+            expandIcon: '@',
+            collapseIcon: '@'
+        },
+        
+        link: function (scope, element, attr, myCtrl)
+        {
+            myCtrl.setExpanderScope(scope);
+            var isOpen = myCtrl.isOpened();   
+
+            scope.setIcon = function () {
+                element.attr("role", "tab");
+
+                if (scope.expandIcon && scope.collapseIcon)
+                {
+                    if (isOpen) {
+                        element.removeClass(scope.expandIcon);
+                        element.addClass(scope.collapseIcon);
+
+                        element.attr("aria-expanded", "true");
+                    }
+                    else {
+                        element.removeClass(scope.collapseIcon);
+                        element.addClass(scope.expandIcon);
+
+                        element.attr("aria-expanded", "false");
+                    }
+                }                               
+            };
+            
+            element.bind('click', function (){
+                scope.toggleit();
+            });
+            scope.updateIcons = function(nStat){
+                isOpen = nStat;
+                scope.setIcon();                
+            };
+            scope.toggleit = function (){
+                isOpen = myCtrl.toggle();
+                scope.setIcon();
+                scope.$apply();
+            };                    
+            scope.setIcon();
+        }
+    };
+});
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:notesMessagesAndErrors
+ *
+ * @description
+ *  <file src="src/notesMessagesAndErrors/docs/readme.md" />
+ *
+ * @usage
+ *  See Demo
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/notesMessagesAndErrors/docs/demo.html" />
+            <file src="src/notesMessagesAndErrors/docs/demo.js" />
+       </example>
+        </section>
+ *
+ */
+angular.module('b2b.att.notesMessagesAndErrors', []);
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Notification Card
+ * 
+ * @description 
+ *  <file src="src/notificationCardTemplate/docs/readme.md" /> 
+ * 
+ * @example 
+ *  <section id="code"> 
+        <b>HTML + AngularJS</b> 
+        <example module="b2b.att"> 
+            <file src="src/notificationCardTemplate/docs/demo.html" /> 
+            <file src="src/notificationCardTemplate/docs/demo.js" /> 
+       </example> 
+    </section>    
+ * 
+ */
+angular.module('b2b.att.notificationCardTemplate', [])
+  
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Order Confirmation Template
+ * 
+ * @description 
+ *  <file src="src/orderConfirmationTemplate/docs/readme.md" /> 
+ * 
+ * @example 
+ *  <section id="code"> 
+        <b>HTML + AngularJS</b> 
+        <example module="b2b.att"> 
+            <file src="src/orderConfirmationTemplate/docs/demo.html" /> 
+            <file src="src/orderConfirmationTemplate/docs/demo.js" /> 
+       </example> 
+    </section>    
+ * 
+ */
+angular.module('b2b.att.orderConfirmationTemplate', []);
+  
+/**
+ * @ngdoc directive
+ * @name Navigation.att:pagination
+ *
+ * @description
+ *  <file src="src/pagination/docs/readme.md" />
+ *
+ * @usage
+ *   <div b2b-pagination="" input-id="goto-page-2" total-pages="totalPages1" current-page="currentPage1" click-handler="customHandler" show-input="showInput"></div> 
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/pagination/docs/demo.html" />
+            <file src="src/pagination/docs/demo.js" />
+       </example>
+        </section>
+ *
+ */
+angular.module('b2b.att.pagination', ['b2b.att.utilities', 'ngTouch'])
+    .directive('b2bPagination', ['b2bUserAgent', 'keymap', '$window', '$timeout', function (b2bUserAgent, keymap, $window, $timeout) {
+        return {
+            restrict: 'A',
+            scope: {
+                totalPages: '=',
+                currentPage: '=',
+                showInput: '=',
+                clickHandler: '=?',
+                inputId: '='
+            },
+            replace: true,
+            templateUrl: 'b2bTemplate/pagination/b2b-pagination.html',
+            link: function (scope, elem) {
+                scope.isMobile = b2bUserAgent.isMobile();
+                scope.notMobile = b2bUserAgent.notMobile();
+                scope.focusedPage;
+                scope.meanVal = 3;
+                scope.$watch('totalPages', function (value) {
+                    if (angular.isDefined(value) && value !== null) {
+                        scope.pages = [];
+                        if (value < 1) {
+                            scope.totalPages = 1;
+                            return;
+                        }
+                        if (value <= 10) {
+                            for (var i = 1; i <= value; i++) {
+                                scope.pages.push(i);
+                            }
+                        } else if (value > 10) {
+                            var midVal = Math.ceil(value / 2);
+                            scope.pages = [midVal - 2, midVal - 1, midVal, midVal + 1, midVal + 2];
+                        }
+                        if(scope.currentPage === undefined || scope.currentPage === 1)
+                        {
+                            currentPageChanged(1);
+                        }
+                    }
+                });
+                scope.$watch('currentPage', function (value) {
+                    currentPageChanged(value);
+                    callbackHandler(value);
+                });
+                var callbackHandler = function (num) {
+                    if (angular.isFunction(scope.clickHandler)) {
+                        scope.clickHandler(num);
+                    }
+                };
+
+                function currentPageChanged(value) {
+                    if (angular.isDefined(value) && value !== null) {
+                        if (!value || value < 1) {
+                            value = 1;
+                        }
+                        if (value > scope.totalPages) {
+                            value = scope.totalPages;
+                        }
+                        if (scope.currentPage !== value) {
+                            scope.currentPage = value;
+                            callbackHandler(scope.currentPage);
+                        }
+                        if (scope.totalPages > 10) {
+                            var val = parseInt(value);
+                            if (val <= 6) {
+                                scope.pages = [1, 2, 3, 4, 5, 6, 7, 8];
+                            } else if (val > 6 && val <= scope.totalPages - 5) {
+                                scope.pages = [val - 1, val, val + 1];
+                            } else if (val >= scope.totalPages - 5) {
+                                scope.pages = [scope.totalPages - 7, scope.totalPages - 6, scope.totalPages - 5, scope.totalPages - 4, scope.totalPages - 3, scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];
+                            }
+                        }
+                        if (scope.isMobile) {
+                            var inWidth = $window.innerWidth;
+                            var viewLimit = 7;
+                            if (inWidth <= 400) {
+                                viewLimit = 7;
+                            } else if (inWidth > 400 && inWidth < 500) {
+                                viewLimit = 9;
+                            } else if (inWidth >= 500 && inWidth < 600) {
+                                viewLimit = 11;
+                            } else if (inWidth >= 600 && inWidth < 700) {
+                                viewLimit = 13;
+                            } else if (inWidth >= 700 && inWidth < 800) {
+                                viewLimit = 15;
+                            }
+
+                            var val = parseInt(value);
+
+                            scope.meanVal = Math.floor(viewLimit / 2);
+                            var lowerLimit = (val - scope.meanVal) < 1 ? 1 : val - scope.meanVal;
+                            var upperLimit = (lowerLimit + viewLimit - 1) > scope.totalPages ? scope.totalPages : lowerLimit + viewLimit - 1;
+                            scope.pages = [];
+                            for (var i = lowerLimit; i <= upperLimit; i++) {
+                                scope.pages.push(i);
+                            }
+                        }
+                    }
+                }
+                scope.gotoKeyClick = function (keyEvent) {
+                  if (keyEvent.which === keymap.KEY.ENTER) {
+                    scope.gotoBtnClick()
+                  }
+                }
+                scope.gotoBtnClick = function () {
+                    currentPageChanged(parseInt(scope.gotoPage)); 
+                    callbackHandler(scope.currentPage);
+                    var qResult = elem[0].querySelector('button');
+                    angular.element(qResult).attr('disabled','true');
+                    $timeout(function(){
+                        elem[0].querySelector('.b2b-pager__item--active').focus();
+                    }, 50); 
+                    scope.gotoPage = null;               
+                }
+                scope.onfocusIn = function(evt)
+                {
+                    var qResult = elem[0].querySelector('button');
+                    angular.element(qResult).removeAttr('disabled');
+                }
+                scope.onfocusOut = function(evt)
+                {
+                    if(evt.target.value === "")
+                    {
+                        var qResult = elem[0].querySelector('button');
+                        angular.element(qResult).attr('disabled','true');
+                    }                    
+                }
+                scope.next = function (event) {
+                    if (event != undefined) {
+                        event.preventDefault();
+                    }
+                    if (scope.currentPage < scope.totalPages) {
+                        scope.currentPage += 1;
+                        callbackHandler(scope.currentPage);
+                    }
+                };
+                scope.prev = function (event) {
+                    if (event != undefined) {
+                        event.preventDefault();
+                    }
+                    if (scope.currentPage > 1) {
+                        scope.currentPage -= 1;
+                        callbackHandler(scope.currentPage);
+                    }
+                };
+                scope.selectPage = function (value, event) {
+                    event.preventDefault();
+                    scope.currentPage = value;
+                    scope.focusedPage = value;
+                    callbackHandler(scope.currentPage);
+                };
+                scope.checkSelectedPage = function (value) {
+                    if (scope.currentPage === value) {
+                        return true;
+                    }
+                    return false;
+                };
+                scope.isFocused = function (page) {
+                    return scope.focusedPage === page;
+                };
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Navigation.att:paneSelector
+ *
+ * @description
+ *  <file src="src/paneSelector/docs/readme.md" />
+ *
+ * @usage
+ *  Please refer demo.html tab in Example section below.
+ *
+ * @example
+    <section id="code">
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/paneSelector/docs/demo.html" />
+            <file src="src/paneSelector/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.paneSelector', ['b2b.att.tabs', 'b2b.att.utilities'])
+
+.filter('paneSelectorSelectedItemsFilter', [function () {
+    return function (listOfItemsArray) {
+
+        if (!listOfItemsArray) {
+            listOfItemsArray = [];
+        }
+
+        var returnArray = [];
+
+        for (var i = 0; i < listOfItemsArray.length; i++) {
+            if (listOfItemsArray[i].isSelected) {
+                returnArray.push(listOfItemsArray[i]);
+            }
+        }
+
+        return returnArray;
+    };
+}])
+
+.filter('paneSelectorFetchChildItemsFilter', [function () {
+    return function (listOfItemsArray) {
+
+        if (!listOfItemsArray) {
+            listOfItemsArray = [];
+        }
+
+        var returnArray = [];
+
+        for (var i = 0; i < listOfItemsArray.length; i++) {
+            for (var j = 0; j < listOfItemsArray[i].childItems.length; j++) {
+                returnArray.push(listOfItemsArray[i].childItems[j]);
+            }
+        }
+
+        return returnArray;
+    };
+}])
+
+.directive('b2bPaneSelector', [function () {
+    return {
+        restrict: 'AE',
+        replace: true,
+        templateUrl: 'b2bTemplate/paneSelector/paneSelector.html',
+        transclude: true,
+        scope: {}
+    };
+}])
+
+.directive('b2bPaneSelectorPane', [ function () {
+    return {
+        restrict: 'AE',
+        replace: true,
+        templateUrl: 'b2bTemplate/paneSelector/paneSelectorPane.html',
+        transclude: true,
+        scope: {}
+    };
+}])
+
+.directive('b2bTabVertical', ['$timeout', 'keymap', function ($timeout, keymap) {
+    return {
+        restrict: 'A',
+        require: '^b2bTab',
+        link: function (scope, element, attr, b2bTabCtrl) {
+
+            if (!b2bTabCtrl) {
+                return;
+            }
+
+            // retreive the isolateScope
+            var iScope = angular.element(element).isolateScope();
+
+            $timeout(function () {
+                angular.element(element[0].querySelector('a')).unbind('keydown');
+                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {
+
+                    if (!(evt.keyCode)) {
+                        evt.keyCode = evt.which;
+                    }
+
+                    switch (evt.keyCode) {
+                        case keymap.KEY.DOWN:
+                            evt.preventDefault();
+                            iScope.nextKey();
+                            break;
+
+                        case keymap.KEY.UP:
+                            evt.preventDefault();
+                            iScope.previousKey();
+                            break;
+
+                        default:;
+                    }
+                });
+            });
+        }
+    };
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:phoneNumberInput
+ *
+ * @description
+ *  <file src="src/phoneNumberInput/docs/readme.md" />
+ *
+ * @usage
+<form name="userForm1">
+    <div class="form-row" ng-class="{'error':!userForm1.text.$valid && userForm1.text.$dirty}">
+        <label>Phone Mask<span style="color:red">*</span>: (npa) nxx-line &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Model Value: {{mask.text}}</label>
+        <div>
+            <input b2b-phone-mask="phoneMask" name="text" ng-model="mask.text" type="text" placeholder="e.g. (123) 456-7890" title="Phone Number" class="b2b-phone-mask-input" required />
+            <div ng-messages="userForm1.text.$error" class="error-msg" aria-live="polite" aria-atomic="true">
+                <span ng-message="required" role="alert">This field is mandatory!</span>
+                <span ng-message="invalidPhoneNumber" role="alert">Please enter valid phone number!</span>
+                <span ng-message="mask" role="alert">Please enter valid phone number!</span>
+            </div>
+        </div>
+    </div>
+</form>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/phoneNumberInput/docs/demo.html" />
+            <file src="src/phoneNumberInput/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.phoneNumberInput', ['ngMessages', 'b2b.att.utilities'])
+    .constant("CoreFormsUiConfig", {
+        phoneMask: '(___) ___-____',
+        phoneMaskDot: '___.___.____',
+        phoneMaskHyphen: '___-___-____'
+    })
+    .directive('b2bPhoneMask', ['$parse', 'CoreFormsUiConfig', 'keymap', function ($parse, CoreFormsUiConfig, keymap) {
+        return {
+            require: 'ngModel',
+            scope: {
+                ngModel: '='
+            },
+            link: function (scope, iElement, iAttrs, ctrl) {
+                var navigatorAgent = navigator.userAgent.toLowerCase(),
+                    isAndroid = navigatorAgent.indexOf("android") > -1,
+                    oldIE = navigatorAgent.indexOf('msie 8.0') !== -1;
+                var mask = '';
+                var validPhoneNumber = false;
+                var currentKey = '';
+                if (isAndroid) {
+                    mask = "__________";
+                } else {
+                    switch (iAttrs.b2bPhoneMask) {
+                    case "phoneMask":
+                        mask = CoreFormsUiConfig.phoneMask;
+                        break;
+                    case "phoneMaskDot":
+                        mask = CoreFormsUiConfig.phoneMaskDot;
+                        break;
+                    case "phoneMaskHyphen":
+                        mask = CoreFormsUiConfig.phoneMaskHyphen;
+                        break;
+                    default:
+                        mask = CoreFormsUiConfig.phoneMask;
+                    }
+                }
+                iElement.attr("maxlength", mask.length);
+                var checkValidity = function (unmaskedValue, rawValue) {
+                    var valid = false;
+                    if (angular.isUndefined(rawValue) || rawValue === '') {
+                        valid = true;
+                    } else if (unmaskedValue) {
+                        valid = (unmaskedValue.length === 10);
+                    }
+                    ctrl.$setValidity('invalidPhoneNumber', validPhoneNumber);
+                    ctrl.$setValidity('mask', valid);
+                    return valid;
+                };
+                var handleKeyup = function (evt) {
+
+                    if (evt && evt.keyCode === keymap.KEY.SHIFT) {
+                        return;
+                    }
+
+                    var index, formattedNumber;
+                    if (ctrl.$modelValue) {
+                        formattedNumber = ctrl.$modelValue;
+                    } else {
+                        formattedNumber = iElement.val();
+                    }
+                    if (!formattedNumber.length && currentKey === '') {
+                        return;
+                    }
+                    var maskLength, inputNumbers, maskArray, tempArray, maskArrayLength;
+                    tempArray = [];
+                    maskArray = mask.split("");
+                    maskArrayLength = maskArray.length;
+                    maskLength = formattedNumber.substring(0, mask.length);
+                    inputNumbers = formattedNumber.replace(/[^0-9]/g, "").split("");
+                    for (index = 0; index < maskArrayLength; index++) {
+                        tempArray.push(maskArray[index] === "_" ? inputNumbers.shift() : maskArray[index]);
+                        if (inputNumbers.length === 0) {
+                            break;
+                        }
+                    }
+                    formattedNumber = tempArray.join("");
+                    if (formattedNumber === '(') {
+                        formattedNumber = '';
+                    }
+
+                    if ( (angular.isDefined(evt) && evt.which) && currentKey !== '') {
+                        if (maskArray[0] === currentKey && formattedNumber === '') {
+                            formattedNumber = '(';
+                        } else if (evt.which === keymap.KEY.SPACE && currentKey === ' ') {
+                            formattedNumber = formattedNumber + ') ';
+                        } else if (maskArray[0] === currentKey && formattedNumber === '') {
+                            formattedNumber = formattedNumber + currentKey;
+                        } else if (maskArray[formattedNumber.length] === currentKey) {
+                            formattedNumber = formattedNumber + currentKey;
+                        }
+                        currentKey = '';
+                    }
+
+                    ctrl.$setViewValue(formattedNumber);
+                    ctrl.$render();
+                    return formattedNumber;
+                };
+
+
+                // since we are only allowing 0-9, why even let the keypress go forward?
+                // also added in delete... in case they want to delete :)
+                var handlePress = function (e) {
+                    if (e.which) {
+                        if ((e.which < 48 || e.which > 57) && (e.which < 96 || e.which > 105)) {
+                            if (e.which !== keymap.KEY.BACKSPACE && e.which !== keymap.KEY.TAB && e.which !== keymap.KEY.DELETE && e.which !== keymap.KEY.ENTER && e.which !== keymap.KEY.LEFT && e.which !== keymap.KEY.RIGHT &&
+                                // Allow: Ctrl+V/v
+                                (!(e.ctrlKey) && (e.which !== '118' || e.which !== '86')) &&
+                                // Allow: Ctrl+C/c
+                                (!(e.ctrlKey) && (e.which !== '99' || e.which !== '67')) &&
+                                // Allow: Ctrl+X/x
+                                (!(e.ctrlKey) && (e.which !== '120' || e.which !== '88'))) {
+                                e.preventDefault ? e.preventDefault() : e.returnValue = false;
+                                iElement.attr("aria-label", "Only numbers are allowed");
+                                validPhoneNumber = false;
+                            }
+                        } else {
+                            iElement.removeAttr("aria-label");
+                            validPhoneNumber = true;
+                        }
+
+                        setCurrentKey(e);
+                    }
+                    scope.$apply();
+                };
+                // i moved this out because i thought i might need focus as well..
+                // to handle setting the model as the view changes
+                var parser = function (fromViewValue) {
+                    var letters = /^[A-Za-z]+$/;
+                    var numbers = /^[0-9]+$/;
+                    if (angular.isUndefined(fromViewValue) || fromViewValue === '') {
+                        validPhoneNumber = true;
+                    } else {
+                        if (fromViewValue.match(letters)) {
+                            validPhoneNumber = false;
+                        }
+                        if (fromViewValue.match(numbers)) {
+                            validPhoneNumber = true;
+                        }
+                    }
+                    var clean = "";
+                    if (fromViewValue && fromViewValue.length > 0) {
+                        clean = fromViewValue.replace(/[^0-9]/g, '');
+                    }
+                    checkValidity(clean, fromViewValue);
+                    return clean;
+                };
+
+                //to handle reading the model and formatting it
+                var formatter = function (fromModelView) {
+                    var input = '';
+                    checkValidity(fromModelView);
+                    if (fromModelView) {
+                        input = handleKeyup();
+                    }
+                    return input;
+                };
+
+                var setCurrentKey = function (e) {
+                    switch (e.which) {
+                    case 189:
+                    case 109:
+                        currentKey = '-';
+                        break;
+                    case 190:
+                    case 110:
+                        currentKey = '.';
+                        break;
+                    case 57:
+                        if (e.shiftKey === true) {
+                            currentKey = '(';
+                        }
+                        break;
+                    case 48:
+                        if (e.shiftKey === true) {
+                            currentKey = ')';
+                        }
+                        break;
+                    case 32:
+                        currentKey = ' ';
+                        break;
+                    }
+                };
+
+                if (angular.isDefined(scope.ngModel)) {
+                    parser(scope.ngModel);
+                }
+
+                ctrl.$parsers.push(parser);
+                ctrl.$formatters.push(formatter);
+                iElement.bind('keyup', handleKeyup);
+                iElement.bind('keydown', handlePress);
+            }
+        };
+}]);
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Profile Blocks 
+ * 
+ * @description 
+ *  <file src="src/profileBlockTemplate/docs/readme.md" /> 
+ * @example 
+ *  <section id="code">  
+        <example module="b2b.att"> 
+            <file src="src/profileBlockTemplate/docs/demo.html" /> 
+            <file src="src/profileBlockTemplate/docs/demo.js" /> 
+       </example>  
+    </section>  
+ *  
+ */   
+
+angular.module('b2b.att.profileBlockTemplate', [])
+    
+     
+  
+/**
+ * @ngdoc directive
+ * @name Layouts.att:profileCard
+ *
+ * @description
+ *  <file src="src/profileCard/docs/readme.md" />
+ *
+ * @usage
+ *  <b2b-profile-card></b2b-profile-card>
+ *
+ * @example
+    <section id="code">   
+        <example module="b2b.att">
+            <file src="src/profileCard/docs/demo.html" />
+            <file src="src/profileCard/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.profileCard', ['b2b.att'])
+.constant('profileStatus',{
+    status: {
+        ACTIVE: {
+            status: "Active",
+            color: "green"
+        },
+        DEACTIVATED: {
+            status: "Deactivated",
+            color: "red"
+        },
+        LOCKED: {
+            status: "Locked",
+            color: "red"
+        },
+        IDLE: {
+            status: "Idle",
+            color: "yellow"
+        },
+        PENDING: {
+            status: "Pending",
+            color: "blue"
+        }
+    },
+    role: "COMPANY ADMINISTRATOR"
+
+})
+.directive('b2bProfileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {
+   return {
+        restrict: 'EA',
+        replace: 'true',
+        templateUrl: function(element, attrs){
+            if(!attrs.addUser){
+                return 'b2bTemplate/profileCard/profileCard.html';
+            }
+            else{
+                return 'b2bTemplate/profileCard/profileCard-addUser.html';
+            }
+        },
+        scope: {
+            profile:'=',
+            characterLimit: '@'
+        },
+        link: function(scope, elem, attr){
+            scope.characterLimit = parseInt(attr.characterLimit, 10) || 25;
+            scope.shouldClip = function(str) {
+                return str.length > scope.characterLimit;
+            };
+
+            scope.showEmailTooltip = false;
+
+            scope.image=true;
+            function isImage(src) {
+                var deferred = $q.defer();
+                var image = new Image();
+                image.onerror = function() {
+                    deferred.reject(false);
+                };
+                image.onload = function() {
+                    deferred.resolve(true);
+                };
+                if(src !== undefined && src.length>0 ){
+                    image.src = src;
+                } else {
+                     deferred.reject(false);
+                }
+                return deferred.promise;
+            }
+            if(!attr.addUser){
+            scope.image=false;
+            isImage(scope.profile.img).then(function(img) {
+                scope.image=img;
+            });
+            var splitName=(scope.profile.name).split(' ');
+            scope.initials='';
+            for(var i=0;i<splitName.length;i++){
+                scope.initials += splitName[i][0];
+            }
+            if(scope.profile.role.toUpperCase() === profileStatus.role){
+                scope.badge=true;
+            }
+            var profileState=profileStatus.status[scope.profile.state.toUpperCase()];
+            if(profileState) {
+                scope.profile.state=profileStatus.status[scope.profile.state.toUpperCase()].status;
+                scope.colorIcon=profileStatus.status[scope.profile.state.toUpperCase()].color;
+                if(scope.profile.state.toUpperCase()===profileStatus.status.PENDING.status.toUpperCase()||scope.profile.state.toUpperCase()===profileStatus.status.LOCKED.status.toUpperCase()){
+                        scope.profile.lastLogin=scope.profile.state;
+                }
+            }
+            var today=new Date().getTime();
+            var lastlogin=new Date(scope.profile.lastLogin).getTime();
+            var diff=(today-lastlogin)/(1000*60*60*24);
+            if(diff<=1){
+                scope.profile.lastLogin="Today";
+            }
+            else if(diff<=2){
+                scope.profile.lastLogin="Yesterday";
+            }
+        }
+    }
+};
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:radios
+ *
+ * @description
+ *  <file src="src/radios/docs/readme.md" />
+ *
+ * @usage
+ *  See demo section
+ *
+ * @param {boolean} refreshRadioGroup - A trigger that recalculates and updates the accessibility roles on radios in a group.
+ * 
+ * @example
+    <section id="code">
+               <b>HTML + AngularJS</b>
+               <example module="b2b.att">
+                <file src="src/radios/docs/demo.html" />
+                <file src="src/radios/docs/demo.js" />
+               </example>
+            </section>
+ */
+angular.module('b2b.att.radios', ['b2b.att.utilities'])
+.directive('b2bRadioGroupAccessibility', ['$timeout', 'b2bUserAgent', function($timeout, b2bUserAgent) {
+    return {
+        restrict: "A",
+        scope: {
+            refreshRadioGroup: "=",
+        },
+        link: function(scope, ele, attr) {
+
+            var roleRadioElement, radioProductSelectElement, radioInputTypeElement;
+
+            $timeout(calculateNumberOfRadio);
+
+            scope.$watch('refreshRadioGroup', function(value) {
+                if (value === true) {
+                    addingRoleAttribute();
+                    $timeout(calculateNumberOfRadio);
+                    scope.refreshRadioGroup = false;
+                } else {
+                    return;
+                }
+            })
+
+
+            function calculateNumberOfRadio() {
+                roleRadioElement = ele[0].querySelectorAll('[role="radio"]');
+
+                radioProductSelectElement = ele[0].querySelectorAll('[role="radiogroup"] li.radio-box');
+
+                radioInputTypeElement = ele[0].querySelectorAll('input[type="radio"]');
+
+                for (var i = 0; i < radioInputTypeElement.length; i++) {
+                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';
+                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';
+                    var numOfx = i + 1 + ' of ' + radioInputTypeElement.length;
+                    angular.element(roleRadioElement[i]).attr({
+                        'aria-checked': isChecked,
+                        'aria-disabled': isDisabled,
+                        'data-opNum': numOfx
+                    });
+                    if (b2bUserAgent.notMobile()) {
+                        angular.element(roleRadioElement[i]).removeAttr("role");
+                    }
+
+                    if (radioProductSelectElement.length) {
+                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');
+                    }
+
+                    if (/Android/i.test(navigator.userAgent)) {
+                        angular.element(roleRadioElement[i]).append('<span class="hidden-spoken">. ' + numOfx + '.</span>');
+                    }
+
+
+                    angular.element(radioInputTypeElement[i]).bind('click', radioStateChangeonClick);
+
+                }
+            }
+
+            function addingRoleAttribute() {
+                for (var i = 0; i < radioInputTypeElement.length; i++) {
+                    if (b2bUserAgent.notMobile()) {
+                        angular.element(roleRadioElement[i]).attr("role", "radio");
+                    }
+                }
+            }
+
+            function radioStateChangeonClick() {
+                for (var i = 0; i < radioInputTypeElement.length; i++) {
+                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';
+                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';
+                    if (radioProductSelectElement.length) {
+                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');
+                    }
+                    angular.element(roleRadioElement[i]).attr({
+                        'aria-checked': isChecked,
+                        'aria-disabled': isDisabled
+                    });
+                }
+
+            }
+        }
+    }
+
+}]);
+
+/**
+ * @ngdoc directive
+ * @name Forms.att:searchField
+ *
+ * @description
+ *  <file src="src/searchField/docs/readme.md" />
+ *
+ * @usage
+ *  <div b2b-search-field dropdown-list="listdata" on-click-callback="clickFn(value)" class="span12" input-model='typedString' config-obj='keyConfigObj'></div>
+ *
+ * @example
+ <section id="code">
+    <example module="b2b.att">
+    <file src="src/searchField/docs/demo.html" />
+    <file src="src/searchField/docs/demo.js" />
+    </example>
+</section>
+ */
+
+angular.module('b2b.att.searchField', ['b2b.att.utilities', 'b2b.att.position'])
+    .filter('b2bFilterInput', [function() {
+        return function(list, str, keyArray, displayListKey, isContainsSearch, searchSeperator) {
+            var res = [];
+            var searchLabel;
+            var searchCondition;
+            var conditionCheck = function(searchSeperator, listItem, displayListKey, splitString) {
+                var displayTitle = null;
+                if (splitString) {
+                    for (var i = 0; i < displayListKey.length; i++) {
+                        if (i <= 0) {
+                            displayTitle = listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase()) > -1;
+                        } else {
+                            displayTitle = (splitString[i]) ? displayTitle && listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase().trim()) > -1 : displayTitle;
+                        }
+                    }
+                } else {
+                    angular.forEach(displayListKey, function(value) {
+                        if (!displayTitle) {
+                            displayTitle = listItem[value];
+                        } else {
+                            displayTitle = displayTitle + (listItem[value] ? searchSeperator + ' ' + listItem[value] : '');
+                        }
+                    });
+                }
+                return displayTitle;
+            }
+            angular.forEach(list, function(listItem) {
+                var splitString = str.indexOf(searchSeperator) > -1 ? str.split(searchSeperator) : false;
+                var displayList = conditionCheck(searchSeperator, listItem, displayListKey, splitString)
+                for (var i = 0; i < keyArray.length; i++) {
+                    searchLabel = keyArray[i];
+                    if (listItem[searchLabel]) {
+                        if (isContainsSearch) {
+                            var displaySearchList = listItem[searchLabel].toLowerCase().indexOf(str.toLowerCase()) > -1;
+                            if (splitString.length > 1) {
+                                displaySearchList = (splitString.length <= keyArray.length) ? displayList : false;
+                            }
+                            searchCondition = displaySearchList;
+                        } else {
+                            searchCondition = listItem[searchLabel].match(new RegExp('^' + str, 'gi'));
+                        }
+                        if (searchCondition) {
+                            res.push({
+                                'title': conditionCheck(searchSeperator, listItem, displayListKey),
+                                'valueObj': listItem
+                            });
+                            break;
+                        }
+                    }
+                }
+            });
+            return res;
+        };
+    }]).directive('b2bSearchField', ['$filter', 'b2bFilterInputFilter', 'keymap', '$documentBind', '$isElement', '$document', 'events', '$timeout', function($filter, b2bFilterInput, keymap, $documentBind, $isElement, $document, events, $timeout) {
+        return {
+            restrict: 'A',
+            scope: {
+                dataList: '=dropdownList',
+                onClickCallback: '&',
+                inputModel: '=',
+                configObj: '=',
+                objModel: '=',
+                inputDeny: '=?',
+                disabled: '=?'
+            },
+            replace: true,
+            templateUrl: 'b2bTemplate/searchField/searchField.html',
+            controller: ['$scope', function($scope) {
+                this.searchKeyArray = [];
+                if ($scope.configObj.searchKeys) {
+                    this.searchKeyArray = $scope.configObj.searchKeys;
+                }
+                if (angular.isUndefined($scope.disabled)) {
+                    $scope.disabled = false;
+                }
+                this.triggerInput = function(searchString) {
+                    $scope.originalInputModel = searchString;
+                    if (searchString === '') {
+                        $scope.currentIndex = -1;
+                        $scope.filterList = [];
+                        $scope.showListFlag = false;
+                    } else if (searchString !== '' && !$scope.isFilterEnabled) {
+                        $scope.filterList = $filter('b2bFilterInput')($scope.dataList, searchString, this.searchKeyArray, $scope.configObj.displayListDataKey, $scope.configObj.isContainsSearch, $scope.configObj.searchSeperator);
+                        $scope.showListFlag = true;
+                    }
+                };
+                this.denyRegex = function() {
+                    return $scope.inputDeny;
+                };
+            }],
+            link: function(scope, elem) {
+                scope.isFilterEnabled = false;
+                scope.showListFlag = false;
+                scope.currentIndex = -1;
+                scope.setCurrentIdx = function(idx) {
+                    scope.currentIndex = idx;
+                    if (idx > -1) {
+                        scope.inputModel = scope.filterList[idx].title;
+                        scope.objModel = scope.filterList[idx];
+                    }
+                };
+                scope.isActive = function(index, dropdownLength) {
+                    scope.dropdownLength = dropdownLength;
+                    return scope.currentIndex === index;
+                };
+                scope.selectItem = function(idx) {
+                    scope.setCurrentIdx(idx);
+                    scope.onClickCallback({
+                        value: scope.inputModel,
+                        objValue: scope.objModel
+                    });
+                    scope.showListFlag = false;
+                    $timeout(function() {
+                        elem.find('div').find('input')[0].focus();
+                    }, 150);
+                };
+                scope.startSearch = function() {
+                    scope.onClickCallback({
+                        value: scope.inputModel,
+                        objValue: scope.objModel
+                    });
+                };
+                scope.selectPrev = function() {
+                    if (scope.currentIndex > 0 && scope.filterList.length > 0) {
+                        scope.currentIndex = scope.currentIndex - 1;
+                        scope.setCurrentIdx(scope.currentIndex);
+                    } else if (scope.currentIndex === 0) {
+                        scope.currentIndex = scope.currentIndex - 1;
+                        scope.inputModel = scope.originalInputModel;
+                        scope.isFilterEnabled = true;
+                    }
+                };
+                scope.selectNext = function() {
+                    if (scope.currentIndex < scope.configObj.noOfItemsDisplay - 1) {
+                        if (scope.currentIndex < scope.filterList.length - 1) {
+                            scope.currentIndex = scope.currentIndex + 1;
+                            scope.setCurrentIdx(scope.currentIndex);
+                        }
+                    }
+                };
+                scope.selectCurrent = function() {
+                    scope.selectItem(scope.currentIndex);
+                };
+                scope.selectionIndex = function(e) {
+                    switch (e.keyCode) {
+                        case keymap.KEY.DOWN:
+                            events.preventDefault(e);
+                            scope.isFilterEnabled = true;
+                            scope.selectNext();
+                            break;
+                        case keymap.KEY.UP:
+                            events.preventDefault(e);
+                            scope.isFilterEnabled = true;
+                            scope.selectPrev();
+                            break;
+                        case keymap.KEY.ENTER:
+                            events.preventDefault(e);
+                            scope.isFilterEnabled = true;
+                            scope.selectCurrent();
+                            break;
+                        case keymap.KEY.ESC:
+                            events.preventDefault(e);
+                            scope.isFilterEnabled = false;
+                            scope.showListFlag = false;
+                            scope.inputModel = '';
+                            break;
+                        default:
+                            scope.isFilterEnabled = false;
+                            break;
+                    }
+                    if (elem[0].querySelector('.filtercontainer')) {
+                        elem[0].querySelector('.filtercontainer').scrollTop = (scope.currentIndex - 1) * 35;
+                    }
+                };
+                scope.$watch('filterList', function(newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        scope.currentIndex = -1;
+                    }
+                });
+                scope.blurInput = function() {
+                    $timeout(function() {
+                        scope.showListFlag = false;
+                    }, 150);
+                };
+                var outsideClick = function(e) {
+                    var isElement = $isElement(angular.element(e.target), elem.find('ul').eq(0), $document);
+                    if (!isElement && document.activeElement.tagName.toLowerCase() !== 'input') {
+                        scope.showListFlag = false;
+                        scope.$apply();
+                    }
+                };
+                $documentBind.click('showListFlag', outsideClick, scope);
+            }
+        };
+    }])
+    .directive('b2bSearchInput', [function() {
+        return {
+            restrict: 'A',
+            require: ['ngModel', '^b2bSearchField'],
+            link: function(scope, elem, attr, ctrl) {
+                var ngModelCtrl = ctrl[0];
+                var attSearchBarCtrl = ctrl[1];
+                var REGEX = ctrl[1].denyRegex();
+                var parser = function(viewValue) {
+                    attSearchBarCtrl.triggerInput(viewValue);
+                    return viewValue;
+                };
+                ngModelCtrl.$parsers.push(parser);
+
+                if (REGEX !== undefined || REGEX !== '') {
+                    elem.bind('input', function() {
+                        var inputString = ngModelCtrl.$viewValue && ngModelCtrl.$viewValue.replace(REGEX, '');
+                        if (inputString !== ngModelCtrl.$viewValue) {
+                            ngModelCtrl.$setViewValue(inputString);
+                            ngModelCtrl.$render();
+                            scope.$apply();
+                        }
+                    });
+                }
+            }
+        };
+    }]);
+
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:Seek bar
+ *
+ * @description
+ *  <file src="src/seekBar/docs/readme.md" />
+ *
+ * @usage
+ *  Horizontal Seek Bar
+ *  <b2b-seek-bar min="0" max="400" step="1" skip-interval="1" data-ng-model="horizontalSeekBarVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()"></b2b-seek-bar>
+
+ *  Vertical Seek Bar
+ *  <b2b-seek-bar min="0" max="1" step="0.01" skip-interval="0.1" vertical data-ng-model="verticalSeekBarVal" style=" width: 6px; height: 180px; margin: auto;"></b2b-seek-bar>
+ *
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/seekBar/docs/demo.html" />
+            <file src="src/seekBar/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.seekBar', ['b2b.att.utilities','b2b.att.position'])
+        .constant('b2bSeekBarConfig', {
+            'min': 0,
+            'max': 100,
+            'step': 1,
+            'skipInterval': 1
+        })
+        .directive('b2bSeekBar', ['$documentBind', 'events', 'b2bSeekBarConfig', 'keymap', '$compile', function($documentBind, events, b2bSeekBarConfig, keymap, $compile) {
+                return {
+                    restrict: 'AE',
+                    replace: true,
+                    require: 'ngModel',
+                    templateUrl: 'b2bTemplate/seekBar/seekBar.html',
+                    scope: {
+                        onDragEnd: '&?',
+                        onDragInit: '&?'
+                    },
+                    link: function(scope, elm, attr, ngModelCtrl) {
+                        scope.isDragging = false;
+                        scope.verticalSeekBar = false;
+                        var min;
+                        var max;
+                        var step = b2bSeekBarConfig.step;
+                        var skipInterval = b2bSeekBarConfig.skipInterval;
+                        var knob = angular.element(elm[0].querySelector('.b2b-seek-bar-knob-container'));
+                        var seekBarKnob = angular.element(knob[0].querySelector('.b2b-seek-bar-knob'));
+                        var trackContainer = angular.element(elm[0].querySelector('.b2b-seek-bar-track-container'));
+                        var trackFill = angular.element(elm[0].querySelector('.b2b-seek-bar-track-fill'));
+                        var trackContainerRect = {};
+                        var axisPosition;
+                        var trackFillOrderPositioning;
+
+                        if (angular.isDefined(attr.vertical)) {
+                            scope.verticalSeekBar = true;
+                            axisPosition = "clientY";
+                        }
+                        else {
+                            scope.verticalSeekBar = false;
+                            axisPosition = "clientX";
+                        }
+                        var getValidStep = function(val) {
+                            val = parseFloat(val);
+                            // in case $modelValue came in string number
+                            if (angular.isNumber(val)) {
+                                val = Math.round((val - min) / step) * step + min;
+                                return Math.round(val * 1000) / 1000;
+                            }
+                        };
+
+                        var getPositionToPercent = function(x) {
+                            if (scope.verticalSeekBar) {
+                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));
+                            }
+                            else {
+                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));
+                            }
+                        };
+
+                        var getPercentToValue = function(percent) {
+                            return (min + percent * (max - min));
+                        };
+
+                        var getValueToPercent = function(val) {
+                            return (val - min) / (max - min);
+                        };
+
+                        var getValidMinMax = function(val) {
+                            return Math.max(min, Math.min(max, val));
+                        };
+
+                        var updateTrackContainerRect = function() {
+                            trackContainerRect = trackContainer[0].getBoundingClientRect();
+                            if (scope.verticalSeekBar) {
+                                if (!trackContainerRect.height) {
+                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;
+                                } else {
+                                    trackFillOrderPositioning = trackContainerRect.height;
+                                }
+                            }
+                            else {
+                                if (!trackContainerRect.width) {
+                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;
+                                } else {
+                                    trackFillOrderPositioning = trackContainerRect.width;
+                                }
+
+                            }
+
+                        };
+
+                        var updateKnobPosition = function(percent) {
+                            var percentStr = (percent * 100) + '%';
+                            if (scope.verticalSeekBar) {
+                                knob.css('bottom', percentStr);
+                                trackFill.css('height', percentStr);
+                            }
+                            else {
+                                knob.css('left', percentStr);
+                                trackFill.css('width', percentStr);
+                            }
+                        };
+
+                        var modelRenderer = function() {
+                            if (isNaN(ngModelCtrl.$viewValue)) {
+                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;
+                            }
+
+                            var viewVal = ngModelCtrl.$viewValue;
+                            scope.currentModelValue = viewVal;
+
+                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation
+                            if ((min || min === 0) && max && step) {
+                                updateKnobPosition(getValueToPercent(viewVal));
+                            }
+                        };
+
+                        var setModelValue = function(val) {
+                            scope.currentModelValue = getValidMinMax(getValidStep(val));
+                            ngModelCtrl.$setViewValue(scope.currentModelValue);
+                        };
+
+                        var updateMin = function(val) {
+                            min = parseFloat(val);
+                            if(isNaN(min)){
+                               min = b2bSeekBarConfig.min; 
+                            }
+                            modelRenderer();
+                        };
+
+                        var updateMax = function(val) {
+                            max = parseFloat(val);
+                            if(isNaN(max)){
+                               max = b2bSeekBarConfig.max; 
+                            }
+                            modelRenderer();
+                        };
+
+                        var updateStep = function(val) {
+                            step = parseFloat(val);
+                            if (!attr['skipInterval']) {
+                                skipInterval = step;
+                            }
+                        };
+
+                        var updateSkipInterval = function(val) {
+                            skipInterval = step * Math.ceil(val / (step!==0?step:1));
+                        };
+
+                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(b2bSeekBarConfig.min);
+                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(b2bSeekBarConfig.max);
+                        if (angular.isDefined(attr.step)) {
+                            attr.$observe('step', updateStep);
+                        }
+                        if (angular.isDefined(attr.skipInterval)) {
+                            attr.$observe('skipInterval', updateSkipInterval);
+                        }
+                        scope.currentModelValue = getValidMinMax(getValidStep(min));
+                        var onMouseDown = function(e) {
+                            switch (e.which) {
+                                case 1:
+                                    // left mouse button
+                                    break;
+                                case 2:
+                                case 3:
+                                    // right or middle mouse button
+                                    return;
+                            }
+                            ;
+
+                            scope.isDragging = true;
+                            seekBarKnob[0].focus();
+                            updateTrackContainerRect();
+                            if (attr['onDragInit']) {
+                                scope.onDragInit();
+                            }
+                            events.stopPropagation(e);
+                            events.preventDefault(e);
+                             scope.$apply(function() {
+                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));
+                            });
+                        };
+
+                        var onMouseUp = function() {
+
+                            if (attr['onDragEnd']) {
+                                scope.onDragEnd();
+                            }
+                            scope.isDragging = false;
+                            scope.$digest();
+                        };
+
+                        var onMouseMove = function(e) {
+                            if (scope.isDragging) {
+                                events.stopPropagation(e);
+                                events.preventDefault(e);
+
+                                scope.$apply(function() {
+                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));
+                                });
+                            }
+                        };
+
+                        function onKeyDown(e) {
+                            if (!(e.keyCode)) {
+                                e.keyCode = e.which;
+                            }
+                            var updateStep;
+                            switch (e.keyCode) {
+                                case keymap.KEY.LEFT:
+                                    if (!scope.verticalSeekBar) {
+                                        updateStep = -skipInterval;
+                                    }
+                                    break;
+                                case keymap.KEY.RIGHT:
+                                    if (!scope.verticalSeekBar) {
+                                        updateStep = skipInterval;
+                                    }
+                                    break;
+                                case keymap.KEY.UP:
+                                    if (scope.verticalSeekBar) {
+                                        updateStep = skipInterval;
+                                    }
+                                    break;
+                                case keymap.KEY.DOWN:
+                                    if (scope.verticalSeekBar) {
+                                        updateStep = -skipInterval;
+                                    }
+                                    break;
+                                default:
+                                    return;
+                            }
+
+                            if (updateStep) {
+                                events.stopPropagation(e);
+                                events.preventDefault(e);
+                                scope.$apply(function() {
+                                    setModelValue(ngModelCtrl.$viewValue + updateStep);
+                                });
+                                if (attr['onDragEnd']) {
+                                scope.onDragEnd();
+                            }
+                            }
+                        }
+
+                        elm.on('keydown', onKeyDown);
+                        elm.on('mousedown', onMouseDown);
+
+                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);
+                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);
+
+                        ngModelCtrl.$render = function() {
+                            if (!scope.isDragging) {
+                                modelRenderer();
+                            }
+                        };
+                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);
+                        ngModelCtrl.$formatters.push(getValidMinMax);
+                        ngModelCtrl.$formatters.push(getValidStep);
+                    }
+                };
+            }]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:selectorModule
+ *
+ * @description
+ *  <file src="src/selectorModule/docs/readme.md" />
+ *
+ * @usage
+ * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">
+ *   <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>
+ * </select>
+ *
+ * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">
+ * <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>
+ * </select>
+ *
+ * <select name="myNameBig" b2b-dropdown ng-model="Controller Variable here">
+ *   <optgroup b2b-dropdown-group label="Group Label here">
+ *     <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>
+ *   </optgroup>
+ * </select>
+ *
+ *  @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/selectorModule/docs/demo.html" />
+            <file src="src/selectorModule/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.selectorModule', ['b2b.att.dropdowns']);
+/**
+ * @ngdoc directive
+ * @name Layouts.att:separators
+ *
+ * @description
+ *  <file src="src/separators/docs/readme.md" />
+ *
+ * @usage
+
+ *
+ * @example
+ *  <section id="code">   
+ <b>HTML + AngularJS</b>
+ <example module="b2b.att">
+ <file src="src/separators/docs/demo.html" />
+ <file src="src/separators/docs/demo.js" />
+ </example>
+ </section>
+ *
+ */
+
+angular.module('b2b.att.separators', []);
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:slider
+ *
+ * @description
+ *  <file src="src/slider/docs/readme.md" />
+ *
+ * @usage
+ *  <b2b-slider min="0" max="400" step="1" no-aria-label skip-interval="1" ng-model="horizontalSliderVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()" label-id="slider-label" post-aria-label="postAriaLabel"></b2b-slider>
+ *
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/slider/docs/demo.html" />
+            <file src="src/slider/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.slider', ['b2b.att.utilities'])
+        .constant('SliderConfig', {
+            'min': 0,
+            'max': 100,
+            'step': 1,
+            'skipInterval': 1
+        })
+        .directive('b2bSlider', ['$documentBind', 'SliderConfig', 'keymap', '$compile', '$log', function($documentBind, SliderConfig, keymap, $compile, $log) {
+                return {
+                    restrict: 'AE',
+                    replace: true,
+                    require: 'ngModel',
+                    templateUrl: 'b2bTemplate/slider/slider.html',
+                    scope: {
+                        onDragEnd: '&?',
+                        onDragInit: '&?',
+                        trackFillColor: '=?',
+                        preAriaLabel: '=?',
+                        postAriaLabel: '=?',
+                        onRenderEnd: '&?',
+                        sliderSnapPoints: '=?',
+                        customAriaLabel: '=?',
+                        labelId: '@?'
+                    },
+                    link: function(scope, elm, attr, ngModelCtrl) {
+                        scope.isDragging = false;
+                        scope.verticalSlider = false;
+                        var min;
+                        var max;
+                        var step = SliderConfig.step;
+                        var skipInterval = SliderConfig.skipInterval;
+                        var knob = angular.element(elm[0].querySelector('.slider-knob-container'));
+                        var sliderKnob = angular.element(knob[0].querySelector('.slider-knob'));
+                        var trackContainer = angular.element(elm[0].querySelector('.slider-track-container'));
+                        var trackFill = angular.element(elm[0].querySelector('.slider-track-fill'));
+                        var trackContainerRect = {};
+                        var axisPosition = "clientX";
+                        var trackFillOrderPositioning;
+
+                        //Forcefully disabling the vertical Slider code.
+                        if (angular.isDefined(attr.vertical)) {
+                            scope.verticalSlider = true;
+                            axisPosition = "clientY";
+                        }
+
+                        if (angular.isDefined(scope.noAriaLabel) && scope.noAriaLabel !== '') {
+                            $log.warn('no-aria-label has been deprecated. This will be removed in v0.6.0.');
+                        }
+                        if (angular.isDefined(scope.preAriaLabel) && scope.preAriaLabel !== '') {
+                            $log.warn('pre-aria-label has been deprecated. Please use label-id instead. This will be removed in v0.6.0.');
+                        }
+                        if (angular.isDefined(scope.customAriaLabel) && scope.customAriaLabel !== '') {
+                            $log.warn('custom-aria-label has been deprecated. Please use label-id and post-aria-label instead. This will be removed in v0.6.0.');
+                        }
+
+                        var binarySearchNearest = function (num, arr) {
+                            var mid;
+                            var lo = 0;
+                            var hi = arr.length - 1;
+                            
+                            while (hi - lo > 1) {
+                                mid = Math.floor((lo + hi) / 2);
+                                if (arr[mid] < num) {
+                                    lo = mid;
+                                } else {
+                                    hi = mid;
+                                }
+                            }
+                            if (num - arr[lo] < arr[hi] - num) {
+                                return arr[lo];
+                            }
+                            return arr[hi];
+                        };
+                        
+                        var getValidStep = function(val) {
+                            val = parseFloat(val);
+                            // in case $modelValue came in string number
+                            if (!isNaN(val)) {
+                                
+                                if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {
+                                    val = binarySearchNearest(val, scope.sliderSnapPoints);
+                                }
+                                else {
+                                    val = Math.round((val - min) / step) * step + min;
+                                }
+                                
+                                return Math.round(val * 1000) / 1000;
+                            }
+                        };
+
+                        var getPositionToPercent = function(x) {
+                            if (scope.verticalSlider) {
+                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));
+                            }
+                            else {
+                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));
+                            }
+                        };
+
+                        var getPercentToValue = function(percent) {
+                            return (min + percent * (max - min));
+                        };
+
+                        var getValueToPercent = function(val) {
+                            return (val - min) / (max - min);
+                        };
+
+                        var getValidMinMax = function(val) {
+                            return Math.max(min, Math.min(max, val));
+                        };
+
+                        var updateTrackContainerRect = function() {
+                            trackContainerRect = trackContainer[0].getBoundingClientRect();
+                            if (scope.verticalSlider) {
+                                if (!trackContainerRect.height) {
+                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;
+                                } else {
+                                    trackFillOrderPositioning = trackContainerRect.height;
+                                }
+                            }
+                            else {
+                                if (!trackContainerRect.width) {
+                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;
+                                } else {
+                                    trackFillOrderPositioning = trackContainerRect.width;
+                                }
+
+                            }
+
+                        };
+
+                        var updateKnobPosition = function(percent) {
+                            var percentStr = (percent * 100) + '%';
+                            if (scope.verticalSlider) {
+                                knob.css('bottom', percentStr);
+                                trackFill.css('height', percentStr);
+                            }
+                            else {
+                                knob.css('left', percentStr);
+                                trackFill.css('width', percentStr);
+                            }
+                        };
+
+                        var modelRenderer = function() {
+
+                            if(attr['disabled']){
+                                return;
+                            }
+
+                            if (isNaN(ngModelCtrl.$viewValue)) {
+                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;
+                            }
+
+                            var viewVal = ngModelCtrl.$viewValue;
+                            scope.currentModelValue = viewVal;
+
+                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation
+                            if ((min || min === 0) && max && step) {
+                                updateKnobPosition(getValueToPercent(viewVal));
+                            }
+                        };
+
+                        var setModelValue = function(val) {
+                            scope.currentModelValue = getValidMinMax(getValidStep(val));
+                            ngModelCtrl.$setViewValue(scope.currentModelValue);
+                        };
+
+                        var updateMin = function(val) {
+                            min = parseFloat(val);
+                            if(isNaN(min)){
+                               min = SliderConfig.min; 
+                            }
+                            scope.min = min;
+                            modelRenderer();
+                        };
+
+                        var updateMax = function(val) {
+                            max = parseFloat(val);
+                            if(isNaN(max)){
+                               max = SliderConfig.max; 
+                            }
+                            scope.max = max;
+                            modelRenderer();
+                        };
+
+                        var updateStep = function(val) {
+                            step = parseFloat(val);
+                            if (!attr['skipInterval']) {
+                                skipInterval = step;
+                            }
+                        };
+
+                        var updateSkipInterval = function(val) {
+                            skipInterval = step * Math.ceil(val / (step!==0?step:1));
+                        };
+
+                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(SliderConfig.min);
+                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(SliderConfig.max);
+                        if (angular.isDefined(attr.step)) {
+                            attr.$observe('step', updateStep);
+                        }
+                        if (angular.isDefined(attr.skipInterval)) {
+                            attr.$observe('skipInterval', updateSkipInterval);
+                        }
+                        scope.currentModelValue = getValidMinMax(getValidStep(min));
+                        var onMouseDown = function(e) {
+
+                            if(attr['disabled']){
+                                return;
+                            }
+
+                            switch (e.which) {
+                                case 1:
+                                    // left mouse button
+                                    break;
+                                case 2:
+                                case 3:
+                                    // right or middle mouse button
+                                    return;
+                            }
+
+                            scope.isDragging = true;
+                            sliderKnob[0].focus();
+                            updateTrackContainerRect();
+                            if (attr['onDragInit']) {
+                                scope.onDragInit();
+                            }
+                            e.stopPropagation();
+                            e.preventDefault();
+                             scope.$apply(function() {
+                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));
+                            });
+                        };
+
+                        var onMouseUp = function() {
+
+                            if (attr['onDragEnd']) {
+                                scope.onDragEnd();
+                            }
+                            scope.isDragging = false;
+                            scope.$digest();
+                        };
+
+                        var onMouseMove = function(e) {
+                            if (scope.isDragging) {
+                                e.stopPropagation();
+                                e.preventDefault();
+
+                                scope.$apply(function() {
+                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));
+                                });
+                            }
+                        };
+
+                        function onKeyDown(e) {
+                            if (!(e.keyCode)) {
+                                e.keyCode = e.which;
+                            }
+                            var updateStep;
+                            switch (e.keyCode) {
+                                case keymap.KEY.DOWN:
+                                case keymap.KEY.LEFT:
+                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {
+                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);
+                                        if (currentIndex > 0) {
+                                            currentIndex--;
+                                        }
+                                        updateStep = scope.sliderSnapPoints[currentIndex];
+                                    }
+                                    else {
+                                        updateStep = ngModelCtrl.$viewValue - skipInterval;
+                                    }
+                                    break;
+                                case keymap.KEY.UP:
+                                case keymap.KEY.RIGHT:
+                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {
+                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);
+                                        if (currentIndex < scope.sliderSnapPoints.length-1) {
+                                            currentIndex++;
+                                        }
+                                        updateStep = scope.sliderSnapPoints[currentIndex];
+                                    }
+                                    else {
+                                        updateStep = ngModelCtrl.$viewValue + skipInterval;
+                                    }
+                                    break;
+                                case keymap.KEY.END:
+                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {
+                                        currentIndex = scope.sliderSnapPoints.length-1;
+                                        updateStep = scope.sliderSnapPoints[currentIndex];
+                                    } else {
+                                        setModelValue(scope.max);
+                                    }
+                                    e.preventDefault();
+                                    e.stopPropagation();
+                                    break;
+                                case keymap.KEY.HOME:
+                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {
+                                        currentIndex = 0;
+                                        updateStep = scope.sliderSnapPoints[currentIndex];
+                                    } else {
+                                        setModelValue(scope.min);
+                                    }
+                                    e.preventDefault();
+                                    e.stopPropagation();
+                                    break;
+                                default:
+                                    return;
+                            }
+
+                            if (angular.isNumber(updateStep) && !attr['disabled']) {
+                                e.stopPropagation();
+                                e.preventDefault();
+                                scope.$apply(function() {
+                                    setModelValue(updateStep);
+                                });
+                                if (attr['onDragEnd']) {
+                                    scope.onDragEnd();
+                                }
+                            }
+                        }
+
+                        elm.on('keydown', onKeyDown);
+                        elm.on('mousedown', onMouseDown);
+
+                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);
+                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);
+
+                        attr.$observe('disabled', function (disabled) {
+                            if (disabled) {
+                                sliderKnob.removeAttr('tabindex');
+                            } else {
+                                sliderKnob.attr('tabindex', '0');
+                                disabled = false;
+                            }
+
+                            elm.toggleClass("slider-disabled", disabled);
+
+                            if (angular.isDefined(attr.hideDisabledKnob)) {
+                                scope.hideKnob = disabled;
+                            }
+                        });
+
+                        ngModelCtrl.$render = function() {
+                            if (!scope.isDragging) {
+                                modelRenderer();
+                                if (attr['onRenderEnd'] && !attr['disabled']) {
+                                    scope.onRenderEnd({currentModelValue: scope.currentModelValue});
+                                }
+                            }
+                        };
+                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);
+                        ngModelCtrl.$formatters.push(getValidMinMax);
+                        ngModelCtrl.$formatters.push(getValidStep);
+                    }
+                };
+            }]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:spinButton
+ *
+ * @param {String} spin-button-id - An ID for the input field
+ * @param {Integer} min - Minimum value for the input
+ * @param {Integer} max - Maximum value for the input
+ * @param {Integer} step - Value by which input field increments or decrements on up/down arrow keys
+ * @param {Integer} page-step - Value by which input field increments or decrements on page up/down keys
+ * @param {boolean} input-model-key - Default value for input field
+ * @param {boolean} disabled-flag - A boolean that triggers directive once the min or max value has reached
+ *
+ * @description
+ *  <file src="src/spinButton/docs/readme.md" />
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/spinButton/docs/demo.html" />
+            <file src="src/spinButton/docs/demo.js" />
+       </example>
+    </section>
+ * 
+ */
+angular.module('b2b.att.spinButton', ['b2b.att.utilities'])
+    .constant('b2bSpinButtonConfig', {
+        min: 1,
+        max: 10,
+        step: 1,
+        pageStep: 10,
+        inputModelKey: 'value',
+        disabledFlag: false
+    })
+    .directive('b2bSpinButton', ['keymap', 'b2bSpinButtonConfig', 'b2bUserAgent', function (keymap, b2bSpinButtonConfig, userAgent) {
+        return {
+            restrict: 'EA',
+            require: '?ngModel',
+            transclude: false,
+            replace: true,
+            scope: {
+                min: '=min',
+                max: '=max',
+                step: '=step',
+                pageStep: '=pageStep',
+                spinButtonId: '@',
+                inputValue: '=ngModel',
+                inputModelKey: '@',
+                disabledFlag: "=?"
+            },
+            templateUrl: 'b2bTemplate/spinButton/spinButton.html',
+            controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {
+
+                scope.isMobile = userAgent.isMobile();
+                scope.notMobile = userAgent.notMobile();
+
+                scope.min = attrs.min ? scope.min : b2bSpinButtonConfig.min;
+                scope.max = attrs.max ? scope.max : b2bSpinButtonConfig.max;
+                scope.step = attrs.step ? scope.step : b2bSpinButtonConfig.step;
+                scope.pageStep = attrs.pageStep ? scope.pageStep : b2bSpinButtonConfig.pageStep;
+                scope.inputModelKey = attrs.inputModelKey ? scope.inputModelKey : b2bSpinButtonConfig.inputModelKey;
+                scope.disabledFlag = attrs.disabledFlag ? scope.disabledFlag : b2bSpinButtonConfig.disabledFlag;
+                
+                if (scope.min < 0) {
+                    scope.min = 0;
+                }
+                if (scope.max > 999) {
+                    scope.max = 999;
+                }
+
+                scope.isPlusDisabled = function () {
+                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] >= scope.max);
+                };
+                scope.isMinusDisabled = function () {
+                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] <= scope.min);
+                };
+
+                scope.getValidateInputValue = function (value) {
+                    if (value <= scope.min) {
+                        return scope.min;
+                    } else if (value >= scope.max) {
+                        return scope.max;
+                    } else {
+                        return value;
+                    }
+                };
+
+                scope.plus = function () {
+                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.step);
+                };
+                scope.minus = function () {
+                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.step);
+                };
+                scope.pagePlus = function () {
+                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.pageStep);
+                };
+                scope.pageMinus = function () {
+                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.pageStep);
+                };
+
+            }],
+            link: function (scope, elem) {
+
+                if (scope.notMobile) {
+                    angular.element(elem).find('input').attr('aria-live', 'off');
+                    angular.element(elem).find('input').attr('role', 'spinbutton');
+                }
+
+                elem.find('input').bind('keydown', function (e) {
+                    if (e.keyCode === keymap.KEY.UP) {
+                        scope.plus();
+                    } else if (e.keyCode === keymap.KEY.DOWN){
+                        scope.minus();
+                    } else if (e.keyCode === keymap.KEY.HOME) {
+                        scope.inputValue[scope.inputModelKey] = parseInt(scope.min);
+                    } else if (e.keyCode === keymap.KEY.END) {
+                        scope.inputValue[scope.inputModelKey] = parseInt(scope.max);
+                    } else if (e.keyCode === keymap.KEY.PAGE_UP) {
+                        scope.pagePlus();
+                    } else if (e.keyCode === keymap.KEY.PAGE_DOWN) {
+                        scope.pageMinus();
+                    }
+                    scope.$apply();
+                });
+
+                elem.find('input').bind('keyup', function () {
+                    if (scope.inputValue[scope.inputModelKey] === null ||
+                        scope.inputValue[scope.inputModelKey] === '' ||
+                        scope.inputValue[scope.inputModelKey] < scope.min) {
+                        scope.inputValue[scope.inputModelKey] = scope.min;
+                        scope.$apply();
+                    } else if (angular.isUndefined(scope.inputValue[scope.inputModelKey]) || 
+                               scope.inputValue[scope.inputModelKey] > scope.max) {
+                        scope.inputValue[scope.inputModelKey] = scope.max;
+                        scope.$apply();
+                    }
+                });
+
+                scope.focusInputSpinButton = function (evt) {
+                    evt.preventDefault();
+                    if (scope.notMobile) {
+                        elem[0].querySelector('input').focus();
+                    }
+                };
+
+            }
+        };  
+    }]);
+/** 
+ * @ngdoc directive 
+ * @name Template.att:Static Route
+ * 
+ * @description 
+ *  <file src="src/staticRouteTemplate/docs/readme.md" /> 
+ * 
+ * @example 
+ *  <section id="code"> 
+        <example module="b2b.att"> 
+            <file src="src/staticRouteTemplate/docs/demo.html" /> 
+            <file src="src/staticRouteTemplate/docs/demo.js" /> 
+       </example> 
+    </section>    
+ * 
+ */
+angular.module('b2b.att.staticRouteTemplate', ['b2b.att.utilities'])
+  
+/**
+ * @ngdoc directive
+ * @name Progress & usage indicators.att:statusTracker
+ *
+ * @scope
+ * @param {array} statuses - An array of status objects
+ * @description
+ * <file src="src/statusTracker/docs/readme.md" />
+ *
+ * @usage
+ *
+<div ng-controller="statusTrackerController">
+    <b2b-status-tracker statuses="statusObject"></b2b-status-tracker>
+</div>
+
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/statusTracker/docs/demo.html" />
+            <file src="src/statusTracker/docs/demo.js" />
+        </example>
+    </section>
+ */
+
+angular.module('b2b.att.statusTracker', ['b2b.att.utilities'])
+.constant('b2bStatusTrackerConfig', {
+    'maxViewItems': 3
+})
+.directive('b2bStatusTracker', ['b2bStatusTrackerConfig', function(b2bStatusTrackerConfig) {
+        return {
+            restrict: 'EA',
+            transclude: false,
+            replace: true,
+            scope:{
+                statuses: '='
+            },
+            templateUrl: function(scope) {
+                return 'b2bTemplate/statusTracker/statusTracker.html';
+            },
+            link: function(scope, element, attr) {
+                scope.currentViewIndex = 0;
+                scope.b2bStatusTrackerConfig = b2bStatusTrackerConfig;
+
+                scope.nextStatus = function() {
+                    if (scope.currentViewIndex+1 <= scope.statuses.length) {
+                        scope.currentViewIndex++;
+                    }
+                };
+                scope.previousStatus = function() {
+                    if (scope.currentViewIndex-1 >= 0) {
+                        scope.currentViewIndex--;
+                    }
+                };
+                scope.isInViewport = function(index) {
+                    return (index < scope.currentViewIndex+3 && index >= scope.currentViewIndex);  // && index > scope.currentViewIndex-2
+                };
+                scope.currentStatus = function(index) {
+                    if(index != undefined){
+                        if(!scope.statuses[index].complete) {
+                            if(index > 0 && scope.statuses[index-1].complete) {
+                                return true;
+                            } else if(index == 0 && !scope.statuses[index].complete){
+                                return true;
+                            } else {
+                                return false;
+                            }
+                        }
+                    }
+                };
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Progress & usage indicators.att:stepTracker
+ *
+ * @scope
+ * @param {array} stepsItemsObject - An array of step objects
+ * @param {Integer} currenIindex - This indicates the current running step
+ * @param {Integer} viewportIndex - This is optional. This can used to start the view port rather than 1 item.
+ * @description
+ * <file src="src/stepTracker/docs/readme.md" />
+ *
+ * @usage
+ *
+ *  <b2b-step-tracker steps-items-object="stepsObject" current-index="currentStepIndex" step-indicator-heading="stepHeading"></b2b-step-tracker>
+ *
+
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/stepTracker/docs/demo.html" />
+            <file src="src/stepTracker/docs/demo.js" />
+        </example>
+    </section>
+ */
+angular.module('b2b.att.stepTracker', ['b2b.att.utilities'])
+    .constant('b2bStepTrackerConfig', {
+        'maxViewItems': 5
+    })
+    .directive('b2bStepTracker', ['b2bStepTrackerConfig', function(b2bStepTrackerConfig) {
+        return {
+            restrict: 'EA',
+            transclude: true,
+            scope:{
+                stepsItemsObject:"=",
+                currentIndex:"=",
+                viewportIndex:"=?"
+            },
+            templateUrl: 'b2bTemplate/stepTracker/stepTracker.html',
+            link: function(scope, ele, attr) {
+                if (angular.isDefined(scope.viewportIndex)) {
+                    scope.currentViewIndex = scope.viewportIndex - 1;   
+                }else{
+                    scope.currentViewIndex = 0;
+                }
+               
+               scope.b2bStepTrackerConfig = b2bStepTrackerConfig;
+               scope.nextStatus = function() {
+                    if (scope.currentViewIndex+1 <= scope.stepsItemsObject.length) {
+                        scope.currentViewIndex++;
+                    }
+                };
+                scope.previousStatus = function() {
+                    if (scope.currentViewIndex-1 >= 0) {
+                        scope.currentViewIndex--;
+                    }
+                };
+                scope.isInViewport = function(index) {
+                    return (index < scope.currentViewIndex+b2bStepTrackerConfig.maxViewItems && index >= scope.currentViewIndex);
+                };
+            }
+        };
+    }]);
+     
+/**
+ * @ngdoc directive
+ * @name Buttons, links & UI controls.att:switches
+ *
+ * @description
+ *  <file src="src/switches/docs/readme.md" />
+ *
+ * @usage
+ *  
+ *  <!-- On / Off Toggle switch -->
+ *  <label for="switch1" class="controlled-text-wrap"> This is ON
+ *      <input type="checkbox" role="checkbox" b2b-switches id="switch1" ng-model="switch1.value">
+ *  </label>
+ *
+ *  <!-- On / Off Toggle switch and DISABLED -->
+ *  <label for="switch2" class="controlled-text-wrap"> This is ON (disabled)
+ *      <input type="checkbox" role="checkbox" b2b-switches id="switch2" ng-model="switch1.value" ng-disabled="true" >
+ *  </label> 
+ *
+ *
+ * @example
+ *  <section id="code">
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/switches/docs/demo.js" />
+            <file src="src/switches/docs/demo.html" />
+        </example>
+    </section>
+ */
+angular.module('b2b.att.switches', ['b2b.att.utilities'])
+    .directive('b2bSwitches', ['$compile', '$templateCache', 'keymap', 'events', function ($compile, $templateCache, keymap, events) {
+        return {
+            restrict: 'EA',
+            require: ['ngModel'],
+            link: function (scope, element, attrs, ctrl) {
+                var ngModelController = ctrl[0];
+        
+                element.parent().bind("keydown", function (e) {
+                    if (!attrs.disabled && (e.keyCode === keymap.KEY.ENTER || e.keyCode === keymap.KEY.SPACE)) {
+                        events.preventDefault(e);
+                        ngModelController.$setViewValue(!ngModelController.$viewValue);
+                        element.prop("checked", ngModelController.$viewValue);
+                    }
+                });
+
+                element.wrap('<div class="btn-switch">');
+                //element.attr("tabindex", -1);
+                if (navigator.userAgent.match(/iphone/i)){
+                    element.attr("aria-live", "polite");
+                }
+                else {
+                    element.removeAttr('aria-live');
+                }
+
+                var templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches.html"));
+                if (angular.isDefined(attrs.typeSpanish)) {
+                    templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches-spanish.html"));
+                }
+
+                templateSwitch = $compile(templateSwitch)(scope);
+                element.parent().append(templateSwitch);
+
+                element.bind("focus", function (e) {
+                    element.parent().addClass('focused');
+                });
+
+                element.bind("blur", function (e) {
+                    element.parent().removeClass('focused');
+                });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:tableMessages
+ *
+ * @description
+ *  <file src="src/tableMessages/docs/readme.md" />
+ *
+ * @usage
+    <!-- no matching results -->
+    <b2b-table-message msg-type="'noMatchingResults'">
+       <p>No Matching Results</p>
+    </b2b-table-message>
+  
+    <!-- info could not load -->
+    <b2b-table-message msg-type="'infoCouldNotLoad'" on-refresh-click="refreshClicked()">
+    </b2b-table-message>
+   
+    <!-- magnify search -->
+    <b2b-table-message msg-type="'magnifySearch'">
+    </b2b-table-message>
+   
+    <!-- loading data -->
+    <b2b-table-message msg-type="'loadingTable'">
+          <!-- custom html -->
+          <p>The data is currently loading...</p>
+    </b2b-table-message>
+
+ * @example
+    <section id="code">   
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/tableMessages/docs/demo.html" />
+            <file src="src/tableMessages/docs/demo.js" />
+        </example>
+    </section>
+ */
+angular.module('b2b.att.tableMessages', [])
+    .directive('b2bTableMessage', [function() {
+        return {
+            restrict: 'AE',
+            replace: true,
+            transclude: true,
+            scope: {
+                msgType: '=',
+                onRefreshClick: '&'
+            },
+            templateUrl: 'b2bTemplate/tableMessages/tableMessage.html',
+            link: function(scope) {
+                scope.refreshAction = function(evt) {
+                    scope.onRefreshClick(evt);
+                };
+            }
+        };
+    }]);
+
+/**
+ * @ngdoc directive
+ * @name Tabs, tables & accordions.att:tableScrollbar
+ *
+ * @description
+ *  <file src="src/tableScrollbar/docs/readme.md" />
+ *
+ * @usage
+ * 
+<b2b-table-scrollbar>
+    <table>
+        <thead type="header">
+            <tr>
+                <th role="columnheader" scope="col" key="Id" id="col1">Id</th>
+                .....
+            </tr>
+        </thead>
+        <tbody type="body">
+            <tr>
+                <td id="rowheader0" headers="col1">1002</td>
+                .....
+            </tr>
+        </tbody>
+    </table>
+</b2b-table-scrollbar>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/tableScrollbar/docs/demo.html" />
+            <file src="src/tableScrollbar/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.tableScrollbar', [])
+    .directive('b2bTableScrollbar', ['$timeout', function ($timeout) {
+        return {
+            restrict: 'E',
+            scope: true,
+            transclude: true,
+            templateUrl: 'b2bTemplate/tableScrollbar/tableScrollbar.html',
+            link: function (scope, element, attrs, ctrl) {
+                var firstThWidth, firstTdWidth, firstColumnWidth, firstColumnHeight, trHeight = 0;
+                var pxToScroll = '';
+                var tableElement = element.find('table');
+                var thElements = element.find('th');
+                var tdElements = element.find('td');
+                var innerContainer = angular.element(element[0].querySelector('.b2b-table-inner-container'));
+                var outerContainer = angular.element(element[0].querySelector('.b2b-table-scrollbar'));
+
+                scope.disableLeft = true;
+                scope.disableRight = false;
+
+                if (angular.isDefined(thElements[0])) {
+                    firstThWidth = thElements[0].offsetWidth;
+                }
+                if (angular.isDefined(tdElements[0])) {
+                    firstTdWidth = tdElements[0].offsetWidth;
+                }
+                firstColumnWidth = (firstThWidth > firstTdWidth) ? firstThWidth : firstTdWidth;
+
+                innerContainer.css({
+                    'padding-left': (firstColumnWidth + 2) + 'px'
+                });
+
+                angular.forEach(element.find('tr'), function (eachTr, index) {
+                    trObject = angular.element(eachTr);
+                    firstColumn = angular.element(trObject.children()[0]);
+
+                    angular.element(firstColumn).css({
+                        'margin-left': -(firstColumnWidth + 2) + 'px',
+                        'width': (firstColumnWidth + 2) + 'px',
+                        'position': 'absolute'
+                    });
+
+                    trHeight = trObject[0].offsetHeight;
+                    firstColumnHeight = firstColumn[0].offsetHeight;
+                    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
+                        firstColumnHeight += 1;
+                    }
+
+                    if (trHeight !== firstColumnHeight - 1) {
+                        if (trHeight > firstColumnHeight) {
+                            if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
+                                trHeight -= 1;
+                            }
+                            angular.element(firstColumn).css({
+                                'height': (trHeight + 1) + 'px'
+                            });
+                        } else {
+                            angular.element(trObject).css({
+                                'height': (firstColumnHeight - 1) + 'px'
+                            });
+                        }
+                    }
+
+                });
+
+                pxToScroll = outerContainer[0].offsetWidth - firstColumnWidth;
+
+                scope.scrollLeft = function () {
+                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + 20 - pxToScroll;
+                };
+
+                scope.scrollRight = function () {
+                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + pxToScroll - 20;
+                };
+
+                scope.checkScrollArrows = function () {
+                    if (innerContainer[0].scrollLeft == 0) {
+                        scope.disableLeft = true;
+                    } else {
+                        scope.disableLeft = false;
+                    }
+
+                    if (((innerContainer[0].offsetWidth - firstColumnWidth) + innerContainer[0].scrollLeft) >= tableElement[0].offsetWidth) {
+                        scope.disableRight = true;
+                    } else {
+                        scope.disableRight = false;
+                    }
+                };
+
+                innerContainer.bind('scroll', function () {
+                    $timeout(function () {
+                        scope.checkScrollArrows();
+                    }, 1);
+                });
+
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Tabs, tables & accordions.att:tables
+ *
+ * @description
+ *  <file src="src/tables/docs/readme.md" />
+ *
+ * @usage
+ *   
+ Table
+ <table b2b-table table-data="tableData" search-string="searchString">
+    <thead b2b-table-row type="header">
+        <tr>
+            <th b2b-table-header key="requestId" default-sort="a" id="col1">Header 1</th>
+            <th b2b-table-header key="requestType" sortable="false" id="col2">Header 2</th>
+        </tr>
+    </thead>
+    <tbody b2b-table-row type="body" row-repeat="rowData in tableData">
+        <tr>
+            <td b2b-table-body id="rowheader{{$index}}" headers="col1" ng-bind="rowData['requestId']"> </td>
+            <td b2b-table-body ng-bind="rowData['requestType']"></td>
+        </tr>
+    </tbody>
+ </table>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/tables/docs/demo.html" />
+            <file src="src/tables/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.tables', ['b2b.att.utilities'])
+    .constant('b2bTableConfig', {
+        defaultSortPattern: false, // true for descending & false for ascending
+        highlightSearchStringClass: 'tablesorter-search-highlight',
+        zebraStripCutOff: 6, // > zebraStripCutOff
+        tableBreakpoints: [ // breakpoints are >= min and < max
+            {
+                min: 0,
+                max: 480,
+                columns: 2
+            },
+            {
+                min: 480,
+                max: 768,
+                columns: 3
+            },
+            {
+                min: 768,
+                max: 1025,
+                columns: 5
+            },
+            {
+                min: 1025,
+                max: 1920,
+                columns: 7
+            }
+        ]
+    })
+    .directive('b2bTable', ['$filter', '$window', 'b2bTableConfig', '$timeout', function ($filter, $window, b2bTableConfig, $timeout) {
+        return {
+            restrict: 'EA',
+            replace: true,
+            transclude: true,
+            scope: {
+                tableData: "=",
+                viewPerPage: "=",
+                currentPage: "=",
+                totalPage: "=",
+                searchCategory: "=",
+                searchString: "=",
+                nextSort: '='
+            },
+            require: 'b2bTable',
+            templateUrl: 'b2bTemplate/tables/b2bTable.html',
+            controller: ['$scope', '$attrs', function ($scope, $attrs) {
+                this.headers = [];
+                this.currentSortIndex = null;
+                this.responsive = $scope.responsive = $attrs.responsive;
+                this.maxTableColumns = -1;
+                this.totalTableColums = 0;
+                this.active = $scope.active = false;
+                this.responsiveRowScopes = [];
+                this.hideColumnPriority = [];
+                this.hiddenColumn = [];
+                this.setIndex = function (headerScope, priority) {
+                    this.headers.push(headerScope);
+                    if (this.responsive) {
+                        this.totalTableColums++;
+                        if (!isNaN(priority)) {
+                            this.hideColumnPriority[priority] = this.totalTableColums - 1;
+                        } else {
+                            this.hideColumnPriority[this.totalTableColums - 1] = this.totalTableColums - 1;
+                        }
+                    }
+                    return this.totalTableColums - 1;
+                };
+                this.getIndex = function (headerName) {
+                    for (var i = 0; i < this.headers.length; i++) {
+                        if (this.headers[i].headerName === headerName) {
+                            return this.headers[i].index;
+                        }
+                    }
+                    return null;
+                };
+                this.setResponsiveRow = function (responsiveRowScope) {
+                    this.responsiveRowScopes.push(responsiveRowScope);
+                }
+                $scope.nextSort = '';
+                this.sortData = function (columnIndex, reverse, externalSort) {
+                    if ($scope.$parent && $scope.$parent !== undefined) {
+                        $scope.$parent.columnIndex = columnIndex;
+                        $scope.$parent.reverse = reverse;
+                    }
+                    this.currentSortIndex = columnIndex;
+                    if (externalSort === true) {
+                        if (!reverse) {
+                            $scope.nextSort = 'd'
+                        } else {
+                            $scope.nextSort = 'a'
+                        }
+                    }
+                    $scope.currentPage = 1;
+                    this.resetSortPattern();
+                };
+                this.getSearchString = function () {
+                    return $scope.searchString;
+                };
+                this.resetSortPattern = function () {
+                    for (var i = 0; i < this.headers.length; i++) {
+                        var currentScope = this.headers[i];
+                        if (currentScope.index !== this.currentSortIndex) {
+                            currentScope.resetSortPattern();
+                        }
+                    }
+                };
+
+                $scope.$watch('nextSort', function (val) {
+                    if ($scope.$parent && $scope.$parent !== undefined) {
+                        $scope.$parent.nextSort = val;
+                    }
+
+                });
+            }],
+            link: function (scope, elem, attr, ctrl) {
+                scope.searchCriteria = {};
+                scope.tableBreakpoints = attr.tableConfig ? scope.$parent.$eval(attr.tableConfig) : angular.copy(b2bTableConfig.tableBreakpoints);
+                scope.$watchCollection('tableData', function (value) {
+                    if (value && !isNaN(value.length)) {
+                        scope.totalRows = value.length;
+                    }
+                });
+                scope.$watch('currentPage', function (val) {
+                    if (scope.$parent && scope.$parent !== undefined) {
+                        scope.$parent.currentPage = val;
+                    }
+
+                });
+                scope.$watch('viewPerPage', function (val) {
+                    if (scope.$parent && scope.$parent !== undefined) {
+                        scope.$parent.viewPerPage = val;
+                    }
+                });
+                scope.$watch('totalRows', function (val) {
+                    if (scope.$parent && scope.$parent !== undefined) {
+                        if (val > b2bTableConfig.zebraStripCutOff) {
+                            scope.$parent.zebraStripFlag = true;
+                        } else {
+                            scope.$parent.zebraStripFlag = false;
+                        }
+                    }
+                });
+                scope.$watch(function () {
+                    return scope.totalRows / scope.viewPerPage;
+                }, function (value) {
+                    if (!isNaN(value)) {
+                        scope.totalPage = Math.ceil(value);
+                        scope.currentPage = 1;
+                    }
+                });
+                var searchValCheck = function (val) {
+                    if (angular.isDefined(val) && val !== null && val !== "") {
+                        return true;
+                    }
+                };
+                var setSearchCriteria = function (v1, v2) {
+                    if (searchValCheck(v1) && searchValCheck(v2)) {
+                        var index = ctrl.getIndex(v2);
+                        scope.searchCriteria = {};
+                        if (index !== null) {
+                            scope.searchCriteria[index] = v1;
+                        }
+                    } else if (searchValCheck(v1) && (!angular.isDefined(v2) || v2 === null || v2 === "")) {
+                        scope.searchCriteria = {
+                            $: v1
+                        };
+                    } else {
+                        scope.searchCriteria = {};
+                    }
+                };
+                scope.$watch('searchCategory', function (newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        setSearchCriteria(scope.searchString, newVal);
+                    }
+                });
+                scope.$watch('searchString', function (newVal, oldVal) {
+                    if (newVal !== oldVal) {
+                        setSearchCriteria(newVal, scope.searchCategory);
+                    }
+                });
+                scope.$watchCollection('searchCriteria', function (val) {
+                    if (scope.$parent && scope.$parent !== undefined) {
+                        scope.$parent.searchCriteria = val;
+                    }
+                    scope.totalRows = scope.tableData && ($filter('filter')(scope.tableData, val, false)).length || 0;
+                    scope.currentPage = 1;
+                });
+                var window = angular.element($window);
+                var findMaxTableColumns = function () {
+                    var windowWidth;
+                    windowWidth = $window.innerWidth;
+                    ctrl.maxTableColumns = -1;
+                    for (var i in scope.tableBreakpoints) {
+                        if (windowWidth >= scope.tableBreakpoints[i].min && windowWidth < scope.tableBreakpoints[i].max) {
+                            ctrl.maxTableColumns = scope.tableBreakpoints[i].columns;
+                            break;
+                        }
+                    }
+                    if (ctrl.maxTableColumns > -1 && ctrl.totalTableColums > ctrl.maxTableColumns) {
+                        ctrl.active = true;
+                    } else {
+                        ctrl.active = false;
+                    }
+                    for (var i in ctrl.responsiveRowScopes) {
+                        ctrl.responsiveRowScopes[i].setActive(ctrl.active);
+                    }
+                };
+                var findHiddenColumn = function () {
+                    var columnDiffenence = ctrl.maxTableColumns > -1 ? ctrl.totalTableColums - ctrl.maxTableColumns : 0;
+                    ctrl.hiddenColumn = [];
+                    if (columnDiffenence > 0) {
+                        var tempHideColumnPriority = angular.copy(ctrl.hideColumnPriority);
+                        for (var i = 0; i < columnDiffenence; i++) {
+                            ctrl.hiddenColumn.push(tempHideColumnPriority.pop());
+                        }
+                    }
+                };
+                var resizeListener = function () {
+                    findMaxTableColumns();
+                    findHiddenColumn();
+                };
+                if (ctrl.responsive) {
+                    window.bind('resize', function () {
+                        resizeListener();
+                        scope.$apply();
+                    });
+                    $timeout(function () {
+                        resizeListener();
+                    }, 100);
+                }
+            }
+        };
+    }])
+    .directive('b2bTableRow', [function () {
+        return {
+            restrict: 'EA',
+            compile: function (elem, attr) {
+                if (attr.type === 'header') {
+                    angular.noop();
+                } else if (attr.type === 'body') {
+                    var html = elem.children();
+                    if (attr.rowRepeat) {
+                        html.attr('ng-repeat', attr.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false "));
+                    }
+                    html.attr('ng-class', "{'odd': $odd && zebraStripFlag}");
+                    html.attr('class', 'data-row');
+                    html.attr('b2b-responsive-row', '{{$index}}');
+                    elem.append(html);
+                }
+            }
+        };
+    }])
+    .directive('b2bTableHeader', ['b2bTableConfig', function (b2bTableConfig) {
+        return {
+            restrict: 'EA',
+            replace: true,
+            transclude: true,
+            scope: {
+                sortable: '@',
+                defaultSort: '@',
+                index: '@key'
+            },
+            require: '^b2bTable',
+            templateUrl: function (elem, attr) {
+                if (attr.sortable === 'false') {
+                    return 'b2bTemplate/tables/b2bTableHeaderUnsortable.html';
+                } else {
+                    return 'b2bTemplate/tables/b2bTableHeaderSortable.html';
+                }
+            },
+            link: function (scope, elem, attr, ctrl) {
+                var reverse = b2bTableConfig.defaultSortPattern;
+                scope.headerName = elem.text();
+                scope.headerId = elem.attr('id');
+                scope.sortPattern = null;
+                var priority = parseInt(attr.priority, 10);
+                scope.columnIndex = ctrl.setIndex(scope, priority);
+
+                scope.isHidden = function () {
+                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);
+                };
+
+                scope.$watch(function () {
+                    return elem.text();
+                }, function (value) {
+                    scope.headerName = value;
+                });
+                scope.sort = function (sortType) {
+                    if (typeof sortType === 'boolean') {
+                        reverse = sortType;
+                    }
+                    ctrl.sortData(scope.index, reverse, false);
+                    scope.sortPattern = reverse ? 'descending' : 'ascending';
+                    reverse = !reverse;
+                };
+                scope.$watch(function () {
+                    return ctrl.currentSortIndex;
+                }, function (value) {
+                    if (value !== scope.index) {
+                        scope.sortPattern = null;
+                    }
+                });
+
+                if (scope.sortable === undefined || scope.sortable === 'true' || scope.sortable === true) {
+                    scope.sortable = 'true';
+                } else if (scope.sortable === false || scope.sortable === 'false') {
+                    scope.sortable = 'false';
+                }
+
+                if (scope.sortable !== 'false') {
+                    if (scope.defaultSort === 'A' || scope.defaultSort === 'a') {
+                        scope.sort(false);
+                    } else if (scope.defaultSort === 'D' || scope.defaultSort === 'd') {
+                        scope.sort(true);
+                    }
+                }
+                scope.resetSortPattern = function () {
+                    reverse = b2bTableConfig.defaultSortPattern;
+                };
+            }
+        };
+    }])
+    .directive('b2bResponsiveRow', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {
+        return {
+            restrict: 'EA',
+            require: '^b2bTable',
+            controller: ['$scope', function ($scope) {
+                this.rowValues = $scope.rowValues = [];
+                this.setRowValues = function (rowValue) {
+                    this.rowValues.push(rowValue);
+                };
+                var columnIndexCounter = -1;
+                this.getIndex = function () {
+                    columnIndexCounter++;
+                    return columnIndexCounter;
+                };
+            }],
+            link: function (scope, elem, attr, ctrl) {
+                if (ctrl.responsive) {
+                    scope.rowIndex = attr.b2bResponsiveRow;
+                    scope.active = false;
+                    scope.expandFlag = false;
+                    scope.headerValues = ctrl.headers;
+                    ctrl.setResponsiveRow(scope);
+                    var firstTd = elem.find('td').eq(0);
+                    scope.setActive = function (activeFlag) {
+                        scope.active = activeFlag;
+                        if (scope.active) {
+                            elem.addClass('has-button');
+                            firstTd.attr('role', 'rowheader');
+                            firstTd.parent().attr('role', 'row');
+                        } else {
+                            elem.removeClass('has-button');
+                            firstTd.removeAttr('role');
+                            firstTd.parent().removeAttr('role');
+                        }
+                    };
+                    scope.toggleExpandFlag = function (expandFlag) {
+                        if (angular.isDefined(expandFlag)) {
+                            scope.expandFlag = expandFlag;
+                        } else {
+                            scope.expandFlag = !scope.expandFlag;
+                        }
+                        if (scope.expandFlag) {
+                            elem.addClass('opened');
+                        } else {
+                            elem.removeClass('opened');
+                        }
+                    };
+
+                    firstTd.attr('scope', 'row');
+                    firstTd.addClass('col-1');
+                    scope.$on('$destroy', function () {
+                        elem.next().remove();
+                    });
+                    $timeout(function () {
+                        scope.firstTdId = firstTd.attr('id');
+                        var firstTdContent = firstTd.html();
+                        var toggleButtonTemplate = '<span ng-show="!active">' + firstTdContent + '</span><button type="button" aria-describedby="sup-actNum{{$id}}" aria-expanded="{{expandFlag}}" ng-show="active" ng-click="toggleExpandFlag()"><i ng-class="{\'icon-primary-accordion-plus\': !expandFlag, \'icon-primary-accordion-minus\': expandFlag}" aria-hidden="true"></i>' + firstTdContent + '</button><span id="sup-actNum{{$id}}" style="display:none">{{expandFlag && "Hide row below." || "Show row below."}}</span>';
+                        toggleButtonTemplate = $compile(toggleButtonTemplate)(scope);
+                        firstTd.html('');
+                        firstTd.prepend(toggleButtonTemplate);
+
+                        var template = $templateCache.get('b2bTemplate/tables/b2bResponsiveRow.html');
+                        template = $compile(template)(scope);
+                        elem.after(template);
+                    }, 100);
+                }
+            }
+        };
+    }])
+    .directive('b2bResponsiveList', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {
+        return {
+            restrict: 'EA',
+            require: '^b2bTable',
+            link: function (scope, elem, attr, ctrl) {
+                scope.columnIndex = parseInt(attr.b2bResponsiveList, 10);
+                scope.isVisible = function () {
+                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);
+                };
+            }
+        };
+    }])
+    .directive('b2bTableBody', ['$filter', '$timeout', 'b2bTableConfig', function ($filter, $timeout, b2bTableConfig) {
+        return {
+            restrict: 'EA',
+            require: ['^b2bTable', '?^b2bResponsiveRow'],
+            scope: true,
+            replace: true,
+            transclude: true,
+            templateUrl: 'b2bTemplate/tables/b2bTableBody.html',
+            link: function (scope, elem, attr, ctrl) {
+                var b2bTableCtrl = ctrl[0];
+                var b2bResponsiveRowCtrl = ctrl[1];
+                var highlightSearchStringClass = b2bTableConfig.highlightSearchStringClass;
+                var searchString = "";
+                var wrapElement = function (elem) {
+                    var text = elem.text();
+                    elem.html($filter('b2bHighlight')(text, searchString, highlightSearchStringClass));
+                };
+                var traverse = function (elem) {
+                    var innerHtml = elem.children();
+                    if (innerHtml.length > 0) {
+                        for (var i = 0; i < innerHtml.length; i++) {
+                            traverse(innerHtml.eq(i));
+                        }
+                    } else {
+                        wrapElement(elem);
+                        return;
+                    }
+                };
+                var clearWrap = function (elem) {
+                    var elems = elem.find('*');
+                    for (var i = 0; i < elems.length; i++) {
+                        if (elems.eq(i).attr('class') && elems.eq(i).attr('class').indexOf(highlightSearchStringClass) !== -1) {
+                            var text = elems.eq(i).text();
+                            elems.eq(i).replaceWith(text);
+                        }
+                    }
+                };
+                if (b2bResponsiveRowCtrl) {
+                    scope.columnIndex = b2bResponsiveRowCtrl.getIndex();
+                    scope.isHidden = function () {
+                        return (b2bTableCtrl.hiddenColumn.indexOf(scope.columnIndex) > -1);
+                    };
+                }
+                $timeout(function () {
+                    var actualHtml = elem.children();
+                    scope.$watch(function () {
+                        return b2bTableCtrl.getSearchString();
+                    }, function (val) {
+                        searchString = val;
+                        clearWrap(elem);
+                        if (actualHtml.length > 0) {
+                            traverse(elem);
+                        } else {
+                            wrapElement(elem);
+                        }
+                    });
+                    if (b2bResponsiveRowCtrl) {
+                        b2bResponsiveRowCtrl.setRowValues(elem.html());
+                    }
+                }, 50);
+            }
+        };
+    }])
+    .directive('b2bTableSort', ['b2bTableConfig','$timeout', function (b2bTableConfig,$timeout) {
+        return {
+            restrict: 'EA',
+            replace: true,
+            require: '^b2bTable',
+            link: function (scope, elem, attr, ctrl) {
+                var initialSort = '',
+                    nextSort = '',
+                    tempsort = '';
+                initialSort = attr.initialSort;
+
+                scope.sortTable = function (msg) {
+                    $timeout(function(){
+                        if (nextSort.length > 0) {
+
+                        if (nextSort === 'd' || nextSort === 'D') {
+                            tempsort = nextSort
+                            ctrl.sortData(msg, true, true);
+                            nextSort = 'a';
+                             $timeout(function(){
+                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){
+                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();
+                                }   
+                            },100);
+                            
+                        } else {
+                            tempsort = nextSort
+                            ctrl.sortData(msg, false, true);
+                            nextSort = 'd';
+                             $timeout(function(){
+                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){
+                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();
+                                }   
+                            },100);
+                        }
+                    } else if (initialSort.length > 0) {
+
+                        if (initialSort === 'd' || initialSort === 'D') {
+                            tempsort = nextSort
+                            ctrl.sortData(msg, true, true);
+                            nextSort = 'a';
+                            $timeout(function(){
+                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){
+                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();
+                                }   
+                            },100);
+                             
+                        } else {
+                            tempsort = nextSort
+                            ctrl.sortData(msg, false, true);
+                            nextSort = 'd';
+                             $timeout(function(){
+                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){
+                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();
+                                }   
+                            },100);
+
+                             
+                        }
+                    }
+                    },10)
+
+                };
+
+                scope.sortDropdown = function(msg) {
+
+                    if(tempsort==='') {
+
+                        tempsort='a'
+                    }
+                    if(tempsort === 'd' || tempsort === 'D' ) {
+                        ctrl.sortData(msg, true, false);       
+                    } else {
+                       ctrl.sortData(msg, false, false);
+                    }
+
+                };
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Tabs, tables & accordions.att:tabs
+ *
+ * @description
+ *  <file src="src/tabs/docs/readme.md" />
+ *
+ * @usage
+ *  <b2b-tabset tab-id-selected="activeTabsId">
+        <b2b-tab ng-repeat="tab in gTabs" tab-item="tab" 
+                 id="{{tab.uniqueId}}" aria-controls="{{tab.tabPanelId}}"
+                 ng-disabled="tab.disabled">
+            {{tab.title}}
+        </b2b-tab>
+    </b2b-tabset>
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/tabs/docs/demo.html" />
+            <file src="src/tabs/docs/demo.js" />
+        </example>
+    </section>
+ *
+ */
+
+angular.module('b2b.att.tabs', ['b2b.att.utilities'])
+    .directive('b2bTabset', function () {
+        return {
+            restrict: 'EA',
+            transclude: true,
+            replace: true,
+            scope: {
+                tabIdSelected: '='
+            },
+            templateUrl: 'b2bTemplate/tabs/b2bTabset.html',
+            controller: ['$scope', function ($scope) {
+
+                this.setTabIdSelected = function (tab) {
+                    $scope.tabIdSelected = tab.id;
+                };
+
+                this.getTabIdSelected = function () {
+                    return $scope.tabIdSelected;
+                };
+            }]
+        };
+    })
+    .directive('b2bTab', ['keymap', function (keymap) {
+        return {
+            restrict: 'EA',
+            transclude: true,
+            replace: true,
+            require: '^b2bTabset',
+            scope: {
+                tabItem: "="
+            },
+            templateUrl: 'b2bTemplate/tabs/b2bTab.html',
+            controller: [function(){}],
+            link: function (scope, element, attr, b2bTabsetCtrl) {
+
+                if (scope.tabItem && !scope.tabItem.disabled) {
+                    scope.tabItem.disabled = false;
+                }
+
+                scope.isTabActive = function () {
+                    return (scope.tabItem.id === b2bTabsetCtrl.getTabIdSelected());
+                };
+
+                scope.clickTab = function () {
+                    if (attr.disabled) {
+                        return;
+                    }
+                    b2bTabsetCtrl.setTabIdSelected(scope.tabItem);
+                };
+
+                scope.nextKey = function () {
+                    var el = angular.element(element[0])[0];
+                    var elementToFocus = null;
+                    while (el && el.nextElementSibling) {
+                        el = el.nextElementSibling;
+                        if (!el.querySelector('a').disabled) {
+                            elementToFocus = el.querySelector('a');
+                            break;
+                        }
+                    }
+
+                    if (!elementToFocus) {
+                        var childTabs = element.parent().children();
+                        for (var i = 0; i < childTabs.length; i++) {
+                            if (!childTabs[i].querySelector('a').disabled) {
+                                elementToFocus = childTabs[i].querySelector('a');
+                                break;
+                            }
+                        }
+                    }
+
+                    if (elementToFocus) {
+                        elementToFocus.focus();
+                    }
+                };
+
+                scope.previousKey = function () {
+                    var el = angular.element(element[0])[0];
+                    var elementToFocus = null;
+
+                    while (el && el.previousElementSibling) {
+                        el = el.previousElementSibling;
+                        if (!el.querySelector('a').disabled) {
+                            elementToFocus = el.querySelector('a');
+                            break;
+                        }
+                    }
+
+                    if (!elementToFocus) {
+                        var childTabs = element.parent().children();
+                        for (var i = childTabs.length - 1; i > 0; i--) {
+                            if (!childTabs[i].querySelector('a').disabled) {
+                                elementToFocus = childTabs[i].querySelector('a');
+                                break;
+                            }
+                        }
+                    }
+
+                    if (elementToFocus) {
+                        elementToFocus.focus();
+                    }
+                };
+
+                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {
+
+                    if (!(evt.keyCode)) {
+                        evt.keyCode = evt.which;
+                    }
+
+                    switch (evt.keyCode) {
+                        case keymap.KEY.RIGHT:
+                            evt.preventDefault();
+                            scope.nextKey();
+                            break;
+
+                        case keymap.KEY.LEFT:
+                            evt.preventDefault();
+                            scope.previousKey();
+                            break;
+
+                        default:;
+                    }
+                });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Messages, modals & alerts.att:tagBadges
+ *
+ * @description
+ *  <file src="src/tagBadges/docs/readme.md" />
+ *
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/tagBadges/docs/demo.html" />
+            <file src="src/tagBadges/docs/demo.js" />
+        </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.tagBadges', ['b2b.att.utilities'])
+        .directive('b2bTagBadge',['$timeout',function($timeout){
+            return{
+                restrict: 'EA',
+                link: function(scope,elem,attr,ctrl){
+                    elem.addClass('b2b-tags');
+                    if(angular.element(elem[0].querySelector('.icon-primary-close')).length>0) {
+                        var item = angular.element(elem[0].querySelector('.icon-primary-close'));
+                        item.bind('click',function(){
+                        elem.css({'height':'0','width':'0','padding':'0','border':'0'});
+                        elem.attr('tabindex','0');
+                        elem[0].focus();
+                        item.parent().remove();
+                        elem[0].bind('blur',function(){
+                            elem[0].remove();
+                        });
+                    });  
+                    }
+                  
+
+
+
+                }
+            };   
+}]);
+/**
+ * @ngdoc directive
+ * @name Forms.att:textArea
+ *
+ * @description
+ *  <file src="src/textArea/docs/readme.md" />
+ *
+ * @usage
+ *  <textarea b2b-reset b2b-reset-textarea ng-model="textAreaModel" ng-disabled="disabled" ng-trim="false" placeholder="{{placeholderText}}" rows="{{textAreaRows}}" maxlength="{{textAreaMaxlength}}" role="textarea"></textarea>
+ *
+ * @example
+    <section id="code">
+        <b>HTML + AngularJS</b>
+        <example module="b2b.att">
+            <file src="src/textArea/docs/demo.html" />
+            <file src="src/textArea/docs/demo.js" />
+        </example>
+    </section>
+ */
+angular.module('b2b.att.textArea', ['b2b.att.utilities'])
+
+.directive('b2bResetTextarea', [ function () {
+    return {
+        restrict: 'A',
+        require: 'b2bReset',
+        link: function (scope, element, attrs, ctrl) {
+
+            var resetButton = ctrl.getResetButton();
+            
+            var computeScrollbarAndAddClass = function () {
+                if (element.prop('scrollHeight') > element[0].clientHeight) {
+                    element.addClass('hasScrollbar');
+                } else {
+                    element.removeClass('hasScrollbar');
+                }
+            };
+            
+            computeScrollbarAndAddClass();
+
+            element.on('focus keyup', function(){
+                computeScrollbarAndAddClass();
+            });
+        }
+    };
+}]);
+
+/**
+ * @ngdoc directive
+ * @name Forms.att:tooltipsForForms
+ *
+ * @description
+ *  <file src="src/tooltipsForForms/docs/readme.md" />
+ *
+ * @example
+ <example module="b2b.att">
+ <file src="src/tooltipsForForms/docs/demo.html" />
+ <file src="src/tooltipsForForms/docs/demo.js" />
+ </example>
+ */
+angular.module('b2b.att.tooltipsForForms', ['b2b.att.utilities'])
+        .directive('b2bTooltip', ['$document', '$window', '$isElement', function ($document, $window, $isElement) {
+                return  {
+                    restrict: 'A',
+                    link: function (scope, elem, attr, ctrl) {
+                        var icon = elem[0].querySelector('a.tooltip-element');
+                        var btnIcon = elem[0].querySelector('.btn.tooltip-element');
+                        var tooltipText = elem[0].querySelector('.helpertext');
+                        var tooltipWrapper = elem[0].querySelector('.tooltip-size-control');
+                        if (elem.hasClass('tooltip-onfocus')) {
+                            var inputElm = angular.element(elem[0].querySelector("input"));
+                            var textAreaElm = angular.element(elem[0].querySelector("textarea"));
+                        }
+                        angular.element(icon).attr({'aria-expanded': false});
+                        angular.element(btnIcon).attr({'aria-expanded': false});
+                        var calcTooltip = function () {
+                            if (!elem.hasClass('tooltip active')) {
+                                if (elem.hasClass('tooltip-onfocus')) {
+                                    angular.element(elem[0].querySelector("input")).triggerHandler('focusout');
+                                }
+                                if (elem.hasClass('tooltip-onclick')) {
+                                    return false;
+                                }
+                                angular.element(icon).removeClass('active');
+                                angular.element(icon).attr({'aria-expanded': true});
+                                angular.element(icon).attr({'aria-describedby': angular.element(tooltipText).attr('id')});
+                                angular.element(tooltipText).attr({'aria-hidden': false});
+                                elem.addClass('active');
+
+                                var tooltipIconPos = angular.element(icon).prop('offsetLeft'),
+                                        tooltipPosition = angular.element(tooltipText).prop('offsetWidth') / 2,
+                                        tipOffset = (tooltipIconPos - 30) - tooltipPosition,
+                                        maxRightPos = (($window.innerWidth - 72) - (tooltipPosition * 2)) - 14.5;
+
+                                if ($window.innerWidth >= '768') {
+                                    if (tipOffset < 0) {// if icon on far left side of page
+                                        tipOffset = 15;
+                                    }
+                                    else if (tooltipIconPos > maxRightPos) {// if icon is far right side of page
+                                        tipOffset = maxRightPos;
+                                    }
+                                    else {// if tooltip in the middle somewhere
+                                        tipOffset = tipOffset;
+                                    }
+                                    angular.element(tooltipWrapper).css({left: tipOffset + 'px'});
+                                }
+                            }
+                        };
+                        
+                        // TOOLTIP LINK ONCLICK AND FOCUS
+                        angular.element(icon).on('click mouseover mouseout focus blur', function (e) {
+                            if (e.type == 'mouseover') {
+                                calcTooltip();
+                            }
+                            else if (e.type == 'mouseout' && elem.hasClass('active')) {
+                                if (!elem.hasClass('activeClick')) {
+                                    angular.element(tooltipText).attr({
+                                        'aria-hidden': true,
+                                        'tabindex': '-1'
+                                    });
+                                    elem.removeClass('active');
+                                } else if (elem.hasClass('activeClick') && navigator.userAgent.match(/iphone/i)) {
+                                    elem.removeClass('active activeClick');
+                                }
+                            }
+
+                            else {
+                                if (elem.hasClass('activeClick')) {
+                                    angular.element(icon).attr({'aria-expanded': false});
+                                    angular.element(tooltipText).attr({'aria-hidden': true});
+                                    angular.element(icon).removeAttr('aria-describedby');
+                                    elem.removeClass('activeClick active');
+                                    e.preventDefault();
+                                }
+                                else if (e.type == 'click') {
+                                    elem.addClass('activeClick');
+                                    calcTooltip();
+                                    e.preventDefault();
+                                }
+                                else {
+                                    angular.element(icon).on('keydown', function (e) {
+                                        if (e.keyCode == '32') {
+                                            (elem.hasClass('active')) ? elem.removeClass('active') : elem.addClass('value');
+                                            angular.element(icon).triggerHandler('click');
+                                            e.preventDefault();
+                                        } else if (e.keyCode == '27') {
+                                            (elem.hasClass('active')) ? elem.removeClass('active activeClick') : elem.addClass('value');
+                                        }
+                                    });
+                                    e.preventDefault();
+                                }
+                            }
+                            e.preventDefault();
+                        });
+
+                        // TOOLTIP BUTTON INSIDE A TEXT FIELD
+                        angular.element(btnIcon).on('click', function (e) {
+                            var $this = angular.element(this);
+                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {
+                                elem.removeClass('active');
+                                $this.removeClass('active');
+                                angular.element(tooltipText).removeAttr('aria-live');
+                                $this.attr({'aria-expanded': 'false'});
+                                $this.removeAttr('aria-describedby');
+                            } else {
+                                elem.addClass('active');
+                                $this.addClass('active');
+                                $this.attr({'aria-expanded': 'true', 'aria-describedby': angular.element(tooltipText).attr('id')});
+                                angular.element(tooltipText).attr({'aria-live': 'polite'});
+                            }
+                        });
+
+                        angular.element(btnIcon).on('blur', function (e) {
+                            var $this = angular.element(this);
+                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {
+                                elem.removeClass('active');
+                                $this.removeClass('active');
+                                angular.element(tooltipText).removeAttr('aria-live');
+                                $this.attr({'aria-expanded': 'false'});
+                                $this.removeAttr('aria-describedby');
+                            }
+                        });  
+
+                        angular.element(btnIcon).on('keydown', function (e) {
+                            var $this = angular.element(this);
+                            if (e.keyCode == '27') {
+                                var $this = angular.element(this);
+                                if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {
+                                    elem.removeClass('active');
+                                    $this.removeClass('active');
+                                    angular.element(tooltipText).removeAttr('aria-live');
+                                    $this.attr({'aria-expanded': 'false'});
+                                    $this.removeAttr('aria-describedby');
+                                }
+                            }
+                        });
+
+                        // close all tooltips if clicking something else
+                        $document.bind('click', function (e) {
+                            var isElement = $isElement(angular.element(e.target), elem, $document);
+                            if (!isElement) {
+                                elem.removeClass('active');
+                                angular.element(elem[0].querySelector('.tooltip-element')).removeClass('active');
+                                angular.element(tooltipText).removeAttr('aria-live');
+                                angular.element(elem[0].querySelector('.tooltip-element')).attr({'aria-expanded': 'false'});
+                                angular.element(elem[0].querySelector('.tooltip-element')).removeAttr('aria-describedby');
+                            };
+                        });
+
+                        angular.element(inputElm).on('keydown', function (e) {
+                            if (e.keyCode == '27'){
+                                elem.removeClass('active');
+                                angular.element(tooltipText).css('display', 'none');
+                                angular.element(tooltipText).removeAttr('aria-live');
+
+                                if (angular.element(this).attr('aria-describedby') === undefined){
+
+                                }
+
+                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){
+
+                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);
+
+                                    angular.element(this).attr('aria-describedby', describedByValue);
+
+                                }
+                                else {
+                                    angular.element(this).removeAttr('aria-describedby');
+                                }
+                            }
+                        });
+
+                        angular.element(textAreaElm).on('keydown', function (e) {
+                            if (e.keyCode == '27'){
+                                elem.removeClass('active');
+                                angular.element(tooltipText).css('display', 'none');
+                                angular.element(tooltipText).removeAttr('aria-live');
+                                if (angular.element(this).attr('aria-describedby') === undefined){
+
+                                }
+
+                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){
+
+                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);
+
+                                    angular.element(this).attr('aria-describedby', describedByValue);
+
+                                }
+                                else {
+                                    angular.element(this).removeAttr('aria-describedby');
+                                }
+                            }
+                        });
+
+                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXT FIELD
+                        angular.element(inputElm).on('focus', function (e) {
+                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');
+                            for (var i = 0; i < allTooltip.length; i++) {
+                                if (angular.element(allTooltip[i]).hasClass('active')) {
+                                    angular.element(allTooltip[i]).triggerHandler('click');
+                                }
+                            };
+                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});
+                            angular.element(tooltipText).css('display', 'block');
+                            angular.element(tooltipText).attr({'aria-live': 'polite'});
+                            elem.addClass('active');
+                        });
+                        angular.element(inputElm).on('blur', function (e) {
+                            elem.removeClass('active');
+                            angular.element(tooltipText).css('display', 'none');
+                            angular.element(tooltipText).removeAttr('aria-live');
+                            angular.element(this).removeAttr('aria-describedby');
+                        });
+
+                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXTAREA
+                        angular.element(textAreaElm).on('focus', function (e) {
+                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');
+                            for (var i = 0; i < allTooltip.length; i++) {
+                                if (angular.element(allTooltip[i]).hasClass('active')) {
+                                    angular.element(allTooltip[i]).triggerHandler('click');
+                                }
+                            };
+                            elem.addClass('active');
+                            angular.element(tooltipText).css('display', 'block');
+                            angular.element(tooltipText).attr({'aria-live': 'polite'});
+                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});
+                        });
+                        angular.element(textAreaElm).on('blur', function (e) {
+                            elem.removeClass('active');
+                            angular.element(tooltipText).css('display', 'none');
+                            angular.element(tooltipText).removeAttr('aria-live');
+                            angular.element(this).removeAttr('aria-describedby');
+                        });
+                    }
+                };
+            }]); 
+/**
+ * @ngdoc directive
+ * @name Navigation.att:TreeNavigation
+ *
+ *
+ * @scope
+ * @param {String} setRole - This value needs to be "tree". This is required to incorporate CATO requirements.
+ * @param {Boolean} groupIt - This value needs to be "false" for top-level tree rendered.
+ *
+ * @description
+ *  <file src="src/treeNav/docs/readme.md" />
+ *
+ * @usage
+ *      <div class="b2b-tree">
+ *                <b2b-tree-nav collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-nav>
+ *            </div>
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/treeNav/docs/demo.html" />
+            <file src="src/treeNav/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.treeNav', ['b2b.att.utilities'])
+    .directive('b2bTreeNav', function () {
+        return {
+            restrict: "E",
+            replace: true,
+            scope: {
+                collection: '=',
+                groupIt: '=',
+                setRole: '@'
+            },
+            templateUrl: function (element, attrs) {
+                if (attrs.groupIt === 'true') {
+                    return "b2bTemplate/treeNav/groupedTree.html";
+                } else {
+                    return "b2bTemplate/treeNav/ungroupedTree.html";
+                }
+            },
+            link: function (scope) {               
+                if (!(scope.setRole === 'tree')) {
+                    scope.setRole = 'group';
+                }             
+            }
+        }
+    })
+    .directive('b2bMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {
+        return {
+            restrict: "E",
+            replace: true,
+            scope: {
+                member: '=',
+                groupIt: '='
+            },
+            templateUrl: 'b2bTemplate/treeNav/treeMember.html',
+            link: function (scope, element, attrs) {
+                scope.elemArr = [];
+                var removeRootTabIndex = function (elem) {
+                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {
+                        elem.attr('tabindex', -1);                        
+                        return;
+                    }
+                    removeRootTabIndex(elem.parent());
+                };
+                scope.$watch('member.child', function(newVal, oldVal){                  
+                    if(newVal !== oldVal){
+                        scope.showChild();
+                    };
+                });
+                scope.showChild = function () {
+                        if (!element.hasClass('grouped')) {
+                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {
+                                scope.groupIt = false;
+                                element.addClass('grouped');
+                                element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");
+                                $compile(element.contents())(scope);
+                                if(scope.member.active && scope.member.active === true){
+                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');
+                                };
+                                if(scope.member.selected && scope.member.selected === true){
+                                    element.attr('aria-selected', true);
+                                    element.attr('tabindex', 0);
+                                    removeRootTabIndex(element);
+                                };
+                                if(scope.member.active && scope.member.active == undefined){
+                                    element.find('i').eq(0).addClass('icon-primary-collapsed');
+                                };
+                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {
+                                element.addClass('grouped');
+                                scope.groupIt = true;
+                                // FILTER - GROUPBY - APPROACH 
+                                var j = 0;
+                                var grpName = '';
+                                if(scope.member.child[0].groupName !== undefined){
+                                    grpName = scope.member.child[0].groupName;
+                                }
+                                else{
+                                    var toSlice = scope.member.child[0].name.search(' ');
+                                    grpName = scope.member.child[0].name.slice(0, toSlice);
+                                }
+
+                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {
+                                    j = 0;
+                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        
+                                        if (j === scope.member.child.length) {
+                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);
+                                            break;
+                                            
+                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){
+                                                scope.member.child[j-1].activeGrp = true;
+                                            };
+                                            
+                                        }
+                                        if (i + scope.member.divide > scope.member.child.length) {
+                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);
+                                            if(scope.member.child[j].active && scope.member.child[j].active===true){
+                                                scope.member.child[j].activeGrp = true;
+                                            };
+
+                                        } else {
+                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);
+                                            if(scope.member.child[j].active && scope.member.child[j].active===true){
+                                                scope.member.child[j].activeGrp = true;
+                                            };
+                                        }
+                                    }
+                                }
+                                if(scope.member.divide){
+                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");
+                                } else {
+                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");
+                                }
+                                $compile(element.contents())(scope);
+                                if(scope.member.active && scope.member.active === true){
+                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');
+                                };
+                                if(scope.member.selected && scope.member.selected === true){
+                                    element.attr('aria-selected', true);
+                                };
+                                if( scope.member.active && scope.member.active == undefined){
+                                    element.find('i').eq(0).addClass('icon-primary-collapsed');
+                                };
+                            }
+                        }
+                };
+                //Below condition opens node for opening on json load.
+                if(scope.member.active && scope.member.active == true){
+                    scope.showChild();
+                };
+                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){
+                    element.find('i').eq(0).addClass('icon-primary-collapsed');
+                }
+                else if(scope.member.child == undefined){
+                    element.find('i').eq(0).addClass('icon-primary-circle');
+                };
+                element.bind('keydown', function (evt) {
+                    switch (evt.keyCode) {
+                        case keymap.KEY.ENTER:
+                            if (element.hasClass('bg') && scope.member.onSelect !== undefined) {
+                                scope.member.onSelect(scope.member);
+                            }
+                            evt.stopPropagation();
+                            break;
+                        default: 
+                            break;                            
+                    }
+                    
+                });
+                //else getting true in every case .. so better use switch case .. that makes more sense you dumb.
+                element.bind('click', function (evt) {
+                    scope.showChild();
+                    var expandFunc = scope.member.onExpand;
+                    
+                    //onSelect
+                        if (element.hasClass('bg') && scope.member.onSelect !== undefined) {
+                                    scope.member.onSelect(scope.member);
+                                }
+                        if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {
+                           var eValue = scope.member.onExpand(scope.member);
+                        }
+                        if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {
+                            scope.member.onCollapse(scope.member);
+                        }
+                });
+            }
+        }
+}])
+    .directive('b2bTreeLink', ['keymap', '$timeout', function (keymap, $timeout) {
+        return {
+            restrict: 'A',
+            link: function (scope, element, attr, ctrl) {
+                var rootE, parentE, upE, downE;
+                var closeOthersUp = function (elem,isKeyPress,passiveClose) {
+                    //For accordion functionality on sibling nodes
+                    if (elem.find('a').eq(0).hasClass('active')) {
+                        activeToggle(elem,isKeyPress,passiveClose);
+                        return;
+                    }
+                    if (elem.hasClass('bg') && !isKeyPress) {
+                        elem.removeClass('bg');
+                        if (elem.attr('aria-selected')) {
+                            elem.attr('aria-selected', 'false');
+                        }                        
+                    }
+                    if (elem[0].previousElementSibling !== null) {
+                        closeOthersUp(angular.element(elem[0].previousElementSibling),isKeyPress);
+                    }
+                };
+                var closeOthersDown = function (elem,isKeyPress,passiveClose) {
+                    //For accordion functionality on sibling nodes
+                    if (elem.find('a').eq(0).hasClass('active')) {
+                        activeToggle(elem,isKeyPress,passiveClose);
+                        return;
+                    }
+                    if (elem.hasClass('bg') && !isKeyPress) {
+                        elem.removeClass('bg');
+                        if (elem.attr('aria-selected')) {
+                            elem.attr('aria-selected', 'false');
+                        }                        
+                    }
+                    if (elem[0].nextElementSibling !== null) {
+                        closeOthersDown(angular.element(elem[0].nextElementSibling),isKeyPress);
+                    }
+                };
+
+               
+                var removeBackground = function(elem){
+
+                    if(elem.hasClass('b2b-tree')){
+                        angular.element(elem[0].getElementsByClassName('bg')).removeClass('bg');
+                        return;
+                    }else{
+                        removeBackground(elem.parent().parent());
+                    }
+
+                };
+
+/**
+* These two functions used for setting heights on parent nodes as the child node closes
+* Retaining this code for future reference
+
+                var addParentHeight = function(e, h) {
+                    var parentLi = e.parent().parent();
+                    var parentUl = e.parent();
+                    if(!parentLi.hasClass('b2b-tree')) {
+                        var addHeight = parentUl[0].offsetHeight + h;
+                        parentLi.find('ul').eq(0).css({
+                            height: addHeight+'px'
+                        })
+                        addParentHeight(parentLi, h);
+                    }                    
+                };
+
+                var removeParentHeight = function(e, h) {
+                    var parentLi = e.parent().parent();
+                    var parentUl = e.parent();
+                    if(!parentLi.hasClass('b2b-tree')) {
+                        var addHeight = parentUl[0].offsetHeight - h;
+                        parentLi.find('ul').eq(0).css({
+                            height: addHeight+'px'
+                        })
+                        removeParentHeight(parentLi, h);
+                    }
+                };
+*/          
+
+            // isKeyPress - to notify that the function is called by Right Key press
+            // passiveClose -  prevents firing of oncollapse events during the action
+            // of expand function(check the function definition)
+
+                var activeToggle = function (elem,isKeyPress,passiveClose) {
+                    var element = elem.find('a').eq(0);
+                    if (element.hasClass('active')) {
+                        if(!isKeyPress){
+                            elem.removeClass('bg');
+                        }
+                        
+                        if (elem.attr('aria-selected') && !isKeyPress) {
+                            elem.attr('aria-selected', 'false');
+                        }
+                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {
+                            if(isKeyPress && scope.member){
+                                if (scope.member.onCollapse !== undefined && !passiveClose) {
+                                    scope.member.onCollapse(scope.member);
+                                }
+                            }
+                            element.removeClass('active');
+                            elem.attr('aria-expanded', 'false');
+                            element.find('i').eq(0).removeClass('icon-primary-expanded');
+                            element.find('i').eq(0).addClass('icon-primary-collapsed');
+                            //For Animation: below commented code is used to manually set height of UL to zero 
+                            //retaining code for future reference
+                            /*
+                            var totalHeight = elem.find('ul')[0].scrollHeight;
+                            removeParentHeight(elem, totalHeight);
+                            elem.find('ul').eq(0).css({
+                                height: null
+                            });*/
+                        }
+                    } else {
+                        if(!isKeyPress){
+                            elem.addClass('bg');
+                            elem.attr('aria-selected', 'true');
+                        }
+                        
+                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {
+                            if(isKeyPress){
+                                if(typeof scope.showChild === 'function' ){
+                                scope.showChild();
+                                }
+                                if(scope.member){
+                                    if (scope.member.onExpand !== undefined) {
+                                        scope.member.onExpand(scope.member);
+                                    }
+                                }
+                            }
+                            element.addClass('active');
+                            elem.attr('aria-expanded', 'true');
+                            element.find('i').eq(0).removeClass('icon-primary-collapsed');
+                            element.find('i').eq(0).addClass('icon-primary-expanded');
+                            //For Animation: below commented code is used to manually set height of the ul generatedon the click of parent LI.
+                            //retaining code for future reference
+                            /*                            
+                            var totalHeight = elem.find('ul')[0].scrollHeight;
+                            addParentHeight(elem, totalHeight);
+                            elem.find('ul').eq(0).css({
+                                height: totalHeight+'px'
+                            });*/
+                            
+                        }
+                    }
+                };
+                element.bind('click', function (evt) {
+                    //first we close others and then we open the clicked element
+                    if (element[0].previousElementSibling) {
+                        closeOthersUp(angular.element(element[0].previousElementSibling));
+                    }
+                    if (element[0].nextElementSibling) {
+                        closeOthersDown(angular.element(element[0].nextElementSibling));
+                    }
+                    removeBackground(element);
+                    activeToggle(element);                    
+                    
+                    evt.stopPropagation();                    
+                });
+                //default root tree element tabindex set zero
+                if (element.parent().parent().hasClass('b2b-tree') && (element.parent()[0].previousElementSibling === null)) {
+                    element.attr('tabindex', 0);
+                }
+                //check root via class
+                var isRoot = function (elem) {
+                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                };
+                var findRoot = function (elem) {
+                    if (isRoot(elem)) {
+                        rootE = elem;
+                        return;
+                    }
+                    findRoot(elem.parent());
+                };
+
+                var findPreActive = function (elem) {
+
+                    if (!(elem.hasClass("active"))) {
+                        return;
+                    } else {
+                        var childElems = angular.element(elem[0].nextElementSibling.children);
+                        lastE = angular.element(childElems[childElems.length - 1]);
+                        if (lastE.find('a').eq(0).hasClass('active')) {
+                            findPreActive(lastE.find('a').eq(0));
+                        }
+                        upE = lastE;
+                    }
+                };
+
+                var findUp = function (elem) {
+                    if (isRoot(elem)) {
+                        upE = elem;
+                        return;
+                    }
+                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {
+                        upE = angular.element(elem[0].previousElementSibling);
+                        if (upE.find('a').eq(0).hasClass('active')) {
+                            findPreActive(upE.find('a').eq(0));
+                        }
+                    } else {
+                        upE = elem.parent().parent();
+                    }
+                };
+
+                var downElement = function (elem) {
+                    if (elem.next().hasClass('tree-hide')) {
+                        downElement(elem.next());
+                    } else {
+                        downE = elem.next();
+                    }
+                }
+                var isBottomElem = false;
+                var downParent = function(liElem){
+                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree')){
+                        isBottomElem = true;
+                        return;
+                    }
+                    if(liElem.next().length !== 0){
+                        downE = liElem.next().eq(0);
+                        return;
+                    }
+                    else {
+                        downParent(liElem.parent().parent());
+                    }
+                }
+                
+                var findDown = function (elem) {
+                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {
+                        downE = elem.parent();
+                        return;
+                    }
+                    if (elem.hasClass('active')) {
+                        downE = elem.next().find('li').eq(0);
+                        if (downE.hasClass('tree-hide')) {
+                            downElement(downE);
+                        }
+
+                    } else {
+                        downParent(elem.parent());
+                        if(isBottomElem === true){
+                            downE = elem.parent();
+                            isBottomElem = false;
+                        }
+                    }
+                };
+
+
+                var resetTabPosition = function(element){
+                    findRoot(element);
+                    angular.element(rootE.parent().parent()[0].querySelector("li[tabindex='0']")).attr('tabindex','-1');
+                    var elemToFocus =  rootE.parent().parent()[0].querySelector(".bg")|| rootE;
+
+                    angular.element(elemToFocus).attr('tabindex','0');
+                };
+                // Function to control the expansion of nodes when the user tabs into the tree and
+                // the slected node is not visible
+                var expand = function(elemArr){
+                    var elem= elemArr.pop();
+                    var element = elem.find('a').eq(0);                    
+                    var selectedNode = elem.parent().parent()[0].querySelector(".bg");
+                    if(selectedNode != null){
+                        while(elem){
+                             element = elem.find('a').eq(0);
+                    if(!element.hasClass('active') ){
+
+
+                    if (elem[0].previousElementSibling) {
+                        closeOthersUp(angular.element(elem[0].previousElementSibling),true,true);
+                        }
+                        if (elem[0].nextElementSibling) {
+                            closeOthersDown(angular.element(elem[0].nextElementSibling),true,true);
+                        }
+
+                         if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {
+                            if(typeof scope.showChild === 'function' ){
+                                scope.showChild();
+                            }
+                            element.addClass('active');
+                            elem.attr('aria-expanded', 'true');
+                            element.find('i').eq(0).removeClass('icon-primary-collapsed');
+                            element.find('i').eq(0).addClass('icon-primary-expanded');
+                            }
+                          
+                          }   
+                          elem = elemArr.pop();
+                        }                      
+                        
+                    }else{
+                        return;
+                    }                   
+                };
+
+                element.find('a').eq(0).bind('mouseenter', function (evt) {
+                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {
+                        angular.element(value).removeClass('activeTooltip') 
+                    });
+                    element.addClass('activeTooltip');
+                });
+                element.find('a').eq(0).bind('mouseleave', function (evt) {
+                    element.removeClass('activeTooltip');
+                });
+                element.bind('focus', function (evt) {
+                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {
+                        angular.element(value).removeClass('activeTooltip') 
+                    });
+                    element.addClass('activeTooltip');
+                });
+                element.bind('blur', function (evt) {
+                    element.removeClass('activeTooltip');
+                });
+                element.bind('keydown', function (evt) {
+                    switch (evt.keyCode) {
+                    case keymap.KEY.HOME:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        element.attr('tabindex', -1);
+                        findRoot(element);
+                        rootE.eq(0).attr('tabindex', 0);
+                        rootE[0].focus();
+                        break;
+                    case keymap.KEY.LEFT:
+                        evt.preventDefault();
+                        evt.stopPropagation(); 
+                      
+                        if(element.find('a').eq(0).hasClass('active')){
+                            if (element[0].previousElementSibling) {
+                                closeOthersUp(angular.element(element[0].previousElementSibling),true);
+                            }
+                            if (element[0].nextElementSibling) {
+                                closeOthersDown(angular.element(element[0].nextElementSibling),true);
+                             }
+                             activeToggle(element,true);
+                                return;
+                        }
+                            element.attr('tabindex', -1);
+                            parentE = element.parent().parent();
+                            parentE.attr('tabindex', 0);
+                            parentE[0].focus();
+                        break;
+                    case keymap.KEY.UP:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        element.attr('tabindex', -1);
+                        findUp(element);
+                        upE.eq(0).attr('tabindex', 0);
+                        upE[0].focus();
+                        break;
+                    case keymap.KEY.RIGHT:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        if(element.find('i').eq(0).hasClass('icon-primary-circle')){
+                            break;
+                        }    
+                        if (!element.find('a').eq(0).hasClass('active')) {
+                            if (element[0].previousElementSibling) {
+                        closeOthersUp(angular.element(element[0].previousElementSibling),true);
+                        }
+                        if (element[0].nextElementSibling) {
+                            closeOthersDown(angular.element(element[0].nextElementSibling),true);
+                        }
+                        activeToggle(element,true);
+                    
+                        }
+                        else {
+                            element.attr('tabindex', -1);
+                            findDown(element.find('a').eq(0));
+                            downE.eq(0).attr('tabindex', 0);
+                            downE[0].focus();                            
+                        }                        
+                        break;
+                    case keymap.KEY.DOWN:
+                        evt.preventDefault();
+                        element.attr('tabindex', -1);
+                        findDown(element.find('a').eq(0));
+                        downE.eq(0).attr('tabindex', 0);
+                        downE[0].focus();
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.ENTER:
+                        var isSelectedElem = element.hasClass('bg');
+                        var enterFunc = function(element){
+                            if (isSelectedElem) {
+                                element.removeClass('bg');
+                                if (element.attr('aria-selected')) {
+                                    element.attr('aria-selected', 'false');
+                                }                        
+                            }
+                            else {
+                                element.addClass('bg');
+                                element.attr('aria-selected', 'true');                                   
+                            }  
+                        };                            
+                        if (element[0].previousElementSibling) {
+                            closeOthersUp(angular.element(element[0].previousElementSibling));
+                        }
+                        if (element[0].nextElementSibling) {
+                            closeOthersDown(angular.element(element[0].nextElementSibling));
+                        }                   
+                        
+                        removeBackground(element);
+                        enterFunc(element);
+                        evt.stopPropagation();                                                      
+                        break;
+                    case keymap.KEY.TAB:
+                        $timeout(function(){
+                            resetTabPosition(element);
+                        },0);
+                         evt.stopPropagation(); 
+                        
+                        break;
+                    default:
+                        break;
+                    }
+                });
+            element.bind('keyup',function(evt){
+                if(evt.keyCode === keymap.KEY.TAB){
+                  
+                        var tempElem = element;
+                        var elemArr = [];
+                        while(!tempElem.hasClass('b2b-tree')){
+                            elemArr.push(tempElem);
+                            tempElem = tempElem.parent().parent();
+                        }
+                        elemArr.push(tempElem);
+                      
+                        expand(elemArr);                    
+                }
+                 evt.stopPropagation(); 
+            });
+            }
+        };
+    }]);
+/**
+ * @ngdoc directive
+ * @name Navigation.att:Tree nodes with checkboxes
+ *
+ * @param {String} setRole - The value needs to be "tree". This is required to incorporate CATO requirements.
+ * @param {boolean} groupIt - The value needs to be "false" for top-level tree rendered. 
+ * @param {Object} collection -  The JSON object of tree to be rendered.
+ * @description
+ *  <file src="src/treeNodeCheckbox/docs/readme.md" />
+ *
+ * @usage
+ *      <div class="b2b-tree-checkbox">
+ *                <b2b-tree-node-checkbox collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-node-checkbox>
+ *            </div>
+ * @example
+ *  <section id="code">
+        <example module="b2b.att">
+            <file src="src/treeNodeCheckbox/docs/demo.html" />
+            <file src="src/treeNodeCheckbox/docs/demo.js" />
+       </example>
+    </section>
+ *
+ */
+angular.module('b2b.att.treeNodeCheckbox', ['b2b.att.utilities'])
+    .directive('b2bTreeNodeCheckbox', function () {
+        return {
+            restrict: "E",
+            replace: true,
+            scope: {
+                collection: '=',
+                groupIt: '=',
+                setRole: '@'
+            },
+            templateUrl: function (element, attrs) {
+                if (attrs.groupIt === 'true') {
+                    return "b2bTemplate/treeNodeCheckbox/groupedTree.html";
+                } else {
+                    return "b2bTemplate/treeNodeCheckbox/ungroupedTree.html";
+                }
+            },
+            link: function (scope) {
+                if (!(scope.setRole === 'tree')) {
+                    scope.setRole = 'group';
+                }
+            }
+        }
+    })
+    .directive('b2bTreeMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {
+        return {
+            restrict: "E",
+            replace: true,
+            scope: {
+                member: '=',
+                groupIt: '='
+            },
+            templateUrl: 'b2bTemplate/treeNodeCheckbox/treeMember.html',
+            link: function (scope, element, attrs) {
+                scope.elemArr = [];
+                var removeRootTabIndex = function (elem) {
+                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {
+                        elem.attr('tabindex', -1);                        
+                        return;
+                    }
+                    removeRootTabIndex(elem.parent());
+                };
+                scope.$watch('member.child', function(newVal, oldVal){                  
+                    if(newVal !== oldVal){
+                        scope.showChild();
+                    };
+                });
+
+                var checkedCount = 0;
+                var nonCheckedCount = 0;
+                var checkBoxesCount = 0;
+
+                if(element.find('a').eq(0).find('input')){
+                    if(scope.member.indeterminate){
+                        element.find('a').eq(0).find('input').prop('indeterminate', true);
+                        element.attr('aria-checked',"mixed");
+                    }
+                    element.attr('aria-checked',scope.member.isSelected);
+                }
+
+                element.find('a').eq(0).find('input').bind('change',function(){
+                    scope.member.indeterminate = false;
+                    downwardModalUpdate(scope.member);
+                    downwardSelection(element);
+                    upwardSelection(element);
+                    element.attr('aria-checked',scope.member.isSelected);
+                     if (scope.member.onSelect !== undefined) {
+                        scope.member.onSelect(scope.member);
+                    }
+                });
+
+                element.find('a').eq(0).find('input').bind('click',function(){
+                    var elem = angular.element(this);
+                    if(scope.member.indeterminate){
+                        scope.member.indeterminate = false;
+                        scope.member.isSelected = true;
+                        elem.prop('indeterminate', false);
+                        elem.prop('checked', true);
+                        elem.triggerHandler('change');
+                    }
+                });
+
+                var groupNode = false;
+                var checkedTreeNode = false;
+
+                var isCheckboxSelected = function(elem){
+                    checkedTreeNode = false;
+                    checkedTreeNode = angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked;
+                }
+
+                var findCheckbox = function(elem){
+                    return angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox');
+                }
+
+                var updateGrpNodeCheckboxes = function(elem, checked){
+                    angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked = checked;
+                }
+
+                
+                var isGroupNode = function(elem){
+                    groupNode = false;
+                    if(angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.grpTreeCheckbox')){
+                        groupNode = true;
+                    }
+                }
+
+                var downwardModalUpdate = function(curMember){
+                    angular.forEach(curMember.child, function(childMember, key) {
+                        childMember.isSelected = curMember.isSelected;
+                        childMember.indeterminate = false;
+                        if(angular.isArray(childMember.child) && scope.member.child.length > 0){
+                            downwardModalUpdate(childMember);
+                        }
+                    });
+                }
+
+                var downwardSelection = function(elem){
+                    if(findCheckbox(elem)){
+                        isCheckboxSelected(elem)
+                    } 
+                    if(angular.element(elem).find('ul').length > 0){
+                        var childNodes = angular.element(elem).find('ul').eq(0).children('li');
+                        for(var i=0; i<childNodes.length; i++){
+                            if(findCheckbox(childNodes[i])){
+                                isGroupNode(childNodes[i]);
+                                angular.element(findCheckbox(childNodes[i])).prop('indeterminate', false);
+                                angular.element(childNodes[i]).attr('aria-checked',checkedTreeNode);
+                                if(groupNode){
+                                    updateGrpNodeCheckboxes(childNodes[i],checkedTreeNode);
+                                }else{
+                                    angular.element(childNodes[i]).scope().member.isSelected = checkedTreeNode;
+                                    angular.element(childNodes[i]).scope().member.indeterminate = false
+                                    angular.element(childNodes[i]).scope().$apply();
+                                }
+                                downwardSelection(childNodes[i]);
+                            }
+                        }
+
+                    }
+                }
+                var upwardSelection = function(elem){
+                    var childNodes = elem.parent().parent().find('ul').eq(0).children('li');
+                    checkedCount = 0;
+                    nonCheckedCount = 0;
+                    checkBoxesCount = 0;    
+                    for(i=0; i<childNodes.length; i++){
+                        if(findCheckbox(childNodes[i])){
+                            isGroupNode(childNodes[i]);
+                            isCheckboxSelected(childNodes[i]);
+                            checkBoxesCount++;
+                            if(checkedTreeNode){
+                                checkedCount++;
+                            }else if(!angular.element(angular.element(angular.element(childNodes[i]).find('a').eq(0))[0].querySelector('input.treeCheckBox')).prop('indeterminate')){
+                                nonCheckedCount++;
+                            }
+                        }
+                    }
+                    var parentNodeScope;
+                    parentNodeScope = angular.element(elem.parent().parent()).scope();
+                    if(findCheckbox(elem.parent().parent())){
+                        if(nonCheckedCount == checkBoxesCount){
+                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);
+                            if(parentNodeScope &&  parentNodeScope.member){
+                                parentNodeScope.member.isSelected = false;
+                                parentNodeScope.member.indeterminate = false;
+                            }else{
+                                updateGrpNodeCheckboxes(elem.parent().parent(),false);
+                            }
+                            angular.element(elem.parent().parent()).attr('aria-checked',false);
+                        }else if(checkedCount == checkBoxesCount){
+                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);
+                            if(parentNodeScope &&  parentNodeScope.member){
+                                parentNodeScope.member.isSelected = true;
+                                parentNodeScope.member.indeterminate = false;
+                            }else{
+                                updateGrpNodeCheckboxes(elem.parent().parent(),true);
+                            }
+                            angular.element(elem.parent().parent()).attr('aria-checked',true);
+                        }else{
+                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', true);
+                            if(parentNodeScope &&  parentNodeScope.member){
+                                parentNodeScope.member.isSelected = false;
+                                parentNodeScope.member.indeterminate = true;
+                            }else{
+                                updateGrpNodeCheckboxes(elem.parent().parent(),false);
+                            }
+                            angular.element(elem.parent().parent()).attr('aria-checked',"mixed");
+                        }
+                        if(parentNodeScope &&  parentNodeScope.member){
+                            parentNodeScope.$apply();
+                        }        
+                    }
+                    
+                    
+                    
+                    if(elem.parent().parent().attr('role') == "treeitem"){
+                        upwardSelection(elem.parent().parent());
+                    }
+                }
+
+                scope.showChild = function () {
+                        if (!element.hasClass('grouped')) {
+                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {
+                                scope.groupIt = false;
+                                element.addClass('grouped');
+                                element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");
+                                $compile(element.contents())(scope);
+                                if(scope.member.active && scope.member.active === true){
+                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');
+                                };
+                                if(scope.member.selected && scope.member.selected === true){
+                                    element.attr('tabindex', 0);
+                                    removeRootTabIndex(element);
+                                };
+                                if(scope.member.active && scope.member.active == undefined){
+                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');
+                                };
+                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {
+                                element.addClass('grouped');
+                                scope.groupIt = true;
+                                var j = 0;
+                                var grpName = '';
+                                if(scope.member.child[0].groupName !== undefined){
+                                    grpName = scope.member.child[0].groupName;
+                                }
+                                else{
+                                    var toSlice = scope.member.child[0].name.search(' ');
+                                    grpName = scope.member.child[0].name.slice(0, toSlice);
+                                }
+
+                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {
+                                    j = 0;
+                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        
+                                        if (j === scope.member.child.length) {
+                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);
+                                            break;
+                                            
+                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){
+                                                scope.member.child[j-1].activeGrp = true;
+                                            };
+                                            
+                                        }
+                                        if (i + scope.member.divide > scope.member.child.length) {
+                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);
+                                            if(scope.member.child[j].active && scope.member.child[j].active===true){
+                                                scope.member.child[j].activeGrp = true;
+                                            };
+
+                                        } else {
+                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);
+                                            if(scope.member.child[j].active && scope.member.child[j].active===true){
+                                                scope.member.child[j].activeGrp = true;
+                                            };
+                                        }
+                                    }
+                                }
+                                if(scope.member.divide){
+                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");
+                                } else {
+                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");
+                                }
+                                $compile(element.contents())(scope);
+                                if(scope.member.active && scope.member.active === true){
+                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');
+                                };
+                                
+                                if( scope.member.active && scope.member.active == undefined){
+                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');
+                                };
+                            }
+                        }
+                        $timeout(function () {
+                            if(!scope.member.indeterminate){
+                                downwardSelection(element);
+                            }    
+                        });  
+
+                };
+                
+                if(scope.member.active && scope.member.active == true){
+                    scope.showChild();
+                };
+                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){
+                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');
+                }
+                else if(scope.member.child == undefined){
+                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-circle');
+                    if(scope.$parent.$index === 0) {
+                        element.find('a').eq(0).append('<span class="first-link"></span>');
+                    };
+                };
+                
+                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {
+                    scope.showChild();
+                    var expandFunc = scope.member.onExpand;
+                    if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {
+                       var eValue = scope.member.onExpand(scope.member);
+                    }
+                    if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {
+                        scope.member.onCollapse(scope.member);
+                    }
+                });
+
+                angular.element(element[0].querySelectorAll('.treeNodeName')).eq(0).bind('click', function (evt) {
+
+                });
+                
+            }
+        }
+}])
+    .directive('b2bTreeNodeLink', ['keymap', '$timeout', function (keymap, $timeout) {
+        return {
+            restrict: 'A',
+            link: function (scope, element, attr, ctrl) {
+                var rootE, parentE, upE, downE;
+                var closeOthersUp = function (elem) {
+                    
+                    if (elem.find('a').eq(0).hasClass('active')) {
+                        activeToggle(elem);
+                        return;
+                    }
+                    if (elem.hasClass('bg')) {
+                        elem.removeClass('bg');
+                    }
+                    if (elem[0].previousElementSibling !== null) {
+                        closeOthersUp(angular.element(elem[0].previousElementSibling));
+                    }
+                };
+                var closeOthersDown = function (elem) {
+                    
+                    if (elem.find('a').eq(0).hasClass('active')) {
+                        activeToggle(elem);
+                        return;
+                    }
+                    if (elem.hasClass('bg')) {
+                        elem.removeClass('bg');
+                    }
+                    if (elem[0].nextElementSibling !== null) {
+                        closeOthersDown(angular.element(elem[0].nextElementSibling));
+                    }
+                };
+
+                var removeBackgroundUp = function (elem) {
+                    
+                    if (elem.hasClass('b2b-tree-checkbox')) {
+                        return;
+                    } else {
+                        elem.parent().parent().removeClass('bg');
+                        removeBackgroundUp(elem.parent().parent());
+                    }
+                };
+
+                var removeBackgroundDown = function (elem) {
+                    
+                    angular.element(elem[0].querySelector('.bg')).removeClass('bg');
+                };
+
+
+
+                var activeToggle = function (elem) {
+                    var element = elem.find('a').eq(0);
+                    if (element.hasClass('active')) {
+                        elem.removeClass('bg');
+                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {
+                            element.removeClass('active');
+                            elem.attr('aria-expanded', 'false');
+                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-expanded');
+                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');
+                        }
+                    } else {
+                        elem.addClass('bg');
+                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {
+                            element.addClass('active');
+                            elem.attr('aria-expanded', 'true');
+                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');
+                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-expanded');
+                        }
+                    }
+                };
+                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {
+                    
+                        if (element[0].previousElementSibling) {
+                            closeOthersUp(angular.element(element[0].previousElementSibling));
+                        }
+                        if (element[0].nextElementSibling) {
+                            closeOthersDown(angular.element(element[0].nextElementSibling));
+                        }
+
+                        activeToggle(element);
+
+                    removeBackgroundDown(element);
+                    removeBackgroundUp(element);
+                    evt.stopPropagation();                    
+                });
+                
+                if (element.parent().parent().hasClass('b2b-tree-checkbox') && (element.parent()[0].previousElementSibling === null)) {
+                    element.attr('tabindex', 0);
+                }
+                
+                var isRoot = function (elem) {
+                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                };
+                var findRoot = function (elem) {
+                    if (isRoot(elem)) {
+                        rootE = elem;
+                        return;
+                    }
+                    findRoot(elem.parent());
+                };
+
+                var findPreActive = function (elem) {
+
+                    if (!(elem.hasClass("active"))) {
+                        return;
+                    } else {
+                        var childElems = angular.element(elem[0].nextElementSibling.children);
+                        lastE = angular.element(childElems[childElems.length - 1]);
+                        if (lastE.find('a').eq(0).hasClass('active')) {
+                            findPreActive(lastE.find('a').eq(0));
+                        }
+                        upE = lastE;
+                    }
+                };
+
+                var findUp = function (elem) {
+                    if (isRoot(elem)) {
+                        upE = elem;
+                        return;
+                    }
+                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {
+                        upE = angular.element(elem[0].previousElementSibling);
+                        if (upE.find('a').eq(0).hasClass('active')) {
+                            findPreActive(upE.find('a').eq(0));
+                        }
+                    } else {
+                        upE = elem.parent().parent();
+                    }
+                };
+
+                var downElement = function (elem) {
+                    if (elem.next().hasClass('tree-hide')) {
+                        downElement(elem.next());
+                    } else {
+                        downE = elem.next();
+                    }
+                }
+                var isBottomElem = false;
+                var downParent = function(liElem){
+                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree-checkbox')){
+                        isBottomElem = true;
+                        return;
+                    }
+                    if(liElem.next().length !== 0){
+                        downE = liElem.next().eq(0);
+                        return;
+                    }
+                    else {
+                        downParent(liElem.parent().parent());
+                    }
+                }
+                
+                var findDown = function (elem) {
+                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {
+                        downE = elem.parent();
+                        return;
+                    }
+                    if (elem.hasClass('active')) {
+                        downE = elem.next().find('li').eq(0);
+                        if (downE.hasClass('tree-hide')) {
+                            downElement(downE);
+                        }
+
+                    } else {
+                        downParent(elem.parent());
+                        if(isBottomElem === true){
+                            downE = elem.parent();
+                            isBottomElem = false;
+                        }
+                    }
+                };
+                element.bind('keydown', function (evt) {
+                    switch (evt.keyCode) {
+                    case keymap.KEY.HOME:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        element.attr('tabindex', -1);
+                        findRoot(element);
+                        rootE.eq(0).attr('tabindex', 0);
+                        rootE[0].focus();
+                        break;
+                    case keymap.KEY.LEFT:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        if (!isRoot(element)) {
+                            if(element.find('a').eq(0).hasClass('active')){
+                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');
+                                return;
+                            }
+                            element.attr('tabindex', -1);
+                            parentE = element.parent().parent();
+                            parentE.attr('tabindex', 0);
+                            parentE[0].focus();
+                        } else {
+                            if (element.find('a').eq(0).hasClass('active')) {
+                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');
+                            }
+                        };
+                        break;
+                    case keymap.KEY.UP:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        element.attr('tabindex', -1);
+                        findUp(element);
+                        upE.eq(0).attr('tabindex', 0);
+                        upE[0].focus();
+                        break;
+                    case keymap.KEY.RIGHT:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        if(angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')){
+                            break;
+                        }    
+                        if (!element.find('a').eq(0).hasClass('active')) {
+                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');
+                        }
+                        else {
+                            element.attr('tabindex', -1);
+                            findDown(element.find('a').eq(0));
+                            downE.eq(0).attr('tabindex', 0);
+                            downE[0].focus();                            
+                        }                        
+                        break;
+                    case keymap.KEY.DOWN:
+                        evt.preventDefault();
+                        element.attr('tabindex', -1);
+                        findDown(element.find('a').eq(0));
+                        downE.eq(0).attr('tabindex', 0);
+                        downE[0].focus();
+                        evt.stopPropagation();
+                        break;
+                    case keymap.KEY.SPACE:
+                    case keymap.KEY.ENTER:
+                        evt.preventDefault();
+                        evt.stopPropagation();
+                        if(angular.isDefined(element.scope().member.isSelected)){
+                            element.scope().member.isSelected = !element.scope().member.isSelected;
+                            element.scope().member.indeterminate = false;
+                            element.scope().$apply();
+                            element.find('a').eq(0).find('input').prop('indeterminate', false);
+                            element.find('a').eq(0).find('input').triggerHandler('change');
+                        }
+                        break;    
+                    default:
+                        break;
+                    }
+                });
+            }
+        };
+    }]);
+/*!
+ * VERSION: 1.7.3
+ * DATE: 2014-01-14
+ * UPDATES AND DOCS AT: http://www.greensock.com
+ *
+ * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
+ * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
+ * Club GreenSock members, the software agreement that was issued with your membership.
+ * 
+ * @author: Jack Doyle, jack@greensock.com
+ **/
+(window._gsQueue || (window._gsQueue = [])).push( function() {
+
+    "use strict";
+
+    var _doc = document.documentElement,
+        _window = window,
+        _max = function(element, axis) {
+            var dim = (axis === "x") ? "Width" : "Height",
+                scroll = "scroll" + dim,
+                client = "client" + dim,
+                body = document.body;
+            return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || Math.max(_doc[client], body[client])) : element[scroll] - element["offset" + dim];
+        },
+
+        ScrollToPlugin = window._gsDefine.plugin({
+            propName: "scrollTo",
+            API: 2,
+            version:"1.7.3",
+
+            //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
+            init: function(target, value, tween) {
+                this._wdw = (target === _window);
+                this._target = target;
+                this._tween = tween;
+                if (typeof(value) !== "object") {
+                    value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".
+                }
+                this._autoKill = (value.autoKill !== false);
+                this.x = this.xPrev = this.getX();
+                this.y = this.yPrev = this.getY();
+                if (value.x != null) {
+                    this._addTween(this, "x", this.x, (value.x === "max") ? _max(target, "x") : value.x, "scrollTo_x", true);
+                    this._overwriteProps.push("scrollTo_x");
+                } else {
+                    this.skipX = true;
+                }
+                if (value.y != null) {
+                    this._addTween(this, "y", this.y, (value.y === "max") ? _max(target, "y") : value.y, "scrollTo_y", true);
+                    this._overwriteProps.push("scrollTo_y");
+                } else {
+                    this.skipY = true;
+                }
+                return true;
+            },
+
+            //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
+            set: function(v) {
+                this._super.setRatio.call(this, v);
+
+                var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,
+                    y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,
+                    yDif = y - this.yPrev,
+                    xDif = x - this.xPrev;
+
+                if (this._autoKill) {
+                    //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.
+                    if (!this.skipX && (xDif > 7 || xDif < -7) && x < _max(this._target, "x")) {
+                        this.skipX = true; //if the user scrolls separately, we should stop tweening!
+                    }
+                    if (!this.skipY && (yDif > 7 || yDif < -7) && y < _max(this._target, "y")) {
+                        this.skipY = true; //if the user scrolls separately, we should stop tweening!
+                    }
+                    if (this.skipX && this.skipY) {
+                        this._tween.kill();
+                    }
+                }
+                if (this._wdw) {
+                    _window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);
+                } else {
+                    if (!this.skipY) {
+                        this._target.scrollTop = this.y;
+                    }
+                    if (!this.skipX) {
+                        this._target.scrollLeft = this.x;
+                    }
+                }
+                this.xPrev = this.x;
+                this.yPrev = this.y;
+            }
+
+        }),
+        p = ScrollToPlugin.prototype;
+
+    ScrollToPlugin.max = _max;
+
+    p.getX = function() {
+        return (!this._wdw) ? this._target.scrollLeft : (_window.pageXOffset != null) ? _window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : document.body.scrollLeft;
+    };
+
+    p.getY = function() {
+        return (!this._wdw) ? this._target.scrollTop : (_window.pageYOffset != null) ? _window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : document.body.scrollTop;
+    };
+
+    p._kill = function(lookup) {
+        if (lookup.scrollTo_x) {
+            this.skipX = true;
+        }
+        if (lookup.scrollTo_y) {
+            this.skipY = true;
+        }
+        return this._super._kill.call(this, lookup);
+    };
+
+}); if (window._gsDefine) { window._gsQueue.pop()(); }
+/*!
+ * VERSION: 1.12.1
+ * DATE: 2014-06-26
+ * UPDATES AND DOCS AT: http://www.greensock.com
+ * 
+ * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin
+ *
+ * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
+ * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
+ * Club GreenSock members, the software agreement that was issued with your membership.
+ * 
+ * @author: Jack Doyle, jack@greensock.com
+ **/
+
+(window._gsQueue || (window._gsQueue = [])).push( function() {
+
+    "use strict";
+
+    window._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
+
+        var _slice = [].slice,
+            TweenMax = function(target, duration, vars) {
+                TweenLite.call(this, target, duration, vars);
+                this._cycle = 0;
+                this._yoyo = (this.vars.yoyo === true);
+                this._repeat = this.vars.repeat || 0;
+                this._repeatDelay = this.vars.repeatDelay || 0;
+                this._dirty = true; //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.
+                this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
+            },
+            _tinyNum = 0.0000000001,
+            TweenLiteInternals = TweenLite._internals,
+            _isSelector = TweenLiteInternals.isSelector,
+            _isArray = TweenLiteInternals.isArray,
+            p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),
+            _blankArray = [];
+
+        TweenMax.version = "1.12.1";
+        p.constructor = TweenMax;
+        p.kill()._gc = false;
+        TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;
+        TweenMax.getTweensOf = TweenLite.getTweensOf;
+        TweenMax.lagSmoothing = TweenLite.lagSmoothing;
+        TweenMax.ticker = TweenLite.ticker;
+        TweenMax.render = TweenLite.render;
+
+        p.invalidate = function() {
+            this._yoyo = (this.vars.yoyo === true);
+            this._repeat = this.vars.repeat || 0;
+            this._repeatDelay = this.vars.repeatDelay || 0;
+            this._uncache(true);
+            return TweenLite.prototype.invalidate.call(this);
+        };
+        
+        p.updateTo = function(vars, resetDuration) {
+            var curRatio = this.ratio, p;
+            if (resetDuration && this._startTime < this._timeline._time) {
+                this._startTime = this._timeline._time;
+                this._uncache(false);
+                if (this._gc) {
+                    this._enabled(true, false);
+                } else {
+                    this._timeline.insert(this, this._startTime - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.
+                }
+            }
+            for (p in vars) {
+                this.vars[p] = vars[p];
+            }
+            if (this._initted) {
+                if (resetDuration) {
+                    this._initted = false;
+                } else {
+                    if (this._gc) {
+                        this._enabled(true, false);
+                    }
+                    if (this._notifyPluginsOfEnabled && this._firstPT) {
+                        TweenLite._onPluginEvent("_onDisable", this); //in case a plugin like MotionBlur must perform some cleanup tasks
+                    }
+                    if (this._time / this._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards. 
+                        var prevTime = this._time;
+                        this.render(0, true, false);
+                        this._initted = false;
+                        this.render(prevTime, true, false);
+                    } else if (this._time > 0) {
+                        this._initted = false;
+                        this._init();
+                        var inv = 1 / (1 - curRatio),
+                            pt = this._firstPT, endValue;
+                        while (pt) {
+                            endValue = pt.s + pt.c; 
+                            pt.c *= inv;
+                            pt.s = endValue - pt.c;
+                            pt = pt._next;
+                        }
+                    }
+                }
+            }
+            return this;
+        };
+                
+        p.render = function(time, suppressEvents, force) {
+            if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly.
+                this.invalidate();
+            }
+            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
+                prevTime = this._time,
+                prevTotalTime = this._totalTime, 
+                prevCycle = this._cycle,
+                duration = this._duration,
+                prevRawPrevTime = this._rawPrevTime,
+                isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, i;
+            if (time >= totalDur) {
+                this._totalTime = totalDur;
+                this._cycle = this._repeat;
+                if (this._yoyo && (this._cycle & 1) !== 0) {
+                    this._time = 0;
+                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;
+                } else {
+                    this._time = duration;
+                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
+                }
+                if (!this._reversed) {
+                    isComplete = true;
+                    callback = "onComplete";
+                }
+                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
+                        time = 0;
+                    }
+                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {
+                        force = true;
+                        if (prevRawPrevTime > _tinyNum) {
+                            callback = "onReverseComplete";
+                        }
+                    }
+                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                }
+                
+            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
+                this._totalTime = this._time = this._cycle = 0;
+                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;
+                if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {
+                    callback = "onReverseComplete";
+                    isComplete = this._reversed;
+                }
+                if (time < 0) {
+                    this._active = false;
+                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                        if (prevRawPrevTime >= 0) {
+                            force = true;
+                        }
+                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                    }
+                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.
+                    force = true;
+                }
+            } else {
+                this._totalTime = this._time = time;
+                
+                if (this._repeat !== 0) {
+                    cycleDuration = duration + this._repeatDelay;
+                    this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but Flash reports it as 0.79999999!)
+                    if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {
+                        this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)
+                    }
+                    this._time = this._totalTime - (this._cycle * cycleDuration);
+                    if (this._yoyo) if ((this._cycle & 1) !== 0) {
+                        this._time = duration - this._time;
+                    }
+                    if (this._time > duration) {
+                        this._time = duration;
+                    } else if (this._time < 0) {
+                        this._time = 0;
+                    }
+                }
+
+                if (this._easeType) {
+                    r = this._time / duration;
+                    type = this._easeType;
+                    pow = this._easePower;
+                    if (type === 1 || (type === 3 && r >= 0.5)) {
+                        r = 1 - r;
+                    }
+                    if (type === 3) {
+                        r *= 2;
+                    }
+                    if (pow === 1) {
+                        r *= r;
+                    } else if (pow === 2) {
+                        r *= r * r;
+                    } else if (pow === 3) {
+                        r *= r * r * r;
+                    } else if (pow === 4) {
+                        r *= r * r * r * r;
+                    }
+
+                    if (type === 1) {
+                        this.ratio = 1 - r;
+                    } else if (type === 2) {
+                        this.ratio = r;
+                    } else if (this._time / duration < 0.5) {
+                        this.ratio = r / 2;
+                    } else {
+                        this.ratio = 1 - (r / 2);
+                    }
+
+                } else {
+                    this.ratio = this._ease.getRatio(this._time / duration);
+                }
+                
+            }
+                
+            if (prevTime === this._time && !force && prevCycle === this._cycle) {
+                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.
+                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+                }
+                return;
+            } else if (!this._initted) {
+                this._init();
+                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.
+                    return;
+                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true.
+                    this._time = prevTime;
+                    this._totalTime = prevTotalTime;
+                    this._rawPrevTime = prevRawPrevTime;
+                    this._cycle = prevCycle;
+                    TweenLiteInternals.lazyTweens.push(this);
+                    this._lazy = time;
+                    return;
+                }
+                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.
+                if (this._time && !isComplete) {
+                    this.ratio = this._ease.getRatio(this._time / duration);
+                } else if (isComplete && this._ease._calcEnd) {
+                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);
+                }
+            }
+            if (this._lazy !== false) {
+                this._lazy = false;
+            }
+
+            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {
+                this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.
+            }
+            if (prevTotalTime === 0) {
+                if (this._initted === 2 && time > 0) {
+                    //this.invalidate();
+                    this._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true
+                }
+                if (this._startAt) {
+                    if (time >= 0) {
+                        this._startAt.render(time, suppressEvents, force);
+                    } else if (!callback) {
+                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
+                    }
+                }
+                if (this.vars.onStart) if (this._totalTime !== 0 || duration === 0) if (!suppressEvents) {
+                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);
+                }
+            }
+            
+            pt = this._firstPT;
+            while (pt) {
+                if (pt.f) {
+                    pt.t[pt.p](pt.c * this.ratio + pt.s);
+                } else {
+                    pt.t[pt.p] = pt.c * this.ratio + pt.s;
+                }
+                pt = pt._next;
+            }
+            
+            if (this._onUpdate) {
+                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
+                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
+                }
+                if (!suppressEvents) if (this._totalTime !== prevTotalTime || isComplete) {
+                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+                }
+            }
+            if (this._cycle !== prevCycle) if (!suppressEvents) if (!this._gc) if (this.vars.onRepeat) {
+                this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);
+            }
+            if (callback) if (!this._gc) { //check gc because there's a chance that kill() could be called in an onUpdate
+                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
+                    this._startAt.render(time, suppressEvents, force);
+                }
+                if (isComplete) {
+                    if (this._timeline.autoRemoveChildren) {
+                        this._enabled(false, false);
+                    }
+                    this._active = false;
+                }
+                if (!suppressEvents && this.vars[callback]) {
+                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);
+                }
+                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.
+                    this._rawPrevTime = 0;
+                }
+            }
+        };
+        
+//---- STATIC FUNCTIONS -----------------------------------------------------------------------------------------------------------
+        
+        TweenMax.to = function(target, duration, vars) {
+            return new TweenMax(target, duration, vars);
+        };
+        
+        TweenMax.from = function(target, duration, vars) {
+            vars.runBackwards = true;
+            vars.immediateRender = (vars.immediateRender != false);
+            return new TweenMax(target, duration, vars);
+        };
+        
+        TweenMax.fromTo = function(target, duration, fromVars, toVars) {
+            toVars.startAt = fromVars;
+            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
+            return new TweenMax(target, duration, toVars);
+        };
+        
+        TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            stagger = stagger || 0;
+            var delay = vars.delay || 0,
+                a = [],
+                finalComplete = function() {
+                    if (vars.onComplete) {
+                        vars.onComplete.apply(vars.onCompleteScope || this, arguments);
+                    }
+                    onCompleteAll.apply(onCompleteAllScope || this, onCompleteAllParams || _blankArray);
+                },
+                l, copy, i, p;
+            if (!_isArray(targets)) {
+                if (typeof(targets) === "string") {
+                    targets = TweenLite.selector(targets) || targets;
+                }
+                if (_isSelector(targets)) {
+                    targets = _slice.call(targets, 0);
+                }
+            }
+            l = targets.length;
+            for (i = 0; i < l; i++) {
+                copy = {};
+                for (p in vars) {
+                    copy[p] = vars[p];
+                }
+                copy.delay = delay;
+                if (i === l - 1 && onCompleteAll) {
+                    copy.onComplete = finalComplete;
+                }
+                a[i] = new TweenMax(targets[i], duration, copy);
+                delay += stagger;
+            }
+            return a;
+        };
+        
+        TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            vars.runBackwards = true;
+            vars.immediateRender = (vars.immediateRender != false);
+            return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);
+        };
+        
+        TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            toVars.startAt = fromVars;
+            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
+            return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);
+        };
+                
+        TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) {
+            return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});
+        };
+        
+        TweenMax.set = function(target, vars) {
+            return new TweenMax(target, 0, vars);
+        };
+        
+        TweenMax.isTweening = function(target) {
+            return (TweenLite.getTweensOf(target, true).length > 0);
+        };
+        
+        var _getChildrenOf = function(timeline, includeTimelines) {
+                var a = [],
+                    cnt = 0,
+                    tween = timeline._first;
+                while (tween) {
+                    if (tween instanceof TweenLite) {
+                        a[cnt++] = tween;
+                    } else {
+                        if (includeTimelines) {
+                            a[cnt++] = tween;
+                        }
+                        a = a.concat(_getChildrenOf(tween, includeTimelines));
+                        cnt = a.length;
+                    }
+                    tween = tween._next;
+                }
+                return a;
+            }, 
+            getAllTweens = TweenMax.getAllTweens = function(includeTimelines) {
+                return _getChildrenOf(Animation._rootTimeline, includeTimelines).concat( _getChildrenOf(Animation._rootFramesTimeline, includeTimelines) );
+            };
+        
+        TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) {
+            if (tweens == null) {
+                tweens = true;
+            }
+            if (delayedCalls == null) {
+                delayedCalls = true;
+            }
+            var a = getAllTweens((timelines != false)),
+                l = a.length,
+                allTrue = (tweens && delayedCalls && timelines),
+                isDC, tween, i;
+            for (i = 0; i < l; i++) {
+                tween = a[i];
+                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {
+                    if (complete) {
+                        tween.totalTime(tween._reversed ? 0 : tween.totalDuration());
+                    } else {
+                        tween._enabled(false, false);
+                    }
+                }
+            }
+        };
+        
+        TweenMax.killChildTweensOf = function(parent, complete) {
+            if (parent == null) {
+                return;
+            }
+            var tl = TweenLiteInternals.tweenLookup,
+                a, curParent, p, i, l;
+            if (typeof(parent) === "string") {
+                parent = TweenLite.selector(parent) || parent;
+            }
+            if (_isSelector(parent)) {
+                parent = _slice.call(parent, 0);
+            }
+            if (_isArray(parent)) {
+                i = parent.length;
+                while (--i > -1) {
+                    TweenMax.killChildTweensOf(parent[i], complete);
+                }
+                return;
+            }
+            a = [];
+            for (p in tl) {
+                curParent = tl[p].target.parentNode;
+                while (curParent) {
+                    if (curParent === parent) {
+                        a = a.concat(tl[p].tweens);
+                    }
+                    curParent = curParent.parentNode;
+                }
+            }
+            l = a.length;
+            for (i = 0; i < l; i++) {
+                if (complete) {
+                    a[i].totalTime(a[i].totalDuration());
+                }
+                a[i]._enabled(false, false);
+            }
+        };
+
+        var _changePause = function(pause, tweens, delayedCalls, timelines) {
+            tweens = (tweens !== false);
+            delayedCalls = (delayedCalls !== false);
+            timelines = (timelines !== false);
+            var a = getAllTweens(timelines),
+                allTrue = (tweens && delayedCalls && timelines),
+                i = a.length,
+                isDC, tween;
+            while (--i > -1) {
+                tween = a[i];
+                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {
+                    tween.paused(pause);
+                }
+            }
+        };
+        
+        TweenMax.pauseAll = function(tweens, delayedCalls, timelines) {
+            _changePause(true, tweens, delayedCalls, timelines);
+        };
+        
+        TweenMax.resumeAll = function(tweens, delayedCalls, timelines) {
+            _changePause(false, tweens, delayedCalls, timelines);
+        };
+
+        TweenMax.globalTimeScale = function(value) {
+            var tl = Animation._rootTimeline,
+                t = TweenLite.ticker.time;
+            if (!arguments.length) {
+                return tl._timeScale;
+            }
+            value = value || _tinyNum; //can't allow zero because it'll throw the math off
+            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);
+            tl = Animation._rootFramesTimeline;
+            t = TweenLite.ticker.frame;
+            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);
+            tl._timeScale = Animation._rootTimeline._timeScale = value;
+            return value;
+        };
+        
+    
+//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------
+        
+        p.progress = function(value) {
+            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);
+        };
+        
+        p.totalProgress = function(value) {
+            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);
+        };
+        
+        p.time = function(value, suppressEvents) {
+            if (!arguments.length) {
+                return this._time;
+            }
+            if (this._dirty) {
+                this.totalDuration();
+            }
+            if (value > this._duration) {
+                value = this._duration;
+            }
+            if (this._yoyo && (this._cycle & 1) !== 0) {
+                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));
+            } else if (this._repeat !== 0) {
+                value += this._cycle * (this._duration + this._repeatDelay);
+            }
+            return this.totalTime(value, suppressEvents);
+        };
+
+        p.duration = function(value) {
+            if (!arguments.length) {
+                return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect.
+            }
+            return Animation.prototype.duration.call(this, value);
+        };
+
+        p.totalDuration = function(value) {
+            if (!arguments.length) {
+                if (this._dirty) {
+                    //instead of Infinity, we use 999999999999 so that we can accommodate reverses
+                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);
+                    this._dirty = false;
+                }
+                return this._totalDuration;
+            }
+            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );
+        };
+        
+        p.repeat = function(value) {
+            if (!arguments.length) {
+                return this._repeat;
+            }
+            this._repeat = value;
+            return this._uncache(true);
+        };
+        
+        p.repeatDelay = function(value) {
+            if (!arguments.length) {
+                return this._repeatDelay;
+            }
+            this._repeatDelay = value;
+            return this._uncache(true);
+        };
+        
+        p.yoyo = function(value) {
+            if (!arguments.length) {
+                return this._yoyo;
+            }
+            this._yoyo = value;
+            return this;
+        };
+        
+        
+        return TweenMax;
+        
+    }, true);
+
+
+
+
+
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * TimelineLite
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {
+
+        var TimelineLite = function(vars) {
+                SimpleTimeline.call(this, vars);
+                this._labels = {};
+                this.autoRemoveChildren = (this.vars.autoRemoveChildren === true);
+                this.smoothChildTiming = (this.vars.smoothChildTiming === true);
+                this._sortChildren = true;
+                this._onUpdate = this.vars.onUpdate;
+                var v = this.vars,
+                    val, p;
+                for (p in v) {
+                    val = v[p];
+                    if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) {
+                        v[p] = this._swapSelfInParams(val);
+                    }
+                }
+                if (_isArray(v.tweens)) {
+                    this.add(v.tweens, 0, v.align, v.stagger);
+                }
+            },
+            _tinyNum = 0.0000000001,
+            _isSelector = TweenLite._internals.isSelector,
+            _isArray = TweenLite._internals.isArray,
+            _blankArray = [],
+            _globals = window._gsDefine.globals,
+            _copy = function(vars) {
+                var copy = {}, p;
+                for (p in vars) {
+                    copy[p] = vars[p];
+                }
+                return copy;
+            },
+            _pauseCallback = function(tween, callback, params, scope) {
+                tween._timeline.pause(tween._startTime);
+                if (callback) {
+                    callback.apply(scope || tween._timeline, params || _blankArray);
+                }
+            },
+            _slice = _blankArray.slice,
+            p = TimelineLite.prototype = new SimpleTimeline();
+
+        TimelineLite.version = "1.12.1";
+        p.constructor = TimelineLite;
+        p.kill()._gc = false;
+
+        p.to = function(target, duration, vars, position) {
+            var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;
+            return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position);
+        };
+
+        p.from = function(target, duration, vars, position) {
+            return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, vars), position);
+        };
+
+        p.fromTo = function(target, duration, fromVars, toVars, position) {
+            var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite;
+            return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position);
+        };
+
+        p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, onCompleteScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}),
+                i;
+            if (typeof(targets) === "string") {
+                targets = TweenLite.selector(targets) || targets;
+            }
+            if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.
+                targets = _slice.call(targets, 0);
+            }
+            stagger = stagger || 0;
+            for (i = 0; i < targets.length; i++) {
+                if (vars.startAt) {
+                    vars.startAt = _copy(vars.startAt);
+                }
+                tl.to(targets[i], duration, _copy(vars), i * stagger);
+            }
+            return this.add(tl, position);
+        };
+
+        p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            vars.immediateRender = (vars.immediateRender != false);
+            vars.runBackwards = true;
+            return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);
+        };
+
+        p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {
+            toVars.startAt = fromVars;
+            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
+            return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);
+        };
+
+        p.call = function(callback, params, scope, position) {
+            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);
+        };
+
+        p.set = function(target, vars, position) {
+            position = this._parseTimeOrLabel(position, 0, true);
+            if (vars.immediateRender == null) {
+                vars.immediateRender = (position === this._time && !this._paused);
+            }
+            return this.add( new TweenLite(target, 0, vars), position);
+        };
+
+        TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) {
+            vars = vars || {};
+            if (vars.smoothChildTiming == null) {
+                vars.smoothChildTiming = true;
+            }
+            var tl = new TimelineLite(vars),
+                root = tl._timeline,
+                tween, next;
+            if (ignoreDelayedCalls == null) {
+                ignoreDelayedCalls = true;
+            }
+            root._remove(tl, true);
+            tl._startTime = 0;
+            tl._rawPrevTime = tl._time = tl._totalTime = root._time;
+            tween = root._first;
+            while (tween) {
+                next = tween._next;
+                if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {
+                    tl.add(tween, tween._startTime - tween._delay);
+                }
+                tween = next;
+            }
+            root.add(tl, 0);
+            return tl;
+        };
+
+        p.add = function(value, position, align, stagger) {
+            var curTime, l, i, child, tl, beforeRawTime;
+            if (typeof(position) !== "number") {
+                position = this._parseTimeOrLabel(position, 0, true, value);
+            }
+            if (!(value instanceof Animation)) {
+                if ((value instanceof Array) || (value && value.push && _isArray(value))) {
+                    align = align || "normal";
+                    stagger = stagger || 0;
+                    curTime = position;
+                    l = value.length;
+                    for (i = 0; i < l; i++) {
+                        if (_isArray(child = value[i])) {
+                            child = new TimelineLite({tweens:child});
+                        }
+                        this.add(child, curTime);
+                        if (typeof(child) !== "string" && typeof(child) !== "function") {
+                            if (align === "sequence") {
+                                curTime = child._startTime + (child.totalDuration() / child._timeScale);
+                            } else if (align === "start") {
+                                child._startTime -= child.delay();
+                            }
+                        }
+                        curTime += stagger;
+                    }
+                    return this._uncache(true);
+                } else if (typeof(value) === "string") {
+                    return this.addLabel(value, position);
+                } else if (typeof(value) === "function") {
+                    value = TweenLite.delayedCall(0, value);
+                } else {
+                    throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string.");
+                }
+            }
+
+            SimpleTimeline.prototype.add.call(this, value, position);
+
+            //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.
+            if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) {
+                //in case any of the ancestors had completed but should now be enabled...
+                tl = this;
+                beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect.
+                while (tl._timeline) {
+                    if (beforeRawTime && tl._timeline.smoothChildTiming) {
+                        tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it.
+                    } else if (tl._gc) {
+                        tl._enabled(true, false);
+                    }
+                    tl = tl._timeline;
+                }
+            }
+
+            return this;
+        };
+
+        p.remove = function(value) {
+            if (value instanceof Animation) {
+                return this._remove(value, false);
+            } else if (value instanceof Array || (value && value.push && _isArray(value))) {
+                var i = value.length;
+                while (--i > -1) {
+                    this.remove(value[i]);
+                }
+                return this;
+            } else if (typeof(value) === "string") {
+                return this.removeLabel(value);
+            }
+            return this.kill(null, value);
+        };
+
+        p._remove = function(tween, skipDisable) {
+            SimpleTimeline.prototype._remove.call(this, tween, skipDisable);
+            var last = this._last;
+            if (!last) {
+                this._time = this._totalTime = this._duration = this._totalDuration = 0;
+            } else if (this._time > last._startTime + last._totalDuration / last._timeScale) {
+                this._time = this.duration();
+                this._totalTime = this._totalDuration;
+            }
+            return this;
+        };
+
+        p.append = function(value, offsetOrLabel) {
+            return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value));
+        };
+
+        p.insert = p.insertMultiple = function(value, position, align, stagger) {
+            return this.add(value, position || 0, align, stagger);
+        };
+
+        p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) {
+            return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger);
+        };
+
+        p.addLabel = function(label, position) {
+            this._labels[label] = this._parseTimeOrLabel(position);
+            return this;
+        };
+
+        p.addPause = function(position, callback, params, scope) {
+            return this.call(_pauseCallback, ["{self}", callback, params, scope], this, position);
+        };
+
+        p.removeLabel = function(label) {
+            delete this._labels[label];
+            return this;
+        };
+
+        p.getLabelTime = function(label) {
+            return (this._labels[label] != null) ? this._labels[label] : -1;
+        };
+
+        p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) {
+            var i;
+            //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration().
+            if (ignore instanceof Animation && ignore.timeline === this) {
+                this.remove(ignore);
+            } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) {
+                i = ignore.length;
+                while (--i > -1) {
+                    if (ignore[i] instanceof Animation && ignore[i].timeline === this) {
+                        this.remove(ignore[i]);
+                    }
+                }
+            }
+            if (typeof(offsetOrLabel) === "string") {
+                return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - this.duration() : 0, appendIfAbsent);
+            }
+            offsetOrLabel = offsetOrLabel || 0;
+            if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).
+                i = timeOrLabel.indexOf("=");
+                if (i === -1) {
+                    if (this._labels[timeOrLabel] == null) {
+                        return appendIfAbsent ? (this._labels[timeOrLabel] = this.duration() + offsetOrLabel) : offsetOrLabel;
+                    }
+                    return this._labels[timeOrLabel] + offsetOrLabel;
+                }
+                offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1));
+                timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : this.duration();
+            } else if (timeOrLabel == null) {
+                timeOrLabel = this.duration();
+            }
+            return Number(timeOrLabel) + offsetOrLabel;
+        };
+
+        p.seek = function(position, suppressEvents) {
+            return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false));
+        };
+
+        p.stop = function() {
+            return this.paused(true);
+        };
+
+        p.gotoAndPlay = function(position, suppressEvents) {
+            return this.play(position, suppressEvents);
+        };
+
+        p.gotoAndStop = function(position, suppressEvents) {
+            return this.pause(position, suppressEvents);
+        };
+
+        p.render = function(time, suppressEvents, force) {
+            if (this._gc) {
+                this._enabled(true, false);
+            }
+            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
+                prevTime = this._time,
+                prevStart = this._startTime,
+                prevTimeScale = this._timeScale,
+                prevPaused = this._paused,
+                tween, isComplete, next, callback, internalForce;
+            if (time >= totalDur) {
+                this._totalTime = this._time = totalDur;
+                if (!this._reversed) if (!this._hasPausedChild()) {
+                    isComplete = true;
+                    callback = "onComplete";
+                    if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {
+                        internalForce = true;
+                        if (this._rawPrevTime > _tinyNum) {
+                            callback = "onReverseComplete";
+                        }
+                    }
+                }
+                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7.
+
+            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
+                this._totalTime = this._time = 0;
+                if (prevTime !== 0 || (this._duration === 0 && this._rawPrevTime !== _tinyNum && (this._rawPrevTime > 0 || (time < 0 && this._rawPrevTime >= 0)))) {
+                    callback = "onReverseComplete";
+                    isComplete = this._reversed;
+                }
+                if (time < 0) {
+                    this._active = false;
+                    if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                        internalForce = true;
+                    }
+                    this._rawPrevTime = time;
+                } else {
+                    this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+
+                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                    if (!this._initted) {
+                        internalForce = true;
+                    }
+                }
+
+            } else {
+                this._totalTime = this._time = this._rawPrevTime = time;
+            }
+            if ((this._time === prevTime || !this._first) && !force && !internalForce) {
+                return;
+            } else if (!this._initted) {
+                this._initted = true;
+            }
+
+            if (!this._active) if (!this._paused && this._time !== prevTime && time > 0) {
+                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.
+            }
+
+            if (prevTime === 0) if (this.vars.onStart) if (this._time !== 0) if (!suppressEvents) {
+                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);
+            }
+
+            if (this._time >= prevTime) {
+                tween = this._first;
+                while (tween) {
+                    next = tween._next; //record it here because the value could change after rendering...
+                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
+                        break;
+                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
+                        if (!tween._reversed) {
+                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
+                        } else {
+                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
+                        }
+                    }
+                    tween = next;
+                }
+            } else {
+                tween = this._last;
+                while (tween) {
+                    next = tween._prev; //record it here because the value could change after rendering...
+                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
+                        break;
+                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
+                        if (!tween._reversed) {
+                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
+                        } else {
+                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
+                        }
+                    }
+                    tween = next;
+                }
+            }
+
+            if (this._onUpdate) if (!suppressEvents) {
+                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+            }
+
+            if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate
+                if (isComplete) {
+                    if (this._timeline.autoRemoveChildren) {
+                        this._enabled(false, false);
+                    }
+                    this._active = false;
+                }
+                if (!suppressEvents && this.vars[callback]) {
+                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);
+                }
+            }
+        };
+
+        p._hasPausedChild = function() {
+            var tween = this._first;
+            while (tween) {
+                if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) {
+                    return true;
+                }
+                tween = tween._next;
+            }
+            return false;
+        };
+
+        p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) {
+            ignoreBeforeTime = ignoreBeforeTime || -9999999999;
+            var a = [],
+                tween = this._first,
+                cnt = 0;
+            while (tween) {
+                if (tween._startTime < ignoreBeforeTime) {
+                    //do nothing
+                } else if (tween instanceof TweenLite) {
+                    if (tweens !== false) {
+                        a[cnt++] = tween;
+                    }
+                } else {
+                    if (timelines !== false) {
+                        a[cnt++] = tween;
+                    }
+                    if (nested !== false) {
+                        a = a.concat(tween.getChildren(true, tweens, timelines));
+                        cnt = a.length;
+                    }
+                }
+                tween = tween._next;
+            }
+            return a;
+        };
+
+        p.getTweensOf = function(target, nested) {
+            var disabled = this._gc,
+                a = [],
+                cnt = 0,
+                tweens, i;
+            if (disabled) {
+                this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here.
+            }
+            tweens = TweenLite.getTweensOf(target);
+            i = tweens.length;
+            while (--i > -1) {
+                if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) {
+                    a[cnt++] = tweens[i];
+                }
+            }
+            if (disabled) {
+                this._enabled(false, true);
+            }
+            return a;
+        };
+
+        p._contains = function(tween) {
+            var tl = tween.timeline;
+            while (tl) {
+                if (tl === this) {
+                    return true;
+                }
+                tl = tl.timeline;
+            }
+            return false;
+        };
+
+        p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) {
+            ignoreBeforeTime = ignoreBeforeTime || 0;
+            var tween = this._first,
+                labels = this._labels,
+                p;
+            while (tween) {
+                if (tween._startTime >= ignoreBeforeTime) {
+                    tween._startTime += amount;
+                }
+                tween = tween._next;
+            }
+            if (adjustLabels) {
+                for (p in labels) {
+                    if (labels[p] >= ignoreBeforeTime) {
+                        labels[p] += amount;
+                    }
+                }
+            }
+            return this._uncache(true);
+        };
+
+        p._kill = function(vars, target) {
+            if (!vars && !target) {
+                return this._enabled(false, false);
+            }
+            var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target),
+                i = tweens.length,
+                changed = false;
+            while (--i > -1) {
+                if (tweens[i]._kill(vars, target)) {
+                    changed = true;
+                }
+            }
+            return changed;
+        };
+
+        p.clear = function(labels) {
+            var tweens = this.getChildren(false, true, true),
+                i = tweens.length;
+            this._time = this._totalTime = 0;
+            while (--i > -1) {
+                tweens[i]._enabled(false, false);
+            }
+            if (labels !== false) {
+                this._labels = {};
+            }
+            return this._uncache(true);
+        };
+
+        p.invalidate = function() {
+            var tween = this._first;
+            while (tween) {
+                tween.invalidate();
+                tween = tween._next;
+            }
+            return this;
+        };
+
+        p._enabled = function(enabled, ignoreTimeline) {
+            if (enabled === this._gc) {
+                var tween = this._first;
+                while (tween) {
+                    tween._enabled(enabled, true);
+                    tween = tween._next;
+                }
+            }
+            return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline);
+        };
+
+        p.duration = function(value) {
+            if (!arguments.length) {
+                if (this._dirty) {
+                    this.totalDuration(); //just triggers recalculation
+                }
+                return this._duration;
+            }
+            if (this.duration() !== 0 && value !== 0) {
+                this.timeScale(this._duration / value);
+            }
+            return this;
+        };
+
+        p.totalDuration = function(value) {
+            if (!arguments.length) {
+                if (this._dirty) {
+                    var max = 0,
+                        tween = this._last,
+                        prevStart = 999999999999,
+                        prev, end;
+                    while (tween) {
+                        prev = tween._prev; //record it here in case the tween changes position in the sequence...
+                        if (tween._dirty) {
+                            tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.
+                        }
+                        if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence
+                            this.add(tween, tween._startTime - tween._delay);
+                        } else {
+                            prevStart = tween._startTime;
+                        }
+                        if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.
+                            max -= tween._startTime;
+                            if (this._timeline.smoothChildTiming) {
+                                this._startTime += tween._startTime / this._timeScale;
+                            }
+                            this.shiftChildren(-tween._startTime, false, -9999999999);
+                            prevStart = 0;
+                        }
+                        end = tween._startTime + (tween._totalDuration / tween._timeScale);
+                        if (end > max) {
+                            max = end;
+                        }
+                        tween = prev;
+                    }
+                    this._duration = this._totalDuration = max;
+                    this._dirty = false;
+                }
+                return this._totalDuration;
+            }
+            if (this.totalDuration() !== 0) if (value !== 0) {
+                this.timeScale(this._totalDuration / value);
+            }
+            return this;
+        };
+
+        p.usesFrames = function() {
+            var tl = this._timeline;
+            while (tl._timeline) {
+                tl = tl._timeline;
+            }
+            return (tl === Animation._rootFramesTimeline);
+        };
+
+        p.rawTime = function() {
+            return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;
+        };
+
+        return TimelineLite;
+
+    }, true);
+    
+
+
+
+
+
+
+
+    
+    
+    
+    
+    
+/*
+ * ----------------------------------------------------------------
+ * TimelineMax
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) {
+
+        var TimelineMax = function(vars) {
+                TimelineLite.call(this, vars);
+                this._repeat = this.vars.repeat || 0;
+                this._repeatDelay = this.vars.repeatDelay || 0;
+                this._cycle = 0;
+                this._yoyo = (this.vars.yoyo === true);
+                this._dirty = true;
+            },
+            _tinyNum = 0.0000000001,
+            _blankArray = [],
+            _easeNone = new Ease(null, null, 1, 0),
+            p = TimelineMax.prototype = new TimelineLite();
+
+        p.constructor = TimelineMax;
+        p.kill()._gc = false;
+        TimelineMax.version = "1.12.1";
+
+        p.invalidate = function() {
+            this._yoyo = (this.vars.yoyo === true);
+            this._repeat = this.vars.repeat || 0;
+            this._repeatDelay = this.vars.repeatDelay || 0;
+            this._uncache(true);
+            return TimelineLite.prototype.invalidate.call(this);
+        };
+
+        p.addCallback = function(callback, position, params, scope) {
+            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);
+        };
+
+        p.removeCallback = function(callback, position) {
+            if (callback) {
+                if (position == null) {
+                    this._kill(null, callback);
+                } else {
+                    var a = this.getTweensOf(callback, false),
+                        i = a.length,
+                        time = this._parseTimeOrLabel(position);
+                    while (--i > -1) {
+                        if (a[i]._startTime === time) {
+                            a[i]._enabled(false, false);
+                        }
+                    }
+                }
+            }
+            return this;
+        };
+
+        p.tweenTo = function(position, vars) {
+            vars = vars || {};
+            var copy = {ease:_easeNone, overwrite:(vars.delay ? 2 : 1), useFrames:this.usesFrames(), immediateRender:false},//note: set overwrite to 1 (true/all) by default unless there's a delay so that we avoid a racing situation that could happen if, for example, an onmousemove creates the same tweenTo() over and over again.
+                duration, p, t;
+            for (p in vars) {
+                copy[p] = vars[p];
+            }
+            copy.time = this._parseTimeOrLabel(position);
+            duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001;
+            t = new TweenLite(this, duration, copy);
+            copy.onStart = function() {
+                t.target.paused(true);
+                if (t.vars.time !== t.target.time() && duration === t.duration()) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all.
+                    t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale );
+                }
+                if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.
+                    vars.onStart.apply(vars.onStartScope || t, vars.onStartParams || _blankArray);
+                }
+            };
+            return t;
+        };
+
+        p.tweenFromTo = function(fromPosition, toPosition, vars) {
+            vars = vars || {};
+            fromPosition = this._parseTimeOrLabel(fromPosition);
+            vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], onCompleteScope:this};
+            vars.immediateRender = (vars.immediateRender !== false);
+            var t = this.tweenTo(toPosition, vars);
+            return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001);
+        };
+
+        p.render = function(time, suppressEvents, force) {
+            if (this._gc) {
+                this._enabled(true, false);
+            }
+            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),
+                dur = this._duration,
+                prevTime = this._time,
+                prevTotalTime = this._totalTime,
+                prevStart = this._startTime,
+                prevTimeScale = this._timeScale,
+                prevRawPrevTime = this._rawPrevTime,
+                prevPaused = this._paused,
+                prevCycle = this._cycle,
+                tween, isComplete, next, callback, internalForce, cycleDuration;
+            if (time >= totalDur) {
+                if (!this._locked) {
+                    this._totalTime = totalDur;
+                    this._cycle = this._repeat;
+                }
+                if (!this._reversed) if (!this._hasPausedChild()) {
+                    isComplete = true;
+                    callback = "onComplete";
+                    if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {
+                        internalForce = true;
+                        if (prevRawPrevTime > _tinyNum) {
+                            callback = "onReverseComplete";
+                        }
+                    }
+                }
+                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                if (this._yoyo && (this._cycle & 1) !== 0) {
+                    this._time = time = 0;
+                } else {
+                    this._time = dur;
+                    time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added.
+                }
+
+            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
+                if (!this._locked) {
+                    this._totalTime = this._cycle = 0;
+                }
+                this._time = 0;
+                if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !this._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare)
+                    callback = "onReverseComplete";
+                    isComplete = this._reversed;
+                }
+                if (time < 0) {
+                    this._active = false;
+                    if (dur === 0) if (prevRawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                        internalForce = true;
+                    }
+                    this._rawPrevTime = time;
+                } else {
+                    this._rawPrevTime = (dur || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)
+                    if (!this._initted) {
+                        internalForce = true;
+                    }
+                }
+
+            } else {
+                if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through.
+                    internalForce = true;
+                }
+                this._time = this._rawPrevTime = time;
+                if (!this._locked) {
+                    this._totalTime = time;
+                    if (this._repeat !== 0) {
+                        cycleDuration = dur + this._repeatDelay;
+                        this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)
+                        if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {
+                            this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)
+                        }
+                        this._time = this._totalTime - (this._cycle * cycleDuration);
+                        if (this._yoyo) if ((this._cycle & 1) !== 0) {
+                            this._time = dur - this._time;
+                        }
+                        if (this._time > dur) {
+                            this._time = dur;
+                            time = dur + 0.0001; //to avoid occasional floating point rounding error
+                        } else if (this._time < 0) {
+                            this._time = time = 0;
+                        } else {
+                            time = this._time;
+                        }
+                    }
+                }
+            }
+
+            if (this._cycle !== prevCycle) if (!this._locked) {
+                /*
+                make sure children at the end/beginning of the timeline are rendered properly. If, for example,
+                a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which
+                would get transated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there
+                could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So
+                we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must
+                ensure that zero-duration tweens at the very beginning or end of the TimelineMax work.
+                */
+                var backwards = (this._yoyo && (prevCycle & 1) !== 0),
+                    wrap = (backwards === (this._yoyo && (this._cycle & 1) !== 0)),
+                    recTotalTime = this._totalTime,
+                    recCycle = this._cycle,
+                    recRawPrevTime = this._rawPrevTime,
+                    recTime = this._time;
+
+                this._totalTime = prevCycle * dur;
+                if (this._cycle < prevCycle) {
+                    backwards = !backwards;
+                } else {
+                    this._totalTime += dur;
+                }
+                this._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method.
+
+                this._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime;
+                this._cycle = prevCycle;
+                this._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render()
+                prevTime = (backwards) ? 0 : dur;
+                this.render(prevTime, suppressEvents, (dur === 0));
+                if (!suppressEvents) if (!this._gc) {
+                    if (this.vars.onRepeat) {
+                        this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);
+                    }
+                }
+                if (wrap) {
+                    prevTime = (backwards) ? dur + 0.0001 : -0.0001;
+                    this.render(prevTime, true, false);
+                }
+                this._locked = false;
+                if (this._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible)
+                    return;
+                }
+                this._time = recTime;
+                this._totalTime = recTotalTime;
+                this._cycle = recCycle;
+                this._rawPrevTime = recRawPrevTime;
+            }
+
+            if ((this._time === prevTime || !this._first) && !force && !internalForce) {
+                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.
+                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+                }
+                return;
+            } else if (!this._initted) {
+                this._initted = true;
+            }
+
+            if (!this._active) if (!this._paused && this._totalTime !== prevTotalTime && time > 0) {
+                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.
+            }
+
+            if (prevTotalTime === 0) if (this.vars.onStart) if (this._totalTime !== 0) if (!suppressEvents) {
+                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);
+            }
+
+            if (this._time >= prevTime) {
+                tween = this._first;
+                while (tween) {
+                    next = tween._next; //record it here because the value could change after rendering...
+                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
+                        break;
+                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {
+                        if (!tween._reversed) {
+                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
+                        } else {
+                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
+                        }
+
+                    }
+                    tween = next;
+                }
+            } else {
+                tween = this._last;
+                while (tween) {
+                    next = tween._prev; //record it here because the value could change after rendering...
+                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering
+                        break;
+                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {
+                        if (!tween._reversed) {
+                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
+                        } else {
+                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
+                        }
+                    }
+                    tween = next;
+                }
+            }
+
+            if (this._onUpdate) if (!suppressEvents) {
+                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+            }
+            if (callback) if (!this._locked) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate
+                if (isComplete) {
+                    if (this._timeline.autoRemoveChildren) {
+                        this._enabled(false, false);
+                    }
+                    this._active = false;
+                }
+                if (!suppressEvents && this.vars[callback]) {
+                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);
+                }
+            }
+        };
+
+        p.getActive = function(nested, tweens, timelines) {
+            if (nested == null) {
+                nested = true;
+            }
+            if (tweens == null) {
+                tweens = true;
+            }
+            if (timelines == null) {
+                timelines = false;
+            }
+            var a = [],
+                all = this.getChildren(nested, tweens, timelines),
+                cnt = 0,
+                l = all.length,
+                i, tween;
+            for (i = 0; i < l; i++) {
+                tween = all[i];
+                if (tween.isActive()) {
+                    a[cnt++] = tween;
+                }
+            }
+            return a;
+        };
+
+
+        p.getLabelAfter = function(time) {
+            if (!time) if (time !== 0) { //faster than isNan()
+                time = this._time;
+            }
+            var labels = this.getLabelsArray(),
+                l = labels.length,
+                i;
+            for (i = 0; i < l; i++) {
+                if (labels[i].time > time) {
+                    return labels[i].name;
+                }
+            }
+            return null;
+        };
+
+        p.getLabelBefore = function(time) {
+            if (time == null) {
+                time = this._time;
+            }
+            var labels = this.getLabelsArray(),
+                i = labels.length;
+            while (--i > -1) {
+                if (labels[i].time < time) {
+                    return labels[i].name;
+                }
+            }
+            return null;
+        };
+
+        p.getLabelsArray = function() {
+            var a = [],
+                cnt = 0,
+                p;
+            for (p in this._labels) {
+                a[cnt++] = {time:this._labels[p], name:p};
+            }
+            a.sort(function(a,b) {
+                return a.time - b.time;
+            });
+            return a;
+        };
+
+
+//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------
+
+        p.progress = function(value) {
+            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);
+        };
+
+        p.totalProgress = function(value) {
+            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);
+        };
+
+        p.totalDuration = function(value) {
+            if (!arguments.length) {
+                if (this._dirty) {
+                    TimelineLite.prototype.totalDuration.call(this); //just forces refresh
+                    //Instead of Infinity, we use 999999999999 so that we can accommodate reverses.
+                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);
+                }
+                return this._totalDuration;
+            }
+            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );
+        };
+
+        p.time = function(value, suppressEvents) {
+            if (!arguments.length) {
+                return this._time;
+            }
+            if (this._dirty) {
+                this.totalDuration();
+            }
+            if (value > this._duration) {
+                value = this._duration;
+            }
+            if (this._yoyo && (this._cycle & 1) !== 0) {
+                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));
+            } else if (this._repeat !== 0) {
+                value += this._cycle * (this._duration + this._repeatDelay);
+            }
+            return this.totalTime(value, suppressEvents);
+        };
+
+        p.repeat = function(value) {
+            if (!arguments.length) {
+                return this._repeat;
+            }
+            this._repeat = value;
+            return this._uncache(true);
+        };
+
+        p.repeatDelay = function(value) {
+            if (!arguments.length) {
+                return this._repeatDelay;
+            }
+            this._repeatDelay = value;
+            return this._uncache(true);
+        };
+
+        p.yoyo = function(value) {
+            if (!arguments.length) {
+                return this._yoyo;
+            }
+            this._yoyo = value;
+            return this;
+        };
+
+        p.currentLabel = function(value) {
+            if (!arguments.length) {
+                return this.getLabelBefore(this._time + 0.00000001);
+            }
+            return this.seek(value, true);
+        };
+
+        return TimelineMax;
+
+    }, true);
+    
+
+
+
+
+    
+    
+    
+    
+    
+    
+    
+/*
+ * ----------------------------------------------------------------
+ * BezierPlugin
+ * ----------------------------------------------------------------
+ */
+    (function() {
+
+        var _RAD2DEG = 180 / Math.PI,
+            _r1 = [],
+            _r2 = [],
+            _r3 = [],
+            _corProps = {},
+            Segment = function(a, b, c, d) {
+                this.a = a;
+                this.b = b;
+                this.c = c;
+                this.d = d;
+                this.da = d - a;
+                this.ca = c - a;
+                this.ba = b - a;
+            },
+            _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",
+            cubicToQuadratic = function(a, b, c, d) {
+                var q1 = {a:a},
+                    q2 = {},
+                    q3 = {},
+                    q4 = {c:d},
+                    mab = (a + b) / 2,
+                    mbc = (b + c) / 2,
+                    mcd = (c + d) / 2,
+                    mabc = (mab + mbc) / 2,
+                    mbcd = (mbc + mcd) / 2,
+                    m8 = (mbcd - mabc) / 8;
+                q1.b = mab + (a - mab) / 4;
+                q2.b = mabc + m8;
+                q1.c = q2.a = (q1.b + q2.b) / 2;
+                q2.c = q3.a = (mabc + mbcd) / 2;
+                q3.b = mbcd - m8;
+                q4.b = mcd + (d - mcd) / 4;
+                q3.c = q4.a = (q3.b + q4.b) / 2;
+                return [q1, q2, q3, q4];
+            },
+            _calculateControlPoints = function(a, curviness, quad, basic, correlate) {
+                var l = a.length - 1,
+                    ii = 0,
+                    cp1 = a[0].a,
+                    i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl;
+                for (i = 0; i < l; i++) {
+                    seg = a[ii];
+                    p1 = seg.a;
+                    p2 = seg.d;
+                    p3 = a[ii+1].d;
+
+                    if (correlate) {
+                        r1 = _r1[i];
+                        r2 = _r2[i];
+                        tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5);
+                        m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0));
+                        m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0));
+                        mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0));
+                    } else {
+                        m1 = p2 - (p2 - p1) * curviness * 0.5;
+                        m2 = p2 + (p3 - p2) * curviness * 0.5;
+                        mm = p2 - (m1 + m2) / 2;
+                    }
+                    m1 += mm;
+                    m2 += mm;
+
+                    seg.c = cp2 = m1;
+                    if (i !== 0) {
+                        seg.b = cp1;
+                    } else {
+                        seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly.
+                    }
+
+                    seg.da = p2 - p1;
+                    seg.ca = cp2 - p1;
+                    seg.ba = cp1 - p1;
+
+                    if (quad) {
+                        qb = cubicToQuadratic(p1, cp1, cp2, p2);
+                        a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);
+                        ii += 4;
+                    } else {
+                        ii++;
+                    }
+
+                    cp1 = m2;
+                }
+                seg = a[ii];
+                seg.b = cp1;
+                seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly.
+                seg.da = seg.d - seg.a;
+                seg.ca = seg.c - seg.a;
+                seg.ba = cp1 - seg.a;
+                if (quad) {
+                    qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d);
+                    a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);
+                }
+            },
+            _parseAnchors = function(values, p, correlate, prepend) {
+                var a = [],
+                    l, i, p1, p2, p3, tmp;
+                if (prepend) {
+                    values = [prepend].concat(values);
+                    i = values.length;
+                    while (--i > -1) {
+                        if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") {
+                            values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons
+                        }
+                    }
+                }
+                l = values.length - 2;
+                if (l < 0) {
+                    a[0] = new Segment(values[0][p], 0, 0, values[(l < -1) ? 0 : 1][p]);
+                    return a;
+                }
+                for (i = 0; i < l; i++) {
+                    p1 = values[i][p];
+                    p2 = values[i+1][p];
+                    a[i] = new Segment(p1, 0, 0, p2);
+                    if (correlate) {
+                        p3 = values[i+2][p];
+                        _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1);
+                        _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2);
+                    }
+                }
+                a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]);
+                return a;
+            },
+            bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) {
+                var obj = {},
+                    props = [],
+                    first = prepend || values[0],
+                    i, p, a, j, r, l, seamless, last;
+                correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate;
+                if (curviness == null) {
+                    curviness = 1;
+                }
+                for (p in values[0]) {
+                    props.push(p);
+                }
+                //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later)
+                if (values.length > 1) {
+                    last = values[values.length - 1];
+                    seamless = true;
+                    i = props.length;
+                    while (--i > -1) {
+                        p = props[i];
+                        if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors. For example, if you set an object's position to 4.945, Flash will make it 4.9
+                            seamless = false;
+                            break;
+                        }
+                    }
+                    if (seamless) {
+                        values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens
+                        if (prepend) {
+                            values.unshift(prepend);
+                        }
+                        values.push(values[1]);
+                        prepend = values[values.length - 3];
+                    }
+                }
+                _r1.length = _r2.length = _r3.length = 0;
+                i = props.length;
+                while (--i > -1) {
+                    p = props[i];
+                    _corProps[p] = (correlate.indexOf(","+p+",") !== -1);
+                    obj[p] = _parseAnchors(values, p, _corProps[p], prepend);
+                }
+                i = _r1.length;
+                while (--i > -1) {
+                    _r1[i] = Math.sqrt(_r1[i]);
+                    _r2[i] = Math.sqrt(_r2[i]);
+                }
+                if (!basic) {
+                    i = props.length;
+                    while (--i > -1) {
+                        if (_corProps[p]) {
+                            a = obj[props[i]];
+                            l = a.length - 1;
+                            for (j = 0; j < l; j++) {
+                                r = a[j+1].da / _r2[j] + a[j].da / _r1[j];
+                                _r3[j] = (_r3[j] || 0) + r * r;
+                            }
+                        }
+                    }
+                    i = _r3.length;
+                    while (--i > -1) {
+                        _r3[i] = Math.sqrt(_r3[i]);
+                    }
+                }
+                i = props.length;
+                j = quadratic ? 4 : 1;
+                while (--i > -1) {
+                    p = props[i];
+                    a = obj[p];
+                    _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties
+                    if (seamless) {
+                        a.splice(0, j);
+                        a.splice(a.length - j, j);
+                    }
+                }
+                return obj;
+            },
+            _parseBezierData = function(values, type, prepend) {
+                type = type || "soft";
+                var obj = {},
+                    inc = (type === "cubic") ? 3 : 2,
+                    soft = (type === "soft"),
+                    props = [],
+                    a, b, c, d, cur, i, j, l, p, cnt, tmp;
+                if (soft && prepend) {
+                    values = [prepend].concat(values);
+                }
+                if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; }
+                for (p in values[0]) {
+                    props.push(p);
+                }
+                i = props.length;
+                while (--i > -1) {
+                    p = props[i];
+                    obj[p] = cur = [];
+                    cnt = 0;
+                    l = values.length;
+                    for (j = 0; j < l; j++) {
+                        a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp);
+                        if (soft) if (j > 1) if (j < l - 1) {
+                            cur[cnt++] = (a + cur[cnt-2]) / 2;
+                        }
+                        cur[cnt++] = a;
+                    }
+                    l = cnt - inc + 1;
+                    cnt = 0;
+                    for (j = 0; j < l; j += inc) {
+                        a = cur[j];
+                        b = cur[j+1];
+                        c = cur[j+2];
+                        d = (inc === 2) ? 0 : cur[j+3];
+                        cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);
+                    }
+                    cur.length = cnt;
+                }
+                return obj;
+            },
+            _addCubicLengths = function(a, steps, resolution) {
+                var inc = 1 / resolution,
+                    j = a.length,
+                    d, d1, s, da, ca, ba, p, i, inv, bez, index;
+                while (--j > -1) {
+                    bez = a[j];
+                    s = bez.a;
+                    da = bez.d - s;
+                    ca = bez.c - s;
+                    ba = bez.b - s;
+                    d = d1 = 0;
+                    for (i = 1; i <= resolution; i++) {
+                        p = inc * i;
+                        inv = 1 - p;
+                        d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p);
+                        index = j * resolution + i - 1;
+                        steps[index] = (steps[index] || 0) + d * d;
+                    }
+                }
+            },
+            _parseLengthData = function(obj, resolution) {
+                resolution = resolution >> 0 || 6;
+                var a = [],
+                    lengths = [],
+                    d = 0,
+                    total = 0,
+                    threshold = resolution - 1,
+                    segments = [],
+                    curLS = [], //current length segments array
+                    p, i, l, index;
+                for (p in obj) {
+                    _addCubicLengths(obj[p], a, resolution);
+                }
+                l = a.length;
+                for (i = 0; i < l; i++) {
+                    d += Math.sqrt(a[i]);
+                    index = i % resolution;
+                    curLS[index] = d;
+                    if (index === threshold) {
+                        total += d;
+                        index = (i / resolution) >> 0;
+                        segments[index] = curLS;
+                        lengths[index] = total;
+                        d = 0;
+                        curLS = [];
+                    }
+                }
+                return {length:total, lengths:lengths, segments:segments};
+            },
+
+
+
+            BezierPlugin = window._gsDefine.plugin({
+                    propName: "bezier",
+                    priority: -1,
+                    version: "1.3.2",
+                    API: 2,
+                    global:true,
+
+                    //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
+                    init: function(target, vars, tween) {
+                        this._target = target;
+                        if (vars instanceof Array) {
+                            vars = {values:vars};
+                        }
+                        this._func = {};
+                        this._round = {};
+                        this._props = [];
+                        this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10);
+                        var values = vars.values || [],
+                            first = {},
+                            second = values[0],
+                            autoRotate = vars.autoRotate || tween.vars.orientToBezier,
+                            p, isFunc, i, j, prepend;
+
+                        this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null;
+                        for (p in second) {
+                            this._props.push(p);
+                        }
+
+                        i = this._props.length;
+                        while (--i > -1) {
+                            p = this._props[i];
+
+                            this._overwriteProps.push(p);
+                            isFunc = this._func[p] = (typeof(target[p]) === "function");
+                            first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();
+                            if (!prepend) if (first[p] !== values[0][p]) {
+                                prepend = first;
+                            }
+                        }
+                        this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first);
+                        this._segCount = this._beziers[p].length;
+
+                        if (this._timeRes) {
+                            var ld = _parseLengthData(this._beziers, this._timeRes);
+                            this._length = ld.length;
+                            this._lengths = ld.lengths;
+                            this._segments = ld.segments;
+                            this._l1 = this._li = this._s1 = this._si = 0;
+                            this._l2 = this._lengths[0];
+                            this._curSeg = this._segments[0];
+                            this._s2 = this._curSeg[0];
+                            this._prec = 1 / this._curSeg.length;
+                        }
+
+                        if ((autoRotate = this._autoRotate)) {
+                            this._initialRotations = [];
+                            if (!(autoRotate[0] instanceof Array)) {
+                                this._autoRotate = autoRotate = [autoRotate];
+                            }
+                            i = autoRotate.length;
+                            while (--i > -1) {
+                                for (j = 0; j < 3; j++) {
+                                    p = autoRotate[i][j];
+                                    this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;
+                                }
+                                p = autoRotate[i][2];
+                                this._initialRotations[i] = this._func[p] ? this._func[p].call(this._target) : this._target[p];
+                            }
+                        }
+                        this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.
+                        return true;
+                    },
+
+                    //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
+                    set: function(v) {
+                        var segments = this._segCount,
+                            func = this._func,
+                            target = this._target,
+                            notStart = (v !== this._startRatio),
+                            curIndex, inv, i, p, b, t, val, l, lengths, curSeg;
+                        if (!this._timeRes) {
+                            curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;
+                            t = (v - (curIndex * (1 / segments))) * segments;
+                        } else {
+                            lengths = this._lengths;
+                            curSeg = this._curSeg;
+                            v *= this._length;
+                            i = this._li;
+                            //find the appropriate segment (if the currently cached one isn't correct)
+                            if (v > this._l2 && i < segments - 1) {
+                                l = segments - 1;
+                                while (i < l && (this._l2 = lengths[++i]) <= v) {   }
+                                this._l1 = lengths[i-1];
+                                this._li = i;
+                                this._curSeg = curSeg = this._segments[i];
+                                this._s2 = curSeg[(this._s1 = this._si = 0)];
+                            } else if (v < this._l1 && i > 0) {
+                                while (i > 0 && (this._l1 = lengths[--i]) >= v) { }
+                                if (i === 0 && v < this._l1) {
+                                    this._l1 = 0;
+                                } else {
+                                    i++;
+                                }
+                                this._l2 = lengths[i];
+                                this._li = i;
+                                this._curSeg = curSeg = this._segments[i];
+                                this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0;
+                                this._s2 = curSeg[this._si];
+                            }
+                            curIndex = i;
+                            //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)
+                            v -= this._l1;
+                            i = this._si;
+                            if (v > this._s2 && i < curSeg.length - 1) {
+                                l = curSeg.length - 1;
+                                while (i < l && (this._s2 = curSeg[++i]) <= v) {    }
+                                this._s1 = curSeg[i-1];
+                                this._si = i;
+                            } else if (v < this._s1 && i > 0) {
+                                while (i > 0 && (this._s1 = curSeg[--i]) >= v) {    }
+                                if (i === 0 && v < this._s1) {
+                                    this._s1 = 0;
+                                } else {
+                                    i++;
+                                }
+                                this._s2 = curSeg[i];
+                                this._si = i;
+                            }
+                            t = (i + (v - this._s1) / (this._s2 - this._s1)) * this._prec;
+                        }
+                        inv = 1 - t;
+
+                        i = this._props.length;
+                        while (--i > -1) {
+                            p = this._props[i];
+                            b = this._beziers[p][curIndex];
+                            val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a;
+                            if (this._round[p]) {
+                                val = Math.round(val);
+                            }
+                            if (func[p]) {
+                                target[p](val);
+                            } else {
+                                target[p] = val;
+                            }
+                        }
+
+                        if (this._autoRotate) {
+                            var ar = this._autoRotate,
+                                b2, x1, y1, x2, y2, add, conv;
+                            i = ar.length;
+                            while (--i > -1) {
+                                p = ar[i][2];
+                                add = ar[i][3] || 0;
+                                conv = (ar[i][4] === true) ? 1 : _RAD2DEG;
+                                b = this._beziers[ar[i][0]];
+                                b2 = this._beziers[ar[i][1]];
+
+                                if (b && b2) { //in case one of the properties got overwritten.
+                                    b = b[curIndex];
+                                    b2 = b2[curIndex];
+
+                                    x1 = b.a + (b.b - b.a) * t;
+                                    x2 = b.b + (b.c - b.b) * t;
+                                    x1 += (x2 - x1) * t;
+                                    x2 += ((b.c + (b.d - b.c) * t) - x2) * t;
+
+                                    y1 = b2.a + (b2.b - b2.a) * t;
+                                    y2 = b2.b + (b2.c - b2.b) * t;
+                                    y1 += (y2 - y1) * t;
+                                    y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t;
+
+                                    val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i];
+
+                                    if (func[p]) {
+                                        target[p](val);
+                                    } else {
+                                        target[p] = val;
+                                    }
+                                }
+                            }
+                        }
+                    }
+            }),
+            p = BezierPlugin.prototype;
+
+
+        BezierPlugin.bezierThrough = bezierThrough;
+        BezierPlugin.cubicToQuadratic = cubicToQuadratic;
+        BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite
+        BezierPlugin.quadraticToCubic = function(a, b, c) {
+            return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);
+        };
+
+        BezierPlugin._cssRegister = function() {
+            var CSSPlugin = window._gsDefine.globals.CSSPlugin;
+            if (!CSSPlugin) {
+                return;
+            }
+            var _internals = CSSPlugin._internals,
+                _parseToProxy = _internals._parseToProxy,
+                _setPluginRatio = _internals._setPluginRatio,
+                CSSPropTween = _internals.CSSPropTween;
+            _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) {
+                if (e instanceof Array) {
+                    e = {values:e};
+                }
+                plugin = new BezierPlugin();
+                var values = e.values,
+                    l = values.length - 1,
+                    pluginValues = [],
+                    v = {},
+                    i, p, data;
+                if (l < 0) {
+                    return pt;
+                }
+                for (i = 0; i <= l; i++) {
+                    data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i));
+                    pluginValues[i] = data.end;
+                }
+                for (p in e) {
+                    v[p] = e[p]; //duplicate the vars object because we need to alter some things which would cause problems if the user plans to reuse the same vars object for another tween.
+                }
+                v.values = pluginValues;
+                pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2);
+                pt.data = data;
+                pt.plugin = plugin;
+                pt.setRatio = _setPluginRatio;
+                if (v.autoRotate === 0) {
+                    v.autoRotate = true;
+                }
+                if (v.autoRotate && !(v.autoRotate instanceof Array)) {
+                    i = (v.autoRotate === true) ? 0 : Number(v.autoRotate);
+                    v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false;
+                }
+                if (v.autoRotate) {
+                    if (!cssp._transform) {
+                        cssp._enableTransforms(false);
+                    }
+                    data.autoRotate = cssp._target._gsTransform;
+                }
+                plugin._onInitTween(data.proxy, v, cssp._tween);
+                return pt;
+            }});
+        };
+
+        p._roundProps = function(lookup, value) {
+            var op = this._overwriteProps,
+                i = op.length;
+            while (--i > -1) {
+                if (lookup[op[i]] || lookup.bezier || lookup.bezierThrough) {
+                    this._round[op[i]] = value;
+                }
+            }
+        };
+
+        p._kill = function(lookup) {
+            var a = this._props,
+                p, i;
+            for (p in this._beziers) {
+                if (p in lookup) {
+                    delete this._beziers[p];
+                    delete this._func[p];
+                    i = a.length;
+                    while (--i > -1) {
+                        if (a[i] === p) {
+                            a.splice(i, 1);
+                        }
+                    }
+                }
+            }
+            return this._super._kill.call(this, lookup);
+        };
+
+    }());
+
+
+
+
+
+
+    
+    
+    
+    
+    
+    
+    
+    
+/*
+ * ----------------------------------------------------------------
+ * CSSPlugin
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function(TweenPlugin, TweenLite) {
+
+        /** @constructor **/
+        var CSSPlugin = function() {
+                TweenPlugin.call(this, "css");
+                this._overwriteProps.length = 0;
+                this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)
+            },
+            _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.
+            _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance
+            _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter
+            _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.
+            _specialProps = {},
+            p = CSSPlugin.prototype = new TweenPlugin("css");
+
+        p.constructor = CSSPlugin;
+        CSSPlugin.version = "1.12.1";
+        CSSPlugin.API = 2;
+        CSSPlugin.defaultTransformPerspective = 0;
+        CSSPlugin.defaultSkewType = "compensated";
+        p = "px"; //we'll reuse the "p" variable to keep file size down
+        CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};
+
+
+        var _numExp = /(?:\d|\-\d|\.\d|\-\.\d)+/g,
+            _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
+            _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"
+            _NaNExp = /[^\d\-\.]/g,
+            _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,
+            _opacityExp = /opacity *= *([^)]*)/i,
+            _opacityValExp = /opacity:([^;]*)/i,
+            _alphaFilterExp = /alpha\(opacity *=.+?\)/i,
+            _rgbhslExp = /^(rgb|hsl)/,
+            _capsExp = /([A-Z])/g,
+            _camelExp = /-([a-z])/gi,
+            _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage)
+            _camelFunc = function(s, g) { return g.toUpperCase(); },
+            _horizExp = /(?:Left|Right|Width)/i,
+            _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,
+            _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,
+            _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis
+            _DEG2RAD = Math.PI / 180,
+            _RAD2DEG = 180 / Math.PI,
+            _forcePT = {},
+            _doc = document,
+            _tempDiv = _doc.createElement("div"),
+            _tempImg = _doc.createElement("img"),
+            _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins
+            _agent = navigator.userAgent,
+            _autoRound,
+            _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).
+
+            _isSafari,
+            _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element.
+            _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!)
+            _ieVers,
+            _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.
+                var i = _agent.indexOf("Android"),
+                    d = _doc.createElement("div"), a;
+
+                _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3));
+                _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6));
+                _isFirefox = (_agent.indexOf("Firefox") !== -1);
+
+                if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {
+                    _ieVers = parseFloat( RegExp.$1 );
+                }
+
+                d.innerHTML = "<a title='' style='top:1px;opacity:.55;'>a</a>";
+                a = d.getElementsByTagName("a")[0];
+                return a ? /^0.55/.test(a.style.opacity) : false;
+            }()),
+            _getIEOpacity = function(v) {
+                return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);
+            },
+            _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.
+                if (window.console) {
+                    //console.log(s);
+                }
+            },
+            _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"
+            _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".
+
+            // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)
+            _checkPropPrefix = function(p, e) {
+                e = e || _tempDiv;
+                var s = e.style,
+                    a, i;
+                if (s[p] !== undefined) {
+                    return p;
+                }
+                p = p.charAt(0).toUpperCase() + p.substr(1);
+                a = ["O","Moz","ms","Ms","Webkit"];
+                i = 5;
+                while (--i > -1 && s[a[i]+p] === undefined) { }
+                if (i >= 0) {
+                    _prefix = (i === 3) ? "ms" : a[i];
+                    _prefixCSS = "-" + _prefix.toLowerCase() + "-";
+                    return _prefix + p;
+                }
+                return null;
+            },
+
+            _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {},
+
+            /**
+             * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:
+             * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left");
+             *
+             * @param {!Object} t Target element whose style property you want to query
+             * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.)
+             * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call.
+             * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value.
+             * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto".
+             * @return {?string} The current property value
+             */
+            _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) {
+                var rv;
+                if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here.
+                    return _getIEOpacity(t);
+                }
+                if (!calc && t.style[p]) {
+                    rv = t.style[p];
+                } else if ((cs = cs || _getComputedStyle(t))) {
+                    rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase());
+                } else if (t.currentStyle) {
+                    rv = t.currentStyle[p];
+                }
+                return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv;
+            },
+
+            /**
+             * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number.
+             * @param {!Object} t Target element
+             * @param {!string} p Property name (like "left", "top", "marginLeft", etc.)
+             * @param {!number} v Value
+             * @param {string=} sfx Suffix (like "px" or "%" or "em")
+             * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect.
+             * @return {number} value in pixels
+             */
+            _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {
+                if (sfx === "px" || !sfx) { return v; }
+                if (sfx === "auto" || !v) { return 0; }
+                var horiz = _horizExp.test(p),
+                    node = t,
+                    style = _tempDiv.style,
+                    neg = (v < 0),
+                    pix, cache, time;
+                if (neg) {
+                    v = -v;
+                }
+                if (sfx === "%" && p.indexOf("border") !== -1) {
+                    pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);
+                } else {
+                    style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";
+                    if (sfx === "%" || !node.appendChild) {
+                        node = t.parentNode || _doc.body;
+                        cache = node._gsCache;
+                        time = TweenLite.ticker.frame;
+                        if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)
+                            return cache.width * v / 100;
+                        }
+                        style[(horiz ? "width" : "height")] = v + sfx;
+                    } else {
+                        style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;
+                    }
+                    node.appendChild(_tempDiv);
+                    pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);
+                    node.removeChild(_tempDiv);
+                    if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) {
+                        cache = node._gsCache = node._gsCache || {};
+                        cache.time = time;
+                        cache.width = pix / v * 100;
+                    }
+                    if (pix === 0 && !recurse) {
+                        pix = _convertToPixels(t, p, v, sfx, true);
+                    }
+                }
+                return neg ? -pix : pix;
+            },
+            _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop
+                if (_getStyle(t, "position", cs) !== "absolute") { return 0; }
+                var dim = ((p === "left") ? "Left" : "Top"),
+                    v = _getStyle(t, "margin" + dim, cs);
+                return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);
+            },
+
+            // @private returns at object containing ALL of the style properties in camelCase and their associated values.
+            _getAllStyles = function(t, cs) {
+                var s = {},
+                    i, tr;
+                if ((cs = cs || _getComputedStyle(t, null))) {
+                    if ((i = cs.length)) {
+                        while (--i > -1) {
+                            s[cs[i].replace(_camelExp, _camelFunc)] = cs.getPropertyValue(cs[i]);
+                        }
+                    } else { //Opera behaves differently - cs.length is always 0, so we must do a for...in loop.
+                        for (i in cs) {
+                            s[i] = cs[i];
+                        }
+                    }
+                } else if ((cs = t.currentStyle || t.style)) {
+                    for (i in cs) {
+                        if (typeof(i) === "string" && s[i] === undefined) {
+                            s[i.replace(_camelExp, _camelFunc)] = cs[i];
+                        }
+                    }
+                }
+                if (!_supportsOpacity) {
+                    s.opacity = _getIEOpacity(t);
+                }
+                tr = _getTransform(t, cs, false);
+                s.rotation = tr.rotation;
+                s.skewX = tr.skewX;
+                s.scaleX = tr.scaleX;
+                s.scaleY = tr.scaleY;
+                s.x = tr.x;
+                s.y = tr.y;
+                if (_supports3D) {
+                    s.z = tr.z;
+                    s.rotationX = tr.rotationX;
+                    s.rotationY = tr.rotationY;
+                    s.scaleZ = tr.scaleZ;
+                }
+                if (s.filters) {
+                    delete s.filters;
+                }
+                return s;
+            },
+
+            // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.
+            _cssDif = function(t, s1, s2, vars, forceLookup) {
+                var difs = {},
+                    style = t.style,
+                    val, p, mpt;
+                for (p in s2) {
+                    if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") {
+                        difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.
+                        if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes.
+                            mpt = new MiniPropTween(style, p, style[p], mpt);
+                        }
+                    }
+                }
+                if (vars) {
+                    for (p in vars) { //copy properties (except className)
+                        if (p !== "className") {
+                            difs[p] = vars[p];
+                        }
+                    }
+                }
+                return {difs:difs, firstMPT:mpt};
+            },
+            _dimensions = {width:["Left","Right"], height:["Top","Bottom"]},
+            _margins = ["marginLeft","marginRight","marginTop","marginBottom"],
+
+            /**
+             * @private Gets the width or height of an element
+             * @param {!Object} t Target element
+             * @param {!string} p Property name ("width" or "height")
+             * @param {Object=} cs Computed style object (if one exists). Just a speed optimization.
+             * @return {number} Dimension (in pixels)
+             */
+            _getDimension = function(t, p, cs) {
+                var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),
+                    a = _dimensions[p],
+                    i = a.length;
+                cs = cs || _getComputedStyle(t, null);
+                while (--i > -1) {
+                    v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0;
+                    v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;
+                }
+                return v;
+            },
+
+            // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)
+            _parsePosition = function(v, recObj) {
+                if (v == null || v === "" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".
+                    v = "0 0";
+                }
+                var a = v.split(" "),
+                    x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
+                    y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];
+                if (y == null) {
+                    y = "0";
+                } else if (y === "center") {
+                    y = "50%";
+                }
+                if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.
+                    x = "50%";
+                }
+                if (recObj) {
+                    recObj.oxp = (x.indexOf("%") !== -1);
+                    recObj.oyp = (y.indexOf("%") !== -1);
+                    recObj.oxr = (x.charAt(1) === "=");
+                    recObj.oyr = (y.charAt(1) === "=");
+                    recObj.ox = parseFloat(x.replace(_NaNExp, ""));
+                    recObj.oy = parseFloat(y.replace(_NaNExp, ""));
+                }
+                return x + " " + y + ((a.length > 2) ? " " + a[2] : "");
+            },
+
+            /**
+             * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!)
+             * @param {(number|string)} e End value which is typically a string, but could be a number
+             * @param {(number|string)} b Beginning value which is typically a string but could be a number
+             * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)
+             */
+            _parseChange = function(e, b) {
+                return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);
+            },
+
+            /**
+             * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.
+             * @param {Object} v Value to be parsed
+             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)
+             * @return {number} Parsed value
+             */
+            _parseVal = function(v, d) {
+                return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) + d : parseFloat(v);
+            },
+
+            /**
+             * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.
+             * @param {Object} v Value to be parsed
+             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)
+             * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY"
+             * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation.
+             * @return {number} parsed angle in radians
+             */
+            _parseAngle = function(v, d, p, directionalEnd) {
+                var min = 0.000001,
+                    cap, split, dif, result;
+                if (v == null) {
+                    result = d;
+                } else if (typeof(v) === "number") {
+                    result = v;
+                } else {
+                    cap = 360;
+                    split = v.split("_");
+                    dif = Number(split[0].replace(_NaNExp, "")) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - ((v.charAt(1) === "=") ? 0 : d);
+                    if (split.length) {
+                        if (directionalEnd) {
+                            directionalEnd[p] = d + dif;
+                        }
+                        if (v.indexOf("short") !== -1) {
+                            dif = dif % cap;
+                            if (dif !== dif % (cap / 2)) {
+                                dif = (dif < 0) ? dif + cap : dif - cap;
+                            }
+                        }
+                        if (v.indexOf("_cw") !== -1 && dif < 0) {
+                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
+                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {
+                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
+                        }
+                    }
+                    result = d + dif;
+                }
+                if (result < min && result > -min) {
+                    result = 0;
+                }
+                return result;
+            },
+
+            _colorLookup = {aqua:[0,255,255],
+                lime:[0,255,0],
+                silver:[192,192,192],
+                black:[0,0,0],
+                maroon:[128,0,0],
+                teal:[0,128,128],
+                blue:[0,0,255],
+                navy:[0,0,128],
+                white:[255,255,255],
+                fuchsia:[255,0,255],
+                olive:[128,128,0],
+                yellow:[255,255,0],
+                orange:[255,165,0],
+                gray:[128,128,128],
+                purple:[128,0,128],
+                green:[0,128,0],
+                red:[255,0,0],
+                pink:[255,192,203],
+                cyan:[0,255,255],
+                transparent:[255,255,255,0]},
+
+            _hue = function(h, m1, m2) {
+                h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;
+                return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;
+            },
+
+            /**
+             * @private Parses a color (like #9F0, #FF9900, or rgb(255,51,153)) into an array with 3 elements for red, green, and blue. Also handles rgba() values (splits into array of 4 elements of course)
+             * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.
+             * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order.
+             */
+            _parseColor = function(v) {
+                var c1, c2, c3, h, s, l;
+                if (!v || v === "") {
+                    return _colorLookup.black;
+                }
+                if (typeof(v) === "number") {
+                    return [v >> 16, (v >> 8) & 255, v & 255];
+                }
+                if (v.charAt(v.length - 1) === ",") { //sometimes a trailing commma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.
+                    v = v.substr(0, v.length - 1);
+                }
+                if (_colorLookup[v]) {
+                    return _colorLookup[v];
+                }
+                if (v.charAt(0) === "#") {
+                    if (v.length === 4) { //for shorthand like #9F0
+                        c1 = v.charAt(1),
+                        c2 = v.charAt(2),
+                        c3 = v.charAt(3);
+                        v = "#" + c1 + c1 + c2 + c2 + c3 + c3;
+                    }
+                    v = parseInt(v.substr(1), 16);
+                    return [v >> 16, (v >> 8) & 255, v & 255];
+                }
+                if (v.substr(0, 3) === "hsl") {
+                    v = v.match(_numExp);
+                    h = (Number(v[0]) % 360) / 360;
+                    s = Number(v[1]) / 100;
+                    l = Number(v[2]) / 100;
+                    c2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;
+                    c1 = l * 2 - c2;
+                    if (v.length > 3) {
+                        v[3] = Number(v[3]);
+                    }
+                    v[0] = _hue(h + 1 / 3, c1, c2);
+                    v[1] = _hue(h, c1, c2);
+                    v[2] = _hue(h - 1 / 3, c1, c2);
+                    return v;
+                }
+                v = v.match(_numExp) || _colorLookup.transparent;
+                v[0] = Number(v[0]);
+                v[1] = Number(v[1]);
+                v[2] = Number(v[2]);
+                if (v.length > 3) {
+                    v[3] = Number(v[3]);
+                }
+                return v;
+            },
+            _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.
+
+        for (p in _colorLookup) {
+            _colorExp += "|" + p + "\\b";
+        }
+        _colorExp = new RegExp(_colorExp+")", "gi");
+
+        /**
+         * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned.
+         * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned.
+         * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't.
+         * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc.
+         * @return {Function} formatter function
+         */
+        var _getFormatter = function(dflt, clr, collapsible, multi) {
+                if (dflt == null) {
+                    return function(v) {return v;};
+                }
+                var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "",
+                    dVals = dflt.split(dColor).join("").match(_valuesExp) || [],
+                    pfx = dflt.substr(0, dflt.indexOf(dVals[0])),
+                    sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "",
+                    delim = (dflt.indexOf(" ") !== -1) ? " " : ",",
+                    numVals = dVals.length,
+                    dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "",
+                    formatter;
+                if (!numVals) {
+                    return function(v) {return v;};
+                }
+                if (clr) {
+                    formatter = function(v) {
+                        var color, vals, i, a;
+                        if (typeof(v) === "number") {
+                            v += dSfx;
+                        } else if (multi && _commasOutsideParenExp.test(v)) {
+                            a = v.replace(_commasOutsideParenExp, "|").split("|");
+                            for (i = 0; i < a.length; i++) {
+                                a[i] = formatter(a[i]);
+                            }
+                            return a.join(",");
+                        }
+                        color = (v.match(_colorExp) || [dColor])[0];
+                        vals = v.split(color).join("").match(_valuesExp) || [];
+                        i = vals.length;
+                        if (numVals > i--) {
+                            while (++i < numVals) {
+                                vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
+                            }
+                        }
+                        return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : "");
+                    };
+                    return formatter;
+
+                }
+                formatter = function(v) {
+                    var vals, a, i;
+                    if (typeof(v) === "number") {
+                        v += dSfx;
+                    } else if (multi && _commasOutsideParenExp.test(v)) {
+                        a = v.replace(_commasOutsideParenExp, "|").split("|");
+                        for (i = 0; i < a.length; i++) {
+                            a[i] = formatter(a[i]);
+                        }
+                        return a.join(",");
+                    }
+                    vals = v.match(_valuesExp) || [];
+                    i = vals.length;
+                    if (numVals > i--) {
+                        while (++i < numVals) {
+                            vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];
+                        }
+                    }
+                    return pfx + vals.join(delim) + sfx;
+                };
+                return formatter;
+            },
+
+            /**
+             * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges.
+             * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft"
+             * @return {Function} a formatter function
+             */
+            _getEdgeParser = function(props) {
+                props = props.split(",");
+                return function(t, e, p, cssp, pt, plugin, vars) {
+                    var a = (e + "").split(" "),
+                        i;
+                    vars = {};
+                    for (i = 0; i < 4; i++) {
+                        vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)];
+                    }
+                    return cssp.parse(t, vars, pt, plugin);
+                };
+            },
+
+            // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens  which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.
+            _setPluginRatio = _internals._setPluginRatio = function(v) {
+                this.plugin.setRatio(v);
+                var d = this.data,
+                    proxy = d.proxy,
+                    mpt = d.firstMPT,
+                    min = 0.000001,
+                    val, pt, i, str;
+                while (mpt) {
+                    val = proxy[mpt.v];
+                    if (mpt.r) {
+                        val = Math.round(val);
+                    } else if (val < min && val > -min) {
+                        val = 0;
+                    }
+                    mpt.t[mpt.p] = val;
+                    mpt = mpt._next;
+                }
+                if (d.autoRotate) {
+                    d.autoRotate.rotation = proxy.rotation;
+                }
+                //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method.
+                if (v === 1) {
+                    mpt = d.firstMPT;
+                    while (mpt) {
+                        pt = mpt.t;
+                        if (!pt.type) {
+                            pt.e = pt.s + pt.xs0;
+                        } else if (pt.type === 1) {
+                            str = pt.xs0 + pt.s + pt.xs1;
+                            for (i = 1; i < pt.l; i++) {
+                                str += pt["xn"+i] + pt["xs"+(i+1)];
+                            }
+                            pt.e = str;
+                        }
+                        mpt = mpt._next;
+                    }
+                }
+            },
+
+            /**
+             * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value.
+             * @param {!Object} t target object whose property we're tweening (often a CSSPropTween)
+             * @param {!string} p property name
+             * @param {(number|string|object)} v value
+             * @param {MiniPropTween=} next next MiniPropTween in the linked list
+             * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer
+             */
+            MiniPropTween = function(t, p, v, next, r) {
+                this.t = t;
+                this.p = p;
+                this.v = v;
+                this.r = r;
+                if (next) {
+                    next._prev = this;
+                    this._next = next;
+                }
+            },
+
+            /**
+             * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element.
+             * This method returns an object that has the following properties:
+             *  - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin.  This is what we feed to the external _onInitTween() as the target
+             *  - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values
+             *  - firstMPT: the first MiniPropTween in the linked list
+             *  - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter.
+             * @param {!Object} t target object to be tweened
+             * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed
+             * @param {!CSSPlugin} cssp The CSSPlugin instance
+             * @param {CSSPropTween=} pt the next CSSPropTween in the linked list
+             * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values
+             * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter.
+             * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions)
+             */
+            _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) {
+                var bpt = pt,
+                    start = {},
+                    end = {},
+                    transform = cssp._transform,
+                    oldForce = _forcePT,
+                    i, p, xp, mpt, firstPT;
+                cssp._transform = null;
+                _forcePT = vars;
+                pt = firstPT = cssp.parse(t, vars, pt, plugin);
+                _forcePT = oldForce;
+                //break off from the linked list so the new ones are isolated.
+                if (shallow) {
+                    cssp._transform = transform;
+                    if (bpt) {
+                        bpt._prev = null;
+                        if (bpt._prev) {
+                            bpt._prev._next = null;
+                        }
+                    }
+                }
+                while (pt && pt !== bpt) {
+                    if (pt.type <= 1) {
+                        p = pt.p;
+                        end[p] = pt.s + pt.c;
+                        start[p] = pt.s;
+                        if (!shallow) {
+                            mpt = new MiniPropTween(pt, "s", p, mpt, pt.r);
+                            pt.c = 0;
+                        }
+                        if (pt.type === 1) {
+                            i = pt.l;
+                            while (--i > 0) {
+                                xp = "xn" + i;
+                                p = pt.p + "_" + xp;
+                                end[p] = pt.data[xp];
+                                start[p] = pt[xp];
+                                if (!shallow) {
+                                    mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]);
+                                }
+                            }
+                        }
+                    }
+                    pt = pt._next;
+                }
+                return {proxy:start, end:end, firstMPT:mpt, pt:firstPT};
+            },
+
+
+
+            /**
+             * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory.
+             * CSSPropTweens have the following optional properties as well (not defined through the constructor):
+             *  - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc.
+             *  - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list)
+             *  - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request.
+             *  - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target.
+             *  - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible.
+             * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything.
+             * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width".
+             * @param {number} s Starting numeric value
+             * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95.
+             * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it.
+             * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update.
+             * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip"
+             * @param {boolean=} r If true, the value(s) should be rounded
+             * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0.
+             * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues.
+             * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues.
+             */
+            CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) {
+                this.t = t; //target
+                this.p = p; //property
+                this.s = s; //starting value
+                this.c = c; //change value
+                this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at)
+                if (!(t instanceof CSSPropTween)) {
+                    _overwriteProps.push(this.n);
+                }
+                this.r = r; //round (boolean)
+                this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work
+                if (pr) {
+                    this.pr = pr;
+                    _hasPriority = true;
+                }
+                this.b = (b === undefined) ? s : b;
+                this.e = (e === undefined) ? s + c : e;
+                if (next) {
+                    this._next = next;
+                    next._prev = this;
+                }
+            },
+
+            /**
+             * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example:
+             * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt);
+             * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio().
+             * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method.
+             *
+             * @param {!Object} t Target whose property will be tweened
+             * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow")
+             * @param {string} b Beginning value
+             * @param {string} e Ending value
+             * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization)
+             * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match
+             * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this).
+             * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0.
+             * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300}
+             * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here.
+             * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call.
+             */
+            _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) {
+                //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e);
+                b = b || dflt || "";
+                pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);
+                e += ""; //ensures it's a string
+                var ba = b.split(", ").join(",").split(" "), //beginning array
+                    ea = e.split(", ").join(",").split(" "), //ending array
+                    l = ba.length,
+                    autoRound = (_autoRound !== false),
+                    i, xi, ni, bv, ev, bnums, enums, bn, rgba, temp, cv, str;
+                if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {
+                    ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
+                    ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");
+                    l = ba.length;
+                }
+                if (l !== ea.length) {
+                    //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");
+                    ba = (dflt || "").split(" ");
+                    l = ba.length;
+                }
+                pt.plugin = plugin;
+                pt.setRatio = setRatio;
+                for (i = 0; i < l; i++) {
+                    bv = ba[i];
+                    ev = ea[i];
+                    bn = parseFloat(bv);
+
+                    //if the value begins with a number (most common). It's fine if it has a suffix like px
+                    if (bn || bn === 0) {
+                        pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);
+
+                    //if the value is a color
+                    } else if (clrs && (bv.charAt(0) === "#" || _colorLookup[bv] || _rgbhslExp.test(bv))) {
+                        str = ev.charAt(ev.length - 1) === "," ? ")," : ")"; //if there's a comma at the end, retain it.
+                        bv = _parseColor(bv);
+                        ev = _parseColor(ev);
+                        rgba = (bv.length + ev.length > 6);
+                        if (rgba && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color
+                            pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";
+                            pt.e = pt.e.split(ea[i]).join("transparent");
+                        } else {
+                            if (!_supportsOpacity) { //old versions of IE don't support rgba().
+                                rgba = false;
+                            }
+                            pt.appendXtra((rgba ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)
+                                .appendXtra("", bv[1], ev[1] - bv[1], ",", true)
+                                .appendXtra("", bv[2], ev[2] - bv[2], (rgba ? "," : str), true);
+                            if (rgba) {
+                                bv = (bv.length < 4) ? 1 : bv[3];
+                                pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false);
+                            }
+                        }
+
+                    } else {
+                        bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array
+
+                        //if no number is found, treat it as a non-tweening value and just append the string to the current xs.
+                        if (!bnums) {
+                            pt["xs" + pt.l] += pt.l ? " " + bv : bv;
+
+                        //loop through all the numbers that are found and construct the extra values on the pt.
+                        } else {
+                            enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5
+                            if (!enums || enums.length !== bnums.length) {
+                                //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");
+                                return pt;
+                            }
+                            ni = 0;
+                            for (xi = 0; xi < bnums.length; xi++) {
+                                cv = bnums[xi];
+                                temp = bv.indexOf(cv, ni);
+                                pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0));
+                                ni = temp + cv.length;
+                            }
+                            pt["xs" + pt.l] += bv.substr(ni);
+                        }
+                    }
+                }
+                //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly.
+                if (e.indexOf("=") !== -1) if (pt.data) {
+                    str = pt.xs0 + pt.data.s;
+                    for (i = 1; i < pt.l; i++) {
+                        str += pt["xs" + i] + pt.data["xn" + i];
+                    }
+                    pt.e = str + pt["xs" + i];
+                }
+                if (!pt.l) {
+                    pt.type = -1;
+                    pt.xs0 = pt.e;
+                }
+                return pt.xfirst || pt;
+            },
+            i = 9;
+
+
+        p = CSSPropTween.prototype;
+        p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc.
+        while (--i > 0) {
+            p["xn" + i] = 0;
+            p["xs" + i] = "";
+        }
+        p.xs0 = "";
+        p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null;
+
+
+        /**
+         * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this:
+         * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)"
+         * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method).
+         * @param {string=} pfx Prefix (if any)
+         * @param {!number} s Starting value
+         * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95.
+         * @param {string=} sfx Suffix (if any)
+         * @param {boolean=} r Round (if true).
+         * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space.
+         * @return {CSSPropTween} returns itself so that multiple methods can be chained together.
+         */
+        p.appendXtra = function(pfx, s, c, sfx, r, pad) {
+            var pt = this,
+                l = pt.l;
+            pt["xs" + l] += (pad && l) ? " " + pfx : pfx || "";
+            if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value!
+                pt["xs" + l] += s + (sfx || "");
+                return pt;
+            }
+            pt.l++;
+            pt.type = pt.setRatio ? 2 : 1;
+            pt["xs" + pt.l] = sfx || "";
+            if (l > 0) {
+                pt.data["xn" + l] = s + c;
+                pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method)
+                pt["xn" + l] = s;
+                if (!pt.plugin) {
+                    pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr);
+                    pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly.
+                }
+                return pt;
+            }
+            pt.data = {s:s + c};
+            pt.rxp = {};
+            pt.s = s;
+            pt.c = c;
+            pt.r = r;
+            return pt;
+        };
+
+        /**
+         * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly.
+         * @param {!string} p Property name (like "boxShadow" or "throwProps")
+         * @param {Object=} options An object containing any of the following configuration options:
+         *                      - defaultValue: the default value
+         *                      - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker)
+         *                      - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.)
+         *                      - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O)
+         *                      - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc.
+         *                      - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0.
+         *                      - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out.
+         *                      - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc.
+         *                      - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default).
+         */
+        var SpecialProp = function(p, options) {
+                options = options || {};
+                this.p = options.prefix ? _checkPropPrefix(p) || p : p;
+                _specialProps[p] = _specialProps[this.p] = this;
+                this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi);
+                if (options.parser) {
+                    this.parse = options.parser;
+                }
+                this.clrs = options.color;
+                this.multi = options.multi;
+                this.keyword = options.keyword;
+                this.dflt = options.defaultValue;
+                this.pr = options.priority || 0;
+            },
+
+            //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin.
+            _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) {
+                if (typeof(options) !== "object") {
+                    options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin
+                }
+                var a = p.split(","),
+                    d = options.defaultValue,
+                    i, temp;
+                defaults = defaults || [d];
+                for (i = 0; i < a.length; i++) {
+                    options.prefix = (i === 0 && options.prefix);
+                    options.defaultValue = defaults[i] || d;
+                    temp = new SpecialProp(a[i], options);
+                }
+            },
+
+            //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file.
+            _registerPluginProp = function(p) {
+                if (!_specialProps[p]) {
+                    var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin";
+                    _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) {
+                        var pluginClass = (window.GreenSockGlobals || window).com.greensock.plugins[pluginName];
+                        if (!pluginClass) {
+                            _log("Error: " + pluginName + " js file not loaded.");
+                            return pt;
+                        }
+                        pluginClass._cssRegister();
+                        return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars);
+                    }});
+                }
+            };
+
+
+        p = SpecialProp.prototype;
+
+        /**
+         * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list)
+         * @param {!Object} t target element
+         * @param {(string|number|object)} b beginning value
+         * @param {(string|number|object)} e ending (destination) value
+         * @param {CSSPropTween=} pt next CSSPropTween in the linked list
+         * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here.
+         * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here.
+         * @return {CSSPropTween=} First CSSPropTween in the linked list
+         */
+        p.parseComplex = function(t, b, e, pt, plugin, setRatio) {
+            var kwd = this.keyword,
+                i, ba, ea, l, bi, ei;
+            //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example)
+            if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) {
+                ba = b.replace(_commasOutsideParenExp, "|").split("|");
+                ea = e.replace(_commasOutsideParenExp, "|").split("|");
+            } else if (kwd) {
+                ba = [b];
+                ea = [e];
+            }
+            if (ea) {
+                l = (ea.length > ba.length) ? ea.length : ba.length;
+                for (i = 0; i < l; i++) {
+                    b = ba[i] = ba[i] || this.dflt;
+                    e = ea[i] = ea[i] || this.dflt;
+                    if (kwd) {
+                        bi = b.indexOf(kwd);
+                        ei = e.indexOf(kwd);
+                        if (bi !== ei) {
+                            e = (ei === -1) ? ea : ba;
+                            e[i] += " " + kwd;
+                        }
+                    }
+                }
+                b = ba.join(", ");
+                e = ea.join(", ");
+            }
+            return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio);
+        };
+
+        /**
+         * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call:
+         * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this);
+         * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that).
+         * @param {!Object} t Target object whose property is being tweened
+         * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object).
+         * @param {!string} p Property name
+         * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween.
+         * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it)
+         * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance.
+         * @param {Object=} vars Original vars object that contains the data for parsing.
+         * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call.
+         */
+        p.parse = function(t, e, p, cssp, pt, plugin, vars) {
+            return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin);
+        };
+
+        /**
+         * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters:
+         *  1) Target object whose property should be tweened (typically a DOM element)
+         *  2) The end/destination value (could be a string, number, object, or whatever you want)
+         *  3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration)
+         *
+         * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example:
+         *
+         * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) {
+         *      var start = target.style.width;
+         *      return function(ratio) {
+         *              target.style.width = (start + value * ratio) + "px";
+         *              console.log("set width to " + target.style.width);
+         *          }
+         * }, 0);
+         *
+         * Then, when I do this tween, it will trigger my special property:
+         *
+         * TweenLite.to(element, 1, {css:{myCustomProp:100}});
+         *
+         * In the example, of course, we're just changing the width, but you can do anything you want.
+         *
+         * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}})
+         * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function.
+         * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones.
+         */
+        CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) {
+            _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) {
+                var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority);
+                rv.plugin = plugin;
+                rv.setRatio = onInitTween(t, e, cssp._tween, p);
+                return rv;
+            }, priority:priority});
+        };
+
+
+
+
+
+
+
+
+        //transform-related methods and properties
+        var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective").split(","),
+            _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.
+            _transformPropCSS = _prefixCSS + "transform",
+            _transformOriginProp = _checkPropPrefix("transformOrigin"),
+            _supports3D = (_checkPropPrefix("perspective") !== null),
+            Transform = _internals.Transform = function() {
+                this.skewY = 0;
+            },
+
+            /**
+             * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.
+             * @param {!Object} t target element
+             * @param {Object=} cs computed style object (optional)
+             * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...}
+             * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style)
+             * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...}
+             */
+            _getTransform = _internals.getTransform = function(t, cs, rec, parse) {
+                if (t._gsTransform && rec && !parse) {
+                    return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things.
+                }
+                var tm = rec ? t._gsTransform || new Transform() : new Transform(),
+                    invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.
+                    min = 0.00002,
+                    rnd = 100000,
+                    minAngle = 179.99,
+                    minPI = minAngle * _DEG2RAD,
+                    zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin  || 0 : 0,
+                    s, m, i, n, dec, scaleX, scaleY, rotation, skewX, difX, difY, difR, difS;
+                if (_transformProp) {
+                    s = _getStyle(t, _transformPropCSS, cs, true);
+                } else if (t.currentStyle) {
+                    //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix.
+                    s = t.currentStyle.filter.match(_ieGetMatrixExp);
+                    s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";
+                }
+                //split the matrix values out into an array (m for matrix)
+                m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || [];
+                i = m.length;
+                while (--i > -1) {
+                    n = Number(m[i]);
+                    m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).
+                }
+                if (m.length === 16) {
+
+                    //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)
+                    var a13 = m[8], a23 = m[9], a33 = m[10],
+                        a14 = m[12], a24 = m[13], a34 = m[14];
+
+                    //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari
+                    if (tm.zOrigin) {
+                        a34 = -tm.zOrigin;
+                        a14 = a13*a34-m[12];
+                        a24 = a23*a34-m[13];
+                        a34 = a33*a34+tm.zOrigin-m[14];
+                    }
+
+                    //only parse from the matrix if we MUST because not only is it usually unnecessary due to the fact that we store the values in the _gsTransform object, but also because it's impossible to accurately interpret rotationX, rotationY, rotationZ, scaleX, and scaleY if all are applied, so it's much better to rely on what we store. However, we must parse the first time that an object is tweened. We also assume that if the position has changed, the user must have done some styling changes outside of CSSPlugin, thus we force a parse in that scenario.
+                    if (!rec || parse || tm.rotationX == null) {
+                        var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],
+                            a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],
+                            a43 = m[11],
+                            angle = Math.atan2(a32, a33),
+                            xFlip = (angle < -minPI || angle > minPI),
+                            t1, t2, t3, cos, sin, yFlip, zFlip;
+                        tm.rotationX = angle * _RAD2DEG;
+                        //rotationX
+                        if (angle) {
+                            cos = Math.cos(-angle);
+                            sin = Math.sin(-angle);
+                            t1 = a12*cos+a13*sin;
+                            t2 = a22*cos+a23*sin;
+                            t3 = a32*cos+a33*sin;
+                            a13 = a12*-sin+a13*cos;
+                            a23 = a22*-sin+a23*cos;
+                            a33 = a32*-sin+a33*cos;
+                            a43 = a42*-sin+a43*cos;
+                            a12 = t1;
+                            a22 = t2;
+                            a32 = t3;
+                        }
+                        //rotationY
+                        angle = Math.atan2(a13, a11);
+                        tm.rotationY = angle * _RAD2DEG;
+                        if (angle) {
+                            yFlip = (angle < -minPI || angle > minPI);
+                            cos = Math.cos(-angle);
+                            sin = Math.sin(-angle);
+                            t1 = a11*cos-a13*sin;
+                            t2 = a21*cos-a23*sin;
+                            t3 = a31*cos-a33*sin;
+                            a23 = a21*sin+a23*cos;
+                            a33 = a31*sin+a33*cos;
+                            a43 = a41*sin+a43*cos;
+                            a11 = t1;
+                            a21 = t2;
+                            a31 = t3;
+                        }
+                        //rotationZ
+                        angle = Math.atan2(a21, a22);
+                        tm.rotation = angle * _RAD2DEG;
+                        if (angle) {
+                            zFlip = (angle < -minPI || angle > minPI);
+                            cos = Math.cos(-angle);
+                            sin = Math.sin(-angle);
+                            a11 = a11*cos+a12*sin;
+                            t2 = a21*cos+a22*sin;
+                            a22 = a21*-sin+a22*cos;
+                            a32 = a31*-sin+a32*cos;
+                            a21 = t2;
+                        }
+
+                        if (zFlip && xFlip) {
+                            tm.rotation = tm.rotationX = 0;
+                        } else if (zFlip && yFlip) {
+                            tm.rotation = tm.rotationY = 0;
+                        } else if (yFlip && xFlip) {
+                            tm.rotationY = tm.rotationX = 0;
+                        }
+
+                        tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
+                        tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd;
+                        tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd;
+                        tm.skewX = 0;
+                        tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;
+                        tm.x = a14;
+                        tm.y = a24;
+                        tm.z = a34;
+                    }
+
+                } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY)) && !(tm.x !== undefined && _getStyle(t, "display", cs) === "none")) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.
+                    var k = (m.length >= 6),
+                        a = k ? m[0] : 1,
+                        b = m[1] || 0,
+                        c = m[2] || 0,
+                        d = k ? m[3] : 1;
+                    tm.x = m[4] || 0;
+                    tm.y = m[5] || 0;
+                    scaleX = Math.sqrt(a * a + b * b);
+                    scaleY = Math.sqrt(d * d + c * c);
+                    rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).
+                    skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;
+                    difX = scaleX - Math.abs(tm.scaleX || 0);
+                    difY = scaleY - Math.abs(tm.scaleY || 0);
+                    if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {
+                        if (invX) {
+                            scaleX *= -1;
+                            skewX += (rotation <= 0) ? 180 : -180;
+                            rotation += (rotation <= 0) ? 180 : -180;
+                        } else {
+                            scaleY *= -1;
+                            skewX += (skewX <= 0) ? 180 : -180;
+                        }
+                    }
+                    difR = (rotation - tm.rotation) % 180; //note: matching ranges would be very small (+/-0.0001) or very close to 180.
+                    difS = (skewX - tm.skewX) % 180;
+                    //if there's already a recorded _gsTransform in place for the target, we should leave those values in place unless we know things changed for sure (beyond a super small amount). This gets around ambiguous interpretations, like if scaleX and scaleY are both -1, the matrix would be the same as if the rotation was 180 with normal scaleX/scaleY. If the user tweened to particular values, those must be prioritized to ensure animation is consistent.
+                    if (tm.skewX === undefined || difX > min || difX < -min || difY > min || difY < -min || (difR > -minAngle && difR < minAngle && (difR * rnd) | 0 !== 0) || (difS > -minAngle && difS < minAngle && (difS * rnd) | 0 !== 0)) {
+                        tm.scaleX = scaleX;
+                        tm.scaleY = scaleY;
+                        tm.rotation = rotation;
+                        tm.skewX = skewX;
+                    }
+                    if (_supports3D) {
+                        tm.rotationX = tm.rotationY = tm.z = 0;
+                        tm.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;
+                        tm.scaleZ = 1;
+                    }
+                }
+                tm.zOrigin = zOrigin;
+
+                //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.
+                for (i in tm) {
+                    if (tm[i] < min) if (tm[i] > -min) {
+                        tm[i] = 0;
+                    }
+                }
+                //DEBUG: _log("parsed rotation: "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);
+                if (rec) {
+                    t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
+                }
+                return tm;
+            },
+
+            //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms)
+            _setIETransformRatio = function(v) {
+                var t = this.data, //refers to the element's _gsTransform object
+                    ang = -t.rotation * _DEG2RAD,
+                    skew = ang + t.skewX * _DEG2RAD,
+                    rnd = 100000,
+                    a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd,
+                    b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd,
+                    c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd,
+                    d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd,
+                    style = this.t.style,
+                    cs = this.t.currentStyle,
+                    filters, val;
+                if (!cs) {
+                    return;
+                }
+                val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted)
+                b = -c;
+                c = -val;
+                filters = cs.filter;
+                style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight
+                var w = this.t.offsetWidth,
+                    h = this.t.offsetHeight,
+                    clip = (cs.position !== "absolute"),
+                    m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d,
+                    ox = t.x,
+                    oy = t.y,
+                    dx, dy;
+
+                //if transformOrigin is being used, adjust the offset x and y
+                if (t.ox != null) {
+                    dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2;
+                    dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2;
+                    ox += dx - (dx * a + dy * b);
+                    oy += dy - (dx * c + dy * d);
+                }
+
+                if (!clip) {
+                    m += ", sizingMethod='auto expand')";
+                } else {
+                    dx = (w / 2);
+                    dy = (h / 2);
+                    //translate to ensure that transformations occur around the correct origin (default is center).
+                    m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")";
+                }
+                if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) {
+                    style.filter = filters.replace(_ieSetMatrixExp, m);
+                } else {
+                    style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha.
+                }
+
+                //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance.
+                if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) {
+                    style.removeAttribute("filter");
+                }
+
+                //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration).
+                if (!clip) {
+                    var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom
+                        marg, prop, dif;
+                    dx = t.ieOffsetX || 0;
+                    dy = t.ieOffsetY || 0;
+                    t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox);
+                    t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy);
+                    for (i = 0; i < 4; i++) {
+                        prop = _margins[i];
+                        marg = cs[prop];
+                        //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes)
+                        val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0;
+                        if (val !== t[prop]) {
+                            dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible.
+                        } else {
+                            dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY;
+                        }
+                        style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px";
+                    }
+                }
+            },
+
+            _set3DTransformRatio = _internals.set3DTransformRatio = function(v) {
+                var t = this.data, //refers to the element's _gsTransform object
+                    style = this.t.style,
+                    angle = t.rotation * _DEG2RAD,
+                    sx = t.scaleX,
+                    sy = t.scaleY,
+                    sz = t.scaleZ,
+                    perspective = t.perspective,
+                    a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43,
+                    zOrigin, rnd, cos, sin, t1, t2, t3, t4;
+                if (v === 1 || v === 0) if (t.force3D === "auto") if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !t.z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices
+                    _set2DTransformRatio.call(this, v);
+                    return;
+                }
+                if (_isFirefox) {
+                    var n = 0.0001;
+                    if (sx < n && sx > -n) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.
+                        sx = sz = 0.00002;
+                    }
+                    if (sy < n && sy > -n) {
+                        sy = sz = 0.00002;
+                    }
+                    if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).
+                        perspective = 0;
+                    }
+                }
+                if (angle || t.skewX) {
+                    cos = Math.cos(angle);
+                    sin = Math.sin(angle);
+                    a11 = cos;
+                    a21 = sin;
+                    if (t.skewX) {
+                        angle -= t.skewX * _DEG2RAD;
+                        cos = Math.cos(angle);
+                        sin = Math.sin(angle);
+                        if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does
+                            t1 = Math.tan(t.skewX * _DEG2RAD);
+                            t1 = Math.sqrt(1 + t1 * t1);
+                            cos *= t1;
+                            sin *= t1;
+                        }
+                    }
+                    a12 = -sin;
+                    a22 = cos;
+
+                } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective) { //if we're only translating and/or 2D scaling, this is faster...
+                    style[_transformProp] = "translate3d(" + t.x + "px," + t.y + "px," + t.z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");
+                    return;
+                } else {
+                    a11 = a22 = 1;
+                    a12 = a21 = 0;
+                }
+                a33 = 1;
+                a13 = a14 = a23 = a24 = a31 = a32 = a34 = a41 = a42 = 0;
+                a43 = (perspective) ? -1 / perspective : 0;
+                zOrigin = t.zOrigin;
+                rnd = 100000;
+                angle = t.rotationY * _DEG2RAD;
+                if (angle) {
+                    cos = Math.cos(angle);
+                    sin = Math.sin(angle);
+                    a31 = a33*-sin;
+                    a41 = a43*-sin;
+                    a13 = a11*sin;
+                    a23 = a21*sin;
+                    a33 *= cos;
+                    a43 *= cos;
+                    a11 *= cos;
+                    a21 *= cos;
+                }
+                angle = t.rotationX * _DEG2RAD;
+                if (angle) {
+                    cos = Math.cos(angle);
+                    sin = Math.sin(angle);
+                    t1 = a12*cos+a13*sin;
+                    t2 = a22*cos+a23*sin;
+                    t3 = a32*cos+a33*sin;
+                    t4 = a42*cos+a43*sin;
+                    a13 = a12*-sin+a13*cos;
+                    a23 = a22*-sin+a23*cos;
+                    a33 = a32*-sin+a33*cos;
+                    a43 = a42*-sin+a43*cos;
+                    a12 = t1;
+                    a22 = t2;
+                    a32 = t3;
+                    a42 = t4;
+                }
+                if (sz !== 1) {
+                    a13*=sz;
+                    a23*=sz;
+                    a33*=sz;
+                    a43*=sz;
+                }
+                if (sy !== 1) {
+                    a12*=sy;
+                    a22*=sy;
+                    a32*=sy;
+                    a42*=sy;
+                }
+                if (sx !== 1) {
+                    a11*=sx;
+                    a21*=sx;
+                    a31*=sx;
+                    a41*=sx;
+                }
+                if (zOrigin) {
+                    a34 -= zOrigin;
+                    a14 = a13*a34;
+                    a24 = a23*a34;
+                    a34 = a33*a34+zOrigin;
+                }
+                //we round the x, y, and z slightly differently to allow even larger values.
+                a14 = (t1 = (a14 += t.x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;
+                a24 = (t1 = (a24 += t.y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;
+                a34 = (t1 = (a34 += t.z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;
+                style[_transformProp] = "matrix3d(" + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";
+            },
+
+            _set2DTransformRatio = _internals.set2DTransformRatio = function(v) {
+                var t = this.data, //refers to the element's _gsTransform object
+                    targ = this.t,
+                    style = targ.style,
+                    ang, skew, rnd, sx, sy;
+                if (t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.
+                    this.setRatio = _set3DTransformRatio;
+                    _set3DTransformRatio.call(this, v);
+                    return;
+                }
+                if (!t.rotation && !t.skewX) {
+                    style[_transformProp] = "matrix(" + t.scaleX + ",0,0," + t.scaleY + "," + t.x + "," + t.y + ")";
+                } else {
+                    ang = t.rotation * _DEG2RAD;
+                    skew = ang - t.skewX * _DEG2RAD;
+                    rnd = 100000;
+                    sx = t.scaleX * rnd;
+                    sy = t.scaleY * rnd;
+                    //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.
+                    style[_transformProp] = "matrix(" + (((Math.cos(ang) * sx) | 0) / rnd) + "," + (((Math.sin(ang) * sx) | 0) / rnd) + "," + (((Math.sin(skew) * -sy) | 0) / rnd) + "," + (((Math.cos(skew) * sy) | 0) / rnd) + "," + t.x + "," + t.y + ")";
+                }
+            };
+
+        _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType", {parser:function(t, e, p, cssp, pt, plugin, vars) {
+            if (cssp._transform) { return pt; } //only need to parse the transform once, and only if the browser supports it.
+            var m1 = cssp._transform = _getTransform(t, _cs, true, vars.parseTransform),
+                style = t.style,
+                min = 0.000001,
+                i = _transformProps.length,
+                v = vars,
+                endRotations = {},
+                m2, skewY, copy, orig, has3D, hasChange, dr;
+            if (typeof(v.transform) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"
+                copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.
+                copy[_transformProp] = v.transform;
+                copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.
+                copy.position = "absolute";
+                _doc.body.appendChild(_tempDiv);
+                m2 = _getTransform(_tempDiv, null, false);
+                _doc.body.removeChild(_tempDiv);
+            } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object)
+                m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX),
+                    scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY),
+                    scaleZ:_parseVal(v.scaleZ, m1.scaleZ),
+                    x:_parseVal(v.x, m1.x),
+                    y:_parseVal(v.y, m1.y),
+                    z:_parseVal(v.z, m1.z),
+                    perspective:_parseVal(v.transformPerspective, m1.perspective)};
+                dr = v.directionalRotation;
+                if (dr != null) {
+                    if (typeof(dr) === "object") {
+                        for (copy in dr) {
+                            v[copy] = dr[copy];
+                        }
+                    } else {
+                        v.rotation = dr;
+                    }
+                }
+                m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);
+                if (_supports3D) {
+                    m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);
+                    m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);
+                }
+                m2.skewX = (v.skewX == null) ? m1.skewX : _parseAngle(v.skewX, m1.skewX);
+
+                //note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.
+                m2.skewY = (v.skewY == null) ? m1.skewY : _parseAngle(v.skewY, m1.skewY);
+                if ((skewY = m2.skewY - m1.skewY)) {
+                    m2.skewX += skewY;
+                    m2.rotation += skewY;
+                }
+            }
+
+            if (_supports3D && v.force3D != null) {
+                m1.force3D = v.force3D;
+                hasChange = true;
+            }
+
+            m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;
+
+            has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);
+            if (!has3D && v.scale != null) {
+                m2.scaleZ = 1; //no need to tween scaleZ.
+            }
+
+            while (--i > -1) {
+                p = _transformProps[i];
+                orig = m2[p] - m1[p];
+                if (orig > min || orig < -min || _forcePT[p] != null) {
+                    hasChange = true;
+                    pt = new CSSPropTween(m1, p, m1[p], orig, pt);
+                    if (p in endRotations) {
+                        pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested
+                    }
+                    pt.xs0 = 0; //ensures the value stays numeric in setRatio()
+                    pt.plugin = plugin;
+                    cssp._overwriteProps.push(pt.n);
+                }
+            }
+
+            orig = v.transformOrigin;
+            if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).
+                if (_transformProp) {
+                    hasChange = true;
+                    p = _transformOriginProp;
+                    orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors
+                    pt = new CSSPropTween(style, p, 0, 0, pt, -1, "transformOrigin");
+                    pt.b = style[p];
+                    pt.plugin = plugin;
+                    if (_supports3D) {
+                        copy = m1.zOrigin;
+                        orig = orig.split(" ");
+                        m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.
+                        pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!
+                        pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)
+                        pt.b = copy;
+                        pt.xs0 = pt.e = m1.zOrigin;
+                    } else {
+                        pt.xs0 = pt.e = orig;
+                    }
+
+                //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).
+                } else {
+                    _parsePosition(orig + "", m1);
+                }
+            }
+
+            if (hasChange) {
+                cssp._transformType = (has3D || this._transformType === 3) ? 3 : 2; //quicker than calling cssp._enableTransforms();
+            }
+            return pt;
+        }, prefix:true});
+
+        _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});
+
+        _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {
+            e = this.format(e);
+            var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],
+                style = t.style,
+                ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em;
+            w = parseFloat(t.offsetWidth);
+            h = parseFloat(t.offsetHeight);
+            ea1 = e.split(" ");
+            for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis!
+                if (this.p.indexOf("border")) { //older browsers used a prefix
+                    props[i] = _checkPropPrefix(props[i]);
+                }
+                bs = bs2 = _getStyle(t, props[i], _cs, false, "0px");
+                if (bs.indexOf(" ") !== -1) {
+                    bs2 = bs.split(" ");
+                    bs = bs2[0];
+                    bs2 = bs2[1];
+                }
+                es = es2 = ea1[i];
+                bn = parseFloat(bs);
+                bsfx = bs.substr((bn + "").length);
+                rel = (es.charAt(1) === "=");
+                if (rel) {
+                    en = parseInt(es.charAt(0)+"1", 10);
+                    es = es.substr(2);
+                    en *= parseFloat(es);
+                    esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || "";
+                } else {
+                    en = parseFloat(es);
+                    esfx = es.substr((en + "").length);
+                }
+                if (esfx === "") {
+                    esfx = _suffixMap[p] || bsfx;
+                }
+                if (esfx !== bsfx) {
+                    hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent.
+                    vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number
+                    if (esfx === "%") {
+                        bs = (hn / w * 100) + "%";
+                        bs2 = (vn / h * 100) + "%";
+                    } else if (esfx === "em") {
+                        em = _convertToPixels(t, "borderLeft", 1, "em");
+                        bs = (hn / em) + "em";
+                        bs2 = (vn / em) + "em";
+                    } else {
+                        bs = hn + "px";
+                        bs2 = vn + "px";
+                    }
+                    if (rel) {
+                        es = (parseFloat(bs) + en) + esfx;
+                        es2 = (parseFloat(bs2) + en) + esfx;
+                    }
+                }
+                pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt);
+            }
+            return pt;
+        }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)});
+        _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) {
+            var bp = "background-position",
+                cs = (_cs || _getComputedStyle(t, null)),
+                bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase
+                es = this.format(e),
+                ba, ea, i, pct, overlap, src;
+            if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) {
+                src = _getStyle(t, "backgroundImage").replace(_urlExp, "");
+                if (src && src !== "none") {
+                    ba = bs.split(" ");
+                    ea = es.split(" ");
+                    _tempImg.setAttribute("src", src); //set the temp <img>'s src to the background-image so that we can measure its width/height
+                    i = 2;
+                    while (--i > -1) {
+                        bs = ba[i];
+                        pct = (bs.indexOf("%") !== -1);
+                        if (pct !== (ea[i].indexOf("%") !== -1)) {
+                            overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height;
+                            ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%";
+                        }
+                    }
+                    bs = ba.join(" ");
+                }
+            }
+            return this.parseComplex(t.style, bs, es, pt, plugin);
+        }, formatter:_parsePosition});
+        _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:_parsePosition});
+        _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});
+        _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});
+        _registerComplexSpecialProp("transformStyle", {prefix:true});
+        _registerComplexSpecialProp("backfaceVisibility", {prefix:true});
+        _registerComplexSpecialProp("userSelect", {prefix:true});
+        _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")});
+        _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")});
+        _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){
+            var b, cs, delim;
+            if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited.
+                cs = t.currentStyle;
+                delim = _ieVers < 8 ? " " : ",";
+                b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")";
+                e = this.format(e).split(",").join(delim);
+            } else {
+                b = this.format(_getStyle(t, this.p, _cs, false, this.dflt));
+                e = this.format(e);
+            }
+            return this.parseComplex(t.style, b, e, pt, plugin);
+        }});
+        _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true});
+        _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them)
+        _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) {
+                return this.parseComplex(t.style, this.format(_getStyle(t, "borderTopWidth", _cs, false, "0px") + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), this.format(e), pt, plugin);
+            }, color:true, formatter:function(v) {
+                var a = v.split(" ");
+                return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0];
+            }});
+        _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline).
+        _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) {
+            var s = t.style,
+                prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat";
+            return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e);
+        }});
+
+        //opacity-related
+        var _setIEOpacityRatio = function(v) {
+                var t = this.t, //refers to the element's style property
+                    filters = t.filter || _getStyle(this.data, "filter"),
+                    val = (this.s + this.c * v) | 0,
+                    skip;
+                if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.
+                    if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) {
+                        t.removeAttribute("filter");
+                        skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check.
+                    } else {
+                        t.filter = filters.replace(_alphaFilterExp, "");
+                        skip = true;
+                    }
+                }
+                if (!skip) {
+                    if (this.xn1) {
+                        t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame.
+                    }
+                    if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues
+                        if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween)
+                            t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly.
+                        }
+                    } else {
+                        t.filter = filters.replace(_opacityExp, "opacity=" + val);
+                    }
+                }
+            };
+        _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) {
+            var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")),
+                style = t.style,
+                isAutoAlpha = (p === "autoAlpha");
+            if (typeof(e) === "string" && e.charAt(1) === "=") {
+                e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b;
+            }
+            if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)
+                b = 0;
+            }
+            if (_supportsOpacity) {
+                pt = new CSSPropTween(style, "opacity", b, e - b, pt);
+            } else {
+                pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt);
+                pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug.
+                style.zoom = 1; //helps correct an IE issue.
+                pt.type = 2;
+                pt.b = "alpha(opacity=" + pt.s + ")";
+                pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")";
+                pt.data = t;
+                pt.plugin = plugin;
+                pt.setRatio = _setIEOpacityRatio;
+            }
+            if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier
+                pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));
+                pt.xs0 = "inherit";
+                cssp._overwriteProps.push(pt.n);
+                cssp._overwriteProps.push(p);
+            }
+            return pt;
+        }});
+
+
+        var _removeProp = function(s, p) {
+                if (p) {
+                    if (s.removeProperty) {
+                        if (p.substr(0,2) === "ms") { //Microsoft browsers don't conform to the standard of capping the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)
+                            p = "M" + p.substr(1);
+                        }
+                        s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());
+                    } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"
+                        s.removeAttribute(p);
+                    }
+                }
+            },
+            _setClassNameRatio = function(v) {
+                this.t._gsClassPT = this;
+                if (v === 1 || v === 0) {
+                    this.t.setAttribute("class", (v === 0) ? this.b : this.e);
+                    var mpt = this.data, //first MiniPropTween
+                        s = this.t.style;
+                    while (mpt) {
+                        if (!mpt.v) {
+                            _removeProp(s, mpt.p);
+                        } else {
+                            s[mpt.p] = mpt.v;
+                        }
+                        mpt = mpt._next;
+                    }
+                    if (v === 1 && this.t._gsClassPT === this) {
+                        this.t._gsClassPT = null;
+                    }
+                } else if (this.t.getAttribute("class") !== this.e) {
+                    this.t.setAttribute("class", this.e);
+                }
+            };
+        _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) {
+            var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable.
+                cssText = t.style.cssText,
+                difData, bs, cnpt, cnptLookup, mpt;
+            pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2);
+            pt.setRatio = _setClassNameRatio;
+            pt.pr = -11;
+            _hasPriority = true;
+            pt.b = b;
+            bs = _getAllStyles(t, _cs);
+            //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values)
+            cnpt = t._gsClassPT;
+            if (cnpt) {
+                cnptLookup = {};
+                mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned.
+                while (mpt) {
+                    cnptLookup[mpt.p] = 1;
+                    mpt = mpt._next;
+                }
+                cnpt.setRatio(1);
+            }
+            t._gsClassPT = pt;
+            pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("\\s*\\b" + e.substr(2) + "\\b"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");
+            if (cssp._tween._duration) { //if it's a zero-duration tween, there's no need to tween anything or parse the data. In fact, if we switch classes temporarily (which we must do for proper parsing) and the class has a transition applied, it could cause a quick flash to the end state and back again initially in some browsers.
+                t.setAttribute("class", pt.e);
+                difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);
+                t.setAttribute("class", b);
+                pt.data = difData.firstMPT;
+                t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).
+                pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)
+            }
+            return pt;
+        }});
+
+
+        var _setClearPropsRatio = function(v) {
+            if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).
+                var s = this.t.style,
+                    transformParse = _specialProps.transform.parse,
+                    a, p, i, clearTransform;
+                if (this.e === "all") {
+                    s.cssText = "";
+                    clearTransform = true;
+                } else {
+                    a = this.e.split(",");
+                    i = a.length;
+                    while (--i > -1) {
+                        p = a[i];
+                        if (_specialProps[p]) {
+                            if (_specialProps[p].parse === transformParse) {
+                                clearTransform = true;
+                            } else {
+                                p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow"
+                            }
+                        }
+                        _removeProp(s, p);
+                    }
+                }
+                if (clearTransform) {
+                    _removeProp(s, _transformProp);
+                    if (this.t._gsTransform) {
+                        delete this.t._gsTransform;
+                    }
+                }
+
+            }
+        };
+        _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) {
+            pt = new CSSPropTween(t, p, 0, 0, pt, 2);
+            pt.setRatio = _setClearPropsRatio;
+            pt.e = e;
+            pt.pr = -10;
+            pt.data = cssp._tween;
+            _hasPriority = true;
+            return pt;
+        }});
+
+        p = "bezier,throwProps,physicsProps,physics2D".split(",");
+        i = p.length;
+        while (i--) {
+            _registerPluginProp(p[i]);
+        }
+
+
+
+
+
+
+
+
+        p = CSSPlugin.prototype;
+        p._firstPT = null;
+
+        //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.
+        p._onInitTween = function(target, vars, tween) {
+            if (!target.nodeType) { //css is only for dom elements
+                return false;
+            }
+            this._target = target;
+            this._tween = tween;
+            this._vars = vars;
+            _autoRound = vars.autoRound;
+            _hasPriority = false;
+            _suffixMap = vars.suffixMap || CSSPlugin.suffixMap;
+            _cs = _getComputedStyle(target, "");
+            _overwriteProps = this._overwriteProps;
+            var style = target.style,
+                v, pt, pt2, first, last, next, zIndex, tpt, threeD;
+            if (_reqSafariFix) if (style.zIndex === "") {
+                v = _getStyle(target, "zIndex", _cs);
+                if (v === "auto" || v === "") {
+                    //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive.
+                    this._addLazySet(style, "zIndex", 0);
+                }
+            }
+
+            if (typeof(vars) === "string") {
+                first = style.cssText;
+                v = _getAllStyles(target, _cs);
+                style.cssText = first + ";" + vars;
+                v = _cssDif(target, v, _getAllStyles(target)).difs;
+                if (!_supportsOpacity && _opacityValExp.test(vars)) {
+                    v.opacity = parseFloat( RegExp.$1 );
+                }
+                vars = v;
+                style.cssText = first;
+            }
+            this._firstPT = pt = this.parse(target, vars, null);
+
+            if (this._transformType) {
+                threeD = (this._transformType === 3);
+                if (!_transformProp) {
+                    style.zoom = 1; //helps correct an IE issue.
+                } else if (_isSafari) {
+                    _reqSafariFix = true;
+                    //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random).
+                    if (style.zIndex === "") {
+                        zIndex = _getStyle(target, "zIndex", _cs);
+                        if (zIndex === "auto" || zIndex === "") {
+                            this._addLazySet(style, "zIndex", 0);
+                        }
+                    }
+                    //Setting WebkitBackfaceVisibility corrects 3 bugs:
+                    // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update.
+                    // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly.
+                    // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug.
+                    //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween.
+                    if (_isSafariLT6) {
+                        this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden"));
+                    }
+                }
+                pt2 = pt;
+                while (pt2 && pt2._next) {
+                    pt2 = pt2._next;
+                }
+                tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);
+                this._linkCSSP(tpt, null, pt2);
+                tpt.setRatio = (threeD && _supports3D) ? _set3DTransformRatio : _transformProp ? _set2DTransformRatio : _setIETransformRatio;
+                tpt.data = this._transform || _getTransform(target, _cs, true);
+                _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.
+            }
+
+            if (_hasPriority) {
+                //reorders the linked list in order of pr (priority)
+                while (pt) {
+                    next = pt._next;
+                    pt2 = first;
+                    while (pt2 && pt2.pr > pt.pr) {
+                        pt2 = pt2._next;
+                    }
+                    if ((pt._prev = pt2 ? pt2._prev : last)) {
+                        pt._prev._next = pt;
+                    } else {
+                        first = pt;
+                    }
+                    if ((pt._next = pt2)) {
+                        pt2._prev = pt;
+                    } else {
+                        last = pt;
+                    }
+                    pt = next;
+                }
+                this._firstPT = first;
+            }
+            return true;
+        };
+
+
+        p.parse = function(target, vars, pt, plugin) {
+            var style = target.style,
+                p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;
+            for (p in vars) {
+                es = vars[p]; //ending value string
+                sp = _specialProps[p]; //SpecialProp lookup.
+                if (sp) {
+                    pt = sp.parse(target, es, p, this, pt, plugin, vars);
+
+                } else {
+                    bs = _getStyle(target, p, _cs) + "";
+                    isStr = (typeof(es) === "string");
+                    if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor:
+                        if (!isStr) {
+                            es = _parseColor(es);
+                            es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")";
+                        }
+                        pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);
+
+                    } else if (isStr && (es.indexOf(" ") !== -1 || es.indexOf(",") !== -1)) {
+                        pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);
+
+                    } else {
+                        bn = parseFloat(bs);
+                        bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case.
+
+                        if (bs === "" || bs === "auto") {
+                            if (p === "width" || p === "height") {
+                                bn = _getDimension(target, p, _cs);
+                                bsfx = "px";
+                            } else if (p === "left" || p === "top") {
+                                bn = _calculateOffset(target, p, _cs);
+                                bsfx = "px";
+                            } else {
+                                bn = (p !== "opacity") ? 0 : 1;
+                                bsfx = "";
+                            }
+                        }
+
+                        rel = (isStr && es.charAt(1) === "=");
+                        if (rel) {
+                            en = parseInt(es.charAt(0) + "1", 10);
+                            es = es.substr(2);
+                            en *= parseFloat(es);
+                            esfx = es.replace(_suffixExp, "");
+                        } else {
+                            en = parseFloat(es);
+                            esfx = isStr ? es.substr((en + "").length) || "" : "";
+                        }
+
+                        if (esfx === "") {
+                            esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix.
+                        }
+
+                        es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.
+
+                        //if the beginning/ending suffixes don't match, normalize them...
+                        if (bsfx !== esfx) if (esfx !== "") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!
+                            bn = _convertToPixels(target, p, bn, bsfx);
+                            if (esfx === "%") {
+                                bn /= _convertToPixels(target, p, 100, "%") / 100;
+                                if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens.
+                                    bs = bn + "%";
+                                }
+
+                            } else if (esfx === "em") {
+                                bn /= _convertToPixels(target, p, 1, "em");
+
+                            //otherwise convert to pixels.
+                            } else if (esfx !== "px") {
+                                en = _convertToPixels(target, p, en, esfx);
+                                esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too.
+                            }
+                            if (rel) if (en || en === 0) {
+                                es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here.
+                            }
+                        }
+
+                        if (rel) {
+                            en += bn;
+                        }
+
+                        if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly.
+                            pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es);
+                            pt.xs0 = esfx;
+                            //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0);
+                        } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) {
+                            _log("invalid " + p + " tween value: " + vars[p]);
+                        } else {
+                            pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es);
+                            pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween.
+                            //DEBUG: _log("non-tweening value "+p+": "+pt.xs0);
+                        }
+                    }
+                }
+                if (plugin) if (pt && !pt.plugin) {
+                    pt.plugin = plugin;
+                }
+            }
+            return pt;
+        };
+
+
+        //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.
+        p.setRatio = function(v) {
+            var pt = this._firstPT,
+                min = 0.000001,
+                val, str, i;
+
+            //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).
+            if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {
+                while (pt) {
+                    if (pt.type !== 2) {
+                        pt.t[pt.p] = pt.e;
+                    } else {
+                        pt.setRatio(v);
+                    }
+                    pt = pt._next;
+                }
+
+            } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) {
+                while (pt) {
+                    val = pt.c * v + pt.s;
+                    if (pt.r) {
+                        val = Math.round(val);
+                    } else if (val < min) if (val > -min) {
+                        val = 0;
+                    }
+                    if (!pt.type) {
+                        pt.t[pt.p] = val + pt.xs0;
+                    } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"
+                        i = pt.l;
+                        if (i === 2) {
+                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2;
+                        } else if (i === 3) {
+                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3;
+                        } else if (i === 4) {
+                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4;
+                        } else if (i === 5) {
+                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5;
+                        } else {
+                            str = pt.xs0 + val + pt.xs1;
+                            for (i = 1; i < pt.l; i++) {
+                                str += pt["xn"+i] + pt["xs"+(i+1)];
+                            }
+                            pt.t[pt.p] = str;
+                        }
+
+                    } else if (pt.type === -1) { //non-tweening value
+                        pt.t[pt.p] = pt.xs0;
+
+                    } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc.
+                        pt.setRatio(v);
+                    }
+                    pt = pt._next;
+                }
+
+            //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever).
+            } else {
+                while (pt) {
+                    if (pt.type !== 2) {
+                        pt.t[pt.p] = pt.b;
+                    } else {
+                        pt.setRatio(v);
+                    }
+                    pt = pt._next;
+                }
+            }
+        };
+
+        /**
+         * @private
+         * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called.
+         * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked
+         * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call
+         * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin
+         * doesn't have any transform-related properties of its own. You can call this method as many times as you
+         * want and it won't create duplicate CSSPropTweens.
+         *
+         * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)
+         */
+        p._enableTransforms = function(threeD) {
+            this._transformType = (threeD || this._transformType === 3) ? 3 : 2;
+            this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.
+        };
+
+        var lazySet = function(v) {
+            this.t[this.p] = this.e;
+            this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop.
+        };
+        /** @private Gives us a way to set a value on the first render (and only the first render). **/
+        p._addLazySet = function(t, p, v) {
+            var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2);
+            pt.e = v;
+            pt.setRatio = lazySet;
+            pt.data = this;
+        };
+
+        /** @private **/
+        p._linkCSSP = function(pt, next, prev, remove) {
+            if (pt) {
+                if (next) {
+                    next._prev = pt;
+                }
+                if (pt._next) {
+                    pt._next._prev = pt._prev;
+                }
+                if (pt._prev) {
+                    pt._prev._next = pt._next;
+                } else if (this._firstPT === pt) {
+                    this._firstPT = pt._next;
+                    remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)
+                }
+                if (prev) {
+                    prev._next = pt;
+                } else if (!remove && this._firstPT === null) {
+                    this._firstPT = pt;
+                }
+                pt._next = next;
+                pt._prev = prev;
+            }
+            return pt;
+        };
+
+        //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property.
+        p._kill = function(lookup) {
+            var copy = lookup,
+                pt, p, xfirst;
+            if (lookup.autoAlpha || lookup.alpha) {
+                copy = {};
+                for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere.
+                    copy[p] = lookup[p];
+                }
+                copy.opacity = 1;
+                if (copy.autoAlpha) {
+                    copy.visibility = 1;
+                }
+            }
+            if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst".
+                xfirst = pt.xfirst;
+                if (xfirst && xfirst._prev) {
+                    this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev
+                } else if (xfirst === this._firstPT) {
+                    this._firstPT = pt._next;
+                }
+                if (pt._next) {
+                    this._linkCSSP(pt._next, pt._next._next, xfirst._prev);
+                }
+                this._classNamePT = null;
+            }
+            return TweenPlugin.prototype._kill.call(this, copy);
+        };
+
+
+
+        //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison.
+        var _getChildStyles = function(e, props, targets) {
+                var children, i, child, type;
+                if (e.slice) {
+                    i = e.length;
+                    while (--i > -1) {
+                        _getChildStyles(e[i], props, targets);
+                    }
+                    return;
+                }
+                children = e.childNodes;
+                i = children.length;
+                while (--i > -1) {
+                    child = children[i];
+                    type = child.type;
+                    if (child.style) {
+                        props.push(_getAllStyles(child));
+                        if (targets) {
+                            targets.push(child);
+                        }
+                    }
+                    if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) {
+                        _getChildStyles(child, props, targets);
+                    }
+                }
+            };
+
+        /**
+         * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite
+         * and then compares the style properties of all the target's child elements at the tween's start and end, and
+         * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting
+         * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is
+         * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens
+         * is because it creates entirely new tweens that may have completely different targets than the original tween,
+         * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API
+         * and it would create other problems. For example:
+         *  - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted)
+         *  - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others.
+         *  - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed.
+         *
+         * @param {Object} target object to be tweened
+         * @param {number} Duration in seconds (or frames for frames-based tweens)
+         * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone}
+         * @return {Array} An array of TweenLite instances
+         */
+        CSSPlugin.cascadeTo = function(target, duration, vars) {
+            var tween = TweenLite.to(target, duration, vars),
+                results = [tween],
+                b = [],
+                e = [],
+                targets = [],
+                _reservedProps = TweenLite._internals.reservedProps,
+                i, difs, p;
+            target = tween._targets || tween.target;
+            _getChildStyles(target, b, targets);
+            tween.render(duration, true);
+            _getChildStyles(target, e);
+            tween.render(0, true);
+            tween._enabled(true);
+            i = targets.length;
+            while (--i > -1) {
+                difs = _cssDif(targets[i], b[i], e[i]);
+                if (difs.firstMPT) {
+                    difs = difs.difs;
+                    for (p in vars) {
+                        if (_reservedProps[p]) {
+                            difs[p] = vars[p];
+                        }
+                    }
+                    results.push( TweenLite.to(targets[i], duration, difs) );
+                }
+            }
+            return results;
+        };
+
+        TweenPlugin.activate([CSSPlugin]);
+        return CSSPlugin;
+
+    }, true);
+
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+/*
+ * ----------------------------------------------------------------
+ * RoundPropsPlugin
+ * ----------------------------------------------------------------
+ */
+    (function() {
+
+        var RoundPropsPlugin = window._gsDefine.plugin({
+                propName: "roundProps",
+                priority: -1,
+                API: 2,
+
+                //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
+                init: function(target, value, tween) {
+                    this._tween = tween;
+                    return true;
+                }
+
+            }),
+            p = RoundPropsPlugin.prototype;
+
+        p._onInitAllProps = function() {
+            var tween = this._tween,
+                rp = (tween.vars.roundProps instanceof Array) ? tween.vars.roundProps : tween.vars.roundProps.split(","),
+                i = rp.length,
+                lookup = {},
+                rpt = tween._propLookup.roundProps,
+                prop, pt, next;
+            while (--i > -1) {
+                lookup[rp[i]] = 1;
+            }
+            i = rp.length;
+            while (--i > -1) {
+                prop = rp[i];
+                pt = tween._firstPT;
+                while (pt) {
+                    next = pt._next; //record here, because it may get removed
+                    if (pt.pg) {
+                        pt.t._roundProps(lookup, true);
+                    } else if (pt.n === prop) {
+                        this._add(pt.t, prop, pt.s, pt.c);
+                        //remove from linked list
+                        if (next) {
+                            next._prev = pt._prev;
+                        }
+                        if (pt._prev) {
+                            pt._prev._next = next;
+                        } else if (tween._firstPT === pt) {
+                            tween._firstPT = next;
+                        }
+                        pt._next = pt._prev = null;
+                        tween._propLookup[prop] = rpt;
+                    }
+                    pt = next;
+                }
+            }
+            return false;
+        };
+
+        p._add = function(target, p, s, c) {
+            this._addTween(target, p, s, s + c, p, true);
+            this._overwriteProps.push(p);
+        };
+
+    }());
+
+
+
+
+
+
+
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * AttrPlugin
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine.plugin({
+        propName: "attr",
+        API: 2,
+        version: "0.3.2",
+
+        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
+        init: function(target, value, tween) {
+            var p, start, end;
+            if (typeof(target.setAttribute) !== "function") {
+                return false;
+            }
+            this._target = target;
+            this._proxy = {};
+            this._start = {}; // we record start and end values exactly as they are in case they're strings (not numbers) - we need to be able to revert to them cleanly.
+            this._end = {};
+            for (p in value) {
+                this._start[p] = this._proxy[p] = start = target.getAttribute(p);
+                end = this._addTween(this._proxy, p, parseFloat(start), value[p], p);
+                this._end[p] = end ? end.s + end.c : value[p];
+                this._overwriteProps.push(p);
+            }
+            return true;
+        },
+
+        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
+        set: function(ratio) {
+            this._super.setRatio.call(this, ratio);
+            var props = this._overwriteProps,
+                i = props.length,
+                lookup = (ratio === 1) ? this._end : ratio ? this._proxy : this._start,
+                p;
+            while (--i > -1) {
+                p = props[i];
+                this._target.setAttribute(p, lookup[p] + "");
+            }
+        }
+
+    });
+
+
+
+
+
+
+
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * DirectionalRotationPlugin
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine.plugin({
+        propName: "directionalRotation",
+        API: 2,
+        version: "0.2.0",
+
+        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.
+        init: function(target, value, tween) {
+            if (typeof(value) !== "object") {
+                value = {rotation:value};
+            }
+            this.finals = {};
+            var cap = (value.useRadians === true) ? Math.PI * 2 : 360,
+                min = 0.000001,
+                p, v, start, end, dif, split;
+            for (p in value) {
+                if (p !== "useRadians") {
+                    split = (value[p] + "").split("_");
+                    v = split[0];
+                    start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );
+                    end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0;
+                    dif = end - start;
+                    if (split.length) {
+                        v = split.join("_");
+                        if (v.indexOf("short") !== -1) {
+                            dif = dif % cap;
+                            if (dif !== dif % (cap / 2)) {
+                                dif = (dif < 0) ? dif + cap : dif - cap;
+                            }
+                        }
+                        if (v.indexOf("_cw") !== -1 && dif < 0) {
+                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
+                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {
+                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;
+                        }
+                    }
+                    if (dif > min || dif < -min) {
+                        this._addTween(target, p, start, start + dif, p);
+                        this._overwriteProps.push(p);
+                    }
+                }
+            }
+            return true;
+        },
+
+        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)
+        set: function(ratio) {
+            var pt;
+            if (ratio !== 1) {
+                this._super.setRatio.call(this, ratio);
+            } else {
+                pt = this._firstPT;
+                while (pt) {
+                    if (pt.f) {
+                        pt.t[pt.p](this.finals[pt.p]);
+                    } else {
+                        pt.t[pt.p] = this.finals[pt.p];
+                    }
+                    pt = pt._next;
+                }
+            }
+        }
+
+    })._autoCSS = true;
+
+
+
+
+
+
+
+    
+    
+    
+    
+/*
+ * ----------------------------------------------------------------
+ * EasePack
+ * ----------------------------------------------------------------
+ */
+    window._gsDefine("easing.Back", ["easing.Ease"], function(Ease) {
+        
+        var w = (window.GreenSockGlobals || window),
+            gs = w.com.greensock,
+            _2PI = Math.PI * 2,
+            _HALF_PI = Math.PI / 2,
+            _class = gs._class,
+            _create = function(n, f) {
+                var C = _class("easing." + n, function(){}, true),
+                    p = C.prototype = new Ease();
+                p.constructor = C;
+                p.getRatio = f;
+                return C;
+            },
+            _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist.
+            _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) {
+                var C = _class("easing."+name, {
+                    easeOut:new EaseOut(),
+                    easeIn:new EaseIn(),
+                    easeInOut:new EaseInOut()
+                }, true);
+                _easeReg(C, name);
+                return C;
+            },
+            EasePoint = function(time, value, next) {
+                this.t = time;
+                this.v = value;
+                if (next) {
+                    this.next = next;
+                    next.prev = this;
+                    this.c = next.v - value;
+                    this.gap = next.t - time;
+                }
+            },
+
+            //Back
+            _createBack = function(n, f) {
+                var C = _class("easing." + n, function(overshoot) {
+                        this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158;
+                        this._p2 = this._p1 * 1.525;
+                    }, true),
+                    p = C.prototype = new Ease();
+                p.constructor = C;
+                p.getRatio = f;
+                p.config = function(overshoot) {
+                    return new C(overshoot);
+                };
+                return C;
+            },
+
+            Back = _wrap("Back",
+                _createBack("BackOut", function(p) {
+                    return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1);
+                }),
+                _createBack("BackIn", function(p) {
+                    return p * p * ((this._p1 + 1) * p - this._p1);
+                }),
+                _createBack("BackInOut", function(p) {
+                    return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2);
+                })
+            ),
+
+
+            //SlowMo
+            SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) {
+                power = (power || power === 0) ? power : 0.7;
+                if (linearRatio == null) {
+                    linearRatio = 0.7;
+                } else if (linearRatio > 1) {
+                    linearRatio = 1;
+                }
+                this._p = (linearRatio !== 1) ? power : 0;
+                this._p1 = (1 - linearRatio) / 2;
+                this._p2 = linearRatio;
+                this._p3 = this._p1 + this._p2;
+                this._calcEnd = (yoyoMode === true);
+            }, true),
+            p = SlowMo.prototype = new Ease(),
+            SteppedEase, RoughEase, _createElastic;
+
+        p.constructor = SlowMo;
+        p.getRatio = function(p) {
+            var r = p + (0.5 - p) * this._p;
+            if (p < this._p1) {
+                return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);
+            } else if (p > this._p3) {
+                return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p);
+            }
+            return this._calcEnd ? 1 : r;
+        };
+        SlowMo.ease = new SlowMo(0.7, 0.7);
+
+        p.config = SlowMo.config = function(linearRatio, power, yoyoMode) {
+            return new SlowMo(linearRatio, power, yoyoMode);
+        };
+
+
+        //SteppedEase
+        SteppedEase = _class("easing.SteppedEase", function(steps) {
+                steps = steps || 1;
+                this._p1 = 1 / steps;
+                this._p2 = steps + 1;
+            }, true);
+        p = SteppedEase.prototype = new Ease();
+        p.constructor = SteppedEase;
+        p.getRatio = function(p) {
+            if (p < 0) {
+                p = 0;
+            } else if (p >= 1) {
+                p = 0.999999999;
+            }
+            return ((this._p2 * p) >> 0) * this._p1;
+        };
+        p.config = SteppedEase.config = function(steps) {
+            return new SteppedEase(steps);
+        };
+
+
+        //RoughEase
+        RoughEase = _class("easing.RoughEase", function(vars) {
+            vars = vars || {};
+            var taper = vars.taper || "none",
+                a = [],
+                cnt = 0,
+                points = (vars.points || 20) | 0,
+                i = points,
+                randomize = (vars.randomize !== false),
+                clamp = (vars.clamp === true),
+                template = (vars.template instanceof Ease) ? vars.template : null,
+                strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4,
+                x, y, bump, invX, obj, pnt;
+            while (--i > -1) {
+                x = randomize ? Math.random() : (1 / points) * i;
+                y = template ? template.getRatio(x) : x;
+                if (taper === "none") {
+                    bump = strength;
+                } else if (taper === "out") {
+                    invX = 1 - x;
+                    bump = invX * invX * strength;
+                } else if (taper === "in") {
+                    bump = x * x * strength;
+                } else if (x < 0.5) {  //"both" (start)
+                    invX = x * 2;
+                    bump = invX * invX * 0.5 * strength;
+                } else {                //"both" (end)
+                    invX = (1 - x) * 2;
+                    bump = invX * invX * 0.5 * strength;
+                }
+                if (randomize) {
+                    y += (Math.random() * bump) - (bump * 0.5);
+                } else if (i % 2) {
+                    y += bump * 0.5;
+                } else {
+                    y -= bump * 0.5;
+                }
+                if (clamp) {
+                    if (y > 1) {
+                        y = 1;
+                    } else if (y < 0) {
+                        y = 0;
+                    }
+                }
+                a[cnt++] = {x:x, y:y};
+            }
+            a.sort(function(a, b) {
+                return a.x - b.x;
+            });
+
+            pnt = new EasePoint(1, 1, null);
+            i = points;
+            while (--i > -1) {
+                obj = a[i];
+                pnt = new EasePoint(obj.x, obj.y, pnt);
+            }
+
+            this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next);
+        }, true);
+        p = RoughEase.prototype = new Ease();
+        p.constructor = RoughEase;
+        p.getRatio = function(p) {
+            var pnt = this._prev;
+            if (p > pnt.t) {
+                while (pnt.next && p >= pnt.t) {
+                    pnt = pnt.next;
+                }
+                pnt = pnt.prev;
+            } else {
+                while (pnt.prev && p <= pnt.t) {
+                    pnt = pnt.prev;
+                }
+            }
+            this._prev = pnt;
+            return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c);
+        };
+        p.config = function(vars) {
+            return new RoughEase(vars);
+        };
+        RoughEase.ease = new RoughEase();
+
+
+        //Bounce
+        _wrap("Bounce",
+            _create("BounceOut", function(p) {
+                if (p < 1 / 2.75) {
+                    return 7.5625 * p * p;
+                } else if (p < 2 / 2.75) {
+                    return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;
+                } else if (p < 2.5 / 2.75) {
+                    return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;
+                }
+                return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;
+            }),
+            _create("BounceIn", function(p) {
+                if ((p = 1 - p) < 1 / 2.75) {
+                    return 1 - (7.5625 * p * p);
+                } else if (p < 2 / 2.75) {
+                    return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75);
+                } else if (p < 2.5 / 2.75) {
+                    return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375);
+                }
+                return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375);
+            }),
+            _create("BounceInOut", function(p) {
+                var invert = (p < 0.5);
+                if (invert) {
+                    p = 1 - (p * 2);
+                } else {
+                    p = (p * 2) - 1;
+                }
+                if (p < 1 / 2.75) {
+                    p = 7.5625 * p * p;
+                } else if (p < 2 / 2.75) {
+                    p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;
+                } else if (p < 2.5 / 2.75) {
+                    p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;
+                } else {
+                    p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;
+                }
+                return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5;
+            })
+        );
+
+
+        //CIRC
+        _wrap("Circ",
+            _create("CircOut", function(p) {
+                return Math.sqrt(1 - (p = p - 1) * p);
+            }),
+            _create("CircIn", function(p) {
+                return -(Math.sqrt(1 - (p * p)) - 1);
+            }),
+            _create("CircInOut", function(p) {
+                return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1);
+            })
+        );
+
+
+        //Elastic
+        _createElastic = function(n, f, def) {
+            var C = _class("easing." + n, function(amplitude, period) {
+                    this._p1 = amplitude || 1;
+                    this._p2 = period || def;
+                    this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0);
+                }, true),
+                p = C.prototype = new Ease();
+            p.constructor = C;
+            p.getRatio = f;
+            p.config = function(amplitude, period) {
+                return new C(amplitude, period);
+            };
+            return C;
+        };
+        _wrap("Elastic",
+            _createElastic("ElasticOut", function(p) {
+                return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * _2PI / this._p2 ) + 1;
+            }, 0.3),
+            _createElastic("ElasticIn", function(p) {
+                return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ));
+            }, 0.3),
+            _createElastic("ElasticInOut", function(p) {
+                return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ) *0.5 + 1;
+            }, 0.45)
+        );
+
+
+        //Expo
+        _wrap("Expo",
+            _create("ExpoOut", function(p) {
+                return 1 - Math.pow(2, -10 * p);
+            }),
+            _create("ExpoIn", function(p) {
+                return Math.pow(2, 10 * (p - 1)) - 0.001;
+            }),
+            _create("ExpoInOut", function(p) {
+                return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
+            })
+        );
+
+
+        //Sine
+        _wrap("Sine",
+            _create("SineOut", function(p) {
+                return Math.sin(p * _HALF_PI);
+            }),
+            _create("SineIn", function(p) {
+                return -Math.cos(p * _HALF_PI) + 1;
+            }),
+            _create("SineInOut", function(p) {
+                return -0.5 * (Math.cos(Math.PI * p) - 1);
+            })
+        );
+
+        _class("easing.EaseLookup", {
+                find:function(s) {
+                    return Ease.map[s];
+                }
+            }, true);
+
+        //register the non-standard eases
+        _easeReg(w.SlowMo, "SlowMo", "ease,");
+        _easeReg(RoughEase, "RoughEase", "ease,");
+        _easeReg(SteppedEase, "SteppedEase", "ease,");
+
+        return Back;
+        
+    }, true);
+
+
+}); 
+
+
+
+
+
+
+
+
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * Base classes like TweenLite, SimpleTimeline, Ease, Ticker, etc.
+ * ----------------------------------------------------------------
+ */
+(function(window) {
+
+        "use strict";
+        var _globals = window.GreenSockGlobals || window;
+        if (_globals.TweenLite) {
+            return; //in case the core set of classes is already loaded, don't instantiate twice.
+        }
+        var _namespace = function(ns) {
+                var a = ns.split("."),
+                    p = _globals, i;
+                for (i = 0; i < a.length; i++) {
+                    p[a[i]] = p = p[a[i]] || {};
+                }
+                return p;
+            },
+            gs = _namespace("com.greensock"),
+            _tinyNum = 0.0000000001,
+            _slice = [].slice,
+            _emptyFunc = function() {},
+            _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)
+                var toString = Object.prototype.toString,
+                    array = toString.call([]);
+                return function(obj) {
+                    return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array));
+                };
+            }()),
+            a, i, p, _ticker, _tickerActive,
+            _defLookup = {},
+
+            /**
+             * @constructor
+             * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition.
+             * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is
+             * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin
+             * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally.
+             *
+             * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found,
+             * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere,
+             * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so
+             * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything
+             * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock
+             * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could
+             * sandbox the banner one like:
+             *
+             * <script>
+             *     var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever.
+             * </script>
+             * <script src="js/greensock/v1.7/TweenMax.js"></script>
+             * <script>
+             *     window.GreenSockGlobals = null; //reset it back to null so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)
+             * </script>
+             * <script src="js/greensock/v1.6/TweenMax.js"></script>
+             * <script>
+             *     gs.TweenLite.to(...); //would use v1.7
+             *     TweenLite.to(...); //would use v1.6
+             * </script>
+             *
+             * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".
+             * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]
+             * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.
+             * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)
+             */
+            Definition = function(ns, dependencies, func, global) {
+                this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses
+                _defLookup[ns] = this;
+                this.gsClass = null;
+                this.func = func;
+                var _classes = [];
+                this.check = function(init) {
+                    var i = dependencies.length,
+                        missing = i,
+                        cur, a, n, cl;
+                    while (--i > -1) {
+                        if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {
+                            _classes[i] = cur.gsClass;
+                            missing--;
+                        } else if (init) {
+                            cur.sc.push(this);
+                        }
+                    }
+                    if (missing === 0 && func) {
+                        a = ("com.greensock." + ns).split(".");
+                        n = a.pop();
+                        cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);
+
+                        //exports to multiple environments
+                        if (global) {
+                            _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)
+                            if (typeof(define) === "function" && define.amd){ //AMD
+                                define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").join("/"), [], function() { return cl; });
+                            } else if (typeof(module) !== "undefined" && module.exports){ //node
+                                module.exports = cl;
+                            }
+                        }
+                        for (i = 0; i < this.sc.length; i++) {
+                            this.sc[i].check();
+                        }
+                    }
+                };
+                this.check(true);
+            },
+
+            //used to create Definition instances (which basically registers a class that has dependencies).
+            _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {
+                return new Definition(ns, dependencies, func, global);
+            },
+
+            //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).
+            _class = gs._class = function(ns, func, global) {
+                func = func || function() {};
+                _gsDefine(ns, [], function(){ return func; }, global);
+                return func;
+            };
+
+        _gsDefine.globals = _globals;
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * Ease
+ * ----------------------------------------------------------------
+ */
+        var _baseParams = [0, 0, 1, 1],
+            _blankArray = [],
+            Ease = _class("easing.Ease", function(func, extraParams, type, power) {
+                this._func = func;
+                this._type = type || 0;
+                this._power = power || 0;
+                this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;
+            }, true),
+            _easeMap = Ease.map = {},
+            _easeReg = Ease.register = function(ease, names, types, create) {
+                var na = names.split(","),
+                    i = na.length,
+                    ta = (types || "easeIn,easeOut,easeInOut").split(","),
+                    e, name, j, type;
+                while (--i > -1) {
+                    name = na[i];
+                    e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};
+                    j = ta.length;
+                    while (--j > -1) {
+                        type = ta[j];
+                        _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();
+                    }
+                }
+            };
+
+        p = Ease.prototype;
+        p._calcEnd = false;
+        p.getRatio = function(p) {
+            if (this._func) {
+                this._params[0] = p;
+                return this._func.apply(null, this._params);
+            }
+            var t = this._type,
+                pw = this._power,
+                r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;
+            if (pw === 1) {
+                r *= r;
+            } else if (pw === 2) {
+                r *= r * r;
+            } else if (pw === 3) {
+                r *= r * r * r;
+            } else if (pw === 4) {
+                r *= r * r * r * r;
+            }
+            return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);
+        };
+
+        //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)
+        a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];
+        i = a.length;
+        while (--i > -1) {
+            p = a[i]+",Power"+i;
+            _easeReg(new Ease(null,null,1,i), p, "easeOut", true);
+            _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));
+            _easeReg(new Ease(null,null,3,i), p, "easeInOut");
+        }
+        _easeMap.linear = gs.easing.Linear.easeIn;
+        _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks
+
+
+/*
+ * ----------------------------------------------------------------
+ * EventDispatcher
+ * ----------------------------------------------------------------
+ */
+        var EventDispatcher = _class("events.EventDispatcher", function(target) {
+            this._listeners = {};
+            this._eventTarget = target || this;
+        });
+        p = EventDispatcher.prototype;
+
+        p.addEventListener = function(type, callback, scope, useParam, priority) {
+            priority = priority || 0;
+            var list = this._listeners[type],
+                index = 0,
+                listener, i;
+            if (list == null) {
+                this._listeners[type] = list = [];
+            }
+            i = list.length;
+            while (--i > -1) {
+                listener = list[i];
+                if (listener.c === callback && listener.s === scope) {
+                    list.splice(i, 1);
+                } else if (index === 0 && listener.pr < priority) {
+                    index = i + 1;
+                }
+            }
+            list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});
+            if (this === _ticker && !_tickerActive) {
+                _ticker.wake();
+            }
+        };
+
+        p.removeEventListener = function(type, callback) {
+            var list = this._listeners[type], i;
+            if (list) {
+                i = list.length;
+                while (--i > -1) {
+                    if (list[i].c === callback) {
+                        list.splice(i, 1);
+                        return;
+                    }
+                }
+            }
+        };
+
+        p.dispatchEvent = function(type) {
+            var list = this._listeners[type],
+                i, t, listener;
+            if (list) {
+                i = list.length;
+                t = this._eventTarget;
+                while (--i > -1) {
+                    listener = list[i];
+                    if (listener.up) {
+                        listener.c.call(listener.s || t, {type:type, target:t});
+                    } else {
+                        listener.c.call(listener.s || t);
+                    }
+                }
+            }
+        };
+
+
+/*
+ * ----------------------------------------------------------------
+ * Ticker
+ * ----------------------------------------------------------------
+ */
+        var _reqAnimFrame = window.requestAnimationFrame,
+            _cancelAnimFrame = window.cancelAnimationFrame,
+            _getTime = Date.now || function() {return new Date().getTime();},
+            _lastUpdate = _getTime();
+
+        //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.
+        a = ["ms","moz","webkit","o"];
+        i = a.length;
+        while (--i > -1 && !_reqAnimFrame) {
+            _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];
+            _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];
+        }
+
+        _class("Ticker", function(fps, useRAF) {
+            var _self = this,
+                _startTime = _getTime(),
+                _useRAF = (useRAF !== false && _reqAnimFrame),
+                _lagThreshold = 500,
+                _adjustedLag = 33,
+                _fps, _req, _id, _gap, _nextTime,
+                _tick = function(manual) {
+                    var elapsed = _getTime() - _lastUpdate,
+                        overlap, dispatch;
+                    if (elapsed > _lagThreshold) {
+                        _startTime += elapsed - _adjustedLag;
+                    }
+                    _lastUpdate += elapsed;
+                    _self.time = (_lastUpdate - _startTime) / 1000;
+                    overlap = _self.time - _nextTime;
+                    if (!_fps || overlap > 0 || manual === true) {
+                        _self.frame++;
+                        _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);
+                        dispatch = true;
+                    }
+                    if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.
+                        _id = _req(_tick);
+                    }
+                    if (dispatch) {
+                        _self.dispatchEvent("tick");
+                    }
+                };
+
+            EventDispatcher.call(_self);
+            _self.time = _self.frame = 0;
+            _self.tick = function() {
+                _tick(true);
+            };
+
+            _self.lagSmoothing = function(threshold, adjustedLag) {
+                _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited
+                _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);
+            };
+
+            _self.sleep = function() {
+                if (_id == null) {
+                    return;
+                }
+                if (!_useRAF || !_cancelAnimFrame) {
+                    clearTimeout(_id);
+                } else {
+                    _cancelAnimFrame(_id);
+                }
+                _req = _emptyFunc;
+                _id = null;
+                if (_self === _ticker) {
+                    _tickerActive = false;
+                }
+            };
+
+            _self.wake = function() {
+                if (_id !== null) {
+                    _self.sleep();
+                } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().
+                    _lastUpdate = _getTime() - _lagThreshold + 5;
+                }
+                _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;
+                if (_self === _ticker) {
+                    _tickerActive = true;
+                }
+                _tick(2);
+            };
+
+            _self.fps = function(value) {
+                if (!arguments.length) {
+                    return _fps;
+                }
+                _fps = value;
+                _gap = 1 / (_fps || 60);
+                _nextTime = this.time + _gap;
+                _self.wake();
+            };
+
+            _self.useRAF = function(value) {
+                if (!arguments.length) {
+                    return _useRAF;
+                }
+                _self.sleep();
+                _useRAF = value;
+                _self.fps(_fps);
+            };
+            _self.fps(fps);
+
+            //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.
+            setTimeout(function() {
+                if (_useRAF && (!_id || _self.frame < 5)) {
+                    _self.useRAF(false);
+                }
+            }, 1500);
+        });
+
+        p = gs.Ticker.prototype = new gs.events.EventDispatcher();
+        p.constructor = gs.Ticker;
+
+
+/*
+ * ----------------------------------------------------------------
+ * Animation
+ * ----------------------------------------------------------------
+ */
+        var Animation = _class("core.Animation", function(duration, vars) {
+                this.vars = vars = vars || {};
+                this._duration = this._totalDuration = duration || 0;
+                this._delay = Number(vars.delay) || 0;
+                this._timeScale = 1;
+                this._active = (vars.immediateRender === true);
+                this.data = vars.data;
+                this._reversed = (vars.reversed === true);
+
+                if (!_rootTimeline) {
+                    return;
+                }
+                if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.
+                    _ticker.wake();
+                }
+
+                var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;
+                tl.add(this, tl._time);
+
+                if (this.vars.paused) {
+                    this.paused(true);
+                }
+            });
+
+        _ticker = Animation.ticker = new gs.Ticker();
+        p = Animation.prototype;
+        p._dirty = p._gc = p._initted = p._paused = false;
+        p._totalTime = p._time = 0;
+        p._rawPrevTime = -1;
+        p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;
+        p._paused = false;
+
+
+        //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.
+        var _checkTimeout = function() {
+                if (_tickerActive && _getTime() - _lastUpdate > 2000) {
+                    _ticker.wake();
+                }
+                setTimeout(_checkTimeout, 2000);
+            };
+        _checkTimeout();
+
+
+        p.play = function(from, suppressEvents) {
+            if (from != null) {
+                this.seek(from, suppressEvents);
+            }
+            return this.reversed(false).paused(false);
+        };
+
+        p.pause = function(atTime, suppressEvents) {
+            if (atTime != null) {
+                this.seek(atTime, suppressEvents);
+            }
+            return this.paused(true);
+        };
+
+        p.resume = function(from, suppressEvents) {
+            if (from != null) {
+                this.seek(from, suppressEvents);
+            }
+            return this.paused(false);
+        };
+
+        p.seek = function(time, suppressEvents) {
+            return this.totalTime(Number(time), suppressEvents !== false);
+        };
+
+        p.restart = function(includeDelay, suppressEvents) {
+            return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);
+        };
+
+        p.reverse = function(from, suppressEvents) {
+            if (from != null) {
+                this.seek((from || this.totalDuration()), suppressEvents);
+            }
+            return this.reversed(true).paused(false);
+        };
+
+        p.render = function(time, suppressEvents, force) {
+            //stub - we override this method in subclasses.
+        };
+
+        p.invalidate = function() {
+            return this;
+        };
+
+        p.isActive = function() {
+            var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.
+                startTime = this._startTime,
+                rawTime;
+            return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));
+        };
+
+        p._enabled = function (enabled, ignoreTimeline) {
+            if (!_tickerActive) {
+                _ticker.wake();
+            }
+            this._gc = !enabled;
+            this._active = this.isActive();
+            if (ignoreTimeline !== true) {
+                if (enabled && !this.timeline) {
+                    this._timeline.add(this, this._startTime - this._delay);
+                } else if (!enabled && this.timeline) {
+                    this._timeline._remove(this, true);
+                }
+            }
+            return false;
+        };
+
+
+        p._kill = function(vars, target) {
+            return this._enabled(false, false);
+        };
+
+        p.kill = function(vars, target) {
+            this._kill(vars, target);
+            return this;
+        };
+
+        p._uncache = function(includeSelf) {
+            var tween = includeSelf ? this : this.timeline;
+            while (tween) {
+                tween._dirty = true;
+                tween = tween.timeline;
+            }
+            return this;
+        };
+
+        p._swapSelfInParams = function(params) {
+            var i = params.length,
+                copy = params.concat();
+            while (--i > -1) {
+                if (params[i] === "{self}") {
+                    copy[i] = this;
+                }
+            }
+            return copy;
+        };
+
+//----Animation getters/setters --------------------------------------------------------
+
+        p.eventCallback = function(type, callback, params, scope) {
+            if ((type || "").substr(0,2) === "on") {
+                var v = this.vars;
+                if (arguments.length === 1) {
+                    return v[type];
+                }
+                if (callback == null) {
+                    delete v[type];
+                } else {
+                    v[type] = callback;
+                    v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;
+                    v[type + "Scope"] = scope;
+                }
+                if (type === "onUpdate") {
+                    this._onUpdate = callback;
+                }
+            }
+            return this;
+        };
+
+        p.delay = function(value) {
+            if (!arguments.length) {
+                return this._delay;
+            }
+            if (this._timeline.smoothChildTiming) {
+                this.startTime( this._startTime + value - this._delay );
+            }
+            this._delay = value;
+            return this;
+        };
+
+        p.duration = function(value) {
+            if (!arguments.length) {
+                this._dirty = false;
+                return this._duration;
+            }
+            this._duration = this._totalDuration = value;
+            this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.
+            if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {
+                this.totalTime(this._totalTime * (value / this._duration), true);
+            }
+            return this;
+        };
+
+        p.totalDuration = function(value) {
+            this._dirty = false;
+            return (!arguments.length) ? this._totalDuration : this.duration(value);
+        };
+
+        p.time = function(value, suppressEvents) {
+            if (!arguments.length) {
+                return this._time;
+            }
+            if (this._dirty) {
+                this.totalDuration();
+            }
+            return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);
+        };
+
+        p.totalTime = function(time, suppressEvents, uncapped) {
+            if (!_tickerActive) {
+                _ticker.wake();
+            }
+            if (!arguments.length) {
+                return this._totalTime;
+            }
+            if (this._timeline) {
+                if (time < 0 && !uncapped) {
+                    time += this.totalDuration();
+                }
+                if (this._timeline.smoothChildTiming) {
+                    if (this._dirty) {
+                        this.totalDuration();
+                    }
+                    var totalDuration = this._totalDuration,
+                        tl = this._timeline;
+                    if (time > totalDuration && !uncapped) {
+                        time = totalDuration;
+                    }
+                    this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);
+                    if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.
+                        this._uncache(false);
+                    }
+                    //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.
+                    if (tl._timeline) {
+                        while (tl._timeline) {
+                            if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {
+                                tl.totalTime(tl._totalTime, true);
+                            }
+                            tl = tl._timeline;
+                        }
+                    }
+                }
+                if (this._gc) {
+                    this._enabled(true, false);
+                }
+                if (this._totalTime !== time || this._duration === 0) {
+                    this.render(time, suppressEvents, false);
+                    if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.
+                        _lazyRender();
+                    }
+                }
+            }
+            return this;
+        };
+
+        p.progress = p.totalProgress = function(value, suppressEvents) {
+            return (!arguments.length) ? this._time / this.duration() : this.totalTime(this.duration() * value, suppressEvents);
+        };
+
+        p.startTime = function(value) {
+            if (!arguments.length) {
+                return this._startTime;
+            }
+            if (value !== this._startTime) {
+                this._startTime = value;
+                if (this.timeline) if (this.timeline._sortChildren) {
+                    this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.
+                }
+            }
+            return this;
+        };
+
+        p.timeScale = function(value) {
+            if (!arguments.length) {
+                return this._timeScale;
+            }
+            value = value || _tinyNum; //can't allow zero because it'll throw the math off
+            if (this._timeline && this._timeline.smoothChildTiming) {
+                var pauseTime = this._pauseTime,
+                    t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();
+                this._startTime = t - ((t - this._startTime) * this._timeScale / value);
+            }
+            this._timeScale = value;
+            return this._uncache(false);
+        };
+
+        p.reversed = function(value) {
+            if (!arguments.length) {
+                return this._reversed;
+            }
+            if (value != this._reversed) {
+                this._reversed = value;
+                this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);
+            }
+            return this;
+        };
+
+        p.paused = function(value) {
+            if (!arguments.length) {
+                return this._paused;
+            }
+            if (value != this._paused) if (this._timeline) {
+                if (!_tickerActive && !value) {
+                    _ticker.wake();
+                }
+                var tl = this._timeline,
+                    raw = tl.rawTime(),
+                    elapsed = raw - this._pauseTime;
+                if (!value && tl.smoothChildTiming) {
+                    this._startTime += elapsed;
+                    this._uncache(false);
+                }
+                this._pauseTime = value ? raw : null;
+                this._paused = value;
+                this._active = this.isActive();
+                if (!value && elapsed !== 0 && this._initted && this.duration()) {
+                    this.render((tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale), true, true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.
+                }
+            }
+            if (this._gc && !value) {
+                this._enabled(true, false);
+            }
+            return this;
+        };
+
+
+/*
+ * ----------------------------------------------------------------
+ * SimpleTimeline
+ * ----------------------------------------------------------------
+ */
+        var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {
+            Animation.call(this, 0, vars);
+            this.autoRemoveChildren = this.smoothChildTiming = true;
+        });
+
+        p = SimpleTimeline.prototype = new Animation();
+        p.constructor = SimpleTimeline;
+        p.kill()._gc = false;
+        p._first = p._last = null;
+        p._sortChildren = false;
+
+        p.add = p.insert = function(child, position, align, stagger) {
+            var prevTween, st;
+            child._startTime = Number(position || 0) + child._delay;
+            if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).
+                child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);
+            }
+            if (child.timeline) {
+                child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.
+            }
+            child.timeline = child._timeline = this;
+            if (child._gc) {
+                child._enabled(true, true);
+            }
+            prevTween = this._last;
+            if (this._sortChildren) {
+                st = child._startTime;
+                while (prevTween && prevTween._startTime > st) {
+                    prevTween = prevTween._prev;
+                }
+            }
+            if (prevTween) {
+                child._next = prevTween._next;
+                prevTween._next = child;
+            } else {
+                child._next = this._first;
+                this._first = child;
+            }
+            if (child._next) {
+                child._next._prev = child;
+            } else {
+                this._last = child;
+            }
+            child._prev = prevTween;
+            if (this._timeline) {
+                this._uncache(true);
+            }
+            return this;
+        };
+
+        p._remove = function(tween, skipDisable) {
+            if (tween.timeline === this) {
+                if (!skipDisable) {
+                    tween._enabled(false, true);
+                }
+                tween.timeline = null;
+
+                if (tween._prev) {
+                    tween._prev._next = tween._next;
+                } else if (this._first === tween) {
+                    this._first = tween._next;
+                }
+                if (tween._next) {
+                    tween._next._prev = tween._prev;
+                } else if (this._last === tween) {
+                    this._last = tween._prev;
+                }
+
+                if (this._timeline) {
+                    this._uncache(true);
+                }
+            }
+            return this;
+        };
+
+        p.render = function(time, suppressEvents, force) {
+            var tween = this._first,
+                next;
+            this._totalTime = this._time = this._rawPrevTime = time;
+            while (tween) {
+                next = tween._next; //record it here because the value could change after rendering...
+                if (tween._active || (time >= tween._startTime && !tween._paused)) {
+                    if (!tween._reversed) {
+                        tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);
+                    } else {
+                        tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);
+                    }
+                }
+                tween = next;
+            }
+        };
+
+        p.rawTime = function() {
+            if (!_tickerActive) {
+                _ticker.wake();
+            }
+            return this._totalTime;
+        };
+
+/*
+ * ----------------------------------------------------------------
+ * TweenLite
+ * ----------------------------------------------------------------
+ */
+        var TweenLite = _class("TweenLite", function(target, duration, vars) {
+                Animation.call(this, duration, vars);
+                this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)
+
+                if (target == null) {
+                    throw "Cannot tween a null target.";
+                }
+
+                this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
+
+                var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),
+                    overwrite = this.vars.overwrite,
+                    i, targ, targets;
+
+                this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];
+
+                if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {
+                    this._targets = targets = _slice.call(target, 0);
+                    this._propLookup = [];
+                    this._siblings = [];
+                    for (i = 0; i < targets.length; i++) {
+                        targ = targets[i];
+                        if (!targ) {
+                            targets.splice(i--, 1);
+                            continue;
+                        } else if (typeof(targ) === "string") {
+                            targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings
+                            if (typeof(targ) === "string") {
+                                targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)
+                            }
+                            continue;
+                        } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.
+                            targets.splice(i--, 1);
+                            this._targets = targets = targets.concat(_slice.call(targ, 0));
+                            continue;
+                        }
+                        this._siblings[i] = _register(targ, this, false);
+                        if (overwrite === 1) if (this._siblings[i].length > 1) {
+                            _applyOverwrite(targ, this, null, 1, this._siblings[i]);
+                        }
+                    }
+
+                } else {
+                    this._propLookup = {};
+                    this._siblings = _register(target, this, false);
+                    if (overwrite === 1) if (this._siblings.length > 1) {
+                        _applyOverwrite(target, this, null, 1, this._siblings);
+                    }
+                }
+                if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {
+                    this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)
+                    this.render(-this._delay);
+                }
+            }, true),
+            _isSelector = function(v) {
+                return (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.
+            },
+            _autoCSS = function(vars, target) {
+                var css = {},
+                    p;
+                for (p in vars) {
+                    if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.
+                        css[p] = vars[p];
+                        delete vars[p];
+                    }
+                }
+                vars.css = css;
+            };
+
+        p = TweenLite.prototype = new Animation();
+        p.constructor = TweenLite;
+        p.kill()._gc = false;
+
+//----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------
+
+        p.ratio = 0;
+        p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;
+        p._notifyPluginsOfEnabled = p._lazy = false;
+
+        TweenLite.version = "1.12.1";
+        TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);
+        TweenLite.defaultOverwrite = "auto";
+        TweenLite.ticker = _ticker;
+        TweenLite.autoSleep = true;
+        TweenLite.lagSmoothing = function(threshold, adjustedLag) {
+            _ticker.lagSmoothing(threshold, adjustedLag);
+        };
+        TweenLite.selector = window.$ || window.jQuery || function(e) { if (window.$) { TweenLite.selector = window.$; return window.$(e); } return window.document ? window.document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e) : e; };
+
+        var _lazyTweens = [],
+            _lazyLookup = {},
+            _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.
+            _plugins = TweenLite._plugins = {},
+            _tweenLookup = _internals.tweenLookup = {},
+            _tweenLookupNum = 0,
+            _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1},
+            _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},
+            _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),
+            _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),
+            _lazyRender = function() {
+                var i = _lazyTweens.length;
+                _lazyLookup = {};
+                while (--i > -1) {
+                    a = _lazyTweens[i];
+                    if (a && a._lazy !== false) {
+                        a.render(a._lazy, false, true);
+                        a._lazy = false;
+                    }
+                }
+                _lazyTweens.length = 0;
+            };
+
+        _rootTimeline._startTime = _ticker.time;
+        _rootFramesTimeline._startTime = _ticker.frame;
+        _rootTimeline._active = _rootFramesTimeline._active = true;
+        setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".
+
+        Animation._updateRoot = TweenLite.render = function() {
+                var i, a, p;
+                if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.
+                    _lazyRender();
+                }
+                _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);
+                _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);
+                if (_lazyTweens.length) {
+                    _lazyRender();
+                }
+                if (!(_ticker.frame % 120)) { //dump garbage every 120 frames...
+                    for (p in _tweenLookup) {
+                        a = _tweenLookup[p].tweens;
+                        i = a.length;
+                        while (--i > -1) {
+                            if (a[i]._gc) {
+                                a.splice(i, 1);
+                            }
+                        }
+                        if (a.length === 0) {
+                            delete _tweenLookup[p];
+                        }
+                    }
+                    //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly
+                    p = _rootTimeline._first;
+                    if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {
+                        while (p && p._paused) {
+                            p = p._next;
+                        }
+                        if (!p) {
+                            _ticker.sleep();
+                        }
+                    }
+                }
+            };
+
+        _ticker.addEventListener("tick", Animation._updateRoot);
+
+        var _register = function(target, tween, scrub) {
+                var id = target._gsTweenID, a, i;
+                if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {
+                    _tweenLookup[id] = {target:target, tweens:[]};
+                }
+                if (tween) {
+                    a = _tweenLookup[id].tweens;
+                    a[(i = a.length)] = tween;
+                    if (scrub) {
+                        while (--i > -1) {
+                            if (a[i] === tween) {
+                                a.splice(i, 1);
+                            }
+                        }
+                    }
+                }
+                return _tweenLookup[id].tweens;
+            },
+
+            _applyOverwrite = function(target, tween, props, mode, siblings) {
+                var i, changed, curTween, l;
+                if (mode === 1 || mode >= 4) {
+                    l = siblings.length;
+                    for (i = 0; i < l; i++) {
+                        if ((curTween = siblings[i]) !== tween) {
+                            if (!curTween._gc) if (curTween._enabled(false, false)) {
+                                changed = true;
+                            }
+                        } else if (mode === 5) {
+                            break;
+                        }
+                    }
+                    return changed;
+                }
+                //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)
+                var startTime = tween._startTime + _tinyNum,
+                    overlaps = [],
+                    oCount = 0,
+                    zeroDur = (tween._duration === 0),
+                    globalStart;
+                i = siblings.length;
+                while (--i > -1) {
+                    if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {
+                        //ignore
+                    } else if (curTween._timeline !== tween._timeline) {
+                        globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);
+                        if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {
+                            overlaps[oCount++] = curTween;
+                        }
+                    } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {
+                        overlaps[oCount++] = curTween;
+                    }
+                }
+
+                i = oCount;
+                while (--i > -1) {
+                    curTween = overlaps[i];
+                    if (mode === 2) if (curTween._kill(props, target)) {
+                        changed = true;
+                    }
+                    if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {
+                        if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.
+                            changed = true;
+                        }
+                    }
+                }
+                return changed;
+            },
+
+            _checkOverlap = function(tween, reference, zeroDur) {
+                var tl = tween._timeline,
+                    ts = tl._timeScale,
+                    t = tween._startTime;
+                while (tl._timeline) {
+                    t += tl._startTime;
+                    ts *= tl._timeScale;
+                    if (tl._paused) {
+                        return -100;
+                    }
+                    tl = tl._timeline;
+                }
+                t /= ts;
+                return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;
+            };
+
+
+//---- TweenLite instance methods -----------------------------------------------------------------------------
+
+        p._init = function() {
+            var v = this.vars,
+                op = this._overwrittenProps,
+                dur = this._duration,
+                immediate = !!v.immediateRender,
+                ease = v.ease,
+                i, initPlugins, pt, p, startVars;
+            if (v.startAt) {
+                if (this._startAt) {
+                    this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.
+                    this._startAt.kill();
+                }
+                startVars = {};
+                for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);
+                    startVars[p] = v.startAt[p];
+                }
+                startVars.overwrite = false;
+                startVars.immediateRender = true;
+                startVars.lazy = (immediate && v.lazy !== false);
+                startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).
+                this._startAt = TweenLite.to(this.target, 0, startVars);
+                if (immediate) {
+                    if (this._time > 0) {
+                        this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).
+                    } else if (dur !== 0) {
+                        return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.
+                    }
+                }
+            } else if (v.runBackwards && dur !== 0) {
+                //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)
+                if (this._startAt) {
+                    this._startAt.render(-1, true);
+                    this._startAt.kill();
+                    this._startAt = null;
+                } else {
+                    pt = {};
+                    for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.
+                        if (!_reservedProps[p] || p === "autoCSS") {
+                            pt[p] = v[p];
+                        }
+                    }
+                    pt.overwrite = 0;
+                    pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.
+                    pt.lazy = (immediate && v.lazy !== false);
+                    pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)
+                    this._startAt = TweenLite.to(this.target, 0, pt);
+                    if (!immediate) {
+                        this._startAt._init(); //ensures that the initial values are recorded
+                        this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.
+                    } else if (this._time === 0) {
+                        return;
+                    }
+                }
+            }
+            if (!ease) {
+                this._ease = TweenLite.defaultEase;
+            } else if (ease instanceof Ease) {
+                this._ease = (v.easeParams instanceof Array) ? ease.config.apply(ease, v.easeParams) : ease;
+            } else {
+                this._ease = (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;
+            }
+            this._easeType = this._ease._type;
+            this._easePower = this._ease._power;
+            this._firstPT = null;
+
+            if (this._targets) {
+                i = this._targets.length;
+                while (--i > -1) {
+                    if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null)) ) {
+                        initPlugins = true;
+                    }
+                }
+            } else {
+                initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op);
+            }
+
+            if (initPlugins) {
+                TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite
+            }
+            if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.
+                this._enabled(false, false);
+            }
+            if (v.runBackwards) {
+                pt = this._firstPT;
+                while (pt) {
+                    pt.s += pt.c;
+                    pt.c = -pt.c;
+                    pt = pt._next;
+                }
+            }
+            this._onUpdate = v.onUpdate;
+            this._initted = true;
+        };
+
+        p._initProps = function(target, propLookup, siblings, overwrittenProps) {
+            var p, i, initPlugins, plugin, pt, v;
+            if (target == null) {
+                return false;
+            }
+
+            if (_lazyLookup[target._gsTweenID]) {
+                _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)
+            }
+
+            if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.
+                _autoCSS(this.vars, target);
+            }
+            for (p in this.vars) {
+                v = this.vars[p];
+                if (_reservedProps[p]) {
+                    if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {
+                        this.vars[p] = v = this._swapSelfInParams(v, this);
+                    }
+
+                } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this)) {
+
+                    //t - target        [object]
+                    //p - property      [string]
+                    //s - start         [number]
+                    //c - change        [number]
+                    //f - isFunction    [boolean]
+                    //n - name          [string]
+                    //pg - isPlugin     [boolean]
+                    //pr - priority     [number]
+                    this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:true, n:p, pg:true, pr:plugin._priority};
+                    i = plugin._overwriteProps.length;
+                    while (--i > -1) {
+                        propLookup[plugin._overwriteProps[i]] = this._firstPT;
+                    }
+                    if (plugin._priority || plugin._onInitAllProps) {
+                        initPlugins = true;
+                    }
+                    if (plugin._onDisable || plugin._onEnable) {
+                        this._notifyPluginsOfEnabled = true;
+                    }
+
+                } else {
+                    this._firstPT = propLookup[p] = pt = {_next:this._firstPT, t:target, p:p, f:(typeof(target[p]) === "function"), n:p, pg:false, pr:0};
+                    pt.s = (!pt.f) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();
+                    pt.c = (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : (Number(v) - pt.s) || 0;
+                }
+                if (pt) if (pt._next) {
+                    pt._next._prev = pt;
+                }
+            }
+
+            if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)
+                return this._initProps(target, propLookup, siblings, overwrittenProps);
+            }
+            if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {
+                this._kill(propLookup, target);
+                return this._initProps(target, propLookup, siblings, overwrittenProps);
+            }
+            if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.
+                _lazyLookup[target._gsTweenID] = true;
+            }
+            return initPlugins;
+        };
+
+        p.render = function(time, suppressEvents, force) {
+            var prevTime = this._time,
+                duration = this._duration,
+                prevRawPrevTime = this._rawPrevTime,
+                isComplete, callback, pt, rawPrevTime;
+            if (time >= duration) {
+                this._totalTime = this._time = duration;
+                this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;
+                if (!this._reversed ) {
+                    isComplete = true;
+                    callback = "onComplete";
+                }
+                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.
+                        time = 0;
+                    }
+                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {
+                        force = true;
+                        if (prevRawPrevTime > _tinyNum) {
+                            callback = "onReverseComplete";
+                        }
+                    }
+                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                }
+
+            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.
+                this._totalTime = this._time = 0;
+                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;
+                if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {
+                    callback = "onReverseComplete";
+                    isComplete = this._reversed;
+                }
+                if (time < 0) {
+                    this._active = false;
+                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.
+                        if (prevRawPrevTime >= 0) {
+                            force = true;
+                        }
+                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.
+                    }
+                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.
+                    force = true;
+                }
+            } else {
+                this._totalTime = this._time = time;
+
+                if (this._easeType) {
+                    var r = time / duration, type = this._easeType, pow = this._easePower;
+                    if (type === 1 || (type === 3 && r >= 0.5)) {
+                        r = 1 - r;
+                    }
+                    if (type === 3) {
+                        r *= 2;
+                    }
+                    if (pow === 1) {
+                        r *= r;
+                    } else if (pow === 2) {
+                        r *= r * r;
+                    } else if (pow === 3) {
+                        r *= r * r * r;
+                    } else if (pow === 4) {
+                        r *= r * r * r * r;
+                    }
+
+                    if (type === 1) {
+                        this.ratio = 1 - r;
+                    } else if (type === 2) {
+                        this.ratio = r;
+                    } else if (time / duration < 0.5) {
+                        this.ratio = r / 2;
+                    } else {
+                        this.ratio = 1 - (r / 2);
+                    }
+
+                } else {
+                    this.ratio = this._ease.getRatio(time / duration);
+                }
+            }
+
+            if (this._time === prevTime && !force) {
+                return;
+            } else if (!this._initted) {
+                this._init();
+                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.
+                    return;
+                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {
+                    this._time = this._totalTime = prevTime;
+                    this._rawPrevTime = prevRawPrevTime;
+                    _lazyTweens.push(this);
+                    this._lazy = time;
+                    return;
+                }
+                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.
+                if (this._time && !isComplete) {
+                    this.ratio = this._ease.getRatio(this._time / duration);
+                } else if (isComplete && this._ease._calcEnd) {
+                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);
+                }
+            }
+            if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occuring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.
+                this._lazy = false;
+            }
+            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {
+                this._active = true;  //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.
+            }
+            if (prevTime === 0) {
+                if (this._startAt) {
+                    if (time >= 0) {
+                        this._startAt.render(time, suppressEvents, force);
+                    } else if (!callback) {
+                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.
+                    }
+                }
+                if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {
+                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);
+                }
+            }
+
+            pt = this._firstPT;
+            while (pt) {
+                if (pt.f) {
+                    pt.t[pt.p](pt.c * this.ratio + pt.s);
+                } else {
+                    pt.t[pt.p] = pt.c * this.ratio + pt.s;
+                }
+                pt = pt._next;
+            }
+
+            if (this._onUpdate) {
+                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
+                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.
+                }
+                if (!suppressEvents) if (this._time !== prevTime || isComplete) {
+                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);
+                }
+            }
+
+            if (callback) if (!this._gc) { //check _gc because there's a chance that kill() could be called in an onUpdate
+                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.
+                    this._startAt.render(time, suppressEvents, force);
+                }
+                if (isComplete) {
+                    if (this._timeline.autoRemoveChildren) {
+                        this._enabled(false, false);
+                    }
+                    this._active = false;
+                }
+                if (!suppressEvents && this.vars[callback]) {
+                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);
+                }
+                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.
+                    this._rawPrevTime = 0;
+                }
+            }
+
+        };
+
+        p._kill = function(vars, target) {
+            if (vars === "all") {
+                vars = null;
+            }
+            if (vars == null) if (target == null || target === this.target) {
+                this._lazy = false;
+                return this._enabled(false, false);
+            }
+            target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;
+            var i, overwrittenProps, p, pt, propLookup, changed, killProps, record;
+            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
+                i = target.length;
+                while (--i > -1) {
+                    if (this._kill(vars, target[i])) {
+                        changed = true;
+                    }
+                }
+            } else {
+                if (this._targets) {
+                    i = this._targets.length;
+                    while (--i > -1) {
+                        if (target === this._targets[i]) {
+                            propLookup = this._propLookup[i] || {};
+                            this._overwrittenProps = this._overwrittenProps || [];
+                            overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";
+                            break;
+                        }
+                    }
+                } else if (target !== this.target) {
+                    return false;
+                } else {
+                    propLookup = this._propLookup;
+                    overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";
+                }
+
+                if (propLookup) {
+                    killProps = vars || propLookup;
+                    record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)
+                    for (p in killProps) {
+                        if ((pt = propLookup[p])) {
+                            if (pt.pg && pt.t._kill(killProps)) {
+                                changed = true; //some plugins need to be notified so they can perform cleanup tasks first
+                            }
+                            if (!pt.pg || pt.t._overwriteProps.length === 0) {
+                                if (pt._prev) {
+                                    pt._prev._next = pt._next;
+                                } else if (pt === this._firstPT) {
+                                    this._firstPT = pt._next;
+                                }
+                                if (pt._next) {
+                                    pt._next._prev = pt._prev;
+                                }
+                                pt._next = pt._prev = null;
+                            }
+                            delete propLookup[p];
+                        }
+                        if (record) {
+                            overwrittenProps[p] = 1;
+                        }
+                    }
+                    if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.
+                        this._enabled(false, false);
+                    }
+                }
+            }
+            return changed;
+        };
+
+        p.invalidate = function() {
+            if (this._notifyPluginsOfEnabled) {
+                TweenLite._onPluginEvent("_onDisable", this);
+            }
+            this._firstPT = null;
+            this._overwrittenProps = null;
+            this._onUpdate = null;
+            this._startAt = null;
+            this._initted = this._active = this._notifyPluginsOfEnabled = this._lazy = false;
+            this._propLookup = (this._targets) ? {} : [];
+            return this;
+        };
+
+        p._enabled = function(enabled, ignoreTimeline) {
+            if (!_tickerActive) {
+                _ticker.wake();
+            }
+            if (enabled && this._gc) {
+                var targets = this._targets,
+                    i;
+                if (targets) {
+                    i = targets.length;
+                    while (--i > -1) {
+                        this._siblings[i] = _register(targets[i], this, true);
+                    }
+                } else {
+                    this._siblings = _register(this.target, this, true);
+                }
+            }
+            Animation.prototype._enabled.call(this, enabled, ignoreTimeline);
+            if (this._notifyPluginsOfEnabled) if (this._firstPT) {
+                return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);
+            }
+            return false;
+        };
+
+
+//----TweenLite static methods -----------------------------------------------------
+
+        TweenLite.to = function(target, duration, vars) {
+            return new TweenLite(target, duration, vars);
+        };
+
+        TweenLite.from = function(target, duration, vars) {
+            vars.runBackwards = true;
+            vars.immediateRender = (vars.immediateRender != false);
+            return new TweenLite(target, duration, vars);
+        };
+
+        TweenLite.fromTo = function(target, duration, fromVars, toVars) {
+            toVars.startAt = fromVars;
+            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);
+            return new TweenLite(target, duration, toVars);
+        };
+
+        TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {
+            return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});
+        };
+
+        TweenLite.set = function(target, vars) {
+            return new TweenLite(target, 0, vars);
+        };
+
+        TweenLite.getTweensOf = function(target, onlyActive) {
+            if (target == null) { return []; }
+            target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;
+            var i, a, j, t;
+            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {
+                i = target.length;
+                a = [];
+                while (--i > -1) {
+                    a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));
+                }
+                i = a.length;
+                //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)
+                while (--i > -1) {
+                    t = a[i];
+                    j = i;
+                    while (--j > -1) {
+                        if (t === a[j]) {
+                            a.splice(i, 1);
+                        }
+                    }
+                }
+            } else {
+                a = _register(target).concat();
+                i = a.length;
+                while (--i > -1) {
+                    if (a[i]._gc || (onlyActive && !a[i].isActive())) {
+                        a.splice(i, 1);
+                    }
+                }
+            }
+            return a;
+        };
+
+        TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {
+            if (typeof(onlyActive) === "object") {
+                vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)
+                onlyActive = false;
+            }
+            var a = TweenLite.getTweensOf(target, onlyActive),
+                i = a.length;
+            while (--i > -1) {
+                a[i]._kill(vars, target);
+            }
+        };
+
+
+
+/*
+ * ----------------------------------------------------------------
+ * TweenPlugin   (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another <script> call before loading plugins which is easy to forget)
+ * ----------------------------------------------------------------
+ */
+        var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {
+                    this._overwriteProps = (props || "").split(",");
+                    this._propName = this._overwriteProps[0];
+                    this._priority = priority || 0;
+                    this._super = TweenPlugin.prototype;
+                }, true);
+
+        p = TweenPlugin.prototype;
+        TweenPlugin.version = "1.10.1";
+        TweenPlugin.API = 2;
+        p._firstPT = null;
+
+        p._addTween = function(target, prop, start, end, overwriteProp, round) {
+            var c, pt;
+            if (end != null && (c = (typeof(end) === "number" || end.charAt(1) !== "=") ? Number(end) - start : parseInt(end.charAt(0) + "1", 10) * Number(end.substr(2)))) {
+                this._firstPT = pt = {_next:this._firstPT, t:target, p:prop, s:start, c:c, f:(typeof(target[prop]) === "function"), n:overwriteProp || prop, r:round};
+                if (pt._next) {
+                    pt._next._prev = pt;
+                }
+                return pt;
+            }
+        };
+
+        p.setRatio = function(v) {
+            var pt = this._firstPT,
+                min = 0.000001,
+                val;
+            while (pt) {
+                val = pt.c * v + pt.s;
+                if (pt.r) {
+                    val = Math.round(val);
+                } else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser
+                    val = 0;
+                }
+                if (pt.f) {
+                    pt.t[pt.p](val);
+                } else {
+                    pt.t[pt.p] = val;
+                }
+                pt = pt._next;
+            }
+        };
+
+        p._kill = function(lookup) {
+            var a = this._overwriteProps,
+                pt = this._firstPT,
+                i;
+            if (lookup[this._propName] != null) {
+                this._overwriteProps = [];
+            } else {
+                i = a.length;
+                while (--i > -1) {
+                    if (lookup[a[i]] != null) {
+                        a.splice(i, 1);
+                    }
+                }
+            }
+            while (pt) {
+                if (lookup[pt.n] != null) {
+                    if (pt._next) {
+                        pt._next._prev = pt._prev;
+                    }
+                    if (pt._prev) {
+                        pt._prev._next = pt._next;
+                        pt._prev = null;
+                    } else if (this._firstPT === pt) {
+                        this._firstPT = pt._next;
+                    }
+                }
+                pt = pt._next;
+            }
+            return false;
+        };
+
+        p._roundProps = function(lookup, value) {
+            var pt = this._firstPT;
+            while (pt) {
+                if (lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ])) { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.
+                    pt.r = value;
+                }
+                pt = pt._next;
+            }
+        };
+
+        TweenLite._onPluginEvent = function(type, tween) {
+            var pt = tween._firstPT,
+                changed, pt2, first, last, next;
+            if (type === "_onInitAllProps") {
+                //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.
+                while (pt) {
+                    next = pt._next;
+                    pt2 = first;
+                    while (pt2 && pt2.pr > pt.pr) {
+                        pt2 = pt2._next;
+                    }
+                    if ((pt._prev = pt2 ? pt2._prev : last)) {
+                        pt._prev._next = pt;
+                    } else {
+                        first = pt;
+                    }
+                    if ((pt._next = pt2)) {
+                        pt2._prev = pt;
+                    } else {
+                        last = pt;
+                    }
+                    pt = next;
+                }
+                pt = tween._firstPT = first;
+            }
+            while (pt) {
+                if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {
+                    changed = true;
+                }
+                pt = pt._next;
+            }
+            return changed;
+        };
+
+        TweenPlugin.activate = function(plugins) {
+            var i = plugins.length;
+            while (--i > -1) {
+                if (plugins[i].API === TweenPlugin.API) {
+                    _plugins[(new plugins[i]())._propName] = plugins[i];
+                }
+            }
+            return true;
+        };
+
+        //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.
+        _gsDefine.plugin = function(config) {
+            if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }
+            var propName = config.propName,
+                priority = config.priority || 0,
+                overwriteProps = config.overwriteProps,
+                map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_roundProps", initAll:"_onInitAllProps"},
+                Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",
+                    function() {
+                        TweenPlugin.call(this, propName, priority);
+                        this._overwriteProps = overwriteProps || [];
+                    }, (config.global === true)),
+                p = Plugin.prototype = new TweenPlugin(propName),
+                prop;
+            p.constructor = Plugin;
+            Plugin.API = config.API;
+            for (prop in map) {
+                if (typeof(config[prop]) === "function") {
+                    p[map[prop]] = config[prop];
+                }
+            }
+            Plugin.version = config.version;
+            TweenPlugin.activate([Plugin]);
+            return Plugin;
+        };
+
+
+        //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.
+        a = window._gsQueue;
+        if (a) {
+            for (i = 0; i < a.length; i++) {
+                a[i]();
+            }
+            for (p in _defLookup) {
+                if (!_defLookup[p].func) {
+                    //window.console.log("GSAP encountered missing dependency: com.greensock." + p);
+                }
+            }
+        }
+
+        _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated
+
+})(window);
+
+angular.module('b2b.att.collapse', ['b2b.att.transition'])
+
+// The collapsible directive indicates a block of html that will expand and collapse
+.directive('b2bCollapse', ['$transition', function($transition) {
+    // CSS transitions don't work with height: auto, so we have to manually change the height to a
+    // specific value and then once the animation completes, we can reset the height to auto.
+    // Unfortunately if you do this while the CSS transitions are specified (i.e. in the CSS class
+    // "collapse") then you trigger a change to height 0 in between.
+    // The fix is to remove the "collapse" CSS class while changing the height back to auto - phew!
+
+    var props = {
+        open: {
+            marginTop: null,
+            marginBottom: null,
+            paddingTop: null,
+            paddingBottom: null,
+            display: 'block'
+        },
+        closed: {
+            marginTop: 0,
+            marginBottom: 0,
+            paddingTop: 0,
+            paddingBottom: 0,
+            display: 'none'
+        }
+    };
+
+    var fixUpHeight = function(scope, element, height) {
+        // We remove the collapse CSS class to prevent a transition when we change to height: auto
+        element.removeClass('b2bCollapse');
+        element.css({height: height});
+        //adjusting for any margin or padding
+        if (height === 0) {
+            element.css(props.closed);
+        } else {
+            element.css(props.open);
+        }
+        // It appears that  reading offsetWidth makes the browser realise that we have changed the
+        // height already :-/
+        var x = element[0].offsetWidth;
+        element.addClass('b2bCollapse');
+    };
+
+    return {
+        link: function(scope, element, attrs) {
+            var isCollapsed;
+            var initialAnimSkip = true;
+            scope.$watch(function() {
+                return element[0].scrollHeight;
+            }, function(value) {
+                //The listener is called when scrollHeight changes
+                //It actually does on 2 scenarios: 
+                // 1. Parent is set to display none
+                // 2. angular bindings inside are resolved
+                //When we have a change of scrollHeight we are setting again the correct height if the group is opened
+                if (element[0].scrollHeight !== 0) {
+                    if (!isCollapsed) {
+                        if (initialAnimSkip) {
+                            fixUpHeight(scope, element, element[0].scrollHeight + 'px');
+                        } else {
+                            fixUpHeight(scope, element, 'auto');
+                            element.css({overflow: 'visible'});
+                        }
+                    }
+                }
+            });
+
+            scope.$watch(attrs.b2bCollapse, function(value) {
+                if (value) {
+                    collapse();
+                } else {
+                    expand();
+                }
+            });
+
+
+            var currentTransition;
+            var doTransition = function(change) {
+                if (currentTransition) {
+                    currentTransition.cancel();
+                }
+                currentTransition = $transition(element, change);
+                currentTransition.then(
+                        function() {
+                            currentTransition = undefined;
+                        },
+                        function() {
+                            currentTransition = undefined;
+                        }
+                );
+                return currentTransition;
+            };
+
+            var expand = function() {
+                scope.postTransition = true; 
+                if (initialAnimSkip) {
+                    initialAnimSkip = false;
+                    if (!isCollapsed) {
+                        fixUpHeight(scope, element, 'auto');
+                    }
+                } else {
+                    //doTransition({ height : element[0].scrollHeight + 'px' })
+                    doTransition(angular.extend({height: element[0].scrollHeight + 'px'}, props.open))
+                            .then(function() {
+                                // This check ensures that we don't accidentally update the height if the user has closed
+                                // the group while the animation was still running
+                                if (!isCollapsed) {
+                                    fixUpHeight(scope, element, 'auto');
+                                }
+                            });
+                }
+                isCollapsed = false;
+            };
+
+            var collapse = function() {
+                isCollapsed = true;
+                if (initialAnimSkip) {
+                    initialAnimSkip = false;
+                    fixUpHeight(scope, element, 0);
+                } else {
+                    fixUpHeight(scope, element, element[0].scrollHeight + 'px');
+                    doTransition(angular.extend({height: 0}, props.closed)).then(function() {
+                        scope.postTransition = false;
+                    });
+                    element.css({overflow: 'hidden'});
+                }
+            };
+        }
+    };
+}]);
+angular.module('b2b.att.position', [])
+
+.factory('$position', ['$document', '$window', function ($document, $window) {
+    function getStyle(el, cssprop) {
+        if (el.currentStyle) { //IE
+            return el.currentStyle[cssprop];
+        } else if ($window.getComputedStyle) {
+            return $window.getComputedStyle(el)[cssprop];
+        }
+        // finally try and get inline style
+        return el.style[cssprop];
+    }
+
+    /**
+     * Checks if a given element is statically positioned
+     * @param element - raw DOM element
+     */
+    function isStaticPositioned(element) {
+        return (getStyle(element, "position") || 'static') === 'static';
+    }
+
+    /**
+     * returns the closest, non-statically positioned parentOffset of a given element
+     * @param element
+     */
+    var parentOffsetEl = function (element) {
+        var docDomEl = $document[0];
+        var offsetParent = element.offsetParent || docDomEl;
+        while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {
+            offsetParent = offsetParent.offsetParent;
+        }
+        return offsetParent || docDomEl;
+    };
+
+    return {
+        /**
+         * Provides read-only equivalent of jQuery's position function:
+         * http://api.jquery.com/position/
+         */
+        position: function (element) {
+            var elBCR = this.offset(element);
+            var offsetParentBCR = {
+                top: 0,
+                left: 0
+            };
+            var offsetParentEl = parentOffsetEl(element[0]);
+            if (offsetParentEl !== $document[0]) {
+                offsetParentBCR = this.offset(angular.element(offsetParentEl));
+                offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;
+                offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;
+            }
+
+            return {
+                width: element.prop('offsetWidth'),
+                height: element.prop('offsetHeight'),
+                top: elBCR.top - offsetParentBCR.top,
+                left: elBCR.left - offsetParentBCR.left
+            };
+        },
+
+        /**
+         * Provides read-only equivalent of jQuery's offset function:
+         * http://api.jquery.com/offset/
+         */
+        offset: function (element) {
+            var boundingClientRect = element[0].getBoundingClientRect();
+            return {
+                width: element.prop('offsetWidth'),
+                height: element.prop('offsetHeight'),
+                top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),
+                left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)
+            };
+        },
+        
+         /**
+         * Provides functionality to check whether an element is in view port.
+         */
+        isElementInViewport: function (element) {
+            if (element) {
+                var rect = element[0].getBoundingClientRect();
+                return (
+                    rect.top >= 0 &&
+                    rect.left >= 0 &&
+                    rect.bottom <= ($window.innerHeight || $document[0].documentElement.clientHeight) &&
+                    rect.right <= ($window.innerWidth || $document[0].documentElement.clientWidth)
+                );
+            } else {
+                return false;
+            }
+        }
+    };
+}])
+
+.factory('$isElement', [function () {
+    var isElement = function (currentElem, targetElem, alternateElem) {
+        if (currentElem[0] === targetElem[0]) {
+            return true;
+        } else if (currentElem[0] === alternateElem[0]) {
+            return false;
+        } else {
+            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);
+        }
+    };
+
+    return isElement;
+}])
+
+.directive('attPosition', ['$position', function ($position) {
+    return {
+        restrict: 'A',
+        link: function (scope, elem, attr) {
+            scope.$watchCollection(function () {
+                return $position.position(elem);
+            }, function (value) {
+                scope[attr.attPosition] = value;
+            });
+        }
+    };
+}]);
+
+angular.module('b2b.att.transition', [])
+
+.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {
+
+  var $transition = function(element, trigger, options) {
+    options = options || {};
+    var deferred = $q.defer();
+    var endEventName = $transition[options.animation ? "animationEndEventName" : "transitionEndEventName"];
+
+    var transitionEndHandler = function() {
+      $rootScope.$apply(function() {
+        element.unbind(endEventName, transitionEndHandler);
+        deferred.resolve(element);
+      });
+    };
+
+    if (endEventName) {
+      element.bind(endEventName, transitionEndHandler);
+    }
+
+    // Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur
+    $timeout(function() {
+      if ( angular.isString(trigger) ) {
+        element.addClass(trigger);
+      } else if ( angular.isFunction(trigger) ) {
+        trigger(element);
+      } else if ( angular.isObject(trigger) ) {
+        element.css(trigger);
+      }
+      //If browser does not support transitions, instantly resolve
+      if ( !endEventName ) {
+        deferred.resolve(element);
+      }
+    }, 100);
+
+    // Add our custom cancel function to the promise that is returned
+    // We can call this if we are about to run a new transition, which we know will prevent this transition from ending,
+    // i.e. it will therefore never raise a transitionEnd event for that transition
+    deferred.promise.cancel = function() {
+      if ( endEventName ) {
+        element.unbind(endEventName, transitionEndHandler);
+      }
+      deferred.reject('Transition cancelled');
+    };
+
+    return deferred.promise;
+  };
+
+  // Work out the name of the transitionEnd event
+  var transElement = document.createElement('trans');
+  var transitionEndEventNames = {
+    'WebkitTransition': 'webkitTransitionEnd',
+    'MozTransition': 'transitionend',
+    'OTransition': 'oTransitionEnd',
+    'transition': 'transitionend'
+  };
+  var animationEndEventNames = {
+    'WebkitTransition': 'webkitAnimationEnd',
+    'MozTransition': 'animationend',
+    'OTransition': 'oAnimationEnd',
+    'transition': 'animationend'
+  };
+  function findEndEventName(endEventNames) {
+    for (var name in endEventNames){
+      if (transElement.style[name] !== undefined) {
+        return endEventNames[name];
+      }
+    }
+  }
+  $transition.transitionEndEventName = findEndEventName(transitionEndEventNames);
+  $transition.animationEndEventName = findEndEventName(animationEndEventNames);
+  return $transition;
+}])
+
+.factory('$scrollTo', ['$window', function($window) {
+    var $scrollTo = function(offsetLeft, offsetTop, duration) {
+        TweenMax.to($window, duration || 1, {scrollTo: {y: offsetTop, x: offsetLeft}, ease: Power4.easeOut});
+    };
+    return $scrollTo;
+}])
+.factory('animation', function(){
+    return TweenMax;
+})
+.factory('$progressBar', function(){
+
+   //Provides a function to pass in code for closure purposes
+   var loadingAnimationCreator = function(onUpdateCallback){
+
+      //Use closure to setup some resuable code
+      var loadingAnimation = function(callback, duration){
+          TweenMax.to({}, duration, {
+              onUpdateParams: ["{self}"],
+              onUpdate: onUpdateCallback,
+              onComplete: callback
+          });
+      };
+      //Returns a function that takes a callback function and a duration for the animation
+      return (function(){
+        return loadingAnimation;
+      })();
+    };
+
+  return loadingAnimationCreator;
+})
+.factory('$height', function(){
+  var heightAnimation = function(element,duration,height,alpha){
+    TweenMax.to(element,
+      duration,
+      {height:height, autoAlpha:alpha},
+      0);
+  };
+  return heightAnimation;
+});
+angular.module('b2b.att.utilities', ['ngSanitize'])
+.constant('b2bUtilitiesConfig', {
+    prev: '37',
+    up: '38',
+    next: '39',
+    down: '40',
+    type: 'list',
+    columns: 1,
+    enableSearch: false,
+    searchTimer: 200,
+    circularTraversal: false
+})
+.constant('b2bWhenScrollEndsConstants', {
+    'threshold': 100,
+    'width': 0,
+    'height': 0
+})
+// All breakpoints ranges from >= min and < max
+.constant('b2bAwdBreakpoints', {
+    breakpoints: {
+        mobile: {
+            min: 1,
+            max: 768
+        },
+        tablet: {
+            min: 768,
+            max: 1025
+        },
+        desktop: {
+            min: 1025,
+            max: 1920
+        }
+    }
+})
+.filter('groupBy', function ($timeout) {
+    //Custom GroupBy Filter for treeNav, returns key string and value.childarray as set of grouped elements
+    return function (data, key) {
+        if (!key) return data;
+        var outputPropertyName = '__groupBy__' + key;
+        if (!data[outputPropertyName]) {
+            var result = {};
+            for (var i = 0; i < data.length; i++) {
+                if (!result[data[i][key]])
+                    result[data[i][key]] = {};
+                if (!result[data[i][key]].childArray) {
+                    result[data[i][key]].childArray = [];
+                }
+                result[data[i][key]].childArray.push(data[i]);
+                if (data[i].activeGrp && data[i].activeGrp == true) {
+                    console.log('make ' + data[i].grpChild + ' active');
+                    result[data[i][key]].showGroup = true;
+                }
+            }
+            Object.defineProperty(result, 'length', {enumerable: false,value: Object.keys(result).length});
+            Object.defineProperty(data, outputPropertyName, {enumerable: false,configurable: true,writable:false,value:result});
+            $timeout(function(){delete data[outputPropertyName];},0,false);
+        }
+        return data[outputPropertyName];
+    };
+})
+.filter('searchObjectPropertiesFilter', [function() {
+    return function(items, searchText, attrs) {
+        if(!searchText){
+            return items;
+        }
+        var filtered = [];
+        searchText = searchText.toLowerCase();
+        angular.forEach(items, function(item) {
+            angular.forEach(attrs, function(attr) {
+                if (item.hasOwnProperty(attr) && item[attr].toLowerCase().includes(searchText)) {
+                    filtered.push(item);
+                    return;
+                }
+            });
+        });
+        return filtered;
+    };
+}])
+.filter('unsafe',[ '$sce', function ($sce) { 
+    return function(val){ 
+       return $sce.trustAsHtml(val); 
+    }; 
+}])
+.filter('b2bHighlight', function () {
+    function escapeRegexp(queryToEscape) {
+        return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
+    }
+    return function (matchItem, query, className) {
+        return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<span class=\"' + className + '\">$&</span>') : matchItem;
+    }
+})
+/*License (MIT)
+Copyright Â© 2013 Matt Diamond
+https://github.com/cwilso/AudioRecorder/blob/master/js/recorderjs/recorder.js
+*/
+.factory('b2bRecorder', function() {
+
+    var Recorder = function(source, cfg) {
+        var WORKER_PATH = 'recorderWorker.js';
+        var config = cfg || {};
+        var bufferLen = config.bufferLen || 4096;
+        this.context = source.context;
+        if(!this.context.createScriptProcessor) {
+            this.node = this.context.createJavacriptProcessor(bufferLen, 2, 2);
+        } else {
+            this.node = this.context.createScriptProcessor(bufferLen, 2, 2);
+        }
+        var workerCode = 'function init(a){sampleRate=a.sampleRate}function record(a){recBuffersL.push(a[0]),recBuffersR.push(a[1]),recLength+=a[0].length}function exportWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=mergeBuffers(recBuffersR,recLength),d=interleave(b,c),e=encodeWAV(d),f=new Blob([e],{type:a});this.postMessage(f)}function exportMonoWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=encodeWAV(b,!0),d=new Blob([c],{type:a});this.postMessage(d)}function getBuffers(){var a=[];a.push(mergeBuffers(recBuffersL,recLength)),a.push(mergeBuffers(recBuffersR,recLength)),this.postMessage(a)}function clear(){recLength=0,recBuffersL=[],recBuffersR=[]}function mergeBuffers(a,b){for(var c=new Float32Array(b),d=0,e=0;e<a.length;e++)c.set(a[e],d),d+=a[e].length;return c}function interleave(a,b){for(var c=a.length+b.length,d=new Float32Array(c),e=0,f=0;e<c;)d[e++]=a[f],d[e++]=b[f],f++;return d}function floatTo16BitPCM(a,b,c){for(var d=0;d<c.length;d++,b+=2){var e=Math.max(-1,Math.min(1,c[d]));a.setInt16(b,e<0?32768*e:32767*e,!0)}}function writeString(a,b,c){for(var d=0;d<c.length;d++)a.setUint8(b+d,c.charCodeAt(d))}function encodeWAV(a,b){var c=new ArrayBuffer(44+2*a.length),d=new DataView(c);return writeString(d,0,"RIFF"),d.setUint32(4,32+2*a.length,!0),writeString(d,8,"WAVE"),writeString(d,12,"fmt "),d.setUint32(16,16,!0),d.setUint16(20,1,!0),d.setUint16(22,b?1:2,!0),d.setUint32(24,sampleRate,!0),d.setUint32(28,4*sampleRate,!0),d.setUint16(32,4,!0),d.setUint16(34,16,!0),writeString(d,36,"data"),d.setUint32(40,2*a.length,!0),floatTo16BitPCM(d,44,a),d}var recLength=0,recBuffersL=[],recBuffersR=[],sampleRate;this.onmessage=function(a){switch(a.data.command){case"init":init(a.data.config);break;case"record":record(a.data.buffer);break;case"exportWAV":exportWAV(a.data.type);break;case"exportMonoWAV":exportMonoWAV(a.data.type);break;case"getBuffers":getBuffers();break;case"clear":clear()}};';
+        var blob = new Blob([workerCode]);
+
+        var worker = new Worker(window.URL.createObjectURL(blob)); //TODO: Use a blob instead
+        worker.postMessage({
+            command: 'init',
+            config: {
+                sampleRate: this.context.sampleRate
+            }
+        });
+        var recording = false,
+            currCallback;
+
+        this.node.onaudioprocess = function(e) {
+            if (!recording) return;
+            worker.postMessage({
+                command: 'record',
+                buffer: [
+                    e.inputBuffer.getChannelData(0),
+                    e.inputBuffer.getChannelData(1)
+                ]
+            });
+        };
+
+        this.configure = function(cfg) {
+            for (var prop in cfg) {//TODO: look into using angular.extend() here
+                if (cfg.hasOwnProperty(prop)) {
+                    config[prop] = cfg[prop];
+                }
+            }
+        };
+
+        this.record = function() {
+            recording = true;
+        };
+
+        this.stop = function() {
+            recording = false;
+        };
+
+        this.clear = function() {
+            worker.postMessage({ command: 'clear' });
+            window.URL.revokeObjectURL(blob);
+        };
+
+        this.getBuffers = function(cb) {
+            currCallback = cb || config.callback;
+            worker.postMessage({ command: 'getBuffers' });
+        };
+
+        this.exportWAV = function(cb, type) {
+            currCallback = cb || config.callback;
+            type = type || config.type || 'audio/wav';
+            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');
+            worker.postMessage({
+                command: 'exportWAV',
+                type: type
+            });
+        };
+
+        this.exportMonoWAV = function(cb, type) {
+            currCallback = cb || config.callback;
+            type = type || config.type || 'audio/wav';
+            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');
+            worker.postMessage({
+                command: 'exportMonoWAV',
+                type: type
+            });
+        };
+
+        worker.onmessage = function(e) {
+            var blob = e.data;
+            currCallback(blob);
+        };
+
+        source.connect(this.node);
+        this.node.connect(this.context.destination); // if the script node is not connected to an output the "onaudioprocess" event is not triggerd in Chrome
+
+    };
+
+    return Recorder;
+
+})
+.factory('b2bViewport', function() {
+  /* Source: https://gist.github.com/bjankord/2399828 */
+  var _viewportWidth = function() {
+    var vpw;
+    var webkit = (!(window.webkitConvertPointFromNodeToPage == null));
+    
+    // Webkit:
+    if ( webkit ) {
+      var vpwtest = document.createElement( "div" );
+      // Sets test div to width 100%, !important overrides any other misc. box model styles that may be set in the CSS
+      vpwtest.style.cssText = "width:100% !important; margin:0 !important; padding:0 !important; border:none !important;";
+      document.documentElement.insertBefore( vpwtest, document.documentElement.firstChild );
+      vpw = vpwtest.offsetWidth;
+      document.documentElement.removeChild( vpwtest );
+    }
+    // IE 6-8:
+    else if ( window.innerWidth === undefined ) { 
+      vpw = document.documentElement.clientWidth; 
+    }
+    // Other:
+    else{
+      vpw =  window.innerWidth;
+    }
+
+    return (vpw);
+  }
+  return {
+    viewportWidth: _viewportWidth
+  };
+})
+.directive('b2bWhenScrollEnds', function(b2bWhenScrollEndsConstants, $log) {
+    return {
+        restrict: 'A',
+        link: function (scope, element, attrs) {
+            /**
+            * Exposed Attributes:
+            *       threshold - integer - number of pixels before scrollbar hits end that callback is called
+            *       width - integer - override for element's width (px)
+            *       height - integer - override for element's height (px)
+            *       axis - string - x/y for scroll bar axis
+            */
+            var threshold = parseInt(attrs.threshold, 10) || b2bWhenScrollEndsConstants.threshold;
+
+            if (!attrs.axis || attrs.axis === '') {
+                $log.warn('axis attribute must be defined for b2bWhenScrollEnds.');
+                return;
+            }
+
+            if (attrs.axis === 'x') {
+                visibleWidth = parseInt(attrs.width, 10) || b2bWhenScrollEndsConstants.width;
+                if (element.css('width')) {
+                    visibleWidth = element.css('width').split('px')[0];  
+                }
+
+                element[0].addEventListener('scroll', function() {
+                    var scrollableWidth = element.prop('scrollWidth');
+                    if (scrollableWidth === undefined) {
+                        scrollableWidth = 1;
+                    }
+                    var hiddenContentWidth = scrollableWidth - visibleWidth;
+
+                    if (hiddenContentWidth - element[0].scrollLeft <= threshold) {
+                        /* Scroll almost at bottom, load more rows */
+                        scope.$apply(attrs.b2bWhenScrollEnds);
+                    }
+                });
+            } else if (attrs.axis === 'y') {
+                visibleHeight = parseInt(attrs.height, 10) || b2bWhenScrollEndsConstants.height;
+                if (element.css('width')) {
+                    visibleHeight = element.css('height').split('px')[0]; 
+                }
+
+                element[0].addEventListener('scroll', function() {
+                    var scrollableHeight = element.prop('scrollHeight');
+                    if (scrollableHeight === undefined) {
+                        scrollableHeight = 1;
+                    }
+                    var hiddenContentHeight = scrollableHeight - visibleHeight;
+
+                    if (hiddenContentHeight - element[0].scrollTop <= threshold) {
+                        /* Scroll almost at bottom, load more rows */
+                        scope.$apply(attrs.b2bWhenScrollEnds);
+                    }
+                });
+            }
+        }
+    };
+})
+
+.factory('$windowBind', ['$window', '$timeout', function($window, $timeout) {
+    var win = angular.element($window);
+    var _scroll = function (flag, callbackFunc, scope) {
+        scope.$watch(flag, function (val) {
+            $timeout(function () {
+                if (val) {
+                    win.bind('scroll', callbackFunc);
+                } else {
+                    win.unbind('scroll', callbackFunc);
+                }
+            });
+        });
+    };
+
+    var throttle = function(type, name, obj) {
+        obj = obj || window;
+        var running = false;
+        var func = function() {
+            if (running) { return; }
+            running = true;
+             requestAnimationFrame(function() {
+                obj.dispatchEvent(new CustomEvent(name));
+                running = false;
+            });
+        };
+        obj.addEventListener(type, func);
+    };
+
+    var _resize = function(callbackFunc, scope) {
+        throttle("resize", "optimizedResize");
+        window.addEventListener("optimizedResize", function(event) {
+            callbackFunc();
+            //win.bind(event, callbackFunc);
+            if (!scope.$$phase) {
+                scope.$digest();
+            }
+        });
+    };
+
+    var _click = function (flag, callbackFunc, scope) {
+        scope.$watch(flag, function (val) {
+            $timeout(function () {
+                if (val) {
+                    win.bind('click', callbackFunc);
+                } else {
+                    win.unbind('click', callbackFunc);
+                }
+            });
+        });
+    };
+
+    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {
+        if (timeoutFlag) {
+            if (!(timeoutValue)) {
+                timeoutValue = 0;
+            }
+            scope.$watch(flag, function (newVal, oldVal) {
+                if (newVal !== oldVal) {
+                    $timeout(function () {
+                        if (newVal) {
+                            win.bind(event, callbackFunc);
+                        } else {
+                            win.unbind(event, callbackFunc);
+                        }
+                    }, timeoutValue);
+                }
+            });
+        } else {
+            scope.$watch(flag, function (newVal, oldVal) {
+                if (newVal !== oldVal) {
+                    if (newVal) {
+                        win.bind(event, callbackFunc);
+                    } else {
+                        win.unbind(event, callbackFunc);
+                    }
+                }
+            });
+        }
+    };
+
+    return {
+        click: _click,
+        scroll: _scroll,
+        event: _event, 
+        resize: _resize
+    };
+}])
+
+.factory('keymap', function () {
+    return {
+        KEY: {
+            TAB: 9,
+            ENTER: 13,
+            ESC: 27,
+            SPACE: 32,
+            LEFT: 37,
+            UP: 38,
+            RIGHT: 39,
+            DOWN: 40,
+            SHIFT: 16,
+            CTRL: 17,
+            ALT: 18,
+            PAGE_UP: 33,
+            PAGE_DOWN: 34,
+            HOME: 36,
+            END: 35,
+            BACKSPACE: 8,
+            DELETE: 46,
+            COMMAND: 91
+        },
+        MAP: { 91 : "COMMAND", 8 : "BACKSPACE" , 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSEBREAK" , 20 : "CAPSLOCK" , 27 : "ESC" , 32 : "SPACE" , 33 : "PAGE_UP", 34 : "PAGE_DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT" , 38 : "UP" , 39 : "RIGHT" , 40 : "DOWN" , 43 : "+" , 44 : "PRINTSCREEN" , 45 : "INSERT" , 46 : "DELETE", 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 59 : ";", 61 : "=" , 65 : "A" , 66 : "B" , 67 : "C" , 68 : "D" , 69 : "E" , 70 : "F" , 71 : "G" , 72 : "H" , 73 : "I" , 74 : "J" , 75 : "K" , 76 : "L", 77 : "M" , 78 : "N" , 79 : "O" , 80 : "P" , 81 : "Q" , 82 : "R" , 83 : "S" , 84 : "T" , 85 : "U" , 86 : "V" , 87 : "W" , 88 : "X" , 89 : "Y" , 90 : "Z", 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9", 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/", 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12", 144 : "NUMLOCK" , 145 : "SCROLLLOCK" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'"
+        },
+        isControl: function (e) {
+            var k = e.keyCode;
+            switch (k) {
+            case this.KEY.COMMAND:
+            case this.KEY.SHIFT:
+            case this.KEY.CTRL:
+            case this.KEY.ALT:
+                return true;
+            default:;
+            }
+
+            if (e.metaKey) {
+                return true;
+            }
+
+            return false;
+        },
+        isFunctionKey: function (k) {
+            k = k.keyCode ? k.keyCode : k;
+            return k >= 112 && k <= 123;
+        },
+        isVerticalMovement: function (k) {
+            return ~[this.KEY.UP, this.KEY.DOWN].indexOf(k);
+        },
+        isHorizontalMovement: function (k) {
+            return ~[this.KEY.LEFT, this.KEY.RIGHT, this.KEY.BACKSPACE, this.KEY.DELETE].indexOf(k);
+        },
+        isAllowedKey: function (k) {
+            return (~[this.KEY.SPACE, this.KEY.ESC, this.KEY.ENTER].indexOf(k)) || this.isHorizontalMovement(k) || this.isVerticalMovement(k);
+        },
+        isNumericKey: function (e) {
+            var k = e.keyCode;
+            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105)) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        isAlphaNumericKey: function (e) {
+            var k = e.keyCode;
+            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105) || (k >= 65 && k <= 90)) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    };
+})
+
+.factory('$isElement', [function () {
+    var isElement = function (currentElem, targetElem, alternateElem) {
+        if (currentElem[0] === targetElem[0]) {
+            return true;
+        } else if (currentElem[0] === alternateElem[0]) {
+            return false;
+        } else {
+            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);
+        }
+    };
+
+    return isElement;
+}])
+
+.factory('events', function () {
+    var _stopPropagation = function (evt) {
+        if (evt.stopPropagation) {
+            evt.stopPropagation();
+        } else {
+            evt.returnValue = false;
+        }
+    };
+    var _preventDefault = function (evt) {
+        if (evt.preventDefault) {
+            evt.preventDefault();
+        } else {
+            evt.returnValue = false;
+        }
+    }
+    return {
+        stopPropagation: _stopPropagation,
+        preventDefault: _preventDefault
+    };
+})
+
+
+.factory('$documentBind', ['$document', '$timeout', function ($document, $timeout) {
+    var _click = function (flag, callbackFunc, scope) {
+        scope.$watch(flag, function (val) {
+            $timeout(function () {
+                if (val) {
+                    $document.bind('click', callbackFunc);
+                } else {
+                    $document.unbind('click', callbackFunc);
+                }
+            });
+        });
+    };
+
+    var _scroll = function (flag, callbackFunc, scope) {
+        scope.$watch(flag, function (val) {
+            $timeout(function () {
+                if (val) {
+                    $document.bind('scroll', callbackFunc);
+                } else {
+                    $document.unbind('scroll', callbackFunc);
+                }
+            });
+        });
+    };
+
+    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {
+        if (timeoutFlag) {
+            if (!(timeoutValue)) {
+                timeoutValue = 0;
+            }
+            scope.$watch(flag, function (newVal, oldVal) {
+                if (newVal !== oldVal) {
+                    $timeout(function () {
+                        if (newVal) {
+                            $document.bind(event, callbackFunc);
+                        } else {
+                            $document.unbind(event, callbackFunc);
+                        }
+                    }, timeoutValue);
+                }
+            });
+        } else {
+            scope.$watch(flag, function (newVal, oldVal) {
+                if (newVal !== oldVal) {
+                    if (newVal) {
+                        $document.bind(event, callbackFunc);
+                    } else {
+                        $document.unbind(event, callbackFunc);
+                    }
+                }
+            });
+        }
+    };
+
+    return {
+        click: _click,
+        scroll: _scroll,
+        event: _event
+    };
+}])
+
+.directive('b2bOnlyNums', function (keymap) {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elm, attrs, ctrl) {
+            var maxChars = attrs.b2bOnlyNums ? attrs.b2bOnlyNums : 4;
+            elm.on('keydown', function (event) {
+                if ((event.which >= 48 && event.which <= 57) || (event.which >= 96 && event.which <= 105)) {
+                    // check for maximum characters allowed
+                    if (elm.val().length < maxChars){
+                        return true;
+                    } else {
+                        event.preventDefault();
+                        return false;
+                    }
+                } else if ([8, 9, 13, 27, 37, 38, 39, 40].indexOf(event.which) > -1) {
+                    // to allow backspace, tab, enter, escape, arrows
+                    return true;
+                } else if (event.altKey || event.ctrlKey) {
+                    // to allow alter, control, and shift keys
+                    return true;
+                } else {
+                    // to stop others
+                    event.preventDefault();
+                    return false;
+                }
+            });
+
+            var validateString = function (value) {
+                if (angular.isUndefined(value) || value === null || value === '') {
+                    return ctrl.$modelValue;
+                }
+                return value;
+            };
+            ctrl.$parsers.unshift(validateString);
+        }
+    }
+})
+
+.directive('b2bKeyupClick', [ function () {
+    return {
+        restrict: 'A',
+        link: function (scope, elem, attr) {
+            var keyCode = [];
+            attr.$observe('b2bKeyupClick', function (value) {
+                if (value) {
+                    keyCode = value.split(',');
+                }
+            });
+            elem.bind('keydown keyup', function (ev) {
+                var keyCodeCondition = function () {
+                    var flag = false;
+                    if (!(ev.keyCode)) {
+                        if (ev.which) {
+                            ev.keyCode = ev.which;
+                        } else if (ev.charCode) {
+                            ev.keyCode = ev.charCode;
+                        }
+                    }
+                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {
+                        flag = true;
+                    }
+                    return flag;
+                };
+                if (ev.type === 'keydown' && keyCodeCondition()) {
+                    ev.preventDefault();
+                }
+                else if (ev.type === 'keyup' && keyCodeCondition()) {
+                    elem[0].click();
+                }
+            });
+        }
+    };
+}])
+
+.factory('b2bDOMHelper', function() {
+
+    var _isTabable = function(node) {
+        var element = angular.element(node);
+        var tagName = element[0].tagName.toUpperCase();
+
+        if (isHidden(element)) {
+            return false;
+        }
+        if (element.attr('tabindex') !== undefined) {
+            return (parseInt(element.attr('tabindex'), 10) >= 0);
+        }
+        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {
+            if (tagName === 'A' || tagName === 'AREA') {
+                // anchors/areas without href are not focusable
+                return (element[0].href !== '');
+            }
+            return !(element[0].disabled || element[0].readOnly);
+        }
+        return false;
+    };
+
+    function isValidChild(child) {
+        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';
+    }
+    
+    function isHidden(obj) {
+        var elem = angular.element(obj);
+        var elemStyle = undefined;
+        if(obj instanceof HTMLElement){
+            elemStyle = window.getComputedStyle(obj);
+        }
+        else {
+            elemStyle = window.getComputedStyle(obj[0]);
+        }
+        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || elemStyle.display === 'none' || elemStyle.visibility === 'hidden' || elem.css('visibility') === 'hidden';
+    }
+
+    function hasValidParent(obj) {
+        return (isValidChild(obj) && obj.parentElement.nodeName !== 'BODY');
+    }
+
+    function traverse(obj, fromTop) {
+        var obj = obj || document.getElementsByTagName('body')[0];
+        if (isValidChild(obj) && _isTabable(obj)) {
+            return obj;
+        }
+        // If object is hidden, skip it's children
+        if (isValidChild(obj) && isHidden(obj)) {
+            return undefined;
+        } 
+        // If object is hidden, skip it's children
+        if (angular.element(obj).hasClass('ng-hide')) {
+            return undefined;
+        }  
+        if (obj.hasChildNodes()) {
+            var child;
+            if (fromTop) {
+                child = obj.firstChild;
+            } else {
+                child = obj.lastChild;
+            }
+            while(child) {
+                var res =  traverse(child, fromTop);
+                if(res){
+                    return res;
+                }
+                else{
+                    if (fromTop) {
+                        child = child.nextSibling;
+                    } else {
+                        child = child.previousSibling;
+                    }
+                }
+            }
+        }
+        else{
+            return undefined;
+        }
+    }
+
+    var _previousElement = function(el, isFocusable){
+
+        var elem = el;
+        if (el.hasOwnProperty('length')) {
+            elem = el[0];
+        }
+
+        var parent = elem.parentElement;
+        var previousElem = undefined;
+
+        if(isFocusable) {
+            if (hasValidParent(elem)) {
+                var siblings = angular.element(parent).children();
+                if (siblings.length > 0) {
+                    // Good practice to splice out the elem from siblings if there, saving some time.
+                    // We allow for a quick check for jumping to parent first before removing. 
+                    if (siblings[0] === elem) {
+                        // If we are looking at immidiate parent and elem is first child, we need to go higher
+                        var e = _previousElement(angular.element(elem).parent(), isFocusable);
+                        if (_isTabable(e)) {
+                            return e;
+                        }
+                    } else {
+                        // I need to filter myself and any nodes next to me from the siblings
+                        var indexOfElem = Array.prototype.indexOf.call(siblings, elem);
+                        siblings = Array.prototype.filter.call(siblings, function(item, itemIndex) {
+                            if (!angular.equals(elem, item) && itemIndex < indexOfElem) {
+                                return true;
+                            }
+                        });
+                    }
+                    // We need to search backwards
+                    for (var i = 0; i <= siblings.length-1; i++) {//for (var i = siblings.length-1; i >= 0; i--) {
+                        var ret = traverse(siblings[i], false);
+                        if (ret !== undefined) {
+                            return ret;
+                        }
+                    }
+
+                    var e = _previousElement(angular.element(elem).parent(), isFocusable);
+                    if (_isTabable(e)) {
+                        return e;
+                    }
+                }
+            }
+        } else {
+            var siblings = angular.element(parent).children();
+            if (siblings.length > 1) {
+                // Since indexOf is on Array.prototype and parent.children is a NodeList, we have to use call()
+                var index = Array.prototype.indexOf.call(siblings, elem);
+                previousElem = siblings[index-1];
+            }
+        }
+        return previousElem;
+    };
+
+    var _lastTabableElement = function(el) {
+        /* This will return the first tabable element from the parent el */
+        var elem = el;
+        if (el.hasOwnProperty('length')) {
+            elem = el[0];
+        }
+
+        return traverse(elem, false);
+    };
+
+    var _firstTabableElement = function(el) {
+        /* This will return the first tabable element from the parent el */
+        var elem = el;
+        if (el.hasOwnProperty('length')) {
+            elem = el[0];
+        }
+
+        return traverse(elem, true);
+    };
+
+    var _isInDOM = function(obj) {
+      return document.documentElement.contains(obj);
+    }
+
+    return {
+        firstTabableElement: _firstTabableElement,
+        lastTabableElement: _lastTabableElement,
+        previousElement: _previousElement,
+        isInDOM: _isInDOM,
+        isTabable: _isTabable,
+        isHidden: isHidden
+    };
+})
+
+.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {
+    var elementStack = [];
+    var stackHead = undefined;
+    var trapFocusInElement = function (flag) {
+        var bodyElements = $document.find('body').children();
+
+        var firstTabableElement = angular.element(DOMHelper.firstTabableElement(stackHead));
+        var lastTabableElement = angular.element(DOMHelper.lastTabableElement(stackHead));
+
+        var trapKeyboardFocusInFirstElement = function (e) {
+            if (!e.keyCode) {
+                e.keyCode = e.which;
+            }
+
+            if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {
+                lastTabableElement[0].focus();
+                e.preventDefault(e);
+                e.stopPropagation(e);
+            }
+
+        };
+
+        var trapKeyboardFocusInLastElement = function (e) {
+            if (!e.keyCode) {
+                e.keyCode = e.which;
+            }
+
+            if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {
+                firstTabableElement[0].focus();
+                e.preventDefault(e);
+                e.stopPropagation(e);
+            }
+        };
+
+        if (flag) {
+            for (var i = 0; i < bodyElements.length; i++) {
+                if (bodyElements[i] !== stackHead[0]) {
+                    bodyElements.eq(i).attr('aria-hidden', true);
+                }
+            }
+            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);
+        } else {
+            for (var j = 0; j < bodyElements.length; j++) {
+                if (bodyElements[j] !== stackHead[0]) {
+                    bodyElements.eq(j).removeAttr('aria-hidden');
+                }
+            }
+            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);
+        }
+    };
+    var toggleTrapFocusInElement = function (flag, element) {
+        if (angular.isDefined(flag) && angular.isDefined(element)) {
+            if (angular.isUndefined(stackHead)) {
+                stackHead = element;
+                trapFocusInElement(flag);
+            } else {
+                if (flag) {
+                    trapFocusInElement(false);
+                    elementStack.push(stackHead);
+                    stackHead = element;
+                    trapFocusInElement(true);
+                } else {
+                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {
+                        trapFocusInElement(false);
+                        stackHead = elementStack.pop();
+                        if (angular.isDefined(stackHead)) {
+                            trapFocusInElement(true);
+                        }
+                    }
+                }
+            }
+        }
+    };
+
+    return toggleTrapFocusInElement;
+}])
+
+.factory('DOMHelper', function () {
+
+    var _isTabable = function (node) {
+        var element = angular.element(node);
+        var tagName = element[0].tagName.toUpperCase();
+
+        if (isHidden(element)) {
+            return false;
+        }
+        if (element.attr('tabindex') !== undefined) {
+            return (parseInt(element.attr('tabindex'), 10) >= 0);
+        }
+        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {
+            if (tagName === 'A' || tagName === 'AREA') {
+                // anchors/areas without href are not focusable
+                return (element[0].href !== '');
+            }
+            return !(element[0].disabled || element[0].readOnly);
+        }
+        return false;
+    };
+
+    function isValidChild(child) {
+        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';
+    }
+
+    function isHidden(obj) {
+        var elem = angular.element(obj);
+        var style;
+        try {
+            style = window.getComputedStyle(obj);
+        }
+        catch(err) {
+            style = window.getComputedStyle(obj[0]);
+        }
+
+        // getComputedStyle() for Zepto object returns null
+        if (style === null){
+            return elem.hasClass('ng-hide') || elem.css('display') === 'none';
+        }
+
+        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || style.display === 'none' || style.display === 'hidden';
+    }
+
+    function traverse(obj, fromTop) {
+        var obj = obj || document.getElementsByTagName('body')[0];
+
+        if (isValidChild(obj) && _isTabable(obj)) {
+            return obj;
+        }
+
+        // If object is hidden, skip it's children
+        if (isValidChild(obj) && isHidden(obj)) {
+            return undefined;
+        }
+        // If object is hidden, skip it's children
+        if (angular.element(obj).hasClass('ng-hide')) {
+            return undefined;
+        }
+
+        if (obj.hasChildNodes()) {
+            var child;
+            if (fromTop) {
+                child = obj.firstChild;
+            } else {
+                child = obj.lastChild;
+            }
+            while (child) {
+                var res = traverse(child, fromTop);
+                if (res) {
+                    return res;
+                } else {
+                    if (fromTop) {
+                        child = child.nextSibling;
+                    } else {
+                        child = child.previousSibling;
+                    }
+                }
+            }
+        } else {
+            return undefined;
+        }
+    }
+
+    var _lastTabableElement = function (el) {
+        /* This will return the last tabable element from the parent el */
+        var elem = el;
+        if (el.hasOwnProperty('length')) {
+            elem = el[0];
+        }
+
+        return traverse(elem, false);
+    };
+
+    var _firstTabableElement = function (el) {
+        /* This will return the first tabable element from the parent el */
+        var elem = el;
+        if (el.hasOwnProperty('length')) {
+            elem = el[0];
+        }
+
+        return traverse(elem, true);
+    };
+
+    return {
+        firstTabableElement: _firstTabableElement,
+        lastTabableElement: _lastTabableElement,
+        isTabable: _isTabable
+    };
+})
+
+.factory('windowOrientation', ['$window', function ($window) {
+    var _isPotrait = function () {
+        if ($window.innerHeight > $window.innerWidth) {
+            return true;
+        } else {
+            return false;
+        }
+    };
+    var _isLandscape = function () {
+        if ($window.innerHeight < $window.innerWidth) {
+            return true;
+        } else {
+            return false;
+        }
+    };
+
+    return {
+        isPotrait: _isPotrait,
+        isLandscape: _isLandscape
+    };
+}])
+
+.directive('b2bNextElement', function() {
+  return {
+    restrict: 'A',
+    transclude: false,
+    link: function (scope, elem, attr, ctrls) {
+
+        var keys = attr.b2bNextElement.split(',');
+
+        elem.bind('keydown', function (e) {
+            var nextElement = elem.next();
+            if(e.keyCode == 39 || e.keyCode == 40){ // if e.keyCode in keys
+                if(nextElement.length) {
+                    e.preventDefault();
+                    nextElement[0].focus();
+                }
+            }
+        });
+    }
+  }
+})
+
+.directive('b2bAccessibilityClick', [function () {
+    return {
+        restrict: 'A',
+        link: function (scope, elem, attr, ctrl) {
+            var keyCode = [];
+            attr.$observe('b2bAccessibilityClick', function (value) {
+                if (value) {
+                    keyCode = value.split(',');
+                }
+            });
+            elem.bind('keydown keypress', function (ev) {
+                var keyCodeCondition = function () {
+                    var flag = false;
+                    if (!(ev.keyCode)) {
+                        if (ev.which) {
+                            ev.keyCode = ev.which; 
+                        } else if (ev.charCode) {
+                            ev.keyCode = ev.charCode;
+                        }
+                    }
+                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {
+                        flag = true;
+                    }
+                    return flag;
+                };
+                if (keyCode.length > 0 && keyCodeCondition()) {
+                    elem[0].click();
+                    ev.preventDefault();
+                }
+            });
+        }
+    };
+}])
+
+.directive('b2bReset', ['$compile', function ($compile) {
+        return {
+            restrict: 'A',
+            require: ['?ngModel', 'b2bReset'],
+            controller: ['$scope', function ($scope) {
+                var resetButton = angular.element('<button type="button" class="reset-field" tabindex="-1" aria-label="Click to reset" aria-hidden="true" role="button"></button>');
+
+                this.getResetButton = function () {
+                    return resetButton;
+                };
+            }],
+            link: function (scope, element, attrs, ctrls) {
+
+                var ngModelCtrl = ctrls[0];
+                var ctrl = ctrls[1];
+
+                var resetButton = ctrl.getResetButton();
+
+
+                resetButton.on('click', function () {
+                    element[0].value = '';
+
+                    if (ngModelCtrl) {
+                        if (attrs.b2bReset) {
+                            ngModelCtrl.$setViewValue(attrs.b2bReset);
+                        } else {
+                            ngModelCtrl.$setViewValue('');
+                        }
+                        element[0].value = ngModelCtrl.$viewValue;
+                        ngModelCtrl.$render();
+                        scope.$digest();
+                    }
+                    element[0].focus();
+                    element[0].select();
+                });
+
+                var addResetButton = function () {
+                    element.after(resetButton);
+                    element.unbind('focus input', addResetButton);
+                };
+
+                element.bind('focus input', addResetButton);
+            }
+        };
+    }])
+
+.directive('b2bPrevElement', ['b2bDOMHelper', 'keymap', function (b2bDOMHelper, keymap) {
+  return {
+    restrict: 'A',
+    transclude: false,
+    link: function (scope, elem, attr) {
+
+        elem.bind('keydown', function (e) {
+            if(e.keyCode == 37 || e.keyCode == 38){
+                var prev = b2bDOMHelper.previousElement(elem, false);
+                if(prev !== undefined) {
+                    e.preventDefault();
+                    prev.focus();
+                }
+            }
+        });
+    }
+  }
+}])
+/**
+ * @param {integer} delay - Timeout before first and last focusable elements are found
+ * @param {boolean} trigger - A variable on scope that will trigger refinding first/last focusable elements 
+ */
+.directive('b2bTrapFocusInsideElement', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {
+    return {
+        restrict: 'A',
+        transclude: false,
+        link: function (scope, elem, attr) {
+
+            var delay = parseInt(attr.delay, 10) || 10;
+
+            /* Before opening modal, find the focused element */
+            var firstTabableElement = undefined,
+                lastTabableElement = undefined;
+                
+            function init() {
+                $timeout(function () {
+                    firstTabableElement = b2bDOMHelper.firstTabableElement(elem);
+                    lastTabableElement = b2bDOMHelper.lastTabableElement(elem);
+                    angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);
+                    angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);
+                }, delay, false);
+            }
+
+            if (attr.trigger !== undefined) {
+                scope.$watch('trigger', function() {
+                    if (scope.trigger) {
+                        init();
+                    }
+                });
+            }
+
+            var firstTabableElementKeyhandler = function(e) {
+                if (!e.keyCode) {
+                    e.keyCode = e.which;
+                }
+                if (e.keyCode === keymap.KEY.TAB && e.shiftKey) {
+                    if (attr.trapFocusInsideElement === 'true') {
+                        var temp = b2bDOMHelper.lastTabableElement(elem);
+                        if (lastTabableElement !== temp) {
+                            // Unbind keydown handler on lastTabableElement
+                            angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);
+                            lastTabableElement = temp;
+                            angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);
+                        }
+                    }
+                    lastTabableElement.focus();
+                    events.preventDefault(e);
+                    events.stopPropagation(e);
+                }
+            };
+
+            var lastTabableElementKeyhandler = function(e) {
+                if (!e.keyCode) {
+                    e.keyCode = e.which;
+                }
+                if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {
+                    if (attr.trapFocusInsideElement === 'true') {
+                        var temp = b2bDOMHelper.firstTabableElement(elem);
+                        if (firstTabableElement !== temp) {
+                            // Unbind keydown handler on firstTabableElement
+                            angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);
+                            firstTabableElement = temp;
+                            angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);
+                        }
+                    }
+                    firstTabableElement.focus();
+                    events.preventDefault(e);
+                    events.stopPropagation(e);
+                }
+            };
+
+            init();
+        }
+    };
+}])
+
+.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', '$interval', function ($document, $isElement, DOMHelper, keymap, $interval) {
+    var elementStack = [];
+    var stackHead = undefined;
+    var stopInterval = undefined;
+    var intervalRequired = false;
+    var interval = 1000;
+    var firstTabableElement, lastTabableElement;
+
+    var trapKeyboardFocusInFirstElement = function (e) {
+        if (!e.keyCode) {
+            e.keyCode = e.which;
+        }
+
+        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {
+            lastTabableElement[0].focus();
+            e.preventDefault(e);
+            e.stopPropagation(e);
+        }
+
+    };
+
+    var trapKeyboardFocusInLastElement = function (e) {
+        if (!e.keyCode) {
+            e.keyCode = e.which;
+        }
+
+        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {
+            firstTabableElement[0].focus();
+            e.preventDefault(e);
+            e.stopPropagation(e);
+        }
+    };
+
+    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {
+        var bodyElements = $document.find('body').children();
+
+        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));
+        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));
+
+        if (flag) {
+            for (var i = 0; i < bodyElements.length; i++) {
+                if (bodyElements[i] !== stackHead[0]) {
+                    bodyElements.eq(i).attr('aria-hidden', true);
+                }
+            }
+            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);
+        } else {
+            for (var j = 0; j < bodyElements.length; j++) {
+                if (bodyElements[j] !== stackHead[0]) {
+                    bodyElements.eq(j).removeAttr('aria-hidden');
+                }
+            }
+            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);
+            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);
+        }
+
+        if (intervalRequired && flag) {
+            stopInterval = $interval(function () {
+                var firstTabableElementTemp = angular.element(DOMHelper.firstTabableElement(stackHead));
+                var lastTabableElementTemp = angular.element(DOMHelper.lastTabableElement(stackHead));
+                if (firstTabableElementTemp[0] !== firstTabableElement[0] || lastTabableElementTemp[0] !== lastTabableElement[0]) {
+                    $interval.cancel(stopInterval);
+                    stopInterval = undefined;
+                    trapFocusInElement(false, firstTabableElement, lastTabableElement);
+                    trapFocusInElement(true, firstTabableElementTemp, lastTabableElementTemp);
+                }
+            }, interval);
+        } else {
+            if (stopInterval) {
+                $interval.cancel(stopInterval);
+                stopInterval = undefined;
+            }
+        }
+    };
+    var toggleTrapFocusInElement = function (flag, element, intervalRequiredParam, intervalParam) {
+        intervalRequired = intervalRequiredParam ? intervalRequiredParam : intervalRequired;
+        interval = intervalParam ? intervalParam : interval;
+        if (angular.isDefined(flag) && angular.isDefined(element)) {
+            if (flag && angular.isUndefined(stackHead)) {
+                stackHead = element;
+                trapFocusInElement(flag);
+            } else {
+                if (flag) {
+                    trapFocusInElement(false);
+                    elementStack.push(stackHead);
+                    stackHead = element;
+                    trapFocusInElement(true);
+                } else {
+                    if (angular.isDefined(stackHead) && (stackHead[0] === element[0])) {
+                        trapFocusInElement(false);
+                        stackHead = elementStack.pop();
+                        if (angular.isDefined(stackHead)) {
+                            trapFocusInElement(true);
+                        }
+                    }
+                }
+            }
+        } else {
+            if (angular.isDefined(stackHead)) {
+                trapFocusInElement(false, firstTabableElement, lastTabableElement);
+                trapFocusInElement(true);
+            }
+        }
+    };
+
+    return toggleTrapFocusInElement;
+}])
+
+.directive('b2bSetNextFocusOn', ['b2bDOMHelper', '$timeout', function(b2bDOMHelper, $timeout) {
+    return {
+        restrict: 'A',
+        scope: true,
+        link: function (scope, elem, attr) {
+            elem.bind('click', function(){
+                var firstFocusableElement = undefined; 
+                var containerElem = undefined; 
+                var containerArray = [];
+                var timeout = parseInt(attr.setNextFocusTimeout, 0) | 100;
+                var index = parseInt(attr.b2bSetNextFocusIndex, 0) | 0;
+
+                 /*
+                  *Fix for IE7 and lower 
+                  *polyfill src: https://github.com/HubSpot/pace/issues/102
+                  */
+                if (!document.querySelectorAll) {
+                    document.querySelectorAll = function (selectors) {
+                        var style = document.createElement('style'), elements = [], element;
+                        document.documentElement.firstChild.appendChild(style);
+                        document._qsa = [];
+
+                        style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';
+                        window.scrollBy(0, 0);
+                        style.parentNode.removeChild(style);
+
+                        while (document._qsa.length) {
+                            element = document._qsa.shift();
+                            element.style.removeAttribute('x-qsa');
+                            elements.push(element);
+                        }
+                        document._qsa = null;
+                        return elements;
+                    };
+                }
+
+                if (attr.b2bSetNextFocusOn === '') {
+                    return;
+                } else {
+                    containerArray = attr.b2bSetNextFocusOn.split(' ');
+                }
+                $timeout(function(){
+                    var i = 0;
+                    do { // cycles thru containerArray until finds a match in DOM to set focus to
+                        containerElem = document.querySelectorAll(containerArray[i])[index]; 
+                        i++;
+                    } while ( (!containerElem) && (i < containerArray.length) );
+                    if(containerElem){
+                        if (!angular.isDefined(firstFocusableElement)) { 
+                            firstFocusableElement = b2bDOMHelper.firstTabableElement(containerElem); 
+                        }
+                        firstFocusableElement.focus(); 
+                    }
+                }, timeout, false)
+            });
+        }
+
+    };
+}])
+
+.directive('b2bInputAllow', [function() {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            var regexExpression = null;
+            attr.$observe('b2bInputAllow', function (value) {
+                if (value) {
+                    regexExpression = new RegExp(value);
+                }
+            });
+            var isValid = function(str) {
+                if (regexExpression !== null) {
+                    return regexExpression.test(str);
+                }
+                return false;
+            };
+            elem.bind('keypress', function($event) {
+                var charcode = String.fromCharCode($event.which || $event.keyCode);
+                if (!isValid(charcode)) {
+                    $event.preventDefault();
+                    $event.stopPropagation();
+                }
+            });
+            elem.bind('input', function (evt) {
+                var inputString = ctrl.$viewValue;
+                if (isValid(inputString)) {
+                    ctrl.$setViewValue(inputString);
+                    ctrl.$render();
+                    scope.$apply();
+                }
+            });
+        }
+    };
+}])
+
+.directive('b2bInputDeny', [function() {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            var regexExpression = null;
+            attr.$observe('b2bInputDeny', function (value) {
+                if (value) {
+                    regexExpression = new RegExp(value, 'g');
+                }
+            });
+            elem.bind('input', function () {
+                var inputString = ctrl.$viewValue && ctrl.$viewValue.replace(regexExpression, '');
+                if (inputString !== ctrl.$viewValue) {
+                    ctrl.$setViewValue(inputString);
+                    ctrl.$render();
+                    scope.$apply();
+                }
+            });
+        }
+    };
+}])
+
+.directive('b2bDragonInput', [function() {
+    return {
+        restrict: 'A',
+        require: 'ngModel',
+        link: function (scope, elem, attr, ctrl) {
+            elem.on('focus keyup', function(){
+                elem.triggerHandler('change');
+            });
+        }
+    };
+}])
+
+.directive('b2bKey', ['b2bUtilitiesConfig', '$timeout', 'keymap', function (b2bUtilitiesConfig, $timeout, keymap) {
+    return {
+        restrict: 'EA',
+        controller: ['$scope', '$element', '$attrs', function ($scope, $element,attr) {
+            this.childElements = [];
+            this.disableNodes = {};
+            this.enableSearch = attr.enableSearch !== undefined ? true : b2bUtilitiesConfig.enableSearch;
+            this.circularTraversal = attr.circularTraversal !== undefined ? true : b2bUtilitiesConfig.circularTraversal;
+            this.counter = -1;
+            if (this.enableSearch) {
+                this.searchKeys = [];
+            }
+            var searchString = '';
+
+            var selfCtrl = this;
+
+            this.childElementsList = [];
+
+            this.b2bKeyID = "";
+
+            if (angular.isDefined(attr.b2bKey)) {
+                this.b2bKeyID = attr.b2bKey;
+            }
+
+            this.calculateChildElementsList = function () {
+                return $element[0].querySelectorAll("[b2b-key-item='" + this.b2bKeyID + "']:not([disabled])");
+            };
+
+            this.resetChildElementsList = function () {
+                return $timeout(function () {
+                    selfCtrl.childElementsList = selfCtrl.calculateChildElementsList();
+                });
+            };
+
+            this.resetChildElementsList();
+
+            $scope.$on('b2b-key-reset-child-elements-list', function () {
+                selfCtrl.resetChildElementsList();
+            });
+
+
+            this.registerElement = function (childElement, searchKey) {
+                this.childElements.push(childElement);
+                if (this.enableSearch) {
+                    this.searchKeys.push(searchKey);
+                }
+                var count = this.childElements.length - 1;
+                this.maxLength = count + 1;
+                return count;
+            };
+            this.toggleDisable = function (count, state) {
+                this.disableNodes[count] = state;
+            };
+            this.searchElement = function (searchExp) {
+                var regex = new RegExp("\\b" + searchExp, "gi");
+                var position = this.searchKeys.regexIndexOf(regex, this.counter + 1, true);
+                if (position > -1) {
+                    this.counter = position;
+                    this.moveFocus(this.counter);
+                }
+            };
+            this.startTimer = function (time) {
+                if (searchString === '') {
+                    $timeout(function () {
+                        searchString = '';
+                    }, time);
+                }
+            };
+            this.resetCounter = function (count) {
+                this.counter = count;
+            };
+            this.moveNext = function (count) {
+                this.counter = (this.counter + count) < this.maxLength ? this.counter + count : (this.circularTraversal ? 0 : this.counter);
+                if (this.disableNodes[this.counter]) {
+                    if ((this.counter + count) < this.maxLength) {
+                        this.moveNext(count);
+                    }
+                } else {
+                    this.moveFocus(this.counter);
+                }
+            };
+            this.movePrev = function (count) {
+                this.counter = (this.counter - count) > -1 ? this.counter - count : (this.circularTraversal ? this.maxLength-1 : this.counter);
+                if (this.disableNodes[this.counter]) {
+                    if ((this.counter - count) > -1) {
+                        this.movePrev(count);
+                    }
+                } else {
+                    this.moveFocus(this.counter);
+                }
+            };
+            this.moveFocus = function (index) {
+                this.childElements[index][0].focus();
+            };
+
+            this.keyDownHandler = function (ev, count) {
+                if (angular.isDefined(count) && !isNaN(count) && count !== this.counter) {
+                    this.resetCounter(count);
+                }
+                if (!ev.keyCode) {
+                    if (ev.which) {
+                        ev.keyCode = ev.which;
+                    } else if (ev.charCode) {
+                        ev.keyCode = ev.charCode;
+                    }
+                }
+                if (ev.keyCode) {
+                    if (this.prev && this.prev.indexOf(ev.keyCode.toString()) > -1) {
+                        this.movePrev(1);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (this.next && this.next.indexOf(ev.keyCode.toString()) > -1) {
+                        this.moveNext(1);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (this.up && this.up.indexOf(ev.keyCode.toString()) > -1) {
+                        if (this.type === 'table') {
+                            this.movePrev(this.columns);
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        }
+                    } else if (this.down && this.down.indexOf(ev.keyCode.toString()) > -1) {
+                        if (this.type === 'table') {
+                            this.moveNext(this.columns);
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        }
+                    } else if (ev.keyCode === keymap.KEY.HOME) {
+                        var firstIndex = 0;
+                        while (this.disableNodes[firstIndex] !== false) {
+                            firstIndex++;
+                        };
+                        var count = this.counter - firstIndex;
+                        this.movePrev(count);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode === keymap.KEY.END) {
+                        var lastIndex = this.childElements.length - 1;
+                        while (this.disableNodes[lastIndex] !== false) {
+                            lastIndex--;
+                        };
+                        var count = lastIndex - this.counter;
+                        this.moveNext(count);
+                        ev.preventDefault();
+                        ev.stopPropagation();
+                    } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {
+                        if (this.enableSearch) {
+                            this.startTimer(b2bUtilitiesConfig.searchTimer);
+                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');
+                            this.searchElement(searchString);
+                            ev.preventDefault();
+                            ev.stopPropagation();
+                        }
+                    }
+                }
+            };
+        }],
+        link: function (scope, elem, attr, ctrl) {
+            ctrl.prev = attr.prev ? attr.prev.split(',') : b2bUtilitiesConfig.prev.split(',');
+            ctrl.next = attr.next ? attr.next.split(',') : b2bUtilitiesConfig.next.split(',');
+            ctrl.type = attr.type ? attr.type : b2bUtilitiesConfig.type;
+            if (ctrl.type === 'table') {
+                ctrl.up = attr.up ? attr.up.split(',') : b2bUtilitiesConfig.up.split(',');
+                ctrl.down = attr.down ? attr.down.split(',') : b2bUtilitiesConfig.down.split(',');
+                ctrl.columns = attr.columns ? parseInt(attr.columns, 10) : b2bUtilitiesConfig.columns;
+            }
+
+            elem.bind('keydown', function (ev) {
+                ctrl.keyDownHandler(ev);
+            });
+        }
+    };
+}])
+
+.directive('b2bKeyItem', [function () {
+    return {
+        restrict: 'EA',
+        link: function (scope, elem, attr, ctrl) {
+            var parentCtrl = (elem.parent() && elem.parent().controller('b2bKey')) || undefined;
+            if (angular.isDefined(parentCtrl)) {
+                var count = parentCtrl.registerElement(elem, attr.searchKey);
+                elem.bind('keydown', function (ev) {
+                    parentCtrl.keyDownHandler(ev, count);
+                });
+                scope.$watch(attr.b2bKeyItem, function (value) {
+                    value = value === undefined ? true : value;
+                    parentCtrl.toggleDisable(count, !value); 
+                });
+                scope.$on('$destroy', function () {
+                    parentCtrl.toggleDisable(count, true);
+                });
+            }
+        }
+    };
+}])
+
+.directive('b2bElementFocus', [function () {
+    return {
+        restrict: 'A',
+        link: function (scope, elem, attr, ctrl) {
+            scope.$watch(attr.b2bElementFocus, function (value) {
+                if (value === true) {
+                    elem[0].focus();
+                }
+            });
+        }
+    };
+}])
+
+
+.directive('b2bAppendElement', ['$compile', function ($compile) {
+    return {
+        restrict: 'A',
+        link: function (scope, elem, attr, ctrl) {
+            var parameters = attr.b2bAppendElement.split(':');
+            if (parameters.length === 1) {
+                elem.append(scope.$eval(parameters[0]));
+            } else if (parameters.length === 2) {
+                if (parameters[1] === 'compile') {
+                    var element = angular.element('<span>' + scope.$eval(parameters[0]) + '</span>');
+                    elem.append($compile(element)(scope));
+                }
+            }
+
+        }
+    };
+}])
+
+.directive('b2bKeyItemRefreshInNgRepeat', [function () {
+    return {
+        restrict: 'EA',
+        require: '^^b2bKey',
+        link: function (scope, elem, attr, parentCtrl) {
+            if (angular.isDefined(parentCtrl)) {
+
+                var attrToObserve = 'attrToObserve';
+
+                if (attr.b2bKeyItemRefreshInNgRepeat) {
+                    attrToObserve = 'b2bKeyItemRefreshInNgRepeat';
+                }
+
+                attr.$observe(attrToObserve, function (newVal, oldVal) {
+                    if (newVal && newVal !== oldVal) {
+                        parentCtrl.resetChildElementsList();
+                    }
+                });
+            }
+        }
+    };
+}])
+
+.filter('b2bMultiSepartorHighlight', function($sce) {
+        return function(text, searchText, searchSeperator) {
+            var splitText = function(string) {
+                if(angular.isDefined(searchSeperator)){
+                    if (string.indexOf(searchSeperator) > -1) {
+                        return string.split(searchSeperator);
+                    } else {
+                        return string
+                    }
+                }else{
+                    return string;
+                }
+            }
+            if (text) {
+                var newText = splitText(text);
+                var newPhrase = splitText(searchText);
+                if (angular.isArray(newPhrase)) {
+                    for (var i = 0; i < newText.length; i++) {
+                        if (i <= 0) {
+                            text = newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),
+                                '<span class="b2b-search-hightlight">$1</span>');
+                        } else {
+                            text = text + searchSeperator + ' ' + (newPhrase[i] ? newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),
+                                '<span class="b2b-search-hightlight">$1</span>') : newText[i]);
+                        }
+                    }
+                } else {
+                    text = text.replace(new RegExp('(' + searchText + ')', 'gi'),
+                        '<span class="b2b-search-hightlight">$1</span>');
+                }
+            }
+            return $sce.trustAsHtml(text)
+        }
+    })
+    
+    .factory('b2bUserAgent', [function() {
+        var _isMobile = function() {
+            return /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
+        };
+        var _notMobile = function() {
+            return !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
+        };
+        var _isIE = function() {
+            return /msie|trident/i.test(navigator.userAgent);
+        };
+        var _isFF = function() {
+            return /Firefox/.test(navigator.userAgent);
+        };
+        var _isChrome = function() {
+            return /Google Inc/.test(navigator.vendor);
+        };
+        var _isSafari = function() {
+            return /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);
+        };
+
+        return {
+            isMobile: _isMobile,
+            notMobile: _notMobile,
+            isIE: _isIE,
+            isFF: _isFF,
+            isChrome: _isChrome,
+            isSafari: _isSafari
+        };
+    }])
+    .run(['$document', 'b2bUserAgent', function($document, b2bUserAgent) {
+        var html = $document.find('html').eq(0);
+        if (b2bUserAgent.isIE()) {
+            html.addClass('isIE');
+        } else {
+            html.removeClass('isIE');
+        }
+    }]);
+    
+
+(function () {
+    String.prototype.toSnakeCase = function () {
+        return this.replace(/([A-Z])/g, function ($1) {
+            return "-" + $1.toLowerCase();
+        });
+    };
+    var concat = function (character, times) {
+        character = character || '';
+        times = (!isNaN(times) && times) || 0;
+        var finalChar = '';
+        for (var i = 0; i < times; i++) {
+            finalChar += character;
+        }
+        return finalChar;
+    };
+
+    // direction: true for left and false for right
+    var pad = function (actualString, width, character, direction) {
+        actualString = actualString || '';
+        width = (!isNaN(width) && width) || 0;
+        character = character || '';
+        if (width > actualString.length) {
+            if (direction) {
+                return concat(character, (width - actualString.length)) + actualString;
+            } else {
+                return actualString + concat(character, (width - actualString.length));
+            }
+        }
+        return actualString;
+    };
+
+    String.prototype.lPad = function (width, character) {
+        return pad(this, width, character, true);
+    };
+
+    String.prototype.rPad = function (width, character) {
+        return pad(this, width, character, false);
+    };
+
+    if (!Array.prototype.indexOf) {
+        Array.prototype.indexOf = function (val) {
+            for (var index = 0; index < this.length; index++) {
+                if (this[index] === val) {
+                    return index;
+                }
+            }
+            return -1;
+        };
+    }
+
+    if (!Array.prototype.regexIndexOf) {
+        Object.defineProperty(Array.prototype, 'regexIndexOf', {
+            enumerable: false,
+            value: function (regex, startIndex, loop) {
+                startIndex = startIndex && startIndex > -1 ? startIndex : 0;
+                for (var index = startIndex; index < this.length; index++) {
+                    if (this[index].toString().match(regex)) {
+                        return index;
+                    }
+                }
+                if (loop) {
+                    for (var index = 0; index < startIndex; index++) {
+                        if (this[index].toString().match(regex)) {
+                            return index;
+                        }
+                    }
+                }
+                return -1;
+            }
+        })
+    }
+})();
+angular.module("b2bTemplate/audioPlayer/audioPlayer.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/audioPlayer/audioPlayer.html",
+    "<div class=\"b2b-audio\">\n" +
+    "   <audio preload=\"auto\">\n" +
+    "       <source ng-src=\"{{audio.mp3 | trustedAudioUrl}}\" type=\"audio/mp3\"></source>\n" +
+    "       <i>Your browser does not support the audio element.</i>\n" +
+    "    </audio>\n" +
+    "\n" +
+    "    <div audio-play-pause-icon class=\"controls-wrapper\" ng-click=\"toggleAudio()\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"{{isPlayInProgress?'pause':'play'}}\">\n" +
+    "       <i class=\"icoControls-pointer\" ng-show='!isPlayInProgress'></i>\n" +
+    "       <i class=\"icoControls-pause\" ng-show='isPlayInProgress'></i>\n" +
+    "    </div>\n" +
+    "\n" +
+    "    <div class=\"seek-bar-container-wrapper\">\n" +
+    "       <b2b-seek-bar min=\"0\" max=\"{{audio.duration}}\" step=\"1\" skip-interval=\"{{audio.timeShiftInSeconds}}\" no-aria-label ng-model=\"audio.currentTime\" on-drag-init=\"isAudioDragging=true\" on-drag-end=\"setAudioPosition(audio.currentTime)\"></b2b-seek-bar>\n" +
+    "       <div class=\"timing-container\">\n" +
+    "           <span class=\"timing-container-left\">{{timeFormatter(audio.currentTime)}}</span>\n" +
+    "           <span class=\"timing-container-right\">{{timeFormatter(audio.duration)}}</span>\n" +
+    "           <div class=\"timing-container-spacer\"></div>\n" +
+    "       </div>\n" +
+    "    </div>\n" +
+    "       \n" +
+    "    <b2b-flyout>\n" +
+    "       <div tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"Volume pop-over. Volume set at {{audio.currentVolume}}%\" class=\"controls-wrapper audio-volume-control\" b2b-flyout-toggler>\n" +
+    "           <i class=\"icoControls-mutespeakers\" ng-show=\"audio.currentVolume === 0\"></i>\n" +
+    "           <i class=\"icoControls-volumedown\" ng-show=\"audio.currentVolume > 0 && audio.currentVolume <= 50\"></i>\n" +
+    "           <i class=\"icoControls-volumeup\" ng-show=\"audio.currentVolume > 50\"></i>\n" +
+    "       </div> \n" +
+    "       \n" +
+    "       <b2b-flyout-content horizontal-placement=\"center\" flyout-style=\"width:70px; height:190px;\" vertical-placement=\"above\">\n" +
+    "           <div class=\"b2b-audio-popover text-center\">\n" +
+    "               <span>Max</span>\n" +
+    "               <b2b-seek-bar min=\"0\" max=\"100\" step=\"1\" skip-interval=\"10\" vertical data-ng-model=\"audio.currentVolume\" class='volume-popover'></b2b-seek-bar>\n" +
+    "               <div class=\"min-label\">Min</div>\n" +
+    "           </div>\n" +
+    "       </b2b-flyout-content>\n" +
+    "   </b2b-flyout>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/audioRecorder/audioRecorder.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/audioRecorder/audioRecorder.html",
+    "<div class=\"b2b-audio-recorder row\">\n" +
+    "   <div class=\"b2b-elapsed-time span11\">\n" +
+    "       <div ng-if=\"isRecording\">\n" +
+    "           <span style=\"padding-right: 25px;\">{{config.whileRecordingMessage}}</span>\n" +
+    "           <span>{{timeFormatter(elapsedTime)}}</span>\n" +
+    "       </div>\n" +
+    "       <span ng-if=\"!isRecording\">{{config.startRecordingMessage}}</span>\n" +
+    "   </div>      \n" +
+    "   <div class=\"b2b-controls\" title=\"{{isRecording ? 'Stop' : 'REC'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"toggleRecording()\" role=\"button\">\n" +
+    "           <i ng-if=\"isRecording\" class=\"icoControls-stop\" ></i>\n" +
+    "           <i ng-if=\"!isRecording\" class=\"icoControls-record\"></i>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/backToTop/backToTop.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/backToTop/backToTop.html",
+    "<button class=\"btn-arrow b2b-backtotop-button\" type=\"button\" aria-label=\"Back to top\">\n" +
+    "    <div class=\"btn-secondary b2b-top-btn\">\n" +
+    "        <i class=\"icoControls-upPRIMARY\" role=\"img\"></i>\n" +
+    "    </div>\n" +
+    "</button>\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/boardstrip/b2bAddBoard.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/boardstrip/b2bAddBoard.html",
+    "<div tabindex=\"0\" role=\"menuitem\" b2b-accessibility-click=\"13,32\" ng-click=\"addBoard()\" aria-label=\"Add Board\" class=\"boardstrip-item--add\">\n" +
+    "    <div class=\"centered\"><i aria-hidden=\"true\" class=\"icoControls-add-maximize\"></i> Add board</div>\n" +
+    "</div> ");
+}]);
+
+angular.module("b2bTemplate/boardstrip/b2bBoard.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/boardstrip/b2bBoard.html",
+    "<li b2b-board-navigation tabindex=\"-1\" role=\"menuitem\" aria-label=\"{{boardLabel}} {{getCurrentIndex()===boardIndex?'selected':''}}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectBoard(boardIndex)\" class=\"board-item\" ng-class=\"{'selected': getCurrentIndex()===boardIndex}\">\n" +
+    "    <div ng-transclude></div>\n" +
+    "    <div class=\"board-caret\" ng-if=\"getCurrentIndex()===boardIndex\">\n" +
+    "        <div class=\"board-caret-indicator\"></div>\n" +
+    "        <div class=\"board-caret-arrow-up\"></div>\n" +
+    "    </div>\n" +
+    "</li>");
+}]);
+
+angular.module("b2bTemplate/boardstrip/b2bBoardstrip.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/boardstrip/b2bBoardstrip.html",
+    "<div class=\"b2b-boardstrip\">\n" +
+    "   <div class=\"boardstrip-reel\" role=\"menu\">\n" +
+    "       <div class=\"prev-items\">\n" +
+    "           <!-- <i tabindex=\"{{isPrevBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isPrevBoard()}\" role=\"menuitem\" aria-label=\"See previous boards\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" class=\"arrow icoControls-left\"></i> -->\n" +
+    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" ng-disabled=\"!isPrevBoard()\">\n" +
+    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-left\"></i>\n" +
+    "               </div>\n" +
+    "               <span class=\"offscreen-text\">Previous boards</span>\n" +
+    "           </button>\n" +
+    "       </div>\n" +
+    "       <div b2b-add-board on-add-board=\"onAddBoard()\"></div>\n" +
+    "       <div class=\"board-viewport\"><ul role=\"menu\" class=\"boardstrip-container\" ng-transclude></ul></div>\n" +
+    "       <div class=\"next-items\">\n" +
+    "           <!-- <i tabindex=\"{{isNextBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isNextBoard()}\" role=\"menuitem\" aria-label=\"See next boards\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" class=\"arrow icoControls-right\"></i> -->\n" +
+    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" ng-disabled=\"!isNextBoard()\">\n" +
+    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-right\"></i>\n" +
+    "               </div>\n" +
+    "               <span class=\"offscreen-text\">Next boards</span>\n" +
+    "           </button>\n" +
+    "       </div>\n" +
+    "   </div>\n" +
+    "</div>\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/calendar/datepicker-popup.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/calendar/datepicker-popup.html",
+    "<div id=\"datepicker\" class=\"datepicker dropdown-menu\" ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" style=\"display: block;\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\" b2b-key type=\"table\" columns=\"7\">\n" +
+    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +
+    "        <div ng-repeat=\"header in headers\" class=\"text-left\" style=\"width: 100%;\" b2b-append-element=\"header\"></div>\n" +
+    "        <table class=\"table-condensed\">\n" +
+    "            <thead>\n" +
+    "                <tr>\n" +
+    "                    <th id=\"prev\" class=\"prev\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Month\" role=\"button\" b2b-element-focus=\"!disablePrev && getFocus\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\" aria-hidden=\"true\"></i></th>\n" +
+    "                    <th id=\"month\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +
+    "                    <th id=\"next\" class=\"next\" tabindex=\"0\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && getFocus\" aria-label=\"Next Month\" role=\"button\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\" aria-hidden=\"true\"></i></th>\n" +
+    "                </tr>\n" +
+    "                <tr ng-show=\"labels.length > 0\">\n" +
+    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +
+    "                </tr>\n" +
+    "            </thead>\n" +
+    "            <tbody>\n" +
+    "                <tr ng-repeat=\"row in rows\">\n" +
+    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && disableNext && getFocus && (dt.selected || dt.firstFocus || dt.fromDate || dt.dateRange)\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || dt.fromDate || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'EEEE, MMMM d') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true; trapFocus();\" ng-blur=\"currFocus=false; trapFocus();\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +
+    "                        <div aria-hidden=\"true\" tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label}}</div>{{(dt.focusable && dt.date | date : 'EEEE, MMMM d yyyy') || ''}}{{(dt.focusable && dt.dueDate && '. Bill-due-date.. ') || ''}}{{(dt.focusable && dt.pastDue && legendMessage) || ''}}</td>\n" +
+    "                </tr>\n" +
+    "            </tbody>\n" +
+    "            <tfoot>\n" +
+    "                <tr ng-repeat=\"footer in footers\">\n" +
+    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"footer\"></th>\n" +
+    "                </tr>\n" +
+    "            </tfoot>\n" +
+    "        </table>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/calendar/datepicker.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/calendar/datepicker.html",
+    "<div>\n" +
+    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/coachmark/coachmark.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/coachmark/coachmark.html",
+    "<div class=\"b2b-coachmark-container\" tabindex=\"-1\" role=\"dialog\" aria-label=\"{{currentCoachmark.contentHeader}} {{currentCoachmark.content}} {{currentCoachmark.offscreenText}}\" ng-style=\"{'top':coackmarkElPos.top,'left':coackmarkElPos.left}\" aria-describeby=\"{{currentCoachmark}}\">\n" +
+    "   <i class=\"b2b-coachmark-caret\"></i>\n" +
+    "   <div class=\"b2b-coachmark-header\">\n" +
+    "       <div class=\"b2b-coachmark-countlabel\"><span ng-if=\"coachmarkIndex !== 0\">{{coachmarkIndex}} of {{(coachmarks.length-1)}}<span></div>\n" +
+    "       <div class=\"corner-button\">\n" +
+    "           <button type=\"button\" ng-focus=\"closeButtonFocus()\" class=\"close\" title=\"close\" aria-label=\"Close\" ng-click=\"closeCoachmark()\"></button>\n" +
+    "       </div>\n" +
+    "   </div>\n" +
+    "   <div class=\"b2b-coachmark-content\">   \n" +
+    "       <i class=\"icon-misc-dimmer\"></i>\n" +
+    "       <div class=\"b2b-coachmark-content-header\"><span class=\"offscreen-text\">{{currentCoachmark.offscreenText}}</span>{{currentCoachmark.contentHeader}}</div>\n" +
+    "       <div class=\"b2b-coachmark-description\">{{currentCoachmark.content}}</div>\n" +
+    "       <div class=\"b2b-coachmark-btn-group\">\n" +
+    "           <a class=\"b2b-coachmark-link\" href=\"javascript:void(0)\" ng-if=\"currentCoachmark.linkLabel !== '' && currentCoachmark.linkLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.linkLabel)\">{{currentCoachmark.linkLabel}}</a>\n" +
+    "           <button class=\"btn btn-alt\" ng-if=\"currentCoachmark.buttonLabel !== '' && currentCoachmark.buttonLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.buttonLabel)\">{{currentCoachmark.buttonLabel}}</button>\n" +
+    "       </div>  \n" +
+    "   </div>  \n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/dropdowns/b2bDropdownDesktop.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownDesktop.html",
+    "<span b2b-key prev=\"38\" next=\"40\" enable-search ng-class=\"{'large': (dropdownSize === 'large'), 'disabled': (disabled), 'selectWrap': (isInputDropdown), 'selectorModule': (dropdownType === 'menu'), 'linkSelectorModule': (dropdownType === 'link-menu')}\">\n" +
+    "    <input b2b-dropdown-toggle b2b-dropdown-validation ng-disabled=\"disabled\" type=\"text\" id=\"{{dropdownId}}\" name=\"{{dropdownName}}\" class=\"awd-select isWrapped\" ng-required=\"dropdownRequired\" ng-model=\"currentSelected.text\" role=\"combobox\" aria-owns=\"listbox{{$id}}\" aria-expanded=\"{{toggleFlag}}\" ng-click=\"toggleDropdown()\" ng-focus=\"focused=true\" ng-blur=\"setBlur(); focused=false\" ng-class=\"{'active': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large'), 'focused':focused}\" style=\"width:100%;\" value=\"{{currentSelected.text}}\" ng-show=\"isInputDropdown\" aria-describedby=\"{{dropdownDescribedBy}}\" readonly=\"readonly\">\n" +
+    "    <button type=\"button\" b2b-dropdown-toggle ng-disabled=\"disabled\" class=\"selectModule\" aria-label=\"{{labelText}} {{currentSelected.label}}\" aria-expanded=\"{{toggleFlag}}\" aria-haspopup=\"true\" ng-click=\"toggleDropdown()\" ng-blur=\"setBlur()\" ng-class=\"{'active opened': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large')}\" ng-bind-html=\"currentSelected.text\" ng-show=\"!isInputDropdown\"></button>\n" +
+    "    <div ng-class=\"{'selectWrapper': (isInputDropdown), 'moduleWrapper': (!isInputDropdown)}\">\n" +
+    "        <ul id=\"listbox{{$id}}\" role=\"{{isInputDropdown?'listbox':'menu'}}\" ng-class=\"{'awd-select-list': (isInputDropdown), 'awd-module-list': (!isInputDropdown)}\" tabindex=\"-1\" ng-show=\"toggleFlag\" aria-label=\"Choose options\"></ul>\n" +
+    "        <ul class=\"module-optinalcta\" ng-if=\"toggleFlag && optionalCta\" tabindex=\"-1\" aria-hidden=\"false\">\n" +
+    "            <li class=\"module-list-item\" tabindex=\"-1\" role=\"menuitem\" value=\"\" aria-label=\"Optinal CTA\" aria-selected=\"true\">\n" +
+    "                <span class=\"module-data\" b2b-append-element=\"optionalCta\"></span>\n" +
+    "            </li>\n" +
+    "        </ul>\n" +
+    "</div>\n" +
+    "<i class=\"icon-primary-down\" aria-hidden=\"true\"></i>\n" +
+    "</span>    ");
+}]);
+
+angular.module("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html",
+    "<li b2b-dropdown-group-desktop class=\"optgroup-wrapper\">{{groupHeader}}\n" +
+    "    <ul class=\"optgroup\" role=\"group\" aria-label=\"{{groupHeader}}\"></ul>\n" +
+    "</li>");
+}]);
+
+angular.module("b2bTemplate/dropdowns/b2bDropdownListDesktop.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownListDesktop.html",
+    "<li b2b-dropdown-list-desktop b2b-key-item b2b-accessibility-click=\"13\" aria-selected=\"{{currentSelected.value === dropdownListValue}}\" ng-class=\"{'awd-select-list-item': (isInputDropdown), 'module-list-item': (!isInputDropdown)}\" tabindex=\"0\" role=\"{{isInputDropdown?'option':'menuitem'}}\" ng-click=\"selectDropdownItem()\"></li>");
+}]);
+
+angular.module("b2bTemplate/fileUpload/fileUpload.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/fileUpload/fileUpload.html",
+    "<label class=\"b2b-file-container\">\n" +
+    "   <span class=\"b2b-upload-link\" ng-transclude></span>\n" +
+    "   <input type=\"file\" b2b-file-change>\n" +
+    "</label>");
+}]);
+
+angular.module("b2bTemplate/flyout/flyout.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/flyout/flyout.html",
+    "<span class=\"b2b-flyout\"  b2b-flyout-trap-focus-inside>\n" +
+    "    <span ng-transclude></span>\n" +
+    "</span>");
+}]);
+
+angular.module("b2bTemplate/flyout/flyoutContent.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/flyout/flyoutContent.html",
+    "<div class=\"b2b-flyout-container\" aria-live=\"polite\" aria-atomic=\"false\" ng-class=\"{'b2b-flyout-left':horizontalPlacement==='left',\n" +
+    "                'b2b-flyout-center':horizontalPlacement==='center', \n" +
+    "                'b2b-flyout-right':horizontalPlacement==='right',\n" +
+    "                'b2b-flyout-centerLeft':horizontalPlacement==='centerLeft',\n" +
+    "                'b2b-flyout-centerRight':horizontalPlacement==='centerRight',  \n" +
+    "                'b2b-flyout-above':verticalPlacement==='above', \n" +
+    "                'b2b-flyout-below':verticalPlacement==='below',\n" +
+    "                'open-flyout': openFlyout,\n" +
+    "                'b2b-close-flyout': !openFlyout}\">\n" +
+    "    <i class=\"b2b-flyout-caret\" ng-class=\"{'open-flyout': openFlyout, \n" +
+    "                                   'b2b-flyout-caret-above':verticalPlacement==='above',\n" +
+    "                                   'b2b-flyout-caret-below':verticalPlacement==='below'}\"></i>\n" +
+    "    <span ng-transclude></span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/footer/footer_column_switch_tpl.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/footer/footer_column_switch_tpl.html",
+    "<div class=\"footer-columns \" ng-class=\"{'five-column':footerColumns===5, 'four-column':footerColumns===4, 'three-column':footerColumns===3}\" ng-repeat=\"item in footerLinkItems\">\n" +
+    "    <h3 class=\"b2b-footer-header\">{{item.categoryName}}</h3>\n" +
+    "    <ul>\n" +
+    "        <li ng-repeat=\"i in item.values\">\n" +
+    "            <a href=\"{{i.href}}\" title=\"{{item.categoryName}} - {{i.displayLink}}\">{{i.displayLink}}</a>  \n" +
+    "        </li>\n" +
+    "    </ul>\n" +
+    "\n" +
+    "</div>\n" +
+    "\n" +
+    "<div ng-transclude></div>\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/horizontalTable/horizontalTable.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/horizontalTable/horizontalTable.html",
+    "<div class=\"b2b-horizontal-table\">\n" +
+    "    <div class=\"b2b-horizontal-table-arrows row span12\">\n" +
+    "       <div class=\"span4\">\n" +
+    "           <button class=\"btn-arrow left\" type=\"button\" ng-click=\"moveViewportLeft()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div>Previous Set</button>\n" +
+    "        </div>\n" +
+    "        \n" +
+    "        <span class=\"span5 b2b-horizontal-table-column-info\" aria-live=\"polite\" tabindex=\"-1\">\n" +
+    "           Displaying {{getColumnSet()[0]}} - {{getColumnSet()[1]}} of {{numOfCols}} (total) columns\n" +
+    "        </span>\n" +
+    "        \n" +
+    "        <div class=\"span3\">\n" +
+    "           <button class=\"btn-arrow right\" ng-click=\"moveViewportRight()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableRight\" type=\"button\">Next Set<div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +
+    "       </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-horizontal-table-inner-container\">\n" +
+    "        <span ng-transclude></span>\n" +
+    "    </div>\n" +
+    "</div>\n" +
+    "\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/hourPicker/b2bHourpicker.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/hourPicker/b2bHourpicker.html",
+    "<div class=\"hp-container\">\n" +
+    "    <div class=\"hp-selected\">\n" +
+    "        <div b2b-hourpicker-value=\"$index\" days=\"value.days\" start-time=\"value.startTime\" start-meridiem=\"value.startMeridiem\" end-time=\"value.endTime\" end-meridiem=\"value.endMeridiem\" ng-repeat=\"value in finalHourpickerValues\"></div>\n" +
+    "    </div>\n" +
+    "    <div b2b-hourpicker-panel></div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/hourPicker/b2bHourpickerPanel.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerPanel.html",
+    "<form name=\"{{'hourpickerForm' + $id}}\">\n" +
+    "    <div class=\"hp-checkbox\" role=\"group\">\n" +
+    "        <label class=\"checkbox\" for=\"checkbox_{{dayOption.title}}_{{$id}}\" aria-label=\"{{dayOption.title}}\" ng-repeat=\"dayOption in hourpicker.dayOptions\">\n" +
+    "            <input type=\"checkbox\" id=\"checkbox_{{dayOption.title}}_{{$id}}\" name=\"{{'hourpickerDays' + $id}}\" ng-model=\"hourpickerPanelValue.days[$index].value\" ng-disabled=\"dayOption.disabled\" /><i class=\"skin\"></i><span>{{dayOption.label}}</span>\n" +
+    "        </label>\n" +
+    "    </div>\n" +
+    "    <div class=\"row hp-dropdowns\">\n" +
+    "        <div class=\"span4\">\n" +
+    "            <label for=\"{{'hourpickerStartTime' + $id}}\">From</label>\n" +
+    "            <select id=\"{{'hourpickerStartTime' + $parent.$id}}\" b2b-dropdown type=\"\" ng-model=\"hourpickerPanelValue.startTime\">\n" +
+    "                <option b2b-dropdown-list value=\"\">From</option>\n" +
+    "                <option b2b-dropdown-list option-repeat=\"startTimeOption in hourpicker.startTimeOptions\" value=\"{{startTimeOption}}\">{{startTimeOption}}</option>\n" +
+    "            </select>\n" +
+    "        </div>\n" +
+    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +
+    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_AM_{{$id}}\">\n" +
+    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_AM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +
+    "            </label>\n" +
+    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_PM_{{$id}}\">\n" +
+    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_PM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +
+    "            </label>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"row hp-dropdowns\">\n" +
+    "        <div class=\"span4\">\n" +
+    "            <label for=\"{{'hourpickerEndTime' + $id}}\">To</label>\n" +
+    "            <select id=\"{{'hourpickerEndTime' + $parent.$id}}\" b2b-dropdown ng-model=\"hourpickerPanelValue.endTime\">\n" +
+    "                <option b2b-dropdown-list value=\"\">To</option>\n" +
+    "                <option b2b-dropdown-list option-repeat=\"endTimeOption in hourpicker.endTimeOptions\" value=\"{{endTimeOption}}\">{{endTimeOption}}</option>\n" +
+    "            </select>\n" +
+    "        </div>\n" +
+    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +
+    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_AM_{{$id}}\">\n" +
+    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_AM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +
+    "            </label>\n" +
+    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_PM_{{$id}}\">\n" +
+    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_PM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +
+    "            </label>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"row hp-buttons\">\n" +
+    "        <div class=\"span12\">\n" +
+    "            <div style=\"float:right\">\n" +
+    "                <button class=\"btn btn-secondary btn-small\" ng-click=\"resetHourpickerPanelValue()\">Clear</button>\n" +
+    "                <button class=\"btn btn-alt btn-small\" ng-disabled = \"disableAddBtn\" ng-click=\"updateHourpickerValue()\">{{hourpicker.editMode > -1 ? 'Update' : 'Add'}}</button>\n" +
+    "            </div>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "</form>");
+}]);
+
+angular.module("b2bTemplate/hourPicker/b2bHourpickerValue.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerValue.html",
+    "<div class=\"selected-days\">\n" +
+    "    <span class=\"day\">{{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}</span>\n" +
+    "    <span style=\"float:right\">\n" +
+    "        <i class=\"icon-misc-pen\" role=\"button\" title=\"Edit {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"editHourpickerValue(hourpickerValue.index)\"></i>\n" +
+    "        <i class=\"icon-misc-trash\" role=\"button\" title=\"Delete {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"deleteHourpickerValue(hourpickerValue.index)\"></i>\n" +
+    "    </span>\n" +
+    "    <div style=\"clear:both\"></div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/leftNavigation/leftNavigation.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/leftNavigation/leftNavigation.html",
+  "<div class=\"b2b-nav-menu\" ng-init=\"(showmenu = true)\" ng-class=\"{false: 'left-menu-collapsed'}[showmenu]\">\n" +
+    "    <div class=\"b2b-subnav-container\">\n" +
+    "        <ul class=\"b2b-subnav-content\">\n" +
+    "                   <li>" +
+    "                          <div ng-class=\"{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]\">"+        
+    "                                  <a ng-click=\"toggleDrawer(showmenu);(showmenu = !showmenu) \" class=\"text-right\">" +
+    "                                  <i ng-class=\"{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]\">&nbsp;</i></a>" +
+    "                          </div>"+                        
+    "                  </li>" +
+    "            <li ng-repeat=\"menu in menuData\" ui-sref=\"{{menu.state}}\">" +
+    "                          <span ng-class=\"{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]\"><span class=\"{{menu.imageSrc}}\"></span>&nbsp;&nbsp;</span>" +
+    "                          <a ng-class=\"{expand: isOpen($index)}\" ng-if=\"showmenu\"  aria-label=\"{{menu.name}}\" title=\" \" aria-expanded=\"{{(idx==$index)?true:false;}}\" href=\"javascript:void(0);\">" +
+    "                                  {{menu.name}}" +
+    "                                  <i aria-hidden=\"true\" ng-if=\"(menu.menuItems.length > 0)\" class=\"b2b-icon-primary-plus-minus\"ng-class=\"idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'\"></i>" +
+    "                          </a>\n" +
+    "                          <div role=\"region\" aria-hidden=\"{{(isOpen($index))?false:true;}}\">\n" +
+    "                  <ul ng-class=\"{expand: idx==$index}\">\n" +
+    "                            <li ng-repeat=\"menuItem in menu.menuItems\" ng-click=\"liveLink($event, $index, $parent.$index)\"><a aria-hidden=\"{{!(idx==$parent.$index)}}\" aria-label=\"{{menuItem.name}}\" title=\" \" href=\"{{menuItem.href}}\" tabindex=\"{{(idx==$parent.$index)?0:-1;}}\" ng-class=\"{active: itemIdx==$index && navIdx==$parent.$index}\">{{menuItem.name}}</a></li>\n" +
+    "                          </ul>\n" +
+    "                          </div>\n" +
+    "            </li>\n" +
+    "        </ul>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/listbox/listbox.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/listbox/listbox.html",
+    "<div class=\"b2b-list-box\" tabindex=\"0\" role=\"listbox\" ng-transclude>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/modalsAndAlerts/b2b-backdrop.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-backdrop.html",
+    "<div class=\"b2b-modal-backdrop fade in hidden-by-modal\" aria-hidden=\"true\" tabindex=\"-1\"></div>");
+}]);
+
+angular.module("b2bTemplate/modalsAndAlerts/b2b-window.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-window.html",
+    "<div class=\"modalwrapper active {{windowClass}}\" ng-class=\"{'modal-landscape': isModalLandscape}\" role=\"{{isNotifDialog?'alertdialog':'dialog'}}\" tabindex=\"-1\" aria-labelledby=\"{{title}}\" aria-describedby=\"{{content}}\">\n" +
+    "    <div class=\"modal fade in {{sizeClass}}\" ng-transclude></div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/monthSelector/monthSelector-popup.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/monthSelector/monthSelector-popup.html",
+    "<div id=\"monthselector{{$id}}\" class=\"datepicker dropdown-menu monthselector\" \n" +
+    "     ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" \n" +
+    "     ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" \n" +
+    "     style=\"display: block;\" aria-hidden=\"false\" role=\"dialog presentation\" tabindex=\"-1\">\n" +
+    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +
+    "        <span class=\"offscreen-text\" aria-live=\"polite\" aria-atomic=\"true\">{{title}} displaying</span>\n" +
+    "        <table class=\"table-condensed\" role=\"grid\">\n" +
+    "            <thead>\n" +
+    "                <tr ng-repeat=\"header in headers\">\n" +
+    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"header\"></th>\n" +
+    "                </tr>\n" +
+    "                <tr>\n" +
+    "                    <th id=\"prev{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Year\" ng-class=\"{'prev': !disablePrev}\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\"></i></th>\n" +
+    "                    <th id=\"year{{$id}}\" role=\"heading\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch b2b-monthSelector-label\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +
+    "                    <th id=\"next{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Next Year\" ng-class=\"{'next': !disableNext}\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\"></i></th>\n" +
+    "                </tr>\n" +
+    "                <tr ng-show=\"labels.length > 0\">\n" +
+    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +
+    "                </tr>\n" +
+    "            </thead>\n" +
+    "            <tbody b2b-key type=\"table\" columns=\"4\" >\n" +
+    "                <tr ng-repeat=\"row in rows\">\n" +
+    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13,32\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'MMMM, y') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true\" ng-blur=\"currFocus=false\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" b2b-element-focus=\"inline && dt.focusable && dt.selected && !dt.dateRange\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +
+    "                        <div aria-hidden=\"true\"  tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label | limitTo: 3}}</div>\n" +
+    "                    </td>\n" +
+    "                </tr>\n" +
+    "            </tbody>\n" +
+    "            <tfoot>\n" +
+    "                <tr ng-repeat=\"footer in footers\">\n" +
+    "                    <th colspan=\"7\" class=\"text-left\" b2b-append-element=\"footer\"></th>\n" +
+    "                </tr>\n" +
+    "            </tfoot>\n" +
+    "        </table>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/monthSelector/monthSelector.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/monthSelector/monthSelector.html",
+    "<div>\n" +
+    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/monthSelector/monthSelectorLink.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/monthSelector/monthSelectorLink.html",
+    "<div>\n" +
+    "    <span class=\"span12\" ng-transclude></span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/pagination/b2b-pagination.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/pagination/b2b-pagination.html",
+    "<div class=\"b2b-pager\">\n" +
+    "    <div ng-if=\"notMobile && totalPages > 1\">\n" +
+    "        <a tabindex=\"{{currentPage <= 1 ? -1 : 0 }}\" class=\"b2b-pager__item--prev\" b2b-accessibility-click=\"13,32\" title=\"Previous Page\" ng-click=\"prev($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage <= 1 ? 'b2b-pager__item--prev-disabled': '' \">\n" +
+    "            <i class=\"icon-primary-left\"></i>\n" +
+    "        </a>\n" +
+    "        <a tabindex=\"{{currentPage === 1 ? -1 : 0}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 1}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 1{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">\n" +
+    "            1<span class=\"offscreen-text\" ng-if=\"currentPage === 1\"> is selected</span>\n" +
+    "        </a>\n" +
+    "        <a tabindex=\"{{currentPage === 2 ? -1 : 0}}\" aria-selected=\"{{checkSelectedPage(page)}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 2}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 2{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(2, $event)\">2<span class=\"offscreen-text\" ng-if=\"currentPage === 2\"> is selected</span></a>\n" +
+    "\n" +
+    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage > 6\">...</span>\n" +
+    "\n" +
+    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"!checkSelectedPage(page) && selectPage(page, $event)\">{{page}}<span class=\"offscreen-text\" ng-if=\"currentPage === page\"> is selected</span></a>\n" +
+    "\n" +
+    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\">...</span>\n" +
+    "\n" +
+    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': checkSelectedPage(page)}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages-1}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages-1, $event)\">{{totalPages-1}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages-1\"> is selected</span></a>\n" +
+    "\n" +
+    "        <a tabindex=\"{{currentPage === totalPages ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': currentPage === totalPages}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages\"> is selected</span></a>\n" +
+    "\n" +
+    "        <a tabindex=\"{{currentPage >= totalPages ? -1 : 0 }}\" href=\"javascript:void(0)\" class=\"b2b-pager__item--next\" b2b-accessibility-click=\"13,32\" title=\"Next Page\" ng-click=\"next($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage >= totalPages ? 'b2b-pager__item--next-disabled' :'' \">\n" +
+    "            <i class=\"icon-primary-right\"></i>\n" +
+    "        </a>\n" +
+    "        \n" +
+    "        <span class=\"fieldLabel\" ng-show=\"totalPages > 10 && showInput === true\">    \n" +
+    "            <label for=\"{{inputId}}\">Go to Page:</label>\n" +
+    "            <input id=\"{{inputId}}\" class=\"b2b-pager__item--input\" type=\"number\" ng-blur=\"onfocusOut($event)\" ng-focus=\"onfocusIn($event)\" ng-keypress=\"gotoKeyClick($event)\" b2b-only-nums=\"4\" ng-model=\"$parent.gotoPage\" />\n" +
+    "            <button class=\"btn-arrow\" ng-click=\"gotoBtnClick()\" ng-disabled=\"$parent.gotoPage !== 0 || $parent.gotoPage !== undefined\" aria-label=\"Go to\">\n" +
+    "                <div class=\"btn btn-small btn-secondary\">\n" +
+    "                    <i class=\"icon-primary-right\"></i>\n" +
+    "                </div>\n" +
+    "            </button>\n" +
+    "        </span>\n" +
+    "    </div>\n" +
+    "    <div ng-if=\"isMobile && totalPages > 1\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\" ng-class=\"isMobile ? 'b2b-mobile-view': '' \">\n" +
+    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), fade1: ($index == 0 && currentPage > meanVal+1),  fade2: ($index == 1 && currentPage > meanVal+1), fadesl: ($index == pages.length-2 && currentPage < totalPages - meanVal),  fadel: ($last && currentPage < totalPages - meanVal), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +
+    "    </div>\n" +
+    "</div>\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/paneSelector/paneSelector.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/paneSelector/paneSelector.html",
+    "<div class=\"panes\" ng-transclude></div>");
+}]);
+
+angular.module("b2bTemplate/paneSelector/paneSelectorPane.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/paneSelector/paneSelectorPane.html",
+    "<div class=\"pane-block\" ng-transclude></div>");
+}]);
+
+angular.module("b2bTemplate/profileCard/profileCard-addUser.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/profileCard/profileCard-addUser.html",
+    "<div  class=\"span3 b2b-profile-card b2b-add-user\">\n" +
+    "    <div class=\"atcenter\">\n" +
+    "        <div class=\"circle\"><i class=\"icon-primary-add-maximize\"></i></div>\n" +
+    "        <div>Create new user</div>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/profileCard/profileCard.html",
+    "<div class=\"span3 b2b-profile-card\">\n" +
+    "    <div class=\"top-block\">\n" +
+    "       <div class=\"profile-image\">\n" +
+    "            <img ng-if=\"image\" profile-name=\"{{profile.name}}\" ng-src=\"{{profile.img}}\" alt=\"{{profile.name}}\">\n" +
+    "            <span ng-if=\"!image\" class=\"default-img\">{{initials}}</span>\n" +
+    "\n" +
+    "            <h4 class=\"name\">{{profile.name}}</h4>\n" +
+    "\n" +
+    "            <p class=\"status\">\n" +
+    "                <span class=\"status-icon\" ng-class=\"{'status-green':colorIcon==='green','status-red':colorIcon==='red','status-blue':colorIcon==='blue','status-yellow':colorIcon==='yellow'}\">   \n" +
+    "                </span>\n" +
+    "                <span>{{profile.state}}<span ng-if=\"badge\" class=\"status-badge\">Admin</span></span>\n" +
+    "            </p>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"bottom-block\">\n" +
+    "         <div class=\"profile-details\">\n" +
+    "            <label>Username</label>\n" +
+    "            <div ng-if=\"shouldClip(profile.userName)\" ng-mouseover=\"showUserNameTooltip = true;\" ng-mouseleave=\"showUserNameTooltip = false;\">\n" +
+    "                <div ng-if=\"shouldClip(profile.userName)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showUserNameTooltip\">\n" +
+    "                    {{profile.userName.slice(0, 25)+'...'}}\n" +
+    "                    <div class=\"arrow\"></div>\n" +
+    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +
+    "                        <div class=\"tooltip-size-control\">\n" +
+    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +
+    "                                {{profile.userName}}\n" +
+    "                            </div>\n" +
+    "                        </div>\n" +
+    "                    </div>\n" +
+    "                </div>\n" +
+    "            </div>\n" +
+    "            <div ng-if=\"!shouldClip(profile.userName)\">\n" +
+    "                {{profile.userName}}\n" +
+    "            </div>\n" +
+    "            <label>Email</label>\n" +
+    "            <div ng-if=\"shouldClip(profile.email)\" ng-mouseover=\"showEmailTooltip = true;\" ng-mouseleave=\"showEmailTooltip = false;\">\n" +
+    "                <div ng-if=\"shouldClip(profile.email)\" class=\"tooltip\" data-placement=\"bottom\" b2b-tooltip show-tooltip=\"showEmailTooltip\">\n" +
+    "                    {{profile.email.slice(0, 25)+'...'}}\n" +
+    "                    <div class=\"arrow\"></div>\n" +
+    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +
+    "                        <div class=\"tooltip-size-control\">\n" +
+    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +
+    "                                {{profile.email}}\n" +
+    "                            </div>\n" +
+    "                        </div>\n" +
+    "                    </div>\n" +
+    "                </div>\n" +
+    "            </div>\n" +
+    "            <div ng-if=\"!shouldClip(profile.email)\">\n" +
+    "                {{profile.email}}\n" +
+    "            </div>\n" +
+    "            <label>Role</label>\n" +
+    "            <div ng-if=\"shouldClip(profile.role)\" ng-mouseover=\"showRoleTooltip = true;\" ng-mouseleave=\"showRoleTooltip = false;\">\n" +
+    "                <div ng-if=\"shouldClip(profile.role)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showRoleTooltip\">\n" +
+    "                    {{profile.role.slice(0, 25)+'...'}}\n" +
+    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +
+    "                        <div class=\"tooltip-size-control\">\n" +
+    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +
+    "                                {{profile.role}}\n" +
+    "                            </div>\n" +
+    "                        </div>\n" +
+    "                    </div>\n" +
+    "                </div>\n" +
+    "            </div>\n" +
+    "            <div ng-if=\"!shouldClip(profile.role)\">\n" +
+    "                {{profile.role}}\n" +
+    "            </div>\n" +
+    "            <label>Last login</label>\n" +
+    "            <div ng-if=\"shouldClip(profile.lastLogin)\" ng-mouseover=\"showLastLoginTooltip = true;\" ng-mouseleave=\"showLastLoginTooltip = false;\">\n" +
+    "                <div ng-if=\"shouldClip(profile.lastLogin)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showLastLoginTooltip\">\n" +
+    "                    {{profile.lastLogin.slice(0, 25)+'...'}}\n" +
+    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +
+    "                        <div class=\"tooltip-size-control\">\n" +
+    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +
+    "                                {{profile.lastLogin}}\n" +
+    "                            </div>\n" +
+    "                        </div>\n" +
+    "                    </div>\n" +
+    "                </div>\n" +
+    "            </div>\n" +
+    "            <div ng-if=\"!shouldClip(profile.lastLogin)\">\n" +
+    "                {{profile.lastLogin}}\n" +
+    "            </div>\n" +
+    "         </div>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/searchField/searchField.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/searchField/searchField.html",
+    "<div class=\"search-bar\">\n" +
+    "    <div class='input-container' ng-blur=\"blurInput()\">\n" +
+    "        <input type=\"text\" class=\"innershadow b2b-search-input-field\" id=\"{{configObj.labelId}}\" b2b-search-input ng-model=\"inputModel\" ng-disabled=\"disabled\" b2b-reset ng-keydown=\"selectionIndex($event)\" placeholder=\"{{configObj.ghostText}}\" style=\"width:100%\" maxlength=\"{{configObj.maxLength}}\" title=\"{{inputModel}}\" aria-label=\"{{inputModel.length>0?inputModel:configObj.ghostText}}\"  aria-live=\"assertive\"/>\n" +
+    "            <button class=\"btn-search\" ng-disabled=\"disabled\" ng-click=\"startSearch()\" b2b-accessibility-click=\"13,32\" aria-label=\"Search\" ng-focus=\"showListFlag = false\" type=\"button\"><i class=\"icoControls-magnifyingglass\"></i></button>\n" +
+    "    </div>\n" +
+    "    <div class=\"search-suggestion-wrapper\" ng-if=\"filterList.length >=0\" ng-show=\"showListFlag\">\n" +
+    "        <ul class=\"search-suggestion-list\" role=\"listbox\">      \n" +
+    "            <li class=\"no-result\" ng-if=\"filterList.length == 0 && configObj.display\">{{configObj.resultText}}</li>\n" +
+    "            <li class=\"search-suggestion-item\" ng-if=\"filterList.length\" ng-repeat=\"item in filterList | limitTo:configObj.noOfItemsDisplay track by $index\" ng-bind-html=\"item.title | b2bMultiSepartorHighlight:inputModel:configObj.searchSeperator\" ng-class=\"{active:isActive($index,filterList.length)}\" ng-click=\"selectItem($index,item.title)\">\n" +
+    "                {{item.title}}     \n" +
+    "            </li>\n" +
+    "        </ul>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/seekBar/seekBar.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/seekBar/seekBar.html",
+    "<div class=\"b2b-seek-bar-container\" ng-class=\"{vertical:verticalSeekBar}\">\n" +
+    "    <div class=\"b2b-seek-bar-track-container\">\n" +
+    "        <div class=\"b2b-seek-bar-track\"></div>\n" +
+    "        <div class=\"b2b-seek-bar-track-fill\"></div>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-seek-bar-knob-container\" role=\"menu\"  >\n" +
+    "        <div class=\"b2b-seek-bar-knob\" tabindex=\"0\" role=\"menuitem\"></div>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/slider/slider.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/slider/slider.html",
+    "<div class=\"b2b-slider-container\" ng-class=\"{'vertical':verticalSlider}\">\n" +
+    "    <div class=\"slider-track-container\">\n" +
+    "        <div class=\"slider-track\"></div>\n" +
+    "        <div class=\"slider-track-fill\" ng-style=\"{backgroundColor:trackFillColor}\"></div>\n" +
+    "    </div>\n" +
+    "    <div class=\"slider-knob-container\" ng-class=\"{'slider-knob-hidden':hideKnob}\">\n" +
+    "        <div class=\"slider-knob\" role=\"slider\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" aria-labelledby=\"{{labelId}}\" aria-valuenow=\"{{currentModelValue}}\" aria-valuetext=\"{{currentModelValue}}{{postAriaLabel}}\" aria-orientation=\"{{verticalSlider ? 'vertical' : 'horizontal'}}\"></div>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/spinButton/spinButton.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/spinButton/spinButton.html",
+    "<div class=\"btn-group btn-spinbutton-toggle\" ng-class=\"{'disabled': disabledFlag}\">\n" +
+    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-prev icon-primary-subtractminimize\" ng-click=\"minus();focusInputSpinButton($event)\" aria-label=\"Remove {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isMinusDisabled()}\" ng-disabled=\"isMinusDisabled()\" aria-disabled=\"{{isMinusDisabled()}}\" role=\"spinbutton\"></button>\n" +
+    "    <input class=\"btn pull-left\" id=\"{{spinButtonId}}\" type=\"tel\" b2b-only-nums=\"3\" maxlength=\"3\" min={{min}} max={{max}} data-max-value=\"{{max}}\" ng-model=\"inputValue[inputModelKey]\" value=\"{{inputValue[inputModelKey]}}\" aria-live=\"polite\" aria-valuenow=\"{{inputValue[inputModelKey]}}\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" ng-disabled=\"disabledFlag\">\n" +
+    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-next icon-primary-add-maximize\" ng-click=\"plus();focusInputSpinButton($event)\" aria-label=\"Add {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isPlusDisabled()}\" ng-disabled=\"isPlusDisabled()\" aria-disabled=\"{{isPlusDisabled()}}\" role=\"spinbutton\"></button>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/statusTracker/statusTracker.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/statusTracker/statusTracker.html",
+    "<div class=\"b2b-status-tracker row\">\n" +
+    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Previous status\" ng-click=\"previousStatus()\">\n" +
+    "       <div class=\"btn btn-small btn-secondary\">\n" +
+    "           <i class=\"icon-primary-left\"></i>\n" +
+    "       </div>\n" +
+    "   </button>\n" +
+    "   <div ng-repeat=\"status in statuses\" class=\"b2b-status-tracker-step\" ng-class=\"{ 'complete' : status.complete, 'current' : currentStatus($index)}\" ng-show=\"isInViewport($index)\">\n" +
+    "       <p class=\"b2b-status-tracker-heading\">{{status.heading}}</p>\n" +
+    "       <div class=\"progress\">\n" +
+    "           <div class=\"progress-bar\">\n" +
+    "               <span class=\"hidden-spoken\">\n" +
+    "                   {{status.complete ? 'Complete' : 'Incomplete'}}\n" +
+    "               </span>\n" +
+    "           </div>\n" +
+    "       </div>\n" +
+    "       <div class=\"b2b-status-tracker-estimate\">\n" +
+    "           <i ng-show=\"status.estimate !== '' && status.estimate !== undefined\" ng-class=\"status.complete ? 'icoControls-approval' : 'icon-misc-time'\"></i> {{status.complete ? 'Complete' : status.estimate}}\n" +
+    "           &nbsp;\n" +
+    "       </div>\n" +
+    "       \n" +
+    "       <div class=\"b2b-status-tracker-description\">\n" +
+    "           {{status.description}}\n" +
+    "       </div>\n" +
+    "   </div>\n" +
+    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex + b2bStatusTrackerConfig.maxViewItems === statuses.length\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Next status\" ng-click=\"nextStatus()\">\n" +
+    "       <div class=\"btn btn-small btn-secondary\">\n" +
+    "           <i class=\"icon-primary-right\"></i>\n" +
+    "       </div>\n" +
+    "   </button>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/stepTracker/stepTracker.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/stepTracker/stepTracker.html",
+    "<div class=\"b2b-step-tracker\">\n" +
+    "    <button class=\"btn-arrow b2b-left-arrow\" ng-click=\"previousStatus()\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Previous step\">\n" +
+    "       <div class=\"btn btn-left btn-small btn-secondary\"><i class=\"icon-primary-left\"></i></div>\n" +
+    "   </button>\n" +
+    "    <button class=\"btn-arrow b2b-right-arrow\" ng-click=\"nextStatus()\" ng-disabled=\"currentViewIndex + b2bStepTrackerConfig.maxViewItems === stepsItemsObject.length\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Next step\">\n" +
+    "       <div class=\"btn btn-small btn-right btn-secondary\"><i class=\"icon-primary-right\"></i></div>\n" +
+    "   </button>\n" +
+    "    <ul class=\"b2b-steps\">\n" +
+    "        <li ng-class=\"{'b2b-step-done':$index < currentIndex - 1 ,'b2b-step-on':$index == currentIndex - 1}\" \n" +
+    "            ng-repeat=\"stepsItem in stepsItemsObject\" ng-show=\"isInViewport($index)\">\n" +
+    "           <p class=\"b2b-step-text\" data-sm-text=\"{{stepsItem.dataMobile}}\" data-large-text=\"{{stepsItem.dataDesktop}}\">{{stepsItem.text}}</p>\n" +
+    "            <span class=\"hidden-spoken\">\n" +
+    "                {{($index < currentIndex - 1)? 'Complete. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +
+    "                {{($index == currentIndex - 1)? 'In Progress. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +
+    "                {{($index > currentIndex - 1)? 'Incomplete. '+stepsItem.text+' '+stepsItem.dataMobile:''}}\n" +
+    "            </span>\n" +
+    "        </li>\n" +
+    "    </ul>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/switches/switches-spanish.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/switches/switches-spanish.html",
+    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +
+    "    <span class=\"btn-slider-on\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"activo\">activo</i></span>\n" +
+    "    <span class=\"switch-handle\"></span>\n" +
+    "    <span class=\"btn-slider-off\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"inactivo\">inactivo</i></span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/switches/switches.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/switches/switches.html",
+    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +
+    "    <span class=\"btn-slider-on\">On</span>\n" +
+    "    <span class=\"switch-handle\"></span>\n" +
+    "    <span class=\"btn-slider-off\">Off</span>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/tableMessages/tableMessage.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tableMessages/tableMessage.html",
+    "<div class=\"b2b-table-message\">\n" +
+    "    <div class=\"b2b-message\" ng-if=\"msgType === 'noMatchingResults'\">\n" +
+    "        <div class=\"b2b-magnify-glass\"></div>\n" +
+    "        <div>\n" +
+    "            <div ng-transclude></div>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-message\" ng-if=\"msgType == 'infoCouldNotLoad'\">\n" +
+    "        <div class=\"icon-primary-alert b2b-alert\" aria-label=\"Oops! The information could not load at this time. Please click link to refresh the page.\"></div>\n" +
+    "        <div>Oops!</div>\n" +
+    "        <div>The information could not load at this time.</div>\n" +
+    "        <div>Please <a href=\"javascript:void(0)\" title=\"Refresh the page\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-message\" ng-if=\"msgType == 'magnifySearch'\">\n" +
+    "        <div class=\"b2b-magnify-glass\"></div>\n" +
+    "        <div>\n" +
+    "            <p class=\"b2b-message-title\">Please input values to\n" +
+    "                <br/> begin your search.</p>\n" +
+    "        </div>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-message\" ng-if=\"msgType === 'loadingTable'\">\n" +
+    "        <div class=\"icon-primary-spinner-ddh b2b-loading-dots\"></div>\n" +
+    "        <div ng-transclude></div>\n" +
+    "    </div>\n" +
+    "</div>\n" +
+    "");
+}]);
+
+angular.module("b2bTemplate/tableScrollbar/tableScrollbar.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tableScrollbar/tableScrollbar.html",
+    "<div class=\"b2b-table-scrollbar\">\n" +
+    "    <div class=\"b2b-scrollbar-arrows\">\n" +
+    "        <button class=\"btn-arrow  b2b-scrollbar-arrow-left\" type=\"button\" ng-attr-aria-label=\"{{disableLeft ? 'Scroll Left Disabled' : 'Scroll Left'}}\" ng-click=\"scrollLeft()\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div></button>\n" +
+    "        <button class=\"btn-arrow b2b-scrollbar-arrow-right\" ng-attr-aria-label=\"{{disableRight ? 'Scroll Right Disabled' : 'Scroll Right'}}\" ng-click=\"scrollRight()\" ng-disabled=\"disableRight\" type=\"button\"><div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +
+    "    </div>\n" +
+    "    <div class=\"b2b-table-inner-container\">\n" +
+    "        <span ng-transclude></span>\n" +
+    "    </div>\n" +
+    "</div>");
+}]);
+
+angular.module("b2bTemplate/tables/b2bTable.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tables/b2bTable.html",
+    "<table ng-class=\"{'striped': responsive, 'complex-table': responsive && active}\" ng-transclude></table>");
+}]);
+
+angular.module("b2bTemplate/tables/b2bTableBody.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tables/b2bTableBody.html",
+    "<td ng-hide=\"isHidden()\" ng-transclude></td>");
+}]);
+
+angular.module("b2bTemplate/tables/b2bTableHeaderSortable.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tables/b2bTableHeaderSortable.html",
+    "<th scope=\"col\" role=\"columnheader\" aria-sort=\"{{sortPattern !== 'null' && 'none' || sortPattern}}\" aria-label=\"{{headerName}} {{sortable !== 'false' && ': activate to sort' || ' '}} {{sortPattern !== 'null' && '' || sortPattern}}\" tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort();\" ng-hide=\"isHidden()\">\n" +
+    "    <span ng-transclude></span>\n" +
+    "    <i ng-class=\"{'icon-controls-upPRIMARY active': sortPattern === 'ascending', 'icon-controls-down active down': sortPattern === 'descending'}\"></i>\n" +
+    "</th>");
+}]);
+
+angular.module("b2bTemplate/tables/b2bTableHeaderUnsortable.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tables/b2bTableHeaderUnsortable.html",
+    "<th scope=\"col\" ng-hide=\"isHidden()\" ng-transclude></th>");
+}]);
+
+angular.module("b2bTemplate/tabs/b2bTab.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tabs/b2bTab.html",
+    "<li role=\"tab\" aria-selected=\"{{isTabActive()}}\" aria-controls=\"{{tabPanelId}}\" class=\"tab\" \n" +
+    "    ng-class=\"{'active': isTabActive()}\" ng-click=\"clickTab()\" ng-hide=\"tabItem.disabled\">\n" +
+    "    <a href=\"javascript:void(0)\"  tabindex=\"{{(isTabActive() && tabItem.disabled)?-1:0}}\"\n" +
+    "       ng-disabled=\"tabItem.disabled\" aria-expanded=\"{{(isTabActive() && !tabItem.disabled)}}\" \n" +
+    "       b2b-accessibility-click=\"13,32\" ng-transclude></a>\n" +
+    "    <span class=\"hidden-spoken\" ng-if=\"isTabActive()\">Active tab</span>\n" +
+    "</li>");
+}]);
+
+angular.module("b2bTemplate/tabs/b2bTabset.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/tabs/b2bTabset.html",
+    "<ul class=\"tabs promo-tabs\" role=\"tablist\" ng-transclude></ul>");
+}]);
+
+angular.module("b2bTemplate/treeNav/groupedTree.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNav/groupedTree.html",
+    "<ul role=\"group\">\n" +
+    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>{{(key)?key:''}}<span class=\"b2b-tree-node-icon\"><i ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +
+    "        <ul role=\"group\">\n" +
+    "            <b2b-member ng-repeat='member in value.childArray' member='member' time-delay='{{timeDelay}}' group-it='groupIt'></b2b-member>\n" +
+    "        </ul>\n" +
+    "    </li>\n" +
+    "</ul>");
+}]);
+
+angular.module("b2bTemplate/treeNav/treeMember.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNav/treeMember.html",
+    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" aria-describedby=\"description_{{$id}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-link>\n" +
+    "    <a tabindex=\"-1\" title=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active,'b2b-locked-node':member.locked}\">       <span class=\"b2b-tree-node-name\">{{member.name}}</span>\n" +
+    "        <span class=\"{{!member.child?'end':''}} b2b-tree-node-icon\">\n" +
+    "            <i class=\"b2b-tree-expandCollapse-icon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +
+    "        </span>\n" +
+    "         <div id=\"description_{{$id}}\" class=\"offscreen-text\">\n" +
+    "           {{member.descriptionText}}\n" +
+    "        </div>\n" +
+    "        <div class=\"b2b-tree-tooltip\" ng-if=\"member.showTooltip\">\n" +
+    "           <span class=\"b2b-tree-arrow-left\"></span>\n" +
+    "           <div class=\"b2b-tree-tooltip-content\">\n" +
+    "               {{member.tooltipContent}}\n" +
+    "           </div>  \n" +
+    "        </div>\n" +
+    "    </a>\n" +
+    "</li>");
+}]);
+
+angular.module("b2bTemplate/treeNav/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNav/ungroupedTree.html",
+    "<ul role=\"{{setRole}}\"><b2b-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-member></ul>");
+}]);
+
+angular.module("b2bTemplate/treeNodeCheckbox/groupedTree.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNodeCheckbox/groupedTree.html",
+    "<ul role=\"group\">\n" +
+    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-node-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>\n" +
+    "        <span class=\"ng-hide\">\n" +
+    "            <label class=\"checkbox\">\n" +
+    "                <input type=\"checkbox\" tabindex=\"-1\" class=\"treeCheckBox grpTreeCheckbox\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{(key)?key:''}}</span>\n" +
+    "            </label>\n" +
+    "        </span>\n" +
+    "        <span>\n" +
+    "            {{(key)?key:''}}    \n" +
+    "        </span>\n" +
+    "        <span class=\"nodeIcon\"><i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +
+    "        <ul role=\"group\">\n" +
+    "            <b2b-tree-member ng-repeat='member in value.childArray' member='member' group-it='groupIt'></b2b-tree-member>\n" +
+    "        </ul>\n" +
+    "    </li>\n" +
+    "</ul>");
+}]);
+
+angular.module("b2bTemplate/treeNodeCheckbox/treeMember.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNodeCheckbox/treeMember.html",
+    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.name}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-node-link>\n" +
+    "    <a tabindex=\"-1\" title=\"{{member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active}\">\n" +
+    "       <span ng-show=\"member.displayCheckbox\">\n" +
+    "               <label class=\"checkbox\">\n" +
+    "                <input type=\"checkbox\" tabindex=\"-1\" ng-model=\"member.isSelected\" ng-class=\"{'treeCheckBox': (member.displayCheckbox !== undefined)}\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{member.name}}</span>\n" +
+    "            </label>\n" +
+    "        </span>\n" +
+    "       <span ng-show=\"!member.displayCheckbox\">\n" +
+    "           {{member.name}} \n" +
+    "       </span>\n" +
+    "        <span class=\"nodeIcon {{!member.child?'end':''}}\">\n" +
+    "            <i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +
+    "        </span>\n" +
+    "    </a>\n" +
+    "</li>");
+}]);
+
+angular.module("b2bTemplate/treeNodeCheckbox/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {
+  $templateCache.put("b2bTemplate/treeNodeCheckbox/ungroupedTree.html",
+    "<ul role=\"{{setRole}}\"><b2b-tree-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-tree-member></ul>");
+}]);
diff --git a/ecomp-portal-FE-os/client/assets/images/onap-logo.png b/ecomp-portal-FE-os/client/assets/images/onap-logo.png
new file mode 100644 (file)
index 0000000..3232032
Binary files /dev/null and b/ecomp-portal-FE-os/client/assets/images/onap-logo.png differ
diff --git a/ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/.gitignore b/ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/.gitignore
new file mode 100644 (file)
index 0000000..775d4ee
--- /dev/null
@@ -0,0 +1,2 @@
+README.md
+b2b-angular.css
diff --git a/ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/README.md b/ecomp-portal-FE-os/client/bower_components_external/b2b/css/b2b-angular/README.md
deleted file mode 100644 (file)
index f3b5e66..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-This file tracks patches to b2b-angular.css
-
-
-14 March 2017: Replaced occurrences of font names in about 180 places:
-Replace "ATT" with "ECOMP" in font-family in b2b-angular.css file
--  font-family: "Omnes-ATT-W02-Medium";
-+  font-family: "Omnes-ECOMP-W02-Medium";
--  font-family: "Omnes-ATT-W02";
-+  font-family: "Omnes-ECOMP-W02";
-
-15 March 2017: Revert the change back to original for input:not([type="button"])
- - height: 14px; 
- + height: 36px; 
\ No newline at end of file
diff --git a/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/.gitignore b/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/.gitignore
new file mode 100644 (file)
index 0000000..022e3d2
--- /dev/null
@@ -0,0 +1,2 @@
+/README.md
+/b2b-library.min.js
diff --git a/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/README.md b/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/README.md
deleted file mode 100644 (file)
index abe5a5f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-This file tracks patches to b2b-angular.js
-
-
-20 March 2017: Page auto adjustment with left menu collapse and expand.
-+
-scope.toggleDrawer = function(showmenu){
-       scope.idx=-1; /*hide the sunmenus*/
-       if(showmenu){
-               document.getElementById('page-content').style.paddingLeft = "50px";
-       }
-       else
-               document.getElementById('page-content').style.paddingLeft = "230px";            
-};
\ No newline at end of file
diff --git a/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/b2b-library.min.js b/ecomp-portal-FE-os/client/bower_components_external/b2b/js/b2b-angular/b2b-library.min.js
deleted file mode 100644 (file)
index 2826895..0000000
+++ /dev/null
@@ -1,22048 +0,0 @@
-/*! b2b-angular-library - v1.0.1 - Last updated: 2017-03-02. Copyright (c) 2016 AT&T Services, Inc. */ \r
-angular.module("b2b.att.tpls", ['b2bTemplate/audioPlayer/audioPlayer.html', 'b2bTemplate/audioRecorder/audioRecorder.html', 'b2bTemplate/backToTop/backToTop.html', 'b2bTemplate/boardstrip/b2bAddBoard.html', 'b2bTemplate/boardstrip/b2bBoard.html', 'b2bTemplate/boardstrip/b2bBoardstrip.html', 'b2bTemplate/calendar/datepicker-popup.html', 'b2bTemplate/calendar/datepicker.html', 'b2bTemplate/coachmark/coachmark.html', 'b2bTemplate/dropdowns/b2bDropdownDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html', 'b2bTemplate/dropdowns/b2bDropdownListDesktop.html', 'b2bTemplate/fileUpload/fileUpload.html', 'b2bTemplate/flyout/flyout.html', 'b2bTemplate/flyout/flyoutContent.html', 'b2bTemplate/footer/footer_column_switch_tpl.html', 'b2bTemplate/horizontalTable/horizontalTable.html', 'b2bTemplate/hourPicker/b2bHourpicker.html', 'b2bTemplate/hourPicker/b2bHourpickerPanel.html', 'b2bTemplate/hourPicker/b2bHourpickerValue.html', 'b2bTemplate/leftNavigation/leftNavigation.html', 'b2bTemplate/listbox/listbox.html', 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html', 'b2bTemplate/modalsAndAlerts/b2b-window.html', 'b2bTemplate/monthSelector/monthSelector-popup.html', 'b2bTemplate/monthSelector/monthSelector.html', 'b2bTemplate/monthSelector/monthSelectorLink.html', 'b2bTemplate/pagination/b2b-pagination.html', 'b2bTemplate/paneSelector/paneSelector.html', 'b2bTemplate/paneSelector/paneSelectorPane.html', 'b2bTemplate/profileCard/profileCard-addUser.html', 'b2bTemplate/profileCard/profileCard.html', 'b2bTemplate/searchField/searchField.html', 'b2bTemplate/seekBar/seekBar.html', 'b2bTemplate/slider/slider.html', 'b2bTemplate/spinButton/spinButton.html', 'b2bTemplate/statusTracker/statusTracker.html', 'b2bTemplate/stepTracker/stepTracker.html', 'b2bTemplate/switches/switches-spanish.html', 'b2bTemplate/switches/switches.html', 'b2bTemplate/tableMessages/tableMessage.html', 'b2bTemplate/tables/b2bTable.html', 'b2bTemplate/tables/b2bTableBody.html', 'b2bTemplate/tables/b2bTableHeaderSortable.html', 'b2bTemplate/tables/b2bTableHeaderUnsortable.html', 'b2bTemplate/tableScrollbar/tableScrollbar.html', 'b2bTemplate/tabs/b2bTab.html', 'b2bTemplate/tabs/b2bTabset.html', 'b2bTemplate/treeNav/groupedTree.html', 'b2bTemplate/treeNav/treeMember.html', 'b2bTemplate/treeNav/ungroupedTree.html', 'b2bTemplate/treeNodeCheckbox/groupedTree.html', 'b2bTemplate/treeNodeCheckbox/treeMember.html', 'b2bTemplate/treeNodeCheckbox/ungroupedTree.html']);angular.module("b2b.att", ["b2b.att.tpls", 'b2b.att.addressInputTemplate','b2b.att.arrows','b2b.att.audioPlayer','b2b.att.audioRecorder','b2b.att.backToTop','b2b.att.badgesForAlerts','b2b.att.boardstrip','b2b.att.breadcrumbs','b2b.att.buttonGroups','b2b.att.buttons','b2b.att.calendar','b2b.att.checkboxes','b2b.att.coachmark','b2b.att.configurationSection','b2b.att.directoryListingTemplate','b2b.att.dropdowns','b2b.att.fileUpload','b2b.att.filters','b2b.att.flyout','b2b.att.footer','b2b.att.header','b2b.att.headings','b2b.att.horizontalTable','b2b.att.hourPicker','b2b.att.inputTemplate','b2b.att.leftNavigation','b2b.att.links','b2b.att.listbox','b2b.att.loaderAnimation','b2b.att.messageWrapper','b2b.att.modalsAndAlerts','b2b.att.monthSelector','b2b.att.multiLevelNavigation','b2b.att.multipurposeExpander','b2b.att.notesMessagesAndErrors','b2b.att.notificationCardTemplate','b2b.att.orderConfirmationTemplate','b2b.att.pagination','b2b.att.paneSelector','b2b.att.phoneNumberInput','b2b.att.profileBlockTemplate','b2b.att.profileCard','b2b.att.radios','b2b.att.searchField','b2b.att.seekBar','b2b.att.selectorModule','b2b.att.separators','b2b.att.slider','b2b.att.spinButton','b2b.att.staticRouteTemplate','b2b.att.statusTracker','b2b.att.stepTracker','b2b.att.switches','b2b.att.tableMessages','b2b.att.tables','b2b.att.tableScrollbar','b2b.att.tabs','b2b.att.tagBadges','b2b.att.textArea','b2b.att.tooltipsForForms','b2b.att.treeNav','b2b.att.treeNodeCheckbox','b2b.att.utilities']);/**\r
- * @ngdoc directive\r
- * @name Template.att:Address Input\r
- *\r
- * @description\r
- *  <file src="src/addressInputTemplate/docs/readme.md" />\r
- *\r
- * @usage\r
-\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <example module="b2b.att">\r
- <file src="src/addressInputTemplate/docs/demo.html" />\r
- <file src="src/addressInputTemplate/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.addressInputTemplate', ['ngMessages']);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:arrows\r
- *\r
- * @description\r
- *  <file src="src/arrows/docs/readme.md" />\r
- *\r
- * @usage\r
- *   Please refer demo.html tab in Example section below.\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/arrows/docs/demo.html" />\r
-            <file src="src/arrows/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.arrows', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:Audio Player\r
- * @scope\r
- * @param {string} audioSrcUrl - MP3 audio source URL or Blob URL\r
- * @description\r
- *  <file src="src/audioPlayer/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
- <div b2b-audio audio-src-url='audioSrcUrl'></div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/audioPlayer/docs/demo.html" />\r
-            <file src="src/audioPlayer/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
\r
-angular.module('b2b.att.audioPlayer', ['b2b.att.utilities', 'b2b.att.seekBar'])\r
-    .constant('AudioPlayerConfig', {\r
-        'defaultVolume': 50,\r
-        'timeShiftInSeconds': 5\r
-    })\r
-    .filter('trustedAudioUrl', ['$sce', function ($sce) {\r
-        return function (audioFileFullPath) {\r
-            return audioFileFullPath ? $sce.trustAsResourceUrl(audioFileFullPath) : 'undefined';\r
-        };\r
-    }])\r
-    .directive('b2bAudio', ['$log', '$timeout', 'AudioPlayerConfig', '$compile', 'events', function ($log, $timeout, AudioPlayerConfig, $compile, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            scope: {\r
-                audioSrcUrl: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/audioPlayer/audioPlayer.html',\r
-            controller: function ($scope) {\r
-\r
-                $scope.audio = {};\r
-\r
-                if (!angular.isDefined($scope.audioSrcUrl)) {\r
-                    $log.warn('b2b-audio : audio-src-url undefined');\r
-                    $scope.audioSrcUrl = undefined;\r
-                    $scope.audio.mp3 = undefined;\r
-                }\r
-\r
-            },\r
-            link: function (scope, element) {\r
-                var audioElement = angular.element(element[0].querySelector('audio'))[0];\r
-                scope.audio.audioElement = audioElement;\r
-                \r
-                function setAttributes(element, attributes) {\r
-                    Object.keys(attributes).forEach(function (name) {\r
-                        element.setAttribute(name, attributes[name]);\r
-                    });\r
-                }\r
-\r
-                $timeout(function () {\r
-                    // TODO: Replace with DDA Tooltip\r
-                    var seekBarKnob = element[0].querySelector('.b2b-seek-bar-knob');\r
-                    var tooltipObject = {\r
-                        'tooltip': '{{timeFormatter(audio.currentTime)}}',\r
-                        'tooltip-placement': 'above',\r
-                        'tooltip-style': 'blue',\r
-                        'tooltip-trigger': 'mousedown',\r
-                        'tooltip-append-to-body': 'false',\r
-                        'tooltip-offset': '-10',\r
-                        'refer-by': 'seek-bar-tooltip'\r
-                    };\r
-                    setAttributes(seekBarKnob, tooltipObject);\r
-                    $compile(seekBarKnob)(scope);\r
-                });\r
-\r
-                if (angular.isDefined(scope.audioSrcUrl)) {\r
-                    scope.audio.mp3 = scope.audioSrcUrl;\r
-                }\r
-\r
-                scope.audio.currentTime = 0;\r
-                scope.audio.currentVolume = AudioPlayerConfig.defaultVolume;\r
-                scope.audio.timeShiftInSeconds = AudioPlayerConfig.timeShiftInSeconds;\r
-                scope.isPlayInProgress = false;\r
-                scope.isReady = false;\r
-                scope.isAudioDragging = false;\r
-\r
-                $timeout(function () {\r
-                    audioElement.load();\r
-                    audioElement.volume = scope.audio.currentVolume / 100;\r
-                });\r
-\r
-                scope.$watch('audioSrcUrl', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        if (!newVal) {\r
-                            $log.warn('b2b-audio : audio-src-url undefined. Please provide a valid URL');\r
-                        }\r
-                        \r
-                        scope.audio.mp3 = newVal;\r
-                        $timeout(function () {\r
-                            audioElement.load();\r
-                        });\r
-                    }\r
-                });\r
-\r
-                scope.playAudio = function () {\r
-                    if (scope.isReady) {\r
-                        audioElement.play();\r
-                    }\r
-                };\r
-\r
-                audioElement.onplay = function () {\r
-                    scope.isPlayInProgress = true;\r
-                    scope.$digest();\r
-                };\r
-\r
-                scope.pauseAudio = function () {\r
-                    audioElement.pause();\r
-                };\r
-\r
-                audioElement.onpause = function () {\r
-                    scope.isPlayInProgress = false;\r
-                    scope.$digest();\r
-                };\r
-\r
-                scope.toggleAudio = function () {\r
-                    if (audioElement.paused) {\r
-                        scope.playAudio();\r
-                    } else {\r
-                        scope.pauseAudio();\r
-                    }\r
-                };\r
-\r
-                scope.volumeUp = function (delta) {\r
-                    if (!delta) {\r
-                        delta = 0.1;\r
-                    } else {\r
-                        delta = delta / 100;\r
-                    }\r
-                    audioElement.muted = false;\r
-                    if (audioElement.volume < 1) {\r
-                        audioElement.volume = Math.min((Math.round((audioElement.volume + delta) * 100) / 100), 1);\r
-                    }\r
-                    scope.audio.currentVolume = audioElement.volume * 100;\r
-                    return audioElement.volume;\r
-                };\r
-\r
-                scope.volumeDown = function (delta) {\r
-                    if (!delta) {\r
-                        delta = 0.1;\r
-                    } else {\r
-                        delta = delta / 100;\r
-                    }\r
-                    audioElement.muted = false;\r
-                    if (audioElement.volume > 0) {\r
-                        audioElement.volume = Math.max((Math.round((audioElement.volume - delta) * 100) / 100), 0);\r
-                    }\r
-                    scope.audio.currentVolume = audioElement.volume * 100;\r
-                    return audioElement.volume;\r
-                };\r
-\r
-                var volumeHandler = function (e) {\r
-                    events.preventDefault(e);\r
-                    if ((e.wheelDelta && e.wheelDelta > 0) || (e.detail && e.detail < 0)) {\r
-                        scope.volumeUp();\r
-                    } else {\r
-                        scope.volumeDown();\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                \r
-\r
-                scope.$watch('audio.currentVolume', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        audioElement.volume = newVal / 100;\r
-                    }\r
-                });\r
-\r
-                scope.setCurrentTime = function (timeInSec) {\r
-                    audioElement.currentTime = timeInSec;\r
-                };\r
-\r
-                scope.setAudioPosition = function (val) {\r
-                    if (scope.isReady) {\r
-                        scope.setCurrentTime(val);\r
-                        scope.isAudioDragging = false;\r
-                    }\r
-                };\r
-\r
-                function getTimestampArray(timestamp) {\r
-                    var d = Math.abs(timestamp) / 1000; // delta\r
-                    var r = {}; // result\r
-                    var s = { // structure\r
-                        day: 86400,\r
-                        hour: 3600,\r
-                        minute: 60,\r
-                        second: 1\r
-                    };\r
-\r
-                    Object.keys(s).forEach(function (key) {\r
-                        r[key] = Math.floor(d / s[key]);\r
-                        d -= r[key] * s[key];\r
-                    });\r
-\r
-                    return r;\r
-                };\r
-\r
-                scope.timeFormatter = function (timeInSec) {\r
-                    var formattedTime = '00:00';\r
-\r
-                    if (!timeInSec || timeInSec < 1) {\r
-                        return formattedTime;\r
-                    }\r
-\r
-                    if (typeof timeInSec === 'string') {\r
-                        return timeInSec;\r
-                    }\r
-\r
-                    var dateArray = getTimestampArray(timeInSec * 1000);\r
-                    Object.keys(dateArray).forEach(function (key) {\r
-                        if (dateArray[key] === 0) {\r
-                            dateArray[key] = '00';\r
-                        } else if (dateArray[key] < 10) {\r
-                            dateArray[key] = '0' + dateArray[key];\r
-                        }\r
-                    });\r
-\r
-                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];\r
-\r
-                    if (dateArray['hour'] !== '00') {\r
-                        formattedTime = dateArray['hour'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    if (dateArray['day'] !== '00') {\r
-                        formattedTime = dateArray['day'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    return formattedTime;\r
-                };\r
-\r
-                audioElement.onloadedmetadata = function () {\r
-                    scope.audio.duration = audioElement.duration;\r
-                    scope.$digest();\r
-                };\r
-\r
-                audioElement.ontimeupdate = function () {\r
-                    if (!scope.isAudioDragging) {\r
-                        scope.audio.currentTime = audioElement.currentTime;\r
-                        scope.$digest();\r
-                    }\r
-                };\r
-\r
-                audioElement.onended = function () {\r
-                    scope.setCurrentTime(0);\r
-                    scope.audio.currentTime = 0;\r
-                    if (!audioElement.paused) {\r
-                        scope.pauseAudio();\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                audioElement.oncanplay = function () {\r
-                    scope.isReady = true;\r
-                    scope.isPlayInProgress = !audioElement.paused;\r
-                    scope.$digest();\r
-                };\r
-\r
-                var onloadstart = function () {\r
-                    scope.isReady = false;\r
-                    scope.isPlayInProgress = !audioElement.paused;\r
-                    scope.audio.currentTime = 0;\r
-                    scope.audio.duration = 0;\r
-                    scope.$digest();\r
-                };\r
-                audioElement.addEventListener("loadstart", onloadstart);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:Audio Recorder\r
- * @scope\r
- * @param {function} callback - A callback to handle the WAV blob\r
- * @param {object} config - A config object with properties startRecordingMessage & whileRecordingMessage\r
- * @description\r
- *  <file src="src/audioRecorder/docs/readme.md" />\r
- *\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/audioRecorder/docs/demo.html" />\r
-            <file src="src/audioRecorder/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.audioRecorder', ['b2b.att.utilities'])\r
-    .constant('AudioRecorderConfig', {\r
-        'startRecordingMessage': 'Click on REC icon to being recording',\r
-        'whileRecordingMessage': 'Recording...'\r
-    })\r
-    .directive('b2bAudioRecorder', ['$interval', 'AudioRecorderConfig', 'b2bUserAgent', 'b2bRecorder', function($interval, AudioRecorderConfig, b2bUserAgent, b2bRecorder) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            scope: {\r
-                callback: '&'\r
-            },\r
-            templateUrl: 'b2bTemplate/audioRecorder/audioRecorder.html',\r
-            controller: function($scope) {\r
-\r
-                function hasGetUserMedia() {\r
-                    return !!(navigator.getUserMedia || navigator.webkitGetUserMedia ||\r
-                        navigator.mozGetUserMedia || navigator.msGetUserMedia);\r
-                }\r
-\r
-                if (!hasGetUserMedia()) {\r
-                    throw new Error('Your broswer does not support MediaRecorder API');\r
-                }\r
-\r
-                if (!(b2bUserAgent.isFF() || b2bUserAgent.isChrome())) {\r
-                    throw new Error('b2bAudioRecorder does not support this browser!');\r
-                }\r
-\r
-            },\r
-            link: function(scope, element) {\r
-                scope.elapsedTime = 0;\r
-                scope.isRecording = false;\r
-                scope.config = {};\r
-                scope.config.startRecordingMessage = AudioRecorderConfig.startRecordingMessage;\r
-                scope.config.whileRecordingMessage = AudioRecorderConfig.whileRecordingMessage;\r
-                \r
-\r
-                var timer = undefined; // Interval promise\r
-                navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;\r
-                var stream;\r
-                var audio = angular.element(element[0].querySelector('audio'))[0];\r
-                var recorder = undefined;\r
-\r
-                function startRecording() {\r
-                    scope.isRecording = true;\r
-                    navigator.mediaDevices.getUserMedia({\r
-                        audio: true\r
-                    }).then(function(stream) {\r
-                        //create the MediaStreamAudioSourceNode\r
-                        context = new AudioContext();\r
-                        source = context.createMediaStreamSource(stream);\r
-                        recorder = new b2bRecorder(source);\r
-                        recorder.record();\r
-\r
-                        timer = $interval(function() {\r
-                            scope.elapsedTime += 1;\r
-                        }, 1000, 0);\r
-                    }).catch(function(err) {\r
-                        angular.noop();\r
-                    });\r
-\r
-                };\r
-\r
-                function stopRecording() {\r
-                    scope.isRecording = false;\r
-                    recorder.stop();\r
-                    var audio = {};\r
-                    recorder.exportWAV(function(s) {\r
-                        audio.src = window.URL.createObjectURL(s);\r
-                        context.close().then(function() {\r
-                            if (timer) {\r
-                                $interval.cancel(timer);\r
-                            }\r
-                            scope.elapsedTime = 0;\r
-                            \r
-                            recorder.clear();\r
-                            recorder = undefined;\r
-                        });\r
-                        if (angular.isFunction(scope.callback)){\r
-                            scope.callback({'data': audio});    \r
-                        }\r
-                    });\r
-                    \r
-                    \r
-                }\r
-\r
-                scope.toggleRecording = function() {\r
-                    if (scope.isRecording) {\r
-                        stopRecording();\r
-                    } else {\r
-                        startRecording();\r
-                    }\r
-                };\r
-\r
-\r
-\r
-                //TODO: Move this into utilities\r
-                function getTimestampArray(timestamp) {\r
-                    var d = Math.abs(timestamp) / 1000; // delta\r
-                    var r = {}; // result\r
-                    var s = { // structure\r
-                        day: 86400,\r
-                        hour: 3600,\r
-                        minute: 60,\r
-                        second: 1\r
-                    };\r
-\r
-                    Object.keys(s).forEach(function(key) {\r
-                        r[key] = Math.floor(d / s[key]);\r
-                        d -= r[key] * s[key];\r
-                    });\r
-\r
-                    return r;\r
-                };\r
-                scope.timeFormatter = function(timeInSec) {\r
-                    var formattedTime = '00:00';\r
-\r
-                    if (!timeInSec || timeInSec < 1) {\r
-                        return formattedTime;\r
-                    }\r
-\r
-                    if (typeof timeInSec === 'string') {\r
-                        return timeInSec;\r
-                    }\r
-\r
-                    var dateArray = getTimestampArray(timeInSec * 1000);\r
-                    Object.keys(dateArray).forEach(function(key) {\r
-                        if (dateArray[key] === 0) {\r
-                            dateArray[key] = '00';\r
-                        } else if (dateArray[key] < 10) {\r
-                            dateArray[key] = '0' + dateArray[key];\r
-                        }\r
-                    });\r
-\r
-                    formattedTime = dateArray['minute'] + ':' + dateArray['second'];\r
-\r
-                    if (dateArray['hour'] !== '00') {\r
-                        formattedTime = dateArray['hour'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    if (dateArray['day'] !== '00') {\r
-                        formattedTime = dateArray['day'] + ':' + formattedTime;\r
-                    }\r
-\r
-                    return formattedTime;\r
-                };\r
-\r
-                scope.$on('$destroy', function() {\r
-                    if (timer) {\r
-                        $interval.cancel(timer);\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:Back To Top\r
- * @scope\r
- * @description\r
- *  <file src="src/backToTop/docs/readme.md" />\r
- * @param {integer} scrollSpeed - Scroll speed in seconds, default is 1\r
-*\r
- * @usage\r
- * \r
-    <div ng-controller="backToTopController">\r
-        <div b2b-backtotop></div>\r
-    </div>\r
- * \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/backToTop/docs/demo.html" />\r
-            <file src="src/backToTop/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
\r
-angular.module('b2b.att.backToTop', ['b2b.att.utilities','b2b.att.position'])\r
-    .directive('b2bBacktotopButton', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/backToTop/backToTop.html',\r
-            link: function (scope, elem, attr) {\r
-                elem.bind('click', function(evt) {\r
-                    var scrollSpeed = parseInt(attr.scrollSpeed) || 1;\r
-                    TweenLite.to(window, scrollSpeed, {scrollTo:{x: 0, y: 0}});\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:badgesForAlerts\r
- *\r
- * @description\r
- *  <file src="src/badgesForAlerts/docs/readme.md" />\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/badgesForAlerts/docs/demo.html" />\r
-            <file src="src/badgesForAlerts/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.badgesForAlerts', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:boardstrip\r
- *\r
- * @description\r
- *  <file src="src/boardstrip/docs/readme.md" />\r
- *\r
- * @usage\r
- * See demo section\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/boardstrip/docs/demo.html" />\r
-            <file src="src/boardstrip/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.boardstrip', ['b2b.att.utilities'])\r
-    .constant('BoardStripConfig', {\r
-        'maxVisibleBoards': 4,\r
-        'boardsToScroll': 1,\r
-        /* These parameters are non-configurable and remain unaltered, until there is a change in corresponding CSS */\r
-        'boardLength': 140,\r
-        'boardMargin': 15\r
-    })\r
-    .directive('b2bBoard', [function () {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            require: '^b2bBoardStrip',\r
-            scope: {\r
-                boardIndex: '=',\r
-                boardLabel: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bBoard.html',\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var parentCtrl = ctrls;\r
-\r
-                scope.getCurrentIndex = function () {\r
-                    return parentCtrl.getCurrentIndex();\r
-                };\r
-                scope.selectBoard = function (boardIndex) {\r
-                    if (!isNaN(boardIndex)) {\r
-                        parentCtrl.setCurrentIndex(boardIndex);\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBoardStrip', ['BoardStripConfig', '$timeout', function (BoardStripConfig, $timeout) {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            require: ['?ngModel', 'b2bBoardStrip'],\r
-            scope: {\r
-                boardsMasterArray: '=',\r
-                onAddBoard: '&?'\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bBoardstrip.html',\r
-            controller: function ($scope) {\r
-                if (!angular.isDefined($scope.boardsMasterArray)) {\r
-                    $scope.boardsMasterArray = [];\r
-                }\r
-\r
-                this.rectifyMaxVisibleBoards = function () {\r
-                    if (this.maxVisibleIndex >= $scope.boardsMasterArray.length) {\r
-                        this.maxVisibleIndex = $scope.boardsMasterArray.length - 1;\r
-                    }\r
-\r
-                    if (this.maxVisibleIndex < 0) {\r
-                        this.maxVisibleIndex = 0;\r
-                    }\r
-                };\r
-\r
-                this.resetBoardStrip = function () {\r
-                    $scope.currentIndex = 0;\r
-\r
-                    this.maxVisibleIndex = BoardStripConfig.maxVisibleBoards - 1;\r
-                    this.minVisibleIndex = 0;\r
-\r
-                    this.rectifyMaxVisibleBoards();\r
-                };\r
-\r
-                this.getCurrentIndex = function () {\r
-                    return $scope.currentIndex;\r
-                };\r
-                this.setCurrentIndex = function (indx) {\r
-                    $scope.currentIndex = indx;\r
-                };\r
-\r
-                this.getBoardsMasterArrayLength = function () {\r
-                    return $scope.boardsMasterArray.length;\r
-                };\r
-\r
-                $scope.addBoardPressedFlag = false;\r
-                this.getAddBoardPressedFlag = function () {\r
-                    return $scope.addBoardPressedFlag;\r
-                };\r
-                this.setAddBoardPressedFlag = function (booleanValue) {\r
-                    $scope.addBoardPressedFlag = booleanValue;\r
-                };\r
-\r
-            },\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var ctrl = ctrls[1];\r
-\r
-                var oldTimeout;\r
-                var animationTimeout = 1000;\r
-\r
-                var getBoardViewportWidth = function (numberOfVisibleBoards) {\r
-                    return numberOfVisibleBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);\r
-                };\r
-                if (element[0].querySelector(".board-viewport")) {\r
-                    angular.element(element[0].querySelector(".board-viewport")).css({\r
-                        "width": getBoardViewportWidth(BoardStripConfig.maxVisibleBoards) + "px"\r
-                    });\r
-                }\r
-\r
-                var getBoardstripContainerWidth = function (totalNumberOfBoards) {\r
-                    return totalNumberOfBoards * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin);\r
-                };\r
-                if (element[0].querySelector(".boardstrip-container")) {\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                    });\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": "0px"\r
-                    });\r
-                }\r
-\r
-                var calculateAndGetBoardstripContainerAdjustment = function () {\r
-\r
-                    var calculatedAdjustmentValue;\r
-\r
-                    if (ctrl.getBoardsMasterArrayLength() <= BoardStripConfig.maxVisibleBoards) {\r
-                        calculatedAdjustmentValue = 0;\r
-                    } else {\r
-                        calculatedAdjustmentValue = (ctrl.minVisibleIndex * (BoardStripConfig.boardLength + BoardStripConfig.boardMargin)) * -1;\r
-                    }\r
-\r
-                    return calculatedAdjustmentValue;\r
-                };\r
-\r
-                var animateBoardstripContainerAdjustment = function (elementToFocusAfterAnimation) {\r
-                    var oldContainerAdjustment = angular.element(element[0].querySelector(".boardstrip-container"))[0].style.left;\r
-                    var containerAdjustment = calculateAndGetBoardstripContainerAdjustment();\r
-                    if (oldContainerAdjustment !== containerAdjustment + 'px') {\r
-                        angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                            "left": containerAdjustment + "px"\r
-                        });\r
-\r
-                        $timeout.cancel(oldTimeout);\r
-                        oldTimeout = $timeout(function () {\r
-                            elementToFocusAfterAnimation.focus();\r
-                        }, animationTimeout);\r
-                    } else {\r
-                        elementToFocusAfterAnimation.focus();\r
-                    }\r
-                };\r
-\r
-                var updateBoardsTabIndex = function (boardArray, minViewIndex, maxViewIndex) {\r
-                    for (var i = 0; i < boardArray.length; i++) {\r
-                        angular.element(boardArray[i]).attr('tabindex', '-1');\r
-                    }\r
-                    for (var j = minViewIndex; j <= maxViewIndex; j++) {\r
-                        angular.element(boardArray[j]).attr('tabindex', '0');\r
-                    }\r
-                };\r
-\r
-                $timeout(function () {\r
-                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                });\r
-\r
-                scope.$watchCollection('boardsMasterArray', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        /* When a board is removed */\r
-                        if (newVal.length < oldVal.length) {\r
-                            ctrl.resetBoardStrip();\r
-                            $timeout(function () {\r
-\r
-                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                if (currentBoardArray.length !== 0) {\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[0]);\r
-                                } else {\r
-                                    element[0].querySelector('div.boardstrip-item--add').focus();\r
-                                }\r
-\r
-                                angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                    "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                });\r
-                                /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                            });\r
-                        }\r
-                        /* When a board is added */\r
-                        else {\r
-                            if (ctrl.getAddBoardPressedFlag()) {\r
-                                ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                                ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-\r
-                                ctrl.setCurrentIndex(ctrl.maxVisibleIndex);\r
-\r
-                                $timeout(function () {\r
-                                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                    });\r
-\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[currentBoardArray.length - 1]);\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            } else {\r
-                                if (ctrl.minVisibleIndex === 0 && ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards + 1) {\r
-                                    ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                                    ctrl.rectifyMaxVisibleBoards();\r
-                                }\r
-\r
-                                $timeout(function () {\r
-                                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                                        "width": getBoardstripContainerWidth(ctrl.getBoardsMasterArrayLength()) + "px"\r
-                                    });\r
-\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            }\r
-\r
-                            ctrl.setAddBoardPressedFlag(false);\r
-                        }\r
-                    }\r
-                });\r
-\r
-                scope.nextBoard = function () {\r
-                    ctrl.maxVisibleIndex += BoardStripConfig.boardsToScroll;\r
-                    ctrl.rectifyMaxVisibleBoards();\r
-                    ctrl.minVisibleIndex = ctrl.maxVisibleIndex - (BoardStripConfig.maxVisibleBoards - 1);\r
-\r
-                    $timeout.cancel(oldTimeout);\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"\r
-                    });\r
-\r
-                    $timeout(function () {\r
-                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-\r
-                        /* Remove tabindex from non-visible boards */\r
-                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-\r
-                        if (!(scope.isNextBoard())) {\r
-                            try {\r
-                                currentBoardArray[currentBoardArray.length - 1].focus();\r
-                            } catch (e) { /* IE8 may throw exception */ }\r
-                        }\r
-                    }, animationTimeout);\r
-                };\r
-                scope.prevBoard = function () {\r
-\r
-                    ctrl.minVisibleIndex -= BoardStripConfig.boardsToScroll;\r
-                    if (ctrl.minVisibleIndex < 0) {\r
-                        ctrl.minVisibleIndex = 0;\r
-                    }\r
-\r
-                    ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;\r
-                    ctrl.rectifyMaxVisibleBoards();\r
-\r
-                    $timeout.cancel(oldTimeout);\r
-                    angular.element(element[0].querySelector(".boardstrip-container")).css({\r
-                        "left": calculateAndGetBoardstripContainerAdjustment() + "px"\r
-                    });\r
-\r
-                    $timeout(function () {\r
-                        var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-\r
-                        /* Remove tabindex from non-visible boards */\r
-                        updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-\r
-                        if (ctrl.minVisibleIndex === 0) {\r
-                            try {\r
-                                element[0].querySelector('div.boardstrip-item--add').focus();\r
-                            } catch (e) { /* IE8 may throw exception */ }\r
-                        }\r
-                    });\r
-                };\r
-\r
-                scope.isPrevBoard = function () {\r
-                    return (ctrl.minVisibleIndex > 0);\r
-                };\r
-                scope.isNextBoard = function () {\r
-                    return (ctrl.getBoardsMasterArrayLength() - 1 > ctrl.maxVisibleIndex);\r
-                };\r
-\r
-                ngModelCtrl.$render = function () {\r
-                    if (ngModelCtrl.$viewValue || ngModelCtrl.$viewValue === 0) {\r
-                        var newCurrentIndex = ngModelCtrl.$viewValue;\r
-\r
-                        if (!(newCurrentIndex = parseInt(newCurrentIndex, 10))) {\r
-                            newCurrentIndex = 0;\r
-                        }\r
-\r
-                        if (newCurrentIndex <= 0) {\r
-                            ctrl.resetBoardStrip();\r
-                            newCurrentIndex = 0;\r
-\r
-                            var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                            if (currentBoardArray.length !== 0) {\r
-                                animateBoardstripContainerAdjustment(currentBoardArray[0]);\r
-                            } else {\r
-                                element[0].querySelector('div.boardstrip-item--add').focus();\r
-                            }\r
-                            /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                            updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                        } else if (newCurrentIndex >= ctrl.getBoardsMasterArrayLength()) {\r
-                            ctrl.maxVisibleIndex = ctrl.getBoardsMasterArrayLength() - 1;\r
-                            ctrl.rectifyMaxVisibleBoards();\r
-                            ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-\r
-                            newCurrentIndex = ctrl.maxVisibleIndex;\r
-\r
-                            $timeout(function () {\r
-                                var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);\r
-                                /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                            });\r
-                        } else {\r
-\r
-                            if (!(newCurrentIndex >= ctrl.minVisibleIndex && newCurrentIndex <= ctrl.maxVisibleIndex)) {\r
-                                ctrl.minVisibleIndex = newCurrentIndex;\r
-                                ctrl.maxVisibleIndex = ctrl.minVisibleIndex + BoardStripConfig.maxVisibleBoards - 1;\r
-                                ctrl.rectifyMaxVisibleBoards();\r
-\r
-                                if (ctrl.getBoardsMasterArrayLength() < BoardStripConfig.maxVisibleBoards) {\r
-                                    ctrl.minVisibleIndex = 0;\r
-                                } else {\r
-                                    ctrl.minVisibleIndex = Math.max(ctrl.maxVisibleIndex - BoardStripConfig.maxVisibleBoards + 1, 0);\r
-                                }\r
-\r
-                                $timeout(function () {\r
-                                    var currentBoardArray = element[0].querySelectorAll('[b2b-board]');\r
-                                    animateBoardstripContainerAdjustment(currentBoardArray[newCurrentIndex]);\r
-                                    /* Update tabindecies to ensure keyboard navigation behaves correctly */\r
-                                    updateBoardsTabIndex(currentBoardArray, ctrl.minVisibleIndex, ctrl.maxVisibleIndex);\r
-                                });\r
-                            }\r
-                        }\r
-                        scope.currentIndex = newCurrentIndex;\r
-                        ngModelCtrl.$setViewValue(newCurrentIndex);\r
-                    } else {\r
-                        ctrl.resetBoardStrip();\r
-                        ngModelCtrl.$setViewValue(0);\r
-                    }\r
-                };\r
-\r
-                scope.$watch('currentIndex', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal && ngModelCtrl && ngModelCtrl.$viewValue !== newVal) {\r
-                        ngModelCtrl.$setViewValue(newVal);\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bAddBoard', ['BoardStripConfig', '$parse', function (BoardStripConfig, $parse) {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            require: '^b2bBoardStrip',\r
-            scope: {\r
-                onAddBoard: '&?'\r
-            },\r
-            templateUrl: 'b2bTemplate/boardstrip/b2bAddBoard.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.addBoard = function () {\r
-                    if (attrs['onAddBoard']) {\r
-                        scope.onAddBoard = $parse(scope.onAddBoard);\r
-                        scope.onAddBoard();\r
-                        ctrl.setAddBoardPressedFlag(true);\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBoardNavigation', ['keymap', 'events', function (keymap, events) {\r
-        return {\r
-            restrict: 'AE',\r
-            link: function (scope, elem) {\r
-\r
-                var prevElem = keymap.KEY.LEFT;\r
-                var nextElem = keymap.KEY.RIGHT;\r
-\r
-                elem.bind('keydown', function (ev) {\r
-\r
-                    if (!(ev.keyCode)) {\r
-                        ev.keyCode = ev.which;\r
-                    }\r
-\r
-                    switch (ev.keyCode) {\r
-                    case nextElem:\r
-                        events.preventDefault(ev);\r
-                        events.stopPropagation(ev);\r
-\r
-                        if (elem[0].nextElementSibling && parseInt(angular.element(elem[0].nextElementSibling).attr('tabindex')) >= 0) {\r
-                            angular.element(elem[0])[0].nextElementSibling.focus();\r
-                        } else {\r
-                            /* IE8 fix */\r
-                            var el = angular.element(elem[0])[0];\r
-                            do {\r
-                                if (el.nextSibling) {\r
-                                    el = el.nextSibling;\r
-                                } else {\r
-                                    break;\r
-                                }\r
-                            } while (el && el.tagName !== 'LI');\r
-\r
-                            if (el.tagName && el.tagName === 'LI' && parseInt(angular.element(el).attr('tabindex')) >= 0) {\r
-                                el.focus();\r
-                            }\r
-                        }\r
-\r
-                        break;\r
-                    case prevElem:\r
-                        events.preventDefault(ev);\r
-                        events.stopPropagation(ev);\r
-\r
-                        if (elem[0].previousElementSibling && parseInt(angular.element(elem[0].previousElementSibling).attr('tabindex')) >= 0) {\r
-                            angular.element(elem[0])[0].previousElementSibling.focus();\r
-                        } else {\r
-                            /* IE8 fix */\r
-                            var el1 = angular.element(elem[0])[0];\r
-                            do {\r
-                                if (el1.previousSibling) {\r
-                                    el1 = el1.previousSibling;\r
-                                } else {\r
-                                    break;\r
-                                }\r
-                            } while (el1 && el1.tagName !== 'LI');\r
-\r
-                            if (el1.tagName && el1.tagName === 'LI' && parseInt(angular.element(el1).attr('tabindex')) >= 0) {\r
-                                el1.focus();\r
-                            }\r
-                        }\r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:breadcrumbs\r
- *\r
- * @description\r
- *  <file src="src/breadcrumbs/docs/readme.md" />\r
- * @usage\r
-    <ul class="breadcrumb">\r
-        <li ng-repeat="link in breadCrumbsLink"><a tabindex="{{(idx==$index)?-1:0}}" href='javascript:void(0)' ng-click="clickActive($index)" ng-class="{'active':idx==$index, '': idx!=$index}">{{link.title}}</a></li>\r
-    </ul>\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/breadcrumbs/docs/demo.html" />\r
- <file src="src/breadcrumbs/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.breadcrumbs',[])\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:buttonGroups\r
- *\r
- * @description\r
- *  <file src="src/buttonGroups/docs/readme.md" />\r
- *\r
- * @usage\r
-<h2>Radio Aproach</h2>\r
-<div class="btn-group" b2b-key prev="37,38" next="39,40" circular-traversal role="radiogroup">\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 1'" ng-model="radioModel" b2b-btn-radio="'Button 1'" tabindex="{{(!radioModel || 'Button 1'===radioModel)?0:-1}}">Button 1</button>\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 2'" ng-model="radioModel" b2b-btn-radio="'Button 2'" tabindex="{{(!radioModel || 'Button 2'===radioModel)?0:-1}}">Button 2</button>\r
-    <button type="button" class="btn btn-secondary" b2b-key-item ng-focus="radioModel='Button 3'" ng-model="radioModel" b2b-btn-radio="'Button 3'" tabindex="{{(!radioModel || 'Button 3'===radioModel)?0:-1}}">Button 3</button>\r
-</div>\r
-\r
-<h2>Checkbox Aproach</h2>\r
-<span b2b-button-group class="btn-group btn-fullwidth" role="group" max-select="3" ng-model="checkModel1">\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button1" b2b-btn-checkbox>Button1</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button2" b2b-btn-checkbox>Button2</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button3" b2b-btn-checkbox>Button3</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button4" b2b-btn-checkbox>Button4</button>\r
-    <button type="button" class="btn btn-secondary" ng-model="checkModel1.Button5" b2b-btn-checkbox>Button5</button>\r
-</span>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/buttonGroups/docs/demo.html" />\r
-            <file src="src/buttonGroups/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.buttonGroups', ['b2b.att.utilities'])\r
-    .constant('buttonConfig', {\r
-        activeClass: 'active',\r
-        toggleEvent: 'click'\r
-    })\r
-    .directive('b2bBtnRadio', ['buttonConfig', function (buttonConfig) {\r
-        var activeClass = buttonConfig.activeClass || 'active';\r
-        var toggleEvent = buttonConfig.toggleEvent || 'click';\r
-\r
-        return {\r
-            require: 'ngModel',\r
-            link: function (scope, element, attrs, ngModelCtrl) {\r
-                var notMobile = !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-\r
-                if (notMobile) {\r
-                    element.bind('focus', function () {\r
-                        scope.$apply(function () {\r
-                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));\r
-                            ngModelCtrl.$render();\r
-                        });\r
-                    });\r
-                }\r
-\r
-                element.attr('role', 'radio');\r
-\r
-                //model -> UI\r
-                ngModelCtrl.$render = function () {\r
-                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio)));\r
-                    if (angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.b2bBtnRadio))) {\r
-                        element.attr("aria-checked", true);\r
-                    } else {\r
-                        element.attr("aria-checked", false);\r
-                    }\r
-                };\r
-\r
-                //ui->model\r
-                element.bind(toggleEvent, function () {\r
-                    if (!element.hasClass(activeClass)) {\r
-                        scope.$apply(function () {\r
-                            ngModelCtrl.$setViewValue(scope.$eval(attrs.b2bBtnRadio));\r
-                            ngModelCtrl.$render();\r
-                        });\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bBtnCheckbox', ['buttonConfig', function (buttonConfig) {\r
-        var activeClass = buttonConfig.activeClass || 'active';\r
-        var toggleEvent = buttonConfig.toggleEvent || 'click';\r
-\r
-        return {\r
-            require: ['ngModel', '^^b2bButtonGroup'],\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var parentCtrl = ctrls[1];\r
-\r
-                element.attr('role', 'checkbox');\r
-                element.attr('aria-describedby', parentCtrl.getStateDescriptionElemId());\r
-\r
-                function getTrueValue() {\r
-                    var trueValue = scope.$eval(attrs.b2bBtnCheckboxTrue);\r
-                    return angular.isDefined(trueValue) ? trueValue : true;\r
-                }\r
-\r
-                function getFalseValue() {\r
-                    var falseValue = scope.$eval(attrs.b2bBtnCheckboxFalse);\r
-                    return angular.isDefined(falseValue) ? falseValue : false;\r
-                }\r
-\r
-                //model -> UI\r
-                ngModelCtrl.$render = function () {\r
-                    element.toggleClass(activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));\r
-                    if ((angular.equals(ngModelCtrl.$modelValue, getTrueValue()))) {\r
-                        element.attr("aria-checked", true);\r
-                    } else {\r
-                        element.attr("aria-checked", false);\r
-                    }\r
-                };\r
-\r
-                //ui->model\r
-                element.bind(toggleEvent, function () {\r
-                    scope.$apply(function () {\r
-                        ngModelCtrl.$setViewValue(element.hasClass(activeClass) ? getFalseValue() : getTrueValue());\r
-                        ngModelCtrl.$render();\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bButtonGroup', ['$timeout', '$compile', function ($timeout, $compile) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                maxSelect: "=",\r
-                ngModelButtonState: '=ngModel'\r
-            },\r
-            controller: ['$scope', '$element', function ($scope, $element) {\r
-                $scope.nSel = 0;\r
-\r
-                var stateDescriptionElem = angular.element('<span id="b2b_button_group_' + $scope.$id + '" class="hide" aria-hidden="true">{{nSel}} of {{maxSelect}} options selected.</span>');\r
-                $compile(stateDescriptionElem)($scope);\r
-                $element.after(stateDescriptionElem);\r
-\r
-                this.getStateDescriptionElemId = function () {\r
-                    return stateDescriptionElem.attr('id');\r
-                };\r
-            }],\r
-            link: function (scope, element) {\r
-\r
-\r
-                var executeFxn = function () {\r
-                    scope.nSel = 0;\r
-                    angular.forEach(scope.ngModelButtonState, function (value, key) {\r
-                        if (value === true) {\r
-                            scope.nSel += 1;\r
-                        }\r
-                    });\r
-\r
-                    if (scope.nSel >= scope.maxSelect) {\r
-                        angular.forEach(element.children(), function (chd) {\r
-                            if (chd.className.indexOf('active') < 0) {\r
-                                chd.disabled = true;\r
-                                chd.setAttribute('aria-disabled', true);\r
-                            }\r
-                        });\r
-                    } else {\r
-                        angular.forEach(element.children(), function (chd) {\r
-                            chd.disabled = false;\r
-                            chd.setAttribute('aria-disabled', false);\r
-                        });\r
-                    }\r
-                    scope.$digest();\r
-                };\r
-\r
-                $timeout(function () {\r
-                    executeFxn();\r
-                });\r
-                element.bind('click', executeFxn);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:buttons\r
- * @element input\r
- * @function\r
- *\r
- * @description\r
- *  <file src="src/buttons/docs/readme.md" />\r
- * @usage\r
- *\r
-Button shape\r
-<button class="btn" type="button">Button</button> button.btn (button shape only)\r
-<button aria-label="Custom aria label" class="btn" type="button">Button</button> button.btn (button shape only) with custom aria label\r
-<button aria-label="Click on button/Press enter" class="btn" type="button" onclick="javascript:alert('It works!');">Click on button/Press enter</button> button.btn with click functionality\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn" role="button">Button</a> a.btn (button shape only)\r
-<button class="btn btn-primary">Button</button> .btn-primary\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-primary" role="button">Button</a> a.btn-primary\r
-\r
-5 Button colors\r
-<button class="btn btn-secondary">Button</button> .btn-secondary\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-secondary" role="button">Button</a> a.btn-secondary\r
-<button class="btn btn-alt">Button</button> .btn-alt\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-alt" role="button">Button</a> a.btn-alt\r
-<button class="btn btn-specialty">Button</button> .btn-specialty\r
-<a b2b-keyup-click="32" href="javascript:void(0)" class="btn btn-specialty" role="button">Button</a> a.btn-specialty\r
-<button class="btn btn-specialty" disabled="">Button</button> disabled="disabled"\r
-<a b2b-keyup-click="32" aria-disabled="true" href="javascript:void(0)" class="btn btn-primary disabled" role="button">Button</a> a.disabled\r
-\r
-3 button heights\r
-<button class="btn btn-secondary">Button</button> .btn is default and 46px height\r
-<button class="btn btn-secondary btn-medium">Button</button> .btn-medium is 42px\r
-<button class="btn btn-secondary btn-small">Button</button> .btn-small is 36px\r
-\r
-.row-nowrap 2 up buttons\r
-<div class="row-nowrap">\r
-    <button class="btn btn-secondary btn-fullwidth" type="button">Cancel</button>\r
-    <button class="btn btn-primary btn-fullwidth" type="button">Continue</button>\r
-</div>\r
-\r
-.row 2 up buttons (desktop) stacked (mobile) (different order)\r
-<div class="row cta-button-group">\r
-    <button class="span btn btn-secondary btn-fullwidth hidden-phone" type="button">Cancel</button>\r
-    <button class="span btn btn-primary btn-fullwidth" type="button">Continue</button>\r
-    <button class="span btn btn-secondary btn-fullwidth visible-phone" type="button">Cancel</button>\r
-</div>\r
-\r
- * @example\r
- *  <section id="code">\r
-               <b>HTML + AngularJS</b>\r
- *              <example module="b2b.att">\r
- *              <file src="src/buttons/docs/demo.html" />\r
-                 <file src="src/buttons/docs/demo.js" />\r
- *              </example>\r
-            </section>\r
- *\r
- */\r
-angular.module('b2b.att.buttons', ['b2b.att.utilities']);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:calendar\r
- *\r
- * @description\r
- *  <file src="src/calendar/docs/readme.md" />\r
- * @usage\r
- *  <input type="text" ng-model="dt" b2b-datepicker>\r
- *\r
- * @example\r
-   <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-     <file src="src/calendar/docs/demo.html" />\r
-     <file src="src/calendar/docs/demo.js" />\r
-    </example>\r
-   </section>\r
- */\r
-angular.module('b2b.att.calendar', ['b2b.att.position', 'b2b.att.utilities'])\r
-\r
-.constant('b2bDatepickerConfig', {\r
-    dateFormat: 'MM/dd/yyyy',\r
-    dayFormat: 'd',\r
-    monthFormat: 'MMMM',\r
-    yearFormat: 'yyyy',\r
-    dayHeaderFormat: 'EEEE',\r
-    dayTitleFormat: 'MMMM yyyy',\r
-    disableWeekend: false,\r
-    disableSunday: false,\r
-    disableDates: null,\r
-    onSelectClose: null,\r
-    startingDay: 0,\r
-    minDate: null,\r
-    maxDate: null,\r
-    dueDate: null,\r
-    fromDate: null,\r
-    legendIcon: null,\r
-    legendMessage: null,\r
-    calendarDisabled: false,\r
-    collapseWait: 0,\r
-    orientation: 'left',\r
-    inline: false,\r
-    helperText: 'The date you selected is $date. In case of mobile double tap to open calendar. Select a date to close the calendar.',\r
-    datepickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation'],\r
-    datepickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],\r
-    datepickerFunctionAttributes: ['disableDates', 'onSelectClose']\r
-})\r
-\r
-.factory('b2bDatepickerService', ['b2bDatepickerConfig', 'dateFilter', function (b2bDatepickerConfig, dateFilter) {\r
-    var setAttributes = function (attr, elem) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {\r
-            var attributes = b2bDatepickerConfig.datepickerEvalAttributes.concat(b2bDatepickerConfig.datepickerWatchAttributes, b2bDatepickerConfig.datepickerFunctionAttributes);\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    elem.attr(key.toSnakeCase(), key);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    var bindScope = function (attr, scope) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {\r
-            var evalFunction = function (key, val) {\r
-                scope[key] = scope.$parent.$eval(val);\r
-            };\r
-\r
-            var watchFunction = function (key, val) {\r
-                scope.$parent.$watch(val, function (value) {\r
-                    scope[key] = value;\r
-                });\r
-                scope.$watch(key, function (value) {\r
-                    scope.$parent[val] = value;\r
-                });\r
-            };\r
-\r
-            var evalAttributes = b2bDatepickerConfig.datepickerEvalAttributes;\r
-            var watchAttributes = b2bDatepickerConfig.datepickerWatchAttributes;\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    evalFunction(key, val);\r
-                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    watchFunction(key, val);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return {\r
-        setAttributes: setAttributes,\r
-        bindScope: bindScope\r
-    };\r
-}])\r
-\r
-.controller('b2bDatepickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bDatepickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {\r
-    var format = {\r
-            date: getValue($attrs.dateFormat, dtConfig.dateFormat),\r
-            day: getValue($attrs.dayFormat, dtConfig.dayFormat),\r
-            month: getValue($attrs.monthFormat, dtConfig.monthFormat),\r
-            year: getValue($attrs.yearFormat, dtConfig.yearFormat),\r
-            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),\r
-            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),\r
-            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),\r
-            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),\r
-            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)\r
-        },\r
-        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);\r
-\r
-    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;\r
-    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;\r
-    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;\r
-    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;\r
-    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;\r
-    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;\r
-    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;\r
-    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);\r
-    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);\r
-    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);\r
-\r
-    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;\r
-\r
-    function getValue(value, defaultValue) {\r
-        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;\r
-    }\r
-\r
-    function getDaysInMonth(year, month) {\r
-        return new Date(year, month, 0).getDate();\r
-    }\r
-\r
-    function getDates(startDate, n) {\r
-        var dates = new Array(n);\r
-        var current = startDate,\r
-            i = 0;\r
-        while (i < n) {\r
-            dates[i++] = new Date(current);\r
-            current.setDate(current.getDate() + 1);\r
-        }\r
-        return dates;\r
-    }\r
-\r
-    this.updatePosition = function (b2bDatepickerPopupTemplate) {\r
-        $scope.position = $position.offset($element);\r
-        $scope.position.top = $scope.position.top + $element.find('input').prop('offsetHeight');\r
-        if ($scope.orientation === 'right') {\r
-            $scope.position.left = $scope.position.left - (((b2bDatepickerPopupTemplate && b2bDatepickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));\r
-        }\r
-    };\r
-\r
-    function isSelected(dt) {\r
-        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isFromDate(dt) {\r
-        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDateRange(dt) {\r
-        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {\r
-            return true;\r
-        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isOld(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isNew(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isPastDue(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt > $scope.dueDate);\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDueDate(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt.getTime() === $scope.dueDate.getTime());\r
-        }\r
-        return false;\r
-    }\r
-\r
-    var isDisabled = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };\r
-\r
-    var compare = function (date1, date2) {\r
-        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));\r
-    };\r
-\r
-    function isMinDateAvailable(startDate, endDate) {\r
-        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-    }\r
-\r
-    function isMaxDateAvailable(startDate, endDate) {\r
-        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-    }\r
-\r
-    function getLabel(label) {\r
-        if (label) {\r
-            var labelObj = {\r
-                pre: label.substr(0, 1).toUpperCase(),\r
-                post: label\r
-            };\r
-            return labelObj;\r
-        }\r
-        return;\r
-    }\r
-\r
-    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {\r
-        return {\r
-            date: date,\r
-            label: dateFilter(date, dayFormat),\r
-            header: dateFilter(date, dayHeaderFormat),\r
-            selected: !!isSelected,\r
-            fromDate: !!isFromDate,\r
-            dateRange: !!isDateRange,\r
-            oldMonth: !!isOld,\r
-            nextMonth: !!isNew,\r
-            disabled: !!isDisabled,\r
-            dueDate: !!dueDate,\r
-            pastDue: !!pastDue,\r
-            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))\r
-        };\r
-    }\r
-\r
-    this.modes = [\r
-        {\r
-            name: 'day',\r
-            getVisibleDates: function (date) {\r
-                var year = date.getFullYear(),\r
-                    month = date.getMonth(),\r
-                    firstDayOfMonth = new Date(year, month, 1),\r
-                    lastDayOfMonth = new Date(year, month + 1, 0);\r
-                var difference = startingDay - firstDayOfMonth.getDay(),\r
-                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,\r
-                    firstDate = new Date(firstDayOfMonth),\r
-                    numDates = 0;\r
-\r
-                if (numDisplayedFromPreviousMonth > 0) {\r
-                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\r
-                    numDates += numDisplayedFromPreviousMonth; // Previous\r
-                }\r
-                numDates += getDaysInMonth(year, month + 1); // Current\r
-                numDates += (7 - numDates % 7) % 7; // Next\r
-\r
-                var days = getDates(firstDate, numDates),\r
-                    labels = new Array(7);\r
-                for (var i = 0; i < numDates; i++) {\r
-                    var dt = new Date(days[i]);\r
-                    days[i] = makeDate(dt,\r
-                        format.day,\r
-                        format.dayHeader,\r
-                        isSelected(dt),\r
-                        isFromDate(dt),\r
-                        isDateRange(dt),\r
-                        isOld(dt, date),\r
-                        isNew(dt, date),\r
-                        isDisabled(dt, date),\r
-                        isDueDate(dt),\r
-                        isPastDue(dt));\r
-                }\r
-                for (var j = 0; j < 7; j++) {\r
-                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));\r
-                }\r
-                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                return {\r
-                    objects: days,\r
-                    title: dateFilter(date, format.dayTitle),\r
-                    labels: labels\r
-                };\r
-            },\r
-            split: 7,\r
-            step: {\r
-                months: 1\r
-            }\r
-        }\r
-    ];\r
-}])\r
-\r
-.directive('b2bDatepickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile', 'trapFocusInElement', '$position', '$window', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, trapFocusInElement, $position, $window) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: function (elem, attr) {\r
-            if (attr.inline === 'true') {\r
-                return 'b2bTemplate/calendar/datepicker-popup.html';\r
-            } else {\r
-                return 'b2bTemplate/calendar/datepicker.html';\r
-            }\r
-        },\r
-        scope: {},\r
-        require: ['b2bDatepickerPopup', 'ngModel', '?^b2bDatepickerGroup'],\r
-        controller: 'b2bDatepickerController',\r
-        link: function (scope, element, attrs, ctrls) {\r
-            var datepickerCtrl = ctrls[0],\r
-                ngModel = ctrls[1],\r
-                b2bDatepickerGroupCtrl = ctrls[2];\r
-            var b2bDatepickerPopupTemplate;\r
-\r
-            if (!ngModel) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            // Configuration parameters\r
-            var mode = 0,\r
-                selected;\r
-            scope.isOpen = false;\r
-\r
-            scope.headers = [];\r
-            scope.footers = [];\r
-\r
-            if (b2bDatepickerGroupCtrl) {\r
-                b2bDatepickerGroupCtrl.registerDatepickerScope(scope);\r
-            }\r
-\r
-            element.find('button').bind('click', function () {\r
-                element.find('input')[0].click();\r
-            });\r
-\r
-            element.find('input').bind('click', function () {\r
-                if (!scope.ngDisabled) {\r
-                    scope.isOpen = !scope.isOpen;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                    $timeout(function () { \r
-                        angular.element(element[0].querySelector('.datepicker-input')).scrollTop=0;\r
-                    },10);\r
-                }\r
-            });\r
-            var toggleCalendar = function (flag) {\r
-                if (!scope.inline) {\r
-                    if (flag) {\r
-                        b2bDatepickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/calendar/datepicker-popup.html'));\r
-                        b2bDatepickerPopupTemplate = $compile(b2bDatepickerPopupTemplate)(scope);\r
-                        $document.find('body').append(b2bDatepickerPopupTemplate);\r
-                        b2bDatepickerPopupTemplate.bind('keydown', keyPress);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            trapFocusInElement(flag, b2bDatepickerPopupTemplate);\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false; \r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                    } else {\r
-                        b2bDatepickerPopupTemplate.unbind('keydown', keyPress);\r
-                        b2bDatepickerPopupTemplate.remove();\r
-                        element.find('button')[0].focus();\r
-                        scope.getFocus = false;\r
-                        trapFocusInElement(flag, b2bDatepickerPopupTemplate);\r
-                    }\r
-                }\r
-            };\r
-\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), element, $document);\r
-                var isb2bDatepickerPopupTemplate = $isElement(angular.element(e.target), b2bDatepickerPopupTemplate, $document);\r
-                if (!(isElement || isb2bDatepickerPopupTemplate)) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            var keyPress = function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (ev.keyCode === 27) {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 33) {\r
-                        !scope.disablePrev && scope.move(-1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 34) {\r
-                        !scope.disableNext && scope.move(1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            $documentBind.click('isOpen', outsideClick, scope);\r
-\r
-            var modalContainer = angular.element(document.querySelector('.modalwrapper'));\r
-            var modalBodyContainer = angular.element(document.querySelector('.modal-body'));\r
-            if (modalContainer) {\r
-                modalContainer.bind('scroll', function () {\r
-                    if (b2bDatepickerPopupTemplate) {\r
-                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-            }\r
-            if (modalBodyContainer) {\r
-                modalBodyContainer.bind('scroll', function () {\r
-                    if (b2bDatepickerPopupTemplate) {\r
-                        datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                        var datepickerTextfield = $position.offset(element.find('input'));\r
-                        var modalBodyPosition = $position.offset(modalBodyContainer);\r
-\r
-                        if (((datepickerTextfield.top + datepickerTextfield.height) < modalBodyPosition.top || datepickerTextfield.top > (modalBodyPosition.top + modalBodyPosition.height)) && scope.isOpen) {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-            }\r
-            var window = angular.element($window);\r
-            window.bind('resize', function () {\r
-                if (b2bDatepickerPopupTemplate) {\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                    scope.$apply();\r
-                }\r
-            });\r
-\r
-            scope.$on('$destroy', function () {\r
-                if (scope.isOpen) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                }\r
-            });\r
-\r
-            scope.resetTime = function (date) {\r
-                if (typeof date === 'string') {\r
-                    date = date + 'T12:00:00';\r
-                }\r
-                var dt;\r
-                if (!isNaN(new Date(date))) {\r
-                    dt = new Date(date);\r
-                } else {\r
-                    return null;\r
-                }\r
-                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-            };\r
-\r
-            if (attrs.min) {\r
-                scope.$parent.$watch($parse(attrs.min), function (value) {\r
-                    scope.minDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.max) {\r
-                scope.$parent.$watch($parse(attrs.max), function (value) {\r
-                    scope.maxDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.due) {\r
-                scope.$parent.$watch($parse(attrs.due), function (value) {\r
-                    scope.dueDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.from) {\r
-                scope.$parent.$watch($parse(attrs.from), function (value) {\r
-                    scope.fromDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-\r
-            if (attrs.legendIcon) {\r
-                scope.$parent.$watch(attrs.legendIcon, function (value) {\r
-                    scope.legendIcon = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.legendMessage) {\r
-                scope.$parent.$watch(attrs.legendMessage, function (value) {\r
-                    scope.legendMessage = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.ngDisabled) {\r
-                scope.$parent.$watch(attrs.ngDisabled, function (value) {\r
-                    scope.ngDisabled = value ? value : null;\r
-                });\r
-            }\r
-\r
-            // Split array into smaller arrays\r
-            function split(arr, size) {\r
-                var arrays = [];\r
-                while (arr.length > 0) {\r
-                    arrays.push(arr.splice(0, size));\r
-                }\r
-                return arrays;\r
-            }\r
-\r
-            function refill(date) {\r
-                if (angular.isDate(date) && !isNaN(date)) {\r
-                    selected = new Date(date);\r
-                } else {\r
-                    if (!selected) {\r
-                        selected = new Date();\r
-                    }\r
-                }\r
-\r
-                if (selected) {\r
-                    var currentMode = datepickerCtrl.modes[mode],\r
-                        data = currentMode.getVisibleDates(selected);\r
-                    scope.rows = split(data.objects, currentMode.split);\r
-                    var flag = false;\r
-                    var startFlag = false;\r
-                    var firstSelected = false;\r
-                    for (var i = 0; i < scope.rows.length; i++) {\r
-                        for (var j = 0; j < scope.rows[i].length; j++) {\r
-\r
-                            if (scope.rows[i][j].label === "1" && !firstSelected) {\r
-                                firstSelected = true;\r
-                                var firstDay = scope.rows[i][j];\r
-                            }\r
-\r
-                            if (scope.rows[i][j].selected === true) {\r
-                                flag = true;\r
-                                break;\r
-                            }\r
-                        }\r
-                        if (flag) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (!flag) {\r
-                        firstDay.firstFocus = true;\r
-                    }\r
-\r
-                    scope.labels = data.labels || [];\r
-                    scope.title = data.title;\r
-\r
-                    datepickerCtrl.updatePosition(b2bDatepickerPopupTemplate);\r
-                }\r
-            }\r
-\r
-            scope.select = function (date) {\r
-                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());\r
-                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({\r
-                        date: dt\r
-                    }) !== false)) {\r
-                    scope.currentDate = dt;\r
-                    if (angular.isNumber(scope.collapseWait)) {\r
-                        $timeout(function () {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }, scope.collapseWait);\r
-                    } else {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                    }\r
-                }\r
-            };\r
-\r
-            scope.move = function (direction,$event) {\r
-                var step = datepickerCtrl.modes[mode].step;\r
-                selected.setDate(1);\r
-                selected.setMonth(selected.getMonth() + direction * (step.months || 0));\r
-                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));\r
-                refill();\r
-\r
-                $timeout(function () {\r
-                    trapFocusInElement();\r
-                }, 100);\r
-\r
-                $event.preventDefault();\r
-                $event.stopPropagation();\r
-            };\r
-\r
-            scope.trapFocus = function () {\r
-                $timeout(function () {\r
-                    trapFocusInElement();\r
-                }, 100);\r
-            };\r
-\r
-            scope.$watch('currentDate', function (value) {\r
-                if (angular.isDefined(value) && value !== null) {\r
-                    refill(value);\r
-                } else {\r
-                    refill();\r
-                }\r
-                ngModel.$setViewValue(value);\r
-            });\r
-\r
-            ngModel.$render = function () {\r
-                scope.currentDate = ngModel.$viewValue;\r
-            };\r
-\r
-            var stringToDate = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    value = new Date(value);\r
-                }\r
-                return value;\r
-            };\r
-            ngModel.$formatters.unshift(stringToDate);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepicker', ['$compile', '$log', 'b2bDatepickerConfig', 'b2bDatepickerService', function ($compile, $log, b2bDatepickerConfig, b2bDatepickerService) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            disableDates: '&',\r
-            onSelectClose: '&'\r
-        },\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bDatepickerConfig.dateFormat;\r
-            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bDatepickerConfig.helperText;\r
-            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');\r
-\r
-            var inline = false;\r
-            if (elem.prop('nodeName') !== 'INPUT') {\r
-                inline = true;\r
-            }\r
-\r
-            var calendarIcon = '<i class="icon-primary-calendar" aria-hidden="true"></i>'\r
-            var selectedDateMessage = '<button id="' + attr.btnId + '" type="button" class="span12 faux-input" ng-disabled="ngDisabled"><span class="hidden-spoken">' + helperText + '</span></button>';\r
-\r
-            elem.removeAttr('b2b-datepicker');\r
-            elem.removeAttr('ng-model');\r
-            elem.removeAttr('ng-disabled');\r
-            elem.addClass('datepicker-input');\r
-            elem.attr('ng-model', 'dt');\r
-            elem.attr('aria-describedby', 'datepicker');\r
-            elem.attr('aria-hidden', 'true');\r
-            elem.attr('tabindex', '-1');\r
-            elem.attr('readonly', 'true');\r
-            elem.attr('ng-disabled', 'ngDisabled');\r
-            elem.attr('b2b-format-date', dateFormatString);\r
-\r
-            var wrapperElement = angular.element('<div></div>');\r
-            wrapperElement.attr('b2b-datepicker-popup', '');\r
-            wrapperElement.attr('ng-model', 'dt');\r
-            if (inline) {\r
-                wrapperElement.attr('inline', inline);\r
-            }\r
-\r
-            b2bDatepickerService.setAttributes(attr, wrapperElement);\r
-            b2bDatepickerService.bindScope(attr, scope);\r
-\r
-            wrapperElement.html('');\r
-            wrapperElement.append(calendarIcon);\r
-            wrapperElement.append(selectedDateMessage);\r
-            wrapperElement.append(elem.prop('outerHTML'));\r
-\r
-            var elm = wrapperElement.prop('outerHTML');\r
-            elm = $compile(elm)(scope);\r
-            elem.replaceWith(elm);\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            if (!ctrl) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            scope.$watch('dt', function (value) {\r
-                ctrl.$setViewValue(value);\r
-            });\r
-            ctrl.$render = function () {\r
-                scope.dt = ctrl.$viewValue;\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerGroup', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            this.$$headers = [];\r
-            this.$$footers = [];\r
-            this.registerDatepickerScope = function (datepickerScope) {\r
-                datepickerScope.headers = this.$$headers;\r
-                datepickerScope.footers = this.$$footers;\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {}\r
-    };\r
-}])\r
-\r
-.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var b2bFormatDate = "";\r
-            attr.$observe('b2bFormatDate', function (value) {\r
-                b2bFormatDate = value;\r
-            });\r
-            var dateToString = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    return dateFilter(new Date(value), b2bFormatDate);\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$formatters.unshift(dateToString);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerHeader', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bDatepickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$headers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDatepickerFooter', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bDatepickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$footers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:checkboxes\r
- *\r
- * @description\r
- *  <file src="src/checkboxes/docs/readme.md" />\r
- * @usage\r
- * See demo section\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/checkboxes/docs/demo.html" />\r
- <file src="src/checkboxes/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.checkboxes', ['b2b.att.utilities'])\r
-.directive('b2bSelectGroup', [function (){\r
-        return {\r
-            restrict: 'A',\r
-            require: 'ngModel',\r
-            scope: {\r
-                checkboxes: "="\r
-            },\r
-            link: function (scope, elem, attr, ctrl) {\r
-                elem.bind('change', function () {\r
-                    var isChecked = elem.prop('checked');\r
-                    angular.forEach(scope.checkboxes, function (item) {\r
-                        item.isSelected = isChecked;\r
-                    });\r
-                    scope.$apply();\r
-                });\r
-                scope.$watch('checkboxes', function () {\r
-                    var setBoxes = 0;\r
-                    if(scope.checkboxes === undefined) {\r
-                        return;\r
-                    }\r
-                    angular.forEach(scope.checkboxes, function (item) {\r
-                        if (item.isSelected) {\r
-                            setBoxes++; \r
-                        } \r
-                    });\r
-                    elem.prop('indeterminate', false);\r
-                    if ( scope.checkboxes !==undefined && setBoxes === scope.checkboxes.length && scope.checkboxes.length > 0) { \r
-                        ctrl.$setViewValue(true); \r
-                        elem.removeClass('indeterminate');\r
-                    } else if (setBoxes === 0) { \r
-                       ctrl.$setViewValue(false); \r
-                       elem.removeClass('indeterminate');\r
-                    } else { \r
-                        ctrl.$setViewValue(false); \r
-                        elem.addClass('indeterminate');\r
-                        elem.prop('indeterminate', true); \r
-                    }\r
-                    ctrl.$render();\r
-                }, true);\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:coachmark\r
- *\r
- * @description\r
- * <file src="src/coachmark/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
-<button b2b-coachmark start-coachmark-callback="startCoachmark()" end-coachmark-callback="endCoachmark()" action-coachmark-callback="actionCoachmark(action)" coachmark-index="coachmarkIndex" coachmarks="coachmarkElements" id="coachmark0" class="btn btn-alt">Initiate tour</button>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/coachmark/docs/demo.html" />\r
-            <file src="src/coachmark/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.coachmark', ['b2b.att.utilities','b2b.att.position'])\r
-        \r
-    .directive('b2bCoachmark', ['$document', '$compile', '$position', '$timeout', function($document, $compile, $position, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-             scope: {\r
-                coachmarks: '=',\r
-                coachmarkIndex: '=',\r
-                startCoachmarkCallback: '&',\r
-                endCoachmarkCallback: '&',\r
-                actionCoachmarkCallback: '&'\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var coachmarkItems = scope.coachmarks;\r
-                var body = $document.find('body').eq(0);\r
-                var coackmarkJqContainer;\r
-                var coackmarkContainer;\r
-                var coachMarkElement;\r
-                var backdropjqLiteEl;\r
-                var coachmarkHighlight;\r
-                var initaitedCoachmark = false;\r
-                scope.coackmarkElPos ={\r
-                    'top':'',\r
-                    'left':''\r
-                };\r
-                \r
-                scope.currentCoachmark = {};\r
-                \r
-                \r
-                var coachmarkBackdrop = function(){\r
-                    backdropjqLiteEl = angular.element('<div class="b2b-modal-backdrop fade in hidden-by-modal"></div>');\r
-                    body.append(backdropjqLiteEl);\r
-\r
-                    backdropjqLiteEl.bind('click', function() {\r
-                        scope.closeCoachmark();\r
-                        scope.$apply();\r
-                    });\r
-                };\r
-                \r
-                \r
-                scope.closeButtonFocus = function(){\r
-                    if(document.getElementsByClassName('b2b-coachmark-header').length >0){\r
-                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollLeft = 0;\r
-                        document.getElementsByClassName('b2b-coachmark-header')[0].scrollTop = 0;\r
-                    }\r
-                }\r
-\r
-                scope.actionCoachmark = function(action){\r
-                    scope.actionCoachmarkCallback({\r
-                        'action':action\r
-                    })\r
-                };\r
-                \r
-                scope.closeCoachmark = function(){\r
-                    initaitedCoachmark = false;\r
-                    backdropjqLiteEl.remove();  \r
-                    coackmarkContainer.remove();\r
-                    coachmarkHighlight.remove();\r
-                    if(coachMarkElement !== undefined && coachMarkElement !==""){\r
-                        coachMarkElement.removeClass('b2b-coachmark-label')\r
-                    }\r
-                    if (angular.isFunction(scope.endCoachmarkCallback)){\r
-                        scope.endCoachmarkCallback();   \r
-                    }\r
-                    element[0].focus();\r
-                }\r
-                \r
-                function showCoachmark(targetElement) {\r
-                    scope.currentCoachmark = targetElement;\r
-                    if(coachMarkElement !== undefined && coachMarkElement !==""){\r
-                        coachMarkElement.removeClass('b2b-coachmark-label')\r
-                        coackmarkContainer.remove();\r
-                        coachmarkHighlight.remove();\r
-                    }\r
-                    coachMarkElement = angular.element(document.querySelector(targetElement.elementId));\r
-                    coachMarkElement.addClass('b2b-coachmark-label');\r
-                    var elementPosition = $position.offset(coachMarkElement);\r
-                    \r
-                    coachmarkHighlight = angular.element('<div class="b2b-coachmark-highlight"></div><div class="b2b-coachmark-highlight b2b-coachmark-highlight-mask"></div>');\r
-                    coachmarkHighlight.css({\r
-                        'width': (elementPosition.width + 20) +'px',\r
-                        'top': (elementPosition.top -10) + 'px',\r
-                        'left': (elementPosition.left - 10) + 'px',\r
-                        'height': (elementPosition.height + 20) +'px'\r
-                    }); \r
-                    body.append(coachmarkHighlight);\r
-                    \r
-                    scope.coackmarkElPos.top = (elementPosition.top + elementPosition.height + 32) + 'px';\r
-                    scope.coackmarkElPos.left = (elementPosition.left - 158 + elementPosition.width / 2 ) + 'px';\r
-                    coackmarkJqContainer = angular.element('<div b2b-coachmark-container b2b-trap-focus-inside-element="true"></div>');\r
-                    coackmarkContainer = $compile(coackmarkJqContainer)(scope);\r
-                    body.append(coackmarkContainer);\r
-                    \r
-                    $timeout(function () {\r
-                        var currentCoachmarkContainer = document.getElementsByClassName('b2b-coachmark-container')[0];\r
-                        currentCoachmarkContainer.focus();\r
-                        var coachmarkHeight = window.getComputedStyle(currentCoachmarkContainer).height.split('px')[0];\r
-                        var newOffsetHeight = (Math.round(elementPosition.top) - Math.round(coachmarkHeight));\r
-                        \r
-                        // We need a slight offset to show the lightboxed item\r
-                        TweenLite.to(window, 2, {scrollTo:{x: (scope.coackmarkElPos.left.split('px')[0]-100), y: newOffsetHeight}});\r
-                    }, 200);\r
-                }\r
-                \r
-                element.bind('click', function (e) {\r
-                    initaitedCoachmark = true;\r
-                    if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){\r
-                        scope.coachmarkIndex = 0;\r
-                    }\r
-                    scope.$watch('coachmarkIndex', function () {\r
-                        if(initaitedCoachmark === true){\r
-                            if(scope.coachmarkIndex === -1 || scope.coachmarkIndex >= coachmarkItems.length ){\r
-                                scope.closeCoachmark();\r
-                            }else{\r
-                                showCoachmark(coachmarkItems[scope.coachmarkIndex]);\r
-                            }\r
-                        }\r
-                    });\r
-                    coachmarkBackdrop();\r
-                    showCoachmark(coachmarkItems[scope.coachmarkIndex]);\r
-                    if (angular.isFunction(scope.startCoachmarkCallback)){\r
-                        scope.startCoachmarkCallback(); \r
-                    }\r
-                    $document.bind('keydown', function (evt) {\r
-                        if (evt.which === 27 && initaitedCoachmark) {\r
-                            scope.closeCoachmark();\r
-                            scope.$apply(); \r
-                        }\r
-                    });\r
-                });\r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bCoachmarkContainer', ['$document', '$position', function($document, $position) {\r
-        return {\r
-            restrict: 'A',\r
-            transclude: true,\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/coachmark/coachmark.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                            \r
-            }\r
-        };  \r
-    }]);\r
-    \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Configuration Section \r
- * \r
- * @description \r
- *  <file src="src/configurationSection/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/configurationSection/docs/demo.html" /> \r
-            <file src="src/configurationSection/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.configurationSection', [])\r
-  \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Directory Listing \r
- * \r
- * @description \r
- *  <file src="src/directoryListingTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/directoryListingTemplate/docs/demo.html" /> \r
-            <file src="src/directoryListingTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.directoryListingTemplate', [])\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:dropdowns\r
- *\r
- * @description\r
- *  <file src="src/dropdowns/docs/readme.md" />\r
- * @usage\r
- *\r
- * @example\r
-   <section id="code">\r
-    <example module="b2b.att">\r
-     <file src="src/dropdowns/docs/demo.html" />\r
-     <file src="src/dropdowns/docs/demo.js" />\r
-    </example>\r
-   </section>\r
- */\r
-angular.module('b2b.att.dropdowns', ['b2b.att.utilities', 'b2b.att.position', 'ngSanitize'])\r
-\r
-.constant('b2bDropdownConfig', {\r
-    prev: '37,38',\r
-    next: '39,40',\r
-    menuKeyword: 'menu',\r
-    linkMenuKeyword: 'link-menu',\r
-    largeKeyword: 'large',\r
-    smallKeyword: 'small'\r
-})  \r
-\r
-.directive("b2bDropdown", ['$timeout', '$compile', '$templateCache', 'b2bUserAgent', 'b2bDropdownConfig', '$position', function ($timeout, $compile, $templateCache, b2bUserAgent, b2bDropdownConfig, $position) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            scope.isInputDropdown = true;\r
-            scope.placeHoldertext = attr.placeholderText;\r
-            if (attr.type) {\r
-                if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1 || attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {\r
-                    scope.isInputDropdown = false;\r
-                    if (attr.type.indexOf(b2bDropdownConfig.linkMenuKeyword) > -1) {\r
-                        scope.dropdownType = b2bDropdownConfig.linkMenuKeyword;\r
-                    } else if (attr.type.indexOf(b2bDropdownConfig.menuKeyword) > -1) {\r
-                        scope.dropdownType = b2bDropdownConfig.menuKeyword;\r
-                    }\r
-                }\r
-                if (attr.type.indexOf(b2bDropdownConfig.largeKeyword) > -1) {\r
-                    scope.dropdownSize = b2bDropdownConfig.largeKeyword;\r
-                } else if (attr.type.indexOf(b2bDropdownConfig.smallKeyword) > -1) {\r
-                    scope.dropdownSize = b2bDropdownConfig.smallKeyword;\r
-                }\r
-            }\r
-\r
-            scope.labelText = attr.labelText;\r
-\r
-            scope.setBlur = function () {\r
-                scope.setTouched();\r
-            };\r
-\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var formCtrl = elem.controller('form');\r
-                scope.setNgModelController = function (name, ngModelCtrl) {\r
-                    if (name && formCtrl && ngModelCtrl) {\r
-                        formCtrl[name] = ngModelCtrl;\r
-                    }\r
-                };\r
-                scope.setOptionalCta = function (optionalCta) {\r
-                    scope.optionalCta = optionalCta;\r
-                };\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownDesktop.html'));\r
-                template.find('ul').eq(0).append(innerHtml);\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                elem.css({\r
-                    'opacity': '0',\r
-                    'filter': 'alpha(opacity=0)'\r
-                });\r
-                elem.addClass('awd-select isWrapped');\r
-                elem.wrap('<span class="selectWrap"></span>');\r
-                var cover = angular.element('<span aria-hidden="true"><i class="icon-primary-down" aria-hidden="true"></i></span>');\r
-                elem.parent().append(cover);\r
-                elem.parent().append('<i class="icon-primary-down" aria-hidden="true"></i>');\r
-                var set = function () {\r
-                    var sel = elem[0] ? elem[0] : elem;\r
-                    var selectedText = "";\r
-                    var selIndex = sel.selectedIndex;\r
-                    if (typeof selIndex !== 'undefined') {\r
-                        selectedText = sel.options[selIndex].text;\r
-                    }\r
-                    cover.text(selectedText).append('<i class="icon-primary-down" aria-hidden="true"></i>');\r
-                };\r
-                var update = function (value) {\r
-                    $timeout(set, 100);\r
-                };\r
-\r
-                if (attr.ngModel) {\r
-                    scope.$watch(attr.ngModel, function (newVal, oldVal) {\r
-                        update();\r
-                    });\r
-                }\r
-                elem.bind('keyup', function (ev) {\r
-                    if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                        return;\r
-                    }\r
-                    set();\r
-                });\r
-            }\r
-        }],  \r
-        link: function (scope, elem, attr, ctrl) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                scope.updateModel = function () {\r
-                    if (ctrl.$dirty) {\r
-                        debugger;\r
-                    }\r
-                    ctrl.$setViewValue(scope.currentSelected.value);\r
-                    if (scope.dropdownRequired && scope.currentSelected.value === '') {\r
-                        scope.setRequired(false);\r
-                    } else {\r
-                        scope.setRequired(true);\r
-                    }\r
-\r
-                    if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                        $timeout(function () {\r
-                            scope.appendCaretPositionStyle();\r
-                        }, 100);\r
-                    }\r
-                };\r
-                ctrl.$render = function () {\r
-//                    if(ctrl.$dirty || ctrl.$pristine) {\r
-                        $timeout(function () {\r
-\r
-                            if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && (angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '')) {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            } else if ((angular.isUndefined(scope.placeHoldertext) || scope.placeHoldertext == '') && ctrl.$viewValue !== '' ) {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            } else if ((angular.isUndefined(ctrl.$viewValue) || ctrl.$viewValue == '') && scope.placeHoldertext !== '' )  {\r
-                                scope.currentSelected.text = scope.placeHoldertext; \r
-                            } else {\r
-                                scope.dropdownLists[ctrl.$viewValue] && scope.dropdownLists[ctrl.$viewValue][0].updateDropdownValue();\r
-                            }\r
-\r
-                        }, 100);\r
-                    };\r
-//                }\r
-                scope.disabled = false;\r
-                scope.dropdownName = attr.name;\r
-                scope.dropdownId = attr.id;\r
-                scope.labelId = attr.ariaLabelledby;\r
-                scope.dropdownDescribedBy = attr.ariaDescribedby;\r
-                if (attr.required) {\r
-                    scope.dropdownRequired = true;\r
-                } else {\r
-                    scope.dropdownRequired = false;\r
-                }\r
-                elem.removeAttr('name');\r
-                elem.removeAttr('id');\r
-                scope.$parent.$watch(attr.ngDisabled, function (val) {\r
-                    scope.disabled = val;\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownToggle", ['$document', '$documentBind', '$isElement', 'b2bDropdownConfig', 'keymap', 'b2bUtilitiesConfig', '$timeout', '$position', function ($document, $documentBind, $isElement, b2bDropdownConfig, keymap, b2bUtilitiesConfig, $timeout, $position) {\r
-    return {\r
-        restrict: 'A',\r
-        require: '?^b2bKey',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.appendCaretPositionStyle = function () {\r
-                while (document.querySelector('style.b2bDropdownCaret')) {\r
-                    document.querySelector('style.b2bDropdownCaret').remove();\r
-                };\r
-                var caretPosition = $position.position(elem).width - 26;\r
-                if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                    var template = angular.element('<style class="b2bDropdownCaret" type="text/css">.linkSelectorModule .active+.moduleWrapper:before {left: ' + caretPosition + 'px;}</style>');\r
-                    $document.find('head').append(template);\r
-                }\r
-            };\r
-\r
-            if (scope.isInputDropdown && (scope.labelText !== undefined)) {\r
-                elem.attr('aria-label', scope.labelText);\r
-            }\r
-\r
-            scope.toggleFlag = false;\r
-            scope.dropdownLists = {};\r
-            scope.dropdownListValues = [];\r
-            scope.dropdown = {\r
-                totalIndex: -1\r
-            };\r
-            scope.currentSelected = {\r
-                value: '',\r
-                text: '',\r
-                label: '',\r
-                index: -1\r
-            };\r
-            var searchString = '';\r
-            var searchElement = function (searchExp) {\r
-                var regex = new RegExp("\\b" + searchExp, "gi");\r
-                var position = scope.dropdownListValues.regexIndexOf(regex, scope.currentSelected.index + 1, true);\r
-                if (position > -1) {\r
-                    return position;\r
-                }\r
-                return undefined;\r
-            };\r
-            var startTimer = function (time) {\r
-                if (searchString === '') {\r
-                    $timeout(function () {\r
-                        searchString = '';\r
-                    }, time);\r
-                }\r
-            };\r
-            scope.toggleDropdown = function (toggleFlag) {\r
-                if (!scope.disabled) {\r
-                    if (angular.isDefined(toggleFlag)) {\r
-                        scope.toggleFlag = toggleFlag;\r
-                    } else {\r
-                        scope.toggleFlag = !scope.toggleFlag;\r
-                    }\r
-                    if (!scope.toggleFlag) {\r
-                        if (scope.isInputDropdown) {\r
-                            elem.parent().find('input')[0].focus();\r
-                        } else {\r
-                            elem.parent().find('button')[0].focus();\r
-                        }\r
-                    } else {\r
-                        scope.dropdown.highlightedValue = scope.currentSelected.value;\r
-                        if (ctrl && ctrl.enableSearch) {\r
-                            if (angular.isDefined(scope.dropdownLists[scope.currentSelected.value])) {\r
-                                ctrl.resetCounter(scope.dropdownLists[scope.currentSelected.value][2]);\r
-                            }\r
-                        }\r
-                        if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                            scope.appendCaretPositionStyle();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-\r
-            elem.bind('keydown', function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (!scope.toggleFlag) {\r
-                    if (ev.keyCode) {\r
-                        var currentIndex = scope.currentSelected.index;\r
-                        if (ev.altKey === true && ev.keyCode === keymap.KEY.DOWN) {\r
-                            scope.toggleDropdown(true);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (b2bDropdownConfig.prev.split(',').indexOf(ev.keyCode.toString()) > -1) {\r
-                            angular.isDefined(scope.dropdownListValues[currentIndex - 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex - 1]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (b2bDropdownConfig.next.split(',').indexOf(ev.keyCode.toString()) > -1) {\r
-                            angular.isDefined(scope.dropdownListValues[currentIndex + 1]) ? scope.dropdownLists[scope.dropdownListValues[currentIndex + 1]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {\r
-                            startTimer(b2bUtilitiesConfig.searchTimer);\r
-                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');\r
-                            var position = searchElement(searchString);\r
-                            angular.isDefined(scope.dropdownListValues[position]) ? scope.dropdownLists[scope.dropdownListValues[position]][0].updateDropdownValue() : angular.noop();\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    }\r
-                } else {\r
-                    if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {\r
-                        scope.toggleDropdown(false);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                        scope.toggleDropdown(false);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                }\r
-                scope.$apply(); // TODO: Move this into each block to avoid expensive digest cycles\r
-            });\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), elem.parent(), $document);\r
-                if (!isElement) {\r
-                    scope.toggleDropdown(false);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-            $documentBind.click('toggleFlag', outsideClick, scope);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownGroup", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html'));\r
-                template.attr('ng-repeat', attr.optGroupRepeat);\r
-                template.attr('label', elem.attr('label'));\r
-                template.find('ul').append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                var template = angular.element(elem.prop('outerHTML'));\r
-                template.attr('ng-repeat', attr.optGroupRepeat);\r
-                template.removeAttr('b2b-dropdown-group');\r
-                template.removeAttr('opt-group-repeat');\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownGroupDesktop", [function () {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.groupHeader = attr.label;\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownList", ['$compile', '$templateCache', 'b2bUserAgent', function ($compile, $templateCache, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element($templateCache.get('b2bTemplate/dropdowns/b2bDropdownListDesktop.html'));\r
-                template.attr('ng-repeat', attr.optionRepeat);\r
-                template.attr('value', elem.attr('value'));\r
-                template.attr('search-key', elem.attr('value'));\r
-                if (elem.attr('aria-describedby')){\r
-                    template.attr('aria-describedby', attr.ariaDescribedby);\r
-                }\r
-                if (elem.attr('imgsrc')) {\r
-                    if (elem.attr('imgalt')) {\r
-                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt="' + elem.attr('imgalt') + '"/>');\r
-                    } else {\r
-                        template.append('<img role="presentation" ng-src="' + elem.attr('imgsrc') + '" alt=""/>');\r
-                    }\r
-                }\r
-                template.append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                var template = angular.element(elem.prop('outerHTML'));\r
-                template.attr('ng-repeat', attr.optionRepeat);\r
-                if (elem.attr('aria-describedby')){\r
-                    template.attr('aria-describedby', attr.ariaDescribedby);\r
-                }\r
-                template.removeAttr('b2b-dropdown-list');\r
-                template.removeAttr('option-repeat');\r
-                template = $compile(template)(scope);\r
-                elem.replaceWith(template);\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownListDesktop", ['$sce', 'keymap', 'b2bDropdownConfig', function ($sce, keymap, b2bDropdownConfig) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var dropdownListValue = scope.dropdownListValue = attr.value;\r
-            scope.dropdown.totalIndex++;\r
-            var dropdownListIndex = scope.dropdown.totalIndex;\r
-            scope.dropdownListValues.push(dropdownListValue);\r
-            scope.dropdownLists[dropdownListValue] = [];\r
-            scope.dropdownLists[dropdownListValue][0] = scope;\r
-            scope.dropdownLists[dropdownListValue][1] = elem;\r
-            scope.dropdownLists[dropdownListValue][2] = dropdownListIndex;\r
-            scope.updateDropdownValue = function () {\r
-                scope.currentSelected.value = dropdownListValue;\r
-                if (scope.isInputDropdown) {\r
-                    scope.currentSelected.text = elem.text();\r
-                } else if ((scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) || (scope.dropdownType === b2bDropdownConfig.menuKeyword && scope.dropdownSize === b2bDropdownConfig.smallKeyword)) {\r
-                    scope.currentSelected.text = dropdownListValue;\r
-                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {\r
-                    scope.currentSelected.text = $sce.trustAsHtml(elem.html());\r
-                }\r
-                if (scope.isInputDropdown) {\r
-                    scope.currentSelected.label = elem.text();\r
-                } else if (scope.dropdownType === b2bDropdownConfig.linkMenuKeyword) {\r
-                    scope.currentSelected.label = dropdownListValue;\r
-                } else if (scope.dropdownType === b2bDropdownConfig.menuKeyword) {\r
-                    scope.currentSelected.label = elem.text();\r
-                }\r
-                scope.currentSelected.index = dropdownListIndex;\r
-                scope.updateModel();\r
-            };\r
-            scope.selectDropdownItem = function () {\r
-                scope.setDirty();\r
-                scope.updateDropdownValue();\r
-                scope.toggleDropdown(false);\r
-            };\r
-            scope.highlightDropdown = function () {\r
-                scope.dropdown.highlightedValue = dropdownListValue;\r
-            };\r
-            elem.bind('mouseover', function (ev) {\r
-                elem[0].focus();\r
-            });\r
-            elem.bind('keydown', function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.altKey === true && ev.keyCode === keymap.KEY.UP) {\r
-                    scope.toggleDropdown(false);\r
-                    ev.preventDefault();\r
-                    ev.stopPropagation();\r
-                } else if (ev.keyCode === keymap.KEY.TAB || ev.keyCode === keymap.KEY.ESC) {\r
-                    scope.toggleDropdown(false);\r
-                    ev.preventDefault();\r
-                    ev.stopPropagation();\r
-                }\r
-                scope.$apply();\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownRepeat", ['$compile', 'b2bUserAgent', function ($compile, b2bUserAgent) {\r
-    return {\r
-        restrict: 'A',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            if ((scope.isInputDropdown && b2bUserAgent.notMobile()) || (!scope.isInputDropdown)) {\r
-                var innerHtml = angular.element('<div></div>').append(elem.html());\r
-                innerHtml = ($compile(innerHtml)(scope)).html();\r
-                var template = angular.element('<div></div>');\r
-                template.attr('ng-repeat', attr.b2bDropdownRepeat);\r
-                template.append(innerHtml);\r
-                elem.replaceWith(template);\r
-            } else if (scope.isInputDropdown && b2bUserAgent.isMobile()) {\r
-                angular.noop();\r
-            }\r
-        }]\r
-    };\r
-}])\r
-\r
-.directive("b2bDropdownValidation", ['$timeout', function ($timeout) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            $timeout(function () {\r
-                scope.setNgModelController(attr.name, ctrl);\r
-            }, 100);\r
-            scope.setDirty = function () {\r
-                if (ctrl.$dirty === false) {\r
-                    ctrl.$dirty = true;\r
-                    ctrl.$pristine = false;\r
-                }\r
-            };\r
-            scope.setTouched = function () {\r
-                if (ctrl.$touched === false) {\r
-                    ctrl.$touched = true;\r
-                    ctrl.$pristine = false;\r
-                }\r
-            };\r
-            scope.setRequired = function (flag) {\r
-                ctrl.$setValidity('required', flag);\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDropdownOptionalCta', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (scope.setOptionalCta) {\r
-                    scope.setOptionalCta(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:File Upload\r
- *\r
- * @description\r
- *  <file src="src/fileUpload/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
-<form id="dragDropFile">        \r
-    <div b2b-file-drop file-model="fileModel" on-drop="triggerFileUpload()"  align="center">\r
-        <p>\r
-            <br>To upload a file, drag & drop it here or \r
-            <span b2b-file-link file-model="fileModel" on-file-select="triggerFileUpload()" >\r
-                click here to select from your computer.\r
-            </span><br>\r
-        </p>\r
-    </div>\r
-</form>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/fileUpload/docs/demo.html" />\r
-            <file src="src/fileUpload/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.fileUpload', ['b2b.att.utilities'])\r
-    .directive('b2bFileDrop', [function() {\r
-            return {\r
-                restrict: 'EA',\r
-                scope: {\r
-                    fileModel: '=',\r
-                    onDrop: '&'\r
-                },\r
-                controller: ['$scope', '$attrs', function($scope, $attrs) {\r
-                    this.onDrop = $scope.onDrop;\r
-                }],\r
-                link: function(scope, element) {\r
-                    element.addClass('b2b-dragdrop');\r
-                    element.bind(\r
-                        'dragover',\r
-                        function(e) {\r
-                            if (e.originalEvent) {\r
-                                e.dataTransfer = e.originalEvent.dataTransfer;\r
-                            }\r
-                            e.dataTransfer.dropEffect = 'move';\r
-                            // allows us to drop\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            element.addClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'dragenter',\r
-                        function(e) {\r
-                            // allows us to drop\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            element.addClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'dragleave',\r
-                        function() {\r
-                            element.removeClass('b2b-dragdrop-over');\r
-                            return false;\r
-                        }\r
-                    );\r
-                    element.bind(\r
-                        'drop',\r
-                        function(e) {\r
-                            // Stops some browsers from redirecting.\r
-                            if (e.preventDefault) {\r
-                                e.preventDefault();\r
-                            }\r
-                            if (e.stopPropagation) {\r
-                                e.stopPropagation();\r
-                            }\r
-                            if (e.originalEvent) {\r
-                                e.dataTransfer = e.originalEvent.dataTransfer;\r
-                            }\r
-                            element.removeClass('b2b-dragdrop-over');\r
-                            if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {\r
-                                scope.fileModel = e.dataTransfer.files[0];\r
-                                scope.$apply();\r
-                                if (angular.isFunction(scope.onDrop)) {\r
-                                    scope.onDrop();\r
-                                }\r
-                            }\r
-                            return false;\r
-                        }\r
-                    );\r
-                }\r
-            };\r
-        }])\r
-        .directive('b2bFileLink', [function() {\r
-            return {\r
-                restrict: 'EA',\r
-                require: '^?b2bFileDrop',\r
-                replace: true,\r
-                transclude: true,\r
-                templateUrl: 'b2bTemplate/fileUpload/fileUpload.html',\r
-                scope: {\r
-                    fileModel: '=?',\r
-                    onFileSelect: '&'\r
-                },\r
-                controller: ['$scope', function($scope) {\r
-                    this.setFileModel = function(fileModel) {\r
-                        if ($scope.takeFileModelFromParent) {\r
-                            $scope.$parent.fileModel = fileModel;\r
-                            $scope.$parent.$apply();\r
-                        } else {\r
-                            $scope.fileModel = fileModel;\r
-                            $scope.$apply();\r
-                        }\r
-                    };\r
-                    this.callbackFunction = function() {\r
-                        if (angular.isFunction($scope.onFileSelect)) {\r
-                            $scope.onFileSelect();\r
-                        }\r
-                    };\r
-        \r
-                }],\r
-                link: function(scope, element, attr, b2bFileDropCtrl) {\r
-                    scope.takeFileModelFromParent = false;\r
-                    if (!(attr.fileModel) && b2bFileDropCtrl) {\r
-                        scope.takeFileModelFromParent = true;\r
-                    }\r
-                    if (!(attr.onFileSelect) && b2bFileDropCtrl) {\r
-                        scope.onFileSelect = b2bFileDropCtrl.onDrop;\r
-                    }\r
-                }\r
-            };\r
-        }])\r
-        .directive('b2bFileChange', ['$log', '$rootScope', function($log, $rootScope) {\r
-            return {\r
-                restrict: 'A',\r
-                require: '^b2bFileLink',\r
-                link: function(scope, element, attr, b2bFileLinkCtrl) {\r
-                    element.bind('change', changeFileModel);\r
-\r
-                    function changeFileModel(e) {\r
-                        if (e.target.files && e.target.files.length > 0) {\r
-                            b2bFileLinkCtrl.setFileModel(e.target.files[0]);\r
-                            b2bFileLinkCtrl.callbackFunction();\r
-                        } else {\r
-                            var strFileName = e.target.value;\r
-                            try {\r
-                                var objFSO = new ActiveXObject("Scripting.FileSystemObject");\r
-                                b2bFileLinkCtrl.setFileModel(objFSO.getFile(strFileName));\r
-                                b2bFileLinkCtrl.callbackFunction();\r
-                            } catch (e) {\r
-                                var errMsg = "There was an issue uploading " + strFileName + ". Please try again.";\r
-                                $log.error(errMsg);\r
-                                $rootScope.$broadcast('b2b-file-link-failure', errMsg);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-        }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:filters\r
- *\r
- * @description\r
- *  <file src="src/filters/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <div b2b-filters></div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-       <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/filters/docs/demo.html" />\r
-            <file src="src/filters/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- * \r
- */\r
-angular.module('b2b.att.filters', ['b2b.att.utilities', 'b2b.att.multipurposeExpander'])\r
-    .filter('filtersSelectedItemsFilter', [function () {\r
-        return function (listOfItemsArray) {\r
-\r
-            if (!listOfItemsArray) {\r
-                listOfItemsArray = [];\r
-            }\r
-\r
-            var returnArray = [];\r
-\r
-            for (var i = 0; i < listOfItemsArray.length; i++) {\r
-                for (var j = 0; j < listOfItemsArray[i].filterTypeItems.length; j++) {\r
-                    if (listOfItemsArray[i].filterTypeItems[j].selected && !listOfItemsArray[i].filterTypeItems[j].inProgress) {\r
-                        returnArray.push(listOfItemsArray[i].filterTypeItems[j]);\r
-                    }\r
-                }\r
-            }\r
-\r
-            return returnArray;\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:flyout\r
- *\r
- * @description\r
- *  <file src="src/flyout/docs/readme.md" />\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/flyout/docs/demo.html" />\r
-            <file src="src/flyout/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.flyout', ['b2b.att.utilities', 'b2b.att.position'])\r
-    .directive('b2bFlyout', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/flyout/flyout.html',\r
-            controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-                scope.flyoutOpened = false;\r
-                var contentScope = '';\r
-                var togglerScope = '';\r
-                this.registerContentScope = function (scp) {\r
-                    contentScope = scp;\r
-                };\r
-                this.registerTogglerScope = function (scp) {\r
-                    togglerScope = scp;\r
-                };\r
-\r
-                this.toggleFlyoutState = function () {\r
-                    if (contentScope) {\r
-                        contentScope.toggleFlyout();\r
-                    }\r
-                };\r
-                this.getTogglerDimensions = function () {\r
-                    return togglerScope.getTogglerDimensions();\r
-                }\r
-                this.setTogglerFocus = function () {\r
-                    return togglerScope.setTogglerFocus();\r
-                }\r
-\r
-                this.closeFlyout = function (e) {\r
-                    contentScope.closeFromChild(e);\r
-                };\r
-                this.gotFocus = function () {\r
-                    contentScope.gotFocus();\r
-                };\r
-\r
-                this.updateAriaModel = function (val) {\r
-                    scope.flyoutOpened = val;\r
-                };\r
-\r
-                var firstTabableElement = undefined,\r
-                    lastTabableElement = undefined;\r
-\r
-                var firstTabableElementKeyhandler = function (e) {\r
-                    if (!e.keyCode) {\r
-                        e.keyCode = e.which;\r
-                    }\r
-                    if (e.keyCode === keymap.KEY.TAB && e.shiftKey && scope.flyoutOpened) { \r
-                        contentScope.gotFocus();\r
-                        events.preventDefault(e);\r
-                        events.stopPropagation(e);\r
-                    }\r
-                };\r
-\r
-                var lastTabableElementKeyhandler = function (e) {\r
-                    if (!e.keyCode) {\r
-                        e.keyCode = e.which;\r
-                    }\r
-                    if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {\r
-                        contentScope.gotFocus();    \r
-                        events.preventDefault(e);\r
-                        events.stopPropagation(e);\r
-                    }\r
-                };\r
-                this.associateTabEvent = function(){\r
-                    $timeout(function () {\r
-                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];\r
-                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                        if(angular.isUndefined(firstTabableElement)){\r
-                            angular.element(element).css('display','block');\r
-                            firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                            lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                            angular.element(element).css('display','none');\r
-                        }\r
-                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                    });\r
-                }\r
-                this.updateTabbableElements = function(){\r
-                    $timeout(function () {\r
-                        var element = elem[0].getElementsByClassName('b2b-flyout-container')[0];\r
-                        angular.element(element).css('display','block');\r
-                        firstTabableElement = b2bDOMHelper.firstTabableElement(element);\r
-                        lastTabableElement = b2bDOMHelper.lastTabableElement(element);\r
-                        angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                        angular.element(element).css('display','none');\r
-                    });\r
-                }\r
-                this.unbindTabbaleEvents = function(){\r
-                    if(angular.isDefined(firstTabableElement)){\r
-                        angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);\r
-                    }\r
-\r
-                    if(angular.isDefined(lastTabableElement)){\r
-                        angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);\r
-                    }\r
-                }\r
-            }],\r
-            link: function (scope, element, attrs, ctrl) {\r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutToggler', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            require: '^b2bFlyout',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                element.bind('click', function (e) {\r
-                    ctrl.toggleFlyoutState();\r
-                });\r
-\r
-                scope.getTogglerDimensions = function () {\r
-                    return element[0].getBoundingClientRect();\r
-                }\r
-\r
-                scope.setTogglerFocus = function () {\r
-                    element[0].focus();\r
-                }\r
-\r
-                ctrl.registerTogglerScope(scope);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutContent', ['$position', '$timeout', '$documentBind', '$isElement', '$document', function ($position, $timeout, $documentBind, $isElement, $document) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            require: '^b2bFlyout',\r
-            scope: {\r
-                horizontalPlacement: '@',\r
-                verticalPlacement: '@',\r
-                flyoutStyle: '@',\r
-                flyoutTitle: '@',\r
-                contentUpdated: "=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/flyout/flyoutContent.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var flyoutStyleArray, eachCssProperty, cssPropertyKey, cssPropertyVal, temp;\r
-                scope.openFlyout = false;\r
-                if (!scope.horizontalPlacement) {\r
-                    scope.horizontalPlacement = 'center';\r
-                }\r
-                if (!scope.verticalPlacement) {\r
-                    scope.verticalPlacement = 'below';\r
-                }\r
-\r
-                scope.toggleFlyout = function () {\r
-\r
-                    scope.openFlyout = !scope.openFlyout;\r
-\r
-                    if (scope.openFlyout) {\r
-\r
-                        if (angular.isDefined(scope.flyoutStyle) && scope.flyoutStyle != "") {\r
-                            flyoutStyleArray = scope.flyoutStyle.split(";");\r
-                            for (i = 0; i < flyoutStyleArray.length; i++) {\r
-                                eachCssProperty = flyoutStyleArray[i].split(":");\r
-                                if (eachCssProperty.length == 2) {\r
-                                    cssPropertyKey = eachCssProperty[0].trim();\r
-                                    cssPropertyVal = eachCssProperty[1].trim();\r
-                                    angular.element(element[0])[0].style[cssPropertyKey] = cssPropertyVal;\r
-                                }\r
-                            }\r
-                        }\r
-\r
-                        angular.element(element[0]).css({\r
-                            'opacity': 0,\r
-                            'display': 'block'\r
-                        });\r
-\r
-                        var flyoutIcons = angular.element(document.querySelectorAll(".b2b-flyout-icon"));\r
-                        angular.forEach(flyoutIcons, function (elm) {\r
-                            angular.element(elm)[0].blur();\r
-                        });\r
-\r
-                        $timeout(function () {\r
-                            ctrl.setTogglerFocus();\r
-\r
-                            var togglerDimensions = ctrl.getTogglerDimensions();\r
-                            var flyoutDimensions = element[0].getBoundingClientRect();\r
-\r
-                            switch (scope.horizontalPlacement) {\r
-                            case "left":\r
-                                angular.element(element[0]).css({\r
-                                    'left': ((togglerDimensions.width / 2) - 26) + 'px'\r
-                                });\r
-                                break;\r
-                            case "right":\r
-                                angular.element(element[0]).css({\r
-                                    'right': ((togglerDimensions.width / 2) - 23) + 'px'\r
-                                });\r
-                                break;  \r
-\r
-                            case "centerLeft":\r
-                                var marginLeft =  10-(flyoutDimensions.width)-20;\r
-                                angular.element(element[0]).css({\r
-                                    'margin-left': marginLeft + 'px'\r
-                                });\r
-                                break;\r
-                            case "centerRight":\r
-                                angular.element(element[0]).css({\r
-                                    'left': ((togglerDimensions.width + 9 )) + 'px'\r
-                                });\r
-                                break;    \r
-\r
-                            default:\r
-                                var marginLeft = (togglerDimensions.width / 2) - (flyoutDimensions.width / 2) - 8;\r
-                                angular.element(element[0]).css({\r
-                                    'margin-left': marginLeft + 'px'\r
-                                });\r
-                            }\r
-\r
-                            switch (scope.verticalPlacement) {\r
-                            case "above":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -(flyoutDimensions.height + 13) + 'px'\r
-                                });\r
-                                break;\r
-                            case "centerLeft":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -((togglerDimensions.height-13))+ 'px'\r
-                                });\r
-                                break;\r
-                            case "centerRight":\r
-                                angular.element(element[0]).css({\r
-                                    'top': -(flyoutDimensions.height - 23)+ 'px'\r
-                                });\r
-                                break;                                    \r
-                            default:\r
-                                angular.element(element[0]).css({\r
-                                    'top': (togglerDimensions.height + 13) + 'px'\r
-                                });\r
-                            }\r
-\r
-                            angular.element(element[0]).css({\r
-                                'opacity': 1\r
-                            });\r
-                        }, 100);\r
-                    } else {\r
-                        scope.hideFlyout();\r
-                    }\r
-                };\r
-\r
-                scope.gotFocus = function () {\r
-                    scope.openFlyout = false;\r
-                    scope.hideFlyout();\r
-                    ctrl.setTogglerFocus();\r
-                    scope.$apply();\r
-                };\r
-\r
-                scope.closeFromChild = function (e) {\r
-                    scope.openFlyout = false;\r
-                    scope.hideFlyout();\r
-                    ctrl.setTogglerFocus();\r
-                    scope.$apply();\r
-                };\r
-\r
-                scope.hideFlyout = function () {\r
-                    angular.element(element[0]).css({\r
-                        'opacity': 0,\r
-                        'display': 'none'\r
-                    });\r
-                };\r
-\r
-                scope.closeFlyout = function (e) {\r
-                    var isElement = $isElement(angular.element(e.target), element, $document);\r
-                    if ((e.type === "keydown" && e.which === 27) || ((e.type === "click" || e.type==="touchend") && !isElement)) {\r
-                        scope.openFlyout = false;\r
-                        scope.hideFlyout();\r
-                        ctrl.setTogglerFocus();\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-\r
-                scope.$watch('openFlyout', function () {\r
-                    ctrl.updateAriaModel(scope.openFlyout);\r
-                });\r
-\r
-                $documentBind.click('openFlyout', scope.closeFlyout, scope);\r
-                $documentBind.event('keydown', 'openFlyout', scope.closeFlyout, scope);\r
-                $documentBind.event('touchend', 'openFlyout', scope.closeFlyout, scope);\r
-                ctrl.registerContentScope(scope);\r
-\r
-                if (angular.isDefined(scope.contentUpdated) && scope.contentUpdated !== null) {\r
-                    scope.$watch('contentUpdated', function (newVal, oldVal) {\r
-                        if(newVal){\r
-                            if (newVal !== oldVal) {\r
-                                ctrl.unbindTabbaleEvents();\r
-                                ctrl.associateTabEvent();\r
-                            }\r
-                            scope.contentUpdated = false;\r
-                        } \r
-                    });\r
-                }  \r
-\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bCloseFlyout', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            require: '^b2bFlyout',\r
-            scope: {\r
-                closeFlyout: '&'\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                element.bind('click', function (e) {\r
-                    scope.closeFlyout(e);\r
-                    ctrl.closeFlyout(e);\r
-                });\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bFlyoutTrapFocusInside', [function () {\r
-        return {\r
-            restrict: 'A',\r
-            transclude: false,\r
-            require: '^b2bFlyout',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                /* Before opening modal, find the focused element */\r
-                ctrl.updateTabbableElements();\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:footer\r
- *\r
- * @description\r
- *  <file src="src/footer/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
- <footer class="b2b-footer-wrapper" role="contentinfo" aria-label="footer">\r
-        <div class="b2b-footer-container" b2b-column-switch-footer footer-link-items='footerItems'>\r
-            <hr>\r
-            <div class="divider-bottom-footer">\r
-                <div class="span2 dispalyInline">&nbsp;</div>\r
-                <div class="span6 dispalyInline">\r
-                    <ul class="footer-nav-content">\r
-                        <li><a href="Terms_of_use.html" title="Terms of use" id="foot0">Terms of use</a>|</li>\r
-                        <li><a href="Privacy_policy.html" title="Privacy policy" id="foot1" class="active">Privacy policy</a>|</li>\r
-                        <li><a href="Tollfree_directory_assistance.html" title="Tollfree directory assistance" id="foot2">Tollfree directory assistance</a>|</li>\r
-                        <li><a href="compliance.html" title="Accessibility" id="foot3">Accessibility</a></li>\r
-\r
-                    </ul>\r
-                    <p><a href="//www.att.com/gen/privacy-policy?pid=2587" target="_blank">© <span class="copyright">2016</span> AT&amp;T Intellectual Property</a>. All rights reserved. AT&amp;T,the AT&amp;T Globe logo and all other AT&amp;T marks contained herein are tardemarks of AT&amp;T intellectual property and/or AT&amp;T affiliated companines.\r
-\r
-                    </p>\r
-                </div>\r
-                <div class="span3 footerLogo dispalyInline">\r
-                    <a href="index.html" class="footer-logo">\r
-                        <i class="icon-primary-att-globe"><span class="hidden-spoken">A T &amp; T</span></i>\r
-                        <h2 class="logo-title">AT&amp;T</h2>\r
-                    </a>\r
-                </div>\r
-            </div>\r
-\r
-        </div>  \r
-    </footer>\r
-\r
- * @example\r
- *  <section id="code">   \r
- <example module="b2b.att">\r
- <file src="src/footer/docs/demo.html" />\r
- <file src="src/footer/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.footer', ['b2b.att.utilities']).\r
-        directive('b2bColumnSwitchFooter', [function() {\r
-                return {\r
-                    restrict: 'A',\r
-                    transclude: true,\r
-                    scope: {\r
-                        footerLinkItems: "="\r
-                    },\r
-                    templateUrl: 'b2bTemplate/footer/footer_column_switch_tpl.html',\r
-                    link: function(scope) {\r
-                        var tempFooterColumns = scope.footerLinkItems.length;\r
-                        scope.footerColumns = 3;\r
-                        if ( (tempFooterColumns === 5) || (tempFooterColumns === 4) ) {\r
-                            scope.footerColumns = tempFooterColumns;\r
-                        }\r
-                    }\r
-\r
-                };\r
-\r
-            }]);\r
-     \r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:header\r
- *\r
- * @description\r
- *  <file src="src/header/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <li b2b-header-menu class="header__item b2b-headermenu" ng-repeat="item in tabItems" role="presentation">\r
-        <a href="#" class="menu__item" role="menuitem">{{item.title}}</a>\r
-        <div class="header-secondary-wrapper">\r
-            <ul class="header-secondary" role="menu">\r
-                <li class="header-subitem" b2b-header-submenu ng-repeat="i in item.subitems" role="presentation">\r
-                    <a href="#" class="menu__item" aria-haspopup="true" role="menuitem">{{i.value}}</a>\r
-                    <div class="header-tertiary-wrapper" ng-if="i.links">\r
-                        <ul class="header-tertiary" role="menu">\r
-                            <li b2b-header-tertiarymenu ng-repeat="link in i.links" role="presentation">\r
-                                <label>{{link.title}}</label>\r
-                                <div b2b-tertiary-link ng-repeat="title in link.value">\r
-                                    <a href="{{link.href}}" class="header-tertiaryitem" ng-if="!title.subitems" aria-haspopup="false" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>\r
-                                    <a href="{{link.href}}" class="header-tertiaryitem" b2b-header-togglemenu ng-if="title.subitems" aria-haspopup="true" role="menuitem"><span class="b2b-label-hide">{{link.title}}</span>{{title.title}}</a>\r
-                                    <ul class="header-quarternary" role="menu"  ng-if="title.subitems">\r
-                                        <li b2b-header-quarternarymenu role="presentation">\r
-                                            <a href="{{nav.href}}" ng-repeat="nav in title.subitems" role="menuitem" aria-haspopup="true">{{nav.title}}</a>\r
-                                        </li>\r
-                                    </ul>\r
-                                </div>\r
-                            </li>\r
-                        </ul>\r
-                    </div>\r
-                </li>\r
-            </ul>\r
-        </div>\r
-    </li> \r
- *\r
- * @example\r
- *  <section id="code">\r
- <example module="b2b.att.header">\r
- <file src="src/header/docs/demo.html" />\r
- <file src="src/header/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.header', ['b2b.att.dropdowns','b2b.att.utilities'])\r
-    .directive('b2bHeaderMenu', ['keymap', '$documentBind', '$timeout', '$isElement', '$document', function (keymap, $documentBind, $timeout, $isElement, $document) {\r
-        return {\r
-            restrict: 'A',\r
-            controller:['$scope',function($scope){\r
-                this.nextSiblingFocus = function (elObj,flag) {\r
-                        if (elObj.nextElementSibling) {\r
-                            if(flag){\r
-                                var nextmenuItem = this.getFirstElement(elObj.nextElementSibling,'a');\r
-                                nextmenuItem.focus();\r
-                            }else{\r
-                                elObj.nextElementSibling.focus();\r
-                            }\r
-                        }\r
-                };\r
-                \r
-                this.previousSiblingFocus = function (elObj,flag) {\r
-                        if (elObj.previousElementSibling) {\r
-                            if(flag){\r
-                                var prevmenuItem = this.getFirstElement(elObj.previousElementSibling,'a');\r
-                                prevmenuItem.focus();\r
-                            }else{\r
-                                elObj.previousElementSibling.focus();\r
-                            }\r
-                        }\r
-                };\r
-                    \r
-                this.getFirstElement = function(elmObj,selector){\r
-                        return elmObj.querySelector(selector);                        \r
-                    };\r
-            }],\r
-            link: function (scope, elem,attr,ctrl) {\r
-                scope.showMenu = false;\r
-                var activeElm, subMenu, tertiaryMenu, el= angular.element(elem)[0], \r
-                        menuItem = angular.element(elem[0].children[0]);\r
-                menuItem.bind('click', function () {\r
-                    elem.parent().children().removeClass('active');\r
-                    elem.addClass('active');\r
-                    var elems= this.parentElement.parentElement.querySelectorAll('li[b2b-header-menu]>a');\r
-                    for (var i=0; i<elems.length; i++) {\r
-                        elems[i].setAttribute("aria-expanded",false);\r
-                    }\r
-                    scope.showMenu = true;\r
-                    var elmTofocus = ctrl.getFirstElement(this.parentElement,'li[b2b-header-submenu]');\r
-                    elmTofocus.firstElementChild.focus();\r
-                    this.setAttribute('aria-expanded',true);\r
-                    scope.$apply();\r
-                });\r
-               \r
-                elem.bind('keydown', function (evt) {\r
-                    activeElm = document.activeElement;\r
-                    subMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-submenu]');\r
-                    tertiaryMenu = ctrl.getFirstElement(activeElm.parentElement,'li[b2b-header-tertiarymenu]');\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.ENTER:\r
-                        case keymap.KEY.SPACE:\r
-                            elem[0].click();\r
-                            break;\r
-                        case keymap.KEY.UP:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                menuItem[0].focus();\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.DOWN:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (subMenu) {\r
-                                subMenu.firstElementChild.focus();\r
-                            } else if (tertiaryMenu) {\r
-                                var firstSubitem = ctrl.getFirstElement(tertiaryMenu,'a.header-tertiaryitem');\r
-                                firstSubitem.focus();\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.RIGHT:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                var elm = angular.element(activeElm.parentElement)[0];\r
-                                ctrl.nextSiblingFocus(elm,true);\r
-                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {\r
-                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];\r
-                                if (tertiaryLI.nextElementSibling) {\r
-                                    var nextElm = ctrl.getFirstElement(tertiaryLI.nextElementSibling,"a.header-tertiaryitem");\r
-                                    nextElm.focus();\r
-                                }\r
-                            }\r
-                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')){\r
-                                ctrl.nextSiblingFocus(el,true);\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.LEFT:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeElm.parentElement.hasAttribute('b2b-header-submenu')) {\r
-                                var previousElm = angular.element(activeElm.parentElement)[0];\r
-                                ctrl.previousSiblingFocus(previousElm,true);\r
-                            } else if (activeElm.parentElement.parentElement.hasAttribute('b2b-header-tertiarymenu')) {\r
-                                var tertiaryLI = angular.element(activeElm.parentElement.parentElement)[0];\r
-                                if (tertiaryLI.previousElementSibling) {\r
-                                    var prevElm = ctrl.getFirstElement(tertiaryLI.previousElementSibling,"a.header-tertiaryitem");\r
-                                    prevElm.focus();\r
-                                }\r
-                            }\r
-                            else if(activeElm.parentElement.hasAttribute('b2b-header-menu')) {\r
-                                ctrl.previousSiblingFocus(el,true);\r
-                            }\r
-                            break;\r
-                        case keymap.KEY.ESC:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            scope.showMenu = false;\r
-                            elem.removeClass('active');\r
-                            menuItem.attr('aria-expanded',false);\r
-                            $timeout(function(){\r
-                                menuItem[0].focus();\r
-                            },100);\r
-                            scope.$apply();\r
-                            break;\r
-                        default:\r
-                            break;\r
-                    }\r
-                });\r
-                var outsideClick = function (e) {\r
-                    var isElement = $isElement(angular.element(e.target), elem, $document);\r
-                    if (!isElement) {\r
-                        scope.showMenu = false;\r
-                        elem.removeClass('active');\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-                $documentBind.click('showMenu', outsideClick, scope);\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderSubmenu', ['$timeout',function ($timeout) {\r
-        return{\r
-            restrict: 'A',\r
-            link: function (scope, elem) {\r
-                var caretSign = angular.element("<i class='menuCaret'></i>");\r
-                $timeout(function(){\r
-                    var menuItem = angular.element(elem[0].children[0]);\r
-                    menuItem.bind('focus mouseenter', function () {\r
-                        elem.parent().children().removeClass('active');\r
-                        elem.addClass('active');\r
-                        if(elem[0].childElementCount > 1){ // > 1 has third level menu\r
-                            menuItem.attr('aria-expanded',true);\r
-                            menuItem.attr('aria-haspopup',true);\r
-                        }\r
-                        var caretLeft = (elem[0].offsetLeft +  elem[0].offsetWidth/2) - 10;\r
-                        caretSign.css({left: caretLeft + 'px'});\r
-                        angular.element(caretSign);\r
-                        var tertiaryItems = elem[0].querySelectorAll('[b2b-header-tertiarymenu]');\r
-                        if(tertiaryItems.length >=1){\r
-                            elem.append(caretSign);\r
-                        }\r
-                    });\r
-                    menuItem.bind('blur', function () {\r
-                        $timeout(function () {\r
-                            var parentElm = document.activeElement.parentElement.parentElement;\r
-                            if(parentElm){\r
-                                if (!(parentElm.hasAttribute('b2b-header-tertiarymenu'))) {\r
-                                    elem.removeClass('active');\r
-                                    if(elem[0].childElementCount > 1){ // > 1 has third level menu\r
-                                        menuItem.attr('aria-expanded',false);\r
-                                    }\r
-                                    var caret = elem[0].querySelector('.menuCaret');\r
-                                    if(caret){\r
-                                        caret.remove();\r
-                                    }   \r
-                                }\r
-                            }\r
-                        });\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderTertiarymenu', ['$timeout','keymap', function ($timeout,keymap){\r
-        return{\r
-            restrict: 'A',\r
-            require:'^b2bHeaderMenu',\r
-            link: function (scope, elem,attr,ctrl) {\r
-                \r
-                elem.bind('keydown', function (evt) {\r
-                    var activeElm = document.activeElement;\r
-                    var activeParentElm = activeElm.parentElement;\r
-                    var activeParentObj  = angular.element(activeParentElm)[0];\r
-                    \r
-                    if(activeParentElm.hasAttribute('b2b-tertiary-link')){\r
-                        var quarterNav = angular.element(activeParentElm)[0].querySelector('li[b2b-header-quarternarymenu]');\r
-                        if(quarterNav){\r
-                            var links = ctrl.getFirstElement(angular.element(quarterNav)[0],'a');\r
-                        }\r
-                    }\r
-                    var tertiaryMenu = activeElm.parentElement.parentElement.parentElement;\r
-                    var tertiaryMenuFlag = tertiaryMenu.hasAttribute('b2b-tertiary-link');\r
-                    \r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if (activeParentElm.hasAttribute('b2b-tertiary-link')) {\r
-                                if(angular.element(quarterNav).hasClass('active')){\r
-                                    links.focus();\r
-                                }else if(activeParentObj.nextElementSibling){\r
-                                    ctrl.nextSiblingFocus(activeParentObj,true);\r
-                                }\r
-                            }\r
-                            else if(angular.element(activeParentElm).hasClass('active')){\r
-                                ctrl.nextSiblingFocus(activeElm);\r
-                            }\r
-                            break;                        \r
-                        case keymap.KEY.UP:\r
-                            evt.stopPropagation();\r
-                            evt.preventDefault();\r
-                            if(activeParentElm.hasAttribute('b2b-tertiary-link')){\r
-                                if(activeParentObj.previousElementSibling.hasAttribute('b2b-tertiary-link')){\r
-                                    ctrl.previousSiblingFocus(activeParentObj,true);\r
-                                }else{\r
-                                    var elm = angular.element(activeElm.parentElement.parentElement.parentElement.parentElement.parentElement)[0];\r
-                                    ctrl.getFirstElement(elm,"a").focus();\r
-                                }\r
-                            }else if(angular.element(activeParentElm).hasClass('active')){\r
-                                    if (activeElm.previousElementSibling) {\r
-                                        ctrl.previousSiblingFocus(activeElm);\r
-                                    }else if (tertiaryMenuFlag) {\r
-                                        var elm = angular.element(tertiaryMenu)[0];\r
-                                        ctrl.getFirstElement(elm,"a.header-tertiaryitem").focus();\r
-                                    }\r
-                                }\r
-                            break;\r
-                        default:\r
-                            break;\r
-                    }\r
-                });\r
-            }            \r
-        };          \r
-    }]).directive('b2bHeaderTogglemenu', ['$timeout', 'keymap', function ($timeout, keymap) {\r
-        return{\r
-            restrict: 'A',\r
-            require: '^b2bHeaderMenu',\r
-            link: function (scope, elem, attrs, ctrl) {\r
-                var quarterNav;\r
-                $timeout(function () {\r
-                    quarterNav = angular.element(elem.parent())[0].querySelector('li[b2b-header-quarternarymenu]');\r
-                    elem.bind('click', function () {\r
-                        angular.element(quarterNav).toggleClass('active');\r
-                    });\r
-                });\r
-            }\r
-        };\r
-    }]).directive('b2bHeaderResponsive', ['$timeout',function ($timeout) {\r
-        return{\r
-            restrict: 'A',\r
-            controller: function($scope){\r
-                this.applyMediaQueries = function(value){\r
-                    document.querySelector('style').textContent += \r
-                        "@media screen and (max-width:950px) { \\r
-                            .header__item.profile { right: " + value + "px; } \\r
-                        }";\r
-                };\r
-                this.arrangeResponsiveHeader = function(children){\r
-                    /* \r
-                     * clientWidth of 1090 === max-width of 1100px\r
-                     * clientWidth of 920 === max-width of 950px\r
-                     * see b2b-angular.css for rest of responsive header CSS\r
-                     */\r
-                  if (document.documentElement.clientWidth <= 920) { \r
-                        switch(children){\r
-                            case 1:\r
-                                this.applyMediaQueries(200);                    \r
-                                break;\r
-                            case 2:\r
-                                this.applyMediaQueries(200);                            \r
-                                break;\r
-                            default: // anthing above 3, however, should not have more than 3 to date\r
-                                this.applyMediaQueries(200);                                                                            \r
-                        }\r
-                    }\r
-                }\r
-            },\r
-            link: function (scope, elem, attrs, ctrl) {\r
-                var children;\r
-                var profile;\r
-                \r
-                // onload of page\r
-                $timeout(function(){ \r
-                    profile = document.querySelector('li.header__item.profile');\r
-                    children = angular.element(profile).children().length;\r
-                    \r
-                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers\r
-                });\r
-\r
-                // on screen resize\r
-                window.addEventListener('resize', function(event){ // caret adjustmet\r
-                    var activeSubmenu = elem[0].querySelector('[b2b-header-menu] [b2b-header-submenu].active');\r
-                    var activeSubmenuEl = angular.element(activeSubmenu);\r
-                    if(activeSubmenu){\r
-                        var caretSign = activeSubmenu.querySelector('i.menuCaret');\r
-                        if(caretSign){\r
-                            var caretSignEl = angular.element(caretSign);\r
-                            var caretLeft = (activeSubmenu.offsetLeft +  activeSubmenu.offsetWidth/2) - 10;\r
-                            caretSignEl.css({left: caretLeft + 'px'});\r
-                        }\r
-                    }\r
-\r
-                    ctrl.arrangeResponsiveHeader(children); // shift right-side icon flyovers\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:headings\r
- *\r
- * @description\r
- *  <file src="src/headings/docs/readme.md" />\r
- *\r
- * @usage\r
-    <h1 class="heading-page">38px page heading</h1>\r
-    <h2 class="heading-major-section">30px major section heading</h2>\r
-    <h3 class="heading-sub-section">24px sub-section heading</h3>\r
-    <h2 class="heading-medium">20px medium heading</h2>\r
-    <h2 class="heading-medium-emphasis">20px medium emphasis heading</h2>\r
-    <h3 class="heading-small">18px small heading</h3>\r
-    <h3 class="heading-small-emphasis">18px small emphasis heading</h3>\r
-    <h3 class="heading-micro">13px micro heading</h3>\r
-\r
-    <h2 class="heading-group">Lead</h2>\r
-    <h1 class="heading-page">This is 38px heading</h1>\r
-    <h2 class="lead">This is lead text...The next big thing since the last big thing we announced.</h2>\r
-    <h2 class="heading-group">Eyebrow</h2>\r
-    <h3 class="eyebrow">EYEBROW TEXT</h3>\r
-    <h2 class="heading-major-section">This is a 30px heading</h2>\r
-    <h3 class="eyebrow">EYEBROW TEXT</h3>\r
-    <h3 class="heading-sub-section">24px sub-section heading</h3>\r
-    <h2 class="heading-group">Subheading</h2>\r
-    <h2 class="heading-major-section">This is a 30px heading</h2>\r
-    <h3 class="subheading">A subheading here to support what was said above</h3>\r
- * @example\r
- <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-    <file src="src/headings/docs/demo.html" />\r
-</example>\r
-</section>\r
- */\r
-\r
-var b2bLegalCopy = angular.module('b2b.att.headings', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:horizontalTable\r
- *\r
- * @description\r
- *  <file src="src/horizontalTable/docs/readme.md" />\r
- *\r
- * @usage\r
- * @param {int} sticky - Number of sticky columns to have. Maximum of 3.\r
- * @param {boolean} refresh - A boolean that when set to true will force a re-render of table. Only use when using 'bulk mode'\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/horizontalTable/docs/demo.html" />\r
-            <file src="src/horizontalTable/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.horizontalTable', [])\r
-    .constant('b2bHorizontalTableConfig', {\r
-        'maxStickyColumns': 3\r
-    })\r
-    .directive('b2bHorizontalTable', ['$timeout', 'b2bHorizontalTableConfig', 'b2bDOMHelper', function ($timeout, b2bHorizontalTableConfig, b2bDOMHelper) {\r
-        return {\r
-            restrict: 'EA',\r
-            scope: true,\r
-            transclude: true,\r
-            scope: {\r
-                numOfStickyCols: '=?sticky',\r
-                refresh: '=?'\r
-\r
-            },\r
-            templateUrl: 'b2bTemplate/horizontalTable/horizontalTable.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.numOfStickyCols = scope.numOfStickyCols || 1;\r
-                scope.viewportIndex = scope.numOfStickyCols;\r
-\r
-                // JM520E: This is a temporary hack until I solve the ngRepeat issue\r
-                function hack() {\r
-                    if (element.find('th').length < scope.numOfStickyCols) {\r
-                        // DOM ngRepeat is not ready, let's check back in 10 ms\r
-                        console.info('THs are not ready, trying again in 10ms');\r
-                        $timeout(hack, 10, false);\r
-                    } else {\r
-                        init();\r
-                    }\r
-                }\r
-                hack();\r
-\r
-                if (attrs.refresh !== undefined && attrs.refresh !== '') {\r
-                    scope.$watch('refresh', function(oldVal, newVal) {\r
-                        if (scope.refresh) {\r
-                            // From testing it takes about 30 ms before ngRepeat executes, so let's set initial timeout\r
-                            // NOTE: May need to expose timeout to developers. Application is known to have digest cycle of 3-5k watches.\r
-                            $timeout(init, 100, false);\r
-                            scope.refresh = false;\r
-                        }\r
-                    });\r
-                }\r
-\r
-                var tableElement = element.find('table');\r
-                var thElements = element.find('th');\r
-                var innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));\r
-                var outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));\r
-\r
-                var tableColumns = [];\r
-                var tableRows = element.find('tr');\r
-\r
-                var maxWidth = 0,\r
-                    maxHeight = 0;\r
-                var totalWidth = element.children()[0].offsetWidth;\r
-                var lastVisibleColumn = 0;\r
-                var collectiveColumnWidth = [];\r
-                var collectiveRowHeight = [];\r
-                var columnSets = [];\r
-                var setIndex = 0; \r
-                var stickyPixels = 0;\r
-\r
-                var displayNoneCSS = {'display': 'none'};\r
-                var displayBlockCSS = {'display': 'table-cell'};\r
-\r
-                function calculateVisibleColumns(startingPoint) {\r
-                    var usedWidth = 0, \r
-                        visibleColumns = startingPoint || scope.numOfStickyCols;\r
-\r
-                    while(usedWidth < stickyPixels && visibleColumns < collectiveColumnWidth.length) {\r
-                        if (usedWidth+collectiveColumnWidth[visibleColumns] > stickyPixels) {\r
-                            if (startingPoint === visibleColumns) {\r
-                                return visibleColumns; // The next cell is too large to fit, it should be only thing to fit\r
-                            }\r
-                            visibleColumns--;\r
-                            return visibleColumns;\r
-                        }\r
-                        usedWidth += collectiveColumnWidth[visibleColumns];\r
-                        visibleColumns++;\r
-                    }\r
-\r
-                    if (usedWidth > stickyPixels) {\r
-                        return --visibleColumns;\r
-                    }\r
-                    return visibleColumns;\r
-                }\r
-\r
-                function updateCellDisplay(set) {\r
-                    for (var i = scope.numOfStickyCols; i < tableColumns.length; i++) {\r
-                        angular.element(tableColumns[i]).css(displayNoneCSS);\r
-                    }\r
-\r
-                    for (var i = set[0]; i <= set[1]; i++) {\r
-                        angular.element(tableColumns[i]).css(displayBlockCSS);\r
-                    }\r
-                }\r
-\r
-                function forceDigest() {\r
-                    if (!scope.$$phase) {\r
-                        scope.$digest();\r
-                    }\r
-                }\r
-\r
-                function findMax(arr, prop) {\r
-                    var max = 0;\r
-                    var localVal = 0;\r
-                    var prevDisplay;\r
-                    var item;\r
-                    for (var i = 0; i < arr.length; i++) {\r
-                        item = arr[i];\r
-                        prevDisplay = angular.element(item).css('display');\r
-                        if (scope.$$phase) {\r
-                            scope.$digest();\r
-                        }\r
-                        if (prop === 'width') {\r
-                            localVal = Math.ceil(parseInt(window.getComputedStyle(item).width.split('px')[0], 10)) + 30; // 30 px is padding\r
-                        } else if (prop === 'offsetWidth') {\r
-                            localVal = item.offsetWidth;\r
-                        } else if (prop === 'height') {\r
-                            localVal = item.offsetHeight;\r
-                        }\r
-\r
-                        if (localVal >= max) {\r
-                            max = localVal;\r
-                        }\r
-                    }\r
-                    \r
-                    return max;\r
-                }\r
-\r
-                function init() {\r
-                    // Reset this from a previous execution\r
-                    tableColumns = [];\r
-                    collectiveColumnWidth = [];\r
-                    collectiveRowHeight = [];\r
-                    maxWidth = 0;\r
-                    maxHeight = 0;\r
-                    lastVisibleColumn = 0;\r
-                    columnSets = [];\r
-                    setIndex = 0; \r
-                    visibleColumns = [];\r
-                    stickyPixels = 0;\r
-\r
-                    tableElement = element.find('table');\r
-                    thElements = element.find('th');\r
-                    innerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table-inner-container'));\r
-                    outerContainer = angular.element(element[0].querySelector('.b2b-horizontal-table'));\r
-                    totalWidth = element.children()[0].offsetWidth;\r
-\r
-\r
-                    tableRows = element.find('tr');\r
-                    totalWidth = element.children()[0].offsetWidth;\r
-\r
-                    scope.disableLeft = true;\r
-                    scope.disableRight = false;\r
-\r
-                    if (scope.numOfStickyCols > b2bHorizontalTableConfig.maxStickyColumns) {\r
-                        throw new Error("Table can only support 3 sticky columns.");\r
-                    }                  \r
-\r
-                    angular.forEach(tableRows, function(row, rowIndex) {\r
-                        collectiveRowHeight.push(findMax(row.children, 'height'));\r
-                        for(var j = 0; j < row.children.length; j++) {\r
-                            if (tableColumns[j] === undefined) {\r
-                                tableColumns[j] = [];\r
-                            }\r
-                            tableColumns[j].push(row.children[j]);\r
-                        }\r
-                    });\r
-\r
-                    // We need to reset all the displayNones from previous runs, if applicable\r
-                    if (attrs.refresh !== undefined && attrs.refresh !== '')  {\r
-                        for (var i = scope.numOfStickyCols+1; i < tableColumns.length; i++) {\r
-                            angular.element(tableColumns[i]).css(displayBlockCSS);\r
-                        }\r
-                    }\r
-\r
-                    for (var i = 0; i < tableColumns.length; i++) {\r
-                        collectiveColumnWidth.push(findMax(tableColumns[i], 'width')); //offsetWidth doesn't take into account custom css inside\r
-                    }\r
-                    for(var i = 0; i < scope.numOfStickyCols; i++) {\r
-                        maxWidth += collectiveColumnWidth[i];\r
-                    }\r
-      \r
-                    stickyPixels = totalWidth-maxWidth;\r
-\r
-\r
-                    // At this point, for each tr, I need to set the properties (height) and each numOfStickyCols children\r
-                    // should be set with sticky properties (margin-left and width)\r
-                    var width = maxWidth;\r
-                    for(var i = 0; i < scope.numOfStickyCols; i++) {\r
-                        for (var j = 0; j < tableRows.length; j++) {\r
-                            trObject = angular.element(tableRows[j].children[i]);\r
-                            \r
-                            angular.element(trObject).css({\r
-                                'margin-left': -(width + 2) + 'px', \r
-                                'width': (collectiveColumnWidth[i] + 3) + 'px', // instead of taking the max width, grab max width for that column\r
-                                'height': collectiveRowHeight[j] + 'px',\r
-                                'position': 'absolute',\r
-                                'background-color': 'lightgrey'\r
-                            });\r
-                        }\r
-                        \r
-\r
-                        width -= collectiveColumnWidth[i];\r
-                    }\r
-\r
-                    innerContainer.css({\r
-                        'padding-left': (maxWidth + 2) + 'px'\r
-                    });\r
-\r
-\r
-                    // Let's precompute all the (set) combinations beforehand\r
-                    columnSets = []; \r
-                    for (var i = scope.numOfStickyCols; i < tableColumns.length;) {\r
-                        visibleColumns = calculateVisibleColumns(i);\r
-                        columnSets.push([i, visibleColumns]);\r
-                        i = visibleColumns + 1;\r
-                    }\r
-                    \r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-\r
-                    scope.numOfCols = tableColumns.length;\r
-\r
-                    console.log('Bulk Mode is ' + (attrs.bulkMode ? 'enabled': 'disabled'));\r
-                    console.log('tableColumns', tableColumns);\r
-                    console.log('collectiveColumnWidth: ', collectiveColumnWidth);\r
-                    console.log('maxWidth: ', maxWidth);\r
-                }\r
-\r
-                function checkScrollArrows() {\r
-                    scope.disableLeft = (setIndex === 0);\r
-                    scope.disableRight = !(setIndex < columnSets.length-1);\r
-                }\r
-\r
-\r
-                scope.moveViewportLeft = function () {\r
-                    setIndex--;\r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-\r
-                    if (scope.disableLeft) {\r
-                        element.find('span')[0].focus();\r
-                    }\r
-                };\r
-                \r
-                scope.moveViewportRight = function () {\r
-                    setIndex++;\r
-                    updateCellDisplay(columnSets[setIndex]);\r
-                    checkScrollArrows();\r
-                    \r
-                    if (scope.disableRight) {\r
-                        element.find('span')[0].focus();\r
-                    }\r
-                };\r
-\r
-                scope.getColumnSet = function () {\r
-                    return columnSets[setIndex];\r
-                };\r
-\r
-                innerContainer.bind('scroll', function () {\r
-                    $timeout(function () {\r
-                        checkScrollArrows();\r
-                    }, 1);\r
-                });\r
-\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:hourPicker\r
- *\r
- * @description\r
- *  <file src="src/hourPicker/docs/readme.md" />\r
- *\r
- * @usage\r
- * <div b2b-hourpicker ng-model="hourpickerValue.value"></div>\r
-    \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/hourPicker/docs/demo.html" />\r
-            <file src="src/hourPicker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.hourPicker', ['b2b.att.utilities'])\r
-\r
-.constant('b2bHourpickerConfig', {\r
-    dayOptions: [{\r
-        title: 'sunday',\r
-        caption: 'Sun',\r
-        label: 'S',\r
-        disabled: false\r
-    }, {\r
-        title: 'monday',\r
-        caption: 'Mon',\r
-        label: 'M',\r
-        disabled: false\r
-    }, {\r
-        title: 'tuesday',\r
-        caption: 'Tues',\r
-        label: 'T',\r
-        disabled: false\r
-    }, {\r
-        title: 'wednesday',\r
-        caption: 'Wed',\r
-        label: 'W',\r
-        disabled: false\r
-    }, {\r
-        title: 'thursday',\r
-        caption: 'Thu',\r
-        label: 'T',\r
-        disabled: false\r
-    }, {\r
-        title: 'friday',\r
-        caption: 'Fri',\r
-        label: 'F',\r
-        disabled: false\r
-    }, {\r
-        title: 'saturday',\r
-        caption: 'Sat',\r
-        label: 'S',\r
-        disabled: false\r
-    }],\r
-    startTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],\r
-    startTimeDefaultOptionIndex: -1,\r
-    startTimeDefaultMeridiem: "am",\r
-    endTimeOptions: ['1:00', '2:00', '3:00', '4:00', '5:00', '6:00', '7:00', '8:00', '9:00', '10:00', '11:00', '12:00'],\r
-    endTimeDefaultOptionIndex: -1,\r
-    endTimeDefaultMeridiem: "pm",\r
-    sameDayOption: true\r
-})\r
-\r
-.factory('b2bNormalizeHourpickerValues', [function () {\r
-    var _normalize = function (hourpickerValues) {\r
-        if (angular.isDefined(hourpickerValues) && hourpickerValues != null) {\r
-            var finalHourpickerValues = [];\r
-            var hourpickerValue = {};\r
-            var days = {};\r
-            for (var i = 0; i < hourpickerValues.length; i++) {\r
-                days = hourpickerValues[i].days ? hourpickerValues[i].days : {};\r
-                hourpickerValue.startTime = hourpickerValues[i].startTime ? hourpickerValues[i].startTime : '';\r
-                hourpickerValue.startMeridiem = hourpickerValues[i].startMeridiem ? hourpickerValues[i].startMeridiem : '';\r
-                hourpickerValue.endTime = hourpickerValues[i].endTime ? hourpickerValues[i].endTime : '';\r
-                hourpickerValue.endMeridiem = hourpickerValues[i].endMeridiem ? hourpickerValues[i].endMeridiem : '';\r
-                hourpickerValue.days = [];\r
-\r
-                var retrieveDaysText = function (daysDetails) {\r
-                    var daysTexts = [];\r
-                    var first = -1;\r
-                    var last = -1;\r
-                    var index = -1;\r
-                    for (var i in days) {\r
-                        if (days[i].value) {\r
-                            daysTexts.push(i);\r
-                        }\r
-                    }\r
-\r
-                    first = daysTexts[0];\r
-                    last = daysTexts[0];\r
-                    index = 0;\r
-                    hourpickerValue.days[index] = days[first].caption;\r
-                    if (daysTexts.length > 1) {\r
-                        for (var i = 1; i < daysTexts.length; i++) {\r
-                            if (daysTexts[i] - last === 1) {\r
-                                last = daysTexts[i];\r
-                                hourpickerValue.days[index] = days[first].caption + ' - ' + days[last].caption;\r
-                            } else {\r
-                                index++;\r
-                                first = last = daysTexts[i];\r
-                                hourpickerValue.days[index] = days[first].caption;\r
-                            }\r
-                        }\r
-                    }\r
-                };\r
-                retrieveDaysText();\r
-\r
-                finalHourpickerValues.push(angular.copy(hourpickerValue));\r
-            }\r
-\r
-            return angular.copy(finalHourpickerValues);\r
-        }\r
-    };\r
-\r
-    return {\r
-        normalize: _normalize\r
-    };\r
-}])\r
-\r
-.directive('b2bHourpicker', ['b2bHourpickerConfig', 'b2bNormalizeHourpickerValues', function (b2bHourpickerConfig, b2bNormalizeHourpickerValues) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        scope: true,\r
-        require: 'ngModel',\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpicker.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.hourpicker = {};\r
-            scope.hourpicker.dayOptions = attr.dayOptions ? scope.$parent.$eval(attr.dayOptions) : b2bHourpickerConfig.dayOptions;\r
-            scope.hourpicker.startTimeOptions = attr.startTimeOptions ? scope.$parent.$eval(attr.startTimeOptions) : b2bHourpickerConfig.startTimeOptions;\r
-            scope.hourpicker.endTimeOptions = attr.endTimeOptions ? scope.$parent.$eval(attr.endTimeOptions) : b2bHourpickerConfig.endTimeOptions;\r
-            scope.hourpicker.startTimeDefaultOptionIndex = attr.startTimeDefaultOptionIndex ? scope.$parent.$eval(attr.startTimeDefaultOptionIndex) : b2bHourpickerConfig.startTimeDefaultOptionIndex;\r
-            scope.hourpicker.endTimeDefaultOptionIndex = attr.endTimeDefaultOptionIndex ? scope.$parent.$eval(attr.endTimeDefaultOptionIndex) : b2bHourpickerConfig.endTimeDefaultOptionIndex;\r
-            scope.hourpicker.startTimeDefaultMeridiem = attr.startTimeDefaultMeridiem ? scope.$parent.$eval(attr.startTimeDefaultMeridiem) : b2bHourpickerConfig.startTimeDefaultMeridiem;\r
-            scope.hourpicker.endTimeDefaultMeridiem = attr.endTimeDefaultMeridiem ? scope.$parent.$eval(attr.endTimeDefaultMeridiem) : b2bHourpickerConfig.endTimeDefaultMeridiem;\r
-            scope.hourpicker.sameDayOption = attr.sameDayOption ? scope.$parent.$eval(attr.sameDayOption) : b2bHourpickerConfig.sameDayOption;\r
-            scope.hourpicker.editMode = -1;\r
-\r
-            scope.hourpickerValues = [];\r
-            scope.finalHourpickerValues = [];\r
-            scope.addHourpickerValue = function (hourpickerPanelValue) {\r
-                if (hourpickerPanelValue) {\r
-                    if (scope.hourpicker.editMode > -1) {\r
-                        scope.hourpickerValues[scope.hourpicker.editMode] = hourpickerPanelValue;\r
-                        scope.hourpicker.editMode = -1;\r
-                    } else {\r
-                        scope.hourpickerValues.push(hourpickerPanelValue);\r
-                    }\r
-                }\r
-                scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));\r
-                ctrl.$setViewValue(angular.copy(scope.hourpickerValues));\r
-            };\r
-            ctrl.$render = function () {\r
-                if (angular.isDefined(ctrl.$modelValue)) {\r
-                    scope.hourpickerValues = angular.copy(ctrl.$modelValue);\r
-                    scope.finalHourpickerValues = b2bNormalizeHourpickerValues.normalize(angular.copy(scope.hourpickerValues));\r
-                }\r
-            };\r
-            scope.editHourpickerValue = function (index) {\r
-                scope.hourpickerPanelValue = angular.copy(scope.hourpickerValues[index]);\r
-                scope.hourpicker.editMode = index;\r
-            };\r
-            scope.deleteHourpickerValue = function (index) {\r
-                scope.hourpickerValues.splice(index, 1);\r
-                scope.resetHourpickerPanelValue();\r
-                scope.addHourpickerValue();\r
-            };\r
-\r
-            scope.setValidity = function (errorType, errorValue) {\r
-                ctrl.$setValidity(errorType, errorValue);\r
-            }\r
-        }\r
-    }\r
-}])\r
-\r
-.directive('b2bHourpickerPanel', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerPanel.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var hourpickerPanelValueTemplate = {\r
-                days: {},\r
-                startTime: '',\r
-                startMeridiem: 'am',\r
-                endTime: '',\r
-                endMeridiem: 'pm'\r
-            };\r
-            for (var i = 0; i < scope.hourpicker.dayOptions.length; i++) {\r
-                hourpickerPanelValueTemplate.days[i] = {\r
-                    value: false,\r
-                    title: scope.hourpicker.dayOptions[i].title,\r
-                    caption: scope.hourpicker.dayOptions[i].caption\r
-                };\r
-            }\r
-            scope.hourpickerPanelValue = {};\r
-            scope.disableAddBtn = true;\r
-\r
-            scope.$watch('hourpickerPanelValue.days', function(){\r
-                for(var i in scope.hourpickerPanelValue.days)\r
-                {\r
-                    if(scope.hourpickerPanelValue.days[i].value)\r
-                    {\r
-                        scope.disableAddBtn = false;\r
-                        break;\r
-                    }\r
-                    scope.disableAddBtn = true;\r
-                }\r
-            }, true);\r
-\r
-            scope.resetHourpickerPanelValue = function () {\r
-                scope.hourpickerPanelValue = angular.copy(hourpickerPanelValueTemplate);\r
-                if (scope.hourpicker.startTimeDefaultOptionIndex > -1) {\r
-                    scope.hourpickerPanelValue.startTime = scope.hourpicker.startTimeOptions[scope.hourpicker.startTimeDefaultOptionIndex];\r
-                }\r
-                if (scope.hourpicker.endTimeDefaultOptionIndex > -1) {\r
-                    scope.hourpickerPanelValue.endTime = scope.hourpicker.endTimeOptions[scope.hourpicker.endTimeDefaultOptionIndex];\r
-                }\r
-                scope.hourpickerPanelValue.startMeridiem = scope.hourpicker.startTimeDefaultMeridiem;\r
-                scope.hourpickerPanelValue.endMeridiem = scope.hourpicker.endTimeDefaultMeridiem;\r
-                scope.hourpicker.editMode = -1;\r
-                scope.setValidity('invalidHourpickerData', true);\r
-                scope.setValidity('invalidHourpickerTimeRange', true);\r
-            };\r
-            scope.resetHourpickerPanelValue();\r
-            scope.updateHourpickerValue = function () {\r
-                if (scope.isFormValid() && !scope.isTimeOverlap()) {\r
-                    scope.addHourpickerValue(angular.copy(scope.hourpickerPanelValue));\r
-                    scope.resetHourpickerPanelValue();\r
-                }\r
-            };\r
-\r
-            scope.isFormValid = function () {\r
-                var isStartTimeAvailable = scope.hourpickerPanelValue.startTime ? true : false;\r
-                var isStartMeridiemAvailable = scope.hourpickerPanelValue.startMeridiem ? true : false;\r
-                var isEndTimeAvailable = scope.hourpickerPanelValue.endTime ? true : false;\r
-                var isEndMeridiemAvailable = scope.hourpickerPanelValue.endMeridiem ? true : false;\r
-                var currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);\r
-                var currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);\r
-                var isTimeInProperSequence = currentEndTime > currentStartTime;\r
-                var isDayChecked = false;\r
-                for (var i in scope.hourpickerPanelValue.days) {\r
-                    if (scope.hourpickerPanelValue.days[i].value) {\r
-                        isDayChecked = true;\r
-                        break;\r
-                    }\r
-                }\r
-\r
-                if (isStartTimeAvailable && isStartMeridiemAvailable && isEndTimeAvailable && isEndMeridiemAvailable && isTimeInProperSequence && isDayChecked) {\r
-                    scope.setValidity('invalidHourpickerData', true);\r
-                    return true;\r
-                } else {\r
-                    scope.setValidity('invalidHourpickerData', false);\r
-                    return false;\r
-                }\r
-            };\r
-            scope.isTimeOverlap = function () {\r
-                var selectedDays = [];\r
-                for (var i in scope.hourpickerPanelValue.days) {\r
-                    if (scope.hourpickerPanelValue.days[i].value) {\r
-                        selectedDays.push(i);\r
-                    }\r
-                }\r
-\r
-                var currentStartTime, currentEndTime, existingStartTime, existingEndTime;\r
-                currentStartTime = getTime(scope.hourpickerPanelValue.startTime, scope.hourpickerPanelValue.startMeridiem);\r
-                currentEndTime = getTime(scope.hourpickerPanelValue.endTime, scope.hourpickerPanelValue.endMeridiem);\r
-                for (var i = 0; i < scope.hourpickerValues.length; i++) {\r
-                    \r
-                    if (i === scope.hourpicker.editMode) {\r
-                        continue;\r
-                    }\r
-\r
-                    for (var j = 0; j < selectedDays.length; j++) {\r
-                        existingStartTime = getTime(scope.hourpickerValues[i].startTime, scope.hourpickerValues[i].startMeridiem);\r
-                        existingEndTime = getTime(scope.hourpickerValues[i].endTime, scope.hourpickerValues[i].endMeridiem);\r
-                        if (scope.hourpickerValues[i].days[selectedDays[j]].value) {\r
-                            if(!scope.hourpicker.sameDayOption){\r
-                                scope.setValidity('dayAlreadySelected', false);\r
-                                return true;\r
-                            } else if ((currentStartTime > existingStartTime && currentStartTime < existingEndTime) || (currentEndTime > existingStartTime && currentEndTime < existingEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            } else if ((existingStartTime > currentStartTime && existingStartTime < currentEndTime) || (existingEndTime > currentStartTime && existingEndTime < currentEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            } else if ((currentStartTime === existingStartTime) && (currentEndTime === existingEndTime)) {\r
-                                scope.setValidity('invalidHourpickerTimeRange', false);\r
-                                return true;\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-\r
-                scope.setValidity('dayAlreadySelected', true);\r
-                scope.setValidity('invalidHourpickerTimeRange', true);\r
-                return false;\r
-            };\r
-            var getTime = function (timeString, meridiem) {\r
-                var tempDate = new Date();\r
-                if (timeString && meridiem) {\r
-                    var timeSplit = timeString.split(':');\r
-                    var hour = ((meridiem === 'PM' || meridiem === 'pm') && timeSplit[0] !== '12') ? parseInt(timeSplit[0], 10) + 12 : parseInt(timeSplit[0], 10);\r
-                    tempDate.setHours(hour, parseInt(timeSplit[1], 10), 0, 0);\r
-                }\r
-\r
-                return tempDate.getTime();\r
-            };\r
-        }\r
-    }\r
-}])\r
-\r
-.directive('b2bHourpickerValue', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: false,\r
-        templateUrl: 'b2bTemplate/hourPicker/b2bHourpickerValue.html',\r
-        controller: ['$scope', function (scope) {\r
-\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.hourpickerValue = {};\r
-            scope.hourpickerValue.startTime = attr.startTime ? scope.$eval(attr.startTime) : '';\r
-            scope.hourpickerValue.startMeridiem = attr.startMeridiem ? scope.$eval(attr.startMeridiem) : '';\r
-            scope.hourpickerValue.endTime = attr.endTime ? scope.$eval(attr.endTime) : '';\r
-            scope.hourpickerValue.endMeridiem = attr.endMeridiem ? scope.$eval(attr.endMeridiem) : '';\r
-            scope.hourpickerValue.days = attr.days ? scope.$eval(attr.days).join(', ') : '';\r
-            scope.hourpickerValue.index = attr.b2bHourpickerValue ? scope.$eval(attr.b2bHourpickerValue) : -1;\r
-        }\r
-    }\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Template.att:inputTemplate\r
- *\r
- * @description\r
- *  <file src="src/inputTemplate/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <input type="text" id="fieldId" placeholder="placholder text here" class="span12 input-enhanced" name="fieldName">\r
- *\r
- * @example\r
- <section id="code">\r
-    <b>HTML + AngularJS</b>\r
-    <example module="b2b.att">\r
-        <file src="src/inputTemplate/docs/demo.html" />\r
-        <file src="src/inputTemplate/docs/demo.js" />\r
-    </example>\r
- </section>\r
- */\r
-angular.module('b2b.att.inputTemplate', []);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:leftNavigation\r
- *\r
- * @description\r
- *  <file src="src/leftNavigation/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <b2b-left-navigation data-menu="menuData"></b2b-left-navigation> \r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/leftNavigation/docs/demo.html" />\r
-            <file src="src/leftNavigation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.leftNavigation', [])\r
-    .directive('b2bLeftNavigation', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            templateUrl: 'b2bTemplate/leftNavigation/leftNavigation.html',\r
-            scope: {\r
-                menuData: '='\r
-            },\r
-            link: function (scope, element, attrs, ctrl) {\r
-                scope.idx = -1;\r
-                scope.itemIdx = -1;\r
-                scope.navIdx = -1;\r
-                scope.toggleNav = function (val,link) {\r
-                    if (val === scope.idx) {\r
-                        scope.idx = -1;\r
-                        return;\r
-                    }\r
-                    scope.idx = val;\r
-                };\r
-                /*New function for ECOMP sdk*/\r
-                scope.toggleDrawer = function(showmenu){\r
-                       scope.idx=-1; /*hide the sunmenus*/\r
-                       /*if(showmenu){\r
-                               //scope.openList.length=0;\r
-                               document.getElementById('page-content').style.marginLeft = "50px";\r
-                       }\r
-                       else\r
-                               document.getElementById('page-content').style.marginLeft = "250px";   */                \r
-                };\r
-                scope.liveLink = function (evt, val1, val2) {\r
-                    scope.itemIdx = val1;\r
-                    scope.navIdx = val2;\r
-                    evt.stopPropagation();\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:links\r
- *\r
- * @description\r
- *  <file src="src/links/docs/readme.md" />\r
- * @usage\r
- *      <!-- See below examples for link implementation -->\r
- *      \r
- * @example\r
-       <section id="code">              \r
-           <b>HTML + AngularJS</b>\r
-           <example module="b2b.att">\r
-           <file src="src/links/docs/demo.html" />\r
-            <file src="src/links/docs/demo.js" />            \r
-          </example>          \r
-        </section>\r
- */\r
-angular.module('b2b.att.links', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Misc.att:listbox\r
- *\r
- * @description\r
- *  <file src="src/listbox/docs/readme.md" />\r
- *\r
- * @param {int} currentIndex - Current index of selected listbox item. Is not supported on multiselect listbox\r
- * @param {Array} listboxData - Data of listbox items. Should include full data regardless if HTML will be filtered.\r
-\r
- * @example\r
- *  <section id="code">   \r
-     <example module="b2b.att">\r
-     <file src="src/listbox/docs/demo.html" />\r
-     <file src="src/listbox/docs/demo.js" />\r
-     </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.listbox', ['b2b.att.utilities'])\r
-.directive('b2bListBox', ['keymap', 'b2bDOMHelper', '$rootScope', function(keymap, b2bDOMHelper, $rootScope) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    transclude: true,\r
-                    replace: true,\r
-                    scope: {\r
-                        currentIndex: '=', \r
-                        listboxData: '='\r
-                    },\r
-                    templateUrl: 'b2bTemplate/listbox/listbox.html',\r
-                    link: function(scope, elem, attr) {\r
-\r
-                        if (attr.ariaMultiselectable !== undefined || attr.ariaMultiselectable === 'true') {\r
-                            scope.multiselectable = true;\r
-                        } else {\r
-                            scope.multiselectable = false;\r
-                        }\r
-\r
-                        var shiftKey = false;\r
-                        var elements = [];\r
-                        var prevDirection = undefined; // previous direction is used for an edge case when shifting\r
-                        var shiftKeyPressed = false; // Used to handle shift clicking\r
-                        var ctrlKeyPressed = false;\r
-\r
-                        var currentIndexSet = {\r
-                            'elementIndex': 0,\r
-                            'listboxDataIndex': 0\r
-                        };\r
-\r
-                        /*scope.$watch('currentIndex', function(oldVal, newVal) {\r
-                            if (angular.equals(oldVal, newVal)) return;\r
-                            if (!scope.multiselectable) {\r
-                                // This doesn't garuntee anything. index will update on focus based on rules\r
-                                currentIndexSet.listboxDataIndex = scope.currentIndex;\r
-                                // Should this occur? \r
-                                //scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-\r
-                                // Update elementIndex\r
-                                elements = elem.children();\r
-                                var indecies = Array.prototype.map.call(elements, function(item) {\r
-                                    return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                }).filter(function(item) {\r
-                                    return item === scope.currentIndex;\r
-                                });\r
-                                currentIndex.elementIndex = indecies[0];\r
-                                //focusOnElement(currentIndexSet.elementIndex); // This isn't shifting focus\r
-                                if (!scope.$$phase) {\r
-                                    scope.$apply();\r
-                                }\r
-                            }\r
-                        });*/\r
-\r
-                        function isTrue(item) {\r
-                            if (item.selected === true) {\r
-                                return true;\r
-                            }\r
-                        }\r
-\r
-                        function incrementIndex(elem) {\r
-                            $rootScope.$apply();\r
-\r
-                            var nextElem = elem.next();\r
-                            if (!angular.isDefined(nextElem) || nextElem.length === 0) {\r
-                                return;\r
-                            }\r
-\r
-                            currentIndexSet.elementIndex += 1;\r
-                            currentIndexSet.listboxDataIndex = parseInt(nextElem.attr('data-index'), 10);\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (currentIndexSet.elementIndex >= elements.length - 1) {\r
-                                currentIndexSet.elementIndex = elements.length-1;\r
-                            }\r
-                        }\r
-\r
-                        function decrementIndex(elem) {\r
-                            $rootScope.$apply();\r
-                            var prevElem = angular.element(b2bDOMHelper.previousElement(elem));\r
-                            if (!angular.isDefined(prevElem) || prevElem.length === 0) {\r
-                                return;\r
-                            }\r
-\r
-                            currentIndexSet.elementIndex -= 1;\r
-                            currentIndexSet.listboxDataIndex = parseInt(prevElem.attr('data-index'), 10);\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (currentIndexSet.elementIndex <= 0) {\r
-                                currentIndexSet.elementIndex = 0;\r
-                            }\r
-                        }\r
-\r
-                        var focusOnElement = function(index) {\r
-                            try {\r
-                                elements[index].focus();\r
-                            } catch (e) {};\r
-                        }\r
-\r
-                        function selectItems(startIndex, endIndex, forceValue) {\r
-                            for (var i = startIndex; i < endIndex; i++) {\r
-                                if (forceValue === undefined) {\r
-                                    // We will flip the value\r
-                                    scope.listboxData[i].selected = !scope.listboxData[i].selected;\r
-                                } else {\r
-                                    scope.listboxData[i].selected = forceValue;\r
-                                }\r
-                            }\r
-\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                        }\r
-\r
-                        elem.bind('focus', function(evt) { \r
-                            // If multiselectable or not and nothing is selected, put focus on first element \r
-                            // If multiselectable and a range is set, put focus on first element of range \r
-                            // If not multiselectable and something selected, put focus on element \r
-                            elements = elem.children(); \r
-                             var selectedItems = scope.listboxData.filter(isTrue); \r
-                             var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                return parseInt(angular.element(item).attr('data-index'), 10);\r
-                            });\r
\r
-                            if (selectedItems.length == 0) { \r
-                                focusOnElement(0); \r
-                                currentIndexSet.listboxDataIndex = 0;\r
-                            } else if (attr.ariaMultiselectable) { \r
-                                var index = scope.listboxData.indexOf(selectedItems[0]); \r
-                                var indies = elementsIndies.filter(function(item) {\r
-                                    return (item === index);\r
-                                });\r
-\r
-                                if (indies.length === 0 || indies[0] != index) {\r
-                                    // Set focused on 0\r
-                                    currentIndexSet.elementIndex = elementsIndies[0]; \r
-                                    currentIndexSet.listboxDataIndex = 0;\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                } else {\r
-                                    focusOnElement(indies[0]); \r
-                                    currentIndexSet.elementIndex = indies[0];\r
-                                    currentIndexSet.listboxDataIndex = index;\r
-                                }\r
-                            } else { \r
-                                focusOnElement(currentIndexSet.elementIndex);  \r
-                            }\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                        });\r
-                        elem.bind('keyup', function(evt) {\r
-                            if (evt.keyCode === keymap.KEY.SHIFT) {\r
-                                shiftKeyPressed = false;\r
-                            } else if (evt.keyCode === keymap.KEY.CTRL) {\r
-                                ctrlKeyPressed = false;\r
-                            }\r
-                        });\r
-        \r
-                        elem.bind('keydown', function(evt) {\r
-                            var keyCode = evt.keyCode;\r
-                            elements = elem.children();\r
-                            if (keyCode === keymap.KEY.SHIFT) {\r
-                                shiftKeyPressed = true;\r
-                            } else if (evt.keyCode === keymap.KEY.CTRL) {\r
-                                ctrlKeyPressed = true;\r
-                            }\r
-\r
-                            switch(keyCode) {\r
-                                case 65: // A key\r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey) {\r
-                                        var arr = scope.listboxData.filter(isTrue);\r
-                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                            return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                        });\r
-                                        var val = !(arr.length === scope.listboxData.length);\r
-                                        for (var i = 0; i < elementsIndies.length; i++) {\r
-                                            scope.listboxData[elementsIndies[i]].selected = val;\r
-                                        }\r
-\r
-                                        if (!scope.$$phase) {\r
-                                            scope.$apply();\r
-                                        }\r
-                                        \r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.END:\r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {\r
-                                        var elementsIndies = Array.prototype.map.call(elements, function(item) {\r
-                                            return parseInt(angular.element(item).attr('data-index'), 10);\r
-                                        }).filter(function(item) {\r
-                                            return (item >= currentIndexSet.listboxDataIndex);\r
-                                        });\r
-                                        for (var i = 0; i < elementsIndies.length; i++) {\r
-                                            scope.listboxData[elementsIndies[i]].selected = true;\r
-                                        }\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-\r
-                                        if (!scope.$$phase) {\r
-                                            scope.$apply();\r
-                                        }\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.HOME: \r
-                                {\r
-                                    if (scope.multiselectable && evt.ctrlKey && evt.shiftKey) {\r
-                                        selectItems(0, currentIndexSet.listboxDataIndex+1, true); // currentIndex+1 is what is being focused on\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                    }\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.LEFT:\r
-                                case keymap.KEY.UP:\r
-                                {\r
-                                    if (currentIndexSet.listboxDataIndex === 0) {\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                        return;\r
-                                    }\r
-\r
-                                    decrementIndex(elements.eq(currentIndexSet.elementIndex));\r
-                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {\r
-                                        if (evt.shiftKey) {\r
-                                            if (prevDirection === 'DOWN') {\r
-                                                scope.listboxData[currentIndexSet.listboxDataIndex+1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex+1].selected;\r
-                                            }\r
-                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;\r
-                                        }\r
-                                        prevDirection = 'UP';\r
-                                    } else {\r
-                                        // If no modifier keys are selected, all other items need to be unselected.\r
-                                        prevDirection = undefined;\r
-                                        selectItems(0, scope.listboxData.length, false);\r
-                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-                                    }\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                    if(!scope.$$phase) {\r
-                                        scope.$apply();\r
-                                    }\r
-                                    evt.preventDefault();\r
-                                    evt.stopPropagation();\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.RIGHT:\r
-                                case keymap.KEY.DOWN:\r
-                                {\r
-                                    if (currentIndexSet.listboxDataIndex === scope.listboxData.length-1) {\r
-                                        evt.preventDefault();\r
-                                        evt.stopPropagation();\r
-                                        return;\r
-                                    }\r
-\r
-                                    incrementIndex(elements.eq(currentIndexSet.elementIndex));\r
-                                    \r
-                                    if (scope.multiselectable && (evt.shiftKey || evt.ctrlKey)) {\r
-                                        if (evt.shiftKey) {\r
-                                            if (prevDirection === 'UP') {\r
-                                                scope.listboxData[currentIndexSet.listboxDataIndex-1].selected = !scope.listboxData[currentIndexSet.listboxDataIndex-1].selected;\r
-                                            }\r
-                                            \r
-                                            scope.listboxData[currentIndexSet.listboxDataIndex].selected = !scope.listboxData[currentIndexSet.listboxDataIndex].selected;    \r
-                                        }\r
-                                        prevDirection = 'DOWN';\r
-                                    } else {\r
-                                        // If no modifier keys are selected, all other items need to be unselected.\r
-                                        prevDirection = undefined;\r
-                                        selectItems(0, scope.listboxData.length, false);\r
-                                        scope.listboxData[currentIndexSet.listboxDataIndex].selected = true;\r
-                                    }\r
-\r
-                                    focusOnElement(currentIndexSet.elementIndex);\r
-                                    if(!scope.$$phase) {\r
-                                        scope.$apply();\r
-                                    }\r
-                                    evt.preventDefault();\r
-                                    evt.stopPropagation();\r
-                                    break;\r
-                                }\r
-                                case keymap.KEY.TAB:\r
-                                    if(evt.shiftKey) {\r
-                                        var previousElement = b2bDOMHelper.previousElement(elem.parent().parent(), true);\r
-                                        evt.preventDefault();\r
-                                        previousElement.focus();\r
-                                    }\r
-                                    break;\r
-                                default:\r
-                                    break;\r
-                            }\r
-                        });\r
-\r
-                        elem.bind('click', function(evt) {\r
-                            var index = parseInt(evt.target.dataset.index, 10);\r
-                            if (index === undefined || isNaN(index)) {\r
-                                return;\r
-                            }\r
-                            if (scope.multiselectable && currentIndexSet.listboxDataIndex !== undefined) {\r
-                                if (shiftKeyPressed) {\r
-                                    var min = Math.min(index, currentIndexSet.listboxDataIndex);\r
-                                    var max = Math.max(index, currentIndexSet.listboxDataIndex);\r
-\r
-                                    if (index === min) { // clicking up\r
-                                        var firstIndex = scope.listboxData.findIndex(function(item) { return item.selected === true;});\r
-                                        // Given the firstIndex, let's find the matching element to get proper element match\r
-                                        elements = elem.children();\r
-                                        elements.eq(firstIndex)\r
-                                        var elementsThatMatch = Array.prototype.filter.call(elements, function(item) {\r
-                                            if (parseInt(angular.element(item).attr('data-index'), 10) === firstIndex) {\r
-                                                return true;\r
-                                            }\r
-                                        });\r
-                                        firstIndex = parseInt(angular.element(elementsThatMatch).attr('data-index'), 10);\r
-                                        \r
-                                        if (index <= firstIndex && scope.listboxData.filter(isTrue).length > 1) {\r
-                                            // Break the selection into 2\r
-                                            selectItems(firstIndex + 1, max + 1, undefined); // + 1 needed because selectItems only selects up to MAX\r
-                                            selectItems(min, firstIndex, undefined); \r
-                                        } else if (scope.listboxData.filter(isTrue).length == 1){\r
-                                            selectItems(min, max, undefined); \r
-                                        } else {\r
-                                            selectItems(min + 1, max + 1, undefined);\r
-                                        }\r
-                                    } else { // clicking down\r
-                                        selectItems(min + 1, max + 1, scope.listboxData[min].selected);\r
-                                    }\r
-                                } else if (ctrlKeyPressed) {\r
-                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                                } else {\r
-                                    selectItems(0, scope.listboxData.length, false);\r
-                                    scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                                }\r
-                            } else {\r
-                                selectItems(0, scope.listboxData.length, false);\r
-                                scope.listboxData[index].selected = !scope.listboxData[index].selected;\r
-                            }\r
-                            currentIndexSet.elementIndex = index;\r
-                            currentIndexSet.listboxDataIndex = index;\r
-                            scope.currentIndex = currentIndexSet.listboxDataIndex;\r
-                            if (!scope.$$phase) {\r
-                                scope.$apply();\r
-                            }\r
-                            focusOnElement(index);\r
-                        });\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Videos, audio & animation.att:loaderAnimation\r
- *\r
- * @description\r
- *  <file src="src/loaderAnimation/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <!-- Below demo js shows-->\r
- *   Angular library uses Global.css's icon-primary-spinner.\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/loaderAnimation/docs/demo.html" />\r
-            <file src="src/loaderAnimation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.loaderAnimation', [])\r
-    .constant('b2bSpinnerConfig', {\r
-        loadingText: 'Loading...',\r
-        startEvent: 'startButtonSpinner',\r
-        stopEvent: 'stopButtonSpinner'\r
-    })\r
-    .constant("progressTrackerConfig", {\r
-        loadingText: 'Loading...',\r
-        minDuration: "",\r
-        activationDelay: "",\r
-        minDurationPromise: "",\r
-        activationDelayPromise: ""\r
-    })\r
-\r
-.provider('progressTracker', function () {\r
-    this.$get = ['$q', '$timeout', function ($q, $timeout) {\r
-        function cancelTimeout(promise) {\r
-            if (promise) {\r
-                $timeout.cancel(promise);\r
-            }\r
-        }\r
-        return function ProgressTracker(options) {\r
-            //do new if user doesn't\r
-            if (!(this instanceof ProgressTracker)) {\r
-                return new ProgressTracker(options);\r
-            }\r
-\r
-            options = options || {};\r
-            //Array of promises being tracked\r
-            var tracked = [];\r
-            var self = this;\r
-            //Allow an optional "minimum duration" that the tracker has to stay active for.\r
-            var minDuration = options.minDuration;\r
-            //Allow a delay that will stop the tracker from activating until that time is reached\r
-            var activationDelay = options.activationDelay;\r
-            var minDurationPromise;\r
-            var activationDelayPromise;\r
-            self.active = function () {\r
-                //Even if we have a promise in our tracker, we aren't active until delay is elapsed\r
-                if (activationDelayPromise) {\r
-                    return false;\r
-                }\r
-                return tracked.length > 0;\r
-            };\r
-            self.tracking = function () {\r
-                //Even if we aren't active, we could still have a promise in our tracker\r
-                return tracked.length > 0;\r
-            };\r
-            self.destroy = self.cancel = function () {\r
-                minDurationPromise = cancelTimeout(minDurationPromise);\r
-                activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                for (var i = tracked.length - 1; i >= 0; i--) {\r
-                    tracked[i].resolve();\r
-                }\r
-                tracked.length = 0;\r
-            };\r
-            //Create a promise that will make our tracker active until it is resolved.\r
-            // @return deferred - our deferred object that is being tracked\r
-            self.createPromise = function () {\r
-                var deferred = $q.defer();\r
-                tracked.push(deferred);\r
-                //If the tracker was just inactive and this the first in the list of promises, we reset our delay and minDuration again.\r
-                if (tracked.length === 1) {\r
-                    if (activationDelay) {\r
-                        activationDelayPromise = $timeout(function () {\r
-                            activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                            startMinDuration();\r
-                        }, activationDelay);\r
-                    } else {\r
-                        startMinDuration();\r
-                    }\r
-                }\r
-                deferred.promise.then(onDone(false), onDone(true));\r
-                return deferred;\r
-\r
-                function startMinDuration() {\r
-                    if (minDuration) {\r
-                        minDurationPromise = $timeout(angular.noop, minDuration);\r
-                    }\r
-                }\r
-                //Create a callback for when this promise is done. It will remove our tracked promise from the array if once minDuration is complete\r
-                function onDone() {\r
-                    return function () {\r
-                        (minDurationPromise || $q.when()).then(function () {\r
-                            var index = tracked.indexOf(deferred);\r
-                            tracked.splice(index, 1);\r
-                            //If this is the last promise, cleanup the timeouts for activationDelay\r
-                            if (tracked.length === 0) {\r
-                                activationDelayPromise = cancelTimeout(activationDelayPromise);\r
-                            }\r
-                        });\r
-                    };\r
-                }\r
-            };\r
-            self.addPromise = function (promise) {\r
-                \r
-//                we cannot assign then function in other var and then add the resolve and reject \r
-                var thenFxn = promise && (promise.then || promise.$then || (promise.$promise && promise.$promise.then));                \r
-                if (!thenFxn) {\r
-                    throw new Error("progressTracker expects a promise object :: Not found");\r
-                }\r
-                var deferred = self.createPromise();\r
-                //When given promise is done, resolve our created promise\r
-                //Allow $then for angular-resource objects\r
-\r
-                promise.then(function (value) {\r
-                        deferred.resolve(value);\r
-                        return value;\r
-                    }, function (value) {\r
-                        deferred.reject(value);\r
-                        return $q.reject(value);\r
-                    }\r
-                );\r
-                return deferred;\r
-            };\r
-        };\r
-    }];\r
-})\r
-\r
-.config(['$httpProvider', function ($httpProvider) {\r
-    $httpProvider.interceptors.push(['$q', 'progressTracker', function ($q) {\r
-        return {\r
-            request: function (config) {\r
-                if (config.tracker) {\r
-                    if (!angular.isArray(config.tracker)) {\r
-                        config.tracker = [config.tracker];\r
-                    }\r
-                    config.$promiseTrackerDeferred = config.$promiseTrackerDeferred || [];\r
-\r
-                    angular.forEach(config.tracker, function (tracker) {\r
-                        var deferred = tracker.createPromise();\r
-                        config.$promiseTrackerDeferred.push(deferred);\r
-                    });\r
-                }\r
-                return $q.when(config);\r
-            },\r
-            response: function (response) {\r
-                if (response.config && response.config.$promiseTrackerDeferred) {\r
-                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {\r
-                        deferred.resolve(response);\r
-                    });\r
-                }\r
-                return $q.when(response);\r
-            },\r
-            responseError: function (response) {\r
-                if (response.config && response.config.$promiseTrackerDeferred) {\r
-                    angular.forEach(response.config.$promiseTrackerDeferred, function (deferred) {\r
-                        deferred.reject(response);\r
-                    });\r
-                }\r
-                return $q.reject(response);\r
-            }\r
-        };\r
-    }]);\r
-}])\r
-\r
-.directive('b2bClickSpin', ['$timeout', '$parse', '$rootScope', 'progressTracker', function ($timeout, $parse, $rootScope, progressTracker) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elm, attrs) {\r
-            var fn = $parse(attrs.b2bClickSpin);\r
-            elm.on('click', function (event) {\r
-                var promise = $timeout(function () {console.log("inside Promise")}, 5000);\r
-                scope.$apply(function () {\r
-                    fn(scope, {\r
-                        $event: event\r
-                    });\r
-                });\r
-                //comment this line if not running unit test\r
-                $rootScope.loadingTracker = progressTracker({\r
-                    minDuration: 750\r
-                });\r
-                $rootScope.loadingTracker.addPromise(promise);\r
-                angular.forEach("$routeChangeSuccess $viewContentLoaded $locationChangeSuccess".split(" "), function (event) {\r
-                    $rootScope.$on(event, function () {\r
-\r
-                        $timeout.cancel(promise);\r
-                    });\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bProgressTracker', ['progressTrackerConfig', function (ptc) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        template: '<div><div ng-show="loadingTracker.active()" style="width:100%; text-align:center"><i class=\"icon-primary-spinner\"></i></div><div ng-show="loadingTracker.active()" style="width:100%;margin-top:10px; text-align:center">'+ ptc.loadingText+'</div></div>'\r
-    };\r
-}])\r
-\r
-.directive('b2bLoadButton', ['b2bSpinnerConfig', '$timeout', function (spinnerConfig, $timeout) {\r
-    var spinButton = function (state, element, data) {\r
-        \r
-        var attr = element.html() ? 'html' : 'val';\r
-        state = state + 'Text';\r
-        if (state === 'loadingText') {\r
-            element[attr](data[state]);\r
-            element.attr("disabled",'disabled');\r
-            element.addClass('disabled');\r
-        } else if (state === 'resetText') {\r
-            element[attr](data[state]);\r
-            element.removeAttr("disabled");\r
-            element.removeClass('disabled');\r
-        }\r
-    };\r
-\r
-    return {\r
-        restrict: 'A',\r
-        replace: false,\r
-        scope: {\r
-            promise: '=promise',\r
-            startEvent: '@startEvent',\r
-            stopEvent: '@stopEvent'\r
-        },\r
-        link: function (scope, element, attr) {\r
-            var validAttr = element.html() ? 'html' : 'val';\r
-            var data = {\r
-                loadingText: '',\r
-                resetText: ''\r
-            };\r
-\r
-            var updateLoadingText = function (val) {\r
-                var loadingText = val;\r
-                if (!angular.isDefined(loadingText) || loadingText === "") {\r
-                    loadingText = spinnerConfig.loadingText;\r
-                }\r
-                data.loadingText = validAttr === 'html' ? "<i class=\"icon-primary-spinner small\"></i>" + loadingText : loadingText;\r
-            };\r
-            var updateResetText = function (val) {\r
-                data.resetText = val;\r
-            };\r
-\r
-            attr.$observe('b2bLoadButton', function (val) {\r
-                updateLoadingText(val);\r
-            });\r
-            $timeout(function () {\r
-                updateResetText(element[validAttr]());\r
-            }, 500);\r
-\r
-            if (!angular.isDefined(scope.startEvent) || scope.startEvent === "") {\r
-                scope.startEvent = spinnerConfig.startEvent;\r
-            }\r
-\r
-            if (!angular.isDefined(scope.stopEvent) || scope.stopEvent === "") {\r
-                scope.stopEvent = spinnerConfig.stopEvent;\r
-            }\r
-\r
-            scope.$watch('promise', function () {\r
-                if (angular.isDefined(scope.promise) && angular.isFunction(scope.promise.then)) {\r
-                    spinButton('loading', element, data);\r
-                    scope.promise.then(function () {\r
-                        spinButton('reset', element, data);\r
-                    }, function () {\r
-                        spinButton('reset', element, data);\r
-                    });\r
-                }\r
-            });\r
-\r
-            scope.$on(scope.startEvent, function () {\r
-                spinButton('loading', element, data);\r
-                scope.$on(scope.stopEvent, function () {\r
-                    spinButton('reset', element, data);\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-;\r
- /**\r
- * @ngdoc directive\r
- * @name Misc.att:messageWrapper\r
- * @scope\r
- * @param {boolean} trigger - A boolean that triggers directive to switch focus\r
- * @param {integer} delay  - Extra delay added to trigger code to allow for DOM to be ready. Default is 10ms.\r
- * @param {string} noFocus - Attribute-based API to trigger whether first focusable element receives focus on trigger or whole message (assumes tabindex="-1" set on first child)\r
- * @param {string} trapFocus - Attribute-based API to trap focus within the message. This should be enabled by default on all toast messages.\r
- * @description\r
- *  <file src="src/messageWrapper/docs/readme.md" />\r
- * @usage\r
- * <b2b-message-wrapper>Code that contains at least one focusable element and will be shown/hidden on some logic. This must have tabindex="-1".</b2b-message-wrapper>\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <b>HTML + AngularJS</b>\r
- <example module="b2b.att">\r
- <file src="src/messageWrapper/docs/demo.html" />\r
- <file src="src/messageWrapper/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-angular.module('b2b.att.messageWrapper', ['b2b.att.utilities'])\r
-.directive('b2bMessageWrapper', ['b2bDOMHelper', '$compile', '$timeout', '$log', function(b2bDOMHelper, $compile, $timeout, $log) {\r
-  return {\r
-    restrict: 'AE',\r
-    scope: {\r
-      trigger: '=',\r
-      delay: '=?'\r
-    },\r
-    transclude: true,\r
-    replace: true,\r
-    template: '<div ng-transclude></div>',\r
-    link: function(scope, elem, attrs) {\r
-      scope.delay = scope.delay || 10;\r
-\r
-      if (attrs.trapFocus != undefined && !elem.children().eq(0).attr('b2b-trap-focus-inside-element')) {\r
-        // Append b2bTrapFocusInsideElement onto first child and recompile\r
-        elem.children().eq(0).attr('b2b-trap-focus-inside-element', 'false');\r
-        elem.children().eq(0).attr('trigger', scope.trigger);\r
-        $compile(elem.contents())(scope);\r
-      }\r
-\r
-      var firstElement = undefined,\r
-          launchingElement = undefined;\r
-      \r
-      scope.$watch('trigger', function(oldVal, newVal) {\r
-        if (oldVal === newVal) return;\r
-        if (!angular.isDefined(launchingElement)) {\r
-          launchingElement = document.activeElement;\r
-        }\r
-        $timeout(function() {\r
-          if (scope.trigger) {\r
-\r
-            if (attrs.noFocus === true || attrs.noFocus === "") {\r
-              elem.children()[0].focus();\r
-            } else {\r
-              firstElement = b2bDOMHelper.firstTabableElement(elem);\r
-\r
-              if (angular.isDefined(firstElement)) {\r
-                firstElement.focus();\r
-              }\r
-            }\r
-            \r
-          } else {\r
-            if (angular.isDefined(launchingElement) && launchingElement.nodeName !== 'BODY') {\r
-              if (launchingElement === document.activeElement) {\r
-                return;\r
-              }\r
-\r
-              if (b2bDOMHelper.isInDOM(launchingElement) && b2bDOMHelper.isTabable(launchingElement)) {\r
-                  // At this point, launchingElement is still a valid element, but focus will fail and \r
-                  // activeElement will become body, hence we want to apply custom logic and find previousElement\r
-                  var prevLaunchingElement = launchingElement;\r
-                  launchingElement.focus();\r
-\r
-                  if (document.activeElement !== launchingElement || document.activeElement.nodeName === 'BODY') {\r
-                    launchingElement = b2bDOMHelper.previousElement(angular.element(prevLaunchingElement), true);\r
-                    launchingElement.focus();\r
-                  }\r
-              } else {\r
-                launchingElement = b2bDOMHelper.previousElement(launchingElement, true);\r
-                launchingElement.focus();\r
-              }\r
-            }\r
-          }\r
-        }, scope.delay); \r
-      });\r
-    }\r
-  };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:modalsAndAlerts\r
- *\r
- * @description\r
- *  <file src="src/modalsAndAlerts/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <button class="btn" b2b-modal="b2bTemplate/modalsAndAlerts/demo_modal.html" modal-ok="ok()" modal-cancel="cancel()">Launch demo modal</button>\r
- *\r
- * @example\r
- *  <section id="code">\r
-     <example module="b2b.att">\r
-      <file src="src/modalsAndAlerts/docs/demo.html" />\r
-      <file src="src/modalsAndAlerts/docs/demo.js" />\r
-     </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.modalsAndAlerts', ['b2b.att.position', 'b2b.att.transition', 'b2b.att.utilities'])\r
-\r
-/**\r
- * A helper, internal data structure that acts as a map but also allows getting / removing\r
- * elements in the LIFO order\r
- */\r
-.factory('$$stackedMap', function () {\r
-    return {\r
-        createNew: function () {\r
-            var stack = [];\r
-\r
-            return {\r
-                add: function (key, value) {\r
-                    stack.push({\r
-                        key: key,\r
-                        value: value\r
-                    });\r
-                },\r
-                get: function (key) {\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        if (key === stack[i].key) {\r
-                            return stack[i];\r
-                        }\r
-                    }\r
-                },\r
-                keys: function () {\r
-                    var keys = [];\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        keys.push(stack[i].key);\r
-                    }\r
-                    return keys;\r
-                },\r
-                top: function () {\r
-                    return stack[stack.length - 1];\r
-                },\r
-                remove: function (key) {\r
-                    var idx = -1;\r
-                    for (var i = 0; i < stack.length; i++) {\r
-                        if (key === stack[i].key) {\r
-                            idx = i;\r
-                            break;\r
-                        }\r
-                    }\r
-                    return stack.splice(idx, 1)[0];\r
-                },\r
-                removeTop: function () {\r
-                    return stack.splice(stack.length - 1, 1)[0];\r
-                },\r
-                length: function () {\r
-                    return stack.length;\r
-                }\r
-            };\r
-        }\r
-    };\r
-}).factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var firstTabableElement, lastTabableElement;\r
-\r
-    var trapKeyboardFocusInFirstElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-            lastTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-\r
-    };\r
-\r
-    var trapKeyboardFocusInLastElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-            firstTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-    };\r
-    \r
-    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element) {\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        }else {\r
-            if (angular.isDefined(stackHead)) {\r
-                trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                trapFocusInElement(true);\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-/**\r
- * A helper directive for the $modal service. It creates a backdrop element.\r
- */\r
-.directive('b2bModalBackdrop', ['$modalStack', '$timeout', function ($modalStack, $timeout) {\r
-    return {\r
-        restrict: 'EA',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-backdrop.html',\r
-        link: function (scope, element, attrs) {\r
-            scope.close = function (evt) {\r
-                var modal = $modalStack.getTop();\r
-                if (modal && modal.value.backdrop && modal.value.backdrop !== 'static') {\r
-                    evt.preventDefault();\r
-                    evt.stopPropagation();\r
-                    $modalStack.dismiss(modal.key, 'backdrop click');\r
-                }\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalWindow', ['$timeout', 'windowOrientation', '$window', function ($timeout, windowOrientation, $window) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: 'b2bTemplate/modalsAndAlerts/b2b-window.html',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {\r
-            scope.windowClass = attrs.windowClass || '';\r
-            scope.sizeClass = attrs.sizeClass || '';\r
-            scope.isNotifDialog = false;\r
-\r
-            this.setTitle = function (title) {\r
-                scope.title = title;\r
-            };\r
-            this.setContent = function (content) {\r
-                scope.content = content;\r
-                scope.isNotifDialog = true;\r
-            };\r
-            this.isDockedModal = scope.windowClass.indexOf('modal-docked') > -1;\r
-        }],\r
-        link: function (scope, element, attrs, ctrl) {\r
-            if (ctrl.isDockedModal) {\r
-                scope.isModalLandscape = false;\r
-\r
-                var window = angular.element($window);\r
-                scope.updateCss = function () {\r
-                    if (windowOrientation.isPotrait()) { // Potrait Mode\r
-                        scope.isModalLandscape = false;\r
-                    } else if (windowOrientation.isLandscape()) { // Landscape Mode\r
-                        scope.isModalLandscape = true;\r
-                    }\r
-                };\r
-\r
-                $timeout(function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                }, 100);\r
-                window.bind('orientationchange', function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                });\r
-                window.bind('resize', function () {\r
-                    scope.updateCss();\r
-                    scope.$apply();\r
-                });\r
-            }else {\r
-                angular.element(element[0].querySelectorAll(".awd-select-list")).css({\r
-                    "max-height": "200px"\r
-                });\r
-            }\r
-\r
-            var isIE = /msie|trident/i.test(navigator.userAgent);\r
-            if (isIE) {\r
-                if(angular.element(element[0].querySelector('.corner-button button.close')).length > 0){\r
-                    angular.element(element[0].querySelector('.corner-button button.close')).bind('focus', function () {\r
-                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollLeft = 0;\r
-                       angular.element(element[0].querySelector('.b2b-modal-header'))[0].scrollTop = 0;\r
-                    });\r
-                }\r
-            }\r
-            \r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalTitle', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.setTitle(attr.id);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalContent', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.setContent(attr.id);\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-.directive('b2bModalBody', ['$timeout', '$position', '$document', '$window', 'windowOrientation', 'b2bAwdBreakpoints', function ($timeout, $position, $document, $window, windowOrientation, b2bAwdBreakpoints) {\r
-    return {\r
-        restrict: 'AC',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        require: '^b2bModalWindow',\r
-        link: function (scope, element, attrs, ctrl) {\r
-            var window = angular.element($window);\r
-            var body = $document.find('body').eq(0);\r
-            scope.setModalHeight = function () {\r
-                var modalHeaderHeight, modalFooterHeight, modalBodyHeight, windowHeight, windowWidth, modalHeight;\r
-                modalHeaderHeight = 0;\r
-                modalFooterHeight = 0;\r
-                windowHeight = $window.innerHeight;\r
-                windowWidth = $window.innerWidth;\r
-                body.css({\r
-                    'height': windowHeight + 'px'\r
-                });\r
-\r
-                if (ctrl.isDockedModal) {\r
-                    var modalElements = element.parent().children();\r
-                    for (var i = 0; i < modalElements.length; i++) {\r
-                        if (modalElements.eq(i).hasClass('b2b-modal-header')) {\r
-                            modalHeaderHeight = $position.position(modalElements.eq(i)).height;\r
-                        } else if (modalElements.eq(i).hasClass('b2b-modal-footer')) {\r
-                            modalFooterHeight = $position.position(modalElements.eq(i)).height;\r
-                        }\r
-                    }\r
-\r
-                    modalHeight = $position.position(element.parent()).height;\r
-\r
-                    modalBodyHeight = modalHeight - (modalHeaderHeight + modalFooterHeight) + 'px';\r
-\r
-                    if (windowOrientation.isPotrait()) { // Potrait Mode\r
-                        element.removeAttr('style').css({\r
-                            height: modalBodyHeight\r
-                        });\r
-                    } else if (windowOrientation.isLandscape() && windowWidth < b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Mobile\r
-                        element.removeAttr('style');\r
-                    } else if (windowOrientation.isLandscape() && windowWidth >= b2bAwdBreakpoints.breakpoints.mobile.max) { // Landscape Mode Non-Mobile\r
-                        element.removeAttr('style').css({\r
-                            height: modalBodyHeight\r
-                        });\r
-                    }\r
-                }\r
-            };\r
-\r
-            $timeout(function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            }, 100);\r
-            window.bind('orientationchange', function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            });\r
-            window.bind('resize', function () {\r
-                scope.setModalHeight();\r
-                scope.$apply();\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bModalFooter', ['windowOrientation', '$window', function (windowOrientation, $window) {\r
-    return {\r
-        restrict: 'AC',\r
-        scope: {\r
-            index: '@'\r
-        },\r
-        link: function (scope, element, attrs) {\r
-\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('$modalStack', ['$document', '$compile', '$rootScope', '$$stackedMap', '$log', '$timeout', 'trapFocusInElement', function ($document, $compile, $rootScope, $$stackedMap, $log, $timeout, trapFocusInElement) {\r
-    var backdropjqLiteEl, backdropDomEl;\r
-    var backdropScope = $rootScope.$new(true);\r
-    var body = $document.find('body').eq(0);\r
-    var html = $document.find('html').eq(0);\r
-    var openedWindows = $$stackedMap.createNew();\r
-    var $modalStack = {};\r
-\r
-    function backdropIndex() {\r
-        var topBackdropIndex = -1;\r
-        var opened = openedWindows.keys();\r
-        for (var i = 0; i < opened.length; i++) {\r
-            if (openedWindows.get(opened[i]).value.backdrop) {\r
-                topBackdropIndex = i;\r
-            }\r
-        }\r
-        return topBackdropIndex;\r
-    }\r
-\r
-    $rootScope.$watch(backdropIndex, function (newBackdropIndex) {\r
-        backdropScope.index = newBackdropIndex;\r
-    });\r
-\r
-    function removeModalWindow(modalInstance) {\r
-        //background scroll fix\r
-        html.removeAttr('style');\r
-        body.removeAttr('style');\r
-        body.removeClass('styled-by-modal');\r
-\r
-        var modalWindow = openedWindows.get(modalInstance).value;\r
-        trapFocusInElement(false, modalWindow.modalDomEl);\r
-\r
-        //clean up the stack\r
-        openedWindows.remove(modalInstance);\r
-\r
-        //remove window DOM element\r
-        modalWindow.modalDomEl.remove();\r
-\r
-        //remove backdrop if no longer needed\r
-        if (backdropDomEl && backdropIndex() === -1) {\r
-            backdropDomEl.remove();\r
-            backdropDomEl = undefined;\r
-        }\r
-\r
-        //destroy scope\r
-        modalWindow.modalScope.$destroy();\r
-    }\r
-\r
-    $document.bind('keydown', function (evt) {\r
-        var modal;\r
-\r
-        if (evt.which === 27) {\r
-            modal = openedWindows.top();\r
-            if (modal && modal.value.keyboard) {\r
-                $rootScope.$apply(function () {\r
-                    $modalStack.dismiss(modal.key);\r
-                });\r
-            }\r
-        }\r
-    });\r
-\r
-    $modalStack.open = function (modalInstance, modal) {\r
-\r
-        openedWindows.add(modalInstance, {\r
-            deferred: modal.deferred,\r
-            modalScope: modal.scope,\r
-            backdrop: modal.backdrop,\r
-            keyboard: modal.keyboard\r
-        });\r
-\r
-        var angularDomEl = angular.element('<div b2b-modal-window></div>');\r
-        angularDomEl.attr('window-class', modal.windowClass);\r
-        angularDomEl.attr('size-class', modal.sizeClass);\r
-        angularDomEl.attr('index', openedWindows.length() - 1);\r
-        angularDomEl.html(modal.content);\r
-\r
-        var modalDomEl = $compile(angularDomEl)(modal.scope);\r
-        openedWindows.top().value.modalDomEl = modalDomEl;\r
-        //background page scroll fix\r
-        html.css({\r
-            'overflow-y': 'hidden'\r
-        });\r
-        body.css({\r
-            'overflow-y': 'hidden',\r
-            'width': '100%',\r
-            'height': window.innerHeight + 'px'\r
-        });\r
-        body.addClass('styled-by-modal');\r
-        body.append(modalDomEl);\r
-\r
-        if (backdropIndex() >= 0 && !backdropDomEl) {\r
-            backdropjqLiteEl = angular.element('<div b2b-modal-backdrop></div>');\r
-            backdropDomEl = $compile(backdropjqLiteEl)(backdropScope);\r
-            body.append(backdropDomEl);\r
-        }\r
-\r
-        $timeout(function () {\r
-\r
-            if (modal.scope.$$childHead.isNotifDialog) {\r
-                angular.element(modalDomEl).find('button')[0].focus();\r
-            } else {\r
-                angular.element(modalDomEl)[0].focus();\r
-            }\r
-            trapFocusInElement(true, angular.element(modalDomEl).eq(0));\r
-        }, 200);\r
-    };\r
-\r
-    $modalStack.close = function (modalInstance, result) {\r
-        var modal = openedWindows.get(modalInstance);\r
-        if (modal) {\r
-            modal.value.deferred.resolve(result);\r
-            removeModalWindow(modalInstance);\r
-        }\r
-    };\r
-\r
-    $modalStack.dismiss = function (modalInstance, reason) {\r
-        var modalWindow = openedWindows.get(modalInstance).value;\r
-        if (modalWindow) {\r
-            modalWindow.deferred.reject(reason);\r
-            removeModalWindow(modalInstance);\r
-        }\r
-    };\r
-\r
-    $modalStack.getTop = function () {\r
-        return openedWindows.top();\r
-    };\r
-\r
-    return $modalStack;\r
-}])\r
-\r
-.provider('$modal', function () {\r
-    var $modalProvider = {\r
-        options: {\r
-            backdrop: true, //can be also false or 'static'\r
-            keyboard: true\r
-        },\r
-        $get: ['$injector', '$rootScope', '$q', '$http', '$templateCache', '$controller', '$modalStack', function ($injector, $rootScope, $q, $http, $templateCache, $controller, $modalStack) {\r
-            var $modal = {};\r
-\r
-            function getTemplatePromise(options) {\r
-                return options.template ? $q.when(options.template) :\r
-                    $http.get(options.templateUrl, {\r
-                        cache: $templateCache\r
-                    }).then(function (result) {\r
-                        return result.data;\r
-                    });\r
-            }\r
-\r
-            function getResolvePromises(resolves) {\r
-                var promisesArr = [];\r
-                angular.forEach(resolves, function (value, key) {\r
-                    if (angular.isFunction(value) || angular.isArray(value)) {\r
-                        promisesArr.push($q.when($injector.invoke(value)));\r
-                    }\r
-                });\r
-                return promisesArr;\r
-            }\r
-\r
-            $modal.open = function (modalOptions) {\r
-\r
-                var modalResultDeferred = $q.defer();\r
-                var modalOpenedDeferred = $q.defer();\r
-                //prepare an instance of a modal to be injected into controllers and returned to a caller\r
-                var modalInstance = {\r
-                    result: modalResultDeferred.promise,\r
-                    opened: modalOpenedDeferred.promise,\r
-                    close: function (result) {\r
-                        $modalStack.close(modalInstance, result);\r
-                    },\r
-                    dismiss: function (reason) {\r
-                        $modalStack.dismiss(modalInstance, reason);\r
-                    }\r
-                };\r
-\r
-                //merge and clean up options\r
-                modalOptions = angular.extend({}, $modalProvider.options, modalOptions);\r
-                modalOptions.resolve = modalOptions.resolve || {};\r
-\r
-                //verify options\r
-                if (!modalOptions.template && !modalOptions.templateUrl) {\r
-                    throw new Error('One of template or templateUrl options is required.');\r
-                }\r
-\r
-                var templateAndResolvePromise =\r
-                    $q.all([getTemplatePromise(modalOptions)].concat(getResolvePromises(modalOptions.resolve)));\r
-\r
-\r
-                templateAndResolvePromise.then(function resolveSuccess(tplAndVars) {\r
-\r
-                    var modalScope = (modalOptions.scope || $rootScope).$new();\r
-                    modalScope.$close = modalInstance.close;\r
-                    modalScope.$dismiss = modalInstance.dismiss;\r
-\r
-                    var ctrlInstance, ctrlLocals = {};\r
-                    var resolveIter = 1;\r
-\r
-                    //controllers\r
-                    if (modalOptions.controller) {\r
-                        ctrlLocals.$scope = modalScope;\r
-                        ctrlLocals.$modalInstance = modalInstance;\r
-                        angular.forEach(modalOptions.resolve, function (value, key) {\r
-                            ctrlLocals[key] = tplAndVars[resolveIter++];\r
-                        });\r
-\r
-                        ctrlInstance = $controller(modalOptions.controller, ctrlLocals);\r
-                    }\r
-\r
-                    $modalStack.open(modalInstance, {\r
-                        scope: modalScope,\r
-                        deferred: modalResultDeferred,\r
-                        content: tplAndVars[0],\r
-                        backdrop: modalOptions.backdrop,\r
-                        keyboard: modalOptions.keyboard,\r
-                        windowClass: modalOptions.windowClass,\r
-                        sizeClass: modalOptions.sizeClass\r
-                    });\r
-\r
-                }, function resolveError(reason) {\r
-                    modalResultDeferred.reject(reason);\r
-                });\r
-\r
-                templateAndResolvePromise.then(function () {\r
-                    modalOpenedDeferred.resolve(true);\r
-                }, function () {\r
-                    modalOpenedDeferred.reject(false);\r
-                });\r
-\r
-                return modalInstance;\r
-            };\r
-\r
-            return $modal;\r
-        }]\r
-    };\r
-\r
-    return $modalProvider;\r
-})\r
-\r
-.directive("b2bModal", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            b2bModal: '@',\r
-            modalController: '@',\r
-            modalOk: '&',\r
-            modalCancel: '&',\r
-            windowClass: '@',\r
-            sizeClass: '@'\r
-        },\r
-        link: function (scope, elm, attr) {\r
-            elm.bind('click', function (ev) {\r
-                var currentPosition = ev.pageY - ev.clientY;\r
-                ev.preventDefault();\r
-                if (angular.isDefined(elm.attr("href")) && elm.attr("href") !== "") {\r
-                    scope.b2bModal = elm.attr("href");\r
-                }\r
-                $modal.open({\r
-                    templateUrl: scope.b2bModal,\r
-                    controller: scope.modalController,\r
-                    windowClass: scope.windowClass,\r
-                    sizeClass: scope.sizeClass\r
-                }).result.then(function (value) {\r
-                    scope.modalOk({\r
-                        value: value\r
-                    });\r
-                    elm[0].focus();\r
-                }, function (value) {\r
-                    scope.modalCancel({\r
-                        value: value\r
-                    });\r
-                    elm[0].focus();\r
-                });\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive("utilityFilter", ["$modal", "$log", '$scrollTo', function ($modal, $log, $scrollTo) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-            utilityFilter: '@'\r
-        },\r
-        require: 'ngModel',\r
-        templateUrl: 'b2bTemplate/modal/u-filter.html',\r
-        link: function (scope, element, attribute, ctrl) {\r
-            //controller to be passed to $modal service\r
-            scope.options = angular.copy(scope.$parent.$eval(attribute.ngModel));\r
-            scope.$parent.$watch(attribute.ngModel, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    scope.options = newVal;\r
-                }\r
-            });\r
-            var modalCtrl = function ($scope, options) {\r
-                $scope.options = angular.copy(options);\r
-            };\r
-\r
-            if (angular.isDefined(scope.utilityFilter)) {\r
-                scope.templateUrl = scope.utilityFilter;\r
-            } else {\r
-                scope.templateUrl = 'b2bTemplate/modal/u-filter-window.html';\r
-            }\r
-            element.bind('click', function (ev) {\r
-                var currentPosition = ev.pageY - ev.clientY;\r
-                $modal.open({\r
-                    templateUrl: scope.templateUrl,\r
-                    controller: modalCtrl,\r
-                    resolve: {\r
-                        options: function () {\r
-                            return scope.options;\r
-                        }\r
-                    }\r
-                }).result.then(function (value) {\r
-                    ctrl.$setViewValue(value);\r
-                    element[0].focus();\r
-                    $scrollTo(0, currentPosition, 0);\r
-                }, function () {\r
-                    element[0].focus();\r
-                    $scrollTo(0, currentPosition, 0);\r
-                });\r
-            });\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:monthSelector\r
- *\r
- * @description\r
- *  <file src="src/monthSelector/docs/readme.md" />\r
- *\r
- * @usage\r
- * <div b2b-monthpicker ng-model="dt" min="minDate" max="maxDate" mode="monthpicker"></div>\r
-    \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/monthSelector/docs/demo.html" />\r
-            <file src="src/monthSelector/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.monthSelector', ['b2b.att.position', 'b2b.att.utilities'])\r
-\r
-.constant('b2bMonthpickerConfig', {\r
-    dateFormat: 'MM/dd/yyyy',\r
-    dayFormat: 'd',\r
-    monthFormat: 'MMMM',\r
-    yearFormat: 'yyyy',\r
-    dayHeaderFormat: 'EEEE',\r
-    dayTitleFormat: 'MMMM yyyy',\r
-    disableWeekend: false,\r
-    disableSunday: false,\r
-    disableDates: null,\r
-    onSelectClose: null,\r
-    startingDay: 0,\r
-    minDate: null,\r
-    maxDate: null,\r
-    dueDate: null,\r
-    fromDate: null,\r
-    legendIcon: null,\r
-    legendMessage: null,\r
-    calendarDisabled: false,\r
-    collapseWait: 0,\r
-    orientation: 'left',\r
-    inline: false,\r
-    mode:0,\r
-    helperText: 'The date you selected is $date. Double tap to open calendar. Select a date to close the calendar.',\r
-    descriptionText: 'Use tab to navigate between previous button, next button and month. Use arrow keys to navigate between months. Use space or enter to select a month.',\r
-    MonthpickerEvalAttributes: ['dateFormat', 'dayFormat', 'monthFormat', 'yearFormat', 'dayHeaderFormat', 'dayTitleFormat', 'disableWeekend', 'disableSunday', 'startingDay', 'collapseWait', 'orientation','mode','id'],\r
-    MonthpickerWatchAttributes: ['min', 'max', 'due', 'from', 'legendIcon', 'legendMessage', 'ngDisabled'],\r
-    MonthpickerFunctionAttributes: ['disableDates', 'onSelectClose']\r
-})\r
-\r
-.factory('b2bMonthpickerService', ['b2bMonthpickerConfig', 'dateFilter', function (b2bMonthpickerConfig, dateFilter) {\r
-    var setAttributes = function (attr, elem) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(elem) && elem !== null) {\r
-            var attributes = b2bMonthpickerConfig.MonthpickerEvalAttributes.concat(b2bMonthpickerConfig.MonthpickerWatchAttributes, b2bMonthpickerConfig.MonthpickerFunctionAttributes);\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (attributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    elem.attr(key.toSnakeCase(), key);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    var bindScope = function (attr, scope) {\r
-        if (angular.isDefined(attr) && attr !== null && angular.isDefined(scope) && scope !== null) {\r
-            var evalFunction = function (key, val) {\r
-                scope[key] = scope.$parent.$eval(val);\r
-            };\r
-\r
-            var watchFunction = function (key, val) {\r
-                scope.$parent.$watch(val, function (value) {\r
-                    scope[key] = value;\r
-                });\r
-                scope.$watch(key, function (value) {\r
-                    scope.$parent[val] = value;\r
-                });\r
-            };\r
-\r
-            var evalAttributes = b2bMonthpickerConfig.MonthpickerEvalAttributes;\r
-            var watchAttributes = b2bMonthpickerConfig.MonthpickerWatchAttributes;\r
-            for (var key in attr) {\r
-                var val = attr[key];\r
-                if (evalAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    evalFunction(key, val);\r
-                } else if (watchAttributes.indexOf(key) !== -1 && angular.isDefined(val)) {\r
-                    watchFunction(key, val);\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return {\r
-        setAttributes: setAttributes,\r
-        bindScope: bindScope\r
-    };\r
-}])\r
-\r
-.controller('b2bMonthpickerController', ['$scope', '$attrs', 'dateFilter', '$element', '$position', 'b2bMonthpickerConfig', function ($scope, $attrs, dateFilter, $element, $position, dtConfig) {\r
-    var format = {\r
-            date: getValue($attrs.dateFormat, dtConfig.dateFormat),\r
-            day: getValue($attrs.dayFormat, dtConfig.dayFormat),\r
-            month: getValue($attrs.monthFormat, dtConfig.monthFormat),\r
-            year: getValue($attrs.yearFormat, dtConfig.yearFormat),\r
-            dayHeader: getValue($attrs.dayHeaderFormat, dtConfig.dayHeaderFormat),\r
-            dayTitle: getValue($attrs.dayTitleFormat, dtConfig.dayTitleFormat),\r
-            disableWeekend: getValue($attrs.disableWeekend, dtConfig.disableWeekend),\r
-            disableSunday: getValue($attrs.disableSunday, dtConfig.disableSunday),\r
-            disableDates: getValue($attrs.disableDates, dtConfig.disableDates)\r
-        },\r
-        startingDay = getValue($attrs.startingDay, dtConfig.startingDay);\r
-\r
-    $scope.minDate = dtConfig.minDate ? $scope.resetTime(dtConfig.minDate) : null;\r
-    $scope.maxDate = dtConfig.maxDate ? $scope.resetTime(dtConfig.maxDate) : null;\r
-    $scope.dueDate = dtConfig.dueDate ? $scope.resetTime(dtConfig.dueDate) : null;\r
-    $scope.fromDate = dtConfig.fromDate ? $scope.resetTime(dtConfig.fromDate) : null;\r
-    $scope.legendIcon = dtConfig.legendIcon ? dtConfig.legendIcon : null;\r
-    $scope.legendMessage = dtConfig.legendMessage ? dtConfig.legendMessage : null;\r
-    $scope.ngDisabled = dtConfig.calendarDisabled ? dtConfig.calendarDisabled : null;\r
-    $scope.collapseWait = getValue($attrs.collapseWait, dtConfig.collapseWait);\r
-    $scope.orientation = getValue($attrs.orientation, dtConfig.orientation);\r
-    $scope.onSelectClose = getValue($attrs.onSelectClose, dtConfig.onSelectClose);\r
-    $scope.mode = getValue($attrs.mode, dtConfig.mode);\r
-    \r
-    $scope.inline = $attrs.inline === 'true' ? true : dtConfig.inline;\r
-\r
-    function getValue(value, defaultValue) {\r
-        return angular.isDefined(value) ? $scope.$parent.$eval(value) : defaultValue;\r
-    }\r
-\r
-    function getDaysInMonth(year, month) {\r
-        return new Date(year, month, 0).getDate();\r
-    }\r
-\r
-    function getDates(startDate, n) {\r
-        var dates = new Array(n);\r
-        var current = startDate,\r
-            i = 0;\r
-        while (i < n) {\r
-            dates[i++] = new Date(current);\r
-            current.setDate(current.getDate() + 1);\r
-        }\r
-        return dates;\r
-    }\r
-\r
-    this.updatePosition = function (b2bMonthpickerPopupTemplate) {\r
-        $scope.position = $position.offset($element);\r
-        if($element.find('input').length > 0 ){\r
-            $scope.position.top += $element.find('input').prop('offsetHeight');\r
-        }else{\r
-            $scope.position.top += $element.find('a').prop('offsetHeight');\r
-        }\r
-        \r
-        if ($scope.orientation === 'right') {\r
-            $scope.position.left -= (((b2bMonthpickerPopupTemplate && b2bMonthpickerPopupTemplate.prop('offsetWidth')) || 290) - $element.find('input').prop('offsetWidth'));\r
-        }\r
-    };\r
-\r
-    function isSelected(dt) { \r
-        if (dt && angular.isDate($scope.currentDate) && compare(dt, $scope.currentDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isFromDate(dt) {\r
-        if (dt && angular.isDate($scope.fromDate) && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDateRange(dt) {\r
-        if (dt && $scope.fromDate && angular.isDate($scope.currentDate) && (compare(dt, $scope.fromDate) >= 0) && (compare(dt, $scope.currentDate) <= 0)) {\r
-            return true;\r
-        } else if (dt && $scope.fromDate && compare(dt, $scope.fromDate) === 0) {\r
-            return true;\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isOld(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() < new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isNew(date, currentMonthDate) {\r
-        if (date && currentMonthDate && (new Date(date.getFullYear(), date.getMonth(), 1, 0, 0, 0).getTime() > new Date(currentMonthDate.getFullYear(), currentMonthDate.getMonth(), 1, 0, 0, 0).getTime())) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    }\r
-\r
-    function isPastDue(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt > $scope.dueDate);\r
-        }\r
-        return false;\r
-    }\r
-\r
-    function isDueDate(dt) {\r
-        if ($scope.dueDate) {\r
-            return (dt.getTime() === $scope.dueDate.getTime());\r
-        }\r
-        return false;\r
-    }\r
-\r
-    var isDisabled = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (isOld(date, currentMonthDate) || isNew(date, currentMonthDate)) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };\r
-    \r
-    var isDisabledMonth = function (date, currentMonthDate) {\r
-        if ($attrs.from && !angular.isDate($scope.fromDate)) {\r
-            return true;\r
-        }\r
-        if (format.disableWeekend === true && (dateFilter(date, format.dayHeader) === "Saturday" || dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        if (format.disableSunday === true && (dateFilter(date, format.dayHeader) === "Sunday")) {\r
-            return true;\r
-        }\r
-        return (($scope.minDate && compare(date, $scope.minDate) < 0) || ($scope.maxDate && compare(date, $scope.maxDate) > 0) || (format.disableDates && format.disableDates({\r
-            date: date\r
-        })));\r
-    };    \r
-         \r
-    var compare = function (date1, date2) {\r
-        return (new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()));\r
-    };\r
-\r
-    function isMinDateAvailable(startDate, endDate) {\r
-        if (($scope.minDate && $scope.minDate.getTime() >= startDate.getTime()) && ($scope.minDate.getTime() <= endDate.getTime())) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-    }\r
-    \r
-    function isMaxDateAvailable(startDate, endDate) {\r
-        if (($scope.maxDate && $scope.maxDate.getTime() >= startDate.getTime()) && ($scope.maxDate.getTime() <= endDate.getTime())) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-    }    \r
-    \r
-    function isYearInRange(currentYear) {\r
-            \r
-        if ($scope.minDate && currentYear === $scope.minDate.getFullYear()) {\r
-            $scope.disablePrev = true;\r
-            $scope.visibilityPrev = "hidden";\r
-        } else {\r
-            $scope.disablePrev = false;\r
-            $scope.visibilityPrev = "visible";\r
-        }\r
-        \r
-        if ($scope.maxDate && currentYear === $scope.maxDate.getFullYear()) {\r
-            $scope.disableNext = true;\r
-            $scope.visibilityNext = "hidden";\r
-        } else {\r
-            $scope.disableNext = false;\r
-            $scope.visibilityNext = "visible";\r
-        }\r
-        \r
-    }    \r
-\r
-    this.focusNextPrev = function(b2bMonthpickerPopupTemplate,init){\r
-        if(init){\r
-            if (!$scope.disablePrev){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.prev').focus();\r
-            }else if (!$scope.disableNext){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.next').focus();\r
-            }else{\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();\r
-            }\r
-        }else{\r
-            if ($scope.disableNext || $scope.disablePrev){\r
-                b2bMonthpickerPopupTemplate[0].querySelector('th.b2b-monthSelector-label').focus();\r
-            }       \r
-        }    \r
-    };\r
-\r
-    function getLabel(label) {\r
-        if (label) {\r
-            var labelObj = {\r
-                pre: label.substr(0, 1).toUpperCase(),\r
-                post: label\r
-            };\r
-            return labelObj;\r
-        }\r
-        return;\r
-    }\r
-\r
-    function makeDate(date, dayFormat, dayHeaderFormat, isSelected, isFromDate, isDateRange, isOld, isNew, isDisabled, dueDate, pastDue) {\r
-        return {\r
-            date: date,\r
-            label: dateFilter(date, dayFormat),\r
-            header: dateFilter(date, dayHeaderFormat),\r
-            selected: !!isSelected,\r
-            fromDate: !!isFromDate,\r
-            dateRange: !!isDateRange,\r
-            oldMonth: !!isOld,\r
-            nextMonth: !!isNew,\r
-            disabled: !!isDisabled,\r
-            dueDate: !!dueDate,\r
-            pastDue: !!pastDue,\r
-            focusable: !((isDisabled && !(isSelected || isDateRange)) || (isOld || isNew))\r
-        };\r
-    }\r
-    \r
-    this.modes = [\r
-        {\r
-            name: 'day',\r
-            getVisibleDates: function (date) {\r
-                var year = date.getFullYear(),\r
-                    month = date.getMonth(),\r
-                    firstDayOfMonth = new Date(year, month, 1),\r
-                    lastDayOfMonth = new Date(year, month + 1, 0);\r
-                var difference = startingDay - firstDayOfMonth.getDay(),\r
-                    numDisplayedFromPreviousMonth = (difference > 0) ? 7 - difference : -difference,\r
-                    firstDate = new Date(firstDayOfMonth),\r
-                    numDates = 0;\r
-\r
-                if (numDisplayedFromPreviousMonth > 0) {\r
-                    firstDate.setDate(-numDisplayedFromPreviousMonth + 1);\r
-                    numDates += numDisplayedFromPreviousMonth; // Previous\r
-                }\r
-                numDates += getDaysInMonth(year, month + 1); // Current\r
-                numDates += (7 - numDates % 7) % 7; // Next\r
-\r
-                var days = getDates(firstDate, numDates),\r
-                    labels = new Array(7);\r
-                for (var i = 0; i < numDates; i++) {\r
-                    var dt = new Date(days[i]);\r
-                    days[i] = makeDate(dt,\r
-                        format.day,\r
-                        format.dayHeader,\r
-                        isSelected(dt),\r
-                        isFromDate(dt),\r
-                        isDateRange(dt),\r
-                        isOld(dt, date),\r
-                        isNew(dt, date),\r
-                        isDisabled(dt, date),\r
-                        isDueDate(dt),\r
-                        isPastDue(dt));\r
-                }\r
-                for (var j = 0; j < 7; j++) {\r
-                    labels[j] = getLabel(dateFilter(days[j].date, format.dayHeader));\r
-                }\r
-                isMinDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                isMaxDateAvailable(firstDayOfMonth, lastDayOfMonth);\r
-                return {\r
-                    objects: days,\r
-                    title: dateFilter(date, format.dayTitle),\r
-                    labels: labels\r
-                };\r
-            },\r
-            split: 7,\r
-            step: {\r
-                months: 1\r
-            }\r
-        },\r
-        {\r
-            name: 'month',\r
-            getVisibleDates: function(date) {\r
-                var months = [], \r
-                    labels = [], \r
-                    year = date.getFullYear();\r
-                    for (var i = 0; i < 12; i++) {\r
-                        var dt = new Date(year,i,1);                \r
-                        months[i] = makeDate(dt,\r
-                                    format.month,\r
-                                    format.dayHeader,\r
-                                    isSelected(dt), \r
-                                    isFromDate(dt),\r
-                                    isDateRange(dt),\r
-                                    false,\r
-                                    false,\r
-                                    isDisabledMonth(dt, date),\r
-                                    isDueDate(dt),                                       \r
-                                    isPastDue(dt));                                                                                                                                                         \r
-                    }\r
-                isYearInRange(year);  \r
-                return {objects: months, title: dateFilter(date, format.year), labels: labels};\r
-            },\r
-            split:4,\r
-            step: {years: 1}\r
-        }\r
-    ];\r
-}])\r
-\r
-.directive('b2bMonthpickerPopup', ['$parse', '$log', '$timeout', '$document', '$documentBind', '$isElement', '$templateCache', '$compile','$interval', 'trapFocusInElement', 'keymap', function ($parse, $log, $timeout, $document, $documentBind, $isElement, $templateCache, $compile, $interval,trapFocusInElement, keymap) {\r
-    return {\r
-        restrict: 'EA',\r
-        scope: {\r
-          trigger: '='\r
-        },\r
-        replace: true,\r
-        transclude: true,\r
-        templateUrl: function (elem, attr) {\r
-            if (attr.inline === 'true') {\r
-                return 'b2bTemplate/monthSelector/monthSelector-popup.html';\r
-            }else if (attr.link === 'true') {\r
-                return 'b2bTemplate/monthSelector/monthSelectorLink.html';\r
-            }else {\r
-                return 'b2bTemplate/monthSelector/monthSelector.html';\r
-            }\r
-        },\r
-        scope: {},\r
-        require: ['b2bMonthpickerPopup', 'ngModel', '?^b2bMonthpickerGroup'],\r
-        controller: 'b2bMonthpickerController',\r
-        link: function (scope, element, attrs, ctrls) {\r
-            var MonthpickerCtrl = ctrls[0],\r
-                ngModel = ctrls[1],\r
-                b2bMonthpickerGroupCtrl = ctrls[2];\r
-            var b2bMonthpickerPopupTemplate;\r
-\r
-            if (!ngModel) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-\r
-            // Configuration parameters\r
-            var mode = scope.mode,\r
-                selected;\r
-            scope.isOpen = false;\r
-\r
-            scope.headers = [];\r
-            scope.footers = [];\r
-            scope.triggerInterval=undefined;\r
-\r
-\r
-            if (b2bMonthpickerGroupCtrl) {\r
-                b2bMonthpickerGroupCtrl.registerMonthpickerScope(scope);\r
-            }\r
-\r
-            element.bind('keydown', function (ev) {                   \r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }                                \r
-                if(ev.keyCode === keymap.KEY.ESC)\r
-                {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            });\r
-            \r
-            element.find('button').bind('click', function () {\r
-                onClicked();                \r
-            });\r
-\r
-            element.find('a').bind('click', function () {\r
-                onClicked();                \r
-            });\r
-\r
-            \r
-            element.find('input').bind('click', function () {\r
-                onClicked();\r
-            });\r
-\r
-            var onClicked = function() {        \r
-                if (!scope.ngDisabled) {\r
-                    scope.isOpen = !scope.isOpen;\r
-                    toggleCalendar(scope.isOpen);                    \r
-                    MonthpickerCtrl.updatePosition(b2bMonthpickerPopupTemplate);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-        \r
-            var toggleCalendar = function (flag) {\r
-                if (!scope.inline) {\r
-                    if (flag) {\r
-                        b2bMonthpickerPopupTemplate = angular.element($templateCache.get('b2bTemplate/monthSelector/monthSelector-popup.html'));\r
-                        b2bMonthpickerPopupTemplate.attr('b2b-trap-focus-inside-element', 'false');\r
-                        b2bMonthpickerPopupTemplate.attr('trigger', 'true');\r
-                        b2bMonthpickerPopupTemplate = $compile(b2bMonthpickerPopupTemplate)(scope);\r
-                        $document.find('body').append(b2bMonthpickerPopupTemplate);\r
-                        b2bMonthpickerPopupTemplate.bind('keydown', escPress);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.trigger=0;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                                MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,true);\r
-                            }, 100);\r
-                        });\r
-                        scope.triggerInterval = $interval(function () {\r
-                            //This value is updated to trigger init() function of directive on year change.\r
-                            scope.trigger=(scope.trigger === 0 ? 1 : 0);\r
-                        }, 200);\r
-\r
-                    } else {\r
-                        b2bMonthpickerPopupTemplate.unbind('keydown', escPress);\r
-                        if(scope.triggerInterval)\r
-                        {\r
-                            $interval.cancel(scope.triggerInterval);\r
-                            scope.triggerInterval=undefined;\r
-                        }\r
-                        b2bMonthpickerPopupTemplate.remove();\r
-                        if(element.find('button').length > 0){\r
-                            element.find('button')[0].focus();\r
-                        }else{\r
-                            element.find('a')[0].focus();\r
-                        }\r
-                        \r
-                        scope.getFocus = false;\r
-                    }\r
-                }\r
-            };\r
-\r
-            var outsideClick = function (e) {\r
-                var isElement = $isElement(angular.element(e.target), element, $document);\r
-                var isb2bMonthpickerPopupTemplate = $isElement(angular.element(e.target), b2bMonthpickerPopupTemplate, $document);\r
-                if (!(isElement || isb2bMonthpickerPopupTemplate)) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                    scope.$apply();\r
-                }\r
-            };\r
-\r
-            var escPress = function (ev) {\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (ev.keyCode === keymap.KEY.ESC) {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 33) {\r
-                        !scope.disablePrev && scope.move(-1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === 34) {\r
-                        !scope.disableNext && scope.move(1);\r
-                        $timeout(function () {\r
-                            scope.getFocus = true;\r
-                            scope.$apply();\r
-                            $timeout(function () {\r
-                                scope.getFocus = false;\r
-                                scope.$apply();\r
-                            }, 100);\r
-                        });\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    }\r
-                    scope.$apply();\r
-                }\r
-            };              \r
-                    \r
-            $documentBind.click('isOpen', outsideClick, scope);\r
-\r
-            scope.$on('$destroy', function () {\r
-                if (scope.isOpen) {\r
-                    scope.isOpen = false;\r
-                    toggleCalendar(scope.isOpen);\r
-                }\r
-            });\r
-\r
-            scope.resetTime = function (date) {\r
-                if (typeof date === 'string') {\r
-                    date = date + 'T12:00:00';\r
-                }\r
-                var dt;\r
-                if (!isNaN(new Date(date))) {\r
-                    dt = new Date(date);\r
-                    if(scope.mode === 1){\r
-                        dt = new Date(dt.getFullYear(), dt.getMonth());\r
-                    }else{\r
-                        dt = new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-                    }                                                            \r
-                } else {\r
-                    return null;\r
-                }\r
-                return new Date(dt.getFullYear(), dt.getMonth(), dt.getDate());\r
-            };\r
-            \r
-            if (attrs.min) {\r
-                scope.$parent.$watch($parse(attrs.min), function (value) {\r
-                    scope.minDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.max) {\r
-                scope.$parent.$watch($parse(attrs.max), function (value) {\r
-                    scope.maxDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.due) {\r
-                scope.$parent.$watch($parse(attrs.due), function (value) {\r
-                    scope.dueDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.from) {\r
-                scope.$parent.$watch($parse(attrs.from), function (value) {\r
-                    scope.fromDate = value ? scope.resetTime(value) : null;\r
-                    refill();\r
-                });\r
-            }\r
-\r
-            if (attrs.legendIcon) {\r
-                scope.$parent.$watch(attrs.legendIcon, function (value) {\r
-                    scope.legendIcon = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.legendMessage) {\r
-                scope.$parent.$watch(attrs.legendMessage, function (value) {\r
-                    scope.legendMessage = value ? value : null;\r
-                    refill();\r
-                });\r
-            }\r
-            if (attrs.ngDisabled) {\r
-                scope.$parent.$watch(attrs.ngDisabled, function (value) {\r
-                    scope.ngDisabled = value ? value : null;\r
-                });\r
-            }      \r
-            \r
-\r
-            // Split array into smaller arrays\r
-            function split(arr, size) {\r
-                var arrays = [];\r
-                while (arr.length > 0) {\r
-                    arrays.push(arr.splice(0, size));\r
-                }\r
-                return arrays;\r
-            }\r
-            \r
-            var moveMonth = function(selectedDate, direction) {\r
-                var step = MonthpickerCtrl.modes[scope.mode].step;\r
-                selectedDate.setDate(1);\r
-                selectedDate.setMonth(selectedDate.getMonth() + direction * (step.months || 0));\r
-                selectedDate.setFullYear(selectedDate.getFullYear() + direction * (step.years || 0));\r
-\r
-                return selectedDate;\r
-            };            \r
-\r
-            function refill(date) {\r
-                if (angular.isDate(date) && !isNaN(date)) {\r
-                    selected = new Date(date);\r
-                } else {\r
-                    if (!selected) {\r
-                        selected = new Date();\r
-                    }\r
-                }\r
-\r
-                if (selected) {                    \r
-                    var selectedCalendar;\r
-                    if(scope.mode === 1){\r
-                        if(!angular.isDate(selected))\r
-                           {                           \r
-                                selected = new Date();\r
-                           }\r
-                        selectedCalendar = moveMonth(angular.copy(selected), -1);\r
-                    } else {\r
-                        selectedCalendar = angular.copy(selected);\r
-                    }\r
-                    \r
-                    var currentMode = MonthpickerCtrl.modes[mode],\r
-                        data = currentMode.getVisibleDates(selected);\r
-\r
-                    scope.rows = split(data.objects, currentMode.split);\r
-            \r
-                    var flag=false;\r
-                    var startFlag=false;\r
-                    var firstSelected = false;\r
-                    for(var i=0; i<scope.rows.length; i++)\r
-                    {\r
-                        for(var j=0; j<scope.rows[i].length; j++)\r
-                        {\r
-                            if(!scope.rows[i][j].disabled && !firstSelected)\r
-                            {\r
-                                firstSelected=true;\r
-                                var firstDay = scope.rows[i][j];\r
-                            }\r
-\r
-                            if(scope.rows[i][j].selected)\r
-                            {\r
-                                flag=true;\r
-                                break;\r
-                            }                  \r
-                        }\r
-                        if(flag)\r
-                        {\r
-                            break;\r
-                        }\r
-                    }\r
-                    if(!flag && firstSelected)\r
-                    {\r
-                       firstDay.firstFocus=true;\r
-                    }\r
-\r
-                    scope.labels = data.labels || [];\r
-                    scope.title = data.title;                    \r
-                }\r
-            }\r
-\r
-            scope.select = function (date,$event) {\r
-                var dt = new Date(date.getFullYear(), date.getMonth(), date.getDate());\r
-                scope.currentDate = dt;\r
-                if (!scope.onSelectClose || (scope.onSelectClose && scope.onSelectClose({\r
-                        date: dt\r
-                    }) !== false)) {\r
-                    if (angular.isNumber(scope.collapseWait)) {\r
-                        $timeout(function () {\r
-                            scope.isOpen = false;\r
-                            toggleCalendar(scope.isOpen);\r
-                        }, scope.collapseWait);\r
-                    } else {\r
-                        scope.isOpen = false;\r
-                        toggleCalendar(scope.isOpen);\r
-                    }\r
-                }\r
-            };\r
-\r
-            scope.move = function (direction,$event) {\r
-                var step = MonthpickerCtrl.modes[mode].step;\r
-                selected.setDate(1);\r
-                selected.setMonth(selected.getMonth() + direction * (step.months || 0));\r
-                selected.setFullYear(selected.getFullYear() + direction * (step.years || 0));\r
-                refill();\r
-                scope.getFocus = true;\r
-                $timeout(function () {\r
-                    if (attrs.inline === 'true') {\r
-                        MonthpickerCtrl.focusNextPrev(element,false); \r
-                    }else{\r
-                        MonthpickerCtrl.focusNextPrev(b2bMonthpickerPopupTemplate,false);\r
-                    }\r
-                },100);\r
-                $event.preventDefault();\r
-                $event.stopPropagation();\r
-            };\r
-\r
-            scope.$watch('currentDate', function (value) {\r
-                if (angular.isDefined(value) && value !== null) {\r
-                    refill(value);\r
-                } else {\r
-                    refill();\r
-                }\r
-                ngModel.$setViewValue(value);\r
-            });\r
-\r
-            ngModel.$render = function () {\r
-                scope.currentDate = ngModel.$viewValue;\r
-            };\r
-\r
-            var stringToDate = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    value = new Date(value);\r
-                }\r
-                return value;\r
-            };\r
-            ngModel.$formatters.unshift(stringToDate);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpicker', ['$compile', '$log', 'b2bMonthpickerConfig', 'b2bMonthpickerService', function ($compile, $log, b2bMonthpickerConfig, b2bMonthpickerService) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: {\r
-            disableDates: '&',\r
-            onSelectClose: '&'\r
-        },\r
-        require: 'ngModel',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            var dateFormatString = angular.isDefined(attr.dateFormat) ? scope.$parent.$eval(attr.dateFormat) : b2bMonthpickerConfig.dateFormat;\r
-            var helperText = angular.isDefined(attr.helperText) ? scope.$parent.$eval(attr.helperText) : b2bMonthpickerConfig.helperText; \r
-            helperText = helperText.replace('$date', '{{dt | date : \'' + dateFormatString + '\'}}');\r
-\r
-            var descriptionText = angular.isDefined(attr.descriptionText) ? scope.$parent.$eval(attr.descriptionText) : b2bMonthpickerConfig.descriptionText;  \r
-\r
-\r
-            var inline = false;\r
-            if (elem.prop('nodeName') !== 'INPUT' && elem.prop('nodeName') !== 'A') {\r
-                inline = true;\r
-            }\r
-\r
-            var selectedDateMessage = "";\r
-            \r
-            if (elem.prop('nodeName') !== 'A'){\r
-                selectedDateMessage = '<button type="button" class="span12 faux-input" ng-disabled="ngDisabled" aria-describedby="monthpicker-description'+scope.$id+'"><span class="hidden-spoken" aria-live="assertive" aria-atomic="false">' + helperText + '</span></button>';    \r
-                elem.attr('tabindex', '-1'); \r
-                elem.attr('aria-hidden', 'true');  \r
-                elem.attr('readonly', 'true'); \r
-            }else{\r
-                selectedDateMessage = ''\r
-                elem.attr('aria-label', helperText);\r
-            }\r
-            \r
-            var descriptionTextSpan = '<span class="offscreen-text" id="monthpicker-description'+scope.$id+'">'+descriptionText+'</span>';\r
-            elem.removeAttr('b2b-Monthpicker');\r
-            elem.removeAttr('ng-model');\r
-            elem.removeAttr('ng-disabled');\r
-            elem.addClass('Monthpicker-input');\r
-            elem.attr('ng-model', 'dt');\r
-            elem.attr('aria-describedby', 'monthpicker-description'+scope.$id);\r
-            \r
-            \r
-            \r
-            elem.attr('ng-disabled', 'ngDisabled');\r
-            elem.attr('b2b-format-date', dateFormatString);\r
-\r
-            var wrapperElement = angular.element('<div></div>');\r
-            wrapperElement.attr('b2b-Monthpicker-popup', '');\r
-            wrapperElement.attr('ng-model', 'dt');\r
-            if (inline) {\r
-                wrapperElement.attr('inline', inline);\r
-            }\r
-            if (elem.prop('nodeName') === 'A'){\r
-                wrapperElement.attr('link', true);\r
-            }\r
-            b2bMonthpickerService.setAttributes(attr, wrapperElement);\r
-            b2bMonthpickerService.bindScope(attr, scope);\r
-\r
-            wrapperElement.html('');\r
-            wrapperElement.append(selectedDateMessage);\r
-            wrapperElement.append('');\r
-            wrapperElement.append(descriptionTextSpan);\r
-            wrapperElement.append('');\r
-            wrapperElement.append(elem.prop('outerHTML'));\r
-\r
-            var elm = wrapperElement.prop('outerHTML');\r
-            elm = $compile(elm)(scope);\r
-            elem.replaceWith(elm);\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            if (!ctrl) {\r
-                $log.error("ng-model is required.");\r
-                return; // do nothing if no ng-model\r
-            }\r
-            \r
-            scope.$watch('dt', function (value) {\r
-                ctrl.$setViewValue(value);\r
-            });\r
-            ctrl.$render = function () {\r
-                scope.dt = ctrl.$viewValue;\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerGroup', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function (scope, elem, attr) {\r
-            this.$$headers = [];\r
-            this.$$footers = [];\r
-            this.registerMonthpickerScope = function (MonthpickerScope) {\r
-                MonthpickerScope.headers = this.$$headers;\r
-                MonthpickerScope.footers = this.$$footers;\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {}\r
-    };\r
-}])\r
-\r
-.directive('b2bFormatDate', ['dateFilter', function (dateFilter) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var b2bFormatDate = "";\r
-            attr.$observe('b2bFormatDate', function (value) {\r
-                b2bFormatDate = value;\r
-            });\r
-            var dateToString = function (value) {\r
-                if (!isNaN(new Date(value))) {\r
-                    return dateFilter(new Date(value), b2bFormatDate);\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$formatters.unshift(dateToString);\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerHeader', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bMonthpickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$headers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bMonthpickerFooter', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^b2bMonthpickerGroup',\r
-        transclude: true,\r
-        replace: true,\r
-        template: '',\r
-        compile: function (elem, attr, transclude) {\r
-            return function link(scope, elem, attr, ctrl) {\r
-                if (ctrl) {\r
-                    ctrl.$$footers.push(transclude(scope, function () {}));\r
-                }\r
-                elem.remove();\r
-            };\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:multiLevelNavigation\r
- *\r
- * @description\r
- *  <file src="src/multiLevelNavigation/docs/readme.md" />\r
- *\r
- * @usage\r
- *       <div class="b2b-ml-nav">\r
- *          <ul role="tree">\r
- *             <li aria-label="{{child.name}}" tabindex="-1" b2b-ml-nav="{{child.type}}" role="treeitem" ng-repeat="child in treeStructure">\r
- *                  <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>\r
- *                      <!-- Below UL tag is RECURSIVE to generate n-childs -->\r
- *                      <ul role="group" ng-if="child.child">\r
- *                          <li aria-label="{{child.name}}" b2b-ml-nav="{{child.type}}" tabindex="-1" role="treeitem" ng-repeat="child in child.child">\r
- *                          <a tabindex="-1" href="javascript:void(0);" title="{{child.name}}">{{child.name}}<span><i class="{{child.type=='endNode'?'icon-primary-circle':'icon-primary-collapsed'}}"></i></span></a>\r
- *                               <!-- RECURSIVE UL tag goes here -->\r
- *                          </li>\r
- *                      </ul>\r
- *             </li>\r
- *           </ul>\r
- *        </div>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/multiLevelNavigation/docs/demo.html" />\r
-            <file src="src/multiLevelNavigation/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.multiLevelNavigation', ['b2b.att.utilities'])\r
-    //directive b2bMlNav Test coverage 100% on 5/13\r
-    .directive('b2bMlNav', ['keymap', function (keymap) {\r
-        return {\r
-            restrict: 'EA',\r
-            link: function (scope, element) {\r
-                var rootE, parentE, upE, downE, lastE, homeE, endE;\r
-                //default root tree element tabindex set zero\r
-                if (element.parent().parent().hasClass('b2b-ml-nav') && (element[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                //check root via class\r
-                var isRoot = function (elem) {\r
-                        if (elem.parent().parent().eq(0).hasClass('b2b-ml-nav')) {\r
-                            return true;\r
-                        } else {\r
-                            return false;\r
-                        }\r
-\r
-                    }\r
-                    //for any expandable tree item on click\r
-                var toggleState = function (e) {\r
-                    if (angular.element(e.target).attr("b2b-ml-nav") !== "endNode") {\r
-                        var eLink = element.find('a').eq(0);\r
-                        if (eLink.hasClass('active')) {\r
-                            eLink.removeClass('active');\r
-                            eLink.parent().attr("aria-expanded", "false");\r
-                            eLink.find('i').eq(0).removeClass('icon-primary-expanded');\r
-                            eLink.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                        } else {\r
-                            eLink.addClass('active');\r
-                            eLink.parent().attr("aria-expanded", "true");\r
-                            eLink.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            eLink.find('i').eq(0).addClass('icon-primary-expanded');\r
-                        }\r
-                    }\r
-                };\r
-                //function finds the main root-item from particular tree-group\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem.attr("b2b-ml-nav") === "middleNode" || elem.attr("b2b-ml-nav") === "endNode") {\r
-                        parentE = elem.parent().parent();\r
-                    } else {\r
-                        parentE = elem;\r
-                    }\r
-                    if (parentE.attr("b2b-ml-nav") === "rootNode") {\r
-                        rootE = parentE;\r
-                    } else {\r
-                        findRoot(parentE);\r
-                    }\r
-                };\r
-                //finds the last visible node of the previous tree-group\r
-                var findPreActive = function (elem) {\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.attr("b2b-ml-nav") === "middleNode" && lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-                //find above visible link\r
-                var findUp = function (elem) {\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                    if (isRoot(elem) || (upE.attr('b2b-ml-nav') === "middleNode" && upE[0] !== elem.parent().parent()[0])) {\r
-                        findPreActive(upE.find('a').eq(0)); \r
-                    }\r
-                };\r
-                //find below visible link\r
-                var findDown = function (elem) {\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                    } else {\r
-                        if (elem.parent().next().length !== 0) {\r
-                            downE = elem.parent().next().eq(0);\r
-                        } else {\r
-                            if (elem.parent().parent().parent().next().length !== 0) {\r
-                                downE = elem.parent().parent().parent().next().eq(0);\r
-                                return;\r
-                            }\r
-                            downE = elem.parent().eq(0);\r
-                        }\r
-                    }\r
-                };\r
-                //finds last root-group element of the tree\r
-                var findEnd = function (elem) {\r
-                    findRoot(elem);\r
-                    endE = angular.element(rootE.parent()[0].children[rootE.parent()[0].children.length - 1]);\r
-                };\r
-                //finds first root element of tree\r
-                var findHome = function (elem) {\r
-                    findRoot(elem);\r
-                    homeE = angular.element(rootE.parent()[0].children[0]);\r
-                };\r
-                element.bind('click', function (e) {\r
-                    if(element.attr("b2b-ml-nav") !== "endNode") { \r
-                        toggleState(e); \r
-                    }\r
-                    e.stopPropagation();\r
-                });\r
-                element.bind('focus', function (e) {\r
-                    if(element.attr("b2b-ml-nav") !== "endNode") {\r
-                        if(element.find('a').eq(0).hasClass('active')) {\r
-                            element.attr("aria-expanded", true);\r
-                        }\r
-                        else {\r
-                            element.attr("aria-expanded", false);\r
-                        }\r
-                        \r
-                    }\r
-                })\r
-                //Keyboard functionality approach:\r
-                //find keycode\r
-                //set set tabindex -1 on the current focus element\r
-                //find the next element to be focussed, set tabindex 0 and throw focus\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.ENTER:\r
-                    case keymap.KEY.SPACE:\r
-                        element.triggerHandler('click');\r
-                        evt.stopPropagation();\r
-                        evt.preventDefault();\r
-                        break;\r
-                    case keymap.KEY.END:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findEnd(element);\r
-                        endE.eq(0).attr('tabindex', 0);\r
-                        endE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findHome(element);\r
-                        homeE.eq(0).attr('tabindex', 0);\r
-                        homeE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        if (!isRoot(element)) {\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.eq(0).attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                            parentE.eq(0).triggerHandler('click');\r
-                        } else {\r
-                            if (element.find('a').eq(0).hasClass('active')) {\r
-                                element.triggerHandler('click');\r
-                            }\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        if (!(isRoot(element) && element[0].previousElementSibling === null)) {\r
-                            element.attr('tabindex', -1);\r
-                            findUp(element);\r
-                            upE.eq(0).attr('tabindex', 0);\r
-                            upE[0].focus();\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        if (element.attr("b2b-ml-nav") !== "endNode") {\r
-                            if (!element.find('a').eq(0).hasClass('active')) {\r
-                                element.triggerHandler('click');\r
-                            }\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();\r
-                        }\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        if (!(element.attr("b2b-ml-nav") === "middleNode" && element.find('a').eq(0).hasClass('active')) && (element.next().length === 0)) {\r
-                            if(element.parent().parent().attr("b2b-ml-nav") !== "rootNode" && element.parent().parent()[0].nextElementSibling !== null)\r
-                            {\r
-                                findDown(element.find('a').eq(0));\r
-                                downE.eq(0).attr('tabindex', 0);\r
-                                downE[0].focus();\r
-                                evt.stopPropagation();\r
-                                break;\r
-                            }\r
-                            findRoot(element);\r
-                            if (!(rootE.next().length === 0)) {\r
-                                rootE.next().eq(0).attr('tabindex', 0);\r
-                                rootE.next()[0].focus();\r
-                            } else {\r
-                                rootE.eq(0).attr('tabindex', 0);\r
-                                rootE[0].focus();\r
-                            }\r
-                            evt.stopPropagation();\r
-                            break;\r
-                        }\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:multipurposeExpander\r
- *\r
- * @description\r
- *  <file src="src/multipurposeExpander/docs/readme.md" />\r
- *\r
- * @usage\r
- * <!--With Close Other -->\r
- * <b2b-expander-group close-others="true">\r
- *  <b2b-expanders class="mpc-expanders" is-open="testmpc">            \r
- *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc, 'b2b-toggle-header-inactive': testmpc } ">Heading content goes here</b2b-expander-heading>               \r
- *      <b2b-expander-body>\r
-            <p>body content goes here</p>\r
-        </b2b-expander-body>\r
- *  </b2b-expanders>\r
- *  </b2b-expander-group>\r
- *  \r
- * <!-- Without Close Other -->\r
- *  <b2b-expanders class="mpc-expanders" is-open="testmpc2">            \r
- *      <b2b-expander-heading ng-class=" { 'b2b-toggle-header-active': !testmpc2, 'b2b-toggle-header-inactive': testmpc2 } ">Heading content goes here</b2b-expander-heading>               \r
- *      <b2b-expander-body>\r
-            <p>body content goes here</p>\r
-        </b2b-expander-body>\r
- *  </b2b-expanders>\r
- *  \r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att.multipurposeExpander">\r
-            <file src="src/multipurposeExpander/docs/demo.html" />\r
-            <file src="src/multipurposeExpander/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.multipurposeExpander', ['b2b.att', 'b2b.att.collapse'])\r
-.directive('b2bExpanderGroup', function () {\r
-    return {\r
-        restrict: 'EA',\r
-        transclude: true,\r
-        template: "<ng-transclude></ng-transclude>",\r
-        controller:['$scope','$attrs', function($scope,$attrs){\r
-            this.groups = [];\r
-            this.index = -1;            \r
-            this.scope = $scope;\r
-            \r
-            this.addGroup = function (groupScope) {\r
-                var that = this;\r
-                groupScope.index = this.groups.length;\r
-                this.groups.push(groupScope);\r
-                if(this.groups.length > 0){\r
-                    this.index = 0;\r
-                }\r
-                groupScope.$on('$destroy', function () {\r
-                that.removeGroup(groupScope);\r
-            });\r
-            };\r
-\r
-            this.closeOthers = function (openGroup) {\r
-                var closeOthers = angular.isDefined($attrs.closeOthers);\r
-                if (closeOthers && !$scope.forceExpand) {\r
-                    angular.forEach(this.groups, function (group) {\r
-                        if (group !== openGroup) {\r
-                            group.isOpen = false;\r
-                        }\r
-                    });\r
-                }\r
-                if (this.groups.indexOf(openGroup) === (this.groups.length - 1) && $scope.forceExpand) {\r
-                    $scope.forceExpand = false;\r
-                }\r
-            };\r
-            this.removeGroup = function (group) {\r
-            var index = this.groups.indexOf(group);\r
-            if (index !== -1) {\r
-                this.groups.splice(this.groups.indexOf(group), 1);\r
-            }\r
-        };\r
-        }]\r
-       \r
-    };\r
-    \r
-})\r
-.directive('b2bExpanders', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        replace: true,\r
-        require:['b2bExpanders','?^b2bExpanderGroup'],\r
-        transclude: true,\r
-        scope:{isOpen:'=?'},\r
-        template: "<div ng-transclude></div>",\r
-        controller: ['$scope', function ($scope){\r
-                var bodyScope = null;\r
-                var expanderScope = null;\r
-                this.isOpened = function(){                \r
-                    if($scope.isOpen)\r
-                    {\r
-                        return  true;\r
-                    }else\r
-                    {\r
-                        return false;\r
-                    }\r
-                };                \r
-                this.setScope = function (scope) {\r
-                    bodyScope = scope; \r
-                    bodyScope.isOpen = $scope.isOpen;                   \r
-                };                \r
-                this.setExpanderScope = function (scope) {\r
-                    expanderScope = scope;                                   \r
-                };\r
-                this.toggle = function () {\r
-                    $scope.isOpen = bodyScope.isOpen = !bodyScope.isOpen;                    \r
-                    return bodyScope.isOpen;\r
-                    \r
-                };\r
-                this.watchToggle = function(io){ \r
-                    bodyScope.isOpen = io;\r
-                    expanderScope.updateIcons(io);\r
-                };  \r
-            }],\r
-        link: function (scope, elem, attr, myCtrl)\r
-        {\r
-            //scope.isOpen = false; \r
-            if(myCtrl[1]){\r
-                myCtrl[1].addGroup(scope);\r
-            }\r
-            scope.$watch('isOpen', function(val){                               \r
-                myCtrl[0].watchToggle(scope.isOpen);\r
-                if(val && myCtrl[1]){\r
-                    myCtrl[1].closeOthers(scope);\r
-                }\r
-            });            \r
-        }\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderHeading', function () {\r
-    return{\r
-        require: "^b2bExpanders",\r
-        restrict: 'EA',\r
-        replace: true,\r
-        transclude: true,\r
-        scope: true,\r
-        template: "<div style='padding:10px 10px 10px 0 !important' ng-transclude></div>"\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderBody', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        require: "^b2bExpanders",\r
-        replace: true,\r
-        transclude: true,\r
-        scope: {},\r
-        template: "<div b2b-collapse='!isOpen' ><div ng-transclude></div></div>",\r
-        link: function (scope, elem, attr, myCtrl) {\r
-            scope.isOpen = false;\r
-            myCtrl.setScope(scope);\r
-        }\r
-    };\r
-})\r
-\r
-.directive('b2bExpanderToggle', function () {\r
-    return{\r
-        restrict: 'EA',\r
-        require: "^b2bExpanders",\r
-        scope: {\r
-            expandIcon: '@',\r
-            collapseIcon: '@'\r
-        },\r
-        \r
-        link: function (scope, element, attr, myCtrl)\r
-        {\r
-            myCtrl.setExpanderScope(scope);\r
-            var isOpen = myCtrl.isOpened();   \r
-\r
-            scope.setIcon = function () {\r
-                element.attr("role", "tab");\r
-\r
-                if (scope.expandIcon && scope.collapseIcon)\r
-                {\r
-                    if (isOpen) {\r
-                        element.removeClass(scope.expandIcon);\r
-                        element.addClass(scope.collapseIcon);\r
-\r
-                        element.attr("aria-expanded", "true");\r
-                    }\r
-                    else {\r
-                        element.removeClass(scope.collapseIcon);\r
-                        element.addClass(scope.expandIcon);\r
-\r
-                        element.attr("aria-expanded", "false");\r
-                    }\r
-                }                               \r
-            };\r
-            \r
-            element.bind('click', function (){\r
-                scope.toggleit();\r
-            });\r
-            scope.updateIcons = function(nStat){\r
-                isOpen = nStat;\r
-                scope.setIcon();                \r
-            };\r
-            scope.toggleit = function (){\r
-                isOpen = myCtrl.toggle();\r
-                scope.setIcon();\r
-                scope.$apply();\r
-            };                    \r
-            scope.setIcon();\r
-        }\r
-    };\r
-});\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:notesMessagesAndErrors\r
- *\r
- * @description\r
- *  <file src="src/notesMessagesAndErrors/docs/readme.md" />\r
- *\r
- * @usage\r
- *  See Demo\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/notesMessagesAndErrors/docs/demo.html" />\r
-            <file src="src/notesMessagesAndErrors/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.notesMessagesAndErrors', []);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Notification Card\r
- * \r
- * @description \r
- *  <file src="src/notificationCardTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/notificationCardTemplate/docs/demo.html" /> \r
-            <file src="src/notificationCardTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.notificationCardTemplate', [])\r
-  \r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Order Confirmation Template\r
- * \r
- * @description \r
- *  <file src="src/orderConfirmationTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <b>HTML + AngularJS</b> \r
-        <example module="b2b.att"> \r
-            <file src="src/orderConfirmationTemplate/docs/demo.html" /> \r
-            <file src="src/orderConfirmationTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.orderConfirmationTemplate', []);\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:pagination\r
- *\r
- * @description\r
- *  <file src="src/pagination/docs/readme.md" />\r
- *\r
- * @usage\r
- *   <div b2b-pagination="" input-id="goto-page-2" total-pages="totalPages1" current-page="currentPage1" click-handler="customHandler" show-input="showInput"></div> \r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/pagination/docs/demo.html" />\r
-            <file src="src/pagination/docs/demo.js" />\r
-       </example>\r
-        </section>\r
- *\r
- */\r
-angular.module('b2b.att.pagination', ['b2b.att.utilities', 'ngTouch'])\r
-    .directive('b2bPagination', ['b2bUserAgent', 'keymap', '$window', '$timeout', function (b2bUserAgent, keymap, $window, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                totalPages: '=',\r
-                currentPage: '=',\r
-                showInput: '=',\r
-                clickHandler: '=?',\r
-                inputId: '='\r
-            },\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/pagination/b2b-pagination.html',\r
-            link: function (scope, elem) {\r
-                scope.isMobile = b2bUserAgent.isMobile();\r
-                scope.notMobile = b2bUserAgent.notMobile();\r
-                scope.focusedPage;\r
-                scope.meanVal = 3;\r
-                scope.$watch('totalPages', function (value) {\r
-                    if (angular.isDefined(value) && value !== null) {\r
-                        scope.pages = [];\r
-                        if (value < 1) {\r
-                            scope.totalPages = 1;\r
-                            return;\r
-                        }\r
-                        if (value <= 10) {\r
-                            for (var i = 1; i <= value; i++) {\r
-                                scope.pages.push(i);\r
-                            }\r
-                        } else if (value > 10) {\r
-                            var midVal = Math.ceil(value / 2);\r
-                            scope.pages = [midVal - 2, midVal - 1, midVal, midVal + 1, midVal + 2];\r
-                        }\r
-                        if(scope.currentPage === undefined || scope.currentPage === 1)\r
-                        {\r
-                            currentPageChanged(1);\r
-                        }\r
-                    }\r
-                });\r
-                scope.$watch('currentPage', function (value) {\r
-                    currentPageChanged(value);\r
-                    callbackHandler(value);\r
-                });\r
-                var callbackHandler = function (num) {\r
-                    if (angular.isFunction(scope.clickHandler)) {\r
-                        scope.clickHandler(num);\r
-                    }\r
-                };\r
-\r
-                function currentPageChanged(value) {\r
-                    if (angular.isDefined(value) && value !== null) {\r
-                        if (!value || value < 1) {\r
-                            value = 1;\r
-                        }\r
-                        if (value > scope.totalPages) {\r
-                            value = scope.totalPages;\r
-                        }\r
-                        if (scope.currentPage !== value) {\r
-                            scope.currentPage = value;\r
-                            callbackHandler(scope.currentPage);\r
-                        }\r
-                        if (scope.totalPages > 10) {\r
-                            var val = parseInt(value);\r
-                            if (val <= 6) {\r
-                                scope.pages = [1, 2, 3, 4, 5, 6, 7, 8];\r
-                            } else if (val > 6 && val <= scope.totalPages - 5) {\r
-                                scope.pages = [val - 1, val, val + 1];\r
-                            } else if (val >= scope.totalPages - 5) {\r
-                                scope.pages = [scope.totalPages - 7, scope.totalPages - 6, scope.totalPages - 5, scope.totalPages - 4, scope.totalPages - 3, scope.totalPages - 2, scope.totalPages - 1, scope.totalPages];\r
-                            }\r
-                        }\r
-                        if (scope.isMobile) {\r
-                            var inWidth = $window.innerWidth;\r
-                            var viewLimit = 7;\r
-                            if (inWidth <= 400) {\r
-                                viewLimit = 7;\r
-                            } else if (inWidth > 400 && inWidth < 500) {\r
-                                viewLimit = 9;\r
-                            } else if (inWidth >= 500 && inWidth < 600) {\r
-                                viewLimit = 11;\r
-                            } else if (inWidth >= 600 && inWidth < 700) {\r
-                                viewLimit = 13;\r
-                            } else if (inWidth >= 700 && inWidth < 800) {\r
-                                viewLimit = 15;\r
-                            }\r
-\r
-                            var val = parseInt(value);\r
-\r
-                            scope.meanVal = Math.floor(viewLimit / 2);\r
-                            var lowerLimit = (val - scope.meanVal) < 1 ? 1 : val - scope.meanVal;\r
-                            var upperLimit = (lowerLimit + viewLimit - 1) > scope.totalPages ? scope.totalPages : lowerLimit + viewLimit - 1;\r
-                            scope.pages = [];\r
-                            for (var i = lowerLimit; i <= upperLimit; i++) {\r
-                                scope.pages.push(i);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-                scope.gotoKeyClick = function (keyEvent) {\r
-                  if (keyEvent.which === keymap.KEY.ENTER) {\r
-                    scope.gotoBtnClick()\r
-                  }\r
-                }\r
-                scope.gotoBtnClick = function () {\r
-                    currentPageChanged(parseInt(scope.gotoPage)); \r
-                    callbackHandler(scope.currentPage);\r
-                    var qResult = elem[0].querySelector('button');\r
-                    angular.element(qResult).attr('disabled','true');\r
-                    $timeout(function(){\r
-                        elem[0].querySelector('.b2b-pager__item--active').focus();\r
-                    }, 50); \r
-                    scope.gotoPage = null;               \r
-                }\r
-                scope.onfocusIn = function(evt)\r
-                {\r
-                    var qResult = elem[0].querySelector('button');\r
-                    angular.element(qResult).removeAttr('disabled');\r
-                }\r
-                scope.onfocusOut = function(evt)\r
-                {\r
-                    if(evt.target.value === "")\r
-                    {\r
-                        var qResult = elem[0].querySelector('button');\r
-                        angular.element(qResult).attr('disabled','true');\r
-                    }                    \r
-                }\r
-                scope.next = function (event) {\r
-                    if (event != undefined) {\r
-                        event.preventDefault();\r
-                    }\r
-                    if (scope.currentPage < scope.totalPages) {\r
-                        scope.currentPage += 1;\r
-                        callbackHandler(scope.currentPage);\r
-                    }\r
-                };\r
-                scope.prev = function (event) {\r
-                    if (event != undefined) {\r
-                        event.preventDefault();\r
-                    }\r
-                    if (scope.currentPage > 1) {\r
-                        scope.currentPage -= 1;\r
-                        callbackHandler(scope.currentPage);\r
-                    }\r
-                };\r
-                scope.selectPage = function (value, event) {\r
-                    event.preventDefault();\r
-                    scope.currentPage = value;\r
-                    scope.focusedPage = value;\r
-                    callbackHandler(scope.currentPage);\r
-                };\r
-                scope.checkSelectedPage = function (value) {\r
-                    if (scope.currentPage === value) {\r
-                        return true;\r
-                    }\r
-                    return false;\r
-                };\r
-                scope.isFocused = function (page) {\r
-                    return scope.focusedPage === page;\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:paneSelector\r
- *\r
- * @description\r
- *  <file src="src/paneSelector/docs/readme.md" />\r
- *\r
- * @usage\r
- *  Please refer demo.html tab in Example section below.\r
- *\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/paneSelector/docs/demo.html" />\r
-            <file src="src/paneSelector/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.paneSelector', ['b2b.att.tabs', 'b2b.att.utilities'])\r
-\r
-.filter('paneSelectorSelectedItemsFilter', [function () {\r
-    return function (listOfItemsArray) {\r
-\r
-        if (!listOfItemsArray) {\r
-            listOfItemsArray = [];\r
-        }\r
-\r
-        var returnArray = [];\r
-\r
-        for (var i = 0; i < listOfItemsArray.length; i++) {\r
-            if (listOfItemsArray[i].isSelected) {\r
-                returnArray.push(listOfItemsArray[i]);\r
-            }\r
-        }\r
-\r
-        return returnArray;\r
-    };\r
-}])\r
-\r
-.filter('paneSelectorFetchChildItemsFilter', [function () {\r
-    return function (listOfItemsArray) {\r
-\r
-        if (!listOfItemsArray) {\r
-            listOfItemsArray = [];\r
-        }\r
-\r
-        var returnArray = [];\r
-\r
-        for (var i = 0; i < listOfItemsArray.length; i++) {\r
-            for (var j = 0; j < listOfItemsArray[i].childItems.length; j++) {\r
-                returnArray.push(listOfItemsArray[i].childItems[j]);\r
-            }\r
-        }\r
-\r
-        return returnArray;\r
-    };\r
-}])\r
-\r
-.directive('b2bPaneSelector', [function () {\r
-    return {\r
-        restrict: 'AE',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/paneSelector/paneSelector.html',\r
-        transclude: true,\r
-        scope: {}\r
-    };\r
-}])\r
-\r
-.directive('b2bPaneSelectorPane', [ function () {\r
-    return {\r
-        restrict: 'AE',\r
-        replace: true,\r
-        templateUrl: 'b2bTemplate/paneSelector/paneSelectorPane.html',\r
-        transclude: true,\r
-        scope: {}\r
-    };\r
-}])\r
-\r
-.directive('b2bTabVertical', ['$timeout', 'keymap', function ($timeout, keymap) {\r
-    return {\r
-        restrict: 'A',\r
-        require: '^b2bTab',\r
-        link: function (scope, element, attr, b2bTabCtrl) {\r
-\r
-            if (!b2bTabCtrl) {\r
-                return;\r
-            }\r
-\r
-            // retreive the isolateScope\r
-            var iScope = angular.element(element).isolateScope();\r
-\r
-            $timeout(function () {\r
-                angular.element(element[0].querySelector('a')).unbind('keydown');\r
-                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {\r
-\r
-                    if (!(evt.keyCode)) {\r
-                        evt.keyCode = evt.which;\r
-                    }\r
-\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            evt.preventDefault();\r
-                            iScope.nextKey();\r
-                            break;\r
-\r
-                        case keymap.KEY.UP:\r
-                            evt.preventDefault();\r
-                            iScope.previousKey();\r
-                            break;\r
-\r
-                        default:;\r
-                    }\r
-                });\r
-            });\r
-        }\r
-    };\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:phoneNumberInput\r
- *\r
- * @description\r
- *  <file src="src/phoneNumberInput/docs/readme.md" />\r
- *\r
- * @usage\r
-<form name="userForm1">\r
-    <div class="form-row" ng-class="{'error':!userForm1.text.$valid && userForm1.text.$dirty}">\r
-        <label>Phone Mask<span style="color:red">*</span>: (npa) nxx-line &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Model Value: {{mask.text}}</label>\r
-        <div>\r
-            <input b2b-phone-mask="phoneMask" name="text" ng-model="mask.text" type="text" placeholder="e.g. (123) 456-7890" title="Phone Number" class="b2b-phone-mask-input" required />\r
-            <div ng-messages="userForm1.text.$error" class="error-msg" aria-live="polite" aria-atomic="true">\r
-                <span ng-message="required" role="alert">This field is mandatory!</span>\r
-                <span ng-message="invalidPhoneNumber" role="alert">Please enter valid phone number!</span>\r
-                <span ng-message="mask" role="alert">Please enter valid phone number!</span>\r
-            </div>\r
-        </div>\r
-    </div>\r
-</form>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/phoneNumberInput/docs/demo.html" />\r
-            <file src="src/phoneNumberInput/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.phoneNumberInput', ['ngMessages', 'b2b.att.utilities'])\r
-    .constant("CoreFormsUiConfig", {\r
-        phoneMask: '(___) ___-____',\r
-        phoneMaskDot: '___.___.____',\r
-        phoneMaskHyphen: '___-___-____'\r
-    })\r
-    .directive('b2bPhoneMask', ['$parse', 'CoreFormsUiConfig', 'keymap', function ($parse, CoreFormsUiConfig, keymap) {\r
-        return {\r
-            require: 'ngModel',\r
-            scope: {\r
-                ngModel: '='\r
-            },\r
-            link: function (scope, iElement, iAttrs, ctrl) {\r
-                var navigatorAgent = navigator.userAgent.toLowerCase(),\r
-                    isAndroid = navigatorAgent.indexOf("android") > -1,\r
-                    oldIE = navigatorAgent.indexOf('msie 8.0') !== -1;\r
-                var mask = '';\r
-                var validPhoneNumber = false;\r
-                var currentKey = '';\r
-                if (isAndroid) {\r
-                    mask = "__________";\r
-                } else {\r
-                    switch (iAttrs.b2bPhoneMask) {\r
-                    case "phoneMask":\r
-                        mask = CoreFormsUiConfig.phoneMask;\r
-                        break;\r
-                    case "phoneMaskDot":\r
-                        mask = CoreFormsUiConfig.phoneMaskDot;\r
-                        break;\r
-                    case "phoneMaskHyphen":\r
-                        mask = CoreFormsUiConfig.phoneMaskHyphen;\r
-                        break;\r
-                    default:\r
-                        mask = CoreFormsUiConfig.phoneMask;\r
-                    }\r
-                }\r
-                iElement.attr("maxlength", mask.length);\r
-                var checkValidity = function (unmaskedValue, rawValue) {\r
-                    var valid = false;\r
-                    if (angular.isUndefined(rawValue) || rawValue === '') {\r
-                        valid = true;\r
-                    } else if (unmaskedValue) {\r
-                        valid = (unmaskedValue.length === 10);\r
-                    }\r
-                    ctrl.$setValidity('invalidPhoneNumber', validPhoneNumber);\r
-                    ctrl.$setValidity('mask', valid);\r
-                    return valid;\r
-                };\r
-                var handleKeyup = function (evt) {\r
-\r
-                    if (evt && evt.keyCode === keymap.KEY.SHIFT) {\r
-                        return;\r
-                    }\r
-\r
-                    var index, formattedNumber;\r
-                    if (ctrl.$modelValue) {\r
-                        formattedNumber = ctrl.$modelValue;\r
-                    } else {\r
-                        formattedNumber = iElement.val();\r
-                    }\r
-                    if (!formattedNumber.length && currentKey === '') {\r
-                        return;\r
-                    }\r
-                    var maskLength, inputNumbers, maskArray, tempArray, maskArrayLength;\r
-                    tempArray = [];\r
-                    maskArray = mask.split("");\r
-                    maskArrayLength = maskArray.length;\r
-                    maskLength = formattedNumber.substring(0, mask.length);\r
-                    inputNumbers = formattedNumber.replace(/[^0-9]/g, "").split("");\r
-                    for (index = 0; index < maskArrayLength; index++) {\r
-                        tempArray.push(maskArray[index] === "_" ? inputNumbers.shift() : maskArray[index]);\r
-                        if (inputNumbers.length === 0) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    formattedNumber = tempArray.join("");\r
-                    if (formattedNumber === '(') {\r
-                        formattedNumber = '';\r
-                    }\r
-\r
-                    if ( (angular.isDefined(evt) && evt.which) && currentKey !== '') {\r
-                        if (maskArray[0] === currentKey && formattedNumber === '') {\r
-                            formattedNumber = '(';\r
-                        } else if (evt.which === keymap.KEY.SPACE && currentKey === ' ') {\r
-                            formattedNumber = formattedNumber + ') ';\r
-                        } else if (maskArray[0] === currentKey && formattedNumber === '') {\r
-                            formattedNumber = formattedNumber + currentKey;\r
-                        } else if (maskArray[formattedNumber.length] === currentKey) {\r
-                            formattedNumber = formattedNumber + currentKey;\r
-                        }\r
-                        currentKey = '';\r
-                    }\r
-\r
-                    ctrl.$setViewValue(formattedNumber);\r
-                    ctrl.$render();\r
-                    return formattedNumber;\r
-                };\r
-\r
-\r
-                // since we are only allowing 0-9, why even let the keypress go forward?\r
-                // also added in delete... in case they want to delete :)\r
-                var handlePress = function (e) {\r
-                    if (e.which) {\r
-                        if ((e.which < 48 || e.which > 57) && (e.which < 96 || e.which > 105)) {\r
-                            if (e.which !== keymap.KEY.BACKSPACE && e.which !== keymap.KEY.TAB && e.which !== keymap.KEY.DELETE && e.which !== keymap.KEY.ENTER && e.which !== keymap.KEY.LEFT && e.which !== keymap.KEY.RIGHT &&\r
-                                // Allow: Ctrl+V/v\r
-                                (!(e.ctrlKey) && (e.which !== '118' || e.which !== '86')) &&\r
-                                // Allow: Ctrl+C/c\r
-                                (!(e.ctrlKey) && (e.which !== '99' || e.which !== '67')) &&\r
-                                // Allow: Ctrl+X/x\r
-                                (!(e.ctrlKey) && (e.which !== '120' || e.which !== '88'))) {\r
-                                e.preventDefault ? e.preventDefault() : e.returnValue = false;\r
-                                iElement.attr("aria-label", "Only numbers are allowed");\r
-                                validPhoneNumber = false;\r
-                            }\r
-                        } else {\r
-                            iElement.removeAttr("aria-label");\r
-                            validPhoneNumber = true;\r
-                        }\r
-\r
-                        setCurrentKey(e);\r
-                    }\r
-                    scope.$apply();\r
-                };\r
-                // i moved this out because i thought i might need focus as well..\r
-                // to handle setting the model as the view changes\r
-                var parser = function (fromViewValue) {\r
-                    var letters = /^[A-Za-z]+$/;\r
-                    var numbers = /^[0-9]+$/;\r
-                    if (angular.isUndefined(fromViewValue) || fromViewValue === '') {\r
-                        validPhoneNumber = true;\r
-                    } else {\r
-                        if (fromViewValue.match(letters)) {\r
-                            validPhoneNumber = false;\r
-                        }\r
-                        if (fromViewValue.match(numbers)) {\r
-                            validPhoneNumber = true;\r
-                        }\r
-                    }\r
-                    var clean = "";\r
-                    if (fromViewValue && fromViewValue.length > 0) {\r
-                        clean = fromViewValue.replace(/[^0-9]/g, '');\r
-                    }\r
-                    checkValidity(clean, fromViewValue);\r
-                    return clean;\r
-                };\r
-\r
-                //to handle reading the model and formatting it\r
-                var formatter = function (fromModelView) {\r
-                    var input = '';\r
-                    checkValidity(fromModelView);\r
-                    if (fromModelView) {\r
-                        input = handleKeyup();\r
-                    }\r
-                    return input;\r
-                };\r
-\r
-                var setCurrentKey = function (e) {\r
-                    switch (e.which) {\r
-                    case 189:\r
-                    case 109:\r
-                        currentKey = '-';\r
-                        break;\r
-                    case 190:\r
-                    case 110:\r
-                        currentKey = '.';\r
-                        break;\r
-                    case 57:\r
-                        if (e.shiftKey === true) {\r
-                            currentKey = '(';\r
-                        }\r
-                        break;\r
-                    case 48:\r
-                        if (e.shiftKey === true) {\r
-                            currentKey = ')';\r
-                        }\r
-                        break;\r
-                    case 32:\r
-                        currentKey = ' ';\r
-                        break;\r
-                    }\r
-                };\r
-\r
-                if (angular.isDefined(scope.ngModel)) {\r
-                    parser(scope.ngModel);\r
-                }\r
-\r
-                ctrl.$parsers.push(parser);\r
-                ctrl.$formatters.push(formatter);\r
-                iElement.bind('keyup', handleKeyup);\r
-                iElement.bind('keydown', handlePress);\r
-            }\r
-        };\r
-}]);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Profile Blocks \r
- * \r
- * @description \r
- *  <file src="src/profileBlockTemplate/docs/readme.md" /> \r
- * @example \r
- *  <section id="code">  \r
-        <example module="b2b.att"> \r
-            <file src="src/profileBlockTemplate/docs/demo.html" /> \r
-            <file src="src/profileBlockTemplate/docs/demo.js" /> \r
-       </example>  \r
-    </section>  \r
- *  \r
- */   \r
-\r
-angular.module('b2b.att.profileBlockTemplate', [])\r
-    \r
-     \r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:profileCard\r
- *\r
- * @description\r
- *  <file src="src/profileCard/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-profile-card></b2b-profile-card>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <example module="b2b.att">\r
-            <file src="src/profileCard/docs/demo.html" />\r
-            <file src="src/profileCard/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.profileCard', ['b2b.att'])\r
-.constant('profileStatus',{\r
-    status: {\r
-        ACTIVE: {\r
-            status: "Active",\r
-            color: "green"\r
-        },\r
-        DEACTIVATED: {\r
-            status: "Deactivated",\r
-            color: "red"\r
-        },\r
-        LOCKED: {\r
-            status: "Locked",\r
-            color: "red"\r
-        },\r
-        IDLE: {\r
-            status: "Idle",\r
-            color: "yellow"\r
-        },\r
-        PENDING: {\r
-            status: "Pending",\r
-            color: "blue"\r
-        }\r
-    },\r
-    role: "COMPANY ADMINISTRATOR"\r
-\r
-})\r
-.directive('b2bProfileCard',['$http','$q','profileStatus', function($http,$q,profileStatus) {\r
-   return {\r
-        restrict: 'EA',\r
-        replace: 'true',\r
-        templateUrl: function(element, attrs){\r
-            if(!attrs.addUser){\r
-                return 'b2bTemplate/profileCard/profileCard.html';\r
-            }\r
-            else{\r
-                return 'b2bTemplate/profileCard/profileCard-addUser.html';\r
-            }\r
-        },\r
-        scope: {\r
-            profile:'=',\r
-            characterLimit: '@'\r
-        },\r
-        link: function(scope, elem, attr){\r
-            scope.characterLimit = parseInt(attr.characterLimit, 10) || 25;\r
-            scope.shouldClip = function(str) {\r
-                return str.length > scope.characterLimit;\r
-            };\r
-\r
-            scope.showEmailTooltip = false;\r
-\r
-            scope.image=true;\r
-            function isImage(src) {\r
-                var deferred = $q.defer();\r
-                var image = new Image();\r
-                image.onerror = function() {\r
-                    deferred.reject(false);\r
-                };\r
-                image.onload = function() {\r
-                    deferred.resolve(true);\r
-                };\r
-                if(src !== undefined && src.length>0 ){\r
-                    image.src = src;\r
-                } else {\r
-                     deferred.reject(false);\r
-                }\r
-                return deferred.promise;\r
-            }\r
-            if(!attr.addUser){\r
-            scope.image=false;\r
-            isImage(scope.profile.img).then(function(img) {\r
-                scope.image=img;\r
-            });\r
-            var splitName=(scope.profile.name).split(' ');\r
-            scope.initials='';\r
-            for(var i=0;i<splitName.length;i++){\r
-                scope.initials += splitName[i][0];\r
-            }\r
-            if(scope.profile.role.toUpperCase() === profileStatus.role){\r
-                scope.badge=true;\r
-            }\r
-            var profileState=profileStatus.status[scope.profile.state.toUpperCase()];\r
-            if(profileState) {\r
-                scope.profile.state=profileStatus.status[scope.profile.state.toUpperCase()].status;\r
-                scope.colorIcon=profileStatus.status[scope.profile.state.toUpperCase()].color;\r
-                if(scope.profile.state.toUpperCase()===profileStatus.status.PENDING.status.toUpperCase()||scope.profile.state.toUpperCase()===profileStatus.status.LOCKED.status.toUpperCase()){\r
-                        scope.profile.lastLogin=scope.profile.state;\r
-                }\r
-            }\r
-            var today=new Date().getTime();\r
-            var lastlogin=new Date(scope.profile.lastLogin).getTime();\r
-            var diff=(today-lastlogin)/(1000*60*60*24);\r
-            if(diff<=1){\r
-                scope.profile.lastLogin="Today";\r
-            }\r
-            else if(diff<=2){\r
-                scope.profile.lastLogin="Yesterday";\r
-            }\r
-        }\r
-    }\r
-};\r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:radios\r
- *\r
- * @description\r
- *  <file src="src/radios/docs/readme.md" />\r
- *\r
- * @usage\r
- *  See demo section\r
- *\r
- * @param {boolean} refreshRadioGroup - A trigger that recalculates and updates the accessibility roles on radios in a group.\r
- * \r
- * @example\r
-    <section id="code">\r
-               <b>HTML + AngularJS</b>\r
-               <example module="b2b.att">\r
-                <file src="src/radios/docs/demo.html" />\r
-                <file src="src/radios/docs/demo.js" />\r
-               </example>\r
-            </section>\r
- */\r
-angular.module('b2b.att.radios', ['b2b.att.utilities'])\r
-.directive('b2bRadioGroupAccessibility', ['$timeout', 'b2bUserAgent', function($timeout, b2bUserAgent) {\r
-    return {\r
-        restrict: "A",\r
-        scope: {\r
-            refreshRadioGroup: "=",\r
-        },\r
-        link: function(scope, ele, attr) {\r
-\r
-            var roleRadioElement, radioProductSelectElement, radioInputTypeElement;\r
-\r
-            $timeout(calculateNumberOfRadio);\r
-\r
-            scope.$watch('refreshRadioGroup', function(value) {\r
-                if (value === true) {\r
-                    addingRoleAttribute();\r
-                    $timeout(calculateNumberOfRadio);\r
-                    scope.refreshRadioGroup = false;\r
-                } else {\r
-                    return;\r
-                }\r
-            })\r
-\r
-\r
-            function calculateNumberOfRadio() {\r
-                roleRadioElement = ele[0].querySelectorAll('[role="radio"]');\r
-\r
-                radioProductSelectElement = ele[0].querySelectorAll('[role="radiogroup"] li.radio-box');\r
-\r
-                radioInputTypeElement = ele[0].querySelectorAll('input[type="radio"]');\r
-\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';\r
-                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';\r
-                    var numOfx = i + 1 + ' of ' + radioInputTypeElement.length;\r
-                    angular.element(roleRadioElement[i]).attr({\r
-                        'aria-checked': isChecked,\r
-                        'aria-disabled': isDisabled,\r
-                        'data-opNum': numOfx\r
-                    });\r
-                    if (b2bUserAgent.notMobile()) {\r
-                        angular.element(roleRadioElement[i]).removeAttr("role");\r
-                    }\r
-\r
-                    if (radioProductSelectElement.length) {\r
-                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');\r
-                    }\r
-\r
-                    if (/Android/i.test(navigator.userAgent)) {\r
-                        angular.element(roleRadioElement[i]).append('<span class="hidden-spoken">. ' + numOfx + '.</span>');\r
-                    }\r
-\r
-\r
-                    angular.element(radioInputTypeElement[i]).bind('click', radioStateChangeonClick);\r
-\r
-                }\r
-            }\r
-\r
-            function addingRoleAttribute() {\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    if (b2bUserAgent.notMobile()) {\r
-                        angular.element(roleRadioElement[i]).attr("role", "radio");\r
-                    }\r
-                }\r
-            }\r
-\r
-            function radioStateChangeonClick() {\r
-                for (var i = 0; i < radioInputTypeElement.length; i++) {\r
-                    var isChecked = radioInputTypeElement[i].checked ? 'true' : 'false';\r
-                    var isDisabled = radioInputTypeElement[i].disabled ? 'true' : 'false';\r
-                    if (radioProductSelectElement.length) {\r
-                        isChecked === 'true' ? angular.element(radioProductSelectElement[i]).addClass('active') : angular.element(radioProductSelectElement[i]).removeClass('active');\r
-                    }\r
-                    angular.element(roleRadioElement[i]).attr({\r
-                        'aria-checked': isChecked,\r
-                        'aria-disabled': isDisabled\r
-                    });\r
-                }\r
-\r
-            }\r
-        }\r
-    }\r
-\r
-}]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:searchField\r
- *\r
- * @description\r
- *  <file src="src/searchField/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <div b2b-search-field dropdown-list="listdata" on-click-callback="clickFn(value)" class="span12" input-model='typedString' config-obj='keyConfigObj'></div>\r
- *\r
- * @example\r
- <section id="code">\r
-    <example module="b2b.att">\r
-    <file src="src/searchField/docs/demo.html" />\r
-    <file src="src/searchField/docs/demo.js" />\r
-    </example>\r
-</section>\r
- */\r
-\r
-angular.module('b2b.att.searchField', ['b2b.att.utilities', 'b2b.att.position'])\r
-    .filter('b2bFilterInput', [function() {\r
-        return function(list, str, keyArray, displayListKey, isContainsSearch, searchSeperator) {\r
-            var res = [];\r
-            var searchLabel;\r
-            var searchCondition;\r
-            var conditionCheck = function(searchSeperator, listItem, displayListKey, splitString) {\r
-                var displayTitle = null;\r
-                if (splitString) {\r
-                    for (var i = 0; i < displayListKey.length; i++) {\r
-                        if (i <= 0) {\r
-                            displayTitle = listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase()) > -1;\r
-                        } else {\r
-                            displayTitle = (splitString[i]) ? displayTitle && listItem[displayListKey[i]].toLowerCase().indexOf(splitString[i].toLowerCase().trim()) > -1 : displayTitle;\r
-                        }\r
-                    }\r
-                } else {\r
-                    angular.forEach(displayListKey, function(value) {\r
-                        if (!displayTitle) {\r
-                            displayTitle = listItem[value];\r
-                        } else {\r
-                            displayTitle = displayTitle + (listItem[value] ? searchSeperator + ' ' + listItem[value] : '');\r
-                        }\r
-                    });\r
-                }\r
-                return displayTitle;\r
-            }\r
-            angular.forEach(list, function(listItem) {\r
-                var splitString = str.indexOf(searchSeperator) > -1 ? str.split(searchSeperator) : false;\r
-                var displayList = conditionCheck(searchSeperator, listItem, displayListKey, splitString)\r
-                for (var i = 0; i < keyArray.length; i++) {\r
-                    searchLabel = keyArray[i];\r
-                    if (listItem[searchLabel]) {\r
-                        if (isContainsSearch) {\r
-                            var displaySearchList = listItem[searchLabel].toLowerCase().indexOf(str.toLowerCase()) > -1;\r
-                            if (splitString.length > 1) {\r
-                                displaySearchList = (splitString.length <= keyArray.length) ? displayList : false;\r
-                            }\r
-                            searchCondition = displaySearchList;\r
-                        } else {\r
-                            searchCondition = listItem[searchLabel].match(new RegExp('^' + str, 'gi'));\r
-                        }\r
-                        if (searchCondition) {\r
-                            res.push({\r
-                                'title': conditionCheck(searchSeperator, listItem, displayListKey),\r
-                                'valueObj': listItem\r
-                            });\r
-                            break;\r
-                        }\r
-                    }\r
-                }\r
-            });\r
-            return res;\r
-        };\r
-    }]).directive('b2bSearchField', ['$filter', 'b2bFilterInputFilter', 'keymap', '$documentBind', '$isElement', '$document', 'events', '$timeout', function($filter, b2bFilterInput, keymap, $documentBind, $isElement, $document, events, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            scope: {\r
-                dataList: '=dropdownList',\r
-                onClickCallback: '&',\r
-                inputModel: '=',\r
-                configObj: '=',\r
-                objModel: '=',\r
-                inputDeny: '=?',\r
-                disabled: '=?'\r
-            },\r
-            replace: true,\r
-            templateUrl: 'b2bTemplate/searchField/searchField.html',\r
-            controller: ['$scope', function($scope) {\r
-                this.searchKeyArray = [];\r
-                if ($scope.configObj.searchKeys) {\r
-                    this.searchKeyArray = $scope.configObj.searchKeys;\r
-                }\r
-                if (angular.isUndefined($scope.disabled)) {\r
-                    $scope.disabled = false;\r
-                }\r
-                this.triggerInput = function(searchString) {\r
-                    $scope.originalInputModel = searchString;\r
-                    if (searchString === '') {\r
-                        $scope.currentIndex = -1;\r
-                        $scope.filterList = [];\r
-                        $scope.showListFlag = false;\r
-                    } else if (searchString !== '' && !$scope.isFilterEnabled) {\r
-                        $scope.filterList = $filter('b2bFilterInput')($scope.dataList, searchString, this.searchKeyArray, $scope.configObj.displayListDataKey, $scope.configObj.isContainsSearch, $scope.configObj.searchSeperator);\r
-                        $scope.showListFlag = true;\r
-                    }\r
-                };\r
-                this.denyRegex = function() {\r
-                    return $scope.inputDeny;\r
-                };\r
-            }],\r
-            link: function(scope, elem) {\r
-                scope.isFilterEnabled = false;\r
-                scope.showListFlag = false;\r
-                scope.currentIndex = -1;\r
-                scope.setCurrentIdx = function(idx) {\r
-                    scope.currentIndex = idx;\r
-                    if (idx > -1) {\r
-                        scope.inputModel = scope.filterList[idx].title;\r
-                        scope.objModel = scope.filterList[idx];\r
-                    }\r
-                };\r
-                scope.isActive = function(index, dropdownLength) {\r
-                    scope.dropdownLength = dropdownLength;\r
-                    return scope.currentIndex === index;\r
-                };\r
-                scope.selectItem = function(idx) {\r
-                    scope.setCurrentIdx(idx);\r
-                    scope.onClickCallback({\r
-                        value: scope.inputModel,\r
-                        objValue: scope.objModel\r
-                    });\r
-                    scope.showListFlag = false;\r
-                    $timeout(function() {\r
-                        elem.find('div').find('input')[0].focus();\r
-                    }, 150);\r
-                };\r
-                scope.startSearch = function() {\r
-                    scope.onClickCallback({\r
-                        value: scope.inputModel,\r
-                        objValue: scope.objModel\r
-                    });\r
-                };\r
-                scope.selectPrev = function() {\r
-                    if (scope.currentIndex > 0 && scope.filterList.length > 0) {\r
-                        scope.currentIndex = scope.currentIndex - 1;\r
-                        scope.setCurrentIdx(scope.currentIndex);\r
-                    } else if (scope.currentIndex === 0) {\r
-                        scope.currentIndex = scope.currentIndex - 1;\r
-                        scope.inputModel = scope.originalInputModel;\r
-                        scope.isFilterEnabled = true;\r
-                    }\r
-                };\r
-                scope.selectNext = function() {\r
-                    if (scope.currentIndex < scope.configObj.noOfItemsDisplay - 1) {\r
-                        if (scope.currentIndex < scope.filterList.length - 1) {\r
-                            scope.currentIndex = scope.currentIndex + 1;\r
-                            scope.setCurrentIdx(scope.currentIndex);\r
-                        }\r
-                    }\r
-                };\r
-                scope.selectCurrent = function() {\r
-                    scope.selectItem(scope.currentIndex);\r
-                };\r
-                scope.selectionIndex = function(e) {\r
-                    switch (e.keyCode) {\r
-                        case keymap.KEY.DOWN:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectNext();\r
-                            break;\r
-                        case keymap.KEY.UP:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectPrev();\r
-                            break;\r
-                        case keymap.KEY.ENTER:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = true;\r
-                            scope.selectCurrent();\r
-                            break;\r
-                        case keymap.KEY.ESC:\r
-                            events.preventDefault(e);\r
-                            scope.isFilterEnabled = false;\r
-                            scope.showListFlag = false;\r
-                            scope.inputModel = '';\r
-                            break;\r
-                        default:\r
-                            scope.isFilterEnabled = false;\r
-                            break;\r
-                    }\r
-                    if (elem[0].querySelector('.filtercontainer')) {\r
-                        elem[0].querySelector('.filtercontainer').scrollTop = (scope.currentIndex - 1) * 35;\r
-                    }\r
-                };\r
-                scope.$watch('filterList', function(newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        scope.currentIndex = -1;\r
-                    }\r
-                });\r
-                scope.blurInput = function() {\r
-                    $timeout(function() {\r
-                        scope.showListFlag = false;\r
-                    }, 150);\r
-                };\r
-                var outsideClick = function(e) {\r
-                    var isElement = $isElement(angular.element(e.target), elem.find('ul').eq(0), $document);\r
-                    if (!isElement && document.activeElement.tagName.toLowerCase() !== 'input') {\r
-                        scope.showListFlag = false;\r
-                        scope.$apply();\r
-                    }\r
-                };\r
-                $documentBind.click('showListFlag', outsideClick, scope);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bSearchInput', [function() {\r
-        return {\r
-            restrict: 'A',\r
-            require: ['ngModel', '^b2bSearchField'],\r
-            link: function(scope, elem, attr, ctrl) {\r
-                var ngModelCtrl = ctrl[0];\r
-                var attSearchBarCtrl = ctrl[1];\r
-                var REGEX = ctrl[1].denyRegex();\r
-                var parser = function(viewValue) {\r
-                    attSearchBarCtrl.triggerInput(viewValue);\r
-                    return viewValue;\r
-                };\r
-                ngModelCtrl.$parsers.push(parser);\r
-\r
-                if (REGEX !== undefined || REGEX !== '') {\r
-                    elem.bind('input', function() {\r
-                        var inputString = ngModelCtrl.$viewValue && ngModelCtrl.$viewValue.replace(REGEX, '');\r
-                        if (inputString !== ngModelCtrl.$viewValue) {\r
-                            ngModelCtrl.$setViewValue(inputString);\r
-                            ngModelCtrl.$render();\r
-                            scope.$apply();\r
-                        }\r
-                    });\r
-                }\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:Seek bar\r
- *\r
- * @description\r
- *  <file src="src/seekBar/docs/readme.md" />\r
- *\r
- * @usage\r
- *  Horizontal Seek Bar\r
- *  <b2b-seek-bar min="0" max="400" step="1" skip-interval="1" data-ng-model="horizontalSeekBarVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()"></b2b-seek-bar>\r
-\r
- *  Vertical Seek Bar\r
- *  <b2b-seek-bar min="0" max="1" step="0.01" skip-interval="0.1" vertical data-ng-model="verticalSeekBarVal" style=" width: 6px; height: 180px; margin: auto;"></b2b-seek-bar>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/seekBar/docs/demo.html" />\r
-            <file src="src/seekBar/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.seekBar', ['b2b.att.utilities','b2b.att.position'])\r
-        .constant('b2bSeekBarConfig', {\r
-            'min': 0,\r
-            'max': 100,\r
-            'step': 1,\r
-            'skipInterval': 1\r
-        })\r
-        .directive('b2bSeekBar', ['$documentBind', 'events', 'b2bSeekBarConfig', 'keymap', '$compile', function($documentBind, events, b2bSeekBarConfig, keymap, $compile) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    replace: true,\r
-                    require: 'ngModel',\r
-                    templateUrl: 'b2bTemplate/seekBar/seekBar.html',\r
-                    scope: {\r
-                        onDragEnd: '&?',\r
-                        onDragInit: '&?'\r
-                    },\r
-                    link: function(scope, elm, attr, ngModelCtrl) {\r
-                        scope.isDragging = false;\r
-                        scope.verticalSeekBar = false;\r
-                        var min;\r
-                        var max;\r
-                        var step = b2bSeekBarConfig.step;\r
-                        var skipInterval = b2bSeekBarConfig.skipInterval;\r
-                        var knob = angular.element(elm[0].querySelector('.b2b-seek-bar-knob-container'));\r
-                        var seekBarKnob = angular.element(knob[0].querySelector('.b2b-seek-bar-knob'));\r
-                        var trackContainer = angular.element(elm[0].querySelector('.b2b-seek-bar-track-container'));\r
-                        var trackFill = angular.element(elm[0].querySelector('.b2b-seek-bar-track-fill'));\r
-                        var trackContainerRect = {};\r
-                        var axisPosition;\r
-                        var trackFillOrderPositioning;\r
-\r
-                        if (angular.isDefined(attr.vertical)) {\r
-                            scope.verticalSeekBar = true;\r
-                            axisPosition = "clientY";\r
-                        }\r
-                        else {\r
-                            scope.verticalSeekBar = false;\r
-                            axisPosition = "clientX";\r
-                        }\r
-                        var getValidStep = function(val) {\r
-                            val = parseFloat(val);\r
-                            // in case $modelValue came in string number\r
-                            if (angular.isNumber(val)) {\r
-                                val = Math.round((val - min) / step) * step + min;\r
-                                return Math.round(val * 1000) / 1000;\r
-                            }\r
-                        };\r
-\r
-                        var getPositionToPercent = function(x) {\r
-                            if (scope.verticalSeekBar) {\r
-                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));\r
-                            }\r
-                            else {\r
-                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));\r
-                            }\r
-                        };\r
-\r
-                        var getPercentToValue = function(percent) {\r
-                            return (min + percent * (max - min));\r
-                        };\r
-\r
-                        var getValueToPercent = function(val) {\r
-                            return (val - min) / (max - min);\r
-                        };\r
-\r
-                        var getValidMinMax = function(val) {\r
-                            return Math.max(min, Math.min(max, val));\r
-                        };\r
-\r
-                        var updateTrackContainerRect = function() {\r
-                            trackContainerRect = trackContainer[0].getBoundingClientRect();\r
-                            if (scope.verticalSeekBar) {\r
-                                if (!trackContainerRect.height) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.height;\r
-                                }\r
-                            }\r
-                            else {\r
-                                if (!trackContainerRect.width) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.width;\r
-                                }\r
-\r
-                            }\r
-\r
-                        };\r
-\r
-                        var updateKnobPosition = function(percent) {\r
-                            var percentStr = (percent * 100) + '%';\r
-                            if (scope.verticalSeekBar) {\r
-                                knob.css('bottom', percentStr);\r
-                                trackFill.css('height', percentStr);\r
-                            }\r
-                            else {\r
-                                knob.css('left', percentStr);\r
-                                trackFill.css('width', percentStr);\r
-                            }\r
-                        };\r
-\r
-                        var modelRenderer = function() {\r
-                            if (isNaN(ngModelCtrl.$viewValue)) {\r
-                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;\r
-                            }\r
-\r
-                            var viewVal = ngModelCtrl.$viewValue;\r
-                            scope.currentModelValue = viewVal;\r
-\r
-                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation\r
-                            if ((min || min === 0) && max && step) {\r
-                                updateKnobPosition(getValueToPercent(viewVal));\r
-                            }\r
-                        };\r
-\r
-                        var setModelValue = function(val) {\r
-                            scope.currentModelValue = getValidMinMax(getValidStep(val));\r
-                            ngModelCtrl.$setViewValue(scope.currentModelValue);\r
-                        };\r
-\r
-                        var updateMin = function(val) {\r
-                            min = parseFloat(val);\r
-                            if(isNaN(min)){\r
-                               min = b2bSeekBarConfig.min; \r
-                            }\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateMax = function(val) {\r
-                            max = parseFloat(val);\r
-                            if(isNaN(max)){\r
-                               max = b2bSeekBarConfig.max; \r
-                            }\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateStep = function(val) {\r
-                            step = parseFloat(val);\r
-                            if (!attr['skipInterval']) {\r
-                                skipInterval = step;\r
-                            }\r
-                        };\r
-\r
-                        var updateSkipInterval = function(val) {\r
-                            skipInterval = step * Math.ceil(val / (step!==0?step:1));\r
-                        };\r
-\r
-                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(b2bSeekBarConfig.min);\r
-                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(b2bSeekBarConfig.max);\r
-                        if (angular.isDefined(attr.step)) {\r
-                            attr.$observe('step', updateStep);\r
-                        }\r
-                        if (angular.isDefined(attr.skipInterval)) {\r
-                            attr.$observe('skipInterval', updateSkipInterval);\r
-                        }\r
-                        scope.currentModelValue = getValidMinMax(getValidStep(min));\r
-                        var onMouseDown = function(e) {\r
-                            switch (e.which) {\r
-                                case 1:\r
-                                    // left mouse button\r
-                                    break;\r
-                                case 2:\r
-                                case 3:\r
-                                    // right or middle mouse button\r
-                                    return;\r
-                            }\r
-                            ;\r
-\r
-                            scope.isDragging = true;\r
-                            seekBarKnob[0].focus();\r
-                            updateTrackContainerRect();\r
-                            if (attr['onDragInit']) {\r
-                                scope.onDragInit();\r
-                            }\r
-                            events.stopPropagation(e);\r
-                            events.preventDefault(e);\r
-                             scope.$apply(function() {\r
-                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                            });\r
-                        };\r
-\r
-                        var onMouseUp = function() {\r
-\r
-                            if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            scope.isDragging = false;\r
-                            scope.$digest();\r
-                        };\r
-\r
-                        var onMouseMove = function(e) {\r
-                            if (scope.isDragging) {\r
-                                events.stopPropagation(e);\r
-                                events.preventDefault(e);\r
-\r
-                                scope.$apply(function() {\r
-                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                                });\r
-                            }\r
-                        };\r
-\r
-                        function onKeyDown(e) {\r
-                            if (!(e.keyCode)) {\r
-                                e.keyCode = e.which;\r
-                            }\r
-                            var updateStep;\r
-                            switch (e.keyCode) {\r
-                                case keymap.KEY.LEFT:\r
-                                    if (!scope.verticalSeekBar) {\r
-                                        updateStep = -skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.RIGHT:\r
-                                    if (!scope.verticalSeekBar) {\r
-                                        updateStep = skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.UP:\r
-                                    if (scope.verticalSeekBar) {\r
-                                        updateStep = skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.DOWN:\r
-                                    if (scope.verticalSeekBar) {\r
-                                        updateStep = -skipInterval;\r
-                                    }\r
-                                    break;\r
-                                default:\r
-                                    return;\r
-                            }\r
-\r
-                            if (updateStep) {\r
-                                events.stopPropagation(e);\r
-                                events.preventDefault(e);\r
-                                scope.$apply(function() {\r
-                                    setModelValue(ngModelCtrl.$viewValue + updateStep);\r
-                                });\r
-                                if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            }\r
-                        }\r
-\r
-                        elm.on('keydown', onKeyDown);\r
-                        elm.on('mousedown', onMouseDown);\r
-\r
-                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);\r
-                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);\r
-\r
-                        ngModelCtrl.$render = function() {\r
-                            if (!scope.isDragging) {\r
-                                modelRenderer();\r
-                            }\r
-                        };\r
-                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);\r
-                        ngModelCtrl.$formatters.push(getValidMinMax);\r
-                        ngModelCtrl.$formatters.push(getValidStep);\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:selectorModule\r
- *\r
- * @description\r
- *  <file src="src/selectorModule/docs/readme.md" />\r
- *\r
- * @usage\r
- * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">\r
- *   <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- * </select>\r
- *\r
- * <select name="myNameBig" type="large" b2b-dropdown ng-model="Controller Variable here">\r
- * <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- * </select>\r
- *\r
- * <select name="myNameBig" b2b-dropdown ng-model="Controller Variable here">\r
- *   <optgroup b2b-dropdown-group label="Group Label here">\r
- *     <option b2b-dropdown-list option-repeat="option data here" imgsrc="image path" value="value">List Text</option>\r
- *   </optgroup>\r
- * </select>\r
- *\r
- *  @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/selectorModule/docs/demo.html" />\r
-            <file src="src/selectorModule/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.selectorModule', ['b2b.att.dropdowns']);\r
-/**\r
- * @ngdoc directive\r
- * @name Layouts.att:separators\r
- *\r
- * @description\r
- *  <file src="src/separators/docs/readme.md" />\r
- *\r
- * @usage\r
-\r
- *\r
- * @example\r
- *  <section id="code">   \r
- <b>HTML + AngularJS</b>\r
- <example module="b2b.att">\r
- <file src="src/separators/docs/demo.html" />\r
- <file src="src/separators/docs/demo.js" />\r
- </example>\r
- </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.separators', []);\r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:slider\r
- *\r
- * @description\r
- *  <file src="src/slider/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-slider min="0" max="400" step="1" no-aria-label skip-interval="1" ng-model="horizontalSliderVal" style="width:180px; margin: auto;" on-drag-end="onDragEnd()" on-drag-init="onDragStart()" label-id="slider-label" post-aria-label="postAriaLabel"></b2b-slider>\r
- *\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/slider/docs/demo.html" />\r
-            <file src="src/slider/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.slider', ['b2b.att.utilities'])\r
-        .constant('SliderConfig', {\r
-            'min': 0,\r
-            'max': 100,\r
-            'step': 1,\r
-            'skipInterval': 1\r
-        })\r
-        .directive('b2bSlider', ['$documentBind', 'SliderConfig', 'keymap', '$compile', '$log', function($documentBind, SliderConfig, keymap, $compile, $log) {\r
-                return {\r
-                    restrict: 'AE',\r
-                    replace: true,\r
-                    require: 'ngModel',\r
-                    templateUrl: 'b2bTemplate/slider/slider.html',\r
-                    scope: {\r
-                        onDragEnd: '&?',\r
-                        onDragInit: '&?',\r
-                        trackFillColor: '=?',\r
-                        preAriaLabel: '=?',\r
-                        postAriaLabel: '=?',\r
-                        onRenderEnd: '&?',\r
-                        sliderSnapPoints: '=?',\r
-                        customAriaLabel: '=?',\r
-                        labelId: '@?'\r
-                    },\r
-                    link: function(scope, elm, attr, ngModelCtrl) {\r
-                        scope.isDragging = false;\r
-                        scope.verticalSlider = false;\r
-                        var min;\r
-                        var max;\r
-                        var step = SliderConfig.step;\r
-                        var skipInterval = SliderConfig.skipInterval;\r
-                        var knob = angular.element(elm[0].querySelector('.slider-knob-container'));\r
-                        var sliderKnob = angular.element(knob[0].querySelector('.slider-knob'));\r
-                        var trackContainer = angular.element(elm[0].querySelector('.slider-track-container'));\r
-                        var trackFill = angular.element(elm[0].querySelector('.slider-track-fill'));\r
-                        var trackContainerRect = {};\r
-                        var axisPosition = "clientX";\r
-                        var trackFillOrderPositioning;\r
-\r
-                        //Forcefully disabling the vertical Slider code.\r
-                        if (angular.isDefined(attr.vertical)) {\r
-                            scope.verticalSlider = true;\r
-                            axisPosition = "clientY";\r
-                        }\r
-\r
-                        if (angular.isDefined(scope.noAriaLabel) && scope.noAriaLabel !== '') {\r
-                            $log.warn('no-aria-label has been deprecated. This will be removed in v0.6.0.');\r
-                        }\r
-                        if (angular.isDefined(scope.preAriaLabel) && scope.preAriaLabel !== '') {\r
-                            $log.warn('pre-aria-label has been deprecated. Please use label-id instead. This will be removed in v0.6.0.');\r
-                        }\r
-                        if (angular.isDefined(scope.customAriaLabel) && scope.customAriaLabel !== '') {\r
-                            $log.warn('custom-aria-label has been deprecated. Please use label-id and post-aria-label instead. This will be removed in v0.6.0.');\r
-                        }\r
-\r
-                        var binarySearchNearest = function (num, arr) {\r
-                            var mid;\r
-                            var lo = 0;\r
-                            var hi = arr.length - 1;\r
-                            \r
-                            while (hi - lo > 1) {\r
-                                mid = Math.floor((lo + hi) / 2);\r
-                                if (arr[mid] < num) {\r
-                                    lo = mid;\r
-                                } else {\r
-                                    hi = mid;\r
-                                }\r
-                            }\r
-                            if (num - arr[lo] < arr[hi] - num) {\r
-                                return arr[lo];\r
-                            }\r
-                            return arr[hi];\r
-                        };\r
-                        \r
-                        var getValidStep = function(val) {\r
-                            val = parseFloat(val);\r
-                            // in case $modelValue came in string number\r
-                            if (!isNaN(val)) {\r
-                                \r
-                                if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                    val = binarySearchNearest(val, scope.sliderSnapPoints);\r
-                                }\r
-                                else {\r
-                                    val = Math.round((val - min) / step) * step + min;\r
-                                }\r
-                                \r
-                                return Math.round(val * 1000) / 1000;\r
-                            }\r
-                        };\r
-\r
-                        var getPositionToPercent = function(x) {\r
-                            if (scope.verticalSlider) {\r
-                                return Math.max(0, Math.min(1, (trackContainerRect.bottom - x) / (trackFillOrderPositioning)));\r
-                            }\r
-                            else {\r
-                                return Math.max(0, Math.min(1, (x - trackContainerRect.left) / (trackFillOrderPositioning)));\r
-                            }\r
-                        };\r
-\r
-                        var getPercentToValue = function(percent) {\r
-                            return (min + percent * (max - min));\r
-                        };\r
-\r
-                        var getValueToPercent = function(val) {\r
-                            return (val - min) / (max - min);\r
-                        };\r
-\r
-                        var getValidMinMax = function(val) {\r
-                            return Math.max(min, Math.min(max, val));\r
-                        };\r
-\r
-                        var updateTrackContainerRect = function() {\r
-                            trackContainerRect = trackContainer[0].getBoundingClientRect();\r
-                            if (scope.verticalSlider) {\r
-                                if (!trackContainerRect.height) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollHeight;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.height;\r
-                                }\r
-                            }\r
-                            else {\r
-                                if (!trackContainerRect.width) {\r
-                                    trackFillOrderPositioning = trackContainer[0].scrollWidth;\r
-                                } else {\r
-                                    trackFillOrderPositioning = trackContainerRect.width;\r
-                                }\r
-\r
-                            }\r
-\r
-                        };\r
-\r
-                        var updateKnobPosition = function(percent) {\r
-                            var percentStr = (percent * 100) + '%';\r
-                            if (scope.verticalSlider) {\r
-                                knob.css('bottom', percentStr);\r
-                                trackFill.css('height', percentStr);\r
-                            }\r
-                            else {\r
-                                knob.css('left', percentStr);\r
-                                trackFill.css('width', percentStr);\r
-                            }\r
-                        };\r
-\r
-                        var modelRenderer = function() {\r
-\r
-                            if(attr['disabled']){\r
-                                return;\r
-                            }\r
-\r
-                            if (isNaN(ngModelCtrl.$viewValue)) {\r
-                                ngModelCtrl.$viewValue = ngModelCtrl.$modelValue || min;\r
-                            }\r
-\r
-                            var viewVal = ngModelCtrl.$viewValue;\r
-                            scope.currentModelValue = viewVal;\r
-\r
-                            //wait for min, max and step to be set then only update UI to avoid NaN on percent calculation\r
-                            if ((min || min === 0) && max && step) {\r
-                                updateKnobPosition(getValueToPercent(viewVal));\r
-                            }\r
-                        };\r
-\r
-                        var setModelValue = function(val) {\r
-                            scope.currentModelValue = getValidMinMax(getValidStep(val));\r
-                            ngModelCtrl.$setViewValue(scope.currentModelValue);\r
-                        };\r
-\r
-                        var updateMin = function(val) {\r
-                            min = parseFloat(val);\r
-                            if(isNaN(min)){\r
-                               min = SliderConfig.min; \r
-                            }\r
-                            scope.min = min;\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateMax = function(val) {\r
-                            max = parseFloat(val);\r
-                            if(isNaN(max)){\r
-                               max = SliderConfig.max; \r
-                            }\r
-                            scope.max = max;\r
-                            modelRenderer();\r
-                        };\r
-\r
-                        var updateStep = function(val) {\r
-                            step = parseFloat(val);\r
-                            if (!attr['skipInterval']) {\r
-                                skipInterval = step;\r
-                            }\r
-                        };\r
-\r
-                        var updateSkipInterval = function(val) {\r
-                            skipInterval = step * Math.ceil(val / (step!==0?step:1));\r
-                        };\r
-\r
-                        angular.isDefined(attr.min) ? attr.$observe('min', updateMin) : updateMin(SliderConfig.min);\r
-                        angular.isDefined(attr.max) ? attr.$observe('max', updateMax) : updateMax(SliderConfig.max);\r
-                        if (angular.isDefined(attr.step)) {\r
-                            attr.$observe('step', updateStep);\r
-                        }\r
-                        if (angular.isDefined(attr.skipInterval)) {\r
-                            attr.$observe('skipInterval', updateSkipInterval);\r
-                        }\r
-                        scope.currentModelValue = getValidMinMax(getValidStep(min));\r
-                        var onMouseDown = function(e) {\r
-\r
-                            if(attr['disabled']){\r
-                                return;\r
-                            }\r
-\r
-                            switch (e.which) {\r
-                                case 1:\r
-                                    // left mouse button\r
-                                    break;\r
-                                case 2:\r
-                                case 3:\r
-                                    // right or middle mouse button\r
-                                    return;\r
-                            }\r
-\r
-                            scope.isDragging = true;\r
-                            sliderKnob[0].focus();\r
-                            updateTrackContainerRect();\r
-                            if (attr['onDragInit']) {\r
-                                scope.onDragInit();\r
-                            }\r
-                            e.stopPropagation();\r
-                            e.preventDefault();\r
-                             scope.$apply(function() {\r
-                                setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                            });\r
-                        };\r
-\r
-                        var onMouseUp = function() {\r
-\r
-                            if (attr['onDragEnd']) {\r
-                                scope.onDragEnd();\r
-                            }\r
-                            scope.isDragging = false;\r
-                            scope.$digest();\r
-                        };\r
-\r
-                        var onMouseMove = function(e) {\r
-                            if (scope.isDragging) {\r
-                                e.stopPropagation();\r
-                                e.preventDefault();\r
-\r
-                                scope.$apply(function() {\r
-                                    setModelValue(getPercentToValue(getPositionToPercent(e[axisPosition])));\r
-                                });\r
-                            }\r
-                        };\r
-\r
-                        function onKeyDown(e) {\r
-                            if (!(e.keyCode)) {\r
-                                e.keyCode = e.which;\r
-                            }\r
-                            var updateStep;\r
-                            switch (e.keyCode) {\r
-                                case keymap.KEY.DOWN:\r
-                                case keymap.KEY.LEFT:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);\r
-                                        if (currentIndex > 0) {\r
-                                            currentIndex--;\r
-                                        }\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    }\r
-                                    else {\r
-                                        updateStep = ngModelCtrl.$viewValue - skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.UP:\r
-                                case keymap.KEY.RIGHT:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        var currentIndex = scope.sliderSnapPoints.indexOf(ngModelCtrl.$viewValue);\r
-                                        if (currentIndex < scope.sliderSnapPoints.length-1) {\r
-                                            currentIndex++;\r
-                                        }\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    }\r
-                                    else {\r
-                                        updateStep = ngModelCtrl.$viewValue + skipInterval;\r
-                                    }\r
-                                    break;\r
-                                case keymap.KEY.END:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        currentIndex = scope.sliderSnapPoints.length-1;\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    } else {\r
-                                        setModelValue(scope.max);\r
-                                    }\r
-                                    e.preventDefault();\r
-                                    e.stopPropagation();\r
-                                    break;\r
-                                case keymap.KEY.HOME:\r
-                                    if(attr['sliderSnapPoints'] && scope.sliderSnapPoints.length > 0) {\r
-                                        currentIndex = 0;\r
-                                        updateStep = scope.sliderSnapPoints[currentIndex];\r
-                                    } else {\r
-                                        setModelValue(scope.min);\r
-                                    }\r
-                                    e.preventDefault();\r
-                                    e.stopPropagation();\r
-                                    break;\r
-                                default:\r
-                                    return;\r
-                            }\r
-\r
-                            if (angular.isNumber(updateStep) && !attr['disabled']) {\r
-                                e.stopPropagation();\r
-                                e.preventDefault();\r
-                                scope.$apply(function() {\r
-                                    setModelValue(updateStep);\r
-                                });\r
-                                if (attr['onDragEnd']) {\r
-                                    scope.onDragEnd();\r
-                                }\r
-                            }\r
-                        }\r
-\r
-                        elm.on('keydown', onKeyDown);\r
-                        elm.on('mousedown', onMouseDown);\r
-\r
-                        $documentBind.event('mousemove', 'isDragging', onMouseMove, scope, true, 0);\r
-                        $documentBind.event('mouseup', 'isDragging', onMouseUp, scope, true, 0);\r
-\r
-                        attr.$observe('disabled', function (disabled) {\r
-                            if (disabled) {\r
-                                sliderKnob.removeAttr('tabindex');\r
-                            } else {\r
-                                sliderKnob.attr('tabindex', '0');\r
-                                disabled = false;\r
-                            }\r
-\r
-                            elm.toggleClass("slider-disabled", disabled);\r
-\r
-                            if (angular.isDefined(attr.hideDisabledKnob)) {\r
-                                scope.hideKnob = disabled;\r
-                            }\r
-                        });\r
-\r
-                        ngModelCtrl.$render = function() {\r
-                            if (!scope.isDragging) {\r
-                                modelRenderer();\r
-                                if (attr['onRenderEnd'] && !attr['disabled']) {\r
-                                    scope.onRenderEnd({currentModelValue: scope.currentModelValue});\r
-                                }\r
-                            }\r
-                        };\r
-                        ngModelCtrl.$viewChangeListeners.push(modelRenderer);\r
-                        ngModelCtrl.$formatters.push(getValidMinMax);\r
-                        ngModelCtrl.$formatters.push(getValidStep);\r
-                    }\r
-                };\r
-            }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:spinButton\r
- *\r
- * @param {String} spin-button-id - An ID for the input field\r
- * @param {Integer} min - Minimum value for the input\r
- * @param {Integer} max - Maximum value for the input\r
- * @param {Integer} step - Value by which input field increments or decrements on up/down arrow keys\r
- * @param {Integer} page-step - Value by which input field increments or decrements on page up/down keys\r
- * @param {boolean} input-model-key - Default value for input field\r
- * @param {boolean} disabled-flag - A boolean that triggers directive once the min or max value has reached\r
- *\r
- * @description\r
- *  <file src="src/spinButton/docs/readme.md" />\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/spinButton/docs/demo.html" />\r
-            <file src="src/spinButton/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- * \r
- */\r
-angular.module('b2b.att.spinButton', ['b2b.att.utilities'])\r
-    .constant('b2bSpinButtonConfig', {\r
-        min: 1,\r
-        max: 10,\r
-        step: 1,\r
-        pageStep: 10,\r
-        inputModelKey: 'value',\r
-        disabledFlag: false\r
-    })\r
-    .directive('b2bSpinButton', ['keymap', 'b2bSpinButtonConfig', 'b2bUserAgent', function (keymap, b2bSpinButtonConfig, userAgent) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '?ngModel',\r
-            transclude: false,\r
-            replace: true,\r
-            scope: {\r
-                min: '=min',\r
-                max: '=max',\r
-                step: '=step',\r
-                pageStep: '=pageStep',\r
-                spinButtonId: '@',\r
-                inputValue: '=ngModel',\r
-                inputModelKey: '@',\r
-                disabledFlag: "=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/spinButton/spinButton.html',\r
-            controller: ['$scope', '$element', '$attrs', function (scope, element, attrs) {\r
-\r
-                scope.isMobile = userAgent.isMobile();\r
-                scope.notMobile = userAgent.notMobile();\r
-\r
-                scope.min = attrs.min ? scope.min : b2bSpinButtonConfig.min;\r
-                scope.max = attrs.max ? scope.max : b2bSpinButtonConfig.max;\r
-                scope.step = attrs.step ? scope.step : b2bSpinButtonConfig.step;\r
-                scope.pageStep = attrs.pageStep ? scope.pageStep : b2bSpinButtonConfig.pageStep;\r
-                scope.inputModelKey = attrs.inputModelKey ? scope.inputModelKey : b2bSpinButtonConfig.inputModelKey;\r
-                scope.disabledFlag = attrs.disabledFlag ? scope.disabledFlag : b2bSpinButtonConfig.disabledFlag;\r
-                \r
-                if (scope.min < 0) {\r
-                    scope.min = 0;\r
-                }\r
-                if (scope.max > 999) {\r
-                    scope.max = 999;\r
-                }\r
-\r
-                scope.isPlusDisabled = function () {\r
-                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] >= scope.max);\r
-                };\r
-                scope.isMinusDisabled = function () {\r
-                    return (scope.disabledFlag || scope.inputValue[scope.inputModelKey] <= scope.min);\r
-                };\r
-\r
-                scope.getValidateInputValue = function (value) {\r
-                    if (value <= scope.min) {\r
-                        return scope.min;\r
-                    } else if (value >= scope.max) {\r
-                        return scope.max;\r
-                    } else {\r
-                        return value;\r
-                    }\r
-                };\r
-\r
-                scope.plus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.step);\r
-                };\r
-                scope.minus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.step);\r
-                };\r
-                scope.pagePlus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) + scope.pageStep);\r
-                };\r
-                scope.pageMinus = function () {\r
-                    scope.inputValue[scope.inputModelKey] = scope.getValidateInputValue(parseInt(scope.inputValue[scope.inputModelKey], 10) - scope.pageStep);\r
-                };\r
-\r
-            }],\r
-            link: function (scope, elem) {\r
-\r
-                if (scope.notMobile) {\r
-                    angular.element(elem).find('input').attr('aria-live', 'off');\r
-                    angular.element(elem).find('input').attr('role', 'spinbutton');\r
-                }\r
-\r
-                elem.find('input').bind('keydown', function (e) {\r
-                    if (e.keyCode === keymap.KEY.UP) {\r
-                        scope.plus();\r
-                    } else if (e.keyCode === keymap.KEY.DOWN){\r
-                        scope.minus();\r
-                    } else if (e.keyCode === keymap.KEY.HOME) {\r
-                        scope.inputValue[scope.inputModelKey] = parseInt(scope.min);\r
-                    } else if (e.keyCode === keymap.KEY.END) {\r
-                        scope.inputValue[scope.inputModelKey] = parseInt(scope.max);\r
-                    } else if (e.keyCode === keymap.KEY.PAGE_UP) {\r
-                        scope.pagePlus();\r
-                    } else if (e.keyCode === keymap.KEY.PAGE_DOWN) {\r
-                        scope.pageMinus();\r
-                    }\r
-                    scope.$apply();\r
-                });\r
-\r
-                elem.find('input').bind('keyup', function () {\r
-                    if (scope.inputValue[scope.inputModelKey] === null ||\r
-                        scope.inputValue[scope.inputModelKey] === '' ||\r
-                        scope.inputValue[scope.inputModelKey] < scope.min) {\r
-                        scope.inputValue[scope.inputModelKey] = scope.min;\r
-                        scope.$apply();\r
-                    } else if (angular.isUndefined(scope.inputValue[scope.inputModelKey]) || \r
-                               scope.inputValue[scope.inputModelKey] > scope.max) {\r
-                        scope.inputValue[scope.inputModelKey] = scope.max;\r
-                        scope.$apply();\r
-                    }\r
-                });\r
-\r
-                scope.focusInputSpinButton = function (evt) {\r
-                    evt.preventDefault();\r
-                    if (scope.notMobile) {\r
-                        elem[0].querySelector('input').focus();\r
-                    }\r
-                };\r
-\r
-            }\r
-        };  \r
-    }]);\r
-/** \r
- * @ngdoc directive \r
- * @name Template.att:Static Route\r
- * \r
- * @description \r
- *  <file src="src/staticRouteTemplate/docs/readme.md" /> \r
- * \r
- * @example \r
- *  <section id="code"> \r
-        <example module="b2b.att"> \r
-            <file src="src/staticRouteTemplate/docs/demo.html" /> \r
-            <file src="src/staticRouteTemplate/docs/demo.js" /> \r
-       </example> \r
-    </section>    \r
- * \r
- */\r
-angular.module('b2b.att.staticRouteTemplate', ['b2b.att.utilities'])\r
-  \r
-/**\r
- * @ngdoc directive\r
- * @name Progress & usage indicators.att:statusTracker\r
- *\r
- * @scope\r
- * @param {array} statuses - An array of status objects\r
- * @description\r
- * <file src="src/statusTracker/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
-<div ng-controller="statusTrackerController">\r
-    <b2b-status-tracker statuses="statusObject"></b2b-status-tracker>\r
-</div>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/statusTracker/docs/demo.html" />\r
-            <file src="src/statusTracker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-\r
-angular.module('b2b.att.statusTracker', ['b2b.att.utilities'])\r
-.constant('b2bStatusTrackerConfig', {\r
-    'maxViewItems': 3\r
-})\r
-.directive('b2bStatusTracker', ['b2bStatusTrackerConfig', function(b2bStatusTrackerConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: false,\r
-            replace: true,\r
-            scope:{\r
-                statuses: '='\r
-            },\r
-            templateUrl: function(scope) {\r
-                return 'b2bTemplate/statusTracker/statusTracker.html';\r
-            },\r
-            link: function(scope, element, attr) {\r
-                scope.currentViewIndex = 0;\r
-                scope.b2bStatusTrackerConfig = b2bStatusTrackerConfig;\r
-\r
-                scope.nextStatus = function() {\r
-                    if (scope.currentViewIndex+1 <= scope.statuses.length) {\r
-                        scope.currentViewIndex++;\r
-                    }\r
-                };\r
-                scope.previousStatus = function() {\r
-                    if (scope.currentViewIndex-1 >= 0) {\r
-                        scope.currentViewIndex--;\r
-                    }\r
-                };\r
-                scope.isInViewport = function(index) {\r
-                    return (index < scope.currentViewIndex+3 && index >= scope.currentViewIndex);  // && index > scope.currentViewIndex-2\r
-                };\r
-                scope.currentStatus = function(index) {\r
-                    if(index != undefined){\r
-                        if(!scope.statuses[index].complete) {\r
-                            if(index > 0 && scope.statuses[index-1].complete) {\r
-                                return true;\r
-                            } else if(index == 0 && !scope.statuses[index].complete){\r
-                                return true;\r
-                            } else {\r
-                                return false;\r
-                            }\r
-                        }\r
-                    }\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Progress & usage indicators.att:stepTracker\r
- *\r
- * @scope\r
- * @param {array} stepsItemsObject - An array of step objects\r
- * @param {Integer} currenIindex - This indicates the current running step\r
- * @param {Integer} viewportIndex - This is optional. This can used to start the view port rather than 1 item.\r
- * @description\r
- * <file src="src/stepTracker/docs/readme.md" />\r
- *\r
- * @usage\r
- *\r
- *  <b2b-step-tracker steps-items-object="stepsObject" current-index="currentStepIndex" step-indicator-heading="stepHeading"></b2b-step-tracker>\r
- *\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/stepTracker/docs/demo.html" />\r
-            <file src="src/stepTracker/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.stepTracker', ['b2b.att.utilities'])\r
-    .constant('b2bStepTrackerConfig', {\r
-        'maxViewItems': 5\r
-    })\r
-    .directive('b2bStepTracker', ['b2bStepTrackerConfig', function(b2bStepTrackerConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            scope:{\r
-                stepsItemsObject:"=",\r
-                currentIndex:"=",\r
-                viewportIndex:"=?"\r
-            },\r
-            templateUrl: 'b2bTemplate/stepTracker/stepTracker.html',\r
-            link: function(scope, ele, attr) {\r
-                if (angular.isDefined(scope.viewportIndex)) {\r
-                    scope.currentViewIndex = scope.viewportIndex - 1;   \r
-                }else{\r
-                    scope.currentViewIndex = 0;\r
-                }\r
-               \r
-               scope.b2bStepTrackerConfig = b2bStepTrackerConfig;\r
-               scope.nextStatus = function() {\r
-                    if (scope.currentViewIndex+1 <= scope.stepsItemsObject.length) {\r
-                        scope.currentViewIndex++;\r
-                    }\r
-                };\r
-                scope.previousStatus = function() {\r
-                    if (scope.currentViewIndex-1 >= 0) {\r
-                        scope.currentViewIndex--;\r
-                    }\r
-                };\r
-                scope.isInViewport = function(index) {\r
-                    return (index < scope.currentViewIndex+b2bStepTrackerConfig.maxViewItems && index >= scope.currentViewIndex);\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-     \r
-/**\r
- * @ngdoc directive\r
- * @name Buttons, links & UI controls.att:switches\r
- *\r
- * @description\r
- *  <file src="src/switches/docs/readme.md" />\r
- *\r
- * @usage\r
- *  \r
- *  <!-- On / Off Toggle switch -->\r
- *  <label for="switch1" class="controlled-text-wrap"> This is ON\r
- *      <input type="checkbox" role="checkbox" b2b-switches id="switch1" ng-model="switch1.value">\r
- *  </label>\r
- *\r
- *  <!-- On / Off Toggle switch and DISABLED -->\r
- *  <label for="switch2" class="controlled-text-wrap"> This is ON (disabled)\r
- *      <input type="checkbox" role="checkbox" b2b-switches id="switch2" ng-model="switch1.value" ng-disabled="true" >\r
- *  </label> \r
- *\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/switches/docs/demo.js" />\r
-            <file src="src/switches/docs/demo.html" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.switches', ['b2b.att.utilities'])\r
-    .directive('b2bSwitches', ['$compile', '$templateCache', 'keymap', 'events', function ($compile, $templateCache, keymap, events) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: ['ngModel'],\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var ngModelController = ctrl[0];\r
-        \r
-                element.parent().bind("keydown", function (e) {\r
-                    if (!attrs.disabled && (e.keyCode === keymap.KEY.ENTER || e.keyCode === keymap.KEY.SPACE)) {\r
-                        events.preventDefault(e);\r
-                        ngModelController.$setViewValue(!ngModelController.$viewValue);\r
-                        element.prop("checked", ngModelController.$viewValue);\r
-                    }\r
-                });\r
-\r
-                element.wrap('<div class="btn-switch">');\r
-                //element.attr("tabindex", -1);\r
-                if (navigator.userAgent.match(/iphone/i)){\r
-                    element.attr("aria-live", "polite");\r
-                }\r
-                else {\r
-                    element.removeAttr('aria-live');\r
-                }\r
-\r
-                var templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches.html"));\r
-                if (angular.isDefined(attrs.typeSpanish)) {\r
-                    templateSwitch = angular.element($templateCache.get("b2bTemplate/switches/switches-spanish.html"));\r
-                }\r
-\r
-                templateSwitch = $compile(templateSwitch)(scope);\r
-                element.parent().append(templateSwitch);\r
-\r
-                element.bind("focus", function (e) {\r
-                    element.parent().addClass('focused');\r
-                });\r
-\r
-                element.bind("blur", function (e) {\r
-                    element.parent().removeClass('focused');\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:tableMessages\r
- *\r
- * @description\r
- *  <file src="src/tableMessages/docs/readme.md" />\r
- *\r
- * @usage\r
-    <!-- no matching results -->\r
-    <b2b-table-message msg-type="'noMatchingResults'">\r
-       <p>No Matching Results</p>\r
-    </b2b-table-message>\r
-  \r
-    <!-- info could not load -->\r
-    <b2b-table-message msg-type="'infoCouldNotLoad'" on-refresh-click="refreshClicked()">\r
-    </b2b-table-message>\r
-   \r
-    <!-- magnify search -->\r
-    <b2b-table-message msg-type="'magnifySearch'">\r
-    </b2b-table-message>\r
-   \r
-    <!-- loading data -->\r
-    <b2b-table-message msg-type="'loadingTable'">\r
-          <!-- custom html -->\r
-          <p>The data is currently loading...</p>\r
-    </b2b-table-message>\r
-\r
- * @example\r
-    <section id="code">   \r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/tableMessages/docs/demo.html" />\r
-            <file src="src/tableMessages/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.tableMessages', [])\r
-    .directive('b2bTableMessage', [function() {\r
-        return {\r
-            restrict: 'AE',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                msgType: '=',\r
-                onRefreshClick: '&'\r
-            },\r
-            templateUrl: 'b2bTemplate/tableMessages/tableMessage.html',\r
-            link: function(scope) {\r
-                scope.refreshAction = function(evt) {\r
-                    scope.onRefreshClick(evt);\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tableScrollbar\r
- *\r
- * @description\r
- *  <file src="src/tableScrollbar/docs/readme.md" />\r
- *\r
- * @usage\r
- * \r
-<b2b-table-scrollbar>\r
-    <table>\r
-        <thead type="header">\r
-            <tr>\r
-                <th role="columnheader" scope="col" key="Id" id="col1">Id</th>\r
-                .....\r
-            </tr>\r
-        </thead>\r
-        <tbody type="body">\r
-            <tr>\r
-                <td id="rowheader0" headers="col1">1002</td>\r
-                .....\r
-            </tr>\r
-        </tbody>\r
-    </table>\r
-</b2b-table-scrollbar>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tableScrollbar/docs/demo.html" />\r
-            <file src="src/tableScrollbar/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tableScrollbar', [])\r
-    .directive('b2bTableScrollbar', ['$timeout', function ($timeout) {\r
-        return {\r
-            restrict: 'E',\r
-            scope: true,\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/tableScrollbar/tableScrollbar.html',\r
-            link: function (scope, element, attrs, ctrl) {\r
-                var firstThWidth, firstTdWidth, firstColumnWidth, firstColumnHeight, trHeight = 0;\r
-                var pxToScroll = '';\r
-                var tableElement = element.find('table');\r
-                var thElements = element.find('th');\r
-                var tdElements = element.find('td');\r
-                var innerContainer = angular.element(element[0].querySelector('.b2b-table-inner-container'));\r
-                var outerContainer = angular.element(element[0].querySelector('.b2b-table-scrollbar'));\r
-\r
-                scope.disableLeft = true;\r
-                scope.disableRight = false;\r
-\r
-                if (angular.isDefined(thElements[0])) {\r
-                    firstThWidth = thElements[0].offsetWidth;\r
-                }\r
-                if (angular.isDefined(tdElements[0])) {\r
-                    firstTdWidth = tdElements[0].offsetWidth;\r
-                }\r
-                firstColumnWidth = (firstThWidth > firstTdWidth) ? firstThWidth : firstTdWidth;\r
-\r
-                innerContainer.css({\r
-                    'padding-left': (firstColumnWidth + 2) + 'px'\r
-                });\r
-\r
-                angular.forEach(element.find('tr'), function (eachTr, index) {\r
-                    trObject = angular.element(eachTr);\r
-                    firstColumn = angular.element(trObject.children()[0]);\r
-\r
-                    angular.element(firstColumn).css({\r
-                        'margin-left': -(firstColumnWidth + 2) + 'px',\r
-                        'width': (firstColumnWidth + 2) + 'px',\r
-                        'position': 'absolute'\r
-                    });\r
-\r
-                    trHeight = trObject[0].offsetHeight;\r
-                    firstColumnHeight = firstColumn[0].offsetHeight;\r
-                    if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\r
-                        firstColumnHeight += 1;\r
-                    }\r
-\r
-                    if (trHeight !== firstColumnHeight - 1) {\r
-                        if (trHeight > firstColumnHeight) {\r
-                            if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {\r
-                                trHeight -= 1;\r
-                            }\r
-                            angular.element(firstColumn).css({\r
-                                'height': (trHeight + 1) + 'px'\r
-                            });\r
-                        } else {\r
-                            angular.element(trObject).css({\r
-                                'height': (firstColumnHeight - 1) + 'px'\r
-                            });\r
-                        }\r
-                    }\r
-\r
-                });\r
-\r
-                pxToScroll = outerContainer[0].offsetWidth - firstColumnWidth;\r
-\r
-                scope.scrollLeft = function () {\r
-                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + 20 - pxToScroll;\r
-                };\r
-\r
-                scope.scrollRight = function () {\r
-                    innerContainer[0].scrollLeft = innerContainer[0].scrollLeft + pxToScroll - 20;\r
-                };\r
-\r
-                scope.checkScrollArrows = function () {\r
-                    if (innerContainer[0].scrollLeft == 0) {\r
-                        scope.disableLeft = true;\r
-                    } else {\r
-                        scope.disableLeft = false;\r
-                    }\r
-\r
-                    if (((innerContainer[0].offsetWidth - firstColumnWidth) + innerContainer[0].scrollLeft) >= tableElement[0].offsetWidth) {\r
-                        scope.disableRight = true;\r
-                    } else {\r
-                        scope.disableRight = false;\r
-                    }\r
-                };\r
-\r
-                innerContainer.bind('scroll', function () {\r
-                    $timeout(function () {\r
-                        scope.checkScrollArrows();\r
-                    }, 1);\r
-                });\r
-\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tables\r
- *\r
- * @description\r
- *  <file src="src/tables/docs/readme.md" />\r
- *\r
- * @usage\r
- *   \r
- Table\r
- <table b2b-table table-data="tableData" search-string="searchString">\r
-    <thead b2b-table-row type="header">\r
-        <tr>\r
-            <th b2b-table-header key="requestId" default-sort="a" id="col1">Header 1</th>\r
-            <th b2b-table-header key="requestType" sortable="false" id="col2">Header 2</th>\r
-        </tr>\r
-    </thead>\r
-    <tbody b2b-table-row type="body" row-repeat="rowData in tableData">\r
-        <tr>\r
-            <td b2b-table-body id="rowheader{{$index}}" headers="col1" ng-bind="rowData['requestId']"> </td>\r
-            <td b2b-table-body ng-bind="rowData['requestType']"></td>\r
-        </tr>\r
-    </tbody>\r
- </table>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tables/docs/demo.html" />\r
-            <file src="src/tables/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tables', ['b2b.att.utilities'])\r
-    .constant('b2bTableConfig', {\r
-        defaultSortPattern: false, // true for descending & false for ascending\r
-        highlightSearchStringClass: 'tablesorter-search-highlight',\r
-        zebraStripCutOff: 6, // > zebraStripCutOff\r
-        tableBreakpoints: [ // breakpoints are >= min and < max\r
-            {\r
-                min: 0,\r
-                max: 480,\r
-                columns: 2\r
-            },\r
-            {\r
-                min: 480,\r
-                max: 768,\r
-                columns: 3\r
-            },\r
-            {\r
-                min: 768,\r
-                max: 1025,\r
-                columns: 5\r
-            },\r
-            {\r
-                min: 1025,\r
-                max: 1920,\r
-                columns: 7\r
-            }\r
-        ]\r
-    })\r
-    .directive('b2bTable', ['$filter', '$window', 'b2bTableConfig', '$timeout', function ($filter, $window, b2bTableConfig, $timeout) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                tableData: "=",\r
-                viewPerPage: "=",\r
-                currentPage: "=",\r
-                totalPage: "=",\r
-                searchCategory: "=",\r
-                searchString: "=",\r
-                nextSort: '='\r
-            },\r
-            require: 'b2bTable',\r
-            templateUrl: 'b2bTemplate/tables/b2bTable.html',\r
-            controller: ['$scope', '$attrs', function ($scope, $attrs) {\r
-                this.headers = [];\r
-                this.currentSortIndex = null;\r
-                this.responsive = $scope.responsive = $attrs.responsive;\r
-                this.maxTableColumns = -1;\r
-                this.totalTableColums = 0;\r
-                this.active = $scope.active = false;\r
-                this.responsiveRowScopes = [];\r
-                this.hideColumnPriority = [];\r
-                this.hiddenColumn = [];\r
-                this.setIndex = function (headerScope, priority) {\r
-                    this.headers.push(headerScope);\r
-                    if (this.responsive) {\r
-                        this.totalTableColums++;\r
-                        if (!isNaN(priority)) {\r
-                            this.hideColumnPriority[priority] = this.totalTableColums - 1;\r
-                        } else {\r
-                            this.hideColumnPriority[this.totalTableColums - 1] = this.totalTableColums - 1;\r
-                        }\r
-                    }\r
-                    return this.totalTableColums - 1;\r
-                };\r
-                this.getIndex = function (headerName) {\r
-                    for (var i = 0; i < this.headers.length; i++) {\r
-                        if (this.headers[i].headerName === headerName) {\r
-                            return this.headers[i].index;\r
-                        }\r
-                    }\r
-                    return null;\r
-                };\r
-                this.setResponsiveRow = function (responsiveRowScope) {\r
-                    this.responsiveRowScopes.push(responsiveRowScope);\r
-                }\r
-                $scope.nextSort = '';\r
-                this.sortData = function (columnIndex, reverse, externalSort) {\r
-                    if ($scope.$parent && $scope.$parent !== undefined) {\r
-                        $scope.$parent.columnIndex = columnIndex;\r
-                        $scope.$parent.reverse = reverse;\r
-                    }\r
-                    this.currentSortIndex = columnIndex;\r
-                    if (externalSort === true) {\r
-                        if (!reverse) {\r
-                            $scope.nextSort = 'd'\r
-                        } else {\r
-                            $scope.nextSort = 'a'\r
-                        }\r
-                    }\r
-                    $scope.currentPage = 1;\r
-                    this.resetSortPattern();\r
-                };\r
-                this.getSearchString = function () {\r
-                    return $scope.searchString;\r
-                };\r
-                this.resetSortPattern = function () {\r
-                    for (var i = 0; i < this.headers.length; i++) {\r
-                        var currentScope = this.headers[i];\r
-                        if (currentScope.index !== this.currentSortIndex) {\r
-                            currentScope.resetSortPattern();\r
-                        }\r
-                    }\r
-                };\r
-\r
-                $scope.$watch('nextSort', function (val) {\r
-                    if ($scope.$parent && $scope.$parent !== undefined) {\r
-                        $scope.$parent.nextSort = val;\r
-                    }\r
-\r
-                });\r
-            }],\r
-            link: function (scope, elem, attr, ctrl) {\r
-                scope.searchCriteria = {};\r
-                scope.tableBreakpoints = attr.tableConfig ? scope.$parent.$eval(attr.tableConfig) : angular.copy(b2bTableConfig.tableBreakpoints);\r
-                scope.$watchCollection('tableData', function (value) {\r
-                    if (value && !isNaN(value.length)) {\r
-                        scope.totalRows = value.length;\r
-                    }\r
-                });\r
-                scope.$watch('currentPage', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.currentPage = val;\r
-                    }\r
-\r
-                });\r
-                scope.$watch('viewPerPage', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.viewPerPage = val;\r
-                    }\r
-                });\r
-                scope.$watch('totalRows', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        if (val > b2bTableConfig.zebraStripCutOff) {\r
-                            scope.$parent.zebraStripFlag = true;\r
-                        } else {\r
-                            scope.$parent.zebraStripFlag = false;\r
-                        }\r
-                    }\r
-                });\r
-                scope.$watch(function () {\r
-                    return scope.totalRows / scope.viewPerPage;\r
-                }, function (value) {\r
-                    if (!isNaN(value)) {\r
-                        scope.totalPage = Math.ceil(value);\r
-                        scope.currentPage = 1;\r
-                    }\r
-                });\r
-                var searchValCheck = function (val) {\r
-                    if (angular.isDefined(val) && val !== null && val !== "") {\r
-                        return true;\r
-                    }\r
-                };\r
-                var setSearchCriteria = function (v1, v2) {\r
-                    if (searchValCheck(v1) && searchValCheck(v2)) {\r
-                        var index = ctrl.getIndex(v2);\r
-                        scope.searchCriteria = {};\r
-                        if (index !== null) {\r
-                            scope.searchCriteria[index] = v1;\r
-                        }\r
-                    } else if (searchValCheck(v1) && (!angular.isDefined(v2) || v2 === null || v2 === "")) {\r
-                        scope.searchCriteria = {\r
-                            $: v1\r
-                        };\r
-                    } else {\r
-                        scope.searchCriteria = {};\r
-                    }\r
-                };\r
-                scope.$watch('searchCategory', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        setSearchCriteria(scope.searchString, newVal);\r
-                    }\r
-                });\r
-                scope.$watch('searchString', function (newVal, oldVal) {\r
-                    if (newVal !== oldVal) {\r
-                        setSearchCriteria(newVal, scope.searchCategory);\r
-                    }\r
-                });\r
-                scope.$watchCollection('searchCriteria', function (val) {\r
-                    if (scope.$parent && scope.$parent !== undefined) {\r
-                        scope.$parent.searchCriteria = val;\r
-                    }\r
-                    scope.totalRows = scope.tableData && ($filter('filter')(scope.tableData, val, false)).length || 0;\r
-                    scope.currentPage = 1;\r
-                });\r
-                var window = angular.element($window);\r
-                var findMaxTableColumns = function () {\r
-                    var windowWidth;\r
-                    windowWidth = $window.innerWidth;\r
-                    ctrl.maxTableColumns = -1;\r
-                    for (var i in scope.tableBreakpoints) {\r
-                        if (windowWidth >= scope.tableBreakpoints[i].min && windowWidth < scope.tableBreakpoints[i].max) {\r
-                            ctrl.maxTableColumns = scope.tableBreakpoints[i].columns;\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (ctrl.maxTableColumns > -1 && ctrl.totalTableColums > ctrl.maxTableColumns) {\r
-                        ctrl.active = true;\r
-                    } else {\r
-                        ctrl.active = false;\r
-                    }\r
-                    for (var i in ctrl.responsiveRowScopes) {\r
-                        ctrl.responsiveRowScopes[i].setActive(ctrl.active);\r
-                    }\r
-                };\r
-                var findHiddenColumn = function () {\r
-                    var columnDiffenence = ctrl.maxTableColumns > -1 ? ctrl.totalTableColums - ctrl.maxTableColumns : 0;\r
-                    ctrl.hiddenColumn = [];\r
-                    if (columnDiffenence > 0) {\r
-                        var tempHideColumnPriority = angular.copy(ctrl.hideColumnPriority);\r
-                        for (var i = 0; i < columnDiffenence; i++) {\r
-                            ctrl.hiddenColumn.push(tempHideColumnPriority.pop());\r
-                        }\r
-                    }\r
-                };\r
-                var resizeListener = function () {\r
-                    findMaxTableColumns();\r
-                    findHiddenColumn();\r
-                };\r
-                if (ctrl.responsive) {\r
-                    window.bind('resize', function () {\r
-                        resizeListener();\r
-                        scope.$apply();\r
-                    });\r
-                    $timeout(function () {\r
-                        resizeListener();\r
-                    }, 100);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableRow', [function () {\r
-        return {\r
-            restrict: 'EA',\r
-            compile: function (elem, attr) {\r
-                if (attr.type === 'header') {\r
-                    angular.noop();\r
-                } else if (attr.type === 'body') {\r
-                    var html = elem.children();\r
-                    if (attr.rowRepeat) {\r
-                        html.attr('ng-repeat', attr.rowRepeat.concat(" | orderBy : columnIndex : reverse | filter : searchCriteria : false "));\r
-                    }\r
-                    html.attr('ng-class', "{'odd': $odd && zebraStripFlag}");\r
-                    html.attr('class', 'data-row');\r
-                    html.attr('b2b-responsive-row', '{{$index}}');\r
-                    elem.append(html);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableHeader', ['b2bTableConfig', function (b2bTableConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            transclude: true,\r
-            scope: {\r
-                sortable: '@',\r
-                defaultSort: '@',\r
-                index: '@key'\r
-            },\r
-            require: '^b2bTable',\r
-            templateUrl: function (elem, attr) {\r
-                if (attr.sortable === 'false') {\r
-                    return 'b2bTemplate/tables/b2bTableHeaderUnsortable.html';\r
-                } else {\r
-                    return 'b2bTemplate/tables/b2bTableHeaderSortable.html';\r
-                }\r
-            },\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var reverse = b2bTableConfig.defaultSortPattern;\r
-                scope.headerName = elem.text();\r
-                scope.headerId = elem.attr('id');\r
-                scope.sortPattern = null;\r
-                var priority = parseInt(attr.priority, 10);\r
-                scope.columnIndex = ctrl.setIndex(scope, priority);\r
-\r
-                scope.isHidden = function () {\r
-                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                };\r
-\r
-                scope.$watch(function () {\r
-                    return elem.text();\r
-                }, function (value) {\r
-                    scope.headerName = value;\r
-                });\r
-                scope.sort = function (sortType) {\r
-                    if (typeof sortType === 'boolean') {\r
-                        reverse = sortType;\r
-                    }\r
-                    ctrl.sortData(scope.index, reverse, false);\r
-                    scope.sortPattern = reverse ? 'descending' : 'ascending';\r
-                    reverse = !reverse;\r
-                };\r
-                scope.$watch(function () {\r
-                    return ctrl.currentSortIndex;\r
-                }, function (value) {\r
-                    if (value !== scope.index) {\r
-                        scope.sortPattern = null;\r
-                    }\r
-                });\r
-\r
-                if (scope.sortable === undefined || scope.sortable === 'true' || scope.sortable === true) {\r
-                    scope.sortable = 'true';\r
-                } else if (scope.sortable === false || scope.sortable === 'false') {\r
-                    scope.sortable = 'false';\r
-                }\r
-\r
-                if (scope.sortable !== 'false') {\r
-                    if (scope.defaultSort === 'A' || scope.defaultSort === 'a') {\r
-                        scope.sort(false);\r
-                    } else if (scope.defaultSort === 'D' || scope.defaultSort === 'd') {\r
-                        scope.sort(true);\r
-                    }\r
-                }\r
-                scope.resetSortPattern = function () {\r
-                    reverse = b2bTableConfig.defaultSortPattern;\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bResponsiveRow', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '^b2bTable',\r
-            controller: ['$scope', function ($scope) {\r
-                this.rowValues = $scope.rowValues = [];\r
-                this.setRowValues = function (rowValue) {\r
-                    this.rowValues.push(rowValue);\r
-                };\r
-                var columnIndexCounter = -1;\r
-                this.getIndex = function () {\r
-                    columnIndexCounter++;\r
-                    return columnIndexCounter;\r
-                };\r
-            }],\r
-            link: function (scope, elem, attr, ctrl) {\r
-                if (ctrl.responsive) {\r
-                    scope.rowIndex = attr.b2bResponsiveRow;\r
-                    scope.active = false;\r
-                    scope.expandFlag = false;\r
-                    scope.headerValues = ctrl.headers;\r
-                    ctrl.setResponsiveRow(scope);\r
-                    var firstTd = elem.find('td').eq(0);\r
-                    scope.setActive = function (activeFlag) {\r
-                        scope.active = activeFlag;\r
-                        if (scope.active) {\r
-                            elem.addClass('has-button');\r
-                            firstTd.attr('role', 'rowheader');\r
-                            firstTd.parent().attr('role', 'row');\r
-                        } else {\r
-                            elem.removeClass('has-button');\r
-                            firstTd.removeAttr('role');\r
-                            firstTd.parent().removeAttr('role');\r
-                        }\r
-                    };\r
-                    scope.toggleExpandFlag = function (expandFlag) {\r
-                        if (angular.isDefined(expandFlag)) {\r
-                            scope.expandFlag = expandFlag;\r
-                        } else {\r
-                            scope.expandFlag = !scope.expandFlag;\r
-                        }\r
-                        if (scope.expandFlag) {\r
-                            elem.addClass('opened');\r
-                        } else {\r
-                            elem.removeClass('opened');\r
-                        }\r
-                    };\r
-\r
-                    firstTd.attr('scope', 'row');\r
-                    firstTd.addClass('col-1');\r
-                    scope.$on('$destroy', function () {\r
-                        elem.next().remove();\r
-                    });\r
-                    $timeout(function () {\r
-                        scope.firstTdId = firstTd.attr('id');\r
-                        var firstTdContent = firstTd.html();\r
-                        var toggleButtonTemplate = '<span ng-show="!active">' + firstTdContent + '</span><button type="button" aria-describedby="sup-actNum{{$id}}" aria-expanded="{{expandFlag}}" ng-show="active" ng-click="toggleExpandFlag()"><i ng-class="{\'icon-primary-accordion-plus\': !expandFlag, \'icon-primary-accordion-minus\': expandFlag}" aria-hidden="true"></i>' + firstTdContent + '</button><span id="sup-actNum{{$id}}" style="display:none">{{expandFlag && "Hide row below." || "Show row below."}}</span>';\r
-                        toggleButtonTemplate = $compile(toggleButtonTemplate)(scope);\r
-                        firstTd.html('');\r
-                        firstTd.prepend(toggleButtonTemplate);\r
-\r
-                        var template = $templateCache.get('b2bTemplate/tables/b2bResponsiveRow.html');\r
-                        template = $compile(template)(scope);\r
-                        elem.after(template);\r
-                    }, 100);\r
-                }\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bResponsiveList', ['$templateCache', '$timeout', '$compile', function ($templateCache, $timeout, $compile) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: '^b2bTable',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                scope.columnIndex = parseInt(attr.b2bResponsiveList, 10);\r
-                scope.isVisible = function () {\r
-                    return (ctrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                };\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableBody', ['$filter', '$timeout', 'b2bTableConfig', function ($filter, $timeout, b2bTableConfig) {\r
-        return {\r
-            restrict: 'EA',\r
-            require: ['^b2bTable', '?^b2bResponsiveRow'],\r
-            scope: true,\r
-            replace: true,\r
-            transclude: true,\r
-            templateUrl: 'b2bTemplate/tables/b2bTableBody.html',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var b2bTableCtrl = ctrl[0];\r
-                var b2bResponsiveRowCtrl = ctrl[1];\r
-                var highlightSearchStringClass = b2bTableConfig.highlightSearchStringClass;\r
-                var searchString = "";\r
-                var wrapElement = function (elem) {\r
-                    var text = elem.text();\r
-                    elem.html($filter('b2bHighlight')(text, searchString, highlightSearchStringClass));\r
-                };\r
-                var traverse = function (elem) {\r
-                    var innerHtml = elem.children();\r
-                    if (innerHtml.length > 0) {\r
-                        for (var i = 0; i < innerHtml.length; i++) {\r
-                            traverse(innerHtml.eq(i));\r
-                        }\r
-                    } else {\r
-                        wrapElement(elem);\r
-                        return;\r
-                    }\r
-                };\r
-                var clearWrap = function (elem) {\r
-                    var elems = elem.find('*');\r
-                    for (var i = 0; i < elems.length; i++) {\r
-                        if (elems.eq(i).attr('class') && elems.eq(i).attr('class').indexOf(highlightSearchStringClass) !== -1) {\r
-                            var text = elems.eq(i).text();\r
-                            elems.eq(i).replaceWith(text);\r
-                        }\r
-                    }\r
-                };\r
-                if (b2bResponsiveRowCtrl) {\r
-                    scope.columnIndex = b2bResponsiveRowCtrl.getIndex();\r
-                    scope.isHidden = function () {\r
-                        return (b2bTableCtrl.hiddenColumn.indexOf(scope.columnIndex) > -1);\r
-                    };\r
-                }\r
-                $timeout(function () {\r
-                    var actualHtml = elem.children();\r
-                    scope.$watch(function () {\r
-                        return b2bTableCtrl.getSearchString();\r
-                    }, function (val) {\r
-                        searchString = val;\r
-                        clearWrap(elem);\r
-                        if (actualHtml.length > 0) {\r
-                            traverse(elem);\r
-                        } else {\r
-                            wrapElement(elem);\r
-                        }\r
-                    });\r
-                    if (b2bResponsiveRowCtrl) {\r
-                        b2bResponsiveRowCtrl.setRowValues(elem.html());\r
-                    }\r
-                }, 50);\r
-            }\r
-        };\r
-    }])\r
-    .directive('b2bTableSort', ['b2bTableConfig','$timeout', function (b2bTableConfig,$timeout) {\r
-        return {\r
-            restrict: 'EA',\r
-            replace: true,\r
-            require: '^b2bTable',\r
-            link: function (scope, elem, attr, ctrl) {\r
-                var initialSort = '',\r
-                    nextSort = '',\r
-                    tempsort = '';\r
-                initialSort = attr.initialSort;\r
-\r
-                scope.sortTable = function (msg) {\r
-                    $timeout(function(){\r
-                        if (nextSort.length > 0) {\r
-\r
-                        if (nextSort === 'd' || nextSort === 'D') {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, true, true);\r
-                            nextSort = 'a';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                            \r
-                        } else {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, false, true);\r
-                            nextSort = 'd';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                        }\r
-                    } else if (initialSort.length > 0) {\r
-\r
-                        if (initialSort === 'd' || initialSort === 'D') {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, true, true);\r
-                            nextSort = 'a';\r
-                            $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-                             \r
-                        } else {\r
-                            tempsort = nextSort\r
-                            ctrl.sortData(msg, false, true);\r
-                            nextSort = 'd';\r
-                             $timeout(function(){\r
-                                if(!angular.isUndefined(elem[0].querySelector('.sortButton')) || elem[0].querySelector('.sortButton') !== null ){\r
-                                    angular.element(elem[0].querySelector('.sortButton'))[0].focus();\r
-                                }   \r
-                            },100);\r
-\r
-                             \r
-                        }\r
-                    }\r
-                    },10)\r
-\r
-                };\r
-\r
-                scope.sortDropdown = function(msg) {\r
-\r
-                    if(tempsort==='') {\r
-\r
-                        tempsort='a'\r
-                    }\r
-                    if(tempsort === 'd' || tempsort === 'D' ) {\r
-                        ctrl.sortData(msg, true, false);       \r
-                    } else {\r
-                       ctrl.sortData(msg, false, false);\r
-                    }\r
-\r
-                };\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Tabs, tables & accordions.att:tabs\r
- *\r
- * @description\r
- *  <file src="src/tabs/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <b2b-tabset tab-id-selected="activeTabsId">\r
-        <b2b-tab ng-repeat="tab in gTabs" tab-item="tab" \r
-                 id="{{tab.uniqueId}}" aria-controls="{{tab.tabPanelId}}"\r
-                 ng-disabled="tab.disabled">\r
-            {{tab.title}}\r
-        </b2b-tab>\r
-    </b2b-tabset>\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tabs/docs/demo.html" />\r
-            <file src="src/tabs/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-\r
-angular.module('b2b.att.tabs', ['b2b.att.utilities'])\r
-    .directive('b2bTabset', function () {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            scope: {\r
-                tabIdSelected: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/tabs/b2bTabset.html',\r
-            controller: ['$scope', function ($scope) {\r
-\r
-                this.setTabIdSelected = function (tab) {\r
-                    $scope.tabIdSelected = tab.id;\r
-                };\r
-\r
-                this.getTabIdSelected = function () {\r
-                    return $scope.tabIdSelected;\r
-                };\r
-            }]\r
-        };\r
-    })\r
-    .directive('b2bTab', ['keymap', function (keymap) {\r
-        return {\r
-            restrict: 'EA',\r
-            transclude: true,\r
-            replace: true,\r
-            require: '^b2bTabset',\r
-            scope: {\r
-                tabItem: "="\r
-            },\r
-            templateUrl: 'b2bTemplate/tabs/b2bTab.html',\r
-            controller: [function(){}],\r
-            link: function (scope, element, attr, b2bTabsetCtrl) {\r
-\r
-                if (scope.tabItem && !scope.tabItem.disabled) {\r
-                    scope.tabItem.disabled = false;\r
-                }\r
-\r
-                scope.isTabActive = function () {\r
-                    return (scope.tabItem.id === b2bTabsetCtrl.getTabIdSelected());\r
-                };\r
-\r
-                scope.clickTab = function () {\r
-                    if (attr.disabled) {\r
-                        return;\r
-                    }\r
-                    b2bTabsetCtrl.setTabIdSelected(scope.tabItem);\r
-                };\r
-\r
-                scope.nextKey = function () {\r
-                    var el = angular.element(element[0])[0];\r
-                    var elementToFocus = null;\r
-                    while (el && el.nextElementSibling) {\r
-                        el = el.nextElementSibling;\r
-                        if (!el.querySelector('a').disabled) {\r
-                            elementToFocus = el.querySelector('a');\r
-                            break;\r
-                        }\r
-                    }\r
-\r
-                    if (!elementToFocus) {\r
-                        var childTabs = element.parent().children();\r
-                        for (var i = 0; i < childTabs.length; i++) {\r
-                            if (!childTabs[i].querySelector('a').disabled) {\r
-                                elementToFocus = childTabs[i].querySelector('a');\r
-                                break;\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    if (elementToFocus) {\r
-                        elementToFocus.focus();\r
-                    }\r
-                };\r
-\r
-                scope.previousKey = function () {\r
-                    var el = angular.element(element[0])[0];\r
-                    var elementToFocus = null;\r
-\r
-                    while (el && el.previousElementSibling) {\r
-                        el = el.previousElementSibling;\r
-                        if (!el.querySelector('a').disabled) {\r
-                            elementToFocus = el.querySelector('a');\r
-                            break;\r
-                        }\r
-                    }\r
-\r
-                    if (!elementToFocus) {\r
-                        var childTabs = element.parent().children();\r
-                        for (var i = childTabs.length - 1; i > 0; i--) {\r
-                            if (!childTabs[i].querySelector('a').disabled) {\r
-                                elementToFocus = childTabs[i].querySelector('a');\r
-                                break;\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    if (elementToFocus) {\r
-                        elementToFocus.focus();\r
-                    }\r
-                };\r
-\r
-                angular.element(element[0].querySelector('a')).bind('keydown', function (evt) {\r
-\r
-                    if (!(evt.keyCode)) {\r
-                        evt.keyCode = evt.which;\r
-                    }\r
-\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.RIGHT:\r
-                            evt.preventDefault();\r
-                            scope.nextKey();\r
-                            break;\r
-\r
-                        case keymap.KEY.LEFT:\r
-                            evt.preventDefault();\r
-                            scope.previousKey();\r
-                            break;\r
-\r
-                        default:;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Messages, modals & alerts.att:tagBadges\r
- *\r
- * @description\r
- *  <file src="src/tagBadges/docs/readme.md" />\r
- *\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/tagBadges/docs/demo.html" />\r
-            <file src="src/tagBadges/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.tagBadges', ['b2b.att.utilities'])\r
-        .directive('b2bTagBadge',['$timeout',function($timeout){\r
-            return{\r
-                restrict: 'EA',\r
-                link: function(scope,elem,attr,ctrl){\r
-                    elem.addClass('b2b-tags');\r
-                    if(angular.element(elem[0].querySelector('.icon-primary-close')).length>0) {\r
-                        var item = angular.element(elem[0].querySelector('.icon-primary-close'));\r
-                        item.bind('click',function(){\r
-                        elem.css({'height':'0','width':'0','padding':'0','border':'0'});\r
-                        elem.attr('tabindex','0');\r
-                        elem[0].focus();\r
-                        item.parent().remove();\r
-                        elem[0].bind('blur',function(){\r
-                            elem[0].remove();\r
-                        });\r
-                    });  \r
-                    }\r
-                  \r
-\r
-\r
-\r
-                }\r
-            };   \r
-}]);\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:textArea\r
- *\r
- * @description\r
- *  <file src="src/textArea/docs/readme.md" />\r
- *\r
- * @usage\r
- *  <textarea b2b-reset b2b-reset-textarea ng-model="textAreaModel" ng-disabled="disabled" ng-trim="false" placeholder="{{placeholderText}}" rows="{{textAreaRows}}" maxlength="{{textAreaMaxlength}}" role="textarea"></textarea>\r
- *\r
- * @example\r
-    <section id="code">\r
-        <b>HTML + AngularJS</b>\r
-        <example module="b2b.att">\r
-            <file src="src/textArea/docs/demo.html" />\r
-            <file src="src/textArea/docs/demo.js" />\r
-        </example>\r
-    </section>\r
- */\r
-angular.module('b2b.att.textArea', ['b2b.att.utilities'])\r
-\r
-.directive('b2bResetTextarea', [ function () {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'b2bReset',\r
-        link: function (scope, element, attrs, ctrl) {\r
-\r
-            var resetButton = ctrl.getResetButton();\r
-            \r
-            var computeScrollbarAndAddClass = function () {\r
-                if (element.prop('scrollHeight') > element[0].clientHeight) {\r
-                    element.addClass('hasScrollbar');\r
-                } else {\r
-                    element.removeClass('hasScrollbar');\r
-                }\r
-            };\r
-            \r
-            computeScrollbarAndAddClass();\r
-\r
-            element.on('focus keyup', function(){\r
-                computeScrollbarAndAddClass();\r
-            });\r
-        }\r
-    };\r
-}]);\r
-\r
-/**\r
- * @ngdoc directive\r
- * @name Forms.att:tooltipsForForms\r
- *\r
- * @description\r
- *  <file src="src/tooltipsForForms/docs/readme.md" />\r
- *\r
- * @example\r
- <example module="b2b.att">\r
- <file src="src/tooltipsForForms/docs/demo.html" />\r
- <file src="src/tooltipsForForms/docs/demo.js" />\r
- </example>\r
- */\r
-angular.module('b2b.att.tooltipsForForms', ['b2b.att.utilities'])\r
-        .directive('b2bTooltip', ['$document', '$window', '$isElement', function ($document, $window, $isElement) {\r
-                return  {\r
-                    restrict: 'A',\r
-                    link: function (scope, elem, attr, ctrl) {\r
-                        var icon = elem[0].querySelector('a.tooltip-element');\r
-                        var btnIcon = elem[0].querySelector('.btn.tooltip-element');\r
-                        var tooltipText = elem[0].querySelector('.helpertext');\r
-                        var tooltipWrapper = elem[0].querySelector('.tooltip-size-control');\r
-                        if (elem.hasClass('tooltip-onfocus')) {\r
-                            var inputElm = angular.element(elem[0].querySelector("input"));\r
-                            var textAreaElm = angular.element(elem[0].querySelector("textarea"));\r
-                        }\r
-                        angular.element(icon).attr({'aria-expanded': false});\r
-                        angular.element(btnIcon).attr({'aria-expanded': false});\r
-                        var calcTooltip = function () {\r
-                            if (!elem.hasClass('tooltip active')) {\r
-                                if (elem.hasClass('tooltip-onfocus')) {\r
-                                    angular.element(elem[0].querySelector("input")).triggerHandler('focusout');\r
-                                }\r
-                                if (elem.hasClass('tooltip-onclick')) {\r
-                                    return false;\r
-                                }\r
-                                angular.element(icon).removeClass('active');\r
-                                angular.element(icon).attr({'aria-expanded': true});\r
-                                angular.element(icon).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                                angular.element(tooltipText).attr({'aria-hidden': false});\r
-                                elem.addClass('active');\r
-\r
-                                var tooltipIconPos = angular.element(icon).prop('offsetLeft'),\r
-                                        tooltipPosition = angular.element(tooltipText).prop('offsetWidth') / 2,\r
-                                        tipOffset = (tooltipIconPos - 30) - tooltipPosition,\r
-                                        maxRightPos = (($window.innerWidth - 72) - (tooltipPosition * 2)) - 14.5;\r
-\r
-                                if ($window.innerWidth >= '768') {\r
-                                    if (tipOffset < 0) {// if icon on far left side of page\r
-                                        tipOffset = 15;\r
-                                    }\r
-                                    else if (tooltipIconPos > maxRightPos) {// if icon is far right side of page\r
-                                        tipOffset = maxRightPos;\r
-                                    }\r
-                                    else {// if tooltip in the middle somewhere\r
-                                        tipOffset = tipOffset;\r
-                                    }\r
-                                    angular.element(tooltipWrapper).css({left: tipOffset + 'px'});\r
-                                }\r
-                            }\r
-                        };\r
-                        \r
-                        // TOOLTIP LINK ONCLICK AND FOCUS\r
-                        angular.element(icon).on('click mouseover mouseout focus blur', function (e) {\r
-                            if (e.type == 'mouseover') {\r
-                                calcTooltip();\r
-                            }\r
-                            else if (e.type == 'mouseout' && elem.hasClass('active')) {\r
-                                if (!elem.hasClass('activeClick')) {\r
-                                    angular.element(tooltipText).attr({\r
-                                        'aria-hidden': true,\r
-                                        'tabindex': '-1'\r
-                                    });\r
-                                    elem.removeClass('active');\r
-                                } else if (elem.hasClass('activeClick') && navigator.userAgent.match(/iphone/i)) {\r
-                                    elem.removeClass('active activeClick');\r
-                                }\r
-                            }\r
-\r
-                            else {\r
-                                if (elem.hasClass('activeClick')) {\r
-                                    angular.element(icon).attr({'aria-expanded': false});\r
-                                    angular.element(tooltipText).attr({'aria-hidden': true});\r
-                                    angular.element(icon).removeAttr('aria-describedby');\r
-                                    elem.removeClass('activeClick active');\r
-                                    e.preventDefault();\r
-                                }\r
-                                else if (e.type == 'click') {\r
-                                    elem.addClass('activeClick');\r
-                                    calcTooltip();\r
-                                    e.preventDefault();\r
-                                }\r
-                                else {\r
-                                    angular.element(icon).on('keydown', function (e) {\r
-                                        if (e.keyCode == '32') {\r
-                                            (elem.hasClass('active')) ? elem.removeClass('active') : elem.addClass('value');\r
-                                            angular.element(icon).triggerHandler('click');\r
-                                            e.preventDefault();\r
-                                        } else if (e.keyCode == '27') {\r
-                                            (elem.hasClass('active')) ? elem.removeClass('active activeClick') : elem.addClass('value');\r
-                                        }\r
-                                    });\r
-                                    e.preventDefault();\r
-                                }\r
-                            }\r
-                            e.preventDefault();\r
-                        });\r
-\r
-                        // TOOLTIP BUTTON INSIDE A TEXT FIELD\r
-                        angular.element(btnIcon).on('click', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                elem.removeClass('active');\r
-                                $this.removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                $this.attr({'aria-expanded': 'false'});\r
-                                $this.removeAttr('aria-describedby');\r
-                            } else {\r
-                                elem.addClass('active');\r
-                                $this.addClass('active');\r
-                                $this.attr({'aria-expanded': 'true', 'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                                angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            }\r
-                        });\r
-\r
-                        angular.element(btnIcon).on('blur', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                elem.removeClass('active');\r
-                                $this.removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                $this.attr({'aria-expanded': 'false'});\r
-                                $this.removeAttr('aria-describedby');\r
-                            }\r
-                        });  \r
-\r
-                        angular.element(btnIcon).on('keydown', function (e) {\r
-                            var $this = angular.element(this);\r
-                            if (e.keyCode == '27') {\r
-                                var $this = angular.element(this);\r
-                                if ($this.hasClass('active') && elem.hasClass('tooltip-onclick')) {\r
-                                    elem.removeClass('active');\r
-                                    $this.removeClass('active');\r
-                                    angular.element(tooltipText).removeAttr('aria-live');\r
-                                    $this.attr({'aria-expanded': 'false'});\r
-                                    $this.removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        // close all tooltips if clicking something else\r
-                        $document.bind('click', function (e) {\r
-                            var isElement = $isElement(angular.element(e.target), elem, $document);\r
-                            if (!isElement) {\r
-                                elem.removeClass('active');\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).removeClass('active');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).attr({'aria-expanded': 'false'});\r
-                                angular.element(elem[0].querySelector('.tooltip-element')).removeAttr('aria-describedby');\r
-                            };\r
-                        });\r
-\r
-                        angular.element(inputElm).on('keydown', function (e) {\r
-                            if (e.keyCode == '27'){\r
-                                elem.removeClass('active');\r
-                                angular.element(tooltipText).css('display', 'none');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-\r
-                                if (angular.element(this).attr('aria-describedby') === undefined){\r
-\r
-                                }\r
-\r
-                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){\r
-\r
-                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);\r
-\r
-                                    angular.element(this).attr('aria-describedby', describedByValue);\r
-\r
-                                }\r
-                                else {\r
-                                    angular.element(this).removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        angular.element(textAreaElm).on('keydown', function (e) {\r
-                            if (e.keyCode == '27'){\r
-                                elem.removeClass('active');\r
-                                angular.element(tooltipText).css('display', 'none');\r
-                                angular.element(tooltipText).removeAttr('aria-live');\r
-                                if (angular.element(this).attr('aria-describedby') === undefined){\r
-\r
-                                }\r
-\r
-                                else if ((spaceIndex = angular.element(this).attr('aria-describedby').lastIndexOf(' ')) >= 0){\r
-\r
-                                    var describedByValue = angular.element(this).attr('aria-describedby').slice(0, spaceIndex);\r
-\r
-                                    angular.element(this).attr('aria-describedby', describedByValue);\r
-\r
-                                }\r
-                                else {\r
-                                    angular.element(this).removeAttr('aria-describedby');\r
-                                }\r
-                            }\r
-                        });\r
-\r
-                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXT FIELD\r
-                        angular.element(inputElm).on('focus', function (e) {\r
-                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');\r
-                            for (var i = 0; i < allTooltip.length; i++) {\r
-                                if (angular.element(allTooltip[i]).hasClass('active')) {\r
-                                    angular.element(allTooltip[i]).triggerHandler('click');\r
-                                }\r
-                            };\r
-                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                            angular.element(tooltipText).css('display', 'block');\r
-                            angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            elem.addClass('active');\r
-                        });\r
-                        angular.element(inputElm).on('blur', function (e) {\r
-                            elem.removeClass('active');\r
-                            angular.element(tooltipText).css('display', 'none');\r
-                            angular.element(tooltipText).removeAttr('aria-live');\r
-                            angular.element(this).removeAttr('aria-describedby');\r
-                        });\r
-\r
-                        // TOOLTIP TRIGGERED AUTOMATICALLY INSIDE A TEXTAREA\r
-                        angular.element(textAreaElm).on('focus', function (e) {\r
-                            var allTooltip = $document[0].querySelectorAll('[class*="tooltip"]');\r
-                            for (var i = 0; i < allTooltip.length; i++) {\r
-                                if (angular.element(allTooltip[i]).hasClass('active')) {\r
-                                    angular.element(allTooltip[i]).triggerHandler('click');\r
-                                }\r
-                            };\r
-                            elem.addClass('active');\r
-                            angular.element(tooltipText).css('display', 'block');\r
-                            angular.element(tooltipText).attr({'aria-live': 'polite'});\r
-                            angular.element(this).attr({'aria-describedby': angular.element(tooltipText).attr('id')});\r
-                        });\r
-                        angular.element(textAreaElm).on('blur', function (e) {\r
-                            elem.removeClass('active');\r
-                            angular.element(tooltipText).css('display', 'none');\r
-                            angular.element(tooltipText).removeAttr('aria-live');\r
-                            angular.element(this).removeAttr('aria-describedby');\r
-                        });\r
-                    }\r
-                };\r
-            }]); \r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:TreeNavigation\r
- *\r
- *\r
- * @scope\r
- * @param {String} setRole - This value needs to be "tree". This is required to incorporate CATO requirements.\r
- * @param {Boolean} groupIt - This value needs to be "false" for top-level tree rendered.\r
- *\r
- * @description\r
- *  <file src="src/treeNav/docs/readme.md" />\r
- *\r
- * @usage\r
- *      <div class="b2b-tree">\r
- *                <b2b-tree-nav collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-nav>\r
- *            </div>\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/treeNav/docs/demo.html" />\r
-            <file src="src/treeNav/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.treeNav', ['b2b.att.utilities'])\r
-    .directive('b2bTreeNav', function () {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                collection: '=',\r
-                groupIt: '=',\r
-                setRole: '@'\r
-            },\r
-            templateUrl: function (element, attrs) {\r
-                if (attrs.groupIt === 'true') {\r
-                    return "b2bTemplate/treeNav/groupedTree.html";\r
-                } else {\r
-                    return "b2bTemplate/treeNav/ungroupedTree.html";\r
-                }\r
-            },\r
-            link: function (scope) {               \r
-                if (!(scope.setRole === 'tree')) {\r
-                    scope.setRole = 'group';\r
-                }             \r
-            }\r
-        }\r
-    })\r
-    .directive('b2bMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                member: '=',\r
-                groupIt: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/treeNav/treeMember.html',\r
-            link: function (scope, element, attrs) {\r
-                scope.elemArr = [];\r
-                var removeRootTabIndex = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {\r
-                        elem.attr('tabindex', -1);                        \r
-                        return;\r
-                    }\r
-                    removeRootTabIndex(elem.parent());\r
-                };\r
-                scope.$watch('member.child', function(newVal, oldVal){                  \r
-                    if(newVal !== oldVal){\r
-                        scope.showChild();\r
-                    };\r
-                });\r
-                scope.showChild = function () {\r
-                        if (!element.hasClass('grouped')) {\r
-                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {\r
-                                scope.groupIt = false;\r
-                                element.addClass('grouped');\r
-                                element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('aria-selected', true);\r
-                                    element.attr('tabindex', 0);\r
-                                    removeRootTabIndex(element);\r
-                                };\r
-                                if(scope.member.active && scope.member.active == undefined){\r
-                                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {\r
-                                element.addClass('grouped');\r
-                                scope.groupIt = true;\r
-                                // FILTER - GROUPBY - APPROACH \r
-                                var j = 0;\r
-                                var grpName = '';\r
-                                if(scope.member.child[0].groupName !== undefined){\r
-                                    grpName = scope.member.child[0].groupName;\r
-                                }\r
-                                else{\r
-                                    var toSlice = scope.member.child[0].name.search(' ');\r
-                                    grpName = scope.member.child[0].name.slice(0, toSlice);\r
-                                }\r
-\r
-                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {\r
-                                    j = 0;\r
-                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        \r
-                                        if (j === scope.member.child.length) {\r
-                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            break;\r
-                                            \r
-                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){\r
-                                                scope.member.child[j-1].activeGrp = true;\r
-                                            };\r
-                                            \r
-                                        }\r
-                                        if (i + scope.member.divide > scope.member.child.length) {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-\r
-                                        } else {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-                                        }\r
-                                    }\r
-                                }\r
-                                if(scope.member.divide){\r
-                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                } else {\r
-                                    element.append("<b2b-tree-nav collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-nav>");\r
-                                }\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('aria-selected', true);\r
-                                };\r
-                                if( scope.member.active && scope.member.active == undefined){\r
-                                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            }\r
-                        }\r
-                };\r
-                //Below condition opens node for opening on json load.\r
-                if(scope.member.active && scope.member.active == true){\r
-                    scope.showChild();\r
-                };\r
-                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){\r
-                    element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                }\r
-                else if(scope.member.child == undefined){\r
-                    element.find('i').eq(0).addClass('icon-primary-circle');\r
-                };\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                        case keymap.KEY.ENTER:\r
-                            if (element.hasClass('bg') && scope.member.onSelect !== undefined) {\r
-                                scope.member.onSelect(scope.member);\r
-                            }\r
-                            evt.stopPropagation();\r
-                            break;\r
-                        default: \r
-                            break;                            \r
-                    }\r
-                    \r
-                });\r
-                //else getting true in every case .. so better use switch case .. that makes more sense you dumb.\r
-                element.bind('click', function (evt) {\r
-                    scope.showChild();\r
-                    var expandFunc = scope.member.onExpand;\r
-                    \r
-                    //onSelect\r
-                        if (element.hasClass('bg') && scope.member.onSelect !== undefined) {\r
-                                    scope.member.onSelect(scope.member);\r
-                                }\r
-                        if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {\r
-                           var eValue = scope.member.onExpand(scope.member);\r
-                        }\r
-                        if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {\r
-                            scope.member.onCollapse(scope.member);\r
-                        }\r
-                });\r
-            }\r
-        }\r
-}])\r
-    .directive('b2bTreeLink', ['keymap', '$timeout', function (keymap, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            link: function (scope, element, attr, ctrl) {\r
-                var rootE, parentE, upE, downE;\r
-                var closeOthersUp = function (elem,isKeyPress,passiveClose) {\r
-                    //For accordion functionality on sibling nodes\r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem,isKeyPress,passiveClose);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg') && !isKeyPress) {\r
-                        elem.removeClass('bg');\r
-                        if (elem.attr('aria-selected')) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }                        \r
-                    }\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling),isKeyPress);\r
-                    }\r
-                };\r
-                var closeOthersDown = function (elem,isKeyPress,passiveClose) {\r
-                    //For accordion functionality on sibling nodes\r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem,isKeyPress,passiveClose);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg') && !isKeyPress) {\r
-                        elem.removeClass('bg');\r
-                        if (elem.attr('aria-selected')) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }                        \r
-                    }\r
-                    if (elem[0].nextElementSibling !== null) {\r
-                        closeOthersDown(angular.element(elem[0].nextElementSibling),isKeyPress);\r
-                    }\r
-                };\r
-\r
-               \r
-                var removeBackground = function(elem){\r
-\r
-                    if(elem.hasClass('b2b-tree')){\r
-                        angular.element(elem[0].getElementsByClassName('bg')).removeClass('bg');\r
-                        return;\r
-                    }else{\r
-                        removeBackground(elem.parent().parent());\r
-                    }\r
-\r
-                };\r
-\r
-/**\r
-* These two functions used for setting heights on parent nodes as the child node closes\r
-* Retaining this code for future reference\r
-\r
-                var addParentHeight = function(e, h) {\r
-                    var parentLi = e.parent().parent();\r
-                    var parentUl = e.parent();\r
-                    if(!parentLi.hasClass('b2b-tree')) {\r
-                        var addHeight = parentUl[0].offsetHeight + h;\r
-                        parentLi.find('ul').eq(0).css({\r
-                            height: addHeight+'px'\r
-                        })\r
-                        addParentHeight(parentLi, h);\r
-                    }                    \r
-                };\r
-\r
-                var removeParentHeight = function(e, h) {\r
-                    var parentLi = e.parent().parent();\r
-                    var parentUl = e.parent();\r
-                    if(!parentLi.hasClass('b2b-tree')) {\r
-                        var addHeight = parentUl[0].offsetHeight - h;\r
-                        parentLi.find('ul').eq(0).css({\r
-                            height: addHeight+'px'\r
-                        })\r
-                        removeParentHeight(parentLi, h);\r
-                    }\r
-                };\r
-*/          \r
-\r
-            // isKeyPress - to notify that the function is called by Right Key press\r
-            // passiveClose -  prevents firing of oncollapse events during the action\r
-            // of expand function(check the function definition)\r
-\r
-                var activeToggle = function (elem,isKeyPress,passiveClose) {\r
-                    var element = elem.find('a').eq(0);\r
-                    if (element.hasClass('active')) {\r
-                        if(!isKeyPress){\r
-                            elem.removeClass('bg');\r
-                        }\r
-                        \r
-                        if (elem.attr('aria-selected') && !isKeyPress) {\r
-                            elem.attr('aria-selected', 'false');\r
-                        }\r
-                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(isKeyPress && scope.member){\r
-                                if (scope.member.onCollapse !== undefined && !passiveClose) {\r
-                                    scope.member.onCollapse(scope.member);\r
-                                }\r
-                            }\r
-                            element.removeClass('active');\r
-                            elem.attr('aria-expanded', 'false');\r
-                            element.find('i').eq(0).removeClass('icon-primary-expanded');\r
-                            element.find('i').eq(0).addClass('icon-primary-collapsed');\r
-                            //For Animation: below commented code is used to manually set height of UL to zero \r
-                            //retaining code for future reference\r
-                            /*\r
-                            var totalHeight = elem.find('ul')[0].scrollHeight;\r
-                            removeParentHeight(elem, totalHeight);\r
-                            elem.find('ul').eq(0).css({\r
-                                height: null\r
-                            });*/\r
-                        }\r
-                    } else {\r
-                        if(!isKeyPress){\r
-                            elem.addClass('bg');\r
-                            elem.attr('aria-selected', 'true');\r
-                        }\r
-                        \r
-                        if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(isKeyPress){\r
-                                if(typeof scope.showChild === 'function' ){\r
-                                scope.showChild();\r
-                                }\r
-                                if(scope.member){\r
-                                    if (scope.member.onExpand !== undefined) {\r
-                                        scope.member.onExpand(scope.member);\r
-                                    }\r
-                                }\r
-                            }\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            element.find('i').eq(0).addClass('icon-primary-expanded');\r
-                            //For Animation: below commented code is used to manually set height of the ul generatedon the click of parent LI.\r
-                            //retaining code for future reference\r
-                            /*                            \r
-                            var totalHeight = elem.find('ul')[0].scrollHeight;\r
-                            addParentHeight(elem, totalHeight);\r
-                            elem.find('ul').eq(0).css({\r
-                                height: totalHeight+'px'\r
-                            });*/\r
-                            \r
-                        }\r
-                    }\r
-                };\r
-                element.bind('click', function (evt) {\r
-                    //first we close others and then we open the clicked element\r
-                    if (element[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                    }\r
-                    if (element[0].nextElementSibling) {\r
-                        closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                    }\r
-                    removeBackground(element);\r
-                    activeToggle(element);                    \r
-                    \r
-                    evt.stopPropagation();                    \r
-                });\r
-                //default root tree element tabindex set zero\r
-                if (element.parent().parent().hasClass('b2b-tree') && (element.parent()[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                //check root via class\r
-                var isRoot = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree')) {\r
-                        return true;\r
-                    } else {\r
-                        return false;\r
-                    }\r
-                };\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    findRoot(elem.parent());\r
-                };\r
-\r
-                var findPreActive = function (elem) {\r
-\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-\r
-                var findUp = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        upE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                        if (upE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(upE.find('a').eq(0));\r
-                        }\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                };\r
-\r
-                var downElement = function (elem) {\r
-                    if (elem.next().hasClass('tree-hide')) {\r
-                        downElement(elem.next());\r
-                    } else {\r
-                        downE = elem.next();\r
-                    }\r
-                }\r
-                var isBottomElem = false;\r
-                var downParent = function(liElem){\r
-                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree')){\r
-                        isBottomElem = true;\r
-                        return;\r
-                    }\r
-                    if(liElem.next().length !== 0){\r
-                        downE = liElem.next().eq(0);\r
-                        return;\r
-                    }\r
-                    else {\r
-                        downParent(liElem.parent().parent());\r
-                    }\r
-                }\r
-                \r
-                var findDown = function (elem) {\r
-                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {\r
-                        downE = elem.parent();\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                        if (downE.hasClass('tree-hide')) {\r
-                            downElement(downE);\r
-                        }\r
-\r
-                    } else {\r
-                        downParent(elem.parent());\r
-                        if(isBottomElem === true){\r
-                            downE = elem.parent();\r
-                            isBottomElem = false;\r
-                        }\r
-                    }\r
-                };\r
-\r
-\r
-                var resetTabPosition = function(element){\r
-                    findRoot(element);\r
-                    angular.element(rootE.parent().parent()[0].querySelector("li[tabindex='0']")).attr('tabindex','-1');\r
-                    var elemToFocus =  rootE.parent().parent()[0].querySelector(".bg")|| rootE;\r
-\r
-                    angular.element(elemToFocus).attr('tabindex','0');\r
-                };\r
-                // Function to control the expansion of nodes when the user tabs into the tree and\r
-                // the slected node is not visible\r
-                var expand = function(elemArr){\r
-                    var elem= elemArr.pop();\r
-                    var element = elem.find('a').eq(0);                    \r
-                    var selectedNode = elem.parent().parent()[0].querySelector(".bg");\r
-                    if(selectedNode != null){\r
-                        while(elem){\r
-                             element = elem.find('a').eq(0);\r
-                    if(!element.hasClass('active') ){\r
-\r
-\r
-                    if (elem[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling),true,true);\r
-                        }\r
-                        if (elem[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(elem[0].nextElementSibling),true,true);\r
-                        }\r
-\r
-                         if (!element.find('i').eq(0).hasClass('icon-primary-circle')) {\r
-                            if(typeof scope.showChild === 'function' ){\r
-                                scope.showChild();\r
-                            }\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            element.find('i').eq(0).removeClass('icon-primary-collapsed');\r
-                            element.find('i').eq(0).addClass('icon-primary-expanded');\r
-                            }\r
-                          \r
-                          }   \r
-                          elem = elemArr.pop();\r
-                        }                      \r
-                        \r
-                    }else{\r
-                        return;\r
-                    }                   \r
-                };\r
-\r
-                element.find('a').eq(0).bind('mouseenter', function (evt) {\r
-                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {\r
-                        angular.element(value).removeClass('activeTooltip') \r
-                    });\r
-                    element.addClass('activeTooltip');\r
-                });\r
-                element.find('a').eq(0).bind('mouseleave', function (evt) {\r
-                    element.removeClass('activeTooltip');\r
-                });\r
-                element.bind('focus', function (evt) {\r
-                    angular.forEach(document.querySelectorAll('.activeTooltip'), function(value, key) {\r
-                        angular.element(value).removeClass('activeTooltip') \r
-                    });\r
-                    element.addClass('activeTooltip');\r
-                });\r
-                element.bind('blur', function (evt) {\r
-                    element.removeClass('activeTooltip');\r
-                });\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findRoot(element);\r
-                        rootE.eq(0).attr('tabindex', 0);\r
-                        rootE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation(); \r
-                      \r
-                        if(element.find('a').eq(0).hasClass('active')){\r
-                            if (element[0].previousElementSibling) {\r
-                                closeOthersUp(angular.element(element[0].previousElementSibling),true);\r
-                            }\r
-                            if (element[0].nextElementSibling) {\r
-                                closeOthersDown(angular.element(element[0].nextElementSibling),true);\r
-                             }\r
-                             activeToggle(element,true);\r
-                                return;\r
-                        }\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findUp(element);\r
-                        upE.eq(0).attr('tabindex', 0);\r
-                        upE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(element.find('i').eq(0).hasClass('icon-primary-circle')){\r
-                            break;\r
-                        }    \r
-                        if (!element.find('a').eq(0).hasClass('active')) {\r
-                            if (element[0].previousElementSibling) {\r
-                        closeOthersUp(angular.element(element[0].previousElementSibling),true);\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling),true);\r
-                        }\r
-                        activeToggle(element,true);\r
-                    \r
-                        }\r
-                        else {\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();                            \r
-                        }                        \r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.ENTER:\r
-                        var isSelectedElem = element.hasClass('bg');\r
-                        var enterFunc = function(element){\r
-                            if (isSelectedElem) {\r
-                                element.removeClass('bg');\r
-                                if (element.attr('aria-selected')) {\r
-                                    element.attr('aria-selected', 'false');\r
-                                }                        \r
-                            }\r
-                            else {\r
-                                element.addClass('bg');\r
-                                element.attr('aria-selected', 'true');                                   \r
-                            }  \r
-                        };                            \r
-                        if (element[0].previousElementSibling) {\r
-                            closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                        }                   \r
-                        \r
-                        removeBackground(element);\r
-                        enterFunc(element);\r
-                        evt.stopPropagation();                                                      \r
-                        break;\r
-                    case keymap.KEY.TAB:\r
-                        $timeout(function(){\r
-                            resetTabPosition(element);\r
-                        },0);\r
-                         evt.stopPropagation(); \r
-                        \r
-                        break;\r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            element.bind('keyup',function(evt){\r
-                if(evt.keyCode === keymap.KEY.TAB){\r
-                  \r
-                        var tempElem = element;\r
-                        var elemArr = [];\r
-                        while(!tempElem.hasClass('b2b-tree')){\r
-                            elemArr.push(tempElem);\r
-                            tempElem = tempElem.parent().parent();\r
-                        }\r
-                        elemArr.push(tempElem);\r
-                      \r
-                        expand(elemArr);                    \r
-                }\r
-                 evt.stopPropagation(); \r
-            });\r
-            }\r
-        };\r
-    }]);\r
-/**\r
- * @ngdoc directive\r
- * @name Navigation.att:Tree nodes with checkboxes\r
- *\r
- * @param {String} setRole - The value needs to be "tree". This is required to incorporate CATO requirements.\r
- * @param {boolean} groupIt - The value needs to be "false" for top-level tree rendered. \r
- * @param {Object} collection -  The JSON object of tree to be rendered.\r
- * @description\r
- *  <file src="src/treeNodeCheckbox/docs/readme.md" />\r
- *\r
- * @usage\r
- *      <div class="b2b-tree-checkbox">\r
- *                <b2b-tree-node-checkbox collection="treeStructure" set-role="tree" group-it="false"></b2b-tree-node-checkbox>\r
- *            </div>\r
- * @example\r
- *  <section id="code">\r
-        <example module="b2b.att">\r
-            <file src="src/treeNodeCheckbox/docs/demo.html" />\r
-            <file src="src/treeNodeCheckbox/docs/demo.js" />\r
-       </example>\r
-    </section>\r
- *\r
- */\r
-angular.module('b2b.att.treeNodeCheckbox', ['b2b.att.utilities'])\r
-    .directive('b2bTreeNodeCheckbox', function () {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                collection: '=',\r
-                groupIt: '=',\r
-                setRole: '@'\r
-            },\r
-            templateUrl: function (element, attrs) {\r
-                if (attrs.groupIt === 'true') {\r
-                    return "b2bTemplate/treeNodeCheckbox/groupedTree.html";\r
-                } else {\r
-                    return "b2bTemplate/treeNodeCheckbox/ungroupedTree.html";\r
-                }\r
-            },\r
-            link: function (scope) {\r
-                if (!(scope.setRole === 'tree')) {\r
-                    scope.setRole = 'group';\r
-                }\r
-            }\r
-        }\r
-    })\r
-    .directive('b2bTreeMember', ['$compile', '$timeout', 'keymap', function ($compile, $timeout, keymap) {\r
-        return {\r
-            restrict: "E",\r
-            replace: true,\r
-            scope: {\r
-                member: '=',\r
-                groupIt: '='\r
-            },\r
-            templateUrl: 'b2bTemplate/treeNodeCheckbox/treeMember.html',\r
-            link: function (scope, element, attrs) {\r
-                scope.elemArr = [];\r
-                var removeRootTabIndex = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {\r
-                        elem.attr('tabindex', -1);                        \r
-                        return;\r
-                    }\r
-                    removeRootTabIndex(elem.parent());\r
-                };\r
-                scope.$watch('member.child', function(newVal, oldVal){                  \r
-                    if(newVal !== oldVal){\r
-                        scope.showChild();\r
-                    };\r
-                });\r
-\r
-                var checkedCount = 0;\r
-                var nonCheckedCount = 0;\r
-                var checkBoxesCount = 0;\r
-\r
-                if(element.find('a').eq(0).find('input')){\r
-                    if(scope.member.indeterminate){\r
-                        element.find('a').eq(0).find('input').prop('indeterminate', true);\r
-                        element.attr('aria-checked',"mixed");\r
-                    }\r
-                    element.attr('aria-checked',scope.member.isSelected);\r
-                }\r
-\r
-                element.find('a').eq(0).find('input').bind('change',function(){\r
-                    scope.member.indeterminate = false;\r
-                    downwardModalUpdate(scope.member);\r
-                    downwardSelection(element);\r
-                    upwardSelection(element);\r
-                    element.attr('aria-checked',scope.member.isSelected);\r
-                     if (scope.member.onSelect !== undefined) {\r
-                        scope.member.onSelect(scope.member);\r
-                    }\r
-                });\r
-\r
-                element.find('a').eq(0).find('input').bind('click',function(){\r
-                    var elem = angular.element(this);\r
-                    if(scope.member.indeterminate){\r
-                        scope.member.indeterminate = false;\r
-                        scope.member.isSelected = true;\r
-                        elem.prop('indeterminate', false);\r
-                        elem.prop('checked', true);\r
-                        elem.triggerHandler('change');\r
-                    }\r
-                });\r
-\r
-                var groupNode = false;\r
-                var checkedTreeNode = false;\r
-\r
-                var isCheckboxSelected = function(elem){\r
-                    checkedTreeNode = false;\r
-                    checkedTreeNode = angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked;\r
-                }\r
-\r
-                var findCheckbox = function(elem){\r
-                    return angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox');\r
-                }\r
-\r
-                var updateGrpNodeCheckboxes = function(elem, checked){\r
-                    angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.treeCheckBox').checked = checked;\r
-                }\r
-\r
-                \r
-                var isGroupNode = function(elem){\r
-                    groupNode = false;\r
-                    if(angular.element(angular.element(elem).find('a').eq(0))[0].querySelector('input.grpTreeCheckbox')){\r
-                        groupNode = true;\r
-                    }\r
-                }\r
-\r
-                var downwardModalUpdate = function(curMember){\r
-                    angular.forEach(curMember.child, function(childMember, key) {\r
-                        childMember.isSelected = curMember.isSelected;\r
-                        childMember.indeterminate = false;\r
-                        if(angular.isArray(childMember.child) && scope.member.child.length > 0){\r
-                            downwardModalUpdate(childMember);\r
-                        }\r
-                    });\r
-                }\r
-\r
-                var downwardSelection = function(elem){\r
-                    if(findCheckbox(elem)){\r
-                        isCheckboxSelected(elem)\r
-                    } \r
-                    if(angular.element(elem).find('ul').length > 0){\r
-                        var childNodes = angular.element(elem).find('ul').eq(0).children('li');\r
-                        for(var i=0; i<childNodes.length; i++){\r
-                            if(findCheckbox(childNodes[i])){\r
-                                isGroupNode(childNodes[i]);\r
-                                angular.element(findCheckbox(childNodes[i])).prop('indeterminate', false);\r
-                                angular.element(childNodes[i]).attr('aria-checked',checkedTreeNode);\r
-                                if(groupNode){\r
-                                    updateGrpNodeCheckboxes(childNodes[i],checkedTreeNode);\r
-                                }else{\r
-                                    angular.element(childNodes[i]).scope().member.isSelected = checkedTreeNode;\r
-                                    angular.element(childNodes[i]).scope().member.indeterminate = false\r
-                                    angular.element(childNodes[i]).scope().$apply();\r
-                                }\r
-                                downwardSelection(childNodes[i]);\r
-                            }\r
-                        }\r
-\r
-                    }\r
-                }\r
-                var upwardSelection = function(elem){\r
-                    var childNodes = elem.parent().parent().find('ul').eq(0).children('li');\r
-                    checkedCount = 0;\r
-                    nonCheckedCount = 0;\r
-                    checkBoxesCount = 0;    \r
-                    for(i=0; i<childNodes.length; i++){\r
-                        if(findCheckbox(childNodes[i])){\r
-                            isGroupNode(childNodes[i]);\r
-                            isCheckboxSelected(childNodes[i]);\r
-                            checkBoxesCount++;\r
-                            if(checkedTreeNode){\r
-                                checkedCount++;\r
-                            }else if(!angular.element(angular.element(angular.element(childNodes[i]).find('a').eq(0))[0].querySelector('input.treeCheckBox')).prop('indeterminate')){\r
-                                nonCheckedCount++;\r
-                            }\r
-                        }\r
-                    }\r
-                    var parentNodeScope;\r
-                    parentNodeScope = angular.element(elem.parent().parent()).scope();\r
-                    if(findCheckbox(elem.parent().parent())){\r
-                        if(nonCheckedCount == checkBoxesCount){\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = false;\r
-                                parentNodeScope.member.indeterminate = false;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),false);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',false);\r
-                        }else if(checkedCount == checkBoxesCount){\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', false);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = true;\r
-                                parentNodeScope.member.indeterminate = false;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),true);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',true);\r
-                        }else{\r
-                            angular.element(findCheckbox(elem.parent().parent())).prop('indeterminate', true);\r
-                            if(parentNodeScope &&  parentNodeScope.member){\r
-                                parentNodeScope.member.isSelected = false;\r
-                                parentNodeScope.member.indeterminate = true;\r
-                            }else{\r
-                                updateGrpNodeCheckboxes(elem.parent().parent(),false);\r
-                            }\r
-                            angular.element(elem.parent().parent()).attr('aria-checked',"mixed");\r
-                        }\r
-                        if(parentNodeScope &&  parentNodeScope.member){\r
-                            parentNodeScope.$apply();\r
-                        }        \r
-                    }\r
-                    \r
-                    \r
-                    \r
-                    if(elem.parent().parent().attr('role') == "treeitem"){\r
-                        upwardSelection(elem.parent().parent());\r
-                    }\r
-                }\r
-\r
-                scope.showChild = function () {\r
-                        if (!element.hasClass('grouped')) {\r
-                            if (angular.isArray(scope.member.child) && scope.member.child.length > 0 && (scope.member.divide === undefined || scope.member.child.length < scope.member.divide)) {\r
-                                scope.groupIt = false;\r
-                                element.addClass('grouped');\r
-                                element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                if(scope.member.selected && scope.member.selected === true){\r
-                                    element.attr('tabindex', 0);\r
-                                    removeRootTabIndex(element);\r
-                                };\r
-                                if(scope.member.active && scope.member.active == undefined){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            } else if (scope.member.child && scope.member.divide && scope.member.child.length > scope.member.divide) {\r
-                                element.addClass('grouped');\r
-                                scope.groupIt = true;\r
-                                var j = 0;\r
-                                var grpName = '';\r
-                                if(scope.member.child[0].groupName !== undefined){\r
-                                    grpName = scope.member.child[0].groupName;\r
-                                }\r
-                                else{\r
-                                    var toSlice = scope.member.child[0].name.search(' ');\r
-                                    grpName = scope.member.child[0].name.slice(0, toSlice);\r
-                                }\r
-\r
-                                for (i = 0; i < scope.member.child.length; i += scope.member.divide) {\r
-                                    j = 0;\r
-                                    for (j = j + i; j < (i + scope.member.divide); j++) {                                        \r
-                                        if (j === scope.member.child.length) {\r
-                                            scope.member.child[j - 1].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            break;\r
-                                            \r
-                                            if(scope.member.child[j-1].active && scope.member.child[j-1].active===true){\r
-                                                scope.member.child[j-1].activeGrp = true;\r
-                                            };\r
-                                            \r
-                                        }\r
-                                        if (i + scope.member.divide > scope.member.child.length) {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (scope.member.child.length);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-\r
-                                        } else {\r
-                                            scope.member.child[j].grpChild = grpName + ' ' + (i + 1) + ' - ' + (i + scope.member.divide);\r
-                                            if(scope.member.child[j].active && scope.member.child[j].active===true){\r
-                                                scope.member.child[j].activeGrp = true;\r
-                                            };\r
-                                        }\r
-                                    }\r
-                                }\r
-                                if(scope.member.divide){\r
-                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                } else {\r
-                                    element.append("<b2b-tree-node-checkbox collection='member.child' group-it='" + scope.groupIt + "'></b2b-tree-node-checkbox>");\r
-                                }\r
-                                $compile(element.contents())(scope);\r
-                                if(scope.member.active && scope.member.active === true){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                                };\r
-                                \r
-                                if( scope.member.active && scope.member.active == undefined){\r
-                                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                                };\r
-                            }\r
-                        }\r
-                        $timeout(function () {\r
-                            if(!scope.member.indeterminate){\r
-                                downwardSelection(element);\r
-                            }    \r
-                        });  \r
-\r
-                };\r
-                \r
-                if(scope.member.active && scope.member.active == true){\r
-                    scope.showChild();\r
-                };\r
-                if(scope.member.active == undefined && !element.find('a').eq(0).hasClass('active') && scope.member.child !== undefined){\r
-                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                }\r
-                else if(scope.member.child == undefined){\r
-                    angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-circle');\r
-                    if(scope.$parent.$index === 0) {\r
-                        element.find('a').eq(0).append('<span class="first-link"></span>');\r
-                    };\r
-                };\r
-                \r
-                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {\r
-                    scope.showChild();\r
-                    var expandFunc = scope.member.onExpand;\r
-                    if (element.find('a').eq(0).hasClass('active') && scope.member.onExpand !== undefined) {\r
-                       var eValue = scope.member.onExpand(scope.member);\r
-                    }\r
-                    if (!element.find('a').eq(0).hasClass('active') && scope.member.onCollapse !== undefined) {\r
-                        scope.member.onCollapse(scope.member);\r
-                    }\r
-                });\r
-\r
-                angular.element(element[0].querySelectorAll('.treeNodeName')).eq(0).bind('click', function (evt) {\r
-\r
-                });\r
-                \r
-            }\r
-        }\r
-}])\r
-    .directive('b2bTreeNodeLink', ['keymap', '$timeout', function (keymap, $timeout) {\r
-        return {\r
-            restrict: 'A',\r
-            link: function (scope, element, attr, ctrl) {\r
-                var rootE, parentE, upE, downE;\r
-                var closeOthersUp = function (elem) {\r
-                    \r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg')) {\r
-                        elem.removeClass('bg');\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null) {\r
-                        closeOthersUp(angular.element(elem[0].previousElementSibling));\r
-                    }\r
-                };\r
-                var closeOthersDown = function (elem) {\r
-                    \r
-                    if (elem.find('a').eq(0).hasClass('active')) {\r
-                        activeToggle(elem);\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('bg')) {\r
-                        elem.removeClass('bg');\r
-                    }\r
-                    if (elem[0].nextElementSibling !== null) {\r
-                        closeOthersDown(angular.element(elem[0].nextElementSibling));\r
-                    }\r
-                };\r
-\r
-                var removeBackgroundUp = function (elem) {\r
-                    \r
-                    if (elem.hasClass('b2b-tree-checkbox')) {\r
-                        return;\r
-                    } else {\r
-                        elem.parent().parent().removeClass('bg');\r
-                        removeBackgroundUp(elem.parent().parent());\r
-                    }\r
-                };\r
-\r
-                var removeBackgroundDown = function (elem) {\r
-                    \r
-                    angular.element(elem[0].querySelector('.bg')).removeClass('bg');\r
-                };\r
-\r
-\r
-\r
-                var activeToggle = function (elem) {\r
-                    var element = elem.find('a').eq(0);\r
-                    if (element.hasClass('active')) {\r
-                        elem.removeClass('bg');\r
-                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {\r
-                            element.removeClass('active');\r
-                            elem.attr('aria-expanded', 'false');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-expanded');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-collapsed');\r
-                        }\r
-                    } else {\r
-                        elem.addClass('bg');\r
-                        if (!angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')) {\r
-                            element.addClass('active');\r
-                            elem.attr('aria-expanded', 'true');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).removeClass('icon-primary-collapsed');\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).addClass('icon-primary-expanded');\r
-                        }\r
-                    }\r
-                };\r
-                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).bind('click', function (evt) {\r
-                    \r
-                        if (element[0].previousElementSibling) {\r
-                            closeOthersUp(angular.element(element[0].previousElementSibling));\r
-                        }\r
-                        if (element[0].nextElementSibling) {\r
-                            closeOthersDown(angular.element(element[0].nextElementSibling));\r
-                        }\r
-\r
-                        activeToggle(element);\r
-\r
-                    removeBackgroundDown(element);\r
-                    removeBackgroundUp(element);\r
-                    evt.stopPropagation();                    \r
-                });\r
-                \r
-                if (element.parent().parent().hasClass('b2b-tree-checkbox') && (element.parent()[0].previousElementSibling === null)) {\r
-                    element.attr('tabindex', 0);\r
-                }\r
-                \r
-                var isRoot = function (elem) {\r
-                    if (elem.parent().parent().eq(0).hasClass('b2b-tree-checkbox')) {\r
-                        return true;\r
-                    } else {\r
-                        return false;\r
-                    }\r
-                };\r
-                var findRoot = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        rootE = elem;\r
-                        return;\r
-                    }\r
-                    findRoot(elem.parent());\r
-                };\r
-\r
-                var findPreActive = function (elem) {\r
-\r
-                    if (!(elem.hasClass("active"))) {\r
-                        return;\r
-                    } else {\r
-                        var childElems = angular.element(elem[0].nextElementSibling.children);\r
-                        lastE = angular.element(childElems[childElems.length - 1]);\r
-                        if (lastE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(lastE.find('a').eq(0));\r
-                        }\r
-                        upE = lastE;\r
-                    }\r
-                };\r
-\r
-                var findUp = function (elem) {\r
-                    if (isRoot(elem)) {\r
-                        upE = elem;\r
-                        return;\r
-                    }\r
-                    if (elem[0].previousElementSibling !== null && !angular.element(elem[0].previousElementSibling).hasClass('tree-hide')) {\r
-                        upE = angular.element(elem[0].previousElementSibling);\r
-                        if (upE.find('a').eq(0).hasClass('active')) {\r
-                            findPreActive(upE.find('a').eq(0));\r
-                        }\r
-                    } else {\r
-                        upE = elem.parent().parent();\r
-                    }\r
-                };\r
-\r
-                var downElement = function (elem) {\r
-                    if (elem.next().hasClass('tree-hide')) {\r
-                        downElement(elem.next());\r
-                    } else {\r
-                        downE = elem.next();\r
-                    }\r
-                }\r
-                var isBottomElem = false;\r
-                var downParent = function(liElem){\r
-                    if(liElem.eq(0).parent().parent().eq(0).hasClass('b2b-tree-checkbox')){\r
-                        isBottomElem = true;\r
-                        return;\r
-                    }\r
-                    if(liElem.next().length !== 0){\r
-                        downE = liElem.next().eq(0);\r
-                        return;\r
-                    }\r
-                    else {\r
-                        downParent(liElem.parent().parent());\r
-                    }\r
-                }\r
-                \r
-                var findDown = function (elem) {\r
-                    if (isRoot(elem.parent()) && !elem.hasClass('active')) {\r
-                        downE = elem.parent();\r
-                        return;\r
-                    }\r
-                    if (elem.hasClass('active')) {\r
-                        downE = elem.next().find('li').eq(0);\r
-                        if (downE.hasClass('tree-hide')) {\r
-                            downElement(downE);\r
-                        }\r
-\r
-                    } else {\r
-                        downParent(elem.parent());\r
-                        if(isBottomElem === true){\r
-                            downE = elem.parent();\r
-                            isBottomElem = false;\r
-                        }\r
-                    }\r
-                };\r
-                element.bind('keydown', function (evt) {\r
-                    switch (evt.keyCode) {\r
-                    case keymap.KEY.HOME:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findRoot(element);\r
-                        rootE.eq(0).attr('tabindex', 0);\r
-                        rootE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.LEFT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if (!isRoot(element)) {\r
-                            if(element.find('a').eq(0).hasClass('active')){\r
-                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                                return;\r
-                            }\r
-                            element.attr('tabindex', -1);\r
-                            parentE = element.parent().parent();\r
-                            parentE.attr('tabindex', 0);\r
-                            parentE[0].focus();\r
-                        } else {\r
-                            if (element.find('a').eq(0).hasClass('active')) {\r
-                                angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                            }\r
-                        };\r
-                        break;\r
-                    case keymap.KEY.UP:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        element.attr('tabindex', -1);\r
-                        findUp(element);\r
-                        upE.eq(0).attr('tabindex', 0);\r
-                        upE[0].focus();\r
-                        break;\r
-                    case keymap.KEY.RIGHT:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).hasClass('icon-primary-circle')){\r
-                            break;\r
-                        }    \r
-                        if (!element.find('a').eq(0).hasClass('active')) {\r
-                            angular.element(element[0].querySelectorAll('i.expandCollapseIcon')).eq(0).triggerHandler('click');\r
-                        }\r
-                        else {\r
-                            element.attr('tabindex', -1);\r
-                            findDown(element.find('a').eq(0));\r
-                            downE.eq(0).attr('tabindex', 0);\r
-                            downE[0].focus();                            \r
-                        }                        \r
-                        break;\r
-                    case keymap.KEY.DOWN:\r
-                        evt.preventDefault();\r
-                        element.attr('tabindex', -1);\r
-                        findDown(element.find('a').eq(0));\r
-                        downE.eq(0).attr('tabindex', 0);\r
-                        downE[0].focus();\r
-                        evt.stopPropagation();\r
-                        break;\r
-                    case keymap.KEY.SPACE:\r
-                    case keymap.KEY.ENTER:\r
-                        evt.preventDefault();\r
-                        evt.stopPropagation();\r
-                        if(angular.isDefined(element.scope().member.isSelected)){\r
-                            element.scope().member.isSelected = !element.scope().member.isSelected;\r
-                            element.scope().member.indeterminate = false;\r
-                            element.scope().$apply();\r
-                            element.find('a').eq(0).find('input').prop('indeterminate', false);\r
-                            element.find('a').eq(0).find('input').triggerHandler('change');\r
-                        }\r
-                        break;    \r
-                    default:\r
-                        break;\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-/*!\r
- * VERSION: 1.7.3\r
- * DATE: 2014-01-14\r
- * UPDATES AND DOCS AT: http://www.greensock.com\r
- *\r
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.\r
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for\r
- * Club GreenSock members, the software agreement that was issued with your membership.\r
- * \r
- * @author: Jack Doyle, jack@greensock.com\r
- **/\r
-(window._gsQueue || (window._gsQueue = [])).push( function() {\r
-\r
-    "use strict";\r
-\r
-    var _doc = document.documentElement,\r
-        _window = window,\r
-        _max = function(element, axis) {\r
-            var dim = (axis === "x") ? "Width" : "Height",\r
-                scroll = "scroll" + dim,\r
-                client = "client" + dim,\r
-                body = document.body;\r
-            return (element === _window || element === _doc || element === body) ? Math.max(_doc[scroll], body[scroll]) - (_window["inner" + dim] || Math.max(_doc[client], body[client])) : element[scroll] - element["offset" + dim];\r
-        },\r
-\r
-        ScrollToPlugin = window._gsDefine.plugin({\r
-            propName: "scrollTo",\r
-            API: 2,\r
-            version:"1.7.3",\r
-\r
-            //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-            init: function(target, value, tween) {\r
-                this._wdw = (target === _window);\r
-                this._target = target;\r
-                this._tween = tween;\r
-                if (typeof(value) !== "object") {\r
-                    value = {y:value}; //if we don't receive an object as the parameter, assume the user intends "y".\r
-                }\r
-                this._autoKill = (value.autoKill !== false);\r
-                this.x = this.xPrev = this.getX();\r
-                this.y = this.yPrev = this.getY();\r
-                if (value.x != null) {\r
-                    this._addTween(this, "x", this.x, (value.x === "max") ? _max(target, "x") : value.x, "scrollTo_x", true);\r
-                    this._overwriteProps.push("scrollTo_x");\r
-                } else {\r
-                    this.skipX = true;\r
-                }\r
-                if (value.y != null) {\r
-                    this._addTween(this, "y", this.y, (value.y === "max") ? _max(target, "y") : value.y, "scrollTo_y", true);\r
-                    this._overwriteProps.push("scrollTo_y");\r
-                } else {\r
-                    this.skipY = true;\r
-                }\r
-                return true;\r
-            },\r
-\r
-            //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-            set: function(v) {\r
-                this._super.setRatio.call(this, v);\r
-\r
-                var x = (this._wdw || !this.skipX) ? this.getX() : this.xPrev,\r
-                    y = (this._wdw || !this.skipY) ? this.getY() : this.yPrev,\r
-                    yDif = y - this.yPrev,\r
-                    xDif = x - this.xPrev;\r
-\r
-                if (this._autoKill) {\r
-                    //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match.\r
-                    if (!this.skipX && (xDif > 7 || xDif < -7) && x < _max(this._target, "x")) {\r
-                        this.skipX = true; //if the user scrolls separately, we should stop tweening!\r
-                    }\r
-                    if (!this.skipY && (yDif > 7 || yDif < -7) && y < _max(this._target, "y")) {\r
-                        this.skipY = true; //if the user scrolls separately, we should stop tweening!\r
-                    }\r
-                    if (this.skipX && this.skipY) {\r
-                        this._tween.kill();\r
-                    }\r
-                }\r
-                if (this._wdw) {\r
-                    _window.scrollTo((!this.skipX) ? this.x : x, (!this.skipY) ? this.y : y);\r
-                } else {\r
-                    if (!this.skipY) {\r
-                        this._target.scrollTop = this.y;\r
-                    }\r
-                    if (!this.skipX) {\r
-                        this._target.scrollLeft = this.x;\r
-                    }\r
-                }\r
-                this.xPrev = this.x;\r
-                this.yPrev = this.y;\r
-            }\r
-\r
-        }),\r
-        p = ScrollToPlugin.prototype;\r
-\r
-    ScrollToPlugin.max = _max;\r
-\r
-    p.getX = function() {\r
-        return (!this._wdw) ? this._target.scrollLeft : (_window.pageXOffset != null) ? _window.pageXOffset : (_doc.scrollLeft != null) ? _doc.scrollLeft : document.body.scrollLeft;\r
-    };\r
-\r
-    p.getY = function() {\r
-        return (!this._wdw) ? this._target.scrollTop : (_window.pageYOffset != null) ? _window.pageYOffset : (_doc.scrollTop != null) ? _doc.scrollTop : document.body.scrollTop;\r
-    };\r
-\r
-    p._kill = function(lookup) {\r
-        if (lookup.scrollTo_x) {\r
-            this.skipX = true;\r
-        }\r
-        if (lookup.scrollTo_y) {\r
-            this.skipY = true;\r
-        }\r
-        return this._super._kill.call(this, lookup);\r
-    };\r
-\r
-}); if (window._gsDefine) { window._gsQueue.pop()(); }\r
-/*!\r
- * VERSION: 1.12.1\r
- * DATE: 2014-06-26\r
- * UPDATES AND DOCS AT: http://www.greensock.com\r
- * \r
- * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin\r
- *\r
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.\r
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for\r
- * Club GreenSock members, the software agreement that was issued with your membership.\r
- * \r
- * @author: Jack Doyle, jack@greensock.com\r
- **/\r
-\r
-(window._gsQueue || (window._gsQueue = [])).push( function() {\r
-\r
-    "use strict";\r
-\r
-    window._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {\r
-\r
-        var _slice = [].slice,\r
-            TweenMax = function(target, duration, vars) {\r
-                TweenLite.call(this, target, duration, vars);\r
-                this._cycle = 0;\r
-                this._yoyo = (this.vars.yoyo === true);\r
-                this._repeat = this.vars.repeat || 0;\r
-                this._repeatDelay = this.vars.repeatDelay || 0;\r
-                this._dirty = true; //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it.\r
-                this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            TweenLiteInternals = TweenLite._internals,\r
-            _isSelector = TweenLiteInternals.isSelector,\r
-            _isArray = TweenLiteInternals.isArray,\r
-            p = TweenMax.prototype = TweenLite.to({}, 0.1, {}),\r
-            _blankArray = [];\r
-\r
-        TweenMax.version = "1.12.1";\r
-        p.constructor = TweenMax;\r
-        p.kill()._gc = false;\r
-        TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = TweenLite.killTweensOf;\r
-        TweenMax.getTweensOf = TweenLite.getTweensOf;\r
-        TweenMax.lagSmoothing = TweenLite.lagSmoothing;\r
-        TweenMax.ticker = TweenLite.ticker;\r
-        TweenMax.render = TweenLite.render;\r
-\r
-        p.invalidate = function() {\r
-            this._yoyo = (this.vars.yoyo === true);\r
-            this._repeat = this.vars.repeat || 0;\r
-            this._repeatDelay = this.vars.repeatDelay || 0;\r
-            this._uncache(true);\r
-            return TweenLite.prototype.invalidate.call(this);\r
-        };\r
-        \r
-        p.updateTo = function(vars, resetDuration) {\r
-            var curRatio = this.ratio, p;\r
-            if (resetDuration && this._startTime < this._timeline._time) {\r
-                this._startTime = this._timeline._time;\r
-                this._uncache(false);\r
-                if (this._gc) {\r
-                    this._enabled(true, false);\r
-                } else {\r
-                    this._timeline.insert(this, this._startTime - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.\r
-                }\r
-            }\r
-            for (p in vars) {\r
-                this.vars[p] = vars[p];\r
-            }\r
-            if (this._initted) {\r
-                if (resetDuration) {\r
-                    this._initted = false;\r
-                } else {\r
-                    if (this._gc) {\r
-                        this._enabled(true, false);\r
-                    }\r
-                    if (this._notifyPluginsOfEnabled && this._firstPT) {\r
-                        TweenLite._onPluginEvent("_onDisable", this); //in case a plugin like MotionBlur must perform some cleanup tasks\r
-                    }\r
-                    if (this._time / this._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards. \r
-                        var prevTime = this._time;\r
-                        this.render(0, true, false);\r
-                        this._initted = false;\r
-                        this.render(prevTime, true, false);\r
-                    } else if (this._time > 0) {\r
-                        this._initted = false;\r
-                        this._init();\r
-                        var inv = 1 / (1 - curRatio),\r
-                            pt = this._firstPT, endValue;\r
-                        while (pt) {\r
-                            endValue = pt.s + pt.c; \r
-                            pt.c *= inv;\r
-                            pt.s = endValue - pt.c;\r
-                            pt = pt._next;\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-                \r
-        p.render = function(time, suppressEvents, force) {\r
-            if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly.\r
-                this.invalidate();\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                prevTime = this._time,\r
-                prevTotalTime = this._totalTime, \r
-                prevCycle = this._cycle,\r
-                duration = this._duration,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, i;\r
-            if (time >= totalDur) {\r
-                this._totalTime = totalDur;\r
-                this._cycle = this._repeat;\r
-                if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                    this._time = 0;\r
-                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                } else {\r
-                    this._time = duration;\r
-                    this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;\r
-                }\r
-                if (!this._reversed) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                }\r
-                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.\r
-                        time = 0;\r
-                    }\r
-                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {\r
-                        force = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                }\r
-                \r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = this._cycle = 0;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        if (prevRawPrevTime >= 0) {\r
-                            force = true;\r
-                        }\r
-                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    }\r
-                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\r
-                    force = true;\r
-                }\r
-            } else {\r
-                this._totalTime = this._time = time;\r
-                \r
-                if (this._repeat !== 0) {\r
-                    cycleDuration = duration + this._repeatDelay;\r
-                    this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but Flash reports it as 0.79999999!)\r
-                    if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {\r
-                        this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)\r
-                    }\r
-                    this._time = this._totalTime - (this._cycle * cycleDuration);\r
-                    if (this._yoyo) if ((this._cycle & 1) !== 0) {\r
-                        this._time = duration - this._time;\r
-                    }\r
-                    if (this._time > duration) {\r
-                        this._time = duration;\r
-                    } else if (this._time < 0) {\r
-                        this._time = 0;\r
-                    }\r
-                }\r
-\r
-                if (this._easeType) {\r
-                    r = this._time / duration;\r
-                    type = this._easeType;\r
-                    pow = this._easePower;\r
-                    if (type === 1 || (type === 3 && r >= 0.5)) {\r
-                        r = 1 - r;\r
-                    }\r
-                    if (type === 3) {\r
-                        r *= 2;\r
-                    }\r
-                    if (pow === 1) {\r
-                        r *= r;\r
-                    } else if (pow === 2) {\r
-                        r *= r * r;\r
-                    } else if (pow === 3) {\r
-                        r *= r * r * r;\r
-                    } else if (pow === 4) {\r
-                        r *= r * r * r * r;\r
-                    }\r
-\r
-                    if (type === 1) {\r
-                        this.ratio = 1 - r;\r
-                    } else if (type === 2) {\r
-                        this.ratio = r;\r
-                    } else if (this._time / duration < 0.5) {\r
-                        this.ratio = r / 2;\r
-                    } else {\r
-                        this.ratio = 1 - (r / 2);\r
-                    }\r
-\r
-                } else {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                }\r
-                \r
-            }\r
-                \r
-            if (prevTime === this._time && !force && prevCycle === this._cycle) {\r
-                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._init();\r
-                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.\r
-                    return;\r
-                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true.\r
-                    this._time = prevTime;\r
-                    this._totalTime = prevTotalTime;\r
-                    this._rawPrevTime = prevRawPrevTime;\r
-                    this._cycle = prevCycle;\r
-                    TweenLiteInternals.lazyTweens.push(this);\r
-                    this._lazy = time;\r
-                    return;\r
-                }\r
-                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.\r
-                if (this._time && !isComplete) {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                } else if (isComplete && this._ease._calcEnd) {\r
-                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);\r
-                }\r
-            }\r
-            if (this._lazy !== false) {\r
-                this._lazy = false;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {\r
-                this._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.\r
-            }\r
-            if (prevTotalTime === 0) {\r
-                if (this._initted === 2 && time > 0) {\r
-                    //this.invalidate();\r
-                    this._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true\r
-                }\r
-                if (this._startAt) {\r
-                    if (time >= 0) {\r
-                        this._startAt.render(time, suppressEvents, force);\r
-                    } else if (!callback) {\r
-                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.\r
-                    }\r
-                }\r
-                if (this.vars.onStart) if (this._totalTime !== 0 || duration === 0) if (!suppressEvents) {\r
-                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-                }\r
-            }\r
-            \r
-            pt = this._firstPT;\r
-            while (pt) {\r
-                if (pt.f) {\r
-                    pt.t[pt.p](pt.c * this.ratio + pt.s);\r
-                } else {\r
-                    pt.t[pt.p] = pt.c * this.ratio + pt.s;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            \r
-            if (this._onUpdate) {\r
-                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\r
-                }\r
-                if (!suppressEvents) if (this._totalTime !== prevTotalTime || isComplete) {\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-            }\r
-            if (this._cycle !== prevCycle) if (!suppressEvents) if (!this._gc) if (this.vars.onRepeat) {\r
-                this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);\r
-            }\r
-            if (callback) if (!this._gc) { //check gc because there's a chance that kill() could be called in an onUpdate\r
-                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force);\r
-                }\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.\r
-                    this._rawPrevTime = 0;\r
-                }\r
-            }\r
-        };\r
-        \r
-//---- STATIC FUNCTIONS -----------------------------------------------------------------------------------------------------------\r
-        \r
-        TweenMax.to = function(target, duration, vars) {\r
-            return new TweenMax(target, duration, vars);\r
-        };\r
-        \r
-        TweenMax.from = function(target, duration, vars) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return new TweenMax(target, duration, vars);\r
-        };\r
-        \r
-        TweenMax.fromTo = function(target, duration, fromVars, toVars) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return new TweenMax(target, duration, toVars);\r
-        };\r
-        \r
-        TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            stagger = stagger || 0;\r
-            var delay = vars.delay || 0,\r
-                a = [],\r
-                finalComplete = function() {\r
-                    if (vars.onComplete) {\r
-                        vars.onComplete.apply(vars.onCompleteScope || this, arguments);\r
-                    }\r
-                    onCompleteAll.apply(onCompleteAllScope || this, onCompleteAllParams || _blankArray);\r
-                },\r
-                l, copy, i, p;\r
-            if (!_isArray(targets)) {\r
-                if (typeof(targets) === "string") {\r
-                    targets = TweenLite.selector(targets) || targets;\r
-                }\r
-                if (_isSelector(targets)) {\r
-                    targets = _slice.call(targets, 0);\r
-                }\r
-            }\r
-            l = targets.length;\r
-            for (i = 0; i < l; i++) {\r
-                copy = {};\r
-                for (p in vars) {\r
-                    copy[p] = vars[p];\r
-                }\r
-                copy.delay = delay;\r
-                if (i === l - 1 && onCompleteAll) {\r
-                    copy.onComplete = finalComplete;\r
-                }\r
-                a[i] = new TweenMax(targets[i], duration, copy);\r
-                delay += stagger;\r
-            }\r
-            return a;\r
-        };\r
-        \r
-        TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-        \r
-        TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-                \r
-        TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) {\r
-            return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});\r
-        };\r
-        \r
-        TweenMax.set = function(target, vars) {\r
-            return new TweenMax(target, 0, vars);\r
-        };\r
-        \r
-        TweenMax.isTweening = function(target) {\r
-            return (TweenLite.getTweensOf(target, true).length > 0);\r
-        };\r
-        \r
-        var _getChildrenOf = function(timeline, includeTimelines) {\r
-                var a = [],\r
-                    cnt = 0,\r
-                    tween = timeline._first;\r
-                while (tween) {\r
-                    if (tween instanceof TweenLite) {\r
-                        a[cnt++] = tween;\r
-                    } else {\r
-                        if (includeTimelines) {\r
-                            a[cnt++] = tween;\r
-                        }\r
-                        a = a.concat(_getChildrenOf(tween, includeTimelines));\r
-                        cnt = a.length;\r
-                    }\r
-                    tween = tween._next;\r
-                }\r
-                return a;\r
-            }, \r
-            getAllTweens = TweenMax.getAllTweens = function(includeTimelines) {\r
-                return _getChildrenOf(Animation._rootTimeline, includeTimelines).concat( _getChildrenOf(Animation._rootFramesTimeline, includeTimelines) );\r
-            };\r
-        \r
-        TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) {\r
-            if (tweens == null) {\r
-                tweens = true;\r
-            }\r
-            if (delayedCalls == null) {\r
-                delayedCalls = true;\r
-            }\r
-            var a = getAllTweens((timelines != false)),\r
-                l = a.length,\r
-                allTrue = (tweens && delayedCalls && timelines),\r
-                isDC, tween, i;\r
-            for (i = 0; i < l; i++) {\r
-                tween = a[i];\r
-                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {\r
-                    if (complete) {\r
-                        tween.totalTime(tween._reversed ? 0 : tween.totalDuration());\r
-                    } else {\r
-                        tween._enabled(false, false);\r
-                    }\r
-                }\r
-            }\r
-        };\r
-        \r
-        TweenMax.killChildTweensOf = function(parent, complete) {\r
-            if (parent == null) {\r
-                return;\r
-            }\r
-            var tl = TweenLiteInternals.tweenLookup,\r
-                a, curParent, p, i, l;\r
-            if (typeof(parent) === "string") {\r
-                parent = TweenLite.selector(parent) || parent;\r
-            }\r
-            if (_isSelector(parent)) {\r
-                parent = _slice.call(parent, 0);\r
-            }\r
-            if (_isArray(parent)) {\r
-                i = parent.length;\r
-                while (--i > -1) {\r
-                    TweenMax.killChildTweensOf(parent[i], complete);\r
-                }\r
-                return;\r
-            }\r
-            a = [];\r
-            for (p in tl) {\r
-                curParent = tl[p].target.parentNode;\r
-                while (curParent) {\r
-                    if (curParent === parent) {\r
-                        a = a.concat(tl[p].tweens);\r
-                    }\r
-                    curParent = curParent.parentNode;\r
-                }\r
-            }\r
-            l = a.length;\r
-            for (i = 0; i < l; i++) {\r
-                if (complete) {\r
-                    a[i].totalTime(a[i].totalDuration());\r
-                }\r
-                a[i]._enabled(false, false);\r
-            }\r
-        };\r
-\r
-        var _changePause = function(pause, tweens, delayedCalls, timelines) {\r
-            tweens = (tweens !== false);\r
-            delayedCalls = (delayedCalls !== false);\r
-            timelines = (timelines !== false);\r
-            var a = getAllTweens(timelines),\r
-                allTrue = (tweens && delayedCalls && timelines),\r
-                i = a.length,\r
-                isDC, tween;\r
-            while (--i > -1) {\r
-                tween = a[i];\r
-                if (allTrue || (tween instanceof SimpleTimeline) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) {\r
-                    tween.paused(pause);\r
-                }\r
-            }\r
-        };\r
-        \r
-        TweenMax.pauseAll = function(tweens, delayedCalls, timelines) {\r
-            _changePause(true, tweens, delayedCalls, timelines);\r
-        };\r
-        \r
-        TweenMax.resumeAll = function(tweens, delayedCalls, timelines) {\r
-            _changePause(false, tweens, delayedCalls, timelines);\r
-        };\r
-\r
-        TweenMax.globalTimeScale = function(value) {\r
-            var tl = Animation._rootTimeline,\r
-                t = TweenLite.ticker.time;\r
-            if (!arguments.length) {\r
-                return tl._timeScale;\r
-            }\r
-            value = value || _tinyNum; //can't allow zero because it'll throw the math off\r
-            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);\r
-            tl = Animation._rootFramesTimeline;\r
-            t = TweenLite.ticker.frame;\r
-            tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value);\r
-            tl._timeScale = Animation._rootTimeline._timeScale = value;\r
-            return value;\r
-        };\r
-        \r
-    \r
-//---- GETTERS / SETTERS ----------------------------------------------------------------------------------------------------------\r
-        \r
-        p.progress = function(value) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);\r
-        };\r
-        \r
-        p.totalProgress = function(value) {\r
-            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);\r
-        };\r
-        \r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            if (value > this._duration) {\r
-                value = this._duration;\r
-            }\r
-            if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));\r
-            } else if (this._repeat !== 0) {\r
-                value += this._cycle * (this._duration + this._repeatDelay);\r
-            }\r
-            return this.totalTime(value, suppressEvents);\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect.\r
-            }\r
-            return Animation.prototype.duration.call(this, value);\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    //instead of Infinity, we use 999999999999 so that we can accommodate reverses\r
-                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);\r
-                    this._dirty = false;\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );\r
-        };\r
-        \r
-        p.repeat = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeat;\r
-            }\r
-            this._repeat = value;\r
-            return this._uncache(true);\r
-        };\r
-        \r
-        p.repeatDelay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeatDelay;\r
-            }\r
-            this._repeatDelay = value;\r
-            return this._uncache(true);\r
-        };\r
-        \r
-        p.yoyo = function(value) {\r
-            if (!arguments.length) {\r
-                return this._yoyo;\r
-            }\r
-            this._yoyo = value;\r
-            return this;\r
-        };\r
-        \r
-        \r
-        return TweenMax;\r
-        \r
-    }, true);\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TimelineLite\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function(Animation, SimpleTimeline, TweenLite) {\r
-\r
-        var TimelineLite = function(vars) {\r
-                SimpleTimeline.call(this, vars);\r
-                this._labels = {};\r
-                this.autoRemoveChildren = (this.vars.autoRemoveChildren === true);\r
-                this.smoothChildTiming = (this.vars.smoothChildTiming === true);\r
-                this._sortChildren = true;\r
-                this._onUpdate = this.vars.onUpdate;\r
-                var v = this.vars,\r
-                    val, p;\r
-                for (p in v) {\r
-                    val = v[p];\r
-                    if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) {\r
-                        v[p] = this._swapSelfInParams(val);\r
-                    }\r
-                }\r
-                if (_isArray(v.tweens)) {\r
-                    this.add(v.tweens, 0, v.align, v.stagger);\r
-                }\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            _isSelector = TweenLite._internals.isSelector,\r
-            _isArray = TweenLite._internals.isArray,\r
-            _blankArray = [],\r
-            _globals = window._gsDefine.globals,\r
-            _copy = function(vars) {\r
-                var copy = {}, p;\r
-                for (p in vars) {\r
-                    copy[p] = vars[p];\r
-                }\r
-                return copy;\r
-            },\r
-            _pauseCallback = function(tween, callback, params, scope) {\r
-                tween._timeline.pause(tween._startTime);\r
-                if (callback) {\r
-                    callback.apply(scope || tween._timeline, params || _blankArray);\r
-                }\r
-            },\r
-            _slice = _blankArray.slice,\r
-            p = TimelineLite.prototype = new SimpleTimeline();\r
-\r
-        TimelineLite.version = "1.12.1";\r
-        p.constructor = TimelineLite;\r
-        p.kill()._gc = false;\r
-\r
-        p.to = function(target, duration, vars, position) {\r
-            var Engine = (vars.repeat && _globals.TweenMax) || TweenLite;\r
-            return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position);\r
-        };\r
-\r
-        p.from = function(target, duration, vars, position) {\r
-            return this.add( ((vars.repeat && _globals.TweenMax) || TweenLite).from(target, duration, vars), position);\r
-        };\r
-\r
-        p.fromTo = function(target, duration, fromVars, toVars, position) {\r
-            var Engine = (toVars.repeat && _globals.TweenMax) || TweenLite;\r
-            return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position);\r
-        };\r
-\r
-        p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, onCompleteScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}),\r
-                i;\r
-            if (typeof(targets) === "string") {\r
-                targets = TweenLite.selector(targets) || targets;\r
-            }\r
-            if (_isSelector(targets)) { //senses if the targets object is a selector. If it is, we should translate it into an array.\r
-                targets = _slice.call(targets, 0);\r
-            }\r
-            stagger = stagger || 0;\r
-            for (i = 0; i < targets.length; i++) {\r
-                if (vars.startAt) {\r
-                    vars.startAt = _copy(vars.startAt);\r
-                }\r
-                tl.to(targets[i], duration, _copy(vars), i * stagger);\r
-            }\r
-            return this.add(tl, position);\r
-        };\r
-\r
-        p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            vars.runBackwards = true;\r
-            return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-\r
-        p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope);\r
-        };\r
-\r
-        p.call = function(callback, params, scope, position) {\r
-            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);\r
-        };\r
-\r
-        p.set = function(target, vars, position) {\r
-            position = this._parseTimeOrLabel(position, 0, true);\r
-            if (vars.immediateRender == null) {\r
-                vars.immediateRender = (position === this._time && !this._paused);\r
-            }\r
-            return this.add( new TweenLite(target, 0, vars), position);\r
-        };\r
-\r
-        TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) {\r
-            vars = vars || {};\r
-            if (vars.smoothChildTiming == null) {\r
-                vars.smoothChildTiming = true;\r
-            }\r
-            var tl = new TimelineLite(vars),\r
-                root = tl._timeline,\r
-                tween, next;\r
-            if (ignoreDelayedCalls == null) {\r
-                ignoreDelayedCalls = true;\r
-            }\r
-            root._remove(tl, true);\r
-            tl._startTime = 0;\r
-            tl._rawPrevTime = tl._time = tl._totalTime = root._time;\r
-            tween = root._first;\r
-            while (tween) {\r
-                next = tween._next;\r
-                if (!ignoreDelayedCalls || !(tween instanceof TweenLite && tween.target === tween.vars.onComplete)) {\r
-                    tl.add(tween, tween._startTime - tween._delay);\r
-                }\r
-                tween = next;\r
-            }\r
-            root.add(tl, 0);\r
-            return tl;\r
-        };\r
-\r
-        p.add = function(value, position, align, stagger) {\r
-            var curTime, l, i, child, tl, beforeRawTime;\r
-            if (typeof(position) !== "number") {\r
-                position = this._parseTimeOrLabel(position, 0, true, value);\r
-            }\r
-            if (!(value instanceof Animation)) {\r
-                if ((value instanceof Array) || (value && value.push && _isArray(value))) {\r
-                    align = align || "normal";\r
-                    stagger = stagger || 0;\r
-                    curTime = position;\r
-                    l = value.length;\r
-                    for (i = 0; i < l; i++) {\r
-                        if (_isArray(child = value[i])) {\r
-                            child = new TimelineLite({tweens:child});\r
-                        }\r
-                        this.add(child, curTime);\r
-                        if (typeof(child) !== "string" && typeof(child) !== "function") {\r
-                            if (align === "sequence") {\r
-                                curTime = child._startTime + (child.totalDuration() / child._timeScale);\r
-                            } else if (align === "start") {\r
-                                child._startTime -= child.delay();\r
-                            }\r
-                        }\r
-                        curTime += stagger;\r
-                    }\r
-                    return this._uncache(true);\r
-                } else if (typeof(value) === "string") {\r
-                    return this.addLabel(value, position);\r
-                } else if (typeof(value) === "function") {\r
-                    value = TweenLite.delayedCall(0, value);\r
-                } else {\r
-                    throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string.");\r
-                }\r
-            }\r
-\r
-            SimpleTimeline.prototype.add.call(this, value, position);\r
-\r
-            //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate.\r
-            if (this._gc || this._time === this._duration) if (!this._paused) if (this._duration < this.duration()) {\r
-                //in case any of the ancestors had completed but should now be enabled...\r
-                tl = this;\r
-                beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect.\r
-                while (tl._timeline) {\r
-                    if (beforeRawTime && tl._timeline.smoothChildTiming) {\r
-                        tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it.\r
-                    } else if (tl._gc) {\r
-                        tl._enabled(true, false);\r
-                    }\r
-                    tl = tl._timeline;\r
-                }\r
-            }\r
-\r
-            return this;\r
-        };\r
-\r
-        p.remove = function(value) {\r
-            if (value instanceof Animation) {\r
-                return this._remove(value, false);\r
-            } else if (value instanceof Array || (value && value.push && _isArray(value))) {\r
-                var i = value.length;\r
-                while (--i > -1) {\r
-                    this.remove(value[i]);\r
-                }\r
-                return this;\r
-            } else if (typeof(value) === "string") {\r
-                return this.removeLabel(value);\r
-            }\r
-            return this.kill(null, value);\r
-        };\r
-\r
-        p._remove = function(tween, skipDisable) {\r
-            SimpleTimeline.prototype._remove.call(this, tween, skipDisable);\r
-            var last = this._last;\r
-            if (!last) {\r
-                this._time = this._totalTime = this._duration = this._totalDuration = 0;\r
-            } else if (this._time > last._startTime + last._totalDuration / last._timeScale) {\r
-                this._time = this.duration();\r
-                this._totalTime = this._totalDuration;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.append = function(value, offsetOrLabel) {\r
-            return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value));\r
-        };\r
-\r
-        p.insert = p.insertMultiple = function(value, position, align, stagger) {\r
-            return this.add(value, position || 0, align, stagger);\r
-        };\r
-\r
-        p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) {\r
-            return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger);\r
-        };\r
-\r
-        p.addLabel = function(label, position) {\r
-            this._labels[label] = this._parseTimeOrLabel(position);\r
-            return this;\r
-        };\r
-\r
-        p.addPause = function(position, callback, params, scope) {\r
-            return this.call(_pauseCallback, ["{self}", callback, params, scope], this, position);\r
-        };\r
-\r
-        p.removeLabel = function(label) {\r
-            delete this._labels[label];\r
-            return this;\r
-        };\r
-\r
-        p.getLabelTime = function(label) {\r
-            return (this._labels[label] != null) ? this._labels[label] : -1;\r
-        };\r
-\r
-        p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) {\r
-            var i;\r
-            //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration().\r
-            if (ignore instanceof Animation && ignore.timeline === this) {\r
-                this.remove(ignore);\r
-            } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) {\r
-                i = ignore.length;\r
-                while (--i > -1) {\r
-                    if (ignore[i] instanceof Animation && ignore[i].timeline === this) {\r
-                        this.remove(ignore[i]);\r
-                    }\r
-                }\r
-            }\r
-            if (typeof(offsetOrLabel) === "string") {\r
-                return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - this.duration() : 0, appendIfAbsent);\r
-            }\r
-            offsetOrLabel = offsetOrLabel || 0;\r
-            if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value).\r
-                i = timeOrLabel.indexOf("=");\r
-                if (i === -1) {\r
-                    if (this._labels[timeOrLabel] == null) {\r
-                        return appendIfAbsent ? (this._labels[timeOrLabel] = this.duration() + offsetOrLabel) : offsetOrLabel;\r
-                    }\r
-                    return this._labels[timeOrLabel] + offsetOrLabel;\r
-                }\r
-                offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1));\r
-                timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : this.duration();\r
-            } else if (timeOrLabel == null) {\r
-                timeOrLabel = this.duration();\r
-            }\r
-            return Number(timeOrLabel) + offsetOrLabel;\r
-        };\r
-\r
-        p.seek = function(position, suppressEvents) {\r
-            return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false));\r
-        };\r
-\r
-        p.stop = function() {\r
-            return this.paused(true);\r
-        };\r
-\r
-        p.gotoAndPlay = function(position, suppressEvents) {\r
-            return this.play(position, suppressEvents);\r
-        };\r
-\r
-        p.gotoAndStop = function(position, suppressEvents) {\r
-            return this.pause(position, suppressEvents);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            if (this._gc) {\r
-                this._enabled(true, false);\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                prevTime = this._time,\r
-                prevStart = this._startTime,\r
-                prevTimeScale = this._timeScale,\r
-                prevPaused = this._paused,\r
-                tween, isComplete, next, callback, internalForce;\r
-            if (time >= totalDur) {\r
-                this._totalTime = this._time = totalDur;\r
-                if (!this._reversed) if (!this._hasPausedChild()) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                    if (this._duration === 0) if (time === 0 || this._rawPrevTime < 0 || this._rawPrevTime === _tinyNum) if (this._rawPrevTime !== time && this._first) {\r
-                        internalForce = true;\r
-                        if (this._rawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                }\r
-                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7.\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = 0;\r
-                if (prevTime !== 0 || (this._duration === 0 && this._rawPrevTime !== _tinyNum && (this._rawPrevTime > 0 || (time < 0 && this._rawPrevTime >= 0)))) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (this._duration === 0) if (this._rawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        internalForce = true;\r
-                    }\r
-                    this._rawPrevTime = time;\r
-                } else {\r
-                    this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-\r
-                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)\r
-                    if (!this._initted) {\r
-                        internalForce = true;\r
-                    }\r
-                }\r
-\r
-            } else {\r
-                this._totalTime = this._time = this._rawPrevTime = time;\r
-            }\r
-            if ((this._time === prevTime || !this._first) && !force && !internalForce) {\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._initted = true;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time > 0) {\r
-                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.\r
-            }\r
-\r
-            if (prevTime === 0) if (this.vars.onStart) if (this._time !== 0) if (!suppressEvents) {\r
-                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-            }\r
-\r
-            if (this._time >= prevTime) {\r
-                tween = this._first;\r
-                while (tween) {\r
-                    next = tween._next; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            } else {\r
-                tween = this._last;\r
-                while (tween) {\r
-                    next = tween._prev; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            }\r
-\r
-            if (this._onUpdate) if (!suppressEvents) {\r
-                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-            }\r
-\r
-            if (callback) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-            }\r
-        };\r
-\r
-        p._hasPausedChild = function() {\r
-            var tween = this._first;\r
-            while (tween) {\r
-                if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) {\r
-                    return true;\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) {\r
-            ignoreBeforeTime = ignoreBeforeTime || -9999999999;\r
-            var a = [],\r
-                tween = this._first,\r
-                cnt = 0;\r
-            while (tween) {\r
-                if (tween._startTime < ignoreBeforeTime) {\r
-                    //do nothing\r
-                } else if (tween instanceof TweenLite) {\r
-                    if (tweens !== false) {\r
-                        a[cnt++] = tween;\r
-                    }\r
-                } else {\r
-                    if (timelines !== false) {\r
-                        a[cnt++] = tween;\r
-                    }\r
-                    if (nested !== false) {\r
-                        a = a.concat(tween.getChildren(true, tweens, timelines));\r
-                        cnt = a.length;\r
-                    }\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            return a;\r
-        };\r
-\r
-        p.getTweensOf = function(target, nested) {\r
-            var disabled = this._gc,\r
-                a = [],\r
-                cnt = 0,\r
-                tweens, i;\r
-            if (disabled) {\r
-                this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here.\r
-            }\r
-            tweens = TweenLite.getTweensOf(target);\r
-            i = tweens.length;\r
-            while (--i > -1) {\r
-                if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) {\r
-                    a[cnt++] = tweens[i];\r
-                }\r
-            }\r
-            if (disabled) {\r
-                this._enabled(false, true);\r
-            }\r
-            return a;\r
-        };\r
-\r
-        p._contains = function(tween) {\r
-            var tl = tween.timeline;\r
-            while (tl) {\r
-                if (tl === this) {\r
-                    return true;\r
-                }\r
-                tl = tl.timeline;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) {\r
-            ignoreBeforeTime = ignoreBeforeTime || 0;\r
-            var tween = this._first,\r
-                labels = this._labels,\r
-                p;\r
-            while (tween) {\r
-                if (tween._startTime >= ignoreBeforeTime) {\r
-                    tween._startTime += amount;\r
-                }\r
-                tween = tween._next;\r
-            }\r
-            if (adjustLabels) {\r
-                for (p in labels) {\r
-                    if (labels[p] >= ignoreBeforeTime) {\r
-                        labels[p] += amount;\r
-                    }\r
-                }\r
-            }\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p._kill = function(vars, target) {\r
-            if (!vars && !target) {\r
-                return this._enabled(false, false);\r
-            }\r
-            var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target),\r
-                i = tweens.length,\r
-                changed = false;\r
-            while (--i > -1) {\r
-                if (tweens[i]._kill(vars, target)) {\r
-                    changed = true;\r
-                }\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        p.clear = function(labels) {\r
-            var tweens = this.getChildren(false, true, true),\r
-                i = tweens.length;\r
-            this._time = this._totalTime = 0;\r
-            while (--i > -1) {\r
-                tweens[i]._enabled(false, false);\r
-            }\r
-            if (labels !== false) {\r
-                this._labels = {};\r
-            }\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            var tween = this._first;\r
-            while (tween) {\r
-                tween.invalidate();\r
-                tween = tween._next;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._enabled = function(enabled, ignoreTimeline) {\r
-            if (enabled === this._gc) {\r
-                var tween = this._first;\r
-                while (tween) {\r
-                    tween._enabled(enabled, true);\r
-                    tween = tween._next;\r
-                }\r
-            }\r
-            return SimpleTimeline.prototype._enabled.call(this, enabled, ignoreTimeline);\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    this.totalDuration(); //just triggers recalculation\r
-                }\r
-                return this._duration;\r
-            }\r
-            if (this.duration() !== 0 && value !== 0) {\r
-                this.timeScale(this._duration / value);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    var max = 0,\r
-                        tween = this._last,\r
-                        prevStart = 999999999999,\r
-                        prev, end;\r
-                    while (tween) {\r
-                        prev = tween._prev; //record it here in case the tween changes position in the sequence...\r
-                        if (tween._dirty) {\r
-                            tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it.\r
-                        }\r
-                        if (tween._startTime > prevStart && this._sortChildren && !tween._paused) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence\r
-                            this.add(tween, tween._startTime - tween._delay);\r
-                        } else {\r
-                            prevStart = tween._startTime;\r
-                        }\r
-                        if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found.\r
-                            max -= tween._startTime;\r
-                            if (this._timeline.smoothChildTiming) {\r
-                                this._startTime += tween._startTime / this._timeScale;\r
-                            }\r
-                            this.shiftChildren(-tween._startTime, false, -9999999999);\r
-                            prevStart = 0;\r
-                        }\r
-                        end = tween._startTime + (tween._totalDuration / tween._timeScale);\r
-                        if (end > max) {\r
-                            max = end;\r
-                        }\r
-                        tween = prev;\r
-                    }\r
-                    this._duration = this._totalDuration = max;\r
-                    this._dirty = false;\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            if (this.totalDuration() !== 0) if (value !== 0) {\r
-                this.timeScale(this._totalDuration / value);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.usesFrames = function() {\r
-            var tl = this._timeline;\r
-            while (tl._timeline) {\r
-                tl = tl._timeline;\r
-            }\r
-            return (tl === Animation._rootFramesTimeline);\r
-        };\r
-\r
-        p.rawTime = function() {\r
-            return this._paused ? this._totalTime : (this._timeline.rawTime() - this._startTime) * this._timeScale;\r
-        };\r
-\r
-        return TimelineLite;\r
-\r
-    }, true);\r
-    \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * TimelineMax\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function(TimelineLite, TweenLite, Ease) {\r
-\r
-        var TimelineMax = function(vars) {\r
-                TimelineLite.call(this, vars);\r
-                this._repeat = this.vars.repeat || 0;\r
-                this._repeatDelay = this.vars.repeatDelay || 0;\r
-                this._cycle = 0;\r
-                this._yoyo = (this.vars.yoyo === true);\r
-                this._dirty = true;\r
-            },\r
-            _tinyNum = 0.0000000001,\r
-            _blankArray = [],\r
-            _easeNone = new Ease(null, null, 1, 0),\r
-            p = TimelineMax.prototype = new TimelineLite();\r
-\r
-        p.constructor = TimelineMax;\r
-        p.kill()._gc = false;\r
-        TimelineMax.version = "1.12.1";\r
-\r
-        p.invalidate = function() {\r
-            this._yoyo = (this.vars.yoyo === true);\r
-            this._repeat = this.vars.repeat || 0;\r
-            this._repeatDelay = this.vars.repeatDelay || 0;\r
-            this._uncache(true);\r
-            return TimelineLite.prototype.invalidate.call(this);\r
-        };\r
-\r
-        p.addCallback = function(callback, position, params, scope) {\r
-            return this.add( TweenLite.delayedCall(0, callback, params, scope), position);\r
-        };\r
-\r
-        p.removeCallback = function(callback, position) {\r
-            if (callback) {\r
-                if (position == null) {\r
-                    this._kill(null, callback);\r
-                } else {\r
-                    var a = this.getTweensOf(callback, false),\r
-                        i = a.length,\r
-                        time = this._parseTimeOrLabel(position);\r
-                    while (--i > -1) {\r
-                        if (a[i]._startTime === time) {\r
-                            a[i]._enabled(false, false);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.tweenTo = function(position, vars) {\r
-            vars = vars || {};\r
-            var copy = {ease:_easeNone, overwrite:(vars.delay ? 2 : 1), useFrames:this.usesFrames(), immediateRender:false},//note: set overwrite to 1 (true/all) by default unless there's a delay so that we avoid a racing situation that could happen if, for example, an onmousemove creates the same tweenTo() over and over again.\r
-                duration, p, t;\r
-            for (p in vars) {\r
-                copy[p] = vars[p];\r
-            }\r
-            copy.time = this._parseTimeOrLabel(position);\r
-            duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001;\r
-            t = new TweenLite(this, duration, copy);\r
-            copy.onStart = function() {\r
-                t.target.paused(true);\r
-                if (t.vars.time !== t.target.time() && duration === t.duration()) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all.\r
-                    t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale );\r
-                }\r
-                if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it.\r
-                    vars.onStart.apply(vars.onStartScope || t, vars.onStartParams || _blankArray);\r
-                }\r
-            };\r
-            return t;\r
-        };\r
-\r
-        p.tweenFromTo = function(fromPosition, toPosition, vars) {\r
-            vars = vars || {};\r
-            fromPosition = this._parseTimeOrLabel(fromPosition);\r
-            vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], onCompleteScope:this};\r
-            vars.immediateRender = (vars.immediateRender !== false);\r
-            var t = this.tweenTo(toPosition, vars);\r
-            return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            if (this._gc) {\r
-                this._enabled(true, false);\r
-            }\r
-            var totalDur = (!this._dirty) ? this._totalDuration : this.totalDuration(),\r
-                dur = this._duration,\r
-                prevTime = this._time,\r
-                prevTotalTime = this._totalTime,\r
-                prevStart = this._startTime,\r
-                prevTimeScale = this._timeScale,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                prevPaused = this._paused,\r
-                prevCycle = this._cycle,\r
-                tween, isComplete, next, callback, internalForce, cycleDuration;\r
-            if (time >= totalDur) {\r
-                if (!this._locked) {\r
-                    this._totalTime = totalDur;\r
-                    this._cycle = this._repeat;\r
-                }\r
-                if (!this._reversed) if (!this._hasPausedChild()) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                    if (this._duration === 0) if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && this._first) {\r
-                        internalForce = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                }\r
-                this._rawPrevTime = (this._duration || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                    this._time = time = 0;\r
-                } else {\r
-                    this._time = dur;\r
-                    time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added.\r
-                }\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                if (!this._locked) {\r
-                    this._totalTime = this._cycle = 0;\r
-                }\r
-                this._time = 0;\r
-                if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !this._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare)\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (dur === 0) if (prevRawPrevTime >= 0 && this._first) { //zero-duration timelines are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        internalForce = true;\r
-                    }\r
-                    this._rawPrevTime = time;\r
-                } else {\r
-                    this._rawPrevTime = (dur || !suppressEvents || time || this._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline)\r
-                    if (!this._initted) {\r
-                        internalForce = true;\r
-                    }\r
-                }\r
-\r
-            } else {\r
-                if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through.\r
-                    internalForce = true;\r
-                }\r
-                this._time = this._rawPrevTime = time;\r
-                if (!this._locked) {\r
-                    this._totalTime = time;\r
-                    if (this._repeat !== 0) {\r
-                        cycleDuration = dur + this._repeatDelay;\r
-                        this._cycle = (this._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!)\r
-                        if (this._cycle !== 0) if (this._cycle === this._totalTime / cycleDuration) {\r
-                            this._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning)\r
-                        }\r
-                        this._time = this._totalTime - (this._cycle * cycleDuration);\r
-                        if (this._yoyo) if ((this._cycle & 1) !== 0) {\r
-                            this._time = dur - this._time;\r
-                        }\r
-                        if (this._time > dur) {\r
-                            this._time = dur;\r
-                            time = dur + 0.0001; //to avoid occasional floating point rounding error\r
-                        } else if (this._time < 0) {\r
-                            this._time = time = 0;\r
-                        } else {\r
-                            time = this._time;\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-\r
-            if (this._cycle !== prevCycle) if (!this._locked) {\r
-                /*\r
-                make sure children at the end/beginning of the timeline are rendered properly. If, for example,\r
-                a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which\r
-                would get transated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there\r
-                could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So\r
-                we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must\r
-                ensure that zero-duration tweens at the very beginning or end of the TimelineMax work.\r
-                */\r
-                var backwards = (this._yoyo && (prevCycle & 1) !== 0),\r
-                    wrap = (backwards === (this._yoyo && (this._cycle & 1) !== 0)),\r
-                    recTotalTime = this._totalTime,\r
-                    recCycle = this._cycle,\r
-                    recRawPrevTime = this._rawPrevTime,\r
-                    recTime = this._time;\r
-\r
-                this._totalTime = prevCycle * dur;\r
-                if (this._cycle < prevCycle) {\r
-                    backwards = !backwards;\r
-                } else {\r
-                    this._totalTime += dur;\r
-                }\r
-                this._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method.\r
-\r
-                this._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime;\r
-                this._cycle = prevCycle;\r
-                this._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render()\r
-                prevTime = (backwards) ? 0 : dur;\r
-                this.render(prevTime, suppressEvents, (dur === 0));\r
-                if (!suppressEvents) if (!this._gc) {\r
-                    if (this.vars.onRepeat) {\r
-                        this.vars.onRepeat.apply(this.vars.onRepeatScope || this, this.vars.onRepeatParams || _blankArray);\r
-                    }\r
-                }\r
-                if (wrap) {\r
-                    prevTime = (backwards) ? dur + 0.0001 : -0.0001;\r
-                    this.render(prevTime, true, false);\r
-                }\r
-                this._locked = false;\r
-                if (this._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible)\r
-                    return;\r
-                }\r
-                this._time = recTime;\r
-                this._totalTime = recTotalTime;\r
-                this._cycle = recCycle;\r
-                this._rawPrevTime = recRawPrevTime;\r
-            }\r
-\r
-            if ((this._time === prevTime || !this._first) && !force && !internalForce) {\r
-                if (prevTotalTime !== this._totalTime) if (this._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate.\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._initted = true;\r
-            }\r
-\r
-            if (!this._active) if (!this._paused && this._totalTime !== prevTotalTime && time > 0) {\r
-                this._active = true;  //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example.\r
-            }\r
-\r
-            if (prevTotalTime === 0) if (this.vars.onStart) if (this._totalTime !== 0) if (!suppressEvents) {\r
-                this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-            }\r
-\r
-            if (this._time >= prevTime) {\r
-                tween = this._first;\r
-                while (tween) {\r
-                    next = tween._next; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= this._time && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-\r
-                    }\r
-                    tween = next;\r
-                }\r
-            } else {\r
-                tween = this._last;\r
-                while (tween) {\r
-                    next = tween._prev; //record it here because the value could change after rendering...\r
-                    if (this._paused && !prevPaused) { //in case a tween pauses the timeline when rendering\r
-                        break;\r
-                    } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) {\r
-                        if (!tween._reversed) {\r
-                            tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                        } else {\r
-                            tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                        }\r
-                    }\r
-                    tween = next;\r
-                }\r
-            }\r
-\r
-            if (this._onUpdate) if (!suppressEvents) {\r
-                this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-            }\r
-            if (callback) if (!this._locked) if (!this._gc) if (prevStart === this._startTime || prevTimeScale !== this._timeScale) if (this._time === 0 || totalDur >= this.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-            }\r
-        };\r
-\r
-        p.getActive = function(nested, tweens, timelines) {\r
-            if (nested == null) {\r
-                nested = true;\r
-            }\r
-            if (tweens == null) {\r
-                tweens = true;\r
-            }\r
-            if (timelines == null) {\r
-                timelines = false;\r
-            }\r
-            var a = [],\r
-                all = this.getChildren(nested, tweens, timelines),\r
-                cnt = 0,\r
-                l = all.length,\r
-                i, tween;\r
-            for (i = 0; i < l; i++) {\r
-                tween = all[i];\r
-                if (tween.isActive()) {\r
-                    a[cnt++] = tween;\r
-                }\r
-            }\r
-            return a;\r
-        };\r
-\r
-\r
-        p.getLabelAfter = function(time) {\r
-            if (!time) if (time !== 0) { //faster than isNan()\r
-                time = this._time;\r
-            }\r
-            var labels = this.getLabelsArray(),\r
-                l = labels.length,\r
-                i;\r
-            for (i = 0; i < l; i++) {\r
-                if (labels[i].time > time) {\r
-                    return labels[i].name;\r
-                }\r
-            }\r
-            return null;\r
-        };\r
-\r
-        p.getLabelBefore = function(time) {\r
-            if (time == null) {\r
-                time = this._time;\r
-            }\r
-            var labels = this.getLabelsArray(),\r
-                i = labels.length;\r
-            while (--i > -1) {\r
-                if (labels[i].time < time) {\r
-                    return labels[i].name;\r
-                }\r
-            }\r
-            return null;\r
-        };\r
-\r
-        p.getLabelsArray = function() {\r
-            var a = [],\r
-                cnt = 0,\r
-                p;\r
-            for (p in this._labels) {\r
-                a[cnt++] = {time:this._labels[p], name:p};\r
-            }\r
-            a.sort(function(a,b) {\r
-                return a.time - b.time;\r
-            });\r
-            return a;\r
-        };\r
-\r
-\r
-//---- GETTERS / SETTERS -------------------------------------------------------------------------------------------------------\r
-\r
-        p.progress = function(value) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), false);\r
-        };\r
-\r
-        p.totalProgress = function(value) {\r
-            return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, false);\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            if (!arguments.length) {\r
-                if (this._dirty) {\r
-                    TimelineLite.prototype.totalDuration.call(this); //just forces refresh\r
-                    //Instead of Infinity, we use 999999999999 so that we can accommodate reverses.\r
-                    this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat);\r
-                }\r
-                return this._totalDuration;\r
-            }\r
-            return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) );\r
-        };\r
-\r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            if (value > this._duration) {\r
-                value = this._duration;\r
-            }\r
-            if (this._yoyo && (this._cycle & 1) !== 0) {\r
-                value = (this._duration - value) + (this._cycle * (this._duration + this._repeatDelay));\r
-            } else if (this._repeat !== 0) {\r
-                value += this._cycle * (this._duration + this._repeatDelay);\r
-            }\r
-            return this.totalTime(value, suppressEvents);\r
-        };\r
-\r
-        p.repeat = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeat;\r
-            }\r
-            this._repeat = value;\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.repeatDelay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._repeatDelay;\r
-            }\r
-            this._repeatDelay = value;\r
-            return this._uncache(true);\r
-        };\r
-\r
-        p.yoyo = function(value) {\r
-            if (!arguments.length) {\r
-                return this._yoyo;\r
-            }\r
-            this._yoyo = value;\r
-            return this;\r
-        };\r
-\r
-        p.currentLabel = function(value) {\r
-            if (!arguments.length) {\r
-                return this.getLabelBefore(this._time + 0.00000001);\r
-            }\r
-            return this.seek(value, true);\r
-        };\r
-\r
-        return TimelineMax;\r
-\r
-    }, true);\r
-    \r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * BezierPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    (function() {\r
-\r
-        var _RAD2DEG = 180 / Math.PI,\r
-            _r1 = [],\r
-            _r2 = [],\r
-            _r3 = [],\r
-            _corProps = {},\r
-            Segment = function(a, b, c, d) {\r
-                this.a = a;\r
-                this.b = b;\r
-                this.c = c;\r
-                this.d = d;\r
-                this.da = d - a;\r
-                this.ca = c - a;\r
-                this.ba = b - a;\r
-            },\r
-            _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",\r
-            cubicToQuadratic = function(a, b, c, d) {\r
-                var q1 = {a:a},\r
-                    q2 = {},\r
-                    q3 = {},\r
-                    q4 = {c:d},\r
-                    mab = (a + b) / 2,\r
-                    mbc = (b + c) / 2,\r
-                    mcd = (c + d) / 2,\r
-                    mabc = (mab + mbc) / 2,\r
-                    mbcd = (mbc + mcd) / 2,\r
-                    m8 = (mbcd - mabc) / 8;\r
-                q1.b = mab + (a - mab) / 4;\r
-                q2.b = mabc + m8;\r
-                q1.c = q2.a = (q1.b + q2.b) / 2;\r
-                q2.c = q3.a = (mabc + mbcd) / 2;\r
-                q3.b = mbcd - m8;\r
-                q4.b = mcd + (d - mcd) / 4;\r
-                q3.c = q4.a = (q3.b + q4.b) / 2;\r
-                return [q1, q2, q3, q4];\r
-            },\r
-            _calculateControlPoints = function(a, curviness, quad, basic, correlate) {\r
-                var l = a.length - 1,\r
-                    ii = 0,\r
-                    cp1 = a[0].a,\r
-                    i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl;\r
-                for (i = 0; i < l; i++) {\r
-                    seg = a[ii];\r
-                    p1 = seg.a;\r
-                    p2 = seg.d;\r
-                    p3 = a[ii+1].d;\r
-\r
-                    if (correlate) {\r
-                        r1 = _r1[i];\r
-                        r2 = _r2[i];\r
-                        tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5);\r
-                        m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0));\r
-                        m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0));\r
-                        mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0));\r
-                    } else {\r
-                        m1 = p2 - (p2 - p1) * curviness * 0.5;\r
-                        m2 = p2 + (p3 - p2) * curviness * 0.5;\r
-                        mm = p2 - (m1 + m2) / 2;\r
-                    }\r
-                    m1 += mm;\r
-                    m2 += mm;\r
-\r
-                    seg.c = cp2 = m1;\r
-                    if (i !== 0) {\r
-                        seg.b = cp1;\r
-                    } else {\r
-                        seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly.\r
-                    }\r
-\r
-                    seg.da = p2 - p1;\r
-                    seg.ca = cp2 - p1;\r
-                    seg.ba = cp1 - p1;\r
-\r
-                    if (quad) {\r
-                        qb = cubicToQuadratic(p1, cp1, cp2, p2);\r
-                        a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);\r
-                        ii += 4;\r
-                    } else {\r
-                        ii++;\r
-                    }\r
-\r
-                    cp1 = m2;\r
-                }\r
-                seg = a[ii];\r
-                seg.b = cp1;\r
-                seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly.\r
-                seg.da = seg.d - seg.a;\r
-                seg.ca = seg.c - seg.a;\r
-                seg.ba = cp1 - seg.a;\r
-                if (quad) {\r
-                    qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d);\r
-                    a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]);\r
-                }\r
-            },\r
-            _parseAnchors = function(values, p, correlate, prepend) {\r
-                var a = [],\r
-                    l, i, p1, p2, p3, tmp;\r
-                if (prepend) {\r
-                    values = [prepend].concat(values);\r
-                    i = values.length;\r
-                    while (--i > -1) {\r
-                        if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") {\r
-                            values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons\r
-                        }\r
-                    }\r
-                }\r
-                l = values.length - 2;\r
-                if (l < 0) {\r
-                    a[0] = new Segment(values[0][p], 0, 0, values[(l < -1) ? 0 : 1][p]);\r
-                    return a;\r
-                }\r
-                for (i = 0; i < l; i++) {\r
-                    p1 = values[i][p];\r
-                    p2 = values[i+1][p];\r
-                    a[i] = new Segment(p1, 0, 0, p2);\r
-                    if (correlate) {\r
-                        p3 = values[i+2][p];\r
-                        _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1);\r
-                        _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2);\r
-                    }\r
-                }\r
-                a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]);\r
-                return a;\r
-            },\r
-            bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) {\r
-                var obj = {},\r
-                    props = [],\r
-                    first = prepend || values[0],\r
-                    i, p, a, j, r, l, seamless, last;\r
-                correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate;\r
-                if (curviness == null) {\r
-                    curviness = 1;\r
-                }\r
-                for (p in values[0]) {\r
-                    props.push(p);\r
-                }\r
-                //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later)\r
-                if (values.length > 1) {\r
-                    last = values[values.length - 1];\r
-                    seamless = true;\r
-                    i = props.length;\r
-                    while (--i > -1) {\r
-                        p = props[i];\r
-                        if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors. For example, if you set an object's position to 4.945, Flash will make it 4.9\r
-                            seamless = false;\r
-                            break;\r
-                        }\r
-                    }\r
-                    if (seamless) {\r
-                        values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens\r
-                        if (prepend) {\r
-                            values.unshift(prepend);\r
-                        }\r
-                        values.push(values[1]);\r
-                        prepend = values[values.length - 3];\r
-                    }\r
-                }\r
-                _r1.length = _r2.length = _r3.length = 0;\r
-                i = props.length;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    _corProps[p] = (correlate.indexOf(","+p+",") !== -1);\r
-                    obj[p] = _parseAnchors(values, p, _corProps[p], prepend);\r
-                }\r
-                i = _r1.length;\r
-                while (--i > -1) {\r
-                    _r1[i] = Math.sqrt(_r1[i]);\r
-                    _r2[i] = Math.sqrt(_r2[i]);\r
-                }\r
-                if (!basic) {\r
-                    i = props.length;\r
-                    while (--i > -1) {\r
-                        if (_corProps[p]) {\r
-                            a = obj[props[i]];\r
-                            l = a.length - 1;\r
-                            for (j = 0; j < l; j++) {\r
-                                r = a[j+1].da / _r2[j] + a[j].da / _r1[j];\r
-                                _r3[j] = (_r3[j] || 0) + r * r;\r
-                            }\r
-                        }\r
-                    }\r
-                    i = _r3.length;\r
-                    while (--i > -1) {\r
-                        _r3[i] = Math.sqrt(_r3[i]);\r
-                    }\r
-                }\r
-                i = props.length;\r
-                j = quadratic ? 4 : 1;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    a = obj[p];\r
-                    _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties\r
-                    if (seamless) {\r
-                        a.splice(0, j);\r
-                        a.splice(a.length - j, j);\r
-                    }\r
-                }\r
-                return obj;\r
-            },\r
-            _parseBezierData = function(values, type, prepend) {\r
-                type = type || "soft";\r
-                var obj = {},\r
-                    inc = (type === "cubic") ? 3 : 2,\r
-                    soft = (type === "soft"),\r
-                    props = [],\r
-                    a, b, c, d, cur, i, j, l, p, cnt, tmp;\r
-                if (soft && prepend) {\r
-                    values = [prepend].concat(values);\r
-                }\r
-                if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; }\r
-                for (p in values[0]) {\r
-                    props.push(p);\r
-                }\r
-                i = props.length;\r
-                while (--i > -1) {\r
-                    p = props[i];\r
-                    obj[p] = cur = [];\r
-                    cnt = 0;\r
-                    l = values.length;\r
-                    for (j = 0; j < l; j++) {\r
-                        a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp);\r
-                        if (soft) if (j > 1) if (j < l - 1) {\r
-                            cur[cnt++] = (a + cur[cnt-2]) / 2;\r
-                        }\r
-                        cur[cnt++] = a;\r
-                    }\r
-                    l = cnt - inc + 1;\r
-                    cnt = 0;\r
-                    for (j = 0; j < l; j += inc) {\r
-                        a = cur[j];\r
-                        b = cur[j+1];\r
-                        c = cur[j+2];\r
-                        d = (inc === 2) ? 0 : cur[j+3];\r
-                        cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);\r
-                    }\r
-                    cur.length = cnt;\r
-                }\r
-                return obj;\r
-            },\r
-            _addCubicLengths = function(a, steps, resolution) {\r
-                var inc = 1 / resolution,\r
-                    j = a.length,\r
-                    d, d1, s, da, ca, ba, p, i, inv, bez, index;\r
-                while (--j > -1) {\r
-                    bez = a[j];\r
-                    s = bez.a;\r
-                    da = bez.d - s;\r
-                    ca = bez.c - s;\r
-                    ba = bez.b - s;\r
-                    d = d1 = 0;\r
-                    for (i = 1; i <= resolution; i++) {\r
-                        p = inc * i;\r
-                        inv = 1 - p;\r
-                        d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p);\r
-                        index = j * resolution + i - 1;\r
-                        steps[index] = (steps[index] || 0) + d * d;\r
-                    }\r
-                }\r
-            },\r
-            _parseLengthData = function(obj, resolution) {\r
-                resolution = resolution >> 0 || 6;\r
-                var a = [],\r
-                    lengths = [],\r
-                    d = 0,\r
-                    total = 0,\r
-                    threshold = resolution - 1,\r
-                    segments = [],\r
-                    curLS = [], //current length segments array\r
-                    p, i, l, index;\r
-                for (p in obj) {\r
-                    _addCubicLengths(obj[p], a, resolution);\r
-                }\r
-                l = a.length;\r
-                for (i = 0; i < l; i++) {\r
-                    d += Math.sqrt(a[i]);\r
-                    index = i % resolution;\r
-                    curLS[index] = d;\r
-                    if (index === threshold) {\r
-                        total += d;\r
-                        index = (i / resolution) >> 0;\r
-                        segments[index] = curLS;\r
-                        lengths[index] = total;\r
-                        d = 0;\r
-                        curLS = [];\r
-                    }\r
-                }\r
-                return {length:total, lengths:lengths, segments:segments};\r
-            },\r
-\r
-\r
-\r
-            BezierPlugin = window._gsDefine.plugin({\r
-                    propName: "bezier",\r
-                    priority: -1,\r
-                    version: "1.3.2",\r
-                    API: 2,\r
-                    global:true,\r
-\r
-                    //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-                    init: function(target, vars, tween) {\r
-                        this._target = target;\r
-                        if (vars instanceof Array) {\r
-                            vars = {values:vars};\r
-                        }\r
-                        this._func = {};\r
-                        this._round = {};\r
-                        this._props = [];\r
-                        this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10);\r
-                        var values = vars.values || [],\r
-                            first = {},\r
-                            second = values[0],\r
-                            autoRotate = vars.autoRotate || tween.vars.orientToBezier,\r
-                            p, isFunc, i, j, prepend;\r
-\r
-                        this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null;\r
-                        for (p in second) {\r
-                            this._props.push(p);\r
-                        }\r
-\r
-                        i = this._props.length;\r
-                        while (--i > -1) {\r
-                            p = this._props[i];\r
-\r
-                            this._overwriteProps.push(p);\r
-                            isFunc = this._func[p] = (typeof(target[p]) === "function");\r
-                            first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();\r
-                            if (!prepend) if (first[p] !== values[0][p]) {\r
-                                prepend = first;\r
-                            }\r
-                        }\r
-                        this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first);\r
-                        this._segCount = this._beziers[p].length;\r
-\r
-                        if (this._timeRes) {\r
-                            var ld = _parseLengthData(this._beziers, this._timeRes);\r
-                            this._length = ld.length;\r
-                            this._lengths = ld.lengths;\r
-                            this._segments = ld.segments;\r
-                            this._l1 = this._li = this._s1 = this._si = 0;\r
-                            this._l2 = this._lengths[0];\r
-                            this._curSeg = this._segments[0];\r
-                            this._s2 = this._curSeg[0];\r
-                            this._prec = 1 / this._curSeg.length;\r
-                        }\r
-\r
-                        if ((autoRotate = this._autoRotate)) {\r
-                            this._initialRotations = [];\r
-                            if (!(autoRotate[0] instanceof Array)) {\r
-                                this._autoRotate = autoRotate = [autoRotate];\r
-                            }\r
-                            i = autoRotate.length;\r
-                            while (--i > -1) {\r
-                                for (j = 0; j < 3; j++) {\r
-                                    p = autoRotate[i][j];\r
-                                    this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false;\r
-                                }\r
-                                p = autoRotate[i][2];\r
-                                this._initialRotations[i] = this._func[p] ? this._func[p].call(this._target) : this._target[p];\r
-                            }\r
-                        }\r
-                        this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1.\r
-                        return true;\r
-                    },\r
-\r
-                    //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-                    set: function(v) {\r
-                        var segments = this._segCount,\r
-                            func = this._func,\r
-                            target = this._target,\r
-                            notStart = (v !== this._startRatio),\r
-                            curIndex, inv, i, p, b, t, val, l, lengths, curSeg;\r
-                        if (!this._timeRes) {\r
-                            curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0;\r
-                            t = (v - (curIndex * (1 / segments))) * segments;\r
-                        } else {\r
-                            lengths = this._lengths;\r
-                            curSeg = this._curSeg;\r
-                            v *= this._length;\r
-                            i = this._li;\r
-                            //find the appropriate segment (if the currently cached one isn't correct)\r
-                            if (v > this._l2 && i < segments - 1) {\r
-                                l = segments - 1;\r
-                                while (i < l && (this._l2 = lengths[++i]) <= v) {   }\r
-                                this._l1 = lengths[i-1];\r
-                                this._li = i;\r
-                                this._curSeg = curSeg = this._segments[i];\r
-                                this._s2 = curSeg[(this._s1 = this._si = 0)];\r
-                            } else if (v < this._l1 && i > 0) {\r
-                                while (i > 0 && (this._l1 = lengths[--i]) >= v) { }\r
-                                if (i === 0 && v < this._l1) {\r
-                                    this._l1 = 0;\r
-                                } else {\r
-                                    i++;\r
-                                }\r
-                                this._l2 = lengths[i];\r
-                                this._li = i;\r
-                                this._curSeg = curSeg = this._segments[i];\r
-                                this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0;\r
-                                this._s2 = curSeg[this._si];\r
-                            }\r
-                            curIndex = i;\r
-                            //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one)\r
-                            v -= this._l1;\r
-                            i = this._si;\r
-                            if (v > this._s2 && i < curSeg.length - 1) {\r
-                                l = curSeg.length - 1;\r
-                                while (i < l && (this._s2 = curSeg[++i]) <= v) {    }\r
-                                this._s1 = curSeg[i-1];\r
-                                this._si = i;\r
-                            } else if (v < this._s1 && i > 0) {\r
-                                while (i > 0 && (this._s1 = curSeg[--i]) >= v) {    }\r
-                                if (i === 0 && v < this._s1) {\r
-                                    this._s1 = 0;\r
-                                } else {\r
-                                    i++;\r
-                                }\r
-                                this._s2 = curSeg[i];\r
-                                this._si = i;\r
-                            }\r
-                            t = (i + (v - this._s1) / (this._s2 - this._s1)) * this._prec;\r
-                        }\r
-                        inv = 1 - t;\r
-\r
-                        i = this._props.length;\r
-                        while (--i > -1) {\r
-                            p = this._props[i];\r
-                            b = this._beziers[p][curIndex];\r
-                            val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a;\r
-                            if (this._round[p]) {\r
-                                val = Math.round(val);\r
-                            }\r
-                            if (func[p]) {\r
-                                target[p](val);\r
-                            } else {\r
-                                target[p] = val;\r
-                            }\r
-                        }\r
-\r
-                        if (this._autoRotate) {\r
-                            var ar = this._autoRotate,\r
-                                b2, x1, y1, x2, y2, add, conv;\r
-                            i = ar.length;\r
-                            while (--i > -1) {\r
-                                p = ar[i][2];\r
-                                add = ar[i][3] || 0;\r
-                                conv = (ar[i][4] === true) ? 1 : _RAD2DEG;\r
-                                b = this._beziers[ar[i][0]];\r
-                                b2 = this._beziers[ar[i][1]];\r
-\r
-                                if (b && b2) { //in case one of the properties got overwritten.\r
-                                    b = b[curIndex];\r
-                                    b2 = b2[curIndex];\r
-\r
-                                    x1 = b.a + (b.b - b.a) * t;\r
-                                    x2 = b.b + (b.c - b.b) * t;\r
-                                    x1 += (x2 - x1) * t;\r
-                                    x2 += ((b.c + (b.d - b.c) * t) - x2) * t;\r
-\r
-                                    y1 = b2.a + (b2.b - b2.a) * t;\r
-                                    y2 = b2.b + (b2.c - b2.b) * t;\r
-                                    y1 += (y2 - y1) * t;\r
-                                    y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t;\r
-\r
-                                    val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i];\r
-\r
-                                    if (func[p]) {\r
-                                        target[p](val);\r
-                                    } else {\r
-                                        target[p] = val;\r
-                                    }\r
-                                }\r
-                            }\r
-                        }\r
-                    }\r
-            }),\r
-            p = BezierPlugin.prototype;\r
-\r
-\r
-        BezierPlugin.bezierThrough = bezierThrough;\r
-        BezierPlugin.cubicToQuadratic = cubicToQuadratic;\r
-        BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite\r
-        BezierPlugin.quadraticToCubic = function(a, b, c) {\r
-            return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c);\r
-        };\r
-\r
-        BezierPlugin._cssRegister = function() {\r
-            var CSSPlugin = window._gsDefine.globals.CSSPlugin;\r
-            if (!CSSPlugin) {\r
-                return;\r
-            }\r
-            var _internals = CSSPlugin._internals,\r
-                _parseToProxy = _internals._parseToProxy,\r
-                _setPluginRatio = _internals._setPluginRatio,\r
-                CSSPropTween = _internals.CSSPropTween;\r
-            _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) {\r
-                if (e instanceof Array) {\r
-                    e = {values:e};\r
-                }\r
-                plugin = new BezierPlugin();\r
-                var values = e.values,\r
-                    l = values.length - 1,\r
-                    pluginValues = [],\r
-                    v = {},\r
-                    i, p, data;\r
-                if (l < 0) {\r
-                    return pt;\r
-                }\r
-                for (i = 0; i <= l; i++) {\r
-                    data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i));\r
-                    pluginValues[i] = data.end;\r
-                }\r
-                for (p in e) {\r
-                    v[p] = e[p]; //duplicate the vars object because we need to alter some things which would cause problems if the user plans to reuse the same vars object for another tween.\r
-                }\r
-                v.values = pluginValues;\r
-                pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2);\r
-                pt.data = data;\r
-                pt.plugin = plugin;\r
-                pt.setRatio = _setPluginRatio;\r
-                if (v.autoRotate === 0) {\r
-                    v.autoRotate = true;\r
-                }\r
-                if (v.autoRotate && !(v.autoRotate instanceof Array)) {\r
-                    i = (v.autoRotate === true) ? 0 : Number(v.autoRotate);\r
-                    v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false;\r
-                }\r
-                if (v.autoRotate) {\r
-                    if (!cssp._transform) {\r
-                        cssp._enableTransforms(false);\r
-                    }\r
-                    data.autoRotate = cssp._target._gsTransform;\r
-                }\r
-                plugin._onInitTween(data.proxy, v, cssp._tween);\r
-                return pt;\r
-            }});\r
-        };\r
-\r
-        p._roundProps = function(lookup, value) {\r
-            var op = this._overwriteProps,\r
-                i = op.length;\r
-            while (--i > -1) {\r
-                if (lookup[op[i]] || lookup.bezier || lookup.bezierThrough) {\r
-                    this._round[op[i]] = value;\r
-                }\r
-            }\r
-        };\r
-\r
-        p._kill = function(lookup) {\r
-            var a = this._props,\r
-                p, i;\r
-            for (p in this._beziers) {\r
-                if (p in lookup) {\r
-                    delete this._beziers[p];\r
-                    delete this._func[p];\r
-                    i = a.length;\r
-                    while (--i > -1) {\r
-                        if (a[i] === p) {\r
-                            a.splice(i, 1);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-            return this._super._kill.call(this, lookup);\r
-        };\r
-\r
-    }());\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * CSSPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function(TweenPlugin, TweenLite) {\r
-\r
-        /** @constructor **/\r
-        var CSSPlugin = function() {\r
-                TweenPlugin.call(this, "css");\r
-                this._overwriteProps.length = 0;\r
-                this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method)\r
-            },\r
-            _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called.\r
-            _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance\r
-            _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter\r
-            _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification.\r
-            _specialProps = {},\r
-            p = CSSPlugin.prototype = new TweenPlugin("css");\r
-\r
-        p.constructor = CSSPlugin;\r
-        CSSPlugin.version = "1.12.1";\r
-        CSSPlugin.API = 2;\r
-        CSSPlugin.defaultTransformPerspective = 0;\r
-        CSSPlugin.defaultSkewType = "compensated";\r
-        p = "px"; //we'll reuse the "p" variable to keep file size down\r
-        CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""};\r
-\r
-\r
-        var _numExp = /(?:\d|\-\d|\.\d|\-\.\d)+/g,\r
-            _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,\r
-            _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)"\r
-            _NaNExp = /[^\d\-\.]/g,\r
-            _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g,\r
-            _opacityExp = /opacity *= *([^)]*)/i,\r
-            _opacityValExp = /opacity:([^;]*)/i,\r
-            _alphaFilterExp = /alpha\(opacity *=.+?\)/i,\r
-            _rgbhslExp = /^(rgb|hsl)/,\r
-            _capsExp = /([A-Z])/g,\r
-            _camelExp = /-([a-z])/gi,\r
-            _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage)\r
-            _camelFunc = function(s, g) { return g.toUpperCase(); },\r
-            _horizExp = /(?:Left|Right|Width)/i,\r
-            _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi,\r
-            _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,\r
-            _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis\r
-            _DEG2RAD = Math.PI / 180,\r
-            _RAD2DEG = 180 / Math.PI,\r
-            _forcePT = {},\r
-            _doc = document,\r
-            _tempDiv = _doc.createElement("div"),\r
-            _tempImg = _doc.createElement("img"),\r
-            _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins\r
-            _agent = navigator.userAgent,\r
-            _autoRound,\r
-            _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance).\r
-\r
-            _isSafari,\r
-            _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element.\r
-            _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!)\r
-            _ieVers,\r
-            _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version.\r
-                var i = _agent.indexOf("Android"),\r
-                    d = _doc.createElement("div"), a;\r
-\r
-                _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || Number(_agent.substr(i+8, 1)) > 3));\r
-                _isSafariLT6 = (_isSafari && (Number(_agent.substr(_agent.indexOf("Version/")+8, 1)) < 6));\r
-                _isFirefox = (_agent.indexOf("Firefox") !== -1);\r
-\r
-                if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) {\r
-                    _ieVers = parseFloat( RegExp.$1 );\r
-                }\r
-\r
-                d.innerHTML = "<a title='' style='top:1px;opacity:.55;'>a</a>";\r
-                a = d.getElementsByTagName("a")[0];\r
-                return a ? /^0.55/.test(a.style.opacity) : false;\r
-            }()),\r
-            _getIEOpacity = function(v) {\r
-                return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1);\r
-            },\r
-            _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE.\r
-                if (window.console) {\r
-                    //console.log(s);\r
-                }\r
-            },\r
-            _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-"\r
-            _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz".\r
-\r
-            // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all)\r
-            _checkPropPrefix = function(p, e) {\r
-                e = e || _tempDiv;\r
-                var s = e.style,\r
-                    a, i;\r
-                if (s[p] !== undefined) {\r
-                    return p;\r
-                }\r
-                p = p.charAt(0).toUpperCase() + p.substr(1);\r
-                a = ["O","Moz","ms","Ms","Webkit"];\r
-                i = 5;\r
-                while (--i > -1 && s[a[i]+p] === undefined) { }\r
-                if (i >= 0) {\r
-                    _prefix = (i === 3) ? "ms" : a[i];\r
-                    _prefixCSS = "-" + _prefix.toLowerCase() + "-";\r
-                    return _prefix + p;\r
-                }\r
-                return null;\r
-            },\r
-\r
-            _getComputedStyle = _doc.defaultView ? _doc.defaultView.getComputedStyle : function() {},\r
-\r
-            /**\r
-             * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do:\r
-             * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left");\r
-             *\r
-             * @param {!Object} t Target element whose style property you want to query\r
-             * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.)\r
-             * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call.\r
-             * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value.\r
-             * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto".\r
-             * @return {?string} The current property value\r
-             */\r
-            _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) {\r
-                var rv;\r
-                if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here.\r
-                    return _getIEOpacity(t);\r
-                }\r
-                if (!calc && t.style[p]) {\r
-                    rv = t.style[p];\r
-                } else if ((cs = cs || _getComputedStyle(t))) {\r
-                    rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase());\r
-                } else if (t.currentStyle) {\r
-                    rv = t.currentStyle[p];\r
-                }\r
-                return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv;\r
-            },\r
-\r
-            /**\r
-             * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number.\r
-             * @param {!Object} t Target element\r
-             * @param {!string} p Property name (like "left", "top", "marginLeft", etc.)\r
-             * @param {!number} v Value\r
-             * @param {string=} sfx Suffix (like "px" or "%" or "em")\r
-             * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect.\r
-             * @return {number} value in pixels\r
-             */\r
-            _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) {\r
-                if (sfx === "px" || !sfx) { return v; }\r
-                if (sfx === "auto" || !v) { return 0; }\r
-                var horiz = _horizExp.test(p),\r
-                    node = t,\r
-                    style = _tempDiv.style,\r
-                    neg = (v < 0),\r
-                    pix, cache, time;\r
-                if (neg) {\r
-                    v = -v;\r
-                }\r
-                if (sfx === "%" && p.indexOf("border") !== -1) {\r
-                    pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight);\r
-                } else {\r
-                    style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;";\r
-                    if (sfx === "%" || !node.appendChild) {\r
-                        node = t.parentNode || _doc.body;\r
-                        cache = node._gsCache;\r
-                        time = TweenLite.ticker.frame;\r
-                        if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick)\r
-                            return cache.width * v / 100;\r
-                        }\r
-                        style[(horiz ? "width" : "height")] = v + sfx;\r
-                    } else {\r
-                        style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx;\r
-                    }\r
-                    node.appendChild(_tempDiv);\r
-                    pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]);\r
-                    node.removeChild(_tempDiv);\r
-                    if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) {\r
-                        cache = node._gsCache = node._gsCache || {};\r
-                        cache.time = time;\r
-                        cache.width = pix / v * 100;\r
-                    }\r
-                    if (pix === 0 && !recurse) {\r
-                        pix = _convertToPixels(t, p, v, sfx, true);\r
-                    }\r
-                }\r
-                return neg ? -pix : pix;\r
-            },\r
-            _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop\r
-                if (_getStyle(t, "position", cs) !== "absolute") { return 0; }\r
-                var dim = ((p === "left") ? "Left" : "Top"),\r
-                    v = _getStyle(t, "margin" + dim, cs);\r
-                return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0);\r
-            },\r
-\r
-            // @private returns at object containing ALL of the style properties in camelCase and their associated values.\r
-            _getAllStyles = function(t, cs) {\r
-                var s = {},\r
-                    i, tr;\r
-                if ((cs = cs || _getComputedStyle(t, null))) {\r
-                    if ((i = cs.length)) {\r
-                        while (--i > -1) {\r
-                            s[cs[i].replace(_camelExp, _camelFunc)] = cs.getPropertyValue(cs[i]);\r
-                        }\r
-                    } else { //Opera behaves differently - cs.length is always 0, so we must do a for...in loop.\r
-                        for (i in cs) {\r
-                            s[i] = cs[i];\r
-                        }\r
-                    }\r
-                } else if ((cs = t.currentStyle || t.style)) {\r
-                    for (i in cs) {\r
-                        if (typeof(i) === "string" && s[i] === undefined) {\r
-                            s[i.replace(_camelExp, _camelFunc)] = cs[i];\r
-                        }\r
-                    }\r
-                }\r
-                if (!_supportsOpacity) {\r
-                    s.opacity = _getIEOpacity(t);\r
-                }\r
-                tr = _getTransform(t, cs, false);\r
-                s.rotation = tr.rotation;\r
-                s.skewX = tr.skewX;\r
-                s.scaleX = tr.scaleX;\r
-                s.scaleY = tr.scaleY;\r
-                s.x = tr.x;\r
-                s.y = tr.y;\r
-                if (_supports3D) {\r
-                    s.z = tr.z;\r
-                    s.rotationX = tr.rotationX;\r
-                    s.rotationY = tr.rotationY;\r
-                    s.scaleZ = tr.scaleZ;\r
-                }\r
-                if (s.filters) {\r
-                    delete s.filters;\r
-                }\r
-                return s;\r
-            },\r
-\r
-            // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details.\r
-            _cssDif = function(t, s1, s2, vars, forceLookup) {\r
-                var difs = {},\r
-                    style = t.style,\r
-                    val, p, mpt;\r
-                for (p in s2) {\r
-                    if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") {\r
-                        difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween.\r
-                        if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes.\r
-                            mpt = new MiniPropTween(style, p, style[p], mpt);\r
-                        }\r
-                    }\r
-                }\r
-                if (vars) {\r
-                    for (p in vars) { //copy properties (except className)\r
-                        if (p !== "className") {\r
-                            difs[p] = vars[p];\r
-                        }\r
-                    }\r
-                }\r
-                return {difs:difs, firstMPT:mpt};\r
-            },\r
-            _dimensions = {width:["Left","Right"], height:["Top","Bottom"]},\r
-            _margins = ["marginLeft","marginRight","marginTop","marginBottom"],\r
-\r
-            /**\r
-             * @private Gets the width or height of an element\r
-             * @param {!Object} t Target element\r
-             * @param {!string} p Property name ("width" or "height")\r
-             * @param {Object=} cs Computed style object (if one exists). Just a speed optimization.\r
-             * @return {number} Dimension (in pixels)\r
-             */\r
-            _getDimension = function(t, p, cs) {\r
-                var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight),\r
-                    a = _dimensions[p],\r
-                    i = a.length;\r
-                cs = cs || _getComputedStyle(t, null);\r
-                while (--i > -1) {\r
-                    v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0;\r
-                    v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0;\r
-                }\r
-                return v;\r
-            },\r
-\r
-            // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value)\r
-            _parsePosition = function(v, recObj) {\r
-                if (v == null || v === "" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto".\r
-                    v = "0 0";\r
-                }\r
-                var a = v.split(" "),\r
-                    x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],\r
-                    y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];\r
-                if (y == null) {\r
-                    y = "0";\r
-                } else if (y === "center") {\r
-                    y = "50%";\r
-                }\r
-                if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative.\r
-                    x = "50%";\r
-                }\r
-                if (recObj) {\r
-                    recObj.oxp = (x.indexOf("%") !== -1);\r
-                    recObj.oyp = (y.indexOf("%") !== -1);\r
-                    recObj.oxr = (x.charAt(1) === "=");\r
-                    recObj.oyr = (y.charAt(1) === "=");\r
-                    recObj.ox = parseFloat(x.replace(_NaNExp, ""));\r
-                    recObj.oy = parseFloat(y.replace(_NaNExp, ""));\r
-                }\r
-                return x + " " + y + ((a.length > 2) ? " " + a[2] : "");\r
-            },\r
-\r
-            /**\r
-             * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!)\r
-             * @param {(number|string)} e End value which is typically a string, but could be a number\r
-             * @param {(number|string)} b Beginning value which is typically a string but could be a number\r
-             * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized)\r
-             */\r
-            _parseChange = function(e, b) {\r
-                return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : parseFloat(e) - parseFloat(b);\r
-            },\r
-\r
-            /**\r
-             * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function.\r
-             * @param {Object} v Value to be parsed\r
-             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)\r
-             * @return {number} Parsed value\r
-             */\r
-            _parseVal = function(v, d) {\r
-                return (v == null) ? d : (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) + d : parseFloat(v);\r
-            },\r
-\r
-            /**\r
-             * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly.\r
-             * @param {Object} v Value to be parsed\r
-             * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter)\r
-             * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY"\r
-             * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation.\r
-             * @return {number} parsed angle in radians\r
-             */\r
-            _parseAngle = function(v, d, p, directionalEnd) {\r
-                var min = 0.000001,\r
-                    cap, split, dif, result;\r
-                if (v == null) {\r
-                    result = d;\r
-                } else if (typeof(v) === "number") {\r
-                    result = v;\r
-                } else {\r
-                    cap = 360;\r
-                    split = v.split("_");\r
-                    dif = Number(split[0].replace(_NaNExp, "")) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - ((v.charAt(1) === "=") ? 0 : d);\r
-                    if (split.length) {\r
-                        if (directionalEnd) {\r
-                            directionalEnd[p] = d + dif;\r
-                        }\r
-                        if (v.indexOf("short") !== -1) {\r
-                            dif = dif % cap;\r
-                            if (dif !== dif % (cap / 2)) {\r
-                                dif = (dif < 0) ? dif + cap : dif - cap;\r
-                            }\r
-                        }\r
-                        if (v.indexOf("_cw") !== -1 && dif < 0) {\r
-                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {\r
-                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        }\r
-                    }\r
-                    result = d + dif;\r
-                }\r
-                if (result < min && result > -min) {\r
-                    result = 0;\r
-                }\r
-                return result;\r
-            },\r
-\r
-            _colorLookup = {aqua:[0,255,255],\r
-                lime:[0,255,0],\r
-                silver:[192,192,192],\r
-                black:[0,0,0],\r
-                maroon:[128,0,0],\r
-                teal:[0,128,128],\r
-                blue:[0,0,255],\r
-                navy:[0,0,128],\r
-                white:[255,255,255],\r
-                fuchsia:[255,0,255],\r
-                olive:[128,128,0],\r
-                yellow:[255,255,0],\r
-                orange:[255,165,0],\r
-                gray:[128,128,128],\r
-                purple:[128,0,128],\r
-                green:[0,128,0],\r
-                red:[255,0,0],\r
-                pink:[255,192,203],\r
-                cyan:[0,255,255],\r
-                transparent:[255,255,255,0]},\r
-\r
-            _hue = function(h, m1, m2) {\r
-                h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h;\r
-                return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0;\r
-            },\r
-\r
-            /**\r
-             * @private Parses a color (like #9F0, #FF9900, or rgb(255,51,153)) into an array with 3 elements for red, green, and blue. Also handles rgba() values (splits into array of 4 elements of course)\r
-             * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc.\r
-             * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order.\r
-             */\r
-            _parseColor = function(v) {\r
-                var c1, c2, c3, h, s, l;\r
-                if (!v || v === "") {\r
-                    return _colorLookup.black;\r
-                }\r
-                if (typeof(v) === "number") {\r
-                    return [v >> 16, (v >> 8) & 255, v & 255];\r
-                }\r
-                if (v.charAt(v.length - 1) === ",") { //sometimes a trailing commma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value.\r
-                    v = v.substr(0, v.length - 1);\r
-                }\r
-                if (_colorLookup[v]) {\r
-                    return _colorLookup[v];\r
-                }\r
-                if (v.charAt(0) === "#") {\r
-                    if (v.length === 4) { //for shorthand like #9F0\r
-                        c1 = v.charAt(1),\r
-                        c2 = v.charAt(2),\r
-                        c3 = v.charAt(3);\r
-                        v = "#" + c1 + c1 + c2 + c2 + c3 + c3;\r
-                    }\r
-                    v = parseInt(v.substr(1), 16);\r
-                    return [v >> 16, (v >> 8) & 255, v & 255];\r
-                }\r
-                if (v.substr(0, 3) === "hsl") {\r
-                    v = v.match(_numExp);\r
-                    h = (Number(v[0]) % 360) / 360;\r
-                    s = Number(v[1]) / 100;\r
-                    l = Number(v[2]) / 100;\r
-                    c2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;\r
-                    c1 = l * 2 - c2;\r
-                    if (v.length > 3) {\r
-                        v[3] = Number(v[3]);\r
-                    }\r
-                    v[0] = _hue(h + 1 / 3, c1, c2);\r
-                    v[1] = _hue(h, c1, c2);\r
-                    v[2] = _hue(h - 1 / 3, c1, c2);\r
-                    return v;\r
-                }\r
-                v = v.match(_numExp) || _colorLookup.transparent;\r
-                v[0] = Number(v[0]);\r
-                v[1] = Number(v[1]);\r
-                v[2] = Number(v[2]);\r
-                if (v.length > 3) {\r
-                    v[3] = Number(v[3]);\r
-                }\r
-                return v;\r
-            },\r
-            _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b"; //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc.\r
-\r
-        for (p in _colorLookup) {\r
-            _colorExp += "|" + p + "\\b";\r
-        }\r
-        _colorExp = new RegExp(_colorExp+")", "gi");\r
-\r
-        /**\r
-         * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned.\r
-         * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned.\r
-         * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't.\r
-         * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc.\r
-         * @return {Function} formatter function\r
-         */\r
-        var _getFormatter = function(dflt, clr, collapsible, multi) {\r
-                if (dflt == null) {\r
-                    return function(v) {return v;};\r
-                }\r
-                var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "",\r
-                    dVals = dflt.split(dColor).join("").match(_valuesExp) || [],\r
-                    pfx = dflt.substr(0, dflt.indexOf(dVals[0])),\r
-                    sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "",\r
-                    delim = (dflt.indexOf(" ") !== -1) ? " " : ",",\r
-                    numVals = dVals.length,\r
-                    dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "",\r
-                    formatter;\r
-                if (!numVals) {\r
-                    return function(v) {return v;};\r
-                }\r
-                if (clr) {\r
-                    formatter = function(v) {\r
-                        var color, vals, i, a;\r
-                        if (typeof(v) === "number") {\r
-                            v += dSfx;\r
-                        } else if (multi && _commasOutsideParenExp.test(v)) {\r
-                            a = v.replace(_commasOutsideParenExp, "|").split("|");\r
-                            for (i = 0; i < a.length; i++) {\r
-                                a[i] = formatter(a[i]);\r
-                            }\r
-                            return a.join(",");\r
-                        }\r
-                        color = (v.match(_colorExp) || [dColor])[0];\r
-                        vals = v.split(color).join("").match(_valuesExp) || [];\r
-                        i = vals.length;\r
-                        if (numVals > i--) {\r
-                            while (++i < numVals) {\r
-                                vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];\r
-                            }\r
-                        }\r
-                        return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : "");\r
-                    };\r
-                    return formatter;\r
-\r
-                }\r
-                formatter = function(v) {\r
-                    var vals, a, i;\r
-                    if (typeof(v) === "number") {\r
-                        v += dSfx;\r
-                    } else if (multi && _commasOutsideParenExp.test(v)) {\r
-                        a = v.replace(_commasOutsideParenExp, "|").split("|");\r
-                        for (i = 0; i < a.length; i++) {\r
-                            a[i] = formatter(a[i]);\r
-                        }\r
-                        return a.join(",");\r
-                    }\r
-                    vals = v.match(_valuesExp) || [];\r
-                    i = vals.length;\r
-                    if (numVals > i--) {\r
-                        while (++i < numVals) {\r
-                            vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i];\r
-                        }\r
-                    }\r
-                    return pfx + vals.join(delim) + sfx;\r
-                };\r
-                return formatter;\r
-            },\r
-\r
-            /**\r
-             * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges.\r
-             * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft"\r
-             * @return {Function} a formatter function\r
-             */\r
-            _getEdgeParser = function(props) {\r
-                props = props.split(",");\r
-                return function(t, e, p, cssp, pt, plugin, vars) {\r
-                    var a = (e + "").split(" "),\r
-                        i;\r
-                    vars = {};\r
-                    for (i = 0; i < 4; i++) {\r
-                        vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)];\r
-                    }\r
-                    return cssp.parse(t, vars, pt, plugin);\r
-                };\r
-            },\r
-\r
-            // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens  which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color.\r
-            _setPluginRatio = _internals._setPluginRatio = function(v) {\r
-                this.plugin.setRatio(v);\r
-                var d = this.data,\r
-                    proxy = d.proxy,\r
-                    mpt = d.firstMPT,\r
-                    min = 0.000001,\r
-                    val, pt, i, str;\r
-                while (mpt) {\r
-                    val = proxy[mpt.v];\r
-                    if (mpt.r) {\r
-                        val = Math.round(val);\r
-                    } else if (val < min && val > -min) {\r
-                        val = 0;\r
-                    }\r
-                    mpt.t[mpt.p] = val;\r
-                    mpt = mpt._next;\r
-                }\r
-                if (d.autoRotate) {\r
-                    d.autoRotate.rotation = proxy.rotation;\r
-                }\r
-                //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method.\r
-                if (v === 1) {\r
-                    mpt = d.firstMPT;\r
-                    while (mpt) {\r
-                        pt = mpt.t;\r
-                        if (!pt.type) {\r
-                            pt.e = pt.s + pt.xs0;\r
-                        } else if (pt.type === 1) {\r
-                            str = pt.xs0 + pt.s + pt.xs1;\r
-                            for (i = 1; i < pt.l; i++) {\r
-                                str += pt["xn"+i] + pt["xs"+(i+1)];\r
-                            }\r
-                            pt.e = str;\r
-                        }\r
-                        mpt = mpt._next;\r
-                    }\r
-                }\r
-            },\r
-\r
-            /**\r
-             * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value.\r
-             * @param {!Object} t target object whose property we're tweening (often a CSSPropTween)\r
-             * @param {!string} p property name\r
-             * @param {(number|string|object)} v value\r
-             * @param {MiniPropTween=} next next MiniPropTween in the linked list\r
-             * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer\r
-             */\r
-            MiniPropTween = function(t, p, v, next, r) {\r
-                this.t = t;\r
-                this.p = p;\r
-                this.v = v;\r
-                this.r = r;\r
-                if (next) {\r
-                    next._prev = this;\r
-                    this._next = next;\r
-                }\r
-            },\r
-\r
-            /**\r
-             * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element.\r
-             * This method returns an object that has the following properties:\r
-             *  - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin.  This is what we feed to the external _onInitTween() as the target\r
-             *  - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values\r
-             *  - firstMPT: the first MiniPropTween in the linked list\r
-             *  - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter.\r
-             * @param {!Object} t target object to be tweened\r
-             * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed\r
-             * @param {!CSSPlugin} cssp The CSSPlugin instance\r
-             * @param {CSSPropTween=} pt the next CSSPropTween in the linked list\r
-             * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values\r
-             * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter.\r
-             * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions)\r
-             */\r
-            _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) {\r
-                var bpt = pt,\r
-                    start = {},\r
-                    end = {},\r
-                    transform = cssp._transform,\r
-                    oldForce = _forcePT,\r
-                    i, p, xp, mpt, firstPT;\r
-                cssp._transform = null;\r
-                _forcePT = vars;\r
-                pt = firstPT = cssp.parse(t, vars, pt, plugin);\r
-                _forcePT = oldForce;\r
-                //break off from the linked list so the new ones are isolated.\r
-                if (shallow) {\r
-                    cssp._transform = transform;\r
-                    if (bpt) {\r
-                        bpt._prev = null;\r
-                        if (bpt._prev) {\r
-                            bpt._prev._next = null;\r
-                        }\r
-                    }\r
-                }\r
-                while (pt && pt !== bpt) {\r
-                    if (pt.type <= 1) {\r
-                        p = pt.p;\r
-                        end[p] = pt.s + pt.c;\r
-                        start[p] = pt.s;\r
-                        if (!shallow) {\r
-                            mpt = new MiniPropTween(pt, "s", p, mpt, pt.r);\r
-                            pt.c = 0;\r
-                        }\r
-                        if (pt.type === 1) {\r
-                            i = pt.l;\r
-                            while (--i > 0) {\r
-                                xp = "xn" + i;\r
-                                p = pt.p + "_" + xp;\r
-                                end[p] = pt.data[xp];\r
-                                start[p] = pt[xp];\r
-                                if (!shallow) {\r
-                                    mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]);\r
-                                }\r
-                            }\r
-                        }\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-                return {proxy:start, end:end, firstMPT:mpt, pt:firstPT};\r
-            },\r
-\r
-\r
-\r
-            /**\r
-             * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory.\r
-             * CSSPropTweens have the following optional properties as well (not defined through the constructor):\r
-             *  - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc.\r
-             *  - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list)\r
-             *  - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request.\r
-             *  - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target.\r
-             *  - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible.\r
-             * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything.\r
-             * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width".\r
-             * @param {number} s Starting numeric value\r
-             * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95.\r
-             * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it.\r
-             * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update.\r
-             * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip"\r
-             * @param {boolean=} r If true, the value(s) should be rounded\r
-             * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0.\r
-             * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues.\r
-             * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues.\r
-             */\r
-            CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) {\r
-                this.t = t; //target\r
-                this.p = p; //property\r
-                this.s = s; //starting value\r
-                this.c = c; //change value\r
-                this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at)\r
-                if (!(t instanceof CSSPropTween)) {\r
-                    _overwriteProps.push(this.n);\r
-                }\r
-                this.r = r; //round (boolean)\r
-                this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work\r
-                if (pr) {\r
-                    this.pr = pr;\r
-                    _hasPriority = true;\r
-                }\r
-                this.b = (b === undefined) ? s : b;\r
-                this.e = (e === undefined) ? s + c : e;\r
-                if (next) {\r
-                    this._next = next;\r
-                    next._prev = this;\r
-                }\r
-            },\r
-\r
-            /**\r
-             * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example:\r
-             * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt);\r
-             * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio().\r
-             * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method.\r
-             *\r
-             * @param {!Object} t Target whose property will be tweened\r
-             * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow")\r
-             * @param {string} b Beginning value\r
-             * @param {string} e Ending value\r
-             * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization)\r
-             * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match\r
-             * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this).\r
-             * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0.\r
-             * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300}\r
-             * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here.\r
-             * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call.\r
-             */\r
-            _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) {\r
-                //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e);\r
-                b = b || dflt || "";\r
-                pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e);\r
-                e += ""; //ensures it's a string\r
-                var ba = b.split(", ").join(",").split(" "), //beginning array\r
-                    ea = e.split(", ").join(",").split(" "), //ending array\r
-                    l = ba.length,\r
-                    autoRound = (_autoRound !== false),\r
-                    i, xi, ni, bv, ev, bnums, enums, bn, rgba, temp, cv, str;\r
-                if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) {\r
-                    ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");\r
-                    ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" ");\r
-                    l = ba.length;\r
-                }\r
-                if (l !== ea.length) {\r
-                    //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");\r
-                    ba = (dflt || "").split(" ");\r
-                    l = ba.length;\r
-                }\r
-                pt.plugin = plugin;\r
-                pt.setRatio = setRatio;\r
-                for (i = 0; i < l; i++) {\r
-                    bv = ba[i];\r
-                    ev = ea[i];\r
-                    bn = parseFloat(bv);\r
-\r
-                    //if the value begins with a number (most common). It's fine if it has a suffix like px\r
-                    if (bn || bn === 0) {\r
-                        pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1), true);\r
-\r
-                    //if the value is a color\r
-                    } else if (clrs && (bv.charAt(0) === "#" || _colorLookup[bv] || _rgbhslExp.test(bv))) {\r
-                        str = ev.charAt(ev.length - 1) === "," ? ")," : ")"; //if there's a comma at the end, retain it.\r
-                        bv = _parseColor(bv);\r
-                        ev = _parseColor(ev);\r
-                        rgba = (bv.length + ev.length > 6);\r
-                        if (rgba && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color\r
-                            pt["xs" + pt.l] += pt.l ? " transparent" : "transparent";\r
-                            pt.e = pt.e.split(ea[i]).join("transparent");\r
-                        } else {\r
-                            if (!_supportsOpacity) { //old versions of IE don't support rgba().\r
-                                rgba = false;\r
-                            }\r
-                            pt.appendXtra((rgba ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", true, true)\r
-                                .appendXtra("", bv[1], ev[1] - bv[1], ",", true)\r
-                                .appendXtra("", bv[2], ev[2] - bv[2], (rgba ? "," : str), true);\r
-                            if (rgba) {\r
-                                bv = (bv.length < 4) ? 1 : bv[3];\r
-                                pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false);\r
-                            }\r
-                        }\r
-\r
-                    } else {\r
-                        bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array\r
-\r
-                        //if no number is found, treat it as a non-tweening value and just append the string to the current xs.\r
-                        if (!bnums) {\r
-                            pt["xs" + pt.l] += pt.l ? " " + bv : bv;\r
-\r
-                        //loop through all the numbers that are found and construct the extra values on the pt.\r
-                        } else {\r
-                            enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5\r
-                            if (!enums || enums.length !== bnums.length) {\r
-                                //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")");\r
-                                return pt;\r
-                            }\r
-                            ni = 0;\r
-                            for (xi = 0; xi < bnums.length; xi++) {\r
-                                cv = bnums[xi];\r
-                                temp = bv.indexOf(cv, ni);\r
-                                pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px"), (xi === 0));\r
-                                ni = temp + cv.length;\r
-                            }\r
-                            pt["xs" + pt.l] += bv.substr(ni);\r
-                        }\r
-                    }\r
-                }\r
-                //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly.\r
-                if (e.indexOf("=") !== -1) if (pt.data) {\r
-                    str = pt.xs0 + pt.data.s;\r
-                    for (i = 1; i < pt.l; i++) {\r
-                        str += pt["xs" + i] + pt.data["xn" + i];\r
-                    }\r
-                    pt.e = str + pt["xs" + i];\r
-                }\r
-                if (!pt.l) {\r
-                    pt.type = -1;\r
-                    pt.xs0 = pt.e;\r
-                }\r
-                return pt.xfirst || pt;\r
-            },\r
-            i = 9;\r
-\r
-\r
-        p = CSSPropTween.prototype;\r
-        p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc.\r
-        while (--i > 0) {\r
-            p["xn" + i] = 0;\r
-            p["xs" + i] = "";\r
-        }\r
-        p.xs0 = "";\r
-        p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null;\r
-\r
-\r
-        /**\r
-         * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this:\r
-         * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)"\r
-         * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method).\r
-         * @param {string=} pfx Prefix (if any)\r
-         * @param {!number} s Starting value\r
-         * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95.\r
-         * @param {string=} sfx Suffix (if any)\r
-         * @param {boolean=} r Round (if true).\r
-         * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space.\r
-         * @return {CSSPropTween} returns itself so that multiple methods can be chained together.\r
-         */\r
-        p.appendXtra = function(pfx, s, c, sfx, r, pad) {\r
-            var pt = this,\r
-                l = pt.l;\r
-            pt["xs" + l] += (pad && l) ? " " + pfx : pfx || "";\r
-            if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value!\r
-                pt["xs" + l] += s + (sfx || "");\r
-                return pt;\r
-            }\r
-            pt.l++;\r
-            pt.type = pt.setRatio ? 2 : 1;\r
-            pt["xs" + pt.l] = sfx || "";\r
-            if (l > 0) {\r
-                pt.data["xn" + l] = s + c;\r
-                pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method)\r
-                pt["xn" + l] = s;\r
-                if (!pt.plugin) {\r
-                    pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr);\r
-                    pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly.\r
-                }\r
-                return pt;\r
-            }\r
-            pt.data = {s:s + c};\r
-            pt.rxp = {};\r
-            pt.s = s;\r
-            pt.c = c;\r
-            pt.r = r;\r
-            return pt;\r
-        };\r
-\r
-        /**\r
-         * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly.\r
-         * @param {!string} p Property name (like "boxShadow" or "throwProps")\r
-         * @param {Object=} options An object containing any of the following configuration options:\r
-         *                      - defaultValue: the default value\r
-         *                      - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker)\r
-         *                      - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.)\r
-         *                      - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O)\r
-         *                      - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc.\r
-         *                      - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0.\r
-         *                      - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out.\r
-         *                      - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc.\r
-         *                      - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default).\r
-         */\r
-        var SpecialProp = function(p, options) {\r
-                options = options || {};\r
-                this.p = options.prefix ? _checkPropPrefix(p) || p : p;\r
-                _specialProps[p] = _specialProps[this.p] = this;\r
-                this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi);\r
-                if (options.parser) {\r
-                    this.parse = options.parser;\r
-                }\r
-                this.clrs = options.color;\r
-                this.multi = options.multi;\r
-                this.keyword = options.keyword;\r
-                this.dflt = options.defaultValue;\r
-                this.pr = options.priority || 0;\r
-            },\r
-\r
-            //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin.\r
-            _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) {\r
-                if (typeof(options) !== "object") {\r
-                    options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin\r
-                }\r
-                var a = p.split(","),\r
-                    d = options.defaultValue,\r
-                    i, temp;\r
-                defaults = defaults || [d];\r
-                for (i = 0; i < a.length; i++) {\r
-                    options.prefix = (i === 0 && options.prefix);\r
-                    options.defaultValue = defaults[i] || d;\r
-                    temp = new SpecialProp(a[i], options);\r
-                }\r
-            },\r
-\r
-            //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file.\r
-            _registerPluginProp = function(p) {\r
-                if (!_specialProps[p]) {\r
-                    var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin";\r
-                    _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-                        var pluginClass = (window.GreenSockGlobals || window).com.greensock.plugins[pluginName];\r
-                        if (!pluginClass) {\r
-                            _log("Error: " + pluginName + " js file not loaded.");\r
-                            return pt;\r
-                        }\r
-                        pluginClass._cssRegister();\r
-                        return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars);\r
-                    }});\r
-                }\r
-            };\r
-\r
-\r
-        p = SpecialProp.prototype;\r
-\r
-        /**\r
-         * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list)\r
-         * @param {!Object} t target element\r
-         * @param {(string|number|object)} b beginning value\r
-         * @param {(string|number|object)} e ending (destination) value\r
-         * @param {CSSPropTween=} pt next CSSPropTween in the linked list\r
-         * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here.\r
-         * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here.\r
-         * @return {CSSPropTween=} First CSSPropTween in the linked list\r
-         */\r
-        p.parseComplex = function(t, b, e, pt, plugin, setRatio) {\r
-            var kwd = this.keyword,\r
-                i, ba, ea, l, bi, ei;\r
-            //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example)\r
-            if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) {\r
-                ba = b.replace(_commasOutsideParenExp, "|").split("|");\r
-                ea = e.replace(_commasOutsideParenExp, "|").split("|");\r
-            } else if (kwd) {\r
-                ba = [b];\r
-                ea = [e];\r
-            }\r
-            if (ea) {\r
-                l = (ea.length > ba.length) ? ea.length : ba.length;\r
-                for (i = 0; i < l; i++) {\r
-                    b = ba[i] = ba[i] || this.dflt;\r
-                    e = ea[i] = ea[i] || this.dflt;\r
-                    if (kwd) {\r
-                        bi = b.indexOf(kwd);\r
-                        ei = e.indexOf(kwd);\r
-                        if (bi !== ei) {\r
-                            e = (ei === -1) ? ea : ba;\r
-                            e[i] += " " + kwd;\r
-                        }\r
-                    }\r
-                }\r
-                b = ba.join(", ");\r
-                e = ea.join(", ");\r
-            }\r
-            return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio);\r
-        };\r
-\r
-        /**\r
-         * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call:\r
-         * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this);\r
-         * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that).\r
-         * @param {!Object} t Target object whose property is being tweened\r
-         * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object).\r
-         * @param {!string} p Property name\r
-         * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween.\r
-         * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it)\r
-         * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance.\r
-         * @param {Object=} vars Original vars object that contains the data for parsing.\r
-         * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call.\r
-         */\r
-        p.parse = function(t, e, p, cssp, pt, plugin, vars) {\r
-            return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin);\r
-        };\r
-\r
-        /**\r
-         * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters:\r
-         *  1) Target object whose property should be tweened (typically a DOM element)\r
-         *  2) The end/destination value (could be a string, number, object, or whatever you want)\r
-         *  3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration)\r
-         *\r
-         * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example:\r
-         *\r
-         * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) {\r
-         *      var start = target.style.width;\r
-         *      return function(ratio) {\r
-         *              target.style.width = (start + value * ratio) + "px";\r
-         *              console.log("set width to " + target.style.width);\r
-         *          }\r
-         * }, 0);\r
-         *\r
-         * Then, when I do this tween, it will trigger my special property:\r
-         *\r
-         * TweenLite.to(element, 1, {css:{myCustomProp:100}});\r
-         *\r
-         * In the example, of course, we're just changing the width, but you can do anything you want.\r
-         *\r
-         * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}})\r
-         * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function.\r
-         * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones.\r
-         */\r
-        CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) {\r
-            _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-                var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority);\r
-                rv.plugin = plugin;\r
-                rv.setRatio = onInitTween(t, e, cssp._tween, p);\r
-                return rv;\r
-            }, priority:priority});\r
-        };\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-        //transform-related methods and properties\r
-        var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective").split(","),\r
-            _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform.\r
-            _transformPropCSS = _prefixCSS + "transform",\r
-            _transformOriginProp = _checkPropPrefix("transformOrigin"),\r
-            _supports3D = (_checkPropPrefix("perspective") !== null),\r
-            Transform = _internals.Transform = function() {\r
-                this.skewY = 0;\r
-            },\r
-\r
-            /**\r
-             * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10.\r
-             * @param {!Object} t target element\r
-             * @param {Object=} cs computed style object (optional)\r
-             * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...}\r
-             * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style)\r
-             * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...}\r
-             */\r
-            _getTransform = _internals.getTransform = function(t, cs, rec, parse) {\r
-                if (t._gsTransform && rec && !parse) {\r
-                    return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things.\r
-                }\r
-                var tm = rec ? t._gsTransform || new Transform() : new Transform(),\r
-                    invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.\r
-                    min = 0.00002,\r
-                    rnd = 100000,\r
-                    minAngle = 179.99,\r
-                    minPI = minAngle * _DEG2RAD,\r
-                    zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin  || 0 : 0,\r
-                    s, m, i, n, dec, scaleX, scaleY, rotation, skewX, difX, difY, difR, difS;\r
-                if (_transformProp) {\r
-                    s = _getStyle(t, _transformPropCSS, cs, true);\r
-                } else if (t.currentStyle) {\r
-                    //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix.\r
-                    s = t.currentStyle.filter.match(_ieGetMatrixExp);\r
-                    s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : "";\r
-                }\r
-                //split the matrix values out into an array (m for matrix)\r
-                m = (s || "").match(/(?:\-|\b)[\d\-\.e]+\b/gi) || [];\r
-                i = m.length;\r
-                while (--i > -1) {\r
-                    n = Number(m[i]);\r
-                    m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).\r
-                }\r
-                if (m.length === 16) {\r
-\r
-                    //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)\r
-                    var a13 = m[8], a23 = m[9], a33 = m[10],\r
-                        a14 = m[12], a24 = m[13], a34 = m[14];\r
-\r
-                    //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari\r
-                    if (tm.zOrigin) {\r
-                        a34 = -tm.zOrigin;\r
-                        a14 = a13*a34-m[12];\r
-                        a24 = a23*a34-m[13];\r
-                        a34 = a33*a34+tm.zOrigin-m[14];\r
-                    }\r
-\r
-                    //only parse from the matrix if we MUST because not only is it usually unnecessary due to the fact that we store the values in the _gsTransform object, but also because it's impossible to accurately interpret rotationX, rotationY, rotationZ, scaleX, and scaleY if all are applied, so it's much better to rely on what we store. However, we must parse the first time that an object is tweened. We also assume that if the position has changed, the user must have done some styling changes outside of CSSPlugin, thus we force a parse in that scenario.\r
-                    if (!rec || parse || tm.rotationX == null) {\r
-                        var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],\r
-                            a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],\r
-                            a43 = m[11],\r
-                            angle = Math.atan2(a32, a33),\r
-                            xFlip = (angle < -minPI || angle > minPI),\r
-                            t1, t2, t3, cos, sin, yFlip, zFlip;\r
-                        tm.rotationX = angle * _RAD2DEG;\r
-                        //rotationX\r
-                        if (angle) {\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            t1 = a12*cos+a13*sin;\r
-                            t2 = a22*cos+a23*sin;\r
-                            t3 = a32*cos+a33*sin;\r
-                            a13 = a12*-sin+a13*cos;\r
-                            a23 = a22*-sin+a23*cos;\r
-                            a33 = a32*-sin+a33*cos;\r
-                            a43 = a42*-sin+a43*cos;\r
-                            a12 = t1;\r
-                            a22 = t2;\r
-                            a32 = t3;\r
-                        }\r
-                        //rotationY\r
-                        angle = Math.atan2(a13, a11);\r
-                        tm.rotationY = angle * _RAD2DEG;\r
-                        if (angle) {\r
-                            yFlip = (angle < -minPI || angle > minPI);\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            t1 = a11*cos-a13*sin;\r
-                            t2 = a21*cos-a23*sin;\r
-                            t3 = a31*cos-a33*sin;\r
-                            a23 = a21*sin+a23*cos;\r
-                            a33 = a31*sin+a33*cos;\r
-                            a43 = a41*sin+a43*cos;\r
-                            a11 = t1;\r
-                            a21 = t2;\r
-                            a31 = t3;\r
-                        }\r
-                        //rotationZ\r
-                        angle = Math.atan2(a21, a22);\r
-                        tm.rotation = angle * _RAD2DEG;\r
-                        if (angle) {\r
-                            zFlip = (angle < -minPI || angle > minPI);\r
-                            cos = Math.cos(-angle);\r
-                            sin = Math.sin(-angle);\r
-                            a11 = a11*cos+a12*sin;\r
-                            t2 = a21*cos+a22*sin;\r
-                            a22 = a21*-sin+a22*cos;\r
-                            a32 = a31*-sin+a32*cos;\r
-                            a21 = t2;\r
-                        }\r
-\r
-                        if (zFlip && xFlip) {\r
-                            tm.rotation = tm.rotationX = 0;\r
-                        } else if (zFlip && yFlip) {\r
-                            tm.rotation = tm.rotationY = 0;\r
-                        } else if (yFlip && xFlip) {\r
-                            tm.rotationY = tm.rotationX = 0;\r
-                        }\r
-\r
-                        tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;\r
-                        tm.scaleY = ((Math.sqrt(a22 * a22 + a23 * a23) * rnd + 0.5) | 0) / rnd;\r
-                        tm.scaleZ = ((Math.sqrt(a32 * a32 + a33 * a33) * rnd + 0.5) | 0) / rnd;\r
-                        tm.skewX = 0;\r
-                        tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0;\r
-                        tm.x = a14;\r
-                        tm.y = a24;\r
-                        tm.z = a34;\r
-                    }\r
-\r
-                } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY)) && !(tm.x !== undefined && _getStyle(t, "display", cs) === "none")) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those.\r
-                    var k = (m.length >= 6),\r
-                        a = k ? m[0] : 1,\r
-                        b = m[1] || 0,\r
-                        c = m[2] || 0,\r
-                        d = k ? m[3] : 1;\r
-                    tm.x = m[4] || 0;\r
-                    tm.y = m[5] || 0;\r
-                    scaleX = Math.sqrt(a * a + b * b);\r
-                    scaleY = Math.sqrt(d * d + c * c);\r
-                    rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist).\r
-                    skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0;\r
-                    difX = scaleX - Math.abs(tm.scaleX || 0);\r
-                    difY = scaleY - Math.abs(tm.scaleY || 0);\r
-                    if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {\r
-                        if (invX) {\r
-                            scaleX *= -1;\r
-                            skewX += (rotation <= 0) ? 180 : -180;\r
-                            rotation += (rotation <= 0) ? 180 : -180;\r
-                        } else {\r
-                            scaleY *= -1;\r
-                            skewX += (skewX <= 0) ? 180 : -180;\r
-                        }\r
-                    }\r
-                    difR = (rotation - tm.rotation) % 180; //note: matching ranges would be very small (+/-0.0001) or very close to 180.\r
-                    difS = (skewX - tm.skewX) % 180;\r
-                    //if there's already a recorded _gsTransform in place for the target, we should leave those values in place unless we know things changed for sure (beyond a super small amount). This gets around ambiguous interpretations, like if scaleX and scaleY are both -1, the matrix would be the same as if the rotation was 180 with normal scaleX/scaleY. If the user tweened to particular values, those must be prioritized to ensure animation is consistent.\r
-                    if (tm.skewX === undefined || difX > min || difX < -min || difY > min || difY < -min || (difR > -minAngle && difR < minAngle && (difR * rnd) | 0 !== 0) || (difS > -minAngle && difS < minAngle && (difS * rnd) | 0 !== 0)) {\r
-                        tm.scaleX = scaleX;\r
-                        tm.scaleY = scaleY;\r
-                        tm.rotation = rotation;\r
-                        tm.skewX = skewX;\r
-                    }\r
-                    if (_supports3D) {\r
-                        tm.rotationX = tm.rotationY = tm.z = 0;\r
-                        tm.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0;\r
-                        tm.scaleZ = 1;\r
-                    }\r
-                }\r
-                tm.zOrigin = zOrigin;\r
-\r
-                //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate.\r
-                for (i in tm) {\r
-                    if (tm[i] < min) if (tm[i] > -min) {\r
-                        tm[i] = 0;\r
-                    }\r
-                }\r
-                //DEBUG: _log("parsed rotation: "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);\r
-                if (rec) {\r
-                    t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)\r
-                }\r
-                return tm;\r
-            },\r
-\r
-            //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms)\r
-            _setIETransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    ang = -t.rotation * _DEG2RAD,\r
-                    skew = ang + t.skewX * _DEG2RAD,\r
-                    rnd = 100000,\r
-                    a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd,\r
-                    b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd,\r
-                    c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd,\r
-                    d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd,\r
-                    style = this.t.style,\r
-                    cs = this.t.currentStyle,\r
-                    filters, val;\r
-                if (!cs) {\r
-                    return;\r
-                }\r
-                val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted)\r
-                b = -c;\r
-                c = -val;\r
-                filters = cs.filter;\r
-                style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight\r
-                var w = this.t.offsetWidth,\r
-                    h = this.t.offsetHeight,\r
-                    clip = (cs.position !== "absolute"),\r
-                    m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d,\r
-                    ox = t.x,\r
-                    oy = t.y,\r
-                    dx, dy;\r
-\r
-                //if transformOrigin is being used, adjust the offset x and y\r
-                if (t.ox != null) {\r
-                    dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2;\r
-                    dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2;\r
-                    ox += dx - (dx * a + dy * b);\r
-                    oy += dy - (dx * c + dy * d);\r
-                }\r
-\r
-                if (!clip) {\r
-                    m += ", sizingMethod='auto expand')";\r
-                } else {\r
-                    dx = (w / 2);\r
-                    dy = (h / 2);\r
-                    //translate to ensure that transformations occur around the correct origin (default is center).\r
-                    m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")";\r
-                }\r
-                if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) {\r
-                    style.filter = filters.replace(_ieSetMatrixExp, m);\r
-                } else {\r
-                    style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha.\r
-                }\r
-\r
-                //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance.\r
-                if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf("gradient(" && filters.indexOf("Alpha")) === -1) {\r
-                    style.removeAttribute("filter");\r
-                }\r
-\r
-                //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration).\r
-                if (!clip) {\r
-                    var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom\r
-                        marg, prop, dif;\r
-                    dx = t.ieOffsetX || 0;\r
-                    dy = t.ieOffsetY || 0;\r
-                    t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox);\r
-                    t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy);\r
-                    for (i = 0; i < 4; i++) {\r
-                        prop = _margins[i];\r
-                        marg = cs[prop];\r
-                        //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes)\r
-                        val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0;\r
-                        if (val !== t[prop]) {\r
-                            dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible.\r
-                        } else {\r
-                            dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY;\r
-                        }\r
-                        style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px";\r
-                    }\r
-                }\r
-            },\r
-\r
-            _set3DTransformRatio = _internals.set3DTransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    style = this.t.style,\r
-                    angle = t.rotation * _DEG2RAD,\r
-                    sx = t.scaleX,\r
-                    sy = t.scaleY,\r
-                    sz = t.scaleZ,\r
-                    perspective = t.perspective,\r
-                    a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43,\r
-                    zOrigin, rnd, cos, sin, t1, t2, t3, t4;\r
-                if (v === 1 || v === 0) if (t.force3D === "auto") if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !t.z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices\r
-                    _set2DTransformRatio.call(this, v);\r
-                    return;\r
-                }\r
-                if (_isFirefox) {\r
-                    var n = 0.0001;\r
-                    if (sx < n && sx > -n) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.\r
-                        sx = sz = 0.00002;\r
-                    }\r
-                    if (sy < n && sy > -n) {\r
-                        sy = sz = 0.00002;\r
-                    }\r
-                    if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).\r
-                        perspective = 0;\r
-                    }\r
-                }\r
-                if (angle || t.skewX) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    a11 = cos;\r
-                    a21 = sin;\r
-                    if (t.skewX) {\r
-                        angle -= t.skewX * _DEG2RAD;\r
-                        cos = Math.cos(angle);\r
-                        sin = Math.sin(angle);\r
-                        if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does\r
-                            t1 = Math.tan(t.skewX * _DEG2RAD);\r
-                            t1 = Math.sqrt(1 + t1 * t1);\r
-                            cos *= t1;\r
-                            sin *= t1;\r
-                        }\r
-                    }\r
-                    a12 = -sin;\r
-                    a22 = cos;\r
-\r
-                } else if (!t.rotationY && !t.rotationX && sz === 1 && !perspective) { //if we're only translating and/or 2D scaling, this is faster...\r
-                    style[_transformProp] = "translate3d(" + t.x + "px," + t.y + "px," + t.z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : "");\r
-                    return;\r
-                } else {\r
-                    a11 = a22 = 1;\r
-                    a12 = a21 = 0;\r
-                }\r
-                a33 = 1;\r
-                a13 = a14 = a23 = a24 = a31 = a32 = a34 = a41 = a42 = 0;\r
-                a43 = (perspective) ? -1 / perspective : 0;\r
-                zOrigin = t.zOrigin;\r
-                rnd = 100000;\r
-                angle = t.rotationY * _DEG2RAD;\r
-                if (angle) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    a31 = a33*-sin;\r
-                    a41 = a43*-sin;\r
-                    a13 = a11*sin;\r
-                    a23 = a21*sin;\r
-                    a33 *= cos;\r
-                    a43 *= cos;\r
-                    a11 *= cos;\r
-                    a21 *= cos;\r
-                }\r
-                angle = t.rotationX * _DEG2RAD;\r
-                if (angle) {\r
-                    cos = Math.cos(angle);\r
-                    sin = Math.sin(angle);\r
-                    t1 = a12*cos+a13*sin;\r
-                    t2 = a22*cos+a23*sin;\r
-                    t3 = a32*cos+a33*sin;\r
-                    t4 = a42*cos+a43*sin;\r
-                    a13 = a12*-sin+a13*cos;\r
-                    a23 = a22*-sin+a23*cos;\r
-                    a33 = a32*-sin+a33*cos;\r
-                    a43 = a42*-sin+a43*cos;\r
-                    a12 = t1;\r
-                    a22 = t2;\r
-                    a32 = t3;\r
-                    a42 = t4;\r
-                }\r
-                if (sz !== 1) {\r
-                    a13*=sz;\r
-                    a23*=sz;\r
-                    a33*=sz;\r
-                    a43*=sz;\r
-                }\r
-                if (sy !== 1) {\r
-                    a12*=sy;\r
-                    a22*=sy;\r
-                    a32*=sy;\r
-                    a42*=sy;\r
-                }\r
-                if (sx !== 1) {\r
-                    a11*=sx;\r
-                    a21*=sx;\r
-                    a31*=sx;\r
-                    a41*=sx;\r
-                }\r
-                if (zOrigin) {\r
-                    a34 -= zOrigin;\r
-                    a14 = a13*a34;\r
-                    a24 = a23*a34;\r
-                    a34 = a33*a34+zOrigin;\r
-                }\r
-                //we round the x, y, and z slightly differently to allow even larger values.\r
-                a14 = (t1 = (a14 += t.x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;\r
-                a24 = (t1 = (a24 += t.y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;\r
-                a34 = (t1 = (a34 += t.z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;\r
-                style[_transformProp] = "matrix3d(" + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";\r
-            },\r
-\r
-            _set2DTransformRatio = _internals.set2DTransformRatio = function(v) {\r
-                var t = this.data, //refers to the element's _gsTransform object\r
-                    targ = this.t,\r
-                    style = targ.style,\r
-                    ang, skew, rnd, sx, sy;\r
-                if (t.rotationX || t.rotationY || t.z || t.force3D === true || (t.force3D === "auto" && v !== 1 && v !== 0)) { //if a 3D tween begins while a 2D one is running, we need to kick the rendering over to the 3D method. For example, imagine a yoyo-ing, infinitely repeating scale tween running, and then the object gets rotated in 3D space with a different tween.\r
-                    this.setRatio = _set3DTransformRatio;\r
-                    _set3DTransformRatio.call(this, v);\r
-                    return;\r
-                }\r
-                if (!t.rotation && !t.skewX) {\r
-                    style[_transformProp] = "matrix(" + t.scaleX + ",0,0," + t.scaleY + "," + t.x + "," + t.y + ")";\r
-                } else {\r
-                    ang = t.rotation * _DEG2RAD;\r
-                    skew = ang - t.skewX * _DEG2RAD;\r
-                    rnd = 100000;\r
-                    sx = t.scaleX * rnd;\r
-                    sy = t.scaleY * rnd;\r
-                    //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places.\r
-                    style[_transformProp] = "matrix(" + (((Math.cos(ang) * sx) | 0) / rnd) + "," + (((Math.sin(ang) * sx) | 0) / rnd) + "," + (((Math.sin(skew) * -sy) | 0) / rnd) + "," + (((Math.cos(skew) * sy) | 0) / rnd) + "," + t.x + "," + t.y + ")";\r
-                }\r
-            };\r
-\r
-        _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType", {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-            if (cssp._transform) { return pt; } //only need to parse the transform once, and only if the browser supports it.\r
-            var m1 = cssp._transform = _getTransform(t, _cs, true, vars.parseTransform),\r
-                style = t.style,\r
-                min = 0.000001,\r
-                i = _transformProps.length,\r
-                v = vars,\r
-                endRotations = {},\r
-                m2, skewY, copy, orig, has3D, hasChange, dr;\r
-            if (typeof(v.transform) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)"\r
-                copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly.\r
-                copy[_transformProp] = v.transform;\r
-                copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly.\r
-                copy.position = "absolute";\r
-                _doc.body.appendChild(_tempDiv);\r
-                m2 = _getTransform(_tempDiv, null, false);\r
-                _doc.body.removeChild(_tempDiv);\r
-            } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object)\r
-                m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX),\r
-                    scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY),\r
-                    scaleZ:_parseVal(v.scaleZ, m1.scaleZ),\r
-                    x:_parseVal(v.x, m1.x),\r
-                    y:_parseVal(v.y, m1.y),\r
-                    z:_parseVal(v.z, m1.z),\r
-                    perspective:_parseVal(v.transformPerspective, m1.perspective)};\r
-                dr = v.directionalRotation;\r
-                if (dr != null) {\r
-                    if (typeof(dr) === "object") {\r
-                        for (copy in dr) {\r
-                            v[copy] = dr[copy];\r
-                        }\r
-                    } else {\r
-                        v.rotation = dr;\r
-                    }\r
-                }\r
-                m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : ("rotationZ" in v) ? v.rotationZ : m1.rotation, m1.rotation, "rotation", endRotations);\r
-                if (_supports3D) {\r
-                    m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations);\r
-                    m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations);\r
-                }\r
-                m2.skewX = (v.skewX == null) ? m1.skewX : _parseAngle(v.skewX, m1.skewX);\r
-\r
-                //note: for performance reasons, we combine all skewing into the skewX and rotation values, ignoring skewY but we must still record it so that we can discern how much of the overall skew is attributed to skewX vs. skewY. Otherwise, if the skewY would always act relative (tween skewY to 10deg, for example, multiple times and if we always combine things into skewX, we can't remember that skewY was 10 from last time). Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of -10 degrees.\r
-                m2.skewY = (v.skewY == null) ? m1.skewY : _parseAngle(v.skewY, m1.skewY);\r
-                if ((skewY = m2.skewY - m1.skewY)) {\r
-                    m2.skewX += skewY;\r
-                    m2.rotation += skewY;\r
-                }\r
-            }\r
-\r
-            if (_supports3D && v.force3D != null) {\r
-                m1.force3D = v.force3D;\r
-                hasChange = true;\r
-            }\r
-\r
-            m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType;\r
-\r
-            has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective);\r
-            if (!has3D && v.scale != null) {\r
-                m2.scaleZ = 1; //no need to tween scaleZ.\r
-            }\r
-\r
-            while (--i > -1) {\r
-                p = _transformProps[i];\r
-                orig = m2[p] - m1[p];\r
-                if (orig > min || orig < -min || _forcePT[p] != null) {\r
-                    hasChange = true;\r
-                    pt = new CSSPropTween(m1, p, m1[p], orig, pt);\r
-                    if (p in endRotations) {\r
-                        pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested\r
-                    }\r
-                    pt.xs0 = 0; //ensures the value stays numeric in setRatio()\r
-                    pt.plugin = plugin;\r
-                    cssp._overwriteProps.push(pt.n);\r
-                }\r
-            }\r
-\r
-            orig = v.transformOrigin;\r
-            if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly).\r
-                if (_transformProp) {\r
-                    hasChange = true;\r
-                    p = _transformOriginProp;\r
-                    orig = (orig || _getStyle(t, p, _cs, false, "50% 50%")) + ""; //cast as string to avoid errors\r
-                    pt = new CSSPropTween(style, p, 0, 0, pt, -1, "transformOrigin");\r
-                    pt.b = style[p];\r
-                    pt.plugin = plugin;\r
-                    if (_supports3D) {\r
-                        copy = m1.zOrigin;\r
-                        orig = orig.split(" ");\r
-                        m1.zOrigin = ((orig.length > 2 && !(copy !== 0 && orig[2] === "0px")) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method.\r
-                        pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)!\r
-                        pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here)\r
-                        pt.b = copy;\r
-                        pt.xs0 = pt.e = m1.zOrigin;\r
-                    } else {\r
-                        pt.xs0 = pt.e = orig;\r
-                    }\r
-\r
-                //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp).\r
-                } else {\r
-                    _parsePosition(orig + "", m1);\r
-                }\r
-            }\r
-\r
-            if (hasChange) {\r
-                cssp._transformType = (has3D || this._transformType === 3) ? 3 : 2; //quicker than calling cssp._enableTransforms();\r
-            }\r
-            return pt;\r
-        }, prefix:true});\r
-\r
-        _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"});\r
-\r
-        _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) {\r
-            e = this.format(e);\r
-            var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],\r
-                style = t.style,\r
-                ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em;\r
-            w = parseFloat(t.offsetWidth);\r
-            h = parseFloat(t.offsetHeight);\r
-            ea1 = e.split(" ");\r
-            for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis!\r
-                if (this.p.indexOf("border")) { //older browsers used a prefix\r
-                    props[i] = _checkPropPrefix(props[i]);\r
-                }\r
-                bs = bs2 = _getStyle(t, props[i], _cs, false, "0px");\r
-                if (bs.indexOf(" ") !== -1) {\r
-                    bs2 = bs.split(" ");\r
-                    bs = bs2[0];\r
-                    bs2 = bs2[1];\r
-                }\r
-                es = es2 = ea1[i];\r
-                bn = parseFloat(bs);\r
-                bsfx = bs.substr((bn + "").length);\r
-                rel = (es.charAt(1) === "=");\r
-                if (rel) {\r
-                    en = parseInt(es.charAt(0)+"1", 10);\r
-                    es = es.substr(2);\r
-                    en *= parseFloat(es);\r
-                    esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || "";\r
-                } else {\r
-                    en = parseFloat(es);\r
-                    esfx = es.substr((en + "").length);\r
-                }\r
-                if (esfx === "") {\r
-                    esfx = _suffixMap[p] || bsfx;\r
-                }\r
-                if (esfx !== bsfx) {\r
-                    hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent.\r
-                    vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number\r
-                    if (esfx === "%") {\r
-                        bs = (hn / w * 100) + "%";\r
-                        bs2 = (vn / h * 100) + "%";\r
-                    } else if (esfx === "em") {\r
-                        em = _convertToPixels(t, "borderLeft", 1, "em");\r
-                        bs = (hn / em) + "em";\r
-                        bs2 = (vn / em) + "em";\r
-                    } else {\r
-                        bs = hn + "px";\r
-                        bs2 = vn + "px";\r
-                    }\r
-                    if (rel) {\r
-                        es = (parseFloat(bs) + en) + esfx;\r
-                        es2 = (parseFloat(bs2) + en) + esfx;\r
-                    }\r
-                }\r
-                pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt);\r
-            }\r
-            return pt;\r
-        }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)});\r
-        _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) {\r
-            var bp = "background-position",\r
-                cs = (_cs || _getComputedStyle(t, null)),\r
-                bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase\r
-                es = this.format(e),\r
-                ba, ea, i, pct, overlap, src;\r
-            if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1)) {\r
-                src = _getStyle(t, "backgroundImage").replace(_urlExp, "");\r
-                if (src && src !== "none") {\r
-                    ba = bs.split(" ");\r
-                    ea = es.split(" ");\r
-                    _tempImg.setAttribute("src", src); //set the temp <img>'s src to the background-image so that we can measure its width/height\r
-                    i = 2;\r
-                    while (--i > -1) {\r
-                        bs = ba[i];\r
-                        pct = (bs.indexOf("%") !== -1);\r
-                        if (pct !== (ea[i].indexOf("%") !== -1)) {\r
-                            overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height;\r
-                            ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%";\r
-                        }\r
-                    }\r
-                    bs = ba.join(" ");\r
-                }\r
-            }\r
-            return this.parseComplex(t.style, bs, es, pt, plugin);\r
-        }, formatter:_parsePosition});\r
-        _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:_parsePosition});\r
-        _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true});\r
-        _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true});\r
-        _registerComplexSpecialProp("transformStyle", {prefix:true});\r
-        _registerComplexSpecialProp("backfaceVisibility", {prefix:true});\r
-        _registerComplexSpecialProp("userSelect", {prefix:true});\r
-        _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")});\r
-        _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")});\r
-        _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){\r
-            var b, cs, delim;\r
-            if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited.\r
-                cs = t.currentStyle;\r
-                delim = _ieVers < 8 ? " " : ",";\r
-                b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")";\r
-                e = this.format(e).split(",").join(delim);\r
-            } else {\r
-                b = this.format(_getStyle(t, this.p, _cs, false, this.dflt));\r
-                e = this.format(e);\r
-            }\r
-            return this.parseComplex(t.style, b, e, pt, plugin);\r
-        }});\r
-        _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true});\r
-        _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them)\r
-        _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) {\r
-                return this.parseComplex(t.style, this.format(_getStyle(t, "borderTopWidth", _cs, false, "0px") + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), this.format(e), pt, plugin);\r
-            }, color:true, formatter:function(v) {\r
-                var a = v.split(" ");\r
-                return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0];\r
-            }});\r
-        _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline).\r
-        _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) {\r
-            var s = t.style,\r
-                prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat";\r
-            return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e);\r
-        }});\r
-\r
-        //opacity-related\r
-        var _setIEOpacityRatio = function(v) {\r
-                var t = this.t, //refers to the element's style property\r
-                    filters = t.filter || _getStyle(this.data, "filter"),\r
-                    val = (this.s + this.c * v) | 0,\r
-                    skip;\r
-                if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters.\r
-                    if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) {\r
-                        t.removeAttribute("filter");\r
-                        skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check.\r
-                    } else {\r
-                        t.filter = filters.replace(_alphaFilterExp, "");\r
-                        skip = true;\r
-                    }\r
-                }\r
-                if (!skip) {\r
-                    if (this.xn1) {\r
-                        t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame.\r
-                    }\r
-                    if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues\r
-                        if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween)\r
-                            t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly.\r
-                        }\r
-                    } else {\r
-                        t.filter = filters.replace(_opacityExp, "opacity=" + val);\r
-                    }\r
-                }\r
-            };\r
-        _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) {\r
-            var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")),\r
-                style = t.style,\r
-                isAutoAlpha = (p === "autoAlpha");\r
-            if (typeof(e) === "string" && e.charAt(1) === "=") {\r
-                e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b;\r
-            }\r
-            if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience)\r
-                b = 0;\r
-            }\r
-            if (_supportsOpacity) {\r
-                pt = new CSSPropTween(style, "opacity", b, e - b, pt);\r
-            } else {\r
-                pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt);\r
-                pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug.\r
-                style.zoom = 1; //helps correct an IE issue.\r
-                pt.type = 2;\r
-                pt.b = "alpha(opacity=" + pt.s + ")";\r
-                pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")";\r
-                pt.data = t;\r
-                pt.plugin = plugin;\r
-                pt.setRatio = _setIEOpacityRatio;\r
-            }\r
-            if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier\r
-                pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit"));\r
-                pt.xs0 = "inherit";\r
-                cssp._overwriteProps.push(pt.n);\r
-                cssp._overwriteProps.push(p);\r
-            }\r
-            return pt;\r
-        }});\r
-\r
-\r
-        var _removeProp = function(s, p) {\r
-                if (p) {\r
-                    if (s.removeProperty) {\r
-                        if (p.substr(0,2) === "ms") { //Microsoft browsers don't conform to the standard of capping the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example)\r
-                            p = "M" + p.substr(1);\r
-                        }\r
-                        s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase());\r
-                    } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()"\r
-                        s.removeAttribute(p);\r
-                    }\r
-                }\r
-            },\r
-            _setClassNameRatio = function(v) {\r
-                this.t._gsClassPT = this;\r
-                if (v === 1 || v === 0) {\r
-                    this.t.setAttribute("class", (v === 0) ? this.b : this.e);\r
-                    var mpt = this.data, //first MiniPropTween\r
-                        s = this.t.style;\r
-                    while (mpt) {\r
-                        if (!mpt.v) {\r
-                            _removeProp(s, mpt.p);\r
-                        } else {\r
-                            s[mpt.p] = mpt.v;\r
-                        }\r
-                        mpt = mpt._next;\r
-                    }\r
-                    if (v === 1 && this.t._gsClassPT === this) {\r
-                        this.t._gsClassPT = null;\r
-                    }\r
-                } else if (this.t.getAttribute("class") !== this.e) {\r
-                    this.t.setAttribute("class", this.e);\r
-                }\r
-            };\r
-        _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) {\r
-            var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable.\r
-                cssText = t.style.cssText,\r
-                difData, bs, cnpt, cnptLookup, mpt;\r
-            pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2);\r
-            pt.setRatio = _setClassNameRatio;\r
-            pt.pr = -11;\r
-            _hasPriority = true;\r
-            pt.b = b;\r
-            bs = _getAllStyles(t, _cs);\r
-            //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values)\r
-            cnpt = t._gsClassPT;\r
-            if (cnpt) {\r
-                cnptLookup = {};\r
-                mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned.\r
-                while (mpt) {\r
-                    cnptLookup[mpt.p] = 1;\r
-                    mpt = mpt._next;\r
-                }\r
-                cnpt.setRatio(1);\r
-            }\r
-            t._gsClassPT = pt;\r
-            pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("\\s*\\b" + e.substr(2) + "\\b"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : "");\r
-            if (cssp._tween._duration) { //if it's a zero-duration tween, there's no need to tween anything or parse the data. In fact, if we switch classes temporarily (which we must do for proper parsing) and the class has a transition applied, it could cause a quick flash to the end state and back again initially in some browsers.\r
-                t.setAttribute("class", pt.e);\r
-                difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup);\r
-                t.setAttribute("class", b);\r
-                pt.data = difData.firstMPT;\r
-                t.style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity).\r
-                pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself)\r
-            }\r
-            return pt;\r
-        }});\r
-\r
-\r
-        var _setClearPropsRatio = function(v) {\r
-            if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in).\r
-                var s = this.t.style,\r
-                    transformParse = _specialProps.transform.parse,\r
-                    a, p, i, clearTransform;\r
-                if (this.e === "all") {\r
-                    s.cssText = "";\r
-                    clearTransform = true;\r
-                } else {\r
-                    a = this.e.split(",");\r
-                    i = a.length;\r
-                    while (--i > -1) {\r
-                        p = a[i];\r
-                        if (_specialProps[p]) {\r
-                            if (_specialProps[p].parse === transformParse) {\r
-                                clearTransform = true;\r
-                            } else {\r
-                                p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow"\r
-                            }\r
-                        }\r
-                        _removeProp(s, p);\r
-                    }\r
-                }\r
-                if (clearTransform) {\r
-                    _removeProp(s, _transformProp);\r
-                    if (this.t._gsTransform) {\r
-                        delete this.t._gsTransform;\r
-                    }\r
-                }\r
-\r
-            }\r
-        };\r
-        _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) {\r
-            pt = new CSSPropTween(t, p, 0, 0, pt, 2);\r
-            pt.setRatio = _setClearPropsRatio;\r
-            pt.e = e;\r
-            pt.pr = -10;\r
-            pt.data = cssp._tween;\r
-            _hasPriority = true;\r
-            return pt;\r
-        }});\r
-\r
-        p = "bezier,throwProps,physicsProps,physics2D".split(",");\r
-        i = p.length;\r
-        while (i--) {\r
-            _registerPluginProp(p[i]);\r
-        }\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-        p = CSSPlugin.prototype;\r
-        p._firstPT = null;\r
-\r
-        //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc.\r
-        p._onInitTween = function(target, vars, tween) {\r
-            if (!target.nodeType) { //css is only for dom elements\r
-                return false;\r
-            }\r
-            this._target = target;\r
-            this._tween = tween;\r
-            this._vars = vars;\r
-            _autoRound = vars.autoRound;\r
-            _hasPriority = false;\r
-            _suffixMap = vars.suffixMap || CSSPlugin.suffixMap;\r
-            _cs = _getComputedStyle(target, "");\r
-            _overwriteProps = this._overwriteProps;\r
-            var style = target.style,\r
-                v, pt, pt2, first, last, next, zIndex, tpt, threeD;\r
-            if (_reqSafariFix) if (style.zIndex === "") {\r
-                v = _getStyle(target, "zIndex", _cs);\r
-                if (v === "auto" || v === "") {\r
-                    //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive.\r
-                    this._addLazySet(style, "zIndex", 0);\r
-                }\r
-            }\r
-\r
-            if (typeof(vars) === "string") {\r
-                first = style.cssText;\r
-                v = _getAllStyles(target, _cs);\r
-                style.cssText = first + ";" + vars;\r
-                v = _cssDif(target, v, _getAllStyles(target)).difs;\r
-                if (!_supportsOpacity && _opacityValExp.test(vars)) {\r
-                    v.opacity = parseFloat( RegExp.$1 );\r
-                }\r
-                vars = v;\r
-                style.cssText = first;\r
-            }\r
-            this._firstPT = pt = this.parse(target, vars, null);\r
-\r
-            if (this._transformType) {\r
-                threeD = (this._transformType === 3);\r
-                if (!_transformProp) {\r
-                    style.zoom = 1; //helps correct an IE issue.\r
-                } else if (_isSafari) {\r
-                    _reqSafariFix = true;\r
-                    //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random).\r
-                    if (style.zIndex === "") {\r
-                        zIndex = _getStyle(target, "zIndex", _cs);\r
-                        if (zIndex === "auto" || zIndex === "") {\r
-                            this._addLazySet(style, "zIndex", 0);\r
-                        }\r
-                    }\r
-                    //Setting WebkitBackfaceVisibility corrects 3 bugs:\r
-                    // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update.\r
-                    // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly.\r
-                    // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug.\r
-                    //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween.\r
-                    if (_isSafariLT6) {\r
-                        this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden"));\r
-                    }\r
-                }\r
-                pt2 = pt;\r
-                while (pt2 && pt2._next) {\r
-                    pt2 = pt2._next;\r
-                }\r
-                tpt = new CSSPropTween(target, "transform", 0, 0, null, 2);\r
-                this._linkCSSP(tpt, null, pt2);\r
-                tpt.setRatio = (threeD && _supports3D) ? _set3DTransformRatio : _transformProp ? _set2DTransformRatio : _setIETransformRatio;\r
-                tpt.data = this._transform || _getTransform(target, _cs, true);\r
-                _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here.\r
-            }\r
-\r
-            if (_hasPriority) {\r
-                //reorders the linked list in order of pr (priority)\r
-                while (pt) {\r
-                    next = pt._next;\r
-                    pt2 = first;\r
-                    while (pt2 && pt2.pr > pt.pr) {\r
-                        pt2 = pt2._next;\r
-                    }\r
-                    if ((pt._prev = pt2 ? pt2._prev : last)) {\r
-                        pt._prev._next = pt;\r
-                    } else {\r
-                        first = pt;\r
-                    }\r
-                    if ((pt._next = pt2)) {\r
-                        pt2._prev = pt;\r
-                    } else {\r
-                        last = pt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-                this._firstPT = first;\r
-            }\r
-            return true;\r
-        };\r
-\r
-\r
-        p.parse = function(target, vars, pt, plugin) {\r
-            var style = target.style,\r
-                p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel;\r
-            for (p in vars) {\r
-                es = vars[p]; //ending value string\r
-                sp = _specialProps[p]; //SpecialProp lookup.\r
-                if (sp) {\r
-                    pt = sp.parse(target, es, p, this, pt, plugin, vars);\r
-\r
-                } else {\r
-                    bs = _getStyle(target, p, _cs) + "";\r
-                    isStr = (typeof(es) === "string");\r
-                    if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor:\r
-                        if (!isStr) {\r
-                            es = _parseColor(es);\r
-                            es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")";\r
-                        }\r
-                        pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin);\r
-\r
-                    } else if (isStr && (es.indexOf(" ") !== -1 || es.indexOf(",") !== -1)) {\r
-                        pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin);\r
-\r
-                    } else {\r
-                        bn = parseFloat(bs);\r
-                        bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case.\r
-\r
-                        if (bs === "" || bs === "auto") {\r
-                            if (p === "width" || p === "height") {\r
-                                bn = _getDimension(target, p, _cs);\r
-                                bsfx = "px";\r
-                            } else if (p === "left" || p === "top") {\r
-                                bn = _calculateOffset(target, p, _cs);\r
-                                bsfx = "px";\r
-                            } else {\r
-                                bn = (p !== "opacity") ? 0 : 1;\r
-                                bsfx = "";\r
-                            }\r
-                        }\r
-\r
-                        rel = (isStr && es.charAt(1) === "=");\r
-                        if (rel) {\r
-                            en = parseInt(es.charAt(0) + "1", 10);\r
-                            es = es.substr(2);\r
-                            en *= parseFloat(es);\r
-                            esfx = es.replace(_suffixExp, "");\r
-                        } else {\r
-                            en = parseFloat(es);\r
-                            esfx = isStr ? es.substr((en + "").length) || "" : "";\r
-                        }\r
-\r
-                        if (esfx === "") {\r
-                            esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix.\r
-                        }\r
-\r
-                        es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix.\r
-\r
-                        //if the beginning/ending suffixes don't match, normalize them...\r
-                        if (bsfx !== esfx) if (esfx !== "") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units!\r
-                            bn = _convertToPixels(target, p, bn, bsfx);\r
-                            if (esfx === "%") {\r
-                                bn /= _convertToPixels(target, p, 100, "%") / 100;\r
-                                if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens.\r
-                                    bs = bn + "%";\r
-                                }\r
-\r
-                            } else if (esfx === "em") {\r
-                                bn /= _convertToPixels(target, p, 1, "em");\r
-\r
-                            //otherwise convert to pixels.\r
-                            } else if (esfx !== "px") {\r
-                                en = _convertToPixels(target, p, en, esfx);\r
-                                esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too.\r
-                            }\r
-                            if (rel) if (en || en === 0) {\r
-                                es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here.\r
-                            }\r
-                        }\r
-\r
-                        if (rel) {\r
-                            en += bn;\r
-                        }\r
-\r
-                        if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly.\r
-                            pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es);\r
-                            pt.xs0 = esfx;\r
-                            //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0);\r
-                        } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) {\r
-                            _log("invalid " + p + " tween value: " + vars[p]);\r
-                        } else {\r
-                            pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es);\r
-                            pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween.\r
-                            //DEBUG: _log("non-tweening value "+p+": "+pt.xs0);\r
-                        }\r
-                    }\r
-                }\r
-                if (plugin) if (pt && !pt.plugin) {\r
-                    pt.plugin = plugin;\r
-                }\r
-            }\r
-            return pt;\r
-        };\r
-\r
-\r
-        //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1.\r
-        p.setRatio = function(v) {\r
-            var pt = this._firstPT,\r
-                min = 0.000001,\r
-                val, str, i;\r
-\r
-            //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards).\r
-            if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) {\r
-                while (pt) {\r
-                    if (pt.type !== 2) {\r
-                        pt.t[pt.p] = pt.e;\r
-                    } else {\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-\r
-            } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) {\r
-                while (pt) {\r
-                    val = pt.c * v + pt.s;\r
-                    if (pt.r) {\r
-                        val = Math.round(val);\r
-                    } else if (val < min) if (val > -min) {\r
-                        val = 0;\r
-                    }\r
-                    if (!pt.type) {\r
-                        pt.t[pt.p] = val + pt.xs0;\r
-                    } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)"\r
-                        i = pt.l;\r
-                        if (i === 2) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2;\r
-                        } else if (i === 3) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3;\r
-                        } else if (i === 4) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4;\r
-                        } else if (i === 5) {\r
-                            pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5;\r
-                        } else {\r
-                            str = pt.xs0 + val + pt.xs1;\r
-                            for (i = 1; i < pt.l; i++) {\r
-                                str += pt["xn"+i] + pt["xs"+(i+1)];\r
-                            }\r
-                            pt.t[pt.p] = str;\r
-                        }\r
-\r
-                    } else if (pt.type === -1) { //non-tweening value\r
-                        pt.t[pt.p] = pt.xs0;\r
-\r
-                    } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc.\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-\r
-            //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever).\r
-            } else {\r
-                while (pt) {\r
-                    if (pt.type !== 2) {\r
-                        pt.t[pt.p] = pt.b;\r
-                    } else {\r
-                        pt.setRatio(v);\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-        };\r
-\r
-        /**\r
-         * @private\r
-         * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called.\r
-         * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked\r
-         * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call\r
-         * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin\r
-         * doesn't have any transform-related properties of its own. You can call this method as many times as you\r
-         * want and it won't create duplicate CSSPropTweens.\r
-         *\r
-         * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster)\r
-         */\r
-        p._enableTransforms = function(threeD) {\r
-            this._transformType = (threeD || this._transformType === 3) ? 3 : 2;\r
-            this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values.\r
-        };\r
-\r
-        var lazySet = function(v) {\r
-            this.t[this.p] = this.e;\r
-            this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop.\r
-        };\r
-        /** @private Gives us a way to set a value on the first render (and only the first render). **/\r
-        p._addLazySet = function(t, p, v) {\r
-            var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2);\r
-            pt.e = v;\r
-            pt.setRatio = lazySet;\r
-            pt.data = this;\r
-        };\r
-\r
-        /** @private **/\r
-        p._linkCSSP = function(pt, next, prev, remove) {\r
-            if (pt) {\r
-                if (next) {\r
-                    next._prev = pt;\r
-                }\r
-                if (pt._next) {\r
-                    pt._next._prev = pt._prev;\r
-                }\r
-                if (pt._prev) {\r
-                    pt._prev._next = pt._next;\r
-                } else if (this._firstPT === pt) {\r
-                    this._firstPT = pt._next;\r
-                    remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed)\r
-                }\r
-                if (prev) {\r
-                    prev._next = pt;\r
-                } else if (!remove && this._firstPT === null) {\r
-                    this._firstPT = pt;\r
-                }\r
-                pt._next = next;\r
-                pt._prev = prev;\r
-            }\r
-            return pt;\r
-        };\r
-\r
-        //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property.\r
-        p._kill = function(lookup) {\r
-            var copy = lookup,\r
-                pt, p, xfirst;\r
-            if (lookup.autoAlpha || lookup.alpha) {\r
-                copy = {};\r
-                for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere.\r
-                    copy[p] = lookup[p];\r
-                }\r
-                copy.opacity = 1;\r
-                if (copy.autoAlpha) {\r
-                    copy.visibility = 1;\r
-                }\r
-            }\r
-            if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst".\r
-                xfirst = pt.xfirst;\r
-                if (xfirst && xfirst._prev) {\r
-                    this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev\r
-                } else if (xfirst === this._firstPT) {\r
-                    this._firstPT = pt._next;\r
-                }\r
-                if (pt._next) {\r
-                    this._linkCSSP(pt._next, pt._next._next, xfirst._prev);\r
-                }\r
-                this._classNamePT = null;\r
-            }\r
-            return TweenPlugin.prototype._kill.call(this, copy);\r
-        };\r
-\r
-\r
-\r
-        //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison.\r
-        var _getChildStyles = function(e, props, targets) {\r
-                var children, i, child, type;\r
-                if (e.slice) {\r
-                    i = e.length;\r
-                    while (--i > -1) {\r
-                        _getChildStyles(e[i], props, targets);\r
-                    }\r
-                    return;\r
-                }\r
-                children = e.childNodes;\r
-                i = children.length;\r
-                while (--i > -1) {\r
-                    child = children[i];\r
-                    type = child.type;\r
-                    if (child.style) {\r
-                        props.push(_getAllStyles(child));\r
-                        if (targets) {\r
-                            targets.push(child);\r
-                        }\r
-                    }\r
-                    if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) {\r
-                        _getChildStyles(child, props, targets);\r
-                    }\r
-                }\r
-            };\r
-\r
-        /**\r
-         * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite\r
-         * and then compares the style properties of all the target's child elements at the tween's start and end, and\r
-         * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting\r
-         * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is\r
-         * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens\r
-         * is because it creates entirely new tweens that may have completely different targets than the original tween,\r
-         * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API\r
-         * and it would create other problems. For example:\r
-         *  - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted)\r
-         *  - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others.\r
-         *  - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed.\r
-         *\r
-         * @param {Object} target object to be tweened\r
-         * @param {number} Duration in seconds (or frames for frames-based tweens)\r
-         * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone}\r
-         * @return {Array} An array of TweenLite instances\r
-         */\r
-        CSSPlugin.cascadeTo = function(target, duration, vars) {\r
-            var tween = TweenLite.to(target, duration, vars),\r
-                results = [tween],\r
-                b = [],\r
-                e = [],\r
-                targets = [],\r
-                _reservedProps = TweenLite._internals.reservedProps,\r
-                i, difs, p;\r
-            target = tween._targets || tween.target;\r
-            _getChildStyles(target, b, targets);\r
-            tween.render(duration, true);\r
-            _getChildStyles(target, e);\r
-            tween.render(0, true);\r
-            tween._enabled(true);\r
-            i = targets.length;\r
-            while (--i > -1) {\r
-                difs = _cssDif(targets[i], b[i], e[i]);\r
-                if (difs.firstMPT) {\r
-                    difs = difs.difs;\r
-                    for (p in vars) {\r
-                        if (_reservedProps[p]) {\r
-                            difs[p] = vars[p];\r
-                        }\r
-                    }\r
-                    results.push( TweenLite.to(targets[i], duration, difs) );\r
-                }\r
-            }\r
-            return results;\r
-        };\r
-\r
-        TweenPlugin.activate([CSSPlugin]);\r
-        return CSSPlugin;\r
-\r
-    }, true);\r
-\r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * RoundPropsPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    (function() {\r
-\r
-        var RoundPropsPlugin = window._gsDefine.plugin({\r
-                propName: "roundProps",\r
-                priority: -1,\r
-                API: 2,\r
-\r
-                //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-                init: function(target, value, tween) {\r
-                    this._tween = tween;\r
-                    return true;\r
-                }\r
-\r
-            }),\r
-            p = RoundPropsPlugin.prototype;\r
-\r
-        p._onInitAllProps = function() {\r
-            var tween = this._tween,\r
-                rp = (tween.vars.roundProps instanceof Array) ? tween.vars.roundProps : tween.vars.roundProps.split(","),\r
-                i = rp.length,\r
-                lookup = {},\r
-                rpt = tween._propLookup.roundProps,\r
-                prop, pt, next;\r
-            while (--i > -1) {\r
-                lookup[rp[i]] = 1;\r
-            }\r
-            i = rp.length;\r
-            while (--i > -1) {\r
-                prop = rp[i];\r
-                pt = tween._firstPT;\r
-                while (pt) {\r
-                    next = pt._next; //record here, because it may get removed\r
-                    if (pt.pg) {\r
-                        pt.t._roundProps(lookup, true);\r
-                    } else if (pt.n === prop) {\r
-                        this._add(pt.t, prop, pt.s, pt.c);\r
-                        //remove from linked list\r
-                        if (next) {\r
-                            next._prev = pt._prev;\r
-                        }\r
-                        if (pt._prev) {\r
-                            pt._prev._next = next;\r
-                        } else if (tween._firstPT === pt) {\r
-                            tween._firstPT = next;\r
-                        }\r
-                        pt._next = pt._prev = null;\r
-                        tween._propLookup[prop] = rpt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p._add = function(target, p, s, c) {\r
-            this._addTween(target, p, s, s + c, p, true);\r
-            this._overwriteProps.push(p);\r
-        };\r
-\r
-    }());\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * AttrPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine.plugin({\r
-        propName: "attr",\r
-        API: 2,\r
-        version: "0.3.2",\r
-\r
-        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-        init: function(target, value, tween) {\r
-            var p, start, end;\r
-            if (typeof(target.setAttribute) !== "function") {\r
-                return false;\r
-            }\r
-            this._target = target;\r
-            this._proxy = {};\r
-            this._start = {}; // we record start and end values exactly as they are in case they're strings (not numbers) - we need to be able to revert to them cleanly.\r
-            this._end = {};\r
-            for (p in value) {\r
-                this._start[p] = this._proxy[p] = start = target.getAttribute(p);\r
-                end = this._addTween(this._proxy, p, parseFloat(start), value[p], p);\r
-                this._end[p] = end ? end.s + end.c : value[p];\r
-                this._overwriteProps.push(p);\r
-            }\r
-            return true;\r
-        },\r
-\r
-        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-        set: function(ratio) {\r
-            this._super.setRatio.call(this, ratio);\r
-            var props = this._overwriteProps,\r
-                i = props.length,\r
-                lookup = (ratio === 1) ? this._end : ratio ? this._proxy : this._start,\r
-                p;\r
-            while (--i > -1) {\r
-                p = props[i];\r
-                this._target.setAttribute(p, lookup[p] + "");\r
-            }\r
-        }\r
-\r
-    });\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * DirectionalRotationPlugin\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine.plugin({\r
-        propName: "directionalRotation",\r
-        API: 2,\r
-        version: "0.2.0",\r
-\r
-        //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run.\r
-        init: function(target, value, tween) {\r
-            if (typeof(value) !== "object") {\r
-                value = {rotation:value};\r
-            }\r
-            this.finals = {};\r
-            var cap = (value.useRadians === true) ? Math.PI * 2 : 360,\r
-                min = 0.000001,\r
-                p, v, start, end, dif, split;\r
-            for (p in value) {\r
-                if (p !== "useRadians") {\r
-                    split = (value[p] + "").split("_");\r
-                    v = split[0];\r
-                    start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() );\r
-                    end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0;\r
-                    dif = end - start;\r
-                    if (split.length) {\r
-                        v = split.join("_");\r
-                        if (v.indexOf("short") !== -1) {\r
-                            dif = dif % cap;\r
-                            if (dif !== dif % (cap / 2)) {\r
-                                dif = (dif < 0) ? dif + cap : dif - cap;\r
-                            }\r
-                        }\r
-                        if (v.indexOf("_cw") !== -1 && dif < 0) {\r
-                            dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        } else if (v.indexOf("ccw") !== -1 && dif > 0) {\r
-                            dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap;\r
-                        }\r
-                    }\r
-                    if (dif > min || dif < -min) {\r
-                        this._addTween(target, p, start, start + dif, p);\r
-                        this._overwriteProps.push(p);\r
-                    }\r
-                }\r
-            }\r
-            return true;\r
-        },\r
-\r
-        //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.)\r
-        set: function(ratio) {\r
-            var pt;\r
-            if (ratio !== 1) {\r
-                this._super.setRatio.call(this, ratio);\r
-            } else {\r
-                pt = this._firstPT;\r
-                while (pt) {\r
-                    if (pt.f) {\r
-                        pt.t[pt.p](this.finals[pt.p]);\r
-                    } else {\r
-                        pt.t[pt.p] = this.finals[pt.p];\r
-                    }\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-        }\r
-\r
-    })._autoCSS = true;\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-    \r
-    \r
-    \r
-    \r
-/*\r
- * ----------------------------------------------------------------\r
- * EasePack\r
- * ----------------------------------------------------------------\r
- */\r
-    window._gsDefine("easing.Back", ["easing.Ease"], function(Ease) {\r
-        \r
-        var w = (window.GreenSockGlobals || window),\r
-            gs = w.com.greensock,\r
-            _2PI = Math.PI * 2,\r
-            _HALF_PI = Math.PI / 2,\r
-            _class = gs._class,\r
-            _create = function(n, f) {\r
-                var C = _class("easing." + n, function(){}, true),\r
-                    p = C.prototype = new Ease();\r
-                p.constructor = C;\r
-                p.getRatio = f;\r
-                return C;\r
-            },\r
-            _easeReg = Ease.register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist.\r
-            _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) {\r
-                var C = _class("easing."+name, {\r
-                    easeOut:new EaseOut(),\r
-                    easeIn:new EaseIn(),\r
-                    easeInOut:new EaseInOut()\r
-                }, true);\r
-                _easeReg(C, name);\r
-                return C;\r
-            },\r
-            EasePoint = function(time, value, next) {\r
-                this.t = time;\r
-                this.v = value;\r
-                if (next) {\r
-                    this.next = next;\r
-                    next.prev = this;\r
-                    this.c = next.v - value;\r
-                    this.gap = next.t - time;\r
-                }\r
-            },\r
-\r
-            //Back\r
-            _createBack = function(n, f) {\r
-                var C = _class("easing." + n, function(overshoot) {\r
-                        this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158;\r
-                        this._p2 = this._p1 * 1.525;\r
-                    }, true),\r
-                    p = C.prototype = new Ease();\r
-                p.constructor = C;\r
-                p.getRatio = f;\r
-                p.config = function(overshoot) {\r
-                    return new C(overshoot);\r
-                };\r
-                return C;\r
-            },\r
-\r
-            Back = _wrap("Back",\r
-                _createBack("BackOut", function(p) {\r
-                    return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1);\r
-                }),\r
-                _createBack("BackIn", function(p) {\r
-                    return p * p * ((this._p1 + 1) * p - this._p1);\r
-                }),\r
-                _createBack("BackInOut", function(p) {\r
-                    return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2);\r
-                })\r
-            ),\r
-\r
-\r
-            //SlowMo\r
-            SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) {\r
-                power = (power || power === 0) ? power : 0.7;\r
-                if (linearRatio == null) {\r
-                    linearRatio = 0.7;\r
-                } else if (linearRatio > 1) {\r
-                    linearRatio = 1;\r
-                }\r
-                this._p = (linearRatio !== 1) ? power : 0;\r
-                this._p1 = (1 - linearRatio) / 2;\r
-                this._p2 = linearRatio;\r
-                this._p3 = this._p1 + this._p2;\r
-                this._calcEnd = (yoyoMode === true);\r
-            }, true),\r
-            p = SlowMo.prototype = new Ease(),\r
-            SteppedEase, RoughEase, _createElastic;\r
-\r
-        p.constructor = SlowMo;\r
-        p.getRatio = function(p) {\r
-            var r = p + (0.5 - p) * this._p;\r
-            if (p < this._p1) {\r
-                return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r);\r
-            } else if (p > this._p3) {\r
-                return this._calcEnd ? 1 - (p = (p - this._p3) / this._p1) * p : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p);\r
-            }\r
-            return this._calcEnd ? 1 : r;\r
-        };\r
-        SlowMo.ease = new SlowMo(0.7, 0.7);\r
-\r
-        p.config = SlowMo.config = function(linearRatio, power, yoyoMode) {\r
-            return new SlowMo(linearRatio, power, yoyoMode);\r
-        };\r
-\r
-\r
-        //SteppedEase\r
-        SteppedEase = _class("easing.SteppedEase", function(steps) {\r
-                steps = steps || 1;\r
-                this._p1 = 1 / steps;\r
-                this._p2 = steps + 1;\r
-            }, true);\r
-        p = SteppedEase.prototype = new Ease();\r
-        p.constructor = SteppedEase;\r
-        p.getRatio = function(p) {\r
-            if (p < 0) {\r
-                p = 0;\r
-            } else if (p >= 1) {\r
-                p = 0.999999999;\r
-            }\r
-            return ((this._p2 * p) >> 0) * this._p1;\r
-        };\r
-        p.config = SteppedEase.config = function(steps) {\r
-            return new SteppedEase(steps);\r
-        };\r
-\r
-\r
-        //RoughEase\r
-        RoughEase = _class("easing.RoughEase", function(vars) {\r
-            vars = vars || {};\r
-            var taper = vars.taper || "none",\r
-                a = [],\r
-                cnt = 0,\r
-                points = (vars.points || 20) | 0,\r
-                i = points,\r
-                randomize = (vars.randomize !== false),\r
-                clamp = (vars.clamp === true),\r
-                template = (vars.template instanceof Ease) ? vars.template : null,\r
-                strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4,\r
-                x, y, bump, invX, obj, pnt;\r
-            while (--i > -1) {\r
-                x = randomize ? Math.random() : (1 / points) * i;\r
-                y = template ? template.getRatio(x) : x;\r
-                if (taper === "none") {\r
-                    bump = strength;\r
-                } else if (taper === "out") {\r
-                    invX = 1 - x;\r
-                    bump = invX * invX * strength;\r
-                } else if (taper === "in") {\r
-                    bump = x * x * strength;\r
-                } else if (x < 0.5) {  //"both" (start)\r
-                    invX = x * 2;\r
-                    bump = invX * invX * 0.5 * strength;\r
-                } else {                //"both" (end)\r
-                    invX = (1 - x) * 2;\r
-                    bump = invX * invX * 0.5 * strength;\r
-                }\r
-                if (randomize) {\r
-                    y += (Math.random() * bump) - (bump * 0.5);\r
-                } else if (i % 2) {\r
-                    y += bump * 0.5;\r
-                } else {\r
-                    y -= bump * 0.5;\r
-                }\r
-                if (clamp) {\r
-                    if (y > 1) {\r
-                        y = 1;\r
-                    } else if (y < 0) {\r
-                        y = 0;\r
-                    }\r
-                }\r
-                a[cnt++] = {x:x, y:y};\r
-            }\r
-            a.sort(function(a, b) {\r
-                return a.x - b.x;\r
-            });\r
-\r
-            pnt = new EasePoint(1, 1, null);\r
-            i = points;\r
-            while (--i > -1) {\r
-                obj = a[i];\r
-                pnt = new EasePoint(obj.x, obj.y, pnt);\r
-            }\r
-\r
-            this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next);\r
-        }, true);\r
-        p = RoughEase.prototype = new Ease();\r
-        p.constructor = RoughEase;\r
-        p.getRatio = function(p) {\r
-            var pnt = this._prev;\r
-            if (p > pnt.t) {\r
-                while (pnt.next && p >= pnt.t) {\r
-                    pnt = pnt.next;\r
-                }\r
-                pnt = pnt.prev;\r
-            } else {\r
-                while (pnt.prev && p <= pnt.t) {\r
-                    pnt = pnt.prev;\r
-                }\r
-            }\r
-            this._prev = pnt;\r
-            return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c);\r
-        };\r
-        p.config = function(vars) {\r
-            return new RoughEase(vars);\r
-        };\r
-        RoughEase.ease = new RoughEase();\r
-\r
-\r
-        //Bounce\r
-        _wrap("Bounce",\r
-            _create("BounceOut", function(p) {\r
-                if (p < 1 / 2.75) {\r
-                    return 7.5625 * p * p;\r
-                } else if (p < 2 / 2.75) {\r
-                    return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;\r
-                } else if (p < 2.5 / 2.75) {\r
-                    return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;\r
-                }\r
-                return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;\r
-            }),\r
-            _create("BounceIn", function(p) {\r
-                if ((p = 1 - p) < 1 / 2.75) {\r
-                    return 1 - (7.5625 * p * p);\r
-                } else if (p < 2 / 2.75) {\r
-                    return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75);\r
-                } else if (p < 2.5 / 2.75) {\r
-                    return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375);\r
-                }\r
-                return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375);\r
-            }),\r
-            _create("BounceInOut", function(p) {\r
-                var invert = (p < 0.5);\r
-                if (invert) {\r
-                    p = 1 - (p * 2);\r
-                } else {\r
-                    p = (p * 2) - 1;\r
-                }\r
-                if (p < 1 / 2.75) {\r
-                    p = 7.5625 * p * p;\r
-                } else if (p < 2 / 2.75) {\r
-                    p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75;\r
-                } else if (p < 2.5 / 2.75) {\r
-                    p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375;\r
-                } else {\r
-                    p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375;\r
-                }\r
-                return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5;\r
-            })\r
-        );\r
-\r
-\r
-        //CIRC\r
-        _wrap("Circ",\r
-            _create("CircOut", function(p) {\r
-                return Math.sqrt(1 - (p = p - 1) * p);\r
-            }),\r
-            _create("CircIn", function(p) {\r
-                return -(Math.sqrt(1 - (p * p)) - 1);\r
-            }),\r
-            _create("CircInOut", function(p) {\r
-                return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1);\r
-            })\r
-        );\r
-\r
-\r
-        //Elastic\r
-        _createElastic = function(n, f, def) {\r
-            var C = _class("easing." + n, function(amplitude, period) {\r
-                    this._p1 = amplitude || 1;\r
-                    this._p2 = period || def;\r
-                    this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0);\r
-                }, true),\r
-                p = C.prototype = new Ease();\r
-            p.constructor = C;\r
-            p.getRatio = f;\r
-            p.config = function(amplitude, period) {\r
-                return new C(amplitude, period);\r
-            };\r
-            return C;\r
-        };\r
-        _wrap("Elastic",\r
-            _createElastic("ElasticOut", function(p) {\r
-                return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * _2PI / this._p2 ) + 1;\r
-            }, 0.3),\r
-            _createElastic("ElasticIn", function(p) {\r
-                return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ));\r
-            }, 0.3),\r
-            _createElastic("ElasticInOut", function(p) {\r
-                return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * _2PI / this._p2 ) *0.5 + 1;\r
-            }, 0.45)\r
-        );\r
-\r
-\r
-        //Expo\r
-        _wrap("Expo",\r
-            _create("ExpoOut", function(p) {\r
-                return 1 - Math.pow(2, -10 * p);\r
-            }),\r
-            _create("ExpoIn", function(p) {\r
-                return Math.pow(2, 10 * (p - 1)) - 0.001;\r
-            }),\r
-            _create("ExpoInOut", function(p) {\r
-                return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));\r
-            })\r
-        );\r
-\r
-\r
-        //Sine\r
-        _wrap("Sine",\r
-            _create("SineOut", function(p) {\r
-                return Math.sin(p * _HALF_PI);\r
-            }),\r
-            _create("SineIn", function(p) {\r
-                return -Math.cos(p * _HALF_PI) + 1;\r
-            }),\r
-            _create("SineInOut", function(p) {\r
-                return -0.5 * (Math.cos(Math.PI * p) - 1);\r
-            })\r
-        );\r
-\r
-        _class("easing.EaseLookup", {\r
-                find:function(s) {\r
-                    return Ease.map[s];\r
-                }\r
-            }, true);\r
-\r
-        //register the non-standard eases\r
-        _easeReg(w.SlowMo, "SlowMo", "ease,");\r
-        _easeReg(RoughEase, "RoughEase", "ease,");\r
-        _easeReg(SteppedEase, "SteppedEase", "ease,");\r
-\r
-        return Back;\r
-        \r
-    }, true);\r
-\r
-\r
-}); \r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Base classes like TweenLite, SimpleTimeline, Ease, Ticker, etc.\r
- * ----------------------------------------------------------------\r
- */\r
-(function(window) {\r
-\r
-        "use strict";\r
-        var _globals = window.GreenSockGlobals || window;\r
-        if (_globals.TweenLite) {\r
-            return; //in case the core set of classes is already loaded, don't instantiate twice.\r
-        }\r
-        var _namespace = function(ns) {\r
-                var a = ns.split("."),\r
-                    p = _globals, i;\r
-                for (i = 0; i < a.length; i++) {\r
-                    p[a[i]] = p = p[a[i]] || {};\r
-                }\r
-                return p;\r
-            },\r
-            gs = _namespace("com.greensock"),\r
-            _tinyNum = 0.0000000001,\r
-            _slice = [].slice,\r
-            _emptyFunc = function() {},\r
-            _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower)\r
-                var toString = Object.prototype.toString,\r
-                    array = toString.call([]);\r
-                return function(obj) {\r
-                    return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array));\r
-                };\r
-            }()),\r
-            a, i, p, _ticker, _tickerActive,\r
-            _defLookup = {},\r
-\r
-            /**\r
-             * @constructor\r
-             * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition.\r
-             * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is\r
-             * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin\r
-             * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally.\r
-             *\r
-             * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found,\r
-             * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere,\r
-             * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so\r
-             * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything\r
-             * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock\r
-             * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could\r
-             * sandbox the banner one like:\r
-             *\r
-             * <script>\r
-             *     var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever.\r
-             * </script>\r
-             * <script src="js/greensock/v1.7/TweenMax.js"></script>\r
-             * <script>\r
-             *     window.GreenSockGlobals = null; //reset it back to null so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...)\r
-             * </script>\r
-             * <script src="js/greensock/v1.6/TweenMax.js"></script>\r
-             * <script>\r
-             *     gs.TweenLite.to(...); //would use v1.7\r
-             *     TweenLite.to(...); //would use v1.6\r
-             * </script>\r
-             *\r
-             * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back".\r
-             * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"]\r
-             * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition.\r
-             * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object)\r
-             */\r
-            Definition = function(ns, dependencies, func, global) {\r
-                this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses\r
-                _defLookup[ns] = this;\r
-                this.gsClass = null;\r
-                this.func = func;\r
-                var _classes = [];\r
-                this.check = function(init) {\r
-                    var i = dependencies.length,\r
-                        missing = i,\r
-                        cur, a, n, cl;\r
-                    while (--i > -1) {\r
-                        if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) {\r
-                            _classes[i] = cur.gsClass;\r
-                            missing--;\r
-                        } else if (init) {\r
-                            cur.sc.push(this);\r
-                        }\r
-                    }\r
-                    if (missing === 0 && func) {\r
-                        a = ("com.greensock." + ns).split(".");\r
-                        n = a.pop();\r
-                        cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes);\r
-\r
-                        //exports to multiple environments\r
-                        if (global) {\r
-                            _globals[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.)\r
-                            if (typeof(define) === "function" && define.amd){ //AMD\r
-                                define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").join("/"), [], function() { return cl; });\r
-                            } else if (typeof(module) !== "undefined" && module.exports){ //node\r
-                                module.exports = cl;\r
-                            }\r
-                        }\r
-                        for (i = 0; i < this.sc.length; i++) {\r
-                            this.sc[i].check();\r
-                        }\r
-                    }\r
-                };\r
-                this.check(true);\r
-            },\r
-\r
-            //used to create Definition instances (which basically registers a class that has dependencies).\r
-            _gsDefine = window._gsDefine = function(ns, dependencies, func, global) {\r
-                return new Definition(ns, dependencies, func, global);\r
-            },\r
-\r
-            //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class).\r
-            _class = gs._class = function(ns, func, global) {\r
-                func = func || function() {};\r
-                _gsDefine(ns, [], function(){ return func; }, global);\r
-                return func;\r
-            };\r
-\r
-        _gsDefine.globals = _globals;\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Ease\r
- * ----------------------------------------------------------------\r
- */\r
-        var _baseParams = [0, 0, 1, 1],\r
-            _blankArray = [],\r
-            Ease = _class("easing.Ease", function(func, extraParams, type, power) {\r
-                this._func = func;\r
-                this._type = type || 0;\r
-                this._power = power || 0;\r
-                this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams;\r
-            }, true),\r
-            _easeMap = Ease.map = {},\r
-            _easeReg = Ease.register = function(ease, names, types, create) {\r
-                var na = names.split(","),\r
-                    i = na.length,\r
-                    ta = (types || "easeIn,easeOut,easeInOut").split(","),\r
-                    e, name, j, type;\r
-                while (--i > -1) {\r
-                    name = na[i];\r
-                    e = create ? _class("easing."+name, null, true) : gs.easing[name] || {};\r
-                    j = ta.length;\r
-                    while (--j > -1) {\r
-                        type = ta[j];\r
-                        _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease();\r
-                    }\r
-                }\r
-            };\r
-\r
-        p = Ease.prototype;\r
-        p._calcEnd = false;\r
-        p.getRatio = function(p) {\r
-            if (this._func) {\r
-                this._params[0] = p;\r
-                return this._func.apply(null, this._params);\r
-            }\r
-            var t = this._type,\r
-                pw = this._power,\r
-                r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2;\r
-            if (pw === 1) {\r
-                r *= r;\r
-            } else if (pw === 2) {\r
-                r *= r * r;\r
-            } else if (pw === 3) {\r
-                r *= r * r * r;\r
-            } else if (pw === 4) {\r
-                r *= r * r * r * r;\r
-            }\r
-            return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2);\r
-        };\r
-\r
-        //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut)\r
-        a = ["Linear","Quad","Cubic","Quart","Quint,Strong"];\r
-        i = a.length;\r
-        while (--i > -1) {\r
-            p = a[i]+",Power"+i;\r
-            _easeReg(new Ease(null,null,1,i), p, "easeOut", true);\r
-            _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : ""));\r
-            _easeReg(new Ease(null,null,3,i), p, "easeInOut");\r
-        }\r
-        _easeMap.linear = gs.easing.Linear.easeIn;\r
-        _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * EventDispatcher\r
- * ----------------------------------------------------------------\r
- */\r
-        var EventDispatcher = _class("events.EventDispatcher", function(target) {\r
-            this._listeners = {};\r
-            this._eventTarget = target || this;\r
-        });\r
-        p = EventDispatcher.prototype;\r
-\r
-        p.addEventListener = function(type, callback, scope, useParam, priority) {\r
-            priority = priority || 0;\r
-            var list = this._listeners[type],\r
-                index = 0,\r
-                listener, i;\r
-            if (list == null) {\r
-                this._listeners[type] = list = [];\r
-            }\r
-            i = list.length;\r
-            while (--i > -1) {\r
-                listener = list[i];\r
-                if (listener.c === callback && listener.s === scope) {\r
-                    list.splice(i, 1);\r
-                } else if (index === 0 && listener.pr < priority) {\r
-                    index = i + 1;\r
-                }\r
-            }\r
-            list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority});\r
-            if (this === _ticker && !_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-        };\r
-\r
-        p.removeEventListener = function(type, callback) {\r
-            var list = this._listeners[type], i;\r
-            if (list) {\r
-                i = list.length;\r
-                while (--i > -1) {\r
-                    if (list[i].c === callback) {\r
-                        list.splice(i, 1);\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-        };\r
-\r
-        p.dispatchEvent = function(type) {\r
-            var list = this._listeners[type],\r
-                i, t, listener;\r
-            if (list) {\r
-                i = list.length;\r
-                t = this._eventTarget;\r
-                while (--i > -1) {\r
-                    listener = list[i];\r
-                    if (listener.up) {\r
-                        listener.c.call(listener.s || t, {type:type, target:t});\r
-                    } else {\r
-                        listener.c.call(listener.s || t);\r
-                    }\r
-                }\r
-            }\r
-        };\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Ticker\r
- * ----------------------------------------------------------------\r
- */\r
-        var _reqAnimFrame = window.requestAnimationFrame,\r
-            _cancelAnimFrame = window.cancelAnimationFrame,\r
-            _getTime = Date.now || function() {return new Date().getTime();},\r
-            _lastUpdate = _getTime();\r
-\r
-        //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill.\r
-        a = ["ms","moz","webkit","o"];\r
-        i = a.length;\r
-        while (--i > -1 && !_reqAnimFrame) {\r
-            _reqAnimFrame = window[a[i] + "RequestAnimationFrame"];\r
-            _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"];\r
-        }\r
-\r
-        _class("Ticker", function(fps, useRAF) {\r
-            var _self = this,\r
-                _startTime = _getTime(),\r
-                _useRAF = (useRAF !== false && _reqAnimFrame),\r
-                _lagThreshold = 500,\r
-                _adjustedLag = 33,\r
-                _fps, _req, _id, _gap, _nextTime,\r
-                _tick = function(manual) {\r
-                    var elapsed = _getTime() - _lastUpdate,\r
-                        overlap, dispatch;\r
-                    if (elapsed > _lagThreshold) {\r
-                        _startTime += elapsed - _adjustedLag;\r
-                    }\r
-                    _lastUpdate += elapsed;\r
-                    _self.time = (_lastUpdate - _startTime) / 1000;\r
-                    overlap = _self.time - _nextTime;\r
-                    if (!_fps || overlap > 0 || manual === true) {\r
-                        _self.frame++;\r
-                        _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap);\r
-                        dispatch = true;\r
-                    }\r
-                    if (manual !== true) { //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise.\r
-                        _id = _req(_tick);\r
-                    }\r
-                    if (dispatch) {\r
-                        _self.dispatchEvent("tick");\r
-                    }\r
-                };\r
-\r
-            EventDispatcher.call(_self);\r
-            _self.time = _self.frame = 0;\r
-            _self.tick = function() {\r
-                _tick(true);\r
-            };\r
-\r
-            _self.lagSmoothing = function(threshold, adjustedLag) {\r
-                _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited\r
-                _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0);\r
-            };\r
-\r
-            _self.sleep = function() {\r
-                if (_id == null) {\r
-                    return;\r
-                }\r
-                if (!_useRAF || !_cancelAnimFrame) {\r
-                    clearTimeout(_id);\r
-                } else {\r
-                    _cancelAnimFrame(_id);\r
-                }\r
-                _req = _emptyFunc;\r
-                _id = null;\r
-                if (_self === _ticker) {\r
-                    _tickerActive = false;\r
-                }\r
-            };\r
-\r
-            _self.wake = function() {\r
-                if (_id !== null) {\r
-                    _self.sleep();\r
-                } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout().\r
-                    _lastUpdate = _getTime() - _lagThreshold + 5;\r
-                }\r
-                _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame;\r
-                if (_self === _ticker) {\r
-                    _tickerActive = true;\r
-                }\r
-                _tick(2);\r
-            };\r
-\r
-            _self.fps = function(value) {\r
-                if (!arguments.length) {\r
-                    return _fps;\r
-                }\r
-                _fps = value;\r
-                _gap = 1 / (_fps || 60);\r
-                _nextTime = this.time + _gap;\r
-                _self.wake();\r
-            };\r
-\r
-            _self.useRAF = function(value) {\r
-                if (!arguments.length) {\r
-                    return _useRAF;\r
-                }\r
-                _self.sleep();\r
-                _useRAF = value;\r
-                _self.fps(_fps);\r
-            };\r
-            _self.fps(fps);\r
-\r
-            //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition.\r
-            setTimeout(function() {\r
-                if (_useRAF && (!_id || _self.frame < 5)) {\r
-                    _self.useRAF(false);\r
-                }\r
-            }, 1500);\r
-        });\r
-\r
-        p = gs.Ticker.prototype = new gs.events.EventDispatcher();\r
-        p.constructor = gs.Ticker;\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * Animation\r
- * ----------------------------------------------------------------\r
- */\r
-        var Animation = _class("core.Animation", function(duration, vars) {\r
-                this.vars = vars = vars || {};\r
-                this._duration = this._totalDuration = duration || 0;\r
-                this._delay = Number(vars.delay) || 0;\r
-                this._timeScale = 1;\r
-                this._active = (vars.immediateRender === true);\r
-                this.data = vars.data;\r
-                this._reversed = (vars.reversed === true);\r
-\r
-                if (!_rootTimeline) {\r
-                    return;\r
-                }\r
-                if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly.\r
-                    _ticker.wake();\r
-                }\r
-\r
-                var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline;\r
-                tl.add(this, tl._time);\r
-\r
-                if (this.vars.paused) {\r
-                    this.paused(true);\r
-                }\r
-            });\r
-\r
-        _ticker = Animation.ticker = new gs.Ticker();\r
-        p = Animation.prototype;\r
-        p._dirty = p._gc = p._initted = p._paused = false;\r
-        p._totalTime = p._time = 0;\r
-        p._rawPrevTime = -1;\r
-        p._next = p._last = p._onUpdate = p._timeline = p.timeline = null;\r
-        p._paused = false;\r
-\r
-\r
-        //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker.\r
-        var _checkTimeout = function() {\r
-                if (_tickerActive && _getTime() - _lastUpdate > 2000) {\r
-                    _ticker.wake();\r
-                }\r
-                setTimeout(_checkTimeout, 2000);\r
-            };\r
-        _checkTimeout();\r
-\r
-\r
-        p.play = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek(from, suppressEvents);\r
-            }\r
-            return this.reversed(false).paused(false);\r
-        };\r
-\r
-        p.pause = function(atTime, suppressEvents) {\r
-            if (atTime != null) {\r
-                this.seek(atTime, suppressEvents);\r
-            }\r
-            return this.paused(true);\r
-        };\r
-\r
-        p.resume = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek(from, suppressEvents);\r
-            }\r
-            return this.paused(false);\r
-        };\r
-\r
-        p.seek = function(time, suppressEvents) {\r
-            return this.totalTime(Number(time), suppressEvents !== false);\r
-        };\r
-\r
-        p.restart = function(includeDelay, suppressEvents) {\r
-            return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true);\r
-        };\r
-\r
-        p.reverse = function(from, suppressEvents) {\r
-            if (from != null) {\r
-                this.seek((from || this.totalDuration()), suppressEvents);\r
-            }\r
-            return this.reversed(true).paused(false);\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            //stub - we override this method in subclasses.\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            return this;\r
-        };\r
-\r
-        p.isActive = function() {\r
-            var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active.\r
-                startTime = this._startTime,\r
-                rawTime;\r
-            return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime()) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale));\r
-        };\r
-\r
-        p._enabled = function (enabled, ignoreTimeline) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            this._gc = !enabled;\r
-            this._active = this.isActive();\r
-            if (ignoreTimeline !== true) {\r
-                if (enabled && !this.timeline) {\r
-                    this._timeline.add(this, this._startTime - this._delay);\r
-                } else if (!enabled && this.timeline) {\r
-                    this._timeline._remove(this, true);\r
-                }\r
-            }\r
-            return false;\r
-        };\r
-\r
-\r
-        p._kill = function(vars, target) {\r
-            return this._enabled(false, false);\r
-        };\r
-\r
-        p.kill = function(vars, target) {\r
-            this._kill(vars, target);\r
-            return this;\r
-        };\r
-\r
-        p._uncache = function(includeSelf) {\r
-            var tween = includeSelf ? this : this.timeline;\r
-            while (tween) {\r
-                tween._dirty = true;\r
-                tween = tween.timeline;\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._swapSelfInParams = function(params) {\r
-            var i = params.length,\r
-                copy = params.concat();\r
-            while (--i > -1) {\r
-                if (params[i] === "{self}") {\r
-                    copy[i] = this;\r
-                }\r
-            }\r
-            return copy;\r
-        };\r
-\r
-//----Animation getters/setters --------------------------------------------------------\r
-\r
-        p.eventCallback = function(type, callback, params, scope) {\r
-            if ((type || "").substr(0,2) === "on") {\r
-                var v = this.vars;\r
-                if (arguments.length === 1) {\r
-                    return v[type];\r
-                }\r
-                if (callback == null) {\r
-                    delete v[type];\r
-                } else {\r
-                    v[type] = callback;\r
-                    v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params;\r
-                    v[type + "Scope"] = scope;\r
-                }\r
-                if (type === "onUpdate") {\r
-                    this._onUpdate = callback;\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.delay = function(value) {\r
-            if (!arguments.length) {\r
-                return this._delay;\r
-            }\r
-            if (this._timeline.smoothChildTiming) {\r
-                this.startTime( this._startTime + value - this._delay );\r
-            }\r
-            this._delay = value;\r
-            return this;\r
-        };\r
-\r
-        p.duration = function(value) {\r
-            if (!arguments.length) {\r
-                this._dirty = false;\r
-                return this._duration;\r
-            }\r
-            this._duration = this._totalDuration = value;\r
-            this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration.\r
-            if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) {\r
-                this.totalTime(this._totalTime * (value / this._duration), true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.totalDuration = function(value) {\r
-            this._dirty = false;\r
-            return (!arguments.length) ? this._totalDuration : this.duration(value);\r
-        };\r
-\r
-        p.time = function(value, suppressEvents) {\r
-            if (!arguments.length) {\r
-                return this._time;\r
-            }\r
-            if (this._dirty) {\r
-                this.totalDuration();\r
-            }\r
-            return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents);\r
-        };\r
-\r
-        p.totalTime = function(time, suppressEvents, uncapped) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            if (!arguments.length) {\r
-                return this._totalTime;\r
-            }\r
-            if (this._timeline) {\r
-                if (time < 0 && !uncapped) {\r
-                    time += this.totalDuration();\r
-                }\r
-                if (this._timeline.smoothChildTiming) {\r
-                    if (this._dirty) {\r
-                        this.totalDuration();\r
-                    }\r
-                    var totalDuration = this._totalDuration,\r
-                        tl = this._timeline;\r
-                    if (time > totalDuration && !uncapped) {\r
-                        time = totalDuration;\r
-                    }\r
-                    this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale);\r
-                    if (!tl._dirty) { //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here.\r
-                        this._uncache(false);\r
-                    }\r
-                    //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The startTime of that child would get pushed out, but one of the ancestors may have completed.\r
-                    if (tl._timeline) {\r
-                        while (tl._timeline) {\r
-                            if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) {\r
-                                tl.totalTime(tl._totalTime, true);\r
-                            }\r
-                            tl = tl._timeline;\r
-                        }\r
-                    }\r
-                }\r
-                if (this._gc) {\r
-                    this._enabled(true, false);\r
-                }\r
-                if (this._totalTime !== time || this._duration === 0) {\r
-                    this.render(time, suppressEvents, false);\r
-                    if (_lazyTweens.length) { //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render.\r
-                        _lazyRender();\r
-                    }\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.progress = p.totalProgress = function(value, suppressEvents) {\r
-            return (!arguments.length) ? this._time / this.duration() : this.totalTime(this.duration() * value, suppressEvents);\r
-        };\r
-\r
-        p.startTime = function(value) {\r
-            if (!arguments.length) {\r
-                return this._startTime;\r
-            }\r
-            if (value !== this._startTime) {\r
-                this._startTime = value;\r
-                if (this.timeline) if (this.timeline._sortChildren) {\r
-                    this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct.\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.timeScale = function(value) {\r
-            if (!arguments.length) {\r
-                return this._timeScale;\r
-            }\r
-            value = value || _tinyNum; //can't allow zero because it'll throw the math off\r
-            if (this._timeline && this._timeline.smoothChildTiming) {\r
-                var pauseTime = this._pauseTime,\r
-                    t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime();\r
-                this._startTime = t - ((t - this._startTime) * this._timeScale / value);\r
-            }\r
-            this._timeScale = value;\r
-            return this._uncache(false);\r
-        };\r
-\r
-        p.reversed = function(value) {\r
-            if (!arguments.length) {\r
-                return this._reversed;\r
-            }\r
-            if (value != this._reversed) {\r
-                this._reversed = value;\r
-                this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.paused = function(value) {\r
-            if (!arguments.length) {\r
-                return this._paused;\r
-            }\r
-            if (value != this._paused) if (this._timeline) {\r
-                if (!_tickerActive && !value) {\r
-                    _ticker.wake();\r
-                }\r
-                var tl = this._timeline,\r
-                    raw = tl.rawTime(),\r
-                    elapsed = raw - this._pauseTime;\r
-                if (!value && tl.smoothChildTiming) {\r
-                    this._startTime += elapsed;\r
-                    this._uncache(false);\r
-                }\r
-                this._pauseTime = value ? raw : null;\r
-                this._paused = value;\r
-                this._active = this.isActive();\r
-                if (!value && elapsed !== 0 && this._initted && this.duration()) {\r
-                    this.render((tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale), true, true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render.\r
-                }\r
-            }\r
-            if (this._gc && !value) {\r
-                this._enabled(true, false);\r
-            }\r
-            return this;\r
-        };\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * SimpleTimeline\r
- * ----------------------------------------------------------------\r
- */\r
-        var SimpleTimeline = _class("core.SimpleTimeline", function(vars) {\r
-            Animation.call(this, 0, vars);\r
-            this.autoRemoveChildren = this.smoothChildTiming = true;\r
-        });\r
-\r
-        p = SimpleTimeline.prototype = new Animation();\r
-        p.constructor = SimpleTimeline;\r
-        p.kill()._gc = false;\r
-        p._first = p._last = null;\r
-        p._sortChildren = false;\r
-\r
-        p.add = p.insert = function(child, position, align, stagger) {\r
-            var prevTween, st;\r
-            child._startTime = Number(position || 0) + child._delay;\r
-            if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order).\r
-                child._pauseTime = child._startTime + ((this.rawTime() - child._startTime) / child._timeScale);\r
-            }\r
-            if (child.timeline) {\r
-                child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one.\r
-            }\r
-            child.timeline = child._timeline = this;\r
-            if (child._gc) {\r
-                child._enabled(true, true);\r
-            }\r
-            prevTween = this._last;\r
-            if (this._sortChildren) {\r
-                st = child._startTime;\r
-                while (prevTween && prevTween._startTime > st) {\r
-                    prevTween = prevTween._prev;\r
-                }\r
-            }\r
-            if (prevTween) {\r
-                child._next = prevTween._next;\r
-                prevTween._next = child;\r
-            } else {\r
-                child._next = this._first;\r
-                this._first = child;\r
-            }\r
-            if (child._next) {\r
-                child._next._prev = child;\r
-            } else {\r
-                this._last = child;\r
-            }\r
-            child._prev = prevTween;\r
-            if (this._timeline) {\r
-                this._uncache(true);\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p._remove = function(tween, skipDisable) {\r
-            if (tween.timeline === this) {\r
-                if (!skipDisable) {\r
-                    tween._enabled(false, true);\r
-                }\r
-                tween.timeline = null;\r
-\r
-                if (tween._prev) {\r
-                    tween._prev._next = tween._next;\r
-                } else if (this._first === tween) {\r
-                    this._first = tween._next;\r
-                }\r
-                if (tween._next) {\r
-                    tween._next._prev = tween._prev;\r
-                } else if (this._last === tween) {\r
-                    this._last = tween._prev;\r
-                }\r
-\r
-                if (this._timeline) {\r
-                    this._uncache(true);\r
-                }\r
-            }\r
-            return this;\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            var tween = this._first,\r
-                next;\r
-            this._totalTime = this._time = this._rawPrevTime = time;\r
-            while (tween) {\r
-                next = tween._next; //record it here because the value could change after rendering...\r
-                if (tween._active || (time >= tween._startTime && !tween._paused)) {\r
-                    if (!tween._reversed) {\r
-                        tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force);\r
-                    } else {\r
-                        tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force);\r
-                    }\r
-                }\r
-                tween = next;\r
-            }\r
-        };\r
-\r
-        p.rawTime = function() {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            return this._totalTime;\r
-        };\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TweenLite\r
- * ----------------------------------------------------------------\r
- */\r
-        var TweenLite = _class("TweenLite", function(target, duration, vars) {\r
-                Animation.call(this, duration, vars);\r
-                this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method)\r
-\r
-                if (target == null) {\r
-                    throw "Cannot tween a null target.";\r
-                }\r
-\r
-                this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;\r
-\r
-                var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))),\r
-                    overwrite = this.vars.overwrite,\r
-                    i, targ, targets;\r
-\r
-                this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite];\r
-\r
-                if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") {\r
-                    this._targets = targets = _slice.call(target, 0);\r
-                    this._propLookup = [];\r
-                    this._siblings = [];\r
-                    for (i = 0; i < targets.length; i++) {\r
-                        targ = targets[i];\r
-                        if (!targ) {\r
-                            targets.splice(i--, 1);\r
-                            continue;\r
-                        } else if (typeof(targ) === "string") {\r
-                            targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings\r
-                            if (typeof(targ) === "string") {\r
-                                targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case)\r
-                            }\r
-                            continue;\r
-                        } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself.\r
-                            targets.splice(i--, 1);\r
-                            this._targets = targets = targets.concat(_slice.call(targ, 0));\r
-                            continue;\r
-                        }\r
-                        this._siblings[i] = _register(targ, this, false);\r
-                        if (overwrite === 1) if (this._siblings[i].length > 1) {\r
-                            _applyOverwrite(targ, this, null, 1, this._siblings[i]);\r
-                        }\r
-                    }\r
-\r
-                } else {\r
-                    this._propLookup = {};\r
-                    this._siblings = _register(target, this, false);\r
-                    if (overwrite === 1) if (this._siblings.length > 1) {\r
-                        _applyOverwrite(target, this, null, 1, this._siblings);\r
-                    }\r
-                }\r
-                if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) {\r
-                    this._time = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render)\r
-                    this.render(-this._delay);\r
-                }\r
-            }, true),\r
-            _isSelector = function(v) {\r
-                return (v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox.\r
-            },\r
-            _autoCSS = function(vars, target) {\r
-                var css = {},\r
-                    p;\r
-                for (p in vars) {\r
-                    if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties.\r
-                        css[p] = vars[p];\r
-                        delete vars[p];\r
-                    }\r
-                }\r
-                vars.css = css;\r
-            };\r
-\r
-        p = TweenLite.prototype = new Animation();\r
-        p.constructor = TweenLite;\r
-        p.kill()._gc = false;\r
-\r
-//----TweenLite defaults, overwrite management, and root updates ----------------------------------------------------\r
-\r
-        p.ratio = 0;\r
-        p._firstPT = p._targets = p._overwrittenProps = p._startAt = null;\r
-        p._notifyPluginsOfEnabled = p._lazy = false;\r
-\r
-        TweenLite.version = "1.12.1";\r
-        TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1);\r
-        TweenLite.defaultOverwrite = "auto";\r
-        TweenLite.ticker = _ticker;\r
-        TweenLite.autoSleep = true;\r
-        TweenLite.lagSmoothing = function(threshold, adjustedLag) {\r
-            _ticker.lagSmoothing(threshold, adjustedLag);\r
-        };\r
-        TweenLite.selector = window.$ || window.jQuery || function(e) { if (window.$) { TweenLite.selector = window.$; return window.$(e); } return window.document ? window.document.getElementById((e.charAt(0) === "#") ? e.substr(1) : e) : e; };\r
-\r
-        var _lazyTweens = [],\r
-            _lazyLookup = {},\r
-            _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object.\r
-            _plugins = TweenLite._plugins = {},\r
-            _tweenLookup = _internals.tweenLookup = {},\r
-            _tweenLookupNum = 0,\r
-            _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1},\r
-            _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0},\r
-            _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(),\r
-            _rootTimeline = Animation._rootTimeline = new SimpleTimeline(),\r
-            _lazyRender = function() {\r
-                var i = _lazyTweens.length;\r
-                _lazyLookup = {};\r
-                while (--i > -1) {\r
-                    a = _lazyTweens[i];\r
-                    if (a && a._lazy !== false) {\r
-                        a.render(a._lazy, false, true);\r
-                        a._lazy = false;\r
-                    }\r
-                }\r
-                _lazyTweens.length = 0;\r
-            };\r
-\r
-        _rootTimeline._startTime = _ticker.time;\r
-        _rootFramesTimeline._startTime = _ticker.frame;\r
-        _rootTimeline._active = _rootFramesTimeline._active = true;\r
-        setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick".\r
-\r
-        Animation._updateRoot = TweenLite.render = function() {\r
-                var i, a, p;\r
-                if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again.\r
-                    _lazyRender();\r
-                }\r
-                _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false);\r
-                _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false);\r
-                if (_lazyTweens.length) {\r
-                    _lazyRender();\r
-                }\r
-                if (!(_ticker.frame % 120)) { //dump garbage every 120 frames...\r
-                    for (p in _tweenLookup) {\r
-                        a = _tweenLookup[p].tweens;\r
-                        i = a.length;\r
-                        while (--i > -1) {\r
-                            if (a[i]._gc) {\r
-                                a.splice(i, 1);\r
-                            }\r
-                        }\r
-                        if (a.length === 0) {\r
-                            delete _tweenLookup[p];\r
-                        }\r
-                    }\r
-                    //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly\r
-                    p = _rootTimeline._first;\r
-                    if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) {\r
-                        while (p && p._paused) {\r
-                            p = p._next;\r
-                        }\r
-                        if (!p) {\r
-                            _ticker.sleep();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-\r
-        _ticker.addEventListener("tick", Animation._updateRoot);\r
-\r
-        var _register = function(target, tween, scrub) {\r
-                var id = target._gsTweenID, a, i;\r
-                if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) {\r
-                    _tweenLookup[id] = {target:target, tweens:[]};\r
-                }\r
-                if (tween) {\r
-                    a = _tweenLookup[id].tweens;\r
-                    a[(i = a.length)] = tween;\r
-                    if (scrub) {\r
-                        while (--i > -1) {\r
-                            if (a[i] === tween) {\r
-                                a.splice(i, 1);\r
-                            }\r
-                        }\r
-                    }\r
-                }\r
-                return _tweenLookup[id].tweens;\r
-            },\r
-\r
-            _applyOverwrite = function(target, tween, props, mode, siblings) {\r
-                var i, changed, curTween, l;\r
-                if (mode === 1 || mode >= 4) {\r
-                    l = siblings.length;\r
-                    for (i = 0; i < l; i++) {\r
-                        if ((curTween = siblings[i]) !== tween) {\r
-                            if (!curTween._gc) if (curTween._enabled(false, false)) {\r
-                                changed = true;\r
-                            }\r
-                        } else if (mode === 5) {\r
-                            break;\r
-                        }\r
-                    }\r
-                    return changed;\r
-                }\r
-                //NOTE: Add 0.0000000001 to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example)\r
-                var startTime = tween._startTime + _tinyNum,\r
-                    overlaps = [],\r
-                    oCount = 0,\r
-                    zeroDur = (tween._duration === 0),\r
-                    globalStart;\r
-                i = siblings.length;\r
-                while (--i > -1) {\r
-                    if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) {\r
-                        //ignore\r
-                    } else if (curTween._timeline !== tween._timeline) {\r
-                        globalStart = globalStart || _checkOverlap(tween, 0, zeroDur);\r
-                        if (_checkOverlap(curTween, globalStart, zeroDur) === 0) {\r
-                            overlaps[oCount++] = curTween;\r
-                        }\r
-                    } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= 0.0000000002)) {\r
-                        overlaps[oCount++] = curTween;\r
-                    }\r
-                }\r
-\r
-                i = oCount;\r
-                while (--i > -1) {\r
-                    curTween = overlaps[i];\r
-                    if (mode === 2) if (curTween._kill(props, target)) {\r
-                        changed = true;\r
-                    }\r
-                    if (mode !== 2 || (!curTween._firstPT && curTween._initted)) {\r
-                        if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween.\r
-                            changed = true;\r
-                        }\r
-                    }\r
-                }\r
-                return changed;\r
-            },\r
-\r
-            _checkOverlap = function(tween, reference, zeroDur) {\r
-                var tl = tween._timeline,\r
-                    ts = tl._timeScale,\r
-                    t = tween._startTime;\r
-                while (tl._timeline) {\r
-                    t += tl._startTime;\r
-                    ts *= tl._timeScale;\r
-                    if (tl._paused) {\r
-                        return -100;\r
-                    }\r
-                    tl = tl._timeline;\r
-                }\r
-                t /= ts;\r
-                return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum;\r
-            };\r
-\r
-\r
-//---- TweenLite instance methods -----------------------------------------------------------------------------\r
-\r
-        p._init = function() {\r
-            var v = this.vars,\r
-                op = this._overwrittenProps,\r
-                dur = this._duration,\r
-                immediate = !!v.immediateRender,\r
-                ease = v.ease,\r
-                i, initPlugins, pt, p, startVars;\r
-            if (v.startAt) {\r
-                if (this._startAt) {\r
-                    this._startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change.\r
-                    this._startAt.kill();\r
-                }\r
-                startVars = {};\r
-                for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from);\r
-                    startVars[p] = v.startAt[p];\r
-                }\r
-                startVars.overwrite = false;\r
-                startVars.immediateRender = true;\r
-                startVars.lazy = (immediate && v.lazy !== false);\r
-                startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop).\r
-                this._startAt = TweenLite.to(this.target, 0, startVars);\r
-                if (immediate) {\r
-                    if (this._time > 0) {\r
-                        this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()).\r
-                    } else if (dur !== 0) {\r
-                        return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a TimelineLite or TimelineMax, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting.\r
-                    }\r
-                }\r
-            } else if (v.runBackwards && dur !== 0) {\r
-                //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards)\r
-                if (this._startAt) {\r
-                    this._startAt.render(-1, true);\r
-                    this._startAt.kill();\r
-                    this._startAt = null;\r
-                } else {\r
-                    pt = {};\r
-                    for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through.\r
-                        if (!_reservedProps[p] || p === "autoCSS") {\r
-                            pt[p] = v[p];\r
-                        }\r
-                    }\r
-                    pt.overwrite = 0;\r
-                    pt.data = "isFromStart"; //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in.\r
-                    pt.lazy = (immediate && v.lazy !== false);\r
-                    pt.immediateRender = immediate; //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after)\r
-                    this._startAt = TweenLite.to(this.target, 0, pt);\r
-                    if (!immediate) {\r
-                        this._startAt._init(); //ensures that the initial values are recorded\r
-                        this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween.\r
-                    } else if (this._time === 0) {\r
-                        return;\r
-                    }\r
-                }\r
-            }\r
-            if (!ease) {\r
-                this._ease = TweenLite.defaultEase;\r
-            } else if (ease instanceof Ease) {\r
-                this._ease = (v.easeParams instanceof Array) ? ease.config.apply(ease, v.easeParams) : ease;\r
-            } else {\r
-                this._ease = (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase;\r
-            }\r
-            this._easeType = this._ease._type;\r
-            this._easePower = this._ease._power;\r
-            this._firstPT = null;\r
-\r
-            if (this._targets) {\r
-                i = this._targets.length;\r
-                while (--i > -1) {\r
-                    if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null)) ) {\r
-                        initPlugins = true;\r
-                    }\r
-                }\r
-            } else {\r
-                initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op);\r
-            }\r
-\r
-            if (initPlugins) {\r
-                TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite\r
-            }\r
-            if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live.\r
-                this._enabled(false, false);\r
-            }\r
-            if (v.runBackwards) {\r
-                pt = this._firstPT;\r
-                while (pt) {\r
-                    pt.s += pt.c;\r
-                    pt.c = -pt.c;\r
-                    pt = pt._next;\r
-                }\r
-            }\r
-            this._onUpdate = v.onUpdate;\r
-            this._initted = true;\r
-        };\r
-\r
-        p._initProps = function(target, propLookup, siblings, overwrittenProps) {\r
-            var p, i, initPlugins, plugin, pt, v;\r
-            if (target == null) {\r
-                return false;\r
-            }\r
-\r
-            if (_lazyLookup[target._gsTweenID]) {\r
-                _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end)\r
-            }\r
-\r
-            if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe.\r
-                _autoCSS(this.vars, target);\r
-            }\r
-            for (p in this.vars) {\r
-                v = this.vars[p];\r
-                if (_reservedProps[p]) {\r
-                    if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) {\r
-                        this.vars[p] = v = this._swapSelfInParams(v, this);\r
-                    }\r
-\r
-                } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this)) {\r
-\r
-                    //t - target        [object]\r
-                    //p - property      [string]\r
-                    //s - start         [number]\r
-                    //c - change        [number]\r
-                    //f - isFunction    [boolean]\r
-                    //n - name          [string]\r
-                    //pg - isPlugin     [boolean]\r
-                    //pr - priority     [number]\r
-                    this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:true, n:p, pg:true, pr:plugin._priority};\r
-                    i = plugin._overwriteProps.length;\r
-                    while (--i > -1) {\r
-                        propLookup[plugin._overwriteProps[i]] = this._firstPT;\r
-                    }\r
-                    if (plugin._priority || plugin._onInitAllProps) {\r
-                        initPlugins = true;\r
-                    }\r
-                    if (plugin._onDisable || plugin._onEnable) {\r
-                        this._notifyPluginsOfEnabled = true;\r
-                    }\r
-\r
-                } else {\r
-                    this._firstPT = propLookup[p] = pt = {_next:this._firstPT, t:target, p:p, f:(typeof(target[p]) === "function"), n:p, pg:false, pr:0};\r
-                    pt.s = (!pt.f) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]();\r
-                    pt.c = (typeof(v) === "string" && v.charAt(1) === "=") ? parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : (Number(v) - pt.s) || 0;\r
-                }\r
-                if (pt) if (pt._next) {\r
-                    pt._next._prev = pt;\r
-                }\r
-            }\r
-\r
-            if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first)\r
-                return this._initProps(target, propLookup, siblings, overwrittenProps);\r
-            }\r
-            if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) {\r
-                this._kill(propLookup, target);\r
-                return this._initProps(target, propLookup, siblings, overwrittenProps);\r
-            }\r
-            if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does.\r
-                _lazyLookup[target._gsTweenID] = true;\r
-            }\r
-            return initPlugins;\r
-        };\r
-\r
-        p.render = function(time, suppressEvents, force) {\r
-            var prevTime = this._time,\r
-                duration = this._duration,\r
-                prevRawPrevTime = this._rawPrevTime,\r
-                isComplete, callback, pt, rawPrevTime;\r
-            if (time >= duration) {\r
-                this._totalTime = this._time = duration;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(1) : 1;\r
-                if (!this._reversed ) {\r
-                    isComplete = true;\r
-                    callback = "onComplete";\r
-                }\r
-                if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                    if (this._startTime === this._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate.\r
-                        time = 0;\r
-                    }\r
-                    if (time === 0 || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time) {\r
-                        force = true;\r
-                        if (prevRawPrevTime > _tinyNum) {\r
-                            callback = "onReverseComplete";\r
-                        }\r
-                    }\r
-                    this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                }\r
-\r
-            } else if (time < 0.0000001) { //to work around occasional floating point math artifacts, round super small values to 0.\r
-                this._totalTime = this._time = 0;\r
-                this.ratio = this._ease._calcEnd ? this._ease.getRatio(0) : 0;\r
-                if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0 && prevRawPrevTime !== _tinyNum)) {\r
-                    callback = "onReverseComplete";\r
-                    isComplete = this._reversed;\r
-                }\r
-                if (time < 0) {\r
-                    this._active = false;\r
-                    if (duration === 0) if (this._initted || !this.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered.\r
-                        if (prevRawPrevTime >= 0) {\r
-                            force = true;\r
-                        }\r
-                        this._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient.\r
-                    }\r
-                } else if (!this._initted) { //if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately.\r
-                    force = true;\r
-                }\r
-            } else {\r
-                this._totalTime = this._time = time;\r
-\r
-                if (this._easeType) {\r
-                    var r = time / duration, type = this._easeType, pow = this._easePower;\r
-                    if (type === 1 || (type === 3 && r >= 0.5)) {\r
-                        r = 1 - r;\r
-                    }\r
-                    if (type === 3) {\r
-                        r *= 2;\r
-                    }\r
-                    if (pow === 1) {\r
-                        r *= r;\r
-                    } else if (pow === 2) {\r
-                        r *= r * r;\r
-                    } else if (pow === 3) {\r
-                        r *= r * r * r;\r
-                    } else if (pow === 4) {\r
-                        r *= r * r * r * r;\r
-                    }\r
-\r
-                    if (type === 1) {\r
-                        this.ratio = 1 - r;\r
-                    } else if (type === 2) {\r
-                        this.ratio = r;\r
-                    } else if (time / duration < 0.5) {\r
-                        this.ratio = r / 2;\r
-                    } else {\r
-                        this.ratio = 1 - (r / 2);\r
-                    }\r
-\r
-                } else {\r
-                    this.ratio = this._ease.getRatio(time / duration);\r
-                }\r
-            }\r
-\r
-            if (this._time === prevTime && !force) {\r
-                return;\r
-            } else if (!this._initted) {\r
-                this._init();\r
-                if (!this._initted || this._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example.\r
-                    return;\r
-                } else if (!force && this._firstPT && ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration))) {\r
-                    this._time = this._totalTime = prevTime;\r
-                    this._rawPrevTime = prevRawPrevTime;\r
-                    _lazyTweens.push(this);\r
-                    this._lazy = time;\r
-                    return;\r
-                }\r
-                //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently.\r
-                if (this._time && !isComplete) {\r
-                    this.ratio = this._ease.getRatio(this._time / duration);\r
-                } else if (isComplete && this._ease._calcEnd) {\r
-                    this.ratio = this._ease.getRatio((this._time === 0) ? 0 : 1);\r
-                }\r
-            }\r
-            if (this._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occuring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time.\r
-                this._lazy = false;\r
-            }\r
-            if (!this._active) if (!this._paused && this._time !== prevTime && time >= 0) {\r
-                this._active = true;  //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done.\r
-            }\r
-            if (prevTime === 0) {\r
-                if (this._startAt) {\r
-                    if (time >= 0) {\r
-                        this._startAt.render(time, suppressEvents, force);\r
-                    } else if (!callback) {\r
-                        callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area.\r
-                    }\r
-                }\r
-                if (this.vars.onStart) if (this._time !== 0 || duration === 0) if (!suppressEvents) {\r
-                    this.vars.onStart.apply(this.vars.onStartScope || this, this.vars.onStartParams || _blankArray);\r
-                }\r
-            }\r
-\r
-            pt = this._firstPT;\r
-            while (pt) {\r
-                if (pt.f) {\r
-                    pt.t[pt.p](pt.c * this.ratio + pt.s);\r
-                } else {\r
-                    pt.t[pt.p] = pt.c * this.ratio + pt.s;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-\r
-            if (this._onUpdate) {\r
-                if (time < 0) if (this._startAt && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete.\r
-                }\r
-                if (!suppressEvents) if (this._time !== prevTime || isComplete) {\r
-                    this._onUpdate.apply(this.vars.onUpdateScope || this, this.vars.onUpdateParams || _blankArray);\r
-                }\r
-            }\r
-\r
-            if (callback) if (!this._gc) { //check _gc because there's a chance that kill() could be called in an onUpdate\r
-                if (time < 0 && this._startAt && !this._onUpdate && this._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values.\r
-                    this._startAt.render(time, suppressEvents, force);\r
-                }\r
-                if (isComplete) {\r
-                    if (this._timeline.autoRemoveChildren) {\r
-                        this._enabled(false, false);\r
-                    }\r
-                    this._active = false;\r
-                }\r
-                if (!suppressEvents && this.vars[callback]) {\r
-                    this.vars[callback].apply(this.vars[callback + "Scope"] || this, this.vars[callback + "Params"] || _blankArray);\r
-                }\r
-                if (duration === 0 && this._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless.\r
-                    this._rawPrevTime = 0;\r
-                }\r
-            }\r
-\r
-        };\r
-\r
-        p._kill = function(vars, target) {\r
-            if (vars === "all") {\r
-                vars = null;\r
-            }\r
-            if (vars == null) if (target == null || target === this.target) {\r
-                this._lazy = false;\r
-                return this._enabled(false, false);\r
-            }\r
-            target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target;\r
-            var i, overwrittenProps, p, pt, propLookup, changed, killProps, record;\r
-            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {\r
-                i = target.length;\r
-                while (--i > -1) {\r
-                    if (this._kill(vars, target[i])) {\r
-                        changed = true;\r
-                    }\r
-                }\r
-            } else {\r
-                if (this._targets) {\r
-                    i = this._targets.length;\r
-                    while (--i > -1) {\r
-                        if (target === this._targets[i]) {\r
-                            propLookup = this._propLookup[i] || {};\r
-                            this._overwrittenProps = this._overwrittenProps || [];\r
-                            overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all";\r
-                            break;\r
-                        }\r
-                    }\r
-                } else if (target !== this.target) {\r
-                    return false;\r
-                } else {\r
-                    propLookup = this._propLookup;\r
-                    overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all";\r
-                }\r
-\r
-                if (propLookup) {\r
-                    killProps = vars || propLookup;\r
-                    record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin)\r
-                    for (p in killProps) {\r
-                        if ((pt = propLookup[p])) {\r
-                            if (pt.pg && pt.t._kill(killProps)) {\r
-                                changed = true; //some plugins need to be notified so they can perform cleanup tasks first\r
-                            }\r
-                            if (!pt.pg || pt.t._overwriteProps.length === 0) {\r
-                                if (pt._prev) {\r
-                                    pt._prev._next = pt._next;\r
-                                } else if (pt === this._firstPT) {\r
-                                    this._firstPT = pt._next;\r
-                                }\r
-                                if (pt._next) {\r
-                                    pt._next._prev = pt._prev;\r
-                                }\r
-                                pt._next = pt._prev = null;\r
-                            }\r
-                            delete propLookup[p];\r
-                        }\r
-                        if (record) {\r
-                            overwrittenProps[p] = 1;\r
-                        }\r
-                    }\r
-                    if (!this._firstPT && this._initted) { //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening.\r
-                        this._enabled(false, false);\r
-                    }\r
-                }\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        p.invalidate = function() {\r
-            if (this._notifyPluginsOfEnabled) {\r
-                TweenLite._onPluginEvent("_onDisable", this);\r
-            }\r
-            this._firstPT = null;\r
-            this._overwrittenProps = null;\r
-            this._onUpdate = null;\r
-            this._startAt = null;\r
-            this._initted = this._active = this._notifyPluginsOfEnabled = this._lazy = false;\r
-            this._propLookup = (this._targets) ? {} : [];\r
-            return this;\r
-        };\r
-\r
-        p._enabled = function(enabled, ignoreTimeline) {\r
-            if (!_tickerActive) {\r
-                _ticker.wake();\r
-            }\r
-            if (enabled && this._gc) {\r
-                var targets = this._targets,\r
-                    i;\r
-                if (targets) {\r
-                    i = targets.length;\r
-                    while (--i > -1) {\r
-                        this._siblings[i] = _register(targets[i], this, true);\r
-                    }\r
-                } else {\r
-                    this._siblings = _register(this.target, this, true);\r
-                }\r
-            }\r
-            Animation.prototype._enabled.call(this, enabled, ignoreTimeline);\r
-            if (this._notifyPluginsOfEnabled) if (this._firstPT) {\r
-                return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this);\r
-            }\r
-            return false;\r
-        };\r
-\r
-\r
-//----TweenLite static methods -----------------------------------------------------\r
-\r
-        TweenLite.to = function(target, duration, vars) {\r
-            return new TweenLite(target, duration, vars);\r
-        };\r
-\r
-        TweenLite.from = function(target, duration, vars) {\r
-            vars.runBackwards = true;\r
-            vars.immediateRender = (vars.immediateRender != false);\r
-            return new TweenLite(target, duration, vars);\r
-        };\r
-\r
-        TweenLite.fromTo = function(target, duration, fromVars, toVars) {\r
-            toVars.startAt = fromVars;\r
-            toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false);\r
-            return new TweenLite(target, duration, toVars);\r
-        };\r
-\r
-        TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) {\r
-            return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, onCompleteScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, onReverseCompleteScope:scope, immediateRender:false, useFrames:useFrames, overwrite:0});\r
-        };\r
-\r
-        TweenLite.set = function(target, vars) {\r
-            return new TweenLite(target, 0, vars);\r
-        };\r
-\r
-        TweenLite.getTweensOf = function(target, onlyActive) {\r
-            if (target == null) { return []; }\r
-            target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target;\r
-            var i, a, j, t;\r
-            if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") {\r
-                i = target.length;\r
-                a = [];\r
-                while (--i > -1) {\r
-                    a = a.concat(TweenLite.getTweensOf(target[i], onlyActive));\r
-                }\r
-                i = a.length;\r
-                //now get rid of any duplicates (tweens of arrays of objects could cause duplicates)\r
-                while (--i > -1) {\r
-                    t = a[i];\r
-                    j = i;\r
-                    while (--j > -1) {\r
-                        if (t === a[j]) {\r
-                            a.splice(i, 1);\r
-                        }\r
-                    }\r
-                }\r
-            } else {\r
-                a = _register(target).concat();\r
-                i = a.length;\r
-                while (--i > -1) {\r
-                    if (a[i]._gc || (onlyActive && !a[i].isActive())) {\r
-                        a.splice(i, 1);\r
-                    }\r
-                }\r
-            }\r
-            return a;\r
-        };\r
-\r
-        TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) {\r
-            if (typeof(onlyActive) === "object") {\r
-                vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted)\r
-                onlyActive = false;\r
-            }\r
-            var a = TweenLite.getTweensOf(target, onlyActive),\r
-                i = a.length;\r
-            while (--i > -1) {\r
-                a[i]._kill(vars, target);\r
-            }\r
-        };\r
-\r
-\r
-\r
-/*\r
- * ----------------------------------------------------------------\r
- * TweenPlugin   (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another <script> call before loading plugins which is easy to forget)\r
- * ----------------------------------------------------------------\r
- */\r
-        var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) {\r
-                    this._overwriteProps = (props || "").split(",");\r
-                    this._propName = this._overwriteProps[0];\r
-                    this._priority = priority || 0;\r
-                    this._super = TweenPlugin.prototype;\r
-                }, true);\r
-\r
-        p = TweenPlugin.prototype;\r
-        TweenPlugin.version = "1.10.1";\r
-        TweenPlugin.API = 2;\r
-        p._firstPT = null;\r
-\r
-        p._addTween = function(target, prop, start, end, overwriteProp, round) {\r
-            var c, pt;\r
-            if (end != null && (c = (typeof(end) === "number" || end.charAt(1) !== "=") ? Number(end) - start : parseInt(end.charAt(0) + "1", 10) * Number(end.substr(2)))) {\r
-                this._firstPT = pt = {_next:this._firstPT, t:target, p:prop, s:start, c:c, f:(typeof(target[prop]) === "function"), n:overwriteProp || prop, r:round};\r
-                if (pt._next) {\r
-                    pt._next._prev = pt;\r
-                }\r
-                return pt;\r
-            }\r
-        };\r
-\r
-        p.setRatio = function(v) {\r
-            var pt = this._firstPT,\r
-                min = 0.000001,\r
-                val;\r
-            while (pt) {\r
-                val = pt.c * v + pt.s;\r
-                if (pt.r) {\r
-                    val = Math.round(val);\r
-                } else if (val < min) if (val > -min) { //prevents issues with converting very small numbers to strings in the browser\r
-                    val = 0;\r
-                }\r
-                if (pt.f) {\r
-                    pt.t[pt.p](val);\r
-                } else {\r
-                    pt.t[pt.p] = val;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-        };\r
-\r
-        p._kill = function(lookup) {\r
-            var a = this._overwriteProps,\r
-                pt = this._firstPT,\r
-                i;\r
-            if (lookup[this._propName] != null) {\r
-                this._overwriteProps = [];\r
-            } else {\r
-                i = a.length;\r
-                while (--i > -1) {\r
-                    if (lookup[a[i]] != null) {\r
-                        a.splice(i, 1);\r
-                    }\r
-                }\r
-            }\r
-            while (pt) {\r
-                if (lookup[pt.n] != null) {\r
-                    if (pt._next) {\r
-                        pt._next._prev = pt._prev;\r
-                    }\r
-                    if (pt._prev) {\r
-                        pt._prev._next = pt._next;\r
-                        pt._prev = null;\r
-                    } else if (this._firstPT === pt) {\r
-                        this._firstPT = pt._next;\r
-                    }\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            return false;\r
-        };\r
-\r
-        p._roundProps = function(lookup, value) {\r
-            var pt = this._firstPT;\r
-            while (pt) {\r
-                if (lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ])) { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here.\r
-                    pt.r = value;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-        };\r
-\r
-        TweenLite._onPluginEvent = function(type, tween) {\r
-            var pt = tween._firstPT,\r
-                changed, pt2, first, last, next;\r
-            if (type === "_onInitAllProps") {\r
-                //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame.\r
-                while (pt) {\r
-                    next = pt._next;\r
-                    pt2 = first;\r
-                    while (pt2 && pt2.pr > pt.pr) {\r
-                        pt2 = pt2._next;\r
-                    }\r
-                    if ((pt._prev = pt2 ? pt2._prev : last)) {\r
-                        pt._prev._next = pt;\r
-                    } else {\r
-                        first = pt;\r
-                    }\r
-                    if ((pt._next = pt2)) {\r
-                        pt2._prev = pt;\r
-                    } else {\r
-                        last = pt;\r
-                    }\r
-                    pt = next;\r
-                }\r
-                pt = tween._firstPT = first;\r
-            }\r
-            while (pt) {\r
-                if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) {\r
-                    changed = true;\r
-                }\r
-                pt = pt._next;\r
-            }\r
-            return changed;\r
-        };\r
-\r
-        TweenPlugin.activate = function(plugins) {\r
-            var i = plugins.length;\r
-            while (--i > -1) {\r
-                if (plugins[i].API === TweenPlugin.API) {\r
-                    _plugins[(new plugins[i]())._propName] = plugins[i];\r
-                }\r
-            }\r
-            return true;\r
-        };\r
-\r
-        //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations.\r
-        _gsDefine.plugin = function(config) {\r
-            if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; }\r
-            var propName = config.propName,\r
-                priority = config.priority || 0,\r
-                overwriteProps = config.overwriteProps,\r
-                map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_roundProps", initAll:"_onInitAllProps"},\r
-                Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin",\r
-                    function() {\r
-                        TweenPlugin.call(this, propName, priority);\r
-                        this._overwriteProps = overwriteProps || [];\r
-                    }, (config.global === true)),\r
-                p = Plugin.prototype = new TweenPlugin(propName),\r
-                prop;\r
-            p.constructor = Plugin;\r
-            Plugin.API = config.API;\r
-            for (prop in map) {\r
-                if (typeof(config[prop]) === "function") {\r
-                    p[map[prop]] = config[prop];\r
-                }\r
-            }\r
-            Plugin.version = config.version;\r
-            TweenPlugin.activate([Plugin]);\r
-            return Plugin;\r
-        };\r
-\r
-\r
-        //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you.\r
-        a = window._gsQueue;\r
-        if (a) {\r
-            for (i = 0; i < a.length; i++) {\r
-                a[i]();\r
-            }\r
-            for (p in _defLookup) {\r
-                if (!_defLookup[p].func) {\r
-                    //window.console.log("GSAP encountered missing dependency: com.greensock." + p);\r
-                }\r
-            }\r
-        }\r
-\r
-        _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated\r
-\r
-})(window);\r
-\r
-angular.module('b2b.att.collapse', ['b2b.att.transition'])\r
-\r
-// The collapsible directive indicates a block of html that will expand and collapse\r
-.directive('b2bCollapse', ['$transition', function($transition) {\r
-    // CSS transitions don't work with height: auto, so we have to manually change the height to a\r
-    // specific value and then once the animation completes, we can reset the height to auto.\r
-    // Unfortunately if you do this while the CSS transitions are specified (i.e. in the CSS class\r
-    // "collapse") then you trigger a change to height 0 in between.\r
-    // The fix is to remove the "collapse" CSS class while changing the height back to auto - phew!\r
-\r
-    var props = {\r
-        open: {\r
-            marginTop: null,\r
-            marginBottom: null,\r
-            paddingTop: null,\r
-            paddingBottom: null,\r
-            display: 'block'\r
-        },\r
-        closed: {\r
-            marginTop: 0,\r
-            marginBottom: 0,\r
-            paddingTop: 0,\r
-            paddingBottom: 0,\r
-            display: 'none'\r
-        }\r
-    };\r
-\r
-    var fixUpHeight = function(scope, element, height) {\r
-        // We remove the collapse CSS class to prevent a transition when we change to height: auto\r
-        element.removeClass('b2bCollapse');\r
-        element.css({height: height});\r
-        //adjusting for any margin or padding\r
-        if (height === 0) {\r
-            element.css(props.closed);\r
-        } else {\r
-            element.css(props.open);\r
-        }\r
-        // It appears that  reading offsetWidth makes the browser realise that we have changed the\r
-        // height already :-/\r
-        var x = element[0].offsetWidth;\r
-        element.addClass('b2bCollapse');\r
-    };\r
-\r
-    return {\r
-        link: function(scope, element, attrs) {\r
-            var isCollapsed;\r
-            var initialAnimSkip = true;\r
-            scope.$watch(function() {\r
-                return element[0].scrollHeight;\r
-            }, function(value) {\r
-                //The listener is called when scrollHeight changes\r
-                //It actually does on 2 scenarios: \r
-                // 1. Parent is set to display none\r
-                // 2. angular bindings inside are resolved\r
-                //When we have a change of scrollHeight we are setting again the correct height if the group is opened\r
-                if (element[0].scrollHeight !== 0) {\r
-                    if (!isCollapsed) {\r
-                        if (initialAnimSkip) {\r
-                            fixUpHeight(scope, element, element[0].scrollHeight + 'px');\r
-                        } else {\r
-                            fixUpHeight(scope, element, 'auto');\r
-                            element.css({overflow: 'visible'});\r
-                        }\r
-                    }\r
-                }\r
-            });\r
-\r
-            scope.$watch(attrs.b2bCollapse, function(value) {\r
-                if (value) {\r
-                    collapse();\r
-                } else {\r
-                    expand();\r
-                }\r
-            });\r
-\r
-\r
-            var currentTransition;\r
-            var doTransition = function(change) {\r
-                if (currentTransition) {\r
-                    currentTransition.cancel();\r
-                }\r
-                currentTransition = $transition(element, change);\r
-                currentTransition.then(\r
-                        function() {\r
-                            currentTransition = undefined;\r
-                        },\r
-                        function() {\r
-                            currentTransition = undefined;\r
-                        }\r
-                );\r
-                return currentTransition;\r
-            };\r
-\r
-            var expand = function() {\r
-                scope.postTransition = true; \r
-                if (initialAnimSkip) {\r
-                    initialAnimSkip = false;\r
-                    if (!isCollapsed) {\r
-                        fixUpHeight(scope, element, 'auto');\r
-                    }\r
-                } else {\r
-                    //doTransition({ height : element[0].scrollHeight + 'px' })\r
-                    doTransition(angular.extend({height: element[0].scrollHeight + 'px'}, props.open))\r
-                            .then(function() {\r
-                                // This check ensures that we don't accidentally update the height if the user has closed\r
-                                // the group while the animation was still running\r
-                                if (!isCollapsed) {\r
-                                    fixUpHeight(scope, element, 'auto');\r
-                                }\r
-                            });\r
-                }\r
-                isCollapsed = false;\r
-            };\r
-\r
-            var collapse = function() {\r
-                isCollapsed = true;\r
-                if (initialAnimSkip) {\r
-                    initialAnimSkip = false;\r
-                    fixUpHeight(scope, element, 0);\r
-                } else {\r
-                    fixUpHeight(scope, element, element[0].scrollHeight + 'px');\r
-                    doTransition(angular.extend({height: 0}, props.closed)).then(function() {\r
-                        scope.postTransition = false;\r
-                    });\r
-                    element.css({overflow: 'hidden'});\r
-                }\r
-            };\r
-        }\r
-    };\r
-}]);\r
-angular.module('b2b.att.position', [])\r
-\r
-.factory('$position', ['$document', '$window', function ($document, $window) {\r
-    function getStyle(el, cssprop) {\r
-        if (el.currentStyle) { //IE\r
-            return el.currentStyle[cssprop];\r
-        } else if ($window.getComputedStyle) {\r
-            return $window.getComputedStyle(el)[cssprop];\r
-        }\r
-        // finally try and get inline style\r
-        return el.style[cssprop];\r
-    }\r
-\r
-    /**\r
-     * Checks if a given element is statically positioned\r
-     * @param element - raw DOM element\r
-     */\r
-    function isStaticPositioned(element) {\r
-        return (getStyle(element, "position") || 'static') === 'static';\r
-    }\r
-\r
-    /**\r
-     * returns the closest, non-statically positioned parentOffset of a given element\r
-     * @param element\r
-     */\r
-    var parentOffsetEl = function (element) {\r
-        var docDomEl = $document[0];\r
-        var offsetParent = element.offsetParent || docDomEl;\r
-        while (offsetParent && offsetParent !== docDomEl && isStaticPositioned(offsetParent)) {\r
-            offsetParent = offsetParent.offsetParent;\r
-        }\r
-        return offsetParent || docDomEl;\r
-    };\r
-\r
-    return {\r
-        /**\r
-         * Provides read-only equivalent of jQuery's position function:\r
-         * http://api.jquery.com/position/\r
-         */\r
-        position: function (element) {\r
-            var elBCR = this.offset(element);\r
-            var offsetParentBCR = {\r
-                top: 0,\r
-                left: 0\r
-            };\r
-            var offsetParentEl = parentOffsetEl(element[0]);\r
-            if (offsetParentEl !== $document[0]) {\r
-                offsetParentBCR = this.offset(angular.element(offsetParentEl));\r
-                offsetParentBCR.top += offsetParentEl.clientTop - offsetParentEl.scrollTop;\r
-                offsetParentBCR.left += offsetParentEl.clientLeft - offsetParentEl.scrollLeft;\r
-            }\r
-\r
-            return {\r
-                width: element.prop('offsetWidth'),\r
-                height: element.prop('offsetHeight'),\r
-                top: elBCR.top - offsetParentBCR.top,\r
-                left: elBCR.left - offsetParentBCR.left\r
-            };\r
-        },\r
-\r
-        /**\r
-         * Provides read-only equivalent of jQuery's offset function:\r
-         * http://api.jquery.com/offset/\r
-         */\r
-        offset: function (element) {\r
-            var boundingClientRect = element[0].getBoundingClientRect();\r
-            return {\r
-                width: element.prop('offsetWidth'),\r
-                height: element.prop('offsetHeight'),\r
-                top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),\r
-                left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)\r
-            };\r
-        },\r
-        \r
-         /**\r
-         * Provides functionality to check whether an element is in view port.\r
-         */\r
-        isElementInViewport: function (element) {\r
-            if (element) {\r
-                var rect = element[0].getBoundingClientRect();\r
-                return (\r
-                    rect.top >= 0 &&\r
-                    rect.left >= 0 &&\r
-                    rect.bottom <= ($window.innerHeight || $document[0].documentElement.clientHeight) &&\r
-                    rect.right <= ($window.innerWidth || $document[0].documentElement.clientWidth)\r
-                );\r
-            } else {\r
-                return false;\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('$isElement', [function () {\r
-    var isElement = function (currentElem, targetElem, alternateElem) {\r
-        if (currentElem[0] === targetElem[0]) {\r
-            return true;\r
-        } else if (currentElem[0] === alternateElem[0]) {\r
-            return false;\r
-        } else {\r
-            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);\r
-        }\r
-    };\r
-\r
-    return isElement;\r
-}])\r
-\r
-.directive('attPosition', ['$position', function ($position) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr) {\r
-            scope.$watchCollection(function () {\r
-                return $position.position(elem);\r
-            }, function (value) {\r
-                scope[attr.attPosition] = value;\r
-            });\r
-        }\r
-    };\r
-}]);\r
-\r
-angular.module('b2b.att.transition', [])\r
-\r
-.factory('$transition', ['$q', '$timeout', '$rootScope', function($q, $timeout, $rootScope) {\r
-\r
-  var $transition = function(element, trigger, options) {\r
-    options = options || {};\r
-    var deferred = $q.defer();\r
-    var endEventName = $transition[options.animation ? "animationEndEventName" : "transitionEndEventName"];\r
-\r
-    var transitionEndHandler = function() {\r
-      $rootScope.$apply(function() {\r
-        element.unbind(endEventName, transitionEndHandler);\r
-        deferred.resolve(element);\r
-      });\r
-    };\r
-\r
-    if (endEventName) {\r
-      element.bind(endEventName, transitionEndHandler);\r
-    }\r
-\r
-    // Wrap in a timeout to allow the browser time to update the DOM before the transition is to occur\r
-    $timeout(function() {\r
-      if ( angular.isString(trigger) ) {\r
-        element.addClass(trigger);\r
-      } else if ( angular.isFunction(trigger) ) {\r
-        trigger(element);\r
-      } else if ( angular.isObject(trigger) ) {\r
-        element.css(trigger);\r
-      }\r
-      //If browser does not support transitions, instantly resolve\r
-      if ( !endEventName ) {\r
-        deferred.resolve(element);\r
-      }\r
-    }, 100);\r
-\r
-    // Add our custom cancel function to the promise that is returned\r
-    // We can call this if we are about to run a new transition, which we know will prevent this transition from ending,\r
-    // i.e. it will therefore never raise a transitionEnd event for that transition\r
-    deferred.promise.cancel = function() {\r
-      if ( endEventName ) {\r
-        element.unbind(endEventName, transitionEndHandler);\r
-      }\r
-      deferred.reject('Transition cancelled');\r
-    };\r
-\r
-    return deferred.promise;\r
-  };\r
-\r
-  // Work out the name of the transitionEnd event\r
-  var transElement = document.createElement('trans');\r
-  var transitionEndEventNames = {\r
-    'WebkitTransition': 'webkitTransitionEnd',\r
-    'MozTransition': 'transitionend',\r
-    'OTransition': 'oTransitionEnd',\r
-    'transition': 'transitionend'\r
-  };\r
-  var animationEndEventNames = {\r
-    'WebkitTransition': 'webkitAnimationEnd',\r
-    'MozTransition': 'animationend',\r
-    'OTransition': 'oAnimationEnd',\r
-    'transition': 'animationend'\r
-  };\r
-  function findEndEventName(endEventNames) {\r
-    for (var name in endEventNames){\r
-      if (transElement.style[name] !== undefined) {\r
-        return endEventNames[name];\r
-      }\r
-    }\r
-  }\r
-  $transition.transitionEndEventName = findEndEventName(transitionEndEventNames);\r
-  $transition.animationEndEventName = findEndEventName(animationEndEventNames);\r
-  return $transition;\r
-}])\r
-\r
-.factory('$scrollTo', ['$window', function($window) {\r
-    var $scrollTo = function(offsetLeft, offsetTop, duration) {\r
-        TweenMax.to($window, duration || 1, {scrollTo: {y: offsetTop, x: offsetLeft}, ease: Power4.easeOut});\r
-    };\r
-    return $scrollTo;\r
-}])\r
-.factory('animation', function(){\r
-    return TweenMax;\r
-})\r
-.factory('$progressBar', function(){\r
-\r
-   //Provides a function to pass in code for closure purposes\r
-   var loadingAnimationCreator = function(onUpdateCallback){\r
-\r
-      //Use closure to setup some resuable code\r
-      var loadingAnimation = function(callback, duration){\r
-          TweenMax.to({}, duration, {\r
-              onUpdateParams: ["{self}"],\r
-              onUpdate: onUpdateCallback,\r
-              onComplete: callback\r
-          });\r
-      };\r
-      //Returns a function that takes a callback function and a duration for the animation\r
-      return (function(){\r
-        return loadingAnimation;\r
-      })();\r
-    };\r
-\r
-  return loadingAnimationCreator;\r
-})\r
-.factory('$height', function(){\r
-  var heightAnimation = function(element,duration,height,alpha){\r
-    TweenMax.to(element,\r
-      duration,\r
-      {height:height, autoAlpha:alpha},\r
-      0);\r
-  };\r
-  return heightAnimation;\r
-});\r
-angular.module('b2b.att.utilities', ['ngSanitize'])\r
-.constant('b2bUtilitiesConfig', {\r
-    prev: '37',\r
-    up: '38',\r
-    next: '39',\r
-    down: '40',\r
-    type: 'list',\r
-    columns: 1,\r
-    enableSearch: false,\r
-    searchTimer: 200,\r
-    circularTraversal: false\r
-})\r
-.constant('b2bWhenScrollEndsConstants', {\r
-    'threshold': 100,\r
-    'width': 0,\r
-    'height': 0\r
-})\r
-// All breakpoints ranges from >= min and < max\r
-.constant('b2bAwdBreakpoints', {\r
-    breakpoints: {\r
-        mobile: {\r
-            min: 1,\r
-            max: 768\r
-        },\r
-        tablet: {\r
-            min: 768,\r
-            max: 1025\r
-        },\r
-        desktop: {\r
-            min: 1025,\r
-            max: 1920\r
-        }\r
-    }\r
-})\r
-.filter('groupBy', function ($timeout) {\r
-    //Custom GroupBy Filter for treeNav, returns key string and value.childarray as set of grouped elements\r
-    return function (data, key) {\r
-        if (!key) return data;\r
-        var outputPropertyName = '__groupBy__' + key;\r
-        if (!data[outputPropertyName]) {\r
-            var result = {};\r
-            for (var i = 0; i < data.length; i++) {\r
-                if (!result[data[i][key]])\r
-                    result[data[i][key]] = {};\r
-                if (!result[data[i][key]].childArray) {\r
-                    result[data[i][key]].childArray = [];\r
-                }\r
-                result[data[i][key]].childArray.push(data[i]);\r
-                if (data[i].activeGrp && data[i].activeGrp == true) {\r
-                    console.log('make ' + data[i].grpChild + ' active');\r
-                    result[data[i][key]].showGroup = true;\r
-                }\r
-            }\r
-            Object.defineProperty(result, 'length', {enumerable: false,value: Object.keys(result).length});\r
-            Object.defineProperty(data, outputPropertyName, {enumerable: false,configurable: true,writable:false,value:result});\r
-            $timeout(function(){delete data[outputPropertyName];},0,false);\r
-        }\r
-        return data[outputPropertyName];\r
-    };\r
-})\r
-.filter('searchObjectPropertiesFilter', [function() {\r
-    return function(items, searchText, attrs) {\r
-        if(!searchText){\r
-            return items;\r
-        }\r
-        var filtered = [];\r
-        searchText = searchText.toLowerCase();\r
-        angular.forEach(items, function(item) {\r
-            angular.forEach(attrs, function(attr) {\r
-                if (item.hasOwnProperty(attr) && item[attr].toLowerCase().includes(searchText)) {\r
-                    filtered.push(item);\r
-                    return;\r
-                }\r
-            });\r
-        });\r
-        return filtered;\r
-    };\r
-}])\r
-.filter('unsafe',[ '$sce', function ($sce) { \r
-    return function(val){ \r
-       return $sce.trustAsHtml(val); \r
-    }; \r
-}])\r
-.filter('b2bHighlight', function () {\r
-    function escapeRegexp(queryToEscape) {\r
-        return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');\r
-    }\r
-    return function (matchItem, query, className) {\r
-        return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<span class=\"' + className + '\">$&</span>') : matchItem;\r
-    }\r
-})\r
-/*License (MIT)\r
-Copyright Â© 2013 Matt Diamond\r
-https://github.com/cwilso/AudioRecorder/blob/master/js/recorderjs/recorder.js\r
-*/\r
-.factory('b2bRecorder', function() {\r
-\r
-    var Recorder = function(source, cfg) {\r
-        var WORKER_PATH = 'recorderWorker.js';\r
-        var config = cfg || {};\r
-        var bufferLen = config.bufferLen || 4096;\r
-        this.context = source.context;\r
-        if(!this.context.createScriptProcessor) {\r
-            this.node = this.context.createJavacriptProcessor(bufferLen, 2, 2);\r
-        } else {\r
-            this.node = this.context.createScriptProcessor(bufferLen, 2, 2);\r
-        }\r
-        var workerCode = 'function init(a){sampleRate=a.sampleRate}function record(a){recBuffersL.push(a[0]),recBuffersR.push(a[1]),recLength+=a[0].length}function exportWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=mergeBuffers(recBuffersR,recLength),d=interleave(b,c),e=encodeWAV(d),f=new Blob([e],{type:a});this.postMessage(f)}function exportMonoWAV(a){var b=mergeBuffers(recBuffersL,recLength),c=encodeWAV(b,!0),d=new Blob([c],{type:a});this.postMessage(d)}function getBuffers(){var a=[];a.push(mergeBuffers(recBuffersL,recLength)),a.push(mergeBuffers(recBuffersR,recLength)),this.postMessage(a)}function clear(){recLength=0,recBuffersL=[],recBuffersR=[]}function mergeBuffers(a,b){for(var c=new Float32Array(b),d=0,e=0;e<a.length;e++)c.set(a[e],d),d+=a[e].length;return c}function interleave(a,b){for(var c=a.length+b.length,d=new Float32Array(c),e=0,f=0;e<c;)d[e++]=a[f],d[e++]=b[f],f++;return d}function floatTo16BitPCM(a,b,c){for(var d=0;d<c.length;d++,b+=2){var e=Math.max(-1,Math.min(1,c[d]));a.setInt16(b,e<0?32768*e:32767*e,!0)}}function writeString(a,b,c){for(var d=0;d<c.length;d++)a.setUint8(b+d,c.charCodeAt(d))}function encodeWAV(a,b){var c=new ArrayBuffer(44+2*a.length),d=new DataView(c);return writeString(d,0,"RIFF"),d.setUint32(4,32+2*a.length,!0),writeString(d,8,"WAVE"),writeString(d,12,"fmt "),d.setUint32(16,16,!0),d.setUint16(20,1,!0),d.setUint16(22,b?1:2,!0),d.setUint32(24,sampleRate,!0),d.setUint32(28,4*sampleRate,!0),d.setUint16(32,4,!0),d.setUint16(34,16,!0),writeString(d,36,"data"),d.setUint32(40,2*a.length,!0),floatTo16BitPCM(d,44,a),d}var recLength=0,recBuffersL=[],recBuffersR=[],sampleRate;this.onmessage=function(a){switch(a.data.command){case"init":init(a.data.config);break;case"record":record(a.data.buffer);break;case"exportWAV":exportWAV(a.data.type);break;case"exportMonoWAV":exportMonoWAV(a.data.type);break;case"getBuffers":getBuffers();break;case"clear":clear()}};';\r
-        var blob = new Blob([workerCode]);\r
-\r
-        var worker = new Worker(window.URL.createObjectURL(blob)); //TODO: Use a blob instead\r
-        worker.postMessage({\r
-            command: 'init',\r
-            config: {\r
-                sampleRate: this.context.sampleRate\r
-            }\r
-        });\r
-        var recording = false,\r
-            currCallback;\r
-\r
-        this.node.onaudioprocess = function(e) {\r
-            if (!recording) return;\r
-            worker.postMessage({\r
-                command: 'record',\r
-                buffer: [\r
-                    e.inputBuffer.getChannelData(0),\r
-                    e.inputBuffer.getChannelData(1)\r
-                ]\r
-            });\r
-        };\r
-\r
-        this.configure = function(cfg) {\r
-            for (var prop in cfg) {//TODO: look into using angular.extend() here\r
-                if (cfg.hasOwnProperty(prop)) {\r
-                    config[prop] = cfg[prop];\r
-                }\r
-            }\r
-        };\r
-\r
-        this.record = function() {\r
-            recording = true;\r
-        };\r
-\r
-        this.stop = function() {\r
-            recording = false;\r
-        };\r
-\r
-        this.clear = function() {\r
-            worker.postMessage({ command: 'clear' });\r
-            window.URL.revokeObjectURL(blob);\r
-        };\r
-\r
-        this.getBuffers = function(cb) {\r
-            currCallback = cb || config.callback;\r
-            worker.postMessage({ command: 'getBuffers' });\r
-        };\r
-\r
-        this.exportWAV = function(cb, type) {\r
-            currCallback = cb || config.callback;\r
-            type = type || config.type || 'audio/wav';\r
-            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');\r
-            worker.postMessage({\r
-                command: 'exportWAV',\r
-                type: type\r
-            });\r
-        };\r
-\r
-        this.exportMonoWAV = function(cb, type) {\r
-            currCallback = cb || config.callback;\r
-            type = type || config.type || 'audio/wav';\r
-            if (!currCallback) throw new Error('[b2bRecorder]: Callback not set!');\r
-            worker.postMessage({\r
-                command: 'exportMonoWAV',\r
-                type: type\r
-            });\r
-        };\r
-\r
-        worker.onmessage = function(e) {\r
-            var blob = e.data;\r
-            currCallback(blob);\r
-        };\r
-\r
-        source.connect(this.node);\r
-        this.node.connect(this.context.destination); // if the script node is not connected to an output the "onaudioprocess" event is not triggerd in Chrome\r
-\r
-    };\r
-\r
-    return Recorder;\r
-\r
-})\r
-.factory('b2bViewport', function() {\r
-  /* Source: https://gist.github.com/bjankord/2399828 */\r
-  var _viewportWidth = function() {\r
-    var vpw;\r
-    var webkit = (!(window.webkitConvertPointFromNodeToPage == null));\r
-    \r
-    // Webkit:\r
-    if ( webkit ) {\r
-      var vpwtest = document.createElement( "div" );\r
-      // Sets test div to width 100%, !important overrides any other misc. box model styles that may be set in the CSS\r
-      vpwtest.style.cssText = "width:100% !important; margin:0 !important; padding:0 !important; border:none !important;";\r
-      document.documentElement.insertBefore( vpwtest, document.documentElement.firstChild );\r
-      vpw = vpwtest.offsetWidth;\r
-      document.documentElement.removeChild( vpwtest );\r
-    }\r
-    // IE 6-8:\r
-    else if ( window.innerWidth === undefined ) { \r
-      vpw = document.documentElement.clientWidth; \r
-    }\r
-    // Other:\r
-    else{\r
-      vpw =  window.innerWidth;\r
-    }\r
-\r
-    return (vpw);\r
-  }\r
-  return {\r
-    viewportWidth: _viewportWidth\r
-  };\r
-})\r
-.directive('b2bWhenScrollEnds', function(b2bWhenScrollEndsConstants, $log) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, element, attrs) {\r
-            /**\r
-            * Exposed Attributes:\r
-            *       threshold - integer - number of pixels before scrollbar hits end that callback is called\r
-            *       width - integer - override for element's width (px)\r
-            *       height - integer - override for element's height (px)\r
-            *       axis - string - x/y for scroll bar axis\r
-            */\r
-            var threshold = parseInt(attrs.threshold, 10) || b2bWhenScrollEndsConstants.threshold;\r
-\r
-            if (!attrs.axis || attrs.axis === '') {\r
-                $log.warn('axis attribute must be defined for b2bWhenScrollEnds.');\r
-                return;\r
-            }\r
-\r
-            if (attrs.axis === 'x') {\r
-                visibleWidth = parseInt(attrs.width, 10) || b2bWhenScrollEndsConstants.width;\r
-                if (element.css('width')) {\r
-                    visibleWidth = element.css('width').split('px')[0];  \r
-                }\r
-\r
-                element[0].addEventListener('scroll', function() {\r
-                    var scrollableWidth = element.prop('scrollWidth');\r
-                    if (scrollableWidth === undefined) {\r
-                        scrollableWidth = 1;\r
-                    }\r
-                    var hiddenContentWidth = scrollableWidth - visibleWidth;\r
-\r
-                    if (hiddenContentWidth - element[0].scrollLeft <= threshold) {\r
-                        /* Scroll almost at bottom, load more rows */\r
-                        scope.$apply(attrs.b2bWhenScrollEnds);\r
-                    }\r
-                });\r
-            } else if (attrs.axis === 'y') {\r
-                visibleHeight = parseInt(attrs.height, 10) || b2bWhenScrollEndsConstants.height;\r
-                if (element.css('width')) {\r
-                    visibleHeight = element.css('height').split('px')[0]; \r
-                }\r
-\r
-                element[0].addEventListener('scroll', function() {\r
-                    var scrollableHeight = element.prop('scrollHeight');\r
-                    if (scrollableHeight === undefined) {\r
-                        scrollableHeight = 1;\r
-                    }\r
-                    var hiddenContentHeight = scrollableHeight - visibleHeight;\r
-\r
-                    if (hiddenContentHeight - element[0].scrollTop <= threshold) {\r
-                        /* Scroll almost at bottom, load more rows */\r
-                        scope.$apply(attrs.b2bWhenScrollEnds);\r
-                    }\r
-                });\r
-            }\r
-        }\r
-    };\r
-})\r
-\r
-.factory('$windowBind', ['$window', '$timeout', function($window, $timeout) {\r
-    var win = angular.element($window);\r
-    var _scroll = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    win.bind('scroll', callbackFunc);\r
-                } else {\r
-                    win.unbind('scroll', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var throttle = function(type, name, obj) {\r
-        obj = obj || window;\r
-        var running = false;\r
-        var func = function() {\r
-            if (running) { return; }\r
-            running = true;\r
-             requestAnimationFrame(function() {\r
-                obj.dispatchEvent(new CustomEvent(name));\r
-                running = false;\r
-            });\r
-        };\r
-        obj.addEventListener(type, func);\r
-    };\r
-\r
-    var _resize = function(callbackFunc, scope) {\r
-        throttle("resize", "optimizedResize");\r
-        window.addEventListener("optimizedResize", function(event) {\r
-            callbackFunc();\r
-            //win.bind(event, callbackFunc);\r
-            if (!scope.$$phase) {\r
-                scope.$digest();\r
-            }\r
-        });\r
-    };\r
-\r
-    var _click = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    win.bind('click', callbackFunc);\r
-                } else {\r
-                    win.unbind('click', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {\r
-        if (timeoutFlag) {\r
-            if (!(timeoutValue)) {\r
-                timeoutValue = 0;\r
-            }\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    $timeout(function () {\r
-                        if (newVal) {\r
-                            win.bind(event, callbackFunc);\r
-                        } else {\r
-                            win.unbind(event, callbackFunc);\r
-                        }\r
-                    }, timeoutValue);\r
-                }\r
-            });\r
-        } else {\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    if (newVal) {\r
-                        win.bind(event, callbackFunc);\r
-                    } else {\r
-                        win.unbind(event, callbackFunc);\r
-                    }\r
-                }\r
-            });\r
-        }\r
-    };\r
-\r
-    return {\r
-        click: _click,\r
-        scroll: _scroll,\r
-        event: _event, \r
-        resize: _resize\r
-    };\r
-}])\r
-\r
-.factory('keymap', function () {\r
-    return {\r
-        KEY: {\r
-            TAB: 9,\r
-            ENTER: 13,\r
-            ESC: 27,\r
-            SPACE: 32,\r
-            LEFT: 37,\r
-            UP: 38,\r
-            RIGHT: 39,\r
-            DOWN: 40,\r
-            SHIFT: 16,\r
-            CTRL: 17,\r
-            ALT: 18,\r
-            PAGE_UP: 33,\r
-            PAGE_DOWN: 34,\r
-            HOME: 36,\r
-            END: 35,\r
-            BACKSPACE: 8,\r
-            DELETE: 46,\r
-            COMMAND: 91\r
-        },\r
-        MAP: { 91 : "COMMAND", 8 : "BACKSPACE" , 9 : "TAB" , 13 : "ENTER" , 16 : "SHIFT" , 17 : "CTRL" , 18 : "ALT" , 19 : "PAUSEBREAK" , 20 : "CAPSLOCK" , 27 : "ESC" , 32 : "SPACE" , 33 : "PAGE_UP", 34 : "PAGE_DOWN" , 35 : "END" , 36 : "HOME" , 37 : "LEFT" , 38 : "UP" , 39 : "RIGHT" , 40 : "DOWN" , 43 : "+" , 44 : "PRINTSCREEN" , 45 : "INSERT" , 46 : "DELETE", 48 : "0" , 49 : "1" , 50 : "2" , 51 : "3" , 52 : "4" , 53 : "5" , 54 : "6" , 55 : "7" , 56 : "8" , 57 : "9" , 59 : ";", 61 : "=" , 65 : "A" , 66 : "B" , 67 : "C" , 68 : "D" , 69 : "E" , 70 : "F" , 71 : "G" , 72 : "H" , 73 : "I" , 74 : "J" , 75 : "K" , 76 : "L", 77 : "M" , 78 : "N" , 79 : "O" , 80 : "P" , 81 : "Q" , 82 : "R" , 83 : "S" , 84 : "T" , 85 : "U" , 86 : "V" , 87 : "W" , 88 : "X" , 89 : "Y" , 90 : "Z", 96 : "0" , 97 : "1" , 98 : "2" , 99 : "3" , 100 : "4" , 101 : "5" , 102 : "6" , 103 : "7" , 104 : "8" , 105 : "9", 106 : "*" , 107 : "+" , 109 : "-" , 110 : "." , 111 : "/", 112 : "F1" , 113 : "F2" , 114 : "F3" , 115 : "F4" , 116 : "F5" , 117 : "F6" , 118 : "F7" , 119 : "F8" , 120 : "F9" , 121 : "F10" , 122 : "F11" , 123 : "F12", 144 : "NUMLOCK" , 145 : "SCROLLLOCK" , 186 : ";" , 187 : "=" , 188 : "," , 189 : "-" , 190 : "." , 191 : "/" , 192 : "`" , 219 : "[" , 220 : "\\" , 221 : "]" , 222 : "'"\r
-        },\r
-        isControl: function (e) {\r
-            var k = e.keyCode;\r
-            switch (k) {\r
-            case this.KEY.COMMAND:\r
-            case this.KEY.SHIFT:\r
-            case this.KEY.CTRL:\r
-            case this.KEY.ALT:\r
-                return true;\r
-            default:;\r
-            }\r
-\r
-            if (e.metaKey) {\r
-                return true;\r
-            }\r
-\r
-            return false;\r
-        },\r
-        isFunctionKey: function (k) {\r
-            k = k.keyCode ? k.keyCode : k;\r
-            return k >= 112 && k <= 123;\r
-        },\r
-        isVerticalMovement: function (k) {\r
-            return ~[this.KEY.UP, this.KEY.DOWN].indexOf(k);\r
-        },\r
-        isHorizontalMovement: function (k) {\r
-            return ~[this.KEY.LEFT, this.KEY.RIGHT, this.KEY.BACKSPACE, this.KEY.DELETE].indexOf(k);\r
-        },\r
-        isAllowedKey: function (k) {\r
-            return (~[this.KEY.SPACE, this.KEY.ESC, this.KEY.ENTER].indexOf(k)) || this.isHorizontalMovement(k) || this.isVerticalMovement(k);\r
-        },\r
-        isNumericKey: function (e) {\r
-            var k = e.keyCode;\r
-            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105)) {\r
-                return true;\r
-            } else {\r
-                return false;\r
-            }\r
-        },\r
-        isAlphaNumericKey: function (e) {\r
-            var k = e.keyCode;\r
-            if ((k >= 48 && k <= 57) || (k >= 96 && k <= 105) || (k >= 65 && k <= 90)) {\r
-                return true;\r
-            } else {\r
-                return false;\r
-            }\r
-        }\r
-    };\r
-})\r
-\r
-.factory('$isElement', [function () {\r
-    var isElement = function (currentElem, targetElem, alternateElem) {\r
-        if (currentElem[0] === targetElem[0]) {\r
-            return true;\r
-        } else if (currentElem[0] === alternateElem[0]) {\r
-            return false;\r
-        } else {\r
-            return isElement((currentElem.parent()[0] && currentElem.parent()) || targetElem, targetElem, alternateElem);\r
-        }\r
-    };\r
-\r
-    return isElement;\r
-}])\r
-\r
-.factory('events', function () {\r
-    var _stopPropagation = function (evt) {\r
-        if (evt.stopPropagation) {\r
-            evt.stopPropagation();\r
-        } else {\r
-            evt.returnValue = false;\r
-        }\r
-    };\r
-    var _preventDefault = function (evt) {\r
-        if (evt.preventDefault) {\r
-            evt.preventDefault();\r
-        } else {\r
-            evt.returnValue = false;\r
-        }\r
-    }\r
-    return {\r
-        stopPropagation: _stopPropagation,\r
-        preventDefault: _preventDefault\r
-    };\r
-})\r
-\r
-\r
-.factory('$documentBind', ['$document', '$timeout', function ($document, $timeout) {\r
-    var _click = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    $document.bind('click', callbackFunc);\r
-                } else {\r
-                    $document.unbind('click', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _scroll = function (flag, callbackFunc, scope) {\r
-        scope.$watch(flag, function (val) {\r
-            $timeout(function () {\r
-                if (val) {\r
-                    $document.bind('scroll', callbackFunc);\r
-                } else {\r
-                    $document.unbind('scroll', callbackFunc);\r
-                }\r
-            });\r
-        });\r
-    };\r
-\r
-    var _event = function (event, flag, callbackFunc, scope, timeoutFlag, timeoutValue) {\r
-        if (timeoutFlag) {\r
-            if (!(timeoutValue)) {\r
-                timeoutValue = 0;\r
-            }\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    $timeout(function () {\r
-                        if (newVal) {\r
-                            $document.bind(event, callbackFunc);\r
-                        } else {\r
-                            $document.unbind(event, callbackFunc);\r
-                        }\r
-                    }, timeoutValue);\r
-                }\r
-            });\r
-        } else {\r
-            scope.$watch(flag, function (newVal, oldVal) {\r
-                if (newVal !== oldVal) {\r
-                    if (newVal) {\r
-                        $document.bind(event, callbackFunc);\r
-                    } else {\r
-                        $document.unbind(event, callbackFunc);\r
-                    }\r
-                }\r
-            });\r
-        }\r
-    };\r
-\r
-    return {\r
-        click: _click,\r
-        scroll: _scroll,\r
-        event: _event\r
-    };\r
-}])\r
-\r
-.directive('b2bOnlyNums', function (keymap) {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elm, attrs, ctrl) {\r
-            var maxChars = attrs.b2bOnlyNums ? attrs.b2bOnlyNums : 4;\r
-            elm.on('keydown', function (event) {\r
-                if ((event.which >= 48 && event.which <= 57) || (event.which >= 96 && event.which <= 105)) {\r
-                    // check for maximum characters allowed\r
-                    if (elm.val().length < maxChars){\r
-                        return true;\r
-                    } else {\r
-                        event.preventDefault();\r
-                        return false;\r
-                    }\r
-                } else if ([8, 9, 13, 27, 37, 38, 39, 40].indexOf(event.which) > -1) {\r
-                    // to allow backspace, tab, enter, escape, arrows\r
-                    return true;\r
-                } else if (event.altKey || event.ctrlKey) {\r
-                    // to allow alter, control, and shift keys\r
-                    return true;\r
-                } else {\r
-                    // to stop others\r
-                    event.preventDefault();\r
-                    return false;\r
-                }\r
-            });\r
-\r
-            var validateString = function (value) {\r
-                if (angular.isUndefined(value) || value === null || value === '') {\r
-                    return ctrl.$modelValue;\r
-                }\r
-                return value;\r
-            };\r
-            ctrl.$parsers.unshift(validateString);\r
-        }\r
-    }\r
-})\r
-\r
-.directive('b2bKeyupClick', [ function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr) {\r
-            var keyCode = [];\r
-            attr.$observe('b2bKeyupClick', function (value) {\r
-                if (value) {\r
-                    keyCode = value.split(',');\r
-                }\r
-            });\r
-            elem.bind('keydown keyup', function (ev) {\r
-                var keyCodeCondition = function () {\r
-                    var flag = false;\r
-                    if (!(ev.keyCode)) {\r
-                        if (ev.which) {\r
-                            ev.keyCode = ev.which;\r
-                        } else if (ev.charCode) {\r
-                            ev.keyCode = ev.charCode;\r
-                        }\r
-                    }\r
-                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {\r
-                        flag = true;\r
-                    }\r
-                    return flag;\r
-                };\r
-                if (ev.type === 'keydown' && keyCodeCondition()) {\r
-                    ev.preventDefault();\r
-                }\r
-                else if (ev.type === 'keyup' && keyCodeCondition()) {\r
-                    elem[0].click();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('b2bDOMHelper', function() {\r
-\r
-    var _isTabable = function(node) {\r
-        var element = angular.element(node);\r
-        var tagName = element[0].tagName.toUpperCase();\r
-\r
-        if (isHidden(element)) {\r
-            return false;\r
-        }\r
-        if (element.attr('tabindex') !== undefined) {\r
-            return (parseInt(element.attr('tabindex'), 10) >= 0);\r
-        }\r
-        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {\r
-            if (tagName === 'A' || tagName === 'AREA') {\r
-                // anchors/areas without href are not focusable\r
-                return (element[0].href !== '');\r
-            }\r
-            return !(element[0].disabled || element[0].readOnly);\r
-        }\r
-        return false;\r
-    };\r
-\r
-    function isValidChild(child) {\r
-        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';\r
-    }\r
-    \r
-    function isHidden(obj) {\r
-        var elem = angular.element(obj);\r
-        var elemStyle = undefined;\r
-        if(obj instanceof HTMLElement){\r
-            elemStyle = window.getComputedStyle(obj);\r
-        }\r
-        else {\r
-            elemStyle = window.getComputedStyle(obj[0]);\r
-        }\r
-        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || elemStyle.display === 'none' || elemStyle.visibility === 'hidden' || elem.css('visibility') === 'hidden';\r
-    }\r
-\r
-    function hasValidParent(obj) {\r
-        return (isValidChild(obj) && obj.parentElement.nodeName !== 'BODY');\r
-    }\r
-\r
-    function traverse(obj, fromTop) {\r
-        var obj = obj || document.getElementsByTagName('body')[0];\r
-        if (isValidChild(obj) && _isTabable(obj)) {\r
-            return obj;\r
-        }\r
-        // If object is hidden, skip it's children\r
-        if (isValidChild(obj) && isHidden(obj)) {\r
-            return undefined;\r
-        } \r
-        // If object is hidden, skip it's children\r
-        if (angular.element(obj).hasClass('ng-hide')) {\r
-            return undefined;\r
-        }  \r
-        if (obj.hasChildNodes()) {\r
-            var child;\r
-            if (fromTop) {\r
-                child = obj.firstChild;\r
-            } else {\r
-                child = obj.lastChild;\r
-            }\r
-            while(child) {\r
-                var res =  traverse(child, fromTop);\r
-                if(res){\r
-                    return res;\r
-                }\r
-                else{\r
-                    if (fromTop) {\r
-                        child = child.nextSibling;\r
-                    } else {\r
-                        child = child.previousSibling;\r
-                    }\r
-                }\r
-            }\r
-        }\r
-        else{\r
-            return undefined;\r
-        }\r
-    }\r
-\r
-    var _previousElement = function(el, isFocusable){\r
-\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        var parent = elem.parentElement;\r
-        var previousElem = undefined;\r
-\r
-        if(isFocusable) {\r
-            if (hasValidParent(elem)) {\r
-                var siblings = angular.element(parent).children();\r
-                if (siblings.length > 0) {\r
-                    // Good practice to splice out the elem from siblings if there, saving some time.\r
-                    // We allow for a quick check for jumping to parent first before removing. \r
-                    if (siblings[0] === elem) {\r
-                        // If we are looking at immidiate parent and elem is first child, we need to go higher\r
-                        var e = _previousElement(angular.element(elem).parent(), isFocusable);\r
-                        if (_isTabable(e)) {\r
-                            return e;\r
-                        }\r
-                    } else {\r
-                        // I need to filter myself and any nodes next to me from the siblings\r
-                        var indexOfElem = Array.prototype.indexOf.call(siblings, elem);\r
-                        siblings = Array.prototype.filter.call(siblings, function(item, itemIndex) {\r
-                            if (!angular.equals(elem, item) && itemIndex < indexOfElem) {\r
-                                return true;\r
-                            }\r
-                        });\r
-                    }\r
-                    // We need to search backwards\r
-                    for (var i = 0; i <= siblings.length-1; i++) {//for (var i = siblings.length-1; i >= 0; i--) {\r
-                        var ret = traverse(siblings[i], false);\r
-                        if (ret !== undefined) {\r
-                            return ret;\r
-                        }\r
-                    }\r
-\r
-                    var e = _previousElement(angular.element(elem).parent(), isFocusable);\r
-                    if (_isTabable(e)) {\r
-                        return e;\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            var siblings = angular.element(parent).children();\r
-            if (siblings.length > 1) {\r
-                // Since indexOf is on Array.prototype and parent.children is a NodeList, we have to use call()\r
-                var index = Array.prototype.indexOf.call(siblings, elem);\r
-                previousElem = siblings[index-1];\r
-            }\r
-        }\r
-        return previousElem;\r
-    };\r
-\r
-    var _lastTabableElement = function(el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, false);\r
-    };\r
-\r
-    var _firstTabableElement = function(el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, true);\r
-    };\r
-\r
-    var _isInDOM = function(obj) {\r
-      return document.documentElement.contains(obj);\r
-    }\r
-\r
-    return {\r
-        firstTabableElement: _firstTabableElement,\r
-        lastTabableElement: _lastTabableElement,\r
-        previousElement: _previousElement,\r
-        isInDOM: _isInDOM,\r
-        isTabable: _isTabable,\r
-        isHidden: isHidden\r
-    };\r
-})\r
-\r
-.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', function ($document, $isElement, DOMHelper, keymap) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var trapFocusInElement = function (flag) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        var firstTabableElement = angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        var lastTabableElement = angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        var trapKeyboardFocusInFirstElement = function (e) {\r
-            if (!e.keyCode) {\r
-                e.keyCode = e.which;\r
-            }\r
-\r
-            if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-                lastTabableElement[0].focus();\r
-                e.preventDefault(e);\r
-                e.stopPropagation(e);\r
-            }\r
-\r
-        };\r
-\r
-        var trapKeyboardFocusInLastElement = function (e) {\r
-            if (!e.keyCode) {\r
-                e.keyCode = e.which;\r
-            }\r
-\r
-            if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-                firstTabableElement[0].focus();\r
-                e.preventDefault(e);\r
-                e.stopPropagation(e);\r
-            }\r
-        };\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element) {\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (stackHead.prop('$$hashKey') === element.prop('$$hashKey')) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-.factory('DOMHelper', function () {\r
-\r
-    var _isTabable = function (node) {\r
-        var element = angular.element(node);\r
-        var tagName = element[0].tagName.toUpperCase();\r
-\r
-        if (isHidden(element)) {\r
-            return false;\r
-        }\r
-        if (element.attr('tabindex') !== undefined) {\r
-            return (parseInt(element.attr('tabindex'), 10) >= 0);\r
-        }\r
-        if (tagName === 'A' || tagName === 'AREA' || tagName === 'BUTTON' || tagName === 'INPUT' || tagName === 'TEXTAREA' || tagName === 'SELECT') {\r
-            if (tagName === 'A' || tagName === 'AREA') {\r
-                // anchors/areas without href are not focusable\r
-                return (element[0].href !== '');\r
-            }\r
-            return !(element[0].disabled || element[0].readOnly);\r
-        }\r
-        return false;\r
-    };\r
-\r
-    function isValidChild(child) {\r
-        return child.nodeType == 1 && child.nodeName != 'SCRIPT' && child.nodeName != 'STYLE';\r
-    }\r
-\r
-    function isHidden(obj) {\r
-        var elem = angular.element(obj);\r
-        var style;\r
-        try {\r
-            style = window.getComputedStyle(obj);\r
-        }\r
-        catch(err) {\r
-            style = window.getComputedStyle(obj[0]);\r
-        }\r
-\r
-        // getComputedStyle() for Zepto object returns null\r
-        if (style === null){\r
-            return elem.hasClass('ng-hide') || elem.css('display') === 'none';\r
-        }\r
-\r
-        return elem.hasClass('ng-hide') || elem.css('display') === 'none' || style.display === 'none' || style.display === 'hidden';\r
-    }\r
-\r
-    function traverse(obj, fromTop) {\r
-        var obj = obj || document.getElementsByTagName('body')[0];\r
-\r
-        if (isValidChild(obj) && _isTabable(obj)) {\r
-            return obj;\r
-        }\r
-\r
-        // If object is hidden, skip it's children\r
-        if (isValidChild(obj) && isHidden(obj)) {\r
-            return undefined;\r
-        }\r
-        // If object is hidden, skip it's children\r
-        if (angular.element(obj).hasClass('ng-hide')) {\r
-            return undefined;\r
-        }\r
-\r
-        if (obj.hasChildNodes()) {\r
-            var child;\r
-            if (fromTop) {\r
-                child = obj.firstChild;\r
-            } else {\r
-                child = obj.lastChild;\r
-            }\r
-            while (child) {\r
-                var res = traverse(child, fromTop);\r
-                if (res) {\r
-                    return res;\r
-                } else {\r
-                    if (fromTop) {\r
-                        child = child.nextSibling;\r
-                    } else {\r
-                        child = child.previousSibling;\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            return undefined;\r
-        }\r
-    }\r
-\r
-    var _lastTabableElement = function (el) {\r
-        /* This will return the last tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, false);\r
-    };\r
-\r
-    var _firstTabableElement = function (el) {\r
-        /* This will return the first tabable element from the parent el */\r
-        var elem = el;\r
-        if (el.hasOwnProperty('length')) {\r
-            elem = el[0];\r
-        }\r
-\r
-        return traverse(elem, true);\r
-    };\r
-\r
-    return {\r
-        firstTabableElement: _firstTabableElement,\r
-        lastTabableElement: _lastTabableElement,\r
-        isTabable: _isTabable\r
-    };\r
-})\r
-\r
-.factory('windowOrientation', ['$window', function ($window) {\r
-    var _isPotrait = function () {\r
-        if ($window.innerHeight > $window.innerWidth) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    };\r
-    var _isLandscape = function () {\r
-        if ($window.innerHeight < $window.innerWidth) {\r
-            return true;\r
-        } else {\r
-            return false;\r
-        }\r
-    };\r
-\r
-    return {\r
-        isPotrait: _isPotrait,\r
-        isLandscape: _isLandscape\r
-    };\r
-}])\r
-\r
-.directive('b2bNextElement', function() {\r
-  return {\r
-    restrict: 'A',\r
-    transclude: false,\r
-    link: function (scope, elem, attr, ctrls) {\r
-\r
-        var keys = attr.b2bNextElement.split(',');\r
-\r
-        elem.bind('keydown', function (e) {\r
-            var nextElement = elem.next();\r
-            if(e.keyCode == 39 || e.keyCode == 40){ // if e.keyCode in keys\r
-                if(nextElement.length) {\r
-                    e.preventDefault();\r
-                    nextElement[0].focus();\r
-                }\r
-            }\r
-        });\r
-    }\r
-  }\r
-})\r
-\r
-.directive('b2bAccessibilityClick', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var keyCode = [];\r
-            attr.$observe('b2bAccessibilityClick', function (value) {\r
-                if (value) {\r
-                    keyCode = value.split(',');\r
-                }\r
-            });\r
-            elem.bind('keydown keypress', function (ev) {\r
-                var keyCodeCondition = function () {\r
-                    var flag = false;\r
-                    if (!(ev.keyCode)) {\r
-                        if (ev.which) {\r
-                            ev.keyCode = ev.which; \r
-                        } else if (ev.charCode) {\r
-                            ev.keyCode = ev.charCode;\r
-                        }\r
-                    }\r
-                    if ((ev.keyCode && keyCode.indexOf(ev.keyCode.toString()) > -1)) {\r
-                        flag = true;\r
-                    }\r
-                    return flag;\r
-                };\r
-                if (keyCode.length > 0 && keyCodeCondition()) {\r
-                    elem[0].click();\r
-                    ev.preventDefault();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bReset', ['$compile', function ($compile) {\r
-        return {\r
-            restrict: 'A',\r
-            require: ['?ngModel', 'b2bReset'],\r
-            controller: ['$scope', function ($scope) {\r
-                var resetButton = angular.element('<button type="button" class="reset-field" tabindex="-1" aria-label="Click to reset" aria-hidden="true" role="button"></button>');\r
-\r
-                this.getResetButton = function () {\r
-                    return resetButton;\r
-                };\r
-            }],\r
-            link: function (scope, element, attrs, ctrls) {\r
-\r
-                var ngModelCtrl = ctrls[0];\r
-                var ctrl = ctrls[1];\r
-\r
-                var resetButton = ctrl.getResetButton();\r
-\r
-\r
-                resetButton.on('click', function () {\r
-                    element[0].value = '';\r
-\r
-                    if (ngModelCtrl) {\r
-                        if (attrs.b2bReset) {\r
-                            ngModelCtrl.$setViewValue(attrs.b2bReset);\r
-                        } else {\r
-                            ngModelCtrl.$setViewValue('');\r
-                        }\r
-                        element[0].value = ngModelCtrl.$viewValue;\r
-                        ngModelCtrl.$render();\r
-                        scope.$digest();\r
-                    }\r
-                    element[0].focus();\r
-                    element[0].select();\r
-                });\r
-\r
-                var addResetButton = function () {\r
-                    element.after(resetButton);\r
-                    element.unbind('focus input', addResetButton);\r
-                };\r
-\r
-                element.bind('focus input', addResetButton);\r
-            }\r
-        };\r
-    }])\r
-\r
-.directive('b2bPrevElement', ['b2bDOMHelper', 'keymap', function (b2bDOMHelper, keymap) {\r
-  return {\r
-    restrict: 'A',\r
-    transclude: false,\r
-    link: function (scope, elem, attr) {\r
-\r
-        elem.bind('keydown', function (e) {\r
-            if(e.keyCode == 37 || e.keyCode == 38){\r
-                var prev = b2bDOMHelper.previousElement(elem, false);\r
-                if(prev !== undefined) {\r
-                    e.preventDefault();\r
-                    prev.focus();\r
-                }\r
-            }\r
-        });\r
-    }\r
-  }\r
-}])\r
-/**\r
- * @param {integer} delay - Timeout before first and last focusable elements are found\r
- * @param {boolean} trigger - A variable on scope that will trigger refinding first/last focusable elements \r
- */\r
-.directive('b2bTrapFocusInsideElement', ['$timeout', 'b2bDOMHelper', 'keymap', 'events', function ($timeout, b2bDOMHelper, keymap, events) {\r
-    return {\r
-        restrict: 'A',\r
-        transclude: false,\r
-        link: function (scope, elem, attr) {\r
-\r
-            var delay = parseInt(attr.delay, 10) || 10;\r
-\r
-            /* Before opening modal, find the focused element */\r
-            var firstTabableElement = undefined,\r
-                lastTabableElement = undefined;\r
-                \r
-            function init() {\r
-                $timeout(function () {\r
-                    firstTabableElement = b2bDOMHelper.firstTabableElement(elem);\r
-                    lastTabableElement = b2bDOMHelper.lastTabableElement(elem);\r
-                    angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                    angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                }, delay, false);\r
-            }\r
-\r
-            if (attr.trigger !== undefined) {\r
-                scope.$watch('trigger', function() {\r
-                    if (scope.trigger) {\r
-                        init();\r
-                    }\r
-                });\r
-            }\r
-\r
-            var firstTabableElementKeyhandler = function(e) {\r
-                if (!e.keyCode) {\r
-                    e.keyCode = e.which;\r
-                }\r
-                if (e.keyCode === keymap.KEY.TAB && e.shiftKey) {\r
-                    if (attr.trapFocusInsideElement === 'true') {\r
-                        var temp = b2bDOMHelper.lastTabableElement(elem);\r
-                        if (lastTabableElement !== temp) {\r
-                            // Unbind keydown handler on lastTabableElement\r
-                            angular.element(lastTabableElement).unbind('keydown', lastTabableElementKeyhandler);\r
-                            lastTabableElement = temp;\r
-                            angular.element(lastTabableElement).bind('keydown', lastTabableElementKeyhandler);\r
-                        }\r
-                    }\r
-                    lastTabableElement.focus();\r
-                    events.preventDefault(e);\r
-                    events.stopPropagation(e);\r
-                }\r
-            };\r
-\r
-            var lastTabableElementKeyhandler = function(e) {\r
-                if (!e.keyCode) {\r
-                    e.keyCode = e.which;\r
-                }\r
-                if (e.keyCode === keymap.KEY.TAB && !e.shiftKey) {\r
-                    if (attr.trapFocusInsideElement === 'true') {\r
-                        var temp = b2bDOMHelper.firstTabableElement(elem);\r
-                        if (firstTabableElement !== temp) {\r
-                            // Unbind keydown handler on firstTabableElement\r
-                            angular.element(firstTabableElement).unbind('keydown', firstTabableElementKeyhandler);\r
-                            firstTabableElement = temp;\r
-                            angular.element(firstTabableElement).bind('keydown', firstTabableElementKeyhandler);\r
-                        }\r
-                    }\r
-                    firstTabableElement.focus();\r
-                    events.preventDefault(e);\r
-                    events.stopPropagation(e);\r
-                }\r
-            };\r
-\r
-            init();\r
-        }\r
-    };\r
-}])\r
-\r
-.factory('trapFocusInElement', ['$document', '$isElement', 'DOMHelper', 'keymap', '$interval', function ($document, $isElement, DOMHelper, keymap, $interval) {\r
-    var elementStack = [];\r
-    var stackHead = undefined;\r
-    var stopInterval = undefined;\r
-    var intervalRequired = false;\r
-    var interval = 1000;\r
-    var firstTabableElement, lastTabableElement;\r
-\r
-    var trapKeyboardFocusInFirstElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === true && e.keyCode === keymap.KEY.TAB) {\r
-            lastTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-\r
-    };\r
-\r
-    var trapKeyboardFocusInLastElement = function (e) {\r
-        if (!e.keyCode) {\r
-            e.keyCode = e.which;\r
-        }\r
-\r
-        if (e.shiftKey === false && e.keyCode === keymap.KEY.TAB) {\r
-            firstTabableElement[0].focus();\r
-            e.preventDefault(e);\r
-            e.stopPropagation(e);\r
-        }\r
-    };\r
-\r
-    var trapFocusInElement = function (flag, firstTabableElementParam, lastTabableElementParam) {\r
-        var bodyElements = $document.find('body').children();\r
-\r
-        firstTabableElement = firstTabableElementParam ? firstTabableElementParam : angular.element(DOMHelper.firstTabableElement(stackHead));\r
-        lastTabableElement = lastTabableElementParam ? lastTabableElementParam : angular.element(DOMHelper.lastTabableElement(stackHead));\r
-\r
-        if (flag) {\r
-            for (var i = 0; i < bodyElements.length; i++) {\r
-                if (bodyElements[i] !== stackHead[0]) {\r
-                    bodyElements.eq(i).attr('aria-hidden', true);\r
-                }\r
-            }\r
-            firstTabableElement.bind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.bind('keydown', trapKeyboardFocusInLastElement);\r
-        } else {\r
-            for (var j = 0; j < bodyElements.length; j++) {\r
-                if (bodyElements[j] !== stackHead[0]) {\r
-                    bodyElements.eq(j).removeAttr('aria-hidden');\r
-                }\r
-            }\r
-            firstTabableElement.unbind('keydown', trapKeyboardFocusInFirstElement);\r
-            lastTabableElement.unbind('keydown', trapKeyboardFocusInLastElement);\r
-        }\r
-\r
-        if (intervalRequired && flag) {\r
-            stopInterval = $interval(function () {\r
-                var firstTabableElementTemp = angular.element(DOMHelper.firstTabableElement(stackHead));\r
-                var lastTabableElementTemp = angular.element(DOMHelper.lastTabableElement(stackHead));\r
-                if (firstTabableElementTemp[0] !== firstTabableElement[0] || lastTabableElementTemp[0] !== lastTabableElement[0]) {\r
-                    $interval.cancel(stopInterval);\r
-                    stopInterval = undefined;\r
-                    trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                    trapFocusInElement(true, firstTabableElementTemp, lastTabableElementTemp);\r
-                }\r
-            }, interval);\r
-        } else {\r
-            if (stopInterval) {\r
-                $interval.cancel(stopInterval);\r
-                stopInterval = undefined;\r
-            }\r
-        }\r
-    };\r
-    var toggleTrapFocusInElement = function (flag, element, intervalRequiredParam, intervalParam) {\r
-        intervalRequired = intervalRequiredParam ? intervalRequiredParam : intervalRequired;\r
-        interval = intervalParam ? intervalParam : interval;\r
-        if (angular.isDefined(flag) && angular.isDefined(element)) {\r
-            if (flag && angular.isUndefined(stackHead)) {\r
-                stackHead = element;\r
-                trapFocusInElement(flag);\r
-            } else {\r
-                if (flag) {\r
-                    trapFocusInElement(false);\r
-                    elementStack.push(stackHead);\r
-                    stackHead = element;\r
-                    trapFocusInElement(true);\r
-                } else {\r
-                    if (angular.isDefined(stackHead) && (stackHead[0] === element[0])) {\r
-                        trapFocusInElement(false);\r
-                        stackHead = elementStack.pop();\r
-                        if (angular.isDefined(stackHead)) {\r
-                            trapFocusInElement(true);\r
-                        }\r
-                    }\r
-                }\r
-            }\r
-        } else {\r
-            if (angular.isDefined(stackHead)) {\r
-                trapFocusInElement(false, firstTabableElement, lastTabableElement);\r
-                trapFocusInElement(true);\r
-            }\r
-        }\r
-    };\r
-\r
-    return toggleTrapFocusInElement;\r
-}])\r
-\r
-.directive('b2bSetNextFocusOn', ['b2bDOMHelper', '$timeout', function(b2bDOMHelper, $timeout) {\r
-    return {\r
-        restrict: 'A',\r
-        scope: true,\r
-        link: function (scope, elem, attr) {\r
-            elem.bind('click', function(){\r
-                var firstFocusableElement = undefined; \r
-                var containerElem = undefined; \r
-                var containerArray = [];\r
-                var timeout = parseInt(attr.setNextFocusTimeout, 0) | 100;\r
-                var index = parseInt(attr.b2bSetNextFocusIndex, 0) | 0;\r
-\r
-                 /*\r
-                  *Fix for IE7 and lower \r
-                  *polyfill src: https://github.com/HubSpot/pace/issues/102\r
-                  */\r
-                if (!document.querySelectorAll) {\r
-                    document.querySelectorAll = function (selectors) {\r
-                        var style = document.createElement('style'), elements = [], element;\r
-                        document.documentElement.firstChild.appendChild(style);\r
-                        document._qsa = [];\r
-\r
-                        style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}';\r
-                        window.scrollBy(0, 0);\r
-                        style.parentNode.removeChild(style);\r
-\r
-                        while (document._qsa.length) {\r
-                            element = document._qsa.shift();\r
-                            element.style.removeAttribute('x-qsa');\r
-                            elements.push(element);\r
-                        }\r
-                        document._qsa = null;\r
-                        return elements;\r
-                    };\r
-                }\r
-\r
-                if (attr.b2bSetNextFocusOn === '') {\r
-                    return;\r
-                } else {\r
-                    containerArray = attr.b2bSetNextFocusOn.split(' ');\r
-                }\r
-                $timeout(function(){\r
-                    var i = 0;\r
-                    do { // cycles thru containerArray until finds a match in DOM to set focus to\r
-                        containerElem = document.querySelectorAll(containerArray[i])[index]; \r
-                        i++;\r
-                    } while ( (!containerElem) && (i < containerArray.length) );\r
-                    if(containerElem){\r
-                        if (!angular.isDefined(firstFocusableElement)) { \r
-                            firstFocusableElement = b2bDOMHelper.firstTabableElement(containerElem); \r
-                        }\r
-                        firstFocusableElement.focus(); \r
-                    }\r
-                }, timeout, false)\r
-            });\r
-        }\r
-\r
-    };\r
-}])\r
-\r
-.directive('b2bInputAllow', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var regexExpression = null;\r
-            attr.$observe('b2bInputAllow', function (value) {\r
-                if (value) {\r
-                    regexExpression = new RegExp(value);\r
-                }\r
-            });\r
-            var isValid = function(str) {\r
-                if (regexExpression !== null) {\r
-                    return regexExpression.test(str);\r
-                }\r
-                return false;\r
-            };\r
-            elem.bind('keypress', function($event) {\r
-                var charcode = String.fromCharCode($event.which || $event.keyCode);\r
-                if (!isValid(charcode)) {\r
-                    $event.preventDefault();\r
-                    $event.stopPropagation();\r
-                }\r
-            });\r
-            elem.bind('input', function (evt) {\r
-                var inputString = ctrl.$viewValue;\r
-                if (isValid(inputString)) {\r
-                    ctrl.$setViewValue(inputString);\r
-                    ctrl.$render();\r
-                    scope.$apply();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bInputDeny', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var regexExpression = null;\r
-            attr.$observe('b2bInputDeny', function (value) {\r
-                if (value) {\r
-                    regexExpression = new RegExp(value, 'g');\r
-                }\r
-            });\r
-            elem.bind('input', function () {\r
-                var inputString = ctrl.$viewValue && ctrl.$viewValue.replace(regexExpression, '');\r
-                if (inputString !== ctrl.$viewValue) {\r
-                    ctrl.$setViewValue(inputString);\r
-                    ctrl.$render();\r
-                    scope.$apply();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bDragonInput', [function() {\r
-    return {\r
-        restrict: 'A',\r
-        require: 'ngModel',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            elem.on('focus keyup', function(){\r
-                elem.triggerHandler('change');\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKey', ['b2bUtilitiesConfig', '$timeout', 'keymap', function (b2bUtilitiesConfig, $timeout, keymap) {\r
-    return {\r
-        restrict: 'EA',\r
-        controller: ['$scope', '$element', '$attrs', function ($scope, $element,attr) {\r
-            this.childElements = [];\r
-            this.disableNodes = {};\r
-            this.enableSearch = attr.enableSearch !== undefined ? true : b2bUtilitiesConfig.enableSearch;\r
-            this.circularTraversal = attr.circularTraversal !== undefined ? true : b2bUtilitiesConfig.circularTraversal;\r
-            this.counter = -1;\r
-            if (this.enableSearch) {\r
-                this.searchKeys = [];\r
-            }\r
-            var searchString = '';\r
-\r
-            var selfCtrl = this;\r
-\r
-            this.childElementsList = [];\r
-\r
-            this.b2bKeyID = "";\r
-\r
-            if (angular.isDefined(attr.b2bKey)) {\r
-                this.b2bKeyID = attr.b2bKey;\r
-            }\r
-\r
-            this.calculateChildElementsList = function () {\r
-                return $element[0].querySelectorAll("[b2b-key-item='" + this.b2bKeyID + "']:not([disabled])");\r
-            };\r
-\r
-            this.resetChildElementsList = function () {\r
-                return $timeout(function () {\r
-                    selfCtrl.childElementsList = selfCtrl.calculateChildElementsList();\r
-                });\r
-            };\r
-\r
-            this.resetChildElementsList();\r
-\r
-            $scope.$on('b2b-key-reset-child-elements-list', function () {\r
-                selfCtrl.resetChildElementsList();\r
-            });\r
-\r
-\r
-            this.registerElement = function (childElement, searchKey) {\r
-                this.childElements.push(childElement);\r
-                if (this.enableSearch) {\r
-                    this.searchKeys.push(searchKey);\r
-                }\r
-                var count = this.childElements.length - 1;\r
-                this.maxLength = count + 1;\r
-                return count;\r
-            };\r
-            this.toggleDisable = function (count, state) {\r
-                this.disableNodes[count] = state;\r
-            };\r
-            this.searchElement = function (searchExp) {\r
-                var regex = new RegExp("\\b" + searchExp, "gi");\r
-                var position = this.searchKeys.regexIndexOf(regex, this.counter + 1, true);\r
-                if (position > -1) {\r
-                    this.counter = position;\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.startTimer = function (time) {\r
-                if (searchString === '') {\r
-                    $timeout(function () {\r
-                        searchString = '';\r
-                    }, time);\r
-                }\r
-            };\r
-            this.resetCounter = function (count) {\r
-                this.counter = count;\r
-            };\r
-            this.moveNext = function (count) {\r
-                this.counter = (this.counter + count) < this.maxLength ? this.counter + count : (this.circularTraversal ? 0 : this.counter);\r
-                if (this.disableNodes[this.counter]) {\r
-                    if ((this.counter + count) < this.maxLength) {\r
-                        this.moveNext(count);\r
-                    }\r
-                } else {\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.movePrev = function (count) {\r
-                this.counter = (this.counter - count) > -1 ? this.counter - count : (this.circularTraversal ? this.maxLength-1 : this.counter);\r
-                if (this.disableNodes[this.counter]) {\r
-                    if ((this.counter - count) > -1) {\r
-                        this.movePrev(count);\r
-                    }\r
-                } else {\r
-                    this.moveFocus(this.counter);\r
-                }\r
-            };\r
-            this.moveFocus = function (index) {\r
-                this.childElements[index][0].focus();\r
-            };\r
-\r
-            this.keyDownHandler = function (ev, count) {\r
-                if (angular.isDefined(count) && !isNaN(count) && count !== this.counter) {\r
-                    this.resetCounter(count);\r
-                }\r
-                if (!ev.keyCode) {\r
-                    if (ev.which) {\r
-                        ev.keyCode = ev.which;\r
-                    } else if (ev.charCode) {\r
-                        ev.keyCode = ev.charCode;\r
-                    }\r
-                }\r
-                if (ev.keyCode) {\r
-                    if (this.prev && this.prev.indexOf(ev.keyCode.toString()) > -1) {\r
-                        this.movePrev(1);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (this.next && this.next.indexOf(ev.keyCode.toString()) > -1) {\r
-                        this.moveNext(1);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (this.up && this.up.indexOf(ev.keyCode.toString()) > -1) {\r
-                        if (this.type === 'table') {\r
-                            this.movePrev(this.columns);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    } else if (this.down && this.down.indexOf(ev.keyCode.toString()) > -1) {\r
-                        if (this.type === 'table') {\r
-                            this.moveNext(this.columns);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    } else if (ev.keyCode === keymap.KEY.HOME) {\r
-                        var firstIndex = 0;\r
-                        while (this.disableNodes[firstIndex] !== false) {\r
-                            firstIndex++;\r
-                        };\r
-                        var count = this.counter - firstIndex;\r
-                        this.movePrev(count);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode === keymap.KEY.END) {\r
-                        var lastIndex = this.childElements.length - 1;\r
-                        while (this.disableNodes[lastIndex] !== false) {\r
-                            lastIndex--;\r
-                        };\r
-                        var count = lastIndex - this.counter;\r
-                        this.moveNext(count);\r
-                        ev.preventDefault();\r
-                        ev.stopPropagation();\r
-                    } else if (ev.keyCode >= 48 && ev.keyCode <= 105) {\r
-                        if (this.enableSearch) {\r
-                            this.startTimer(b2bUtilitiesConfig.searchTimer);\r
-                            searchString = searchString + (keymap.MAP[ev.keyCode] || '');\r
-                            this.searchElement(searchString);\r
-                            ev.preventDefault();\r
-                            ev.stopPropagation();\r
-                        }\r
-                    }\r
-                }\r
-            };\r
-        }],\r
-        link: function (scope, elem, attr, ctrl) {\r
-            ctrl.prev = attr.prev ? attr.prev.split(',') : b2bUtilitiesConfig.prev.split(',');\r
-            ctrl.next = attr.next ? attr.next.split(',') : b2bUtilitiesConfig.next.split(',');\r
-            ctrl.type = attr.type ? attr.type : b2bUtilitiesConfig.type;\r
-            if (ctrl.type === 'table') {\r
-                ctrl.up = attr.up ? attr.up.split(',') : b2bUtilitiesConfig.up.split(',');\r
-                ctrl.down = attr.down ? attr.down.split(',') : b2bUtilitiesConfig.down.split(',');\r
-                ctrl.columns = attr.columns ? parseInt(attr.columns, 10) : b2bUtilitiesConfig.columns;\r
-            }\r
-\r
-            elem.bind('keydown', function (ev) {\r
-                ctrl.keyDownHandler(ev);\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKeyItem', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var parentCtrl = (elem.parent() && elem.parent().controller('b2bKey')) || undefined;\r
-            if (angular.isDefined(parentCtrl)) {\r
-                var count = parentCtrl.registerElement(elem, attr.searchKey);\r
-                elem.bind('keydown', function (ev) {\r
-                    parentCtrl.keyDownHandler(ev, count);\r
-                });\r
-                scope.$watch(attr.b2bKeyItem, function (value) {\r
-                    value = value === undefined ? true : value;\r
-                    parentCtrl.toggleDisable(count, !value); \r
-                });\r
-                scope.$on('$destroy', function () {\r
-                    parentCtrl.toggleDisable(count, true);\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bElementFocus', [function () {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            scope.$watch(attr.b2bElementFocus, function (value) {\r
-                if (value === true) {\r
-                    elem[0].focus();\r
-                }\r
-            });\r
-        }\r
-    };\r
-}])\r
-\r
-\r
-.directive('b2bAppendElement', ['$compile', function ($compile) {\r
-    return {\r
-        restrict: 'A',\r
-        link: function (scope, elem, attr, ctrl) {\r
-            var parameters = attr.b2bAppendElement.split(':');\r
-            if (parameters.length === 1) {\r
-                elem.append(scope.$eval(parameters[0]));\r
-            } else if (parameters.length === 2) {\r
-                if (parameters[1] === 'compile') {\r
-                    var element = angular.element('<span>' + scope.$eval(parameters[0]) + '</span>');\r
-                    elem.append($compile(element)(scope));\r
-                }\r
-            }\r
-\r
-        }\r
-    };\r
-}])\r
-\r
-.directive('b2bKeyItemRefreshInNgRepeat', [function () {\r
-    return {\r
-        restrict: 'EA',\r
-        require: '^^b2bKey',\r
-        link: function (scope, elem, attr, parentCtrl) {\r
-            if (angular.isDefined(parentCtrl)) {\r
-\r
-                var attrToObserve = 'attrToObserve';\r
-\r
-                if (attr.b2bKeyItemRefreshInNgRepeat) {\r
-                    attrToObserve = 'b2bKeyItemRefreshInNgRepeat';\r
-                }\r
-\r
-                attr.$observe(attrToObserve, function (newVal, oldVal) {\r
-                    if (newVal && newVal !== oldVal) {\r
-                        parentCtrl.resetChildElementsList();\r
-                    }\r
-                });\r
-            }\r
-        }\r
-    };\r
-}])\r
-\r
-.filter('b2bMultiSepartorHighlight', function($sce) {\r
-        return function(text, searchText, searchSeperator) {\r
-            var splitText = function(string) {\r
-                if(angular.isDefined(searchSeperator)){\r
-                    if (string.indexOf(searchSeperator) > -1) {\r
-                        return string.split(searchSeperator);\r
-                    } else {\r
-                        return string\r
-                    }\r
-                }else{\r
-                    return string;\r
-                }\r
-            }\r
-            if (text) {\r
-                var newText = splitText(text);\r
-                var newPhrase = splitText(searchText);\r
-                if (angular.isArray(newPhrase)) {\r
-                    for (var i = 0; i < newText.length; i++) {\r
-                        if (i <= 0) {\r
-                            text = newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),\r
-                                '<span class="b2b-search-hightlight">$1</span>');\r
-                        } else {\r
-                            text = text + searchSeperator + ' ' + (newPhrase[i] ? newText[i].replace(new RegExp('(' + newPhrase[i] + ')', 'gi'),\r
-                                '<span class="b2b-search-hightlight">$1</span>') : newText[i]);\r
-                        }\r
-                    }\r
-                } else {\r
-                    text = text.replace(new RegExp('(' + searchText + ')', 'gi'),\r
-                        '<span class="b2b-search-hightlight">$1</span>');\r
-                }\r
-            }\r
-            return $sce.trustAsHtml(text)\r
-        }\r
-    })\r
-    \r
-    .factory('b2bUserAgent', [function() {\r
-        var _isMobile = function() {\r
-            return /Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-        };\r
-        var _notMobile = function() {\r
-            return !/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\r
-        };\r
-        var _isIE = function() {\r
-            return /msie|trident/i.test(navigator.userAgent);\r
-        };\r
-        var _isFF = function() {\r
-            return /Firefox/.test(navigator.userAgent);\r
-        };\r
-        var _isChrome = function() {\r
-            return /Google Inc/.test(navigator.vendor);\r
-        };\r
-        var _isSafari = function() {\r
-            return /Safari/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent);\r
-        };\r
-\r
-        return {\r
-            isMobile: _isMobile,\r
-            notMobile: _notMobile,\r
-            isIE: _isIE,\r
-            isFF: _isFF,\r
-            isChrome: _isChrome,\r
-            isSafari: _isSafari\r
-        };\r
-    }])\r
-    .run(['$document', 'b2bUserAgent', function($document, b2bUserAgent) {\r
-        var html = $document.find('html').eq(0);\r
-        if (b2bUserAgent.isIE()) {\r
-            html.addClass('isIE');\r
-        } else {\r
-            html.removeClass('isIE');\r
-        }\r
-    }]);\r
-    \r
-\r
-(function () {\r
-    String.prototype.toSnakeCase = function () {\r
-        return this.replace(/([A-Z])/g, function ($1) {\r
-            return "-" + $1.toLowerCase();\r
-        });\r
-    };\r
-    var concat = function (character, times) {\r
-        character = character || '';\r
-        times = (!isNaN(times) && times) || 0;\r
-        var finalChar = '';\r
-        for (var i = 0; i < times; i++) {\r
-            finalChar += character;\r
-        }\r
-        return finalChar;\r
-    };\r
-\r
-    // direction: true for left and false for right\r
-    var pad = function (actualString, width, character, direction) {\r
-        actualString = actualString || '';\r
-        width = (!isNaN(width) && width) || 0;\r
-        character = character || '';\r
-        if (width > actualString.length) {\r
-            if (direction) {\r
-                return concat(character, (width - actualString.length)) + actualString;\r
-            } else {\r
-                return actualString + concat(character, (width - actualString.length));\r
-            }\r
-        }\r
-        return actualString;\r
-    };\r
-\r
-    String.prototype.lPad = function (width, character) {\r
-        return pad(this, width, character, true);\r
-    };\r
-\r
-    String.prototype.rPad = function (width, character) {\r
-        return pad(this, width, character, false);\r
-    };\r
-\r
-    if (!Array.prototype.indexOf) {\r
-        Array.prototype.indexOf = function (val) {\r
-            for (var index = 0; index < this.length; index++) {\r
-                if (this[index] === val) {\r
-                    return index;\r
-                }\r
-            }\r
-            return -1;\r
-        };\r
-    }\r
-\r
-    if (!Array.prototype.regexIndexOf) {\r
-        Object.defineProperty(Array.prototype, 'regexIndexOf', {\r
-            enumerable: false,\r
-            value: function (regex, startIndex, loop) {\r
-                startIndex = startIndex && startIndex > -1 ? startIndex : 0;\r
-                for (var index = startIndex; index < this.length; index++) {\r
-                    if (this[index].toString().match(regex)) {\r
-                        return index;\r
-                    }\r
-                }\r
-                if (loop) {\r
-                    for (var index = 0; index < startIndex; index++) {\r
-                        if (this[index].toString().match(regex)) {\r
-                            return index;\r
-                        }\r
-                    }\r
-                }\r
-                return -1;\r
-            }\r
-        })\r
-    }\r
-})();\r
-angular.module("b2bTemplate/audioPlayer/audioPlayer.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/audioPlayer/audioPlayer.html",\r
-    "<div class=\"b2b-audio\">\n" +\r
-    "   <audio preload=\"auto\">\n" +\r
-    "       <source ng-src=\"{{audio.mp3 | trustedAudioUrl}}\" type=\"audio/mp3\"></source>\n" +\r
-    "       <i>Your browser does not support the audio element.</i>\n" +\r
-    "    </audio>\n" +\r
-    "\n" +\r
-    "    <div audio-play-pause-icon class=\"controls-wrapper\" ng-click=\"toggleAudio()\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"{{isPlayInProgress?'pause':'play'}}\">\n" +\r
-    "       <i class=\"icoControls-pointer\" ng-show='!isPlayInProgress'></i>\n" +\r
-    "       <i class=\"icoControls-pause\" ng-show='isPlayInProgress'></i>\n" +\r
-    "    </div>\n" +\r
-    "\n" +\r
-    "    <div class=\"seek-bar-container-wrapper\">\n" +\r
-    "       <b2b-seek-bar min=\"0\" max=\"{{audio.duration}}\" step=\"1\" skip-interval=\"{{audio.timeShiftInSeconds}}\" no-aria-label ng-model=\"audio.currentTime\" on-drag-init=\"isAudioDragging=true\" on-drag-end=\"setAudioPosition(audio.currentTime)\"></b2b-seek-bar>\n" +\r
-    "       <div class=\"timing-container\">\n" +\r
-    "           <span class=\"timing-container-left\">{{timeFormatter(audio.currentTime)}}</span>\n" +\r
-    "           <span class=\"timing-container-right\">{{timeFormatter(audio.duration)}}</span>\n" +\r
-    "           <div class=\"timing-container-spacer\"></div>\n" +\r
-    "       </div>\n" +\r
-    "    </div>\n" +\r
-    "       \n" +\r
-    "    <b2b-flyout>\n" +\r
-    "       <div tabindex=\"0\" b2b-accessibility-click=\"13,32\" role=\"button\" aria-label=\"Volume pop-over. Volume set at {{audio.currentVolume}}%\" class=\"controls-wrapper audio-volume-control\" b2b-flyout-toggler>\n" +\r
-    "           <i class=\"icoControls-mutespeakers\" ng-show=\"audio.currentVolume === 0\"></i>\n" +\r
-    "           <i class=\"icoControls-volumedown\" ng-show=\"audio.currentVolume > 0 && audio.currentVolume <= 50\"></i>\n" +\r
-    "           <i class=\"icoControls-volumeup\" ng-show=\"audio.currentVolume > 50\"></i>\n" +\r
-    "       </div> \n" +\r
-    "       \n" +\r
-    "       <b2b-flyout-content horizontal-placement=\"center\" flyout-style=\"width:70px; height:190px;\" vertical-placement=\"above\">\n" +\r
-    "           <div class=\"b2b-audio-popover text-center\">\n" +\r
-    "               <span>Max</span>\n" +\r
-    "               <b2b-seek-bar min=\"0\" max=\"100\" step=\"1\" skip-interval=\"10\" vertical data-ng-model=\"audio.currentVolume\" class='volume-popover'></b2b-seek-bar>\n" +\r
-    "               <div class=\"min-label\">Min</div>\n" +\r
-    "           </div>\n" +\r
-    "       </b2b-flyout-content>\n" +\r
-    "   </b2b-flyout>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/audioRecorder/audioRecorder.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/audioRecorder/audioRecorder.html",\r
-    "<div class=\"b2b-audio-recorder row\">\n" +\r
-    "   <div class=\"b2b-elapsed-time span11\">\n" +\r
-    "       <div ng-if=\"isRecording\">\n" +\r
-    "           <span style=\"padding-right: 25px;\">{{config.whileRecordingMessage}}</span>\n" +\r
-    "           <span>{{timeFormatter(elapsedTime)}}</span>\n" +\r
-    "       </div>\n" +\r
-    "       <span ng-if=\"!isRecording\">{{config.startRecordingMessage}}</span>\n" +\r
-    "   </div>      \n" +\r
-    "   <div class=\"b2b-controls\" title=\"{{isRecording ? 'Stop' : 'REC'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"toggleRecording()\" role=\"button\">\n" +\r
-    "           <i ng-if=\"isRecording\" class=\"icoControls-stop\" ></i>\n" +\r
-    "           <i ng-if=\"!isRecording\" class=\"icoControls-record\"></i>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/backToTop/backToTop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/backToTop/backToTop.html",\r
-    "<button class=\"btn-arrow b2b-backtotop-button\" type=\"button\" aria-label=\"Back to top\">\n" +\r
-    "    <div class=\"btn-secondary b2b-top-btn\">\n" +\r
-    "        <i class=\"icoControls-upPRIMARY\" role=\"img\"></i>\n" +\r
-    "    </div>\n" +\r
-    "</button>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bAddBoard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bAddBoard.html",\r
-    "<div tabindex=\"0\" role=\"menuitem\" b2b-accessibility-click=\"13,32\" ng-click=\"addBoard()\" aria-label=\"Add Board\" class=\"boardstrip-item--add\">\n" +\r
-    "    <div class=\"centered\"><i aria-hidden=\"true\" class=\"icoControls-add-maximize\"></i> Add board</div>\n" +\r
-    "</div> ");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bBoard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bBoard.html",\r
-    "<li b2b-board-navigation tabindex=\"-1\" role=\"menuitem\" aria-label=\"{{boardLabel}} {{getCurrentIndex()===boardIndex?'selected':''}}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectBoard(boardIndex)\" class=\"board-item\" ng-class=\"{'selected': getCurrentIndex()===boardIndex}\">\n" +\r
-    "    <div ng-transclude></div>\n" +\r
-    "    <div class=\"board-caret\" ng-if=\"getCurrentIndex()===boardIndex\">\n" +\r
-    "        <div class=\"board-caret-indicator\"></div>\n" +\r
-    "        <div class=\"board-caret-arrow-up\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/boardstrip/b2bBoardstrip.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/boardstrip/b2bBoardstrip.html",\r
-    "<div class=\"b2b-boardstrip\">\n" +\r
-    "   <div class=\"boardstrip-reel\" role=\"menu\">\n" +\r
-    "       <div class=\"prev-items\">\n" +\r
-    "           <!-- <i tabindex=\"{{isPrevBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isPrevBoard()}\" role=\"menuitem\" aria-label=\"See previous boards\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" class=\"arrow icoControls-left\"></i> -->\n" +\r
-    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"prevBoard()\" ng-disabled=\"!isPrevBoard()\">\n" +\r
-    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-left\"></i>\n" +\r
-    "               </div>\n" +\r
-    "               <span class=\"offscreen-text\">Previous boards</span>\n" +\r
-    "           </button>\n" +\r
-    "       </div>\n" +\r
-    "       <div b2b-add-board on-add-board=\"onAddBoard()\"></div>\n" +\r
-    "       <div class=\"board-viewport\"><ul role=\"menu\" class=\"boardstrip-container\" ng-transclude></ul></div>\n" +\r
-    "       <div class=\"next-items\">\n" +\r
-    "           <!-- <i tabindex=\"{{isNextBoard() ? 0 : -1}}\" ng-class=\"{'disabled': !isNextBoard()}\" role=\"menuitem\" aria-label=\"See next boards\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" class=\"arrow icoControls-right\"></i> -->\n" +\r
-    "           <button class=\"btn-arrow arrow\" b2b-accessibility-click=\"13,32\" ng-click=\"nextBoard()\" ng-disabled=\"!isNextBoard()\">\n" +\r
-    "               <div class=\"btn btn-small btn-alt\"><i class=\"icon-primary-right\"></i>\n" +\r
-    "               </div>\n" +\r
-    "               <span class=\"offscreen-text\">Next boards</span>\n" +\r
-    "           </button>\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/calendar/datepicker-popup.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/calendar/datepicker-popup.html",\r
-    "<div id=\"datepicker\" class=\"datepicker dropdown-menu\" ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" style=\"display: block;\" aria-hidden=\"false\" role=\"dialog\" tabindex=\"-1\" b2b-key type=\"table\" columns=\"7\">\n" +\r
-    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +\r
-    "        <div ng-repeat=\"header in headers\" class=\"text-left\" style=\"width: 100%;\" b2b-append-element=\"header\"></div>\n" +\r
-    "        <table class=\"table-condensed\">\n" +\r
-    "            <thead>\n" +\r
-    "                <tr>\n" +\r
-    "                    <th id=\"prev\" class=\"prev\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Month\" role=\"button\" b2b-element-focus=\"!disablePrev && getFocus\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\" aria-hidden=\"true\"></i></th>\n" +\r
-    "                    <th id=\"month\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +\r
-    "                    <th id=\"next\" class=\"next\" tabindex=\"0\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && getFocus\" aria-label=\"Next Month\" role=\"button\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\" aria-hidden=\"true\"></i></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr ng-show=\"labels.length > 0\">\n" +\r
-    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </thead>\n" +\r
-    "            <tbody>\n" +\r
-    "                <tr ng-repeat=\"row in rows\">\n" +\r
-    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13\" b2b-element-focus=\"disablePrev && disableNext && getFocus && (dt.selected || dt.firstFocus || dt.fromDate || dt.dateRange)\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || dt.fromDate || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'EEEE, MMMM d') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true; trapFocus();\" ng-blur=\"currFocus=false; trapFocus();\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +\r
-    "                        <div aria-hidden=\"true\" tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label}}</div>{{(dt.focusable && dt.date | date : 'EEEE, MMMM d yyyy') || ''}}{{(dt.focusable && dt.dueDate && '. Bill-due-date.. ') || ''}}{{(dt.focusable && dt.pastDue && legendMessage) || ''}}</td>\n" +\r
-    "                </tr>\n" +\r
-    "            </tbody>\n" +\r
-    "            <tfoot>\n" +\r
-    "                <tr ng-repeat=\"footer in footers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"footer\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </tfoot>\n" +\r
-    "        </table>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/calendar/datepicker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/calendar/datepicker.html",\r
-    "<div>\n" +\r
-    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/coachmark/coachmark.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/coachmark/coachmark.html",\r
-    "<div class=\"b2b-coachmark-container\" tabindex=\"-1\" role=\"dialog\" aria-label=\"{{currentCoachmark.contentHeader}} {{currentCoachmark.content}} {{currentCoachmark.offscreenText}}\" ng-style=\"{'top':coackmarkElPos.top,'left':coackmarkElPos.left}\" aria-describeby=\"{{currentCoachmark}}\">\n" +\r
-    "   <i class=\"b2b-coachmark-caret\"></i>\n" +\r
-    "   <div class=\"b2b-coachmark-header\">\n" +\r
-    "       <div class=\"b2b-coachmark-countlabel\"><span ng-if=\"coachmarkIndex !== 0\">{{coachmarkIndex}} of {{(coachmarks.length-1)}}<span></div>\n" +\r
-    "       <div class=\"corner-button\">\n" +\r
-    "           <button type=\"button\" ng-focus=\"closeButtonFocus()\" class=\"close\" title=\"close\" aria-label=\"Close\" ng-click=\"closeCoachmark()\"></button>\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "   <div class=\"b2b-coachmark-content\">   \n" +\r
-    "       <i class=\"icon-misc-dimmer\"></i>\n" +\r
-    "       <div class=\"b2b-coachmark-content-header\"><span class=\"offscreen-text\">{{currentCoachmark.offscreenText}}</span>{{currentCoachmark.contentHeader}}</div>\n" +\r
-    "       <div class=\"b2b-coachmark-description\">{{currentCoachmark.content}}</div>\n" +\r
-    "       <div class=\"b2b-coachmark-btn-group\">\n" +\r
-    "           <a class=\"b2b-coachmark-link\" href=\"javascript:void(0)\" ng-if=\"currentCoachmark.linkLabel !== '' && currentCoachmark.linkLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.linkLabel)\">{{currentCoachmark.linkLabel}}</a>\n" +\r
-    "           <button class=\"btn btn-alt\" ng-if=\"currentCoachmark.buttonLabel !== '' && currentCoachmark.buttonLabel !== undefined\" ng-click=\"actionCoachmark(currentCoachmark.buttonLabel)\">{{currentCoachmark.buttonLabel}}</button>\n" +\r
-    "       </div>  \n" +\r
-    "   </div>  \n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownDesktop.html",\r
-    "<span b2b-key prev=\"38\" next=\"40\" enable-search ng-class=\"{'large': (dropdownSize === 'large'), 'disabled': (disabled), 'selectWrap': (isInputDropdown), 'selectorModule': (dropdownType === 'menu'), 'linkSelectorModule': (dropdownType === 'link-menu')}\">\n" +\r
-    "    <input b2b-dropdown-toggle b2b-dropdown-validation ng-disabled=\"disabled\" type=\"text\" id=\"{{dropdownId}}\" name=\"{{dropdownName}}\" class=\"awd-select isWrapped\" ng-required=\"dropdownRequired\" ng-model=\"currentSelected.text\" role=\"combobox\" aria-owns=\"listbox{{$id}}\" aria-expanded=\"{{toggleFlag}}\" ng-click=\"toggleDropdown()\" ng-focus=\"focused=true\" ng-blur=\"setBlur(); focused=false\" ng-class=\"{'active': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large'), 'focused':focused}\" style=\"width:100%;\" value=\"{{currentSelected.text}}\" ng-show=\"isInputDropdown\" aria-describedby=\"{{dropdownDescribedBy}}\" readonly=\"readonly\">\n" +\r
-    "    <button type=\"button\" b2b-dropdown-toggle ng-disabled=\"disabled\" class=\"selectModule\" aria-label=\"{{labelText}} {{currentSelected.label}}\" aria-expanded=\"{{toggleFlag}}\" aria-haspopup=\"true\" ng-click=\"toggleDropdown()\" ng-blur=\"setBlur()\" ng-class=\"{'active opened': toggleFlag, 'closed': !toggleFlag, 'large': (dropdownSize === 'large')}\" ng-bind-html=\"currentSelected.text\" ng-show=\"!isInputDropdown\"></button>\n" +\r
-    "    <div ng-class=\"{'selectWrapper': (isInputDropdown), 'moduleWrapper': (!isInputDropdown)}\">\n" +\r
-    "        <ul id=\"listbox{{$id}}\" role=\"{{isInputDropdown?'listbox':'menu'}}\" ng-class=\"{'awd-select-list': (isInputDropdown), 'awd-module-list': (!isInputDropdown)}\" tabindex=\"-1\" ng-show=\"toggleFlag\" aria-label=\"Choose options\"></ul>\n" +\r
-    "        <ul class=\"module-optinalcta\" ng-if=\"toggleFlag && optionalCta\" tabindex=\"-1\" aria-hidden=\"false\">\n" +\r
-    "            <li class=\"module-list-item\" tabindex=\"-1\" role=\"menuitem\" value=\"\" aria-label=\"Optinal CTA\" aria-selected=\"true\">\n" +\r
-    "                <span class=\"module-data\" b2b-append-element=\"optionalCta\"></span>\n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "</div>\n" +\r
-    "<i class=\"icon-primary-down\" aria-hidden=\"true\"></i>\n" +\r
-    "</span>    ");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownGroupDesktop.html",\r
-    "<li b2b-dropdown-group-desktop class=\"optgroup-wrapper\">{{groupHeader}}\n" +\r
-    "    <ul class=\"optgroup\" role=\"group\" aria-label=\"{{groupHeader}}\"></ul>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/dropdowns/b2bDropdownListDesktop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/dropdowns/b2bDropdownListDesktop.html",\r
-    "<li b2b-dropdown-list-desktop b2b-key-item b2b-accessibility-click=\"13\" aria-selected=\"{{currentSelected.value === dropdownListValue}}\" ng-class=\"{'awd-select-list-item': (isInputDropdown), 'module-list-item': (!isInputDropdown)}\" tabindex=\"0\" role=\"{{isInputDropdown?'option':'menuitem'}}\" ng-click=\"selectDropdownItem()\"></li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/fileUpload/fileUpload.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/fileUpload/fileUpload.html",\r
-    "<label class=\"b2b-file-container\">\n" +\r
-    "   <span class=\"b2b-upload-link\" ng-transclude></span>\n" +\r
-    "   <input type=\"file\" b2b-file-change>\n" +\r
-    "</label>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/flyout/flyout.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/flyout/flyout.html",\r
-    "<span class=\"b2b-flyout\"  b2b-flyout-trap-focus-inside>\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "</span>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/flyout/flyoutContent.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/flyout/flyoutContent.html",\r
-    "<div class=\"b2b-flyout-container\" aria-live=\"polite\" aria-atomic=\"false\" ng-class=\"{'b2b-flyout-left':horizontalPlacement==='left',\n" +\r
-    "                'b2b-flyout-center':horizontalPlacement==='center', \n" +\r
-    "                'b2b-flyout-right':horizontalPlacement==='right',\n" +\r
-    "                'b2b-flyout-centerLeft':horizontalPlacement==='centerLeft',\n" +\r
-    "                'b2b-flyout-centerRight':horizontalPlacement==='centerRight',  \n" +\r
-    "                'b2b-flyout-above':verticalPlacement==='above', \n" +\r
-    "                'b2b-flyout-below':verticalPlacement==='below',\n" +\r
-    "                'open-flyout': openFlyout,\n" +\r
-    "                'b2b-close-flyout': !openFlyout}\">\n" +\r
-    "    <i class=\"b2b-flyout-caret\" ng-class=\"{'open-flyout': openFlyout, \n" +\r
-    "                                   'b2b-flyout-caret-above':verticalPlacement==='above',\n" +\r
-    "                                   'b2b-flyout-caret-below':verticalPlacement==='below'}\"></i>\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/footer/footer_column_switch_tpl.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/footer/footer_column_switch_tpl.html",\r
-    "<div class=\"footer-columns \" ng-class=\"{'five-column':footerColumns===5, 'four-column':footerColumns===4, 'three-column':footerColumns===3}\" ng-repeat=\"item in footerLinkItems\">\n" +\r
-    "    <h3 class=\"b2b-footer-header\">{{item.categoryName}}</h3>\n" +\r
-    "    <ul>\n" +\r
-    "        <li ng-repeat=\"i in item.values\">\n" +\r
-    "            <a href=\"{{i.href}}\" title=\"{{item.categoryName}} - {{i.displayLink}}\">{{i.displayLink}}</a>  \n" +\r
-    "        </li>\n" +\r
-    "    </ul>\n" +\r
-    "\n" +\r
-    "</div>\n" +\r
-    "\n" +\r
-    "<div ng-transclude></div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/horizontalTable/horizontalTable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/horizontalTable/horizontalTable.html",\r
-    "<div class=\"b2b-horizontal-table\">\n" +\r
-    "    <div class=\"b2b-horizontal-table-arrows row span12\">\n" +\r
-    "       <div class=\"span4\">\n" +\r
-    "           <button class=\"btn-arrow left\" type=\"button\" ng-click=\"moveViewportLeft()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div>Previous Set</button>\n" +\r
-    "        </div>\n" +\r
-    "        \n" +\r
-    "        <span class=\"span5 b2b-horizontal-table-column-info\" aria-live=\"polite\" tabindex=\"-1\">\n" +\r
-    "           Displaying {{getColumnSet()[0]}} - {{getColumnSet()[1]}} of {{numOfCols}} (total) columns\n" +\r
-    "        </span>\n" +\r
-    "        \n" +\r
-    "        <div class=\"span3\">\n" +\r
-    "           <button class=\"btn-arrow right\" ng-click=\"moveViewportRight()\" ddh-accessibility-click=\"13,32\" ng-disabled=\"disableRight\" type=\"button\">Next Set<div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +\r
-    "       </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-horizontal-table-inner-container\">\n" +\r
-    "        <span ng-transclude></span>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpicker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpicker.html",\r
-    "<div class=\"hp-container\">\n" +\r
-    "    <div class=\"hp-selected\">\n" +\r
-    "        <div b2b-hourpicker-value=\"$index\" days=\"value.days\" start-time=\"value.startTime\" start-meridiem=\"value.startMeridiem\" end-time=\"value.endTime\" end-meridiem=\"value.endMeridiem\" ng-repeat=\"value in finalHourpickerValues\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div b2b-hourpicker-panel></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpickerPanel.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerPanel.html",\r
-    "<form name=\"{{'hourpickerForm' + $id}}\">\n" +\r
-    "    <div class=\"hp-checkbox\" role=\"group\">\n" +\r
-    "        <label class=\"checkbox\" for=\"checkbox_{{dayOption.title}}_{{$id}}\" aria-label=\"{{dayOption.title}}\" ng-repeat=\"dayOption in hourpicker.dayOptions\">\n" +\r
-    "            <input type=\"checkbox\" id=\"checkbox_{{dayOption.title}}_{{$id}}\" name=\"{{'hourpickerDays' + $id}}\" ng-model=\"hourpickerPanelValue.days[$index].value\" ng-disabled=\"dayOption.disabled\" /><i class=\"skin\"></i><span>{{dayOption.label}}</span>\n" +\r
-    "        </label>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-dropdowns\">\n" +\r
-    "        <div class=\"span4\">\n" +\r
-    "            <label for=\"{{'hourpickerStartTime' + $id}}\">From</label>\n" +\r
-    "            <select id=\"{{'hourpickerStartTime' + $parent.$id}}\" b2b-dropdown type=\"\" ng-model=\"hourpickerPanelValue.startTime\">\n" +\r
-    "                <option b2b-dropdown-list value=\"\">From</option>\n" +\r
-    "                <option b2b-dropdown-list option-repeat=\"startTimeOption in hourpicker.startTimeOptions\" value=\"{{startTimeOption}}\">{{startTimeOption}}</option>\n" +\r
-    "            </select>\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_AM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_AM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +\r
-    "            </label>\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerStartMeridiem_PM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerStartMeridiem_PM_{{$id}}\" name=\"{{'hourpickerStartMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.startMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +\r
-    "            </label>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-dropdowns\">\n" +\r
-    "        <div class=\"span4\">\n" +\r
-    "            <label for=\"{{'hourpickerEndTime' + $id}}\">To</label>\n" +\r
-    "            <select id=\"{{'hourpickerEndTime' + $parent.$id}}\" b2b-dropdown ng-model=\"hourpickerPanelValue.endTime\">\n" +\r
-    "                <option b2b-dropdown-list value=\"\">To</option>\n" +\r
-    "                <option b2b-dropdown-list option-repeat=\"endTimeOption in hourpicker.endTimeOptions\" value=\"{{endTimeOption}}\">{{endTimeOption}}</option>\n" +\r
-    "            </select>\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"span8 radio-buttons\" role=\"radiogroup\" aria-label=\"Select AM or PM\">\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_AM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_AM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"am\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>AM</span>\n" +\r
-    "            </label>\n" +\r
-    "            <label class=\"radio\" for=\"hourpickerEndMeridiem_PM_{{$id}}\">\n" +\r
-    "                <input type=\"radio\" id=\"hourpickerEndMeridiem_PM_{{$id}}\" name=\"{{'hourpickerEndMeridiem' + $id}}\" value=\"pm\" ng-model=\"hourpickerPanelValue.endMeridiem\" /><i class=\"skin\"></i><span>PM</span>\n" +\r
-    "            </label>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"row hp-buttons\">\n" +\r
-    "        <div class=\"span12\">\n" +\r
-    "            <div style=\"float:right\">\n" +\r
-    "                <button class=\"btn btn-secondary btn-small\" ng-click=\"resetHourpickerPanelValue()\">Clear</button>\n" +\r
-    "                <button class=\"btn btn-alt btn-small\" ng-disabled = \"disableAddBtn\" ng-click=\"updateHourpickerValue()\">{{hourpicker.editMode > -1 ? 'Update' : 'Add'}}</button>\n" +\r
-    "            </div>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "</form>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/hourPicker/b2bHourpickerValue.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/hourPicker/b2bHourpickerValue.html",\r
-    "<div class=\"selected-days\">\n" +\r
-    "    <span class=\"day\">{{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}</span>\n" +\r
-    "    <span style=\"float:right\">\n" +\r
-    "        <i class=\"icon-misc-pen\" role=\"button\" title=\"Edit {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"editHourpickerValue(hourpickerValue.index)\"></i>\n" +\r
-    "        <i class=\"icon-misc-trash\" role=\"button\" title=\"Delete {{hourpickerValue.days}} &nbsp; {{hourpickerValue.startTime}} {{hourpickerValue.startMeridiem}} - {{hourpickerValue.endTime}} {{hourpickerValue.endMeridiem}}\" tabindex=\"0\" b2b-accessibility-click=\"13,32\" ng-click=\"deleteHourpickerValue(hourpickerValue.index)\"></i>\n" +\r
-    "    </span>\n" +\r
-    "    <div style=\"clear:both\"></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/leftNavigation/leftNavigation.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/leftNavigation/leftNavigation.html",\r
-  "<div class=\"b2b-nav-menu\" ng-init=\"(showmenu = true)\" ng-class=\"{false: 'left-menu-collapsed'}[showmenu]\">\n" +\r
-    "    <div class=\"b2b-subnav-container\">\n" +\r
-    "        <ul class=\"b2b-subnav-content\">\n" +\r
-    "                   <li>" +\r
-    "                          <div ng-class=\"{true: 'leftmenu-arrow-expand', false: 'leftmenu-arrow-collapse'}[showmenu]\">"+        \r
-    "                                  <a ng-click=\"toggleDrawer(showmenu);(showmenu = !showmenu) \" class=\"text-right\">" +\r
-    "                                  <i ng-class=\"{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]\">&nbsp;</i></a>" +\r
-    "                          </div>"+                        \r
-    "                  </li>" +\r
-    "            <li ng-repeat=\"menu in menuData\" ui-sref=\"{{menu.state}}\">" +\r
-    "                          <span ng-class=\"{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]\"><span class=\"{{menu.imageSrc}}\"></span>&nbsp;&nbsp;</span>" +\r
-    "                          <a ng-class=\"{expand: isOpen($index)}\" ng-if=\"showmenu\"  aria-label=\"{{menu.name}}\" title=\" \" aria-expanded=\"{{(idx==$index)?true:false;}}\" href=\"javascript:void(0);\">" +\r
-    "                                  {{menu.name}}" +\r
-    "                                  <i aria-hidden=\"true\" ng-if=\"(menu.menuItems.length > 0)\" class=\"b2b-icon-primary-plus-minus\"ng-class=\"idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'\"></i>" +\r
-    "                          </a>\n" +\r
-    "                          <div role=\"region\" aria-hidden=\"{{(isOpen($index))?false:true;}}\">\n" +\r
-    "                  <ul ng-class=\"{expand: idx==$index}\">\n" +\r
-    "                            <li ng-repeat=\"menuItem in menu.menuItems\" ng-click=\"liveLink($event, $index, $parent.$index)\"><a aria-hidden=\"{{!(idx==$parent.$index)}}\" aria-label=\"{{menuItem.name}}\" title=\" \" href=\"{{menuItem.href}}\" tabindex=\"{{(idx==$parent.$index)?0:-1;}}\" ng-class=\"{active: itemIdx==$index && navIdx==$parent.$index}\">{{menuItem.name}}</a></li>\n" +\r
-    "                          </ul>\n" +\r
-    "                          </div>\n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/listbox/listbox.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/listbox/listbox.html",\r
-    "<div class=\"b2b-list-box\" tabindex=\"0\" role=\"listbox\" ng-transclude>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/modalsAndAlerts/b2b-backdrop.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-backdrop.html",\r
-    "<div class=\"b2b-modal-backdrop fade in hidden-by-modal\" aria-hidden=\"true\" tabindex=\"-1\"></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/modalsAndAlerts/b2b-window.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/modalsAndAlerts/b2b-window.html",\r
-    "<div class=\"modalwrapper active {{windowClass}}\" ng-class=\"{'modal-landscape': isModalLandscape}\" role=\"{{isNotifDialog?'alertdialog':'dialog'}}\" tabindex=\"-1\" aria-labelledby=\"{{title}}\" aria-describedby=\"{{content}}\">\n" +\r
-    "    <div class=\"modal fade in {{sizeClass}}\" ng-transclude></div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelector-popup.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelector-popup.html",\r
-    "<div id=\"monthselector{{$id}}\" class=\"datepicker dropdown-menu monthselector\" \n" +\r
-    "     ng-class=\"{'datepicker-dropdown datepicker-orient-top': !inline, 'datepicker-orient-left': !inline && orientation === 'left', 'datepicker-orient-right': !inline && orientation === 'right'}\" \n" +\r
-    "     ng-style=\"{position: inline && 'relative', 'z-index': inline && '0', top: !inline && position.top + 'px' || 0, left: !inline && position.left + 'px'}\" \n" +\r
-    "     style=\"display: block;\" aria-hidden=\"false\" role=\"dialog presentation\" tabindex=\"-1\">\n" +\r
-    "    <div class=\"datepicker-days\" style=\"display: block;\">\n" +\r
-    "        <span class=\"offscreen-text\" aria-live=\"polite\" aria-atomic=\"true\">{{title}} displaying</span>\n" +\r
-    "        <table class=\"table-condensed\" role=\"grid\">\n" +\r
-    "            <thead>\n" +\r
-    "                <tr ng-repeat=\"header in headers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" style=\"width: 278px;\" b2b-append-element=\"header\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr>\n" +\r
-    "                    <th id=\"prev{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Previous Year\" ng-class=\"{'prev': !disablePrev}\" ng-style=\"{visibility: visibilityPrev}\" ng-click=\"!disablePrev && move(-1,$event)\"><i class=\"icon-primary-left\"></i></th>\n" +\r
-    "                    <th id=\"year{{$id}}\" role=\"heading\" tabindex=\"-1\" aria-label=\"{{title}}\" class=\"datepicker-switch b2b-monthSelector-label\" colspan=\"{{rows[0].length - 2}}\">{{title}}</th>\n" +\r
-    "                    <th id=\"next{{$id}}\" role=\"button\" tabindex=\"0\" b2b-accessibility-click=\"13\" aria-label=\"Next Year\" ng-class=\"{'next': !disableNext}\" ng-style=\"{visibility: visibilityNext}\" ng-click=\"!disableNext && move(1,$event)\"><i class=\"icon-primary-right\"></i></th>\n" +\r
-    "                </tr>\n" +\r
-    "                <tr ng-show=\"labels.length > 0\">\n" +\r
-    "                    <th id=\"{{label.post}}\" class=\"dow\" ng-repeat=\"label in labels\" aria-hidden=\"true\"><span aria-hidden=\"true\">{{label.pre}}</span></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </thead>\n" +\r
-    "            <tbody b2b-key type=\"table\" columns=\"4\" >\n" +\r
-    "                <tr ng-repeat=\"row in rows\">\n" +\r
-    "                    <td headers=\"{{dt.header}}\" b2b-key-item=\"dt.focusable\" b2b-accessibility-click=\"13,32\" tabindex=\"{{(!(dt.focusable && (dt.selected || dt.firstFocus || currFocus)) && -1) || 0}}\" aria-hidden=\"{{(!dt.focusable && true) || false}}\" role=\"{{(dt.focusable && 'gridcell') || ''}}\" aria-label=\"{{(dt.focusable && dt.date | date : 'MMMM, y') || ''}}\" aria-selected=\"{{(dt.focusable && (dt.selected || dt.dateRange) && true) || false}}\" ng-repeat=\"dt in row\" class=\"day magic\" ng-class=\"{'active': dt.focusable && dt.selected && !dt.dateRange, 'start-date': dt.focusable && dt.fromDate && dt.dateRange, 'between-date': dt.focusable && !dt.fromDate && !dt.selected && dt.dateRange, 'end-date': dt.focusable && dt.selected && dt.dateRange, 'old': dt.oldMonth, 'new': dt.nextMonth, 'disabled': dt.disabled, 'due-date': dt.dueDate, 'late-fee': dt.pastDue}\" ng-focus=\"currFocus=true\" ng-blur=\"currFocus=false\" title=\"{{(dt.focusable && dt.pastDue && legendMessage) || ''}}\" b2b-element-focus=\"inline && dt.focusable && dt.selected && !dt.dateRange\" ng-click=\"!ngDisabled && !dt.disabled && select(dt.date)\">\n" +\r
-    "                        <div aria-hidden=\"true\"  tabindex=\"-1\" class=\"show-date\" ng-if=\"!(dt.oldMonth || dt.nextMonth)\">{{dt.label | limitTo: 3}}</div>\n" +\r
-    "                    </td>\n" +\r
-    "                </tr>\n" +\r
-    "            </tbody>\n" +\r
-    "            <tfoot>\n" +\r
-    "                <tr ng-repeat=\"footer in footers\">\n" +\r
-    "                    <th colspan=\"7\" class=\"text-left\" b2b-append-element=\"footer\"></th>\n" +\r
-    "                </tr>\n" +\r
-    "            </tfoot>\n" +\r
-    "        </table>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelector.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelector.html",\r
-    "<div>\n" +\r
-    "    <span class=\"icon-primary-calendar span12\" ng-class=\"{'disabled': ngDisabled}\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/monthSelector/monthSelectorLink.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/monthSelector/monthSelectorLink.html",\r
-    "<div>\n" +\r
-    "    <span class=\"span12\" ng-transclude></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/pagination/b2b-pagination.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/pagination/b2b-pagination.html",\r
-    "<div class=\"b2b-pager\">\n" +\r
-    "    <div ng-if=\"notMobile && totalPages > 1\">\n" +\r
-    "        <a tabindex=\"{{currentPage <= 1 ? -1 : 0 }}\" class=\"b2b-pager__item--prev\" b2b-accessibility-click=\"13,32\" title=\"Previous Page\" ng-click=\"prev($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage <= 1 ? 'b2b-pager__item--prev-disabled': '' \">\n" +\r
-    "            <i class=\"icon-primary-left\"></i>\n" +\r
-    "        </a>\n" +\r
-    "        <a tabindex=\"{{currentPage === 1 ? -1 : 0}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 1}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 1{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(1, $event)\">\n" +\r
-    "            1<span class=\"offscreen-text\" ng-if=\"currentPage === 1\"> is selected</span>\n" +\r
-    "        </a>\n" +\r
-    "        <a tabindex=\"{{currentPage === 2 ? -1 : 0}}\" aria-selected=\"{{checkSelectedPage(page)}}\" ng-class=\"{'b2b-pager__item--noclick': currentPage === 2}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page 2{{checkSelectedPage(page) ? ' selected' : '' }}\" ng-if=\"totalPages > 10 && currentPage > 6\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(2, $event)\">2<span class=\"offscreen-text\" ng-if=\"currentPage === 2\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage > 6\">...</span>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"!checkSelectedPage(page) && selectPage(page, $event)\">{{page}}<span class=\"offscreen-text\" ng-if=\"currentPage === page\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <span class=\"b2b-pager__item\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\">...</span>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': checkSelectedPage(page)}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages-1}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages-1, $event)\">{{totalPages-1}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages-1\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{currentPage === totalPages ? -1 : 0}}\" href=\"javascript:void(0)\" ng-class=\"{'b2b-pager__item--noclick': currentPage === totalPages}\" aria-selected=\"{{checkSelectedPage(page)}}\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{totalPages}}\" ng-if=\"totalPages > 10 && currentPage <= totalPages - 5\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(totalPages, $event)\">{{totalPages}}<span class=\"offscreen-text\" ng-if=\"currentPage === totalPages\"> is selected</span></a>\n" +\r
-    "\n" +\r
-    "        <a tabindex=\"{{currentPage >= totalPages ? -1 : 0 }}\" href=\"javascript:void(0)\" class=\"b2b-pager__item--next\" b2b-accessibility-click=\"13,32\" title=\"Next Page\" ng-click=\"next($event)\" ng-if=\"totalPages > 10\" ng-class=\"currentPage >= totalPages ? 'b2b-pager__item--next-disabled' :'' \">\n" +\r
-    "            <i class=\"icon-primary-right\"></i>\n" +\r
-    "        </a>\n" +\r
-    "        \n" +\r
-    "        <span class=\"fieldLabel\" ng-show=\"totalPages > 10 && showInput === true\">    \n" +\r
-    "            <label for=\"{{inputId}}\">Go to Page:</label>\n" +\r
-    "            <input id=\"{{inputId}}\" class=\"b2b-pager__item--input\" type=\"number\" ng-blur=\"onfocusOut($event)\" ng-focus=\"onfocusIn($event)\" ng-keypress=\"gotoKeyClick($event)\" b2b-only-nums=\"4\" ng-model=\"$parent.gotoPage\" />\n" +\r
-    "            <button class=\"btn-arrow\" ng-click=\"gotoBtnClick()\" ng-disabled=\"$parent.gotoPage !== 0 || $parent.gotoPage !== undefined\" aria-label=\"Go to\">\n" +\r
-    "                <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "                    <i class=\"icon-primary-right\"></i>\n" +\r
-    "                </div>\n" +\r
-    "            </button>\n" +\r
-    "        </span>\n" +\r
-    "    </div>\n" +\r
-    "    <div ng-if=\"isMobile && totalPages > 1\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\" ng-class=\"isMobile ? 'b2b-mobile-view': '' \">\n" +\r
-    "        <a tabindex=\"{{checkSelectedPage(page) ? -1 : 0}}\" href=\"javascript:void(0)\" class=\"b2b-pager__item b2b-pager__item--link\" title=\"Page {{page}}\" b2b-element-focus=\"isFocused(page)\" ng-repeat=\"page in pages\" ng-class=\"{'b2b-pager__item--active': checkSelectedPage(page), fade1: ($index == 0 && currentPage > meanVal+1),  fade2: ($index == 1 && currentPage > meanVal+1), fadesl: ($index == pages.length-2 && currentPage < totalPages - meanVal),  fadel: ($last && currentPage < totalPages - meanVal), 'b2b-pager__item--noclick': checkSelectedPage(page)}\" b2b-accessibility-click=\"13,32\" ng-click=\"selectPage(page, $event)\">{{page}}</a>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/paneSelector/paneSelector.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/paneSelector/paneSelector.html",\r
-    "<div class=\"panes\" ng-transclude></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/paneSelector/paneSelectorPane.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/paneSelector/paneSelectorPane.html",\r
-    "<div class=\"pane-block\" ng-transclude></div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/profileCard/profileCard-addUser.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/profileCard/profileCard-addUser.html",\r
-    "<div  class=\"span3 b2b-profile-card b2b-add-user\">\n" +\r
-    "    <div class=\"atcenter\">\n" +\r
-    "        <div class=\"circle\"><i class=\"icon-primary-add-maximize\"></i></div>\n" +\r
-    "        <div>Create new user</div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/profileCard/profileCard.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/profileCard/profileCard.html",\r
-    "<div class=\"span3 b2b-profile-card\">\n" +\r
-    "    <div class=\"top-block\">\n" +\r
-    "       <div class=\"profile-image\">\n" +\r
-    "            <img ng-if=\"image\" profile-name=\"{{profile.name}}\" ng-src=\"{{profile.img}}\" alt=\"{{profile.name}}\">\n" +\r
-    "            <span ng-if=\"!image\" class=\"default-img\">{{initials}}</span>\n" +\r
-    "\n" +\r
-    "            <h4 class=\"name\">{{profile.name}}</h4>\n" +\r
-    "\n" +\r
-    "            <p class=\"status\">\n" +\r
-    "                <span class=\"status-icon\" ng-class=\"{'status-green':colorIcon==='green','status-red':colorIcon==='red','status-blue':colorIcon==='blue','status-yellow':colorIcon==='yellow'}\">   \n" +\r
-    "                </span>\n" +\r
-    "                <span>{{profile.state}}<span ng-if=\"badge\" class=\"status-badge\">Admin</span></span>\n" +\r
-    "            </p>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"bottom-block\">\n" +\r
-    "         <div class=\"profile-details\">\n" +\r
-    "            <label>Username</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.userName)\" ng-mouseover=\"showUserNameTooltip = true;\" ng-mouseleave=\"showUserNameTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.userName)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showUserNameTooltip\">\n" +\r
-    "                    {{profile.userName.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"arrow\"></div>\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.userName}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.userName)\">\n" +\r
-    "                {{profile.userName}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Email</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.email)\" ng-mouseover=\"showEmailTooltip = true;\" ng-mouseleave=\"showEmailTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.email)\" class=\"tooltip\" data-placement=\"bottom\" b2b-tooltip show-tooltip=\"showEmailTooltip\">\n" +\r
-    "                    {{profile.email.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"arrow\"></div>\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.email}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.email)\">\n" +\r
-    "                {{profile.email}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Role</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.role)\" ng-mouseover=\"showRoleTooltip = true;\" ng-mouseleave=\"showRoleTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.role)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showRoleTooltip\">\n" +\r
-    "                    {{profile.role.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.role}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.role)\">\n" +\r
-    "                {{profile.role}}\n" +\r
-    "            </div>\n" +\r
-    "            <label>Last login</label>\n" +\r
-    "            <div ng-if=\"shouldClip(profile.lastLogin)\" ng-mouseover=\"showLastLoginTooltip = true;\" ng-mouseleave=\"showLastLoginTooltip = false;\">\n" +\r
-    "                <div ng-if=\"shouldClip(profile.lastLogin)\" class=\"tooltip\" b2b-tooltip show-tooltip=\"showLastLoginTooltip\">\n" +\r
-    "                    {{profile.lastLogin.slice(0, 25)+'...'}}\n" +\r
-    "                    <div class=\"tooltip-wrapper\" role=\"tooltip\" aria-live=\"polite\" aria-atomic=\"false\" style=\"z-index:1111\">\n" +\r
-    "                        <div class=\"tooltip-size-control\">\n" +\r
-    "                            <div class=\"helpertext\" tabindex=\"-1\" role=\"tooltip\">\n" +\r
-    "                                {{profile.lastLogin}}\n" +\r
-    "                            </div>\n" +\r
-    "                        </div>\n" +\r
-    "                    </div>\n" +\r
-    "                </div>\n" +\r
-    "            </div>\n" +\r
-    "            <div ng-if=\"!shouldClip(profile.lastLogin)\">\n" +\r
-    "                {{profile.lastLogin}}\n" +\r
-    "            </div>\n" +\r
-    "         </div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/searchField/searchField.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/searchField/searchField.html",\r
-    "<div class=\"search-bar\">\n" +\r
-    "    <div class='input-container' ng-blur=\"blurInput()\">\n" +\r
-    "        <input type=\"text\" class=\"innershadow b2b-search-input-field\" id=\"{{configObj.labelId}}\" b2b-search-input ng-model=\"inputModel\" ng-disabled=\"disabled\" b2b-reset ng-keydown=\"selectionIndex($event)\" placeholder=\"{{configObj.ghostText}}\" style=\"width:100%\" maxlength=\"{{configObj.maxLength}}\" title=\"{{inputModel}}\" aria-label=\"{{inputModel.length>0?inputModel:configObj.ghostText}}\"  aria-live=\"assertive\"/>\n" +\r
-    "            <button class=\"btn-search\" ng-disabled=\"disabled\" ng-click=\"startSearch()\" b2b-accessibility-click=\"13,32\" aria-label=\"Search\" ng-focus=\"showListFlag = false\" type=\"button\"><i class=\"icoControls-magnifyingglass\"></i></button>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"search-suggestion-wrapper\" ng-if=\"filterList.length >=0\" ng-show=\"showListFlag\">\n" +\r
-    "        <ul class=\"search-suggestion-list\" role=\"listbox\">      \n" +\r
-    "            <li class=\"no-result\" ng-if=\"filterList.length == 0 && configObj.display\">{{configObj.resultText}}</li>\n" +\r
-    "            <li class=\"search-suggestion-item\" ng-if=\"filterList.length\" ng-repeat=\"item in filterList | limitTo:configObj.noOfItemsDisplay track by $index\" ng-bind-html=\"item.title | b2bMultiSepartorHighlight:inputModel:configObj.searchSeperator\" ng-class=\"{active:isActive($index,filterList.length)}\" ng-click=\"selectItem($index,item.title)\">\n" +\r
-    "                {{item.title}}     \n" +\r
-    "            </li>\n" +\r
-    "        </ul>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/seekBar/seekBar.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/seekBar/seekBar.html",\r
-    "<div class=\"b2b-seek-bar-container\" ng-class=\"{vertical:verticalSeekBar}\">\n" +\r
-    "    <div class=\"b2b-seek-bar-track-container\">\n" +\r
-    "        <div class=\"b2b-seek-bar-track\"></div>\n" +\r
-    "        <div class=\"b2b-seek-bar-track-fill\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-seek-bar-knob-container\" role=\"menu\"  >\n" +\r
-    "        <div class=\"b2b-seek-bar-knob\" tabindex=\"0\" role=\"menuitem\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/slider/slider.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/slider/slider.html",\r
-    "<div class=\"b2b-slider-container\" ng-class=\"{'vertical':verticalSlider}\">\n" +\r
-    "    <div class=\"slider-track-container\">\n" +\r
-    "        <div class=\"slider-track\"></div>\n" +\r
-    "        <div class=\"slider-track-fill\" ng-style=\"{backgroundColor:trackFillColor}\"></div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"slider-knob-container\" ng-class=\"{'slider-knob-hidden':hideKnob}\">\n" +\r
-    "        <div class=\"slider-knob\" role=\"slider\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" aria-labelledby=\"{{labelId}}\" aria-valuenow=\"{{currentModelValue}}\" aria-valuetext=\"{{currentModelValue}}{{postAriaLabel}}\" aria-orientation=\"{{verticalSlider ? 'vertical' : 'horizontal'}}\"></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/spinButton/spinButton.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/spinButton/spinButton.html",\r
-    "<div class=\"btn-group btn-spinbutton-toggle\" ng-class=\"{'disabled': disabledFlag}\">\n" +\r
-    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-prev icon-primary-subtractminimize\" ng-click=\"minus();focusInputSpinButton($event)\" aria-label=\"Remove {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isMinusDisabled()}\" ng-disabled=\"isMinusDisabled()\" aria-disabled=\"{{isMinusDisabled()}}\" role=\"spinbutton\"></button>\n" +\r
-    "    <input class=\"btn pull-left\" id=\"{{spinButtonId}}\" type=\"tel\" b2b-only-nums=\"3\" maxlength=\"3\" min={{min}} max={{max}} data-max-value=\"{{max}}\" ng-model=\"inputValue[inputModelKey]\" value=\"{{inputValue[inputModelKey]}}\" aria-live=\"polite\" aria-valuenow=\"{{inputValue[inputModelKey]}}\" aria-valuemin=\"{{min}}\" aria-valuemax=\"{{max}}\" ng-disabled=\"disabledFlag\">\n" +\r
-    "    <button type=\"button\" tabindex=\"{{isMobile?'0':'-1'}}\" aria-hidden=\"{{notMobile}}\" class=\"btn btn-secondary btn-next icon-primary-add-maximize\" ng-click=\"plus();focusInputSpinButton($event)\" aria-label=\"Add {{step}}\" aria-controls=\"{{spinButtonId}}\" ng-class=\"{'disabled': isPlusDisabled()}\" ng-disabled=\"isPlusDisabled()\" aria-disabled=\"{{isPlusDisabled()}}\" role=\"spinbutton\"></button>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/statusTracker/statusTracker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/statusTracker/statusTracker.html",\r
-    "<div class=\"b2b-status-tracker row\">\n" +\r
-    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Previous status\" ng-click=\"previousStatus()\">\n" +\r
-    "       <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "           <i class=\"icon-primary-left\"></i>\n" +\r
-    "       </div>\n" +\r
-    "   </button>\n" +\r
-    "   <div ng-repeat=\"status in statuses\" class=\"b2b-status-tracker-step\" ng-class=\"{ 'complete' : status.complete, 'current' : currentStatus($index)}\" ng-show=\"isInViewport($index)\">\n" +\r
-    "       <p class=\"b2b-status-tracker-heading\">{{status.heading}}</p>\n" +\r
-    "       <div class=\"progress\">\n" +\r
-    "           <div class=\"progress-bar\">\n" +\r
-    "               <span class=\"hidden-spoken\">\n" +\r
-    "                   {{status.complete ? 'Complete' : 'Incomplete'}}\n" +\r
-    "               </span>\n" +\r
-    "           </div>\n" +\r
-    "       </div>\n" +\r
-    "       <div class=\"b2b-status-tracker-estimate\">\n" +\r
-    "           <i ng-show=\"status.estimate !== '' && status.estimate !== undefined\" ng-class=\"status.complete ? 'icoControls-approval' : 'icon-misc-time'\"></i> {{status.complete ? 'Complete' : status.estimate}}\n" +\r
-    "           &nbsp;\n" +\r
-    "       </div>\n" +\r
-    "       \n" +\r
-    "       <div class=\"b2b-status-tracker-description\">\n" +\r
-    "           {{status.description}}\n" +\r
-    "       </div>\n" +\r
-    "   </div>\n" +\r
-    "   <button tabindex=\"0\" ng-disabled=\"currentViewIndex + b2bStatusTrackerConfig.maxViewItems === statuses.length\" ng-if=\"statuses.length > b2bStatusTrackerConfig.maxViewItems\" class=\"btn-arrow\" type=\"button\" aria-label=\"Next status\" ng-click=\"nextStatus()\">\n" +\r
-    "       <div class=\"btn btn-small btn-secondary\">\n" +\r
-    "           <i class=\"icon-primary-right\"></i>\n" +\r
-    "       </div>\n" +\r
-    "   </button>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/stepTracker/stepTracker.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/stepTracker/stepTracker.html",\r
-    "<div class=\"b2b-step-tracker\">\n" +\r
-    "    <button class=\"btn-arrow b2b-left-arrow\" ng-click=\"previousStatus()\" ng-disabled=\"currentViewIndex === 0\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Previous step\">\n" +\r
-    "       <div class=\"btn btn-left btn-small btn-secondary\"><i class=\"icon-primary-left\"></i></div>\n" +\r
-    "   </button>\n" +\r
-    "    <button class=\"btn-arrow b2b-right-arrow\" ng-click=\"nextStatus()\" ng-disabled=\"currentViewIndex + b2bStepTrackerConfig.maxViewItems === stepsItemsObject.length\" ng-if=\"stepsItemsObject.length > b2bStepTrackerConfig.maxViewItems\" aria-label=\"Next step\">\n" +\r
-    "       <div class=\"btn btn-small btn-right btn-secondary\"><i class=\"icon-primary-right\"></i></div>\n" +\r
-    "   </button>\n" +\r
-    "    <ul class=\"b2b-steps\">\n" +\r
-    "        <li ng-class=\"{'b2b-step-done':$index < currentIndex - 1 ,'b2b-step-on':$index == currentIndex - 1}\" \n" +\r
-    "            ng-repeat=\"stepsItem in stepsItemsObject\" ng-show=\"isInViewport($index)\">\n" +\r
-    "           <p class=\"b2b-step-text\" data-sm-text=\"{{stepsItem.dataMobile}}\" data-large-text=\"{{stepsItem.dataDesktop}}\">{{stepsItem.text}}</p>\n" +\r
-    "            <span class=\"hidden-spoken\">\n" +\r
-    "                {{($index < currentIndex - 1)? 'Complete. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +\r
-    "                {{($index == currentIndex - 1)? 'In Progress. '+stepsItem.text+' '+stepsItem.dataMobile:''}} \n" +\r
-    "                {{($index > currentIndex - 1)? 'Incomplete. '+stepsItem.text+' '+stepsItem.dataMobile:''}}\n" +\r
-    "            </span>\n" +\r
-    "        </li>\n" +\r
-    "    </ul>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/switches/switches-spanish.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/switches/switches-spanish.html",\r
-    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +\r
-    "    <span class=\"btn-slider-on\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"activo\">activo</i></span>\n" +\r
-    "    <span class=\"switch-handle\"></span>\n" +\r
-    "    <span class=\"btn-slider-off\"><span class=\"hidden-spoken\">seleccione para hacer </span><i class=\"inactivo\">inactivo</i></span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/switches/switches.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/switches/switches.html",\r
-    "<div class=\"switch-overlay\" aria-hidden=\"true\">\n" +\r
-    "    <span class=\"btn-slider-on\">On</span>\n" +\r
-    "    <span class=\"switch-handle\"></span>\n" +\r
-    "    <span class=\"btn-slider-off\">Off</span>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tableMessages/tableMessage.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tableMessages/tableMessage.html",\r
-    "<div class=\"b2b-table-message\">\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType === 'noMatchingResults'\">\n" +\r
-    "        <div class=\"b2b-magnify-glass\"></div>\n" +\r
-    "        <div>\n" +\r
-    "            <div ng-transclude></div>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType == 'infoCouldNotLoad'\">\n" +\r
-    "        <div class=\"icon-primary-alert b2b-alert\" aria-label=\"Oops! The information could not load at this time. Please click link to refresh the page.\"></div>\n" +\r
-    "        <div>Oops!</div>\n" +\r
-    "        <div>The information could not load at this time.</div>\n" +\r
-    "        <div>Please <a href=\"javascript:void(0)\" title=\"Refresh the page\" ng-click=\"refreshAction($event)\">refresh the page</a>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType == 'magnifySearch'\">\n" +\r
-    "        <div class=\"b2b-magnify-glass\"></div>\n" +\r
-    "        <div>\n" +\r
-    "            <p class=\"b2b-message-title\">Please input values to\n" +\r
-    "                <br/> begin your search.</p>\n" +\r
-    "        </div>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-message\" ng-if=\"msgType === 'loadingTable'\">\n" +\r
-    "        <div class=\"icon-primary-spinner-ddh b2b-loading-dots\"></div>\n" +\r
-    "        <div ng-transclude></div>\n" +\r
-    "    </div>\n" +\r
-    "</div>\n" +\r
-    "");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tableScrollbar/tableScrollbar.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tableScrollbar/tableScrollbar.html",\r
-    "<div class=\"b2b-table-scrollbar\">\n" +\r
-    "    <div class=\"b2b-scrollbar-arrows\">\n" +\r
-    "        <button class=\"btn-arrow  b2b-scrollbar-arrow-left\" type=\"button\" ng-attr-aria-label=\"{{disableLeft ? 'Scroll Left Disabled' : 'Scroll Left'}}\" ng-click=\"scrollLeft()\" ng-disabled=\"disableLeft\"><div class=\"btn btn-alt\"><i class=\"icon-primary-left\"></i></div></button>\n" +\r
-    "        <button class=\"btn-arrow b2b-scrollbar-arrow-right\" ng-attr-aria-label=\"{{disableRight ? 'Scroll Right Disabled' : 'Scroll Right'}}\" ng-click=\"scrollRight()\" ng-disabled=\"disableRight\" type=\"button\"><div class=\"btn btn-alt\"><i class=\"icon-primary-right\"></i></div></button>\n" +\r
-    "    </div>\n" +\r
-    "    <div class=\"b2b-table-inner-container\">\n" +\r
-    "        <span ng-transclude></span>\n" +\r
-    "    </div>\n" +\r
-    "</div>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTable.html",\r
-    "<table ng-class=\"{'striped': responsive, 'complex-table': responsive && active}\" ng-transclude></table>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableBody.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableBody.html",\r
-    "<td ng-hide=\"isHidden()\" ng-transclude></td>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableHeaderSortable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableHeaderSortable.html",\r
-    "<th scope=\"col\" role=\"columnheader\" aria-sort=\"{{sortPattern !== 'null' && 'none' || sortPattern}}\" aria-label=\"{{headerName}} {{sortable !== 'false' && ': activate to sort' || ' '}} {{sortPattern !== 'null' && '' || sortPattern}}\" tabindex=\"{{sortable !== 'false' && '0' || '-1'}}\" b2b-accessibility-click=\"13,32\" ng-click=\"(sortable !== 'false') && sort();\" ng-hide=\"isHidden()\">\n" +\r
-    "    <span ng-transclude></span>\n" +\r
-    "    <i ng-class=\"{'icon-primary-arrows-sort-arrow active': sortPattern === 'ascending', 'icon-primary-arrows-sort-arrow active down': sortPattern === 'descending'}\"></i>\n" +\r
-    "</th>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tables/b2bTableHeaderUnsortable.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tables/b2bTableHeaderUnsortable.html",\r
-    "<th scope=\"col\" ng-hide=\"isHidden()\" ng-transclude></th>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tabs/b2bTab.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tabs/b2bTab.html",\r
-    "<li role=\"tab\" aria-selected=\"{{isTabActive()}}\" aria-controls=\"{{tabPanelId}}\" class=\"tab\" \n" +\r
-    "    ng-class=\"{'active': isTabActive()}\" ng-click=\"clickTab()\" ng-hide=\"tabItem.disabled\">\n" +\r
-    "    <a href=\"javascript:void(0)\"  tabindex=\"{{(isTabActive() && tabItem.disabled)?-1:0}}\"\n" +\r
-    "       ng-disabled=\"tabItem.disabled\" aria-expanded=\"{{(isTabActive() && !tabItem.disabled)}}\" \n" +\r
-    "       b2b-accessibility-click=\"13,32\" ng-transclude></a>\n" +\r
-    "    <span class=\"hidden-spoken\" ng-if=\"isTabActive()\">Active tab</span>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/tabs/b2bTabset.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/tabs/b2bTabset.html",\r
-    "<ul class=\"tabs promo-tabs\" role=\"tablist\" ng-transclude></ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/groupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/groupedTree.html",\r
-    "<ul role=\"group\">\n" +\r
-    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>{{(key)?key:''}}<span class=\"b2b-tree-node-icon\"><i ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +\r
-    "        <ul role=\"group\">\n" +\r
-    "            <b2b-member ng-repeat='member in value.childArray' member='member' time-delay='{{timeDelay}}' group-it='groupIt'></b2b-member>\n" +\r
-    "        </ul>\n" +\r
-    "    </li>\n" +\r
-    "</ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/treeMember.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/treeMember.html",\r
-    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" aria-describedby=\"description_{{$id}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-link>\n" +\r
-    "    <a tabindex=\"-1\" title=\"{{member.tooltipContent ? member.tooltipContent : member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active,'b2b-locked-node':member.locked}\">       <span class=\"b2b-tree-node-name\">{{member.name}}</span>\n" +\r
-    "        <span class=\"{{!member.child?'end':''}} b2b-tree-node-icon\">\n" +\r
-    "            <i class=\"b2b-tree-expandCollapse-icon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +\r
-    "        </span>\n" +\r
-    "         <div id=\"description_{{$id}}\" class=\"offscreen-text\">\n" +\r
-    "           {{member.descriptionText}}\n" +\r
-    "        </div>\n" +\r
-    "        <div class=\"b2b-tree-tooltip\" ng-if=\"member.showTooltip\">\n" +\r
-    "           <span class=\"b2b-tree-arrow-left\"></span>\n" +\r
-    "           <div class=\"b2b-tree-tooltip-content\">\n" +\r
-    "               {{member.tooltipContent}}\n" +\r
-    "           </div>  \n" +\r
-    "        </div>\n" +\r
-    "    </a>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNav/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNav/ungroupedTree.html",\r
-    "<ul role=\"{{setRole}}\"><b2b-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-member></ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/groupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/groupedTree.html",\r
-    "<ul role=\"group\">\n" +\r
-    "    <li aria-expanded=\"{{(member.active?true:false)}}\" role=\"treeitem\" aria-label=\"{{key}}\" ng-repeat='(key,value) in collection | groupBy : \"grpChild\"' b2b-tree-node-link><a class=\"grp\" ng-class=\"{'active': value.showGroup == true}\" tabindex=\"-1\" href='javascript:void(0);'>\n" +\r
-    "        <span class=\"ng-hide\">\n" +\r
-    "            <label class=\"checkbox\">\n" +\r
-    "                <input type=\"checkbox\" tabindex=\"-1\" class=\"treeCheckBox grpTreeCheckbox\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{(key)?key:''}}</span>\n" +\r
-    "            </label>\n" +\r
-    "        </span>\n" +\r
-    "        <span>\n" +\r
-    "            {{(key)?key:''}}    \n" +\r
-    "        </span>\n" +\r
-    "        <span class=\"nodeIcon\"><i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded': value.showGroup == true, 'icon-primary-collapsed': value.showGroup == undefined || value.showGroup == false }\"></i></span></a>\n" +\r
-    "        <ul role=\"group\">\n" +\r
-    "            <b2b-tree-member ng-repeat='member in value.childArray' member='member' group-it='groupIt'></b2b-tree-member>\n" +\r
-    "        </ul>\n" +\r
-    "    </li>\n" +\r
-    "</ul>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/treeMember.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/treeMember.html",\r
-    "<li role=\"treeitem\" aria-expanded=\"{{(member.active?true:false)}}\" aria-label=\"{{member.name}}\" ng-class=\"{'bg':member.selected}\"  b2b-tree-node-link>\n" +\r
-    "    <a tabindex=\"-1\" title=\"{{member.name}}\" href=\"javascript:void(0)\" ng-class=\"{'active':member.active}\">\n" +\r
-    "       <span ng-show=\"member.displayCheckbox\">\n" +\r
-    "               <label class=\"checkbox\">\n" +\r
-    "                <input type=\"checkbox\" tabindex=\"-1\" ng-model=\"member.isSelected\" ng-class=\"{'treeCheckBox': (member.displayCheckbox !== undefined)}\" style=\"margin-top:2px;\"/><i class=\"skin\"></i><span> {{member.name}}</span>\n" +\r
-    "            </label>\n" +\r
-    "        </span>\n" +\r
-    "       <span ng-show=\"!member.displayCheckbox\">\n" +\r
-    "           {{member.name}} \n" +\r
-    "       </span>\n" +\r
-    "        <span class=\"nodeIcon {{!member.child?'end':''}}\">\n" +\r
-    "            <i class=\"expandCollapseIcon\" ng-class=\"{'icon-primary-expanded':member.active}\"></i>\n" +\r
-    "        </span>\n" +\r
-    "    </a>\n" +\r
-    "</li>");\r
-}]);\r
-\r
-angular.module("b2bTemplate/treeNodeCheckbox/ungroupedTree.html", []).run(["$templateCache", function($templateCache) {\r
-  $templateCache.put("b2bTemplate/treeNodeCheckbox/ungroupedTree.html",\r
-    "<ul role=\"{{setRole}}\"><b2b-tree-member ng-repeat='member in collection' member='member' group-it='groupIt'></b2b-tree-member></ul>");\r
-}]);\r
diff --git a/ecomp-portal-FE-os/client/bower_components_external/ionicons-2.0.1/css/ecomp-ionicons.css b/ecomp-portal-FE-os/client/bower_components_external/ionicons-2.0.1/css/ecomp-ionicons.css
new file mode 100644 (file)
index 0000000..534712a
--- /dev/null
@@ -0,0 +1,108 @@
+@charset "UTF-8";
+
+@font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; }
+.ionicons,.icon-controls-upPRIMARY, .icon-arrows-download:before, .icon-securityalerts-alertL:before, .icon-controls-add-maximize:before, .icon-controls-add-maximize-circle:before, .icon-misc-time:before, .icoSecurityalerts:before,.icon-apps-marketplace:before ,.icon-content-grid:before, .icon-documents-archive:before, .icon-arrows-vertical-arrow-down:before,.icoArrows-download:before, .icoArrows-incoming-call:before, .icon-arrows-outgoing-call:before, .icon-arrows-upload:before, .icon-arrows-straight-arrow:before,.icoArrows-vertical-arrow:before,  .icon-people-userbookmark:before, .icon-controls-check:before, .icon-chevron-down:before, .icon-controls-down:before, .icon-controls-left:before, .icon-controls-right:before, .icon-chevron-up:before, .icoDocuments-report:before, .icon-edit:before,.icon-misc-pen:before, .icon-controls-up:before, .icon-overview:before, .icon-settings:before,.icon-building-home:before,.icon-documents-book:before, .icoDocuments-book-outline:before, .icoDocuments-bookmarks:before, .icoDocuments-bookmarks-outline:before,.icon-add-widget:before , .icon-documents-copy:before,.icon-content-flag:before,.icon-primary-accordion-minus:before, .icon-misc-piechart:before,.icon-misc-piechart-outline:before,.icon-primary-accordion-plus:before,.icon-star:before,.icon-building-door:before,.icon-content-gridguide:before,.icon-user:before, .icon-people-oneperson:before, .icon-people-oneperson-add:before, .icon-people-oneperson-stalker:before,  .icon-controls-pointer:before, .icon-arrows-replay-restart:before, .icon-content-star:before, .icon-misc-trash:before, .icon-arrows-upload:before   { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
+
+
+
+.icoSecurityalerts-alert:before { content: "\f100"; }
+
+.icon-arrows-download:before { content: "\f41f"; }
+
+.icon-controls-add-maximize:before { content: "\f2c7"; }
+
+.icon-controls-add-maximize-circle:before { content: "\f359"; }
+
+.icon-misc-time:before { content: "\f35a"; }
+
+.icoSecurityalerts:before { content: "\f35b"; }
+
+.icon-content-grid:before { content: "\f35c"; }
+
+.icon-documents-archive:before { content: "\f2c9"; }
+
+.icon-arrows-vertical-arrow-down:before { content: "\f35d"; }
+
+.icon-arrows-download:before { content: "\f35e"; }
+
+.icon-arrows-incoming-call:before { content: "\f360"; }
+
+.icoArrows-outgoing-call:before { content: "\f362"; }
+
+.icoArrows-upload:before { content: "\f364"; }
+
+.icoArrows-straight-arrow:before { content: "\f30f"; }
+
+.icon-arrows-vertical-arrow:before { content: "\f366"; }
+
+.icon-people-userbookmark:before { content: "\f39f"; }
+
+.icon-controls-check:before { content: "\f121"; }
+
+.icon-chevron-down:before { content: "\f123"; }
+
+.icon-controls-left:before { content: "\f124"; }
+
+.icon-controls-right:before { content: "\f125"; }
+
+.icon-chevron-up:before { content: "\f126"; }
+
+.icoDocuments-report:before { content: "\f274"; }
+
+.icon-overview:before { content: "\f133"; }
+
+.icon-controls-down:before { content: "\f3d0"; }
+
+.icon-controls-up:before { content: "\f3d8"; }
+
+.icon-documents-book:before { content: "\f3e8"; }
+
+.icoDocuments-book-outline:before { content: "\f3e7"; }
+
+.icoDocuments-bookmarks:before { content: "\f3ea"; }
+
+.icoDocuments-bookmarks-outline:before { content: "\f3e9"; }
+
+.icon-documents-copy:before { content: "\f41c"; }
+
+.icon-content-flag:before { content: "\f42d"; }
+
+.icon-primary-accordion-minus:before { content: "\f463"; }
+
+.icon-misc-piechart:before { content: "\f484"; }
+
+.icon-misc-piechart-outline:before { content: "\f483"; }
+
+.icon-primary-accordion-plus:before { content: "\f48a"; }
+
+.icon-building-door:before { content: "\f29f"; }
+
+.icon-content-gridguide:before { content: "\f20d"; }
+
+.icon-people-oneperson:before { content: "\f213"; }
+
+.icon-people-oneperson-add:before { content: "\f211"; }
+
+.icon-people-oneperson-stalker:before { content: "\f212"; }
+
+.icon-arrows-replay-restart:before { content: "\f21c"; }
+
+.icon-misc-trash:before { content: "\f252"; }
+
+.icon-arrows-upload:before { content: "\f255"; }
+
+.icon-user:before { content: "\f213"; } 
+
+.icon-star:before { content: "\f4b3"; }
+
+.icon-edit:before { content: "\f2bf"; }
+
+.icon-settings:before { content: "\f13d"; }
+
+.icon-apps-marketplace:before { content: "\f35c"; }
+
+.icon-add-widget:before { content: "\f3f0"; }
+
+.icon-controls-upPRIMARY:before { content: "\f3d8";  }
+
+.icon-misc-pen:before { content: "\f2bf"; }
\ No newline at end of file
index 899449b..885aa6b 100644 (file)
-@charset "UTF-8";\r
-/*!\r
-  Ionicons, v2.0.0\r
-  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/\r
-  https://twitter.com/benjsperry  https://twitter.com/ionicframework\r
-  MIT License: https://github.com/driftyco/ionicons\r
-\r
-  Android-style icons originally built by Google’s\r
-  Material Design Icons: https://github.com/google/material-design-icons\r
-  used under CC BY http://creativecommons.org/licenses/by/4.0/\r
-  Modified icons to fit ionicon’s grid from original.\r
-*/\r
-@font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; }\r
-.ion, .ionicons, .ion-alert:before, .icon-securityalerts-alertL:before, .icon-controls-add-maximize:before, .icon-controls-add-maximize-circle:before, .icon-misc-time:before, .icoSecurityalerts:before,.icon-apps-marketplace:before ,.icon-content-grid:before, .icon-documents-archive:before, .ion-android-arrow-back:before, .icon-arrows-vertical-arrow-down:before, .ion-android-arrow-dropdown:before, .icoArrows-download:before, .ion-android-arrow-dropleft:before, .icoArrows-incoming-call:before, .ion-android-arrow-dropright:before, .icon-arrows-outgoing-call:before, .ion-android-arrow-dropup:before, .icon-arrows-upload:before, .icon-arrows-straight-arrow:before, .icoArrows-vertical-arrow:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done:before, .ion-android-done-all:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite:before, .ion-android-favorite-outline:before, .ion-android-film:before, .ion-android-folder:before, .ion-android-folder-open:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone:before, .ion-android-microphone-off:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person:before, .icon-people-userbookmark:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove:before, .ion-android-remove-circle:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share:before, .ion-android-share-alt:before, .ion-android-star:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace:before, .ion-backspace-outline:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox:before, .ion-chatbox-working:before, .ion-chatboxes:before, .ion-chatbubble:before, .ion-chatbubble-working:before, .ion-chatbubbles:before, .ion-checkmark:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .icon-chevron-down:before, .icon-controls-left:before, .icon-controls-right:before, .icon-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close:before, .ion-close-circled:before, .ion-close-round:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code:before, .ion-code-download:before, .ion-code-working:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .icoDocuments-report:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document:before, .ion-document-text:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .icon-edit:before,.icon-misc-pen:before, .ion-egg:before, .ion-eject:before, .ion-email:before, .ion-email-unread:before, .ion-erlenmeyer-flask:before, .ion-erlenmeyer-flask-bubbles:before, .icon-overview:before, .ion-eye-disabled:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash:before, .ion-flash-off:before, .ion-folder:before, .ion-fork:before, .ion-fork-repo:before, .ion-forward:before, .ion-funnel:before, .icon-settings:before,.ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy:before, .ion-happy-outline:before, .ion-headphone:before, .ion-heart:before, .ion-heart-broken:before, .ion-help:before, .ion-help-buoy:before, .ion-help-circled:before, .icon-building-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information:before, .ion-information-circled:before, .ion-ionic:before, .ion-ios-alarm:before, .ion-ios-alarm-outline:before, .ion-ios-albums:before, .ion-ios-albums-outline:before, .ion-ios-americanfootball:before, .ion-ios-americanfootball-outline:before, .ion-ios-analytics:before, .ion-ios-analytics-outline:before, .ion-ios-arrow-back:before, .icon-controls-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .icon-controls-up:before, .ion-ios-at:before, .ion-ios-at-outline:before, .ion-ios-barcode:before, .ion-ios-barcode-outline:before, .ion-ios-baseball:before, .ion-ios-baseball-outline:before, .ion-ios-basketball:before, .ion-ios-basketball-outline:before, .ion-ios-bell:before, .ion-ios-bell-outline:before, .ion-ios-body:before, .ion-ios-body-outline:before, .ion-ios-bolt:before, .ion-ios-bolt-outline:before, .icon-documents-book:before, .icoDocuments-book-outline:before, .icoDocuments-bookmarks:before, .icoDocuments-bookmarks-outline:before, .ion-ios-box:before, .ion-ios-box-outline:before, .ion-ios-briefcase:before, .ion-ios-briefcase-outline:before,.icon-add-widget:before , .ion-ios-browsers:before, .ion-ios-browsers-outline:before, .ion-ios-calculator:before, .ion-ios-calculator-outline:before, .ion-ios-calendar:before, .ion-ios-calendar-outline:before, .ion-ios-camera:before, .ion-ios-camera-outline:before, .ion-ios-cart:before, .ion-ios-cart-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatbubble:before, .ion-ios-chatbubble-outline:before, .ion-ios-checkmark:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock:before, .ion-ios-clock-outline:before, .ion-ios-close:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-cloud:before, .ion-ios-cloud-download:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloudy:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-outline:before, .ion-ios-cog:before, .ion-ios-cog-outline:before, .ion-ios-color-filter:before, .ion-ios-color-filter-outline:before, .ion-ios-color-wand:before, .ion-ios-color-wand-outline:before, .ion-ios-compose:before, .ion-ios-compose-outline:before, .ion-ios-contact:before, .ion-ios-contact-outline:before, .icon-documents-copy:before, .ion-ios-copy-outline:before, .ion-ios-crop:before, .ion-ios-crop-strong:before, .ion-ios-download:before, .ion-ios-download-outline:before, .ion-ios-drag:before, .ion-ios-email:before, .ion-ios-email-outline:before, .ion-ios-eye:before, .ion-ios-eye-outline:before, .ion-ios-fastforward:before, .ion-ios-fastforward-outline:before, .ion-ios-filing:before, .ion-ios-filing-outline:before, .ion-ios-film:before, .ion-ios-film-outline:before, .icon-content-flag:before, .ion-ios-flag-outline:before, .ion-ios-flame:before, .ion-ios-flame-outline:before, .ion-ios-flask:before, .ion-ios-flask-outline:before, .ion-ios-flower:before, .ion-ios-flower-outline:before, .ion-ios-folder:before, .ion-ios-folder-outline:before, .ion-ios-football:before, .ion-ios-football-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-b:before, .ion-ios-game-controller-b-outline:before, .ion-ios-gear:before, .ion-ios-gear-outline:before, .ion-ios-glasses:before, .ion-ios-glasses-outline:before, .ion-ios-grid-view:before, .ion-ios-grid-view-outline:before, .ion-ios-heart:before, .ion-ios-heart-outline:before, .ion-ios-help:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-home:before, .ion-ios-home-outline:before, .ion-ios-infinite:before, .ion-ios-infinite-outline:before, .ion-ios-information:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-ionic-outline:before, .ion-ios-keypad:before, .ion-ios-keypad-outline:before, .ion-ios-lightbulb:before, .ion-ios-lightbulb-outline:before, .ion-ios-list:before, .ion-ios-list-outline:before, .ion-ios-location:before, .ion-ios-location-outline:before, .ion-ios-locked:before, .ion-ios-locked-outline:before, .ion-ios-loop:before, .ion-ios-loop-strong:before, .ion-ios-medical:before, .ion-ios-medical-outline:before, .ion-ios-medkit:before, .ion-ios-medkit-outline:before, .ion-ios-mic:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-minus:before, .ion-ios-minus-empty:before, .icon-primary-accordion-minus:before, .ion-ios-monitor:before, .ion-ios-monitor-outline:before, .ion-ios-moon:before, .ion-ios-moon-outline:before, .ion-ios-more:before, .ion-ios-more-outline:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate:before, .ion-ios-navigate-outline:before, .ion-ios-nutrition:before, .ion-ios-nutrition-outline:before, .ion-ios-paper:before, .ion-ios-paper-outline:before, .ion-ios-paperplane:before, .ion-ios-paperplane-outline:before, .ion-ios-partlysunny:before, .ion-ios-partlysunny-outline:before, .ion-ios-pause:before, .ion-ios-pause-outline:before, .ion-ios-paw:before, .ion-ios-paw-outline:before, .ion-ios-people:before, .ion-ios-people-outline:before, .ion-ios-person:before, .ion-ios-person-outline:before, .ion-ios-personadd:before, .ion-ios-personadd-outline:before, .ion-ios-photos:before, .ion-ios-photos-outline:before, .icon-misc-piechart:before, .icon-misc-piechart-outline:before, .ion-ios-pint:before, .ion-ios-pint-outline:before, .ion-ios-play:before, .ion-ios-play-outline:before, .ion-ios-plus:before, .ion-ios-plus-empty:before, .icon-primary-accordion-plus:before, .ion-ios-pricetag:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetags:before, .ion-ios-pricetags-outline:before, .ion-ios-printer:before, .ion-ios-printer-outline:before, .ion-ios-pulse:before, .ion-ios-pulse-strong:before, .ion-ios-rainy:before, .ion-ios-rainy-outline:before, .ion-ios-recording:before, .ion-ios-recording-outline:before, .ion-ios-redo:before, .ion-ios-redo-outline:before, .ion-ios-refresh:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-reload:before, .ion-ios-reverse-camera:before, .ion-ios-reverse-camera-outline:before, .ion-ios-rewind:before, .ion-ios-rewind-outline:before, .ion-ios-rose:before, .ion-ios-rose-outline:before, .ion-ios-search:before, .ion-ios-search-strong:before, .ion-ios-settings:before, .ion-ios-settings-strong:before, .ion-ios-shuffle:before, .ion-ios-shuffle-strong:before, .ion-ios-skipbackward:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipforward:before, .ion-ios-skipforward-outline:before, .ion-ios-snowy:before, .ion-ios-speedometer:before, .ion-ios-speedometer-outline:before, .icon-star:before,.ion-ios-star:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-stopwatch:before, .ion-ios-stopwatch-outline:before, .ion-ios-sunny:before, .ion-ios-sunny-outline:before, .ion-ios-telephone:before, .ion-ios-telephone-outline:before, .ion-ios-tennisball:before, .ion-ios-tennisball-outline:before, .ion-ios-thunderstorm:before, .ion-ios-thunderstorm-outline:before, .ion-ios-time:before, .ion-ios-time-outline:before, .ion-ios-timer:before, .ion-ios-timer-outline:before, .ion-ios-toggle:before, .ion-ios-toggle-outline:before, .ion-ios-trash:before, .ion-ios-trash-outline:before, .ion-ios-undo:before, .ion-ios-undo-outline:before, .ion-ios-unlocked:before, .ion-ios-unlocked-outline:before, .ion-ios-upload:before, .ion-ios-upload-outline:before, .ion-ios-videocam:before, .ion-ios-videocam-outline:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass:before, .ion-ios-wineglass-outline:before, .ion-ios-world:before, .ion-ios-world-outline:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .icon-building-door:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon:before, .icon-content-gridguide:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .icon-user:before, .icon-people-oneperson:before, .icon-people-oneperson-add:before, .icon-people-oneperson-stalker:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .icon-controls-pointer:before, .ion-playstation:before, .ion-plus:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .icon-arrows-replay-restart:before, .ion-reply:before, .ion-reply-all:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad:before, .ion-sad-outline:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android:before, .ion-social-android-outline:before, .ion-social-angular:before, .ion-social-angular-outline:before, .ion-social-apple:before, .ion-social-apple-outline:before, .ion-social-bitcoin:before, .ion-social-bitcoin-outline:before, .ion-social-buffer:before, .ion-social-buffer-outline:before, .ion-social-chrome:before, .ion-social-chrome-outline:before, .ion-social-codepen:before, .ion-social-codepen-outline:before, .ion-social-css3:before, .ion-social-css3-outline:before, .ion-social-designernews:before, .ion-social-designernews-outline:before, .ion-social-dribbble:before, .ion-social-dribbble-outline:before, .ion-social-dropbox:before, .ion-social-dropbox-outline:before, .ion-social-euro:before, .ion-social-euro-outline:before, .ion-social-facebook:before, .ion-social-facebook-outline:before, .ion-social-foursquare:before, .ion-social-foursquare-outline:before, .ion-social-freebsd-devil:before, .ion-social-github:before, .ion-social-github-outline:before, .ion-social-google:before, .ion-social-google-outline:before, .ion-social-googleplus:before, .ion-social-googleplus-outline:before, .ion-social-hackernews:before, .ion-social-hackernews-outline:before, .ion-social-html5:before, .ion-social-html5-outline:before, .ion-social-instagram:before, .ion-social-instagram-outline:before, .ion-social-javascript:before, .ion-social-javascript-outline:before, .ion-social-linkedin:before, .ion-social-linkedin-outline:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest:before, .ion-social-pinterest-outline:before, .ion-social-python:before, .ion-social-reddit:before, .ion-social-reddit-outline:before, .ion-social-rss:before, .ion-social-rss-outline:before, .ion-social-sass:before, .ion-social-skype:before, .ion-social-skype-outline:before, .ion-social-snapchat:before, .ion-social-snapchat-outline:before, .ion-social-tumblr:before, .ion-social-tumblr-outline:before, .ion-social-tux:before, .ion-social-twitch:before, .ion-social-twitch-outline:before, .ion-social-twitter:before, .ion-social-twitter-outline:before, .ion-social-usd:before, .ion-social-usd-outline:before, .ion-social-vimeo:before, .ion-social-vimeo-outline:before, .ion-social-whatsapp:before, .ion-social-whatsapp-outline:before, .ion-social-windows:before, .ion-social-windows-outline:before, .ion-social-wordpress:before, .ion-social-wordpress-outline:before, .ion-social-yahoo:before, .ion-social-yahoo-outline:before, .ion-social-yen:before, .ion-social-yen-outline:before, .ion-social-youtube:before, .ion-social-youtube-outline:before, .ion-soup-can:before, .ion-soup-can-outline:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .icon-content-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle:before, .ion-toggle-filled:before, .ion-transgender:before, .icon-misc-trash:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt:before, .ion-tshirt-outline:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .icon-arrows-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }\r
-\r
-.ion-alert:before { content: "\f101"; }\r
-\r
-.icoSecurityalerts-alert:before { content: "\f100"; }\r
-\r
-.icon-controls-add-maximize:before { content: "\f2c7"; }\r
-\r
-.icon-controls-add-maximize-circle:before { content: "\f359"; }\r
-\r
-.icon-misc-time:before { content: "\f35a"; }\r
-\r
-.icoSecurityalerts:before { content: "\f35b"; }\r
-\r
-.icon-content-grid:before { content: "\f35c"; }\r
-\r
-.icon-documents-archive:before { content: "\f2c9"; }\r
-\r
-.ion-android-arrow-back:before { content: "\f2ca"; }\r
-\r
-.icon-arrows-vertical-arrow-down:before { content: "\f35d"; }\r
-\r
-.ion-android-arrow-dropdown:before { content: "\f35f"; }\r
-\r
-.icon-arrows-download:before { content: "\f35e"; }\r
-\r
-.ion-android-arrow-dropleft:before { content: "\f361"; }\r
-\r
-.icon-arrows-incoming-call:before { content: "\f360"; }\r
-\r
-.ion-android-arrow-dropright:before { content: "\f363"; }\r
-\r
-.icoArrows-outgoing-call:before { content: "\f362"; }\r
-\r
-.ion-android-arrow-dropup:before { content: "\f365"; }\r
-\r
-.icoArrows-upload:before { content: "\f364"; }\r
-\r
-.icoArrows-straight-arrow:before { content: "\f30f"; }\r
-\r
-.icon-arrows-vertical-arrow:before { content: "\f366"; }\r
-\r
-.ion-android-attach:before { content: "\f367"; }\r
-\r
-.ion-android-bar:before { content: "\f368"; }\r
-\r
-.ion-android-bicycle:before { content: "\f369"; }\r
-\r
-.ion-android-boat:before { content: "\f36a"; }\r
-\r
-.ion-android-bookmark:before { content: "\f36b"; }\r
-\r
-.ion-android-bulb:before { content: "\f36c"; }\r
-\r
-.ion-android-bus:before { content: "\f36d"; }\r
-\r
-.ion-android-calendar:before { content: "\f2d1"; }\r
-\r
-.ion-android-call:before { content: "\f2d2"; }\r
-\r
-.ion-android-camera:before { content: "\f2d3"; }\r
-\r
-.ion-android-cancel:before { content: "\f36e"; }\r
-\r
-.ion-android-car:before { content: "\f36f"; }\r
-\r
-.ion-android-cart:before { content: "\f370"; }\r
-\r
-.ion-android-chat:before { content: "\f2d4"; }\r
-\r
-.ion-android-checkbox:before { content: "\f374"; }\r
-\r
-.ion-android-checkbox-blank:before { content: "\f371"; }\r
-\r
-.ion-android-checkbox-outline:before { content: "\f373"; }\r
-\r
-.ion-android-checkbox-outline-blank:before { content: "\f372"; }\r
-\r
-.ion-android-checkmark-circle:before { content: "\f375"; }\r
-\r
-.ion-android-clipboard:before { content: "\f376"; }\r
-\r
-.ion-android-close:before { content: "\f2d7"; }\r
-\r
-.ion-android-cloud:before { content: "\f37a"; }\r
-\r
-.ion-android-cloud-circle:before { content: "\f377"; }\r
-\r
-.ion-android-cloud-done:before { content: "\f378"; }\r
-\r
-.ion-android-cloud-outline:before { content: "\f379"; }\r
-\r
-.ion-android-color-palette:before { content: "\f37b"; }\r
-\r
-.ion-android-compass:before { content: "\f37c"; }\r
-\r
-.ion-android-contact:before { content: "\f2d8"; }\r
-\r
-.ion-android-contacts:before { content: "\f2d9"; }\r
-\r
-.ion-android-contract:before { content: "\f37d"; }\r
-\r
-.ion-android-create:before { content: "\f37e"; }\r
-\r
-.ion-android-delete:before { content: "\f37f"; }\r
-\r
-.ion-android-desktop:before { content: "\f380"; }\r
-\r
-.ion-android-document:before { content: "\f381"; }\r
-\r
-.ion-android-done:before { content: "\f383"; }\r
-\r
-.ion-android-done-all:before { content: "\f382"; }\r
-\r
-.ion-android-download:before { content: "\f2dd"; }\r
-\r
-.ion-android-drafts:before { content: "\f384"; }\r
-\r
-.ion-android-exit:before { content: "\f385"; }\r
-\r
-.ion-android-expand:before { content: "\f386"; }\r
-\r
-.ion-android-favorite:before { content: "\f388"; }\r
-\r
-.ion-android-favorite-outline:before { content: "\f387"; }\r
-\r
-.ion-android-film:before { content: "\f389"; }\r
-\r
-.ion-android-folder:before { content: "\f2e0"; }\r
-\r
-.ion-android-folder-open:before { content: "\f38a"; }\r
-\r
-.ion-android-funnel:before { content: "\f38b"; }\r
-\r
-.ion-android-globe:before { content: "\f38c"; }\r
-\r
-.ion-android-hand:before { content: "\f2e3"; }\r
-\r
-.ion-android-hangout:before { content: "\f38d"; }\r
-\r
-.ion-android-happy:before { content: "\f38e"; }\r
-\r
-.ion-android-home:before { content: "\f38f"; }\r
-\r
-.ion-android-image:before { content: "\f2e4"; }\r
-\r
-.ion-android-laptop:before { content: "\f390"; }\r
-\r
-.ion-android-list:before { content: "\f391"; }\r
-\r
-.ion-android-locate:before { content: "\f2e9"; }\r
-\r
-.ion-android-lock:before { content: "\f392"; }\r
-\r
-.ion-android-mail:before { content: "\f2eb"; }\r
-\r
-.ion-android-map:before { content: "\f393"; }\r
-\r
-.ion-android-menu:before { content: "\f394"; }\r
-\r
-.ion-android-microphone:before { content: "\f2ec"; }\r
-\r
-.ion-android-microphone-off:before { content: "\f395"; }\r
-\r
-.ion-android-more-horizontal:before { content: "\f396"; }\r
-\r
-.ion-android-more-vertical:before { content: "\f397"; }\r
-\r
-.ion-android-navigate:before { content: "\f398"; }\r
-\r
-.ion-android-notifications:before { content: "\f39b"; }\r
-\r
-.ion-android-notifications-none:before { content: "\f399"; }\r
-\r
-.ion-android-notifications-off:before { content: "\f39a"; }\r
-\r
-.ion-android-open:before { content: "\f39c"; }\r
-\r
-.ion-android-options:before { content: "\f39d"; }\r
-\r
-.ion-android-people:before { content: "\f39e"; }\r
-\r
-.ion-android-person:before { content: "\f3a0"; }\r
-\r
-.icon-people-userbookmark:before { content: "\f39f"; }\r
-\r
-.ion-android-phone-landscape:before { content: "\f3a1"; }\r
-\r
-.ion-android-phone-portrait:before { content: "\f3a2"; }\r
-\r
-.ion-android-pin:before { content: "\f3a3"; }\r
-\r
-.ion-android-plane:before { content: "\f3a4"; }\r
-\r
-.ion-android-playstore:before { content: "\f2f0"; }\r
-\r
-.ion-android-print:before { content: "\f3a5"; }\r
-\r
-.ion-android-radio-button-off:before { content: "\f3a6"; }\r
-\r
-.ion-android-radio-button-on:before { content: "\f3a7"; }\r
-\r
-.ion-android-refresh:before { content: "\f3a8"; }\r
-\r
-.ion-android-remove:before { content: "\f2f4"; }\r
-\r
-.ion-android-remove-circle:before { content: "\f3a9"; }\r
-\r
-.ion-android-restaurant:before { content: "\f3aa"; }\r
-\r
-.ion-android-sad:before { content: "\f3ab"; }\r
-\r
-.ion-android-search:before { content: "\f2f5"; }\r
-\r
-.ion-android-send:before { content: "\f2f6"; }\r
-\r
-.ion-android-settings:before { content: "\f2f7"; }\r
-\r
-.ion-android-share:before { content: "\f2f8"; }\r
-\r
-.ion-android-share-alt:before { content: "\f3ac"; }\r
-\r
-.ion-android-star:before { content: "\f2fc"; }\r
-\r
-.ion-android-star-half:before { content: "\f3ad"; }\r
-\r
-.ion-android-star-outline:before { content: "\f3ae"; }\r
-\r
-.ion-android-stopwatch:before { content: "\f2fd"; }\r
-\r
-.ion-android-subway:before { content: "\f3af"; }\r
-\r
-.ion-android-sunny:before { content: "\f3b0"; }\r
-\r
-.ion-android-sync:before { content: "\f3b1"; }\r
-\r
-.ion-android-textsms:before { content: "\f3b2"; }\r
-\r
-.ion-android-time:before { content: "\f3b3"; }\r
-\r
-.ion-android-train:before { content: "\f3b4"; }\r
-\r
-.ion-android-unlock:before { content: "\f3b5"; }\r
-\r
-.ion-android-upload:before { content: "\f3b6"; }\r
-\r
-.ion-android-volume-down:before { content: "\f3b7"; }\r
-\r
-.ion-android-volume-mute:before { content: "\f3b8"; }\r
-\r
-.ion-android-volume-off:before { content: "\f3b9"; }\r
-\r
-.ion-android-volume-up:before { content: "\f3ba"; }\r
-\r
-.ion-android-walk:before { content: "\f3bb"; }\r
-\r
-.ion-android-warning:before { content: "\f3bc"; }\r
-\r
-.ion-android-watch:before { content: "\f3bd"; }\r
-\r
-.ion-android-wifi:before { content: "\f305"; }\r
-\r
-.ion-aperture:before { content: "\f313"; }\r
-\r
-.ion-archive:before { content: "\f102"; }\r
-\r
-.ion-arrow-down-a:before { content: "\f103"; }\r
-\r
-.ion-arrow-down-b:before { content: "\f104"; }\r
-\r
-.ion-arrow-down-c:before { content: "\f105"; }\r
-\r
-.ion-arrow-expand:before { content: "\f25e"; }\r
-\r
-.ion-arrow-graph-down-left:before { content: "\f25f"; }\r
-\r
-.ion-arrow-graph-down-right:before { content: "\f260"; }\r
-\r
-.ion-arrow-graph-up-left:before { content: "\f261"; }\r
-\r
-.ion-arrow-graph-up-right:before { content: "\f262"; }\r
-\r
-.ion-arrow-left-a:before { content: "\f106"; }\r
-\r
-.ion-arrow-left-b:before { content: "\f107"; }\r
-\r
-.ion-arrow-left-c:before { content: "\f108"; }\r
-\r
-.ion-arrow-move:before { content: "\f263"; }\r
-\r
-.ion-arrow-resize:before { content: "\f264"; }\r
-\r
-.ion-arrow-return-left:before { content: "\f265"; }\r
-\r
-.ion-arrow-return-right:before { content: "\f266"; }\r
-\r
-.ion-arrow-right-a:before { content: "\f109"; }\r
-\r
-.ion-arrow-right-b:before { content: "\f10a"; }\r
-\r
-.ion-arrow-right-c:before { content: "\f10b"; }\r
-\r
-.ion-arrow-shrink:before { content: "\f267"; }\r
-\r
-.ion-arrow-swap:before { content: "\f268"; }\r
-\r
-.ion-arrow-up-a:before { content: "\f10c"; }\r
-\r
-.ion-arrow-up-b:before { content: "\f10d"; }\r
-\r
-.ion-arrow-up-c:before { content: "\f10e"; }\r
-\r
-.ion-asterisk:before { content: "\f314"; }\r
-\r
-.ion-at:before { content: "\f10f"; }\r
-\r
-.ion-backspace:before { content: "\f3bf"; }\r
-\r
-.ion-backspace-outline:before { content: "\f3be"; }\r
-\r
-.ion-bag:before { content: "\f110"; }\r
-\r
-.ion-battery-charging:before { content: "\f111"; }\r
-\r
-.ion-battery-empty:before { content: "\f112"; }\r
-\r
-.ion-battery-full:before { content: "\f113"; }\r
-\r
-.ion-battery-half:before { content: "\f114"; }\r
-\r
-.ion-battery-low:before { content: "\f115"; }\r
-\r
-.ion-beaker:before { content: "\f269"; }\r
-\r
-.ion-beer:before { content: "\f26a"; }\r
-\r
-.ion-bluetooth:before { content: "\f116"; }\r
-\r
-.ion-bonfire:before { content: "\f315"; }\r
-\r
-.ion-bookmark:before { content: "\f26b"; }\r
-\r
-.ion-bowtie:before { content: "\f3c0"; }\r
-\r
-.ion-briefcase:before { content: "\f26c"; }\r
-\r
-.ion-bug:before { content: "\f2be"; }\r
-\r
-.ion-calculator:before { content: "\f26d"; }\r
-\r
-.ion-calendar:before { content: "\f117"; }\r
-\r
-.ion-camera:before { content: "\f118"; }\r
-\r
-.ion-card:before { content: "\f119"; }\r
-\r
-.ion-cash:before { content: "\f316"; }\r
-\r
-.ion-chatbox:before { content: "\f11b"; }\r
-\r
-.ion-chatbox-working:before { content: "\f11a"; }\r
-\r
-.ion-chatboxes:before { content: "\f11c"; }\r
-\r
-.ion-chatbubble:before { content: "\f11e"; }\r
-\r
-.ion-chatbubble-working:before { content: "\f11d"; }\r
-\r
-.ion-chatbubbles:before { content: "\f11f"; }\r
-\r
-.ion-checkmark:before { content: "\f122"; }\r
-\r
-.ion-checkmark-circled:before { content: "\f120"; }\r
-\r
-.ion-checkmark-round:before { content: "\f121"; }\r
-\r
-.icon-chevron-down:before { content: "\f123"; }\r
-\r
-\r
-.icon-controls-left:before { content: "\f124"; }\r
-\r
-.icon-controls-right:before { content: "\f125"; }\r
-\r
-.icon-chevron-up:before { content: "\f126"; }\r
-\r
-.ion-clipboard:before { content: "\f127"; }\r
-\r
-.ion-clock:before { content: "\f26e"; }\r
-\r
-.ion-close:before { content: "\f12a"; }\r
-\r
-.ion-close-circled:before { content: "\f128"; }\r
-\r
-.ion-close-round:before { content: "\f129"; }\r
-\r
-.ion-closed-captioning:before { content: "\f317"; }\r
-\r
-.ion-cloud:before { content: "\f12b"; }\r
-\r
-.ion-code:before { content: "\f271"; }\r
-\r
-.ion-code-download:before { content: "\f26f"; }\r
-\r
-.ion-code-working:before { content: "\f270"; }\r
-\r
-.ion-coffee:before { content: "\f272"; }\r
-\r
-.ion-compass:before { content: "\f273"; }\r
-\r
-.ion-compose:before { content: "\f12c"; }\r
-\r
-.icoDocuments-report:before { content: "\f274"; }\r
-\r
-.ion-contrast:before { content: "\f275"; }\r
-\r
-.ion-crop:before { content: "\f3c1"; }\r
-\r
-.ion-cube:before { content: "\f318"; }\r
-\r
-.ion-disc:before { content: "\f12d"; }\r
-\r
-.ion-document:before { content: "\f12f"; }\r
-\r
-.ion-document-text:before { content: "\f12e"; }\r
-\r
-.ion-drag:before { content: "\f130"; }\r
-\r
-.ion-earth:before { content: "\f276"; }\r
-\r
-.ion-easel:before { content: "\f3c2"; }\r
-\r
-.icon-misc-pen:before { content: "\f2bf"; }\r
-\r
-.ion-egg:before { content: "\f277"; }\r
-\r
-.ion-eject:before { content: "\f131"; }\r
-\r
-.ion-email:before { content: "\f132"; }\r
-\r
-.ion-email-unread:before { content: "\f3c3"; }\r
-\r
-.ion-erlenmeyer-flask:before { content: "\f3c5"; }\r
-\r
-.ion-erlenmeyer-flask-bubbles:before { content: "\f3c4"; }\r
-\r
-.icon-overview:before { content: "\f133"; }\r
-\r
-.ion-eye-disabled:before { content: "\f306"; }\r
-\r
-.ion-female:before { content: "\f278"; }\r
-\r
-.ion-filing:before { content: "\f134"; }\r
-\r
-.ion-film-marker:before { content: "\f135"; }\r
-\r
-.ion-fireball:before { content: "\f319"; }\r
-\r
-.ion-flag:before { content: "\f279"; }\r
-\r
-.ion-flame:before { content: "\f31a"; }\r
-\r
-.ion-flash:before { content: "\f137"; }\r
-\r
-.ion-flash-off:before { content: "\f136"; }\r
-\r
-.ion-folder:before { content: "\f139"; }\r
-\r
-.ion-fork:before { content: "\f27a"; }\r
-\r
-.ion-fork-repo:before { content: "\f2c0"; }\r
-\r
-.ion-forward:before { content: "\f13a"; }\r
-\r
-.ion-funnel:before { content: "\f31b"; }\r
-\r
-.ion-gear-a:before { content: "\f13d"; }\r
-\r
-.ion-gear-b:before { content: "\f13e"; }\r
-\r
-.ion-grid:before { content: "\f13f"; }\r
-\r
-.ion-hammer:before { content: "\f27b"; }\r
-\r
-.ion-happy:before { content: "\f31c"; }\r
-\r
-.ion-happy-outline:before { content: "\f3c6"; }\r
-\r
-.ion-headphone:before { content: "\f140"; }\r
-\r
-.ion-heart:before { content: "\f141"; }\r
-\r
-.ion-heart-broken:before { content: "\f31d"; }\r
-\r
-.ion-help:before { content: "\f143"; }\r
-\r
-.ion-help-buoy:before { content: "\f27c"; }\r
-\r
-.ion-help-circled:before { content: "\f142"; }\r
-\r
-.icon-building-home:before { content: "\f144"; }\r
-\r
-.ion-icecream:before { content: "\f27d"; }\r
-\r
-.ion-image:before { content: "\f147"; }\r
-\r
-.ion-images:before { content: "\f148"; }\r
-\r
-.ion-information:before { content: "\f14a"; }\r
-\r
-.ion-information-circled:before { content: "\f149"; }\r
-\r
-.ion-ionic:before { content: "\f14b"; }\r
-\r
-.ion-ios-alarm:before { content: "\f3c8"; }\r
-\r
-.ion-ios-alarm-outline:before { content: "\f3c7"; }\r
-\r
-.ion-ios-albums:before { content: "\f3ca"; }\r
-\r
-.ion-ios-albums-outline:before { content: "\f3c9"; }\r
-\r
-.ion-ios-americanfootball:before { content: "\f3cc"; }\r
-\r
-.ion-ios-americanfootball-outline:before { content: "\f3cb"; }\r
-\r
-.ion-ios-analytics:before { content: "\f3ce"; }\r
-\r
-.ion-ios-analytics-outline:before { content: "\f3cd"; }\r
-\r
-.ion-ios-arrow-back:before { content: "\f3cf"; }\r
-\r
-.icon-controls-down:before { content: "\f3d0"; }\r
-\r
-.ion-ios-arrow-forward:before { content: "\f3d1"; }\r
-\r
-.ion-ios-arrow-left:before { content: "\f3d2"; }\r
-\r
-.ion-ios-arrow-right:before { content: "\f3d3"; }\r
-\r
-.ion-ios-arrow-thin-down:before { content: "\f3d4"; }\r
-\r
-.ion-ios-arrow-thin-left:before { content: "\f3d5"; }\r
-\r
-.ion-ios-arrow-thin-right:before { content: "\f3d6"; }\r
-\r
-.ion-ios-arrow-thin-up:before { content: "\f3d7"; }\r
-\r
-.icon-controls-up:before { content: "\f3d8"; }\r
-\r
-.ion-ios-at:before { content: "\f3da"; }\r
-\r
-.ion-ios-at-outline:before { content: "\f3d9"; }\r
-\r
-.ion-ios-barcode:before { content: "\f3dc"; }\r
-\r
-.ion-ios-barcode-outline:before { content: "\f3db"; }\r
-\r
-.ion-ios-baseball:before { content: "\f3de"; }\r
-\r
-.ion-ios-baseball-outline:before { content: "\f3dd"; }\r
-\r
-.ion-ios-basketball:before { content: "\f3e0"; }\r
-\r
-.ion-ios-basketball-outline:before { content: "\f3df"; }\r
-\r
-.ion-ios-bell:before { content: "\f3e2"; }\r
-\r
-.ion-ios-bell-outline:before { content: "\f3e1"; }\r
-\r
-.ion-ios-body:before { content: "\f3e4"; }\r
-\r
-.ion-ios-body-outline:before { content: "\f3e3"; }\r
-\r
-.ion-ios-bolt:before { content: "\f3e6"; }\r
-\r
-.ion-ios-bolt-outline:before { content: "\f3e5"; }\r
-\r
-.icon-documents-book:before { content: "\f3e8"; }\r
-\r
-.icoDocuments-book-outline:before { content: "\f3e7"; }\r
-\r
-.icoDocuments-bookmarks:before { content: "\f3ea"; }\r
-\r
-.icoDocuments-bookmarks-outline:before { content: "\f3e9"; }\r
-\r
-.ion-ios-box:before { content: "\f3ec"; }\r
-\r
-.ion-ios-box-outline:before { content: "\f3eb"; }\r
-\r
-.ion-ios-briefcase:before { content: "\f3ee"; }\r
-\r
-.ion-ios-briefcase-outline:before { content: "\f3ed"; }\r
-\r
-.ion-ios-browsers:before { content: "\f3f0"; }\r
-\r
-.ion-ios-browsers-outline:before { content: "\f3ef"; }\r
-\r
-.ion-ios-calculator:before { content: "\f3f2"; }\r
-\r
-.ion-ios-calculator-outline:before { content: "\f3f1"; }\r
-\r
-.ion-ios-calendar:before { content: "\f3f4"; }\r
-\r
-.ion-ios-calendar-outline:before { content: "\f3f3"; }\r
-\r
-.ion-ios-camera:before { content: "\f3f6"; }\r
-\r
-.ion-ios-camera-outline:before { content: "\f3f5"; }\r
-\r
-.ion-ios-cart:before { content: "\f3f8"; }\r
-\r
-.ion-ios-cart-outline:before { content: "\f3f7"; }\r
-\r
-.ion-ios-chatboxes:before { content: "\f3fa"; }\r
-\r
-.ion-ios-chatboxes-outline:before { content: "\f3f9"; }\r
-\r
-.ion-ios-chatbubble:before { content: "\f3fc"; }\r
-\r
-.ion-ios-chatbubble-outline:before { content: "\f3fb"; }\r
-\r
-.ion-ios-checkmark:before { content: "\f3ff"; }\r
-\r
-.ion-ios-checkmark-empty:before { content: "\f3fd"; }\r
-\r
-.ion-ios-checkmark-outline:before { content: "\f3fe"; }\r
-\r
-.ion-ios-circle-filled:before { content: "\f400"; }\r
-\r
-.ion-ios-circle-outline:before { content: "\f401"; }\r
-\r
-.ion-ios-clock:before { content: "\f403"; }\r
-\r
-.ion-ios-clock-outline:before { content: "\f402"; }\r
-\r
-.ion-ios-close:before { content: "\f406"; }\r
-\r
-.ion-ios-close-empty:before { content: "\f404"; }\r
-\r
-.ion-ios-close-outline:before { content: "\f405"; }\r
-\r
-.ion-ios-cloud:before { content: "\f40c"; }\r
-\r
-.ion-ios-cloud-download:before { content: "\f408"; }\r
-\r
-.ion-ios-cloud-download-outline:before { content: "\f407"; }\r
-\r
-.ion-ios-cloud-outline:before { content: "\f409"; }\r
-\r
-.ion-ios-cloud-upload:before { content: "\f40b"; }\r
-\r
-.ion-ios-cloud-upload-outline:before { content: "\f40a"; }\r
-\r
-.ion-ios-cloudy:before { content: "\f410"; }\r
-\r
-.ion-ios-cloudy-night:before { content: "\f40e"; }\r
-\r
-.ion-ios-cloudy-night-outline:before { content: "\f40d"; }\r
-\r
-.ion-ios-cloudy-outline:before { content: "\f40f"; }\r
-\r
-.ion-ios-cog:before { content: "\f412"; }\r
-\r
-.ion-ios-cog-outline:before { content: "\f411"; }\r
-\r
-.ion-ios-color-filter:before { content: "\f414"; }\r
-\r
-.ion-ios-color-filter-outline:before { content: "\f413"; }\r
-\r
-.ion-ios-color-wand:before { content: "\f416"; }\r
-\r
-.ion-ios-color-wand-outline:before { content: "\f415"; }\r
-\r
-.ion-ios-compose:before { content: "\f418"; }\r
-\r
-.ion-ios-compose-outline:before { content: "\f417"; }\r
-\r
-.ion-ios-contact:before { content: "\f41a"; }\r
-\r
-.ion-ios-contact-outline:before { content: "\f419"; }\r
-\r
-.icon-documents-copy:before { content: "\f41c"; }\r
-\r
-.ion-ios-copy-outline:before { content: "\f41b"; }\r
-\r
-.ion-ios-crop:before { content: "\f41e"; }\r
-\r
-.ion-ios-crop-strong:before { content: "\f41d"; }\r
-\r
-.ion-ios-download:before { content: "\f420"; }\r
-\r
-.ion-ios-download-outline:before { content: "\f41f"; }\r
-\r
-.ion-ios-drag:before { content: "\f421"; }\r
-\r
-.ion-ios-email:before { content: "\f423"; }\r
-\r
-.ion-ios-email-outline:before { content: "\f422"; }\r
-\r
-.ion-ios-eye:before { content: "\f425"; }\r
-\r
-.ion-ios-eye-outline:before { content: "\f424"; }\r
-\r
-.ion-ios-fastforward:before { content: "\f427"; }\r
-\r
-.ion-ios-fastforward-outline:before { content: "\f426"; }\r
-\r
-.ion-ios-filing:before { content: "\f429"; }\r
-\r
-.ion-ios-filing-outline:before { content: "\f428"; }\r
-\r
-.ion-ios-film:before { content: "\f42b"; }\r
-\r
-.ion-ios-film-outline:before { content: "\f42a"; }\r
-\r
-.icon-content-flag:before { content: "\f42d"; }\r
-\r
-.ion-ios-flag-outline:before { content: "\f42c"; }\r
-\r
-.ion-ios-flame:before { content: "\f42f"; }\r
-\r
-.ion-ios-flame-outline:before { content: "\f42e"; }\r
-\r
-.ion-ios-flask:before { content: "\f431"; }\r
-\r
-.ion-ios-flask-outline:before { content: "\f430"; }\r
-\r
-.ion-ios-flower:before { content: "\f433"; }\r
-\r
-.ion-ios-flower-outline:before { content: "\f432"; }\r
-\r
-.ion-ios-folder:before { content: "\f435"; }\r
-\r
-.ion-ios-folder-outline:before { content: "\f434"; }\r
-\r
-.ion-ios-football:before { content: "\f437"; }\r
-\r
-.ion-ios-football-outline:before { content: "\f436"; }\r
-\r
-.ion-ios-game-controller-a:before { content: "\f439"; }\r
-\r
-.ion-ios-game-controller-a-outline:before { content: "\f438"; }\r
-\r
-.ion-ios-game-controller-b:before { content: "\f43b"; }\r
-\r
-.ion-ios-game-controller-b-outline:before { content: "\f43a"; }\r
-\r
-.ion-ios-gear:before { content: "\f43d"; }\r
-\r
-.ion-ios-gear-outline:before { content: "\f43c"; }\r
-\r
-.ion-ios-glasses:before { content: "\f43f"; }\r
-\r
-.ion-ios-glasses-outline:before { content: "\f43e"; }\r
-\r
-.ion-ios-grid-view:before { content: "\f441"; }\r
-\r
-.ion-ios-grid-view-outline:before { content: "\f440"; }\r
-\r
-.ion-ios-heart:before { content: "\f443"; }\r
-\r
-.ion-ios-heart-outline:before { content: "\f442"; }\r
-\r
-.ion-ios-help:before { content: "\f446"; }\r
-\r
-.ion-ios-help-empty:before { content: "\f444"; }\r
-\r
-.ion-ios-help-outline:before { content: "\f445"; }\r
-\r
-.ion-ios-home:before { content: "\f448"; }\r
-\r
-.ion-ios-home-outline:before { content: "\f447"; }\r
-\r
-.ion-ios-infinite:before { content: "\f44a"; }\r
-\r
-.ion-ios-infinite-outline:before { content: "\f449"; }\r
-\r
-.ion-ios-information:before { content: "\f44d"; }\r
-\r
-.ion-ios-information-empty:before { content: "\f44b"; }\r
-\r
-.ion-ios-information-outline:before { content: "\f44c"; }\r
-\r
-.ion-ios-ionic-outline:before { content: "\f44e"; }\r
-\r
-.ion-ios-keypad:before { content: "\f450"; }\r
-\r
-.ion-ios-keypad-outline:before { content: "\f44f"; }\r
-\r
-.ion-ios-lightbulb:before { content: "\f452"; }\r
-\r
-.ion-ios-lightbulb-outline:before { content: "\f451"; }\r
-\r
-.ion-ios-list:before { content: "\f454"; }\r
-\r
-.ion-ios-list-outline:before { content: "\f453"; }\r
-\r
-.ion-ios-location:before { content: "\f456"; }\r
-\r
-.ion-ios-location-outline:before { content: "\f455"; }\r
-\r
-.ion-ios-locked:before { content: "\f458"; }\r
-\r
-.ion-ios-locked-outline:before { content: "\f457"; }\r
-\r
-.ion-ios-loop:before { content: "\f45a"; }\r
-\r
-.ion-ios-loop-strong:before { content: "\f459"; }\r
-\r
-.ion-ios-medical:before { content: "\f45c"; }\r
-\r
-.ion-ios-medical-outline:before { content: "\f45b"; }\r
-\r
-.ion-ios-medkit:before { content: "\f45e"; }\r
-\r
-.ion-ios-medkit-outline:before { content: "\f45d"; }\r
-\r
-.ion-ios-mic:before { content: "\f461"; }\r
-\r
-.ion-ios-mic-off:before { content: "\f45f"; }\r
-\r
-.ion-ios-mic-outline:before { content: "\f460"; }\r
-\r
-.ion-ios-minus:before { content: "\f464"; }\r
-\r
-.ion-ios-minus-empty:before { content: "\f462"; }\r
-\r
-.icon-primary-accordion-minus:before { content: "\f463"; }\r
-\r
-.ion-ios-monitor:before { content: "\f466"; }\r
-\r
-.ion-ios-monitor-outline:before { content: "\f465"; }\r
-\r
-.ion-ios-moon:before { content: "\f468"; }\r
-\r
-.ion-ios-moon-outline:before { content: "\f467"; }\r
-\r
-.ion-ios-more:before { content: "\f46a"; }\r
-\r
-.ion-ios-more-outline:before { content: "\f469"; }\r
-\r
-.ion-ios-musical-note:before { content: "\f46b"; }\r
-\r
-.ion-ios-musical-notes:before { content: "\f46c"; }\r
-\r
-.ion-ios-navigate:before { content: "\f46e"; }\r
-\r
-.ion-ios-navigate-outline:before { content: "\f46d"; }\r
-\r
-.ion-ios-nutrition:before { content: "\f470"; }\r
-\r
-.ion-ios-nutrition-outline:before { content: "\f46f"; }\r
-\r
-.ion-ios-paper:before { content: "\f472"; }\r
-\r
-.ion-ios-paper-outline:before { content: "\f471"; }\r
-\r
-.ion-ios-paperplane:before { content: "\f474"; }\r
-\r
-.ion-ios-paperplane-outline:before { content: "\f473"; }\r
-\r
-.ion-ios-partlysunny:before { content: "\f476"; }\r
-\r
-.ion-ios-partlysunny-outline:before { content: "\f475"; }\r
-\r
-.ion-ios-pause:before { content: "\f478"; }\r
-\r
-.ion-ios-pause-outline:before { content: "\f477"; }\r
-\r
-.ion-ios-paw:before { content: "\f47a"; }\r
-\r
-.ion-ios-paw-outline:before { content: "\f479"; }\r
-\r
-.ion-ios-people:before { content: "\f47c"; }\r
-\r
-.ion-ios-people-outline:before { content: "\f47b"; }\r
-\r
-.ion-ios-person:before { content: "\f47e"; }\r
-\r
-.ion-ios-person-outline:before { content: "\f47d"; }\r
-\r
-.ion-ios-personadd:before { content: "\f480"; }\r
-\r
-.ion-ios-personadd-outline:before { content: "\f47f"; }\r
-\r
-.ion-ios-photos:before { content: "\f482"; }\r
-\r
-.ion-ios-photos-outline:before { content: "\f481"; }\r
-\r
-.icon-misc-piechart:before { content: "\f484"; }\r
-\r
-.icon-misc-piechart-outline:before { content: "\f483"; }\r
-\r
-.ion-ios-pint:before { content: "\f486"; }\r
-\r
-.ion-ios-pint-outline:before { content: "\f485"; }\r
-\r
-.ion-ios-play:before { content: "\f488"; }\r
-\r
-.ion-ios-play-outline:before { content: "\f487"; }\r
-\r
-.ion-ios-plus:before { content: "\f48b"; }\r
-\r
-.ion-ios-plus-empty:before { content: "\f489"; }\r
-\r
-.icon-primary-accordion-plus:before { content: "\f48a"; }\r
-\r
-.ion-ios-pricetag:before { content: "\f48d"; }\r
-\r
-.ion-ios-pricetag-outline:before { content: "\f48c"; }\r
-\r
-.ion-ios-pricetags:before { content: "\f48f"; }\r
-\r
-.ion-ios-pricetags-outline:before { content: "\f48e"; }\r
-\r
-.ion-ios-printer:before { content: "\f491"; }\r
-\r
-.ion-ios-printer-outline:before { content: "\f490"; }\r
-\r
-.ion-ios-pulse:before { content: "\f493"; }\r
-\r
-.ion-ios-pulse-strong:before { content: "\f492"; }\r
-\r
-.ion-ios-rainy:before { content: "\f495"; }\r
-\r
-.ion-ios-rainy-outline:before { content: "\f494"; }\r
-\r
-.ion-ios-recording:before { content: "\f497"; }\r
-\r
-.ion-ios-recording-outline:before { content: "\f496"; }\r
-\r
-.ion-ios-redo:before { content: "\f499"; }\r
-\r
-.ion-ios-redo-outline:before { content: "\f498"; }\r
-\r
-.ion-ios-refresh:before { content: "\f49c"; }\r
-\r
-.ion-ios-refresh-empty:before { content: "\f49a"; }\r
-\r
-.ion-ios-refresh-outline:before { content: "\f49b"; }\r
-\r
-.ion-ios-reload:before { content: "\f49d"; }\r
-\r
-.ion-ios-reverse-camera:before { content: "\f49f"; }\r
-\r
-.ion-ios-reverse-camera-outline:before { content: "\f49e"; }\r
-\r
-.ion-ios-rewind:before { content: "\f4a1"; }\r
-\r
-.ion-ios-rewind-outline:before { content: "\f4a0"; }\r
-\r
-.ion-ios-rose:before { content: "\f4a3"; }\r
-\r
-.ion-ios-rose-outline:before { content: "\f4a2"; }\r
-\r
-.ion-ios-search:before { content: "\f4a5"; }\r
-\r
-.ion-ios-search-strong:before { content: "\f4a4"; }\r
-\r
-.ion-ios-settings:before { content: "\f4a7"; }\r
-\r
-.ion-ios-settings-strong:before { content: "\f4a6"; }\r
-\r
-.ion-ios-shuffle:before { content: "\f4a9"; }\r
-\r
-.ion-ios-shuffle-strong:before { content: "\f4a8"; }\r
-\r
-.ion-ios-skipbackward:before { content: "\f4ab"; }\r
-\r
-.ion-ios-skipbackward-outline:before { content: "\f4aa"; }\r
-\r
-.ion-ios-skipforward:before { content: "\f4ad"; }\r
-\r
-.ion-ios-skipforward-outline:before { content: "\f4ac"; }\r
-\r
-.ion-ios-snowy:before { content: "\f4ae"; }\r
-\r
-.ion-ios-speedometer:before { content: "\f4b0"; }\r
-\r
-.ion-ios-speedometer-outline:before { content: "\f4af"; }\r
-\r
-.ion-ios-star:before { content: "\f4b3"; }\r
-\r
-.ion-ios-star-half:before { content: "\f4b1"; }\r
-\r
-.ion-ios-star-outline:before { content: "\f4b2"; }\r
-\r
-.ion-ios-stopwatch:before { content: "\f4b5"; }\r
-\r
-.ion-ios-stopwatch-outline:before { content: "\f4b4"; }\r
-\r
-.ion-ios-sunny:before { content: "\f4b7"; }\r
-\r
-.ion-ios-sunny-outline:before { content: "\f4b6"; }\r
-\r
-.ion-ios-telephone:before { content: "\f4b9"; }\r
-\r
-.ion-ios-telephone-outline:before { content: "\f4b8"; }\r
-\r
-.ion-ios-tennisball:before { content: "\f4bb"; }\r
-\r
-.ion-ios-tennisball-outline:before { content: "\f4ba"; }\r
-\r
-.ion-ios-thunderstorm:before { content: "\f4bd"; }\r
-\r
-.ion-ios-thunderstorm-outline:before { content: "\f4bc"; }\r
-\r
-.ion-ios-time:before { content: "\f4bf"; }\r
-\r
-.ion-ios-time-outline:before { content: "\f4be"; }\r
-\r
-.ion-ios-timer:before { content: "\f4c1"; }\r
-\r
-.ion-ios-timer-outline:before { content: "\f4c0"; }\r
-\r
-.ion-ios-toggle:before { content: "\f4c3"; }\r
-\r
-.ion-ios-toggle-outline:before { content: "\f4c2"; }\r
-\r
-.ion-ios-trash:before { content: "\f4c5"; }\r
-\r
-.ion-ios-trash-outline:before { content: "\f4c4"; }\r
-\r
-.ion-ios-undo:before { content: "\f4c7"; }\r
-\r
-.ion-ios-undo-outline:before { content: "\f4c6"; }\r
-\r
-.ion-ios-unlocked:before { content: "\f4c9"; }\r
-\r
-.ion-ios-unlocked-outline:before { content: "\f4c8"; }\r
-\r
-.ion-ios-upload:before { content: "\f4cb"; }\r
-\r
-.ion-ios-upload-outline:before { content: "\f4ca"; }\r
-\r
-.ion-ios-videocam:before { content: "\f4cd"; }\r
-\r
-.ion-ios-videocam-outline:before { content: "\f4cc"; }\r
-\r
-.ion-ios-volume-high:before { content: "\f4ce"; }\r
-\r
-.ion-ios-volume-low:before { content: "\f4cf"; }\r
-\r
-.ion-ios-wineglass:before { content: "\f4d1"; }\r
-\r
-.ion-ios-wineglass-outline:before { content: "\f4d0"; }\r
-\r
-.ion-ios-world:before { content: "\f4d3"; }\r
-\r
-.ion-ios-world-outline:before { content: "\f4d2"; }\r
-\r
-.ion-ipad:before { content: "\f1f9"; }\r
-\r
-.ion-iphone:before { content: "\f1fa"; }\r
-\r
-.ion-ipod:before { content: "\f1fb"; }\r
-\r
-.ion-jet:before { content: "\f295"; }\r
-\r
-.ion-key:before { content: "\f296"; }\r
-\r
-.ion-knife:before { content: "\f297"; }\r
-\r
-.ion-laptop:before { content: "\f1fc"; }\r
-\r
-.ion-leaf:before { content: "\f1fd"; }\r
-\r
-.ion-levels:before { content: "\f298"; }\r
-\r
-.ion-lightbulb:before { content: "\f299"; }\r
-\r
-.ion-link:before { content: "\f1fe"; }\r
-\r
-.ion-load-a:before { content: "\f29a"; }\r
-\r
-.ion-load-b:before { content: "\f29b"; }\r
-\r
-.ion-load-c:before { content: "\f29c"; }\r
-\r
-.ion-load-d:before { content: "\f29d"; }\r
-\r
-.ion-location:before { content: "\f1ff"; }\r
-\r
-.ion-lock-combination:before { content: "\f4d4"; }\r
-\r
-.ion-locked:before { content: "\f200"; }\r
-\r
-.ion-log-in:before { content: "\f29e"; }\r
-\r
-.icon-building-door:before { content: "\f29f"; }\r
-\r
-.ion-loop:before { content: "\f201"; }\r
-\r
-.ion-magnet:before { content: "\f2a0"; }\r
-\r
-.ion-male:before { content: "\f2a1"; }\r
-\r
-.ion-man:before { content: "\f202"; }\r
-\r
-.ion-map:before { content: "\f203"; }\r
-\r
-.ion-medkit:before { content: "\f2a2"; }\r
-\r
-.ion-merge:before { content: "\f33f"; }\r
-\r
-.ion-mic-a:before { content: "\f204"; }\r
-\r
-.ion-mic-b:before { content: "\f205"; }\r
-\r
-.ion-mic-c:before { content: "\f206"; }\r
-\r
-.ion-minus:before { content: "\f209"; }\r
-\r
-.ion-minus-circled:before { content: "\f207"; }\r
-\r
-.ion-minus-round:before { content: "\f208"; }\r
-\r
-.ion-model-s:before { content: "\f2c1"; }\r
-\r
-.ion-monitor:before { content: "\f20a"; }\r
-\r
-.ion-more:before { content: "\f20b"; }\r
-\r
-.ion-mouse:before { content: "\f340"; }\r
-\r
-.ion-music-note:before { content: "\f20c"; }\r
-\r
-.ion-navicon:before { content: "\f20e"; }\r
-\r
-.icon-content-gridguide:before { content: "\f20d"; }\r
-\r
-.ion-navigate:before { content: "\f2a3"; }\r
-\r
-.ion-network:before { content: "\f341"; }\r
-\r
-.ion-no-smoking:before { content: "\f2c2"; }\r
-\r
-.ion-nuclear:before { content: "\f2a4"; }\r
-\r
-.ion-outlet:before { content: "\f342"; }\r
-\r
-.ion-paintbrush:before { content: "\f4d5"; }\r
-\r
-.ion-paintbucket:before { content: "\f4d6"; }\r
-\r
-.ion-paper-airplane:before { content: "\f2c3"; }\r
-\r
-.ion-paperclip:before { content: "\f20f"; }\r
-\r
-.ion-pause:before { content: "\f210"; }\r
-\r
-.icon-people-oneperson:before { content: "\f213"; }\r
-\r
-.icon-people-oneperson-add:before { content: "\f211"; }\r
-\r
-.icon-people-oneperson-stalker:before { content: "\f212"; }\r
-\r
-.ion-pie-graph:before { content: "\f2a5"; }\r
-\r
-.ion-pin:before { content: "\f2a6"; }\r
-\r
-.ion-pinpoint:before { content: "\f2a7"; }\r
-\r
-.ion-pizza:before { content: "\f2a8"; }\r
-\r
-.ion-plane:before { content: "\f214"; }\r
-\r
-.ion-planet:before { content: "\f343"; }\r
-\r
-.icon-controls-pointer:before { content: "\f215"; }\r
-\r
-.ion-playstation:before { content: "\f30a"; }\r
-\r
-.ion-plus:before { content: "\f218"; }\r
-\r
-.ion-plus-circled:before { content: "\f216"; }\r
-\r
-.ion-plus-round:before { content: "\f217"; }\r
-\r
-.ion-podium:before { content: "\f344"; }\r
-\r
-.ion-pound:before { content: "\f219"; }\r
-\r
-.ion-power:before { content: "\f2a9"; }\r
-\r
-.ion-pricetag:before { content: "\f2aa"; }\r
-\r
-.ion-pricetags:before { content: "\f2ab"; }\r
-\r
-.ion-printer:before { content: "\f21a"; }\r
-\r
-.ion-pull-request:before { content: "\f345"; }\r
-\r
-.ion-qr-scanner:before { content: "\f346"; }\r
-\r
-.ion-quote:before { content: "\f347"; }\r
-\r
-.ion-radio-waves:before { content: "\f2ac"; }\r
-\r
-.ion-record:before { content: "\f21b"; }\r
-\r
-.icon-arrows-replay-restart:before { content: "\f21c"; }\r
-\r
-.ion-reply:before { content: "\f21e"; }\r
-\r
-.ion-reply-all:before { content: "\f21d"; }\r
-\r
-.ion-ribbon-a:before { content: "\f348"; }\r
-\r
-.ion-ribbon-b:before { content: "\f349"; }\r
-\r
-.ion-sad:before { content: "\f34a"; }\r
-\r
-.ion-sad-outline:before { content: "\f4d7"; }\r
-\r
-.ion-scissors:before { content: "\f34b"; }\r
-\r
-.ion-search:before { content: "\f21f"; }\r
-\r
-.ion-settings:before { content: "\f2ad"; }\r
-\r
-.ion-share:before { content: "\f220"; }\r
-\r
-.ion-shuffle:before { content: "\f221"; }\r
-\r
-.ion-skip-backward:before { content: "\f222"; }\r
-\r
-.ion-skip-forward:before { content: "\f223"; }\r
-\r
-.ion-social-android:before { content: "\f225"; }\r
-\r
-.ion-social-android-outline:before { content: "\f224"; }\r
-\r
-.ion-social-angular:before { content: "\f4d9"; }\r
-\r
-.ion-social-angular-outline:before { content: "\f4d8"; }\r
-\r
-.ion-social-apple:before { content: "\f227"; }\r
-\r
-.ion-social-apple-outline:before { content: "\f226"; }\r
-\r
-.ion-social-bitcoin:before { content: "\f2af"; }\r
-\r
-.ion-social-bitcoin-outline:before { content: "\f2ae"; }\r
-\r
-.ion-social-buffer:before { content: "\f229"; }\r
-\r
-.ion-social-buffer-outline:before { content: "\f228"; }\r
-\r
-.ion-social-chrome:before { content: "\f4db"; }\r
-\r
-.ion-social-chrome-outline:before { content: "\f4da"; }\r
-\r
-.ion-social-codepen:before { content: "\f4dd"; }\r
-\r
-.ion-social-codepen-outline:before { content: "\f4dc"; }\r
-\r
-.ion-social-css3:before { content: "\f4df"; }\r
-\r
-.ion-social-css3-outline:before { content: "\f4de"; }\r
-\r
-.ion-social-designernews:before { content: "\f22b"; }\r
-\r
-.ion-social-designernews-outline:before { content: "\f22a"; }\r
-\r
-.ion-social-dribbble:before { content: "\f22d"; }\r
-\r
-.ion-social-dribbble-outline:before { content: "\f22c"; }\r
-\r
-.ion-social-dropbox:before { content: "\f22f"; }\r
-\r
-.ion-social-dropbox-outline:before { content: "\f22e"; }\r
-\r
-.ion-social-euro:before { content: "\f4e1"; }\r
-\r
-.ion-social-euro-outline:before { content: "\f4e0"; }\r
-\r
-.ion-social-facebook:before { content: "\f231"; }\r
-\r
-.ion-social-facebook-outline:before { content: "\f230"; }\r
-\r
-.ion-social-foursquare:before { content: "\f34d"; }\r
-\r
-.ion-social-foursquare-outline:before { content: "\f34c"; }\r
-\r
-.ion-social-freebsd-devil:before { content: "\f2c4"; }\r
-\r
-.ion-social-github:before { content: "\f233"; }\r
-\r
-.ion-social-github-outline:before { content: "\f232"; }\r
-\r
-.ion-social-google:before { content: "\f34f"; }\r
-\r
-.ion-social-google-outline:before { content: "\f34e"; }\r
-\r
-.ion-social-googleplus:before { content: "\f235"; }\r
-\r
-.ion-social-googleplus-outline:before { content: "\f234"; }\r
-\r
-.ion-social-hackernews:before { content: "\f237"; }\r
-\r
-.ion-social-hackernews-outline:before { content: "\f236"; }\r
-\r
-.ion-social-html5:before { content: "\f4e3"; }\r
-\r
-.ion-social-html5-outline:before { content: "\f4e2"; }\r
-\r
-.ion-social-instagram:before { content: "\f351"; }\r
-\r
-.ion-social-instagram-outline:before { content: "\f350"; }\r
-\r
-.ion-social-javascript:before { content: "\f4e5"; }\r
-\r
-.ion-social-javascript-outline:before { content: "\f4e4"; }\r
-\r
-.ion-social-linkedin:before { content: "\f239"; }\r
-\r
-.ion-social-linkedin-outline:before { content: "\f238"; }\r
-\r
-.ion-social-markdown:before { content: "\f4e6"; }\r
-\r
-.ion-social-nodejs:before { content: "\f4e7"; }\r
-\r
-.ion-social-octocat:before { content: "\f4e8"; }\r
-\r
-.ion-social-pinterest:before { content: "\f2b1"; }\r
-\r
-.ion-social-pinterest-outline:before { content: "\f2b0"; }\r
-\r
-.ion-social-python:before { content: "\f4e9"; }\r
-\r
-.ion-social-reddit:before { content: "\f23b"; }\r
-\r
-.ion-social-reddit-outline:before { content: "\f23a"; }\r
-\r
-.ion-social-rss:before { content: "\f23d"; }\r
-\r
-.ion-social-rss-outline:before { content: "\f23c"; }\r
-\r
-.ion-social-sass:before { content: "\f4ea"; }\r
-\r
-.ion-social-skype:before { content: "\f23f"; }\r
-\r
-.ion-social-skype-outline:before { content: "\f23e"; }\r
-\r
-.ion-social-snapchat:before { content: "\f4ec"; }\r
-\r
-.ion-social-snapchat-outline:before { content: "\f4eb"; }\r
-\r
-.ion-social-tumblr:before { content: "\f241"; }\r
-\r
-.ion-social-tumblr-outline:before { content: "\f240"; }\r
-\r
-.ion-social-tux:before { content: "\f2c5"; }\r
-\r
-.ion-social-twitch:before { content: "\f4ee"; }\r
-\r
-.ion-social-twitch-outline:before { content: "\f4ed"; }\r
-\r
-.ion-social-twitter:before { content: "\f243"; }\r
-\r
-.ion-social-twitter-outline:before { content: "\f242"; }\r
-\r
-.ion-social-usd:before { content: "\f353"; }\r
-\r
-.ion-social-usd-outline:before { content: "\f352"; }\r
-\r
-.ion-social-vimeo:before { content: "\f245"; }\r
-\r
-.ion-social-vimeo-outline:before { content: "\f244"; }\r
-\r
-.ion-social-whatsapp:before { content: "\f4f0"; }\r
-\r
-.ion-social-whatsapp-outline:before { content: "\f4ef"; }\r
-\r
-.ion-social-windows:before { content: "\f247"; }\r
-\r
-.ion-social-windows-outline:before { content: "\f246"; }\r
-\r
-.ion-social-wordpress:before { content: "\f249"; }\r
-\r
-.ion-social-wordpress-outline:before { content: "\f248"; }\r
-\r
-.ion-social-yahoo:before { content: "\f24b"; }\r
-\r
-.ion-social-yahoo-outline:before { content: "\f24a"; }\r
-\r
-.ion-social-yen:before { content: "\f4f2"; }\r
-\r
-.ion-social-yen-outline:before { content: "\f4f1"; }\r
-\r
-.ion-social-youtube:before { content: "\f24d"; }\r
-\r
-.ion-social-youtube-outline:before { content: "\f24c"; }\r
-\r
-.ion-soup-can:before { content: "\f4f4"; }\r
-\r
-.ion-soup-can-outline:before { content: "\f4f3"; }\r
-\r
-.ion-speakerphone:before { content: "\f2b2"; }\r
-\r
-.ion-speedometer:before { content: "\f2b3"; }\r
-\r
-.ion-spoon:before { content: "\f2b4"; }\r
-\r
-.icon-content-star:before { content: "\f24e"; }\r
-\r
-.ion-stats-bars:before { content: "\f2b5"; }\r
-\r
-.ion-steam:before { content: "\f30b"; }\r
-\r
-.ion-stop:before { content: "\f24f"; }\r
-\r
-.ion-thermometer:before { content: "\f2b6"; }\r
-\r
-.ion-thumbsdown:before { content: "\f250"; }\r
-\r
-.ion-thumbsup:before { content: "\f251"; }\r
-\r
-.ion-toggle:before { content: "\f355"; }\r
-\r
-.ion-toggle-filled:before { content: "\f354"; }\r
-\r
-.ion-transgender:before { content: "\f4f5"; }\r
-\r
-.icon-misc-trash:before { content: "\f252"; }\r
-\r
-.ion-trash-b:before { content: "\f253"; }\r
-\r
-.ion-trophy:before { content: "\f356"; }\r
-\r
-.ion-tshirt:before { content: "\f4f7"; }\r
-\r
-.ion-tshirt-outline:before { content: "\f4f6"; }\r
-\r
-.ion-umbrella:before { content: "\f2b7"; }\r
-\r
-.ion-university:before { content: "\f357"; }\r
-\r
-.ion-unlocked:before { content: "\f254"; }\r
-\r
-.icon-arrows-upload:before { content: "\f255"; }\r
-\r
-.ion-usb:before { content: "\f2b8"; }\r
-\r
-.ion-videocamera:before { content: "\f256"; }\r
-\r
-.ion-volume-high:before { content: "\f257"; }\r
-\r
-.ion-volume-low:before { content: "\f258"; }\r
-\r
-.ion-volume-medium:before { content: "\f259"; }\r
-\r
-.ion-volume-mute:before { content: "\f25a"; }\r
-\r
-.ion-wand:before { content: "\f358"; }\r
-\r
-.ion-waterdrop:before { content: "\f25b"; }\r
-\r
-.ion-wifi:before { content: "\f25c"; }\r
-\r
-.ion-wineglass:before { content: "\f2b9"; }\r
-\r
-.ion-woman:before { content: "\f25d"; }\r
-\r
-.ion-wrench:before { content: "\f2ba"; }\r
-\r
-.ion-xbox:before { content: "\f30c"; }\r
-\r
-.icon-user:before { content: "\f213"; } \r
-\r
-.icon-star:before { content: "\f4b3"; }\r
-\r
-.icon-edit:before { content: "\f2bf"; }\r
-\r
-.icon-settings:before { content: "\f13d"; }\r
-\r
-.icon-apps-marketplace:before { content: "\f35c"; }\r
-\r
-.icon-add-widget:before { content: "\f3f0"; }
\ No newline at end of file
+@charset "UTF-8";
+/*!
+  Ionicons, v2.0.0
+  Created by Ben Sperry for the Ionic Framework, http://ionicons.com/
+  https://twitter.com/benjsperry  https://twitter.com/ionicframework
+  MIT License: https://github.com/driftyco/ionicons
+
+  Android-style icons originally built by Google’s
+  Material Design Icons: https://github.com/google/material-design-icons
+  used under CC BY http://creativecommons.org/licenses/by/4.0/
+  Modified icons to fit ionicon’s grid from original.
+*/
+@font-face { font-family: "Ionicons"; src: url("../fonts/ionicons.eot?v=2.0.0"); src: url("../fonts/ionicons.eot?v=2.0.0#iefix") format("embedded-opentype"), url("../fonts/ionicons.ttf?v=2.0.0") format("truetype"), url("../fonts/ionicons.woff?v=2.0.0") format("woff"), url("../fonts/ionicons.svg?v=2.0.0#Ionicons") format("svg"); font-weight: normal; font-style: normal; }
+.ion, .ionicons, .ion-alert:before, .ion-alert-circled:before, .ion-android-add:before, .ion-android-add-circle:before, .ion-android-alarm-clock:before, .ion-android-alert:before, .ion-android-apps:before, .ion-android-archive:before, .ion-android-arrow-back:before, .ion-android-arrow-down:before, .ion-android-arrow-dropdown:before, .ion-android-arrow-dropdown-circle:before, .ion-android-arrow-dropleft:before, .ion-android-arrow-dropleft-circle:before, .ion-android-arrow-dropright:before, .ion-android-arrow-dropright-circle:before, .ion-android-arrow-dropup:before, .ion-android-arrow-dropup-circle:before, .ion-android-arrow-forward:before, .ion-android-arrow-up:before, .ion-android-attach:before, .ion-android-bar:before, .ion-android-bicycle:before, .ion-android-boat:before, .ion-android-bookmark:before, .ion-android-bulb:before, .ion-android-bus:before, .ion-android-calendar:before, .ion-android-call:before, .ion-android-camera:before, .ion-android-cancel:before, .ion-android-car:before, .ion-android-cart:before, .ion-android-chat:before, .ion-android-checkbox:before, .ion-android-checkbox-blank:before, .ion-android-checkbox-outline:before, .ion-android-checkbox-outline-blank:before, .ion-android-checkmark-circle:before, .ion-android-clipboard:before, .ion-android-close:before, .ion-android-cloud:before, .ion-android-cloud-circle:before, .ion-android-cloud-done:before, .ion-android-cloud-outline:before, .ion-android-color-palette:before, .ion-android-compass:before, .ion-android-contact:before, .ion-android-contacts:before, .ion-android-contract:before, .ion-android-create:before, .ion-android-delete:before, .ion-android-desktop:before, .ion-android-document:before, .ion-android-done:before, .ion-android-done-all:before, .ion-android-download:before, .ion-android-drafts:before, .ion-android-exit:before, .ion-android-expand:before, .ion-android-favorite:before, .ion-android-favorite-outline:before, .ion-android-film:before, .ion-android-folder:before, .ion-android-folder-open:before, .ion-android-funnel:before, .ion-android-globe:before, .ion-android-hand:before, .ion-android-hangout:before, .ion-android-happy:before, .ion-android-home:before, .ion-android-image:before, .ion-android-laptop:before, .ion-android-list:before, .ion-android-locate:before, .ion-android-lock:before, .ion-android-mail:before, .ion-android-map:before, .ion-android-menu:before, .ion-android-microphone:before, .ion-android-microphone-off:before, .ion-android-more-horizontal:before, .ion-android-more-vertical:before, .ion-android-navigate:before, .ion-android-notifications:before, .ion-android-notifications-none:before, .ion-android-notifications-off:before, .ion-android-open:before, .ion-android-options:before, .ion-android-people:before, .ion-android-person:before, .ion-android-person-add:before, .ion-android-phone-landscape:before, .ion-android-phone-portrait:before, .ion-android-pin:before, .ion-android-plane:before, .ion-android-playstore:before, .ion-android-print:before, .ion-android-radio-button-off:before, .ion-android-radio-button-on:before, .ion-android-refresh:before, .ion-android-remove:before, .ion-android-remove-circle:before, .ion-android-restaurant:before, .ion-android-sad:before, .ion-android-search:before, .ion-android-send:before, .ion-android-settings:before, .ion-android-share:before, .ion-android-share-alt:before, .ion-android-star:before, .ion-android-star-half:before, .ion-android-star-outline:before, .ion-android-stopwatch:before, .ion-android-subway:before, .ion-android-sunny:before, .ion-android-sync:before, .ion-android-textsms:before, .ion-android-time:before, .ion-android-train:before, .ion-android-unlock:before, .ion-android-upload:before, .ion-android-volume-down:before, .ion-android-volume-mute:before, .ion-android-volume-off:before, .ion-android-volume-up:before, .ion-android-walk:before, .ion-android-warning:before, .ion-android-watch:before, .ion-android-wifi:before, .ion-aperture:before, .ion-archive:before, .ion-arrow-down-a:before, .ion-arrow-down-b:before, .ion-arrow-down-c:before, .ion-arrow-expand:before, .ion-arrow-graph-down-left:before, .ion-arrow-graph-down-right:before, .ion-arrow-graph-up-left:before, .ion-arrow-graph-up-right:before, .ion-arrow-left-a:before, .ion-arrow-left-b:before, .ion-arrow-left-c:before, .ion-arrow-move:before, .ion-arrow-resize:before, .ion-arrow-return-left:before, .ion-arrow-return-right:before, .ion-arrow-right-a:before, .ion-arrow-right-b:before, .ion-arrow-right-c:before, .ion-arrow-shrink:before, .ion-arrow-swap:before, .ion-arrow-up-a:before, .ion-arrow-up-b:before, .ion-arrow-up-c:before, .ion-asterisk:before, .ion-at:before, .ion-backspace:before, .ion-backspace-outline:before, .ion-bag:before, .ion-battery-charging:before, .ion-battery-empty:before, .ion-battery-full:before, .ion-battery-half:before, .ion-battery-low:before, .ion-beaker:before, .ion-beer:before, .ion-bluetooth:before, .ion-bonfire:before, .ion-bookmark:before, .ion-bowtie:before, .ion-briefcase:before, .ion-bug:before, .ion-calculator:before, .ion-calendar:before, .ion-camera:before, .ion-card:before, .ion-cash:before, .ion-chatbox:before, .ion-chatbox-working:before, .ion-chatboxes:before, .ion-chatbubble:before, .ion-chatbubble-working:before, .ion-chatbubbles:before, .ion-checkmark:before, .ion-checkmark-circled:before, .ion-checkmark-round:before, .ion-chevron-down:before, .ion-chevron-left:before, .ion-chevron-right:before, .ion-chevron-up:before, .ion-clipboard:before, .ion-clock:before, .ion-close:before, .ion-close-circled:before, .ion-close-round:before, .ion-closed-captioning:before, .ion-cloud:before, .ion-code:before, .ion-code-download:before, .ion-code-working:before, .ion-coffee:before, .ion-compass:before, .ion-compose:before, .ion-connection-bars:before, .ion-contrast:before, .ion-crop:before, .ion-cube:before, .ion-disc:before, .ion-document:before, .ion-document-text:before, .ion-drag:before, .ion-earth:before, .ion-easel:before, .ion-edit:before, .ion-egg:before, .ion-eject:before, .ion-email:before, .ion-email-unread:before, .ion-erlenmeyer-flask:before, .ion-erlenmeyer-flask-bubbles:before, .ion-eye:before, .ion-eye-disabled:before, .ion-female:before, .ion-filing:before, .ion-film-marker:before, .ion-fireball:before, .ion-flag:before, .ion-flame:before, .ion-flash:before, .ion-flash-off:before, .ion-folder:before, .ion-fork:before, .ion-fork-repo:before, .ion-forward:before, .ion-funnel:before, .ion-gear-a:before, .ion-gear-b:before, .ion-grid:before, .ion-hammer:before, .ion-happy:before, .ion-happy-outline:before, .ion-headphone:before, .ion-heart:before, .ion-heart-broken:before, .ion-help:before, .ion-help-buoy:before, .ion-help-circled:before, .ion-home:before, .ion-icecream:before, .ion-image:before, .ion-images:before, .ion-information:before, .ion-information-circled:before, .ion-ionic:before, .ion-ios-alarm:before, .ion-ios-alarm-outline:before, .ion-ios-albums:before, .ion-ios-albums-outline:before, .ion-ios-americanfootball:before, .ion-ios-americanfootball-outline:before, .ion-ios-analytics:before, .ion-ios-analytics-outline:before, .ion-ios-arrow-back:before, .ion-ios-arrow-down:before, .ion-ios-arrow-forward:before, .ion-ios-arrow-left:before, .ion-ios-arrow-right:before, .ion-ios-arrow-thin-down:before, .ion-ios-arrow-thin-left:before, .ion-ios-arrow-thin-right:before, .ion-ios-arrow-thin-up:before, .ion-ios-arrow-up:before, .ion-ios-at:before, .ion-ios-at-outline:before, .ion-ios-barcode:before, .ion-ios-barcode-outline:before, .ion-ios-baseball:before, .ion-ios-baseball-outline:before, .ion-ios-basketball:before, .ion-ios-basketball-outline:before, .ion-ios-bell:before, .ion-ios-bell-outline:before, .ion-ios-body:before, .ion-ios-body-outline:before, .ion-ios-bolt:before, .ion-ios-bolt-outline:before, .ion-ios-book:before, .ion-ios-book-outline:before, .ion-ios-bookmarks:before, .ion-ios-bookmarks-outline:before, .ion-ios-box:before, .ion-ios-box-outline:before, .ion-ios-briefcase:before, .ion-ios-briefcase-outline:before, .ion-ios-browsers:before, .ion-ios-browsers-outline:before, .ion-ios-calculator:before, .ion-ios-calculator-outline:before, .ion-ios-calendar:before, .ion-ios-calendar-outline:before, .ion-ios-camera:before, .ion-ios-camera-outline:before, .ion-ios-cart:before, .ion-ios-cart-outline:before, .ion-ios-chatboxes:before, .ion-ios-chatboxes-outline:before, .ion-ios-chatbubble:before, .ion-ios-chatbubble-outline:before, .ion-ios-checkmark:before, .ion-ios-checkmark-empty:before, .ion-ios-checkmark-outline:before, .ion-ios-circle-filled:before, .ion-ios-circle-outline:before, .ion-ios-clock:before, .ion-ios-clock-outline:before, .ion-ios-close:before, .ion-ios-close-empty:before, .ion-ios-close-outline:before, .ion-ios-cloud:before, .ion-ios-cloud-download:before, .ion-ios-cloud-download-outline:before, .ion-ios-cloud-outline:before, .ion-ios-cloud-upload:before, .ion-ios-cloud-upload-outline:before, .ion-ios-cloudy:before, .ion-ios-cloudy-night:before, .ion-ios-cloudy-night-outline:before, .ion-ios-cloudy-outline:before, .ion-ios-cog:before, .ion-ios-cog-outline:before, .ion-ios-color-filter:before, .ion-ios-color-filter-outline:before, .ion-ios-color-wand:before, .ion-ios-color-wand-outline:before, .ion-ios-compose:before, .ion-ios-compose-outline:before, .ion-ios-contact:before, .ion-ios-contact-outline:before, .ion-ios-copy:before, .ion-ios-copy-outline:before, .ion-ios-crop:before, .ion-ios-crop-strong:before, .ion-ios-download:before, .ion-ios-download-outline:before, .ion-ios-drag:before, .ion-ios-email:before, .ion-ios-email-outline:before, .ion-ios-eye:before, .ion-ios-eye-outline:before, .ion-ios-fastforward:before, .ion-ios-fastforward-outline:before, .ion-ios-filing:before, .ion-ios-filing-outline:before, .ion-ios-film:before, .ion-ios-film-outline:before, .ion-ios-flag:before, .ion-ios-flag-outline:before, .ion-ios-flame:before, .ion-ios-flame-outline:before, .ion-ios-flask:before, .ion-ios-flask-outline:before, .ion-ios-flower:before, .ion-ios-flower-outline:before, .ion-ios-folder:before, .ion-ios-folder-outline:before, .ion-ios-football:before, .ion-ios-football-outline:before, .ion-ios-game-controller-a:before, .ion-ios-game-controller-a-outline:before, .ion-ios-game-controller-b:before, .ion-ios-game-controller-b-outline:before, .ion-ios-gear:before, .ion-ios-gear-outline:before, .ion-ios-glasses:before, .ion-ios-glasses-outline:before, .ion-ios-grid-view:before, .ion-ios-grid-view-outline:before, .ion-ios-heart:before, .ion-ios-heart-outline:before, .ion-ios-help:before, .ion-ios-help-empty:before, .ion-ios-help-outline:before, .ion-ios-home:before, .ion-ios-home-outline:before, .ion-ios-infinite:before, .ion-ios-infinite-outline:before, .ion-ios-information:before, .ion-ios-information-empty:before, .ion-ios-information-outline:before, .ion-ios-ionic-outline:before, .ion-ios-keypad:before, .ion-ios-keypad-outline:before, .ion-ios-lightbulb:before, .ion-ios-lightbulb-outline:before, .ion-ios-list:before, .ion-ios-list-outline:before, .ion-ios-location:before, .ion-ios-location-outline:before, .ion-ios-locked:before, .ion-ios-locked-outline:before, .ion-ios-loop:before, .ion-ios-loop-strong:before, .ion-ios-medical:before, .ion-ios-medical-outline:before, .ion-ios-medkit:before, .ion-ios-medkit-outline:before, .ion-ios-mic:before, .ion-ios-mic-off:before, .ion-ios-mic-outline:before, .ion-ios-minus:before, .ion-ios-minus-empty:before, .ion-ios-minus-outline:before, .ion-ios-monitor:before, .ion-ios-monitor-outline:before, .ion-ios-moon:before, .ion-ios-moon-outline:before, .ion-ios-more:before, .ion-ios-more-outline:before, .ion-ios-musical-note:before, .ion-ios-musical-notes:before, .ion-ios-navigate:before, .ion-ios-navigate-outline:before, .ion-ios-nutrition:before, .ion-ios-nutrition-outline:before, .ion-ios-paper:before, .ion-ios-paper-outline:before, .ion-ios-paperplane:before, .ion-ios-paperplane-outline:before, .ion-ios-partlysunny:before, .ion-ios-partlysunny-outline:before, .ion-ios-pause:before, .ion-ios-pause-outline:before, .ion-ios-paw:before, .ion-ios-paw-outline:before, .ion-ios-people:before, .ion-ios-people-outline:before, .ion-ios-person:before, .ion-ios-person-outline:before, .ion-ios-personadd:before, .ion-ios-personadd-outline:before, .ion-ios-photos:before, .ion-ios-photos-outline:before, .ion-ios-pie:before, .ion-ios-pie-outline:before, .ion-ios-pint:before, .ion-ios-pint-outline:before, .ion-ios-play:before, .ion-ios-play-outline:before, .ion-ios-plus:before, .ion-ios-plus-empty:before, .ion-ios-plus-outline:before, .ion-ios-pricetag:before, .ion-ios-pricetag-outline:before, .ion-ios-pricetags:before, .ion-ios-pricetags-outline:before, .ion-ios-printer:before, .ion-ios-printer-outline:before, .ion-ios-pulse:before, .ion-ios-pulse-strong:before, .ion-ios-rainy:before, .ion-ios-rainy-outline:before, .ion-ios-recording:before, .ion-ios-recording-outline:before, .ion-ios-redo:before, .ion-ios-redo-outline:before, .ion-ios-refresh:before, .ion-ios-refresh-empty:before, .ion-ios-refresh-outline:before, .ion-ios-reload:before, .ion-ios-reverse-camera:before, .ion-ios-reverse-camera-outline:before, .ion-ios-rewind:before, .ion-ios-rewind-outline:before, .ion-ios-rose:before, .ion-ios-rose-outline:before, .ion-ios-search:before, .ion-ios-search-strong:before, .ion-ios-settings:before, .ion-ios-settings-strong:before, .ion-ios-shuffle:before, .ion-ios-shuffle-strong:before, .ion-ios-skipbackward:before, .ion-ios-skipbackward-outline:before, .ion-ios-skipforward:before, .ion-ios-skipforward-outline:before, .ion-ios-snowy:before, .ion-ios-speedometer:before, .ion-ios-speedometer-outline:before, .ion-ios-star:before, .ion-ios-star-half:before, .ion-ios-star-outline:before, .ion-ios-stopwatch:before, .ion-ios-stopwatch-outline:before, .ion-ios-sunny:before, .ion-ios-sunny-outline:before, .ion-ios-telephone:before, .ion-ios-telephone-outline:before, .ion-ios-tennisball:before, .ion-ios-tennisball-outline:before, .ion-ios-thunderstorm:before, .ion-ios-thunderstorm-outline:before, .ion-ios-time:before, .ion-ios-time-outline:before, .ion-ios-timer:before, .ion-ios-timer-outline:before, .ion-ios-toggle:before, .ion-ios-toggle-outline:before, .ion-ios-trash:before, .ion-ios-trash-outline:before, .ion-ios-undo:before, .ion-ios-undo-outline:before, .ion-ios-unlocked:before, .ion-ios-unlocked-outline:before, .ion-ios-upload:before, .ion-ios-upload-outline:before, .ion-ios-videocam:before, .ion-ios-videocam-outline:before, .ion-ios-volume-high:before, .ion-ios-volume-low:before, .ion-ios-wineglass:before, .ion-ios-wineglass-outline:before, .ion-ios-world:before, .ion-ios-world-outline:before, .ion-ipad:before, .ion-iphone:before, .ion-ipod:before, .ion-jet:before, .ion-key:before, .ion-knife:before, .ion-laptop:before, .ion-leaf:before, .ion-levels:before, .ion-lightbulb:before, .ion-link:before, .ion-load-a:before, .ion-load-b:before, .ion-load-c:before, .ion-load-d:before, .ion-location:before, .ion-lock-combination:before, .ion-locked:before, .ion-log-in:before, .ion-log-out:before, .ion-loop:before, .ion-magnet:before, .ion-male:before, .ion-man:before, .ion-map:before, .ion-medkit:before, .ion-merge:before, .ion-mic-a:before, .ion-mic-b:before, .ion-mic-c:before, .ion-minus:before, .ion-minus-circled:before, .ion-minus-round:before, .ion-model-s:before, .ion-monitor:before, .ion-more:before, .ion-mouse:before, .ion-music-note:before, .ion-navicon:before, .ion-navicon-round:before, .ion-navigate:before, .ion-network:before, .ion-no-smoking:before, .ion-nuclear:before, .ion-outlet:before, .ion-paintbrush:before, .ion-paintbucket:before, .ion-paper-airplane:before, .ion-paperclip:before, .ion-pause:before, .ion-person:before, .ion-person-add:before, .ion-person-stalker:before, .ion-pie-graph:before, .ion-pin:before, .ion-pinpoint:before, .ion-pizza:before, .ion-plane:before, .ion-planet:before, .ion-play:before, .ion-playstation:before, .ion-plus:before, .ion-plus-circled:before, .ion-plus-round:before, .ion-podium:before, .ion-pound:before, .ion-power:before, .ion-pricetag:before, .ion-pricetags:before, .ion-printer:before, .ion-pull-request:before, .ion-qr-scanner:before, .ion-quote:before, .ion-radio-waves:before, .ion-record:before, .ion-refresh:before, .ion-reply:before, .ion-reply-all:before, .ion-ribbon-a:before, .ion-ribbon-b:before, .ion-sad:before, .ion-sad-outline:before, .ion-scissors:before, .ion-search:before, .ion-settings:before, .ion-share:before, .ion-shuffle:before, .ion-skip-backward:before, .ion-skip-forward:before, .ion-social-android:before, .ion-social-android-outline:before, .ion-social-angular:before, .ion-social-angular-outline:before, .ion-social-apple:before, .ion-social-apple-outline:before, .ion-social-bitcoin:before, .ion-social-bitcoin-outline:before, .ion-social-buffer:before, .ion-social-buffer-outline:before, .ion-social-chrome:before, .ion-social-chrome-outline:before, .ion-social-codepen:before, .ion-social-codepen-outline:before, .ion-social-css3:before, .ion-social-css3-outline:before, .ion-social-designernews:before, .ion-social-designernews-outline:before, .ion-social-dribbble:before, .ion-social-dribbble-outline:before, .ion-social-dropbox:before, .ion-social-dropbox-outline:before, .ion-social-euro:before, .ion-social-euro-outline:before, .ion-social-facebook:before, .ion-social-facebook-outline:before, .ion-social-foursquare:before, .ion-social-foursquare-outline:before, .ion-social-freebsd-devil:before, .ion-social-github:before, .ion-social-github-outline:before, .ion-social-google:before, .ion-social-google-outline:before, .ion-social-googleplus:before, .ion-social-googleplus-outline:before, .ion-social-hackernews:before, .ion-social-hackernews-outline:before, .ion-social-html5:before, .ion-social-html5-outline:before, .ion-social-instagram:before, .ion-social-instagram-outline:before, .ion-social-javascript:before, .ion-social-javascript-outline:before, .ion-social-linkedin:before, .ion-social-linkedin-outline:before, .ion-social-markdown:before, .ion-social-nodejs:before, .ion-social-octocat:before, .ion-social-pinterest:before, .ion-social-pinterest-outline:before, .ion-social-python:before, .ion-social-reddit:before, .ion-social-reddit-outline:before, .ion-social-rss:before, .ion-social-rss-outline:before, .ion-social-sass:before, .ion-social-skype:before, .ion-social-skype-outline:before, .ion-social-snapchat:before, .ion-social-snapchat-outline:before, .ion-social-tumblr:before, .ion-social-tumblr-outline:before, .ion-social-tux:before, .ion-social-twitch:before, .ion-social-twitch-outline:before, .ion-social-twitter:before, .ion-social-twitter-outline:before, .ion-social-usd:before, .ion-social-usd-outline:before, .ion-social-vimeo:before, .ion-social-vimeo-outline:before, .ion-social-whatsapp:before, .ion-social-whatsapp-outline:before, .ion-social-windows:before, .ion-social-windows-outline:before, .ion-social-wordpress:before, .ion-social-wordpress-outline:before, .ion-social-yahoo:before, .ion-social-yahoo-outline:before, .ion-social-yen:before, .ion-social-yen-outline:before, .ion-social-youtube:before, .ion-social-youtube-outline:before, .ion-soup-can:before, .ion-soup-can-outline:before, .ion-speakerphone:before, .ion-speedometer:before, .ion-spoon:before, .ion-star:before, .ion-stats-bars:before, .ion-steam:before, .ion-stop:before, .ion-thermometer:before, .ion-thumbsdown:before, .ion-thumbsup:before, .ion-toggle:before, .ion-toggle-filled:before, .ion-transgender:before, .ion-trash-a:before, .ion-trash-b:before, .ion-trophy:before, .ion-tshirt:before, .ion-tshirt-outline:before, .ion-umbrella:before, .ion-university:before, .ion-unlocked:before, .ion-upload:before, .ion-usb:before, .ion-videocamera:before, .ion-volume-high:before, .ion-volume-low:before, .ion-volume-medium:before, .ion-volume-mute:before, .ion-wand:before, .ion-waterdrop:before, .ion-wifi:before, .ion-wineglass:before, .ion-woman:before, .ion-wrench:before, .ion-xbox:before { display: inline-block; font-family: "Ionicons"; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; text-rendering: auto; line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
+
+.ion-alert:before { content: "\f101"; }
+
+.ion-alert-circled:before { content: "\f100"; }
+
+.ion-android-add:before { content: "\f2c7"; }
+
+.ion-android-add-circle:before { content: "\f359"; }
+
+.ion-android-alarm-clock:before { content: "\f35a"; }
+
+.ion-android-alert:before { content: "\f35b"; }
+
+.ion-android-apps:before { content: "\f35c"; }
+
+.ion-android-archive:before { content: "\f2c9"; }
+
+.ion-android-arrow-back:before { content: "\f2ca"; }
+
+.ion-android-arrow-down:before { content: "\f35d"; }
+
+.ion-android-arrow-dropdown:before { content: "\f35f"; }
+
+.ion-android-arrow-dropdown-circle:before { content: "\f35e"; }
+
+.ion-android-arrow-dropleft:before { content: "\f361"; }
+
+.ion-android-arrow-dropleft-circle:before { content: "\f360"; }
+
+.ion-android-arrow-dropright:before { content: "\f363"; }
+
+.ion-android-arrow-dropright-circle:before { content: "\f362"; }
+
+.ion-android-arrow-dropup:before { content: "\f365"; }
+
+.ion-android-arrow-dropup-circle:before { content: "\f364"; }
+
+.ion-android-arrow-forward:before { content: "\f30f"; }
+
+.ion-android-arrow-up:before { content: "\f366"; }
+
+.ion-android-attach:before { content: "\f367"; }
+
+.ion-android-bar:before { content: "\f368"; }
+
+.ion-android-bicycle:before { content: "\f369"; }
+
+.ion-android-boat:before { content: "\f36a"; }
+
+.ion-android-bookmark:before { content: "\f36b"; }
+
+.ion-android-bulb:before { content: "\f36c"; }
+
+.ion-android-bus:before { content: "\f36d"; }
+
+.ion-android-calendar:before { content: "\f2d1"; }
+
+.ion-android-call:before { content: "\f2d2"; }
+
+.ion-android-camera:before { content: "\f2d3"; }
+
+.ion-android-cancel:before { content: "\f36e"; }
+
+.ion-android-car:before { content: "\f36f"; }
+
+.ion-android-cart:before { content: "\f370"; }
+
+.ion-android-chat:before { content: "\f2d4"; }
+
+.ion-android-checkbox:before { content: "\f374"; }
+
+.ion-android-checkbox-blank:before { content: "\f371"; }
+
+.ion-android-checkbox-outline:before { content: "\f373"; }
+
+.ion-android-checkbox-outline-blank:before { content: "\f372"; }
+
+.ion-android-checkmark-circle:before { content: "\f375"; }
+
+.ion-android-clipboard:before { content: "\f376"; }
+
+.ion-android-close:before { content: "\f2d7"; }
+
+.ion-android-cloud:before { content: "\f37a"; }
+
+.ion-android-cloud-circle:before { content: "\f377"; }
+
+.ion-android-cloud-done:before { content: "\f378"; }
+
+.ion-android-cloud-outline:before { content: "\f379"; }
+
+.ion-android-color-palette:before { content: "\f37b"; }
+
+.ion-android-compass:before { content: "\f37c"; }
+
+.ion-android-contact:before { content: "\f2d8"; }
+
+.ion-android-contacts:before { content: "\f2d9"; }
+
+.ion-android-contract:before { content: "\f37d"; }
+
+.ion-android-create:before { content: "\f37e"; }
+
+.ion-android-delete:before { content: "\f37f"; }
+
+.ion-android-desktop:before { content: "\f380"; }
+
+.ion-android-document:before { content: "\f381"; }
+
+.ion-android-done:before { content: "\f383"; }
+
+.ion-android-done-all:before { content: "\f382"; }
+
+.ion-android-download:before { content: "\f2dd"; }
+
+.ion-android-drafts:before { content: "\f384"; }
+
+.ion-android-exit:before { content: "\f385"; }
+
+.ion-android-expand:before { content: "\f386"; }
+
+.ion-android-favorite:before { content: "\f388"; }
+
+.ion-android-favorite-outline:before { content: "\f387"; }
+
+.ion-android-film:before { content: "\f389"; }
+
+.ion-android-folder:before { content: "\f2e0"; }
+
+.ion-android-folder-open:before { content: "\f38a"; }
+
+.ion-android-funnel:before { content: "\f38b"; }
+
+.ion-android-globe:before { content: "\f38c"; }
+
+.ion-android-hand:before { content: "\f2e3"; }
+
+.ion-android-hangout:before { content: "\f38d"; }
+
+.ion-android-happy:before { content: "\f38e"; }
+
+.ion-android-home:before { content: "\f38f"; }
+
+.ion-android-image:before { content: "\f2e4"; }
+
+.ion-android-laptop:before { content: "\f390"; }
+
+.ion-android-list:before { content: "\f391"; }
+
+.ion-android-locate:before { content: "\f2e9"; }
+
+.ion-android-lock:before { content: "\f392"; }
+
+.ion-android-mail:before { content: "\f2eb"; }
+
+.ion-android-map:before { content: "\f393"; }
+
+.ion-android-menu:before { content: "\f394"; }
+
+.ion-android-microphone:before { content: "\f2ec"; }
+
+.ion-android-microphone-off:before { content: "\f395"; }
+
+.ion-android-more-horizontal:before { content: "\f396"; }
+
+.ion-android-more-vertical:before { content: "\f397"; }
+
+.ion-android-navigate:before { content: "\f398"; }
+
+.ion-android-notifications:before { content: "\f39b"; }
+
+.ion-android-notifications-none:before { content: "\f399"; }
+
+.ion-android-notifications-off:before { content: "\f39a"; }
+
+.ion-android-open:before { content: "\f39c"; }
+
+.ion-android-options:before { content: "\f39d"; }
+
+.ion-android-people:before { content: "\f39e"; }
+
+.ion-android-person:before { content: "\f3a0"; }
+
+.ion-android-person-add:before { content: "\f39f"; }
+
+.ion-android-phone-landscape:before { content: "\f3a1"; }
+
+.ion-android-phone-portrait:before { content: "\f3a2"; }
+
+.ion-android-pin:before { content: "\f3a3"; }
+
+.ion-android-plane:before { content: "\f3a4"; }
+
+.ion-android-playstore:before { content: "\f2f0"; }
+
+.ion-android-print:before { content: "\f3a5"; }
+
+.ion-android-radio-button-off:before { content: "\f3a6"; }
+
+.ion-android-radio-button-on:before { content: "\f3a7"; }
+
+.ion-android-refresh:before { content: "\f3a8"; }
+
+.ion-android-remove:before { content: "\f2f4"; }
+
+.ion-android-remove-circle:before { content: "\f3a9"; }
+
+.ion-android-restaurant:before { content: "\f3aa"; }
+
+.ion-android-sad:before { content: "\f3ab"; }
+
+.ion-android-search:before { content: "\f2f5"; }
+
+.ion-android-send:before { content: "\f2f6"; }
+
+.ion-android-settings:before { content: "\f2f7"; }
+
+.ion-android-share:before { content: "\f2f8"; }
+
+.ion-android-share-alt:before { content: "\f3ac"; }
+
+.ion-android-star:before { content: "\f2fc"; }
+
+.ion-android-star-half:before { content: "\f3ad"; }
+
+.ion-android-star-outline:before { content: "\f3ae"; }
+
+.ion-android-stopwatch:before { content: "\f2fd"; }
+
+.ion-android-subway:before { content: "\f3af"; }
+
+.ion-android-sunny:before { content: "\f3b0"; }
+
+.ion-android-sync:before { content: "\f3b1"; }
+
+.ion-android-textsms:before { content: "\f3b2"; }
+
+.ion-android-time:before { content: "\f3b3"; }
+
+.ion-android-train:before { content: "\f3b4"; }
+
+.ion-android-unlock:before { content: "\f3b5"; }
+
+.ion-android-upload:before { content: "\f3b6"; }
+
+.ion-android-volume-down:before { content: "\f3b7"; }
+
+.ion-android-volume-mute:before { content: "\f3b8"; }
+
+.ion-android-volume-off:before { content: "\f3b9"; }
+
+.ion-android-volume-up:before { content: "\f3ba"; }
+
+.ion-android-walk:before { content: "\f3bb"; }
+
+.ion-android-warning:before { content: "\f3bc"; }
+
+.ion-android-watch:before { content: "\f3bd"; }
+
+.ion-android-wifi:before { content: "\f305"; }
+
+.ion-aperture:before { content: "\f313"; }
+
+.ion-archive:before { content: "\f102"; }
+
+.ion-arrow-down-a:before { content: "\f103"; }
+
+.ion-arrow-down-b:before { content: "\f104"; }
+
+.ion-arrow-down-c:before { content: "\f105"; }
+
+.ion-arrow-expand:before { content: "\f25e"; }
+
+.ion-arrow-graph-down-left:before { content: "\f25f"; }
+
+.ion-arrow-graph-down-right:before { content: "\f260"; }
+
+.ion-arrow-graph-up-left:before { content: "\f261"; }
+
+.ion-arrow-graph-up-right:before { content: "\f262"; }
+
+.ion-arrow-left-a:before { content: "\f106"; }
+
+.ion-arrow-left-b:before { content: "\f107"; }
+
+.ion-arrow-left-c:before { content: "\f108"; }
+
+.ion-arrow-move:before { content: "\f263"; }
+
+.ion-arrow-resize:before { content: "\f264"; }
+
+.ion-arrow-return-left:before { content: "\f265"; }
+
+.ion-arrow-return-right:before { content: "\f266"; }
+
+.ion-arrow-right-a:before { content: "\f109"; }
+
+.ion-arrow-right-b:before { content: "\f10a"; }
+
+.ion-arrow-right-c:before { content: "\f10b"; }
+
+.ion-arrow-shrink:before { content: "\f267"; }
+
+.ion-arrow-swap:before { content: "\f268"; }
+
+.ion-arrow-up-a:before { content: "\f10c"; }
+
+.ion-arrow-up-b:before { content: "\f10d"; }
+
+.ion-arrow-up-c:before { content: "\f10e"; }
+
+.ion-asterisk:before { content: "\f314"; }
+
+.ion-at:before { content: "\f10f"; }
+
+.ion-backspace:before { content: "\f3bf"; }
+
+.ion-backspace-outline:before { content: "\f3be"; }
+
+.ion-bag:before { content: "\f110"; }
+
+.ion-battery-charging:before { content: "\f111"; }
+
+.ion-battery-empty:before { content: "\f112"; }
+
+.ion-battery-full:before { content: "\f113"; }
+
+.ion-battery-half:before { content: "\f114"; }
+
+.ion-battery-low:before { content: "\f115"; }
+
+.ion-beaker:before { content: "\f269"; }
+
+.ion-beer:before { content: "\f26a"; }
+
+.ion-bluetooth:before { content: "\f116"; }
+
+.ion-bonfire:before { content: "\f315"; }
+
+.ion-bookmark:before { content: "\f26b"; }
+
+.ion-bowtie:before { content: "\f3c0"; }
+
+.ion-briefcase:before { content: "\f26c"; }
+
+.ion-bug:before { content: "\f2be"; }
+
+.ion-calculator:before { content: "\f26d"; }
+
+.ion-calendar:before { content: "\f117"; }
+
+.ion-camera:before { content: "\f118"; }
+
+.ion-card:before { content: "\f119"; }
+
+.ion-cash:before { content: "\f316"; }
+
+.ion-chatbox:before { content: "\f11b"; }
+
+.ion-chatbox-working:before { content: "\f11a"; }
+
+.ion-chatboxes:before { content: "\f11c"; }
+
+.ion-chatbubble:before { content: "\f11e"; }
+
+.ion-chatbubble-working:before { content: "\f11d"; }
+
+.ion-chatbubbles:before { content: "\f11f"; }
+
+.ion-checkmark:before { content: "\f122"; }
+
+.ion-checkmark-circled:before { content: "\f120"; }
+
+.ion-checkmark-round:before { content: "\f121"; }
+
+.ion-chevron-down:before { content: "\f123"; }
+
+.ion-chevron-left:before { content: "\f124"; }
+
+.ion-chevron-right:before { content: "\f125"; }
+
+.ion-chevron-up:before { content: "\f126"; }
+
+.ion-clipboard:before { content: "\f127"; }
+
+.ion-clock:before { content: "\f26e"; }
+
+.ion-close:before { content: "\f12a"; }
+
+.ion-close-circled:before { content: "\f128"; }
+
+.ion-close-round:before { content: "\f129"; }
+
+.ion-closed-captioning:before { content: "\f317"; }
+
+.ion-cloud:before { content: "\f12b"; }
+
+.ion-code:before { content: "\f271"; }
+
+.ion-code-download:before { content: "\f26f"; }
+
+.ion-code-working:before { content: "\f270"; }
+
+.ion-coffee:before { content: "\f272"; }
+
+.ion-compass:before { content: "\f273"; }
+
+.ion-compose:before { content: "\f12c"; }
+
+.ion-connection-bars:before { content: "\f274"; }
+
+.ion-contrast:before { content: "\f275"; }
+
+.ion-crop:before { content: "\f3c1"; }
+
+.ion-cube:before { content: "\f318"; }
+
+.ion-disc:before { content: "\f12d"; }
+
+.ion-document:before { content: "\f12f"; }
+
+.ion-document-text:before { content: "\f12e"; }
+
+.ion-drag:before { content: "\f130"; }
+
+.ion-earth:before { content: "\f276"; }
+
+.ion-easel:before { content: "\f3c2"; }
+
+.ion-edit:before { content: "\f2bf"; }
+
+.ion-egg:before { content: "\f277"; }
+
+.ion-eject:before { content: "\f131"; }
+
+.ion-email:before { content: "\f132"; }
+
+.ion-email-unread:before { content: "\f3c3"; }
+
+.ion-erlenmeyer-flask:before { content: "\f3c5"; }
+
+.ion-erlenmeyer-flask-bubbles:before { content: "\f3c4"; }
+
+.ion-eye:before { content: "\f133"; }
+
+.ion-eye-disabled:before { content: "\f306"; }
+
+.ion-female:before { content: "\f278"; }
+
+.ion-filing:before { content: "\f134"; }
+
+.ion-film-marker:before { content: "\f135"; }
+
+.ion-fireball:before { content: "\f319"; }
+
+.ion-flag:before { content: "\f279"; }
+
+.ion-flame:before { content: "\f31a"; }
+
+.ion-flash:before { content: "\f137"; }
+
+.ion-flash-off:before { content: "\f136"; }
+
+.ion-folder:before { content: "\f139"; }
+
+.ion-fork:before { content: "\f27a"; }
+
+.ion-fork-repo:before { content: "\f2c0"; }
+
+.ion-forward:before { content: "\f13a"; }
+
+.ion-funnel:before { content: "\f31b"; }
+
+.ion-gear-a:before { content: "\f13d"; }
+
+.ion-gear-b:before { content: "\f13e"; }
+
+.ion-grid:before { content: "\f13f"; }
+
+.ion-hammer:before { content: "\f27b"; }
+
+.ion-happy:before { content: "\f31c"; }
+
+.ion-happy-outline:before { content: "\f3c6"; }
+
+.ion-headphone:before { content: "\f140"; }
+
+.ion-heart:before { content: "\f141"; }
+
+.ion-heart-broken:before { content: "\f31d"; }
+
+.ion-help:before { content: "\f143"; }
+
+.ion-help-buoy:before { content: "\f27c"; }
+
+.ion-help-circled:before { content: "\f142"; }
+
+.ion-home:before { content: "\f144"; }
+
+.ion-icecream:before { content: "\f27d"; }
+
+.ion-image:before { content: "\f147"; }
+
+.ion-images:before { content: "\f148"; }
+
+.ion-information:before { content: "\f14a"; }
+
+.ion-information-circled:before { content: "\f149"; }
+
+.ion-ionic:before { content: "\f14b"; }
+
+.ion-ios-alarm:before { content: "\f3c8"; }
+
+.ion-ios-alarm-outline:before { content: "\f3c7"; }
+
+.ion-ios-albums:before { content: "\f3ca"; }
+
+.ion-ios-albums-outline:before { content: "\f3c9"; }
+
+.ion-ios-americanfootball:before { content: "\f3cc"; }
+
+.ion-ios-americanfootball-outline:before { content: "\f3cb"; }
+
+.ion-ios-analytics:before { content: "\f3ce"; }
+
+.ion-ios-analytics-outline:before { content: "\f3cd"; }
+
+.ion-ios-arrow-back:before { content: "\f3cf"; }
+
+.ion-ios-arrow-down:before { content: "\f3d0"; }
+
+.ion-ios-arrow-forward:before { content: "\f3d1"; }
+
+.ion-ios-arrow-left:before { content: "\f3d2"; }
+
+.ion-ios-arrow-right:before { content: "\f3d3"; }
+
+.ion-ios-arrow-thin-down:before { content: "\f3d4"; }
+
+.ion-ios-arrow-thin-left:before { content: "\f3d5"; }
+
+.ion-ios-arrow-thin-right:before { content: "\f3d6"; }
+
+.ion-ios-arrow-thin-up:before { content: "\f3d7"; }
+
+.ion-ios-arrow-up:before { content: "\f3d8"; }
+
+.ion-ios-at:before { content: "\f3da"; }
+
+.ion-ios-at-outline:before { content: "\f3d9"; }
+
+.ion-ios-barcode:before { content: "\f3dc"; }
+
+.ion-ios-barcode-outline:before { content: "\f3db"; }
+
+.ion-ios-baseball:before { content: "\f3de"; }
+
+.ion-ios-baseball-outline:before { content: "\f3dd"; }
+
+.ion-ios-basketball:before { content: "\f3e0"; }
+
+.ion-ios-basketball-outline:before { content: "\f3df"; }
+
+.ion-ios-bell:before { content: "\f3e2"; }
+
+.ion-ios-bell-outline:before { content: "\f3e1"; }
+
+.ion-ios-body:before { content: "\f3e4"; }
+
+.ion-ios-body-outline:before { content: "\f3e3"; }
+
+.ion-ios-bolt:before { content: "\f3e6"; }
+
+.ion-ios-bolt-outline:before { content: "\f3e5"; }
+
+.ion-ios-book:before { content: "\f3e8"; }
+
+.ion-ios-book-outline:before { content: "\f3e7"; }
+
+.ion-ios-bookmarks:before { content: "\f3ea"; }
+
+.ion-ios-bookmarks-outline:before { content: "\f3e9"; }
+
+.ion-ios-box:before { content: "\f3ec"; }
+
+.ion-ios-box-outline:before { content: "\f3eb"; }
+
+.ion-ios-briefcase:before { content: "\f3ee"; }
+
+.ion-ios-briefcase-outline:before { content: "\f3ed"; }
+
+.ion-ios-browsers:before { content: "\f3f0"; }
+
+.ion-ios-browsers-outline:before { content: "\f3ef"; }
+
+.ion-ios-calculator:before { content: "\f3f2"; }
+
+.ion-ios-calculator-outline:before { content: "\f3f1"; }
+
+.ion-ios-calendar:before { content: "\f3f4"; }
+
+.ion-ios-calendar-outline:before { content: "\f3f3"; }
+
+.ion-ios-camera:before { content: "\f3f6"; }
+
+.ion-ios-camera-outline:before { content: "\f3f5"; }
+
+.ion-ios-cart:before { content: "\f3f8"; }
+
+.ion-ios-cart-outline:before { content: "\f3f7"; }
+
+.ion-ios-chatboxes:before { content: "\f3fa"; }
+
+.ion-ios-chatboxes-outline:before { content: "\f3f9"; }
+
+.ion-ios-chatbubble:before { content: "\f3fc"; }
+
+.ion-ios-chatbubble-outline:before { content: "\f3fb"; }
+
+.ion-ios-checkmark:before { content: "\f3ff"; }
+
+.ion-ios-checkmark-empty:before { content: "\f3fd"; }
+
+.ion-ios-checkmark-outline:before { content: "\f3fe"; }
+
+.ion-ios-circle-filled:before { content: "\f400"; }
+
+.ion-ios-circle-outline:before { content: "\f401"; }
+
+.ion-ios-clock:before { content: "\f403"; }
+
+.ion-ios-clock-outline:before { content: "\f402"; }
+
+.ion-ios-close:before { content: "\f406"; }
+
+.ion-ios-close-empty:before { content: "\f404"; }
+
+.ion-ios-close-outline:before { content: "\f405"; }
+
+.ion-ios-cloud:before { content: "\f40c"; }
+
+.ion-ios-cloud-download:before { content: "\f408"; }
+
+.ion-ios-cloud-download-outline:before { content: "\f407"; }
+
+.ion-ios-cloud-outline:before { content: "\f409"; }
+
+.ion-ios-cloud-upload:before { content: "\f40b"; }
+
+.ion-ios-cloud-upload-outline:before { content: "\f40a"; }
+
+.ion-ios-cloudy:before { content: "\f410"; }
+
+.ion-ios-cloudy-night:before { content: "\f40e"; }
+
+.ion-ios-cloudy-night-outline:before { content: "\f40d"; }
+
+.ion-ios-cloudy-outline:before { content: "\f40f"; }
+
+.ion-ios-cog:before { content: "\f412"; }
+
+.ion-ios-cog-outline:before { content: "\f411"; }
+
+.ion-ios-color-filter:before { content: "\f414"; }
+
+.ion-ios-color-filter-outline:before { content: "\f413"; }
+
+.ion-ios-color-wand:before { content: "\f416"; }
+
+.ion-ios-color-wand-outline:before { content: "\f415"; }
+
+.ion-ios-compose:before { content: "\f418"; }
+
+.ion-ios-compose-outline:before { content: "\f417"; }
+
+.ion-ios-contact:before { content: "\f41a"; }
+
+.ion-ios-contact-outline:before { content: "\f419"; }
+
+.ion-ios-copy:before { content: "\f41c"; }
+
+.ion-ios-copy-outline:before { content: "\f41b"; }
+
+.ion-ios-crop:before { content: "\f41e"; }
+
+.ion-ios-crop-strong:before { content: "\f41d"; }
+
+.ion-ios-download:before { content: "\f420"; }
+
+.ion-ios-download-outline:before { content: "\f41f"; }
+
+.ion-ios-drag:before { content: "\f421"; }
+
+.ion-ios-email:before { content: "\f423"; }
+
+.ion-ios-email-outline:before { content: "\f422"; }
+
+.ion-ios-eye:before { content: "\f425"; }
+
+.ion-ios-eye-outline:before { content: "\f424"; }
+
+.ion-ios-fastforward:before { content: "\f427"; }
+
+.ion-ios-fastforward-outline:before { content: "\f426"; }
+
+.ion-ios-filing:before { content: "\f429"; }
+
+.ion-ios-filing-outline:before { content: "\f428"; }
+
+.ion-ios-film:before { content: "\f42b"; }
+
+.ion-ios-film-outline:before { content: "\f42a"; }
+
+.ion-ios-flag:before { content: "\f42d"; }
+
+.ion-ios-flag-outline:before { content: "\f42c"; }
+
+.ion-ios-flame:before { content: "\f42f"; }
+
+.ion-ios-flame-outline:before { content: "\f42e"; }
+
+.ion-ios-flask:before { content: "\f431"; }
+
+.ion-ios-flask-outline:before { content: "\f430"; }
+
+.ion-ios-flower:before { content: "\f433"; }
+
+.ion-ios-flower-outline:before { content: "\f432"; }
+
+.ion-ios-folder:before { content: "\f435"; }
+
+.ion-ios-folder-outline:before { content: "\f434"; }
+
+.ion-ios-football:before { content: "\f437"; }
+
+.ion-ios-football-outline:before { content: "\f436"; }
+
+.ion-ios-game-controller-a:before { content: "\f439"; }
+
+.ion-ios-game-controller-a-outline:before { content: "\f438"; }
+
+.ion-ios-game-controller-b:before { content: "\f43b"; }
+
+.ion-ios-game-controller-b-outline:before { content: "\f43a"; }
+
+.ion-ios-gear:before { content: "\f43d"; }
+
+.ion-ios-gear-outline:before { content: "\f43c"; }
+
+.ion-ios-glasses:before { content: "\f43f"; }
+
+.ion-ios-glasses-outline:before { content: "\f43e"; }
+
+.ion-ios-grid-view:before { content: "\f441"; }
+
+.ion-ios-grid-view-outline:before { content: "\f440"; }
+
+.ion-ios-heart:before { content: "\f443"; }
+
+.ion-ios-heart-outline:before { content: "\f442"; }
+
+.ion-ios-help:before { content: "\f446"; }
+
+.ion-ios-help-empty:before { content: "\f444"; }
+
+.ion-ios-help-outline:before { content: "\f445"; }
+
+.ion-ios-home:before { content: "\f448"; }
+
+.ion-ios-home-outline:before { content: "\f447"; }
+
+.ion-ios-infinite:before { content: "\f44a"; }
+
+.ion-ios-infinite-outline:before { content: "\f449"; }
+
+.ion-ios-information:before { content: "\f44d"; }
+
+.ion-ios-information-empty:before { content: "\f44b"; }
+
+.ion-ios-information-outline:before { content: "\f44c"; }
+
+.ion-ios-ionic-outline:before { content: "\f44e"; }
+
+.ion-ios-keypad:before { content: "\f450"; }
+
+.ion-ios-keypad-outline:before { content: "\f44f"; }
+
+.ion-ios-lightbulb:before { content: "\f452"; }
+
+.ion-ios-lightbulb-outline:before { content: "\f451"; }
+
+.ion-ios-list:before { content: "\f454"; }
+
+.ion-ios-list-outline:before { content: "\f453"; }
+
+.ion-ios-location:before { content: "\f456"; }
+
+.ion-ios-location-outline:before { content: "\f455"; }
+
+.ion-ios-locked:before { content: "\f458"; }
+
+.ion-ios-locked-outline:before { content: "\f457"; }
+
+.ion-ios-loop:before { content: "\f45a"; }
+
+.ion-ios-loop-strong:before { content: "\f459"; }
+
+.ion-ios-medical:before { content: "\f45c"; }
+
+.ion-ios-medical-outline:before { content: "\f45b"; }
+
+.ion-ios-medkit:before { content: "\f45e"; }
+
+.ion-ios-medkit-outline:before { content: "\f45d"; }
+
+.ion-ios-mic:before { content: "\f461"; }
+
+.ion-ios-mic-off:before { content: "\f45f"; }
+
+.ion-ios-mic-outline:before { content: "\f460"; }
+
+.ion-ios-minus:before { content: "\f464"; }
+
+.ion-ios-minus-empty:before { content: "\f462"; }
+
+.ion-ios-minus-outline:before { content: "\f463"; }
+
+.ion-ios-monitor:before { content: "\f466"; }
+
+.ion-ios-monitor-outline:before { content: "\f465"; }
+
+.ion-ios-moon:before { content: "\f468"; }
+
+.ion-ios-moon-outline:before { content: "\f467"; }
+
+.ion-ios-more:before { content: "\f46a"; }
+
+.ion-ios-more-outline:before { content: "\f469"; }
+
+.ion-ios-musical-note:before { content: "\f46b"; }
+
+.ion-ios-musical-notes:before { content: "\f46c"; }
+
+.ion-ios-navigate:before { content: "\f46e"; }
+
+.ion-ios-navigate-outline:before { content: "\f46d"; }
+
+.ion-ios-nutrition:before { content: "\f470"; }
+
+.ion-ios-nutrition-outline:before { content: "\f46f"; }
+
+.ion-ios-paper:before { content: "\f472"; }
+
+.ion-ios-paper-outline:before { content: "\f471"; }
+
+.ion-ios-paperplane:before { content: "\f474"; }
+
+.ion-ios-paperplane-outline:before { content: "\f473"; }
+
+.ion-ios-partlysunny:before { content: "\f476"; }
+
+.ion-ios-partlysunny-outline:before { content: "\f475"; }
+
+.ion-ios-pause:before { content: "\f478"; }
+
+.ion-ios-pause-outline:before { content: "\f477"; }
+
+.ion-ios-paw:before { content: "\f47a"; }
+
+.ion-ios-paw-outline:before { content: "\f479"; }
+
+.ion-ios-people:before { content: "\f47c"; }
+
+.ion-ios-people-outline:before { content: "\f47b"; }
+
+.ion-ios-person:before { content: "\f47e"; }
+
+.ion-ios-person-outline:before { content: "\f47d"; }
+
+.ion-ios-personadd:before { content: "\f480"; }
+
+.ion-ios-personadd-outline:before { content: "\f47f"; }
+
+.ion-ios-photos:before { content: "\f482"; }
+
+.ion-ios-photos-outline:before { content: "\f481"; }
+
+.ion-ios-pie:before { content: "\f484"; }
+
+.ion-ios-pie-outline:before { content: "\f483"; }
+
+.ion-ios-pint:before { content: "\f486"; }
+
+.ion-ios-pint-outline:before { content: "\f485"; }
+
+.ion-ios-play:before { content: "\f488"; }
+
+.ion-ios-play-outline:before { content: "\f487"; }
+
+.ion-ios-plus:before { content: "\f48b"; }
+
+.ion-ios-plus-empty:before { content: "\f489"; }
+
+.ion-ios-plus-outline:before { content: "\f48a"; }
+
+.ion-ios-pricetag:before { content: "\f48d"; }
+
+.ion-ios-pricetag-outline:before { content: "\f48c"; }
+
+.ion-ios-pricetags:before { content: "\f48f"; }
+
+.ion-ios-pricetags-outline:before { content: "\f48e"; }
+
+.ion-ios-printer:before { content: "\f491"; }
+
+.ion-ios-printer-outline:before { content: "\f490"; }
+
+.ion-ios-pulse:before { content: "\f493"; }
+
+.ion-ios-pulse-strong:before { content: "\f492"; }
+
+.ion-ios-rainy:before { content: "\f495"; }
+
+.ion-ios-rainy-outline:before { content: "\f494"; }
+
+.ion-ios-recording:before { content: "\f497"; }
+
+.ion-ios-recording-outline:before { content: "\f496"; }
+
+.ion-ios-redo:before { content: "\f499"; }
+
+.ion-ios-redo-outline:before { content: "\f498"; }
+
+.ion-ios-refresh:before { content: "\f49c"; }
+
+.ion-ios-refresh-empty:before { content: "\f49a"; }
+
+.ion-ios-refresh-outline:before { content: "\f49b"; }
+
+.ion-ios-reload:before { content: "\f49d"; }
+
+.ion-ios-reverse-camera:before { content: "\f49f"; }
+
+.ion-ios-reverse-camera-outline:before { content: "\f49e"; }
+
+.ion-ios-rewind:before { content: "\f4a1"; }
+
+.ion-ios-rewind-outline:before { content: "\f4a0"; }
+
+.ion-ios-rose:before { content: "\f4a3"; }
+
+.ion-ios-rose-outline:before { content: "\f4a2"; }
+
+.ion-ios-search:before { content: "\f4a5"; }
+
+.ion-ios-search-strong:before { content: "\f4a4"; }
+
+.ion-ios-settings:before { content: "\f4a7"; }
+
+.ion-ios-settings-strong:before { content: "\f4a6"; }
+
+.ion-ios-shuffle:before { content: "\f4a9"; }
+
+.ion-ios-shuffle-strong:before { content: "\f4a8"; }
+
+.ion-ios-skipbackward:before { content: "\f4ab"; }
+
+.ion-ios-skipbackward-outline:before { content: "\f4aa"; }
+
+.ion-ios-skipforward:before { content: "\f4ad"; }
+
+.ion-ios-skipforward-outline:before { content: "\f4ac"; }
+
+.ion-ios-snowy:before { content: "\f4ae"; }
+
+.ion-ios-speedometer:before { content: "\f4b0"; }
+
+.ion-ios-speedometer-outline:before { content: "\f4af"; }
+
+.ion-ios-star:before { content: "\f4b3"; }
+
+.ion-ios-star-half:before { content: "\f4b1"; }
+
+.ion-ios-star-outline:before { content: "\f4b2"; }
+
+.ion-ios-stopwatch:before { content: "\f4b5"; }
+
+.ion-ios-stopwatch-outline:before { content: "\f4b4"; }
+
+.ion-ios-sunny:before { content: "\f4b7"; }
+
+.ion-ios-sunny-outline:before { content: "\f4b6"; }
+
+.ion-ios-telephone:before { content: "\f4b9"; }
+
+.ion-ios-telephone-outline:before { content: "\f4b8"; }
+
+.ion-ios-tennisball:before { content: "\f4bb"; }
+
+.ion-ios-tennisball-outline:before { content: "\f4ba"; }
+
+.ion-ios-thunderstorm:before { content: "\f4bd"; }
+
+.ion-ios-thunderstorm-outline:before { content: "\f4bc"; }
+
+.ion-ios-time:before { content: "\f4bf"; }
+
+.ion-ios-time-outline:before { content: "\f4be"; }
+
+.ion-ios-timer:before { content: "\f4c1"; }
+
+.ion-ios-timer-outline:before { content: "\f4c0"; }
+
+.ion-ios-toggle:before { content: "\f4c3"; }
+
+.ion-ios-toggle-outline:before { content: "\f4c2"; }
+
+.ion-ios-trash:before { content: "\f4c5"; }
+
+.ion-ios-trash-outline:before { content: "\f4c4"; }
+
+.ion-ios-undo:before { content: "\f4c7"; }
+
+.ion-ios-undo-outline:before { content: "\f4c6"; }
+
+.ion-ios-unlocked:before { content: "\f4c9"; }
+
+.ion-ios-unlocked-outline:before { content: "\f4c8"; }
+
+.ion-ios-upload:before { content: "\f4cb"; }
+
+.ion-ios-upload-outline:before { content: "\f4ca"; }
+
+.ion-ios-videocam:before { content: "\f4cd"; }
+
+.ion-ios-videocam-outline:before { content: "\f4cc"; }
+
+.ion-ios-volume-high:before { content: "\f4ce"; }
+
+.ion-ios-volume-low:before { content: "\f4cf"; }
+
+.ion-ios-wineglass:before { content: "\f4d1"; }
+
+.ion-ios-wineglass-outline:before { content: "\f4d0"; }
+
+.ion-ios-world:before { content: "\f4d3"; }
+
+.ion-ios-world-outline:before { content: "\f4d2"; }
+
+.ion-ipad:before { content: "\f1f9"; }
+
+.ion-iphone:before { content: "\f1fa"; }
+
+.ion-ipod:before { content: "\f1fb"; }
+
+.ion-jet:before { content: "\f295"; }
+
+.ion-key:before { content: "\f296"; }
+
+.ion-knife:before { content: "\f297"; }
+
+.ion-laptop:before { content: "\f1fc"; }
+
+.ion-leaf:before { content: "\f1fd"; }
+
+.ion-levels:before { content: "\f298"; }
+
+.ion-lightbulb:before { content: "\f299"; }
+
+.ion-link:before { content: "\f1fe"; }
+
+.ion-load-a:before { content: "\f29a"; }
+
+.ion-load-b:before { content: "\f29b"; }
+
+.ion-load-c:before { content: "\f29c"; }
+
+.ion-load-d:before { content: "\f29d"; }
+
+.ion-location:before { content: "\f1ff"; }
+
+.ion-lock-combination:before { content: "\f4d4"; }
+
+.ion-locked:before { content: "\f200"; }
+
+.ion-log-in:before { content: "\f29e"; }
+
+.ion-log-out:before { content: "\f29f"; }
+
+.ion-loop:before { content: "\f201"; }
+
+.ion-magnet:before { content: "\f2a0"; }
+
+.ion-male:before { content: "\f2a1"; }
+
+.ion-man:before { content: "\f202"; }
+
+.ion-map:before { content: "\f203"; }
+
+.ion-medkit:before { content: "\f2a2"; }
+
+.ion-merge:before { content: "\f33f"; }
+
+.ion-mic-a:before { content: "\f204"; }
+
+.ion-mic-b:before { content: "\f205"; }
+
+.ion-mic-c:before { content: "\f206"; }
+
+.ion-minus:before { content: "\f209"; }
+
+.ion-minus-circled:before { content: "\f207"; }
+
+.ion-minus-round:before { content: "\f208"; }
+
+.ion-model-s:before { content: "\f2c1"; }
+
+.ion-monitor:before { content: "\f20a"; }
+
+.ion-more:before { content: "\f20b"; }
+
+.ion-mouse:before { content: "\f340"; }
+
+.ion-music-note:before { content: "\f20c"; }
+
+.ion-navicon:before { content: "\f20e"; }
+
+.ion-navicon-round:before { content: "\f20d"; }
+
+.ion-navigate:before { content: "\f2a3"; }
+
+.ion-network:before { content: "\f341"; }
+
+.ion-no-smoking:before { content: "\f2c2"; }
+
+.ion-nuclear:before { content: "\f2a4"; }
+
+.ion-outlet:before { content: "\f342"; }
+
+.ion-paintbrush:before { content: "\f4d5"; }
+
+.ion-paintbucket:before { content: "\f4d6"; }
+
+.ion-paper-airplane:before { content: "\f2c3"; }
+
+.ion-paperclip:before { content: "\f20f"; }
+
+.ion-pause:before { content: "\f210"; }
+
+.ion-person:before { content: "\f213"; }
+
+.ion-person-add:before { content: "\f211"; }
+
+.ion-person-stalker:before { content: "\f212"; }
+
+.ion-pie-graph:before { content: "\f2a5"; }
+
+.ion-pin:before { content: "\f2a6"; }
+
+.ion-pinpoint:before { content: "\f2a7"; }
+
+.ion-pizza:before { content: "\f2a8"; }
+
+.ion-plane:before { content: "\f214"; }
+
+.ion-planet:before { content: "\f343"; }
+
+.ion-play:before { content: "\f215"; }
+
+.ion-playstation:before { content: "\f30a"; }
+
+.ion-plus:before { content: "\f218"; }
+
+.ion-plus-circled:before { content: "\f216"; }
+
+.ion-plus-round:before { content: "\f217"; }
+
+.ion-podium:before { content: "\f344"; }
+
+.ion-pound:before { content: "\f219"; }
+
+.ion-power:before { content: "\f2a9"; }
+
+.ion-pricetag:before { content: "\f2aa"; }
+
+.ion-pricetags:before { content: "\f2ab"; }
+
+.ion-printer:before { content: "\f21a"; }
+
+.ion-pull-request:before { content: "\f345"; }
+
+.ion-qr-scanner:before { content: "\f346"; }
+
+.ion-quote:before { content: "\f347"; }
+
+.ion-radio-waves:before { content: "\f2ac"; }
+
+.ion-record:before { content: "\f21b"; }
+
+.ion-refresh:before { content: "\f21c"; }
+
+.ion-reply:before { content: "\f21e"; }
+
+.ion-reply-all:before { content: "\f21d"; }
+
+.ion-ribbon-a:before { content: "\f348"; }
+
+.ion-ribbon-b:before { content: "\f349"; }
+
+.ion-sad:before { content: "\f34a"; }
+
+.ion-sad-outline:before { content: "\f4d7"; }
+
+.ion-scissors:before { content: "\f34b"; }
+
+.ion-search:before { content: "\f21f"; }
+
+.ion-settings:before { content: "\f2ad"; }
+
+.ion-share:before { content: "\f220"; }
+
+.ion-shuffle:before { content: "\f221"; }
+
+.ion-skip-backward:before { content: "\f222"; }
+
+.ion-skip-forward:before { content: "\f223"; }
+
+.ion-social-android:before { content: "\f225"; }
+
+.ion-social-android-outline:before { content: "\f224"; }
+
+.ion-social-angular:before { content: "\f4d9"; }
+
+.ion-social-angular-outline:before { content: "\f4d8"; }
+
+.ion-social-apple:before { content: "\f227"; }
+
+.ion-social-apple-outline:before { content: "\f226"; }
+
+.ion-social-bitcoin:before { content: "\f2af"; }
+
+.ion-social-bitcoin-outline:before { content: "\f2ae"; }
+
+.ion-social-buffer:before { content: "\f229"; }
+
+.ion-social-buffer-outline:before { content: "\f228"; }
+
+.ion-social-chrome:before { content: "\f4db"; }
+
+.ion-social-chrome-outline:before { content: "\f4da"; }
+
+.ion-social-codepen:before { content: "\f4dd"; }
+
+.ion-social-codepen-outline:before { content: "\f4dc"; }
+
+.ion-social-css3:before { content: "\f4df"; }
+
+.ion-social-css3-outline:before { content: "\f4de"; }
+
+.ion-social-designernews:before { content: "\f22b"; }
+
+.ion-social-designernews-outline:before { content: "\f22a"; }
+
+.ion-social-dribbble:before { content: "\f22d"; }
+
+.ion-social-dribbble-outline:before { content: "\f22c"; }
+
+.ion-social-dropbox:before { content: "\f22f"; }
+
+.ion-social-dropbox-outline:before { content: "\f22e"; }
+
+.ion-social-euro:before { content: "\f4e1"; }
+
+.ion-social-euro-outline:before { content: "\f4e0"; }
+
+.ion-social-facebook:before { content: "\f231"; }
+
+.ion-social-facebook-outline:before { content: "\f230"; }
+
+.ion-social-foursquare:before { content: "\f34d"; }
+
+.ion-social-foursquare-outline:before { content: "\f34c"; }
+
+.ion-social-freebsd-devil:before { content: "\f2c4"; }
+
+.ion-social-github:before { content: "\f233"; }
+
+.ion-social-github-outline:before { content: "\f232"; }
+
+.ion-social-google:before { content: "\f34f"; }
+
+.ion-social-google-outline:before { content: "\f34e"; }
+
+.ion-social-googleplus:before { content: "\f235"; }
+
+.ion-social-googleplus-outline:before { content: "\f234"; }
+
+.ion-social-hackernews:before { content: "\f237"; }
+
+.ion-social-hackernews-outline:before { content: "\f236"; }
+
+.ion-social-html5:before { content: "\f4e3"; }
+
+.ion-social-html5-outline:before { content: "\f4e2"; }
+
+.ion-social-instagram:before { content: "\f351"; }
+
+.ion-social-instagram-outline:before { content: "\f350"; }
+
+.ion-social-javascript:before { content: "\f4e5"; }
+
+.ion-social-javascript-outline:before { content: "\f4e4"; }
+
+.ion-social-linkedin:before { content: "\f239"; }
+
+.ion-social-linkedin-outline:before { content: "\f238"; }
+
+.ion-social-markdown:before { content: "\f4e6"; }
+
+.ion-social-nodejs:before { content: "\f4e7"; }
+
+.ion-social-octocat:before { content: "\f4e8"; }
+
+.ion-social-pinterest:before { content: "\f2b1"; }
+
+.ion-social-pinterest-outline:before { content: "\f2b0"; }
+
+.ion-social-python:before { content: "\f4e9"; }
+
+.ion-social-reddit:before { content: "\f23b"; }
+
+.ion-social-reddit-outline:before { content: "\f23a"; }
+
+.ion-social-rss:before { content: "\f23d"; }
+
+.ion-social-rss-outline:before { content: "\f23c"; }
+
+.ion-social-sass:before { content: "\f4ea"; }
+
+.ion-social-skype:before { content: "\f23f"; }
+
+.ion-social-skype-outline:before { content: "\f23e"; }
+
+.ion-social-snapchat:before { content: "\f4ec"; }
+
+.ion-social-snapchat-outline:before { content: "\f4eb"; }
+
+.ion-social-tumblr:before { content: "\f241"; }
+
+.ion-social-tumblr-outline:before { content: "\f240"; }
+
+.ion-social-tux:before { content: "\f2c5"; }
+
+.ion-social-twitch:before { content: "\f4ee"; }
+
+.ion-social-twitch-outline:before { content: "\f4ed"; }
+
+.ion-social-twitter:before { content: "\f243"; }
+
+.ion-social-twitter-outline:before { content: "\f242"; }
+
+.ion-social-usd:before { content: "\f353"; }
+
+.ion-social-usd-outline:before { content: "\f352"; }
+
+.ion-social-vimeo:before { content: "\f245"; }
+
+.ion-social-vimeo-outline:before { content: "\f244"; }
+
+.ion-social-whatsapp:before { content: "\f4f0"; }
+
+.ion-social-whatsapp-outline:before { content: "\f4ef"; }
+
+.ion-social-windows:before { content: "\f247"; }
+
+.ion-social-windows-outline:before { content: "\f246"; }
+
+.ion-social-wordpress:before { content: "\f249"; }
+
+.ion-social-wordpress-outline:before { content: "\f248"; }
+
+.ion-social-yahoo:before { content: "\f24b"; }
+
+.ion-social-yahoo-outline:before { content: "\f24a"; }
+
+.ion-social-yen:before { content: "\f4f2"; }
+
+.ion-social-yen-outline:before { content: "\f4f1"; }
+
+.ion-social-youtube:before { content: "\f24d"; }
+
+.ion-social-youtube-outline:before { content: "\f24c"; }
+
+.ion-soup-can:before { content: "\f4f4"; }
+
+.ion-soup-can-outline:before { content: "\f4f3"; }
+
+.ion-speakerphone:before { content: "\f2b2"; }
+
+.ion-speedometer:before { content: "\f2b3"; }
+
+.ion-spoon:before { content: "\f2b4"; }
+
+.ion-star:before { content: "\f24e"; }
+
+.ion-stats-bars:before { content: "\f2b5"; }
+
+.ion-steam:before { content: "\f30b"; }
+
+.ion-stop:before { content: "\f24f"; }
+
+.ion-thermometer:before { content: "\f2b6"; }
+
+.ion-thumbsdown:before { content: "\f250"; }
+
+.ion-thumbsup:before { content: "\f251"; }
+
+.ion-toggle:before { content: "\f355"; }
+
+.ion-toggle-filled:before { content: "\f354"; }
+
+.ion-transgender:before { content: "\f4f5"; }
+
+.ion-trash-a:before { content: "\f252"; }
+
+.ion-trash-b:before { content: "\f253"; }
+
+.ion-trophy:before { content: "\f356"; }
+
+.ion-tshirt:before { content: "\f4f7"; }
+
+.ion-tshirt-outline:before { content: "\f4f6"; }
+
+.ion-umbrella:before { content: "\f2b7"; }
+
+.ion-university:before { content: "\f357"; }
+
+.ion-unlocked:before { content: "\f254"; }
+
+.ion-upload:before { content: "\f255"; }
+
+.ion-usb:before { content: "\f2b8"; }
+
+.ion-videocamera:before { content: "\f256"; }
+
+.ion-volume-high:before { content: "\f257"; }
+
+.ion-volume-low:before { content: "\f258"; }
+
+.ion-volume-medium:before { content: "\f259"; }
+
+.ion-volume-mute:before { content: "\f25a"; }
+
+.ion-wand:before { content: "\f358"; }
+
+.ion-waterdrop:before { content: "\f25b"; }
+
+.ion-wifi:before { content: "\f25c"; }
+
+.ion-wineglass:before { content: "\f2b9"; }
+
+.ion-woman:before { content: "\f25d"; }
+
+.ion-wrench:before { content: "\f2ba"; }
+
+.ion-xbox:before { content: "\f30c"; }
index 6d6c4ca..a037deb 100644 (file)
                "getRoleFunctions": "http://localhost:8080/ecompportal/portalApi/get_role_functions",
                "saveRoleFunction": "http://localhost:8080/ecompportal/portalApi/role_function_list/saveRoleFunction.htm",
                "removeRoleFunction": "http://localhost:8080/ecompportal/portalApi/role_function_list/removeRoleFunction.htm",
-               "userAppsOrderBySortPref": "http://localhost:8080/ecompportal/portalApi/userAppsOrderBySortPref",
-               "userAppsOrderByName": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByName",
-        "saveUserAppsSortingPreference": "http://localhost:8080/ecompportal/portalApi/saveUserAppsSortingPreference",
-        "userAppsSortTypePreference": "http://localhost:8080/ecompportal/portalApi/userAppsSortTypePreference",
-        "userAppsOrderByLastUsed": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByLastUsed",
-        "userAppsOrderByMostUsed": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByMostUsed",
-        "userAppsOrderByManual": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByManual",
-        "saveUserAppsSortingManual": "http://localhost:8080/ecompportal/portalApi/saveUserAppsSortingManual",
-        "saveUserWidgetsSortManual": "http://localhost:8080/ecompportal/portalApi/saveUserWidgetsSortManual",
-        "updateWidgetsSortPref": "http://localhost:8080/ecompportal/portalApi/updateWidgetsSortPref",    
-        "UpdateUserAppsSortManual": "http://localhost:8080/ecompportal/portalApi/UpdateUserAppsSortManual",
-               "widgetCatalogSelection": "http://localhost:8080/ecompportal/portalApi/widgetCatalogSelection",
-               "widgetCommon": "http://localhost:8080/ecompportal/portalApi/microservices",
-               "getWidthThresholdLeftMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdLeftMenu",
-        "getWidthThresholdRightMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdRightMenu",
-               "appCatalogRoles" : "http://localhost:8080/ecompportal/portalApi/appCatalogRoles",
-               "saveUserAppRoles":"http://localhost:8080/ecompportal/portalApi/saveUserAppRoles",
-               "userApplicationRoles":"http://localhost:8080/ecompportal/portalApi/userApplicationRoles"
+               "userAppsOrderBySortPref": "http://localhost:8080/ecompportal/portalApi/userAppsOrderBySortPref",
+               "userAppsOrderByName": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByName",
+               "saveUserAppsSortingPreference": "http://localhost:8080/ecompportal/portalApi/saveUserAppsSortingPreference",
+               "userAppsSortTypePreference": "http://localhost:8080/ecompportal/portalApi/userAppsSortTypePreference",
+               "userAppsOrderByLastUsed": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByLastUsed",
+               "userAppsOrderByMostUsed": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByMostUsed",
+               "userAppsOrderByManual": "http://localhost:8080/ecompportal/portalApi/userAppsOrderByManual",
+               "saveUserAppsSortingManual": "http://localhost:8080/ecompportal/portalApi/saveUserAppsSortingManual",
+               "saveUserWidgetsSortManual": "http://localhost:8080/ecompportal/portalApi/saveUserWidgetsSortManual",
+               "updateWidgetsSortPref": "http://localhost:8080/ecompportal/portalApi/updateWidgetsSortPref",    
+               "UpdateUserAppsSortManual": "http://localhost:8080/ecompportal/portalApi/UpdateUserAppsSortManual",
+               "widgetCatalogSelection": "http://localhost:8080/ecompportal/portalApi/widgetCatalogSelection",
+               "widgetCommon": "http://localhost:8080/ecompportal/portalApi/microservices",
+               "basicAuthAccount": "http://www.ecomp.att.com:8080/ecompportal-att/portalApi/basicAuthAccount",
+               "microserviceProxy": "http://www.ecomp.att.com:8080/ecompportal-att/portalApi/microservice/proxy",
+               "getWidthThresholdLeftMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdLeftMenu",
+               "getWidthThresholdRightMenu":"http://localhost:8080/ecompportal/portalApi/dashboard/windowWidthThresholdRightMenu",
+               "appCatalogRoles" : "http://localhost:8080/ecompportal/portalApi/appCatalogRoles",
+               "saveUserAppRoles":"http://localhost:8080/ecompportal/portalApi/saveUserAppRoles",
+               "userApplicationRoles":"http://localhost:8080/ecompportal/portalApi/userApplicationRoles",
+               "ecompTitle":"http://localhost:8080/ecompportal/portalApi/ecompTitle",
+               "loggedinUser" : "http://localhost:8080/ecompportal/portalApi/loggedinUser",
+               "modifyLoggedinUser" : "http://localhost:8080/ecompportal/portalApi/modifyLoggedinUser"
        },
        "cookieDomain": "org.openecomp"
-}
\ No newline at end of file
+}
index 15571a2..aca4e1f 100644 (file)
                "getRoleFunctions": "portalApi/get_role_functions",
                "saveRoleFunction": "portalApi/role_function_list/saveRoleFunction.htm",
                "removeRoleFunction": "portalApi/role_function_list/removeRoleFunction.htm",
-               "userAppsOrderBySortPref": "portalApi/userAppsOrderBySortPref",
-               "userAppsOrderByName": "portalApi/userAppsOrderByName",
-        "saveUserAppsSortingPreference": "portalApi/saveUserAppsSortingPreference",
-        "userAppsSortTypePreference": "portalApi/userAppsSortTypePreference",
-        "userAppsOrderByLastUsed": "portalApi/userAppsOrderByLastUsed",
-        "userAppsOrderByMostUsed": "portalApi/userAppsOrderByMostUsed",
-        "userAppsOrderByManual": "portalApi/userAppsOrderByManual",
-        "saveUserAppsSortingManual": "portalApi/saveUserAppsSortingManual",
-        "saveUserWidgetsSortManual": "portalApi/saveUserWidgetsSortManual",
-        "updateWidgetsSortPref": "portalApi/updateWidgetsSortPref",    
-        "UpdateUserAppsSortManual": "portalApi/UpdateUserAppsSortManual",
-               "widgetCatalogSelection": "portalApi/widgetCatalogSelection",
-               "widgetCommon": "portalApi/microservices",
-               "getWidthThresholdLeftMenu":"portalApi/dashboard/windowWidthThresholdLeftMenu",
-        "getWidthThresholdRightMenu":"portalApi/dashboard/windowWidthThresholdRightMenu",
-               "appCatalogRoles" : "portalApi/appCatalogRoles",
-               "saveUserAppRoles":"portalApi/saveUserAppRoles",
-               "userApplicationRoles":"portalApi/userApplicationRoles"
+               "userAppsOrderBySortPref": "portalApi/userAppsOrderBySortPref",
+               "userAppsOrderByName": "portalApi/userAppsOrderByName",
+               "saveUserAppsSortingPreference": "portalApi/saveUserAppsSortingPreference",
+               "userAppsSortTypePreference": "portalApi/userAppsSortTypePreference",
+               "userAppsOrderByLastUsed": "portalApi/userAppsOrderByLastUsed",
+               "userAppsOrderByMostUsed": "portalApi/userAppsOrderByMostUsed",
+               "userAppsOrderByManual": "portalApi/userAppsOrderByManual",
+               "saveUserAppsSortingManual": "portalApi/saveUserAppsSortingManual",
+               "saveUserWidgetsSortManual": "portalApi/saveUserWidgetsSortManual",
+               "updateWidgetsSortPref": "portalApi/updateWidgetsSortPref",    
+               "UpdateUserAppsSortManual": "portalApi/UpdateUserAppsSortManual",
+               "widgetCatalogSelection": "portalApi/widgetCatalogSelection",
+               "widgetCommon": "portalApi/microservices",
+               "basicAuthAccount": "portalApi/basicAuthAccount",
+               "microserviceProxy": "portalApi/microservice/proxy",
+               "getWidthThresholdLeftMenu":"portalApi/dashboard/windowWidthThresholdLeftMenu",
+               "getWidthThresholdRightMenu":"portalApi/dashboard/windowWidthThresholdRightMenu",
+               "appCatalogRoles" : "portalApi/appCatalogRoles",
+               "saveUserAppRoles":"portalApi/saveUserAppRoles",
+               "userApplicationRoles":"portalApi/userApplicationRoles",
+               "ecompTitle":"portalApi/ecompTitle",
+               "loggedinUser" : "portalApi/loggedinUser",
+               "modifyLoggedinUser" : "portalApi/modifyLoggedinUser"
        },
        "cookieDomain": "openecomp.org"
-}
\ No newline at end of file
+}
index 89620af..16eba08 100644 (file)
-<!--\r
-  ================================================================================\r
-  eCOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<!doctype html>\r
-<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->\r
-<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->\r
-<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->\r
-<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->\r
-<head>\r
-    <meta charset="utf-8">\r
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">\r
-    <title></title>\r
-    <meta name="description" content="">\r
-    <meta name="viewport" content="width=device-width">\r
-    <!--<base href="/ecompportal/">-->\r
-    <!--!!!!!!!!!!!!!!!!!!!!! moved base href from here to script tag in body, please change base href based on your server -->\r
-    <!-- nabil - add this part to gruntfile -->\r
-    <link rel="stylesheet" href="bower_components_external/ionicons-2.0.1/css/ionicons.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/base.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/btn.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/demo.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/dtpk.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/frms.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/sldr.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/style.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/tbs.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular.att.abs-2.17.0/styles/pages/iconography.css">\r
-\r
-    <link rel="stylesheet" href="bower_components_external/angular-att-gridster/styles/ui-gridster.css">\r
-    <link rel="stylesheet" href="bower_components_external/angular-att-gridster/css/angular-gridster.css">\r
-    \r
-    <link rel="stylesheet" href="bower_components_external/b2b/css/b2b-angular/b2b-angular.css">\r
-    <link rel="stylesheet" href="bower_components_external/b2b/js/b2b-angular/font_icons.css">\r
-\r
-    \r
-    \r
-    <!-- end -->\r
-\r
-<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->\r
-<!-- build:css(client) app/vendor.css -->\r
-<!-- bower:css -->\r
-<link rel="stylesheet" href="bower_components/angular-material/angular-material.css" />\r
-<link rel="stylesheet" href="bower_components/ui-select/dist/select.css" />\r
-<link rel="stylesheet" href="bower_components/ng-dialog/css/ngDialog.css" />\r
-<link rel="stylesheet" href="bower_components/ng-dialog/css/ngDialog-theme-default.css" />\r
-<link rel="stylesheet" href="bower_components/jqTree/jqtree.css" />\r
-<link rel="stylesheet" href="bower_components/angular-gridster/dist/angular-gridster.css" />\r
-<!-- endbower -->\r
-<!-- endbuild -->  \r
-\r
-<!-- kpi dashboard related styles -->\r
-<!--  kpi start -->\r
-<!--  kpi end -->\r
-\r
-\r
-<!-- build:css({.tmp,client}) app/app.css -->\r
-<link rel="stylesheet" href="app/app.css">\r
+<!--
+  ================================================================================
+  eCOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<!doctype html>
+<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
+<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
+<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
+<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title></title>
+    <meta name="description" content="">
+    <meta name="viewport" content="width=device-width">
+    <!--<base href="/ecompportal/">-->
+    <!--!!!!!!!!!!!!!!!!!!!!! moved base href from here to script tag in body, please change base href based on your server -->
+    <!-- nabil - add this part to gruntfile -->
+    <link rel="stylesheet" href="bower_components_external/ionicons-2.0.1/css/ionicons.css">
+    <link rel="stylesheet" href="bower_components_external/ionicons-2.0.1/css/ecomp-ionicons.css">    
+    <link rel="stylesheet" href="bower_components_external/b2b/css/b2b-angular/b2b-angular.css">
+    <link rel="stylesheet" href="bower_components_external/b2b/js/b2b-angular/font_icons.css">
+
+    
+    
+    <!-- end -->
+
+<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
+<!-- build:css(client) app/vendor.css -->
+<!-- bower:css -->
+<link rel="stylesheet" href="bower_components/angular-material/angular-material.css" />
+<link rel="stylesheet" href="bower_components/ui-select/dist/select.css" />
+<link rel="stylesheet" href="bower_components/ng-dialog/css/ngDialog.css" />
+<link rel="stylesheet" href="bower_components/ng-dialog/css/ngDialog-theme-default.css" />
+<link rel="stylesheet" href="bower_components/jqTree/jqtree.css" />
+<link rel="stylesheet" href="bower_components/angular-gridster/dist/angular-gridster.css" />
+<!-- endbower -->
+<!-- endbuild -->  
+
+<!-- kpi dashboard related styles -->
+<!--  kpi start -->
+<!--  kpi end -->
+
+
+<!-- build:css({.tmp,client}) app/app.css -->
+<link rel="stylesheet" href="app/app.css">
 <!-- injector:css -->
-<!-- endinjector -->\r
-<!-- endbuild -->\r
-\r
-        <style>\r
-\r
-   html, body{\r
-    height: 100%;\r
-    overflow:hidden;\r
-       }\r
-\r
-    </style>\r
-\r
-</head>\r
-<body ng-app="ecompApp">\r
-<script>\r
-           if (!String.prototype.includes) {\r
-                 String.prototype.includes = function(search, start) {\r
-                   'use strict';\r
-                   if (typeof start !== 'number') {\r
-                     start = 0;\r
-                   }\r
-\r
-                   if (start + search.length > this.length) {\r
-                     return false;\r
-                   } else {\r
-                     return this.indexOf(search, start) !== -1;\r
-                   }\r
-                 };\r
-               }\r
-\r
-           function nthIndex(str, pat, n){\r
-               var L= str.length, i= -1;\r
-               while(n-- && i++<L){\r
-               i= str.indexOf(pat, i);\r
-               if (i < 0) break;\r
-               }\r
-                return i;\r
-        }\r
-\r
-           \r
-               var base = window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)+1);\r
-               document.write("<base href='" + base + "' />");\r
-\r
-               \r
-           \r
-          \r
-</script>\r
-\r
-<script type="text/javascript">\r
-\r
-       // onLoad='isCascadeFrame(this)'\r
-       if (self != top && !self.window.location.pathname.includes("unKnownError")) {\r
-       var e = document.body;\r
-       var parent = e.parentNode;\r
-       e.parentNode.removeChild(e);\r
-       //var textnode = document.createTextNode("An unknown error has occured. Please contact your system administrator"); \r
-       //parent.appendChild(textnode);\r
-       window.location = "unKnownError";\r
-       }\r
-\r
-</script>\r
-\r
-<!--[if lt IE 7]>\r
-<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>\r
-<![endif]-->\r
-\r
-<!-- Add your site or application content here -->\r
-<div ui-view="header"></div>\r
-<div ui-view="tabbar"></div>\r
-<div ng-show="ContentModel.IsVisible" class="slide">\r
-       <div ui-view="content"></div>\r
-       <div ui-view="sidebar"></div>\r
-       <div ui-view="userbar" style="float:right"></div>\r
-</div>\r
-<div ui-view="error"></div>\r
-<div ui-view="footer"></div>\r
-\r
-<!--[if lt IE 9]>\r
-<script src="../bower_components/es5-shim/es5-shim.js"></script>\r
-<script src="../bower_components/json3/lib/json3.min.js"></script>\r
-<![endif]-->\r
-<!-- build:js({client,node_modules}) app/vendor.js -->\r
-<!-- bower:js -->\r
-<script src="bower_components/jquery/dist/jquery.js"></script>\r
-<script src="bower_components/es5-shim/es5-shim.js"></script>\r
-<script src="bower_components/angular/angular.js"></script>\r
-<script src="bower_components/angular-animate/angular-animate.js"></script>\r
-<script src="bower_components/angular-route/angular-route.js"></script>\r
-<script src="bower_components/angular-aria/angular-aria.js"></script>\r
-<script src="bower_components/angular-messages/angular-messages.js"></script>\r
-<script src="bower_components/angular-material/angular-material.js"></script>\r
-<script src="bower_components/json3/lib/json3.js"></script>\r
-<script src="bower_components/angular-resource/angular-resource.js"></script>\r
-<script src="bower_components/angular-cookies/angular-cookies.js"></script>\r
-<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>\r
-<script src="bower_components/lodash/lodash.js"></script>\r
-<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>\r
-<script src="bower_components/ui-select/dist/select.js"></script>\r
-<script src="bower_components/angular-touch/angular-touch.js"></script>\r
-<script src="bower_components/angular-smart-table/dist/smart-table.js"></script>\r
-<script src="bower_components/hammerjs/hammer.js"></script>\r
-<script src="bower_components/angular-gestures/gestures.min.js"></script>\r
-<script src="bower_components/angular-cache/dist/angular-cache.js"></script>\r
-<script src="bower_components/ng-dialog/js/ngDialog.js"></script>\r
-<script src="bower_components/jqTree/tree.jquery.js"></script>\r
-<script src="bower_components/angular-uuid/uuid.min.js"></script>\r
-<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>\r
-<script src="bower_components/jquery-mousewheel/jquery.mousewheel.js"></script>\r
-<script src="bower_components/jquery.newstape/dist/jquery.newstape.min.js"></script>\r
-<script src="bower_components/oclazyload/dist/ocLazyLoad.js"></script>\r
-<script src="bower_components/d3/index-browserify.js"></script>\r
-<script src="bower_components/javascript-detect-element-resize/detect-element-resize.js"></script>\r
-<script src="bower_components/angular-gridster/src/angular-gridster.js"></script>\r
-<!-- endbower -->\r
-<!-- endbuild -->\r
-\r
-<!-- nabil - add this part to gruntfile -->\r
-<script src="bower_components_external/angular.att.abs-2.17.0/att-abs-tpls.js"></script>\r
-<script src="bower_components_external/angular-att-gridster/ui-gridster-tpls.js"></script>\r
-<script src="bower_components_external/angular-gridster/angular-gridster.min.js"></script>\r
-<script src="bower_components_external/bowser/bowser.js"></script>\r
-\r
-\r
-\r
-\r
-<script src="bower_components_external/b2b/js/b2b-angular/b2b-library.min.js"></script>\r
-<!-- end-->\r
-\r
-<!-- Avoid ^M (control-M, i.e., carriage-return, i.e., Windows line endings here. -->\r
-\r
-<!-- build:js(.tmp) app/app.js -->\r
-<script src="app/app.js"></script>\r
+<!-- endinjector -->
+<!-- endbuild -->
+
+        <style>
+
+   html, body{
+    height: 100%;
+    overflow:hidden;
+       }
+
+    </style>
+
+</head>
+<body ng-app="ecompApp">
+<script>
+           if (!String.prototype.includes) {
+                 String.prototype.includes = function(search, start) {
+                   'use strict';
+                   if (typeof start !== 'number') {
+                     start = 0;
+                   }
+
+                   if (start + search.length > this.length) {
+                     return false;
+                   } else {
+                     return this.indexOf(search, start) !== -1;
+                   }
+                 };
+               }
+
+           function nthIndex(str, pat, n){
+               var L= str.length, i= -1;
+               while(n-- && i++<L){
+               i= str.indexOf(pat, i);
+               if (i < 0) break;
+               }
+                return i;
+        }
+
+           
+               var base = window.location.pathname.substring(0, window.location.pathname.indexOf("/",2)+1);
+               document.write("<base href='" + base + "' />");
+
+               
+           
+          
+</script>
+
+<script type="text/javascript">
+
+       // onLoad='isCascadeFrame(this)'
+       if (self != top && !self.window.location.pathname.includes("unKnownError")) {
+       var e = document.body;
+       var parent = e.parentNode;
+       e.parentNode.removeChild(e);
+       //var textnode = document.createTextNode("An unknown error has occured. Please contact your system administrator"); 
+       //parent.appendChild(textnode);
+       window.location = "unKnownError";
+       }
+
+</script>
+
+<!--[if lt IE 7]>
+<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
+<![endif]-->
+
+<!-- Add your site or application content here -->
+<div ui-view="header"></div>
+<div ui-view="tabbar"></div>
+<div ng-show="ContentModel.IsVisible" class="slide">
+       <div ui-view="content"></div>
+       <div ui-view="sidebar"></div>
+       <div ui-view="userbar" style="float:right"></div>
+</div>
+<div ui-view="error"></div>
+<div ui-view="footer"></div>
+
+<!--[if lt IE 9]>
+<script src="../bower_components/es5-shim/es5-shim.js"></script>
+<script src="../bower_components/json3/lib/json3.min.js"></script>
+<![endif]-->
+<!-- build:js({client,node_modules}) app/vendor.js -->
+<!-- bower:js -->
+<script src="bower_components/jquery/dist/jquery.js"></script>
+<script src="bower_components/angular/angular.js"></script>
+<script src="bower_components/angular-animate/angular-animate.js"></script>
+<script src="bower_components/angular-route/angular-route.js"></script>
+<script src="bower_components/angular-aria/angular-aria.js"></script>
+<script src="bower_components/angular-messages/angular-messages.js"></script>
+<script src="bower_components/angular-material/angular-material.js"></script>
+<script src="bower_components/angular-resource/angular-resource.js"></script>
+<script src="bower_components/angular-cookies/angular-cookies.js"></script>
+<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
+<script src="bower_components/lodash/lodash.js"></script>
+<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
+<script src="bower_components/ui-select/dist/select.js"></script>
+<script src="bower_components/angular-touch/angular-touch.js"></script>
+<script src="bower_components/angular-smart-table/dist/smart-table.js"></script>
+<script src="bower_components/hammerjs/hammer.js"></script>
+<script src="bower_components/angular-gestures/gestures.min.js"></script>
+<script src="bower_components/angular-cache/dist/angular-cache.js"></script>
+<script src="bower_components/ng-dialog/js/ngDialog.js"></script>
+<script src="bower_components/jqTree/tree.jquery.js"></script>
+<script src="bower_components/angular-uuid/uuid.min.js"></script>
+<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
+<script src="bower_components/jquery-mousewheel/jquery.mousewheel.js"></script>
+<script src="bower_components/jquery.newstape/dist/jquery.newstape.min.js"></script>
+<script src="bower_components/oclazyload/dist/ocLazyLoad.js"></script>
+<script src="bower_components/d3/index-browserify.js"></script>
+<script src="bower_components/javascript-detect-element-resize/detect-element-resize.js"></script>
+<script src="bower_components/angular-gridster/src/angular-gridster.js"></script>
+<!-- endbower -->
+<!-- endbuild -->
+
+<!-- nabil - add this part to gruntfile -->
+<script src="bower_components_external/angular-gridster/angular-gridster.min.js"></script>
+<script src="bower_components_external/bowser/bowser.js"></script>
+
+
+
+
+<script src="bower_components_external/b2b/js/b2b-angular/b2b-library.min.js"></script>
+<!-- end-->
+
+<!-- Avoid ^M (control-M, i.e., carriage-return, i.e., Windows line endings here. -->
+
+<!-- build:js(.tmp) app/app.js -->
+<script src="app/app.js"></script>
   <!-- injector:js -->
   <script src="app/configurations.js"></script>
   <script src="app/directives/auto-focus/auto-focus.directive.js"></script>
   <script src="app/services/applications/applications.service.js"></script>
   <script src="app/services/audit-log/audit-log.service.js"></script>
   <script src="app/services/base64/base64.service.js"></script>
+  <script src="app/services/basic-auth-account/basic-auth-account.service.js"></script>
   <script src="app/services/be-property-reader/be-property-reader.service.js"></script>
   <script src="app/services/catalog/catalog.service.js"></script>
   <script src="app/services/confirm-box/confirm-box.service.js"></script>
   <script src="app/services/microservice/microservice.service.js"></script>
   <script src="app/services/notification/notification.service.js"></script>
   <script src="app/services/portal-admins/portal-admins.service.js"></script>
+  <script src="app/services/recommendation/recommendation.service.js"></script>
   <script src="app/services/role/role.service.js"></script>
   <script src="app/services/support/getAccess/get-access.service.js"></script>
   <script src="app/services/support/session/session.service.js"></script>
   <script src="app/services/utils/utils.service.js"></script>
   <script src="app/services/widgets-catalog/widgets-catalog.service.js"></script>
   <script src="app/services/widgets/widgets.service.js"></script>
+  <script src="app/views/account-onboarding/account-add-details/account-add-details.js"></script>
+  <script src="app/views/account-onboarding/account-onboarding.controller.js"></script>
   <script src="app/views/admins/add-admin-dialogs/new-admin.controller.js"></script>
   <script src="app/views/admins/admins.controller.js"></script>
   <script src="app/views/applications/application-details-dialog/application-details.controller.js"></script>
   <script src="app/views/catalog/catalog.controller.js"></script>
   <script src="app/views/catalog/catalogconfirmation.controller.js"></script>
   <script src="app/views/confirmation-box/confirmation-box.controller.js"></script>
+  <script src="app/views/dashboard/dashboard-widget-parameters.controller.js"></script>
   <script src="app/views/dashboard/dashboard-widget.controller.js"></script>
   <script src="app/views/dashboard/dashboard.controller.js"></script>
   <script src="app/views/dashboard/newsticker.controller.js"></script>
   <script src="app/views/functionalMenu/functionalMenu.controller.js"></script>
   <script src="app/views/functionalMenu/jqTreeContextMenu.js"></script>
   <script src="app/views/header/header.controller.js"></script>
+  <script src="app/views/header/profile-edit-dialogs/profile-edit.controller.js"></script>
   <script src="app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js"></script>
   <script src="app/views/microservice-onboarding/microservice-onboarding.controller.js"></script>
   <script src="app/views/notification-history/notificationhistory.controller.js"></script>
   <script src="app/views/widget-onboarding/widget-onboarding.controller.js"></script>
   <script src="app/views/widgets/widget-details-dialog/widget-details.controller.js"></script>
   <script src="app/views/widgets/widgets.controller.js"></script>
-  <!-- endinjector -->\r
-<!-- endbuild -->\r
-\r
-\r
-</body>\r
-</html>\r
+  <!-- endinjector -->
+<!-- endbuild -->
+
+
+</body>
+</html>
index 102ac22..0575553 100644 (file)
-/**\r
- * Created by nnaffar on 1/28/16.\r
- */\r
-@sidebar-width: 200px;\r
-@transition-duration: 0.25s;\r
-@overlayer-opacity: 0.65;\r
-\r
-\r
-.close-button {\r
-  //width: @sidebar-width;\r
-  .blackText24m;\r
-  //.bg_u;\r
-  font-size: 3em;\r
-  line-height: 18px;\r
-  position: absolute;\r
-  cursor: pointer;\r
-  vertical-align: middle;\r
-  top: @second-level-top;\r
-  left: 0;\r
-  -webkit-font-smoothing: antialiased;\r
-  height: 53px;\r
-  z-index: 101;\r
-  //box-shadow: 0 4px 5px rgba(0, 0, 0, .2);\r
-\r
-}\r
-.ecomp-right-sidebar-container{\r
-  position: absolute;\r
-  display: block;\r
-  left: 0;\r
-  z-index: 100;\r
-  transition: left @transition-duration;\r
-  margin-top: -15px;\r
-\r
-  .ecomp-right-sidebar-main {\r
-    //background-color: ;\r
-    position: absolute;\r
-    margin-top: 115px;\r
-    \r
-    height: 100vh;\r
-    .bg_portalWhite;//white for 1702\r
-    box-shadow: 0 4px 5px rgba(0, 0, 0, .2);\r
-       left: -90px; \r
-       width:75px; \r
-       padding:0px; \r
-       height: 100vh; \r
-\r
-\r
-\r
-    .accordion-container{\r
-      margin-top: 45px;\r
-    }\r
-    .portal-accordion-font{\r
-      font-size: .875rem;\r
-      color: #666;\r
-      display: inline-block;\r
-      font-family: Arial;\r
-\r
-    }\r
-\r
-    .portal-accordion-active{\r
-      color: #199DDF !important;\r
-    }\r
-\r
-    .sub-item{\r
-      .portal-accordion-font;\r
-      cursor: pointer;\r
-      height: 37px;\r
-      line-height: 37px;\r
-      padding-left: 20px;\r
-      padding-bottom: 10px;\r
-      vertical-align: middle;\r
-      width: 100%;\r
-    }\r
-    .sub-item:hover{\r
-      .portal-accordion-active;\r
-    }\r
-\r
-    .parent-item{\r
-      .portal-accordion-font;\r
-      border-bottom: 1px solid #bbb;\r
-      cursor: pointer;\r
-      height: 37px;\r
-      line-height: 37px;\r
-      padding-bottom: 10px;\r
-      vertical-align: middle;\r
-      width: 100%;\r
-    }\r
-    .parent-item:hover{\r
-      .portal-accordion-active;\r
-    }\r
-\r
-  }\r
-}\r
-\r
-.open-userbar {\r
-  left: 0;\r
-  transition: left .25s ease-in-out;\r
-   -moz-transition: left .25s ease-in-out;\r
-   -webkit-transition: left .25s ease-in-out;\r
-}\r
-\r
-.close-userbar {\r
-  left: 91px;\r
-  transition: left .25s ease-in-out;\r
-   -moz-transition: left .25s ease-in-out;\r
-   -webkit-transition: left .25s ease-in-out;\r
-}\r
-\r
-.content-overlayed {\r
-  position: fixed;\r
-  top: 110px;\r
-  right: 0;\r
-  bottom: 0;\r
-  left: 0;\r
-  background: none repeat scroll 0 0 rgb(242, 242, 242);\r
-  z-index: 9999;\r
-}\r
-.fade-animation{\r
-  opacity: @overlayer-opacity;\r
-  transition: opacity @transition-duration ease-in-out;\r
-}\r
-.fade-animation.ng-hide {\r
-  opacity:0;\r
-  transition: opacity @transition-duration ease-in-out;\r
-}\r
-\r
-.activeUserIcon { \r
-       transition: all .2s ease-in-out; \r
-       display: block; \r
-       margin-left: auto; margin-right: auto; height:55px; width:55px; border-radius: 50%;\r
-       \r
-}\r
-.activeUserIcon:hover { transform: scale(1.5); }\r
-\r
-.ecomp-right-sidebar-toggle{\r
-       position: absolute; \r
-       top: 400px; \r
-       right: 35px;\r
-}\r
-.ecomp-right-sidebar-toggle-btn{\r
-       position:relative;\r
-}\r
-.open-userbar-toggle {\r
- // right: 0;\r
-  transition: right .25s ease-in-out;\r
-   -moz-transition: right .25s ease-in-out;\r
-   -webkit-transition: right .25s ease-in-out;\r
-}\r
-\r
-.close-userbar-toggle {\r
-  right: -36px;\r
-  transition: right .25s ease-in-out;\r
-   -moz-transition: right .25s ease-in-out;\r
-   -webkit-transition: right .25s ease-in-out;\r
-}\r
-\r
-.ecomp-right-sidebar-title{\r
-       font-family: Arial;\r
-       font-size: 14px;\r
-       color: #ef6f00;\r
-       margin-bottom:20px;\r
-       text-align: center;\r
-}\r
-\r
-.ecomp-right-sidebar-toggle a{\r
-       transform: rotate(-90deg);\r
-       z-index:2\r
-}\r
-.ecomp-right-sidebar-toggle button{\r
-       transform: rotate(-90deg);\r
-       z-index:2;\r
-       width: 100px!important;\r
-    height: 30px !important;\r
-    padding-bottom: 26px !important;\r
-       }\r
-       .btn:last-child {\r
-    margin-right: 6px !important;\r
-}\r
-\r
-.right-menu-button{\r
-       font-family: Omnes-ECOMP-W02,Arial\r
+/**
+ * Created by nnaffar on 1/28/16.
+ */
+@sidebar-width: 200px;
+@transition-duration: 0.25s;
+@overlayer-opacity: 0.65;
+
+
+.close-button {
+  //width: @sidebar-width;
+  .blackText24m;
+  //.bg_u;
+  font-size: 3em;
+  line-height: 18px;
+  position: absolute;
+  cursor: pointer;
+  vertical-align: middle;
+  top: @second-level-top;
+  left: 0;
+  -webkit-font-smoothing: antialiased;
+  height: 53px;
+  z-index: 101;
+  //box-shadow: 0 4px 5px rgba(0, 0, 0, .2);
+
+}
+.ecomp-right-sidebar-container{
+  position: absolute;
+  display: block;
+  left: 0;
+  z-index: 100;
+  transition: left @transition-duration;
+  margin-top: -15px;
+
+  .ecomp-right-sidebar-main {
+    //background-color: ;
+    position: absolute;
+    margin-top: 115px;
+    
+    height: 100vh;
+    .bg_portalWhite;//white for 1702
+    box-shadow: 0 4px 5px rgba(0, 0, 0, .2);
+       left: -90px; 
+       width:75px; 
+       padding:0px; 
+       height: 100vh; 
+
+
+
+    .accordion-container{
+      margin-top: 45px;
+    }
+    .portal-accordion-font{
+      font-size: .875rem;
+      color: #666;
+      display: inline-block;
+      font-family: Arial;
+
+    }
+
+    .portal-accordion-active{
+      color: #199DDF !important;
+    }
+
+    .sub-item{
+      .portal-accordion-font;
+      cursor: pointer;
+      height: 37px;
+      line-height: 37px;
+      padding-left: 20px;
+      padding-bottom: 10px;
+      vertical-align: middle;
+      width: 100%;
+    }
+    .sub-item:hover{
+      .portal-accordion-active;
+    }
+
+    .parent-item{
+      .portal-accordion-font;
+      border-bottom: 1px solid #bbb;
+      cursor: pointer;
+      height: 37px;
+      line-height: 37px;
+      padding-bottom: 10px;
+      vertical-align: middle;
+      width: 100%;
+    }
+    .parent-item:hover{
+      .portal-accordion-active;
+    }
+
+  }
+}
+
+.open-userbar {
+  left: 0;
+  transition: left .25s ease-in-out;
+   -moz-transition: left .25s ease-in-out;
+   -webkit-transition: left .25s ease-in-out;
+}
+
+.close-userbar {
+  left: 91px;
+  transition: left .25s ease-in-out;
+   -moz-transition: left .25s ease-in-out;
+   -webkit-transition: left .25s ease-in-out;
+}
+
+.content-overlayed {
+  position: fixed;
+  top: 110px;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  background: none repeat scroll 0 0 rgb(242, 242, 242);
+  z-index: 9999;
+}
+.fade-animation{
+  opacity: @overlayer-opacity;
+  transition: opacity @transition-duration ease-in-out;
+}
+.fade-animation.ng-hide {
+  opacity:0;
+  transition: opacity @transition-duration ease-in-out;
+}
+
+.activeUserIcon { 
+       transition: all .2s ease-in-out; 
+       display: block; 
+       margin-left: auto; margin-right: auto; height:55px; width:55px; border-radius: 50%;
+       
+}
+.activeUserIcon:hover { transform: scale(1.5); }
+
+.ecomp-right-sidebar-toggle{
+       position: absolute; 
+       top: 400px; 
+       right: 35px;
+}
+.ecomp-right-sidebar-toggle-btn{
+       position:relative;
+}
+.open-userbar-toggle {
+ // right: 0;
+  transition: right .25s ease-in-out;
+   -moz-transition: right .25s ease-in-out;
+   -webkit-transition: right .25s ease-in-out;
+}
+
+.close-userbar-toggle {
+  right: -36px;
+  transition: right .25s ease-in-out;
+   -moz-transition: right .25s ease-in-out;
+   -webkit-transition: right .25s ease-in-out;
+}
+
+.ecomp-right-sidebar-title{
+       font-family: Arial;
+       font-size: 14px;
+       color: #ef6f00;
+       margin-bottom:20px;
+       text-align: center;
+}
+
+.ecomp-right-sidebar-toggle a{
+       transform: rotate(-90deg);
+       z-index:2
+}
+.ecomp-right-sidebar-toggle button{
+       transform: rotate(-90deg);
+       z-index:2;
+       width: 100px!important;
+    height: 30px !important;
+    padding-bottom: 26px !important;
+       }
+       .btn:last-child {
+    margin-right: 6px !important;
+}
+
+.right-menu-button{
+       font-family: Omnes-ECOMP-W02,Arial
 }
\ No newline at end of file
index 2fb9786..2fb1b27 100644 (file)
       }
 
       .results-container {
-        height: 208px;
+        height: 170px;
         overflow-y: auto;
         .user {
           padding-left: 10px;
        margin-top:10px;
     }
   }
-}
\ No newline at end of file
+}
index 3cf1044..1562375 100644 (file)
         width: @select-width;
     }
 }
+
+// styles needed on Edit Functional Menu jqtree template
+.dropdown-menu{
+       position:absolute;
+       top:100%;
+       left:0;
+       z-index:1000;
+       display:none;
+       float:left;
+       min-width:160px;
+       padding:5px 0;
+       margin:2px 0 0;
+       list-style:none;
+       font-size:14px;
+       background-color:#fff;
+       border:1px solid #ccc;
+       border:1px solid rgba(0,0,0,.15);
+       border-radius:6px;
+       -webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);
+       box-shadow:0 6px 12px rgba(0,0,0,.175);
+       background-clip:padding-box
+}
+
+.dropdown-menu .divider {
+    height: 1px;
+    margin: 9px 0;
+    overflow: hidden;
+    background-color: #e5e5e5;
+}
+
+.dropdown-menu>li>a {
+    display: block;
+    padding: 3px 20px;
+    clear: both;
+    font-weight: 400;
+    line-height: 1.428571429;
+    color: #333;
+    white-space: nowrap;
+}
+
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index edded4b..fa61e55 100644 (file)
@@ -42,7 +42,7 @@
                                        <table>
                                                <thead b2b-table-row type="header">
                                                                <th b2b-table-header id="col1" sortable="false" >Thumbnail</th>
-                                                               <th b2b-table-header id="col2" key="name" sortable="true" >Application Name</th>
+                                                               <th b2b-table-header id="col2" key="name" sortable="true" default-sort="a">Application Name</th>
                                                                <th b2b-table-header id="col3" sortable="false" >Active?</th>
                                                                <th b2b-table-header id="col4" sortable="false" >Integration Type</th>
                                                                <th b2b-table-header id="col5" sortable="false" >Guest Access</th>
@@ -78,4 +78,4 @@
             </div>
         </div>
     </div>
-</div>
\ No newline at end of file
+</div>
index 5372841..c2eda6e 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/20/15.\r
- */\r
-'use strict';\r
-(function () {\r
-    class NewCatalogModalCtrl {\r
-        constructor($scope, $log, usersService, catalogService, applicationsService, confirmBoxService) {\r
-            let init = () => {\r
-                //$log.info('NewUserModalCtrl::init');\r
-                this.isSaving = false;\r
-                this.adminApps =[];\r
-                this.appRoles = [];\r
-                $scope.userAppRoles = [];\r
-                $scope.titleText = "Request for Access in MyLogins:";\r
-                $scope.title ="Request is pending in MyLogins for the following Roles";\r
-                this.isGettingAdminApps = false;\r
-                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){\r
-                    this.selectedUser = $scope.ngDialogData.selectedUser;\r
-                    this.dialogState = $scope.ngDialogData.dialogState;\r
-                    this.isShowBack = false;\r
-                    if(this.dialogState === 2){\r
-                        this.getUserAppsRoles();\r
-                    }\r
-                }\r
-            };\r
-\r
-            this.appChanged = (index) => {\r
-                let myApp = this.adminApps[index];\r
-                //$log.debug('NewUserModalCtrl::appChanged: index: ', index, '; app id: ', myApp.id, 'app name: ',myApp.name);\r
-                myApp.isChanged = true;\r
-                this.anyChanges = true;\r
-            }\r
-            \r
-            this.deleteApp = (app) => {\r
-                let appMessage = this.selectedUser.firstName + ' ' + this.selectedUser.lastName;\r
-                confirmBoxService.deleteItem(appMessage).then(isConfirmed => {\r
-                    if(isConfirmed){\r
-                        this.anyChanges = true;\r
-                        app.isChanged = true;\r
-                        app.isDeleted = true; // use this to hide the app in the display\r
-                        app.appRoles.forEach(function(role){\r
-                            role.isApplied = false;\r
-                        });\r
-                    }\r
-                }).catch(err => {\r
-                    $log.error('NewUserModalCtrl::deleteApp error: ',err);\r
-                    confirmBoxService.showInformation('There was a problem deleting the the applications. ' +\r
-                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});\r
-                });\r
-            };\r
-      \r
-            this.getUserAppsRoles = () => {\r
-\r
-                //$log.debug('NewUserModalCtrl::getUserAppsRoles: about to call getAdminAppsSimpler');\r
-                this.isGettingAdminApps = true;\r
-                catalogService.getAppCatalog().then((apps) => {\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: beginning of then for getAdminAppsSimpler');\r
-                       \r
-                       this.isGettingAdminApps = false;\r
-                    if (!apps || !apps.length) {\r
-                        $log.error('NewUserModalCtrl::getUserApps error: no admin apps found');\r
-                        return null;\r
-                    }\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: then for getAdminAppsSimpler: step 2');\r
-                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: admin apps: ', apps);\r
-                    \r
-                    this.dialogState = 2; \r
-                    this.isLoading = true;\r
-                    this.adminApps = apps;\r
-                   \r
-                               catalogService.getuserAppRolesCatalog(this.selectedUser.headerText).then(\r
-                                               function(result) {\r
-                                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);\r
-                                                       \r
-                                                       $scope.userAppRoles = result;\r
-                                                       $scope.displyUserAppCatalogRoles = true;\r
-                                                       if(result.length === 1 && result[0].requestedRoleId === null)\r
-                                                               {\r
-                                                               $scope.title= "Removal Request is pending in MyLogins";\r
-                                                               }\r
-                                                       \r
-                                                          if($scope.userAppRoles.length==0)\r
-                                                               {\r
-                                                               $scope.displyUserAppCatalogRoles = false;\r
-                                                               }\r
-                                               });\r
-                    apps.forEach(app => {\r
-                        if(app.name === this.selectedUser.headerText){\r
-                        //$log.debug('NewUserModalCtrl::getUserAppsRoles: app: id: ', app.id, 'name: ',app.name);\r
-                        // Keep track of which app has changed, so we know which apps to update using a BE API\r
-                        app.isChanged = false;\r
-                        // Each of these specifies a state, which corresponds to a different message and style that gets displayed\r
-                        app.isLoading = true;\r
-                        app.isError = false;\r
-                        app.isDeleted = false;\r
-                        app.printNoChanges = false;\r
-                        app.isUpdating = false;\r
-                        app.isErrorUpdating = false;\r
-                        app.isDoneUpdating = false;\r
-                        app.errorMessage = "";\r
-                        usersService.getUserAppRoles(app.id, this.selectedUser.attuid).promise().then((userAppRolesResult) => {\r
-                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: got a result for app: ',app.id,': ',app.name,': ',userAppRolesResult);\r
-                               app.appRoles = userAppRolesResult;\r
-                               app.isLoading = false;\r
-                        }).catch(err => {\r
-                            $log.error(err);\r
-                            app.isError = true;\r
-                            app.isLoading = false;\r
-                            app.errorMessage = err.headers('FEErrorString');\r
-                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: in new-user.controller: response header: '+err.headers('FEErrorString'));\r
-                        }).finally(()=>{\r
-                            this.numberAppsProcessed++;\r
-                            if (this.numberAppsProcessed === this.adminApps.length) {\r
-                                this.isLoading = false;\r
-                            }\r
-                        });\r
-                        }\r
-                    })\r
-                    return;\r
-                }).catch(err => {\r
-                    $log.error(err);\r
-                })\r
-\r
-            }\r
-           \r
-                       \r
-            /**\r
-             * Update the selected user apps with the new roles.\r
-             * If no roles remain, set the user to inactive.\r
-             */\r
-            this.updateUserAppsRoles = () => {\r
-                // $log.debug('NewUserModalCtrl::updateUserAppsRoles: entering updateUserAppsRoles');\r
-                if(!this.selectedUser || !this.selectedUser.attuid || !this.adminApps){\r
-                    $log.error('NewUserModalCtrl::updateUserAppsRoles: mmissing arguments');\r
-                    return;\r
-                }\r
-                this.isSaving = true;\r
-                confirmBoxService.makeUserAppRoleCatalogChanges('Are you sure you want to make these  changes?')\r
-                                            .then(confirmed => {\r
-                                               if(confirmed === true){\r
-                //$log.debug('NewUserModalCtrl::updateUserAppsRoles: going to update user: ' + this.selectedUser.attuid);\r
-                this.numberAppsProcessed = 0;\r
-                this.numberAppsSucceeded = 0;\r
-                this.adminApps.forEach(app => {\r
-                    if (app.isChanged) {\r
-                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have changed; going to update: id: ', app.id, '; name: ', app.name);\r
-                        app.isUpdating = true;\r
-                        var UserAppRolesRequest = {\r
-                               attuid: this.selectedUser.attuid,\r
-                               appId: app.id, \r
-                               appRoles: app.appRoles,\r
-                               appName: app.name\r
-                        };                 \r
-                        this.isSaving = true;\r
-                        $log.debug('going to update user: ' + this.selectedUser.attuid + ' with app roles: ' + JSON.stringify(this.adminAppsRoles));\r
-                                applicationsService.saveUserAppsRoles(UserAppRolesRequest).then(res => {\r
-                                        app.isUpdating = false;\r
-                                     $scope.closeThisDialog(true);\r
-                                }).catch(err => {\r
-                                    $log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);\r
-                                }).finally(()=> {\r
-                                    this.isSaving = false;\r
-                                })\r
-                       }\r
-                });\r
-                               }else{\r
-                                       this.isSaving = false;\r
-                                }\r
-                    \r
-\r
-           \r
-                });\r
-                \r
-            };\r
-\r
-            /**\r
-             * Navigate between dialog screens using step number: 1,2,...\r
-             */\r
-            this.navigateBack = () => {\r
-                if (this.dialogState === 1) {\r
-                    //back from 1st screen?\r
-                }\r
-                if (this.dialogState === 3) {\r
-                    this.dialogState = 1;\r
-                }\r
-            };\r
-\r
-            init();\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                //**Nabil - note: this will cause the history back state to be replaced with current state\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    NewCatalogModalCtrl.$inject = ['$scope', '$log', 'usersService', 'catalogService', 'applicationsService', 'confirmBoxService'];\r
-    angular.module('ecompApp').controller('NewCatalogModalCtrl', NewCatalogModalCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+(function () {
+    class NewCatalogModalCtrl {
+        constructor($scope, $log, usersService, catalogService, applicationsService, confirmBoxService) {
+            let init = () => {
+                //$log.info('NewUserModalCtrl::init');
+                this.isSaving = false;
+                this.adminApps =[];
+                this.appRoles = [];
+                $scope.userAppRoles = [];
+                $scope.titleText = "Request for Access in MyLogins:";
+                $scope.title ="Request is pending in MyLogins for the following Roles";
+                this.isGettingAdminApps = false;
+                if($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState){
+                    this.selectedUser = $scope.ngDialogData.selectedUser;
+                    this.dialogState = $scope.ngDialogData.dialogState;
+                    this.isShowBack = false;
+                    if(this.dialogState === 2){
+                        this.getUserAppsRoles();
+                    }
+                }
+            };
+
+            this.appChanged = (index) => {
+                let myApp = this.adminApps[index];
+                //$log.debug('NewUserModalCtrl::appChanged: index: ', index, '; app id: ', myApp.id, 'app name: ',myApp.name);
+                myApp.isChanged = true;
+                this.anyChanges = true;
+            }
+            
+            this.deleteApp = (app) => {
+                let appMessage = this.selectedUser.firstName + ' ' + this.selectedUser.lastName;
+                confirmBoxService.deleteItem(appMessage).then(isConfirmed => {
+                    if(isConfirmed){
+                        this.anyChanges = true;
+                        app.isChanged = true;
+                        app.isDeleted = true; // use this to hide the app in the display
+                        app.appRoles.forEach(function(role){
+                            role.isApplied = false;
+                        });
+                    }
+                }).catch(err => {
+                    $log.error('NewUserModalCtrl::deleteApp error: ',err);
+                    confirmBoxService.showInformation('There was a problem deleting the the applications. ' +
+                        'Please try again later. Error: ' + err.status).then(isConfirmed => {});
+                });
+            };
+      
+            this.getUserAppsRoles = () => {
+
+                //$log.debug('NewUserModalCtrl::getUserAppsRoles: about to call getAdminAppsSimpler');
+                this.isGettingAdminApps = true;
+                catalogService.getAppCatalog().then((apps) => {
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: beginning of then for getAdminAppsSimpler');
+                       
+                       this.isGettingAdminApps = false;
+                    if (!apps || !apps.length) {
+                        $log.error('NewUserModalCtrl::getUserApps error: no admin apps found');
+                        return null;
+                    }
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: then for getAdminAppsSimpler: step 2');
+                    //$log.debug('NewUserModalCtrl::getUserAppsRoles: admin apps: ', apps);
+                    
+                    this.dialogState = 2; 
+                    this.isLoading = true;
+                    this.adminApps = apps;
+                   
+                               catalogService.getuserAppRolesCatalog(this.selectedUser.headerText).then(
+                                               function(result) {
+                                                       // $log.debug('CatalogCtrl:storeSelection result is ', result);
+                                                       
+                                                       $scope.userAppRoles = result;
+                                                       $scope.displyUserAppCatalogRoles = true;
+                                                       if(result.length === 1 && result[0].requestedRoleId === null)
+                                                               {
+                                                               $scope.title= "Removal Request is pending in MyLogins";
+                                                               }
+                                                       
+                                                          if($scope.userAppRoles.length==0)
+                                                               {
+                                                               $scope.displyUserAppCatalogRoles = false;
+                                                               }
+                                               });
+                    apps.forEach(app => {
+                        if(app.name === this.selectedUser.headerText){
+                        //$log.debug('NewUserModalCtrl::getUserAppsRoles: app: id: ', app.id, 'name: ',app.name);
+                        // Keep track of which app has changed, so we know which apps to update using a BE API
+                        app.isChanged = false;
+                        // Each of these specifies a state, which corresponds to a different message and style that gets displayed
+                        app.isLoading = true;
+                        app.isError = false;
+                        app.isDeleted = false;
+                        app.printNoChanges = false;
+                        app.isUpdating = false;
+                        app.isErrorUpdating = false;
+                        app.isDoneUpdating = false;
+                        app.errorMessage = "";
+                        usersService.getUserAppRoles(app.id, this.selectedUser.attuid).promise().then((userAppRolesResult) => {
+                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: got a result for app: ',app.id,': ',app.name,': ',userAppRolesResult);
+                               app.appRoles = userAppRolesResult;
+                               app.isLoading = false;
+                        }).catch(err => {
+                            $log.error(err);
+                            app.isError = true;
+                            app.isLoading = false;
+                            app.errorMessage = err.headers('FEErrorString');
+                            //$log.debug('NewUserModalCtrl::getUserAppsRoles: in new-user.controller: response header: '+err.headers('FEErrorString'));
+                        }).finally(()=>{
+                            this.numberAppsProcessed++;
+                            if (this.numberAppsProcessed === this.adminApps.length) {
+                                this.isLoading = false;
+                            }
+                        });
+                        }
+                    })
+                    return;
+                }).catch(err => {
+                    $log.error(err);
+                })
+
+            }
+           
+                       
+            /**
+             * Update the selected user apps with the new roles.
+             * If no roles remain, set the user to inactive.
+             */
+            this.updateUserAppsRoles = () => {
+                // $log.debug('NewUserModalCtrl::updateUserAppsRoles: entering updateUserAppsRoles');
+                if(!this.selectedUser || !this.selectedUser.attuid || !this.adminApps){
+                    $log.error('NewUserModalCtrl::updateUserAppsRoles: mmissing arguments');
+                    return;
+                }
+                this.isSaving = true;
+                confirmBoxService.makeUserAppRoleCatalogChanges('Are you sure you want to make these  changes?')
+                                            .then(confirmed => {
+                                               if(confirmed === true){
+                //$log.debug('NewUserModalCtrl::updateUserAppsRoles: going to update user: ' + this.selectedUser.attuid);
+                this.numberAppsProcessed = 0;
+                this.numberAppsSucceeded = 0;
+                this.adminApps.forEach(app => {
+                    if (app.isChanged) {
+                        //$log.debug('NewUserModalCtrl::updateUserAppsRoles: app roles have changed; going to update: id: ', app.id, '; name: ', app.name);
+                        app.isUpdating = true;
+                        var UserAppRolesRequest = {
+                               attuid: this.selectedUser.attuid,
+                               appId: app.id, 
+                               appRoles: app.appRoles,
+                               appName: app.name
+                        };                 
+                        this.isSaving = true;
+                        $log.debug('going to update user: ' + this.selectedUser.attuid + ' with app roles: ' + JSON.stringify(this.adminAppsRoles));
+                                applicationsService.saveUserAppsRoles(UserAppRolesRequest).then(res => {
+                                        app.isUpdating = false;
+                                     $scope.closeThisDialog(true);
+                                }).catch(err => {
+                                    $log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err);
+                                }).finally(()=> {
+                                    this.isSaving = false;
+                                })
+                       }
+                });
+                               }else{
+                                       this.isSaving = false;
+                                }
+                    
+
+           
+                });
+                
+            };
+
+            /**
+             * Navigate between dialog screens using step number: 1,2,...
+             */
+            this.navigateBack = () => {
+                if (this.dialogState === 1) {
+                    //back from 1st screen?
+                }
+                if (this.dialogState === 3) {
+                    this.dialogState = 1;
+                }
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                //**Nabil - note: this will cause the history back state to be replaced with current state
+                e.preventDefault();
+            });
+        }
+    }
+    NewCatalogModalCtrl.$inject = ['$scope', '$log', 'usersService', 'catalogService', 'applicationsService', 'confirmBoxService'];
+    angular.module('ecompApp').controller('NewCatalogModalCtrl', NewCatalogModalCtrl);
+})();
index 1cf96f7..3578cc0 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="new-catalog-modal">\r
-\r
-       <div class="user-catalog-roles" ng-show="userInfo.dialogState===2">\r
-             <div >\r
-           <div class=display-userApp-Catalog-Roles >{{titleText}}</div>\r
-            <div class="title"\r
-                       ng-bind="userInfo.selectedUser.firstName + ' ' + userInfo.selectedUser.lastName + ' (' + userInfo.selectedUser.attuid + ')'"></div>\r
-     </div>\r
-               <div class="app-roles-main">\r
-\r
-                       <div class="app-catalog-roles-list">\r
-                               <div class="app-catalog-item" ng-repeat="app in userInfo.adminApps"\r
-                                       ng-if="app.name === userInfo.selectedUser.headerText"\r
-                                       id="app-name-{{app.name.split(' ').join('-')}}">\r
-                                       <div class="app-catalog-item-left"\r
-                                               id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name\r
-                                               | elipsis: 27}}</div>\r
-                                       <div class="app-catalog-item-right"\r
-                                               id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}"\r
-                                               ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating"\r
-                                               ng-if="userAppRoles.length===0">\r
-                                               <multiple-select id="app-roles" unique-data="{{$index}}"\r
-                                                       placeholder="Select roles" ng-model="app.appRoles"\r
-                                                       on-change="userInfo.appChanged($index)" name-attr="roleName"\r
-                                                       value-attr="isApplied"></multiple-select>\r
-                                       </div>\r
-\r
-                                       <div class="app-catalog-item-right"\r
-                                               id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}"\r
-                                               ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating"\r
-                                               ng-if="userAppRoles.length!==0">\r
-                                               <multiple-select2 id="app-roles" unique-data="{{$index}}"\r
-                                                       placeholder="Select roles" ng-model="app.appRoles"\r
-                                                       on-change="userInfo.appChanged($index)" name-attr="roleName"\r
-                                                       value-attr="isApplied"></multiple-select2>\r
-                                       </div>\r
-\r
-\r
-                                       <div id="app-item-no-contact" class="app-catalog-item-right-error"\r
-                                               ng-show="app.isError">{{app.errorMessage | elipsis: 35}}</div>\r
-                                       <div id="app-item-contacting"\r
-                                               class="app-catalog-item-right-contacting" ng-show="app.isLoading">Contacting\r
-                                               application...</div>\r
-                                       <div id="app-item-no-changes"\r
-                                               class="app-catalog-item-right-contacting" ng-show="app.noChanges">No\r
-                                               changes</div>\r
-                                       <div id="app-item-no-updating"\r
-                                               class="app-catalog-item-right-contacting" ng-show="app.isUpdating">Updating\r
-                                               application...</div>\r
-                                       <div id="app-item-done-updating"\r
-                                               class="app-catalog-item-right-contacting"\r
-                                               ng-show="app.isDoneUpdating">Finished updating application</div>\r
-                                       <div id="app-item-cannot-update"\r
-                                               class="app-catalog-item-right-error" ng-show="app.isErrorUpdating">Could\r
-                                               not update application...</div>\r
-                                       <div id='ecomp-small-spinner' class="ecomp-small-spinner"\r
-                                               ng-show="app.isLoading"></div>\r
-                               </div>\r
-\r
-                               &nbsp;\r
-\r
-                               <div class="usr-app-roles" ng-show=displyUserAppCatalogRoles>\r
-                                       <div class="userApp-Catalog-Roles-label">{{title}}</div>\r
-                                       &nbsp;\r
-                                       <div class="display-userApp-Catalog-Roles-value"\r
-                                               style="height: 150px; width: 200px; overflow-y: auto;">\r
-                                               <div ng-repeat="getUserApplicationRole in userAppRoles">\r
-\r
-                                                       <div class="userAppCatalog-lbl-value">\r
-                                                               <span class="userAppCatalog-lbl-value-spn">\r
-                                                                       {{getUserApplicationRole.rolename}}</span>\r
-                                                       </div>\r
-\r
-                                               </div>\r
-                                       </div>\r
-\r
-                               </div>\r
-                       </div>\r
-\r
-                       <div class="dialog-control">\r
-                               <span id="ecomp-save-spinner" class="ecomp-save-spinner"\r
-                                       ng-show="userInfo.isSaving || userInfo.isGettingAdminApps"></span>\r
-                               <button id="new-user-next-button" class="next-button"\r
-                                       ng-click="userInfo.updateUserAppsRoles()"\r
-                                       ng-disabled="(!userInfo.anyChanges == true)">Submit</button>\r
-                               <div id="new-user-cancel-button" class="cancel-button"\r
-                                       ng-click="closeThisDialog()">Cancel</div>\r
-                       </div>\r
-\r
-               </div>\r
-\r
-       </div>\r
-\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="new-catalog-modal">
+
+       <div class="user-catalog-roles" ng-show="userInfo.dialogState===2">
+             <div >
+           <div class=display-userApp-Catalog-Roles >{{titleText}}</div>
+            <div class="title"
+                       ng-bind="userInfo.selectedUser.firstName + ' ' + userInfo.selectedUser.lastName + ' (' + userInfo.selectedUser.attuid + ')'"></div>
+     </div>
+               <div class="app-roles-main">
+
+                       <div class="app-catalog-roles-list">
+                               <div class="app-catalog-item" ng-repeat="app in userInfo.adminApps"
+                                       ng-if="app.name === userInfo.selectedUser.headerText"
+                                       id="app-name-{{app.name.split(' ').join('-')}}">
+                                       <div class="app-catalog-item-left"
+                                               id="div-app-name-{{app.name.split(' ').join('-')}}">{{app.name
+                                               | elipsis: 27}}</div>
+                                       <div class="app-catalog-item-right"
+                                               id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}"
+                                               ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating"
+                                               ng-if="userAppRoles.length===0">
+                                               <multiple-select id="app-roles" unique-data="{{$index}}"
+                                                       placeholder="Select roles" ng-model="app.appRoles"
+                                                       on-change="userInfo.appChanged($index)" name-attr="roleName"
+                                                       value-attr="isApplied"></multiple-select>
+                                       </div>
+
+                                       <div class="app-catalog-item-right"
+                                               id="div-app-name-dropdown-{{app.name.split(' ').join('-')}}"
+                                               ng-show="!app.isError && !app.isLoading && !app.noChanges && !app.isUpdating && !app.isDoneUpdating && !app.isErrorUpdating"
+                                               ng-if="userAppRoles.length!==0">
+                                               <multiple-select2 id="app-roles" unique-data="{{$index}}"
+                                                       placeholder="Select roles" ng-model="app.appRoles"
+                                                       on-change="userInfo.appChanged($index)" name-attr="roleName"
+                                                       value-attr="isApplied"></multiple-select2>
+                                       </div>
+
+
+                                       <div id="app-item-no-contact" class="app-catalog-item-right-error"
+                                               ng-show="app.isError">{{app.errorMessage | elipsis: 35}}</div>
+                                       <div id="app-item-contacting"
+                                               class="app-catalog-item-right-contacting" ng-show="app.isLoading">Contacting
+                                               application...</div>
+                                       <div id="app-item-no-changes"
+                                               class="app-catalog-item-right-contacting" ng-show="app.noChanges">No
+                                               changes</div>
+                                       <div id="app-item-no-updating"
+                                               class="app-catalog-item-right-contacting" ng-show="app.isUpdating">Updating
+                                               application...</div>
+                                       <div id="app-item-done-updating"
+                                               class="app-catalog-item-right-contacting"
+                                               ng-show="app.isDoneUpdating">Finished updating application</div>
+                                       <div id="app-item-cannot-update"
+                                               class="app-catalog-item-right-error" ng-show="app.isErrorUpdating">Could
+                                               not update application...</div>
+                                       <div id='ecomp-small-spinner' class="ecomp-small-spinner"
+                                               ng-show="app.isLoading"></div>
+                               </div>
+
+                               &nbsp;
+
+                               <div class="usr-app-roles" ng-show=displyUserAppCatalogRoles>
+                                       <div class="userApp-Catalog-Roles-label">{{title}}</div>
+                                       &nbsp;
+                                       <div class="display-userApp-Catalog-Roles-value"
+                                               style="height: 150px; width: 200px; overflow-y: auto;">
+                                               <div ng-repeat="getUserApplicationRole in userAppRoles">
+
+                                                       <div class="userAppCatalog-lbl-value">
+                                                               <span class="userAppCatalog-lbl-value-spn">
+                                                                       {{getUserApplicationRole.rolename}}</span>
+                                                       </div>
+
+                                               </div>
+                                       </div>
+
+                               </div>
+                       </div>
+
+                       <div class="dialog-control">
+                               <span id="ecomp-save-spinner" class="ecomp-save-spinner"
+                                       ng-show="userInfo.isSaving || userInfo.isGettingAdminApps"></span>
+                               <button id="new-user-next-button" class="next-button"
+                                       ng-click="userInfo.updateUserAppsRoles()"
+                                       ng-disabled="(!userInfo.anyChanges == true)">Submit</button>
+                               <div id="new-user-cancel-button" class="cancel-button"
+                                       ng-click="closeThisDialog()">Cancel</div>
+                       </div>
+
+               </div>
+
+       </div>
+
+</div>
diff --git a/ecomp-portal-FE-os/client/src/views/dashboard/dashboard-extension.tpl.html b/ecomp-portal-FE-os/client/src/views/dashboard/dashboard-extension.tpl.html
new file mode 100644 (file)
index 0000000..aae5519
--- /dev/null
@@ -0,0 +1 @@
+<!-- This is a dummy placeholder  -->
\ No newline at end of file
diff --git a/ecomp-portal-FE-os/client/src/views/dashboard/dashboard.tpl.html b/ecomp-portal-FE-os/client/src/views/dashboard/dashboard.tpl.html
deleted file mode 100644 (file)
index cf5c2ee..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-dashboard-home" id="widgets">\r
-       <div class="dashboard-home-container" id="page-content">\r
-               <div align="center" id="errorInfo"\r
-                       style="display: none; font-size: 12px; margin-left: 5px">\r
-                       <span style="color: red">You don't have a user account in that\r
-                               application. Please ask the system administrator. </span>\r
-               </div>\r
-               <div class="portals-list" style="margin-bottom: 0px;">\r
-                       <div>\r
-                               <div class="simulateGridHeader">\r
-                                       <span class="simulateGridHeaderTitle">Applications <span\r
-                                               class="dashboardSortHeader">Sort by:</span></span>\r
-                                               \r
-                                               <div style="float: right; margin-right:7px; margin-top:5px">\r
-                                               <select id="sort-by-{{selectedSortType.value}}" name="dropdown1" b2b-dropdown  ng-model="selectedSortType.value" ng-change="selectedSortTypeChanged(selectedSortType.value)">  \r
-                                       <option b2b-dropdown-list option-repeat="d in sort_options" value="{{d.value}}">{{d.title}}</option>\r
-                                               </select>\r
-                                               </div>\r
-                                               \r
-                               </div>\r
-                               <div class="dashboard-boarder">\r
-                                       <div class="gridster-container override_background">\r
-                                               <div ng-if="appsViewData.length==0">\r
-                                                       <div class="app-error-block">\r
-                                                               <i class="icon-information full-linear-icon-information"\r
-                                                                       style="margin-left: 50%; font-size: 90px; color: black"></i> <br>\r
-                                                               <div class="activity-error-msg1">\r
-                                                                       You do not have access to any application or function in ECOMP\r
-                                                                       Portal.\r
-                                                               </div>\r
-                                                       </div>\r
-                                               </div>\r
-\r
-                                               <div ng-if="appsViewData.length>0" id="page-content"\r
-                                                       class="content" gridster="dashboard.gridsterAppOpts">\r
-                                                       <ul>\r
-                                                               <li gridster-item="item" ng-repeat="item in appsViewData">\r
-                                                                       <div class="gridster-box" ng-if="item.addRemoveApps == null">\r
-                                                                               <div class="gridster-box-header">\r
-                                                                                       <i class="icon-content-gridguide"></i>\r
-                                                                                       <h3 style="cursor: context-menu">{{item.headerText |\r
-                                                                                               elipsis: 14}}</h3>\r
-                                                                               </div>\r
-                                                                               <div class="gridster-box-content"\r
-                                                                                       ng-style="{'cursor':'pointer',\r
-                                                                                       'background-image': 'url('+(item.imageLink)+')',\r
-                                                                                       'background-color':'white',\r
-                                                                                       'background-repeat': 'no-repeat',\r
-                                                                                       'background-size': '170px 130px'}"\r
-                                                                                       ng-click="dashboard.goToPortal(item);dashboard.auditLog(item)"\r
-                                                                                       ng-hide="users.isLoadingTable && !users.getUserAppsIsDone">\r
-                                                                               </div>\r
-                                                                       </div>\r
-                                                                       <div class="gridster-box" ng-if="item.addRemoveApps">\r
-                                                                               <div class="gridster-box-header" style="cursor: pointer;"\r
-                                                                                       ng-click="dashboard.goToCatalog()">\r
-                                                                                       <i class="icon-content-gridguide"></i>\r
-                                                                                       <h3>Select applications...</h3>\r
-\r
-                                                                               </div>\r
-                                                                               <div class="gridster-box-content"\r
-                                                                                       ng-style="{'cursor':'pointer',\r
-                                                                               'order': item.order, \r
-                                                                               'text-align': 'center',\r
-                                                                               'background-color':'white',\r
-                                                                               'background-repeat': 'no-repeat',\r
-                                                                               'background-size': '170px 130px',\r
-                                                                               'padding': '4px',\r
-                                                                               'opacity': '1'}"\r
-                                                                                       ng-click="dashboard.goToCatalog()" class="gridsterContent">\r
-                                                                                       <label style="font-size: 12px;">Click\r
-                                                                                               here to personalize <br> this applications page\r
-                                                                                       </label> <i class="icon-controls-add-maximize"\r
-                                                                                               style="font-size: 80px; color: #067ab4"></i>\r
-                                                                               </div>\r
-                                                                       </div>\r
-                                                               </li>\r
-                                                       </ul>\r
-                                               </div>\r
-\r
-                                       </div>\r
-\r
-                               </div>\r
-                       </div>\r
-\r
-                       <br> <br>\r
-\r
-\r
-                       <div \r
-                               ng-show=dashboard.isCommError>Failed to communicate with the\r
-                               widget microservice.</div>\r
-                       \r
-                       <div id="widget-boarder" class="content" gridster="dashboard.gridsterWidgetOpts">\r
-                               <ul>\r
-                                       <li gridster-item="widget" ng-repeat="widget in widgetsViewData">\r
-                                               <div class="box">\r
-                                                       <div class="box-header">\r
-                                                       <i style="cursor:move;" class="icon-content-gridguide"></i>\r
-                                                               <h3>{{ widget.headerText}}</h3>\r
-                                                               <div class="box-header-btns pull-right"\r
-                                                                       ng-if="isAdminPortalAdmin == true" class="ng-scope"\r
-                                                                               ng-show="widget.widgetIdentifier != ''">\r
-                                                                               <a id="widgetHeaderBtns"\r
-                                                                                       class="widgetHeaderBtn widgetHeaderBtnPosition singleBtnBorder"\r
-                                                                                       ng-class="singleBtnBorder" alt="Settings"\r
-                                                                                       ng-mousedown="showImpResOption=!showImpResOption"\r
-                                                                                       ng-mouseleave="showImpResOption=false" title="Settings"\r
-                                                                                       ddh-accessibility-click="13,32" tabindex="0"><span\r
-                                                                                       style="color: #888;"><img\r
-                                                                                       ng-src="assets/images/generic.png"\r
-                                                                                       style="margin-bottom: 3px; margin-left: 3px;" alt="..."\r
-                                                                                       aria-label="Tap or Click to move"\r
-                                                                                       src="assets/images/generic.png"></span></a>\r
-\r
-                                                                               <ul class="optionsMenu"\r
-                                                                                       style="max-width: 130px; height: 32px; display: block"\r
-                                                                                       ng-show="showImpResOption"\r
-                                                                                       ng-mouseenter="showImpResOption=true"\r
-                                                                                       ng-mouseleave="showImpResOption=false">\r
-                                                                                       <!-- ngIf: widget.duplicateAllowed -->\r
-                                                                                       <li\r
-                                                                                               ng-click="editWidgetModalPopup(importResData, widget.widgetIdentifier);">\r
-                                                                                               <a class="optionsMenuLink" href="javascript:void(0)"\r
-                                                                                               ddh-accessibility-click="13,32">Edit</a>\r
-                                                                                       </li>\r
-                                                                                       <!-- end ngIf: widget.duplicateAllowed  -->\r
-                                                                               </ul>\r
-\r
-                                                               </div>\r
-                                                       </div>\r
-                                                       <div class="box-content">\r
-                                                       <div  dyn-attr="widget.attrb"></div>\r
-                                                       </div>\r
-                                               </div>\r
-                                       </li>\r
-                               </ul>\r
-                       </div>\r
-                       <div></div>\r
-                       <div class="gridster-container override_background">\r
-                               <div id="dashboardAddWidgetPreference"\r
-                                       ng-style="{'cursor':'pointer'}"\r
-                                       ng-click="dashboard.goToWidgetCatLog()">\r
-                                       <i class="icon-controls-add-maximize"></i> Add Widget\r
-                               </div>\r
-                               &nbsp;\r
-                               <div id="dashboardDefaultPreference" ng-style="{'cursor':'pointer'}"\r
-                                       ng-click="restoreSortSelected()">\r
-                                       <i class="icon-arrows-replay-restart"></i> Reset Widget Layout\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-\r
-       </div>\r
-</div>\r
index 34d3d96..5db3ed0 100644 (file)
@@ -1,48 +1,48 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class FooterCtrl {\r
-        constructor($scope, $rootScope, manifestService, $log) {\r
-            this.manifestService = manifestService;\r
-            this.$log = $log;\r
-            this.$scope = $scope;\r
-            this.$rootScope = $rootScope;\r
-\r
-            $scope.buildinfo = null;\r
-\r
-            $rootScope.showFooter = true;\r
-            $scope.date = new Date();\r
-\r
-                   \r
-            manifestService.getManifest().then( jsonObj => {\r
-                // $log.debug('FooterCtrl.getManifest: ', JSON.stringify(jsonObj));\r
-                $scope.buildInfo = jsonObj;\r
-\r
-                }).catch(err=> {\r
-                    $log.error('FooterCtrl::updateTableData error :',err);\r
-                });\r
-            };\r
-\r
-        }\r
-\r
-    FooterCtrl.$inject = ['$scope', '$rootScope', 'manifestService', '$log'];\r
-    angular.module('ecompApp').controller('FooterCtrl', FooterCtrl);\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class FooterCtrl {
+        constructor($scope, $rootScope, manifestService, $log) {
+            this.manifestService = manifestService;
+            this.$log = $log;
+            this.$scope = $scope;
+            this.$rootScope = $rootScope;
+
+            $scope.buildinfo = null;
+
+            $rootScope.showFooter = true;
+            $scope.date = new Date();
+
+                   
+            manifestService.getManifest().then( jsonObj => {
+                // $log.debug('FooterCtrl.getManifest: ', JSON.stringify(jsonObj));
+                $scope.buildInfo = jsonObj;
+
+                }).catch(err=> {
+                    $log.error('FooterCtrl::updateTableData error :',err);
+                });
+            };
+
+        }
+
+    FooterCtrl.$inject = ['$scope', '$rootScope', 'manifestService', '$log'];
+    angular.module('ecompApp').controller('FooterCtrl', FooterCtrl);
+})();
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 59c8622..0004b02 100644 (file)
-.w-ecomp-footer {\r
-    z-index: 101;\r
-    background-color: #222;\r
-    position: absolute;\r
-    bottom: 0;\r
-    width: 100%;\r
-    height: @footer-height;\r
-    .white12r;\r
-\r
-    a {\r
-        .white12r;\r
-        font-family: Arial;\r
-        font-size: 11px;\r
-    }\r
-\r
-    .footer-image {\r
-        margin: auto;\r
-\r
-    }\r
-\r
-    .build-number {\r
-        float: right;\r
-        padding: 5px;\r
-    }\r
-    .footer-content {\r
-        align-items: center;\r
-        text-align: center;\r
-        vertical-align: middle;\r
-        display: flex;\r
-        justify-content: center;\r
-        //width: @table-width;\r
-        margin: auto;\r
-\r
-    }\r
-       \r
-    [class*="icon-primary-"], .cssIcon-globe:before {\r
-           color: #0574ac;\r
-           display: inline-block;\r
-           font-family: 'icoPrimary' !important;\r
-           font-style: normal;\r
-           font-size: 20px;\r
-           font-weight: normal;\r
-           font-variant: normal;\r
-           height: 1em;\r
-           margin-right: 7px;\r
-           text-transform: none;\r
-           line-height: 1;\r
-           -webkit-font-smoothing: antialiased;\r
-           -moz-osx-font-smoothing: grayscale;\r
-           position: relative;\r
-           speak: none;\r
-           -webkit-user-select: none;\r
-           -moz-user-select: none;\r
-           -ms-user-select: none;\r
-           user-select: none;\r
-           vertical-align: middle;\r
-           width: 1em;\r
-       }\r
-\r
-       .footer-logo {\r
-               color: #000 !important;\r
-       }\r
-       .footerWrapper .footer-logo .logo-title {\r
-           color: #fff;\r
-           margin-left: 10px;\r
-           display: inline-block;\r
-           font-size: 25px;\r
-           margin-top: 0px;\r
-           font-family: Arial;\r
-               font-weight: normal;\r
-       }\r
-       .displayInline {\r
-               display: inline-block;\r
-               margin-left: 20px; \r
-               margin-top: 20px;\r
-       }\r
-       .footerWrapper .copyright-text {\r
-           color: #fff; \r
-           font-size: 11px;\r
-           font-family: Arial;\r
-           margin-bottom:0px; \r
-           margin-top: 15px; \r
-           line-height: 1rem; \r
-           margin-top: 20px;\r
-           margin-left: 100px;\r
-       }\r
-       .footerText {\r
-               width: 59%;\r
-               float: left;\r
-               text-align: left;\r
-               margin-left: 50px;\r
-       }\r
-       .footerLastSection {\r
-               width: 1200px;\r
-               margin: auto;\r
-       }\r
-       .build-number{\r
-               margin-top:-14px; \r
-               margin-right: -195px;\r
-       }\r
-       .footer-link{\r
-               text-decoration: underline;\r
-       }\r
-}\r
+.w-ecomp-footer {
+    z-index: 101;
+    background-color: #222;
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    height: @footer-height;
+    .white12r;
+
+    a {
+        .white12r;
+        font-family: Arial;
+        font-size: 11px;
+    }
+
+    .footer-image {
+        margin: auto;
+
+    }
+
+    .build-number {
+        float: right;
+        padding: 5px;
+    }
+    .footer-content {
+        align-items: center;
+        text-align: center;
+        vertical-align: middle;
+        display: flex;
+        justify-content: center;
+        //width: @table-width;
+        margin: auto;
+
+    }
+       
+    [class*="icon-primary-"], .cssIcon-globe:before {
+           color: #0574ac;
+           display: inline-block;
+           font-family: 'icoPrimary' !important;
+           font-style: normal;
+           font-size: 20px;
+           font-weight: normal;
+           font-variant: normal;
+           height: 1em;
+           margin-right: 7px;
+           text-transform: none;
+           line-height: 1;
+           -webkit-font-smoothing: antialiased;
+           -moz-osx-font-smoothing: grayscale;
+           position: relative;
+           speak: none;
+           -webkit-user-select: none;
+           -moz-user-select: none;
+           -ms-user-select: none;
+           user-select: none;
+           vertical-align: middle;
+           width: 1em;
+       }
+
+       .footer-logo {
+               color: #000 !important;
+       }
+       .footerWrapper .footer-logo .logo-title {
+           color: #fff;
+           margin-left: 10px;
+           display: inline-block;
+           font-size: 25px;
+           margin-top: 0px;
+           font-family: Arial;
+               font-weight: normal;
+       }
+       .displayInline {
+               display: inline-block;
+               margin-left: 20px; 
+               margin-top: 20px;
+       }
+       .footerWrapper .copyright-text {
+           color: #fff; 
+           font-size: 11px;
+           font-family: Arial;
+           margin-bottom:0px; 
+           margin-top: 15px; 
+           line-height: 1rem; 
+           margin-top: 20px;
+           margin-left: 100px;
+       }
+       .footerText {
+               width: 59%;
+               float: left;
+               text-align: left;
+               margin-left: 50px;
+       }
+       .footerLastSection {
+               width: 1200px;
+               margin: auto;
+       }
+       .build-number{
+               margin-top:-14px; 
+               margin-right: -195px;
+       }
+       .footer-link{
+               text-decoration: underline;
+       }
+}
index a6fbdee..37148ab 100644 (file)
@@ -1,34 +1,34 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="w-ecomp-footer" id="w-ecomp-footer" ng-style="{height: tabBottom}">\r
-    <div id="footer" class="footer-content">\r
-        <div id="footer-wrapper" class="footerWrapper" id="footerWrapper">\r
-                       <div id="footer-info" class="attFooterInfo" style="text-align: center;">\r
-                               <div id="footer-last-section" class="footerLastSection">\r
-                                       <div id="footer-text"  class="footerText">\r
-                                                       OpenECOMP Portal Version {{buildInfo.manifest['Build-Number']}}.\r
-                               </div>  \r
-                               <div id="display-inline"  class="displayInline">\r
-                                        </div>\r
-                               </div>\r
-                       </div>\r
-               </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="w-ecomp-footer" id="w-ecomp-footer" ng-style="{height: tabBottom}">
+    <div id="footer" class="footer-content">
+        <div id="footer-wrapper" class="footerWrapper" id="footerWrapper">
+                       <div id="footer-info" class="attFooterInfo" style="text-align: center;">
+                               <div id="footer-last-section" class="footerLastSection">
+                                       <div id="footer-text"  class="footerText">
+                                                       OpenECOMP Portal Version {{buildInfo.manifest['Manifest-Version']}}.
+                               </div>  
+                               <div id="display-inline"  class="displayInline">
+                                        </div>
+                               </div>
+                       </div>
+               </div>
+    </div>
+</div>
index 09a8e75..140aea9 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-/**\r
- * Created by nnaffar on 12/20/15.\r
- */\r
-'use strict';\r
-(function () {\r
-    class MenuDetailsModalCtrl {\r
-        constructor($scope, $log, functionalMenuService, errorMessageByCode, ECOMP_URL_REGEX,$rootScope,confirmBoxService) {\r
-\r
-\r
-            let newMenuModel = {\r
-                name: null,\r
-                menuId: null,\r
-                parentMenuId: null,\r
-                url: null\r
-            };\r
-\r
-            let getAvailableRoles = (appid) => {\r
-                this.isSaving = true;\r
-                if (appid != null) {\r
-                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: About to call getManagedRolesMenu");\r
-                    functionalMenuService.getManagedRolesMenu(appid).then(rolesObj => {\r
-                        $log.debug("MenuDetailsModalCtrl::getAvailableRoles: Roles returned = " + JSON.stringify(rolesObj))\r
-                        this.availableRoles = rolesObj;\r
-                        this.preSelectedRoles = {roles:[]};\r
-\r
-                        if(($scope.ngDialogData.source==='edit') && this.isMidLevelMenuItem()){\r
-                            // in Edit flow , for Midlevel menu item no need to preSelect.\r
-                            this.preSelectedRoles = {roles:[]};\r
-                        }else if(!angular.isUndefined(this.menuItem.menuDetails) &&\r
-                            $scope.ngDialogData.source==='edit' && this.isLeafMenuItem() &&\r
-                            this.menuItem.menuDetails.appid!=appid) {\r
-                            // in Edit flow , for LeafMenuItem, if appid changed then no need to preSelect.\r
-                            this.preSelectedRoles = {roles:[]};\r
-                        }else{\r
-                            if((!angular.isUndefined(this.menuItem.menuDetails)) &&\r
-                                (!angular.isUndefined(this.menuItem.menuDetails.roles))){\r
-                                    $log.debug('menuDetails.roles: ' + this.menuItem.menuDetails.roles);\r
-                                    for(var i=0; i<this.menuItem.menuDetails.roles.length; i++){\r
-                                        var role = {"roleId":this.menuItem.menuDetails.roles[i]};\r
-                                        $log.debug('MenuDetailsModalCtrl::getAvailableRoles: adding role to preselected: ' + i + ': ' + JSON.stringify(role));\r
-                                        this.preSelectedRoles.roles.push(role);\r
-                                    }\r
-                            }\r
-                        }\r
-                        $rootScope.$broadcast('availableRolesReady');\r
-                        this.isSaving = false;\r
-                    }).catch(err => {\r
-                        $log.error("MenuDetailsModalCtrl::getAvailableRoles: error: " + err);\r
-                    });\r
-                } else {\r
-                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: appid was null");\r
-                }\r
-            };\r
-\r
-            let getAvailableApps = () => {\r
-                functionalMenuService.getAvailableApplications().then(apps => {\r
-                    $log.debug("MenuDetailsModalCtrl::getAvailableApps: Apps returned = " + JSON.stringify(apps))\r
-                    this.availableApps = apps;\r
-                    // Keep track of whether or not the selected app is disabled\r
-                    if (angular.isDefined(this.selectedApp) && angular.isDefined(this.selectedApp.index)) {\r
-                        for (var i = 0; i < apps.length; i++) {\r
-                            if (apps[i].index === this.selectedApp.index) {\r
-                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: found app with index: " + this.selectedApp.index);\r
-                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: setting isDisabled to: " + !apps[i].enabled);\r
-                                this.selectedApp.isDisabled = !apps[i].enabled;\r
-                                break;\r
-                            }\r
-                        }\r
-                        $log.debug("didn't find index: " + this.selectedApp.index);\r
-                    }\r
-                })['catch'](function (err) {\r
-                    confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +\r
-                        'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});\r
-                    $log.error("MenuDetailsModalCtrl::getAvailableApps: getAvailableApps error: " + err);\r
-                }).finally(()=>{\r
-                    this.isSaving = false;\r
-                });\r
-            };\r
-\r
-            let init = () => {\r
-                $log.info('MenuDetailsModalCtrl::init');\r
-                this.saveOrContinueBtnText = "Save";\r
-                this.isSaving = false;\r
-                this.displayRoles = $scope.ngDialogData.source==='view' ? true : false;\r
-                this.formEditable = $scope.ngDialogData.source==='view' ? false : true;\r
-                this.selectedRole = [];\r
-                this.availableRoles = [];\r
-                this.menuItem = _.clone($scope.ngDialogData.menuItem);\r
-                $log.info('MenuDetailsModalCtrl::getAvailableApps: Within init, about to check menuDetails for defined');\r
-                if(!angular.isUndefined(this.menuItem.menuDetails) &&\r
-                    ($scope.ngDialogData.source==='view' ||\r
-                    ($scope.ngDialogData.source==='edit') && this.isLeafMenuItem() )){\r
-\r
-                    $log.debug("MenuDetailsModalCtrl::init: menuItem: ");\r
-                    $log.debug('MenuDetailsModalCtrl::init: ',this.menuItem);\r
-                    this.menuItem.menu.url = this.menuItem.menuDetails.url;\r
-                    this.selectedApp={};\r
-                    this.selectedApp.index = this.menuItem.menuDetails.appid;\r
-                    getAvailableRoles(this.selectedApp.index);\r
-\r
-                }\r
-\r
-                if($scope.ngDialogData.source==='view' || $scope.ngDialogData.source==='edit'){\r
-                    this.menutitle = this.menuItem.menu.name;\r
-                    this.menuLocation = this.isParentMenuItem() ? this.menuItem.menu.name : this.menuItem.menu.parent.name;\r
-                }else{\r
-                    this.menutitle = '';\r
-                    this.menuLocation = this.menuItem.menu.name;\r
-                }\r
-                // Temporarily passing 0 as dummy for getAvailableRoles incase of this.selectedApp is not there i.e., in Add flow\r
-                //  getAvailableRoles(angular.isUndefined(this.selectedApp) ? 0: this.selectedApp.index );\r
-                getAvailableApps();\r
-                $log.debug("MenuDetailsModalCtrl::init: Menu details: " +  JSON.stringify(this.menuItem.menuDetails));\r
-            };\r
-\r
-\r
-            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;\r
-\r
-            //This part handles conflict errors (409)\r
-            this.conflictMessages = {};\r
-            this.scrollApi = {};\r
-            let handleConflictErrors = err => {\r
-                if(!err.data){\r
-                    return;\r
-                }\r
-                if(!err.data.length){ //support objects\r
-                    err.data = [err.data]\r
-                }\r
-                $log.debug('MenuDetailsModalCtrl::handleConflictErrors: err.data = ' + JSON.stringify(err.data));\r
-                _.forEach(err.data, item => {\r
-                    _.forEach(item.fields, field => {\r
-                        //set conflict message\r
-                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];\r
-                        //set field as invalid\r
-                        $log.debug('MenuDetailsModalCtrl::handleConflictErrors: fieldName = ' + field.name);\r
-                        $scope.functionalMenuForm[field.name].$setValidity('conflict', false);\r
-                        //set watch once to clear error after user correction\r
-                        watchOnce[field.name]();\r
-                    });\r
-                });\r
-                this.scrollApi.scrollTop();\r
-            };\r
-\r
-            let resetConflict = fieldName => {\r
-                delete this.conflictMessages[fieldName];\r
-                $log.debug('MenuDetailsModalCtrl::resetConflict: $setValidity(true) = ' + fieldName);\r
-                if($scope.functionalMenuForm[fieldName]){\r
-                    $scope.functionalMenuForm[fieldName].$setValidity('conflict', true);\r
-                }\r
-            };\r
-\r
-            let watchOnce = {\r
-                text: () => {\r
-                    let unregisterName = $scope.$watch('functionalMenuDetails.menutitle', (newVal, oldVal) => {\r
-                        // $log.debug('title:: newVal, oldVal = ' + newVal.toLowerCase() + " | " + oldVal.toLowerCase());\r
-                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){\r
-                            resetConflict('text');\r
-                            unregisterName();\r
-                        }\r
-                    });\r
-                },\r
-                url: () => {\r
-                    let unregisterUrl = $scope.$watch('functionalMenuDetails.menuItem.menu.url', (newVal, oldVal) => {\r
-                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){\r
-                            resetConflict('url');\r
-                            unregisterUrl();\r
-                        }\r
-                    });\r
-                }\r
-            };\r
-\r
-            //***************************\r
-\r
-            this.isLeafMenuItem = () => {\r
-                return this.menuItem.menu.children.length>0 ? false : true;\r
-            };\r
-\r
-            this.isMidLevelMenuItem = () => {\r
-                return this.menuItem.menu.parentMenuId!=null && this.menuItem.menu.children.length>0 ? true : false;\r
-            };\r
-\r
-            this.isParentMenuItem = () => {\r
-                return this.menuItem.menu.parentMenuId!=null ? false : true;\r
-            };\r
-\r
-            this.updateSelectedApp = (appItem) => {\r
-                if (!appItem) {\r
-                    return;\r
-                }\r
-                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: drop down app item = ' + JSON.stringify(appItem.index));\r
-                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: appItem in updateSelectedApp: ");\r
-                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: ',appItem);\r
-                this.selectedApp.isDisabled = ! appItem.enabled;\r
-                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: isDisabled: "+this.selectedApp.isDisabled);\r
-                getAvailableRoles(appItem.index);\r
-            };\r
-\r
-            this.continue = () => {\r
-                this.displayRoles = true;\r
-                this.formEditable = false;\r
-            };\r
-\r
-            this.saveChanges = () => {\r
-\r
-                //todo : form validation was commented as dialog message is kept for error validations\r
-                /*if($scope.functionalMenuForm.$invalid){\r
-                 return;\r
-                 }*/\r
-\r
-                if(!!this.menuItem.menu.url && (angular.isUndefined(this.selectedApp) || !this.selectedApp.index>0)) {\r
-                    confirmBoxService.showInformation('Please select the appropriate app, or remove the url').then(isConfirmed => {});\r
-                    return;\r
-                }else if(!this.menuItem.menu.url && !angular.isUndefined(this.selectedApp) && this.selectedApp.index>0){\r
-                    confirmBoxService.showInformation('Please enter url, or select "No Application"').then(isConfirmed => {});\r
-                    return;\r
-                }else if(!this.menutitle){\r
-                    confirmBoxService.showInformation('Please enter the Menu title').then(isConfirmed => {});\r
-                    return;\r
-                }\r
-\r
-                this.isSaving = true;\r
-                var activeMenuItem = {};\r
-\r
-                if ($scope.ngDialogData.source === 'edit') {     // Edit Menu Item\r
-                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving an edit menu item');\r
-                    activeMenuItem = {\r
-                        menuId:this.menuItem.menu.menuId,\r
-                        column:this.menuItem.menu.column,\r
-                        text:this.menutitle,\r
-                        parentMenuId:this.menuItem.menu.parentMenuId,\r
-                        url:this.menuItem.menu.url,\r
-                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,\r
-                        roles:this.selectedRole\r
-                    };\r
-                    // If we have removed the url and appid, we must remove the roles\r
-                    if (!activeMenuItem.appid && !activeMenuItem.url) {\r
-                        activeMenuItem.roles = null;\r
-                    }\r
-                    functionalMenuService.saveEditedMenuItem(activeMenuItem)\r
-                        .then(() => {\r
-                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');\r
-                            $scope.closeThisDialog(true);\r
-                        }).catch(err => {\r
-                        if(err.status === 409){//Conflict\r
-                            handleConflictErrors(err);\r
-                        } else {\r
-                            confirmBoxService.showInformation('There was a problem saving your change. ' +\r
-                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});\r
-                        }\r
-                        $log.error('MenuDetailsModalCtrl::saveChanges: error - ',err);\r
-                    }).finally(()=>{\r
-                        this.isSaving = false;\r
-                    });\r
-\r
-                    $log.debug("MenuDetailsModalCtrl::saveChanges: Edit Menu output will be: " + JSON.stringify(activeMenuItem));\r
-                } else {   // New Menu Item\r
-                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving a New menu item');\r
-                    var newMenuItem = {\r
-                        menuId:null, // this is a new menu item\r
-                        column:this.menuItem.menu.column,\r
-                        text:this.menutitle,\r
-                        // We are creating this new menu item under the menu item that was clicked on.\r
-                        parentMenuId:this.menuItem.menu.menuId,\r
-                        url:this.menuItem.menu.url,\r
-                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,\r
-                        roles:this.selectedRole\r
-                    };\r
-\r
-                    $log.debug("MenuDetailsModalCtrl::saveChanges:  New Menu output will be: " + JSON.stringify(newMenuItem));\r
-                    functionalMenuService.saveMenuItem(newMenuItem)\r
-                        .then(() => {\r
-                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');\r
-                            $scope.closeThisDialog(true);\r
-                        }).catch(err => {\r
-                        if(err.status === 409){//Conflict\r
-                            handleConflictErrors(err);\r
-                        } else {\r
-                            confirmBoxService.showInformation('There was a problem saving your menu. ' +\r
-                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});\r
-                        }\r
-                        $log.error('MenuDetailsModalCtrl::saveChanges error: ', err);\r
-                    }).finally(()=>{\r
-                        this.isSaving = false;\r
-                    });\r
-\r
-                }\r
-            };\r
-\r
-            init();\r
-\r
-            $scope.$on('$stateChangeStart', e => {\r
-                //Disable navigation when modal is opened\r
-                e.preventDefault();\r
-            });\r
-        }\r
-    }\r
-    MenuDetailsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'errorMessageByCode', 'ECOMP_URL_REGEX','$rootScope','confirmBoxService'];\r
-    angular.module('ecompApp').controller('MenuDetailsModalCtrl', MenuDetailsModalCtrl);\r
-\r
-    angular.module('ecompApp').directive('dropdownMultiselect', ['functionalMenuService',function(){\r
-        return {\r
-            restrict: 'E',\r
-            scope: {\r
-                model: '=',\r
-                options: '=',\r
-                populated_roles: '=preSelected',\r
-                dropdownTitle: '@',\r
-                source: '='\r
-            },\r
-            template: "<div class='btn-group' data-ng-class='{open: open}'>" +\r
-            "<button class='btn btn-medium'>{{dropdownTitle}}</button>" +\r
-            "<button class='btn dropdown-toggle' data-ng-click='open=!open;openDropDown()'><span class='caret'></span></button>" +\r
-            "<ul class='dropdown-menu dropdown-menu-medium' aria-labelledby='dropdownMenu'>" +\r
-            "<li data-ng-repeat='option in options'> <input ng-disabled='setDisable(source)'  type='checkbox' data-ng-change='setSelectedItem(option.roleId)' ng-model='selectedItems[option.roleId]'>{{option.rolename}}</li>" +\r
-            "</ul>" +\r
-            "</div>",\r
-            controller: function ($scope) {\r
-                $scope.selectedItems = {};\r
-                $scope.checkAll = false;\r
-                $scope.$on('availableRolesReady', function() {\r
-                    init();\r
-                });\r
-\r
-                function init() {\r
-                    console.log('dropdownMultiselect init');\r
-                    $scope.dropdownTitle = $scope.source ==='view' ? 'View Roles' : 'Select Roles';\r
-                    console.log('$scope.populated_roles = ' + $scope.populated_roles);\r
-                }\r
-\r
-                $scope.$watch('populated_roles', function(){\r
-                    if ($scope.populated_roles && $scope.populated_roles.length>0) {\r
-                        for (var i = 0; i < $scope.populated_roles.length; i++) {\r
-                            $scope.model.push($scope.populated_roles[i].roleId);\r
-                            $scope.selectedItems[$scope.populated_roles[i].roleId] = true;\r
-                        }\r
-                        if ($scope.populated_roles.length === $scope.options.length) {\r
-                            $scope.checkAll = true;\r
-                        }\r
-                    }else{\r
-                        deselectAll();\r
-                    }\r
-                });\r
-\r
-                $scope.openDropDown = function () {\r
-\r
-                };\r
-\r
-                $scope.checkAllClicked = function () {\r
-                    if ($scope.checkAll) {\r
-                        selectAll();\r
-                    } else {\r
-                        deselectAll();\r
-                    }\r
-                };\r
-\r
-                function selectAll() {\r
-                    $scope.model = [];\r
-                    $scope.selectedItems = {};\r
-                    angular.forEach($scope.options, function (option) {\r
-                        $scope.model.push(option.roleId);\r
-                    });\r
-                    angular.forEach($scope.model, function (id) {\r
-                        $scope.selectedItems[id] = true;\r
-                    });\r
-                    console.log($scope.model);\r
-                };\r
-\r
-                function deselectAll() {\r
-                    $scope.model = [];\r
-                    $scope.selectedItems = {};\r
-                    console.log($scope.model);\r
-                };\r
-\r
-                $scope.setSelectedItem = function (id) {\r
-                    var filteredArray = [];\r
-                    if ($scope.selectedItems[id] === true) {\r
-                        $scope.model.push(id);\r
-                    } else {\r
-                        filteredArray = $scope.model.filter(function (value) {\r
-                            return value != id;\r
-                        });\r
-                        $scope.model = filteredArray;\r
-                        $scope.checkAll = false;\r
-                    }\r
-                    console.log(filteredArray);\r
-                    return false;\r
-                };\r
-\r
-                $scope.setDisable = function(source){\r
-                    return source ==='view' ? true : false;\r
-                }\r
-            }\r
-        }\r
-    }]);\r
-\r
-})();\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+/**
+ * Created by nnaffar on 12/20/15.
+ */
+'use strict';
+(function () {
+    class MenuDetailsModalCtrl {
+        constructor($scope, $log, functionalMenuService, errorMessageByCode, ECOMP_URL_REGEX,$rootScope,confirmBoxService) {
+
+
+            let newMenuModel = {
+                name: null,
+                menuId: null,
+                parentMenuId: null,
+                url: null
+            };
+
+            let getAvailableRoles = (appid) => {
+                this.isSaving = true;
+                if (appid != null) {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: About to call getManagedRolesMenu");
+                    functionalMenuService.getManagedRolesMenu(appid).then(rolesObj => {
+                        $log.debug("MenuDetailsModalCtrl::getAvailableRoles: Roles returned = " + JSON.stringify(rolesObj))
+                        this.availableRoles = rolesObj;
+                        this.preSelectedRoles = {roles:[]};
+
+                        if(($scope.ngDialogData.source==='edit') && this.isMidLevelMenuItem()){
+                            // in Edit flow , for Midlevel menu item no need to preSelect.
+                            this.preSelectedRoles = {roles:[]};
+                        }else if(!angular.isUndefined(this.menuItem.menuDetails) &&
+                            $scope.ngDialogData.source==='edit' && this.isLeafMenuItem() &&
+                            this.menuItem.menuDetails.appid!=appid) {
+                            // in Edit flow , for LeafMenuItem, if appid changed then no need to preSelect.
+                            this.preSelectedRoles = {roles:[]};
+                        }else{
+                            if((!angular.isUndefined(this.menuItem.menuDetails)) &&
+                                (!angular.isUndefined(this.menuItem.menuDetails.roles))){
+                                    $log.debug('menuDetails.roles: ' + this.menuItem.menuDetails.roles);
+                                    for(var i=0; i<this.menuItem.menuDetails.roles.length; i++){
+                                        var role = {"roleId":this.menuItem.menuDetails.roles[i]};
+                                        $log.debug('MenuDetailsModalCtrl::getAvailableRoles: adding role to preselected: ' + i + ': ' + JSON.stringify(role));
+                                        this.preSelectedRoles.roles.push(role);
+                                    }
+                            }
+                        }
+                        $rootScope.$broadcast('availableRolesReady');
+                        this.isSaving = false;
+                    }).catch(err => {
+                        $log.error("MenuDetailsModalCtrl::getAvailableRoles: error: " + err);
+                    });
+                } else {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableRoles: appid was null");
+                }
+            };
+
+            let getAvailableApps = () => {
+                functionalMenuService.getAvailableApplications().then(apps => {
+                    $log.debug("MenuDetailsModalCtrl::getAvailableApps: Apps returned = " + JSON.stringify(apps))
+                    this.availableApps = apps;
+                    // Keep track of whether or not the selected app is disabled
+                    if (angular.isDefined(this.selectedApp) && angular.isDefined(this.selectedApp.index)) {
+                        for (var i = 0; i < apps.length; i++) {
+                            if (apps[i].index === this.selectedApp.index) {
+                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: found app with index: " + this.selectedApp.index);
+                                $log.debug("MenuDetailsModalCtrl::getAvailableApps: setting isDisabled to: " + !apps[i].enabled);
+                                this.selectedApp.isDisabled = !apps[i].enabled;
+                                break;
+                            }
+                        }
+                        $log.debug("didn't find index: " + this.selectedApp.index);
+                    }
+                })['catch'](function (err) {
+                    confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
+                        'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                    $log.error("MenuDetailsModalCtrl::getAvailableApps: getAvailableApps error: " + err);
+                }).finally(()=>{
+                    this.isSaving = false;
+                });
+            };
+
+            let init = () => {
+                $log.info('MenuDetailsModalCtrl::init');
+                this.saveOrContinueBtnText = "Save";
+                this.isSaving = false;
+                this.displayRoles = $scope.ngDialogData.source==='view' ? true : false;
+                this.formEditable = $scope.ngDialogData.source==='view' ? false : true;
+                this.selectedRole = [];
+                this.availableRoles = [];
+                this.menuItem = _.clone($scope.ngDialogData.menuItem);
+                $log.info('MenuDetailsModalCtrl::getAvailableApps: Within init, about to check menuDetails for defined');
+                if(!angular.isUndefined(this.menuItem.menuDetails) &&
+                    ($scope.ngDialogData.source==='view' ||
+                    ($scope.ngDialogData.source==='edit') && this.isLeafMenuItem() )){
+
+                    $log.debug("MenuDetailsModalCtrl::init: menuItem: ");
+                    $log.debug('MenuDetailsModalCtrl::init: ',this.menuItem);
+                    this.menuItem.menu.url = this.menuItem.menuDetails.url;
+                    this.selectedApp={};
+                    this.selectedApp.index = this.menuItem.menuDetails.appid;
+                    getAvailableRoles(this.selectedApp.index);
+
+                }
+
+                if($scope.ngDialogData.source==='view' || $scope.ngDialogData.source==='edit'){
+                    this.menutitle = this.menuItem.menu.name;
+                    this.menuLocation = this.isParentMenuItem() ? this.menuItem.menu.name : this.menuItem.menu.parent.name;
+                }else{
+                    this.menutitle = '';
+                    this.menuLocation = this.menuItem.menu.name;
+                }
+                // Temporarily passing 0 as dummy for getAvailableRoles incase of this.selectedApp is not there i.e., in Add flow
+                //  getAvailableRoles(angular.isUndefined(this.selectedApp) ? 0: this.selectedApp.index );
+                getAvailableApps();
+                $log.debug("MenuDetailsModalCtrl::init: Menu details: " +  JSON.stringify(this.menuItem.menuDetails));
+            };
+
+
+            this.ECOMP_URL_REGEX = ECOMP_URL_REGEX;
+
+            //This part handles conflict errors (409)
+            this.conflictMessages = {};
+            this.scrollApi = {};
+            let handleConflictErrors = err => {
+                if(!err.data){
+                    return;
+                }
+                if(!err.data.length){ //support objects
+                    err.data = [err.data]
+                }
+                $log.debug('MenuDetailsModalCtrl::handleConflictErrors: err.data = ' + JSON.stringify(err.data));
+                _.forEach(err.data, item => {
+                    _.forEach(item.fields, field => {
+                        //set conflict message
+                        this.conflictMessages[field.name] = errorMessageByCode[item.errorCode];
+                        //set field as invalid
+                        $log.debug('MenuDetailsModalCtrl::handleConflictErrors: fieldName = ' + field.name);
+                        $scope.functionalMenuForm[field.name].$setValidity('conflict', false);
+                        //set watch once to clear error after user correction
+                        watchOnce[field.name]();
+                    });
+                });
+                this.scrollApi.scrollTop();
+            };
+
+            let resetConflict = fieldName => {
+                delete this.conflictMessages[fieldName];
+                $log.debug('MenuDetailsModalCtrl::resetConflict: $setValidity(true) = ' + fieldName);
+                if($scope.functionalMenuForm[fieldName]){
+                    $scope.functionalMenuForm[fieldName].$setValidity('conflict', true);
+                }
+            };
+
+            let watchOnce = {
+                text: () => {
+                    let unregisterName = $scope.$watch('functionalMenuDetails.menutitle', (newVal, oldVal) => {
+                        // $log.debug('title:: newVal, oldVal = ' + newVal.toLowerCase() + " | " + oldVal.toLowerCase());
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){
+                            resetConflict('text');
+                            unregisterName();
+                        }
+                    });
+                },
+                url: () => {
+                    let unregisterUrl = $scope.$watch('functionalMenuDetails.menuItem.menu.url', (newVal, oldVal) => {
+                        if(newVal.toLowerCase() !== oldVal.toLowerCase()){
+                            resetConflict('url');
+                            unregisterUrl();
+                        }
+                    });
+                }
+            };
+
+            //***************************
+
+            this.isLeafMenuItem = () => {
+                return this.menuItem.menu.children.length>0 ? false : true;
+            };
+
+            this.isMidLevelMenuItem = () => {
+                return this.menuItem.menu.parentMenuId!=null && this.menuItem.menu.children.length>0 ? true : false;
+            };
+
+            this.isParentMenuItem = () => {
+                return this.menuItem.menu.parentMenuId!=null ? false : true;
+            };
+
+            this.updateSelectedApp = (appItem) => {
+                if (!appItem) {
+                    return;
+                }
+                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: drop down app item = ' + JSON.stringify(appItem.index));
+                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: appItem in updateSelectedApp: ");
+                $log.debug('MenuDetailsModalCtrl::updateSelectedApp: ',appItem);
+                this.selectedApp.isDisabled = ! appItem.enabled;
+                $log.debug("MenuDetailsModalCtrl::updateSelectedApp: isDisabled: "+this.selectedApp.isDisabled);
+                getAvailableRoles(appItem.index);
+            };
+
+            this.continue = () => {
+                this.displayRoles = true;
+                this.formEditable = false;
+            };
+
+            this.saveChanges = () => {
+
+                //todo : form validation was commented as dialog message is kept for error validations
+                /*if($scope.functionalMenuForm.$invalid){
+                 return;
+                 }*/
+
+                if(!!this.menuItem.menu.url && (angular.isUndefined(this.selectedApp) || !this.selectedApp.index>0)) {
+                    confirmBoxService.showInformation('Please select the appropriate app, or remove the url').then(isConfirmed => {});
+                    return;
+                }else if(!this.menuItem.menu.url && !angular.isUndefined(this.selectedApp) && this.selectedApp.index>0){
+                    confirmBoxService.showInformation('Please enter url, or select "No Application"').then(isConfirmed => {});
+                    return;
+                }else if(!this.menutitle){
+                    confirmBoxService.showInformation('Please enter the Menu title').then(isConfirmed => {});
+                    return;
+                }
+
+                this.isSaving = true;
+                var activeMenuItem = {};
+
+                if ($scope.ngDialogData.source === 'edit') {     // Edit Menu Item
+                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving an edit menu item');
+                    activeMenuItem = {
+                        menuId:this.menuItem.menu.menuId,
+                        column:this.menuItem.menu.column,
+                        text:this.menutitle,
+                        parentMenuId:this.menuItem.menu.parentMenuId,
+                        url:this.menuItem.menu.url,
+                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,
+                        roles:this.selectedRole
+                    };
+                    // If we have removed the url and appid, we must remove the roles
+                    if (!activeMenuItem.appid && !activeMenuItem.url) {
+                        activeMenuItem.roles = null;
+                    }
+                    functionalMenuService.saveEditedMenuItem(activeMenuItem)
+                        .then(() => {
+                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');
+                            $scope.closeThisDialog(true);
+                        }).catch(err => {
+                        if(err.status === 409){//Conflict
+                            handleConflictErrors(err);
+                        } else {
+                            confirmBoxService.showInformation('There was a problem saving your change. ' +
+                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                        }
+                        $log.error('MenuDetailsModalCtrl::saveChanges: error - ',err);
+                    }).finally(()=>{
+                        this.isSaving = false;
+                    });
+
+                    $log.debug("MenuDetailsModalCtrl::saveChanges: Edit Menu output will be: " + JSON.stringify(activeMenuItem));
+                } else {   // New Menu Item
+                    $log.debug('MenuDetailsModalCtrl::saveChanges: Will be saving a New menu item');
+                    var newMenuItem = {
+                        menuId:null, // this is a new menu item
+                        column:this.menuItem.menu.column,
+                        text:this.menutitle,
+                        // We are creating this new menu item under the menu item that was clicked on.
+                        parentMenuId:this.menuItem.menu.menuId,
+                        url:this.menuItem.menu.url,
+                        appid: angular.isUndefined(this.selectedApp) ? null:this.selectedApp.index,
+                        roles:this.selectedRole
+                    };
+
+                    $log.debug("MenuDetailsModalCtrl::saveChanges:  New Menu output will be: " + JSON.stringify(newMenuItem));
+                    functionalMenuService.saveMenuItem(newMenuItem)
+                        .then(() => {
+                            $log.debug('MenuDetailsModalCtrl::saveChanges:  Menu Item saved');
+                            $scope.closeThisDialog(true);
+                        }).catch(err => {
+                        if(err.status === 409){//Conflict
+                            handleConflictErrors(err);
+                        } else {
+                            confirmBoxService.showInformation('There was a problem saving your menu. ' +
+                                'Please try again later. Error Status: '+ err.status).then(isConfirmed => {});
+                        }
+                        $log.error('MenuDetailsModalCtrl::saveChanges error: ', err);
+                    }).finally(()=>{
+                        this.isSaving = false;
+                    });
+
+                }
+            };
+
+            init();
+
+            $scope.$on('$stateChangeStart', e => {
+                //Disable navigation when modal is opened
+                e.preventDefault();
+            });
+        }
+    }
+    MenuDetailsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'errorMessageByCode', 'ECOMP_URL_REGEX','$rootScope','confirmBoxService'];
+    angular.module('ecompApp').controller('MenuDetailsModalCtrl', MenuDetailsModalCtrl);
+
+    angular.module('ecompApp').directive('dropdownMultiselect', ['functionalMenuService',function(){
+        return {
+            restrict: 'E',
+            scope: {
+                model: '=',
+                options: '=',
+                populated_roles: '=preSelected',
+                dropdownTitle: '@',
+                source: '='
+            },
+            template: "<div class='btn-group' data-ng-class='{open: open}'>" +
+            "<button class='btn btn-medium'>{{dropdownTitle}}</button>" +
+            "<button class='btn dropdown-toggle' data-ng-click='open=!open;openDropDown()'><span class='caret'></span></button>" +
+            "<ul class='dropdown-menu dropdown-menu-medium' aria-labelledby='dropdownMenu'>" +
+            "<li data-ng-repeat='option in options'> <input ng-disabled='setDisable(source)'  type='checkbox' data-ng-change='setSelectedItem(option.roleId)' ng-model='selectedItems[option.roleId]'>{{option.rolename}}</li>" +
+            "</ul>" +
+            "</div>",
+            controller: function ($scope) {
+                $scope.selectedItems = {};
+                $scope.checkAll = false;
+                $scope.$on('availableRolesReady', function() {
+                    init();
+                });
+
+                function init() {
+                    console.log('dropdownMultiselect init');
+                    $scope.dropdownTitle = $scope.source ==='view' ? 'View Roles' : 'Select Roles';
+                    console.log('$scope.populated_roles = ' + $scope.populated_roles);
+                }
+
+                $scope.$watch('populated_roles', function(){
+                    if ($scope.populated_roles && $scope.populated_roles.length>0) {
+                        for (var i = 0; i < $scope.populated_roles.length; i++) {
+                            $scope.model.push($scope.populated_roles[i].roleId);
+                            $scope.selectedItems[$scope.populated_roles[i].roleId] = true;
+                        }
+                        if ($scope.populated_roles.length === $scope.options.length) {
+                            $scope.checkAll = true;
+                        }
+                    }else{
+                        deselectAll();
+                    }
+                });
+
+                $scope.openDropDown = function () {
+
+                };
+
+                $scope.checkAllClicked = function () {
+                    if ($scope.checkAll) {
+                        selectAll();
+                    } else {
+                        deselectAll();
+                    }
+                };
+
+                function selectAll() {
+                    $scope.model = [];
+                    $scope.selectedItems = {};
+                    angular.forEach($scope.options, function (option) {
+                        $scope.model.push(option.roleId);
+                    });
+                    angular.forEach($scope.model, function (id) {
+                        $scope.selectedItems[id] = true;
+                    });
+                    console.log($scope.model);
+                };
+
+                function deselectAll() {
+                    $scope.model = [];
+                    $scope.selectedItems = {};
+                    console.log($scope.model);
+                };
+
+                $scope.setSelectedItem = function (id) {
+                    var filteredArray = [];
+                    if ($scope.selectedItems[id] === true) {
+                        $scope.model.push(id);
+                    } else {
+                        filteredArray = $scope.model.filter(function (value) {
+                            return value != id;
+                        });
+                        $scope.model = filteredArray;
+                        $scope.checkAll = false;
+                    }
+                    console.log(filteredArray);
+                    return false;
+                };
+
+                $scope.setDisable = function(source){
+                    return source ==='view' ? true : false;
+                }
+            }
+        }
+    }]);
+
+})();
index f5f027c..674affa 100644 (file)
@@ -1,37 +1,37 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="functionalMenu-details-modal">\r
-    <div id="title" class="title">Delete Menu Item</div>\r
-\r
-    <div id="functionalMenu-main" class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">\r
-        <form name="functionalMenuForm" novalidate>\r
-\r
-            <div class="confirmation-message-wrap">\r
-                <div class="confirmation-message" ng-bind="confirmBox.message"></div>\r
-            </div>\r
-        </form>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>\r
-        <div id='menu-details-next-button' class="next-button"\r
-             ng-class="{disabled: functionalMenuForm.$invalid}" ng-click="functionalMenuDetails.saveChanges()">Delete</div>\r
-        <div id='menu-details-cancel-button' class="cancel-button" ng-click="closeThisDialog()">Cancel</div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="functionalMenu-details-modal">
+    <div id="title" class="title">Delete Menu Item</div>
+
+    <div id="functionalMenu-main" class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">
+        <form name="functionalMenuForm" novalidate>
+
+            <div class="confirmation-message-wrap">
+                <div class="confirmation-message" ng-bind="confirmBox.message"></div>
+            </div>
+        </form>
+    </div>
+    <div class="dialog-control">
+        <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>
+        <div id='menu-details-next-button' class="next-button"
+             ng-class="{disabled: functionalMenuForm.$invalid}" ng-click="functionalMenuDetails.saveChanges()">Delete</div>
+        <div id='menu-details-cancel-button' class="cancel-button" ng-click="closeThisDialog()">Cancel</div>
+    </div>
+</div>
index aebc6a5..56c3f4d 100644 (file)
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="functionalMenu-details-modal">\r
-    <div class="title">{{ngDialogData.title}}</div>\r
-\r
-\r
-    <div class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">\r
-        <form name="functionalMenuForm">\r
-\r
-            <div class="item">\r
-                <div class="item-label">Parent</div>\r
-                <input id="input-parent" readonly="readonly" class="input-field" value="{{functionalMenuDetails.menuLocation}}" type="text" name="menuItem" required/>\r
-            </div>\r
-            <div class="item">\r
-                <div class="item-label">Title</div>\r
-                <input id="input-title" ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="Enter text" class="input-field" ng-model="functionalMenuDetails.menutitle" type="text" name="text"/>\r
-                <div id="div-error-conflict" class="error-container" ng-show="functionalMenuDetails.conflictMessages.text">\r
-                    <small id="msg-error-conflict" id="functionalMenuDetails-input-title-conflict" class="err-message" ng-bind="functionalMenuDetails.conflictMessages.text"></small>\r
-                </div>\r
-            </div>\r
-            <div class="item">\r
-                <div class="left-item">\r
-                    <div class="item-label">URL</div>\r
-                    <input id="input-url" ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="http://" class="input-field" ng-model="functionalMenuDetails.menuItem.menu.url" type="url" name="url"/>\r
-                    <span id="error-url-conflict" class="err-message" ng-show="functionalMenuForm.url.$error.url"> Not valid URL!</span>\r
-                </div>\r
-                <div class="right-item">\r
-                    <div class="item-label">App</div>\r
-                    <div class="custom-select-wrap" ng-readonly="checked">\r
-                        <select id="select-app" class="select-field"\r
-                                ng-model="functionalMenuDetails.selectedApp"\r
-                                ng-change="functionalMenuDetails.updateSelectedApp(functionalMenuDetails.selectedApp);"\r
-                                ng-options="app.title for app in functionalMenuDetails.availableApps track by app.index"\r
-                                ng-disabled="!functionalMenuDetails.availableApps || !functionalMenuDetails.availableApps.length || !functionalMenuDetails.formEditable"\r
-                                name="app"\r
-                                required>\r
-                            <option value="" >No Application</option>\r
-                        </select>\r
-                    </div>\r
-                    <!--<span class="err-message" ng-show="functionalMenuForm.app.$dirty && functionalMenuForm.app.$error.required"> Please select App!</span>-->\r
-                 <!--   <pre>{{functionalMenuDetails.menuItem | json}}</pre> -->\r
-                </div>\r
-            </div>\r
-            <div class="item" ng-show="functionalMenuDetails.displayRoles==true">\r
-                <div class="item-label">Roles</div>\r
-                    <dropdown-multiselect id="dropdown-roles" dropdown-title="Select Roles" pre-selected="functionalMenuDetails.preSelectedRoles.roles"\r
-                                          model="functionalMenuDetails.selectedRole"\r
-                                          options="functionalMenuDetails.availableRoles" source="ngDialogData.source">\r
-                    </dropdown-multiselect>\r
-            </div>\r
-            <div ng-show="functionalMenuDetails.selectedApp && functionalMenuDetails.selectedApp.isDisabled" class="err-message">Application is disabled</div>\r
-        </form>\r
-    </div>\r
-    <div class="dialog-control">\r
-        <div ng-if="ngDialogData.source!='view'">\r
-            <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>\r
-            <span ng-if="ngDialogData.source=='edit' && functionalMenuDetails.isLeafMenuItem()">\r
-                <button class="save-button" id="add-menu-button-save"\r
-                        ng-show="!functionalMenuDetails.menuItem.menu.url ||\r
-                        !(functionalMenuDetails.selectedApp.index>0) ||\r
-                        functionalMenuDetails.displayRoles"\r
-                        ng-disabled="!functionalMenuForm.text.$valid"\r
-                        ng-click="functionalMenuDetails.saveChanges()">Save</button>\r
-                <button class="save-button" id="add-menu-button-continue"\r
-                        ng-show="!!functionalMenuDetails.menuItem.menu.url &&\r
-                        functionalMenuDetails.selectedApp.index>0 &&\r
-                        functionalMenuDetails.menutitle &&\r
-                        !functionalMenuDetails.displayRoles"\r
-                        ng-disabled="!functionalMenuForm.url.$valid" ng-click="functionalMenuDetails.continue()">Continue</button>\r
-            </span>\r
-            <span ng-if="ngDialogData.source=='add' || (ngDialogData.source=='edit' && !functionalMenuDetails.isLeafMenuItem())">\r
-                <button id="button-save-add"\r
-                        class="save-button" ng-show="!functionalMenuDetails.menuItem.menu.url || !(functionalMenuDetails.selectedApp.index>0)\r
-                || functionalMenuDetails.selectedRole.length>0 || !functionalMenuDetails.menutitle" ng-disabled="!functionalMenuForm.text.$valid || !functionalMenuDetails.menutitle"\r
-                        ng-click="functionalMenuDetails.saveChanges()">Save</button>\r
-                <button id="button-save-continue" class="save-button" ng-show="!!functionalMenuDetails.menuItem.menu.url && functionalMenuDetails.selectedApp.index>0 && functionalMenuDetails.menutitle\r
-                && !functionalMenuDetails.selectedRole.length>0" ng-disabled="!functionalMenuForm.url.$valid"\r
-                        ng-click="functionalMenuDetails.continue()">Continue</button>\r
-            </span>\r
-            <button id="button-cancel-close-dialog" class="cancel-button" ng-click="closeThisDialog()">Cancel</button>\r
-        </div>\r
-        <div ng-if="ngDialogData.source=='view'">\r
-            <div  id="div-close-dialog"  class="cancel-button" ng-click="closeThisDialog()">Close</div>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="functionalMenu-details-modal">
+    <div class="title">{{ngDialogData.title}}</div>
+
+
+    <div class="functionalMenu-properties-main" scroll-top="functionalMenuDetails.scrollApi">
+        <form name="functionalMenuForm">
+
+            <div class="item">
+                <div class="item-label">Parent</div>
+                <input id="input-parent" readonly="readonly" class="input-field" value="{{functionalMenuDetails.menuLocation}}" type="text" name="menuItem" required/>
+            </div>
+            <div class="item">
+                <div class="item-label">Title</div>
+                <input id="input-title" ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="Enter text" class="input-field" ng-model="functionalMenuDetails.menutitle" type="text" name="text"/>
+                <div id="div-error-conflict" class="error-container" ng-show="functionalMenuDetails.conflictMessages.text">
+                    <small id="msg-error-conflict" id="functionalMenuDetails-input-title-conflict" class="err-message" ng-bind="functionalMenuDetails.conflictMessages.text"></small>
+                </div>
+            </div>
+            <div class="item">
+                <div class="left-item">
+                    <div class="item-label">URL</div>
+                    <input id="input-url" ng-readonly="!functionalMenuDetails.formEditable ? 'checked':'' " placeholder="http://" class="input-field" ng-model="functionalMenuDetails.menuItem.menu.url" type="url" name="url"/>
+                    <span id="error-url-conflict" class="err-message" ng-show="functionalMenuForm.url.$error.url"> Not valid URL!</span>
+                </div>
+                <div class="right-item">
+                    <div class="item-label">App</div>
+                    <div class="custom-select-wrap" ng-readonly="checked">
+                        <select id="select-app" class="select-field"
+                                ng-model="functionalMenuDetails.selectedApp"
+                                ng-change="functionalMenuDetails.updateSelectedApp(functionalMenuDetails.selectedApp);"
+                                ng-options="app.title for app in functionalMenuDetails.availableApps track by app.index"
+                                ng-disabled="!functionalMenuDetails.availableApps || !functionalMenuDetails.availableApps.length || !functionalMenuDetails.formEditable"
+                                name="app"
+                                required>
+                            <option value="" >No Application</option>
+                        </select>
+                    </div>
+                    <!--<span class="err-message" ng-show="functionalMenuForm.app.$dirty && functionalMenuForm.app.$error.required"> Please select App!</span>-->
+                 <!--   <pre>{{functionalMenuDetails.menuItem | json}}</pre> -->
+                </div>
+            </div>
+            <div class="item" ng-show="functionalMenuDetails.displayRoles==true">
+                <div class="item-label">Roles</div>
+                    <dropdown-multiselect id="dropdown-roles" dropdown-title="Select Roles" pre-selected="functionalMenuDetails.preSelectedRoles.roles"
+                                          model="functionalMenuDetails.selectedRole"
+                                          options="functionalMenuDetails.availableRoles" source="ngDialogData.source">
+                    </dropdown-multiselect>
+            </div>
+            <div ng-show="functionalMenuDetails.selectedApp && functionalMenuDetails.selectedApp.isDisabled" class="err-message">Application is disabled</div>
+        </form>
+    </div>
+    <div class="dialog-control">
+        <div ng-if="ngDialogData.source!='view'">
+            <span class="ecomp-save-spinner" ng-show="functionalMenuDetails.isSaving"></span>
+            <span ng-if="ngDialogData.source=='edit' && functionalMenuDetails.isLeafMenuItem()">
+                <button class="save-button" id="add-menu-button-save"
+                        ng-show="!functionalMenuDetails.menuItem.menu.url ||
+                        !(functionalMenuDetails.selectedApp.index>0) ||
+                        functionalMenuDetails.displayRoles"
+                        ng-disabled="!functionalMenuForm.text.$valid"
+                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
+                <button class="save-button" id="add-menu-button-continue"
+                        ng-show="!!functionalMenuDetails.menuItem.menu.url &&
+                        functionalMenuDetails.selectedApp.index>0 &&
+                        functionalMenuDetails.menutitle &&
+                        !functionalMenuDetails.displayRoles"
+                        ng-disabled="!functionalMenuForm.url.$valid" ng-click="functionalMenuDetails.continue()">Continue</button>
+            </span>
+            <span ng-if="ngDialogData.source=='add' || (ngDialogData.source=='edit' && !functionalMenuDetails.isLeafMenuItem())">
+                <button id="button-save-add"
+                        class="save-button" ng-show="!functionalMenuDetails.menuItem.menu.url || !(functionalMenuDetails.selectedApp.index>0)
+                || functionalMenuDetails.selectedRole.length>0 || !functionalMenuDetails.menutitle" ng-disabled="!functionalMenuForm.text.$valid || !functionalMenuDetails.menutitle"
+                        ng-click="functionalMenuDetails.saveChanges()">Save</button>
+                <button id="button-save-continue" class="save-button" ng-show="!!functionalMenuDetails.menuItem.menu.url && functionalMenuDetails.selectedApp.index>0 && functionalMenuDetails.menutitle
+                && !functionalMenuDetails.selectedRole.length>0" ng-disabled="!functionalMenuForm.url.$valid"
+                        ng-click="functionalMenuDetails.continue()">Continue</button>
+            </span>
+            <button id="button-cancel-close-dialog" class="cancel-button" ng-click="closeThisDialog()">Cancel</button>
+        </div>
+        <div ng-if="ngDialogData.source=='view'">
+            <div  id="div-close-dialog"  class="cancel-button" ng-click="closeThisDialog()">Close</div>
+        </div>
+    </div>
+</div>
index dedc137..343c968 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-    class FunctionalMenuCtrl {\r
-        constructor($log, functionalMenuService, $scope,ngDialog, confirmBoxService) {\r
-            $log.info('FunctionalMenuCtrl init');\r
-\r
-            $scope.invokeDialog = () => {\r
-                // alert("click dialog");\r
-            };\r
-\r
-            this.regenerateFunctionalMenuAncestors = () => {\r
-                functionalMenuService.regenerateFunctionalMenuAncestors().then(res => {\r
-                    $log.debug("FunctionalMenuCtrl:regenerateFunctionalMenuAncestors::returned from regenerateFunctionalMenuAncestors API call");\r
-                    confirmBoxService.showInformation('You have successfully regenerated the menu.').then(isConfirmed => {\r
-                    });\r
-                })['catch'](function (err) {\r
-                    $log.error("FunctionalMenuCtrl:regenerateFunctionalMenuAncestors:: error: " + err);\r
-                    confirmBoxService.showInformation('There was an error while regenerating the menu.').then(isConfirmed => {\r
-                    });\r
-                });\r
-            };\r
-\r
-            let getFunctionalMenu = () => {\r
-                this.isLoadingTable = true;\r
-                functionalMenuService.getManagedFunctionalMenu().then(res => {\r
-\r
-                    let actualData=[];\r
-\r
-                    //Adding children and label attribute to all objects in res\r
-                    for(let i = 0; i < res.length; i++){\r
-                        res[i].children=[];\r
-                        res[i].label=res[i].text;\r
-                        res[i].id=res[i].text;\r
-\r
-                    }\r
-                    //Adding actual child items to children array in res objects\r
-                    for(let i = 0; i < res.length; i++){\r
-\r
-                        let parentId=res[i].menuId;\r
-                        for(let j = 0; j < res.length; j++){\r
-                            let childId=res[j].parentMenuId;\r
-                            if(parentId===childId){\r
-                                res[i].children.push(res[j]);\r
-\r
-                            }\r
-                        }\r
-                    }\r
-\r
-                    // Sort the top-level menu items in order based on the column\r
-                    res.sort(function(a, b) {\r
-                        return a.column-b.column;\r
-                    });\r
-\r
-                    // Sort all the children in order based on the column\r
-                    for(let i = 0; i < res.length; i++){\r
-                        res[i].children.sort(function(a, b){\r
-                            return a.column-b.column;\r
-                        });\r
-                    }\r
-\r
-                    //Forming actual parent items\r
-                    for(let i = 0; i < res.length; i++){\r
-                        let parentId=res[i].parentMenuId;\r
-                        if(parentId===null){\r
-                            actualData.push(res[i]);\r
-                        }\r
-                    }\r
-\r
-                    $scope.treedata = actualData;\r
-\r
-                }).catch(err => {\r
-                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ',err);\r
-                }).finally(()=> {\r
-                    this.isLoadingTable = false;\r
-                });\r
-\r
-            };\r
-\r
-\r
-            let init = () => {\r
-                this.isLoadingTable = false;\r
-                this.functionalMenu = [];\r
-                getFunctionalMenu();\r
-                this.searchString = '';\r
-\r
-\r
-            };\r
-\r
-            this.filterByDropdownValue = item => {\r
-                if(this.filterByApp.value === ''){\r
-                    return true;\r
-                }\r
-                return item.appName === this.filterByApp.value;\r
-            };\r
-\r
-            let getDialogTitle = (source) => {\r
-                switch (source) {\r
-                    case 'edit':\r
-                        return "Functional Menu - Edit";\r
-                    case 'view':\r
-                        return "Functional Menu - View";\r
-                    case 'add':\r
-                        return "Functional Menu - Add";\r
-                    default:\r
-                        return "Functional Menu";\r
-                };\r
-            };\r
-\r
-            $scope.reloadTreeStructure = (selectedItem,source) => {\r
-                getFunctionalMenu();\r
-            };\r
-            $scope.openMenuDetailsModal = (selectedItem,source) => {\r
-                let data = null;\r
-                let selectedMenuDetails = null;\r
-                console.log('selectedItem: ', selectedItem);\r
-\r
-                functionalMenuService.getMenuDetails(selectedItem.menuId)\r
-                    .then(function( resp ){\r
-                        selectedMenuDetails = resp;\r
-                        $log.info('FunctionalMenuCtrl::openMenuDetailsModal: getMenuDetails: ', resp );\r
-\r
-                        if(selectedItem){\r
-                            data = {\r
-                                menuItem: {menu: _.clone(selectedItem),menuDetails:_.clone(selectedMenuDetails)},\r
-                                source: source,\r
-                                title: getDialogTitle(source)\r
-                            };\r
-                        }\r
-                        ngDialog.open({\r
-                            templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html',\r
-                            controller: 'MenuDetailsModalCtrl',\r
-                            controllerAs: 'functionalMenuDetails',\r
-                            data: data\r
-                        }).closePromise.then(needUpdate => {\r
-                            if(needUpdate.value === true){\r
-                                $log.debug('FunctionalMenuCtrl::openMenuDetailsModal: updating table data...');\r
-                                if(source==="edit") {\r
-                                    init();\r
-                                }\r
-                            }\r
-                        });\r
-                    });\r
-            };\r
-\r
-\r
-            $scope.createNewMenuItem = (selectedItem,source) => {\r
-\r
-                if(selectedItem != null && selectedItem.getLevel() >= 4){\r
-                    confirmBoxService.showInformation('You are not allowed to have a menu item at a level greater than 4.').then(isConfirmed => {\r
-\r
-                    });\r
-                    return ;\r
-                }\r
-\r
-                let data = null;\r
-                let selectedMenuDetails = null;\r
-                functionalMenuService.getMenuDetails(selectedItem.menuId)\r
-                    .then(function( resp ){\r
-                        selectedMenuDetails = resp;\r
-\r
-                        if((selectedItem.children===null || !selectedItem.children.length>0) &&\r
-                            (!!selectedMenuDetails.url || !!selectedMenuDetails.appid || !!selectedMenuDetails.roles)){\r
-                            confirmBoxService.showInformation('Warning: the child menu item "' + selectedItem.name + '" is already configured with an application. You can create a new mid-level menu item, and move this item under it.').then(isConfirmed => {\r
-                                return;\r
-                            });\r
-                        }else{\r
-                            if(selectedItem){\r
-                                data = {\r
-                                    menuItem: {menu: _.clone(selectedItem)},\r
-                                    source:source,\r
-                                    title: getDialogTitle(source)\r
-                                };\r
-                            }\r
-\r
-                            ngDialog.open({\r
-                                templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html',\r
-                                controller: 'MenuDetailsModalCtrl',\r
-                                controllerAs: 'functionalMenuDetails',\r
-                                data: data\r
-                            }).closePromise.then(needUpdate => {\r
-                                if(needUpdate.value === true){\r
-                                    $log.debug('FunctionalMenuCtrl::getMenuDetails: updating table data...');\r
-                                    init();\r
-                                    //getOnboardingWidgets();\r
-                                }\r
-                            });\r
-                        }\r
-                    });\r
-            };\r
-\r
-            $scope.deleteMenuItem = (selectedItem,source) => {\r
-                $log.info('FunctionalMenuCtrl:deleteMenuItem:: delete selectedItem: ', selectedItem);\r
-\r
-                if(selectedItem.children!=null && selectedItem.children.length>0){\r
-                    confirmBoxService.showInformation('You are not allowed to delete a menu item that has children. You can only delete leaf menu items.').then(isConfirmed => {\r
-\r
-                    });\r
-                }else{\r
-                    confirmBoxService.deleteItem(selectedItem.name).then(isConfirmed => {\r
-                        if(isConfirmed){\r
-                            $log.info('FunctionalMenuCtrl:deleteMenuItem:: Deleting Menu Item :: name: '+selectedItem.name+'; menuId: '+selectedItem.menuId);\r
-                            $log.info('FunctionalMenuCtrl:deleteMenuItem:: selectedItem: ', selectedItem);\r
-\r
-                            functionalMenuService.deleteMenuItem(selectedItem.menuId).then(() => {\r
-                                //TODO:Have to splice menu item\r
-                                //this.widgetsList.splice(this.widgetsList.indexOf(widget), 1);\r
-                                $log.info('FunctionalMenuCtrl:deleteMenuItem:: Removed Menu Item :: '+selectedItem.name);\r
-                                init();\r
-                            }).catch(err => {\r
-                                $log.error(err);\r
-                            });\r
-                        }\r
-                    }).catch(err => {\r
-                        $log.error(err);\r
-                    });\r
-                }\r
-            };\r
-\r
-            init();\r
-        }\r
-    }\r
-    FunctionalMenuCtrl.$inject = ['$log', 'functionalMenuService','$scope', 'ngDialog', 'confirmBoxService'];\r
-    angular.module('ecompApp').controller('FunctionalMenuCtrl', FunctionalMenuCtrl);\r
-\r
-    angular.module('ecompApp').directive('jqTree', ['functionalMenuService','$log','confirmBoxService',function(functionalMenuService,$log,confirmBoxService){\r
-        return {\r
-            templateUrl: 'jqtree-tmpl.html',\r
-            link: function(scope, el, attrs){\r
-\r
-                var $jqTree =  el.find('#jqTree').tree({\r
-                    data: scope.treedata,\r
-                    autoOpen: false,\r
-                    dragAndDrop: true,\r
-                    onCreateLi: function(node, $li) {\r
-                        $li.attr('id', node.id.replace(/\s+/g,'_'));\r
-                    }\r
-                });\r
-\r
-                el.find('#jqTree').bind('tree.move',  function(event){\r
-                    event.preventDefault();\r
-                    console.log('moved_node', event.move_info.moved_node);\r
-                    console.log('target_node', event.move_info.target_node);\r
-                    console.log('position', event.move_info.position);\r
-                    console.log('previous_parent', event.move_info.previous_parent);\r
-\r
-\r
-\r
-                    if(event.move_info.target_node != null &&\r
-                        ((event.move_info.position === 'after' && event.move_info.target_node.getLevel() > 4) ||\r
-                        (event.move_info.position === 'inside' && event.move_info.target_node.getLevel() > 3))){\r
-                        confirmBoxService.showInformation('You are not allowed to have a menu item at a level greater than 4.').then(isConfirmed => {\r
-\r
-                        });\r
-                        return ;\r
-                    }\r
-\r
-                    var confMsg = 'Are you sure you want to move "'+event.move_info.moved_node.name+'" ?';\r
-                    if ((event.move_info.position === "inside") && (event.move_info.target_node.url != "")) {\r
-                        // If we are moving UNDER a node that has a url associated with it, warn the user\r
-                        // that all the app information will be removed if they do this.\r
-                        confMsg = 'Warning: You are moving "'+event.move_info.moved_node.name+'" under "'+event.move_info.target_node.name+'", which has application information associated with it. This will cause all the application information from "'+event.move_info.target_node.name+'" to be deleted.';\r
-                    }\r
-                    confirmBoxService.moveMenuItem(confMsg).then(isConfirmed => {\r
-                        if(isConfirmed){\r
-                            /*\r
-                             {\r
-                             "menuId": 129,\r
-                             "column": 3,\r
-                             "text": "",\r
-                             "parentMenuId": 37,\r
-                             "url": "",\r
-                             "appid": null,\r
-                             "roles": null\r
-                             }\r
-\r
-                             The menuId for the menu item being moved\r
-                             The column it is being moved to\r
-                             The parentMenuId for the parent it is being moved under\r
-                             */\r
-\r
-                            // The target_node is the node before the position we are\r
-                            // moving to. If we are moving to a lower column number, or\r
-                            // to a new parent, we must adjust the column to be after\r
-                            // the target_node.\r
-                            var new_column = event.move_info.target_node.column;\r
-                            var old_column = event.move_info.moved_node.column;\r
-                            if ((event.move_info.moved_node.parentMenuId !=\r
-                                event.move_info.target_node.parentMenuId) ||\r
-                                (new_column < old_column)\r
-                            ) {\r
-                                new_column += 1;\r
-                            }\r
-                            var activeMenuItem = {\r
-                                menuId:event.move_info.moved_node.menuId,\r
-                                column:new_column,\r
-                                text:"",\r
-                                parentMenuId:event.move_info.target_node.parentMenuId,\r
-                                url:"",\r
-                                appid: null,\r
-                                roles:null\r
-                            };\r
-                            // When position is "inside", this is a special case,\r
-                            // where you are moving to the first column under\r
-                            // a parent. The target_node is the parent node.\r
-                            // So we need to set the column to 1, and the parentMenuId to the menuId of\r
-                            // the target move.\r
-                            if (event.move_info.position === "inside") {\r
-                                console.log("special case: target_node is parent");\r
-                                activeMenuItem.column = 1;\r
-                                activeMenuItem.parentMenuId = event.move_info.target_node.menuId;\r
-                            }\r
-\r
-\r
-                            functionalMenuService.saveEditedMenuItem(activeMenuItem)\r
-                                .then(() => {\r
-                                    $log.debug(' Menu Item moved');\r
-                                    scope.reloadTreeStructure();\r
-                                }).catch(err => {\r
-                                $log.error(err);\r
-                            }).finally(()=>{\r
-                            });\r
-                        }\r
-                    }).catch(err => {\r
-                        $log.error(err);\r
-                    });\r
-\r
-                    //event.move_info.do_move();\r
-                });\r
-\r
-\r
-                $jqTree.jqTreeContextMenu(el.find('ul.dropdown-menu'), {\r
-                    "view": function (node) {scope.openMenuDetailsModal(node,'view'); },\r
-                    "edit": function (node) {scope.openMenuDetailsModal(node,'edit'); },\r
-                    "delete": function (node) { scope.deleteMenuItem(node,'delete') },\r
-                    "add": function (node) {  scope.createNewMenuItem(node,'add') }\r
-                });\r
-\r
-                scope.$watch('treedata', function(oldValue, newValue){\r
-                    if(oldValue !== newValue){\r
-                        console.log('FunctionalMenuCtrl:: Tree value has changed in some way');\r
-                        $jqTree.tree('loadData',  scope.treedata);\r
-                        $jqTree.tree('reload', function() {\r
-                            console.log('FunctionalMenuCtrl:: Tree is reloaded');\r
-                        });\r
-                    }\r
-                });\r
-            }\r
-        };\r
-    }]);\r
-\r
-})();\r
-\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class FunctionalMenuCtrl {
+        constructor($log, functionalMenuService, $scope,ngDialog, confirmBoxService) {
+            $log.info('FunctionalMenuCtrl init');
+
+            $scope.invokeDialog = () => {
+                // alert("click dialog");
+            };
+
+            this.regenerateFunctionalMenuAncestors = () => {
+                functionalMenuService.regenerateFunctionalMenuAncestors().then(res => {
+                    $log.debug("FunctionalMenuCtrl:regenerateFunctionalMenuAncestors::returned from regenerateFunctionalMenuAncestors API call");
+                    confirmBoxService.showInformation('You have successfully regenerated the menu.').then(isConfirmed => {
+                    });
+                })['catch'](function (err) {
+                    $log.error("FunctionalMenuCtrl:regenerateFunctionalMenuAncestors:: error: " + err);
+                    confirmBoxService.showInformation('There was an error while regenerating the menu.').then(isConfirmed => {
+                    });
+                });
+            };
+
+            let getFunctionalMenu = () => {
+                this.isLoadingTable = true;
+                functionalMenuService.getManagedFunctionalMenu().then(res => {
+
+                    let actualData=[];
+
+                    //Adding children and label attribute to all objects in res
+                    for(let i = 0; i < res.length; i++){
+                        res[i].children=[];
+                        res[i].label=res[i].text;
+                        res[i].id=res[i].text;
+
+                    }
+                    //Adding actual child items to children array in res objects
+                    for(let i = 0; i < res.length; i++){
+
+                        let parentId=res[i].menuId;
+                        for(let j = 0; j < res.length; j++){
+                            let childId=res[j].parentMenuId;
+                            if(parentId===childId){
+                                res[i].children.push(res[j]);
+
+                            }
+                        }
+                    }
+
+                    // Sort the top-level menu items in order based on the column
+                    res.sort(function(a, b) {
+                        return a.column-b.column;
+                    });
+
+                    // Sort all the children in order based on the column
+                    for(let i = 0; i < res.length; i++){
+                        res[i].children.sort(function(a, b){
+                            return a.column-b.column;
+                        });
+                    }
+
+                    //Forming actual parent items
+                    for(let i = 0; i < res.length; i++){
+                        let parentId=res[i].parentMenuId;
+                        if(parentId===null){
+                            actualData.push(res[i]);
+                        }
+                    }
+
+                    $scope.treedata = actualData;
+
+                }).catch(err => {
+                    $log.error('FunctionalMenuCtrl:getFunctionalMenu:: error ',err);
+                }).finally(()=> {
+                    this.isLoadingTable = false;
+                });
+
+            };
+
+
+            let init = () => {
+                this.isLoadingTable = false;
+                this.functionalMenu = [];
+                getFunctionalMenu();
+                this.searchString = '';
+
+
+            };
+
+            this.filterByDropdownValue = item => {
+                if(this.filterByApp.value === ''){
+                    return true;
+                }
+                return item.appName === this.filterByApp.value;
+            };
+
+            let getDialogTitle = (source) => {
+                switch (source) {
+                    case 'edit':
+                        return "Functional Menu - Edit";
+                    case 'view':
+                        return "Functional Menu - View";
+                    case 'add':
+                        return "Functional Menu - Add";
+                    default:
+                        return "Functional Menu";
+                };
+            };
+
+            $scope.reloadTreeStructure = (selectedItem,source) => {
+                getFunctionalMenu();
+            };
+            $scope.openMenuDetailsModal = (selectedItem,source) => {
+                let data = null;
+                let selectedMenuDetails = null;
+                console.log('selectedItem: ', selectedItem);
+
+                functionalMenuService.getMenuDetails(selectedItem.menuId)
+                    .then(function( resp ){
+                        selectedMenuDetails = resp;
+                        $log.info('FunctionalMenuCtrl::openMenuDetailsModal: getMenuDetails: ', resp );
+
+                        if(selectedItem){
+                            data = {
+                                menuItem: {menu: _.clone(selectedItem),menuDetails:_.clone(selectedMenuDetails)},
+                                source: source,
+                                title: getDialogTitle(source)
+                            };
+                        }
+                        ngDialog.open({
+                            templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html',
+                            controller: 'MenuDetailsModalCtrl',
+                            controllerAs: 'functionalMenuDetails',
+                            data: data
+                        }).closePromise.then(needUpdate => {
+                            if(needUpdate.value === true){
+                                $log.debug('FunctionalMenuCtrl::openMenuDetailsModal: updating table data...');
+                                if(source==="edit") {
+                                    init();
+                                }
+                            }
+                        });
+                    });
+            };
+
+
+            $scope.createNewMenuItem = (selectedItem,source) => {
+
+                if(selectedItem != null && selectedItem.getLevel() >= 4){
+                    confirmBoxService.showInformation('You are not allowed to have a menu item at a level greater than 4.').then(isConfirmed => {
+
+                    });
+                    return ;
+                }
+
+                let data = null;
+                let selectedMenuDetails = null;
+                functionalMenuService.getMenuDetails(selectedItem.menuId)
+                    .then(function( resp ){
+                        selectedMenuDetails = resp;
+
+                        if((selectedItem.children===null || !selectedItem.children.length>0) &&
+                            (!!selectedMenuDetails.url || !!selectedMenuDetails.appid || !!selectedMenuDetails.roles)){
+                            confirmBoxService.showInformation('Warning: the child menu item "' + selectedItem.name + '" is already configured with an application. You can create a new mid-level menu item, and move this item under it.').then(isConfirmed => {
+                                return;
+                            });
+                        }else{
+                            if(selectedItem){
+                                data = {
+                                    menuItem: {menu: _.clone(selectedItem)},
+                                    source:source,
+                                    title: getDialogTitle(source)
+                                };
+                            }
+
+                            ngDialog.open({
+                                templateUrl: 'app/views/functionalMenu/functionalMenu-dialog/menu-details.modal.html',
+                                controller: 'MenuDetailsModalCtrl',
+                                controllerAs: 'functionalMenuDetails',
+                                data: data
+                            }).closePromise.then(needUpdate => {
+                                if(needUpdate.value === true){
+                                    $log.debug('FunctionalMenuCtrl::getMenuDetails: updating table data...');
+                                    init();
+                                    //getOnboardingWidgets();
+                                }
+                            });
+                        }
+                    });
+            };
+
+            $scope.deleteMenuItem = (selectedItem,source) => {
+                $log.info('FunctionalMenuCtrl:deleteMenuItem:: delete selectedItem: ', selectedItem);
+
+                if(selectedItem.children!=null && selectedItem.children.length>0){
+                    confirmBoxService.showInformation('You are not allowed to delete a menu item that has children. You can only delete leaf menu items.').then(isConfirmed => {
+
+                    });
+                }else{
+                    confirmBoxService.deleteItem(selectedItem.name).then(isConfirmed => {
+                        if(isConfirmed){
+                            $log.info('FunctionalMenuCtrl:deleteMenuItem:: Deleting Menu Item :: name: '+selectedItem.name+'; menuId: '+selectedItem.menuId);
+                            $log.info('FunctionalMenuCtrl:deleteMenuItem:: selectedItem: ', selectedItem);
+
+                            functionalMenuService.deleteMenuItem(selectedItem.menuId).then(() => {
+                                //TODO:Have to splice menu item
+                                //this.widgetsList.splice(this.widgetsList.indexOf(widget), 1);
+                                $log.info('FunctionalMenuCtrl:deleteMenuItem:: Removed Menu Item :: '+selectedItem.name);
+                                init();
+                            }).catch(err => {
+                                $log.error(err);
+                            });
+                        }
+                    }).catch(err => {
+                        $log.error(err);
+                    });
+                }
+            };
+
+            init();
+        }
+    }
+    FunctionalMenuCtrl.$inject = ['$log', 'functionalMenuService','$scope', 'ngDialog', 'confirmBoxService'];
+    angular.module('ecompApp').controller('FunctionalMenuCtrl', FunctionalMenuCtrl);
+
+    angular.module('ecompApp').directive('jqTree', ['functionalMenuService','$log','confirmBoxService',function(functionalMenuService,$log,confirmBoxService){
+        return {
+            templateUrl: 'jqtree-tmpl.html',
+            link: function(scope, el, attrs){
+
+                var $jqTree =  el.find('#jqTree').tree({
+                    data: scope.treedata,
+                    autoOpen: false,
+                    dragAndDrop: true,
+                    onCreateLi: function(node, $li) {
+                        $li.attr('id', node.id.replace(/\s+/g,'_'));
+                    }
+                });
+
+                el.find('#jqTree').bind('tree.move',  function(event){
+                    event.preventDefault();
+                    console.log('moved_node', event.move_info.moved_node);
+                    console.log('target_node', event.move_info.target_node);
+                    console.log('position', event.move_info.position);
+                    console.log('previous_parent', event.move_info.previous_parent);
+
+
+
+                    if(event.move_info.target_node != null &&
+                        ((event.move_info.position === 'after' && event.move_info.target_node.getLevel() > 4) ||
+                        (event.move_info.position === 'inside' && event.move_info.target_node.getLevel() > 3))){
+                        confirmBoxService.showInformation('You are not allowed to have a menu item at a level greater than 4.').then(isConfirmed => {
+
+                        });
+                        return ;
+                    }
+
+                    var confMsg = 'Are you sure you want to move "'+event.move_info.moved_node.name+'" ?';
+                    if ((event.move_info.position === "inside") && (event.move_info.target_node.url != "")) {
+                        // If we are moving UNDER a node that has a url associated with it, warn the user
+                        // that all the app information will be removed if they do this.
+                        confMsg = 'Warning: You are moving "'+event.move_info.moved_node.name+'" under "'+event.move_info.target_node.name+'", which has application information associated with it. This will cause all the application information from "'+event.move_info.target_node.name+'" to be deleted.';
+                    }
+                    confirmBoxService.moveMenuItem(confMsg).then(isConfirmed => {
+                        if(isConfirmed){
+                            /*
+                             {
+                             "menuId": 129,
+                             "column": 3,
+                             "text": "",
+                             "parentMenuId": 37,
+                             "url": "",
+                             "appid": null,
+                             "roles": null
+                             }
+
+                             The menuId for the menu item being moved
+                             The column it is being moved to
+                             The parentMenuId for the parent it is being moved under
+                             */
+
+                            // The target_node is the node before the position we are
+                            // moving to. If we are moving to a lower column number, or
+                            // to a new parent, we must adjust the column to be after
+                            // the target_node.
+                            var new_column = event.move_info.target_node.column;
+                            var old_column = event.move_info.moved_node.column;
+                            if ((event.move_info.moved_node.parentMenuId !=
+                                event.move_info.target_node.parentMenuId) ||
+                                (new_column < old_column)
+                            ) {
+                                new_column += 1;
+                            }
+                            var activeMenuItem = {
+                                menuId:event.move_info.moved_node.menuId,
+                                column:new_column,
+                                text:"",
+                                parentMenuId:event.move_info.target_node.parentMenuId,
+                                url:"",
+                                appid: null,
+                                roles:null
+                            };
+                            // When position is "inside", this is a special case,
+                            // where you are moving to the first column under
+                            // a parent. The target_node is the parent node.
+                            // So we need to set the column to 1, and the parentMenuId to the menuId of
+                            // the target move.
+                            if (event.move_info.position === "inside") {
+                                console.log("special case: target_node is parent");
+                                activeMenuItem.column = 1;
+                                activeMenuItem.parentMenuId = event.move_info.target_node.menuId;
+                            }
+
+
+                            functionalMenuService.saveEditedMenuItem(activeMenuItem)
+                                .then(() => {
+                                    $log.debug(' Menu Item moved');
+                                    scope.reloadTreeStructure();
+                                }).catch(err => {
+                                $log.error(err);
+                            }).finally(()=>{
+                            });
+                        }
+                    }).catch(err => {
+                        $log.error(err);
+                    });
+
+                    //event.move_info.do_move();
+                });
+
+
+                $jqTree.jqTreeContextMenu(el.find('ul.dropdown-menu'), {
+                    "view": function (node) {scope.openMenuDetailsModal(node,'view'); },
+                    "edit": function (node) {scope.openMenuDetailsModal(node,'edit'); },
+                    "delete": function (node) { scope.deleteMenuItem(node,'delete') },
+                    "add": function (node) {  scope.createNewMenuItem(node,'add') }
+                });
+
+                scope.$watch('treedata', function(oldValue, newValue){
+                    if(oldValue !== newValue){
+                        console.log('FunctionalMenuCtrl:: Tree value has changed in some way');
+                        $jqTree.tree('loadData',  scope.treedata);
+                        $jqTree.tree('reload', function() {
+                            console.log('FunctionalMenuCtrl:: Tree is reloaded');
+                        });
+                    }
+                });
+            }
+        };
+    }]);
+
+})();
+
+
index 1a1252a..e71e7a5 100644 (file)
@@ -1,46 +1,46 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="functional-menu-main">\r
-    <div class="functional-menu-container" id="page-content">\r
-               <div id="title" class="w-ecomp-main-view-title">\r
-                <h1 class="heading-page" >Edit Functional Menu</h1>\r
-        </div>        \r
-        <div id="tree1">\r
-            <div id="Service_Creation"></div>\r
-        </div>\r
-        <div id="jq-tree-div" jq-tree class="tree"></div>\r
-        <script type="text/ng-template" id="jqtree-tmpl.html">\r
-            <div id="jqTree"></div>\r
-            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">\r
-                <li id="functional-menu-view-li"><a id="functional-menu-view-href" ng-href="#view"><i class="icon-data"></i> View</a></li>\r
-                <li class="divider"></li>\r
-                <li id="functional-menu-add-li"><a  id="functional-menu-add-href" ng-href="#add"><i class="icon-plus"></i> Add</a></li>\r
-                <li class="divider"></li>\r
-                <li id="functional-menu-edit-li"><a  id="functional-menu-edit-href"  ng-href="#edit"><i class="icon-edit"></i> Edit</a></li>\r
-                <li class="divider"></li>\r
-                <li id="functional-menu-delete-li"><a id="functional-menu-delete-href"  ng-href="#delete"><i class="icon-misc-trash"></i> Delete</a></li>\r
-            </ul>\r
-        </script>\r
-        <div class="functional-admin-button-container">\r
-       <button id="regenrate-functionalmenu-btn" class="btn btn-alt btn-small" ng-click="functionalMenu.regenerateFunctionalMenuAncestors()">Regenerate Menu</button>     \r
-            <span class="n16r" style="color:black">Click when you are done with your changes</span>\r
-        </div>\r
-    </div>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="functional-menu-main">
+    <div class="functional-menu-container" id="page-content">
+               <div id="title" class="w-ecomp-main-view-title">
+                <h1 class="heading-page" >Edit Functional Menu</h1>
+        </div>        
+        <div id="tree1">
+            <div id="Service_Creation"></div>
+        </div>
+        <div id="jq-tree-div" jq-tree class="tree"></div>
+        <script type="text/ng-template" id="jqtree-tmpl.html">
+            <div id="jqTree"></div>
+            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
+                <li id="functional-menu-view-li"><a id="functional-menu-view-href" ng-href="#view"><i class="icon-data"></i> View</a></li>
+                <li class="divider"></li>
+                <li id="functional-menu-add-li"><a  id="functional-menu-add-href" ng-href="#add"><i class="icon-plus"></i> Add</a></li>
+                <li class="divider"></li>
+                <li id="functional-menu-edit-li"><a  id="functional-menu-edit-href"  ng-href="#edit"><i class="icon-edit"></i> Edit</a></li>
+                <li class="divider"></li>
+                <li id="functional-menu-delete-li"><a id="functional-menu-delete-href"  ng-href="#delete"><i class="icon-misc-trash"></i> Delete</a></li>
+            </ul>
+        </script>
+        <div class="functional-admin-button-container">
+       <button id="regenrate-functionalmenu-btn" class="btn btn-alt btn-small" ng-click="functionalMenu.regenerateFunctionalMenuAncestors()">Regenerate Menu</button>     
+            <span class="n16r" style="color:black">Click when you are done with your changes</span>
+        </div>
+    </div>
+</div>
index 6e2be32..dba442c 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-(function ($) {\r
-       if (!$.fn.tree) {\r
-               throw "Error jqTree is not loaded.";\r
-       }\r
-\r
-       $.fn.jqTreeContextMenu = function (menuElement, callbacks) {\r
-               //\r
-               // TODO:\r
-               // * Make sure the useContextMenu option is set in jqTree, either complain or set it automatically\r
-               // * Make menu fade in/out\r
-               //\r
-               var self = this;\r
-               var $el = this;\r
-\r
-               // The jQuery object of the menu div.\r
-               var $menuEl = menuElement;\r
-               \r
-               // This hash holds all menu items that should be disabled for a specific node.\r
-               var nodeToDisabledMenuItems = {};\r
-               \r
-               // Hide the menu div.\r
-               $menuEl.hide();\r
-\r
-               // Disable system context menu from beeing displayed.\r
-               $el.bind("contextmenu", function (e) { \r
-                       e.preventDefault();\r
-                       return false; \r
-               });\r
-\r
-               // Handle the contextmenu event sent from jqTree when user clicks right mouse button.\r
-               $el.bind('tree.contextmenu', function (event) {\r
-                       var x = event.click_event.pageX;\r
-                       var y = event.click_event.pageY;\r
-                       var yPadding = 5;\r
-                       var xPadding = 5;\r
-                       var menuHeight = $menuEl.height();\r
-                       var menuWidth = $menuEl.width();\r
-                       var windowHeight = $(window).height();\r
-                       var windowWidth = $(window).width();\r
-                       \r
-                       if (menuHeight + y + yPadding > windowHeight) {\r
-                               // Make sure the whole menu is rendered within the viewport. \r
-                               y = y - menuHeight;\r
-                       }\r
-                       if (menuWidth + x + xPadding > windowWidth) {\r
-                               // Make sure the whole menu is rendered within the viewport. \r
-                               x = x - menuWidth;\r
-                       }\r
-\r
-                       // Handle disabling and enabling of menu items on specific nodes.\r
-                       if (Object.keys(nodeToDisabledMenuItems).length > 0) {\r
-                               if (event.node.name in nodeToDisabledMenuItems) {\r
-                                       var nodeName = event.node.name;\r
-                                       var items = nodeToDisabledMenuItems[nodeName];\r
-                                       if (items.length === 0) {\r
-                                               $menuEl.find('li').addClass('disabled');\r
-                                               $menuEl.find('li > a').unbind('click');\r
-                                       } else {\r
-                                               $menuEl.find('li > a').each(function () {\r
-                                                       $(this).closest('li').removeClass('disabled');\r
-                                                       var hrefValue = $(this).attr('href');\r
-                                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)\r
-                                                       if ($.inArray(value, items) > -1) {\r
-                                                               $(this).closest('li').addClass('disabled');\r
-                                                               $(this).unbind('click');\r
-                                                       }\r
-                                               });     \r
-                                       }\r
-                               } else {\r
-                                       $menuEl.find('li.disabled').removeClass('disabled');\r
-                               }\r
-                       }\r
-\r
-                       // Must call show before we set the offset (offset can not be set on display: none elements).\r
-                       $menuEl.show();\r
-\r
-                       $menuEl.offset({ left: x, top: y });\r
-\r
-                       var dismissContextMenu = function () {\r
-                               $(document).unbind('click.jqtreecontextmenu');\r
-                               $el.unbind('tree.click.jqtreecontextmenu');\r
-                               $menuEl.hide();\r
-                       }\r
-                       // Make it possible to dismiss context menu by clicking somewhere in the document.\r
-                       $(document).bind('click.jqtreecontextmenu', function () {\r
-                               dismissContextMenu();\r
-                       });\r
-\r
-                       // Dismiss context menu if another node in the tree is clicked.\r
-                       $el.bind('tree.click.jqtreecontextmenu', function (e) {\r
-                               dismissContextMenu();\r
-                       });\r
-\r
-                       // Make selection follow the node that was right clicked on.\r
-                       var selectedNode = $el.tree('getSelectedNode');\r
-                       if (selectedNode !== event.node) {\r
-                               $el.tree('selectNode', event.node);\r
-                       }\r
-\r
-                       // Handle click on menu items, if it's not disabled.\r
-                       var menuItems = $menuEl.find('li:not(.disabled) a');\r
-                       if (menuItems.length !== 0) {\r
-                               menuItems.unbind('click');\r
-                               menuItems.click(function (e) {\r
-                                       e.stopImmediatePropagation();\r
-                                       dismissContextMenu();\r
-                                       var hrefAnchor = e.currentTarget.attributes.href.nodeValue;\r
-                                       var funcKey = hrefAnchor.slice(hrefAnchor.indexOf("#") + 1, hrefAnchor.length)\r
-                                       var callbackFn = callbacks[funcKey];\r
-                                       if (callbackFn) {\r
-                                               callbackFn(event.node);\r
-                                       }\r
-                                       return false;\r
-                               });\r
-                       }\r
-               });\r
-               \r
-               this.disable = function () {\r
-                       if (arguments.length === 0) {\r
-                               // Called as: api.disable()\r
-                               $menuEl.find('li:not(.disabled)').addClass('disabled');\r
-                               $menuEl.find('li a').unbind('click');\r
-                               nodeToDisabledMenuItems = {};\r
-                       } else if (arguments.length === 1) {\r
-                               // Called as: api.disable(['edit','remove'])\r
-                               var items = arguments[0];\r
-                               if (typeof items !== 'object') {\r
-                                       return;\r
-                               }\r
-                               $menuEl.find('li > a').each(function () {\r
-                                       var hrefValue = $(this).attr('href');\r
-                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)\r
-                                       if ($.inArray(value, items) > -1) {\r
-                                               $(this).closest('li').addClass('disabled');\r
-                                               $(this).unbind('click');\r
-                                       }\r
-                               });\r
-                               nodeToDisabledMenuItems = {};\r
-                       } else if (arguments.length === 2) {\r
-                               // Called as: api.disable(nodeName, ['edit','remove'])\r
-                               var nodeName = arguments[0];\r
-                               var items = arguments[1];\r
-                               nodeToDisabledMenuItems[nodeName] = items;\r
-                       }\r
-               };\r
-\r
-               this.enable = function () {\r
-                       if (arguments.length === 0) {\r
-                               // Called as: api.enable()\r
-                               $menuEl.find('li.disabled').removeClass('disabled');\r
-                               nodeToDisabledMenuItems = {};\r
-                       } else if (arguments.length === 1) {\r
-                               // Called as: api.enable(['edit','remove'])\r
-                               var items = arguments[0];\r
-                               if (typeof items !== 'object') {\r
-                                       return;\r
-                               }\r
-                               \r
-                               $menuEl.find('li > a').each(function () {\r
-                                       var hrefValue = $(this).attr('href');\r
-                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)\r
-                                       if ($.inArray(value, items) > -1) {\r
-                                               $(this).closest('li').removeClass('disabled');\r
-                                       }\r
-                               });\r
-\r
-                               nodeToDisabledMenuItems = {};\r
-                       } else if (arguments.length === 2) {\r
-                               // Called as: api.enable(nodeName, ['edit','remove'])\r
-                               var nodeName = arguments[0];\r
-                               var items = arguments[1];\r
-                               if (items.length === 0) {\r
-                                       delete nodeToDisabledMenuItems[nodeName];\r
-                               } else {\r
-                                       var disabledItems = nodeToDisabledMenuItems[nodeName];\r
-                                       for (var i = 0; i < items.length; i++) {\r
-                                               var idx = disabledItems.indexOf(items[i]);\r
-                                               if (idx > -1) {\r
-                                                       disabledItems.splice(idx, 1);\r
-                                               }\r
-                                       }\r
-                                       if (disabledItems.length === 0) {\r
-                                               delete nodeToDisabledMenuItems[nodeName];\r
-                                       } else {\r
-                                               nodeToDisabledMenuItems[nodeName] = disabledItems;      \r
-                                       }\r
-                               }\r
-                               if (Object.keys(nodeToDisabledMenuItems).length === 0) {\r
-                                       $menuEl.find('li.disabled').removeClass('disabled');\r
-                               }\r
-                       }\r
-               };\r
-               return this;\r
-       };\r
-} (jQuery));\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+(function ($) {
+       if (!$.fn.tree) {
+               throw "Error jqTree is not loaded.";
+       }
+
+       $.fn.jqTreeContextMenu = function (menuElement, callbacks) {
+               //
+               // TODO:
+               // * Make sure the useContextMenu option is set in jqTree, either complain or set it automatically
+               // * Make menu fade in/out
+               //
+               var self = this;
+               var $el = this;
+
+               // The jQuery object of the menu div.
+               var $menuEl = menuElement;
+               
+               // This hash holds all menu items that should be disabled for a specific node.
+               var nodeToDisabledMenuItems = {};
+               
+               // Hide the menu div.
+               $menuEl.hide();
+
+               // Disable system context menu from beeing displayed.
+               $el.bind("contextmenu", function (e) { 
+                       e.preventDefault();
+                       return false; 
+               });
+
+               // Handle the contextmenu event sent from jqTree when user clicks right mouse button.
+               $el.bind('tree.contextmenu', function (event) {
+                       var x = event.click_event.pageX;
+                       var y = event.click_event.pageY;
+                       var yPadding = 5;
+                       var xPadding = 5;
+                       var menuHeight = $menuEl.height();
+                       var menuWidth = $menuEl.width();
+                       var windowHeight = $(window).height();
+                       var windowWidth = $(window).width();
+                       
+                       if (menuHeight + y + yPadding > windowHeight) {
+                               // Make sure the whole menu is rendered within the viewport. 
+                               y = y - menuHeight;
+                       }
+                       if (menuWidth + x + xPadding > windowWidth) {
+                               // Make sure the whole menu is rendered within the viewport. 
+                               x = x - menuWidth;
+                       }
+
+                       // Handle disabling and enabling of menu items on specific nodes.
+                       if (Object.keys(nodeToDisabledMenuItems).length > 0) {
+                               if (event.node.name in nodeToDisabledMenuItems) {
+                                       var nodeName = event.node.name;
+                                       var items = nodeToDisabledMenuItems[nodeName];
+                                       if (items.length === 0) {
+                                               $menuEl.find('li').addClass('disabled');
+                                               $menuEl.find('li > a').unbind('click');
+                                       } else {
+                                               $menuEl.find('li > a').each(function () {
+                                                       $(this).closest('li').removeClass('disabled');
+                                                       var hrefValue = $(this).attr('href');
+                                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)
+                                                       if ($.inArray(value, items) > -1) {
+                                                               $(this).closest('li').addClass('disabled');
+                                                               $(this).unbind('click');
+                                                       }
+                                               });     
+                                       }
+                               } else {
+                                       $menuEl.find('li.disabled').removeClass('disabled');
+                               }
+                       }
+
+                       // Must call show before we set the offset (offset can not be set on display: none elements).
+                       $menuEl.show();
+
+                       $menuEl.offset({ left: x, top: y });
+
+                       var dismissContextMenu = function () {
+                               $(document).unbind('click.jqtreecontextmenu');
+                               $el.unbind('tree.click.jqtreecontextmenu');
+                               $menuEl.hide();
+                       }
+                       // Make it possible to dismiss context menu by clicking somewhere in the document.
+                       $(document).bind('click.jqtreecontextmenu', function () {
+                               dismissContextMenu();
+                       });
+
+                       // Dismiss context menu if another node in the tree is clicked.
+                       $el.bind('tree.click.jqtreecontextmenu', function (e) {
+                               dismissContextMenu();
+                       });
+
+                       // Make selection follow the node that was right clicked on.
+                       var selectedNode = $el.tree('getSelectedNode');
+                       if (selectedNode !== event.node) {
+                               $el.tree('selectNode', event.node);
+                       }
+
+                       // Handle click on menu items, if it's not disabled.
+                       var menuItems = $menuEl.find('li:not(.disabled) a');
+                       if (menuItems.length !== 0) {
+                               menuItems.unbind('click');
+                               menuItems.click(function (e) {
+                                       e.stopImmediatePropagation();
+                                       dismissContextMenu();
+                                       var hrefAnchor = e.currentTarget.attributes.href.nodeValue;
+                                       var funcKey = hrefAnchor.slice(hrefAnchor.indexOf("#") + 1, hrefAnchor.length)
+                                       var callbackFn = callbacks[funcKey];
+                                       if (callbackFn) {
+                                               callbackFn(event.node);
+                                       }
+                                       return false;
+                               });
+                       }
+               });
+               
+               this.disable = function () {
+                       if (arguments.length === 0) {
+                               // Called as: api.disable()
+                               $menuEl.find('li:not(.disabled)').addClass('disabled');
+                               $menuEl.find('li a').unbind('click');
+                               nodeToDisabledMenuItems = {};
+                       } else if (arguments.length === 1) {
+                               // Called as: api.disable(['edit','remove'])
+                               var items = arguments[0];
+                               if (typeof items !== 'object') {
+                                       return;
+                               }
+                               $menuEl.find('li > a').each(function () {
+                                       var hrefValue = $(this).attr('href');
+                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)
+                                       if ($.inArray(value, items) > -1) {
+                                               $(this).closest('li').addClass('disabled');
+                                               $(this).unbind('click');
+                                       }
+                               });
+                               nodeToDisabledMenuItems = {};
+                       } else if (arguments.length === 2) {
+                               // Called as: api.disable(nodeName, ['edit','remove'])
+                               var nodeName = arguments[0];
+                               var items = arguments[1];
+                               nodeToDisabledMenuItems[nodeName] = items;
+                       }
+               };
+
+               this.enable = function () {
+                       if (arguments.length === 0) {
+                               // Called as: api.enable()
+                               $menuEl.find('li.disabled').removeClass('disabled');
+                               nodeToDisabledMenuItems = {};
+                       } else if (arguments.length === 1) {
+                               // Called as: api.enable(['edit','remove'])
+                               var items = arguments[0];
+                               if (typeof items !== 'object') {
+                                       return;
+                               }
+                               
+                               $menuEl.find('li > a').each(function () {
+                                       var hrefValue = $(this).attr('href');
+                                       var value = hrefValue.slice(hrefValue.indexOf("#") + 1, hrefValue.length)
+                                       if ($.inArray(value, items) > -1) {
+                                               $(this).closest('li').removeClass('disabled');
+                                       }
+                               });
+
+                               nodeToDisabledMenuItems = {};
+                       } else if (arguments.length === 2) {
+                               // Called as: api.enable(nodeName, ['edit','remove'])
+                               var nodeName = arguments[0];
+                               var items = arguments[1];
+                               if (items.length === 0) {
+                                       delete nodeToDisabledMenuItems[nodeName];
+                               } else {
+                                       var disabledItems = nodeToDisabledMenuItems[nodeName];
+                                       for (var i = 0; i < items.length; i++) {
+                                               var idx = disabledItems.indexOf(items[i]);
+                                               if (idx > -1) {
+                                                       disabledItems.splice(idx, 1);
+                                               }
+                                       }
+                                       if (disabledItems.length === 0) {
+                                               delete nodeToDisabledMenuItems[nodeName];
+                                       } else {
+                                               nodeToDisabledMenuItems[nodeName] = disabledItems;      
+                                       }
+                               }
+                               if (Object.keys(nodeToDisabledMenuItems).length === 0) {
+                                       $menuEl.find('li.disabled').removeClass('disabled');
+                               }
+                       }
+               };
+               return this;
+       };
+} (jQuery));
diff --git a/ecomp-portal-FE-os/client/src/views/header/header-extension.tpl.html b/ecomp-portal-FE-os/client/src/views/header/header-extension.tpl.html
new file mode 100644 (file)
index 0000000..8c7ee40
--- /dev/null
@@ -0,0 +1,3 @@
+<button href="javascript:void(0)" id="allLogout" ng-click="editProfile()" class="btn btn-alt btn-small">
+       Profile
+</button>
\ No newline at end of file
diff --git a/ecomp-portal-FE-os/client/src/views/header/header-logo.html b/ecomp-portal-FE-os/client/src/views/header/header-logo.html
new file mode 100644 (file)
index 0000000..0ab0560
--- /dev/null
@@ -0,0 +1 @@
+<img src="assets/images/onap-logo.png" alt="Onap Logo" class="onap-title-logo" >
diff --git a/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.controller.js b/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.controller.js
new file mode 100644 (file)
index 0000000..4720e75
--- /dev/null
@@ -0,0 +1,87 @@
+/*-
+ * ================================================================================
+ * eCOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+    class EditProfileModalCtrl {
+        constructor($log,ngDialog,usersService,confirmBoxService,adminsService) {
+               this.firstName ='';
+               this.middleName ='';
+               this.lastName ='';
+               this.email ='';
+               this.loginId ='';
+               this.loginPwd ='';
+               this.confirmLoginPwd=''
+               this.isLoading = false;
+               let getUser  = () => {
+                       this.isLoading = true;
+                       usersService.getLoggedInUser()
+               .then(user=> {
+                       var data = user.response;
+                       console.log(data);
+                       this.firstName =data.firstName;
+                       this.middleName =data.middleName;
+                       this.lastName =data.lastName;
+                       this.email =data.email;
+                       this.loginId =data.loginId;
+                       this.loginPwd =data.loginPassword;
+                       this.isLoading = false;
+               }).catch(err=> {
+                       $log.error('EditProfileModalCtrl.getUser:: Error retrieving ECMOP portal user: ' + err);
+               });
+            }
+               getUser();
+               
+               this.save = ()=>{
+                       var profileDetail ={
+                                       firstName :     this.firstName,
+                               middleName :this.middleName,
+                       lastName :this.lastName,
+                       email :this.email,
+                       loginId :this.loginId,
+                       loginPassword :this.loginPwd
+                       }
+                       if (this.firstName =='' || this.lastName == '' || this.email == '' || this.loginId =='' || this.loginPwd ==''|| this.confirmLoginPwd ==''){
+                               var warningMsg = "Please enter a value for all fields marked with *.";
+                               confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});
+                               return;
+                       } else if (this.loginPwd != this.confirmLoginPwd) {
+                               var warningMsg = "Passwords do not match, please try again.";
+                               confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});
+                               return;
+                       } else {
+                               // check password length complexity.
+                               var warningMsg = adminsService.isComplexPassword(this.loginPwd);
+                               if (warningMsg != null) {
+                                       confirmBoxService.showInformation(warningMsg).then(isConfirmed => {return;});
+                                       return;
+                               }
+                       }
+                       usersService.modifyLoggedInUser(profileDetail).then(res=> {
+                               confirmBoxService.showInformation("Profile detail updated").then(isConfirmed => {return;});
+                       }).catch(err=> {
+                               $log.error('EditProfileModalCtrl.getUser:: Error retrieving ECMOP portal user: ' + err);
+                               confirmBoxService.showInformation("Error while updating profile detail: "+ err).then(isConfirmed => {return;});
+                       });
+               }
+        }
+    }
+    EditProfileModalCtrl.$inject = ['$log', 'ngDialog','usersService','confirmBoxService','adminsService'];
+    angular.module('ecompApp').controller('EditProfileModalCtrl', EditProfileModalCtrl);
+})();
diff --git a/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.html b/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.html
new file mode 100644 (file)
index 0000000..cfe5a15
--- /dev/null
@@ -0,0 +1,69 @@
+<!--
+  ================================================================================
+  eCOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="profile-detail-modal">
+       <div id="div-profile-detail" class="prodile-detail">
+               <div class="title" id="title">Profile Detail</div>
+               <span class="ecomp-spinner" ng-show="profileDetail.isLoading"></span>
+               
+               <div class="app-roles-main" ng-hide="profileDetail.isLoading">
+                       <div id="profile-div">
+                               <div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*First Name</div>
+                                               <input type="text" ng-model="profileDetail.firstName" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">Middle Name</div>
+                                               <input type="text" ng-model="profileDetail.middleName" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*Last Name</div>
+                                               <input type="text" ng-model="profileDetail.lastName" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*Email Address ID</div>
+                                               <input type="text" ng-model="profileDetail.email"  readonly="readonly" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*Login ID</div>
+                                               <input type="text" ng-model="profileDetail.loginId"  readonly="readonly" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*Login Password</div>
+                                               <input type="password" ng-model="profileDetail.loginPwd" />
+                                       </div>
+                                       <div class="profile-edit-div">
+                                               <div class="">*Confirm Login Password</div>
+                                               <input type="password"
+                                                       ng-model="profileDetail.confirmLoginPwd" />
+                                       </div>
+                               </div>
+                       </div>
+                       <div class="dialog-control">
+                               <span class="ecomp-save-spinner" ng-show="newAdmin.isSaving"></span>
+                               <button id="div-updateAdminAppsRoles" class="btn btn-alt btn-small"
+                                       ng-click="profileDetail.save()"
+                                       ng-class="{disabled: false}">Save</button>
+                               <button id="div-cancel-button" class="btn btn-alt btn-small"
+                                       ng-click="closeThisDialog()">Cancel</button>
+                       </div>
+               </div>
+       </div>
+</div>
diff --git a/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.less b/ecomp-portal-FE-os/client/src/views/header/profile-edit-dialogs/profile-edit.modal.less
new file mode 100644 (file)
index 0000000..b103f30
--- /dev/null
@@ -0,0 +1,21 @@
+.profile-detail-modal {
+  height: 430px;
+  margin-left: 20px;
+  
+  .prodile-detail {
+    .title {
+      //.n18r;
+      .dGray18r; 
+      border-bottom: @blue-active 3px solid;
+
+     }
+  }
+  
+  
+  .profile-edit-div{
+           display: inline-block;
+           width: 240px;
+           margin-left: 10px;
+  }
+}
+
index 3c3c2a0..3cb22bf 100644 (file)
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
-'use strict';\r
-(function () {\r
-\r
-    class SearchCtrl {\r
-        constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService, dashboardService) {\r
-            $scope.firstName="";\r
-            $scope.lastName="";\r
-            \r
-            function  showHideSearchSnippet() {\r
-               \r
-               setTimeout(function() {\r
-                               jQuery("#mainSearchSnippet").click();\r
-                               },500);\r
-                       \r
-                       setTimeout(function() {\r
-                               jQuery("#mainSearchText").focus();\r
-                               },1000);\r
-            }\r
-            \r
-            jQuery("#mainSearchDiv").keyup(function(event){\r
-                if(event.keyCode == 13){\r
-                    // there is a watch on this variable which will trigger the database pull\r
-                       dashboardService.searchString = jQuery("#mainSearchText").val();\r
-                       \r
-                       // opens the popup\r
-                    var popupDomObj = jQuery("[content='searchSnippet.html']");\r
-                       if(popupDomObj.length == 0) {\r
-                               showHideSearchSnippet();\r
-                       } else {\r
-                               jQuery("#mainSearchSnippet").click();\r
-                               showHideSearchSnippet();\r
-                       }\r
-                                               \r
-                       \r
-                        \r
-                }\r
-            });\r
-            \r
-            \r
-            \r
-        }\r
-        \r
-        \r
-    }\r
-    \r
-    \r
-    class SearchSnippetCtrl {\r
-       constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService, dashboardService,applicationsService, $window, $state) {\r
-            $scope.firstName="";\r
-            $scope.lastName="";\r
-            $scope.goToUrl = goToUrl;\r
-            $scope.dService = dashboardService;\r
-            \r
-            $scope.searchResDialog = false;\r
-            $scope.searchDialogToggle = function($event){\r
-                var keyCode = $event.which || $event.keyCode;\r
-                if (keyCode === 13) {\r
-                       $scope.searchResDialog = true;               \r
-                       dashboardService.searchString = jQuery("#mainSearchText").val();\r
-                }\r
-               \r
-            }\r
-            \r
-            window.onclick = function() {\r
-                       if ($scope.searchResDialog) {\r
-                               $scope.searchResDialog = false;\r
-                               $scope.$apply();\r
-                       }\r
-               };      \r
-            function goToUrl (item, type) {\r
-                $log.info("goToUrl called")\r
-                $log.info(item + "/" + type);\r
-                \r
-                \r
-                if(type == 'intra') {\r
-                       \r
-                       var intraSearcLink = "";\r
-                       var intraSpecSearcLink = intraSearcLink + encodeURIComponent(dashboardService.searchString);\r
-                       $window.open(intraSpecSearcLink, '_blank');\r
-                       \r
-                } else if (type == 'extra') {\r
-                       var extraSearcLink = "";\r
-                       var extraSpecSearcLink = extraSearcLink + encodeURIComponent(dashboardService.searchString);\r
-                       $window.open(extraSpecSearcLink, '_blank');\r
-                }\r
-\r
-                let url = item.target;\r
-                let restrictedApp = item.uuid;\r
-                let getAccessState =  "root.getAccess"\r
-                if (!url) {\r
-                       \r
-                       applicationsService.goGetAccessAppName = item.name;\r
-                       if($state.current.name == getAccessState)\r
-                               $state.reload();\r
-                       else\r
-                               $state.go(getAccessState);\r
-                    //$log.info('No url found for this application, doing nothing..');\r
-                    return;\r
-                }\r
-                \r
-                if (restrictedApp != "true") {\r
-                    $window.open(url, '_blank');\r
-                } else {\r
-                       if(item.url=="root.access"){\r
-                               $state.go(url);\r
-                               var tabContent = { id: new Date(), title: 'Home', url: url };\r
-                       $cookies.putObject('addTab', tabContent );\r
-                       } else {\r
-                       var tabContent = { id: new Date(), title: item.name, url: url };\r
-                       $cookies.putObject('addTab', tabContent );\r
-                    }\r
-                }\r
-\r
-            }\r
-            \r
-            function getItems(searchString) {\r
-               \r
-               var items;\r
-               var itemMap = dashboardService.getSearchAllByStringResults(searchString)                \r
-                .then(res => {\r
-                        $scope.items = res;\r
-                        \r
-                        \r
-                }).catch(err => {\r
-                        $scope.items = [];\r
-                     $log.error('Couldnt get search results...', err)\r
-                });\r
-\r
-            }\r
-            \r
-            $scope.$watch('dService.searchString', function(searchString) {\r
-                if(searchString != undefined )\r
-                       getItems(searchString);\r
-\r
-            });\r
-            \r
-             \r
-            \r
-        }\r
-        \r
-        \r
-        \r
-    }\r
-    \r
-    \r
-\r
-    SearchCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService', 'dashboardService'];\r
-    SearchSnippetCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService', 'dashboardService','applicationsService', '$window','$state'];\r
-    angular.module('ecompApp').controller('searchCtrl', SearchCtrl); \r
-    angular.module('ecompApp').controller('searchSnippetCtrl', SearchSnippetCtrl);\r
-    angular.module('ecompApp').directive('searchBox', function() {\r
-        return {\r
-            restrict: "E",\r
-            templateUrl: 'app/views/search/search.tpl.html',\r
-            link: function(scope, element) {\r
-                               \r
-               //var iframeId = "#tabframe-" + scope.$parent.tab.title.split(' ').join('-');\r
-               // jQuery(iframeId).load(function() {\r
-               //        alert("hello");\r
-               //    }); //.attr("src",'{{tab.content | trusted}}' ); //src='{{tab.content | trusted}}'\r
-               // jQuery(iframeId).attr('src', '{{tab.content | trusted}}');\r
-                \r
-               //element.childNodes[0].on('load', function() {\r
-               //      alert('hello');\r
-               //});\r
-            }\r
-        }\r
-    });\r
-    angular.module( 'ecompApp' ).config( [\r
-        '$compileProvider',\r
-        function( $compileProvider )\r
-        {   \r
-            $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|qto):/);\r
-        }\r
-    ]);\r
-\r
-})();\r
-\r
-\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+'use strict';
+(function () {
+
+    class SearchCtrl {
+        constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService, dashboardService) {
+            $scope.firstName="";
+            $scope.lastName="";
+            
+            function  showHideSearchSnippet() {
+               
+               setTimeout(function() {
+                               jQuery("#mainSearchSnippet").click();
+                               },500);
+                       
+                       setTimeout(function() {
+                               jQuery("#mainSearchText").focus();
+                               },1000);
+            }
+            
+            jQuery("#mainSearchDiv").keyup(function(event){
+                if(event.keyCode == 13){
+                    // there is a watch on this variable which will trigger the database pull
+                       dashboardService.searchString = jQuery("#mainSearchText").val();
+                       
+                       // opens the popup
+                    var popupDomObj = jQuery("[content='searchSnippet.html']");
+                       if(popupDomObj.length == 0) {
+                               showHideSearchSnippet();
+                       } else {
+                               jQuery("#mainSearchSnippet").click();
+                               showHideSearchSnippet();
+                       }
+                                               
+                       
+                        
+                }
+            });
+            
+            
+            
+        }
+        
+        
+    }
+    
+    
+    class SearchSnippetCtrl {
+       constructor($log, $scope, $cookies, $timeout, userProfileService, sessionService, dashboardService,applicationsService, $window, $state) {
+            $scope.firstName="";
+            $scope.lastName="";
+            $scope.goToUrl = goToUrl;
+            $scope.dService = dashboardService;
+            
+            $scope.searchResDialog = false;
+            $scope.searchDialogToggle = function($event){
+                var keyCode = $event.which || $event.keyCode;
+                if (keyCode === 13) {
+                       $scope.searchResDialog = true;               
+                       dashboardService.searchString = jQuery("#mainSearchText").val();
+                }
+               
+            }
+            
+            window.onclick = function() {
+                       if ($scope.searchResDialog) {
+                               $scope.searchResDialog = false;
+                               $scope.$apply();
+                       }
+               };      
+            function goToUrl (item, type) {
+                $log.info("goToUrl called")
+                $log.info(item + "/" + type);
+                
+                
+                if(type == 'intra') {
+                       
+                       var intraSearcLink = "";
+                       var intraSpecSearcLink = intraSearcLink + encodeURIComponent(dashboardService.searchString);
+                       $window.open(intraSpecSearcLink, '_blank');
+                       
+                } else if (type == 'extra') {
+                       var extraSearcLink = "";
+                       var extraSpecSearcLink = extraSearcLink + encodeURIComponent(dashboardService.searchString);
+                       $window.open(extraSpecSearcLink, '_blank');
+                }
+
+                let url = item.target;
+                let restrictedApp = item.uuid;
+                let getAccessState =  "root.getAccess"
+                if (!url) {
+                       
+                       applicationsService.goGetAccessAppName = item.name;
+                       if($state.current.name == getAccessState)
+                               $state.reload();
+                       else
+                               $state.go(getAccessState);
+                    //$log.info('No url found for this application, doing nothing..');
+                    return;
+                }
+                
+                if (restrictedApp != "true") {
+                    $window.open(url, '_blank');
+                } else {
+                       if(item.url=="root.access"){
+                               $state.go(url);
+                               var tabContent = { id: new Date(), title: 'Home', url: url };
+                       $cookies.putObject('addTab', tabContent );
+                       } else {
+                       var tabContent = { id: new Date(), title: item.name, url: url };
+                       $cookies.putObject('addTab', tabContent );
+                    }
+                }
+
+            }
+            
+            function getItems(searchString) {
+               
+               var items;
+               var itemMap = dashboardService.getSearchAllByStringResults(searchString)                
+                .then(res => {
+                        $scope.items = res;
+                        
+                        
+                }).catch(err => {
+                        $scope.items = [];
+                     $log.error('Couldnt get search results...', err)
+                });
+
+            }
+            
+            $scope.$watch('dService.searchString', function(searchString) {
+                if(searchString != undefined )
+                       getItems(searchString);
+
+            });
+            
+             
+            
+        }
+        
+        
+        
+    }
+    
+    
+
+    SearchCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService', 'dashboardService'];
+    SearchSnippetCtrl.$inject = ['$log', '$scope', '$cookies', '$timeout','userProfileService', 'sessionService', 'dashboardService','applicationsService', '$window','$state'];
+    angular.module('ecompApp').controller('searchCtrl', SearchCtrl); 
+    angular.module('ecompApp').controller('searchSnippetCtrl', SearchSnippetCtrl);
+    angular.module('ecompApp').directive('searchBox', function() {
+        return {
+            restrict: "E",
+            templateUrl: 'app/views/search/search.tpl.html',
+            link: function(scope, element) {
+                               
+               //var iframeId = "#tabframe-" + scope.$parent.tab.title.split(' ').join('-');
+               // jQuery(iframeId).load(function() {
+               //        alert("hello");
+               //    }); //.attr("src",'{{tab.content | trusted}}' ); //src='{{tab.content | trusted}}'
+               // jQuery(iframeId).attr('src', '{{tab.content | trusted}}');
+                
+               //element.childNodes[0].on('load', function() {
+               //      alert('hello');
+               //});
+            }
+        }
+    });
+    angular.module( 'ecompApp' ).config( [
+        '$compileProvider',
+        function( $compileProvider )
+        {   
+            $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|qto):/);
+        }
+    ]);
+
+})();
+
+
index 3841a2b..32cc3a1 100644 (file)
@@ -1,19 +1,19 @@
-/*-\r
- * ================================================================================\r
- * ECOMP Portal\r
- * ================================================================================\r
- * Copyright (C) 2017 AT&T Intellectual Property\r
- * ================================================================================\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- * \r
- *      http://www.apache.org/licenses/LICENSE-2.0\r
- * \r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- * ================================================================================\r
- */\r
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
index 822c509..c65fb69 100644 (file)
@@ -1,25 +1,25 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="contactUs-general-div">\r
-       <span class="contactUs-txt">To give feedback or report an issue\r
-               to the OpenECOMP Portal team, send email to <a\r
-               ng-href="mailto:{{contact.portalInfo_Address}}" target="_top">{{contact.portalInfo_Address}}</a>.\r
-       \r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="contactUs-general-div">
+       <span class="contactUs-txt">To give feedback or report an issue
+               to the OpenECOMP Portal team, send email to <a
+               ng-href="mailto:{{contact.portalInfo_Address}}" target="_top">{{contact.portalInfo_Address}}</a>.
+       
+</div>
index a8a42c1..33fb8a5 100644 (file)
@@ -1,24 +1,24 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<div class="get-access-general-div">\r
-       <span> Request access for following functions by sending email to the Application's Admin. For Admin contact details, please\r
-        <a href="contactUs">click here</a>. \r
-       </span>\r
-</div>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<div class="get-access-general-div">
+       <span> Request access for following functions by sending email to the Application's Admin. For Admin contact details, please
+        <a href="contactUs">click here</a>. 
+       </span>
+</div>
index b40a174..669de8c 100644 (file)
@@ -1,20 +1,20 @@
-<!--\r
-  ================================================================================\r
-  ECOMP Portal\r
-  ================================================================================\r
-  Copyright (C) 2017 AT&T Intellectual Property\r
-  ================================================================================\r
-  Licensed under the Apache License, Version 2.0 (the "License");\r
-  you may not use this file except in compliance with the License.\r
-  You may obtain a copy of the License at\r
-  \r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-  \r
-  Unless required by applicable law or agreed to in writing, software\r
-  distributed under the License is distributed on an "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-  See the License for the specific language governing permissions and\r
-  limitations under the License.\r
-  ================================================================================\r
-  -->\r
-<right-menu id="userbar.userList" user-list="userList" class="w-ecomp-sidebar"></right-menu>\r
+<!--
+  ================================================================================
+  ECOMP Portal
+  ================================================================================
+  Copyright (C) 2017 AT&T Intellectual Property
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ================================================================================
+  -->
+<right-menu id="userbar.userList" user-list="userList" class="w-ecomp-sidebar"></right-menu>
index ca81181..011a924 100644 (file)
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">\r
-       <modelVersion>4.0.0</modelVersion>\r
-       <groupId>org.openecomp.portal</groupId>\r
-       <artifactId>ecompportal-FE-os</artifactId>\r
-       <version>1.1</version>\r
-\r
-       <properties>\r
-               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.openecomp.portal</groupId>
+       <artifactId>ecompportal-FE-os</artifactId>
+       <version>1.1</version>
+
+       <properties>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <skipnode>false</skipnode>
-               <skipcopy>false</skipcopy>\r
-       </properties>\r
-\r
-       <build>\r
-               <plugins>\r
-                       <plugin>\r
-                               <artifactId>maven-clean-plugin</artifactId>\r
-                               <version>3.0.0</version>\r
-                               <configuration>\r
-                                       <filesets>\r
-                                               <fileset>\r
-                                                       <directory>${basedir}/client/app</directory>\r
-                                               </fileset>\r
-                                               <fileset>\r
-                                                       <directory>${basedir}/.tmp</directory>\r
-                                               </fileset>\r
-                                       </filesets>\r
-                               </configuration>\r
-                       </plugin>\r
-\r
-                       <plugin>\r
-                               <groupId>org.apache.maven.plugins</groupId>\r
-                               <artifactId>maven-resources-plugin</artifactId>\r
-                               <version>3.0.2</version>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <id>copy-src</id>\r
-                                               <phase>generate-resources</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/client/app</outputDirectory>\r
-                                                       <overwrite>false</overwrite>\r
-                                                       <skip>${skipcopy}</skip>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>${basedir}/client/src</directory>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>copy-common</id>\r
-                                               <phase>generate-resources</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/client/app</outputDirectory>\r
-                                                       <overwrite>false</overwrite>\r
-                                                       <skip>${skipcopy}</skip>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>../ecomp-portal-FE-common/client/app</directory>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <!-- copy b2b library into att template -->\r
-                                       <execution>\r
-                                               <id>copy-bower-components-external</id>\r
-                                               <phase>generate-resources</phase>\r
-                                               <goals>\r
-                                                       <goal>copy-resources</goal>\r
-                                               </goals>\r
-                                               <configuration>\r
-                                                       <outputDirectory>${basedir}/client/bower_components_external</outputDirectory>\r
-                                                       <overwrite>false</overwrite>\r
-                                                       <skip>${skipcopy}</skip>\r
-                                                       <resources>\r
-                                                               <resource>\r
-                                                                       <directory>../ecomp-portal-FE-common/client/bower_components_external</directory>\r
-                                                               </resource>\r
-                                                       </resources>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                               </executions>\r
-                       </plugin>\r
-\r
-                       <plugin>\r
-                               <groupId>com.github.eirslett</groupId>\r
-                               <artifactId>frontend-maven-plugin</artifactId>\r
-                               <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->\r
-                               <version>1.3</version>\r
-                               <configuration>\r
-                                       <skip>${skipnode}</skip>\r
-                                       <nodeVersion>v7.5.0</nodeVersion>\r
-                                       <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>\r
-                                       <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>\r
-                                       <installDirectory>./</installDirectory>\r
-                               </configuration>\r
-                               <executions>\r
-                                       <execution>\r
-                                               <!-- optional: you don't really need execution ids, but it looks nice \r
-                                                       in your build log. -->\r
-                                               <id>install node and npm</id>\r
-                                               <goals>\r
-                                                       <goal>install-node-and-npm</goal>\r
-                                               </goals>\r
-                                               <phase>generate-resources</phase>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>npm install</id>\r
-                                               <goals>\r
-                                                       <goal>npm</goal>\r
-                                               </goals>\r
-\r
-                                               <phase>generate-resources</phase>\r
-\r
-                                               <configuration>\r
-                                                       <arguments>install</arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>npm install bower</id>\r
-                                               <goals>\r
-                                                       <goal>npm</goal>\r
-                                               </goals>\r
-\r
-                                               <phase>generate-resources</phase>\r
-\r
-                                               <configuration>\r
-                                                       <arguments>install bower</arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>npm install grunt-cli</id>\r
-                                               <goals>\r
-                                                       <goal>npm</goal>\r
-                                               </goals>\r
-\r
-                                               <phase>generate-resources</phase>\r
-\r
-                                               <configuration>\r
-                                                       <arguments>install grunt-cli</arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>bower install</id>\r
-                                               <goals>\r
-                                                       <goal>bower</goal>\r
-                                               </goals>\r
-\r
-                                               <configuration>\r
-                                                       <arguments>install --allow-root</arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                                       <execution>\r
-                                               <id>grunt build</id>\r
-                                               <goals>\r
-                                                       <goal>grunt</goal>\r
-                                               </goals>\r
-\r
-                                               <phase>generate-resources</phase>\r
-\r
-                                               <configuration>\r
-                                                       <arguments>build --env=integ</arguments>\r
-                                               </configuration>\r
-                                       </execution>\r
-\r
-                               </executions>\r
-                       </plugin>\r
-                        <!--    \r
-                       <plugin>\r
-                           <groupId>org.codehaus.mojo</groupId>\r
-                           <artifactId>license-maven-plugin</artifactId>\r
-                           <version>1.10</version>\r
-                           <configuration>\r
-                             <encoding>UTF-8</encoding>\r
-                               <licenseName>my_license</licenseName>\r
-                               <licenseResolver>${project.baseUri}/license</licenseResolver>\r
-                               <inceptionYear>2017</inceptionYear>\r
-                               <organizationName>AT&amp;T Intellectual Property</organizationName>\r
-                               <projectName>ECOMP Portal</projectName> \r
-                               <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> \r
-                               <processStartTag>================================================================================</processStartTag>\r
-                               <sectionDelimiter>================================================================================</sectionDelimiter>\r
-                               <processEndTag>================================================================================</processEndTag> \r
-                               <roots>\r
-                                       <root>client/src</root>\r
-                               </roots>\r
-                               <excludes>\r
-                                       <exclude>*.png</exclude>\r
-                                       <exclude>*.drl</exclude>\r
-                                       <exclude>*.gif</exclude>\r
-                                       <exclude>*.jpeg</exclude>\r
-                                       <exclude>*.jpg</exclude>\r
-                                       <exclude>*.bmp</exclude>\r
-                                       <exclude>*.ico</exclude>\r
-                                       <exclude>*.svg</exclude>\r
-                               </excludes>\r
-                           </configuration>\r
-                           <executions>\r
-                               <execution>\r
-                                   <id>first</id>\r
-                                   <goals>\r
-                                       <goal>update-file-header</goal>\r
-                                   </goals>\r
-                                   <phase>process-sources</phase>\r
-                               </execution>\r
-                           </executions>\r
-                       </plugin>\r
-                       -->\r
-               </plugins>\r
-       </build>\r
-</project>
\ No newline at end of file
+               <skipcopy>false</skipcopy>
+       </properties>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <artifactId>maven-clean-plugin</artifactId>
+                               <version>3.0.0</version>
+                               <configuration>
+                                       <filesets>
+                                               <fileset>
+                                                       <directory>${basedir}/client/app</directory>
+                                               </fileset>
+                                               <fileset>
+                                                       <directory>${basedir}/.tmp</directory>
+                                               </fileset>
+                                       </filesets>
+                               </configuration>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-resources-plugin</artifactId>
+                               <version>3.0.2</version>
+                               <executions>
+                                       <execution>
+                                               <id>copy-src</id>
+                                               <phase>generate-resources</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/client/app</outputDirectory>
+                                                       <overwrite>false</overwrite>
+                                                       <skip>${skipcopy}</skip>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>${basedir}/client/src</directory>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>copy-common</id>
+                                               <phase>generate-resources</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/client/app</outputDirectory>
+                                                       <overwrite>false</overwrite>
+                                                       <skip>${skipcopy}</skip>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>../ecomp-portal-FE-common/client/app</directory>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>copy-bower-components-external</id>
+                                               <phase>generate-resources</phase>
+                                               <goals>
+                                                       <goal>copy-resources</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <outputDirectory>${basedir}/client/bower_components_external</outputDirectory>
+                                                       <overwrite>false</overwrite>
+                                                       <skip>${skipcopy}</skip>
+                                                       <resources>
+                                                               <resource>
+                                                                       <directory>../ecomp-portal-FE-common/client/bower_components_external</directory>
+                                                               </resource>
+                                                       </resources>
+                                               </configuration>
+                                       </execution>
+
+                               </executions>
+                       </plugin>
+
+                       <plugin>
+                               <groupId>com.github.eirslett</groupId>
+                               <artifactId>frontend-maven-plugin</artifactId>
+                               <!-- Use the latest released version: https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->
+                               <version>1.3</version>
+                               <configuration>
+                                       <skip>${skipnode}</skip>
+                                       <nodeVersion>v7.5.0</nodeVersion>
+                                       <nodeDownloadRoot>https://nodejs.org/dist/</nodeDownloadRoot>
+                                       <npmDownloadRoot>https://nodejs.org/dist/npm/</npmDownloadRoot>
+                                       <installDirectory>./</installDirectory>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <!-- optional: you don't really need execution ids, but it looks nice 
+                                                       in your build log. -->
+                                               <id>install node and npm</id>
+                                               <goals>
+                                                       <goal>install-node-and-npm</goal>
+                                               </goals>
+                                               <phase>generate-resources</phase>
+                                       </execution>
+
+                                       <execution>
+                                               <id>npm install</id>
+                                               <goals>
+                                                       <goal>npm</goal>
+                                               </goals>
+
+                                               <phase>generate-resources</phase>
+
+                                               <configuration>
+                                                       <arguments>install</arguments>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>npm install bower</id>
+                                               <goals>
+                                                       <goal>npm</goal>
+                                               </goals>
+
+                                               <phase>generate-resources</phase>
+
+                                               <configuration>
+                                                       <arguments>install bower</arguments>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>npm install grunt-cli</id>
+                                               <goals>
+                                                       <goal>npm</goal>
+                                               </goals>
+
+                                               <phase>generate-resources</phase>
+
+                                               <configuration>
+                                                       <arguments>install grunt-cli</arguments>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>bower install</id>
+                                               <goals>
+                                                       <goal>bower</goal>
+                                               </goals>
+
+                                               <configuration>
+                                                       <arguments>install --allow-root</arguments>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>grunt build</id>
+                                               <goals>
+                                                       <goal>grunt</goal>
+                                               </goals>
+
+                                               <phase>generate-resources</phase>
+
+                                               <configuration>
+                                                       <arguments>build --env=integ</arguments>
+                                               </configuration>
+                                       </execution>
+
+                               </executions>
+                       </plugin>
+                        <!--    
+                       <plugin>
+                           <groupId>org.codehaus.mojo</groupId>
+                           <artifactId>license-maven-plugin</artifactId>
+                           <version>1.10</version>
+                           <configuration>
+                             <encoding>UTF-8</encoding>
+                               <licenseName>my_license</licenseName>
+                               <licenseResolver>${project.baseUri}/license</licenseResolver>
+                               <inceptionYear>2017</inceptionYear>
+                               <organizationName>AT&amp;T Intellectual Property</organizationName>
+                               <projectName>ECOMP Portal</projectName> 
+                               <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage> 
+                               <processStartTag>================================================================================</processStartTag>
+                               <sectionDelimiter>================================================================================</sectionDelimiter>
+                               <processEndTag>================================================================================</processEndTag> 
+                               <roots>
+                                       <root>client/src</root>
+                               </roots>
+                               <excludes>
+                                       <exclude>*.png</exclude>
+                                       <exclude>*.drl</exclude>
+                                       <exclude>*.gif</exclude>
+                                       <exclude>*.jpeg</exclude>
+                                       <exclude>*.jpg</exclude>
+                                       <exclude>*.bmp</exclude>
+                                       <exclude>*.ico</exclude>
+                                       <exclude>*.svg</exclude>
+                               </excludes>
+                           </configuration>
+                           <executions>
+                               <execution>
+                                   <id>first</id>
+                                   <goals>
+                                       <goal>update-file-header</goal>
+                                   </goals>
+                                   <phase>process-sources</phase>
+                               </execution>
+                           </executions>
+                       </plugin>
+                       -->
+               </plugins>
+       </build>
+</project>
diff --git a/ecomp-portal-widget-ms/.gitignore b/ecomp-portal-widget-ms/.gitignore
new file mode 100644 (file)
index 0000000..172a425
--- /dev/null
@@ -0,0 +1,39 @@
+.classpath
+.project
+/bin/
+target/
+logs/
+DEV_HOME_IS_UNDEFINED/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.factorypath
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+/target/
+/catalina.base_IS_UNDEFINED/
+.mvn
+.settings/
+.springBeans
+bin/
+debug-logs/    
+logs/
+/application.properties
+mvnw
+mvnw.cmd
diff --git a/ecomp-portal-widget-ms/1702-widgets/approx-portal-usage.zip b/ecomp-portal-widget-ms/1702-widgets/approx-portal-usage.zip
new file mode 100644 (file)
index 0000000..9f7eca4
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/approx-portal-usage.zip differ
diff --git a/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count.zip b/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count.zip
new file mode 100644 (file)
index 0000000..ce37c65
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count.zip differ
diff --git a/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count2.zip b/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count2.zip
new file mode 100644 (file)
index 0000000..142b412
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/daily-app-usage-count2.zip differ
diff --git a/ecomp-portal-widget-ms/1702-widgets/widget_events.zip b/ecomp-portal-widget-ms/1702-widgets/widget_events.zip
new file mode 100644 (file)
index 0000000..380a586
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/widget_events.zip differ
diff --git a/ecomp-portal-widget-ms/1702-widgets/widget_news.zip b/ecomp-portal-widget-ms/1702-widgets/widget_news.zip
new file mode 100644 (file)
index 0000000..532cf61
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/widget_news.zip differ
diff --git a/ecomp-portal-widget-ms/1702-widgets/widget_resources.zip b/ecomp-portal-widget-ms/1702-widgets/widget_resources.zip
new file mode 100644 (file)
index 0000000..e9de9c4
Binary files /dev/null and b/ecomp-portal-widget-ms/1702-widgets/widget_resources.zip differ
diff --git a/ecomp-portal-widget-ms/README.md b/ecomp-portal-widget-ms/README.md
new file mode 100644 (file)
index 0000000..b2424dd
--- /dev/null
@@ -0,0 +1,220 @@
+# Portl Widget Microservice
+
+For security, the server listens only on localhost (127.0.0.1) and requires HTTP Basic 
+Authentication. Because no network traffic is accepted or processed (packets never leave 
+the host). Currently, the server uses a self signed certificate - details below.
+
+## Build Prerequisites
+
+1. Java version 1.8
+2. Maven version 3
+3. Connectivity to AT&T Maven Central
+
+## Run Prerequisites
+
+1. Java version 1.8
+2. A Mysql database using the same database as the Portal
+
+## Build and Package
+
+Use maven to build and package the microservice into a jar using this command:
+
+       mvn clean package
+
+## Configuring
+
+All configuration parameters are entered in a file called application.properties.  A version with default values can be found in the top level of this project. 
+
+Details about the database are configured in this file. The default entries for the database configuration are shown here:
+
+       spring.datasource.url=jdbc:mariadb:failover://{db_host:db_port/{portal_db}
+       spring.datasource.username={username}
+       spring.datasource.password=ENC({encrypted_password})
+
+The HTTP server's username and password are configured in this file.  Only one username/password is used to secure the REST endpoint. The default entries for the server are shown here:
+
+       security.user.name={basic_auth_username}
+       security.user.password=ENC({encrypted_basic_auth_password})
+
+When you package the application into a jar file and launch the microservice using that jar, the configuration file must be in the current working directory where you launch the service.
+
+## Generating Encrypted Passwords
+
+Use the following command to generate an encrypted password for the database and the
+micro service.  The entire command must be entered on one line; the command shown 
+below uses backslashes to break lines for readability:
+
+       java -cp ~/.m2/repository/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar \
+               org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
+               algorithm=PBEWithMD5AndDES \
+               input='YourPasswordHere' \
+               password='EncryptionKey'
+
+Note, 'YourPasswordHere' is the actual database password, as supplied in the 'password' 
+parameter.  The value 'EncryptionKey' is used to encrypt the input, and must be supplied
+at run time in one of two ways:
+
+* On the command line with a JVM argument "-Djasypt.encryptor.password".  Here's an example
+of using maven with the Spring-Boot goal:
+
+       mvn -Djasypt.encryptor.password=EncryptionKey spring-boot:run
+       
+Here's an example of using java and the jar file:
+
+       java -jar dbc-microservice.jar -Djasypt.encryptor.password=EncryptionKey
+
+* In the application.properties file using the key jasypt.encryptor.password.  For example:
+
+       jasypt.encryptor.password=EncryptionKey
+
+## Development Launch
+
+Check the configuration properties in file src/main/resources/application.properties.  Then launch the microservice for development and testing like this:
+
+       mvn clean spring-boot:run
+
+## Production Launch
+
+Ensure a valid configuration is present in file application.properties in the current working directory.  Then launch the microservice for production like this:
+
+       widget-service.sh start
+
+## Supported Methods
+
+This micro service supports the following methods.  All can be accessed with a web browser
+or a REST client such as Postman. 
+
+## Generating Encrypted Passwords
+
+Use the following command to generate an encrypted password for the database and the
+micro service.  The entire command must be entered on one line; the command shown 
+below uses backslashes to break lines for readability:
+
+       java -cp ~/.m2/repository/org/jasypt/jasypt/1.9.2/jasypt-1.9.2.jar \
+               org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI \
+               algorithm=PBEWithMD5AndDES \
+               input='YourPasswordHere' \
+               password='EncryptionKey'
+
+Note, 'YourPasswordHere' is the actual database password, as supplied in the 'password' 
+parameter.  The value 'EncryptionKey' is used to encrypt the input, and must be supplied
+at run time in one of two ways:
+
+* On the command line with a JVM argument "-Djasypt.encryptor.password".  Here's an example
+of using maven with the Spring-Boot goal:
+
+       mvn -Djasypt.encryptor.password=EncryptionKey spring-boot:run
+       
+Here's an example of using java and the jar file:
+
+       java -jar dbc-microservice.jar -Djasypt.encryptor.password=EncryptionKey
+
+* In the application.properties file using the key jasypt.encryptor.password.  For example:
+
+       jasypt.encryptor.password=EncryptionKey
+
+## Release Notes
+
+### Release 1702, February 2017
+
+#### Consul Release Notes 
+
+Build 1702.3.48, 5 Feb 2017
+- DE264319 - Corrected spelling for output file from 'consule.out' to 'consul.out' - Please do not miss re-deploying consul build. Widget-ms build is not enough (or required) for this bug fix to be validated.
+
+#### Widget-ms Release Notes
+
+Build 1.2.145
+- Def 143148 - fixed the defect, common widgets work on Firefox version 45
+- Def 142432 - Widget-ms: InputStream is not getting closed in file StorageServiceImpl.java 
+
+Build 1.2.140 
+- St 164888 allow partner applications to trigger a new app tab through portal
+- St 164847 CCD Widgets
+- Def 141951 Fixed the issue for inappropriate location of framework-template.js file
+- Def 141352 Widget Onboarding Page, download icon is not clickable in FF 45 version,  Revise widget upload service temporary storage to /tmp
+- St 164902 One copy of framework.js hidden in the Portal instead of being part of the widgets
+- St 164905 Download the widget 
+- St 164711 Widget Personalization: Allow user to define his/her own parameters on widgets
+- St 164863 Widgets to use service onboarding feature
+
+Build 1702.3.86 
+- MariaDB connector / failover fix 
+
+Build 1702.3.79, 10 Feb 2017
+- Updated application.properties to correct database schema name from dbca to portal
+- US799260 appended complete hostname to widget certificate for irvine
+- US799260 appended complete hostname to consul config.json file in prod1 and prod2
+- US799260 fixed the bar chart issue on devn1, the bar chart shows up on devn1 Home Page
+
+Build 1702.3.78, 9 Feb 2017
+- US799260 fixed the firefox compatibility issue; and y-scales issue in bar chart
+- US799260 Added the three new widgets in dashboard-widgets folder; removed all testing logs in all widgets; fixed a bug in widget-test
+
+Build 1702.3.75, 07 Feb 2017
+DE267061 - Removed a hardcoded intance of loginId used in the query. 
+
+Build 1702.3.73, 06 Feb 2017
+DE267061 - Fixed - user should only see widgets that were uploaded against app/roles that they have OR if they were uploaded by checking All Users checkbox. 
+Build 1702.3.71, 5 Feb 2017
+- Important Note: Copied all these build notes from Portal WebApp to here (widget-ms) - in order not to confuse folks, we have removed Portal's build numbers for these notes. Going forward, will add widget-ms's own build number. Also note that we've changed the version series in POM.xml from 1702.0 to 1702.3 in pom.xml - Although Jenkins/SWM overrides and doesn't care about maven's versioning, but did this to synch with what Portal Web App POM.
+- DE261560 Portal App: Widgets MS logs are not getting rolled over
+- DE261655 Unable to delete standard widgets
+- DE262487 EP-Portal App: News widget not adapting when tile size is changed by user
+- DE257516 Common widgets reload in a single tab
+- DE262505 Upload Duplicate Widget Issue
+- DE262610 Widget Microservice logging is not following EELF guidelines
+- DE262800 Issues with widget name this requires database modifications
+- DE263090 Issues with widget roles 
+- US799260 BE now 'discovers' widget-service using Consul. If consul is not running, it fallbacks to the current implemenation which is https://localhost and the port of your choosing in system.properties - Ex: localhost:8082
+- US799260 Fix delete feature for the three special widgets news, events, resources    widget can have spaces in its name
+- US799260 Widget feature:
+  + Add the editing feature in widgetOnboarding page
+  + Move widget catalog and onboarding to new directories
+- US811188 Log / Audit widgets logging in DB
+- US818934 Allow basic authentication
+- US814730 Make news / Events and Resources as widgets
+- US827836 Portal Widget Framework
+## Contact
+
+Ikram Ikramullah
+
+## Certificate
+
+### Create self signed certificate
+
+1. Create a self signed certificate for the microservice
+keytool -genkey -alias widget-microservice -storetype PKCS12 -keyalg RSA -keystore widget-keystore.p12
+
+### Import into client's trust store
+
+1. Export certificate from microservice's keystore - default password is 'microservice'
+keytool -exportcert -keystore widget-keystore.p12 -alias widget-microservice -file widget-cert.cer
+
+2. Import the exported certificate of microservice from step 1 and import it into Portal JRE's cacerts file. The location of this file is %JRE%/lib/secuirty/cacerts.
+
+keytool -import -trustcacerts -keystore "C:\Program Files\Java\jre1.8.0_91\lib\security\cacerts" -noprompt -alias widget-microservice -file widget-cert.cer
+
+OR 
+;
+keytool -import -trustcacerts -keystore /usr/local/add-on/jdk1.8.0_60/jre/lib/security/ -noprompt -alias widget-microservice -file widget-cert.cer
+
+### Runing on http (not https)
+
+If the intent is to run this microservice without https i.e run on plain http, comment out (put a leading #) infront of all properties in 'Certificate Properties' section of application.properties - these properties are
+
+server.ssl.key-store=classpath:widget-keystore.p12
+server.ssl.key-store-password=ENC(DiIYnAMab4u7rEW2yKhF9zBL00uU55q8)
+server.ssl.keyStoreType=PKCS12
+server.ssl.keyAlias=widget-microservice
+
+## Running service in docker
+
+a). Build docker image: mvn docker:build
+b). Run the service in docker: docker run -p <port>:<port-in> -t <image-name> 
+c). Check running docker containers: docker ps
+
+## Migration Instruction  
+1. Due to changes in the existing tables, the user will have to remove all the existing widgets in 1702 release 
+2. Re-upload the latest version of widgets under dashboard-widgets folder
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage.zip b/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage.zip
new file mode 100644 (file)
index 0000000..ce0f1a8
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage2.zip b/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage2.zip
new file mode 100644 (file)
index 0000000..3d31a00
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/approx-portal-usage2.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/ccd_widget.zip b/ecomp-portal-widget-ms/dashboard-widgets/ccd_widget.zip
new file mode 100644 (file)
index 0000000..03b4f76
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/ccd_widget.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/daily-app-usage-count.zip b/ecomp-portal-widget-ms/dashboard-widgets/daily-app-usage-count.zip
new file mode 100644 (file)
index 0000000..ab023cb
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/daily-app-usage-count.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/events-widget.zip b/ecomp-portal-widget-ms/dashboard-widgets/events-widget.zip
new file mode 100644 (file)
index 0000000..bddee8e
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/events-widget.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/news-widget.zip b/ecomp-portal-widget-ms/dashboard-widgets/news-widget.zip
new file mode 100644 (file)
index 0000000..2d367c8
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/news-widget.zip differ
diff --git a/ecomp-portal-widget-ms/dashboard-widgets/resources-widget.zip b/ecomp-portal-widget-ms/dashboard-widgets/resources-widget.zip
new file mode 100644 (file)
index 0000000..d2ada04
Binary files /dev/null and b/ecomp-portal-widget-ms/dashboard-widgets/resources-widget.zip differ
diff --git a/ecomp-portal-widget-ms/docs/Deployment Guide Portal Microservices and Consul.docx b/ecomp-portal-widget-ms/docs/Deployment Guide Portal Microservices and Consul.docx
new file mode 100644 (file)
index 0000000..683b1e9
Binary files /dev/null and b/ecomp-portal-widget-ms/docs/Deployment Guide Portal Microservices and Consul.docx differ
diff --git a/ecomp-portal-widget-ms/java b/ecomp-portal-widget-ms/java
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/ecomp-portal-widget-ms/pom.xml b/ecomp-portal-widget-ms/pom.xml
new file mode 100644 (file)
index 0000000..ec6af26
--- /dev/null
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.openecomp.portal</groupId>
+       <artifactId>widget-ms</artifactId>
+       <version>1.2</version>
+       <packaging>jar</packaging>
+        <name>ecompportal-widget-microservice</name>
+
+       <parent>
+               <groupId>org.springframework.boot</groupId>
+               <artifactId>spring-boot-starter-parent</artifactId>
+               <version>1.4.2.RELEASE</version>
+               <relativePath /> <!-- lookup parent from repository -->
+       </parent>
+
+       <properties>
+               <docker.imagename>widget-ms</docker.imagename>
+               <docker.host>zlp11313.vci.att.com</docker.host>
+               <docker.port>5100</docker.port>
+               <docker.namespace>com.att.ecompportal</docker.namespace>
+               <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+               <java.version>1.8</java.version>
+               <hibernate.version>4.3.11.Final</hibernate.version>
+               <!-- docker.image.prefix>${docker.host}:${docker.port}/${docker.namespace}</docker.image.prefix -->
+                <docker.image.prefix>${docker.host}:${docker.port}/${docker.namespace}</docker.image.prefix>
+
+       </properties>
+
+       <!-- <repositories> <repository> SWM repository has EELF jars <id>att-swm-repo</id> 
+               <name>ATT SWM Repository</name> <url>http://mavencentral.it.att.com:8084/nexus/content/repositories/swm-releases</url> 
+               </repository> </repositories> -->
+
+       <dependencies>
+               <dependency>
+                       <!-- Setup Spring Data JPA Repository support -->
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-data-jpa</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-security</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-thymeleaf</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-devtools</artifactId>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-configuration-processor</artifactId>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.hibernate</groupId>
+                       <artifactId>hibernate-core</artifactId>
+                       <version>${hibernate.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-test</artifactId>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-web</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>commons-codec</groupId>
+                       <artifactId>commons-codec</artifactId>
+                       <version>1.10</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.mariadb.jdbc</groupId>
+                       <artifactId>mariadb-java-client</artifactId>
+                       <version>1.5.8</version>
+               </dependency>
+               <dependency>
+                       <groupId>com.github.ulisesbocchio</groupId>
+                       <artifactId>jasypt-spring-boot-starter</artifactId>
+                       <version>1.9</version>
+               </dependency>
+
+               <!-- 
+                       hibernate-core depends on dom4j, which has optional dependencies.  
+                       On jenkins, contrary to doc, mvn 3.0.5 packages the optional 
+                       dependencies in the war.  Workaround: exclude them explicitly.
+               -->
+               <dependency>
+                       <groupId>dom4j</groupId>
+                       <artifactId>dom4j</artifactId>
+                       <version>1.6.1</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>jaxme</groupId>
+                                       <artifactId>jaxme-api</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>jaxen</groupId>
+                                       <artifactId>jaxen</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>msv</groupId>
+                                       <artifactId>xsdlib</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>msv</groupId>
+                                       <artifactId>relaxngDatatype</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>pull-parser</groupId>
+                                       <artifactId>pull-parser</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>xpp3</groupId>
+                                       <artifactId>xpp3</artifactId>
+                               </exclusion>
+                               <exclusion>
+                                       <groupId>stax</groupId>
+                                       <artifactId>stax-api</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+       </dependencies>
+
+       <build>
+       
+               <finalName>${project.artifactId}</finalName>
+       
+               <plugins>
+                       <plugin>
+                               <groupId>org.springframework.boot</groupId>
+                               <artifactId>spring-boot-maven-plugin</artifactId>
+                       </plugin>
+                       
+                       <plugin>
+                               <groupId>com.spotify</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.4.11</version>
+                               <configuration>
+                                       <imageName>${project.artifactId}</imageName>
+                                       <dockerDirectory>src/main/docker</dockerDirectory>
+                                       <resources>
+                                                       <resource>
+                                                               <targetPath>/</targetPath>
+                                                               <directory>${project.build.directory}</directory>
+                                                               <include>${project.build.finalName}.jar</include>
+                                                       </resource>
+                                       </resources>
+                               </configuration>
+               </plugin>                       
+               </plugins>
+       </build>
+
+
+</project>
diff --git a/ecomp-portal-widget-ms/src/main/certificates/be1/widget-keystore.p12 b/ecomp-portal-widget-ms/src/main/certificates/be1/widget-keystore.p12
new file mode 100644 (file)
index 0000000..9dcdb1a
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/certificates/be1/widget-keystore.p12 differ
diff --git a/ecomp-portal-widget-ms/src/main/certificates/be2/widget-keystore.p12 b/ecomp-portal-widget-ms/src/main/certificates/be2/widget-keystore.p12
new file mode 100644 (file)
index 0000000..600dc01
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/certificates/be2/widget-keystore.p12 differ
diff --git a/ecomp-portal-widget-ms/src/main/docker/Dockerfile b/ecomp-portal-widget-ms/src/main/docker/Dockerfile
new file mode 100644 (file)
index 0000000..7e25c22
--- /dev/null
@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD widget-ms.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/MicroserviceApplication.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/MicroserviceApplication.java
new file mode 100644 (file)
index 0000000..eb1e784
--- /dev/null
@@ -0,0 +1,20 @@
+       package org.openecomp.portalapp.widget;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.web.client.RestTemplate;
+
+@SpringBootApplication
+@ComponentScan(basePackages = "org.openecomp.portalapp.widget")
+public class MicroserviceApplication {
+       @Bean
+       public RestTemplate getRestTemplate(){
+               return new RestTemplate();
+       }
+       public static void main(String[] args) {
+               SpringApplication.run(MicroserviceApplication.class, args);
+       }
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/constant/WidgetConstant.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/constant/WidgetConstant.java
new file mode 100644 (file)
index 0000000..3cd95b8
--- /dev/null
@@ -0,0 +1,13 @@
+package org.openecomp.portalapp.widget.constant;
+
+import java.io.File;
+
+public final class WidgetConstant {
+       
+       public static final String WIDGET_MARKUP_LOCATION = "markup/markup.html";
+       public static final String WIDGET_CONTROLLER_LOCATION = "js/controller.js";
+       public static final String WIDGET_STYLE_LOCATION = "styles/styles.css";
+       public static final String VALIDATION_MESSAGE_ZIP = "Please upload a zip file"; 
+       public static final String VALIDATION_MESSAGE_FILES = "Please check your files (should contains js, styles and markup folder)"; 
+}
+
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/DatabaseFileUploadController.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/DatabaseFileUploadController.java
new file mode 100644 (file)
index 0000000..eac8b37
--- /dev/null
@@ -0,0 +1,82 @@
+package org.openecomp.portalapp.widget.controller;
+
+import java.io.UnsupportedEncodingException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.widget.domain.ValidationRespond;
+import org.openecomp.portalapp.widget.service.StorageService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+
+@Controller
+public class DatabaseFileUploadController {
+       
+       @Autowired
+       private StorageService storageService;
+       
+       private static final Logger logger = LoggerFactory.getLogger(DatabaseFileUploadController.class); 
+
+       @ResponseBody
+       @RequestMapping(value = "/microservices/markup/{widgetId}", method = RequestMethod.GET)
+       public String getWidgetMarkup(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){
+               String markup = null;
+               try{
+                       logger.debug("DatabaseFileUploadController.getWidgetMarkup: getting markup.html for widget with widgetId = {}" , widgetId);
+                       markup = storageService.getWidgetMarkup(widgetId);
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing DatabaseFileUploadController.getWidgetMarkup in widget microservices. Details:" + e.getMessage());
+               }
+               return markup;
+       }
+
+       @ResponseBody
+       @RequestMapping(value = "/microservices/{widgetId}/controller.js", method = RequestMethod.GET)
+       public String getWidgetController(HttpServletRequest request, HttpServletResponse response, @PathVariable("widgetId") long widgetId){
+               String controller = null;
+               try{
+                       logger.debug("DatabaseFileUploadController.getWidgetController: getting controller.js for widget with widgetId = {}" , widgetId);
+                       controller = storageService.getWidgetController(widgetId); 
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing DatabaseFileUploadController.getWidgetController in widget microservices. Details:" + e.getMessage());
+               }
+               return controller;
+       }
+
+       @ResponseBody
+       @RequestMapping(value = "/microservices/{widgetId}/framework.js", method = RequestMethod.GET)
+       public String getWidgetFramework(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId){
+               String framework = null;
+               try{
+                       logger.debug("DatabaseFileUploadController.getWidgetFramework: getting framework.js for widget with widgetId = {}" , widgetId);
+                       framework = storageService.getWidgetFramework(widgetId);
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing DatabaseFileUploadController.getWidgetFramework in widget microservices. Details:" + e.getMessage());
+               }
+               return framework;
+       }
+       
+       @ResponseBody
+       @RequestMapping(value = "/microservices/{widgetId}/styles.css", method = RequestMethod.GET)
+       public String getWidgetCSS(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId){
+               String css = null;
+               try {
+                       logger.debug("DatabaseFileUploadController.getWidgetCSS: getting styles.css for widget with widgetId = {}" , widgetId);
+                       css = storageService.getWidgetCSS(widgetId);
+               } catch (UnsupportedEncodingException e) {
+                       logger.error("Exception occurred while performing DatabaseFileUploadController.getWidgetCSS in widget microservices. Details:" + e.getMessage());
+               } 
+               return css;     
+       }
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/HealthController.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/HealthController.java
new file mode 100644 (file)
index 0000000..fc324ab
--- /dev/null
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.widget.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class HealthController {
+
+       @RequestMapping(value = { "/health" }, method = RequestMethod.GET, produces = "application/json")
+       public HealthStatus getWidgetCatalog(HttpServletRequest request, HttpServletResponse response) {
+               return new HealthStatus("ok");
+       }
+       
+       class HealthStatus {
+               private String status;
+               
+               public HealthStatus(String status){
+                       this.status = status;
+               }
+
+               public String getStatus() {
+                       return status;
+               }
+
+               public void setStatus(String status) {
+                       this.status = status;
+               }
+               
+               
+       }
+}
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/WidgetsCatalogController.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/controller/WidgetsCatalogController.java
new file mode 100644 (file)
index 0000000..e801a25
--- /dev/null
@@ -0,0 +1,261 @@
+package org.openecomp.portalapp.widget.controller;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalapp.widget.domain.ValidationRespond;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.StorageService;
+import org.openecomp.portalapp.widget.service.WidgetCatalogService;
+import org.openecomp.portalapp.widget.utils.AuthorizationUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.multipart.MultipartFile;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class WidgetsCatalogController {
+
+       @Value("${server.port}")
+       String port;
+       @Value("${server.contextPath}")
+       String context;
+       
+       @Value("${security.user.name}")
+       String security_user;
+       @Value("${security.user.password}")
+       String security_pass;
+       
+       @Autowired
+       WidgetCatalogService widgetCatalogService;
+
+       @Autowired
+       StorageService storageService;
+       
+       @Autowired
+       RestTemplate restTemplate;
+
+       AuthorizationUtil util = new AuthorizationUtil();
+       
+       private static final Logger logger = LoggerFactory.getLogger(WidgetsCatalogController.class);
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog" }, method = RequestMethod.GET, produces = "application/json")
+       public List<WidgetCatalog> getWidgetCatalog(HttpServletRequest request, HttpServletResponse response
+                       ,@RequestHeader(value="Authorization") String auth) throws IOException{
+               
+               List<WidgetCatalog> widgetCatalog = null;
+               if(!util.authorization(auth, security_user, security_pass)){ 
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.getWidgetCatalog in widget microserivce. Please check your username and password.");
+                       return widgetCatalog;
+               }
+               try {
+                       widgetCatalog = widgetCatalogService.getWidgetCatalog();
+                       logger.debug("WidgetsCatalogController.getWidgetCatalog: getting widget list {}", widgetCatalog);
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.getWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               return widgetCatalog;
+       }
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/{loginName}" }, method = RequestMethod.GET, produces = "application/json")
+       public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response, 
+                       @PathVariable("loginName") String loginName, @RequestHeader(value="Authorization") String auth) throws IOException {
+               List<WidgetCatalog> widgetCatalog = null;
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.getUserWidgetCatalog in widget microserivce. Please check your username and password.");
+                       return widgetCatalog;
+               }
+               try {
+                       widgetCatalog = widgetCatalogService.getUserWidgetCatalog(loginName);
+                       logger.debug("WidgetsCatalogController.getUserWidgetCatalog: getting widget list {}", widgetCatalog);
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.getUserWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               return widgetCatalog;
+       }
+
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.PUT, produces = "application/json")
+       public void updateWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
+                       @RequestBody WidgetCatalog newWidgetCatalog, @PathVariable("widgetId") long widgetId,
+                       @RequestHeader(value="Authorization") String auth) throws IOException {
+
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.updateWidgetCatalog in widget microserivce. Please check your username and password.");
+                       return;
+               }
+               try {
+                       widgetCatalogService.updateWidgetCatalog(widgetId, newWidgetCatalog);
+                       logger.debug("WidgetsCatalogController.updateWidgetCatalog: updating widget {}", newWidgetCatalog);
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.updateWidgetCatalog in widget microservices. Details:" + e.getMessage());
+                       e.printStackTrace();
+               }
+       }
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog" }, method = RequestMethod.POST, produces = "application/json")
+       public ValidationRespond saveWidgetCatalog(HttpServletRequest request, HttpServletResponse response, @RequestHeader(value="Authorization") String auth,
+                       @RequestParam("file") MultipartFile file, @RequestParam("widget") String widget) throws IOException {   
+       
+               ValidationRespond respond = null;
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.saveWidgetCatalog in widget microserivce. Please check your username and password.");
+                       return new ValidationRespond(false, "Basic Authentication Error, please check your username and password.");
+               }       
+               try {
+                       //check the zip file structure first
+                       respond = storageService.checkZipFile(file);
+                       
+                       if(respond.isValid()){ 
+                               //save the widget catalog
+                               WidgetCatalog newWidget = new ObjectMapper().readValue(widget, WidgetCatalog.class);
+                               
+                               long widgetId = widgetCatalogService.saveWidgetCatalog(newWidget);
+                               logger.debug("WidgetsCatalogController.saveWidgetCatalog: saving widget={}", newWidget);
+                               //save the widget zip file ;
+                               storageService.save(file, newWidget, widgetId);
+                       }
+                       
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.saveWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               return respond;
+       }
+
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/{widgetId}" }, method = RequestMethod.POST, produces = "application/json")
+       public ValidationRespond updateWidgetCatalogwithFiles(HttpServletRequest request, HttpServletResponse response, @RequestHeader(value="Authorization") String auth,
+                       @RequestParam("file") MultipartFile file, @RequestParam("widget") String widget, @PathVariable("widgetId") long widgetId) throws IOException {  
+               System.out.println("microserivces updating with files" + widgetId);
+               ValidationRespond respond = null;
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.saveWidgetCatalog in widget microserivce. Please check your username and password.");
+                       return new ValidationRespond(false, "Basic Authentication Error, please check your username and password.");
+               }       
+               try {
+                       //check the zip file structure first
+                       respond = storageService.checkZipFile(file);
+                       if(respond.isValid()){
+                               //update the widget catalog
+                               WidgetCatalog newWidget = new ObjectMapper().readValue(widget, WidgetCatalog.class);
+                               widgetCatalogService.updateWidgetCatalog(widgetId, newWidget);
+                               logger.debug("WidgetsCatalogController.saveWidgetCatalog: updating widget with widgetId={}", widgetId);
+                               //update the widget zip file
+                               storageService.update(file, newWidget, widgetId);
+                       }
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.saveWidgetCatalog in widget microservices. Details:" + e.getMessage());
+                       e.printStackTrace();
+               }
+               return respond;
+       }
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/{widgetId}" }, method = {
+                       RequestMethod.DELETE }, produces = "application/json")
+       public void deleteOnboardingWidget(HttpServletRequest request, HttpServletResponse response,
+                       @PathVariable("widgetId") long widgetId, @RequestHeader(value="Authorization") String auth)  throws IOException{                
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.deleteOnboardingWidget in widget microserivce. Please check your username and password.");
+                       return;
+               }
+               try {
+                       logger.debug("WidgetsCatalogController.deleteOnboardingWidget: deleting widget {}", widgetId);
+                       //WidgetCatalog widget = widgetCatalogService.getWidgetCatalog(widgetId);
+                       widgetCatalogService.deleteWidgetCatalog(widgetId);
+                       storageService.deleteWidgetFile(widgetId);
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.deleteOnboardingWidget in widget microservices. Details:" + e.getMessage());
+               }
+       }
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/parameters/{widgetId}" }, method = RequestMethod.GET, produces = "application/json")
+       public Long getServiceIdByWidget(HttpServletRequest request, HttpServletResponse response, 
+                       @PathVariable("widgetId") Long widgetId, @RequestHeader(value="Authorization") String auth) throws IOException {
+               
+               Long serviceId = null;
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.getServiceIdByWidget in widget microserivce. Please check your username and password.");
+                       return serviceId;
+               }
+               try{
+                       logger.debug("WidgetsCatalogController.getServiceIdByWidget: getting service Id for widget {}", widgetId);
+                       serviceId = widgetCatalogService.getServiceIdByWidget(widgetId);
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing WidgetsCatalogController.getServiceIdByWidget in widget microservices. Details:" + e.getMessage());
+               }
+               return serviceId;
+       }
+
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/widgetCatalog/service/{serviceId}" }, method = RequestMethod.GET, produces = "application/json")
+       public List<WidgetCatalog> getWidgetByServiceId(HttpServletRequest request, HttpServletResponse response, 
+                       @PathVariable("serviceId") Long serviceId, @RequestHeader(value="Authorization") String auth) throws IOException {
+               List<WidgetCatalog> list = new ArrayList<WidgetCatalog>();
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.getWidgetByServiceId in widget microserivce. Please check your username and password.");
+                       return null;
+               }       
+               try{
+                       logger.debug("WidgetsCatalogController.getWidgetByServiceId: getting service Id for widget {}", serviceId);
+                       list = widgetCatalogService.getWidgetsByServiceId(serviceId);
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing WidgetsCatalogController.getWidgetByServiceId in widget microservices. Details:" + e.getMessage());
+               }
+               return list;
+       }
+       
+       
+       @ResponseBody
+       @RequestMapping(value = { "/microservices/download/{widgetId}" }, method = RequestMethod.GET, produces = "application/json")
+       public byte[] getWidgetZipFile(HttpServletRequest request, HttpServletResponse response, 
+                       @PathVariable("widgetId") long widgetId, @RequestHeader(value="Authorization") String auth) throws Exception {
+               byte[] byteFile = null;
+               if(!util.authorization(auth, security_user, security_pass)){
+                       response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
+                       logger.error("Basic Authentication Error while performing WidgetsCatalogController.getWidgetZipFile in widget microserivce. Please check your username and password.");
+                       return byteFile;
+               }
+               try {
+                       byteFile = storageService.getWidgetCatalogContent(widgetId);
+                       logger.debug("WidgetsCatalogController.getWidgetZipFile: getting widget zip file for widget with id {}", widgetId);
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.getWidgetZipFile in widget microservices. Details:" + e.getMessage());
+               }
+               return byteFile;
+       }
+
+       
+}
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/dao/WidgetDataSource.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/dao/WidgetDataSource.java
new file mode 100644 (file)
index 0000000..0a950c5
--- /dev/null
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.widget.dao;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import org.springframework.stereotype.Component;
+
+@Component
+public class WidgetDataSource{
+
+       @Value("${spring.database.driver.classname}")
+       private String dbDriverClassName;
+
+       @Value("${spring.datasource.url}")
+       private String dbUrl;
+
+       @Value("${spring.datasource.username}")
+       private String dbUsername;
+
+       @Value("${spring.datasource.password}")
+       private String dbPassword;
+
+       @Bean
+       public DataSource dataSource() {
+               DriverManagerDataSource dataSource = new DriverManagerDataSource();
+               dataSource.setDriverClassName(dbDriverClassName);
+               dataSource.setUrl(dbUrl);
+               dataSource.setUsername(dbUsername);
+               dataSource.setPassword(dbPassword);
+               return dataSource;
+       }
+}
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/App.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/App.java
new file mode 100644 (file)
index 0000000..19c6311
--- /dev/null
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.widget.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "FN_APP")
+public class App implements Serializable{
+       
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name = "APP_ID")
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       private Long appId;
+       
+       @Column(name = "APP_Name")
+       private String appName;
+
+       public Long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(Long appId) {
+               this.appId = appId;
+       }
+
+       public String getAppName() {
+               return appName;
+       }
+
+       public void setAppName(String appName) {
+               this.appName = appName;
+       }
+
+       @Override
+       public String toString() {
+               return "App [appId=" + appId + ", appName=" + appName + "]";
+       }
+
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceData.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceData.java
new file mode 100644 (file)
index 0000000..831b1e6
--- /dev/null
@@ -0,0 +1,126 @@
+package org.openecomp.portalapp.widget.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * TODO: moved all microservice-related code (domain, controller, service)
+ * from ecomp portal Backend to widget microservice
+ */
+@Entity
+@Table(name="EP_MICROSERVICE")
+public class MicroserviceData {
+       
+       @Id
+       @Column(name = "id")
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       private Long id;
+
+       @Column(name = "name")
+       private String name;
+
+       @Column(name = "description")
+       private String desc;
+       
+       @Column(name = "appId")
+       private long appId;
+
+       @Column(name = "endpoint_url")
+       private String url;
+
+       @Column(name = "security_type")
+       private String securityType;
+
+       @Column(name = "username")
+       private String username;
+
+       @Column(name = "password")
+       private String password;
+       
+       @Column(name = "active")
+       private String active;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getDesc() {
+               return desc;
+       }
+
+       public void setDesc(String desc) {
+               this.desc = desc;
+       }
+
+       public long getAppId() {
+               return appId;
+       }
+
+       public void setAppId(long appId) {
+               this.appId = appId;
+       }
+
+       public String getUrl() {
+               return url;
+       }
+
+       public void setUrl(String url) {
+               this.url = url;
+       }
+
+       public String getSecurityType() {
+               return securityType;
+       }
+
+       public void setSecurityType(String securityType) {
+               this.securityType = securityType;
+       }
+
+       public String getUsername() {
+               return username;
+       }
+
+       public void setUsername(String username) {
+               this.username = username;
+       }
+
+       public String getPassword() {
+               return password;
+       }
+
+       public void setPassword(String password) {
+               this.password = password;
+       }
+
+       public String getActive() {
+               return active;
+       }
+
+       public void setActive(String active) {
+               this.active = active;
+       }
+
+       @Override
+       public String toString() {
+               return "MicroserviceData [name=" + name + ", desc=" + desc + ", appId=" + appId + ", url=" + url
+                               + ", securityType=" + securityType + ", username=" + username + ", password=" + password + ", active="
+                               + active + "]";
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceParameter.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/MicroserviceParameter.java
new file mode 100644 (file)
index 0000000..9f19c0d
--- /dev/null
@@ -0,0 +1,70 @@
+package org.openecomp.portalapp.widget.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+/**
+ * TODO: moved all microservice-related code (domain, controller, service)
+ * from ecomp portal Backend to widget microservice
+ */
+@Entity
+@Table(name="EP_MICROSERVICE_PARAMETER")
+public class MicroserviceParameter {
+       
+       @Id
+       @Column(name = "id")
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       private Long id;
+
+       @Column(name = "service_id")
+       private long serviceId;
+
+       @Column(name = "para_key")
+       private String para_key;
+
+       @Column(name = "para_value")
+       private String para_value;
+
+       public Long getId() {
+               return id;
+       }
+
+       public void setId(Long id) {
+               this.id = id;
+       }
+
+       public long getServiceId() {
+               return serviceId;
+       }
+
+       public void setServiceId(long serviceId) {
+               this.serviceId = serviceId;
+       }
+
+       public String getPara_key() {
+               return para_key;
+       }
+
+       public void setPara_key(String para_key) {
+               this.para_key = para_key;
+       }
+
+       public String getPara_value() {
+               return para_value;
+       }
+
+       public void setPara_value(String para_value) {
+               this.para_value = para_value;
+       }
+
+       @Override
+       public String toString() {
+               return "MicroserviceParameter [serviceId=" + serviceId + ", para_key=" + para_key + ", para_value=" + para_value
+                               + "]";
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/RoleApp.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/RoleApp.java
new file mode 100644 (file)
index 0000000..93fa996
--- /dev/null
@@ -0,0 +1,96 @@
+package org.openecomp.portalapp.widget.domain;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.persistence.PreRemove;
+import javax.persistence.Table;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+@Entity
+@Table(name = "FN_ROLE")
+public class RoleApp implements Serializable{
+       private static final long serialVersionUID = 1L;
+
+       @Id
+       @Column(name = "ROLE_ID")
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       private Long roleId;
+       
+       
+       @Column(name = "ROLE_Name")
+       private String roleName;
+       
+       @ManyToOne(fetch = FetchType.EAGER)
+       @JoinColumn(name="APP_ID")
+       private App app;
+       
+       @JsonIgnore
+       @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}, mappedBy="widgetRoles")
+       private Set<WidgetCatalog> widgets;
+
+       /*@PreRemove
+       private void removeGroupsFromUsers() {
+           for (WidgetCatalog w : widgets) {
+               w.getWidgetRoles().remove(this);
+           }
+       }*/
+       
+       /*@ManyToOne
+       @JoinColumn(name = "WIDGET_ID", nullable = false)
+       WidgetCatalog widgetCatalog;*/
+
+       //@JsonIgnore
+       //@ManyToMany(mappedBy = "widgetRoles")
+       //@ManyToMany(fetch = FetchType.EAGER, mappedBy = "widgetRoles")
+       //private Set<WidgetCatalog> widgets  = new HashSet<WidgetCatalog>();
+       
+       public Long getRoleId() {
+               return roleId;
+       }
+
+       public void setRoleId(Long roleId) {
+               this.roleId = roleId;
+       }
+
+       public String getRoleName() {
+               return roleName;
+       }
+
+       public void setRoleName(String roleName) {
+               this.roleName = roleName;
+       }
+
+       public App getApp() {
+               return app;
+       }
+
+       public void setApp(App app) {
+               this.app = app;
+       }
+       
+       public Set<WidgetCatalog> getWidgets() {
+               return widgets;
+       }
+
+       public void setWidgets(Set<WidgetCatalog> widgets) {
+               this.widgets = widgets;
+       }
+
+       @Override
+       public String toString() {
+               return "RoleApp [roleId=" + roleId + ", roleName=" + roleName + ", app=" + app + "]";
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/ValidationRespond.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/ValidationRespond.java
new file mode 100644 (file)
index 0000000..25c74af
--- /dev/null
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.widget.domain;
+
+public class ValidationRespond {
+       private boolean valid;
+       private String error;
+       
+       public ValidationRespond(boolean valid, String error){
+               this.valid = valid;
+               this.error = error;
+       }
+
+       public boolean isValid() {
+               return valid;
+       }
+
+       public void setValid(boolean valid) {
+               this.valid = valid;
+       }
+
+       public String getError() {
+               return error;
+       }
+
+       public void setError(String error) {
+               this.error = error;
+       }
+
+       @Override
+       public String toString() {
+               return "ValidationRespond [valid=" + valid + ", error=" + error + "]";
+       }
+       
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetCatalog.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetCatalog.java
new file mode 100644 (file)
index 0000000..a449199
--- /dev/null
@@ -0,0 +1,134 @@
+package org.openecomp.portalapp.widget.domain;
+
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+
+@Entity
+@Table(name="EP_WIDGET_CATALOG")
+public class WidgetCatalog{
+       private static final long serialVersionUID = 1L;
+       
+       @Id
+       @Column(name = "widget_id")
+       @GeneratedValue(strategy=GenerationType.AUTO)
+       private long id;
+       
+       @Column(name = "wdg_name")
+       private String name;
+       
+       @Column(name = "wdg_desc")
+       private String desc;    
+       
+       @Column(name = "wdg_file_loc")
+       private String fileLocation;
+       
+       @Column(name = "all_user_flag")
+       private String allowAllUser;
+       
+       @Column(name = "service_id")
+       private Long serviceId;
+       
+       @Transient
+       private String sortOrder;
+
+       @Transient
+       private String statusCode;
+
+       @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
+       @JoinTable(name = "ep_widget_catalog_role", 
+                       joinColumns = {@JoinColumn(name = "WIDGET_ID")},
+                       inverseJoinColumns = {@JoinColumn(name = "ROLE_ID")}
+       )
+       private Set<RoleApp> widgetRoles;
+
+       public long getId() {
+               return id;
+       }
+
+       public void setId(long id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getDesc() {
+               return desc;
+       }
+
+       public void setDesc(String desc) {
+               this.desc = desc;
+       }
+
+       public String getFileLocation() {
+               return fileLocation;
+       }
+
+       public void setFileLocation(String fileLocation) {
+               this.fileLocation = fileLocation;
+       }
+
+       public Set<RoleApp> getWidgetRoles() {
+               return widgetRoles;
+       }
+
+       public void setWidgetRoles(Set<RoleApp> widgetRoles) {
+               this.widgetRoles = widgetRoles;
+       }
+       
+       public String getAllowAllUser() {
+               return allowAllUser;
+       }
+
+       public void setAllowAllUser(String allowAllUser) {
+               this.allowAllUser = allowAllUser;
+       }
+
+       public String getSortOrder() {
+               return sortOrder;
+       }
+
+       public void setSortOrder(String sortOrder) {
+               this.sortOrder = sortOrder;
+       }
+
+       public String getStatusCode() {
+               return statusCode;
+       }
+
+       public void setStatusCode(String statusCode) {
+               this.statusCode = statusCode;
+       }
+
+       public Long getServiceId() {
+               return serviceId;
+       }
+
+       public void setServiceId(Long serviceId) {
+               this.serviceId = serviceId;
+       }
+
+       @Override
+       public String toString() {
+               return "WidgetCatalog [name=" + name + ", desc=" + desc + ", allowAllUser=" + allowAllUser + "]";
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetFile.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/domain/WidgetFile.java
new file mode 100644 (file)
index 0000000..7eb3c1e
--- /dev/null
@@ -0,0 +1,96 @@
+package org.openecomp.portalapp.widget.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "ep_widget_catalog_files")
+public class WidgetFile {
+       @Id
+       @Column (name = "file_id")
+       private int id;
+       
+       @Column(name = "widget_name")
+       private String name;
+       
+       @Column(name = "widget_id")
+       private long widgetId;
+       
+       @Column(name = "markup_html")
+       private byte[] markup;
+       
+       @Column(name = "controller_js")
+       private  byte[] controller;
+       
+       @Column(name = "framework_js")
+       private  byte[] framework;
+
+       @Column(name = "widget_css")
+       private  byte[] css;
+
+       public int getId() {
+               return id;
+       }
+
+       public void setId(int id) {
+               this.id = id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public byte[] getMarkup() {
+               return markup;
+       }
+
+       public void setMarkup(byte[] markup) {
+               this.markup = markup;
+       }
+
+       public byte[] getController() {
+               return controller;
+       }
+
+       public void setController(byte[] controller) {
+               this.controller = controller;
+       }
+
+       public byte[] getFramework() {
+               return framework;
+       }
+
+       public void setFramework(byte[] framework) {
+               this.framework = framework;
+       }
+
+       public byte[] getCss() {
+               return css;
+       }
+
+       public void setCss(byte[] css) {
+               this.css = css;
+       }
+
+       public long getWidgetId() {
+               return widgetId;
+       }
+
+       public void setWidgetId(long widgetId) {
+               this.widgetId = widgetId;
+       }
+
+       @Override
+       public String toString() {
+               return "WidgetFile [name=" + name + ", widgetId=" + widgetId + "]";
+       }
+       
+       
+    
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageException.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageException.java
new file mode 100644 (file)
index 0000000..65b7145
--- /dev/null
@@ -0,0 +1,15 @@
+package org.openecomp.portalapp.widget.excetpion;
+
+public class StorageException extends RuntimeException {
+
+       
+       private static final long serialVersionUID = 4142203582273176386L;
+
+       public StorageException(String message) {
+        super(message);
+    }
+
+    public StorageException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageFileNotFoundException.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/excetpion/StorageFileNotFoundException.java
new file mode 100644 (file)
index 0000000..44fb728
--- /dev/null
@@ -0,0 +1,14 @@
+package org.openecomp.portalapp.widget.excetpion;
+
+public class StorageFileNotFoundException extends StorageException {
+
+       private static final long serialVersionUID = -930114778119283188L;
+
+       public StorageFileNotFoundException(String message) {
+        super(message);
+    }
+
+    public StorageFileNotFoundException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/filters/CorsConfiguration.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/filters/CorsConfiguration.java
new file mode 100644 (file)
index 0000000..2fdb548
--- /dev/null
@@ -0,0 +1,15 @@
+package org.openecomp.portalapp.widget.filters;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.HttpMethod;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+
+@Configuration
+public class CorsConfiguration extends WebSecurityConfigurerAdapter {
+       @Override
+       protected void configure(HttpSecurity http) throws Exception {
+               http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/microservices/widgetCatalog/").permitAll();
+               http.csrf().disable();
+       }       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/hibernate/HibernateConfiguration.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/hibernate/HibernateConfiguration.java
new file mode 100644 (file)
index 0000000..a376da0
--- /dev/null
@@ -0,0 +1,44 @@
+package org.openecomp.portalapp.widget.hibernate;
+
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.orm.hibernate4.LocalSessionFactoryBean;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
+
+/**
+ * Provides a Hibernate session factory.
+ */
+@org.springframework.context.annotation.Configuration
+public class HibernateConfiguration {
+
+       @Autowired
+       private DataSource dataSource;
+
+       @Bean
+       public LocalSessionFactoryBean sessionFactory() {
+
+               LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
+               sessionFactory.setDataSource(dataSource);
+               sessionFactory.setHibernateProperties(hibernateProperties());
+               sessionFactory.setPackagesToScan(new String[] { "org.openecomp.portalapp.widget.domain" });
+               return sessionFactory;
+       }
+
+       private Properties hibernateProperties() {
+        Properties properties = new Properties();
+        properties.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
+        properties.put("hibernate.show_sql", "false");
+        return properties;        
+    }
+
+       @Bean
+    public PlatformTransactionManager transactionManager() {
+        return new JpaTransactionManager();
+    }
+
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/listener/WidgetEventListener.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/listener/WidgetEventListener.java
new file mode 100644 (file)
index 0000000..3516196
--- /dev/null
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.widget.listener;
+
+import org.openecomp.portalapp.widget.service.InitializationService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+
+@Component
+public class WidgetEventListener implements ApplicationListener<ApplicationReadyEvent>{
+
+       private static final Logger logger = LoggerFactory.getLogger(WidgetEventListener.class);
+       
+       @Autowired
+       InitializationService initializationService;
+       
+       @Value("${initialization.default.widgets}")
+       String init_default_widget;
+       
+       @Override
+       public void onApplicationEvent(ApplicationReadyEvent event) {
+               
+               logger.debug("Listening event " + event.toString());
+               try {
+                       if(Boolean.parseBoolean(init_default_widget))
+                               initializationService.initialize();
+               } catch (Exception e) {
+                       logger.error("Exception occurred while performing WidgetsCatalogController.initializeWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/InitializationService.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/InitializationService.java
new file mode 100644 (file)
index 0000000..4a34606
--- /dev/null
@@ -0,0 +1,7 @@
+package org.openecomp.portalapp.widget.service;
+
+public interface InitializationService {
+       
+       void initialize();
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/MicroserviceService.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/MicroserviceService.java
new file mode 100644 (file)
index 0000000..32eb48b
--- /dev/null
@@ -0,0 +1,17 @@
+package org.openecomp.portalapp.widget.service;
+
+import org.openecomp.portalapp.widget.domain.MicroserviceData;
+import org.openecomp.portalapp.widget.domain.MicroserviceParameter;
+
+/**
+ * TODO: moved all microservice-related code (domain, controller, service)
+ * from ecomp portal Backend to widget microservice
+ */
+public interface MicroserviceService {
+       
+       Long saveMicroserivce(MicroserviceData newService);
+       
+       void saveMicroserviceParameter(MicroserviceParameter newParameter);
+       
+       Long getMicroserviceIdByName(String newServiceName);
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/StorageService.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/StorageService.java
new file mode 100644 (file)
index 0000000..1eb1470
--- /dev/null
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.widget.service;
+
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+
+import org.openecomp.portalapp.widget.domain.ValidationRespond;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.domain.WidgetFile;
+import org.springframework.web.multipart.MultipartFile;
+
+public interface StorageService {
+
+    void deleteWidgetFile(long widgetId);
+    
+    WidgetFile getWidgetFile(long widgetId);
+     
+    String getWidgetMarkup(long widgetId) throws UnsupportedEncodingException;
+    
+    String getWidgetController(long widgetId) throws UnsupportedEncodingException;
+    
+    String getWidgetFramework(long widgetId) throws UnsupportedEncodingException;
+    
+    String getWidgetCSS(long widgetId) throws UnsupportedEncodingException;
+    
+    ValidationRespond checkZipFile(MultipartFile file);
+    
+    void save(MultipartFile file, WidgetCatalog newWidget, long widgetId);
+    
+    void initSave(File file, WidgetCatalog newWidget, long widgetId);
+    
+    void update(MultipartFile file, WidgetCatalog newWidget, long widgetId);
+    
+       byte[] getWidgetCatalogContent(long widgetId) throws Exception;
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/WidgetCatalogService.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/WidgetCatalogService.java
new file mode 100644 (file)
index 0000000..82853dc
--- /dev/null
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.widget.service;
+
+import java.util.List;
+
+import org.openecomp.portalapp.widget.domain.RoleApp;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+
+public interface WidgetCatalogService {
+       
+       List<WidgetCatalog> getWidgetCatalog();
+       
+       List<WidgetCatalog> getUserWidgetCatalog(String loginName);
+
+       WidgetCatalog getWidgetCatalog(Long widgetCatalogId);
+       
+       void deleteWidgetCatalog(long WidgetCatalogId);
+       
+       long saveWidgetCatalog(WidgetCatalog newWidgetCatalog);
+
+       void updateWidgetCatalog(Long widgetCatalogId, WidgetCatalog newWidgetCatalog); 
+       
+       Long getServiceIdByWidget(Long widgetCatalogId);
+       
+       boolean getWidgetIdByName(String newWidgetName);
+       
+       List<WidgetCatalog> getWidgetsByServiceId(Long serviceId);
+       
+
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/InitializationServiceImpl.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/InitializationServiceImpl.java
new file mode 100644 (file)
index 0000000..31635f7
--- /dev/null
@@ -0,0 +1,128 @@
+package org.openecomp.portalapp.widget.service.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashSet;
+
+import javax.transaction.Transactional;
+
+import org.openecomp.portalapp.widget.controller.WidgetsCatalogController;
+import org.openecomp.portalapp.widget.domain.MicroserviceData;
+import org.openecomp.portalapp.widget.domain.MicroserviceParameter;
+import org.openecomp.portalapp.widget.domain.RoleApp;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.InitializationService;
+import org.openecomp.portalapp.widget.service.MicroserviceService;
+import org.openecomp.portalapp.widget.service.StorageService;
+import org.openecomp.portalapp.widget.service.WidgetCatalogService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("initService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class InitializationServiceImpl implements InitializationService{
+       
+       private static final String BASIC_AUTH = "Basic Authentication";
+       private static final String PARAMETER_KEY = "resourceType";
+       private static final Logger logger = LoggerFactory.getLogger(WidgetsCatalogController.class);
+       
+       @Autowired
+       WidgetCatalogService widgetCatalogService;
+       
+       @Autowired
+       StorageService storageService;
+       
+       @Autowired
+       MicroserviceService microserviceService;
+       
+       @Value("${account.user.name}")
+       String account_user;
+       
+       @Value("${account.user.password}")
+       String account_password;
+       
+       @Value("${initialization.widgetData.url}")
+       String widgetData_url;
+       
+       @Override
+       public void initialize() {
+               initCommonWidget("News");
+               initCommonWidget("Events");
+               initCommonWidget("Resources");
+       }
+       
+       private void initCommonWidget(String name){
+               
+               final String newServiceName = name + " Microservice";
+               final String newWidgetName = name + " Widget";
+               
+               Long serviceId = microserviceService.getMicroserviceIdByName(newServiceName);
+       
+               if(serviceId == null){
+                       MicroserviceData newService = new MicroserviceData();
+                       newService.setName(newServiceName);
+                       newService.setDesc(name);
+                       newService.setAppId(1);
+                       newService.setUrl(widgetData_url);
+                       newService.setSecurityType(BASIC_AUTH);
+                       newService.setUsername(account_user);
+                       newService.setPassword(account_password);
+                       newService.setActive("Y");
+                       serviceId = microserviceService.saveMicroserivce(newService);
+                       
+                       
+                       MicroserviceParameter parameter = new MicroserviceParameter();
+                       parameter.setServiceId(serviceId);
+                       parameter.setPara_key(PARAMETER_KEY);
+                       String parameter_value = null;
+                       switch(name.toLowerCase()){
+                               case "news":
+                                       parameter_value = "NEWS";
+                                       break;
+                               case "events":
+                                       parameter_value = "EVENTS";
+                                       break;
+                               case "resources":
+                                       parameter_value = "IMPORTANTRESOURCES";
+                                       break;
+                       }
+                       parameter.setPara_value(parameter_value);
+                       microserviceService.saveMicroserviceParameter(parameter);
+               }
+               
+               if(!widgetCatalogService.getWidgetIdByName(newWidgetName)){
+                       WidgetCatalog newWidget = new WidgetCatalog();
+                       newWidget.setName(newWidgetName);
+                       newWidget.setDesc(name);
+                       newWidget.setAllowAllUser("1");
+                       String fileLocation = name.toLowerCase() + "-widget.zip";
+                       newWidget.setFileLocation(fileLocation);
+                       newWidget.setServiceId(serviceId);
+                       newWidget.setWidgetRoles(new HashSet<RoleApp>());
+                       long widgetId = widgetCatalogService.saveWidgetCatalog(newWidget);
+       
+                       File file = new File("/tmp/" + fileLocation);
+                       try{
+                               
+                               InputStream fileInputStream = this.getClass().getClassLoader().getResourceAsStream(fileLocation);
+                               OutputStream outputStream = new FileOutputStream(file);
+                               int read = 0;
+                               byte[] bytes = new byte[4096];
+                               while ((read = fileInputStream.read(bytes)) != -1) {
+                                       outputStream.write(bytes, 0, read);
+                               }
+                       }catch(Exception e){
+                               logger.error("Exception occurred while performing InitializationServiceImpl.initCommonWidget in widget microservices. Details:" + e.getMessage());
+                       }
+                       storageService.initSave(file, newWidget, widgetId);     
+               }
+       }
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/MicroserviceServiceImpl.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/MicroserviceServiceImpl.java
new file mode 100644 (file)
index 0000000..395d428
--- /dev/null
@@ -0,0 +1,87 @@
+package org.openecomp.portalapp.widget.service.impl;
+
+import java.util.List;
+
+import javax.transaction.Transactional;
+
+import org.hibernate.Criteria;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.criterion.Restrictions;
+import org.openecomp.portalapp.widget.domain.MicroserviceData;
+import org.openecomp.portalapp.widget.domain.MicroserviceParameter;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.MicroserviceService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+/**
+ * TODO: moved all microservice-related code (domain, controller, service)
+ * from ecomp portal Backend to widget microservice
+ */
+@Service("microserviceService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class MicroserviceServiceImpl implements MicroserviceService{
+
+       private static final Logger logger = LoggerFactory.getLogger(MicroserviceServiceImpl.class);
+       
+       @Autowired
+       private SessionFactory sessionFactory;
+       
+       @Override
+       public Long saveMicroserivce(MicroserviceData newService) {
+               try{
+                       logger.debug("MicroserviceServiceImpl.saveMicroserivce: microservice={}", newService);
+                       Session session = sessionFactory.openSession();
+                       Transaction tx = session.beginTransaction();            
+                       session.save(newService);
+                       tx.commit();
+                       session.flush();
+                       session.close();
+               }
+               catch(Exception e){
+                       logger.error("Exception occurred while performing MicroserviceServiceImpl.saveMicroserivce in widget microservices. Details:" + e.getMessage());
+               }
+               return newService.getId();
+       }
+
+       @Override
+       public void saveMicroserviceParameter(MicroserviceParameter newParameter) {
+               try{
+                       logger.debug("MicroserviceServiceImpl.saveMicroserviceData: microservice={}", newParameter);
+                       Session session = sessionFactory.openSession();
+                       Transaction tx = session.beginTransaction();            
+                       session.save(newParameter);
+                       tx.commit();
+                       session.flush();
+                       session.close();
+               }
+               catch(Exception e){
+                       logger.error("Exception occurred while performing MicroserviceServiceImpl.saveMicroserviceData in widget microservices. Details:" + e.getMessage());
+               }
+       }
+       
+       @SuppressWarnings("unchecked")
+       @Override
+       public Long getMicroserviceIdByName(String newServiceName) {
+               
+               Session session = sessionFactory.openSession();
+               Criteria criteria = session.createCriteria(MicroserviceData.class)
+                               .add(Restrictions.eq("name", newServiceName))
+                               .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
+               
+               List<MicroserviceData> services = criteria.list();
+               logger.debug("MicroserviceServiceImpl.getMicroserviceByName: result={}", services);
+               session.flush();
+               session.close();
+               
+               return (services.size() > 0) ? services.get(0).getId() : null;
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/StorageServiceImpl.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/StorageServiceImpl.java
new file mode 100644 (file)
index 0000000..046b5ac
--- /dev/null
@@ -0,0 +1,487 @@
+package org.openecomp.portalapp.widget.service.impl;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.hibernate.Criteria;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.criterion.Restrictions;
+import org.openecomp.portalapp.widget.constant.WidgetConstant;
+import org.openecomp.portalapp.widget.controller.DatabaseFileUploadController;
+import org.openecomp.portalapp.widget.domain.ValidationRespond;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.domain.WidgetFile;
+import org.openecomp.portalapp.widget.excetpion.StorageException;
+import org.openecomp.portalapp.widget.service.StorageService;
+import org.openecomp.portalapp.widget.service.WidgetCatalogService;
+import org.openecomp.portalapp.widget.utils.UnzipUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+
+@Service
+public class StorageServiceImpl implements StorageService {
+
+       private static final Logger logger = LoggerFactory.getLogger(StorageServiceImpl.class);
+       
+       @Autowired
+       private SessionFactory sessionFactory;
+
+       @Autowired
+       WidgetCatalogService widgetCatalogService;
+       
+       @Override
+       @Transactional
+       public void deleteWidgetFile(long widgetId) {
+               WidgetFile widgetFile = getWidgetFile(widgetId);
+               logger.debug("StorageServiceImpl.deleteWidgetFile: deleting widget file {}", widgetId);
+               if (widgetFile == null){
+                       logger.debug("StorageServiceImpl.deleteWidgetFile: No widget file found in database while performing StorageServiceImpl.deleteWidgetFile.");
+                       return;
+               }
+               Session session = sessionFactory.getCurrentSession();
+               Transaction tx = session.beginTransaction();
+               session.delete(widgetFile);
+               tx.commit();
+       }
+       
+       @Override
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public WidgetFile getWidgetFile(long widgetId) {
+               logger.debug("StorageServiceImpl.getWidgetFile: getting widget file {}", widgetId);
+               WidgetFile widgetFile = null;
+               Session session = sessionFactory.openSession();
+               Criteria criteria = session.createCriteria(WidgetFile.class);
+               criteria.add(Restrictions.eq("widgetId", widgetId));
+               List<WidgetFile> widgetFiles = criteria.list();
+               session.flush();
+               session.close();
+               if (widgetFiles.size() > 0)
+                       widgetFile = widgetFiles.get(0);
+               return widgetFile;
+       }
+       
+       @Override
+       public ValidationRespond checkZipFile(MultipartFile file){
+               StringBuilder error_msg = new StringBuilder();
+               UnzipUtil unzipper = new UnzipUtil();
+               Map<String, byte[]> map;
+               File convFile;
+               boolean isValid = true;
+               if (!file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf('.')).equals(".zip")) {
+                       isValid = false;
+                       error_msg.append(WidgetConstant.VALIDATION_MESSAGE_ZIP);
+                       logger.error("StorageServiceImpl.checkZipFile: invalid file format");
+               }
+               try {
+                       if (file.isEmpty()) {
+                               logger.error("StorageServiceImpl.checkZipFile: Failed to store empty file " + file.getOriginalFilename());
+                               throw new StorageException("StorageServiceImpl.checkZipFile: Failed to store empty file " + file.getOriginalFilename());
+                       }
+                       String fileLocation = file.getOriginalFilename();
+                       logger.debug("StorageServiceImpl.checkZipFile: store the widget to:" + fileLocation);
+                       convFile = new File(fileLocation);
+                       FileOutputStream fos = new FileOutputStream(convFile);
+                       fos.write(file.getBytes());
+                       fos.close();
+                       map = unzipper.unzip_db(fileLocation, ".", "tempWidgets");
+                       convFile.delete();
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.checkZipFile: Failed to store file " + file.getOriginalFilename(), e);
+                       throw new StorageException("torageServiceImpl.checkZipFile: Failed to store file " + file.getOriginalFilename(), e);
+               }
+               
+               for(byte[] b: map.values()){
+                       if(isValid && b == null){
+                               isValid = false;
+                               error_msg.append(WidgetConstant.VALIDATION_MESSAGE_FILES);
+                               break;
+                       }
+               }
+               return new ValidationRespond(isValid, error_msg.toString());    
+       }
+       
+       @Override
+       @Transactional
+       public void save(MultipartFile file, WidgetCatalog newWidget, long widgetId) {
+               
+               UnzipUtil unzipper = new UnzipUtil();
+               Map<String, byte[]> map;
+               File convFile;
+               try {
+                       if (file.isEmpty()) {
+                               logger.error("Failed to store empty file " + file.getOriginalFilename());
+                               throw new StorageException("Failed to store empty file " + file.getOriginalFilename());
+                       }
+                       String fileLocation = file.getOriginalFilename();
+                       logger.debug("StorageServiceImpl.save: store the widget to:" + fileLocation);
+                       convFile = new File(fileLocation);
+                       FileOutputStream fos = new FileOutputStream(convFile);
+                       fos.write(file.getBytes());
+                       fos.close();
+                       map = unzipper.unzip_db(fileLocation, ".", "tempWidgets");
+                       convFile.delete();
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.save: Failed to store file " + file.getOriginalFilename(), e);
+                       throw new StorageException("Failed to store file " + file.getOriginalFilename(), e);
+               }
+               saveHelper(newWidget, widgetId, map);
+       }
+       
+       
+       @Override
+       @Transactional
+       public void initSave(File file, WidgetCatalog newWidget, long widgetId) {
+               
+               UnzipUtil unzipper = new UnzipUtil();
+               Map<String, byte[]> map;
+               
+               try {
+                       String fileLocation = file.getPath();
+                       logger.debug("StorageServiceImpl.save: store the widget to:" + fileLocation);
+                       map = unzipper.unzip_db(fileLocation, ".", "tempWidgets");
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.save: Failed to store file " + file.getName(), e);
+                       throw new StorageException("Failed to store file " + file.getName(), e);
+               }
+               saveHelper(newWidget, widgetId, map);
+       }
+       
+       
+       /**
+        * Helper method for saving widget files (controller.js, framework.js, markup.html and style.css)
+        * to ep_widget_catalog_files table in database
+        * 
+        * @param newWidget
+        * @param widgetId
+        * @param map
+        */
+       private void saveHelper(WidgetCatalog newWidget, long widgetId, Map<String, byte[]> map){
+               
+               WidgetFile widgetFile = new WidgetFile();
+               widgetFile.setName(newWidget.getName());
+               widgetFile.setWidgetId(widgetId);
+               
+       
+               InputStream fileInputStream = this.getClass().getClassLoader().getResourceAsStream("framework-template.js");
+               
+               String sb = null;
+               try {
+                       byte[] bytes = new byte[fileInputStream.available()];
+                       fileInputStream.read(bytes);
+                       sb = new String(bytes, "UTF-8");
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.save: Failed to load framework-template.js file ", e);
+                       e.printStackTrace();
+               } finally {
+                       if (fileInputStream != null) {
+                               try {
+                                       fileInputStream.close();
+                               } catch (IOException e) {
+                                       logger.error("StorageServiceImpl.update: Failed to close the fileInputStream ", e);
+                                       e.printStackTrace();
+                               }
+                       }
+               }
+               
+               
+               String namespace = "Portal" + widgetId + "Widget";
+               String controllerName = "Portal" + widgetId + "Ctrl";
+               String cssName = "portal" + widgetId + "-css-ready";
+               String colorArg1 = "color: #fff";
+               String framework = sb
+                               .replaceAll("ARUGMENT1", namespace)
+                               .replaceAll("ARUGMENT2", controllerName)
+                               .replaceAll("ARUGMENT3", cssName)
+                               .replaceAll("CSS_ARG1", colorArg1)
+                               .replaceAll("MICROSERVICE_ID", newWidget.getServiceId().toString())
+                               .replaceAll("WIDGET_ID", Long.toString(widgetId));
+               
+               widgetFile.setFramework(framework.getBytes());
+               
+               String javascript = new String(map.get(WidgetConstant.WIDGET_CONTROLLER_LOCATION));
+               String functionHeader = javascript.substring(javascript.indexOf("function"), javascript.indexOf(")")+1);
+               String functionName = functionHeader.substring(functionHeader.indexOf(" "), functionHeader.indexOf("(")).trim();
+               javascript = javascript.replaceFirst(functionName, controllerName);
+               String functionParam = functionHeader.substring(functionHeader.indexOf("(")+1, functionHeader.indexOf(")"));
+               List<String> paramList = Arrays.asList(functionParam.split(","));
+               
+               int left_bracket_index = javascript.indexOf("{") + 1;
+               String widgetData = namespace + "=" + namespace + "||{};" + "var res = " + namespace + ".widgetData;";
+               javascript = javascript.substring(0, left_bracket_index) + widgetData + javascript.substring(left_bracket_index);
+               
+               StringBuilder injectStr = new StringBuilder().append("[");
+               for(int i = 0; i < paramList.size(); i++){
+                       if(i == paramList.size()-1)
+                               injectStr.append("'" + paramList.get(i).trim() + "'];");
+                       else
+                               injectStr.append("'" + paramList.get(i).trim() + "',");
+               }
+               javascript = namespace + ".controller = " + javascript + ";" + namespace + ".controller.$inject = " + injectStr.toString();
+               
+               String html = new String(map.get(WidgetConstant.WIDGET_MARKUP_LOCATION)).replaceFirst(functionName, controllerName);;
+               
+               Pattern cssPattern = Pattern.compile("#.*-css-ready");
+               Matcher cssMatcher = cssPattern.matcher(new String(map.get(WidgetConstant.WIDGET_STYLE_LOCATION)));
+               if (cssMatcher.find( )) {
+                       widgetFile.setCss(new String(map.get(WidgetConstant.WIDGET_STYLE_LOCATION)).replace(cssMatcher.group(0), "#" + cssName).getBytes());
+               }
+               
+               widgetFile.setMarkup(html.getBytes());
+               widgetFile.setController(javascript.getBytes());
+               Session session = sessionFactory.openSession();
+               session.save(widgetFile);
+               session.flush();
+               session.close();
+               //sessionFactory.getCurrentSession().save(widgetFile);
+               logger.debug("StorageServiceImpl.save: saved fraemwork.js controller.js, markup.html and style.css files to the database for widget {}", widgetId);
+               
+       }
+       
+       @Override
+       public void update(MultipartFile file, WidgetCatalog newWidget, long widgetId) {
+               UnzipUtil unzipper = new UnzipUtil();
+               Map<String, byte[]> map;
+               File convFile;
+               try {
+                       if (file.isEmpty()) {
+                               logger.error("StorageServiceImpl.update: Failed to store empty file " + file.getOriginalFilename());
+                               throw new StorageException("Failed to store empty file " + file.getOriginalFilename());
+                       }
+                       String fileLocation = file.getOriginalFilename();
+                       logger.debug("StorageServiceImpl.update: store the widget to:" + fileLocation);
+                       convFile = new File(fileLocation);
+                       FileOutputStream fos = new FileOutputStream(convFile);
+                       fos.write(file.getBytes());
+                       fos.close();
+                       map = unzipper.unzip_db(fileLocation, ".", "tempWidgets");
+                       convFile.delete();
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.update: Failed to store file " + file.getOriginalFilename(), e);
+                       throw new StorageException("StorageServiceImpl.update: Failed to store file " + file.getOriginalFilename(), e);
+               }
+               WidgetFile widgetFile = getWidgetFile(widgetId);
+               
+               InputStream fileInputStream = this.getClass().getClassLoader().getResourceAsStream("framework-template.js");
+               String sb = null;
+               try {
+                       byte[] bytes = new byte[fileInputStream.available()];
+                       fileInputStream.read(bytes);
+                       sb = new String(bytes, "UTF-8");
+               } catch (IOException e) {
+                       logger.error("StorageServiceImpl.save: Failed to load framework-template.js file ", e);
+                       e.printStackTrace();
+               } finally {
+                       if (fileInputStream != null) {
+                               try {
+                                       fileInputStream.close();
+                               } catch (IOException e) {
+                                       logger.error("StorageServiceImpl.update: Failed to close the fileInputStream ", e);
+                                       e.printStackTrace();
+                               }
+                       }
+               }
+               
+               String namespace = "Portal" + widgetId + "Widget";
+               String controllerName = "Portal" + widgetId + "Ctrl";
+               String cssName = "portal" + widgetId + "-css-ready";
+               String colorArg1 = "color: #fff";
+               String framework = sb
+                               .replaceAll("ARUGMENT1", namespace)
+                               .replaceAll("ARUGMENT2", controllerName)
+                               .replaceAll("ARUGMENT3", cssName)
+                               .replaceAll("CSS_ARG1", colorArg1)
+                               .replaceAll("MICROSERVICE_ID", newWidget.getServiceId().toString())
+                               .replaceAll("WIDGET_ID", Long.toString(widgetId));
+               widgetFile.setFramework(framework.getBytes());
+               
+               String javascript = new String(map.get(WidgetConstant.WIDGET_CONTROLLER_LOCATION));
+               String functionHeader = javascript.substring(javascript.indexOf("function"), javascript.indexOf(")")+1);
+               String functionName = functionHeader.substring(functionHeader.indexOf(" "), functionHeader.indexOf("(")).trim();
+               javascript = javascript.replaceFirst(functionName, controllerName);
+               String functionParam = functionHeader.substring(functionHeader.indexOf("(")+1, functionHeader.indexOf(")"));
+               List<String> paramList = Arrays.asList(functionParam.split(","));
+               
+               int left_bracket_index = javascript.indexOf("{") + 1;
+               String widgetData = namespace + "=" + namespace + "||{};" + "var res = " + namespace + ".widgetData;";
+               javascript = javascript.substring(0, left_bracket_index) + widgetData + javascript.substring(left_bracket_index);
+               
+               StringBuilder injectStr = new StringBuilder().append("[");
+               for(int i = 0; i < paramList.size(); i++){
+                       if(i == paramList.size()-1)
+                               injectStr.append("'" + paramList.get(i).trim() + "'];");
+                       else
+                               injectStr.append("'" + paramList.get(i).trim() + "',");
+               }
+               javascript = namespace + ".controller = " + javascript + ";" + namespace + ".controller.$inject = " + injectStr.toString();
+               
+               String html = new String(map.get(WidgetConstant.WIDGET_MARKUP_LOCATION)).replaceFirst(functionName, controllerName);;
+               
+               Pattern cssPattern = Pattern.compile("#.*-css-ready");
+               Matcher cssMatcher = cssPattern.matcher(new String(map.get(WidgetConstant.WIDGET_STYLE_LOCATION)));
+               if (cssMatcher.find( )) {
+                       widgetFile.setCss(new String(map.get(WidgetConstant.WIDGET_STYLE_LOCATION)).replace(cssMatcher.group(0), "#" + cssName).getBytes());
+               }
+               
+               widgetFile.setMarkup(html.getBytes());
+               widgetFile.setController(javascript.getBytes());
+               //widgetFile.setCss(map.get(WidgetConstant.WIDGET_STYLE_LOCATION));
+               Session session = sessionFactory.openSession();
+               Transaction tx = session.beginTransaction();
+               session.update(widgetFile);
+               tx.commit();
+               session.flush();
+               session.close();
+               logger.debug("StorageServiceImpl.save: updated fraemwork.js controller.js, markup.html and style.css files to the database for widget {}", widgetId);
+       }
+
+       
+       @Override
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public String getWidgetMarkup(long widgetId) throws UnsupportedEncodingException {
+               String markup = null;
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetFile.class);
+               criteria.add(Restrictions.eq("widgetId", widgetId));
+               List<WidgetFile> widgetFile = criteria.list();
+               logger.debug("StorageServiceImpl.getWidgetMarkup: getting widget markup result={}", widgetFile);
+               
+               if(widgetFile.size() > 0 )
+                       markup = new String(widgetFile.get(0).getMarkup(), "UTF-8");            
+               return markup;
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public String getWidgetController(long widgetId) throws UnsupportedEncodingException {
+               String controller = null;
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetFile.class);
+               criteria.add(Restrictions.eq("widgetId", widgetId));
+               List<WidgetFile> widgetFile = criteria.list();
+               logger.debug("StorageServiceImpl.getWidgetController: getting widget controller result={}", widgetFile);
+       
+               if(widgetFile.size() > 0 )
+                       controller = new String(widgetFile.get(0).getController(), "UTF-8");
+               return controller;
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public String getWidgetFramework(long widgetId) throws UnsupportedEncodingException {
+               String framework = null;
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetFile.class);
+               criteria.add(Restrictions.eq("widgetId", widgetId));
+               List<WidgetFile> widgetFile = criteria.list();
+               logger.debug("StorageServiceImpl.getWidgetFramework: getting widget framework result={}", widgetFile);
+               
+               if(widgetFile.size() > 0 )
+                       framework = new String(widgetFile.get(0).getFramework(), "UTF-8");
+               return framework;
+       }
+
+       @Override
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public String getWidgetCSS(long widgetId) throws UnsupportedEncodingException {
+               String css = null;
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetFile.class);
+               criteria.add(Restrictions.eq("widgetId", widgetId));
+               List<WidgetFile> widgetFile = criteria.list();
+               logger.debug("StorageServiceImpl.getWidgetCSS: getting widget css result={}", widgetFile);
+               
+               if(widgetFile.size() > 0 )
+                       css = new String(widgetFile.get(0).getCss(), "UTF-8");
+               return css;
+       }
+       
+       
+       @Override
+       @Transactional
+       public byte[] getWidgetCatalogContent(long widgetId) throws Exception{
+       
+               
+               WidgetCatalog widget = widgetCatalogService.getWidgetCatalog(widgetId);
+               String namespace = "Portal" + widgetId + "Widget";
+               String controllerName = "Portal" + widgetId + "Ctrl";
+               String cssName = "portal" + widgetId + "-css-ready";
+               
+               
+               String styles = getWidgetCSS(widgetId).replaceAll(cssName, widget.getName() + "-css-ready");
+               File f = File.createTempFile("temp", ".zip");
+               ZipOutputStream out = new ZipOutputStream(new FileOutputStream(f));
+               ZipEntry e = new ZipEntry(widget.getName() + "/styles/styles.css");
+               out.putNextEntry(new ZipEntry(widget.getName() + "/"));
+               out.putNextEntry(new ZipEntry(widget.getName() + "/styles/"));
+               out.putNextEntry(e);
+               byte[] data = styles.getBytes();
+               out.write(data, 0, data.length);
+               
+
+               String widgetData = namespace + "=" + namespace + "||{};" + "var res = " + namespace + ".widgetData;";
+               String javascript = getWidgetController(widgetId).replace(widgetData, "")
+                               .replace(namespace + ".controller =", "");
+                               
+               String functionHeader = javascript.substring(javascript.indexOf("function"), javascript.indexOf(")")+1);
+               javascript = javascript.replaceFirst(controllerName, widget.getName() + "Ctrl");
+               String functionParam = functionHeader.substring(functionHeader.indexOf("(")+1, functionHeader.indexOf(")"));
+               StringBuilder injectStr = new StringBuilder().append("[");
+               List<String> paramList = Arrays.asList(functionParam.split(","));
+               for(int i = 0; i < paramList.size(); i++){
+                       if(i == paramList.size()-1)
+                               injectStr.append("'" + paramList.get(i).trim() + "'];");
+                       else
+                               injectStr.append("'" + paramList.get(i).trim() + "',");
+               }
+               javascript = javascript.replace(";" + namespace + ".controller.$inject = " + injectStr.toString(), "");
+               
+               e = new ZipEntry(widget.getName() + "/js/controller.js");
+               out.putNextEntry(new ZipEntry(widget.getName() + "/js/"));
+               out.putNextEntry(e);
+               data = javascript.getBytes();
+               out.write(data, 0, data.length);
+               
+               String html = getWidgetMarkup(widgetId).replaceFirst(controllerName, widget.getName() + "Ctrl");
+                       
+               //new String(map.get(WidgetConstant.WIDGET_MARKUP_LOCATION)).replaceFirst(functionName, controllerName);;
+               
+               
+               e = new ZipEntry(widget.getName() + "/markup/markup.html");
+               out.putNextEntry(new ZipEntry(widget.getName() + "/markup/"));
+               out.putNextEntry(e);
+               data = html.getBytes();
+               out.write(data, 0, data.length);
+               out.closeEntry();
+               out.close();
+               byte[] result = Files.readAllBytes(Paths.get(f.getPath()));
+               f.delete();
+               return result;
+       }
+
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/WidgetCatalogServiceImpl.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/service/impl/WidgetCatalogServiceImpl.java
new file mode 100644 (file)
index 0000000..700274e
--- /dev/null
@@ -0,0 +1,240 @@
+package org.openecomp.portalapp.widget.service.impl;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.transaction.Transactional;
+
+import org.hibernate.Criteria;
+import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.hibernate.criterion.Restrictions;
+import org.openecomp.portalapp.widget.domain.MicroserviceData;
+import org.openecomp.portalapp.widget.domain.RoleApp;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.WidgetCatalogService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Service;
+
+@Service("widgetCatalogService")
+@Transactional
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class WidgetCatalogServiceImpl implements WidgetCatalogService {
+
+       private static final Logger logger = LoggerFactory.getLogger(WidgetCatalogServiceImpl.class);
+       
+       @Autowired
+       private SessionFactory sessionFactory;
+       
+       @SuppressWarnings("unchecked")
+       @Override
+       @Transactional
+       public List<WidgetCatalog> getWidgetCatalog(){          
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetCatalog.class)
+                               .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
+               List<WidgetCatalog> widgets = criteria.list();
+               logger.debug("WidgetCatalogServiceImpl.getWidgetCatalog: result={}", widgets);
+               return widgets;
+       }
+       
+       @SuppressWarnings("unchecked")
+       @Transactional
+       public List<WidgetCatalog> getUserWidgetCatalog(String loginName){
+               Session session = sessionFactory.getCurrentSession();
+               StringBuilder sql = new StringBuilder()
+                               
+
+                               .append("  select userWidgets.widget_id, userWidgets.wdg_name, userWidgets.wdg_desc, b.x, b.status_cd, b.y, b.height, b.width  from                                        ") 
+                               .append("  (                                                                                                                                                               ")
+                               .append("  select distinct w.widget_id, w.wdg_name, w.wdg_desc from                                                                                                                                                        ")                    
+                               .append("  ep_widget_catalog w,                                                                                                                                            ")
+                               .append("  ep_widget_catalog_role wr,                                                                                                                                              ")
+                               .append("  fn_user_role ur,                                                                                                                                                                                                                                                                                ")
+                               .append("  fn_user u                                                                                                                                                               ")
+                               .append("  where                                                                                                                                                   ")
+                               .append("  w.widget_id = wr.WIDGET_ID and                                                                                                                                                                                                                                                  ")
+                               .append("  wr.role_id = ur.role_id and                                                                                                                                                                                                                                             ")                                                                                                            
+                               .append("  ur.user_id = u.user_id and                                                                                                                                                                                                                                              ")                                                                                                              
+                               .append("  u.login_id = '" + loginName + "' and (w.all_user_flag = 'N' or w.all_user_flag is null)                                                                 ")                   
+                               .append("                                                                                                                                                              ") 
+                               .append("       union all                                                                                                                                              ") 
+                               .append("                                                                                                                                                              ") 
+                               .append("                                                                                                                                                              ") 
+                               .append("  select distinct w.widget_id, w.wdg_name, w.wdg_desc from                                                                                                                        ") 
+                               .append("       ep_widget_catalog w                                                                                                                                    ") 
+                               .append("       where w.all_user_flag = 'Y'                                                                                                                            ") 
+                               .append("                                                                                                                                                              ") 
+                               .append("        ) userWidgets                                                                                                                                         ") 
+                               .append("                                                                                                                                                              ") 
+                               .append("  left join                                                                                                                                               ") 
+                               .append("                                                                                                                                                              ") 
+                               .append("  (                                                                                                                                                       ") 
+                               .append("               select case when pers.user_id is null then sel.user_id else pers.user_id end as 'user_id', case when sel.widget_id is null then                    ") 
+                               .append("                       pers.widget_id else sel.widget_id end as  'widget_id', pers.x, sel.status_cd, pers.y, pers.height, pers.width                                  ") 
+                               .append("                               from (select * from ep_pers_user_widget_placement where user_id = (select user_id from fn_user where login_id = '" + loginName + "')) pers ") 
+                               .append("                                       left outer join                                                                                                                        ") 
+                               .append("                               (select * from ep_pers_user_widget_sel where user_id = (select user_id from fn_user where login_id = '" + loginName + "')) sel             ") 
+                               .append("               on (pers.user_id = sel.user_id and pers.widget_id = sel.widget_id)                                                                                 ") 
+                               .append("                                                                                                                                                                      ") 
+                               .append("               union                                                                                                                                              ") 
+                               .append("                                                                                                                                                                      ") 
+                               .append("                select case when pers.user_id is null then sel.user_id else pers.user_id end as 'user_id',  case when sel.widget_id is null                       ") 
+                               .append("                       then pers.widget_id else sel.widget_id end as  'widget_id', pers.x, sel.status_cd, pers.y, pers.height, pers.width                             ") 
+                               .append("                               from (select * from ep_pers_user_widget_placement where user_id = (select user_id from fn_user where login_id = '" + loginName + "')) pers ") 
+                               .append("                                       right outer join                                                                                                                       ") 
+                               .append("                               (select * from ep_pers_user_widget_sel where user_id = (select user_id from fn_user where login_id = '" + loginName + "')) sel             ") 
+                               .append("               on (pers.user_id = sel.user_id and pers.widget_id = sel.widget_id)                                                                                 ") 
+                               .append("                                                                                                                                                                  ") 
+                               .append("                order by user_id, widget_id                                                                                                                       ") 
+                               .append(" )b                                                                                                                                                       ") 
+                               .append("  on                                                                                                                                                      ") 
+                               .append("  (userWidgets.widget_id = b.widget_id) order by b.x;                                                                                                     ");  
+                               
+                               
+                               
+               Query query = session.createSQLQuery(sql.toString());
+               List<WidgetCatalog> widgets = query.list();
+               logger.debug("WidgetCatalogServiceImpl.getUserWidgetCatalog: result size={}", widgets);
+               return widgets;         
+       }
+
+       @Override
+       public WidgetCatalog getWidgetCatalog(Long widgetCatalogId) {
+               Session session = sessionFactory.getCurrentSession();
+               Transaction tx = session.beginTransaction();
+               WidgetCatalog widget = (WidgetCatalog) session.get(WidgetCatalog.class, widgetCatalogId);
+               tx.commit();
+               logger.debug("WidgetCatalogServiceImpl.getWidgetCatalog: getting widget={}", widget);
+               return widget;
+       }
+       
+       @Override
+       public void deleteWidgetCatalog(long widgetCatalogId) {
+               logger.debug("WidgetCatalogServiceImpl.deleteWidgetCatalog: deleting the widget with widgetId={}", widgetCatalogId);
+               WidgetCatalog widget = getWidgetCatalog(widgetCatalogId);
+               if (widget == null){
+                       logger.error("No widget found in database while performing WidgetCatalogServiceImpl.deleteWidgetCatalog.");
+                       return;
+               }
+               Session session = sessionFactory.getCurrentSession();
+               Transaction tx = session.beginTransaction();
+               Query query = session.createSQLQuery("delete from ep_pers_user_widget_sel where widget_id = :widgetId ").setParameter("widgetId", widgetCatalogId);
+               query.executeUpdate();
+               query = session.createSQLQuery("delete from ep_pers_user_widget_placement where widget_id = :widgetId ").setParameter("widgetId", widgetCatalogId);
+               query.executeUpdate();
+               query = session.createSQLQuery("delete from ep_widget_catalog_files where widget_id = :widgetId ").setParameter("widgetId", widgetCatalogId);
+               query.executeUpdate();
+               query = session.createSQLQuery("delete from ep_widget_catalog_parameter where widget_id = :widgetId ").setParameter("widgetId", widgetCatalogId);
+               query.executeUpdate();
+               session.delete(widget);
+               tx.commit();
+       }
+       
+       @Override
+       public long saveWidgetCatalog(WidgetCatalog newWidgetCatalog) {
+               
+               try{
+                       if(newWidgetCatalog.getAllowAllUser().equals("1"))
+                               newWidgetCatalog.setAllowAllUser("Y");
+                       else
+                               newWidgetCatalog.setAllowAllUser("N");
+                       
+                       logger.debug("WidgetCatalogServiceImpl.saveWidgetCatalog: widget={}", newWidgetCatalog);
+                       Session session = sessionFactory.openSession();
+                       Transaction tx = session.beginTransaction();            
+                       session.save(newWidgetCatalog);
+                       tx.commit();
+                       session.flush();
+                       session.close();
+                       updateAppId(newWidgetCatalog.getId(), newWidgetCatalog.getWidgetRoles());
+               }
+               catch(Exception e){
+                       logger.error("Exception occurred while performing WidgetCatalogServiceImpl.saveWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               return newWidgetCatalog.getId();
+       }
+
+       @Override
+       public void updateWidgetCatalog(Long widgetCatalogId, WidgetCatalog newWidgetCatalog) {
+               logger.debug("WidgetCatalogServiceImpl.updateWidgetCatalog: widget={}", newWidgetCatalog);
+               WidgetCatalog oldWidget = getWidgetCatalog(widgetCatalogId);
+               try{
+                       if (newWidgetCatalog.getAllowAllUser().equals("1")) 
+                               newWidgetCatalog.setAllowAllUser("Y");
+                       else 
+                               newWidgetCatalog.setAllowAllUser("N");
+                       
+                       newWidgetCatalog.setId(widgetCatalogId);
+                       newWidgetCatalog.setServiceId(oldWidget.getServiceId());
+                       Session session = sessionFactory.openSession();
+                       Transaction tx = session.beginTransaction();
+                       session.update(newWidgetCatalog);
+                       tx.commit();
+                       session.flush();
+                       session.close();
+                       updateAppId(newWidgetCatalog.getId(), newWidgetCatalog.getWidgetRoles());
+               }catch(Exception e){
+                       logger.error("Exception occurred while performing WidgetCatalogServiceImpl.updateWidgetCatalog in widget microservices. Details:" + e.getMessage());
+               }
+               
+       }       
+       
+       @Override
+       public Long getServiceIdByWidget(Long widgetCatalogId) {
+               Session session = sessionFactory.getCurrentSession();
+               WidgetCatalog widget = (WidgetCatalog) session.get(WidgetCatalog.class, widgetCatalogId);
+               logger.debug("WidgetCatalogServiceImpl.getServiceIdByWidget: result={}", widget);
+               return widget.getServiceId();
+       }
+       
+       @Override
+       public List<WidgetCatalog> getWidgetsByServiceId(Long serviceId) {
+               Session session = sessionFactory.getCurrentSession();
+               Criteria criteria = session.createCriteria(WidgetCatalog.class)
+                               .add(Restrictions.eq("serviceId", serviceId))
+                               .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
+               List<WidgetCatalog> widgets = criteria.list();
+               logger.debug("WidgetCatalogServiceImpl.getWidgetCatalog: result={}", widgets);
+               return widgets;
+       }
+       
+       
+       
+       
+       
+       private void updateAppId(long widgetId, Set<RoleApp> roles){
+               Session session = sessionFactory.openSession();
+               for(RoleApp role: roles){
+                       String sql = "UPDATE ep_widget_catalog_role SET app_id = " + role.getApp().getAppId() + " WHERE widget_id = " + widgetId + " AND ROLE_ID = " + role.getRoleId() ;
+                       Query query = session.createSQLQuery(sql);
+                       query.executeUpdate();
+               }
+               session.flush();
+               session.close();
+       }
+
+       @Override
+       public boolean getWidgetIdByName(String newWidgetName) {
+               Session session = sessionFactory.openSession();
+               Criteria criteria = session.createCriteria(WidgetCatalog.class)
+                               .add(Restrictions.eq("name", newWidgetName))
+                               .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
+               
+               List<MicroserviceData> widgets = criteria.list();
+               logger.debug("WidgetCatalogServiceImpl.getWidgetIdByName: result={}", widgets);
+               session.flush();
+               session.close();
+               
+               return (widgets.size() > 0) ? true : false;
+       }
+
+       
+}
+
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/AuthorizationUtil.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/AuthorizationUtil.java
new file mode 100644 (file)
index 0000000..f25f0db
--- /dev/null
@@ -0,0 +1,19 @@
+package org.openecomp.portalapp.widget.utils;
+
+import java.nio.charset.Charset;
+import java.util.Base64;
+
+public class AuthorizationUtil {
+
+       public boolean authorization(String auth, String security_user, String security_pass){
+               if (auth != null && auth.startsWith("Basic")) {         
+               String base64Credentials = auth.substring("Basic".length()).trim();
+               String credentials = new String(Base64.getDecoder().decode(base64Credentials),
+                       Charset.forName("UTF-8"));
+               final String[] values = credentials.split(":",2);
+               if(security_user.equals(values[0]) && security_pass.equals(values[1]))
+                       return true;
+               }
+               return false;
+       }
+}
diff --git a/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/UnzipUtil.java b/ecomp-portal-widget-ms/src/main/java/org/openecomp/portalapp/widget/utils/UnzipUtil.java
new file mode 100644 (file)
index 0000000..efbfe43
--- /dev/null
@@ -0,0 +1,102 @@
+package org.openecomp.portalapp.widget.utils;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Stack;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.openecomp.portalapp.widget.constant.WidgetConstant;
+import org.openecomp.portalapp.widget.service.impl.StorageServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+public class UnzipUtil {
+       
+    /**
+     * Size of the buffer to read/write data
+     */
+    private static final int BUFFER_SIZE = 4096;
+    private static final Logger logger = LoggerFactory.getLogger(UnzipUtil.class);
+    /**
+     * Extracts a zip file specified by the zipFilePath to a directory specified by
+     * destDirectory (will be created if does not exists)
+     * @param zipFilePath
+     * @param destDirectory
+     * @throws IOException
+     */
+
+    public Map<String, byte[]> unzip_db(String zipFilePath, String destDirectory, String widgetName) throws IOException {
+       
+       logger.debug("UnzipUtil.unzip_db: unzip widget file {}", widgetName);
+        File destDir = new File(destDirectory);
+        if (!destDir.exists()) {
+            destDir.mkdir();
+        }
+        ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
+        ZipEntry entry = zipIn.getNextEntry();
+        Map<String, byte[]> map = new HashMap<>();
+
+        map.put(WidgetConstant.WIDGET_CONTROLLER_LOCATION, null);
+        map.put(WidgetConstant.WIDGET_MARKUP_LOCATION, null);
+        map.put(WidgetConstant.WIDGET_STYLE_LOCATION, null);
+
+        
+        Stack<File> stack = new Stack<>();
+        
+        // iterates over entries in the zip file
+        while (entry != null) {        
+            String filePath = destDirectory + File.separator + widgetName + File.separator +
+                       entry.getName().substring(entry.getName().indexOf("/")+1);
+            logger.debug("UnzipUtil.unzip_db: file path " + filePath);
+            if (!entry.isDirectory()) {
+                // if the entry is a file, extracts it
+               logger.debug("UnzipUtil.unzip_db: unzip and save widget file {}", filePath);
+                stack.push(new File(filePath));
+                extractFile(zipIn, filePath);
+            } else {
+                // if the entry is a directory, make the directory
+               logger.debug("UnzipUtil.unzip_db: unzip and create widget folder {}", filePath);
+                File dir = new File(filePath);
+                stack.push(new File(filePath));
+                
+                dir.mkdir();   
+
+            }
+            if(map.containsKey(entry.getName().substring(entry.getName().indexOf("/")+1))){     
+               map.put(entry.getName().substring(entry.getName().indexOf("/")+1), Files.readAllBytes(Paths.get(filePath)));
+            }
+            zipIn.closeEntry();
+            entry = zipIn.getNextEntry();
+        }
+        zipIn.close();
+        while(!stack.isEmpty())
+               stack.pop().delete();
+        return map;
+    }
+    
+    
+    
+    
+    /**
+     * Extracts a zip entry (file entry)
+     * @param zipIn
+     * @param filePath
+     * @throws IOException
+     */
+    private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
+        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
+        byte[] bytesIn = new byte[BUFFER_SIZE];
+        int read = 0;
+        while ((read = zipIn.read(bytesIn)) != -1) {
+            bos.write(bytesIn, 0, read);
+        }
+        bos.close();
+    }
+}
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/resources/application-properties b/ecomp-portal-widget-ms/src/main/resources/application-properties
new file mode 100644 (file)
index 0000000..77d2b78
--- /dev/null
@@ -0,0 +1,28 @@
+## General App Properties
+server.contextPath=/widget
+server.port=8082
+spring.http.multipart.max-file-size=128MB
+spring.http.multipart.max-request-size=128MB
+microservice.widget.location=/demeter/WebApps/dev/ECOMPPORTAL/microservices/widgets-dir/
+
+## App DB Properties
+spring.datasource.url=jdbc:mariadb:failover://demeter.homer.att.com:3306/ecomp_portal_1702&connectTimeout=2000
+spring.datasource.username=portal
+spring.datasource.password=ENC(8tWrJAXdOKaMqvrVy5e2Jg==)
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
+spring.database.driver.classname=org.mariadb.jdbc.Driver
+spring.jpa.show-sql=false
+spring.jpa.properties.hibernate.format_sql=false
+
+## Basic Authentication Properties
+security.user.name=widget_user
+security.user.password=ENC(IjywcRnI9+nuVEh9+OFFiRWAjBT1n718)
+
+## Certificate Properties
+#server.ssl.key-store=classpath:widget-keystore.p12
+#server.ssl.key-store-password=ENC(DiIYnAMab4u7rEW2yKhF9zBL00uU55q8)
+#server.ssl.keyStoreType=PKCS12
+#server.ssl.keyAlias=widget-microservice
+
+## Jasypt Properties
+jasypt.encryptor.password=EncryptionKey
diff --git a/ecomp-portal-widget-ms/src/main/resources/application.properties.templated b/ecomp-portal-widget-ms/src/main/resources/application.properties.templated
new file mode 100644 (file)
index 0000000..ec4803f
--- /dev/null
@@ -0,0 +1,35 @@
+## General App Properties
+server.contextPath=/widget
+server.port=8082
+spring.http.multipart.max-file-size=128MB
+spring.http.multipart.max-request-size=128MB
+
+## App DB Properties
+spring.datasource.url=jdbc:mariadb:failover://{db_host:db_port/{portal_db}
+spring.datasource.username={username}
+spring.datasource.password=ENC({encrypted_password})
+spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
+spring.database.driver.classname=org.mariadb.jdbc.Driver
+spring.jpa.show-sql=false
+spring.jpa.properties.hibernate.format_sql=false
+
+## Basic Authentication Properties
+security.user.name={basic_auth_username}
+security.user.password=ENC({encrypted_basic_auth_password})
+
+## Initalization setting
+initialization.default.widgets=true
+initialization.widgetData.url={widgetData_url}
+
+## Account Basic Authentication Properties
+account.user.name=portal
+account.user.password=6APqvG4AU2rfLgCvMdySwQ==
+
+## Certificate Properties
+#server.ssl.key-store=classpath:widget-keystore.p12
+#server.ssl.key-store-password=ENC(DiIYnAMab4u7rEW2yKhF9zBL00uU55q8)
+#server.ssl.keyStoreType=PKCS12
+#server.ssl.keyAlias=widget-microservice
+
+## Jasypt Properties
+jasypt.encryptor.password=EncryptionKey
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/resources/events-widget.zip b/ecomp-portal-widget-ms/src/main/resources/events-widget.zip
new file mode 100644 (file)
index 0000000..bddee8e
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/resources/events-widget.zip differ
diff --git a/ecomp-portal-widget-ms/src/main/resources/framework-template.js b/ecomp-portal-widget-ms/src/main/resources/framework-template.js
new file mode 100644 (file)
index 0000000..45350d9
--- /dev/null
@@ -0,0 +1,173 @@
+var ARUGMENT1 = (function(window, undefined) {                                                                                      
+                                                                                                                                    
+       var ARUGMENT1 = ARUGMENT1 || {};                                                                                                
+       function extractHostPortApp(src) {                                                                                                  
+               ARUGMENT1.microserviceId = MICROSERVICE_ID;                                                                                 
+               ARUGMENT1.pathArray = src.split( '/' );                                                                                     
+               ARUGMENT1.widgetName = ARUGMENT1.pathArray[ARUGMENT1.pathArray.length - 2];                                                 
+               ARUGMENT1.serviceSeperator = ARUGMENT1.pathArray[ARUGMENT1.pathArray.length - 4];                                           
+               ARUGMENT1.commonUrl = src.substring(0, src.lastIndexOf("/" + ARUGMENT1.widgetName));                                      
+               ARUGMENT1.recipientDivDataAttrib = 'data-' + ARUGMENT1.widgetName;                                                          
+               ARUGMENT1.controllerName = 'ARUGMENT2';                                                                                     
+               ARUGMENT1.readyCssFlag = 'ARUGMENT3';                                                                                       
+               ARUGMENT1.readyCssFlagExpectedValue = '#bada55';                                                                            
+               ARUGMENT1.serviceURL = src.substring(0, src.lastIndexOf("/" + ARUGMENT1.serviceSeperator)) + '/portalApi/microservice/proxy/parameter/' + WIDGET_ID;  
+       }                                                                                                                              
+                                                                                                                                      
+       extractHostPortApp(document.currentScript.src);                                                                                
+                                                                                                                                      
+       function loadStylesheet(url) {                                                                                                 
+               var link = document.createElement('link');                                                                                 
+               link.rel = 'stylesheet';                                                                                                   
+               link.type = 'text/css';                                                                                                    
+               link.href = url;                                                                                                           
+               var entry = document.getElementsByTagName('script')[0];                                                                    
+               entry.parentNode.insertBefore(link, entry);                                                                                
+       }                                                                                                                              
+                                                                                                                                   
+       function isCssReady(callback) {                                                                                                
+               var testElem = document.createElement('span');                                                                             
+               testElem.id = ARUGMENT1.readyCssFlag;                                                                                      
+               testElem.style = 'CSS_ARG1';                                                                       
+               var entry = document.getElementsByTagName('script')[0];                                                                    
+               entry.parentNode.insertBefore(testElem, entry);                                                                            
+                                                                                                                                      
+               (function poll() {                                                                                                         
+                       var node = document.getElementById('css-ready');                                                                       
+                       var value;                                                                                                             
+                       if (window.getComputedStyle) {                                                                                         
+                               value = document.defaultView.getComputedStyle(testElem, null)                                                      
+                                               .getPropertyValue('color');                                                                                
+                       }                                                                                                                      
+                       else if (node.currentStyle) {                                                                                          
+                               value = node.currentStyle.color;                                                                                   
+                       }                                                                                                                      
+                       if (value && value === 'rgb(186, 218, 85)' || value.toLowerCase() === ARUGMENT1.readyCssFlagExpectedValue) {           
+                               callback();                                                                                                        
+                       } else {                                                                                                               
+                               setTimeout(poll, 500);                                                                                             
+                       }                                                                                                                      
+               })();                                                                                                                      
+       }                                                                                                                              
+                                                                                                                                      
+       function injectCss(css) {                                                                                                      
+               var style = document.createElement('style');                                                                               
+               style.type = 'text/css';                                                                                                   
+               css = css.replace(/\}/g, "}\n");                                                                                           
+                                                                                                                                      
+               if (style.styleSheet) {                                                                                                    
+                       style.styleSheet.cssText = css;                                                                                        
+               } else {                                                                                                                   
+                       style.appendChild(document.createTextNode(css));                                                                       
+               }                                                                                                                          
+               var entry = document.getElementsByTagName('script')[0];                                                                    
+               entry.parentNode.insertBefore(style, entry);                                                                               
+       }                                                                                                                              
+                                                                                                                                      
+       function loadScript(url, callback) {                                                                                           
+               var script = document.createElement('script');                                                                             
+               script.src = url;                                                                                                          
+               var entry = document.getElementsByTagName('script')[0];                                                                    
+               entry.parentNode.insertBefore(script, entry);                                                                              
+               script.onload = script.onreadystatechange = function() {                                                                   
+                       var rdyState = script.readyState;                                                                                      
+                       if (!rdyState || /complete|loaded/.test(script.readyState)) {                                                          
+                               callback();                                                                                                        
+                               script.onload = null;                                                                                              
+                               script.onreadystatechange = null;                                                                                  
+                       }                                                                                                                      
+               };                                                                                                                         
+       }                                                                                                                              
+                                                                                                                                   
+       function loadSupportingFiles(callback) {                                                                                       
+               callback();                                                                                                                
+       }                                                                                                                              
+                                                                                                                                      
+       function getWidgetParams() {                                                                                                   
+                                                                                                                                          
+       }                                                                                                                              
+                                                                                                                                      
+       function getWidgetData(widgetUrl, callback) {                                                                                      
+       var responseData;                                                                                                                                                                                                  
+       try{                                                                                                                                                                                                               
+               jQuery.ajax({                                                                                                                                                                                              
+                       url: widgetUrl,                                                                                                                                                                                            
+                       method: "GET",                                                                                                                                                                                                     
+                       xhrFields: {                                                                                                                                                                                                       
+                               withCredentials: true                                                                                                                                                                              
+                       },    
+                       crossDomain: true,                      
+                       success: function (result) {                                                                                                                                                                               
+                               if (result.isOk == false){                                                                                                                                                                         
+                                                                                                                                                                                                                                  
+                               }else{                                                                                                                                                                                             
+                                       callback(result);                                                                                                                                                                                          
+                               }                                                                                                                                                                                                  
+                       }                                                                                                                                                                                                  
+               });                                                                                                                                                                                                
+       }                                                                                                                                                                                                                  
+       catch(e){                                                                                                                                                                                                          
+       
+       }                                                                                                                                                                                                                  
+                                                                                                                                                                                          
+       }                                                                                                   
+                                                                                                                                      
+       function getMarkupContent(markupLocation, target){                                                                             
+                                                                                                                                          
+               jQuery.ajax({                                                                                                              
+               url: markupLocation,                                                                                                   
+               success: function (result) {                                                                                           
+                   if (result.isOk == false){                                                                                         
+                                                                                                                                      
+                   }else{                                                                                                             
+                       target.innerHTML = result;                                                                                     
+                               }                                                                                                                  
+               },                                                                                                                     
+               async: false                                                                                                           
+           });                                                                                                                        
+       }                                                                                                                              
+                                                                                                                                      
+       function renderWidget(data, location, $controllerProvider) {                                                                   
+               var div = document.createElement('div');                                                                                   
+               getMarkupContent(ARUGMENT1.commonUrl + "/markup/" + ARUGMENT1.widgetName, div);                                          
+               location.append(div);                                                                                                      
+                ARUGMENT1.widgetData = data;                                                                                              
+               app.controllerProvider.register(ARUGMENT1.controllerName, ARUGMENT1.controller);                                           
+               var mController = angular.element(document.getElementById("widgets"));                                                   
+               mController.scope().activateThis(location);                                                                                
+       }                                                                                                                              
+                                                                                                                                      
+       function printAllArtifacts(moduleName, controllerName) {                                                                       
+           var queue = angular.module(moduleName)._invokeQueue;                                                                       
+           for(var i=0;i<queue.length;i++) {                                                                                          
+               var call = queue[i];                                                                                                   
+               console.log(i + '. ' + call[0] + ' - ' + call[1] + ' - ' + call[2][0]);                                                
+           }                                                                                                                          
+       }                                                                                                                              
+                                                                                                                                      
+       function get(name){                                                                                                            
+          if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))                                     
+             return decodeURIComponent(name[1]);                                                                                      
+       }                                                                                                                              
+                                                                                                                                   
+       loadSupportingFiles(function() {                                                                                               
+               loadStylesheet(ARUGMENT1.commonUrl + '/' + ARUGMENT1.widgetName + '/style.css');                                           
+               loadScript(ARUGMENT1.commonUrl + '/' + ARUGMENT1.widgetName + '/controller.js',                                            
+                       function() {                                                                                                           
+                               $('['+ ARUGMENT1.recipientDivDataAttrib + ']').each(function() {                                                   
+                                       var location = jQuery(this);                                                                                   
+                                       location.removeAttr(ARUGMENT1.recipientDivDataAttrib);                                                         
+                                       var id = location.attr(ARUGMENT1.recipientDivDataAttrib);                                                      
+                                       getWidgetData(ARUGMENT1.serviceURL, function(data) {                                                           
+                                               isCssReady(function(){                                                                                     
+                                                       renderWidget(data, location);                                                                          
+                                               });                                                                                                                                        
+                                       });                                                                                                            
+                               });                                                                                                                
+                       }                                                                                                                      
+               );                                                                                                                         
+       });                                                                                                                            
+                                                                                                                                      
+       return ARUGMENT1;                                                                                                                  
+})(window);                                                                                                                        
+                               
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/resources/logback.xml b/ecomp-portal-widget-ms/src/main/resources/logback.xml
new file mode 100644 (file)
index 0000000..204a659
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+       <property name="WIDGET_LOG_HOME" value="logs" />
+       
+       
+       <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+               <layout class="ch.qos.logback.classic.PatternLayout">
+                       <Pattern>
+                               %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
+                       </Pattern>
+               </layout>
+       </appender>
+
+       <logger name="org.springframework.web" level="info" additivity="false">
+               <appender-ref ref="STDOUT" />
+       </logger>
+       
+       <contextName>${HOSTNAME}</contextName>
+
+
+       <appender name="ADUIT"
+               class="ch.qos.logback.core.rolling.RollingFileAppender">
+               <file>${WIDGET_LOG_HOME}/aduit.log</file>
+               <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+                       <Pattern>
+                               %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
+                       </Pattern>
+               </encoder>
+               <!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
+               <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                       <fileNamePattern>${WIDGET_LOG_HOME}/archived/aduit.%d{yyyy-MM-dd}.%i.zip
+                        </fileNamePattern>
+            <maxHistory>30</maxHistory>  
+                       <timeBasedFileNamingAndTriggeringPolicy
+                               class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                               <maxFileSize>100KB</maxFileSize>
+                       </timeBasedFileNamingAndTriggeringPolicy>
+               </rollingPolicy>
+       </appender>
+
+       <appender name="APPLICATION"
+               class="ch.qos.logback.core.rolling.RollingFileAppender">
+               <file>${WIDGET_LOG_HOME}/application.log</file>
+               <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+                       <Pattern>
+                               %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
+                       </Pattern>
+               </encoder>
+               <!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
+               <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                       <fileNamePattern>${WIDGET_LOG_HOME}/archived/application.%d{yyyy-MM-dd}.%i.zip
+                        </fileNamePattern>
+            <maxHistory>30</maxHistory>  
+                       <timeBasedFileNamingAndTriggeringPolicy
+                               class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                               <maxFileSize>100KB</maxFileSize>
+                       </timeBasedFileNamingAndTriggeringPolicy>
+               </rollingPolicy>
+       </appender>
+
+
+       <appender name="DEBUG"
+               class="ch.qos.logback.core.rolling.RollingFileAppender">
+               <file>${WIDGET_LOG_HOME}/debug.log</file>
+               <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+                       <Pattern>
+                               %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
+                       </Pattern>
+               </encoder>
+               <!-- %d{yyyy-MM-dd HH:mm:ss} - %msg%n -->
+               <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                       <fileNamePattern>${WIDGET_LOG_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.zip
+                        </fileNamePattern>
+            <maxHistory>30</maxHistory>  
+                       <timeBasedFileNamingAndTriggeringPolicy
+                               class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                               <maxFileSize>100KB</maxFileSize>
+                       </timeBasedFileNamingAndTriggeringPolicy>
+               </rollingPolicy>
+       </appender>
+       
+       
+       <appender name="ERROR"
+               class="ch.qos.logback.core.rolling.RollingFileAppender">
+               <file>${WIDGET_LOG_HOME}/error.log</file>
+               <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+                       <Pattern>
+                               %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
+                       </Pattern>
+               </encoder>
+
+               <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                       <fileNamePattern>${WIDGET_LOG_HOME}/archived/error.%d{yyyy-MM-dd}.%i.zip
+                        </fileNamePattern>
+            <maxHistory>30</maxHistory>  
+                       <timeBasedFileNamingAndTriggeringPolicy
+                               class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                               <maxFileSize>100KB</maxFileSize>
+                       </timeBasedFileNamingAndTriggeringPolicy>
+               </rollingPolicy>
+       </appender> 
+       
+       
+       <appender name="METRICS"
+               class="ch.qos.logback.core.rolling.RollingFileAppender">
+               <file>${WIDGET_LOG_HOME}/metrics.log</file>
+               <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+                       <Pattern>
+                               %date{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestId}|%logger{0}|%-5level|%contextName| %msg%n"
+                       </Pattern>
+               </encoder>
+
+               <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                       <fileNamePattern>${WIDGET_LOG_HOME}/archived/metrics.%d{yyyy-MM-dd}.%i.zip
+                        </fileNamePattern>
+            <maxHistory>30</maxHistory>  
+                       <timeBasedFileNamingAndTriggeringPolicy
+                               class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                               <maxFileSize>100KB</maxFileSize>
+                       </timeBasedFileNamingAndTriggeringPolicy>
+               </rollingPolicy>
+       </appender> 
+       
+       <logger name="org.openecomp.portalapp.widget" level="debug" additivity="false">
+               <appender-ref ref="ERROR" />
+               <appender-ref ref="DEBUG" />
+               <appender-ref ref="APPLICATION" />
+               <appender-ref ref="STDOUT" />
+       </logger>
+
+       <root level="info">
+               <appender-ref ref="DEBUG" />
+               <appender-ref ref="APPLICATION" />
+               <appender-ref ref="STDOUT" />
+       </root>
+       
+</configuration>
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/resources/news-widget.zip b/ecomp-portal-widget-ms/src/main/resources/news-widget.zip
new file mode 100644 (file)
index 0000000..2d367c8
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/resources/news-widget.zip differ
diff --git a/ecomp-portal-widget-ms/src/main/resources/resources-widget.zip b/ecomp-portal-widget-ms/src/main/resources/resources-widget.zip
new file mode 100644 (file)
index 0000000..d2ada04
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/resources/resources-widget.zip differ
diff --git a/ecomp-portal-widget-ms/src/main/resources/templates/Upload.html b/ecomp-portal-widget-ms/src/main/resources/templates/Upload.html
new file mode 100644 (file)
index 0000000..a5e7c63
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<body>
+    <div align="center">
+         <form method="post" action="doUpload/widget-resources" enctype="multipart/form-data">
+            <table border="0">
+                <tr>
+                    <td>Pick file:</td>
+                    <td><input type="file" name="fileUpload" size="50" /></td>
+                </tr>
+                <tr>
+                    <td colspan="2" align="center"><input type="submit" value="Upload" /></td>
+                </tr>
+            </table>
+        </form>
+    </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/src/main/resources/templates/widgetsPage.html b/ecomp-portal-widget-ms/src/main/resources/templates/widgetsPage.html
new file mode 100644 (file)
index 0000000..440f64c
--- /dev/null
@@ -0,0 +1,15 @@
+<html xmlns:th="http://www.thymeleaf.org">
+<body>
+       
+       <p> Uploaded Widgets: </p>
+
+       <div>
+               <ul>
+                       <li th:each="file : ${files}">
+                               <a th:href="${file}" th:text="${file}" />
+                       </li>
+               </ul>
+       </div>
+
+</body>
+</html>
diff --git a/ecomp-portal-widget-ms/src/main/resources/widget-keystore.p12 b/ecomp-portal-widget-ms/src/main/resources/widget-keystore.p12
new file mode 100644 (file)
index 0000000..b2dd42f
Binary files /dev/null and b/ecomp-portal-widget-ms/src/main/resources/widget-keystore.p12 differ
diff --git a/ecomp-portal-widget-ms/src/main/resources/widget_ms_start.sh b/ecomp-portal-widget-ms/src/main/resources/widget_ms_start.sh
new file mode 100755 (executable)
index 0000000..8405fe9
--- /dev/null
@@ -0,0 +1,4 @@
+APP_PROPERTY_LOCATION=/tmp/application.properties
+echo "Starting ecomp-portal-widget-ms image in a new container !!!"
+docker run -d --name "ecomp-portal-widget-ms" -p 8083:8082 -v $APP_PROPERTY_LOCATION:/application.properties ecompportal-widget-ms
+
diff --git a/ecomp-portal-widget-ms/src/main/resources/widget_ms_stop.sh b/ecomp-portal-widget-ms/src/main/resources/widget_ms_stop.sh
new file mode 100755 (executable)
index 0000000..8c9abf5
--- /dev/null
@@ -0,0 +1,5 @@
+echo "Stopping ecomp-portal-widget-ms container !!!"
+docker stop ecomp-portal-widget-ms
+echo "Removing docker image portal-widget-ms !!!"
+docker rm ecomp-portal-widget-ms
+
diff --git a/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetFileControllerTest.java b/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetFileControllerTest.java
new file mode 100644 (file)
index 0000000..2045435
--- /dev/null
@@ -0,0 +1,74 @@
+package org.openecomp.portalapp.widget.test.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.times;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.portalapp.widget.controller.DatabaseFileUploadController;
+import org.openecomp.portalapp.widget.service.impl.StorageServiceImpl;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class WidgetFileControllerTest {
+       private MockMvc mockMvc;
+       
+       @Mock
+       private StorageServiceImpl storageService;
+       
+       @InjectMocks
+       private DatabaseFileUploadController controller;
+       
+       @Before
+       public void setUp() {
+               MockitoAnnotations.initMocks(this);
+               mockMvc = MockMvcBuilders.standaloneSetup(controller).build();
+       }
+       
+       @Test
+       public void getWidgetMarkup_NoError() throws Exception{
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               Long widgetId = new Long(1);
+               mockMvc.perform(MockMvcRequestBuilders.get("/microservices/markup/" + widgetId)).andReturn();;
+               Mockito.verify(storageService, times(1)).getWidgetMarkup(storageServiceArg.capture());
+               assertEquals(storageServiceArg.getValue(), widgetId);
+       }
+       
+       @Test
+       public void getWidgetController_NoError() throws Exception{
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               Long widgetId = new Long(1);
+               mockMvc.perform(MockMvcRequestBuilders.get("/microservices/" + widgetId + "/controller.js")).andReturn();;
+               Mockito.verify(storageService, times(1)).getWidgetController(storageServiceArg.capture());
+               assertEquals(storageServiceArg.getValue(), widgetId);
+       }
+       
+       @Test
+       public void getWidgetFramework_NoError() throws Exception{
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               Long widgetId = new Long(1);
+               mockMvc.perform(MockMvcRequestBuilders.get("/microservices/" + widgetId + "/framework.js")).andReturn();;
+               Mockito.verify(storageService, times(1)).getWidgetFramework(storageServiceArg.capture());
+               assertEquals(storageServiceArg.getValue(), widgetId);
+       }
+       
+       @Test
+       public void getWidgetCSS_NoError() throws Exception{
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               Long widgetId = new Long(1);
+               mockMvc.perform(MockMvcRequestBuilders.get("/microservices/" + widgetId + "/styles.css")).andReturn();;
+               Mockito.verify(storageService, times(1)).getWidgetCSS(storageServiceArg.capture());
+               assertEquals(storageServiceArg.getValue(), widgetId);
+       }
+       
+}
diff --git a/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetsCatalogControllerTest.java b/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/controller/WidgetsCatalogControllerTest.java
new file mode 100644 (file)
index 0000000..bd7eba3
--- /dev/null
@@ -0,0 +1,195 @@
+package org.openecomp.portalapp.widget.test.controller;
+
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.times;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
+import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
+import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.codec.binary.Base64;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.portalapp.widget.controller.WidgetsCatalogController;
+import org.openecomp.portalapp.widget.domain.ValidationRespond;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.StorageService;
+import org.openecomp.portalapp.widget.service.WidgetCatalogService;
+import org.springframework.http.MediaType;
+import org.springframework.test.util.ReflectionTestUtils;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.multipart.MultipartFile;
+
+@RunWith(MockitoJUnitRunner.class)
+public class WidgetsCatalogControllerTest {
+
+       private MockMvc mockMvc;
+       
+       @Mock
+       private WidgetCatalogService widgetService;
+       
+       @Mock
+       private StorageService storageService;
+       
+       @InjectMocks
+       private WidgetsCatalogController controller;
+       
+       @Before
+       public void setUp() {
+               MockitoAnnotations.initMocks(this);
+               mockMvc = MockMvcBuilders.standaloneSetup(controller).build();
+       }
+       
+       @Test
+       public void getWidgetCatalog_ValidAuthorization_NoError() throws Exception {    
+               List<WidgetCatalog> list = new ArrayList<WidgetCatalog>();
+               WidgetCatalog widget = new WidgetCatalog();
+               widget.setId(1);
+               widget.setName("junit");
+               list.add(widget);
+               Mockito.when(widgetService.getWidgetCatalog()).thenReturn(list);
+               
+               String security_user = "user";
+               String security_pass = "password";
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + security_pass).getBytes()));
+               mockMvc.perform(get("/microservices/widgetCatalog/").header("Authorization", basic_auth))
+               .andExpect(status().isOk())
+               .andExpect(jsonPath("$[0].id", is(1)))
+               .andExpect(jsonPath("$[0].name", is("junit")));
+       }
+         
+       @Test
+       public void getWidgetCatalog_InValidAuthorization_Unauthorized() throws Exception {     
+
+               String security_user = "user";
+               String security_pass = "password";
+               String wrong_pass = "wrong";
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + wrong_pass).getBytes()));
+               mockMvc.perform(get("/microservices/widgetCatalog/").header("Authorization", basic_auth))
+               .andExpect(status().isUnauthorized());
+       }
+       
+       @Test
+       public void getWidgetCatalog_NoAuthorization_BadRequest() throws Exception {    
+               List<WidgetCatalog> list = new ArrayList<WidgetCatalog>();
+               WidgetCatalog widget = new WidgetCatalog();
+               list.add(widget);
+               Mockito.when(widgetService.getWidgetCatalog()).thenReturn(list);
+               
+               mockMvc.perform(get("/microservices/widgetCatalog/"))
+               .andExpect(status().isBadRequest());
+       }
+       
+       
+       @Test
+       public void saveWidgetCatalog_ValidAuthorization_NoError() throws Exception {   
+               ValidationRespond respond = new ValidationRespond(true, null);
+               Mockito.when(storageService.checkZipFile(any(MultipartFile.class))).thenReturn(respond);
+               
+               String security_user = "user";
+               String security_pass = "password";
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + security_pass).getBytes()));
+               mockMvc.perform(MockMvcRequestBuilders.fileUpload("/microservices/widgetCatalog/").file("file", null)
+                               .param("widget", "{}")
+                               .header("Authorization", basic_auth)
+                               .contentType(MediaType.MULTIPART_FORM_DATA))
+               .andExpect(jsonPath("$.valid", is(true)));
+               
+               Mockito.verify(widgetService, times(1)).saveWidgetCatalog(any(WidgetCatalog.class));
+       }
+       
+       
+       @Test
+       public void updateWidgetCatalog_ValidAuthorization_NoError() throws Exception { 
+               String security_user = "user"; 
+               String security_pass = "password";
+               Long widgetId = new Long(1);
+               ArgumentCaptor<Long> widgetServiceArg = ArgumentCaptor.forClass(Long.class);
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + security_pass).getBytes()));
+               mockMvc.perform(put("/microservices/widgetCatalog/" + widgetId).contentType(MediaType.APPLICATION_JSON).content("{}").header("Authorization", basic_auth));
+               
+               Mockito.verify(widgetService, times(1)).updateWidgetCatalog(widgetServiceArg.capture(), any(WidgetCatalog.class));
+               assertEquals(widgetServiceArg.getValue(), widgetId);
+       }
+       
+       
+       @Test
+       public void updateWidgetCatalogwithFiles_ValidAuthorization_NoError() throws Exception {
+               ValidationRespond respond = new ValidationRespond(true, null);
+               Mockito.when(storageService.checkZipFile(any(MultipartFile.class))).thenReturn(respond);
+               
+               String security_user = "user";
+               String security_pass = "password";
+               Long widgetId = new Long(1);
+               ArgumentCaptor<Long> widgetServiceArg = ArgumentCaptor.forClass(Long.class);
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + security_pass).getBytes()));
+               mockMvc.perform(MockMvcRequestBuilders.fileUpload("/microservices/widgetCatalog/" + widgetId).file("file", null)
+                               .param("widget", "{}")
+                               .header("Authorization", basic_auth)
+                               .contentType(MediaType.MULTIPART_FORM_DATA))
+               .andExpect(jsonPath("$.valid", is(true)));
+               
+               Mockito.verify(widgetService, times(1)).updateWidgetCatalog(widgetServiceArg.capture(), any(WidgetCatalog.class));
+               assertEquals(widgetServiceArg.getValue(), widgetId);
+       }
+       
+       @Test
+       public void deleteOnboardingWidget_ValidAuthorization_NoError() throws Exception {
+               
+               String security_user = "user";
+               String security_pass = "password";
+               Long widgetId = new Long(1);
+               
+               ReflectionTestUtils.setField(controller, "security_user", security_user, String.class);
+               ReflectionTestUtils.setField(controller, "security_pass", security_pass, String.class);
+               
+               String basic_auth = "Basic " + new String(Base64.encodeBase64((security_user + ":" + security_pass).getBytes()));
+               mockMvc.perform(MockMvcRequestBuilders.delete("/microservices/widgetCatalog/" + widgetId)
+                               .header("Authorization", basic_auth));
+               ArgumentCaptor<Long> widgetServiceArg = ArgumentCaptor.forClass(Long.class);
+               ArgumentCaptor<Long> storageServiceArg = ArgumentCaptor.forClass(Long.class);
+               
+               Mockito.verify(widgetService, times(1)).deleteWidgetCatalog(widgetServiceArg.capture());
+               assertEquals(widgetServiceArg.getValue(), widgetId);
+               Mockito.verify(storageService, times(1)).deleteWidgetFile(storageServiceArg.capture());
+               assertEquals(storageServiceArg.getValue(), widgetId);
+       }
+       
+       
+}
diff --git a/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/service/WidgetCatalogServiceTest.java b/ecomp-portal-widget-ms/src/test/java/org/openecomp/portalapp/widget/test/service/WidgetCatalogServiceTest.java
new file mode 100644 (file)
index 0000000..3def606
--- /dev/null
@@ -0,0 +1,124 @@
+package org.openecomp.portalapp.widget.test.service;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Mockito.RETURNS_DEEP_STUBS;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.Criteria;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.Transaction;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.portalapp.widget.domain.RoleApp;
+import org.openecomp.portalapp.widget.domain.WidgetCatalog;
+import org.openecomp.portalapp.widget.service.impl.WidgetCatalogServiceImpl;
+
+
+@RunWith(MockitoJUnitRunner.class)
+public class WidgetCatalogServiceTest {
+       
+       @Mock
+       private SessionFactory mockedSessionFactory;
+
+       @InjectMocks
+       private WidgetCatalogServiceImpl widgetCatalogService;
+
+       @Before
+       public void setUp() {
+               MockitoAnnotations.initMocks(this);
+       }
+       
+       @Test
+       public void getWidgetCatalog_NoError() throws Exception{
+               Session mockedSession = Mockito.mock(Session.class);
+               Criteria mockedCriteria = Mockito.mock(Criteria.class);
+               
+               List<WidgetCatalog> list = new ArrayList<WidgetCatalog>();
+               WidgetCatalog widget = new WidgetCatalog();
+               widget.setId(1);
+               widget.setName("junit");
+               list.add(widget);
+               
+               Mockito.when(mockedSessionFactory.getCurrentSession()).thenReturn(mockedSession);
+               Mockito.when(mockedSession.createCriteria(WidgetCatalog.class)).thenReturn(mockedCriteria);
+               Mockito.when(mockedCriteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY)).thenReturn(mockedCriteria);
+               Mockito.when(mockedCriteria.list()).thenReturn(list);
+               
+               List<WidgetCatalog> result = widgetCatalogService.getWidgetCatalog();
+               assertNotNull(result);
+               assertEquals(result, list);
+       }
+       
+       
+       @Test
+       public void saveWidgetCatalog_NoError() throws Exception{
+               Set<RoleApp> set = new HashSet<RoleApp>();
+               WidgetCatalog widget = new WidgetCatalog();
+               widget.setId(1);
+               widget.setName("junit");
+               widget.setAllowAllUser("1");
+               widget.setWidgetRoles(set);
+               
+               Session mockedSession = Mockito.mock(Session.class);
+               Transaction mockedTransaction = Mockito.mock(Transaction.class);
+               Mockito.when(mockedSessionFactory.openSession()).thenReturn(mockedSession);
+               Mockito.when(mockedSession.beginTransaction()).thenReturn(mockedTransaction);
+               long widgetId = widgetCatalogService.saveWidgetCatalog(widget);
+               assertNotNull(widgetId);
+               assertEquals(widgetId, 1);
+       }
+       
+       @Rule public ExpectedException thrown = ExpectedException.none();
+       
+       
+       @Test
+       public void deleteWidgetCatalog_NoError() throws Exception{
+               long widgetId =1 ;
+               WidgetCatalog widget = new WidgetCatalog();
+               widget.setId(1);
+               widget.setName("junit");
+
+               Session mockedSession = Mockito.mock(Session.class, RETURNS_DEEP_STUBS);
+               Transaction mockedTransaction = Mockito.mock(Transaction.class);
+               
+               Mockito.when(mockedSessionFactory.getCurrentSession()).thenReturn(mockedSession);
+               Mockito.when(mockedSession.beginTransaction()).thenReturn(mockedTransaction);
+               Mockito.when(mockedSession.get(WidgetCatalog.class, widgetId)).thenReturn(widget);
+               
+               widgetCatalogService.deleteWidgetCatalog(widgetId);
+       }
+       
+       @Test
+       public void updateWidgetCatalog_NoError() throws Exception{
+               long widgetId =1 ;
+               WidgetCatalog widget = new WidgetCatalog();
+               widget.setId(1);
+               widget.setName("junit");
+
+               Session mockedSession = Mockito.mock(Session.class, RETURNS_DEEP_STUBS);
+               Transaction mockedTransaction = Mockito.mock(Transaction.class);
+               
+               Mockito.when(mockedSessionFactory.getCurrentSession()).thenReturn(mockedSession);
+               Mockito.when(mockedSession.beginTransaction()).thenReturn(mockedTransaction);
+               Mockito.when(mockedSession.get(WidgetCatalog.class, widgetId)).thenReturn(widget);
+               
+               widgetCatalogService.deleteWidgetCatalog(widgetId);
+       }
+       
+       
+}
diff --git a/ecomp-portal-widget-ms/testadd.txt b/ecomp-portal-widget-ms/testadd.txt
new file mode 100644 (file)
index 0000000..bdf08de
--- /dev/null
@@ -0,0 +1 @@
+test file
\ No newline at end of file
diff --git a/ecomp-portal-widget-ms/website.url b/ecomp-portal-widget-ms/website.url
new file mode 100644 (file)
index 0000000..4b50369
Binary files /dev/null and b/ecomp-portal-widget-ms/website.url differ